@streamlayer/react 0.32.5 → 0.32.6
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.
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/masters2.js +2 -2
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/masters.js +1 -1
- package/lib/dist/es/gamification-feature.js +269 -269
- package/lib/dist/es/masters.js +1 -1
- package/lib/es/gamification-feature.js +1 -1
- package/lib/es/masters2.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("./index4.js"),C=require("@nanostores/react"),O=require("./masters2.js"),h=require("@streamlayer/sdk-web-types"),D=require("react"),de=require("./index3.js");require("react-countup");const Ae=require("react-countdown-circle-timer"),k=require("./index2.js");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const Se=o.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),De=o.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),ze=()=>o.n1,Oe=o.styled_default(ze())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),_e=o.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),ke=o.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),Ce=()=>o.n1,be=o.styled_default(Ce())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ue=({type:e,close:t,label:n})=>{const i=e?O.o[e]:{label:n,iconName:void 0};return s.jsxs(Se,{children:[s.jsxs(De,{children:[(i==null?void 0:i.iconName)&&s.jsx(Oe,{"data-type-trivia":e===h.QuestionType.TRIVIA,"data-type-poll":e===h.QuestionType.POLL,name:i.iconName}),(i==null?void 0:i.label)&&s.jsx(_e,{children:i.label})]}),s.jsx(ke,{onClick:t,children:s.jsx(be,{name:"icon-cross"})})]})},pe=e=>e.split(/\s+/).map(t=>t[0]).join("").toUpperCase(),me=e=>e?e.toLocaleString("en-US"):"0",Ee=e=>e.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),we=e=>e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),Le=e=>!isNaN(e.getTime()),$e=o.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),Qe=o.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),Re=o.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),Z=({indicator:e,title:t})=>s.jsxs($e,{children:[s.jsx(Qe,{children:t}),s.jsx(Re,{children:e})]}),Ue=o.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),qe=o.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),Pe=o.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),$=({indicator:e,title:t})=>s.jsxs(Ue,{children:[s.jsx(qe,{children:e}),s.jsx(Pe,{children:t})]}),Ye=o.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),We=o.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Ve=o.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),Fe=o.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),Be=o.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),He=o.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),Ge=o.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),Ze=o.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Je=o.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Ke=o.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),Xe=o.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),et=o.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),tt=o.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),st=o.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),nt=o.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),it=o.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),ot=o.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),rt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",Ie=({avatar:e,name:t,points:n,friendsRank:i,rank:r,streak:d,correct:p,incorrect:m,inTop:c,successRate:I})=>s.jsxs(Ye,{children:[s.jsx(We,{children:s.jsxs(Fe,{children:[s.jsxs(ot,{children:[e&&s.jsx(Be,{alt:"avatar",src:e}),!e&&s.jsx(it,{children:pe(t||"")})]}),s.jsxs(He,{children:[s.jsx(Ge,{children:t}),s.jsxs(Ze,{children:[s.jsxs(Ke,{children:[s.jsx(Je,{alt:"rank-icon",src:rt}),s.jsxs(Xe,{children:[me(n),s.jsx(et,{children:"PTS"})]})]}),s.jsx(tt,{}),s.jsxs("div",{children:["TOP ",c||0,"%"]})]})]})]})}),s.jsxs(Ve,{children:[s.jsxs(st,{children:[s.jsx(Z,{indicator:i||0,title:"Friends rank"}),s.jsx(Z,{indicator:r||0,title:"Global rank"})]}),s.jsxs(nt,{children:[s.jsx($,{indicator:d||0,title:"Win streak"}),s.jsx($,{indicator:p||0,title:"Correct"}),s.jsx($,{indicator:m||0,title:"Incorrect"}),s.jsx($,{indicator:`${I||0}%`,title:"Succ. rate"})]})]})]}),at=o.styled_default("div")({name:"SponsorLogoWrap",class:"s8p5v5z",propsAsIs:!1}),lt=()=>o.n1,ct=o.styled_default(lt())({name:"SponsorLogo",class:"s755yti",propsAsIs:!0}),dt=()=>s.jsx(at,{children:s.jsx(ct,{name:"mastersLogo"})}),ut=o.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),pt=o.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),mt=o.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),It=({title:e,description:t})=>s.jsxs(ut,{children:[s.jsx(o.n1,{name:"icon-check-circle"}),s.jsx(pt,{children:e}),s.jsx(mt,{children:t})]}),ft=o.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),ht=()=>o.n1,yt=o.styled_default(ht())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),J=o.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),K=o.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),xt=o.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),q=o.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),gt=o.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),jt=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:n,questionType:i,hasCorrectAnswer:r,questionStatus:d})=>{const p=n&&(i===h.QuestionType.TRIVIA||i===h.QuestionType.PREDICTION);if(!p&&d!==h.QuestionStatus.RESOLVED||d===h.QuestionStatus.RESOLVED&&i===h.QuestionType.PREDICTION&&!n)return null;const m=i===h.QuestionType.PREDICTION&&!r,c=t?"correct":"incorrect",I=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(ft,{"data-isPrediction":m,children:[d===h.QuestionStatus.RESOLVED&&i===h.QuestionType.TRIVIA&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(J,{children:s.jsx(o.n1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(K,{children:s.jsx(q,{children:"Question Expired"})}),s.jsx(gt,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),p&&m&&s.jsxs(s.Fragment,{children:[s.jsx(yt,{name:"icon-prediction"}),s.jsx(q,{children:"Stay tuned to see if your prediction was correct."})]}),p&&r&&s.jsxs(s.Fragment,{children:[s.jsx(J,{"data-feedbackType":c,children:s.jsx(o.n1,{name:c})}),s.jsx("div",{children:s.jsxs(K,{children:[s.jsx(xt,{"data-feedbackType":c,children:I==null?void 0:I.title}),s.jsx(q,{children:I==null?void 0:I.description})]})})]})]})},Mt=o.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),vt=o.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),Tt=o.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),Nt=o.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),At=o.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),St=o.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),Dt=o.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),zt=o.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),Ot=o.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),fe=o.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),_t=()=>fe,kt=o.styled_default(_t())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),Ct=()=>fe,bt=o.styled_default(Ct())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),Et=o.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),wt=o.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),Lt=o.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),$t=()=>o.n1,Qt=o.styled_default($t())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),X={[h.QuestionImages.CENTERED]:e=>s.jsx(kt,{alt:"option-icon",src:e}),[h.QuestionImages.TRANSPARENT]:e=>s.jsx(zt,{children:s.jsx(Ot,{style:{backgroundImage:`url(${e})`}})}),[h.QuestionImages.ROUNDED]:e=>s.jsx(bt,{alt:"option-icon",src:e}),[h.QuestionImages.NONE]:()=>null,[h.QuestionImages.UNSET]:()=>null},Rt=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:i,questionVoted:r})=>{if(e===h.QuestionType.POLL&&i)return"correct";if(e===h.QuestionType.PREDICTION){if(t&&r)return i?n?"correct":"incorrect":"unset";if(i)return"correct"}return e===h.QuestionType.TRIVIA&&r&&i?n?"correct":"incorrect":"unset"},Ut=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:i,questionStatus:r})=>e===h.QuestionType.TRIVIA?t&&n:e===h.QuestionType.PREDICTION?t&&n&&i||r===h.QuestionStatus.RESOLVED&&n:!1,qt=e=>{var t;const{id:n,icon:i,text:r,percentageDecimal:d,onVote:p,youSelected:m,questionVoted:c,imageMode:I,answerTimeExpired:v,questionStatus:A,isLoading:j,questionType:T,correct:N,hasCorrectAnswer:a}=e,l=Rt(e),u=Ut({questionType:T,questionVoted:c,correct:N,hasCorrectAnswer:a,questionStatus:A}),f=A===h.QuestionStatus.RESOLVED&&T===h.QuestionType.PREDICTION,y=c||f;return s.jsxs(At,{value:n,"data-selected":m,"data-answerState":l,disabled:c||j||v||f,"data-isNotChecked":c&&!m&&l!=="incorrect",onClick:p,children:[s.jsx(St,{"data-answerState":l,style:{width:`${y?d:0}%`}}),s.jsxs(Dt,{children:[i&&I&&((t=X[I])==null?void 0:t.call(X,i)),s.jsx(Et,{children:r}),y&&s.jsxs(wt,{children:[u&&s.jsx(Qt,{name:"selected"}),s.jsx(Lt,{children:s.jsx(de.d,{value:d,suffix:"%"})})]})]})]})},Pt=[k.E.PRIMARY_GREEN1,k.E.SECONDARY_RED1,k.E.SECONDARY_RED1,k.E.NEUTRALS_GRAY3],Yt=[10,10,1,0],Wt=o.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),Vt=k.E.SECONDARY_GREEN6,ee=k.E.SECONDARY_RED3,Ft=k.E.NEUTRALS_GRAY3,Bt=({isPlaying:e=!0,duration:t=30,onTimerExpired:n})=>{const[i,r]=D.useState(t>10?Vt:ee),d=({remainingTime:c})=>s.jsx(Wt,{children:c}),p=D.useCallback(()=>{n==null||n(),r(Ft)},[n,r]),m=D.useCallback(c=>{c===10&&r(ee)},[r]);return s.jsx(Ae.CountdownCircleTimer,{isPlaying:e,duration:t,colors:Pt,colorsTime:Yt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:i,onComplete:p,onUpdate:m,children:d})},Ht=o.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Gt=o.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),Zt=o.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Jt=()=>o.n1,Kt=o.styled_default(Jt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Xt=o.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),es=o.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),ts=o.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),ss=({title:e,points:t,isPlayingTimer:n,isTimer:i,questionType:r,timerDuration:d,onTimerExpired:p})=>s.jsxs(Ht,{children:[s.jsxs(Gt,{children:[e&&s.jsx(Zt,{children:e}),t!==void 0&&r!==h.QuestionType.POLL&&s.jsxs(s.Fragment,{children:[s.jsx(Kt,{name:"icon-trophy"}),s.jsxs(Xt,{children:[s.jsx(es,{children:s.jsx(de.d,{value:t})}),s.jsx(ts,{children:"PTS"})]})]})]}),i&&s.jsx(Bt,{isPlaying:n,onTimerExpired:p,duration:d})]}),ns=({openedQuestion:e,isLoading:t,vote:n,close:i})=>{var r,d;const p=e.subject,m=e.type,c=(r=e.options)==null?void 0:r.options,[I,v]=D.useState(!1),[A,j]=D.useState(""),T=e==null?void 0:e.id,N=D.useCallback(async g=>{if(T){const z=g.currentTarget.value;j(z),await n(T,z)}},[T,j,n]),a=D.useCallback(()=>{v(!0),setTimeout(i,3e3)},[i]),l=D.useMemo(()=>e==null?void 0:e.answers.find(g=>g.youVoted===!0),[e]),u=D.useMemo(()=>!!(e!=null&&e.answers.find(g=>g.correct===!0)),[e]),f=D.useMemo(()=>e==null?void 0:e.answers.find(g=>g.correct===!0),[e]),y=D.useMemo(()=>e?e.answers.map(g=>{var z;return{...g,questionVoted:!!l,youSelected:A===g.id,isLoading:t,hasCorrectAnswer:u,questionType:e.type,answerTimeExpired:I,questionStatus:e.status,imageMode:(z=e.appearance)==null?void 0:z.images,onVote:N}}):[],[u,I,t,e,l,N,A]),S=c&&(c.case==="trivia"||c.case==="prediction")?c.value:void 0,x=D.useMemo(()=>{if(e.status===h.QuestionStatus.RESOLVED)return 0;if(!I)return l?l.correct?l.points:0:f==null?void 0:f.points},[I,l,f,e.status]),M=D.useMemo(()=>I?"Time expired":e.type===h.QuestionType.POLL?"Time remaining":l?"You won":"To win",[I,e.type,l]);return s.jsx(O.r,{"data-question-header":"true",children:s.jsx(Mt,{children:s.jsxs(vt,{children:[S&&s.jsx(jt,{feedbackMessages:S,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:m,hasCorrectAnswer:u,questionStatus:e.status}),e.type!==h.QuestionType.PREDICTION&&s.jsx(ss,{title:M,points:x,onTimerExpired:a,questionType:e.type,isTimer:!t,isPlayingTimer:!l,timerDuration:l?0:Number(((d=e==null?void 0:e.appearance)==null?void 0:d.autoHideInterval)||"30")}),I?s.jsx(It,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(Tt,{"data-isPrediction":e.type===h.QuestionType.PREDICTION,children:p}),s.jsx(Nt,{children:y.map(g=>s.jsx(qt,{...g},g.id))})]})]})})})},is=o.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),os=o.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),rs=o.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),as=o.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),ls=o.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),cs=o.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),he=({created:e,image:t,title:n,instantView:i})=>{const r=D.useMemo(()=>{if(e){const p=new Date(e);if(Le(p))return{date:Ee(p),time:we(p)}}return null},[e]),d=(i==null?void 0:i.image)||t;return s.jsxs(is,{children:[r&&s.jsxs(ls,{children:[r.date," · ",r.time]}),(i==null?void 0:i.video)&&s.jsx(O.w,{source:i.video.url,poster:i.video.thumbnailUrl}),d&&s.jsx(cs,{src:d}),s.jsxs(os,{children:[s.jsx(rs,{children:(i==null?void 0:i.heading)||n}),s.jsx(as,{children:i==null?void 0:i.body})]})]})},ds=o.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),us=o.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ps=({instantView:e,...t})=>s.jsxs(ds,{children:[s.jsx(he,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(us,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(o.n1,{name:"icon-external-link"})]})]}),ms=o.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),Is=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ps,{created:e.attributes.created,...e.attributes.attributes.value}):null},fs=({extendedQuestion:e,vote:t,close:n})=>{const{loading:i,data:r}=e;return r?s.jsx(ns,{vote:t,close:n,openedQuestion:r,isLoading:!!i}):null},hs=({gamification:e})=>{var t;const n=C.useStore(e.openedQuestion.$store),i=C.useStore(e.openedQuestion.$extendedStore);if(!n)return null;const r=n.type;return s.jsxs(ms,{children:[s.jsx(ue,{close:e.closeQuestion,type:((t=n.attributes)==null?void 0:t.type)||h.QuestionType.UNSET}),r==="question"&&s.jsx(fs,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:i}),r!=="question"&&s.jsx(Is,{openedQuestion:n}),s.jsx(dt,{sponsorLogo:""})]})},ys=o.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),xs=o.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),gs=o.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),js=o.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var R=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(R||{});const te=({title:e,active:t,onClick:n})=>s.jsx(gs,{onClick:n,"data-selected":t,children:s.jsx(js,{children:e})}),Ms=({activePage:e="home",toggleActivePage:t})=>s.jsx(ys,{children:s.jsxs(xs,{"data-position":e==="home"?"left":"right",children:[s.jsx(te,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(te,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},W.apply(this,arguments)}function se(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},V(e,t)}function vs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}var ne=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Ts(e,t){return!!(e===t||ne(e)&&ne(t))}function Ns(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Ts(e[n],t[n]))return!1;return!0}function P(e,t){t===void 0&&(t=Ns);var n,i=[],r,d=!1;function p(){for(var m=[],c=0;c<arguments.length;c++)m[c]=arguments[c];return d&&n===this&&t(m,i)||(r=e.apply(this,m),d=!0,n=this,i=m),r}return p}var As=typeof performance=="object"&&typeof performance.now=="function",ie=As?function(){return performance.now()}:function(){return Date.now()};function oe(e){cancelAnimationFrame(e.id)}function Ss(e,t){var n=ie();function i(){ie()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}var r={id:requestAnimationFrame(i)};return r}var Y=-1;function re(e){if(e===void 0&&(e=!1),Y===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Y=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Y}var b=null;function ae(e){if(e===void 0&&(e=!1),b===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),r=i.style;return r.width="100px",r.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?b="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?b="negative":b="positive-ascending"),document.body.removeChild(t),b}return b}var Ds=150,zs=function(t,n){return t};function Os(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,r=e.getItemSize,d=e.getOffsetForIndexAndAlignment,p=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,c=e.initInstanceProps,I=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(A){vs(j,A);function j(N){var a;return a=A.call(this,N)||this,a._instanceProps=c(a.props,se(a)),a._outerRef=void 0,a._resetIsScrollingTimeoutId=null,a.state={instance:se(a),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof a.props.initialScrollOffset=="number"?a.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},a._callOnItemsRendered=void 0,a._callOnItemsRendered=P(function(l,u,f,y){return a.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:u,visibleStartIndex:f,visibleStopIndex:y})}),a._callOnScroll=void 0,a._callOnScroll=P(function(l,u,f){return a.props.onScroll({scrollDirection:l,scrollOffset:u,scrollUpdateWasRequested:f})}),a._getItemStyle=void 0,a._getItemStyle=function(l){var u=a.props,f=u.direction,y=u.itemSize,S=u.layout,x=a._getItemStyleCache(I&&y,I&&S,I&&f),M;if(x.hasOwnProperty(l))M=x[l];else{var g=n(a.props,l,a._instanceProps),z=r(a.props,l,a._instanceProps),_=f==="horizontal"||S==="horizontal",w=f==="rtl",L=_?g:0;x[l]=M={position:"absolute",left:w?void 0:L,right:w?L:void 0,top:_?0:g,height:_?"100%":z,width:_?z:"100%"}}return M},a._getItemStyleCache=void 0,a._getItemStyleCache=P(function(l,u,f){return{}}),a._onScrollHorizontal=function(l){var u=l.currentTarget,f=u.clientWidth,y=u.scrollLeft,S=u.scrollWidth;a.setState(function(x){if(x.scrollOffset===y)return null;var M=a.props.direction,g=y;if(M==="rtl")switch(ae()){case"negative":g=-y;break;case"positive-descending":g=S-f-y;break}return g=Math.max(0,Math.min(g,S-f)),{isScrolling:!0,scrollDirection:x.scrollOffset<y?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._onScrollVertical=function(l){var u=l.currentTarget,f=u.clientHeight,y=u.scrollHeight,S=u.scrollTop;a.setState(function(x){if(x.scrollOffset===S)return null;var M=Math.max(0,Math.min(S,y-f));return{isScrolling:!0,scrollDirection:x.scrollOffset<M?"forward":"backward",scrollOffset:M,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._outerRefSetter=function(l){var u=a.props.outerRef;a._outerRef=l,typeof u=="function"?u(l):u!=null&&typeof u=="object"&&u.hasOwnProperty("current")&&(u.current=l)},a._resetIsScrollingDebounced=function(){a._resetIsScrollingTimeoutId!==null&&oe(a._resetIsScrollingTimeoutId),a._resetIsScrollingTimeoutId=Ss(a._resetIsScrolling,Ds)},a._resetIsScrolling=function(){a._resetIsScrollingTimeoutId=null,a.setState({isScrolling:!1},function(){a._getItemStyleCache(-1,null)})},a}j.getDerivedStateFromProps=function(a,l){return _s(a,l),v(a),null};var T=j.prototype;return T.scrollTo=function(a){a=Math.max(0,a),this.setState(function(l){return l.scrollOffset===a?null:{scrollDirection:l.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},T.scrollToItem=function(a,l){l===void 0&&(l="auto");var u=this.props,f=u.itemCount,y=u.layout,S=this.state.scrollOffset;a=Math.max(0,Math.min(a,f-1));var x=0;if(this._outerRef){var M=this._outerRef;y==="vertical"?x=M.scrollWidth>M.clientWidth?re():0:x=M.scrollHeight>M.clientHeight?re():0}this.scrollTo(d(this.props,a,l,S,this._instanceProps,x))},T.componentDidMount=function(){var a=this.props,l=a.direction,u=a.initialScrollOffset,f=a.layout;if(typeof u=="number"&&this._outerRef!=null){var y=this._outerRef;l==="horizontal"||f==="horizontal"?y.scrollLeft=u:y.scrollTop=u}this._callPropsCallbacks()},T.componentDidUpdate=function(){var a=this.props,l=a.direction,u=a.layout,f=this.state,y=f.scrollOffset,S=f.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var x=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(ae()){case"negative":x.scrollLeft=-y;break;case"positive-ascending":x.scrollLeft=y;break;default:var M=x.clientWidth,g=x.scrollWidth;x.scrollLeft=g-M-y;break}else x.scrollLeft=y;else x.scrollTop=y}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&oe(this._resetIsScrollingTimeoutId)},T.render=function(){var a=this.props,l=a.children,u=a.className,f=a.direction,y=a.height,S=a.innerRef,x=a.innerElementType,M=a.innerTagName,g=a.itemCount,z=a.itemData,_=a.itemKey,w=_===void 0?zs:_,L=a.layout,ye=a.outerElementType,xe=a.outerTagName,ge=a.style,je=a.useIsScrolling,Me=a.width,F=this.state.isScrolling,U=f==="horizontal"||L==="horizontal",ve=U?this._onScrollHorizontal:this._onScrollVertical,B=this._getRangeToRender(),Te=B[0],Ne=B[1],H=[];if(g>0)for(var E=Te;E<=Ne;E++)H.push(D.createElement(l,{data:z,key:w(E,z),index:E,isScrolling:je?F:void 0,style:this._getItemStyle(E)}));var G=i(this.props,this._instanceProps);return D.createElement(ye||xe||"div",{className:u,onScroll:ve,ref:this._outerRefSetter,style:W({position:"relative",height:y,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},ge)},D.createElement(x||M||"div",{children:H,ref:S,style:{height:U?"100%":G,pointerEvents:F?"none":void 0,width:U?G:"100%"}}))},T._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var a=this.props.itemCount;if(a>0){var l=this._getRangeToRender(),u=l[0],f=l[1],y=l[2],S=l[3];this._callOnItemsRendered(u,f,y,S)}}if(typeof this.props.onScroll=="function"){var x=this.state,M=x.scrollDirection,g=x.scrollOffset,z=x.scrollUpdateWasRequested;this._callOnScroll(M,g,z)}},T._getRangeToRender=function(){var a=this.props,l=a.itemCount,u=a.overscanCount,f=this.state,y=f.isScrolling,S=f.scrollDirection,x=f.scrollOffset;if(l===0)return[0,0,0,0];var M=p(this.props,x,this._instanceProps),g=m(this.props,M,x,this._instanceProps),z=!y||S==="backward"?Math.max(1,u):1,_=!y||S==="forward"?Math.max(1,u):1;return[Math.max(0,M-z),Math.max(0,Math.min(l-1,g+_)),M,g]},j}(D.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var _s=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},ks=Os({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,r,d,p){var m=t.direction,c=t.height,I=t.itemCount,v=t.itemSize,A=t.layout,j=t.width,T=m==="horizontal"||A==="horizontal",N=T?j:c,a=Math.max(0,I*v-N),l=Math.min(a,n*v),u=Math.max(0,n*v-N+v+p);switch(i==="smart"&&(r>=u-N&&r<=l+N?i="auto":i="center"),i){case"start":return l;case"end":return u;case"center":{var f=Math.round(u+(l-u)/2);return f<Math.ceil(N/2)?0:f>a+Math.floor(N/2)?a:f}case"auto":default:return r>=u&&r<=l?r:r<u?u:l}},getStartIndexForOffset:function(t,n){var i=t.itemCount,r=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/r)))},getStopIndexForStartIndex:function(t,n,i){var r=t.direction,d=t.height,p=t.itemCount,m=t.itemSize,c=t.layout,I=t.width,v=r==="horizontal"||c==="horizontal",A=n*m,j=v?I:d,T=Math.ceil((j+i-A)/m);return Math.max(0,Math.min(p-1,n+T-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function Cs(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,i=e.startIndex,r=e.stopIndex;return!(i>n||r<t)}function bs(e){for(var t=e.isItemLoaded,n=e.itemCount,i=e.minimumBatchSize,r=e.startIndex,d=e.stopIndex,p=[],m=null,c=null,I=r;I<=d;I++){var v=t(I);v?c!==null&&(p.push(m,c),m=c=null):(c=I,m===null&&(m=I))}if(c!==null){for(var A=Math.min(Math.max(c,m+i-1),n-1),j=c+1;j<=A&&!t(j);j++)c=j;p.push(m,c)}if(p.length)for(;p[1]-p[0]+1<i&&p[0]>0;){var T=p[0]-1;if(!t(T))p[0]=T;else break}return p}var Es=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ws=function(){function e(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ls=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},le=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},$s=function(e){Ls(t,e);function t(){var n,i,r,d;Es(this,t);for(var p=arguments.length,m=Array(p),c=0;c<p;c++)m[c]=arguments[c];return d=(i=(r=le(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(m))),r),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(I){var v=I.visibleStartIndex,A=I.visibleStopIndex;r._lastRenderedStartIndex=v,r._lastRenderedStopIndex=A,r._ensureRowsLoaded(v,A)},r._setRef=function(I){r._listRef=I},i),le(r,d)}return ws(t,[{key:"resetloadMoreItemsCache",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],i&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var i=this.props.children;return i({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(i,r){var d=this.props,p=d.isItemLoaded,m=d.itemCount,c=d.minimumBatchSize,I=c===void 0?10:c,v=d.threshold,A=v===void 0?15:v,j=bs({isItemLoaded:p,itemCount:m,minimumBatchSize:I,startIndex:Math.max(0,i-A),stopIndex:Math.min(m-1,r+A)});(this._memoizedUnloadedRanges.length!==j.length||this._memoizedUnloadedRanges.some(function(T,N){return j[N]!==T}))&&(this._memoizedUnloadedRanges=j,this._loadUnloadedRanges(j))}},{key:"_loadUnloadedRanges",value:function(i){for(var r=this,d=this.props.loadMoreItems||this.props.loadMoreRows,p=function(I){var v=i[I],A=i[I+1],j=d(v,A);j!=null&&j.then(function(){if(Cs({lastRenderedStartIndex:r._lastRenderedStartIndex,lastRenderedStopIndex:r._lastRenderedStopIndex,startIndex:v,stopIndex:A})){if(r._listRef==null)return;typeof r._listRef.resetAfterIndex=="function"?r._listRef.resetAfterIndex(v,!0):(typeof r._listRef._getItemStyleCache=="function"&&r._listRef._getItemStyleCache(-1),r._listRef.forceUpdate())}})},m=0;m<i.length;m+=2)p(m)}}]),t}(D.PureComponent);const Qs=o.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Rs=o.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),Us=o.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),qs=o.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),Ps=o.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Ys=o.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Ws=o.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),Vs=()=>o.n1,Fs=o.styled_default(Vs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Bs=({rank:e,avatar:t,name:n,points:i,isCurrentUser:r,openItemDetail:d,style:p})=>s.jsxs(Qs,{onClick:d,style:p,children:[s.jsx(Rs,{children:e||0}),s.jsxs(Ps,{children:[t?s.jsx(Us,{alt:"leaderboard-item-avatar",src:t}):s.jsx(qs,{children:pe(n||"")}),s.jsxs(Ys,{children:[s.jsx(Ws,{children:n||""}),r&&s.jsx(Fs,{name:"icon-star"})]})]}),s.jsx("div",{children:me(i)})]}),Hs=o.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Gs=({items:e,currentUserId:t,openItemDetail:n,fetchMore:i})=>s.jsx(O.AutoSizer,{children:({width:r,height:d})=>s.jsx($s,{isItemLoaded:p=>p<e.length,itemCount:e.length+1,loadMoreItems:i,children:({onItemsRendered:p,ref:m})=>s.jsx(Hs,{children:s.jsx(ks,{itemSize:56,onItemsRendered:p,ref:m,itemCount:e.length,width:r,height:d,children:({index:c,style:I})=>s.jsx(Bs,{style:{...I,maxHeight:48},...e[c],openItemDetail:()=>n(e[c].userId),isCurrentUser:!!t&&t===e[c].userId},e[c].userId)})})})}),Zs=({deepLink:e})=>{const{data:t}=C.useStore(e.$store),n=t==null?void 0:t.url,i=e.desktopLink;return s.jsx(O.O,{inviteLink:n||i,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Js=({gamification:e})=>{const{data:t}=C.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Gs,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(Zs,{deepLink:e.deepLink})},Ks=o.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Xs=o.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),en=o.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),tn=o.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),sn=()=>o.n1,Q=o.styled_default(sn())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),nn=()=>o.n1,on=o.styled_default(nn())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),rn=o.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),an=o.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),ln=o.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),cn={[h.PickHistoryStatus.LOST]:s.jsx(Q,{name:"incorrectVoted"}),[h.PickHistoryStatus.WON]:s.jsx(Q,{name:"icon-check"}),[h.PickHistoryStatus.UNSET]:s.jsx(Q,{name:"icon-arrow"}),[h.PickHistoryStatus.DNP]:s.jsx(Q,{name:"icon-arrow"})},dn=({questionId:e,questionType:t,questionStatus:n,subject:i,openForVoting:r,openQuestion:d,status:p})=>{const m=O.o[t],c=cn[p];return m?s.jsxs(Ks,{onClick:()=>d==null?void 0:d(e),children:[s.jsxs(an,{children:[s.jsxs(Xs,{children:[s.jsx(on,{"data-type-trivia":t===h.QuestionType.TRIVIA,"data-type-poll":t===h.QuestionType.POLL,name:m.iconName}),s.jsxs(rn,{children:[m.label,t===h.QuestionType.TRIVIA&&n===h.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(en,{children:i||""})]}),s.jsx(tn,{children:r?s.jsx(ln,{children:"Play"}):c})]}):null},un=o.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),pn=o.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),mn=({openInsight:e,questionId:t,...n})=>s.jsxs(un,{children:[s.jsx(he,{questionId:t,...n}),e&&s.jsx(pn,{onClick:()=>e(t),children:"View Insight"})]}),In=o.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),fn=({questions:e,openQuestion:t})=>s.jsx(In,{children:e==null?void 0:e.map(n=>{var i,r;if(n.type==="question"&&((i=n.attributes)==null?void 0:i.attributes.case)==="question"){const d=n.attributes.attributes.value;return s.jsx(dn,{openQuestion:t,...d},d.questionId)}if(n.type==="insight"&&((r=n.attributes)==null?void 0:r.attributes.case)==="insight"){const d=n.attributes.attributes.value;return s.jsx(mn,{openInsight:t,...d},d.questionId)}return null})}),hn=({store:e,openQuestion:t})=>{const n=C.useStore(e);return n!=null&&n.data?s.jsx(fn,{openQuestion:t,questions:n.data}):s.jsx("div",{children:"wait questions..."})},yn=({userSummary:e})=>{var t;const[n,i]=D.useState(void 0);return D.useEffect(()=>{const r=e.subscribe(d=>{d!=null&&d.data&&i(d.data)});return()=>{r()}},[e]),n!=null&&n.summary?s.jsx(Ie,{...n.summary,successRate:(t=n.percentage)==null?void 0:t.correct}):s.jsx("div",{children:"wait user..."})},xn=({gamification:e})=>{const[t,n]=D.useState(R.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(O.a,{style:{paddingBottom:"4px"},children:s.jsx(Ms,{activePage:t,toggleActivePage:n})}),t===R.HOME&&s.jsxs(O.r,{children:[s.jsx(O.a,{style:{paddingTop:"12px"},children:s.jsx(yn,{userSummary:e.userSummary})}),s.jsx(O.n,{children:s.jsx(hn,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===R.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Js,{gamification:e})})]})},gn=()=>O.f,ce=o.styled_default(gn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),jn=o.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),Mn=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},vn=({gamification:e,className:t})=>{const n=C.useStore(e.openedQuestion.$store),i=C.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[n&&s.jsx(ce,{className:t,children:s.jsx(hs,{gamification:e})}),i&&s.jsx(ce,{className:t,children:s.jsxs(jn,{children:[s.jsx(ue,{label:"Friend's Rank",close:e.closeUser}),s.jsx(O.a,{children:s.jsx(Ie,{...i,successRate:Mn(i)})})]})}),s.jsx(O.r,{className:t,"data-nav":"true",children:s.jsx(xn,{gamification:e})})]})};exports.default=vn;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("./index4.js"),C=require("@nanostores/react"),O=require("./masters2.js"),h=require("@streamlayer/sdk-web-types"),D=require("react"),de=require("./index3.js");require("react-countup");const Ae=require("react-countdown-circle-timer"),k=require("./index2.js");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const Se=o.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),De=o.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),ze=()=>o.n1,Oe=o.styled_default(ze())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),_e=o.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),ke=o.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),Ce=()=>o.n1,be=o.styled_default(Ce())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ue=({type:e,close:t,label:n})=>{const i=e?O.o[e]:{label:n,iconName:void 0};return s.jsxs(Se,{children:[s.jsxs(De,{children:[(i==null?void 0:i.iconName)&&s.jsx(Oe,{"data-type-trivia":e===h.QuestionType.TRIVIA,"data-type-poll":e===h.QuestionType.POLL,name:i.iconName}),(i==null?void 0:i.label)&&s.jsx(_e,{children:i.label})]}),s.jsx(ke,{onClick:t,children:s.jsx(be,{name:"icon-cross"})})]})},pe=e=>e.split(/\s+/).map(t=>t[0]).join("").toUpperCase(),me=e=>e?e.toLocaleString("en-US"):"0",Ee=e=>e.toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}),we=e=>e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"}),Le=e=>!isNaN(e.getTime()),$e=o.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),Qe=o.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),Re=o.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),Z=({indicator:e,title:t})=>s.jsxs($e,{children:[s.jsx(Qe,{children:t}),s.jsx(Re,{children:e})]}),Ue=o.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),qe=o.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),Pe=o.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),$=({indicator:e,title:t})=>s.jsxs(Ue,{children:[s.jsx(qe,{children:e}),s.jsx(Pe,{children:t})]}),Ye=o.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),We=o.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Ve=o.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),Fe=o.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),Be=o.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),He=o.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),Ge=o.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),Ze=o.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Je=o.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Ke=o.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),Xe=o.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),et=o.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),tt=o.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),st=o.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),nt=o.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),it=o.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),ot=o.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),rt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc3ODcgMTIuMzA3MSA1Ljk5NzA1IDEyLjMwNzEgNC42NjY2MkgxNC43Njg2Wk0xNS45OTk4IDUuNTgzMjlWNC4zNjEwOEMxNS45OTk4IDQuMTA2NDUgMTUuOTEwMSAzLjg5MDAyIDE1LjczMDYgMy43MTE3OEMxNS41NTExIDMuNTMzNTQgMTUuMzMzMiAzLjQ0NDQyIDE1LjA3NjggMy40NDQ0MkgxMi4zMDc2VjIuNTI3NzZDMTIuMzA3NiAyLjEwNzYzIDEyLjE1NjkgMS43NDc5NyAxMS44NTU2IDEuNDQ4NzhDMTEuNTU0NCAxLjE0OTU5IDExLjE5MjIgMSAxMC43NjkxIDFINS4yMzA3MkM0LjgwNzY0IDEgNC40NDU0NyAxLjE0OTU5IDQuMTQ0MTkgMS40NDg3OEMzLjg0MjkxIDEuNzQ3OTcgMy42OTIyNyAyLjEwNzYzIDMuNjkyMjcgMi41Mjc3NlYzLjQ0NDQySDAuOTIzMDY4QzAuNjY2NjU5IDMuNDQ0NDIgMC40NDg3MTQgMy41MzM1NCAwLjI2OTIyOCAzLjcxMTc4QzAuMDg5NzQxOCAzLjg5MDAyIDAgNC4xMDY0NSAwIDQuMzYxMDhWNS41ODMyOUMwIDYuMDM1MjUgMC4xMzMwMSA2LjQ5MDM5IDAuMzk5MDM0IDYuOTQ4NzJDMC42NjUwNTkgNy40MDcwNSAxLjAyNDAzIDcuODIwODIgMS40NzU5NSA4LjE5MDAzQzEuOTI3ODcgOC41NTkyNCAyLjQ4MjM0IDguODY5NTcgMy4xMzkzOSA5LjEyMTAxQzMuNzk2NDQgOS4zNzI0NiA0LjQ4NzEzIDkuNTE0MDkgNS4yMTE0OSA5LjU0NTkyQzUuNDgwNzEgOS44ODk2NyA1Ljc4NTIgMTAuMTkyIDYuMTI0OTQgMTAuNDUzQzYuMzY4NTMgMTAuNjY5NSA2LjUzNjc5IDEwLjkwMDIgNi42Mjk3NCAxMS4xNDUzQzYuNzIyNjkgMTEuMzkwNCA2Ljc2OTE2IDExLjY3NTIgNi43NjkxNiAxMS45OTk5QzYuNzY5MTYgMTIuMzQzNiA2LjY3MTQxIDEyLjYzMzMgNi40NzU5IDEyLjg2ODhDNi4yODAzOCAxMy4xMDQzIDUuOTY3ODkgMTMuMjIyMSA1LjUzODQxIDEzLjIyMjFDNS4wNTc2NCAxMy4yMjIxIDQuNjI5NzYgMTMuMzY2OSA0LjI1NDc2IDEzLjY1NjZDMy44Nzk3NyAxMy45NDYyIDMuNjkyMjcgMTQuMzEwNiAzLjY5MjI3IDE0Ljc0OTlWMTUuMzYxQzMuNjkyMjcgMTUuNDUwMSAzLjcyMTEyIDE1LjUyMzMgMy43Nzg4MSAxNS41ODA2QzMuODM2NSAxNS42Mzc5IDMuOTEwMjIgMTUuNjY2NSAzLjk5OTk2IDE1LjY2NjVIMTEuOTk5OUMxMi4wODk2IDE1LjY2NjUgMTIuMTYzMyAxNS42Mzc5IDEyLjIyMSAxNS41ODA2QzEyLjI3ODcgMTUuNTIzMyAxMi4zMDc2IDE1LjQ1MDEgMTIuMzA3NiAxNS4zNjFWMTQuNzQ5OUMxMi4zMDc2IDE0LjMxMDYgMTIuMTIwMSAxMy45NDYyIDExLjc0NTEgMTMuNjU2NkMxMS4zNzAxIDEzLjM2NjkgMTAuOTQyMiAxMy4yMjIxIDEwLjQ2MTQgMTMuMjIyMUMxMC4wMzE5IDEzLjIyMjEgOS43MTk0NSAxMy4xMDQzIDkuNTIzOTQgMTIuODY4OEM5LjMyODQzIDEyLjYzMzMgOS4yMzA2OCAxMi4zNDM2IDkuMjMwNjggMTEuOTk5OUM5LjIzMDY4IDExLjY3NTIgOS4yNzcxNSAxMS4zOTA0IDkuMzcwMSAxMS4xNDUzQzkuNDYzMDUgMTAuOTAwMiA5LjYzMTMxIDEwLjY2OTUgOS44NzQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",Ie=({avatar:e,name:t,points:n,friendsRank:i,rank:r,streak:d,correct:p,incorrect:m,inTop:c,successRate:I})=>s.jsxs(Ye,{children:[s.jsx(We,{children:s.jsxs(Fe,{children:[s.jsxs(ot,{children:[e&&s.jsx(Be,{alt:"avatar",src:e}),!e&&s.jsx(it,{children:pe(t||"")})]}),s.jsxs(He,{children:[s.jsx(Ge,{children:t}),s.jsxs(Ze,{children:[s.jsxs(Ke,{children:[s.jsx(Je,{alt:"rank-icon",src:rt}),s.jsxs(Xe,{children:[me(n),s.jsx(et,{children:"PTS"})]})]}),s.jsx(tt,{}),s.jsxs("div",{children:["TOP ",c||0,"%"]})]})]})]})}),s.jsxs(Ve,{children:[s.jsxs(st,{children:[s.jsx(Z,{indicator:i||0,title:"Friends rank"}),s.jsx(Z,{indicator:r||0,title:"Global rank"})]}),s.jsxs(nt,{children:[s.jsx($,{indicator:d||0,title:"Win streak"}),s.jsx($,{indicator:p||0,title:"Correct"}),s.jsx($,{indicator:m||0,title:"Incorrect"}),s.jsx($,{indicator:`${I||0}%`,title:"Succ. rate"})]})]})]}),at=o.styled_default("div")({name:"SponsorLogoWrap",class:"s8p5v5z",propsAsIs:!1}),lt=()=>o.n1,ct=o.styled_default(lt())({name:"SponsorLogo",class:"s755yti",propsAsIs:!0}),dt=()=>s.jsx(at,{children:s.jsx(ct,{name:"mastersLogo"})}),ut=o.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),pt=o.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),mt=o.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),It=({title:e,description:t})=>s.jsxs(ut,{children:[s.jsx(o.n1,{name:"icon-check-circle"}),s.jsx(pt,{children:e}),s.jsx(mt,{children:t})]}),ft=o.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),ht=()=>o.n1,yt=o.styled_default(ht())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),J=o.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),K=o.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),xt=o.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),q=o.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),gt=o.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),jt=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:n,questionType:i,hasCorrectAnswer:r,questionStatus:d})=>{const p=n&&(i===h.QuestionType.TRIVIA||i===h.QuestionType.PREDICTION);if(!p&&d!==h.QuestionStatus.RESOLVED||d===h.QuestionStatus.RESOLVED&&i===h.QuestionType.PREDICTION&&!n)return null;const m=i===h.QuestionType.PREDICTION&&!r,c=t?"correct":"incorrect",I=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(ft,{"data-isPrediction":m,children:[d===h.QuestionStatus.RESOLVED&&i===h.QuestionType.TRIVIA&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(J,{children:s.jsx(o.n1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(K,{children:s.jsx(q,{children:"Question Expired"})}),s.jsx(gt,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),p&&m&&s.jsxs(s.Fragment,{children:[s.jsx(yt,{name:"icon-prediction"}),s.jsx(q,{children:"Stay tuned to see if your prediction was correct."})]}),p&&r&&s.jsxs(s.Fragment,{children:[s.jsx(J,{"data-feedbackType":c,children:s.jsx(o.n1,{name:c})}),s.jsx("div",{children:s.jsxs(K,{children:[s.jsx(xt,{"data-feedbackType":c,children:I==null?void 0:I.title}),s.jsx(q,{children:I==null?void 0:I.description})]})})]})]})},Mt=o.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),vt=o.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),Tt=o.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),Nt=o.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),At=o.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),St=o.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),Dt=o.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),zt=o.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),Ot=o.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),fe=o.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),_t=()=>fe,kt=o.styled_default(_t())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),Ct=()=>fe,bt=o.styled_default(Ct())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),Et=o.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),wt=o.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),Lt=o.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),$t=()=>o.n1,Qt=o.styled_default($t())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),X={[h.QuestionImages.CENTERED]:e=>s.jsx(kt,{alt:"option-icon",src:e}),[h.QuestionImages.TRANSPARENT]:e=>s.jsx(zt,{children:s.jsx(Ot,{style:{backgroundImage:`url(${e})`}})}),[h.QuestionImages.ROUNDED]:e=>s.jsx(bt,{alt:"option-icon",src:e}),[h.QuestionImages.NONE]:()=>null,[h.QuestionImages.UNSET]:()=>null},Rt=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:i,questionVoted:r})=>{if(e===h.QuestionType.POLL&&i)return"correct";if(e===h.QuestionType.PREDICTION){if(t&&r)return i?n?"correct":"incorrect":"unset";if(i)return"correct"}return e===h.QuestionType.TRIVIA&&r&&i?n?"correct":"incorrect":"unset"},Ut=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:i,questionStatus:r})=>e===h.QuestionType.TRIVIA?t&&n:e===h.QuestionType.PREDICTION?t&&n&&i||r===h.QuestionStatus.RESOLVED&&n:!1,qt=e=>{var t;const{id:n,icon:i,text:r,percentageDecimal:d,onVote:p,youSelected:m,questionVoted:c,imageMode:I,answerTimeExpired:v,questionStatus:A,isLoading:j,questionType:T,correct:N,hasCorrectAnswer:a}=e,l=Rt(e),u=Ut({questionType:T,questionVoted:c,correct:N,hasCorrectAnswer:a,questionStatus:A}),f=A===h.QuestionStatus.RESOLVED&&T===h.QuestionType.PREDICTION,y=c||f;return s.jsxs(At,{value:n,"data-selected":m,"data-answerState":l,disabled:c||j||v||f,"data-isNotChecked":c&&!m&&l!=="incorrect",onClick:p,children:[s.jsx(St,{"data-answerState":l,style:{width:`${y?d:0}%`}}),s.jsxs(Dt,{children:[i&&I&&((t=X[I])==null?void 0:t.call(X,i)),s.jsx(Et,{children:r}),y&&s.jsxs(wt,{children:[u&&s.jsx(Qt,{name:"selected"}),s.jsx(Lt,{children:s.jsx(de.d,{value:d,suffix:"%"})})]})]})]})},Pt=[k.E.PRIMARY_GREEN1,k.E.SECONDARY_RED1,k.E.SECONDARY_RED1,k.E.NEUTRALS_GRAY3],Yt=[10,10,1,0],Wt=o.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),Vt=k.E.SECONDARY_GREEN6,ee=k.E.SECONDARY_RED3,Ft=k.E.NEUTRALS_GRAY3,Bt=({isPlaying:e=!0,duration:t=30,onTimerExpired:n})=>{const[i,r]=D.useState(t>10?Vt:ee),d=({remainingTime:c})=>s.jsx(Wt,{children:c}),p=D.useCallback(()=>{n==null||n(),r(Ft)},[n,r]),m=D.useCallback(c=>{c===10&&r(ee)},[r]);return s.jsx(Ae.CountdownCircleTimer,{isPlaying:e,duration:t,colors:Pt,colorsTime:Yt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:i,onComplete:p,onUpdate:m,children:d})},Ht=o.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Gt=o.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),Zt=o.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Jt=()=>o.n1,Kt=o.styled_default(Jt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Xt=o.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),es=o.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),ts=o.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),ss=({title:e,points:t,isPlayingTimer:n,isTimer:i,questionType:r,timerDuration:d,onTimerExpired:p})=>s.jsxs(Ht,{children:[s.jsxs(Gt,{children:[e&&s.jsx(Zt,{children:e}),t!==void 0&&r!==h.QuestionType.POLL&&s.jsxs(s.Fragment,{children:[s.jsx(Kt,{name:"icon-trophy"}),s.jsxs(Xt,{children:[s.jsx(es,{children:s.jsx(de.d,{value:t})}),s.jsx(ts,{children:"PTS"})]})]})]}),i&&s.jsx(Bt,{isPlaying:n,onTimerExpired:p,duration:d})]}),ns=({openedQuestion:e,isLoading:t,vote:n,close:i})=>{var r,d;const p=e.subject,m=e.type,c=(r=e.options)==null?void 0:r.options,[I,v]=D.useState(!1),[A,j]=D.useState(""),T=e==null?void 0:e.id,N=D.useCallback(async g=>{if(T){const z=g.currentTarget.value;j(z),await n(T,z)}},[T,j,n]),a=D.useCallback(()=>{v(!0),setTimeout(i,3e3)},[i]),l=D.useMemo(()=>e==null?void 0:e.answers.find(g=>g.youVoted===!0),[e]),u=D.useMemo(()=>!!(e!=null&&e.answers.find(g=>g.correct===!0)),[e]),f=D.useMemo(()=>e==null?void 0:e.answers.find(g=>g.correct===!0),[e]),y=D.useMemo(()=>e?e.answers.map(g=>{var z;return{...g,questionVoted:!!l,youSelected:A===g.id,isLoading:t,hasCorrectAnswer:u,questionType:e.type,answerTimeExpired:I,questionStatus:e.status,imageMode:(z=e.appearance)==null?void 0:z.images,onVote:N}}):[],[u,I,t,e,l,N,A]),S=c&&(c.case==="trivia"||c.case==="prediction")?c.value:void 0,x=D.useMemo(()=>{if(e.status===h.QuestionStatus.RESOLVED)return 0;if(!I)return l?l.correct?l.points:0:f==null?void 0:f.points},[I,l,f,e.status]),M=D.useMemo(()=>I?"Time expired":e.type===h.QuestionType.POLL?"Time remaining":l?"You won":"To win",[I,e.type,l]);return s.jsx(O.r,{"data-question-header":"true",children:s.jsx(Mt,{children:s.jsxs(vt,{children:[S&&s.jsx(jt,{feedbackMessages:S,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:m,hasCorrectAnswer:u,questionStatus:e.status}),e.type!==h.QuestionType.PREDICTION&&s.jsx(ss,{title:M,points:x,onTimerExpired:a,questionType:e.type,isTimer:!t,isPlayingTimer:!l,timerDuration:l?0:Number(((d=e==null?void 0:e.appearance)==null?void 0:d.autoHideInterval)||"30")}),I?s.jsx(It,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(Tt,{"data-isPrediction":e.type===h.QuestionType.PREDICTION,children:p}),s.jsx(Nt,{children:y.map(g=>s.jsx(qt,{...g},g.id))})]})]})})})},is=o.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),os=o.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),rs=o.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),as=o.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),ls=o.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),cs=o.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),he=({created:e,image:t,title:n,instantView:i})=>{const r=D.useMemo(()=>{if(e){const p=new Date(e);if(Le(p))return{date:Ee(p),time:we(p)}}return null},[e]),d=(i==null?void 0:i.image)||t;return s.jsxs(is,{children:[r&&s.jsxs(ls,{children:[r.date," · ",r.time]}),(i==null?void 0:i.video)&&s.jsx(O.w,{source:i.video.url,poster:i.video.thumbnailUrl}),d&&!(i!=null&&i.video)&&s.jsx(cs,{src:d}),s.jsxs(os,{children:[s.jsx(rs,{children:(i==null?void 0:i.heading)||n}),s.jsx(as,{children:i==null?void 0:i.body})]})]})},ds=o.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),us=o.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ps=({instantView:e,...t})=>s.jsxs(ds,{children:[s.jsx(he,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(us,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(o.n1,{name:"icon-external-link"})]})]}),ms=o.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),Is=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ps,{created:e.attributes.created,...e.attributes.attributes.value}):null},fs=({extendedQuestion:e,vote:t,close:n})=>{const{loading:i,data:r}=e;return r?s.jsx(ns,{vote:t,close:n,openedQuestion:r,isLoading:!!i}):null},hs=({gamification:e})=>{var t;const n=C.useStore(e.openedQuestion.$store),i=C.useStore(e.openedQuestion.$extendedStore);if(!n)return null;const r=n.type;return s.jsxs(ms,{children:[s.jsx(ue,{close:e.closeQuestion,type:((t=n.attributes)==null?void 0:t.type)||h.QuestionType.UNSET}),r==="question"&&s.jsx(fs,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:i}),r!=="question"&&s.jsx(Is,{openedQuestion:n}),s.jsx(dt,{sponsorLogo:""})]})},ys=o.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),xs=o.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),gs=o.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),js=o.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var R=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(R||{});const te=({title:e,active:t,onClick:n})=>s.jsx(gs,{onClick:n,"data-selected":t,children:s.jsx(js,{children:e})}),Ms=({activePage:e="home",toggleActivePage:t})=>s.jsx(ys,{children:s.jsxs(xs,{"data-position":e==="home"?"left":"right",children:[s.jsx(te,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(te,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},W.apply(this,arguments)}function se(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},V(e,t)}function vs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}var ne=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Ts(e,t){return!!(e===t||ne(e)&&ne(t))}function Ns(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Ts(e[n],t[n]))return!1;return!0}function P(e,t){t===void 0&&(t=Ns);var n,i=[],r,d=!1;function p(){for(var m=[],c=0;c<arguments.length;c++)m[c]=arguments[c];return d&&n===this&&t(m,i)||(r=e.apply(this,m),d=!0,n=this,i=m),r}return p}var As=typeof performance=="object"&&typeof performance.now=="function",ie=As?function(){return performance.now()}:function(){return Date.now()};function oe(e){cancelAnimationFrame(e.id)}function Ss(e,t){var n=ie();function i(){ie()-n>=t?e.call(null):r.id=requestAnimationFrame(i)}var r={id:requestAnimationFrame(i)};return r}var Y=-1;function re(e){if(e===void 0&&(e=!1),Y===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),Y=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Y}var b=null;function ae(e){if(e===void 0&&(e=!1),b===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),r=i.style;return r.width="100px",r.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?b="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?b="negative":b="positive-ascending"),document.body.removeChild(t),b}return b}var Ds=150,zs=function(t,n){return t};function Os(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,r=e.getItemSize,d=e.getOffsetForIndexAndAlignment,p=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,c=e.initInstanceProps,I=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(A){vs(j,A);function j(N){var a;return a=A.call(this,N)||this,a._instanceProps=c(a.props,se(a)),a._outerRef=void 0,a._resetIsScrollingTimeoutId=null,a.state={instance:se(a),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof a.props.initialScrollOffset=="number"?a.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},a._callOnItemsRendered=void 0,a._callOnItemsRendered=P(function(l,u,f,y){return a.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:u,visibleStartIndex:f,visibleStopIndex:y})}),a._callOnScroll=void 0,a._callOnScroll=P(function(l,u,f){return a.props.onScroll({scrollDirection:l,scrollOffset:u,scrollUpdateWasRequested:f})}),a._getItemStyle=void 0,a._getItemStyle=function(l){var u=a.props,f=u.direction,y=u.itemSize,S=u.layout,x=a._getItemStyleCache(I&&y,I&&S,I&&f),M;if(x.hasOwnProperty(l))M=x[l];else{var g=n(a.props,l,a._instanceProps),z=r(a.props,l,a._instanceProps),_=f==="horizontal"||S==="horizontal",w=f==="rtl",L=_?g:0;x[l]=M={position:"absolute",left:w?void 0:L,right:w?L:void 0,top:_?0:g,height:_?"100%":z,width:_?z:"100%"}}return M},a._getItemStyleCache=void 0,a._getItemStyleCache=P(function(l,u,f){return{}}),a._onScrollHorizontal=function(l){var u=l.currentTarget,f=u.clientWidth,y=u.scrollLeft,S=u.scrollWidth;a.setState(function(x){if(x.scrollOffset===y)return null;var M=a.props.direction,g=y;if(M==="rtl")switch(ae()){case"negative":g=-y;break;case"positive-descending":g=S-f-y;break}return g=Math.max(0,Math.min(g,S-f)),{isScrolling:!0,scrollDirection:x.scrollOffset<y?"forward":"backward",scrollOffset:g,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._onScrollVertical=function(l){var u=l.currentTarget,f=u.clientHeight,y=u.scrollHeight,S=u.scrollTop;a.setState(function(x){if(x.scrollOffset===S)return null;var M=Math.max(0,Math.min(S,y-f));return{isScrolling:!0,scrollDirection:x.scrollOffset<M?"forward":"backward",scrollOffset:M,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._outerRefSetter=function(l){var u=a.props.outerRef;a._outerRef=l,typeof u=="function"?u(l):u!=null&&typeof u=="object"&&u.hasOwnProperty("current")&&(u.current=l)},a._resetIsScrollingDebounced=function(){a._resetIsScrollingTimeoutId!==null&&oe(a._resetIsScrollingTimeoutId),a._resetIsScrollingTimeoutId=Ss(a._resetIsScrolling,Ds)},a._resetIsScrolling=function(){a._resetIsScrollingTimeoutId=null,a.setState({isScrolling:!1},function(){a._getItemStyleCache(-1,null)})},a}j.getDerivedStateFromProps=function(a,l){return _s(a,l),v(a),null};var T=j.prototype;return T.scrollTo=function(a){a=Math.max(0,a),this.setState(function(l){return l.scrollOffset===a?null:{scrollDirection:l.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},T.scrollToItem=function(a,l){l===void 0&&(l="auto");var u=this.props,f=u.itemCount,y=u.layout,S=this.state.scrollOffset;a=Math.max(0,Math.min(a,f-1));var x=0;if(this._outerRef){var M=this._outerRef;y==="vertical"?x=M.scrollWidth>M.clientWidth?re():0:x=M.scrollHeight>M.clientHeight?re():0}this.scrollTo(d(this.props,a,l,S,this._instanceProps,x))},T.componentDidMount=function(){var a=this.props,l=a.direction,u=a.initialScrollOffset,f=a.layout;if(typeof u=="number"&&this._outerRef!=null){var y=this._outerRef;l==="horizontal"||f==="horizontal"?y.scrollLeft=u:y.scrollTop=u}this._callPropsCallbacks()},T.componentDidUpdate=function(){var a=this.props,l=a.direction,u=a.layout,f=this.state,y=f.scrollOffset,S=f.scrollUpdateWasRequested;if(S&&this._outerRef!=null){var x=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(ae()){case"negative":x.scrollLeft=-y;break;case"positive-ascending":x.scrollLeft=y;break;default:var M=x.clientWidth,g=x.scrollWidth;x.scrollLeft=g-M-y;break}else x.scrollLeft=y;else x.scrollTop=y}this._callPropsCallbacks()},T.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&oe(this._resetIsScrollingTimeoutId)},T.render=function(){var a=this.props,l=a.children,u=a.className,f=a.direction,y=a.height,S=a.innerRef,x=a.innerElementType,M=a.innerTagName,g=a.itemCount,z=a.itemData,_=a.itemKey,w=_===void 0?zs:_,L=a.layout,ye=a.outerElementType,xe=a.outerTagName,ge=a.style,je=a.useIsScrolling,Me=a.width,F=this.state.isScrolling,U=f==="horizontal"||L==="horizontal",ve=U?this._onScrollHorizontal:this._onScrollVertical,B=this._getRangeToRender(),Te=B[0],Ne=B[1],H=[];if(g>0)for(var E=Te;E<=Ne;E++)H.push(D.createElement(l,{data:z,key:w(E,z),index:E,isScrolling:je?F:void 0,style:this._getItemStyle(E)}));var G=i(this.props,this._instanceProps);return D.createElement(ye||xe||"div",{className:u,onScroll:ve,ref:this._outerRefSetter,style:W({position:"relative",height:y,width:Me,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},ge)},D.createElement(x||M||"div",{children:H,ref:S,style:{height:U?"100%":G,pointerEvents:F?"none":void 0,width:U?G:"100%"}}))},T._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var a=this.props.itemCount;if(a>0){var l=this._getRangeToRender(),u=l[0],f=l[1],y=l[2],S=l[3];this._callOnItemsRendered(u,f,y,S)}}if(typeof this.props.onScroll=="function"){var x=this.state,M=x.scrollDirection,g=x.scrollOffset,z=x.scrollUpdateWasRequested;this._callOnScroll(M,g,z)}},T._getRangeToRender=function(){var a=this.props,l=a.itemCount,u=a.overscanCount,f=this.state,y=f.isScrolling,S=f.scrollDirection,x=f.scrollOffset;if(l===0)return[0,0,0,0];var M=p(this.props,x,this._instanceProps),g=m(this.props,M,x,this._instanceProps),z=!y||S==="backward"?Math.max(1,u):1,_=!y||S==="forward"?Math.max(1,u):1;return[Math.max(0,M-z),Math.max(0,Math.min(l-1,g+_)),M,g]},j}(D.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var _s=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},ks=Os({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,r,d,p){var m=t.direction,c=t.height,I=t.itemCount,v=t.itemSize,A=t.layout,j=t.width,T=m==="horizontal"||A==="horizontal",N=T?j:c,a=Math.max(0,I*v-N),l=Math.min(a,n*v),u=Math.max(0,n*v-N+v+p);switch(i==="smart"&&(r>=u-N&&r<=l+N?i="auto":i="center"),i){case"start":return l;case"end":return u;case"center":{var f=Math.round(u+(l-u)/2);return f<Math.ceil(N/2)?0:f>a+Math.floor(N/2)?a:f}case"auto":default:return r>=u&&r<=l?r:r<u?u:l}},getStartIndexForOffset:function(t,n){var i=t.itemCount,r=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/r)))},getStopIndexForStartIndex:function(t,n,i){var r=t.direction,d=t.height,p=t.itemCount,m=t.itemSize,c=t.layout,I=t.width,v=r==="horizontal"||c==="horizontal",A=n*m,j=v?I:d,T=Math.ceil((j+i-A)/m);return Math.max(0,Math.min(p-1,n+T-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function Cs(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,i=e.startIndex,r=e.stopIndex;return!(i>n||r<t)}function bs(e){for(var t=e.isItemLoaded,n=e.itemCount,i=e.minimumBatchSize,r=e.startIndex,d=e.stopIndex,p=[],m=null,c=null,I=r;I<=d;I++){var v=t(I);v?c!==null&&(p.push(m,c),m=c=null):(c=I,m===null&&(m=I))}if(c!==null){for(var A=Math.min(Math.max(c,m+i-1),n-1),j=c+1;j<=A&&!t(j);j++)c=j;p.push(m,c)}if(p.length)for(;p[1]-p[0]+1<i&&p[0]>0;){var T=p[0]-1;if(!t(T))p[0]=T;else break}return p}var Es=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ws=function(){function e(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ls=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},le=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},$s=function(e){Ls(t,e);function t(){var n,i,r,d;Es(this,t);for(var p=arguments.length,m=Array(p),c=0;c<p;c++)m[c]=arguments[c];return d=(i=(r=le(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(m))),r),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(I){var v=I.visibleStartIndex,A=I.visibleStopIndex;r._lastRenderedStartIndex=v,r._lastRenderedStopIndex=A,r._ensureRowsLoaded(v,A)},r._setRef=function(I){r._listRef=I},i),le(r,d)}return ws(t,[{key:"resetloadMoreItemsCache",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],i&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var i=this.props.children;return i({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(i,r){var d=this.props,p=d.isItemLoaded,m=d.itemCount,c=d.minimumBatchSize,I=c===void 0?10:c,v=d.threshold,A=v===void 0?15:v,j=bs({isItemLoaded:p,itemCount:m,minimumBatchSize:I,startIndex:Math.max(0,i-A),stopIndex:Math.min(m-1,r+A)});(this._memoizedUnloadedRanges.length!==j.length||this._memoizedUnloadedRanges.some(function(T,N){return j[N]!==T}))&&(this._memoizedUnloadedRanges=j,this._loadUnloadedRanges(j))}},{key:"_loadUnloadedRanges",value:function(i){for(var r=this,d=this.props.loadMoreItems||this.props.loadMoreRows,p=function(I){var v=i[I],A=i[I+1],j=d(v,A);j!=null&&j.then(function(){if(Cs({lastRenderedStartIndex:r._lastRenderedStartIndex,lastRenderedStopIndex:r._lastRenderedStopIndex,startIndex:v,stopIndex:A})){if(r._listRef==null)return;typeof r._listRef.resetAfterIndex=="function"?r._listRef.resetAfterIndex(v,!0):(typeof r._listRef._getItemStyleCache=="function"&&r._listRef._getItemStyleCache(-1),r._listRef.forceUpdate())}})},m=0;m<i.length;m+=2)p(m)}}]),t}(D.PureComponent);const Qs=o.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Rs=o.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),Us=o.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),qs=o.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),Ps=o.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Ys=o.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Ws=o.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),Vs=()=>o.n1,Fs=o.styled_default(Vs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Bs=({rank:e,avatar:t,name:n,points:i,isCurrentUser:r,openItemDetail:d,style:p})=>s.jsxs(Qs,{onClick:d,style:p,children:[s.jsx(Rs,{children:e||0}),s.jsxs(Ps,{children:[t?s.jsx(Us,{alt:"leaderboard-item-avatar",src:t}):s.jsx(qs,{children:pe(n||"")}),s.jsxs(Ys,{children:[s.jsx(Ws,{children:n||""}),r&&s.jsx(Fs,{name:"icon-star"})]})]}),s.jsx("div",{children:me(i)})]}),Hs=o.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Gs=({items:e,currentUserId:t,openItemDetail:n,fetchMore:i})=>s.jsx(O.AutoSizer,{children:({width:r,height:d})=>s.jsx($s,{isItemLoaded:p=>p<e.length,itemCount:e.length+1,loadMoreItems:i,children:({onItemsRendered:p,ref:m})=>s.jsx(Hs,{children:s.jsx(ks,{itemSize:56,onItemsRendered:p,ref:m,itemCount:e.length,width:r,height:d,children:({index:c,style:I})=>s.jsx(Bs,{style:{...I,maxHeight:48},...e[c],openItemDetail:()=>n(e[c].userId),isCurrentUser:!!t&&t===e[c].userId},e[c].userId)})})})}),Zs=({deepLink:e})=>{const{data:t}=C.useStore(e.$store),n=t==null?void 0:t.url,i=e.desktopLink;return s.jsx(O.O,{inviteLink:n||i,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Js=({gamification:e})=>{const{data:t}=C.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Gs,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(Zs,{deepLink:e.deepLink})},Ks=o.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Xs=o.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),en=o.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),tn=o.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),sn=()=>o.n1,Q=o.styled_default(sn())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),nn=()=>o.n1,on=o.styled_default(nn())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),rn=o.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),an=o.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),ln=o.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),cn={[h.PickHistoryStatus.LOST]:s.jsx(Q,{name:"incorrectVoted"}),[h.PickHistoryStatus.WON]:s.jsx(Q,{name:"icon-check"}),[h.PickHistoryStatus.UNSET]:s.jsx(Q,{name:"icon-arrow"}),[h.PickHistoryStatus.DNP]:s.jsx(Q,{name:"icon-arrow"})},dn=({questionId:e,questionType:t,questionStatus:n,subject:i,openForVoting:r,openQuestion:d,status:p})=>{const m=O.o[t],c=cn[p];return m?s.jsxs(Ks,{onClick:()=>d==null?void 0:d(e),children:[s.jsxs(an,{children:[s.jsxs(Xs,{children:[s.jsx(on,{"data-type-trivia":t===h.QuestionType.TRIVIA,"data-type-poll":t===h.QuestionType.POLL,name:m.iconName}),s.jsxs(rn,{children:[m.label,t===h.QuestionType.TRIVIA&&n===h.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(en,{children:i||""})]}),s.jsx(tn,{children:r?s.jsx(ln,{children:"Play"}):c})]}):null},un=o.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),pn=o.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),mn=({openInsight:e,questionId:t,...n})=>s.jsxs(un,{children:[s.jsx(he,{questionId:t,...n}),e&&s.jsx(pn,{onClick:()=>e(t),children:"View Insight"})]}),In=o.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),fn=({questions:e,openQuestion:t})=>s.jsx(In,{children:e==null?void 0:e.map(n=>{var i,r;if(n.type==="question"&&((i=n.attributes)==null?void 0:i.attributes.case)==="question"){const d=n.attributes.attributes.value;return s.jsx(dn,{openQuestion:t,...d},d.questionId)}if(n.type==="insight"&&((r=n.attributes)==null?void 0:r.attributes.case)==="insight"){const d=n.attributes.attributes.value;return s.jsx(mn,{openInsight:t,...d},d.questionId)}return null})}),hn=({store:e,openQuestion:t})=>{const n=C.useStore(e);return n!=null&&n.data?s.jsx(fn,{openQuestion:t,questions:n.data}):s.jsx("div",{children:"wait questions..."})},yn=({userSummary:e})=>{var t;const[n,i]=D.useState(void 0);return D.useEffect(()=>{const r=e.subscribe(d=>{d!=null&&d.data&&i(d.data)});return()=>{r()}},[e]),n!=null&&n.summary?s.jsx(Ie,{...n.summary,successRate:(t=n.percentage)==null?void 0:t.correct}):s.jsx("div",{children:"wait user..."})},xn=({gamification:e})=>{const[t,n]=D.useState(R.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(O.a,{style:{paddingBottom:"4px"},children:s.jsx(Ms,{activePage:t,toggleActivePage:n})}),t===R.HOME&&s.jsxs(O.r,{children:[s.jsx(O.a,{style:{paddingTop:"12px"},children:s.jsx(yn,{userSummary:e.userSummary})}),s.jsx(O.n,{children:s.jsx(hn,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===R.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Js,{gamification:e})})]})},gn=()=>O.f,ce=o.styled_default(gn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),jn=o.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),Mn=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},vn=({gamification:e,className:t})=>{const n=C.useStore(e.openedQuestion.$store),i=C.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[n&&s.jsx(ce,{className:t,children:s.jsx(hs,{gamification:e})}),i&&s.jsx(ce,{className:t,children:s.jsxs(jn,{children:[s.jsx(ue,{label:"Friend's Rank",close:e.closeUser}),s.jsx(O.a,{children:s.jsx(Ie,{...i,successRate:Mn(i)})})]})}),s.jsx(O.r,{className:t,"data-nav":"true",children:s.jsx(xn,{gamification:e})})]})};exports.default=vn;
|
package/lib/cjs/masters2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),le=require("./index2.js"),A=require("react"),U=require("@streamlayer/sdk-web-types"),Z=require("@nanostores/react"),he=require("@streamlayer/sdk-web-interfaces"),d=require("./index4.js"),me=require("@streamlayer/sdk-web-notifications"),Dt=({feature:o,sdk:s,children:c,className:f})=>{const y=Z.useStore(o.status),m=Z.useStore(s.sdkStore.slStreamId);return m!=null&&m.loading?n.jsx("div",{className:f,children:"event is loading..."}):m!=null&&m.data?y!==he.FeatureStatus.Ready?n.jsx("div",{className:f,children:"wait feature..."}):c:n.jsx("div",{className:f,children:"event is forbidden..."})},qt=A.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),Pt=({sdk:o,feature:s,className:c})=>{const f=A.useMemo(()=>s&&s.featureConfig.get().type===U.FeatureType.GAMES?n.jsx(Dt,{className:c,sdk:o,feature:s,children:n.jsx(qt,{className:c,gamification:s,sdk:o})}):null,[o,s,c]);return n.jsx(A.Suspense,{fallback:n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:f})},Mt=d.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),Wt=d.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),Gt=d.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),ke=({disabled:o,active:s,onClick:c,label:f,icon:y})=>n.jsx(Mt,{onClick:c,disabled:o,"data-selected":s,children:n.jsxs(n.Fragment,{children:[y&&n.jsx(Wt,{children:y}),n.jsx(Gt,{children:f})]})}),Ht=()=>d.n1,Qt=d.styled_default(Ht())({name:"ButtonIcon",class:"b1whzxvd",propsAsIs:!0}),ce="channels",Yt=o=>{var s;return n.jsx(ke,{...o,id:"channels",label:"Channels",icon:n.jsx(Qt,{name:"icon-btn-channels","data-selected":(s=o.active)==null?void 0:s.toString()})})},Vt=()=>d.n1,Kt=d.styled_default(Vt())({name:"ButtonIcon",class:"b11des7c",propsAsIs:!0}),X="featuredGroups",Xt=o=>{var s;return n.jsx(ke,{...o,label:"FG+",id:"featuredGroups",icon:n.jsx(Kt,{name:"icon-btn-feature-groups","data-selected":(s=o.active)==null?void 0:s.toString()})})},Jt=()=>d.n1,Zt=d.styled_default(Jt())({name:"ButtonIcon",class:"b180jd7l",propsAsIs:!0}),ge="leaderboard",er=o=>{var s;return n.jsx(ke,{...o,label:"Leader Board",id:"leaderboard",icon:n.jsx(Zt,{name:"icon-btn-leaderboard","data-selected":(s=o.active)==null?void 0:s.toString()})})},tr=d.styled_default("div")({name:"Buttons",class:"b6tbwuy",propsAsIs:!1}),rr=({children:o,className:s})=>n.jsx(tr,{className:s,children:o}),ir=()=>rr,nr=d.styled_default(ir())({name:"Navigation",class:"n19lpak2",propsAsIs:!0}),sr=({activeOverlay:o,setActiveOverlay:s,sdkReady:c,className:f})=>n.jsxs(nr,{className:f,children:[n.jsx(Yt,{active:o===ce,onClick:()=>s(ce)}),n.jsx(Xt,{active:o===X,disabled:!c,onClick:()=>{s(X)}}),n.jsx(er,{active:o===ge,onClick:()=>s(ge)})]}),ut={[U.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.UNSET]:void 0,[U.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[U.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[U.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}},or=d.styled_default("div")({name:"Container",class:"c1bgb86j",propsAsIs:!1}),ar=d.styled_default("video")({name:"Player",class:"p6703cq",propsAsIs:!1}),lr=d.styled_default("img")({name:"Poster",class:"p12ow7zo",propsAsIs:!1}),cr=d.styled_default("div")({name:"Control",class:"cdpal9o",propsAsIs:!1}),dt=({poster:o,source:s})=>{const c=A.useRef(null),[f,y]=A.useState(!1),[m,h]=A.useState(!0);return n.jsxs(or,{onClick:()=>{const a=c==null?void 0:c.current;a&&y(g=>g?(a.pause(),!1):(a.play(),h(!1),!0))},children:[n.jsx(ar,{ref:c,src:s,onEnded:()=>{var a;(a=c==null?void 0:c.current)==null||a.load(),y(!1),h(!0)},style:{visibility:m?"hidden":"visible"}}),n.jsx(lr,{src:o,style:{visibility:m?"visible":"hidden"}}),n.jsx(cr,{children:!f&&n.jsx(d.n1,{name:"icon-play"})})]})},ur=d.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),dr=d.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),hr=d.styled_default("div")({name:"InsightContent",class:"i1qne9g6",propsAsIs:!1}),pr=d.styled_default("h3")({name:"Title",class:"ttpr98r",propsAsIs:!1}),fr=d.styled_default("div")({name:"Description",class:"d17iaqp8",propsAsIs:!1}),yr=d.styled_default("button")({name:"ActionBtn",class:"a16t3y7s",propsAsIs:!1}),mr=({video:o,image:s,heading:c,body:f,action:y})=>n.jsxs(ur,{children:[(o==null?void 0:o.url)&&n.jsx(dt,{source:o.url,poster:o.thumbnailUrl}),s&&n.jsx(dr,{src:s}),n.jsxs(hr,{children:[n.jsx(pr,{children:c}),n.jsx(fr,{children:f}),y&&n.jsx(yr,{onClick:y,children:"View Insight"})]})]}),xr=d.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),gr=d.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),wr=()=>d.n1,_r=d.styled_default(wr())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Ir=d.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Ar=()=>d.n1,vr=d.styled_default(Ar())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),br=d.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Er=d.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),Br=d.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),jr=d.styled_default("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),Tr=d.styled_default("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),Cr=d.styled_default("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),Fr=d.styled_default("div")({name:"Details",class:"d1c454nm",propsAsIs:!1}),$r=d.styled_default("div")({name:"Name",class:"n11nigc3",propsAsIs:!1}),Sr=d.styled_default("div")({name:"UserName",class:"urxa4k8",propsAsIs:!1}),kr=({image:o,name:s,userName:c,verified:f})=>n.jsxs(jr,{children:[n.jsx(Tr,{children:n.jsx(Cr,{src:o})}),n.jsxs(Fr,{children:[n.jsxs($r,{children:[s," ",f&&n.jsx(d.n1,{name:"icon-twitter-verified"})]}),n.jsx(Sr,{children:c})]})]}),Lr=d.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),Rr=d.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),Nr=d.styled_default("div")({name:"Body",class:"b14u54rf",propsAsIs:!1}),Ur=d.styled_default("img")({name:"Image",class:"i1hxm6zo",propsAsIs:!1}),zr=d.styled_default("div")({name:"Details",class:"d1s19yop",propsAsIs:!1}),Or=d.styled_default("div")({name:"QuoteWrap",class:"q1qyx94r",propsAsIs:!1}),Dr=d.styled_default("blockquote")({name:"Quote",class:"qs97clu",propsAsIs:!1}),qr=({account:o,body:s,image:c,title:f,action:y})=>n.jsxs(Lr,{children:[n.jsx(Or,{children:n.jsx(Dr,{children:f})}),n.jsxs(zr,{children:[n.jsx(kr,{...o}),n.jsx(Nr,{children:s}),c&&n.jsx(Ur,{src:c})]}),y&&n.jsx(Rr,{onClick:y,children:"View Tweet"})]}),Qe=({close:o,action:s,data:{questionType:c,question:f,insight:y,tweet:m}})=>{const h=ut[c];return h?n.jsxs(xr,{children:[n.jsx(gr,{onClick:o,children:n.jsx(_r,{name:"icon-cross"})}),c!==U.QuestionType.TWEET&&n.jsxs(Ir,{children:[n.jsx(vr,{"data-type-trivia":c===U.QuestionType.TRIVIA,"data-type-poll":c===U.QuestionType.POLL,name:h.iconName}),n.jsx(br,{children:h.label})]}),c===U.QuestionType.FACTOID&&n.jsx(mr,{...y,action:s}),c===U.QuestionType.TWEET&&n.jsx(qr,{...m,action:s}),c!==U.QuestionType.FACTOID&&c!==U.QuestionType.TWEET&&n.jsxs(n.Fragment,{children:[n.jsx(Er,{children:f==null?void 0:f.title}),n.jsx(Br,{onClick:s,children:"Answer"})]})]}):null},re=d.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),O=d.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),Pr=()=>O,Mr=d.styled_default(Pr())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),Wr=()=>O,Gr=d.styled_default(Wr())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),Hr=()=>O,Qr=d.styled_default(Hr())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),Yr=()=>O,Ye=d.styled_default(Yr())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),Vr=()=>O,Ve=d.styled_default(Vr())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),Kr=()=>O,Ke=d.styled_default(Kr())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),Xr=()=>O,Xe=d.styled_default(Xr())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),Jr=()=>O,Je=d.styled_default(Jr())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),Zr=()=>O,Ze=d.styled_default(Zr())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),ei=()=>O,et=d.styled_default(ei())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),ti=()=>O,ri=d.styled_default(ti())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),ii=()=>O,ni=d.styled_default(ii())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),si=()=>O,oi=d.styled_default(si())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),ai=()=>O,li=d.styled_default(ai())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),ci=({step:o,correct:s})=>n.jsxs(n.Fragment,{children:[n.jsxs(re,{"data-active":o===1,"data-first-screen":"true",children:[n.jsx(Mr,{}),n.jsx(Gr,{}),n.jsx(Qr,{})]}),n.jsxs(re,{"data-active":o===2,children:[n.jsx(Ye,{}),n.jsx(Ve,{}),n.jsx(Ke,{})]}),n.jsxs(re,{"data-active":o===3,children:[n.jsx(Ye,{}),n.jsx(Ve,{}),n.jsx(Ke,{})]}),s?n.jsxs(n.Fragment,{children:[n.jsxs(re,{"data-active":o===4,"data-correct":"false",children:[n.jsx(Xe,{}),n.jsx(Je,{}),n.jsx(Ze,{}),n.jsx(et,{})]}),n.jsxs(re,{"data-active":o===5,"data-correct":"false","data-last-screen":"true",children:[n.jsx(Xe,{}),n.jsx(Je,{}),n.jsx(Ze,{}),n.jsx(et,{})]})]}):n.jsxs(re,{"data-active":o===4,"data-correct":"false","data-last-screen":"true",children:[n.jsx(ri,{}),n.jsx(ni,{}),n.jsx(oi,{}),n.jsx(li,{})]})]}),ui=d.styled_default("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),di="hx17qu6",we=({children:o,style:s,className:c,hiding:f})=>n.jsx(ui,{style:s,className:d.cx_default(c,f&&di),children:o}),hi=118,pi=()=>we,fi=d.styled_default(pi())({name:"Container",class:"c10131zw",propsAsIs:!0}),yi=d.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),ie=d.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),ne=d.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),pe=d.styled_default("div")({name:"Subtitle",class:"s1pjil1h",propsAsIs:!1}),mi=()=>pe,tt=d.styled_default(mi())({name:"SubtitleFG",class:"s1iorwr9",propsAsIs:!0}),ye=d.styled_default("div")({name:"AnswerText",class:"a51sv9d",propsAsIs:!1}),xi=()=>d.n1,be=d.styled_default(xi())({name:"FeedbackIcon",class:"f1lbk2ye",propsAsIs:!0}),rt=d.styled_default("button")({name:"CloseButton",class:"crcvk3t",propsAsIs:!1}),gi=()=>d.n1,it=d.styled_default(gi())({name:"CloseIcon",class:"c33p82r",propsAsIs:!0}),se=(o,s)=>o===s?"translateY(0px)":o>s?"translateY(100%)":"translateY(-100%)",wi=({close:o,votedAnswer:s,correct:c,correctAnswerTitle:f,questionTitle:y,saveHeight:m,style:h,hiding:a})=>{const[g,I]=A.useState(1),_=A.useRef({});A.useEffect(()=>{const x=setInterval(()=>{I(w=>c&&w>4||!c&&w>3?w:++w)},6e3);return()=>clearInterval(x)},[c]),A.useEffect(()=>{var x,w;_.current[g]&&m(((w=(x=_.current[g])==null?void 0:x.getBoundingClientRect())==null?void 0:w.height)||hi)},[g,m]);const E=x=>w=>{_.current&&(_.current[x]=w)};return n.jsx(fi,{style:h.height?h:{...h,paddingTop:0,paddingBottom:0},hiding:a,children:n.jsxs(yi,{style:{height:h.height,minHeight:h.height,backgroundColor:g>3?"var(--color-white)":"var(--color-primary-green2)"},children:[n.jsx(ci,{step:g,correct:c}),n.jsxs(ie,{ref:E(1),style:{transform:se(1,g)},children:[n.jsx(ne,{children:"Master"}),n.jsx(tt,{children:"FEATURED GROUPS +"})]}),n.jsxs(ie,{ref:E(2),style:{transform:se(2,g)},children:[n.jsx(ne,{children:"Prediction results are in!"}),n.jsx(tt,{children:"FEATURED GROUPS +"})]}),n.jsxs(ie,{ref:E(3),style:{transform:se(3,g)},children:[n.jsx(ne,{children:y}),n.jsx(pe,{children:n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})})]}),c?n.jsxs(n.Fragment,{children:[n.jsxs(ie,{ref:E(4),style:{transform:se(4,g),color:"var(--color-primary-green1)"},children:[n.jsx(ne,{children:"Congratulations! You answered correctly."}),n.jsxs(pe,{children:[n.jsx(be,{name:"selected"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]})]}),n.jsxs(ie,{ref:E(5),style:{transform:se(5,g),color:"var(--color-primary-green1)"},children:[n.jsxs(ne,{children:["+",s==null?void 0:s.points," points"]}),n.jsxs(pe,{children:[n.jsx(be,{name:"selected"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]}),n.jsx(rt,{onClick:o,children:n.jsx(it,{name:"icon-cross"})})]})]}):n.jsxs(ie,{ref:E(4),style:{transform:se(4,g)},children:[n.jsxs(ne,{style:{color:"var(--color-neutrals-gray9)"},children:["Better luck next time! Correct: ",f,"."]}),n.jsxs(pe,{style:{color:"var(--color-secondary-red1)"},children:[n.jsx(be,{name:"circleClose"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]}),n.jsx(rt,{onClick:o,children:n.jsx(it,{name:"icon-cross"})})]})]})})};var ht={},pt={},_e={};_e.byteLength=Ai;_e.toByteArray=bi;_e.fromByteArray=ji;var H=[],q=[],_i=typeof Uint8Array<"u"?Uint8Array:Array,Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var oe=0,Ii=Ee.length;oe<Ii;++oe)H[oe]=Ee[oe],q[Ee.charCodeAt(oe)]=oe;q["-".charCodeAt(0)]=62;q["_".charCodeAt(0)]=63;function ft(o){var s=o.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=o.indexOf("=");c===-1&&(c=s);var f=c===s?0:4-c%4;return[c,f]}function Ai(o){var s=ft(o),c=s[0],f=s[1];return(c+f)*3/4-f}function vi(o,s,c){return(s+c)*3/4-c}function bi(o){var s,c=ft(o),f=c[0],y=c[1],m=new _i(vi(o,f,y)),h=0,a=y>0?f-4:f,g;for(g=0;g<a;g+=4)s=q[o.charCodeAt(g)]<<18|q[o.charCodeAt(g+1)]<<12|q[o.charCodeAt(g+2)]<<6|q[o.charCodeAt(g+3)],m[h++]=s>>16&255,m[h++]=s>>8&255,m[h++]=s&255;return y===2&&(s=q[o.charCodeAt(g)]<<2|q[o.charCodeAt(g+1)]>>4,m[h++]=s&255),y===1&&(s=q[o.charCodeAt(g)]<<10|q[o.charCodeAt(g+1)]<<4|q[o.charCodeAt(g+2)]>>2,m[h++]=s>>8&255,m[h++]=s&255),m}function Ei(o){return H[o>>18&63]+H[o>>12&63]+H[o>>6&63]+H[o&63]}function Bi(o,s,c){for(var f,y=[],m=s;m<c;m+=3)f=(o[m]<<16&16711680)+(o[m+1]<<8&65280)+(o[m+2]&255),y.push(Ei(f));return y.join("")}function ji(o){for(var s,c=o.length,f=c%3,y=[],m=16383,h=0,a=c-f;h<a;h+=m)y.push(Bi(o,h,h+m>a?a:h+m));return f===1?(s=o[c-1],y.push(H[s>>2]+H[s<<4&63]+"==")):f===2&&(s=(o[c-2]<<8)+o[c-1],y.push(H[s>>10]+H[s>>4&63]+H[s<<2&63]+"=")),y.join("")}var Le={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Le.read=function(o,s,c,f,y){var m,h,a=y*8-f-1,g=(1<<a)-1,I=g>>1,_=-7,E=c?y-1:0,x=c?-1:1,w=o[s+E];for(E+=x,m=w&(1<<-_)-1,w>>=-_,_+=a;_>0;m=m*256+o[s+E],E+=x,_-=8);for(h=m&(1<<-_)-1,m>>=-_,_+=f;_>0;h=h*256+o[s+E],E+=x,_-=8);if(m===0)m=1-I;else{if(m===g)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,f),m=m-I}return(w?-1:1)*h*Math.pow(2,m-f)};Le.write=function(o,s,c,f,y,m){var h,a,g,I=m*8-y-1,_=(1<<I)-1,E=_>>1,x=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=f?0:m-1,v=f?1:-1,B=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(a=isNaN(s)?1:0,h=_):(h=Math.floor(Math.log(s)/Math.LN2),s*(g=Math.pow(2,-h))<1&&(h--,g*=2),h+E>=1?s+=x/g:s+=x*Math.pow(2,1-E),s*g>=2&&(h++,g/=2),h+E>=_?(a=0,h=_):h+E>=1?(a=(s*g-1)*Math.pow(2,y),h=h+E):(a=s*Math.pow(2,E-1)*Math.pow(2,y),h=0));y>=8;o[c+w]=a&255,w+=v,a/=256,y-=8);for(h=h<<y|a,I+=y;I>0;o[c+w]=h&255,w+=v,h/=256,I-=8);o[c+w-v]|=B*128};/*!
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),le=require("./index2.js"),A=require("react"),U=require("@streamlayer/sdk-web-types"),Z=require("@nanostores/react"),he=require("@streamlayer/sdk-web-interfaces"),d=require("./index4.js"),me=require("@streamlayer/sdk-web-notifications"),Dt=({feature:o,sdk:s,children:c,className:f})=>{const y=Z.useStore(o.status),m=Z.useStore(s.sdkStore.slStreamId);return m!=null&&m.loading?n.jsx("div",{className:f,children:"event is loading..."}):m!=null&&m.data?y!==he.FeatureStatus.Ready?n.jsx("div",{className:f,children:"wait feature..."}):c:n.jsx("div",{className:f,children:"event is forbidden..."})},qt=A.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),Pt=({sdk:o,feature:s,className:c})=>{const f=A.useMemo(()=>s&&s.featureConfig.get().type===U.FeatureType.GAMES?n.jsx(Dt,{className:c,sdk:o,feature:s,children:n.jsx(qt,{className:c,gamification:s,sdk:o})}):null,[o,s,c]);return n.jsx(A.Suspense,{fallback:n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:f})},Mt=d.styled_default("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),Wt=d.styled_default("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),Gt=d.styled_default("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),ke=({disabled:o,active:s,onClick:c,label:f,icon:y})=>n.jsx(Mt,{onClick:c,disabled:o,"data-selected":s,children:n.jsxs(n.Fragment,{children:[y&&n.jsx(Wt,{children:y}),n.jsx(Gt,{children:f})]})}),Ht=()=>d.n1,Qt=d.styled_default(Ht())({name:"ButtonIcon",class:"b1whzxvd",propsAsIs:!0}),ce="channels",Yt=o=>{var s;return n.jsx(ke,{...o,id:"channels",label:"Channels",icon:n.jsx(Qt,{name:"icon-btn-channels","data-selected":(s=o.active)==null?void 0:s.toString()})})},Vt=()=>d.n1,Kt=d.styled_default(Vt())({name:"ButtonIcon",class:"b11des7c",propsAsIs:!0}),X="featuredGroups",Xt=o=>{var s;return n.jsx(ke,{...o,label:"FG+",id:"featuredGroups",icon:n.jsx(Kt,{name:"icon-btn-feature-groups","data-selected":(s=o.active)==null?void 0:s.toString()})})},Jt=()=>d.n1,Zt=d.styled_default(Jt())({name:"ButtonIcon",class:"b180jd7l",propsAsIs:!0}),ge="leaderboard",ei=o=>{var s;return n.jsx(ke,{...o,label:"Leader Board",id:"leaderboard",icon:n.jsx(Zt,{name:"icon-btn-leaderboard","data-selected":(s=o.active)==null?void 0:s.toString()})})},ti=d.styled_default("div")({name:"Buttons",class:"b6tbwuy",propsAsIs:!1}),ii=({children:o,className:s})=>n.jsx(ti,{className:s,children:o}),ri=()=>ii,ni=d.styled_default(ri())({name:"Navigation",class:"n19lpak2",propsAsIs:!0}),si=({activeOverlay:o,setActiveOverlay:s,sdkReady:c,className:f})=>n.jsxs(ni,{className:f,children:[n.jsx(Yt,{active:o===ce,onClick:()=>s(ce)}),n.jsx(Xt,{active:o===X,disabled:!c,onClick:()=>{s(X)}}),n.jsx(ei,{active:o===ge,onClick:()=>s(ge)})]}),ut={[U.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.UNSET]:void 0,[U.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[U.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[U.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}},oi=d.styled_default("div")({name:"Container",class:"c1bgb86j",propsAsIs:!1}),ai=d.styled_default("video")({name:"Player",class:"p6703cq",propsAsIs:!1}),li=d.styled_default("img")({name:"Poster",class:"p12ow7zo",propsAsIs:!1}),ci=d.styled_default("div")({name:"Control",class:"cdpal9o",propsAsIs:!1}),dt=({poster:o,source:s})=>{const c=A.useRef(null),[f,y]=A.useState(!1),[m,h]=A.useState(!0);return n.jsxs(oi,{onClick:()=>{const a=c==null?void 0:c.current;a&&y(g=>g?(a.pause(),!1):(a.play(),h(!1),!0))},children:[n.jsx(ai,{ref:c,src:s,onEnded:()=>{var a;(a=c==null?void 0:c.current)==null||a.load(),y(!1),h(!0)},style:{visibility:m?"hidden":"visible"}}),n.jsx(li,{src:o,style:{visibility:m?"visible":"hidden"}}),n.jsx(ci,{children:!f&&n.jsx(d.n1,{name:"icon-play"})})]})},ui=d.styled_default("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),di=d.styled_default("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),hi=d.styled_default("div")({name:"InsightContent",class:"i1qne9g6",propsAsIs:!1}),pi=d.styled_default("h3")({name:"Title",class:"ttpr98r",propsAsIs:!1}),fi=d.styled_default("div")({name:"Description",class:"d17iaqp8",propsAsIs:!1}),yi=d.styled_default("button")({name:"ActionBtn",class:"a16t3y7s",propsAsIs:!1}),mi=({video:o,image:s,heading:c,body:f,action:y})=>n.jsxs(ui,{children:[(o==null?void 0:o.url)&&n.jsx(dt,{source:o.url,poster:o.thumbnailUrl}),s&&!(o!=null&&o.url)&&n.jsx(di,{src:s}),n.jsxs(hi,{children:[n.jsx(pi,{children:c}),n.jsx(fi,{children:f}),y&&n.jsx(yi,{onClick:y,children:"View Insight"})]})]}),xi=d.styled_default("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),gi=d.styled_default("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),wi=()=>d.n1,_i=d.styled_default(wi())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Ii=d.styled_default("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Ai=()=>d.n1,vi=d.styled_default(Ai())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),bi=d.styled_default("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Ei=d.styled_default("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),Bi=d.styled_default("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),ji=d.styled_default("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),Ti=d.styled_default("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),Ci=d.styled_default("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),Fi=d.styled_default("div")({name:"Details",class:"d1c454nm",propsAsIs:!1}),$i=d.styled_default("div")({name:"Name",class:"n11nigc3",propsAsIs:!1}),Si=d.styled_default("div")({name:"UserName",class:"urxa4k8",propsAsIs:!1}),ki=({image:o,name:s,userName:c,verified:f})=>n.jsxs(ji,{children:[n.jsx(Ti,{children:n.jsx(Ci,{src:o})}),n.jsxs(Fi,{children:[n.jsxs($i,{children:[s," ",f&&n.jsx(d.n1,{name:"icon-twitter-verified"})]}),n.jsx(Si,{children:c})]})]}),Li=d.styled_default("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),Ri=d.styled_default("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),Ni=d.styled_default("div")({name:"Body",class:"b14u54rf",propsAsIs:!1}),Ui=d.styled_default("img")({name:"Image",class:"i1hxm6zo",propsAsIs:!1}),zi=d.styled_default("div")({name:"Details",class:"d1s19yop",propsAsIs:!1}),Oi=d.styled_default("div")({name:"QuoteWrap",class:"q1qyx94r",propsAsIs:!1}),Di=d.styled_default("blockquote")({name:"Quote",class:"qs97clu",propsAsIs:!1}),qi=({account:o,body:s,image:c,title:f,action:y})=>n.jsxs(Li,{children:[n.jsx(Oi,{children:n.jsx(Di,{children:f})}),n.jsxs(zi,{children:[n.jsx(ki,{...o}),n.jsx(Ni,{children:s}),c&&n.jsx(Ui,{src:c})]}),y&&n.jsx(Ri,{onClick:y,children:"View Tweet"})]}),Qe=({close:o,action:s,data:{questionType:c,question:f,insight:y,tweet:m}})=>{const h=ut[c];return h?n.jsxs(xi,{children:[n.jsx(gi,{onClick:o,children:n.jsx(_i,{name:"icon-cross"})}),c!==U.QuestionType.TWEET&&n.jsxs(Ii,{children:[n.jsx(vi,{"data-type-trivia":c===U.QuestionType.TRIVIA,"data-type-poll":c===U.QuestionType.POLL,name:h.iconName}),n.jsx(bi,{children:h.label})]}),c===U.QuestionType.FACTOID&&n.jsx(mi,{...y,action:s}),c===U.QuestionType.TWEET&&n.jsx(qi,{...m,action:s}),c!==U.QuestionType.FACTOID&&c!==U.QuestionType.TWEET&&n.jsxs(n.Fragment,{children:[n.jsx(Ei,{children:f==null?void 0:f.title}),n.jsx(Bi,{onClick:s,children:"Answer"})]})]}):null},ie=d.styled_default("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),O=d.styled_default("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),Pi=()=>O,Mi=d.styled_default(Pi())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),Wi=()=>O,Gi=d.styled_default(Wi())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),Hi=()=>O,Qi=d.styled_default(Hi())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),Yi=()=>O,Ye=d.styled_default(Yi())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),Vi=()=>O,Ve=d.styled_default(Vi())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),Ki=()=>O,Ke=d.styled_default(Ki())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),Xi=()=>O,Xe=d.styled_default(Xi())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),Ji=()=>O,Je=d.styled_default(Ji())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),Zi=()=>O,Ze=d.styled_default(Zi())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),er=()=>O,et=d.styled_default(er())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),tr=()=>O,ir=d.styled_default(tr())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),rr=()=>O,nr=d.styled_default(rr())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),sr=()=>O,or=d.styled_default(sr())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),ar=()=>O,lr=d.styled_default(ar())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),cr=({step:o,correct:s})=>n.jsxs(n.Fragment,{children:[n.jsxs(ie,{"data-active":o===1,"data-first-screen":"true",children:[n.jsx(Mi,{}),n.jsx(Gi,{}),n.jsx(Qi,{})]}),n.jsxs(ie,{"data-active":o===2,children:[n.jsx(Ye,{}),n.jsx(Ve,{}),n.jsx(Ke,{})]}),n.jsxs(ie,{"data-active":o===3,children:[n.jsx(Ye,{}),n.jsx(Ve,{}),n.jsx(Ke,{})]}),s?n.jsxs(n.Fragment,{children:[n.jsxs(ie,{"data-active":o===4,"data-correct":"false",children:[n.jsx(Xe,{}),n.jsx(Je,{}),n.jsx(Ze,{}),n.jsx(et,{})]}),n.jsxs(ie,{"data-active":o===5,"data-correct":"false","data-last-screen":"true",children:[n.jsx(Xe,{}),n.jsx(Je,{}),n.jsx(Ze,{}),n.jsx(et,{})]})]}):n.jsxs(ie,{"data-active":o===4,"data-correct":"false","data-last-screen":"true",children:[n.jsx(ir,{}),n.jsx(nr,{}),n.jsx(or,{}),n.jsx(lr,{})]})]}),ur=d.styled_default("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),dr="hx17qu6",we=({children:o,style:s,className:c,hiding:f})=>n.jsx(ur,{style:s,className:d.cx_default(c,f&&dr),children:o}),hr=118,pr=()=>we,fr=d.styled_default(pr())({name:"Container",class:"c10131zw",propsAsIs:!0}),yr=d.styled_default("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),re=d.styled_default("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),ne=d.styled_default("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),pe=d.styled_default("div")({name:"Subtitle",class:"s1pjil1h",propsAsIs:!1}),mr=()=>pe,tt=d.styled_default(mr())({name:"SubtitleFG",class:"s1iorwr9",propsAsIs:!0}),ye=d.styled_default("div")({name:"AnswerText",class:"a51sv9d",propsAsIs:!1}),xr=()=>d.n1,be=d.styled_default(xr())({name:"FeedbackIcon",class:"f1lbk2ye",propsAsIs:!0}),it=d.styled_default("button")({name:"CloseButton",class:"crcvk3t",propsAsIs:!1}),gr=()=>d.n1,rt=d.styled_default(gr())({name:"CloseIcon",class:"c33p82r",propsAsIs:!0}),se=(o,s)=>o===s?"translateY(0px)":o>s?"translateY(100%)":"translateY(-100%)",wr=({close:o,votedAnswer:s,correct:c,correctAnswerTitle:f,questionTitle:y,saveHeight:m,style:h,hiding:a})=>{const[g,I]=A.useState(1),_=A.useRef({});A.useEffect(()=>{const x=setInterval(()=>{I(w=>c&&w>4||!c&&w>3?w:++w)},6e3);return()=>clearInterval(x)},[c]),A.useEffect(()=>{var x,w;_.current[g]&&m(((w=(x=_.current[g])==null?void 0:x.getBoundingClientRect())==null?void 0:w.height)||hr)},[g,m]);const E=x=>w=>{_.current&&(_.current[x]=w)};return n.jsx(fr,{style:h.height?h:{...h,paddingTop:0,paddingBottom:0},hiding:a,children:n.jsxs(yr,{style:{height:h.height,minHeight:h.height,backgroundColor:g>3?"var(--color-white)":"var(--color-primary-green2)"},children:[n.jsx(cr,{step:g,correct:c}),n.jsxs(re,{ref:E(1),style:{transform:se(1,g)},children:[n.jsx(ne,{children:"Master"}),n.jsx(tt,{children:"FEATURED GROUPS +"})]}),n.jsxs(re,{ref:E(2),style:{transform:se(2,g)},children:[n.jsx(ne,{children:"Prediction results are in!"}),n.jsx(tt,{children:"FEATURED GROUPS +"})]}),n.jsxs(re,{ref:E(3),style:{transform:se(3,g)},children:[n.jsx(ne,{children:y}),n.jsx(pe,{children:n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})})]}),c?n.jsxs(n.Fragment,{children:[n.jsxs(re,{ref:E(4),style:{transform:se(4,g),color:"var(--color-primary-green1)"},children:[n.jsx(ne,{children:"Congratulations! You answered correctly."}),n.jsxs(pe,{children:[n.jsx(be,{name:"selected"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]})]}),n.jsxs(re,{ref:E(5),style:{transform:se(5,g),color:"var(--color-primary-green1)"},children:[n.jsxs(ne,{children:["+",s==null?void 0:s.points," points"]}),n.jsxs(pe,{children:[n.jsx(be,{name:"selected"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]}),n.jsx(it,{onClick:o,children:n.jsx(rt,{name:"icon-cross"})})]})]}):n.jsxs(re,{ref:E(4),style:{transform:se(4,g)},children:[n.jsxs(ne,{style:{color:"var(--color-neutrals-gray9)"},children:["Better luck next time! Correct: ",f,"."]}),n.jsxs(pe,{style:{color:"var(--color-secondary-red1)"},children:[n.jsx(be,{name:"circleClose"}),n.jsxs(ye,{children:["Your Pick: ",s==null?void 0:s.title]})]}),n.jsx(it,{onClick:o,children:n.jsx(rt,{name:"icon-cross"})})]})]})})};var ht={},pt={},_e={};_e.byteLength=Ar;_e.toByteArray=br;_e.fromByteArray=jr;var H=[],q=[],_r=typeof Uint8Array<"u"?Uint8Array:Array,Ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var oe=0,Ir=Ee.length;oe<Ir;++oe)H[oe]=Ee[oe],q[Ee.charCodeAt(oe)]=oe;q["-".charCodeAt(0)]=62;q["_".charCodeAt(0)]=63;function ft(o){var s=o.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=o.indexOf("=");c===-1&&(c=s);var f=c===s?0:4-c%4;return[c,f]}function Ar(o){var s=ft(o),c=s[0],f=s[1];return(c+f)*3/4-f}function vr(o,s,c){return(s+c)*3/4-c}function br(o){var s,c=ft(o),f=c[0],y=c[1],m=new _r(vr(o,f,y)),h=0,a=y>0?f-4:f,g;for(g=0;g<a;g+=4)s=q[o.charCodeAt(g)]<<18|q[o.charCodeAt(g+1)]<<12|q[o.charCodeAt(g+2)]<<6|q[o.charCodeAt(g+3)],m[h++]=s>>16&255,m[h++]=s>>8&255,m[h++]=s&255;return y===2&&(s=q[o.charCodeAt(g)]<<2|q[o.charCodeAt(g+1)]>>4,m[h++]=s&255),y===1&&(s=q[o.charCodeAt(g)]<<10|q[o.charCodeAt(g+1)]<<4|q[o.charCodeAt(g+2)]>>2,m[h++]=s>>8&255,m[h++]=s&255),m}function Er(o){return H[o>>18&63]+H[o>>12&63]+H[o>>6&63]+H[o&63]}function Br(o,s,c){for(var f,y=[],m=s;m<c;m+=3)f=(o[m]<<16&16711680)+(o[m+1]<<8&65280)+(o[m+2]&255),y.push(Er(f));return y.join("")}function jr(o){for(var s,c=o.length,f=c%3,y=[],m=16383,h=0,a=c-f;h<a;h+=m)y.push(Br(o,h,h+m>a?a:h+m));return f===1?(s=o[c-1],y.push(H[s>>2]+H[s<<4&63]+"==")):f===2&&(s=(o[c-2]<<8)+o[c-1],y.push(H[s>>10]+H[s>>4&63]+H[s<<2&63]+"=")),y.join("")}var Le={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Le.read=function(o,s,c,f,y){var m,h,a=y*8-f-1,g=(1<<a)-1,I=g>>1,_=-7,E=c?y-1:0,x=c?-1:1,w=o[s+E];for(E+=x,m=w&(1<<-_)-1,w>>=-_,_+=a;_>0;m=m*256+o[s+E],E+=x,_-=8);for(h=m&(1<<-_)-1,m>>=-_,_+=f;_>0;h=h*256+o[s+E],E+=x,_-=8);if(m===0)m=1-I;else{if(m===g)return h?NaN:(w?-1:1)*(1/0);h=h+Math.pow(2,f),m=m-I}return(w?-1:1)*h*Math.pow(2,m-f)};Le.write=function(o,s,c,f,y,m){var h,a,g,I=m*8-y-1,_=(1<<I)-1,E=_>>1,x=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=f?0:m-1,v=f?1:-1,B=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(a=isNaN(s)?1:0,h=_):(h=Math.floor(Math.log(s)/Math.LN2),s*(g=Math.pow(2,-h))<1&&(h--,g*=2),h+E>=1?s+=x/g:s+=x*Math.pow(2,1-E),s*g>=2&&(h++,g/=2),h+E>=_?(a=0,h=_):h+E>=1?(a=(s*g-1)*Math.pow(2,y),h=h+E):(a=s*Math.pow(2,E-1)*Math.pow(2,y),h=0));y>=8;o[c+w]=a&255,w+=v,a/=256,y-=8);for(h=h<<y|a,I+=y;I>0;o[c+w]=h&255,w+=v,h/=256,I-=8);o[c+w-v]|=B*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/(function(o){const s=_e,c=Le,f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=a,o.SlowBuffer=C,o.INSPECT_MAX_BYTES=50;const y=2147483647;o.kMaxLength=y,a.TYPED_ARRAY_SUPPORT=m(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function h(r){if(r>y)throw new RangeError('The value "'+r+'" is invalid for option "size"');const e=new Uint8Array(r);return Object.setPrototypeOf(e,a.prototype),e}function a(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(r)}return g(r,e,t)}a.poolSize=8192;function g(r,e,t){if(typeof r=="string")return x(r,e);if(ArrayBuffer.isView(r))return v(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(M(r,ArrayBuffer)||r&&M(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(r,SharedArrayBuffer)||r&&M(r.buffer,SharedArrayBuffer)))return B(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return a.from(i,e,t);const l=L(r);if(l)return l;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return a.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}a.from=function(r,e,t){return g(r,e,t)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function I(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function _(r,e,t){return I(r),r<=0?h(r):e!==void 0?typeof t=="string"?h(r).fill(e,t):h(r).fill(e):h(r)}a.alloc=function(r,e,t){return _(r,e,t)};function E(r){return I(r),h(r<0?0:j(r)|0)}a.allocUnsafe=function(r){return E(r)},a.allocUnsafeSlow=function(r){return E(r)};function x(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=N(r,e)|0;let i=h(t);const l=i.write(r,e);return l!==t&&(i=i.slice(0,l)),i}function w(r){const e=r.length<0?0:j(r.length)|0,t=h(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function v(r){if(M(r,Uint8Array)){const e=new Uint8Array(r);return B(e.buffer,e.byteOffset,e.byteLength)}return w(r)}function B(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,a.prototype),i}function L(r){if(a.isBuffer(r)){const e=j(r.length)|0,t=h(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||ve(r.length)?h(0):w(r);if(r.type==="Buffer"&&Array.isArray(r.data))return w(r.data)}function j(r){if(r>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return r|0}function C(r){return+r!=r&&(r=0),a.alloc(+r)}a.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==a.prototype},a.compare=function(e,t){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,l=t.length;for(let u=0,p=Math.min(i,l);u<p;++u)if(e[u]!==t[u]){i=e[u],l=t[u];break}return i<l?-1:l<i?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return a.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const l=a.allocUnsafe(t);let u=0;for(i=0;i<e.length;++i){let p=e[i];if(M(p,Uint8Array))u+p.length>l.length?(a.isBuffer(p)||(p=a.from(p)),p.copy(l,u)):Uint8Array.prototype.set.call(l,p,u);else if(a.isBuffer(p))p.copy(l,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=p.length}return l};function N(r,e){if(a.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||M(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let l=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ae(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(r).length;default:if(l)return i?-1:Ae(r).length;e=(""+e).toLowerCase(),l=!0}}a.byteLength=N;function Q(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return $t(this,e,t);case"utf8":case"utf-8":return Ue(this,e,t);case"ascii":return Ct(this,e,t);case"latin1":case"binary":return Ft(this,e,t);case"base64":return jt(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return St(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}a.prototype._isBuffer=!0;function D(r,e,t){const i=r[e];r[e]=r[t],r[t]=i}a.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)D(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Ue(this,0,e):Q.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:a.compare(this,e)===0},a.prototype.inspect=function(){let e="";const t=o.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},f&&(a.prototype[f]=a.prototype.inspect),a.prototype.compare=function(e,t,i,l,u){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),l===void 0&&(l=0),u===void 0&&(u=this.length),t<0||i>e.length||l<0||u>this.length)throw new RangeError("out of range index");if(l>=u&&t>=i)return 0;if(l>=u)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,l>>>=0,u>>>=0,this===e)return 0;let p=u-l,b=i-t;const $=Math.min(p,b),F=this.slice(l,u),S=e.slice(t,i);for(let T=0;T<$;++T)if(F[T]!==S[T]){p=F[T],b=S[T];break}return p<b?-1:b<p?1:0};function Re(r,e,t,i,l){if(r.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ve(t)&&(t=l?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(l)return-1;t=r.length-1}else if(t<0)if(l)t=0;else return-1;if(typeof e=="string"&&(e=a.from(e,i)),a.isBuffer(e))return e.length===0?-1:Ne(r,e,t,i,l);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?l?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Ne(r,[e],t,i,l);throw new TypeError("val must be string, number or Buffer")}function Ne(r,e,t,i,l){let u=1,p=r.length,b=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return-1;u=2,p/=2,b/=2,t/=2}function $(S,T){return u===1?S[T]:S.readUInt16BE(T*u)}let F;if(l){let S=-1;for(F=t;F<p;F++)if($(r,F)===$(e,S===-1?0:F-S)){if(S===-1&&(S=F),F-S+1===b)return S*u}else S!==-1&&(F-=F-S),S=-1}else for(t+b>p&&(t=p-b),F=t;F>=0;F--){let S=!0;for(let T=0;T<b;T++)if($(r,F+T)!==$(e,T)){S=!1;break}if(S)return F}return-1}a.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},a.prototype.indexOf=function(e,t,i){return Re(this,e,t,i,!0)},a.prototype.lastIndexOf=function(e,t,i){return Re(this,e,t,i,!1)};function At(r,e,t,i){t=Number(t)||0;const l=r.length-t;i?(i=Number(i),i>l&&(i=l)):i=l;const u=e.length;i>u/2&&(i=u/2);let p;for(p=0;p<i;++p){const b=parseInt(e.substr(p*2,2),16);if(ve(b))return p;r[t+p]=b}return p}function vt(r,e,t,i){return fe(Ae(e,r.length-t),r,t,i)}function bt(r,e,t,i){return fe(Nt(e),r,t,i)}function Et(r,e,t,i){return fe(He(e),r,t,i)}function Bt(r,e,t,i){return fe(Ut(e,r.length-t),r,t,i)}a.prototype.write=function(e,t,i,l){if(t===void 0)l="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")l=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,l===void 0&&(l="utf8")):(l=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((i===void 0||i>u)&&(i=u),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let p=!1;for(;;)switch(l){case"hex":return At(this,e,t,i);case"utf8":case"utf-8":return vt(this,e,t,i);case"ascii":case"latin1":case"binary":return bt(this,e,t,i);case"base64":return Et(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,i);default:if(p)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jt(r,e,t){return e===0&&t===r.length?s.fromByteArray(r):s.fromByteArray(r.slice(e,t))}function Ue(r,e,t){t=Math.min(r.length,t);const i=[];let l=e;for(;l<t;){const u=r[l];let p=null,b=u>239?4:u>223?3:u>191?2:1;if(l+b<=t){let $,F,S,T;switch(b){case 1:u<128&&(p=u);break;case 2:$=r[l+1],($&192)===128&&(T=(u&31)<<6|$&63,T>127&&(p=T));break;case 3:$=r[l+1],F=r[l+2],($&192)===128&&(F&192)===128&&(T=(u&15)<<12|($&63)<<6|F&63,T>2047&&(T<55296||T>57343)&&(p=T));break;case 4:$=r[l+1],F=r[l+2],S=r[l+3],($&192)===128&&(F&192)===128&&(S&192)===128&&(T=(u&15)<<18|($&63)<<12|(F&63)<<6|S&63,T>65535&&T<1114112&&(p=T))}}p===null?(p=65533,b=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),l+=b}return Tt(i)}const ze=4096;function Tt(r){const e=r.length;if(e<=ze)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=ze));return t}function Ct(r,e,t){let i="";t=Math.min(r.length,t);for(let l=e;l<t;++l)i+=String.fromCharCode(r[l]&127);return i}function Ft(r,e,t){let i="";t=Math.min(r.length,t);for(let l=e;l<t;++l)i+=String.fromCharCode(r[l]);return i}function $t(r,e,t){const i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let l="";for(let u=e;u<t;++u)l+=zt[r[u]];return l}function St(r,e,t){const i=r.slice(e,t);let l="";for(let u=0;u<i.length-1;u+=2)l+=String.fromCharCode(i[u]+i[u+1]*256);return l}a.prototype.slice=function(e,t){const i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);const l=this.subarray(e,t);return Object.setPrototypeOf(l,a.prototype),l};function R(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||R(e,t,this.length);let l=this[e],u=1,p=0;for(;++p<t&&(u*=256);)l+=this[e+p]*u;return l},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||R(e,t,this.length);let l=this[e+--t],u=1;for(;t>0&&(u*=256);)l+=this[e+--t]*u;return l},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e=e>>>0,t||R(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&de(e,this.length-8);const l=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,u=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(l)+(BigInt(u)<<BigInt(32))}),a.prototype.readBigUInt64BE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&de(e,this.length-8);const l=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],u=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(l)<<BigInt(32))+BigInt(u)}),a.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||R(e,t,this.length);let l=this[e],u=1,p=0;for(;++p<t&&(u*=256);)l+=this[e+p]*u;return u*=128,l>=u&&(l-=Math.pow(2,8*t)),l},a.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||R(e,t,this.length);let l=t,u=1,p=this[e+--l];for(;l>0&&(u*=256);)p+=this[e+--l]*u;return u*=128,p>=u&&(p-=Math.pow(2,8*t)),p},a.prototype.readInt8=function(e,t){return e=e>>>0,t||R(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){e=e>>>0,t||R(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},a.prototype.readInt16BE=function(e,t){e=e>>>0,t||R(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},a.prototype.readInt32LE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&de(e,this.length-8);const l=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(l)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),a.prototype.readBigInt64BE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&de(e,this.length-8);const l=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(l)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),a.prototype.readFloatLE=function(e,t){return e=e>>>0,t||R(e,4,this.length),c.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e=e>>>0,t||R(e,4,this.length),c.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||R(e,8,this.length),c.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||R(e,8,this.length),c.read(this,e,!1,52,8)};function z(r,e,t,i,l,u){if(!a.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>l||e<u)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,i,l){if(e=+e,t=t>>>0,i=i>>>0,!l){const b=Math.pow(2,8*i)-1;z(this,e,t,i,b,0)}let u=1,p=0;for(this[t]=e&255;++p<i&&(u*=256);)this[t+p]=e/u&255;return t+i},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,i,l){if(e=+e,t=t>>>0,i=i>>>0,!l){const b=Math.pow(2,8*i)-1;z(this,e,t,i,b,0)}let u=i-1,p=1;for(this[t+u]=e&255;--u>=0&&(p*=256);)this[t+u]=e/p&255;return t+i},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,1,255,0),this[t]=e&255,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Oe(r,e,t,i,l){Ge(e,i,l,r,t,7);let u=Number(e&BigInt(4294967295));r[t++]=u,u=u>>8,r[t++]=u,u=u>>8,r[t++]=u,u=u>>8,r[t++]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,t}function De(r,e,t,i,l){Ge(e,i,l,r,t,7);let u=Number(e&BigInt(4294967295));r[t+7]=u,u=u>>8,r[t+6]=u,u=u>>8,r[t+5]=u,u=u>>8,r[t+4]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=p,p=p>>8,r[t+2]=p,p=p>>8,r[t+1]=p,p=p>>8,r[t]=p,t+8}a.prototype.writeBigUInt64LE=K(function(e,t=0){return Oe(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=K(function(e,t=0){return De(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,i,l){if(e=+e,t=t>>>0,!l){const $=Math.pow(2,8*i-1);z(this,e,t,i,$-1,-$)}let u=0,p=1,b=0;for(this[t]=e&255;++u<i&&(p*=256);)e<0&&b===0&&this[t+u-1]!==0&&(b=1),this[t+u]=(e/p>>0)-b&255;return t+i},a.prototype.writeIntBE=function(e,t,i,l){if(e=+e,t=t>>>0,!l){const $=Math.pow(2,8*i-1);z(this,e,t,i,$-1,-$)}let u=i-1,p=1,b=0;for(this[t+u]=e&255;--u>=0&&(p*=256);)e<0&&b===0&&this[t+u+1]!==0&&(b=1),this[t+u]=(e/p>>0)-b&255;return t+i},a.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},a.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},a.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},a.prototype.writeBigInt64LE=K(function(e,t=0){return Oe(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=K(function(e,t=0){return De(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qe(r,e,t,i,l,u){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Pe(r,e,t,i,l){return e=+e,t=t>>>0,l||qe(r,e,t,4),c.write(r,e,t,i,23,4),t+4}a.prototype.writeFloatLE=function(e,t,i){return Pe(this,e,t,!0,i)},a.prototype.writeFloatBE=function(e,t,i){return Pe(this,e,t,!1,i)};function Me(r,e,t,i,l){return e=+e,t=t>>>0,l||qe(r,e,t,8),c.write(r,e,t,i,52,8),t+8}a.prototype.writeDoubleLE=function(e,t,i){return Me(this,e,t,!0,i)},a.prototype.writeDoubleBE=function(e,t,i){return Me(this,e,t,!1,i)},a.prototype.copy=function(e,t,i,l){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!l&&l!==0&&(l=this.length),t>=e.length&&(t=e.length),t||(t=0),l>0&&l<i&&(l=i),l===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),e.length-t<l-i&&(l=e.length-t+i);const u=l-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,l):Uint8Array.prototype.set.call(e,this.subarray(i,l),t),u},a.prototype.fill=function(e,t,i,l){if(typeof e=="string"){if(typeof t=="string"?(l=t,t=0,i=this.length):typeof i=="string"&&(l=i,i=this.length),l!==void 0&&typeof l!="string")throw new TypeError("encoding must be a string");if(typeof l=="string"&&!a.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(e.length===1){const p=e.charCodeAt(0);(l==="utf8"&&p<128||l==="latin1")&&(e=p)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let u;if(typeof e=="number")for(u=t;u<i;++u)this[u]=e;else{const p=a.isBuffer(e)?e:a.from(e,l),b=p.length;if(b===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(u=0;u<i-t;++u)this[u+t]=p[u%b]}return this};const ee={};function Ie(r,e,t){ee[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Ie("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ie("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),Ie("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,l=t;return Number.isInteger(t)&&Math.abs(t)>2**32?l=We(String(t)):typeof t=="bigint"&&(l=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(l=We(l)),l+="n"),i+=` It must be ${e}. Received ${l}`,i},RangeError);function We(r){let e="",t=r.length;const i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function kt(r,e,t){te(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&de(e,r.length-(t+1))}function Ge(r,e,t,i,l,u){if(r>t||r<e){const p=typeof e=="bigint"?"n":"";let b;throw u>3?e===0||e===BigInt(0)?b=`>= 0${p} and < 2${p} ** ${(u+1)*8}${p}`:b=`>= -(2${p} ** ${(u+1)*8-1}${p}) and < 2 ** ${(u+1)*8-1}${p}`:b=`>= ${e}${p} and <= ${t}${p}`,new ee.ERR_OUT_OF_RANGE("value",b,r)}kt(i,l,u)}function te(r,e){if(typeof r!="number")throw new ee.ERR_INVALID_ARG_TYPE(e,"number",r)}function de(r,e,t){throw Math.floor(r)!==r?(te(r,t),new ee.ERR_OUT_OF_RANGE(t||"offset","an integer",r)):e<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,r)}const Lt=/[^+/0-9A-Za-z-_]/g;function Rt(r){if(r=r.split("=")[0],r=r.trim().replace(Lt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ae(r,e){e=e||1/0;let t;const i=r.length;let l=null;const u=[];for(let p=0;p<i;++p){if(t=r.charCodeAt(p),t>55295&&t<57344){if(!l){if(t>56319){(e-=3)>-1&&u.push(239,191,189);continue}else if(p+1===i){(e-=3)>-1&&u.push(239,191,189);continue}l=t;continue}if(t<56320){(e-=3)>-1&&u.push(239,191,189),l=t;continue}t=(l-55296<<10|t-56320)+65536}else l&&(e-=3)>-1&&u.push(239,191,189);if(l=null,t<128){if((e-=1)<0)break;u.push(t)}else if(t<2048){if((e-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function Nt(r){const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function Ut(r,e){let t,i,l;const u=[];for(let p=0;p<r.length&&!((e-=2)<0);++p)t=r.charCodeAt(p),i=t>>8,l=t%256,u.push(l),u.push(i);return u}function He(r){return s.toByteArray(Rt(r))}function fe(r,e,t,i){let l;for(l=0;l<i&&!(l+t>=e.length||l>=r.length);++l)e[l+t]=r[l];return l}function M(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function ve(r){return r!==r}const zt=function(){const r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let l=0;l<16;++l)e[i+l]=r[t]+r[l]}return e}();function K(r){return typeof BigInt>"u"?Ot:r}function Ot(){throw new Error("BigInt not supported")}})(pt);var yt={exports:{}},k=yt.exports={},W,G;function Te(){throw new Error("setTimeout has not been defined")}function Ce(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?W=setTimeout:W=Te}catch{W=Te}try{typeof clearTimeout=="function"?G=clearTimeout:G=Ce}catch{G=Ce}})();function mt(o){if(W===setTimeout)return setTimeout(o,0);if((W===Te||!W)&&setTimeout)return W=setTimeout,setTimeout(o,0);try{return W(o,0)}catch{try{return W.call(null,o,0)}catch{return W.call(this,o,0)}}}function Ti(o){if(G===clearTimeout)return clearTimeout(o);if((G===Ce||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(o);try{return G(o)}catch{try{return G.call(null,o)}catch{return G.call(this,o)}}}var Y=[],ue=!1,J,xe=-1;function Ci(){!ue||!J||(ue=!1,J.length?Y=J.concat(Y):xe=-1,Y.length&&xt())}function xt(){if(!ue){var o=mt(Ci);ue=!0;for(var s=Y.length;s;){for(J=Y,Y=[];++xe<s;)J&&J[xe].run();xe=-1,s=Y.length}J=null,ue=!1,Ti(o)}}k.nextTick=function(o){var s=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)s[c-1]=arguments[c];Y.push(new gt(o,s)),Y.length===1&&!ue&&mt(xt)};function gt(o,s){this.fun=o,this.array=s}gt.prototype.run=function(){this.fun.apply(null,this.array)};k.title="browser";k.browser=!0;k.env={};k.argv=[];k.version="";k.versions={};function V(){}k.on=V;k.addListener=V;k.once=V;k.off=V;k.removeListener=V;k.removeAllListeners=V;k.emit=V;k.prependListener=V;k.prependOnceListener=V;k.listeners=function(o){return[]};k.binding=function(o){throw new Error("process.binding is not supported")};k.cwd=function(){return"/"};k.chdir=function(o){throw new Error("process.chdir is not supported")};k.umask=function(){return 0};var Fi=yt.exports;(function(o){Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});const s=pt,c=Fi,f=h=>h&&h.__esModule?h:{default:h},y=f(c),m=globalThis||void 0||self;Object.defineProperty(o,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(o,"process",{enumerable:!0,get:()=>y.default}),o.global=m})(ht);let P;typeof window<"u"?P=window:typeof self<"u"?P=self:P=ht.global;let Fe=null,$e=null;const nt=20,Be=P.clearTimeout,st=P.setTimeout,je=P.cancelAnimationFrame||P.mozCancelAnimationFrame||P.webkitCancelAnimationFrame,ot=P.requestAnimationFrame||P.mozRequestAnimationFrame||P.webkitRequestAnimationFrame;je==null||ot==null?(Fe=Be,$e=function(s){return st(s,nt)}):(Fe=function([s,c]){je(s),Be(c)},$e=function(s){const c=ot(function(){Be(f),s()}),f=st(function(){je(c),s()},nt);return[c,f]});function $i(o){let s,c,f,y,m,h,a;const g=typeof document<"u"&&document.attachEvent;if(!g){h=function(j){const C=j.__resizeTriggers__,N=C.firstElementChild,Q=C.lastElementChild,D=N.firstElementChild;Q.scrollLeft=Q.scrollWidth,Q.scrollTop=Q.scrollHeight,D.style.width=N.offsetWidth+1+"px",D.style.height=N.offsetHeight+1+"px",N.scrollLeft=N.scrollWidth,N.scrollTop=N.scrollHeight},m=function(j){return j.offsetWidth!==j.__resizeLast__.width||j.offsetHeight!==j.__resizeLast__.height},a=function(j){if(j.target.className&&typeof j.target.className.indexOf=="function"&&j.target.className.indexOf("contract-trigger")<0&&j.target.className.indexOf("expand-trigger")<0)return;const C=this;h(this),this.__resizeRAF__&&Fe(this.__resizeRAF__),this.__resizeRAF__=$e(function(){m(C)&&(C.__resizeLast__.width=C.offsetWidth,C.__resizeLast__.height=C.offsetHeight,C.__resizeListeners__.forEach(function(D){D.call(C,j)}))})};let x=!1,w="";f="animationstart";const v="Webkit Moz O ms".split(" ");let B="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const j=document.createElement("fakeelement");if(j.style.animationName!==void 0&&(x=!0),x===!1){for(let C=0;C<v.length;C++)if(j.style[v[C]+"AnimationName"]!==void 0){L=v[C],w="-"+L.toLowerCase()+"-",f=B[C],x=!0;break}}}c="resizeanim",s="@"+w+"keyframes "+c+" { from { opacity: 0; } to { opacity: 0; } } ",y=w+"animation: 1ms "+c+"; "}const I=function(x){if(!x.getElementById("detectElementResize")){const w=(s||"")+".resize-triggers { "+(y||"")+'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%; }',v=x.head||x.getElementsByTagName("head")[0],B=x.createElement("style");B.id="detectElementResize",B.type="text/css",o!=null&&B.setAttribute("nonce",o),B.styleSheet?B.styleSheet.cssText=w:B.appendChild(x.createTextNode(w)),v.appendChild(B)}};return{addResizeListener:function(x,w){if(g)x.attachEvent("onresize",w);else{if(!x.__resizeTriggers__){const v=x.ownerDocument,B=P.getComputedStyle(x);B&&B.position==="static"&&(x.style.position="relative"),I(v),x.__resizeLast__={},x.__resizeListeners__=[],(x.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const L=v.createElement("div");L.className="expand-trigger",L.appendChild(v.createElement("div"));const j=v.createElement("div");j.className="contract-trigger",x.__resizeTriggers__.appendChild(L),x.__resizeTriggers__.appendChild(j),x.appendChild(x.__resizeTriggers__),h(x),x.addEventListener("scroll",a,!0),f&&(x.__resizeTriggers__.__animationListener__=function(N){N.animationName===c&&h(x)},x.__resizeTriggers__.addEventListener(f,x.__resizeTriggers__.__animationListener__))}x.__resizeListeners__.push(w)}},removeResizeListener:function(x,w){if(g)x.detachEvent("onresize",w);else if(x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(w),1),!x.__resizeListeners__.length){x.removeEventListener("scroll",a,!0),x.__resizeTriggers__.__animationListener__&&(x.__resizeTriggers__.removeEventListener(f,x.__resizeTriggers__.__animationListener__),x.__resizeTriggers__.__animationListener__=null);try{x.__resizeTriggers__=!x.removeChild(x.__resizeTriggers__)}catch{}}}}}class wt extends A.Component{constructor(...s){super(...s),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:c,disableWidth:f,onResize:y}=this.props;if(this._parentNode){var m,h,a,g;const I=window.getComputedStyle(this._parentNode)||{},_=parseFloat((m=I.paddingLeft)!==null&&m!==void 0?m:"0"),E=parseFloat((h=I.paddingRight)!==null&&h!==void 0?h:"0"),x=parseFloat((a=I.paddingTop)!==null&&a!==void 0?a:"0"),w=parseFloat((g=I.paddingBottom)!==null&&g!==void 0?g:"0"),v=this._parentNode.getBoundingClientRect(),B=v.height-x-w,L=v.width-_-E,j=this._parentNode.offsetHeight-x-w,C=this._parentNode.offsetWidth-_-E;(!c&&(this.state.height!==j||this.state.scaledHeight!==B)||!f&&(this.state.width!==C||this.state.scaledWidth!==L))&&(this.setState({height:j,width:C,scaledHeight:B,scaledWidth:L}),typeof y=="function"&&y({height:j,scaledHeight:B,scaledWidth:L,width:C}))}},this._setRef=c=>{this._autoSizer=c}}componentDidMount(){const{nonce:s}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=$i(s),this._detectElementResize.addResizeListener(this._parentNode,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.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:s,defaultHeight:c,defaultWidth:f,disableHeight:y=!1,disableWidth:m=!1,nonce:h,onResize:a,style:g={},tagName:I="div",..._}=this.props,{height:E,scaledHeight:x,scaledWidth:w,width:v}=this.state,B={overflow:"visible"},L={};let j=!1;return y||(E===0&&(j=!0),B.height=0,L.height=E,L.scaledHeight=x),m||(v===0&&(j=!0),B.width=0,L.width=v,L.scaledWidth=w),A.createElement(I,{ref:this._setRef,style:{...B,...g},..._},!j&&s(L))}}const Si=d.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),ki=d.styled_default("div")({name:"Content",class:"cjyzpp7",propsAsIs:!1}),Li=d.styled_default("div")({name:"Graphic",class:"g16mldgz",propsAsIs:!1}),Ri=d.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Ni=d.styled_default("div")({name:"StepsContainer",class:"smm7qmo",propsAsIs:!1}),Ui=d.styled_default("span")({name:"StepIndicator",class:"s17knuw2",propsAsIs:!1}),zi=({width:o,graphicSrc:s,headline:c,stepsCount:f,currentStep:y})=>n.jsxs(Si,{children:[n.jsxs(ki,{children:[n.jsx(Li,{"data-centered":y===0,children:n.jsx("img",{src:s,alt:c,width:o||300})}),c&&n.jsx(Ri,{children:c})]}),n.jsx(Ni,{children:Array.from({length:f}).map((m,h)=>n.jsx(Ui,{"data-active":y===h},h))})]}),Oi=d.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),Di=d.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),qi=()=>d.n1,Pi=d.styled_default(qi())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),Mi=d.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),Wi=d.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),Gi=d.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),Hi=d.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Qi=d.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Yi=d.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),Vi=d.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Ki=()=>d.n1,Xi=d.styled_default(Ki())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),Ji=d.styled_default("div")({name:"SocialLinksContainer",class:"s1n7kzeh",propsAsIs:!1}),Zi=d.styled_default("a")({name:"SocialLink",class:"s2m9o9y",propsAsIs:!1}),en=d.styled_default("span")({name:"SocialLinkLabel",class:"sewjbbn",propsAsIs:!1}),_t=({inviteLink:o,socialLinks:s,inviteCardTitle:c,inviteCardSubtext:f,primaryColor:y,className:m})=>n.jsxs(Oi,{className:m,children:[n.jsx(Di,{style:{backgroundColor:y},children:n.jsx(Pi,{name:"invite-game-icon"})}),n.jsxs(Mi,{children:[n.jsx(Wi,{children:c||""}),n.jsx(Gi,{children:f||""})]}),o&&n.jsxs(Hi,{onClick:async()=>{if(o)try{await navigator.clipboard.writeText(o)}catch(h){console.error("Unable to copy to clipboard",h)}},children:[n.jsxs(Qi,{children:[n.jsx(Yi,{children:"Invite link"}),n.jsx(Vi,{children:o})]}),n.jsx(Xi,{name:"icon-copy"})]}),s&&s.length>0&&n.jsx(Ji,{children:s.map(({icon:h,link:a,label:g})=>n.jsxs(Zi,{href:a,target:"_blank",children:[n.jsx(d.n1,{name:h}),n.jsx(en,{children:g})]},a))})]}),tn=d.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),rn=d.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),nn=d.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),sn=d.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),on=d.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),an=d.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),ln=d.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),cn=d.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),un=({rules:o,rulesTitle:s,primaryColor:c})=>n.jsxs(tn,{children:[n.jsxs(rn,{children:[n.jsx(nn,{children:s}),n.jsx(sn,{children:o==null?void 0:o.map(({label:f,icon:y},m)=>n.jsxs(on,{children:[y&&n.jsx(an,{style:{backgroundColor:c},children:n.jsx(d.n1,{name:y,"data-icon":y})}),n.jsx(ln,{children:f})]},m))})]}),n.jsx(cn,{children:"See Terms and Conditions"})]}),dn=d.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),hn=d.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),pn=({disabled:o,variant:s="primary",onClick:c,children:f,...y})=>n.jsx(dn,{onClick:c,disabled:o,"data-variant":s,...y,children:n.jsx(hn,{children:f})}),fn=d.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),yn=d.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),mn=d.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),xn=d.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),gn=()=>d.n1,wn=d.styled_default(gn())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),_n=d.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),In=()=>pn,An=d.styled_default(In())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),ae={steps:!1,rules:!1,inviteCard:!1},vn=({gamification:o,steps:s,rules:c,rulesBtnLabel:f,rulesTitle:y,primaryColor:m,inviteLink:h,socialLinks:a,inviteCardTitle:g,inviteCardSubtext:I,inviteCardBtnLabel:_,onClose:E})=>{const[x,w]=A.useState(0),[v,B]=A.useState(ae);A.useEffect(()=>{s!=null&&s.length?B({...ae,steps:!0}):c!=null&&c.length?B({...ae,rules:!0}):B({...ae,inviteCard:!0})},[]);const L=A.useMemo(()=>v.steps&&x===0?"Continue":v.rules?f||"Got it":v.inviteCard?_||"Play Now":"Next",[v,x,f,_]),j=A.useCallback(()=>{s!=null&&s.length&&x<s.length-1?w(N=>++N):c!=null&&c.length&&v.steps?B({...ae,rules:!0}):v.rules&&B({...ae,inviteCard:!0})},[x,s==null?void 0:s.length,c==null?void 0:c.length,v,w,B]),C=async()=>{await o.onboardingStatus.submitInplay()};return n.jsx(wt,{children:({width:N,height:Q})=>n.jsxs(fn,{style:{width:N,height:Q},children:[n.jsx(mn,{children:n.jsx(xn,{onClick:E,children:n.jsx(wn,{name:"icon-close-btn-gray"})})}),n.jsxs(yn,{children:[v.steps&&(s==null?void 0:s.length)&&n.jsx(zi,{stepsCount:s.length,currentStep:x,...s[x]}),v.rules&&n.jsx(un,{rules:c,rulesTitle:y,primaryColor:m}),v.inviteCard&&n.jsx(_t,{inviteLink:h,inviteCardTitle:g,inviteCardSubtext:I,primaryColor:m,socialLinks:a})]}),n.jsx(_n,{children:n.jsx(An,{onClick:v.inviteCard?C:j,children:L})})]})})},bn=d.styled_default("div")({name:"Container",class:"cocfo2g",propsAsIs:!1}),En=d.styled_default("div")({name:"CloseIconWrap",class:"c1pdhxdk",propsAsIs:!1}),Bn=()=>d.n1,jn=d.styled_default(Bn())({name:"CloseIcon",class:"c1funj3r",propsAsIs:!0}),Tn=d.styled_default("div")({name:"Title",class:"t1okg06y",propsAsIs:!1}),Cn=d.styled_default("img")({name:"SponsorLogo",class:"sb1n923",propsAsIs:!1}),Fn=d.styled_default("div")({name:"PresentsTitle",class:"p1stllxd",propsAsIs:!1}),$n=d.styled_default("div")({name:"Subtitle",class:"s13kvdzw",propsAsIs:!1}),Sn=d.styled_default("div")({name:"Description",class:"dfvmv3t",propsAsIs:!1}),kn=d.styled_default("button")({name:"ActionButton",class:"ay8e3j9",propsAsIs:!1}),at=({close:o,action:s,onboarding:c})=>{var f,y,m,h,a,g,I,_;return n.jsxs(bn,{children:[n.jsx(En,{onClick:o,children:n.jsx(jn,{name:"icon-cross"})}),((y=(f=c==null?void 0:c.titleCard)==null?void 0:f.media)==null?void 0:y.sponsorLogo)&&n.jsxs(Tn,{children:[n.jsx(Cn,{alt:"sponsor-logo",src:(h=(m=c==null?void 0:c.titleCard)==null?void 0:m.media)==null?void 0:h.sponsorLogo}),n.jsx(Fn,{children:"PRESENTS"})]}),((a=c==null?void 0:c.titleCard)==null?void 0:a.title)&&n.jsx($n,{children:(g=c==null?void 0:c.titleCard)==null?void 0:g.title}),((I=c==null?void 0:c.titleCard)==null?void 0:I.subtitle)&&n.jsx(Sn,{children:(_=c==null?void 0:c.titleCard)==null?void 0:_.subtitle}),n.jsx(kn,{onClick:s,children:"Play Now"})]})},Ln=d.styled_default("div")({name:"OnboardingContainer",class:"o9squag",propsAsIs:!1}),Rn=()=>we,Nn=d.styled_default(Rn())({name:"OnboardingNotificationContainer",class:"o1c8wcli",propsAsIs:!0}),lt=d.styled_default("div")({name:"InnerContainer",class:"i18oyadd",propsAsIs:!1}),Un="cebdc0u",zn=({deepLink:o,onboardingOpts:s,notification:c,gamification:f})=>{var y,m,h,a,g,I;const[_,E]=A.useState(void 0);return A.useEffect(()=>{const x=o.$store.subscribe(w=>{w&&E(w.data)});return()=>{x()}},[o.$store]),n.jsx(Ln,{className:d.cx_default(c.hiding&&Un),children:n.jsx(vn,{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:(y=s.rules)==null?void 0:y.buttonLabel,rulesTitle:(m=s.rules)==null?void 0:m.heading,steps:[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_1.png",headline:"Welcome to the Featured Groups +",width:80},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_2.png",headline:"Get real-time insights",width:264},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_3.png",headline:"Predictions, trivia & polls synced to match play"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_4.png",headline:"Win points for every answer you get right"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",headline:"Compete against friends on the leaderboard"}],primaryColor:(h=s.inviteCard)==null?void 0:h.iconColor,inviteLink:_==null?void 0:_.url,inviteCardTitle:(a=s.inviteCard)==null?void 0:a.heading,inviteCardSubtext:(g=s.inviteCard)==null?void 0:g.subtext,inviteCardBtnLabel:(I=s.inviteCard)==null?void 0:I.buttonLabel,onClose:()=>{var x;(x=c.close)==null||x.call(c)},socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],gamification:f})})},On=({sdk:o,notification:s,saveHeight:c,style:f})=>{const y=A.useRef(null),[m,h]=A.useState(!1),a=o.getFeature(U.FeatureType.GAMES),g=s.data.onboarding;return A.useLayoutEffect(()=>{var I;c(((I=y.current)==null?void 0:I.getBoundingClientRect().height)||0)},[c]),m&&a&&g?n.jsx(zn,{notification:s,setOpened:h,gamification:a,onboardingOpts:g,deepLink:a.deepLink}):n.jsxs(n.Fragment,{children:[n.jsx(lt,{ref:I=>{y.current=I},style:{position:"absolute",visibility:"hidden"},children:n.jsx(at,{close:()=>{},action:()=>{},onboarding:g})}),n.jsx(Nn,{style:f,hiding:s.hiding,children:n.jsx(lt,{children:n.jsx(at,{close:s.close,action:()=>h(!0),onboarding:g})})})]})},Dn=()=>we,qn=d.styled_default(Dn())({name:"Container",class:"ctckejh",propsAsIs:!0}),ct=d.styled_default("div")({name:"InnerContainer",class:"i1ri7tzr",propsAsIs:!1}),Pn=o=>{const[s,c]=A.useState(0),f=A.useRef(null),y=A.useCallback(h=>{f.current=h},[]);A.useEffect(()=>{var h;const a=(h=f.current)==null?void 0:h.getBoundingClientRect();a&&c(a.height)},[o]);const m=A.useCallback(h=>{c(h)},[]);return[y,s,m]},Mn=({sdk:o,notification:s})=>{var c,f;const[y,m,h]=Pn(s.id);return s.type===me.NotificationType.QUESTION?n.jsxs(n.Fragment,{children:[n.jsx(ct,{ref:y,style:{position:"absolute",visibility:"hidden"},children:n.jsx(Qe,{...s})}),n.jsx(qn,{style:{height:s.hiding?0:m},hiding:s.hiding,children:n.jsx(ct,{style:{height:"100%"},children:n.jsx(Qe,{...s})})})]}):s.type===me.NotificationType.QUESTION_RESOLVED&&(f=(c=s.data)==null?void 0:c.question)!=null&&f.predictionResult?n.jsx(wi,{style:{height:s.hiding?0:m},saveHeight:h,close:s.close,hiding:s.hiding,...s.data.question}):s.type===me.NotificationType.ONBOARDING?n.jsx(On,{style:{height:s.hiding?0:m},saveHeight:h,sdk:o,notification:s}):null},Wn=({sdk:o})=>{const[s]=A.useState(o.getNotificationsStore()),c=Z.useStore(s),f=A.useMemo(()=>{if(!(c!=null&&c.size))return null;for(const y of c.values())if(y.type===me.NotificationType.ONBOARDING)return y;return c.values().next().value},[c]);return f?n.jsx(Mn,{sdk:o,notification:f}):null},Gn=d.styled_default("div")({name:"SDKContainer",class:"stu11h7",propsAsIs:!1}),Se=d.styled_default("div")({name:"SDKScrollContainer",class:"s1ucohr1",propsAsIs:!1}),It=d.styled_default("div")({name:"SDKContentContainer",class:"s1el4wvm",propsAsIs:!1}),Hn=()=>It,Qn=d.styled_default(Hn())({name:"SDKWhiteContainer",class:"s1oe3036",propsAsIs:!0}),Yn=o=>{const s=A.useRef(""),[c,f]=A.useState(!1),y=Z.useStore(o.status),m=Z.useStore(o.userId()),h=y==="ready",[a,g]=A.useState(X),I=A.useCallback((x,w)=>{g(w),w===X?(x&&o.createEventSession(x),window.requestAnimationFrame(()=>{o.openFeature(U.FeatureType.GAMES)})):o.closeFeature()},[o]);A.useEffect(()=>{!h&&a===X&&(g(ce),o.closeFeature())},[h,a,o]);const _=x=>{s.current=x,f(!0),o.initializeApp().then(({enabled:w,err:v})=>{if(v){I(x,ce);return}if(w){o.isUserAuthorized().then(B=>{if(B){I(x,X);return}else o.disableApp()});return}})},E=()=>{f(!1),o.disableApp()};return A.useEffect(()=>{if(!m){h&&(g(ce),o.disableApp());return}m&&s.current&&c&&o.initializeApp().then(()=>{o.createEventSession(s.current)})},[m]),{sdkEnabled:c,sdkReady:h,activeOverlay:a,activateAndLoadOverlay:I,activateEventWithId:_,deactivate:E,isLogged:!!m}},Vn=o=>{const s=Z.useStore(o.getActiveFeature()),c=Z.useStore(o.streamStore()),[f,y]=A.useState(null);return A.useEffect(()=>{const m=o.getFeatures();if(s)for(const[h,a]of m)h===s?a.status.get()===he.FeatureStatus.Suspended&&(a.enable(),y(a)):a.status.get()===he.FeatureStatus.Ready&&a.disable();else{for(const[,h]of m)h.status.get()===he.FeatureStatus.Ready&&h.disable();y(null)}return()=>{for(const[,h]of m)h.status.get()===he.FeatureStatus.Ready&&h.disable()}},[s,o,c]),[s,f]},Kn=({sdk:o,className:s})=>{const[,c]=Vn(o);return n.jsx(Pt,{className:s,feature:c,sdk:o})},Xn=({sdk:o,overlays:s,children:c})=>{const{sdkEnabled:f,sdkReady:y,activeOverlay:m,activateAndLoadOverlay:h,activateEventWithId:a,deactivate:g,isLogged:I}=Yn(o);return A.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),n.jsxs(Gn,{children:[f&&n.jsx(sr,{sdkReady:y,activeOverlay:m,className:le.d,setActiveOverlay:_=>h("",_)}),y&&n.jsx(Wn,{sdk:o}),n.jsx(Se,{"data-nav":f.toString(),style:{display:!f||m===ce?"block":"none"},children:c&&c({activateEventWithId:a,deactivate:g})}),n.jsx(Se,{"data-nav":f.toString(),style:{display:m===ge?"block":"none"},children:s&&m===ge&&s[m]}),y&&m===X&&n.jsx(Kn,{className:le.d,sdk:o}),!I&&n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})};const Jn=({sdkKey:o,plugins:s,children:c,production:f=!0})=>n.jsx(le.StreamLayerProvider,{sdkKey:o,plugins:s,production:f,autoEnable:!1,children:c}),Zn=({children:o,overlays:s})=>{const{sdk:c,status:f}=A.useContext(le.StreamLayerContext);if(f===le.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return c?n.jsx("div",{className:"StreamLayerSDK",children:n.jsx(le.s,{style:{height:"100%"},children:n.jsx(Xn,{sdk:c,overlays:s,children:o})})}):o({})};exports.AutoSizer=wt;exports.MastersStreamLayerProvider=Jn;exports.MastersStreamLayerSDKReact=Zn;exports.O=_t;exports.a=Qn;exports.f=we;exports.n=It;exports.o=ut;exports.r=Se;exports.w=dt;
|
|
6
|
+
*/(function(o){const s=_e,c=Le,f=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;o.Buffer=a,o.SlowBuffer=C,o.INSPECT_MAX_BYTES=50;const y=2147483647;o.kMaxLength=y,a.TYPED_ARRAY_SUPPORT=m(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{const i=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(i,e),i.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function h(i){if(i>y)throw new RangeError('The value "'+i+'" is invalid for option "size"');const e=new Uint8Array(i);return Object.setPrototypeOf(e,a.prototype),e}function a(i,e,t){if(typeof i=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(i)}return g(i,e,t)}a.poolSize=8192;function g(i,e,t){if(typeof i=="string")return x(i,e);if(ArrayBuffer.isView(i))return v(i);if(i==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i);if(M(i,ArrayBuffer)||i&&M(i.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(i,SharedArrayBuffer)||i&&M(i.buffer,SharedArrayBuffer)))return B(i,e,t);if(typeof i=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const r=i.valueOf&&i.valueOf();if(r!=null&&r!==i)return a.from(r,e,t);const l=L(i);if(l)return l;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof i[Symbol.toPrimitive]=="function")return a.from(i[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof i)}a.from=function(i,e,t){return g(i,e,t)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function I(i){if(typeof i!="number")throw new TypeError('"size" argument must be of type number');if(i<0)throw new RangeError('The value "'+i+'" is invalid for option "size"')}function _(i,e,t){return I(i),i<=0?h(i):e!==void 0?typeof t=="string"?h(i).fill(e,t):h(i).fill(e):h(i)}a.alloc=function(i,e,t){return _(i,e,t)};function E(i){return I(i),h(i<0?0:j(i)|0)}a.allocUnsafe=function(i){return E(i)},a.allocUnsafeSlow=function(i){return E(i)};function x(i,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=N(i,e)|0;let r=h(t);const l=r.write(i,e);return l!==t&&(r=r.slice(0,l)),r}function w(i){const e=i.length<0?0:j(i.length)|0,t=h(e);for(let r=0;r<e;r+=1)t[r]=i[r]&255;return t}function v(i){if(M(i,Uint8Array)){const e=new Uint8Array(i);return B(e.buffer,e.byteOffset,e.byteLength)}return w(i)}function B(i,e,t){if(e<0||i.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(i.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let r;return e===void 0&&t===void 0?r=new Uint8Array(i):t===void 0?r=new Uint8Array(i,e):r=new Uint8Array(i,e,t),Object.setPrototypeOf(r,a.prototype),r}function L(i){if(a.isBuffer(i)){const e=j(i.length)|0,t=h(e);return t.length===0||i.copy(t,0,0,e),t}if(i.length!==void 0)return typeof i.length!="number"||ve(i.length)?h(0):w(i);if(i.type==="Buffer"&&Array.isArray(i.data))return w(i.data)}function j(i){if(i>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return i|0}function C(i){return+i!=i&&(i=0),a.alloc(+i)}a.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==a.prototype},a.compare=function(e,t){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,l=t.length;for(let u=0,p=Math.min(r,l);u<p;++u)if(e[u]!==t[u]){r=e[u],l=t[u];break}return r<l?-1:l<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return a.alloc(0);let r;if(t===void 0)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const l=a.allocUnsafe(t);let u=0;for(r=0;r<e.length;++r){let p=e[r];if(M(p,Uint8Array))u+p.length>l.length?(a.isBuffer(p)||(p=a.from(p)),p.copy(l,u)):Uint8Array.prototype.set.call(l,p,u);else if(a.isBuffer(p))p.copy(l,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=p.length}return l};function N(i,e){if(a.isBuffer(i))return i.length;if(ArrayBuffer.isView(i)||M(i,ArrayBuffer))return i.byteLength;if(typeof i!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof i);const t=i.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&t===0)return 0;let l=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ae(i).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return He(i).length;default:if(l)return r?-1:Ae(i).length;e=(""+e).toLowerCase(),l=!0}}a.byteLength=N;function Q(i,e,t){let r=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(i||(i="utf8");;)switch(i){case"hex":return $t(this,e,t);case"utf8":case"utf-8":return Ue(this,e,t);case"ascii":return Ct(this,e,t);case"latin1":case"binary":return Ft(this,e,t);case"base64":return jt(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return St(this,e,t);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(i+"").toLowerCase(),r=!0}}a.prototype._isBuffer=!0;function D(i,e,t){const r=i[e];i[e]=i[t],i[t]=r}a.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)D(this,t,t+1);return this},a.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},a.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this},a.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Ue(this,0,e):Q.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:a.compare(this,e)===0},a.prototype.inspect=function(){let e="";const t=o.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},f&&(a.prototype[f]=a.prototype.inspect),a.prototype.compare=function(e,t,r,l,u){if(M(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),l===void 0&&(l=0),u===void 0&&(u=this.length),t<0||r>e.length||l<0||u>this.length)throw new RangeError("out of range index");if(l>=u&&t>=r)return 0;if(l>=u)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,l>>>=0,u>>>=0,this===e)return 0;let p=u-l,b=r-t;const $=Math.min(p,b),F=this.slice(l,u),S=e.slice(t,r);for(let T=0;T<$;++T)if(F[T]!==S[T]){p=F[T],b=S[T];break}return p<b?-1:b<p?1:0};function Re(i,e,t,r,l){if(i.length===0)return-1;if(typeof t=="string"?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,ve(t)&&(t=l?0:i.length-1),t<0&&(t=i.length+t),t>=i.length){if(l)return-1;t=i.length-1}else if(t<0)if(l)t=0;else return-1;if(typeof e=="string"&&(e=a.from(e,r)),a.isBuffer(e))return e.length===0?-1:Ne(i,e,t,r,l);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?l?Uint8Array.prototype.indexOf.call(i,e,t):Uint8Array.prototype.lastIndexOf.call(i,e,t):Ne(i,[e],t,r,l);throw new TypeError("val must be string, number or Buffer")}function Ne(i,e,t,r,l){let u=1,p=i.length,b=e.length;if(r!==void 0&&(r=String(r).toLowerCase(),r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le")){if(i.length<2||e.length<2)return-1;u=2,p/=2,b/=2,t/=2}function $(S,T){return u===1?S[T]:S.readUInt16BE(T*u)}let F;if(l){let S=-1;for(F=t;F<p;F++)if($(i,F)===$(e,S===-1?0:F-S)){if(S===-1&&(S=F),F-S+1===b)return S*u}else S!==-1&&(F-=F-S),S=-1}else for(t+b>p&&(t=p-b),F=t;F>=0;F--){let S=!0;for(let T=0;T<b;T++)if($(i,F+T)!==$(e,T)){S=!1;break}if(S)return F}return-1}a.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},a.prototype.indexOf=function(e,t,r){return Re(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return Re(this,e,t,r,!1)};function At(i,e,t,r){t=Number(t)||0;const l=i.length-t;r?(r=Number(r),r>l&&(r=l)):r=l;const u=e.length;r>u/2&&(r=u/2);let p;for(p=0;p<r;++p){const b=parseInt(e.substr(p*2,2),16);if(ve(b))return p;i[t+p]=b}return p}function vt(i,e,t,r){return fe(Ae(e,i.length-t),i,t,r)}function bt(i,e,t,r){return fe(Nt(e),i,t,r)}function Et(i,e,t,r){return fe(He(e),i,t,r)}function Bt(i,e,t,r){return fe(Ut(e,i.length-t),i,t,r)}a.prototype.write=function(e,t,r,l){if(t===void 0)l="utf8",r=this.length,t=0;else if(r===void 0&&typeof t=="string")l=t,r=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(r)?(r=r>>>0,l===void 0&&(l="utf8")):(l=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((r===void 0||r>u)&&(r=u),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");l||(l="utf8");let p=!1;for(;;)switch(l){case"hex":return At(this,e,t,r);case"utf8":case"utf-8":return vt(this,e,t,r);case"ascii":case"latin1":case"binary":return bt(this,e,t,r);case"base64":return Et(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Bt(this,e,t,r);default:if(p)throw new TypeError("Unknown encoding: "+l);l=(""+l).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function jt(i,e,t){return e===0&&t===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(e,t))}function Ue(i,e,t){t=Math.min(i.length,t);const r=[];let l=e;for(;l<t;){const u=i[l];let p=null,b=u>239?4:u>223?3:u>191?2:1;if(l+b<=t){let $,F,S,T;switch(b){case 1:u<128&&(p=u);break;case 2:$=i[l+1],($&192)===128&&(T=(u&31)<<6|$&63,T>127&&(p=T));break;case 3:$=i[l+1],F=i[l+2],($&192)===128&&(F&192)===128&&(T=(u&15)<<12|($&63)<<6|F&63,T>2047&&(T<55296||T>57343)&&(p=T));break;case 4:$=i[l+1],F=i[l+2],S=i[l+3],($&192)===128&&(F&192)===128&&(S&192)===128&&(T=(u&15)<<18|($&63)<<12|(F&63)<<6|S&63,T>65535&&T<1114112&&(p=T))}}p===null?(p=65533,b=1):p>65535&&(p-=65536,r.push(p>>>10&1023|55296),p=56320|p&1023),r.push(p),l+=b}return Tt(r)}const ze=4096;function Tt(i){const e=i.length;if(e<=ze)return String.fromCharCode.apply(String,i);let t="",r=0;for(;r<e;)t+=String.fromCharCode.apply(String,i.slice(r,r+=ze));return t}function Ct(i,e,t){let r="";t=Math.min(i.length,t);for(let l=e;l<t;++l)r+=String.fromCharCode(i[l]&127);return r}function Ft(i,e,t){let r="";t=Math.min(i.length,t);for(let l=e;l<t;++l)r+=String.fromCharCode(i[l]);return r}function $t(i,e,t){const r=i.length;(!e||e<0)&&(e=0),(!t||t<0||t>r)&&(t=r);let l="";for(let u=e;u<t;++u)l+=zt[i[u]];return l}function St(i,e,t){const r=i.slice(e,t);let l="";for(let u=0;u<r.length-1;u+=2)l+=String.fromCharCode(r[u]+r[u+1]*256);return l}a.prototype.slice=function(e,t){const r=this.length;e=~~e,t=t===void 0?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e);const l=this.subarray(e,t);return Object.setPrototypeOf(l,a.prototype),l};function R(i,e,t){if(i%1!==0||i<0)throw new RangeError("offset is not uint");if(i+e>t)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||R(e,t,this.length);let l=this[e],u=1,p=0;for(;++p<t&&(u*=256);)l+=this[e+p]*u;return l},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||R(e,t,this.length);let l=this[e+--t],u=1;for(;t>0&&(u*=256);)l+=this[e+--t]*u;return l},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e=e>>>0,t||R(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],r=this[e+7];(t===void 0||r===void 0)&&de(e,this.length-8);const l=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,u=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(l)+(BigInt(u)<<BigInt(32))}),a.prototype.readBigUInt64BE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],r=this[e+7];(t===void 0||r===void 0)&&de(e,this.length-8);const l=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],u=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(l)<<BigInt(32))+BigInt(u)}),a.prototype.readIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||R(e,t,this.length);let l=this[e],u=1,p=0;for(;++p<t&&(u*=256);)l+=this[e+p]*u;return u*=128,l>=u&&(l-=Math.pow(2,8*t)),l},a.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||R(e,t,this.length);let l=t,u=1,p=this[e+--l];for(;l>0&&(u*=256);)p+=this[e+--l]*u;return u*=128,p>=u&&(p-=Math.pow(2,8*t)),p},a.prototype.readInt8=function(e,t){return e=e>>>0,t||R(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){e=e>>>0,t||R(e,2,this.length);const r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r},a.prototype.readInt16BE=function(e,t){e=e>>>0,t||R(e,2,this.length);const r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r},a.prototype.readInt32LE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e=e>>>0,t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],r=this[e+7];(t===void 0||r===void 0)&&de(e,this.length-8);const l=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(l)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),a.prototype.readBigInt64BE=K(function(e){e=e>>>0,te(e,"offset");const t=this[e],r=this[e+7];(t===void 0||r===void 0)&&de(e,this.length-8);const l=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(l)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r)}),a.prototype.readFloatLE=function(e,t){return e=e>>>0,t||R(e,4,this.length),c.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e=e>>>0,t||R(e,4,this.length),c.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||R(e,8,this.length),c.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||R(e,8,this.length),c.read(this,e,!1,52,8)};function z(i,e,t,r,l,u){if(!a.isBuffer(i))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>l||e<u)throw new RangeError('"value" argument is out of bounds');if(t+r>i.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,l){if(e=+e,t=t>>>0,r=r>>>0,!l){const b=Math.pow(2,8*r)-1;z(this,e,t,r,b,0)}let u=1,p=0;for(this[t]=e&255;++p<r&&(u*=256);)this[t+p]=e/u&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,l){if(e=+e,t=t>>>0,r=r>>>0,!l){const b=Math.pow(2,8*r)-1;z(this,e,t,r,b,0)}let u=r-1,p=1;for(this[t+u]=e&255;--u>=0&&(p*=256);)this[t+u]=e/p&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,1,255,0),this[t]=e&255,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Oe(i,e,t,r,l){Ge(e,r,l,i,t,7);let u=Number(e&BigInt(4294967295));i[t++]=u,u=u>>8,i[t++]=u,u=u>>8,i[t++]=u,u=u>>8,i[t++]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return i[t++]=p,p=p>>8,i[t++]=p,p=p>>8,i[t++]=p,p=p>>8,i[t++]=p,t}function De(i,e,t,r,l){Ge(e,r,l,i,t,7);let u=Number(e&BigInt(4294967295));i[t+7]=u,u=u>>8,i[t+6]=u,u=u>>8,i[t+5]=u,u=u>>8,i[t+4]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return i[t+3]=p,p=p>>8,i[t+2]=p,p=p>>8,i[t+1]=p,p=p>>8,i[t]=p,t+8}a.prototype.writeBigUInt64LE=K(function(e,t=0){return Oe(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=K(function(e,t=0){return De(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,l){if(e=+e,t=t>>>0,!l){const $=Math.pow(2,8*r-1);z(this,e,t,r,$-1,-$)}let u=0,p=1,b=0;for(this[t]=e&255;++u<r&&(p*=256);)e<0&&b===0&&this[t+u-1]!==0&&(b=1),this[t+u]=(e/p>>0)-b&255;return t+r},a.prototype.writeIntBE=function(e,t,r,l){if(e=+e,t=t>>>0,!l){const $=Math.pow(2,8*r-1);z(this,e,t,r,$-1,-$)}let u=r-1,p=1,b=0;for(this[t+u]=e&255;--u>=0&&(p*=256);)e<0&&b===0&&this[t+u+1]!==0&&(b=1),this[t+u]=(e/p>>0)-b&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},a.prototype.writeBigInt64LE=K(function(e,t=0){return Oe(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=K(function(e,t=0){return De(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qe(i,e,t,r,l,u){if(t+r>i.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Pe(i,e,t,r,l){return e=+e,t=t>>>0,l||qe(i,e,t,4),c.write(i,e,t,r,23,4),t+4}a.prototype.writeFloatLE=function(e,t,r){return Pe(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return Pe(this,e,t,!1,r)};function Me(i,e,t,r,l){return e=+e,t=t>>>0,l||qe(i,e,t,8),c.write(i,e,t,r,52,8),t+8}a.prototype.writeDoubleLE=function(e,t,r){return Me(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return Me(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,l){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!l&&l!==0&&(l=this.length),t>=e.length&&(t=e.length),t||(t=0),l>0&&l<r&&(l=r),l===r||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(l<0)throw new RangeError("sourceEnd out of bounds");l>this.length&&(l=this.length),e.length-t<l-r&&(l=e.length-t+r);const u=l-r;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,r,l):Uint8Array.prototype.set.call(e,this.subarray(r,l),t),u},a.prototype.fill=function(e,t,r,l){if(typeof e=="string"){if(typeof t=="string"?(l=t,t=0,r=this.length):typeof r=="string"&&(l=r,r=this.length),l!==void 0&&typeof l!="string")throw new TypeError("encoding must be a string");if(typeof l=="string"&&!a.isEncoding(l))throw new TypeError("Unknown encoding: "+l);if(e.length===1){const p=e.charCodeAt(0);(l==="utf8"&&p<128||l==="latin1")&&(e=p)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t=t>>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let u;if(typeof e=="number")for(u=t;u<r;++u)this[u]=e;else{const p=a.isBuffer(e)?e:a.from(e,l),b=p.length;if(b===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(u=0;u<r-t;++u)this[u+t]=p[u%b]}return this};const ee={};function Ie(i,e,t){ee[i]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${i}]`,this.stack,delete this.name}get code(){return i}set code(l){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:l,writable:!0})}toString(){return`${this.name} [${i}]: ${this.message}`}}}Ie("ERR_BUFFER_OUT_OF_BOUNDS",function(i){return i?`${i} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Ie("ERR_INVALID_ARG_TYPE",function(i,e){return`The "${i}" argument must be of type number. Received type ${typeof e}`},TypeError),Ie("ERR_OUT_OF_RANGE",function(i,e,t){let r=`The value of "${i}" is out of range.`,l=t;return Number.isInteger(t)&&Math.abs(t)>2**32?l=We(String(t)):typeof t=="bigint"&&(l=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(l=We(l)),l+="n"),r+=` It must be ${e}. Received ${l}`,r},RangeError);function We(i){let e="",t=i.length;const r=i[0]==="-"?1:0;for(;t>=r+4;t-=3)e=`_${i.slice(t-3,t)}${e}`;return`${i.slice(0,t)}${e}`}function kt(i,e,t){te(e,"offset"),(i[e]===void 0||i[e+t]===void 0)&&de(e,i.length-(t+1))}function Ge(i,e,t,r,l,u){if(i>t||i<e){const p=typeof e=="bigint"?"n":"";let b;throw u>3?e===0||e===BigInt(0)?b=`>= 0${p} and < 2${p} ** ${(u+1)*8}${p}`:b=`>= -(2${p} ** ${(u+1)*8-1}${p}) and < 2 ** ${(u+1)*8-1}${p}`:b=`>= ${e}${p} and <= ${t}${p}`,new ee.ERR_OUT_OF_RANGE("value",b,i)}kt(r,l,u)}function te(i,e){if(typeof i!="number")throw new ee.ERR_INVALID_ARG_TYPE(e,"number",i)}function de(i,e,t){throw Math.floor(i)!==i?(te(i,t),new ee.ERR_OUT_OF_RANGE(t||"offset","an integer",i)):e<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,i)}const Lt=/[^+/0-9A-Za-z-_]/g;function Rt(i){if(i=i.split("=")[0],i=i.trim().replace(Lt,""),i.length<2)return"";for(;i.length%4!==0;)i=i+"=";return i}function Ae(i,e){e=e||1/0;let t;const r=i.length;let l=null;const u=[];for(let p=0;p<r;++p){if(t=i.charCodeAt(p),t>55295&&t<57344){if(!l){if(t>56319){(e-=3)>-1&&u.push(239,191,189);continue}else if(p+1===r){(e-=3)>-1&&u.push(239,191,189);continue}l=t;continue}if(t<56320){(e-=3)>-1&&u.push(239,191,189),l=t;continue}t=(l-55296<<10|t-56320)+65536}else l&&(e-=3)>-1&&u.push(239,191,189);if(l=null,t<128){if((e-=1)<0)break;u.push(t)}else if(t<2048){if((e-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function Nt(i){const e=[];for(let t=0;t<i.length;++t)e.push(i.charCodeAt(t)&255);return e}function Ut(i,e){let t,r,l;const u=[];for(let p=0;p<i.length&&!((e-=2)<0);++p)t=i.charCodeAt(p),r=t>>8,l=t%256,u.push(l),u.push(r);return u}function He(i){return s.toByteArray(Rt(i))}function fe(i,e,t,r){let l;for(l=0;l<r&&!(l+t>=e.length||l>=i.length);++l)e[l+t]=i[l];return l}function M(i,e){return i instanceof e||i!=null&&i.constructor!=null&&i.constructor.name!=null&&i.constructor.name===e.name}function ve(i){return i!==i}const zt=function(){const i="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const r=t*16;for(let l=0;l<16;++l)e[r+l]=i[t]+i[l]}return e}();function K(i){return typeof BigInt>"u"?Ot:i}function Ot(){throw new Error("BigInt not supported")}})(pt);var yt={exports:{}},k=yt.exports={},W,G;function Te(){throw new Error("setTimeout has not been defined")}function Ce(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?W=setTimeout:W=Te}catch{W=Te}try{typeof clearTimeout=="function"?G=clearTimeout:G=Ce}catch{G=Ce}})();function mt(o){if(W===setTimeout)return setTimeout(o,0);if((W===Te||!W)&&setTimeout)return W=setTimeout,setTimeout(o,0);try{return W(o,0)}catch{try{return W.call(null,o,0)}catch{return W.call(this,o,0)}}}function Tr(o){if(G===clearTimeout)return clearTimeout(o);if((G===Ce||!G)&&clearTimeout)return G=clearTimeout,clearTimeout(o);try{return G(o)}catch{try{return G.call(null,o)}catch{return G.call(this,o)}}}var Y=[],ue=!1,J,xe=-1;function Cr(){!ue||!J||(ue=!1,J.length?Y=J.concat(Y):xe=-1,Y.length&&xt())}function xt(){if(!ue){var o=mt(Cr);ue=!0;for(var s=Y.length;s;){for(J=Y,Y=[];++xe<s;)J&&J[xe].run();xe=-1,s=Y.length}J=null,ue=!1,Tr(o)}}k.nextTick=function(o){var s=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)s[c-1]=arguments[c];Y.push(new gt(o,s)),Y.length===1&&!ue&&mt(xt)};function gt(o,s){this.fun=o,this.array=s}gt.prototype.run=function(){this.fun.apply(null,this.array)};k.title="browser";k.browser=!0;k.env={};k.argv=[];k.version="";k.versions={};function V(){}k.on=V;k.addListener=V;k.once=V;k.off=V;k.removeListener=V;k.removeAllListeners=V;k.emit=V;k.prependListener=V;k.prependOnceListener=V;k.listeners=function(o){return[]};k.binding=function(o){throw new Error("process.binding is not supported")};k.cwd=function(){return"/"};k.chdir=function(o){throw new Error("process.chdir is not supported")};k.umask=function(){return 0};var Fr=yt.exports;(function(o){Object.defineProperty(o,Symbol.toStringTag,{value:"Module"});const s=pt,c=Fr,f=h=>h&&h.__esModule?h:{default:h},y=f(c),m=globalThis||void 0||self;Object.defineProperty(o,"Buffer",{enumerable:!0,get:()=>s.Buffer}),Object.defineProperty(o,"process",{enumerable:!0,get:()=>y.default}),o.global=m})(ht);let P;typeof window<"u"?P=window:typeof self<"u"?P=self:P=ht.global;let Fe=null,$e=null;const nt=20,Be=P.clearTimeout,st=P.setTimeout,je=P.cancelAnimationFrame||P.mozCancelAnimationFrame||P.webkitCancelAnimationFrame,ot=P.requestAnimationFrame||P.mozRequestAnimationFrame||P.webkitRequestAnimationFrame;je==null||ot==null?(Fe=Be,$e=function(s){return st(s,nt)}):(Fe=function([s,c]){je(s),Be(c)},$e=function(s){const c=ot(function(){Be(f),s()}),f=st(function(){je(c),s()},nt);return[c,f]});function $r(o){let s,c,f,y,m,h,a;const g=typeof document<"u"&&document.attachEvent;if(!g){h=function(j){const C=j.__resizeTriggers__,N=C.firstElementChild,Q=C.lastElementChild,D=N.firstElementChild;Q.scrollLeft=Q.scrollWidth,Q.scrollTop=Q.scrollHeight,D.style.width=N.offsetWidth+1+"px",D.style.height=N.offsetHeight+1+"px",N.scrollLeft=N.scrollWidth,N.scrollTop=N.scrollHeight},m=function(j){return j.offsetWidth!==j.__resizeLast__.width||j.offsetHeight!==j.__resizeLast__.height},a=function(j){if(j.target.className&&typeof j.target.className.indexOf=="function"&&j.target.className.indexOf("contract-trigger")<0&&j.target.className.indexOf("expand-trigger")<0)return;const C=this;h(this),this.__resizeRAF__&&Fe(this.__resizeRAF__),this.__resizeRAF__=$e(function(){m(C)&&(C.__resizeLast__.width=C.offsetWidth,C.__resizeLast__.height=C.offsetHeight,C.__resizeListeners__.forEach(function(D){D.call(C,j)}))})};let x=!1,w="";f="animationstart";const v="Webkit Moz O ms".split(" ");let B="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const j=document.createElement("fakeelement");if(j.style.animationName!==void 0&&(x=!0),x===!1){for(let C=0;C<v.length;C++)if(j.style[v[C]+"AnimationName"]!==void 0){L=v[C],w="-"+L.toLowerCase()+"-",f=B[C],x=!0;break}}}c="resizeanim",s="@"+w+"keyframes "+c+" { from { opacity: 0; } to { opacity: 0; } } ",y=w+"animation: 1ms "+c+"; "}const I=function(x){if(!x.getElementById("detectElementResize")){const w=(s||"")+".resize-triggers { "+(y||"")+'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%; }',v=x.head||x.getElementsByTagName("head")[0],B=x.createElement("style");B.id="detectElementResize",B.type="text/css",o!=null&&B.setAttribute("nonce",o),B.styleSheet?B.styleSheet.cssText=w:B.appendChild(x.createTextNode(w)),v.appendChild(B)}};return{addResizeListener:function(x,w){if(g)x.attachEvent("onresize",w);else{if(!x.__resizeTriggers__){const v=x.ownerDocument,B=P.getComputedStyle(x);B&&B.position==="static"&&(x.style.position="relative"),I(v),x.__resizeLast__={},x.__resizeListeners__=[],(x.__resizeTriggers__=v.createElement("div")).className="resize-triggers";const L=v.createElement("div");L.className="expand-trigger",L.appendChild(v.createElement("div"));const j=v.createElement("div");j.className="contract-trigger",x.__resizeTriggers__.appendChild(L),x.__resizeTriggers__.appendChild(j),x.appendChild(x.__resizeTriggers__),h(x),x.addEventListener("scroll",a,!0),f&&(x.__resizeTriggers__.__animationListener__=function(N){N.animationName===c&&h(x)},x.__resizeTriggers__.addEventListener(f,x.__resizeTriggers__.__animationListener__))}x.__resizeListeners__.push(w)}},removeResizeListener:function(x,w){if(g)x.detachEvent("onresize",w);else if(x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(w),1),!x.__resizeListeners__.length){x.removeEventListener("scroll",a,!0),x.__resizeTriggers__.__animationListener__&&(x.__resizeTriggers__.removeEventListener(f,x.__resizeTriggers__.__animationListener__),x.__resizeTriggers__.__animationListener__=null);try{x.__resizeTriggers__=!x.removeChild(x.__resizeTriggers__)}catch{}}}}}class wt extends A.Component{constructor(...s){super(...s),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:c,disableWidth:f,onResize:y}=this.props;if(this._parentNode){var m,h,a,g;const I=window.getComputedStyle(this._parentNode)||{},_=parseFloat((m=I.paddingLeft)!==null&&m!==void 0?m:"0"),E=parseFloat((h=I.paddingRight)!==null&&h!==void 0?h:"0"),x=parseFloat((a=I.paddingTop)!==null&&a!==void 0?a:"0"),w=parseFloat((g=I.paddingBottom)!==null&&g!==void 0?g:"0"),v=this._parentNode.getBoundingClientRect(),B=v.height-x-w,L=v.width-_-E,j=this._parentNode.offsetHeight-x-w,C=this._parentNode.offsetWidth-_-E;(!c&&(this.state.height!==j||this.state.scaledHeight!==B)||!f&&(this.state.width!==C||this.state.scaledWidth!==L))&&(this.setState({height:j,width:C,scaledHeight:B,scaledWidth:L}),typeof y=="function"&&y({height:j,scaledHeight:B,scaledWidth:L,width:C}))}},this._setRef=c=>{this._autoSizer=c}}componentDidMount(){const{nonce:s}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=$r(s),this._detectElementResize.addResizeListener(this._parentNode,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.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:s,defaultHeight:c,defaultWidth:f,disableHeight:y=!1,disableWidth:m=!1,nonce:h,onResize:a,style:g={},tagName:I="div",..._}=this.props,{height:E,scaledHeight:x,scaledWidth:w,width:v}=this.state,B={overflow:"visible"},L={};let j=!1;return y||(E===0&&(j=!0),B.height=0,L.height=E,L.scaledHeight=x),m||(v===0&&(j=!0),B.width=0,L.width=v,L.scaledWidth=w),A.createElement(I,{ref:this._setRef,style:{...B,...g},..._},!j&&s(L))}}const Sr=d.styled_default("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),kr=d.styled_default("div")({name:"Content",class:"cjyzpp7",propsAsIs:!1}),Lr=d.styled_default("div")({name:"Graphic",class:"g16mldgz",propsAsIs:!1}),Rr=d.styled_default("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Nr=d.styled_default("div")({name:"StepsContainer",class:"smm7qmo",propsAsIs:!1}),Ur=d.styled_default("span")({name:"StepIndicator",class:"s17knuw2",propsAsIs:!1}),zr=({width:o,graphicSrc:s,headline:c,stepsCount:f,currentStep:y})=>n.jsxs(Sr,{children:[n.jsxs(kr,{children:[n.jsx(Lr,{"data-centered":y===0,children:n.jsx("img",{src:s,alt:c,width:o||300})}),c&&n.jsx(Rr,{children:c})]}),n.jsx(Nr,{children:Array.from({length:f}).map((m,h)=>n.jsx(Ur,{"data-active":y===h},h))})]}),Or=d.styled_default("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),Dr=d.styled_default("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),qr=()=>d.n1,Pr=d.styled_default(qr())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),Mr=d.styled_default("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),Wr=d.styled_default("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),Gr=d.styled_default("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),Hr=d.styled_default("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Qr=d.styled_default("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Yr=d.styled_default("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),Vr=d.styled_default("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Kr=()=>d.n1,Xr=d.styled_default(Kr())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),Jr=d.styled_default("div")({name:"SocialLinksContainer",class:"s1n7kzeh",propsAsIs:!1}),Zr=d.styled_default("a")({name:"SocialLink",class:"s2m9o9y",propsAsIs:!1}),en=d.styled_default("span")({name:"SocialLinkLabel",class:"sewjbbn",propsAsIs:!1}),_t=({inviteLink:o,socialLinks:s,inviteCardTitle:c,inviteCardSubtext:f,primaryColor:y,className:m})=>n.jsxs(Or,{className:m,children:[n.jsx(Dr,{style:{backgroundColor:y},children:n.jsx(Pr,{name:"invite-game-icon"})}),n.jsxs(Mr,{children:[n.jsx(Wr,{children:c||""}),n.jsx(Gr,{children:f||""})]}),o&&n.jsxs(Hr,{onClick:async()=>{if(o)try{await navigator.clipboard.writeText(o)}catch(h){console.error("Unable to copy to clipboard",h)}},children:[n.jsxs(Qr,{children:[n.jsx(Yr,{children:"Invite link"}),n.jsx(Vr,{children:o})]}),n.jsx(Xr,{name:"icon-copy"})]}),s&&s.length>0&&n.jsx(Jr,{children:s.map(({icon:h,link:a,label:g})=>n.jsxs(Zr,{href:a,target:"_blank",children:[n.jsx(d.n1,{name:h}),n.jsx(en,{children:g})]},a))})]}),tn=d.styled_default("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),rn=d.styled_default("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),nn=d.styled_default("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),sn=d.styled_default("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),on=d.styled_default("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),an=d.styled_default("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),ln=d.styled_default("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),cn=d.styled_default("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),un=({rules:o,rulesTitle:s,primaryColor:c})=>n.jsxs(tn,{children:[n.jsxs(rn,{children:[n.jsx(nn,{children:s}),n.jsx(sn,{children:o==null?void 0:o.map(({label:f,icon:y},m)=>n.jsxs(on,{children:[y&&n.jsx(an,{style:{backgroundColor:c},children:n.jsx(d.n1,{name:y,"data-icon":y})}),n.jsx(ln,{children:f})]},m))})]}),n.jsx(cn,{children:"See Terms and Conditions"})]}),dn=d.styled_default("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),hn=d.styled_default("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),pn=({disabled:o,variant:s="primary",onClick:c,children:f,...y})=>n.jsx(dn,{onClick:c,disabled:o,"data-variant":s,...y,children:n.jsx(hn,{children:f})}),fn=d.styled_default("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),yn=d.styled_default("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),mn=d.styled_default("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),xn=d.styled_default("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),gn=()=>d.n1,wn=d.styled_default(gn())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),_n=d.styled_default("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),In=()=>pn,An=d.styled_default(In())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),ae={steps:!1,rules:!1,inviteCard:!1},vn=({gamification:o,steps:s,rules:c,rulesBtnLabel:f,rulesTitle:y,primaryColor:m,inviteLink:h,socialLinks:a,inviteCardTitle:g,inviteCardSubtext:I,inviteCardBtnLabel:_,onClose:E})=>{const[x,w]=A.useState(0),[v,B]=A.useState(ae);A.useEffect(()=>{s!=null&&s.length?B({...ae,steps:!0}):c!=null&&c.length?B({...ae,rules:!0}):B({...ae,inviteCard:!0})},[]);const L=A.useMemo(()=>v.steps&&x===0?"Continue":v.rules?f||"Got it":v.inviteCard?_||"Play Now":"Next",[v,x,f,_]),j=A.useCallback(()=>{s!=null&&s.length&&x<s.length-1?w(N=>++N):c!=null&&c.length&&v.steps?B({...ae,rules:!0}):v.rules&&B({...ae,inviteCard:!0})},[x,s==null?void 0:s.length,c==null?void 0:c.length,v,w,B]),C=async()=>{await o.onboardingStatus.submitInplay()};return n.jsx(wt,{children:({width:N,height:Q})=>n.jsxs(fn,{style:{width:N,height:Q},children:[n.jsx(mn,{children:n.jsx(xn,{onClick:E,children:n.jsx(wn,{name:"icon-close-btn-gray"})})}),n.jsxs(yn,{children:[v.steps&&(s==null?void 0:s.length)&&n.jsx(zr,{stepsCount:s.length,currentStep:x,...s[x]}),v.rules&&n.jsx(un,{rules:c,rulesTitle:y,primaryColor:m}),v.inviteCard&&n.jsx(_t,{inviteLink:h,inviteCardTitle:g,inviteCardSubtext:I,primaryColor:m,socialLinks:a})]}),n.jsx(_n,{children:n.jsx(An,{onClick:v.inviteCard?C:j,children:L})})]})})},bn=d.styled_default("div")({name:"Container",class:"cocfo2g",propsAsIs:!1}),En=d.styled_default("div")({name:"CloseIconWrap",class:"c1pdhxdk",propsAsIs:!1}),Bn=()=>d.n1,jn=d.styled_default(Bn())({name:"CloseIcon",class:"c1funj3r",propsAsIs:!0}),Tn=d.styled_default("div")({name:"Title",class:"t1okg06y",propsAsIs:!1}),Cn=d.styled_default("img")({name:"SponsorLogo",class:"sb1n923",propsAsIs:!1}),Fn=d.styled_default("div")({name:"PresentsTitle",class:"p1stllxd",propsAsIs:!1}),$n=d.styled_default("div")({name:"Subtitle",class:"s13kvdzw",propsAsIs:!1}),Sn=d.styled_default("div")({name:"Description",class:"dfvmv3t",propsAsIs:!1}),kn=d.styled_default("button")({name:"ActionButton",class:"ay8e3j9",propsAsIs:!1}),at=({close:o,action:s,onboarding:c})=>{var f,y,m,h,a,g,I,_;return n.jsxs(bn,{children:[n.jsx(En,{onClick:o,children:n.jsx(jn,{name:"icon-cross"})}),((y=(f=c==null?void 0:c.titleCard)==null?void 0:f.media)==null?void 0:y.sponsorLogo)&&n.jsxs(Tn,{children:[n.jsx(Cn,{alt:"sponsor-logo",src:(h=(m=c==null?void 0:c.titleCard)==null?void 0:m.media)==null?void 0:h.sponsorLogo}),n.jsx(Fn,{children:"PRESENTS"})]}),((a=c==null?void 0:c.titleCard)==null?void 0:a.title)&&n.jsx($n,{children:(g=c==null?void 0:c.titleCard)==null?void 0:g.title}),((I=c==null?void 0:c.titleCard)==null?void 0:I.subtitle)&&n.jsx(Sn,{children:(_=c==null?void 0:c.titleCard)==null?void 0:_.subtitle}),n.jsx(kn,{onClick:s,children:"Play Now"})]})},Ln=d.styled_default("div")({name:"OnboardingContainer",class:"o9squag",propsAsIs:!1}),Rn=()=>we,Nn=d.styled_default(Rn())({name:"OnboardingNotificationContainer",class:"o1c8wcli",propsAsIs:!0}),lt=d.styled_default("div")({name:"InnerContainer",class:"i18oyadd",propsAsIs:!1}),Un="cebdc0u",zn=({deepLink:o,onboardingOpts:s,notification:c,gamification:f})=>{var y,m,h,a,g,I;const[_,E]=A.useState(void 0);return A.useEffect(()=>{const x=o.$store.subscribe(w=>{w&&E(w.data)});return()=>{x()}},[o.$store]),n.jsx(Ln,{className:d.cx_default(c.hiding&&Un),children:n.jsx(vn,{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:(y=s.rules)==null?void 0:y.buttonLabel,rulesTitle:(m=s.rules)==null?void 0:m.heading,steps:[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_1.png",headline:"Welcome to the Featured Groups +",width:80},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_2.png",headline:"Get real-time insights",width:264},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_3.png",headline:"Predictions, trivia & polls synced to match play"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_4.png",headline:"Win points for every answer you get right"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",headline:"Compete against friends on the leaderboard"}],primaryColor:(h=s.inviteCard)==null?void 0:h.iconColor,inviteLink:_==null?void 0:_.url,inviteCardTitle:(a=s.inviteCard)==null?void 0:a.heading,inviteCardSubtext:(g=s.inviteCard)==null?void 0:g.subtext,inviteCardBtnLabel:(I=s.inviteCard)==null?void 0:I.buttonLabel,onClose:()=>{var x;(x=c.close)==null||x.call(c)},socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],gamification:f})})},On=({sdk:o,notification:s,saveHeight:c,style:f})=>{const y=A.useRef(null),[m,h]=A.useState(!1),a=o.getFeature(U.FeatureType.GAMES),g=s.data.onboarding;return A.useLayoutEffect(()=>{var I;c(((I=y.current)==null?void 0:I.getBoundingClientRect().height)||0)},[c]),m&&a&&g?n.jsx(zn,{notification:s,setOpened:h,gamification:a,onboardingOpts:g,deepLink:a.deepLink}):n.jsxs(n.Fragment,{children:[n.jsx(lt,{ref:I=>{y.current=I},style:{position:"absolute",visibility:"hidden"},children:n.jsx(at,{close:()=>{},action:()=>{},onboarding:g})}),n.jsx(Nn,{style:f,hiding:s.hiding,children:n.jsx(lt,{children:n.jsx(at,{close:s.close,action:()=>h(!0),onboarding:g})})})]})},Dn=()=>we,qn=d.styled_default(Dn())({name:"Container",class:"ctckejh",propsAsIs:!0}),ct=d.styled_default("div")({name:"InnerContainer",class:"i1ri7tzr",propsAsIs:!1}),Pn=o=>{const[s,c]=A.useState(0),f=A.useRef(null),y=A.useCallback(h=>{f.current=h},[]);A.useEffect(()=>{var h;const a=(h=f.current)==null?void 0:h.getBoundingClientRect();a&&c(a.height)},[o]);const m=A.useCallback(h=>{c(h)},[]);return[y,s,m]},Mn=({sdk:o,notification:s})=>{var c,f;const[y,m,h]=Pn(s.id);return s.type===me.NotificationType.QUESTION?n.jsxs(n.Fragment,{children:[n.jsx(ct,{ref:y,style:{position:"absolute",visibility:"hidden"},children:n.jsx(Qe,{...s})}),n.jsx(qn,{style:{height:s.hiding?0:m},hiding:s.hiding,children:n.jsx(ct,{style:{height:"100%"},children:n.jsx(Qe,{...s})})})]}):s.type===me.NotificationType.QUESTION_RESOLVED&&(f=(c=s.data)==null?void 0:c.question)!=null&&f.predictionResult?n.jsx(wr,{style:{height:s.hiding?0:m},saveHeight:h,close:s.close,hiding:s.hiding,...s.data.question}):s.type===me.NotificationType.ONBOARDING?n.jsx(On,{style:{height:s.hiding?0:m},saveHeight:h,sdk:o,notification:s}):null},Wn=({sdk:o})=>{const[s]=A.useState(o.getNotificationsStore()),c=Z.useStore(s),f=A.useMemo(()=>{if(!(c!=null&&c.size))return null;for(const y of c.values())if(y.type===me.NotificationType.ONBOARDING)return y;return c.values().next().value},[c]);return f?n.jsx(Mn,{sdk:o,notification:f}):null},Gn=d.styled_default("div")({name:"SDKContainer",class:"stu11h7",propsAsIs:!1}),Se=d.styled_default("div")({name:"SDKScrollContainer",class:"s1ucohr1",propsAsIs:!1}),It=d.styled_default("div")({name:"SDKContentContainer",class:"s1el4wvm",propsAsIs:!1}),Hn=()=>It,Qn=d.styled_default(Hn())({name:"SDKWhiteContainer",class:"s1oe3036",propsAsIs:!0}),Yn=o=>{const s=A.useRef(""),[c,f]=A.useState(!1),y=Z.useStore(o.status),m=Z.useStore(o.userId()),h=y==="ready",[a,g]=A.useState(X),I=A.useCallback((x,w)=>{g(w),w===X?(x&&o.createEventSession(x),window.requestAnimationFrame(()=>{o.openFeature(U.FeatureType.GAMES)})):o.closeFeature()},[o]);A.useEffect(()=>{!h&&a===X&&(g(ce),o.closeFeature())},[h,a,o]);const _=x=>{s.current=x,f(!0),o.initializeApp().then(({enabled:w,err:v})=>{if(v){I(x,ce);return}if(w){o.isUserAuthorized().then(B=>{if(B){I(x,X);return}else o.disableApp()});return}})},E=()=>{f(!1),o.disableApp()};return A.useEffect(()=>{if(!m){h&&(g(ce),o.disableApp());return}m&&s.current&&c&&o.initializeApp().then(()=>{o.createEventSession(s.current)})},[m]),{sdkEnabled:c,sdkReady:h,activeOverlay:a,activateAndLoadOverlay:I,activateEventWithId:_,deactivate:E,isLogged:!!m}},Vn=o=>{const s=Z.useStore(o.getActiveFeature()),c=Z.useStore(o.streamStore()),[f,y]=A.useState(null);return A.useEffect(()=>{const m=o.getFeatures();if(s)for(const[h,a]of m)h===s?a.status.get()===he.FeatureStatus.Suspended&&(a.enable(),y(a)):a.status.get()===he.FeatureStatus.Ready&&a.disable();else{for(const[,h]of m)h.status.get()===he.FeatureStatus.Ready&&h.disable();y(null)}return()=>{for(const[,h]of m)h.status.get()===he.FeatureStatus.Ready&&h.disable()}},[s,o,c]),[s,f]},Kn=({sdk:o,className:s})=>{const[,c]=Vn(o);return n.jsx(Pt,{className:s,feature:c,sdk:o})},Xn=({sdk:o,overlays:s,children:c})=>{const{sdkEnabled:f,sdkReady:y,activeOverlay:m,activateAndLoadOverlay:h,activateEventWithId:a,deactivate:g,isLogged:I}=Yn(o);return A.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),n.jsxs(Gn,{children:[f&&n.jsx(si,{sdkReady:y,activeOverlay:m,className:le.d,setActiveOverlay:_=>h("",_)}),y&&n.jsx(Wn,{sdk:o}),n.jsx(Se,{"data-nav":f.toString(),style:{display:!f||m===ce?"block":"none"},children:c&&c({activateEventWithId:a,deactivate:g})}),n.jsx(Se,{"data-nav":f.toString(),style:{display:m===ge?"block":"none"},children:s&&m===ge&&s[m]}),y&&m===X&&n.jsx(Kn,{className:le.d,sdk:o}),!I&&n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})};const Jn=({sdkKey:o,plugins:s,children:c,production:f=!0})=>n.jsx(le.StreamLayerProvider,{sdkKey:o,plugins:s,production:f,autoEnable:!1,children:c}),Zn=({children:o,overlays:s})=>{const{sdk:c,status:f}=A.useContext(le.StreamLayerContext);if(f===le.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return c?n.jsx("div",{className:"StreamLayerSDK",children:n.jsx(le.s,{style:{height:"100%"},children:n.jsx(Xn,{sdk:c,overlays:s,children:o})})}):o({})};exports.AutoSizer=wt;exports.MastersStreamLayerProvider=Jn;exports.MastersStreamLayerSDKReact=Zn;exports.O=_t;exports.a=Qn;exports.f=we;exports.n=It;exports.o=ut;exports.r=Se;exports.w=dt;
|