PageSourceSearch

https://www.maestro.io/static/js/app.a8861c8.js

js maestro.io collected 2026-10-02 04:11:27 UTC 198,038 bytes, 1,021 lines download raw bytes

1(function(){try{var ce=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},G=new ce.Error().stack;G&&(ce._sentryDebugIds=ce._sentryDebugIds||{},ce._sentryDebugIds[G]="c0cc5b27-12a0-4e0f-b855-f29b395ac036",ce._sentryDebugIdIdentifier="sentry-dbid-c0cc5b27-12a0-4e0f-b855-f29b395ac036")}catch{}})();var _global=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};_global.SENTRY_RELEASE={id:"d0b2a86c2e49a10a9d9513a5bf665a7912e86753"},(self.webpackChunk_maestro_io_client=self.webpackChunk_maestro_io_client||[]).push([[6144],{237722:(ce,G,t)=>{t.d(G,{A:()=>d});var e=t(224191),s=t.n(e),o=t(365179),T=t(232909);const a=n=>({redirectUrl:(0,o.M3i)(n),slug:(0,o.LeP)(n)}),d=(0,e.connect)(a)(T.A)},232909:(ce,G,t)=>{t.d(G,{u:()=>mn,A:()=>un});var e=t(63696),s=t(362688),o=t.n(s),T=t(498685),a=t(886550),d=t(463302),n=t(619545),E=t(602342),c=t.n(E),f=t(429195),L=t(545290),N=t(312854),I=t(41989);const x=a.Ay.div`
2  align-items: center;
3  background-color: ${({color:z})=>z};
4  border-radius: 6.41361px;
5  cursor: pointer;
6  display: flex;
7  flex: 1;
8  height: 40px;
9  margin-top: 13px;
10`,r=a.Ay.div`
11  align-items: center;
12  border-right: 1px solid ${({color:z})=>(0,N.B3)((0,N.bw)(z),.1)};
13  color: ${({color:z})=>(0,N.bw)(z)};
14  display: flex;
15  height: 25px;
16  justify-content: center;
17  margin: 5px;
18  padding-right: ${f.Emp};
19  padding-left: 10px;
20  border-top-left-radius: 6.41361px;
21  border-bottom-left-radius: 6.41361px;
22`,y=a.Ay.div`
23  ${L.x_}
24  text-align: center;
25  align-items: center;
26  color: ${({color:z})=>(0,N.bw)(z)};
27  display: flex;
28  flex: 1;
29  justify-content: center;
30  text-transform: uppercase;
31`,i=({color:z,providerNameKey:$,signUp:ee,renderIcon:en,dataTestId:tn})=>{const{endUserT:nn}=(0,I.T9)(),{t:on}=(0,I._h)();let pn;if($){const ln=on($);pn=ee?nn([I.Rq.externalSignupWith,{variables:{provider:ln}}],["SIGNUP_WITH",{provider:ln}]):nn([I.Rq.externalLoginWith,{variables:{provider:ln}}],["LOG_IN_WITH",{provider:ln}])}else pn=nn([I.Rq.externalLoginOrSignup],["LOG_IN_OR_SIGN_UP"]);return e.createElement(x,{color:z,"data-testid":tn},e.createElement(r,{color:z},en()),e.createElement(y,{color:z},pn))},u=a.Ay.img`
32  height: 22px;
33  width: 22px;
34`,D=()=>{const z=(0,T.wA)(),$=()=>{z((0,d.Mm)())};return e.createElement(n.A,{onClick:$,plain:!0},e.createElement(i,{color:f.m_P,dataTestId:"authModalAmazonLoginButton",providerNameKey:"AMAZON",renderIcon:()=>e.createElement(u,{src:c()})}))},B=a.Ay.img`
35  height: 22px;
36  width: 22px;
37`,M=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.BATTLENET,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:f._e_,dataTestId:"authModalBattlenetLoginButton",providerNameKey:"BATTLENET",renderIcon:()=>"B",signUp:z}))};var P=t(284174),m=t.n(P);const h=a.Ay.img`
38  border-radius: 50%;
39  border: 3px solid ${f._e_};
40  background: ${f._e_};
41  height: 25px;
42  width: 25px;
43`,O=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.EPIC,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:"white",dataTestId:"authModalEpicLoginButton",providerNameKey:"EPIC",renderIcon:()=>e.createElement(h,{src:m()}),signUp:z}))};var k=t(216522),Q=t.n(k);const S=a.Ay.img`
44  border-radius: 50%;
45  border: 3px solid ${f._e_};
46  background: ${f._e_};
47  height: 25px;
48  width: 25px;
49`,U=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.GOOGLE,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:"#0076FE",dataTestId:"authModalGoogleLoginButton",providerNameKey:"GOOGLE",renderIcon:()=>e.createElement(S,{src:Q()}),signUp:z}))};var j=t(642675);const w=a.Ay.div`
50  height: 30px;
51  overflow: hidden;
52  position: relative;
53  width: 50px;
54`,Y=a.Ay.img`
55  background: ${f.azv};
56  height: 50px;
57  left: 0;
58  position: absolute;
59  top: -10px;
60  width: 50px;
61`;var K=(z=>(z.whiteOnBlack="http://static.maestro.io/media/5c4a79fc0f4e4a006144adff/6202ea9dabedf900a7e579a1.png",z.blackOnWhite="http://static.maestro.io/media/5c4a79fc0f4e4a006144adff/6202ea4d049fc500a60e248b.png",z))(K||{});const ae=({signUp:z})=>{const $=(0,j.A)(),ee=()=>{$((0,d.E8)({provider:d.Ph.ONE_FC,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:f.azv,dataTestId:"authModalOneFcLoginButton",renderIcon:()=>e.createElement(w,null,e.createElement(Y,{src:"http://static.maestro.io/media/5c4a79fc0f4e4a006144adff/6202ea9dabedf900a7e579a1.png"}))}))};var le=t(534568),fe=t.n(le);const Le=a.Ay.img`
62  height: 21px;
63  width: 21px;
64`,Qe=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.PLAYSTATION,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:"#0063C5",dataTestId:"authModalPlaystationLoginButton",providerNameKey:"PLAYSTATION",renderIcon:()=>e.createElement(Le,{src:fe()}),signUp:z}))};var se=t(907264),ge=t.n(se);const pe=a.Ay.img`
65  border-radius: 50%;
66  border: 3px solid ${f._e_};
67  background: ${f._e_};
68  height: 25px;
69  width: 25px;
70`,Re=()=>e.createElement(pe,{src:ge()}),mt=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.RIOTGAMES,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:"white",dataTestId:"authModalRiotGamesLoginButton",providerNameKey:"RIOT_GAMES",renderIcon:Re,signUp:z}))},Ue=a.Ay.img`
71  border-radius: 50%;
72  border: 3px solid ${f._e_};
73  background: ${f._e_};
74  height: 25px;
75  width: 25px;
76`,We=({signUp:z})=>{const $=(0,T.wA)(),ee=()=>{$((0,d.E8)({provider:d.Ph.UMG,strategy:"oauth"}))};return e.createElement(n.A,{onClick:ee,target:"_self"},e.createElement(i,{color:"white",dataTestId:"authModalUmgLoginButton",providerNameKey:"UMG",renderIcon:()=>"UMG",signUp:z}))};var Be=t(990220),_e=t(992734),tt=t.n(_e),It=t(108985),he=t.n(It),ye=Object.defineProperty,Oe=(z,$,ee)=>$ in z?ye(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,Ct=(z,$,ee)=>(Oe(z,typeof $!="symbol"?$+"":$,ee),ee);const et=a.Ay.img`
77  height: 22px;
78  width: 22px;
79`,nt=z=>{const ee={client_id:"adobe_maestro",redirect_uri:`https://${Be.Xw}/pkg/dobi-api/4.0/api/adobe/callback?location=${encodeURIComponent(z)}`,response_type:"code",scope:"openid"};return`https://ims-na1.adobelogin.com/ims/authorize/v1?${he().stringify(ee)}`};class X extends e.Component{shouldComponentUpdate($){return $.redirectUrl!==this.props.redirectUrl}render(){const{signUp:$}=this.props;return e.createElement(n.A,{href:nt(this.props.redirectUrl),plain:!0,target:"_self"},e.createElement(i,{color:f.G6u,dataTestId:"authModalAdobeLoginButton",providerNameKey:"ADOBE",renderIcon:()=>e.createElement(et,{src:tt()}),signUp:$}))}}
79Ct(X,"propTypes",{redirectUrl:o().string.isRequired,signUp:o().bool.isRequired});var oe=t(16357),_=Object.defineProperty,Ae=(z,$,ee)=>$ in z?_(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,be=(z,$,ee)=>(Ae(z,typeof $!="symbol"?$+"":$,ee),ee);const ke=`https://${Be.Xw}/pkg/dobi-api/4.0/api/cornell/login`,Ot=a.Ay.img`
80  height: 22px;
81  width: 22px;
82`;class vt extends e.Component{constructor(){super(...arguments),be(this,"state",{redirectUrl:""})}async componentDidMount(){const{data:$}=await oe.A.get(ke,{params:{_:Date.now()}});this.setState({redirectUrl:$})}render(){const{redirectUrl:$}=this.state;if(!$)return null;const{signUp:ee}=this.props;return e.createElement(n.A,{href:$,target:"_self"},e.createElement(i,{color:"#b31b1b",dataTestId:"authModalCornellLoginButton",providerNameKey:"CORNELL",renderIcon:()=>e.createElement(Ot,{src:`${Be.T2}/media/578d2dea2659bf83031fff0b/59cd89e4efde60b73e138906.jpg`}),signUp:ee}))}}be(vt,"propTypes",{signUp:o().bool.isRequired});var ut=t(166567),gt=t.n(ut),Fe=Object.defineProperty,Ke=(z,$,ee)=>$ in z?Fe(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,at=(z,$,ee)=>(Ke(z,typeof $!="symbol"?$+"":$,ee),ee);const De=a.Ay.img`
83  height: 22px;
84  width: 22px;
85`,dt=z=>{const ee={client_id:"BOWLTV_CLIENT_B23D9481-6093-4109-A45D-801F314B3BFF",redirect_uri:`${Be.Ls}/auth/v1/oauth/bowltv`,response_type:"code",scope:"openid profile",state:z};return`https://signon.bowl.com/connect/authorize?${he().stringify(ee)}`};class Ve extends e.Component{shouldComponentUpdate($){return $.redirectUrl!==this.props.redirectUrl}render(){const{signUp:$}=this.props;return e.createElement(n.A,{href:dt(this.props.redirectUrl),plain:!0,target:"_self"},e.createElement(i,{color:"white",dataTestId:"authModalBowlTVLoginButton",providerNameKey:"USBC",renderIcon:()=>e.createElement(De,{src:gt()}),signUp:$}))}}at(Ve,"propTypes",{redirectUrl:o().string.isRequired,signUp:o().bool.isRequired});var Xe=t(224191),Dt=t(754474),Et=t(283722),At=Object.defineProperty,Lt=(z,$,ee)=>$ in z?At(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,ct=(z,$,ee)=>(Lt(z,typeof $!="symbol"?$+"":$,ee),ee);class Pt extends e.Component{render(){const{signUp:$}=this.props;return e.createElement("span",{onClick:this.props.handleFBLogin,role:"button",tabIndex:0},e.createElement(i,{color:f.QMr,dataTestId:"authModalFacebookLoginButton",providerNameKey:"FACEBOOK",renderIcon:()=>e.createElement(Et.Ay,{name:"facebook"}),signUp:$}))}}ct(Pt,"propTypes",{handleFBLogin:o().func.isRequired,signUp:o().bool.isRequired});const Bt=z=>({handleFBLogin:()=>z((0,Dt.W_)())}),Vt=(0,Xe.connect)(null,Bt)(Pt);var Xt=Object.defineProperty,Mt=(z,$,ee)=>$ in z?Xt(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,Jt=(z,$,ee)=>(Mt(z,typeof $!="symbol"?$+"":$,ee),ee);const Ie=a.Ay.img`
86  height: 22px;
87  width: 22px;
88`,Je="edd6f875-4cbd-426a-8138-0f032b4977bf",Rt=z=>{const $=`https://${Be.Xw}/pkg/dobi-api/4.0/api/xbox/login/callback`,ee=`redirect=${encodeURIComponent(z)}`,en="https://login.live.com/oauth20_authorize.srf",tn={client_id:Je,fl:"email",redirect_uri:`${$}?${ee}`,response_type:"code",scope:"Xboxlive.signin Xboxlive.offline_access"};return`${en}?${he().stringify(tn)}`};class He extends e.Component{constructor(){super(...arguments),Jt(this,"state",{redirectHref:Rt(this.props.redirectUrl)})}render(){const{signUp:$}=this.props,{redirectHref:ee}=this.state;return e.createElement(n.A,{href:ee,target:"_self"},e.createElement(i,{color:f._e_,dataTestId:"authModalMicrosoftLoginButton",providerNameKey:"MICROSOFT",renderIcon:()=>e.createElement(Ie,{src:`${Be.T2}/media/578d2dea2659bf83031fff0b/58d023d7386278d2608d27ab.png`}),signUp:$}))}}Jt(He,"propTypes",{redirectUrl:o().string.isRequired,signUp:o().bool.isRequired});var Nt=t(519371),wt=Object.defineProperty,Ut=(z,$,ee)=>$ in z?wt(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,zt=(z,$,ee)=>(Ut(z,typeof $!="symbol"?$+"":$,ee),ee);const Zt=["channel_check_subscription","user_follows_edit","user_read","user_subscriptions","openid"].join(" "),dn=z=>{const $="https://id.twitch.tv/oauth2/authorize",ee={client_id:z,redirect_uri:`${window.location.protocol}//${window.location.host}/pkg/lt3-api/4.0/api/twitch/oauth`,response_type:"token id_token",scope:Zt};return`${$}?${he().stringify(ee)}`};class yt extends e.Component{constructor(){super(...arguments),zt(this,"state",{redirectHref:dn(Be.U$)})}componentDidMount(){window.__twitchCallback=this.props.onTwitchCallback}render(){const{redirectHref:$}=this.state,{signUp:ee}=this.props;return e.createElement(n.A,{href:$,rel:""},e.createElement(i,{color:f.vhi,dataTestId:"authModalTwitchLoginButton",providerNameKey:"TWITCH",renderIcon:()=>e.createElement(Et.Ay,{name:"twitch"}),signUp:ee}))}}zt(yt,"propTypes",{onTwitchCallback:o().func.isRequired,signUp:o().bool.isRequired});const pt=z=>({onTwitchCallback:$=>z((0,Nt.hw)($))}),ht=(0,Xe.connect)(pt)(yt);var Kt=Object.defineProperty,_t=(z,$,ee)=>$ in z?Kt(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,jt=(z,$,ee)=>(_t(z,typeof $!="symbol"?$+"":$,ee),ee);const hn=a.Ay.img`
89  height: 22px;
90  width: 22px;
91`,xn=()=>{const z="https://connect.ubisoft.com/login",$={appId:Be.nM,genomeId:Be.jB,lang:"en-US",nextUrl:(0,d.NR)()};return`${z}?${he().stringify($)}`};class kt extends e.Component{constructor(){super(...arguments),jt(this,"state",{redirectUri:xn()})}render(){const{redirectUri:$}=this.state,{signUp:ee}=this.props;return e.createElement(n.A,{onClick:()=>{window.open($,"width=480,height=720,toolbar=no,status=no")},plain:!0},e.createElement(i,{color:"#3f7ec3",dataTestId:"authModalUplayLoginButton",providerNameKey:"UBISOFT",renderIcon:()=>e.createElement(hn,{src:`${Be.T2}/media/555f5b1d99b95b1255b8a350/5914ca9e12c6ab504141443a.png`}),signUp:ee}))}}jt(kt,"propTypes",{signUp:o().bool.isRequired});var qt=Object.defineProperty,cn=(z,$,ee)=>$ in z?qt(z,$,{enumerable:!0,configurable:!0,writable:!0,value:ee}):z[$]=ee,rn=(z,$,ee)=>(cn(z,typeof $!="symbol"?$+"":$,ee),ee);const mn={adobe:X,amazon:D,battlenet:M,bowltv:Ve,cornell:vt,epic:O,facebook:Vt,google:U,onefc:ae,playstation:Qe,riotgames:mt,twitch:ht,umg1:We,uplay:kt,xbox:He};class un extends e.Component{render(){const{kind:$,redirectUrl:ee,slug:en,signUp:tn}=this.props;if(!mn[$])return null;const nn=mn[$];return e.createElement(nn,{redirectUrl:ee,signUp:tn,slug:en})}}rn(un,"propTypes",{kind:o().string.isRequired,redirectUrl:o().string,
91signUp:o().bool.isRequired,slug:o().string}),rn(un,"defaultProps",{redirectUrl:"",slug:""})},638662:(ce,G,t)=>{t.d(G,{A:()=>j});var e=t(224191),s=t(558613),o=t(299500),T=t(654105),a=t(63696),d=t(941083),n=t(732091),E=t.n(n),c=t(886550),f=t(731694),L=t(11411),N=t(359785),I=t(545290),x=t(89649),r=t(711678),y=t(346002),l=t(463302),i=Object.defineProperty,u=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,B=(w,Y,K)=>Y in w?i(w,Y,{enumerable:!0,configurable:!0,writable:!0,value:K}):w[Y]=K,F=(w,Y)=>{for(var K in Y||(Y={}))b.call(Y,K)&&B(w,K,Y[K]);if(u)for(var K of u(Y))D.call(Y,K)&&B(w,K,Y[K]);return w};const M={[N.hC]:(0,a.lazy)(()=>t.e(9060).then(t.bind(t,409060))),[r.V.addToCalendar]:(0,a.lazy)(()=>t.e(4854).then(t.bind(t,834854))),[r.V.addUserRole]:(0,a.lazy)(()=>t.e(4509).then(t.bind(t,334509))),[r.V.adminConfirmation]:(0,a.lazy)(()=>t.e(5230).then(t.bind(t,775230))),[r.V.adminError]:(0,a.lazy)(()=>t.e(8429).then(t.bind(t,428429))),[r.V.adminSuccess]:(0,a.lazy)(()=>t.e(4188).then(t.bind(t,644188))),[r.V.chatPromptLogin]:(0,a.lazy)(()=>t.e(9057).then(t.bind(t,719057))),[r.V.checkEmail]:(0,a.lazy)(()=>t.e(7134).then(t.bind(t,157134))),[r.V.confirmation]:(0,a.lazy)(()=>t.e(2915).then(t.bind(t,692915))),[r.V.deviceLimit]:(0,a.lazy)(()=>t.e(760).then(t.bind(t,340760))),[r.V.emailVerification]:(0,a.lazy)(()=>t.e(3941).then(t.bind(t,73941))),[r.V.errorModal]:(0,a.lazy)(()=>t.e(823).then(t.bind(t,560823))),[r.V.forgotPassword]:(0,a.lazy)(()=>t.e(4721).then(t.bind(t,34721))),[r.V.gdpr]:(0,a.lazy)(()=>t.e(4877).then(t.bind(t,814877))),[r.V.image]:(0,a.lazy)(()=>t.e(4159).then(t.bind(t,44159))),[r.V.imageLibrary]:(0,a.lazy)(()=>t.e(1678).then(t.bind(t,11678))),[r.V.instagram]:(0,a.lazy)(()=>Promise.all([t.e(7514),t.e(3993),t.e(8427),t.e(888),t.e(4251),t.e(955),t.e(4634),t.e(1644),t.e(510)]).then(t.bind(t,250510))),[r.V.invite]:(0,a.lazy)(()=>t.e(1185).then(t.bind(t,81185))),[r.V.login]:(0,a.lazy)(()=>t.e(4970).then(t.bind(t,604970))),[r.V.purchasePlan]:(0,a.lazy)(()=>t.e(4459).then(t.bind(t,94459))),[r.V.bundlePurchase]:(0,a.lazy)(()=>t.e(818).then(t.bind(t,300818))),[r.V.questClaim]:(0,a.lazy)(()=>t.e(9932).then(t.bind(t,629932))),[r.V.receiptModal]:(0,a.lazy)(()=>t.e(4807).then(t.bind(t,844807))),[r.V.resetPassword]:(0,a.lazy)(()=>t.e(9729).then(t.bind(t,789729))),[r.V.resetPasswordSuccess]:(0,a.lazy)(()=>t.e(7971).then(t.bind(t,477971))),[r.V.selectableText]:(0,a.lazy)(()=>t.e(2278).then(t.bind(t,82278))),[r.V.shopify]:(0,a.lazy)(()=>t.e(7275).then(t.bind(t,377275))),[r.V.supportContact]:(0,a.lazy)(()=>t.e(507).then(t.bind(t,100507))),[r.V.text]:(0,a.lazy)(()=>t.e(6421).then(t.bind(t,236421))),[r.V.twitter]:(0,a.lazy)(()=>t.e(5129).then(t.bind(t,275129))),[r.V.twitterPanel]:(0,a.lazy)(()=>t.e(3801).then(t.bind(t,853801))),[r.V.streamEncoderState]:(0,a.lazy)(()=>t.e(6799).then(t.bind(t,146799)).then(w=>({default:w.StreamEncoderStateModal}))),[r.V.activeOnPageModal]:(0,a.lazy)(()=>t.e(4063).then(t.bind(t,774063))),[r.V.haltGate]:(0,a.lazy)(()=>t.e(2291).then(t.bind(t,62291))),[r.V.calendarBlockEventSettings]:(0,a.lazy)(()=>t.e(1878).then(t.bind(t,31878))),[r.V.activateThemeConfirmation]:(0,a.lazy)(()=>t.e(9420).then(t.bind(t,169420))),[r.V.subscriptionPurchase]:(0,a.lazy)(()=>Promise.all([t.e(8477),t.e(4293)]).then(t.bind(t,744293))),[r.V.vodCheckout]:(0,a.lazy)(()=>Promise.all([t.e(8477),t.e(7161)]).then(t.bind(t,757161))),[r.V.videoMetadataV2]:(0,a.lazy)(()=>Promise.resolve().then(t.bind(t,372735)).then(w=>({default:w.VideoMetadataModalV2}))),[r.V.videoSettingsV1]:(0,a.lazy)(()=>Promise.resolve().then(t.bind(t,915683)).then(w=>({default:w.VideoSettingsModalV1}))),[r.V.videoLibraryV2]:(0,a.lazy)(()=>Promise.resolve().then(t.bind(t,925374)).then(w=>({default:w.VideoLibraryModalV2}))),[r.V.upgradePlan]:(0,a.lazy)(()=>t.e(9740).then(t.bind(t,339740))),[r.V.upgradePlanSuccess]:(0,a.lazy)(()=>t.e(3533).then(t.bind(t,943533))),[r.V.setUpAccess]:(0,a.lazy)(()=>t.e(7944).then(t.bind(t,677944)).then(w=>({default:w.SetUpAccessModal}))),[r.V.selfServiceSignup]:(0,a.lazy)(()=>Promise.all([t.e(7514),t.e(3993),t.e(8427),t.e(888),t.e(4251),t.e(955),t.e(4634),t.e(1644),t.e(6329)]).then(t.bind(t,456329))),[r.V.settingUpSelfServiceSite]:(0,a.lazy)(()=>t.e(3161).then(t.bind(t,803161))),[r.V.chooseSelfServicePlan]:(0,a.lazy)(()=>t.e(4777).then(t.bind(t,224777))),[r.V.tvAppsLogin]:(0,a.lazy)(()=>t.e(3076).then(t.bind(t,673076))),[r.V.streamContentDetailsModal]:(0,a.lazy)(()=>t.e(4340).then(t.bind(t,734340))),[r.V.saveLeaveConfirmation]:(0,a.lazy)(()=>t.e(1138).then(t.bind(t,551138))),[r.V.monetizationGateModal]:(0,a.lazy)(()=>t.e(7013).then(t.bind(t,917013)))},P=c.Ay.div`
92  display: flex;
93  flex-flow: column nowrap;
94  align-items: center;
95  justify-content: center;
96  position: fixed;
97  left: 0;
98  top: 0;
99  right: 0;
100  bottom: 0;
101  background-color: ${({transparentBackground:w})=>w?"transparent":"rgba(0, 0, 0, 0.5)"};
102  ${({blur:w})=>w&&"backdrop-filter: blur(2px);"}
103  ${(0,I.PD)`
104    left: ${({panelModalPosition:w})=>w?`${w}px`:0};
105  `}
106`,h=({backgroundStyle:w={},kind:Y,data:K={},onDismiss:q,style:ae})=>{var le;const fe=(0,e.useSelector)(y.l_),Le=(0,e.useSelector)(l.N6),Ce=M[Y];E()(Ce,`Modal expected valid kind but received ${Y}`);const Qe=(0,L.Ay)({feature:L.Xj.HIDE_GDPR,type:"feature"}),[se,ge]=(0,a.useState)(null);(0,a.useEffect)(()=>{const Ue=setTimeout(()=>{ge(Qe?null:a.createElement(Ce,{data:K,onDismiss:q,role:"dialog",style:ae}))},3e3);return()=>{clearTimeout(Ue)}},[Qe,se]);const pe=document&&((le=document.getElementById(f.bT))==null?void 0:le.getBoundingClientRect().left),Re=x.I_.includes(K?.promptStringKey)?pe:!1,we=Y===r.V.vodCheckout&&!!K?.adminPaywallPreview;if([r.V.adminError,r.V.adminConfirmation,r.V.adminSuccess,r.V.monetizationGateModal,r.V.videoLibraryV2,r.V.videoSettingsV1,r.V.bundlePurchase].includes(Y))return a.createElement(a.Suspense,{fallback:null},a.createElement(Ce,{data:K,onDismiss:q,role:"dialog",style:ae}));const mt=()=>Y===r.V.gdpr?se:a.createElement(P,{blur:fe&&!we,onClick:K?.locked?void 0:q,panelModalPosition:Le?!1:Re,style:F(F(F({},w),K?.backgroundStyle),we?{pointerEvents:"none"}:{}),transparentBackground:we||!!K?.transparentBackground},a.createElement(Ce,{data:K,onDismiss:q,role:"dialog",style:ae}));return a.createElement(a.Suspense,{fallback:null},mt())},C=200,O={entering:{opacity:1,transition:`opacity ${C}ms ease-in`},exiting:{opacity:0,transition:`opacity ${C}ms ease-in`}},k={entered:{transition:`transform ${C}ms cubic-bezier(0.175, 0.885, 0.32, 1.275)`},entering:{transform:"scale(0)"},exiting:{transform:"scale(0)",transition:`transform ${C}ms cubic-bezier(0.6, -0.28, 0.735, 0.045)`}},S=({modals:w,onDismissModal:Y})=>{const K=(0,a.useRef)(null);return a.createElement(d.F,null,w.length>0&&a.createElement(d.eB,{in:!0,nodeRef:K,timeout:C},q=>{let ae=null;const le=[];for(const se of w)se.kind===r.V.gdpr?ae=se:le.push(se);const fe=le[le.length-1],Le=fe?.kind,Ce=fe&&"data"in fe?fe.data:void 0,Qe=ae?.kind;return a.createElement("div",{ref:K},Qe&&a.createElement(h,{kind:Qe,onDismiss:()=>Y(Qe)}),Le&&a.createElement(h,{backgroundStyle:O[q],data:Ce,kind:Le,onDismiss:()=>Y(Le),style:k[q]}))}))},J=w=>({modals:(0,T.wk)(w)}),U=w=>({onDismissModal:Y=>w((0,o.y_)(Y||null))}),j=(0,s.A)()((0,e.connect)(J,U)(S))},863593:(ce,G,t)=>{t.d(G,{A:()=>M});var e=t(224191),s=t(804797),o=t(472661),T=t(887944),a=t(63696),d=t(362688),n=t.n(d),E=t(88
1066550),c=t(982005),f=t(272057),L=t(545290),N=t(429195),I=t(86138),x=Object.defineProperty,r=(P,m,h)=>m in P?x(P,m,{enumerable:!0,configurable:!0,writable:!0,value:h}):P[m]=h,y=(P,m,h)=>(r(P,typeof m!="symbol"?m+"":m,h),h);const l=E.Ay.div`
107  display: flex;
108  flex-direction: column;
109  width: 100%;
110`,i=E.Ay.div`
111  background-image: url(${P=>P.background});
112  background-size: cover;
113  flex-grow: 1;
114  height: 0;
115  width: 40%;
116  padding-bottom: 20%;
117  position: relative;
118`,u=E.Ay.div`
119  background: linear-gradient(180deg, ${N.O49} 0%, rgba(0, 0, 0, 0) 100%);
120  font-size: 22px;
121  padding: 18px;
122  vertical-align: bottom;
123`,b=(0,E.Ay)(c.A)`
124  float: right;
125  cursor: pointer;
126`,D=E.Ay.div`
127  ${L.Qr}
128  bottom: 0;
129  cursor: pointer;
130  left: 0;
131  padding: 20px;
132  position: absolute;
133`;class B extends a.Component{constructor(){super(...arguments),y(this,"handleDismiss",()=>{const{onDismiss:m,data:h,data:{key:C},trackDismiss:O}=this.props;O(h),m(C)}),y(this,"showPanel",()=>{const{data:m,data:{payload:{data:{product:h,broadcastId:C}}},onEngagedOverlay:O,onOpenPanel:k,trackEngage:Q}=this.props;Q(m),O(C),k({doc:{data:{kind:"commerce",product:h}}})})}render(){const{data:{key:m,payload:{data:{broadcastId:h,views:C,product:O}}}}=this.props;if(!O)return null;const{image:k,name:Q}=O.data,{overlayType:S}=this.props;return a.createElement(l,null,a.createElement(f.A,{broadcastId:h,broadcastKey:m,showEngaged:!0,views:C}),a.createElement(i,{background:k,className:S},a.createElement(u,null,a.createElement("span",null,Q),a.createElement(b,{onClick:this.handleDismiss})),a.createElement(D,{onClick:this.showPanel},a.createElement(I.A,{stringKey:"ACTION_BUY_NOW"}))))}}y(B,"propTypes",{data:n().shape({key:n().string.isRequired,payload:n().shape({data:n().shape({broadcastId:n().string,product:n().object,views:n().number}).isRequired}).isRequired}).isRequired,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onOpenPanel:n().func.isRequired,overlayType:n().string.isRequired,trackDismiss:n().func.isRequired,trackEngage:n().func.isRequired});const F=P=>({onDismiss:m=>P((0,s.Zn)(m)),onEngagedOverlay:m=>P((0,s.Ks)(m)),onOpenPanel:m=>P((0,o.NE)(m)),trackDismiss:m=>P((0,T.o1)("dismiss",m)),trackEngage:m=>P((0,T.o1)("engage",m))}),M=(0,e.connect)(null,F)(B)},631444:(ce,G,t)=>{t.d(G,{A:()=>h});var e=t(224191),s=t(804797),o=t(887944),T=t(63696),a=t(362688),d=t.n(a),n=t(886550),E=t(312854),c=t(272057),f=t(982005),L=t(545290),N=t(429195),I=t(893006),x=Object.defineProperty,r=(C,O,k)=>O in C?x(C,O,{enumerable:!0,configurable:!0,writable:!0,value:k}):C[O]=k,y=(C,O,k)=>(r(C,typeof O!="symbol"?O+"":O,k),k);const l=n.Ay.div`
134  display: flex;
135  flex-flow: column nowrap;
136  ${C=>C.hideOnPortrait?(0,L.oS)`display: none;`:""}
137`,i=n.Ay.div`
138  align-items: center;
139  display: flex;
140  ${L.x_}
141  flex-flow: row nowrap;
142`,u=n.Ay.div`
143  align-items: center;
144  height: 100%;
145`,b=n.Ay.span`
146  margin-left: 10px;
147`,D=n.Ay.div`
148  background-color: black;
149  background-image: url("${C=>C.imageUrl}");
150  background-position: center center;
151  background-repeat: no-repeat;
152  background-size: cover;
153  display: inline-block;
154  height: 80px;
155  width: 120px;
156  ${C=>C.isMobile&&"max-width: 80px"}
157  display: flex;
158`,B=n.Ay.div`
159  display: flex;
160  flex-flow: row nowrap;
161`,F=n.Ay.div`
162  background-color: ${C=>(0,E.B3)((0,N.AOI)(C),.9)};
163  color: ${N.SP6};
164  display: flex;
165  flex-flow: row nowrap;
166  padding: 0 ${N.Emp};
167`,M=n.Ay.div`
168  padding: ${N.Emp} 10px ${N.Emp} 0;
169  display: flex;
170  align-items: center;
171`;class P extends T.Component{constructor(){super(...arguments),y(this,"handleDismiss",()=>{const{data:O,onDismiss:k,trackDismiss:Q}=this.props;Q(O),k(O.key)})}render(){const{data:{key:O,payload:{data:{broadcastId:k,views:Q},removeOnPortrait:S}},renderer:{ctaRenderer:J,description:U,imageUrl:j},isMobile:w}=this.props,Y=!!J,{overlayType:K}=this.props;return T.createElement(l,{hideOnPortrait:S},T.createElement(c.A,{broadcastId:k,broadcastKey:O,showEngaged:Y,views:Q}),T.createElement(B,null,T.createElement(F,{className:K,"data-testid":"overlayContainer"},T.createElement(M,null,T.createElement(f.A,{onClick:this.handleDismiss}
171)),T.createElement(i,null,j&&T.createElement(u,null,T.createElement(D,{imageUrl:j,isMobile:w})),T.createElement(b,null,U))),T.createElement(I.A,{broadcastId:k,broadcastKey:O,ctaRenderer:J,rawData:this.props.data})))}}y(P,"propTypes",{data:d().object.isRequired,isMobile:d().bool.isRequired,onDismiss:d().func.isRequired,overlayType:d().string.isRequired,renderer:d().shape({ctaRenderer:d().object,description:d().string,imageUrl:d().string}).isRequired,trackDismiss:d().func.isRequired});const m=C=>({onDismiss:O=>C((0,s.Zn)(O)),trackDismiss:O=>C((0,o.o1)("dismiss",O))}),h=(0,e.connect)(null,m)(P)},973800:(ce,G,t)=>{t.d(G,{A:()=>P});var e=t(224191),s=t(89649),o=t(804797),T=t(887944),a=t(63696),d=t(362688),n=t.n(d),E=t(886550),c=t(545290),f=t(312854),L=t(982005),N=t(272057),I=t(429195),x=Object.defineProperty,r=(m,h,C)=>h in m?x(m,h,{enumerable:!0,configurable:!0,writable:!0,value:C}):m[h]=C,y=(m,h,C)=>(r(m,typeof h!="symbol"?h+"":h,C),C);const l=(0,E.Ay)(L.A)`
172  color: ${m=>(0,f.B3)((0,I.SP6)(m),.5)};
173`,i=E.Ay.div.attrs(()=>({type:"button"}))`
174  cursor: pointer;
175`,u=E.Ay.div`
176  display: flex;
177  flex-flow: column nowrap;
178`,b=E.Ay.div`
179  display: flex;
180  flex-flow: row nowrap;
181  align-items: stretch;
182  height: 250px;
183  width: 235px;
184  ${c.Qr}
185`,D=E.Ay.div`
186  width: 35px;
187  font-size: 18px;
188  font-weight: lighter;
189  text-align: center;
190  padding-top: 8.5px; // Should this be changed?
191`,B=E.Ay.img`
192  width: 200px;
193  height: 250px;
194`;class F extends a.Component{constructor(){super(...arguments),y(this,"dismissOverlay",()=>{const{data:h,onDismiss:C,trackDismiss:O}=this.props;C(h.key),O(h)}),y(this,"openModal",()=>{const{data:h,data:{payload:{data:{broadcastId:C,post:O}}},onEngagedOverlay:k,onShowPost:Q,trackEngage:S}=this.props;k(C),S(h),Q(O)})}render(){var h,C;const{data:{key:O,payload:{data:{broadcastId:k,post:Q,views:S}}}}=this.props,J=(C=(h=Q?.images)==null?void 0:h.standardResolution)==null?void 0:C.url,{overlayType:U}=this.props;return a.createElement(u,null,a.createElement(N.A,{broadcastId:k,broadcastKey:O,showEngaged:!0,views:S}),a.createElement(b,{className:U},a.createElement(D,null,a.createElement(l,{onClick:this.dismissOverlay})),a.createElement(i,{"data-testid":"overlay-button",onClick:this.openModal},J&&a.createElement(B,{src:J}))))}}y(F,"propTypes",{data:n().shape({key:n().string.isRequired,payload:n().object}).isRequired,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onShowPost:n().func.isRequired,overlayType:n().string.isRequired,trackDismiss:n().func.isRequired,trackEngage:n().func.isRequired});const M=m=>({onDismiss:h=>m((0,o.Zn)(h)),onEngagedOverlay:h=>m((0,o.Ks)(h)),onShowPost:h=>m((0,s.to)({data:h,kind:"instagram"})),trackDismiss:h=>m((0,T.o1)("dismiss",h)),trackEngage:h=>m((0,T.o1)("engage",h))}),P=(0,e.connect)(null,M)(F)},334728:(ce,G,t)=>{t.d(G,{A:()=>b});var e=t(224191),s=t(804797),o=t(887944),T=t(287483),a=t(463302),d=t(63696),n=t(362688),E=t.n(n),c=t(886550),f=t(893006),L=t(491160),N=Object.defineProperty,I=(D,B,F)=>B in D?N(D,B,{enumerable:!0,configurable:!0,writable:!0,value:F}):D[B]=F,x=(D,B,F)=>(I(D,typeof B!="symbol"?B+"":B,F),F);const r=c.Ay.div`
195  width: auto;
196`,y=c.Ay.img`
197  display: inline-block;
198  max-height: 360px;
199  max-width: 100%;
200  vertical-align: bottom;
201  cursor: pointer;
202  margin-top: 7px;
203`;class l extends d.Component{constructor(){super(...arguments),x(this,"state",{engaged:0}),x(this,"dismissOverlay",()=>{const{data:B,onDismiss:F}=this.props,{key:M}=B;F(M)}),x(this,"onValue",B=>{var F;const{engaged:M}=((F=B?.data)==null?void 0:F.state)||{},{engaged:P}=this.state;P!==M&&this.setState({engaged:M})})}render(){const{data:{key:B,payload:{data:{broadcastId:F,views:M}}},renderer:{ctaRenderer:P,imageUrl:m,overlayId:h},isAdmin:C,isVideoOnlyMode:O,onDismiss:k,trackDismiss:Q}=this.props,J=!!P?P.message:"";if(O)return d.createElement(r,{className:this.props.overlayType},d.createElement(y,{src:m}));if(!m)return null;const U=B?.startsWith("preview");return d.createElement(r,{className:this.props.overlayType},d.createElement(L.A,{broadcastId:F,data:this.props.data,defaultState:{engaged:0},isAdmin:C,onDismiss:k,overlayType:"lower_third",showPreview:U,trackDismiss:Q,views:M}),d.createElement(f.A,{broadcastId:F,broadcastKey:B,ctaRenderer:P,message:J,overlayId:h,rawData:this.props.data},d.createElement(y,{src:m})))}}x(l,"propTypes",{data:E().shape({key:E().string.isRequired,payload:E().shape({data:E().object.isRequired}).isRequired}).isRequired,isAdmin:E().bool.isRequired,isVideoOnlyMode:E().bool.isRequired,onDismiss:E().func.isRequired,overlayType:E().string.isRequired,renderer:E().object.isRequired,trackDismiss:E().func.isRequired});const i=D=>({isAdmin:(0,a.N6)(D),isVideoOnlyMode:(0,T.Rc)(D)}),u=D=>({onDismiss:B=>D((0,s.Zn)(B)),trackDismiss:B=>D((0,o.o1)("dismiss",B))}),b=(0,e.connect)(i,u)(l)},73335:(ce,G,t)=>
203{t.d(G,{A:()=>k});var e=t(224191),s=t(804797),o=t(887944),T=t(63696),a=t(362688),d=t.n(a),n=t(886550),E=t(272057),c=t(41989),f=t(545290),L=t(893006),N=t(429195),I=Object.defineProperty,x=(Q,S,J)=>S in Q?I(Q,S,{enumerable:!0,configurable:!0,writable:!0,value:J}):Q[S]=J,r=(Q,S,J)=>(x(Q,typeof S!="symbol"?S+"":S,J),J);const y=({dark:Q})=>Q?"white":"black",l=({dark:Q})=>Q?N.O49:"white",i=({length:Q})=>`${Q<58?60:90}%`,u=({length:Q})=>`${Q<58?30:43}%`,b=({length:Q})=>`${Q<58?240:300}px`,D=n.Ay.div`
204  display: flex;
205  flex-flow: column nowrap;
206  margin-left: 20px;
207  margin-bottom: 24px;
208  width: 100%;
209  ${Q=>Q.hideOnPortrait?(0,f.oS)`display: none;`:""}
210`,B=n.Ay.div`
211  display: flex;
212  flex-flow: row nowrap;
213`,F=n.Ay.div`
214  background-color: ${l};
215  color: ${y};
216  font-size: 18px;
217  line-height: 1;
218  display: flex;
219  flex-direction: column;
220  position: relative;
221  border-radius: 4px;
222  width: ${u};
223  min-width: ${b};
224  padding: 13px 19px;
225  word-break: break-word;
226  & button {
227    color: ${y};
228  }
229  &:after {
230    position: absolute;
231    bottom: -25px;
232    width: 0;
233    height: 0;
234    border-style: solid;
235    border-width: 20px 15px 14px 15px;
236    border-color: ${l} transparent transparent;
237    content: "";
238  }
239  ${(0,f.nD)`
240    ${f._i}
241    width: ${i};
242    ${f.k2}
243  `}
244`,M=(0,n.Ay)(E.A)`
245  flex-flow: row wrap;
246  width: ${u};
247  height: auto;
248  padding-bottom: 4px;
249  margin-bottom: -4px;
250  border-radius: 4px 4px 0 0;
251  ${(0,f.nD)`
252    width: ${i};
253  `}
254`,P=n.Ay.footer`
255  display: ${Q=>Q.editing?"flex":"none"};
256  flex-direction: row-reverse;
257  width: 100%;
258`,m=n.Ay.span`
259  ${f._i}
260  color: #aaa;
261`;class h extends T.Component{constructor(){super(...arguments),r(this,"handleDismiss",()=>{const{data:S,onDismiss:J,trackDismiss:U}=this.props;U(S),J(S.key)})}render(){const{data:{key:S,payload:{data:{broadcastId:J,views:U,theme:j},removeOnPortrait:w}},editing:Y,endUserT:K,renderer:{ctaRenderer:q,message:ae,overlayId:le,theme:fe}}=this.props,Le=!!q,{overlayType:Ce}=this.props;return T.createElement(D,{hideOnPortrait:w},T.createElement(M,{broadcastId:J,broadcastKey:S,length:ae.length,showEngaged:Le,views:U}),T.createElement(B,null,T.createElement(F,{className:Ce,dark:(fe||j)==="dark","data-testid":"overlayContainer",length:ae.length},T.createElement("span",null,K([c.Rq.overlayText,{overlayId:le}])||ae),T.createElement(L.A,{broadcastId:J,broadcastKey:S,ctaRenderer:q,message:ae,overlayId:le,overlayType:"message",rawData:this.props.data}),T.createElement(P,{editing:Y},T.createElement(m,null,`${ae.length}/140`)))))}}r(h,"propTypes",{data:d().object.isRequired,editing:d().bool.isRequired,endUserT:d().func.isRequired,onDismiss:d().func.isRequired,overlayType:d().string.isRequired,renderer:d().shape({ctaRenderer:d().object,message:d().string,theme:d().string}).isRequired,trackDismiss:d().func.isRequired});const C=(0,c.N5)(h),O=Q=>({onDismiss:S=>Q((0,s.Zn)(S)),trackDismiss:S=>Q((0,o.o1)("dismiss",S))}),k=(0,e.connect)(null,O)(C)},893006:(ce,G,t)=>{t.d(G,{A:()=>Bn});var e=t(224191),s=t(887944),o=t(804797),T=t(287483),a=t(63696),d=t(362688),n=t.n(d),E=t(88
2616550),c=t(545290),f=t(6921),L=t(41989),N=Object.defineProperty,I=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,y=(V,g,R)=>g in V?N(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,l=(V,g)=>{for(var R in g||(g={}))x.call(g,R)&&y(V,R,g[R]);if(I)for(var R of I(g))r.call(g,R)&&y(V,R,g[R]);return V},i=(V,g,R)=>(y(V,typeof g!="symbol"?g+"":g,R),R);const u=E.Ay.div`
262  ${c.Qr}
263  display: flex;
264  flex-flow: row nowrap;
265  align-items: center;
266  justify-content: center;
267  height: 100%;
268  padding: 10px;
269  ${c.rS}
270  font-size: 18px;
271  font-weight: 700;
272  text-transform: uppercase;
273`;class b extends a.Component{constructor(){super(...arguments),i(this,"handleOnClick",()=>{const{onDismiss:g,onEngagedOverlay:R}=this.props;R(),g()})}render(){const{children:g,ctaRenderer:{channelSlug:R},endUserT:Ne,testId:qe}=this.props,rt=R?f.A:"div",ft=R?{onClick:this.handleOnClick,plain:!0,slug:R}:{};return a.createElement(rt,l({"data-testid":qe},ft),g||a.createElement(u,null,a.createElement("span",null,Ne([L.Rq.overlayCtaGoToChannel,{variables:{slug:R}}],["GO_TO_CHANNEL_SLUG",{slug:R}]))))}}i(b,"propTypes",{children:n().node,ctaRenderer:n().shape({channelSlug:n().string}).isRequired,endUserT:n().func.isRequired,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,testId:n().string}),i(b,"defaultProps",{children:void 0,testId:void 0});const D=(0,L.N5)(b);var B=t(218938),F=t(89649),M=Object.defineProperty,P=(V,g,R)=>g in V?M(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,m=(V,g,R)=>(P(V,typeof g!="symbol"?g+"":g,R),R);const h=E.Ay.div`
274  cursor: pointer;
275`,C=E.Ay.div`
276  ${c.Qr}
277  display: flex;
278  flex-grow: 1;
279  flex-flow: row nowrap;
280  align-items: center;
281  justify-content: center;
282  height: 100%;
283  padding: 5px;
284  ${c.rS}
285  font-size: 18px;
286  font-weight: 700;
287  text-transform: uppercase;
288`;class O extends a.Component{constructor(){super(...arguments),m(this,"onLogInClick",()=>{const{loggedIn:g,onDismiss:R,onEngagedOverlay:Ne,onLogInClick:qe}=this.props;g||qe(),Ne(),R()})}render(){const{children:g,endUserT:R,testId:Ne}=this.props;return a.createElement(h,{"data-testid":Ne,onClick:this.onLogInClick},g||a.createElement(C,null,R([L.Rq.overlayCtaLogin],["ACTION_LOG_IN"])))}}m(O,"propTypes",{children:n().node,endUserT:n().func.isRequired,loggedIn:n().bool.isRequired,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onLogInClick:n().func.isRequired,testId:n().string}),m(O,"defaultProps",{children:void 0,testId:void 0});const k=(0,L.N5)(O),Q=V=>({loggedIn:(0,B.M3)(V)}),S=V=>({onLogInClick:()=>{V((0,F.JT)())}}),J=(0,e.connect)(Q,S)(k);var U=t(472661),j=Object.defineProperty,w=(V,g,R)=>g in V?j(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,Y=(V,g,R)=>(w(V,typeof g!="symbol"?g+"":g,R),R);const K=E.Ay.div`
289  cursor: pointer;
290`,q=E.Ay.div`
291  ${c.Qr}
292  display: flex;
293  flex-flow: row nowrap;
294  align-items: center;
295  justify-content: center;
296  height: 100%;
297  padding: 5px;
298  ${c.rS}
299  font-size: 18px;
300  font-weight: 700;
301  text-transform: uppercase;
302`;class ae extends a.Component{constructor(){super(...arguments),Y(this,"onOpenPanelClick",()=>{const{ctaRenderer:{groupId:g},onEngagedOverlay:R,onOpenPanel:Ne}=this.props;R(),g&&Ne({doc:{renderer:{groups:[{id:g}],panelType:"peopleGroups"}}})})}render(){const{children:g,ctaRenderer:{text:R},endUserT:Ne,overlayId:qe,testId:rt}=this.props;return a.createElement(K,{"data-testid":rt,onClick:this.onOpenPanelClick},g||a.createElement(q,null,Ne([L.Rq.overlayCtaText,{overlayId:qe}])||R))}}Y(ae,"propTypes",{children:n().node,ctaRenderer:n().shape({groupId:n().string,text:n().string}).isRequired,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onOpenPanel:n().func.isRequired,overlayId:n().string.isRequired,testId:n().string}),Y(ae,"defaultProps",{children:void 0,testId:void 0});const le=(0,L.N5)(ae),fe=V=>({onOpenPanel:g=>V((0,U.NE)(g))}),Le=(0,e.connect)(null,fe)(le);var Ce=t(283722),Qe=t(89006),se=t(429195),ge=t(312854),pe=Object.defineProperty,Re=(V,g,R)=>g in V?pe(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,we=(V,g,R)=>(Re(V,typeof g!="symbol"?g+"":g,R),R);const mt=E.Ay.div`
303  cursor: pointer;
304`,Ue=E.Ay.div`
305  background-color: ${se.QMr};
306  display: flex;
307  flex-flow: row nowrap;
308  align-items: center;
309  justify-content: center;
310  height: 100%;
311  ${c.rS}
312  height: 100%;
313  font-size: 18px;
314  font-weight: 700;
315  text-transform: uppercase;
316  color: ${(0,ge.bw)(se.QMr)};
317`,Ee=(0,E.Ay)(Ce.Ay)`
318  padding: 5px;
319`,We=E.Ay.div`
320  padding-right: 5px;
321`;class Be extends a.Component{constructor(){super(...arguments),we(this,"onBeforeShare",async()=>{const{onEngagedOverlay:g}=this.props;g()})}render(){const{children:g,endUserT:R,referralId:Ne,testId:qe}=this.props,rt=(0,s.jG)(Ne);return a.createElement(mt,{"data-testid":qe},a.createElement(Qe.uI,{beforeOnClick:this.onBeforeShare,url:rt},g||a.createElement(Ue,null,a.createElement(Ee,{name:"facebook-squared"}),a.createElement(We,null,R([L.Rq.overlayCtaShare],["SHARE"])))))}}
321we(Be,"propTypes",{children:n().node,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,referralId:n().string.isRequired,testId:n().string}),we(Be,"defaultProps",{children:void 0,testId:void 0});const _e=(0,L.N5)(Be);var tt=t(368909),It=t(221196),he=t.n(It),ye=t(204388),Oe=Object.defineProperty,Ct=(V,g,R)=>g in V?Oe(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,et=(V,g,R)=>(Ct(V,typeof g!="symbol"?g+"":g,R),R);const nt=E.Ay.div`
322  cursor: pointer;
323`,X=E.Ay.div`
324  ${c.Qr}
325  display: flex;
326  flex-flow: row nowrap;
327  align-items: center;
328  justify-content: center;
329  height: 100%;
330  padding: 5px;
331  ${c.rS}
332  font-size: 18px;
333  font-weight: 700;
334  text-transform: uppercase;
335`;class oe extends a.Component{constructor(){super(...arguments),et(this,"onOpenPanelClick",()=>{const{ctaRenderer:{panelId:g},endUserT:R,isLandscape:Ne,isMobileLayout:qe,onEngagedOverlay:rt,onOpenPanel:ft,onAddMessageOverlay:$t}=this.props;if(rt(),g&&(ft({id:g}),qe&&Ne&&(0,ye.cq)(se.eL1).matches)){const Ft=R([L.Rq.overlayRotatePhone],["ADMIN_OVERLAYS_ROTATE_YOUR_PHONE"]),Wt={key:he().generate(),payload:{data:{duration:15,kind:"message",message:Ft,trackName:"Message: Please rotate your phone"},removeOnPortrait:!0}};$t(Wt)}})}render(){const{children:g,ctaRenderer:{text:R},endUserT:Ne,overlayId:qe,testId:rt}=this.props;return a.createElement(nt,{"data-testid":rt,onClick:this.onOpenPanelClick},g||a.createElement(X,null,Ne([L.Rq.overlayCtaText,{overlayId:qe}])||R))}}et(oe,"propTypes",{children:n().node,ctaRenderer:n().shape({panelId:n().string,text:n().string}).isRequired,endUserT:n().func.isRequired,isLandscape:n().bool.isRequired,isMobileLayout:n().bool.isRequired,onAddMessageOverlay:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onOpenPanel:n().func.isRequired,overlayId:n().string.isRequired,testId:n().string}),et(oe,"defaultProps",{children:void 0,testId:void 0});const _=(0,L.N5)(oe),Ae=V=>({onAddMessageOverlay:g=>V((0,o.Eu)(g)),onOpenPanel:g=>V((0,U.NE)(g))}),be=V=>({isLandscape:(0,tt.Yg)(V),isMobileLayout:(0,tt.VC)(V)}),ke=(0,e.connect)(be,Ae)(_);var Ot=Object.defineProperty,vt=(V,g,R)=>g in V?Ot(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,ut=(V,g,R)=>(vt(V,typeof g!="symbol"?g+"":g,R),R);const gt=E.Ay.div`
336  cursor: pointer;
337`,Fe=E.Ay.div`
338  ${c.Qr}
339  display: flex;
340  flex-flow: row nowrap;
341  align-items: center;
342  justify-content: center;
343  height: 100%;
344  padding: 5px;
345  ${c.rS}
346  font-size: 18px;
347  font-weight: 700;
348  text-transform: uppercase;
349`;class Ke extends a.Component{constructor(){super(...arguments),ut(this,"onOpenPanelClick",()=>{const{ctaRenderer:{personId:g},onEngagedOverlay:R,onOpenPanel:Ne}=this.props;R(),g&&Ne({doc:{renderer:{panelType:"peopleGroups",people:[{id:g}]}}})})}render(){const{children:g,ctaRenderer:{text:R},endUserT:Ne,overlayId:qe,testId:rt}=this.props;return a.createElement(gt,{"data-testid":rt,onClick:this.onOpenPanelClick},g||a.createElement(Fe,null,Ne([L.Rq.overlayCtaText,{overlayId:qe}])||R))}}ut(Ke,"propTypes",{children:n().node,ctaRenderer:n().shape({personId:n().string,text:n().string}).isRequired,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onOpenPanel:n().func.isRequired,overlayId:n().string.isRequired,testId:n().string}),ut(Ke,"defaultProps",{children:void 0,testId:void 0});const at=(0,L.N5)(Ke),De=V=>({onOpenPanel:g=>V((0,U.NE)(g))}),dt=(0,e.connect)(null,De)(at);var Ve=t(619545),Xe=Object.defineProperty,Dt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,Lt=(V,g,R)=>g in V?Xe(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,ct=(V,g)=>{for(var R in g||(g={}))Et.call(g,R)&&Lt(V,R,g[R]);if(Dt)for(var R of Dt(g))At.call(g,R)&&Lt(V,R,g[R]);return V},Pt=(V,g,R)=>(Lt(V,typeof g!="symbol"?g+"":g,R),R);const Bt=E.Ay.div`
350  ${c.Qr}
351  display: flex;
352  flex-flow: row nowrap;
353  align-items: center;
354  justify-content: center;
355  height: 100%;
356  padding: 5px;
357  ${c.rS}
358  font-size: 18px;
359  font-weight: 700;
360  text-transform: uppercase;
361  color: ${se.Jzj};
362`;class Vt extends a.Component{render(){const{children:g,ctaRenderer:{linkText:R,linkUrl:Ne},endUserT:qe,onEngagedOverlay:rt,overlayId:ft,testId:$t}=this.props,Ft=Ne?Ve.A:"div",Wt=Ne?{href:Ne,onClick:rt,plain:!0}:{};
362return a.createElement(Ft,ct({"data-testid":$t},Wt),g||a.createElement(Bt,null,qe([L.Rq.overlayCtaText,{overlayId:ft}])||R))}}Pt(Vt,"propTypes",{children:n().node,ctaRenderer:n().shape({linkText:n().string,linkUrl:n().string}).isRequired,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,overlayId:n().string.isRequired,testId:n().string}),Pt(Vt,"defaultProps",{children:void 0,testId:void 0});const Xt=(0,L.N5)(Vt);var Mt=Object.defineProperty,Jt=(V,g,R)=>g in V?Mt(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,Ie=(V,g,R)=>(Jt(V,typeof g!="symbol"?g+"":g,R),R);const Je=E.Ay.div`
363  cursor: pointer;
364  display: flex;
365  align-items: center;
366  max-width: 90px;
367`,Rt=E.Ay.div`
368  ${c.Qr}
369  display: flex;
370  flex-flow: row nowrap;
371  align-items: center;
372  justify-content: center;
373  height: 100%;
374  padding: 5px;
375  ${c.rS};
376  font-size: 18px;
377  font-weight: 700;
378  text-transform: uppercase;
379`,He=E.Ay.span`
380  text-align: center;
381  padding-top: 5px;
382`;class Nt extends a.Component{constructor(){super(...arguments),Ie(this,"onOpenPanelClick",()=>{const{ctaRenderer:g,isLandscape:R,isMobileLayout:Ne,onEngagedOverlay:qe,onOpenPanel:rt,onAddMessageOverlay:ft}=this.props,{playerId:$t,playerData:Ft}=g;if(qe(),$t&&(rt({doc:{renderer:{panelType:"playerStats",playerData:Ft,playerId:$t}}}),Ne&&R&&(0,ye.cq)(se.eL1).matches)){const Wt={key:he().generate(),payload:{data:{duration:15,kind:"message",message:"Please rotate your phone",trackName:"Message: Please rotate your phone"},removeOnPortrait:!0}};ft(Wt)}})}render(){const{children:g,endUserT:R,testId:Ne}=this.props;return a.createElement(Je,{"data-testid":Ne,onClick:this.onOpenPanelClick},g||a.createElement(Rt,null,a.createElement(He,null,R([L.Rq.overlayCtaViewStats],["VIEW_STATS"]))))}}Ie(Nt,"propTypes",{children:n().node,ctaRenderer:n().shape({playerData:n().object,playerId:n().string}).isRequired,endUserT:n().func.isRequired,isLandscape:n().bool.isRequired,isMobileLayout:n().bool.isRequired,onAddMessageOverlay:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onOpenPanel:n().func.isRequired,testId:n().string}),Ie(Nt,"defaultProps",{children:void 0,testId:void 0});const wt=(0,L.N5)(Nt),Ut=V=>({onAddMessageOverlay:g=>V((0,o.Eu)(g)),onOpenPanel:g=>V((0,U.NE)(g))}),zt=V=>({isLandscape:(0,tt.Yg)(V),isMobileLayout:(0,tt.VC)(V)}),Zt=(0,e.connect)(zt,Ut)(wt);var dn=t(156794),yt=Object.defineProperty,pt=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,Kt=Object.prototype.propertyIsEnumerable,_t=(V,g,R)=>g in V?yt(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,jt=(V,g)=>{for(var R in g||(g={}))ht.call(g,R)&&_t(V,R,g[R]);if(pt)for(var R of pt(g))Kt.call(g,R)&&_t(V,R,g[R]);return V},hn=(V,g,R)=>(_t(V,typeof g!="symbol"?g+"":g,R),R);const xn=E.Ay.div`
383  ${c.Qr}
384  display: flex;
385  flex-flow: row nowrap;
386  align-items: center;
387  justify-content: center;
388  height: 100%;
389  padding: 5px;
390  ${c.rS}
391  font-size: 18px;
392  font-weight: 700;
393  text-transform: uppercase;
394`;class kt extends a.Component{render(){const{children:g,ctaRenderer:{text:R,videoId:Ne},endUserT:qe,onEngagedOverlay:rt,overlayId:ft,testId:$t}=this.props,Ft=Ne?dn.A:"div",Wt=Ne?{onClick:rt,plain:!0,tag:Ne}:{};return a.createElement(Ft,jt({"data-testid":$t},Wt),g||a.createElement(xn,null,qe([L.Rq.overlayCtaText,{overlayId:ft}])||R))}}hn(kt,"propTypes",{children:n().node,ctaRenderer:n().shape({text:n().string,videoId:n().string}).isRequired,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,overlayId:n().string.isRequired,testId:n().string}),hn(kt,"defaultProps",{children:void 0,testId:void 0});const qt=(0,L.N5)(kt);var cn=t(867678),rn=t.n(cn),mn=Object.defineProperty,un=(V,g,R)=>g in V?mn(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,z=(V,g,R)=>(un(V,typeof g!="symbol"?g+"":g,R),R);const $=E.Ay.div`
395  background-color: ${se.R8I};
396  display: flex;
397  flex-flow: row nowrap;
398  align-items: center;
399  justify-content: center;
400  height: 100%;
401  ${c.rS}
402  font-size: 18px;
403  font-weight: 700;
404  text-transform: uppercase;
405  color: ${se.SP6};
406`,ee=(0,E.Ay)(Ce.Ay)`
407  padding: 5px;
408`,en=E.Ay.div`
409  padding-right: 5px;
410`,tn=E.Ay.div``,nn=rn()(s.jG);class on extends a.Component{constructor(){super(...arguments),z(this,"onBeforeShare",async()=>{const{onEngagedOverlay:g}=this.props;g()})}render(){const{referralId:g,children:R,ctaRenderer:{tweetMessage:Ne},endUserT:qe,testId:rt}=this.props,ft=nn(g);return a.createElement(Qe.r6,{beforeOnClick:this.onBeforeShare,title:Ne,url:ft},a.createElement(tn,{"data-testid":rt},R||a.createElement($,null,a.createElement(ee,{name:"twitter"}),a.createElement(en,null,qe([L.Rq.overlayCtaTweet],["TWEET"])))))}}
410z(on,"propTypes",{children:n().node,ctaRenderer:n().shape({tweetMessage:n().string}).isRequired,endUserT:n().func.isRequired,onEngagedOverlay:n().func.isRequired,referralId:n().string.isRequired,testId:n().string}),z(on,"defaultProps",{children:void 0,testId:void 0});const pn=(0,L.N5)(on),ln=E.Ay.div`
411  ${c.Qr}
412  display: flex;
413  flex-flow: row nowrap;
414  align-items: center;
415  justify-content: center;
416  height: 100%;
417  padding: 5px;
418  ${c.rS}
419  font-size: 18px;
420  font-weight: 700;
421  text-transform: uppercase;
422`;class Tn extends a.Component{render(){const g="Visit www.maestro.io";return a.createElement("div",null,a.createElement(ln,null,g))}}var Qt=Object.defineProperty,Ht=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,On=(V,g,R)=>g in V?Qt(V,g,{enumerable:!0,configurable:!0,writable:!0,value:R}):V[g]=R,Rn=(V,g)=>{for(var R in g||(g={}))Ln.call(g,R)&&On(V,R,g[R]);if(Ht)for(var R of Ht(g))Nn.call(g,R)&&On(V,R,g[R]);return V},An=(V,g,R)=>(On(V,typeof g!="symbol"?g+"":g,R),R);const bn=E.Ay.div`
423  border-radius: 4px;
424  overflow: hidden;
425  align-self: flex-end;
426  margin-top: 14px;
427  & * {
428    ${c._i}
429    text-transform: none;
430  }
431  ${(0,c.PD)`
432    & * {
433      font-size: 18px;
434    }
435    & i {
436      padding-left: 0;
437      padding-top: 0;
438      padding-bottom: 0;
439    }
440    & > * {
441      ${({overlay:V})=>V==="facebook_share"?(0,E.AH)`
442        & > * > * {
443          padding: 4px 14px;
444        }
445      `:(0,E.AH)`
446        & > * {
447          padding: 4px 14px;
448        }
449      `}
450    }
451  `}
452`,Dn={facebook_share:_e,go_to_channel:D,login:J,open_link:Xt,play_video:qt,show_group:Le,show_panel:ke,show_person:dt,show_player_stats:Zt,tweet:pn},Mn={message:bn};class In extends a.Component{constructor(){super(...arguments),An(this,"handleEngaged",()=>{const{broadcastKey:g,broadcastId:R,dismissAfterEngage:Ne,onDismiss:qe,onEngagedOverlay:rt,trackOverlay:ft,rawData:$t}=this.props;R&&(ft($t),rt(R)),Ne&&qe(g)})}withWrapper(g){const{ctaRenderer:R,overlayType:Ne}=this.props,qe=Mn[Ne];return qe?a.createElement(qe,{overlay:R?.overlayCtaType},g):g}render(){const{ctaRenderer:g,children:R,broadcastId:Ne,broadcastKey:qe,isVideoOnlyMode:rt,message:ft,onDismiss:$t,overlayId:Ft}=this.props,Wt=Dn[g?.overlayCtaType],Vn=Wt||"span",Un=Wt?{broadcastId:Ne,ctaRenderer:g,message:ft,onDismiss:()=>$t(qe),onEngagedOverlay:this.handleEngaged,overlayId:Ft,referralId:`social_o_${Ne}`}:{};return this.withWrapper(rt?a.createElement(Tn,null):a.createElement(Vn,Rn({testId:"overlayCtaButton"},Un),R))}}An(In,"propTypes",{broadcastId:n().string,broadcastKey:n().string.isRequired,children:n().node,ctaRenderer:n().shape({overlayCtaType:n().string}),dismissAfterEngage:n().bool,isVideoOnlyMode:n().bool.isRequired,message:n().string,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,overlayId:n().string.isRequired,overlayType:n().string,rawData:n().object.isRequired,trackOverlay:n().func.isRequired}),An(In,"defaultProps",{broadcastId:"",children:void 0,ctaRenderer:void 0,dismissAfterEngage:!0,message:"",overlayType:""});const wn=V=>({isVideoOnlyMode:(0,T.Rc)(V)}),Gn=V=>({onDismiss:g=>V((0,o.Zn)(g)),onEngagedOverlay:g=>V((0,o.Ks)(g)),trackOverlay:g=>V((0,s.o1)("engage",g))}),Bn=(0,e.connect)(wn,Gn)(In)},122317:(ce,G,t)=>{t.d(G,{A:()=>m});var e=t(224191),s=t(887944),o=t(804797),T=t(463302),a=t(362688),d=t.n(a),n=t(63696),E=t(88
4526550),c=t(312854),f=t(86138),L=t(982005),N=t(429195),I=t(545290),x=Object.defineProperty,r=(h,C,O)=>C in h?x(h,C,{enumerable:!0,configurable:!0,writable:!0,value:O}):h[C]=O,y=(h,C,O)=>(r(h,typeof C!="symbol"?C+"":C,O),O);const l=E.Ay.div`
453  align-items: stretch;
454  background-color: ${h=>(0,c.B3)((0,N.AOI)(h),.9)};
455  color: ${N.SP6};
456  display: flex;
457  flex-flow: row nowrap;
458  & > :not(:first-child) {
459    margin-left: ${N.Emp};
460  }
461`,i=E.Ay.div`
462  padding: ${N.Emp};
463  padding-right: 0;
464`,u=E.Ay.div`
465  flex: 1 1 auto;
466  padding: ${N.Emp} 0;
467`,b=E.Ay.button.attrs({type:"button"})`
468  display: flex;
469  flex: 0 0 auto;
470  flex-flow: row nowrap;
471  align-items: center;
472  justify-content: center;
473  ${I.Qr};
474  padding: ${N.Emp};
475`,D=E.Ay.div`
476  color: ${h=>(0,c.B3)((0,N.SP6)(h),.9)};
477  display: flex;
478  flex-flow: row nowrap;
479  align-items: center;
480  justify-content: center;
481  font-style: italic;
482  padding: ${N.Emp} 0;
483`,B=E.Ay.div`
484  display: flex;
485  flex-flow: row nowrap;
486  align-items: center;
487  justify-content: center;
488  ${I.k2};
489  padding-left: 0;
490`;class F extends n.Component{constructor(){super(...arguments),y(this,"enterRaffle",()=>{const{onEnterClick:C,data:O,trackEngage:k}=this.props;C(O.payload.data.broadcastId),k(O,{action:"submit_entry"})}),y(this,"dismissRaffle",()=>{const{onDismiss:C,trackDismiss:O,data:k}=this.props;C(k.key),O(k)})}render(){const{data:{raffleStatus:C,timeRemaining:O=45},loggedIn:k}=this.props,Q=k?"RAFFLE_ACTIVE_LOGGED_IN":"RAFFLE_ACTIVE_LOGGED_OUT",{overlayType:S}=this.props;return n.createElement(l,{className:S},n.createElement(i,null,n.createElement(L.A,{onClick:this.dismissRaffle})),n.createElement(u,null,n.createElement(f.A,{stringKey:Q})),k&&!C&&n.createElement(b,{onClick:this.enterRaffle},n.createElement(f.A,{stringKey:"ACTION_ENTER_RAFFLE"})),C==="request"&&n.createElement(D,null,n.createElement(f.A,{stringKey:"RAFFLE_ENTRY_SUBMITTING"})),C==="success"&&n.createElement(D,null,n.createElement(f.A,{stringKey:"RAFFLE_ENTRY_SUCCESS"})),C==="failure"&&n.createElement(D,null,n.createElement(f.A,{stringKey:"RAFFLE_ENTRY_FAILURE"})),n.createElement(B,null,O))}}y(F,"propTypes",{data:d().shape({key:d().string.isRequired,payload:d().shape({data:d().shape({broadcastId:d().string}).isRequired}).isRequired,raffleStatus:d().string,timeRemaining:d().number.isRequired}).isRequired,loggedIn:d().bool.isRequired,onDismiss:d().func.isRequired,onEnterClick:d().func.isRequired,overlayType:d().string.isRequired,trackDismiss:d().func.isRequired,trackEngage:d().func.isRequired});const M=h=>({loggedIn:(0,T.M3)(h)}),P=h=>({onDismiss:C=>h((0,o.Zn)(C)),onEnterClick:C=>{h((0,o.Zj)(C))},trackDismiss:C=>h((0,s.o1)("dismiss",C)),trackEngage:(C,O)=>h((0,s.o1)("engage",C,O))}),m=(0,e.connect)(M,P)(F)},803966:(ce,G,t)=>{t.d(G,{A:()=>F});var e=t(224191),s=t(887944),o=t(804797),T=t(362688),a=t.n(T),d=t(63696),n=t(886550),E=t(312854),c=t(86138),f=t(982005),L=t(283722),N=t(429195),I=t(545290),x=Object.defineProperty,r=(M,P,m)=>P in M?x(M,P,{enumerable:!0,configurable:!0,writable:!0,value:m}):M[P]=m,y=(M,P,m)=>(r(M,typeof P!="symbol"?P+"":P,m),m);const l=n.Ay.div`
491  align-items: stretch;
492  background-color: ${M=>(0,E.B3)((0,N.AOI)(M),.9)};
493  color: ${N.SP6};
494  display: flex;
495  flex-flow: row nowrap;
496  & > :not(:first-child) {
497    margin-left: ${N.Emp};
498  }
499`,i=n.Ay.div`
500  padding: ${N.Emp};
501  padding-right: 0;
502`,u=n.Ay.div`
503  flex: 1 1 auto;
504  padding: ${N.Emp} 0;
505`,b=n.Ay.div`
506  display: flex;
507  flex-flow: row nowrap;
508  align-items: center;
509  justify-content: center;
510  ${I.k2};
511  padding-left: 0;
512`;class D extends d.Component{constructor(){super(...arguments),y(this,"dismissRaffle",()=>{const{onDismiss:P,trackDismiss:m,data:h}=this.props;P(h.key),m(h)})}render(){const{overlayType:P}=this.props;return d.createElement(l,{className:P},d.createElement(i,null,d.createElement(f.A,{onClick:this.dismissRaffle})),d.createElement(u,null,d.createElement(c.A,{stringKey:"RAFFLE_PICKING"})),d.createElement(b,null,d.createElement(L.Ay,{name:"spin2"})))}}y(D,"propTypes",{data:a().shape({key:a().string.isRequired}).isRequired,onDismiss:a().func.isRequired,overlayType:a().string.isRequired,trackDismiss:a().func.isRequired});const B=M=>({onDismiss:P=>M((0,o.Zn)(P)),trackDismiss:P=>M((0,s.o1)("dismiss",P))}),F=(0,e.connect)(null,B)(D)}
512,484996:(ce,G,t)=>{t.d(G,{A:()=>m});var e=t(224191),s=t(887944),o=t(89649),T=t(804797),a=t(463302),d=t(362688),n=t.n(d),E=t(63696),c=t(886550),f=t(312854),L=t(86138),N=t(982005),I=t(429195),x=t(545290),r=Object.defineProperty,y=(h,C,O)=>C in h?r(h,C,{enumerable:!0,configurable:!0,writable:!0,value:O}):h[C]=O,l=(h,C,O)=>(y(h,typeof C!="symbol"?C+"":C,O),O);const i=c.Ay.div`
513  align-items: stretch;
514  background-color: ${h=>(0,f.B3)((0,I.AOI)(h),.9)};
515  color: ${I.SP6};
516  display: flex;
517  flex-flow: row nowrap;
518  & > :not(:first-child) {
519    margin-left: ${I.Emp};
520  }
521`,u=c.Ay.div`
522  padding: ${I.Emp};
523  padding-right: 0;
524`,b=c.Ay.div`
525  flex: 1 1 auto;
526  padding: ${I.Emp} 0;
527`,D=c.Ay.button.attrs({type:"button"})`
528  display: flex;
529  flex: 0 0 auto;
530  flex-flow: row nowrap;
531  align-items: center;
532  justify-content: center;
533  ${x.Qr};
534  padding: ${I.Emp};
535`,B=c.Ay.div`
536  display: flex;
537  flex-flow: row nowrap;
538  align-items: center;
539  justify-content: center;
540  ${x.k2};
541  padding-left: 0;
542`;class F extends E.Component{constructor(){super(...arguments),l(this,"dismissRaffle",()=>{const{onDismiss:C,trackDismiss:O,data:k}=this.props;C(k.key),O(k)}),l(this,"engageRaffle",()=>{const{onLogInClick:C,data:O,trackEngage:k}=this.props;C(),k(O,{action:"login"})})}render(){const{data:{timeRemaining:C},loggedIn:O}=this.props,k=O?"RAFFLE_STARTING_LOGGED_IN":"RAFFLE_STARTING_LOGGED_OUT",{overlayType:Q}=this.props;return E.createElement(i,{className:Q},E.createElement(u,null,E.createElement(N.A,{onClick:this.dismissRaffle})),E.createElement(b,null,E.createElement(L.A,{stringKey:k})),!O&&E.createElement(D,{onClick:this.engageRaffle},E.createElement(L.A,{stringKey:"ACTION_LOG_IN"})),E.createElement(B,null,C))}}l(F,"propTypes",{data:n().shape({key:n().string.isRequired,timeRemaining:n().number.isRequired}).isRequired,loggedIn:n().bool.isRequired,onDismiss:n().func.isRequired,onLogInClick:n().func.isRequired,overlayType:n().string.isRequired,trackDismiss:n().func.isRequired,trackEngage:n().func.isRequired});const M=h=>({loggedIn:(0,a.M3)(h)}),P=h=>({onDismiss:C=>h((0,T.Zn)(C)),onLogInClick:()=>h((0,o.JT)()),trackDismiss:(C,O)=>h((0,s.o1)("dismiss",C,O)),trackEngage:(C,O)=>h((0,s.o1)("engage",C,O))}),m=(0,e.connect)(M,P)(F)},433426:(ce,G,t)=>{t.d(G,{A:()=>P});var e=t(224191),s=t(887944),o=t(463302),T=t(804797),a=t(362688),d=t.n(a),n=t(63696),E=t(88
5426550),c=t(312854),f=t(86138),L=t(982005),N=t(283722),I=t(429195),x=t(545290),r=Object.defineProperty,y=(m,h,C)=>h in m?r(m,h,{enumerable:!0,configurable:!0,writable:!0,value:C}):m[h]=C,l=(m,h,C)=>(y(m,typeof h!="symbol"?h+"":h,C),C);const i=E.Ay.div`
543  align-items: stretch;
544  background-color: ${m=>(0,c.B3)((0,I.AOI)(m),.9)};
545  color: ${I.SP6};
546  display: flex;
547  flex-flow: row nowrap;
548  & > :not(:first-child) {
549    margin-left: ${I.Emp};
550  }
551`,u=E.Ay.div`
552  padding: ${I.Emp};
553  padding-right: 0;
554`,b=E.Ay.div`
555  flex: 1 1 auto;
556  padding: ${I.Emp} 0;
557`,D=E.Ay.div`
558  color: ${m=>(0,c.B3)((0,I.SP6)(m),.9)};
559  display: flex;
560  flex-flow: row nowrap;
561  align-items: center;
562  justify-content: center;
563  ${x.k2};
564  padding-left: 0;
565`;class B extends n.Component{constructor(){super(...arguments),l(this,"dismissRaffle",()=>{const{onDismiss:h,trackDismiss:C,data:O}=this.props;h(O.key),C(O)})}render(){const{userId:h}=this.props,{reward:C,winner:O}=this.props.data.payload.data,{_id:k,name:Q}=O,S=k===h,{overlayType:J}=this.props;return n.createElement(i,{className:J},n.createElement(u,null,n.createElement(L.A,{onClick:this.dismissRaffle})),n.createElement(b,null,S&&n.createElement(f.A,{stringKey:"RAFFLE_WINNER_YOU"}),!S&&k&&n.createElement(n.Fragment,null,Q," ",n.createElement(f.A,{stringKey:"RAFFLE_WINNER_OTHER_FRAGMENT"})),!S&&!k&&n.createElement(f.A,{stringKey:"RAFFLE_WINNER_NOBODY"})),n.createElement(D,null,k&&n.createElement(n.Fragment,null,n.createElement(N.Ay,{name:"award"})," ",n.createElement(f.A,{stringKey:"RAFFLE_WINNER_REWARD_PREFIX"})," ",C?n.createElement("span",null,C):n.createElement(f.A,{stringKey:"RAFFLE_WINNER_REWARD_DEFAULT"}))))}}l(B,"propTypes",{data:d().shape({key:d().string.isRequired,payload:d().shape({data:d().shape({reward:d().string,winner:d().shape({_id:d().string,name:d().string})}).isRequired}).isRequired}).isRequired,onDismiss:d().func.isRequired,overlayType:d().string.isRequired,trackDismiss:d().func.isRequired,userId:d().string}),l(B,"defaultProps",{userId:{}});const F=m=>({userId:(0,o.F6)(m)||null}),M=m=>({onDismiss:h=>m((0,T.Zn)(h)),trackDismiss:h=>m((0,s.o1)("dismiss",h))}),P=(0,e.connect)(F,M)(B)},472946:(ce,G,t)=>{t.d(G,{A:()=>Qe});var e=t(224191),s=t(89649),o=t(804797),T=t(887944),a=t(63696),d=t(362688),n=t.n(d),E=t(86138),c=t(619545),f=t(283722),L=t(272057),N=t(886550),I=t(380862),x=t(312854),r=t(545290),y=t(982005),l=t(429195);const i=N.Ay.div`
566  background-color: ${se=>(0,x.B3)((0,l.AOI)(se),.9)};
567  display: flex;
568  ${r.x_}
569`,u=(0,N.Ay)(i)`
570  background-image: ${se=>`url("${se.url}")`};
571  background-position: center;
572  background-size: cover;
573  height: 200px;
574  position: relative;
575  width: 500px;
576`,b=N.Ay.div`
577  align-items: center;
578  cursor: pointer;
579  display: flex;
580  flex-shrink: 0;
581  font-size: 18px;
582  justify-content: center;
583  width: 45px;
584`,D=N.Ay.div`
585  background-color: ${l.F_r};
586  cursor: pointer;
587  padding-top: 5px;
588  text-align: center;
589  width: 35px;
590`,B=(0,N.Ay)(y.A)`
591  color: ${se=>(0,x.B3)((0,x.bw)((0,l.AOI)(se)),.5)};
592`,F=(0,N.Ay)(B)`
593  color: ${se=>(0,x.B3)((0,x.bw)((0,l.F_r)(se)),.5)};
594`,M=N.Ay.div`
595  padding-top: 10px;
596  padding-right: 10px;
597  padding-bottom: 10px;
598`,P=(0,N.Ay)(M)`
599  background-color: ${se=>(0,x.B3)((0,l.AOI)(se),.7)};
600  color: ${se=>(0,x.bw)((0,l.F_r)(se))};
601  padding: 10px;
602  position: absolute;
603  bottom: 0;
604  left: 35px;
605`,m=N.Ay.span`
606  padding-right: 5px;
607`,h=(0,N.Ay)(f.Ay).attrs({name:"twitter"})`
608  color: ${l.mrt};
609`,C=N.Ay.div`
610  text-transform: uppercase;
611  font-size: 18px;
612  height: 100%;
613  flex-shrink: 0;
614  display: flex;
615  align-items: center;
616  justify-content: center;
617  padding: 10px;
618  ${r.EU}
619`,O=(0,N.Ay)(I.Ay).attrs({properties:{target:"_blank"}})`
620  white-space: pre-wrap;
621  & > a {
622    ${r.Nt}
623  }
624`,k=N.Ay.div`
625  display: flex;
626  flex-flow: column nowrap;
627`;var Q=Object.defineProperty,S=Object.defineProperties,J=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable,Y=(se,ge,pe)=>ge in se?Q(se,ge,{enumerable:!0,configurable:!0,writable:!0,value:pe}):se[ge]=pe,K=(se,ge)=>{for(var pe in ge||(ge={}))j.call(ge,pe)&&Y(se,pe,ge[pe]);if(U)for(var pe of U(ge))w.call(ge,pe)&&Y(se,pe,ge[pe]);return se},q=(se,ge)=>S(se,J(ge)),ae=(se,ge,pe)=>(Y(se,typeof ge!="symbol"?ge+"":ge,pe),pe);const le="https://twitter.com/intent/retweet?tweet_id=",fe="https://twitter.com/";class Le extends a.Component{constructor(){super(...arguments),ae(this,"dismissOverlay",ge=>{const{data:{key:pe},onDismiss:Re,trackDismiss:we}=this.props;Re(pe),we(this.props.data),ge.stopPropagation()}),ae(this,"openModal",ge=>{if(ge.target!==ge.currentTarget)return;const{data:pe,onEngagedOverlay:Re,onShowPost:we,trackEngage:mt}=this.props,{payload:{data:{broadcastId:Ue,renderer:Ee}}}=pe,{status:{id:We,mediaUrl:Be}}=Ee,_e=`${le}${We}`;Re(Ue),we({mediaUrl:Be,overlayData:pe,retweetUrl:_e}),mt(this.props.data,{action:"image"})}),ae(this,"onRetweetClick",()=>{const{data:{payload:{data:{broadcastId:ge}}},onEngagedOverlay:pe,trackEngage:Re,data:we}=this.props;Re(we,{action:"retweet"}),pe(ge)})}render(){var ge;const{data:{key:pe,payload:{data:{broadcastId:Re,renderer:we={},views:mt}}}}=this.props;let{status:Ue}=we;if(Ue=Ue||((ge=this.props.renderer)==null?void 0:ge.status),!Ue)return null;const{id:Ee,mediaUrl:We,text:Be,user:{screenName:_e}}=Ue,tt=`${le}${Ee}`,It=`${fe}${_e}`,he=We?u:i,ye=We?{onClick:this.openModal,url:We}:{},Oe=We?D:b,Ct=We?P:M,et=We?F:B,{overlayType:nt}=this.props;return a.createElement(k,null,a.createElement(L.A,{broadcastId:Re,broadcastKey:pe,showEngaged:!0,views:mt}),a.createElement(he,q(K({},ye),{className:nt}),a.createElement(Oe,{onClick:this.dismissOverlay},a.createElement(et,{onClick:()=>{}}
627)),a.createElement(Ct,null,a.createElement(h,null),a.createElement(c.A,{href:It},_e&&a.createElement(m,null,`@${_e}`)),a.createElement(O,null,Be)),!We&&a.createElement(c.A,{href:tt,onClick:X=>this.onRetweetClick(X,tt)},a.createElement(C,null,a.createElement(f.Ay,{name:"retweet"}),a.createElement(E.A,{stringKey:"RETWEET"})))))}}ae(Le,"propTypes",{data:n().shape({key:n().string,payload:n().object}).isRequired,onDismiss:n().func.isRequired,onEngagedOverlay:n().func.isRequired,onShowPost:n().func.isRequired,overlayType:n().string.isRequired,renderer:n().shape({status:n().shape({})}),trackDismiss:n().func.isRequired,trackEngage:n().func.isRequired}),ae(Le,"defaultProps",{renderer:{}});const Ce=se=>({onDismiss:ge=>se((0,o.Zn)(ge)),onEngagedOverlay:ge=>se((0,o.Ks)(ge)),onShowPost:ge=>se((0,s.to)({data:ge,kind:"twitter"})),trackDismiss:ge=>se((0,T.o1)("dismiss",ge)),trackEngage:(ge,pe)=>se((0,T.o1)("engage",ge,pe))}),Qe=(0,e.connect)(null,Ce)(Le)},299500:(ce,G,t)=>{t.d(G,{AF:()=>i,DD:()=>B,JT:()=>y,KC:()=>x,Sj:()=>D,cE:()=>F,e$:()=>N,eB:()=>b,kh:()=>u,o7:()=>I,to:()=>l,vV:()=>L,y_:()=>r});var e=t(711678),s=Object.defineProperty,o=Object.defineProperties,T=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,E=(M,P,m)=>P in M?s(M,P,{enumerable:!0,configurable:!0,writable:!0,value:m}):M[P]=m,c=(M,P)=>{for(var m in P||(P={}))d.call(P,m)&&E(M,m,P[m]);if(a)for(var m of a(P))n.call(P,m)&&E(M,m,P[m]);return M},f=(M,P)=>o(M,T(P));const L="modals/DISMISS_MODAL",N="modals/SHOW_MODAL",I="modals/LOGIN_MODAL",x="modals/USER_SUBMITTED_GDPR_TERMS",r=M=>({payload:M,type:L}),y=M=>({payload:f(c({},M),{isIframe:window.parent!==window}),type:I}),l=M=>({payload:M,type:N}),i=M=>({payload:{data:{text:M},kind:e.V.text},type:N}),u=(M,P,m)=>m?{payload:{data:{errorKey:m},kind:e.V.adminError},type:N}:{payload:{data:P!==void 0?{message:M,errorMessage:P}:{message:M},kind:e.V.adminError},type:N},b=M=>({payload:{data:{errorKey:M},kind:e.V.adminError},type:N}),D=()=>({payload:{kind:e.V.gdpr},type:N}),B=()=>({payload:{kind:"gdpr",accepted:!0},type:x}),F=()=>({payload:{kind:"gdpr",accepted:!1},type:x})},310214:(ce,G,t)=>{t.d(G,{I:()=>e});const e=["ADMIN_LABEL_CANCEL_SUBSCRIPTION_CONFIRMATION","ADMIN_LABEL_CANCEL_SUBSCRIPTION_CONFIRMATION_IMMEDIATE","REMOVE_PAYMENT_METHOD_CONFIRM","REMOVE_PAYMENT_METHOD_ERROR"]},89649:(ce,G,t)=>{t.d(G,{DD:()=>e.DD,y_:()=>e.y_,xE:()=>f.xE,JT:()=>e.JT,I_:()=>c.I,fn:()=>n,eB:()=>e.eB,kh:()=>e.kh,to:()=>e.to,AF:()=>e.AF});var e=t(299500),s=t(100035),o=t(860954),T=t(990220),a=t(711678);function*d(L){const{payload:{autoSubmit:N=!1,isIframe:I,page:x="ACCOUNTLOOKUP",provider:r,email:y}}=L;if(I&&T.od==="iframe"){yield(0,s.T1)(o.Jm,{action:o.Np.IFRAME_REQUEST_LOGIN,eventSource:o.GD.LOGIN_MODAL});return}yield(0,s.yJ)((0,e.to)({kind:a.V.login,data:{autoSubmit:N,page:x,provider:r,email:y}}))}function*n(){yield(0,s.jP)(e.o7,d)}var E=t(59595),c=t(310214),f=t(654105)},59595:(ce,G,t)=>{t.d(G,{A:()=>T});var e=t(299500);const s=()=>[],T=(a=s(),d)=>{switch(d.type){case e.vV:{const n=d.payload,E=[...a].reverse(),c=E.findIndex(f=>f.kind===n);return c===-1?[...a]:E.slice(c+1).reverse()}case e.e$:{const n=d.payload;return[...a,n]}default:return a}}},654105:(ce,G,t)=>{t.d(G,{UN:()=>E,_X:()=>o,bt:()=>T,wk:()=>d,xE:()=>a});var e=t(980672),s=t(310214);const o=({modals:c})=>{for(const{kind:f}of c)if(f==="gdpr")return!0;return!1},T=({modals:c})=>{for(const{kind:f}of c)if(f==="deviceLimit")return!0;return!1},a=({modals:c})=>{for(const{data:f}of c){const L=f?.promptStringKey;if(s.I.includes(L))return!0}return!1},d=(0,e.Mz)(({modals:c})=>c,c=>c),n=({modals:c})=>!!c.length,E=({modals:c},f)=>!!c.find(L=>L.kind===f)},711678:(ce,G,t)=>{t.d(G,{V:()=>e});var e=(s=>(s.chooseSelfServicePlan="chooseSelfServicePlan",s.settingUpSelfServiceSite="settingUpSelfServiceSite",s.selfServiceSignup="selfServiceSignup",s.addToCalendar="addToCalendar",s.addUserRole="addUserRole",s.adminError="adminError",s.adminSuccess="adminSuccess",s.bundlePurchase="bundlePurchase",s.chatPromptLogin="chatPromptLogin",s.checkEmail="checkEmail",s.confirmation="confirmation",s.crossChannelEditWarning="crossChannelEditWarning",s.deviceLimit="deviceLimit",s.emailVerification="emailVerification",s.forgotPassword="forgotPassword",s.gdpr="gdpr",s.image="image",s.imageLibrary="imageLibrary",s.instagram="instagram",s.login="login",s.purchasePlan="purchasePlan",s.questClaim="questClaim",s.resetPassword="resetPassword",s.resetPasswordSuccess="resetPasswordSuccess",s.selectableText="selectableText",s.shopify="shopify",s.text="text",s.twitter="twitter",s.twitterPanel="twitterPanel",s.errorMod
627al="errorModal",s.invite="invite",s.adminConfirmation="adminConfirmation",s.setUpAccess="setUpAccess",s.subscriptionPurchase="subscriptionPurchase",s.vodCheckout="vodCheckout",s.supportContact="supportContact",s.streamEncoderState="streamEncoderState",s.receiptModal="receiptModal",s.activeOnPageModal="activeOnPageModal",s.haltGate="haltGate",s.calendarBlockEventSettings="calendarBlockEventSettings",s.activateThemeConfirmation="activateThemeConfirmation",s.videoMetadataV2="videoMetadataV2",s.videoSettingsV1="videoSettingsV1",s.videoLibraryV2="videoLibraryV2",s.upgradePlan="upgradePlan",s.upgradePlanSuccess="upgradePlanSuccess",s.tvAppsLogin="tvAppsLogin",s.streamContentDetailsModal="streamContentDetailsModal",s.saveLeaveConfirmation="saveLeaveConfirmation",s.monetizationGateModal="monetizationGateModal",s))(e||{})},353363:(ce,G,t)=>{t.d(G,{A:()=>a});var e=t(63696),s=t(886550),o=t(229128),T=t(685089);function a({children:n,className:E,dragHandleSelector:c,initialPosition:f={x:0,y:0}}){const[L,N]=(0,e.useState)(!1),[I,x]=(0,e.useState)(f),r=()=>N(!0),y=()=>N(!1),l=(u,b)=>{x({x:u,y:b})},i=u=>{u?.stopPropagation()};return e.createElement(o.A,null,e.createElement(d,{className:E,dragHandleSelector:c,isDragging:L,onClick:i,onEnd:y,onMove:l,onStart:r,x:I.x,y:I.y},n))}const d=(0,s.Ay)(T.A)`
628  display: flex;
629  position: fixed;
630  cursor: default;
631`},229128:(ce,G,t)=>{t.d(G,{A:()=>d,N:()=>n});var e=t(63696),s=t(301845),o=t(731694),T=t(886550),a=t(243412);function d({children:E}){return e.createElement(s.ZL,{node:document&&document.getElementById(o.zV)},E)}const n=T.Ay.div.attrs({id:o.zV})`
632  position: absolute;
633  left: 0;
634  top: 0;
635  z-index: ${a.M.layer.modalLegacy};
636`},186677:(ce,G,t)=>{t.d(G,{A:()=>ge});var e=t(63696),s=t(625414),o=t(41989),T=t(707722),a=t.n(T),d=t(654584),n=t(886550),E=t(152544),c=t(429195),f=t(154789),L=t(545290),N=t(842671),I=t(874504);const x=(0,n.Ay)(I.A)`
637  & .quest-content {
638    max-height: 310px;
639    overflow-y: auto;
640  }
641`,r=n.Ay.div`
642  padding: 30px 30px 40px 30px;
643  display: flex;
644  flex-direction: column;
645  gap: 30px;
646  background-color: ${c.k6P};
647  width: 100%;
648`,y=n.Ay.h3`
649  all: unset;
650  ${E.pz}
651  color: ${c.o0B};
652`,l=n.Ay.footer`
653  height: 40px;
654  display: flex;
655  align-items: center;
656`,i=n.Ay.span`
657  ${E.z6}
658  color: ${c.sRE};
659  flex: 1;
660  & span {
661    color: ${c.o0B};
662  }
663`,u=(0,n.Ay)(f.Ay)`
664  ${E.Z1}
665  height: 40px;
666  &:disabled {
667    background-color: ${c.Qod} !important;
668    color: ${c.vCi} !important;
669    pointer-events: none;
670    opacity: 0.5;
671  }
672`,b=(0,n.Ay)(N.A).attrs(pe=>({fillColor:(0,c.vCi)(pe),style:{width:"40px",height:"40px"}}))``,D=n.Ay.div`
673  display: grid;
674  grid-template-columns: 2fr 1fr;
675  column-gap: 40px;
676`,B=n.Ay.div`
677  display: flex;
678  flex-direction: column;
679  gap: 30px;
680`,F=n.Ay.section`
681  display: flex;
682  flex-direction: column;
683  gap: 20px;
684  ${L.EC}
685  max-height: 490px;
686  flex: 1;
687`,M=n.Ay.button`
688  ${E.II}
689  flex: 1;
690  color: ${c.sRE};
691  padding-top: 14px;
692  padding-bottom: 14px;
693  height: 46px;
694  ${({active:pe})=>pe&&(0,n.AH)`
695    color: ${c.o0B};
696    pointer-events: none;
697    border-bottom: 3px solid ${c.Qod};
698    padding-bottom: 1px;
699  `};
700
701  &:disabled {
702    pointer-events: none;
703  }
704  &:hover {
705    color: ${c.o0B};
706    border-bottom: 3px solid ${c.Qod};
707  }
708`,P=n.Ay.div`
709  display: flex;
710  flex-direction: column;
711  gap: 30px;
712`,m=n.Ay.header`
713  height: 46px;
714  display: flex;
715  align-items: center;
716  border-bottom: 1px solid ${c.kjY};
717`,h=n.Ay.div`
718  display: flex;
719  flex-direction: column;
720  gap: 30px;
721  flex: 1;
722`,C=n.Ay.span`
723  ${E.Z1}
724  color: ${c.__g};
725  margin-right: 10px;
726`;var O=t(159776),k=Object.defineProperty,Q=Object.defineProperties,S=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,w=(pe,Re,we)=>Re in pe?k(pe,Re,{enumerable:!0,configurable:!0,writable:!0,value:we}):pe[Re]=we,Y=(pe,Re)=>
726{for(var we in Re||(Re={}))U.call(Re,we)&&w(pe,we,Re[we]);if(J)for(var we of J(Re))j.call(Re,we)&&w(pe,we,Re[we]);return pe},K=(pe,Re)=>Q(pe,S(Re));const q=e.lazy(()=>t.e(9802).then(t.bind(t,209802))),ae=e.lazy(()=>t.e(9911).then(t.bind(t,609911))),le=e.lazy(()=>t.e(6803).then(t.bind(t,126803))),fe=e.lazy(()=>t.e(5798).then(t.bind(t,445798))),Le=["GENERAL","ADMIN_LABEL_ACTIONS","REWARD","ADMIN_LABEL_QUEST_LIFESPAN"],Ce=()=>{},ge=({onClose:pe,item:Re})=>{var we,mt;const{t:Ue}=(0,o._h)(),Ee=(0,O.A)({item:Re,onSave:pe}),We=et=>nt=>Ee.setFieldValue(et,nt),{currentStepIndex:Be,goTo:_e,steps:tt,step:It}=(0,s.b)([e.createElement(q,{key:"questFormModalGeneralInfo",onChange:We,item:Ee.values}),e.createElement(ae,{key:"questFormModalQuestActions",onChange:We,item:Ee.values}),e.createElement(le,{key:"questFormModalQuestReward",onChange:We,item:Ee.values}),e.createElement(fe,{key:"questFormModalQuestLifespan",onChange:We,item:Ee.values})]),he=et=>()=>_e(et),ye=e.useMemo(()=>{if(!Ee.errors||Ee.submitCount===0)return null;const et=Object.values(Ee.errors);if(et.length===0)return null;const nt=et[0];return typeof nt=="string"?nt:Ue("QUEST_ACTION_INCOMPLETE")},[Ee.errors,Ee.submitCount,Ue]),Oe=()=>Ee.isSubmitting?e.createElement(b,null):Re._id?Ue("UPDATE_QUEST"):Ue("CREATE_QUEST"),Ct=K(Y({},Ee.values),{title:Ee.values.title||Ue("TITLE_GOES_HERE"),description:Ee.values.description||Ue("DESCRIPTION_GOES_HERE"),streamContent:K(Y({},Ee.values.streamContent),{contentName:((we=Ee.values.streamContent)==null?void 0:we.contentName)||Ue("GAME_TITLE"),contentId:((mt=Ee.values.streamContent)==null?void 0:mt.contentId)||"",contentType:"game"}),rewardDescription:Ee.values.rewardDescription||Ue("ADMIN_LABEL_QUEST_REWARD")});return e.createElement(d.lG,{open:!0,context:"admin",onOpenChange:et=>!et&&pe()},e.createElement(d.Cf,{hideCloseButton:!0,className:"flex h-[min(90vh,920px)] w-[1000px] max-w-[1000px] flex-col overflow-hidden p-0"},e.createElement("div",{className:"min-h-0 flex-1 overflow-y-auto"},e.createElement(r,null,e.createElement(y,null,Ue("QUEST_SETTINGS")),e.createElement(h,null,e.createElement(D,null,e.createElement(B,null,e.createElement(m,null,Array.from({length:tt.length},(et,nt)=>nt).map((et,nt)=>e.createElement(M,{key:nt,active:Be===nt,onClick:he(nt)},Ue(Le[nt])))),e.createElement(F,null,e.createElement(e.Suspense,{fallback:null},It))),e.createElement(P,null,e.createElement(m,null,e.createElement(M,{disabled:!0,active:!1},Ue("ADMIN_LABEL_PREVIEW"))),e.createElement(x,{preview:!0,item:Ct,questEngage:Ce,region:"pageBlock",isContentExpanded:!1,onToggleExpandContent:Ce}))),e.createElement(l,null,e.createElement(i,null,a()(Ue("STEP_DESCRIPTION",{step:Be+1,totalSteps:tt.length})||"")),ye&&e.createElement(C,null,ye),e.createElement(u,{disabled:Ee.isSubmitting,onClick:Ee.submitForm},Oe())))))))}},136935:(ce,G,t)=>{t.d(G,{A:()=>Y});var e=t(63696),s=t(224191),o=t(283722),T=t(86138),a=t(551321),d=t(914182),n=t(579226),E=t(136517),c=t(218938),f=t(41989),L=t(619545),N=t(33149),I=Object.defineProperty,x=Object.defineProperties,r=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,u=(K,q,ae)=>q in K?I(K,q,{enumerable:!0,configurable:!0,writable:!0,value:ae}):K[q]=ae,b=(K,q)=>{for(var ae in q||(q={}))l.call(q,ae)&&u(K,ae,q[ae]);if(y)for(var ae of y(q))i.call(q,ae)&&u(K,ae,q[ae]);return K},D=(K,q)=>x(K,r(q)),B=(K,q)=>{var ae={};for(var le in K)l.call(K,le)&&q.indexOf(le)<0&&(ae[le]=K[le]);if(K!=null&&y)for(var le of y(K))q.indexOf(le)<0&&i.call(K,le)&&(ae[le]=K[le]);return ae};const F=K=>{var q=K,{className:ae}=q,le=B(q,["className"]);return e.createElement(L.A,D(b({},le),{className:(0,N.cn)("underline","text-[var(--accent-primary)] hover:text-[var(--accent-primary)]","[&_svg>path]:fill-[var(--accent-primary)] hover:[&_svg>path]:fill-[var(--accent-primary)]",ae)}))};var M=t(252992),P=t(368909),m=t(359785);const h="m-0 font-[family-name:var(--site-font-headline)] text-xl font-semibold leading-[1.25] text-[var(--text-100)] md:text-2xl md:leading-tight",C="m-0 max-w-none px-1 font-[family-name:var
726(--site-font-body)] text-sm leading-5 text-[var(--text-200)] md:max-w-md",O="m-0 font-[family-name:var(--site-font-body)] text-sm font-bold leading-4 text-[var(--text-100)]",k="m-0 min-w-0 break-words font-[family-name:var(--site-font-body)] text-sm font-bold leading-5 text-[var(--text-100)]",Q="font-[family-name:var(--site-font-body)] text-sm font-medium leading-5 text-[var(--text-100)]",S="font-[family-name:var(--site-font-body)] text-sm font-medium leading-5 text-[var(--text-200)]",J="font-[family-name:var(--site-font-body)] text-sm font-medium leading-5 text-[var(--text-100)]",U="font-[family-name:var(--site-font-body)] text-sm font-bold leading-5 text-[var(--text-100)]",j="font-[family-name:var(--site-font-body)] text-base font-bold leading-6 text-[var(--text-100)] tabular-nums whitespace-nowrap",Y=({layout:K,onPrimary:q,primaryCtaKey:ae,primaryButtonTestId:le,rootDataTestId:fe="site-receipt-modal",scrollInnerDataTestId:Le="site-receipt-modal-scroll-inner",dataTestIdPrefix:Ce="site-receipt",floatingCorner:Qe})=>{const{t:se}=(0,f._h)(),ge=(0,s.useSelector)(c.qo),pe=(0,s.useSelector)(P.VC),Re=(0,E.YO)(),{receiptNumber:we,showReceiptNumberPill:mt=!0,subtitleTranslationKey:Ue,hero:Ee,heroInsideSummaryCard:We=!1,paymentLine:Be,nextBillLine:_e,summaryHeading:tt,breakdownRows:It,totalLabel:he,totalValue:ye}=K,Oe=Ee?e.createElement("div",{"data-testid":`${Ce}-hero-card`,className:"flex items-start gap-4"},Ee.imageUrl?e.createElement("div",{className:"relative h-[67px] max-h-[67px] w-[100px] shrink-0 overflow-hidden rounded-lg bg-[var(--surface-4)]"},e.createElement("img",{src:Ee.imageUrl,alt:Ee.title,className:"h-full w-full object-cover"}),Ee.showPlayOverlay?e.createElement(o.Ay,{name:"playLarge",className:(0,N.cn)("pointer-events-none absolute left-1/2 top-1/2 block size-[22px] min-h-[22px] min-w-[22px] -translate-x-1/2 -translate-y-1/2 opacity-95 [&>svg]:!h-[22px] [&>svg]:!w-[22px]"),color:"var(--highlight-primary)"}):null):null,e.createElement("div",{className:"min-w-0 flex-1"},e.createElement("h3",{"data-testid":`${Ce}-hero-title`,className:(0,N.cn)(k,"line-clamp-4 overflow-hidden")},Ee.title))):null,Ct=e.createElement(e.Fragment,null,Be?e.createElement("div",{className:"flex items-baseline justify-between gap-4"},e.createElement("span",{className:(0,N.cn)(Q,"min-w-0 pr-2 text-left")},Be.left),e.createElement("span",{className:(0,N.cn)(Q,"shrink-0 text-right tabular-nums")},Be.right)):null,_e?e.createElement("div",{className:"flex items-baseline justify-between gap-4"},e.createElement("span",{className:(0,N.cn)(Q,"min-w-0 pr-2 text-left")},_e.left),e.createElement("span",{className:(0,N.cn)(Q,"shrink-0 text-right tabular-nums")},_e.right)):null,e.createElement("div",{className:"flex flex-col gap-2.5"},It.map((et,nt)=>e.createElement("div",{key:`bd-${nt}`,className:"flex items-baseline justify-between gap-4"},e.createElement("span",{className:(0,N.cn)(S,"min-w-0 whitespace-pre-wrap pr-2 text-left")},et.label),e.createElement("span",{className:(0,N.cn)(S,"shrink-0 text-right tabular-nums")},et.value)))),e.createElement("div",{className:"flex items-baseline justify-between gap-4"},e.createElement("span",{className:(0,N.cn)(U,"min-w-0 pr-2 text-left")},he),e.createElement("span",{className:(0,N.cn)(j,"shrink-0 text-right")},ye)));return e.createElement(n.A,{"data-testid":fe,options:{overflow:{x:"hidden"}},refreshOnInteraction:!0,style:Re,variant:"site",className:(0,N.cn)("flex flex-col overflow-hidden bg-[var(--surface-3)] text-[var(--text-100)] shadow-lg",!pe&&"rounded-2xl")},e.createElement("div",{"data-testid":Le,className:(0,N.cn)("relative box-border flex w-full min-w-0 flex-col",pe?"min-h-[100dvh] gap-10 px-5 pb-12 pt-[max(48px,env(safe-area-inset-top))]":(0,N.cn)("gap-6 px-8 pb-8",Qe?"pt-14":"pt-8"))},Qe?e.createElement("div",{className:"pointer-events-none absolute right-4 top-4 z-[1] md:right-6 md:top-6"},e.createElement("div",{className:"pointer-events-auto"},Qe)):null,e.createElement("div",{className:"flex flex-col items-center gap-3 text-center"},e.createElement(T.A,{component:"h2",stringKey:"THANKS_PURCHASE",componentProps:{className:h,"data-testid":`${Ce}-title`}}),Ue?e.createElement("p",{className:(0,N.cn)(C,"text-center"),"data-testid":`${Ce}-subtitle`},se(Ue)):null,mt?e.createElement("div",{"data-testid":`${Ce}-id-pill`,className:"w-full rounded-lg bg-[var(--surface-6)] px-5 py-[10px] text-center"},e.createElement("p",{className:O},se("ADMIN_RECEIPT_LABEL_WITH_HASH",{receiptNumber:we}))):null),Ee&&!We?Oe:null,e.createElement("div",{className:"flex flex-col gap-3"},e.createElement("h4",{className:(0,N.cn)(J,"m-0")},tt),e.createElement("div",{"data-testid":`${Ce}
726-summary-box`,className:"flex flex-col gap-4 rounded-xl bg-[var(--surface-4)] p-3"},We&&Oe?e.createElement(e.Fragment,null,Oe,e.createElement("div",{className:"border-t border-[color-mix(in_srgb,var(--text-100)_10%,transparent)] pt-4"})):null,Ct)),e.createElement(a.$,{"data-testid":le,type:"button",context:"site",variant:"default",className:"h-auto w-full rounded-full px-6 py-[14px] text-base font-semibold uppercase tracking-wide",onClick:q},se(ae)),e.createElement("div",{className:"flex flex-col items-center gap-1 text-center text-sm text-[var(--text-300)]","data-testid":`${Ce}-footer`},se("ADMIN_BILLING_RECEIPT_HAS_BEEN_SENT_TO_X_EMAIL",{x:ge||""}),e.createElement("span",null,se("ADMIN_BILLING_WRONG_EMAIL")," ",se("CLICK")," ",e.createElement(F,{"data-testid":`${Ce}-wrong-email`,className:M.j3,href:m.ov},se("ADMIN_LABEL_HERE_LOWERCASE")))),e.createElement("div",{className:(0,N.cn)(pe?"":"justify-center","flex")},e.createElement(d.A,{href:m.yx}))))}},190955:(ce,G,t)=>{t.d(G,{UQ:()=>E,Zk:()=>n,h8:()=>L,hw:()=>c,uq:()=>N});var e=t(813942),s=t(514245),o=t(171751),T=t(818339),a=t.n(T);function d(I,x){return I.type===s.Q.subscription?x("BILLING_AMOUNT_SUBSCRIPTION"):I.type===s.Q.vodPurchase?x("VOD_PURCHASE_PRICE"):I.type===s.Q.vodRental?x("VOD_RENTAL_PRICE"):x("BILLING_AMOUNT_TICKET")}function n(I,x){var r;const{amountBreakdown:{serviceCharge:y,taxAmount:l,total:i},nextBillDate:u,receiptNumber:b,currency:D,name:B,type:F}=I,M=a().tz.guess(),P=u?a()(u).tz(M).format("MMM Do, YYYY"):"",m={price:(0,o.$g)(D,I.price),service:(0,o.$g)(D,y),tax:(0,o.$g)(D,l),total:(0,o.$g)(D,i)},h=F===s.Q.subscription?" (Recurring)":"",C=`${B}${h}`.trim();return{receiptNumber:b,hero:{title:C,showPlayOverlay:!1},paymentLine:(r=I.paymentMethod)!=null&&r.type?{left:x("ADMIN_LABEL_CARD_ENDING_IN"),right:I.paymentMethod.cardLastDigits?`*${I.paymentMethod.cardLastDigits}`:I.paymentMethod.type}:null,nextBillLine:F===s.Q.subscription&&P?{left:x("ADMIN_SETTINGS_BILLING_NEXT_BILL_DATE"),right:P}:null,summaryHeading:x("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:[{label:d(I,x),value:m.price},{label:x("BILLING_SERVICE_CHARGE"),value:m.service},{label:x("BILLING_TAX"),value:m.tax}],totalLabel:x("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:m.total}}function E(I,x,r){const{amountBreakdown:{serviceCharge:y,taxAmount:l,total:i},currency:u,name:b,type:D,paymentMethod:B,receiptNumber:F,price:M}=I,P=D===s.Q.vodPurchase?r("VOD_RECEIPT_PURCHASE_LINE"):r("VOD_RENTAL_PRICE"),m={price:(0,o.$g)(u,M),serviceCharge:(0,o.$g)(u,y),taxAmount:(0,o.$g)(u,l),total:(0,o.$g)(u,i)},h=x?.title||b;return{receiptNumber:F,hero:{imageUrl:x?.image,title:h,showPlayOverlay:!!x?.image},paymentLine:B?.type?{left:r("ADMIN_LABEL_CARD_ENDING_IN"),right:B.cardLastDigits?`*${B.cardLastDigits}`:B.type}:null,nextBillLine:null,summaryHeading:r("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:[{label:P,value:m.price},{label:r("BILLING_SERVICE_CHARGE"),value:m.serviceCharge},{label:r("BILLING_TAX"),value:m.taxAmount}],totalLabel:r("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:m.total}}function c(I,x,r,y){const{paymentMethod:l,receiptNumber:i,currency:u,name:b,image:D}=I,B=r.reduce((O,k)=>{var Q;return O+(((Q=k.prices.find(S=>S.currency===u))==null?void 0:Q.value)||0)},0),F=Number(x.subtotalPriceV2.amount),M=B+F,P=Number(x.requiresShipping&&x.availableShippingRates.shippingRates.length>0?x.availableShippingRates.shippingRates[0].priceV2.amount:"0"),m=(0,e.pO)(r,u,I.amountBreakdown.serviceChargeRate),h=B*(1+I.amountBreakdown.serviceChargeRate)*(I.amountBreakdown.taxRate||0)+Number(x.totalTaxV2.amount),C=M+m+P+h;return{receiptNumber:i,hero:{imageUrl:D,title:b,showPlayOverlay:!1},paymentLine:l?.type?{left:y("ADMIN_LABEL_CARD_ENDING_IN"),right:l.cardLastDigits?`*${l.cardLastDigits}`:l.type}:null,nextBillLine:null,summaryHeading:y("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:[{label:y("LABEL_SUBTOTAL_BUNDLE"),value:(0,o.$g)(u,M)},{label:y("BILLING_SERVICE_CHARGE"),value:(0,o.$g)(u,m)},{label:y("BILLING_TAX"),value:(0,o.$g)(u,h)},{label:y("LABEL_SHIPPING_COST"),value:(0,o.$g)(u,P)}
726],totalLabel:y("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:(0,o.$g)(u,C)}}function f(I){var x,r,y;const l=I.quantity||1;return typeof I.price=="number"?I.price*l:((y=(r=(x=I.prices)==null?void 0:x.find(u=>u.default))==null?void 0:r.value)!=null?y:0)*l}function L(I,x,r,y,l,i){var u,b,D,B,F,M;const P=(l?.currencyCode||((u=l?.totalPriceV2)==null?void 0:u.currencyCode)||I.presentmentCurrency||"USD").toUpperCase(),m=[];let h=0,C=0;x.forEach(J=>{h+=J.quantity||1;const U=f(J);C+=U;const j=J.quantity||1,w=j>1?` \xB7 ${i("QTY")} ${j}`:"";m.push({label:`${J.name}${w}`,value:(0,o.$g)(P,U)})}),Object.entries(r).forEach(([J,U])=>{var j,w;if(!U)return;h+=1;const Y=Number(((j=U.price)==null?void 0:j.amount)||0);C+=Y;const K=y.find(le=>le.id===J),q=((w=U.selectedOptions)==null?void 0:w.map(le=>`${le.name}: ${le.value}`).join(" \xB7 "))||U.title||"",ae=K?.title||I.name;m.push({label:q?`${ae} \xB7 ${q}`:ae,value:(0,o.$g)(P,Y)})});const O=((b=l?.subtotalPriceV2)==null?void 0:b.amount)!==void 0?Number(l.subtotalPriceV2.amount):C;m.push({label:`${i("ADMIN_LABEL_PRODUCTS")} (${h||m.length})`,value:(0,o.$g)(P,O)});const k=((D=l?.totalTaxV2)==null?void 0:D.amount)!==void 0?Number(l.totalTaxV2.amount):0;m.push({label:i("SALES_TAX"),value:(0,o.$g)(P,k)});const Q=((F=(B=l?.shippingLine)==null?void 0:B.priceV2)==null?void 0:F.amount)!==void 0?Number(l.shippingLine.priceV2.amount):0;Q>0&&m.push({label:i("LABEL_SHIPPING_COST"),value:(0,o.$g)(P,Q)});const S=((M=l?.totalPriceV2)==null?void 0:M.amount)!==void 0?Number(l.totalPriceV2.amount):O+k+Q;return{receiptNumber:"\u2014",showReceiptNumberPill:!1,subtitleTranslationKey:"CHECK_EMAIL_CONFIRMATION",hero:{imageUrl:I.image,title:I.name,showPlayOverlay:!1},heroInsideSummaryCard:!0,paymentLine:null,nextBillLine:null,summaryHeading:i("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:m,totalLabel:i("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:(0,o.$g)(P,S)}}function N(I,x){var r,y,l,i;const u=I?.payment,b=(r=I?.lines)!=null?r:[],D=((y=u?.currency)!=null?y:"USD").toUpperCase();if(!u||b.length===0)return{receiptNumber:"\u2014",showReceiptNumberPill:!1,subtitleTranslationKey:"CHECK_EMAIL_CONFIRMATION",summaryHeading:x("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:[],totalLabel:x("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:(0,o.$g)(D,(l=u?.totalAmount)!=null?l:0),paymentLine:null,nextBillLine:null};const B=[],F=m=>[m.productSpecs,`${x("QTY")} ${m.productQuantity}`].filter(Boolean).join(" \xB7 ");let M,P=!1;if(b.length===1){const m=b[0];M={imageUrl:(i=m.productImages[0])==null?void 0:i.url,title:m.productName,showPlayOverlay:!1},P=!0;const h=F(m);B.push({label:h||m.productName,value:(0,o.$g)(D,Number(m.productPrice||0))})}else b.forEach(m=>{const h=m.productSpecs?` \xB7 ${m.productSpecs}`:"";B.push({label:`${m.productName}${h} \xB7 ${x("QTY")} ${m.productQuantity}`,value:(0,o.$g)(D,Number(m.productPrice||0))})});
726return B.push({label:`${x("ADMIN_LABEL_PRODUCTS")} (${u.amountOfProducts})`,value:(0,o.$g)(D,Number(u.subtotal||0))}),B.push({label:x("SALES_TAX"),value:(0,o.$g)(D,Number(u.totalTax||0))}),u.shippingCost&&Number(u.shippingCost)>0&&B.push({label:x("LABEL_SHIPPING_COST"),value:(0,o.$g)(D,Number(u.shippingCost))}),{receiptNumber:"\u2014",showReceiptNumberPill:!1,subtitleTranslationKey:"CHECK_EMAIL_CONFIRMATION",hero:M,heroInsideSummaryCard:P,paymentLine:null,nextBillLine:null,summaryHeading:x("VOD_RECEIPT_SUMMARY_HEADING"),breakdownRows:B,totalLabel:x("ADMIN_BILLING_TOTAL_AMOUNT"),totalValue:(0,o.$g)(D,u.totalAmount)}}},154448:(ce,G,t)=>{t.d(G,{A:()=>c});var e=t(63696),s=t(224191),o=t.n(s),T=t(240316),a=t(514245),d=t(41989),n=t(360740);const c=()=>{const{entitlementPrice:f,subscriptionType:L}=(0,s.useSelector)(T.Gh),N=(0,s.useSelector)(T._q),I=(0,s.useSelector)(T.Wt),{t:x}=(0,d._h)(),r=(0,e.useMemo)(()=>L===a.Q.subscription?"BILLING_AMOUNT_SUBSCRIPTION":"BILLING_AMOUNT_TICKET",[L]),y=e.useMemo(()=>{const l=[{name:x(r),price:f.value}];return I>0&&l.push({name:x("BILLING_SERVICE_CHARGE"),price:I}),N>0&&l.push({name:x("BILLING_TAX"),price:N}),l},[N,r,f.value,I,x]);return e.createElement(n.z,{currency:f.currency,items:y})}},360740:(ce,G,t)=>{t.d(G,{z:()=>o});var e=t(687273),s=t(886550);const o=(0,s.Ay)(e.A)`
727  width: 100%;
728  margin-bottom: 30px;
729`},828384:(ce,G,t)=>{t.d(G,{EK:()=>N,Yj:()=>L,hz:()=>d,wv:()=>E});var e=t(108941);const s="645541ecba9a9808a403c3ae",o="645541ecba9a9808a403c3af",T="645541ecba9a9808a403c3b0",a="645541edba9a9808a403c3b1",d="645541edba9a9808a403c3b2",n={planId:s,name:"Start",description:"Best for creators who are ready to start making money with no risk or investment",price:"Free",maxAdmins:"1 Admin",shopifyKeepAmount:"Keep 95%",ticketAndSubscriptionKeepAmount:"Keep 60%",dueAmount:0,paymentDescription:"No payment required",tipsKeepAmount:"Keep 85%"},E={planId:"custom",name:"Custom",description:"Best for businesses with large audiences who need greater customizability and support",price:"Let's talk",maxAdmins:"Unlimited Admins",shopifyKeepAmount:"Keep 95%",ticketAndSubscriptionKeepAmount:"Keep 100%*",tipsKeepAmount:"Keep 90%",dueAmount:0,paymentDescription:""},c=I=>({planId:I===e.K.ANNUALLY?T:o,name:"Growth",description:"Best for creators who have at least 10 followers willing to pay $5/month",price:I===e.K.ANNUALLY?"$19/month":"$23/month",maxAdmins:"2 Admins",shopifyKeepAmount:"Keep 95%",ticketAndSubscriptionKeepAmount:"Keep 75%",dueAmount:I===e.K.ANNUALLY?228:23,tipsKeepAmount:"Keep 85%",paymentDescription:I===e.K.ANNUALLY?"Growth Plan (Billed Annually)":"Growth Plan (Billed Monthly)"}),f=I=>({planId:I===e.K.ANNUALLY?d:a,name:"Scale",description:"Best for creators who have at least 100 followers willing to pay $5/month",price:I===e.K.ANNUALLY?"$99/month":"$119/month",maxAdmins:"4 Admins",shopifyKeepAmount:"Keep 95%",ticketAndSubscriptionKeepAmount:"Keep 100%",tipsKeepAmount:"Keep 90%",recommended:!0,dueAmount:I===e.K.ANNUALLY?1188:119,paymentDescription:I===e.K.ANNUALLY?"Scale Plan (Billed Annually)":"Scale Plan (Billed Monthly)"}),L={[e.K.ANNUALLY]:[n,c(e.K.ANNUALLY),f(e.K.ANNUALLY),E],[e.K.MONTHLY]:[n,c(e.K.MONTHLY),f(e.K.MONTHLY),E]},N=(I,x)=>[{label:x("ADMIN_UPGRADE_PLAN_PLAN_CARD_TICKETS_AND_SUBS"),keep:I.ticketAndSubscriptionKeepAmount},{label:x("ADMIN_UPGRADE_PLAN_PLAN_CARD_SHOPIFY"),keep:I.shopifyKeepAmount},{label:x("ADMIN_UPGRADE_PLAN_PLAN_CARD_TIPS"),keep:I.tipsKeepAmount}]},108941:(ce,G,t)=>{t.d(G,{K:()=>e});const e={ANNUALLY:"annually",MONTHLY:"monthly"}},372735:(ce,G,t)=>{t.r(G),t.d(G,{VideoMetadataModalV2:()=>It});var e=t(63696),s=t(654584),o=t(86138),T=t(283722),a=t(498685),d=t(964746),n=t(706198),E=t(879272),c=t(359785),f=t(41989),L=t(217243),N=t(224191),I=t(400781),x=t(463302),r=t(476765),y=t(241411),l=t(886550),i=t(412556),u=t(429195),b=t(545290),D=t(13155),B=t(154789),F=Object.defineProperty,M=Object.defineProperties,P=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable,O=(he,ye,Oe)=>ye in he?F(he,ye,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):he[ye]=Oe,k=(he,ye)=>{for(var Oe in ye||(ye={}))h.call(ye,Oe)&&O(he,Oe,ye[Oe]);if(m)for(var Oe of m(ye))C.call(ye,Oe)&&O(he,Oe,ye[Oe]);return he},Q=(he,ye)=>M(he,P(ye));
729const S=(0,l.Ay)(B.$n)`
730  font-size: 13px;
731  padding: 13px 62px;
732  line-height: 1;
733  height: auto;
734`,J=l.Ay.form`
735  padding: 30px;
736  box-sizing: border-box;
737  background: ${u.dHK};
738  height: 100%;
739  ${b.EC}
740  overflow: auto;
741`,U=l.Ay.div`
742  font-weight: 500;
743  font-size: 24px;
744  line-height: 30px;
745`,j=l.Ay.div`
746  font-weight: 400;
747  font-size: 15px;
748  line-height: 1;
749  color: ${u.zkP};
750  padding-top: 15px;
751  margin-bottom: 30px;
752`,w=l.Ay.div`
753  display: flex;
754  flex-direction: row;
755  align-items: flex-start;
756`,Y=l.Ay.div`
757  flex: 1;
758  padding-right: 20px;
759`,K=l.Ay.input`
760  font-size: 14.5px;
761  line-height: 20px;
762  font-weight: 400;
763  padding: 0;
764  border: 12px solid ${u.k6P};
765  background: ${u.k6P};
766  border-radius: 4px;
767  font-family: inherit;
768  color: ${u.o0B};
769
770  &:is(textarea) {
771    resize: none;
772    height: 195px;
773    ${b.EC}
774    overflow-y: auto;
775  }
776
777  &.embed-code {
778    font-family: monospace;
779  }
780`,q=l.Ay.label`
781  flex: 1;
782  font-size: 14px;
783  line-height: 1;
784  display: flex;
785  flex-direction: column;
786  font-weight: 500;
787
788  & + & {
789    margin-top: 20px;
790  }
791
792  & ${K} {
793    margin-top: 10px;
794  }
795
796  i {
797    font-size: 14px;
798    line-height: 19px;
799    color: ${u.sRE};
800    margin-top: 10px;
801    font-style: normal;
802  }
803`,ae=(0,l.Ay)(D.v_)`
804  margin-top: 10px;
805  width: 320px;
806  aspect-ratio: 16 / 9;
807`,le=l.Ay.div`
808  margin-top: 30px;
809  display: flex;
810  justify-content: right;
811`,fe=(0,l.Ay)(i.Ay).attrs(he=>{var ye;return{styles:{control:Oe=>Q(k({},Oe),{border:"none",outline:"none",height:40,borderRadius:4,paddingLeft:10,background:(0,u.k6P)(he),boxShadow:"none"}),clearIndicator:()=>({display:"none"}),indicatorsContainer:Oe=>Q(k({},Oe),{height:40,cursor:"pointer"}),indicatorSeparator:()=>({display:"none"}),placeholder:Oe=>Q(k({},Oe),{color:(0,u.Lvg)(he),cursor:"text"}),valueContainer:Oe=>Q(k({},Oe),{padding:0}),menu:Oe=>Q(k({},Oe),{background:(0,u.k6P)(he)}),option:(Oe,Ct)=>Q(k({},Oe),{background:Ct.isFocused?(0,u.Qod)(he):"none",cursor:"pointer"})},noOptionsMessage:(ye=he.noOptionsMessage)!=null?ye:()=>he.t("ADMIN_MULTI_SELECTOR_NO_OPTIONS_AVAILABLE"),maxMenuHeight:250}})`
812  margin-top: 10px;
813`,Le=l.Ay.ul`
814  list-style: none;
815  margin: 10px 0 0;
816  padding: 0;
817
818  li {
819    display: inline-flex;
820    align-items: center;
821    background: ${u.YJk};
822    color: ${u.o0B};
823    font-size: 11px;
824    line-height: 15px;
825    font-weight: 400;
826    padding: 0 10px 0 0;
827    border-radius: 10px;
828    line-height: 21px;
829    margin: 0 5px 5px 0;
830
831    button {
832      line-height: inherit;
833      padding: 0 10px;
834
835      span {
836        display: contents;
837      }
838
839      svg {
840        width: 9px;
841        height: 9px;
842      }
843    }
844  }
845`,Ce=l.Ay.div``,Qe=l.Ay.p`
846  margin: 0px auto 10px;
847  color: ${u.zkP};
848  font-size: 14px;
849  line-height: 14px;
850`,se=l.Ay.ol`
851  padding-left: 20px;
852  margin-bottom: 20px;
853  color: ${u.o0B};
854  opacity: 0.5;
855  font-weight: 400;
856  font-size: 14px;
857  line-height: 19px;
858`;var ge=t(80247),pe=Object.defineProperty,Re=Object.defineProperties,we=Object.getOwnPropertyDescriptors,mt=Object.getOwnPropertySymbols,Ue=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,We=(he,ye,Oe)=>ye in he?pe(he,ye,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):he[ye]=Oe,Be=(he,ye)=>{for(var Oe in ye||(ye={}))Ue.call(ye,Oe)&&We(he,Oe,ye[Oe]);if(mt)for(var Oe of mt(ye))Ee.call(ye,Oe)&&We(he,Oe,ye[Oe]);return he},_e=(he,ye)=>Re(he,we(ye));const tt={name:(0,n.Tn)(!0,[""],n.UO),description:(0,n.Tn)(!1,[""],n.UO),thumbnail:(0,n.Tn)(!1,["",void 0,null],n.wv),tags:(0,n.Tn)(!1,[[]],n.P6),url:(0,n.Tn)(!1,[""],n.wv)},It=({data:he,onDismiss:ye})=>{var Oe,Ct;const[et,nt]=(0,e.useState)(""),[X,oe]=(0,e.useState)(null),_=he?.videos||[],{t:Ae}=(0,f._h)(),be=(0,N.useSelector)(I.V2),ke=(0,N.useSelector)(x.F6),{editVideoMetadata:Ot}=(0,E.Z2)(),vt=(0,a.UC)(),ut=(0,e.useMemo)(()=>vt.map(Ie=>({label:Ie,value:Ie})),[vt]),gt=_.length>1,Fe=gt?null:_[0],{embedCodeRef:Ke,generateUrl:at}=(0,y.AP)(Fe?.player===d.PlayerTypes.iframe?Fe.url:void 0),[De,dt]=(0,n.Ar)(tt,{name:Fe?.title||"",description:Fe?.description||"",tags:Fe?.tags||[],thumbnail:Fe?.thumbnail||void 0,url:Fe?.url}),Ve=dt.tags.rawValue,Xe=(0,e.useMemo)(()=>{var Ie;return(Ie=De.tags)==null?void 0:Ie.map(Je=>({label:Je,value:Je}))},[De.tags]),Dt=Ie=>{var Je;nt((Je=Ie?.trim())!=null?Je:"")},Et=(0,e.useCallback)(Ie=>{var Je;return Ve((Je=Ie?.map(({value:Rt})=>Rt))!=null?Je:[])},[]),At=(0,e.useCallback)(Ie=>{var Je;return Ve([Ie,...(Je=De.tags)!=null?Je:[]])},[De.tags]),Lt=(0,e.useCallback)(Ie=>{var Je;return Ve((Je=De.tags)==null?void 0:Je.filter(Rt=>Rt!==Ie))},[De.tags]),ct=(0,e.useCallback)(Ie=>{var Je;Ie.preventDefault();for(const He in tt){const Nt=He;if(Nt==="url")continue;const wt=tt[Nt],Ut=De[Nt];if((wt.required||!wt.emptyValues.some(Zt=>(0,L.isEqual)(Ut,Zt)))&&wt.validate&&!wt.validate(Ut)){ge.log("Error validating form:",Nt,"is invali
858d",Ut);return}}if(gt){Ot(_.map(He=>_e(Be({},He),{_id:He._id,creator:ke||"",newId:He.newId,description:De.description,owner:ke||"",thumbnail:De.thumbnail,tags:De.tags,siteId:be}))).catch(He=>{ge.error("Failure when upserting videos:",He)}),ye();return}const Rt=_e(Be({},_[0]),{_id:_[0]._id,newId:_[0].newId,title:De.name,description:De.description,thumbnail:De.thumbnail,tags:De.tags,siteId:be});if(_[0].player===d.PlayerTypes.iframe){const He=((Je=Ke.current)==null?void 0:Je.value)||"";if((0,r.RS)(He)){oe(Ae("ADMIN_VIDEO_SETTINGS_PAYWALL_YOUTUBE_TWITCH_RESTRICTION"));return}}(async()=>{try{if(_[0].player===d.PlayerTypes.iframe){const He=await at();if(!He)throw new Error("Couldn't generate embed code url");Rt.url=He}await Ot([Rt])}catch(He){ge.error("Failure when upserting video:",He)}})(),ye()},[De,Ot,_,ye,Ke,at,Ae]),Pt=(0,e.useCallback)(()=>dt.thumbnail.rawValue(null),[dt.thumbnail]),Bt=Ie=>["system"].includes(Ie.trim().toLowerCase()),Vt=(Ie,Je,Rt)=>{const He=Ie.trim().toLowerCase(),Nt=He.length===0,wt=Rt.some(Ut=>Ut.value.toLowerCase()===He);return!Nt&&!Bt(He)&&!wt},Xt=Ie=>Ae("ADMIN_TAGS_CREATE_TAG",{inputValue:Ie}),Mt=Ie=>Ie.filter(Je=>Je.value!=="system"),Jt=()=>Bt(et.trim().toLowerCase())?Ae("ADMIN_TAGS_NO_BANNED_TAG",{inputValue:et}):Xe?.some(Je=>Je.value.toLowerCase()===et.trim().toLowerCase())?Ae("ADMIN_TAGS_NO_DUPE",{inputValue:et}):Ae("ADMIN_TAGS_NO_OPTIONS");return e.createElement(s.lG,{context:"admin",open:!0,onOpenChange:Ie=>!Ie&&ye()},e.createElement(s.Cf,{size:"adminModal",className:"max-w-[864px] p-0"},e.createElement(J,{onSubmit:ct},e.createElement(U,null,e.createElement(o.A,{stringKey:gt?"ADMIN_EDIT_BULK_METADATA":"ADMIN_EDIT_METADATA"})),e.createElement(j,null,e.createElement(o.A,{stringKey:gt?"ADMIN_EDIT_BUL_METADATA_SUBTITLE":"ADMIN_EDIT_METADATA_SUBTITLE"})),e.createElement(w,null,e.createElement(Y,null,gt?e.createElement(Ce,null,e.createElement(Qe,null,_.length," ",Ae("ADMIN_MODAL_VIDEO_METADATA_SELECTED")),e.createElement(se,null,_.map(Ie=>e.createElement("li",{key:Ie._id},Ie.title)))):e.createElement(e.Fragment,null,e.createElement(q,null,Ae("ADMIN_LABEL_NAME"),e.createElement(K,{onChange:dt.name.eventHandler,required:!0,value:De.name})),e.createElement(q,null,_[0].player===d.PlayerTypes.iframe?e.createElement(e.Fragment,null,Ae("ADMIN_VIDEO_EDIT_FORM_EMBED_CODE"),e.createElement(K,{ref:Ke,as:"textarea",className:"embed-code",defaultValue:"",onChange:()=>{X&&oe(null)}}),X&&e.createElement("span",{style:{color:"var(--admin-alert-error)",marginTop:8,fontSize:12}},X)):e.createElement(e.Fragment,null,Ae("ADMIN_LABEL_URL"),e.createElement(K,{disabled:!0,onChange:dt.url.eventHandler,value:De.url||""})))),e.createElement(q,null,Ae("ADMIN_LABEL_DESCRIPTION"),e.createElement(K,{as:"textarea",onChange:dt.description.eventHandler,placeholder:Ae("ADMIN_PLACEHOLDER_ENTER_DESCRIPTION"),value:De.description}))),e.createElement("div",{style:{maxWidth:320}},e.createElement(q,{as:"div"},Ae("ADMIN_LABEL_THUMBNAIL"),e.createElement("i",null,Ae("ADMIN_LABEL_DIMENSIONS",{width:"1920",height:"1080"})),e.createElement(ae,{dimensionRequirements:{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:1080,pixelWidth:1920,verify:!0},height:180,imagePreview:De.thumbnail||c.kD,onClearImage:De.thumbnail?Pt:void 0,onFileSubmit:dt.thumbnail.rawValue})),e.createElement(q,null,Ae("ADMIN_LABEL_TAGS"),e.createElement(fe,{backspaceRemovesValue:!1,controlShouldRenderValue:!1,formatCreateLabel:Xt,isDisabled:((Oe=De.tags)==null?void 0:Oe.length)>=6,isMulti:!0,isSearchable:!0,isValidNewOption:Vt,noOptionsMessage:Jt,onChange:Et,onCreateOption:At,onInputChange:Dt,options:Mt(ut),placeholder:Ae("ADMIN_TAGS_PLACEHOLDER"),t:Ae,value:Xe}),e.createElement(Le,null,(Ct=De.tags)==null?void 0:Ct.map(Ie=>e.createElement("li",{key:Ie},e.createElement("button",{onClick:Lt.bind(null,Ie),type:"button"},e.createElement(T.Ay,{name:"cancel-thin"})),Ie)))))),e.createElement(le,null,e.createElement(S,{type:"submit"},e.createElement(o.A,{stringKey:"DONE"}))))))}},241411:(ce,G,t)=>{t.d(G,{AP:()=>c,h:()=>d,qC:()=>n,w:()=>E});var e=t(63696),s=t(816970),o=t(613166),T=t(312614),a=t(476765);const d=(0,o.R)(()=>"<!-- maestro embedded --><style>*{margin:0;padding:0;border:none;outline:none}</style>"),n=async f=>{const L=f.trim();if(!L)throw new Error("Embed code is required");if(!(0,a.ww)(L))throw new Error("Embed code is not a complete, valid iframe embed");const N=(0,a.DP)(L),I=N?(0,a.pW)(L):L;let x=await(0,T.pu)(d()+I);if(!x)throw new Error("Couldn't generate embed code url");
858if(!N)return x;const r=new URL(x).hostname,y=(0,a.pW)(L,{wrapperHost:r});if(y===I)return x;if(x=await(0,T.pu)(d()+y),!x)throw new Error("Couldn't generate embed code url");return x},E=f=>`<iframe style="width:100%;height:100%" src="${f}"></iframe>`,c=f=>{const L=(0,e.useRef)(null),N=(0,e.useMemo)(()=>(0,s.QU)(T.pw),[]),I=(0,e.useCallback)(()=>{const x=L.current;if(x)return n(x.value)},[]);return(0,e.useEffect)(()=>{f&&(async()=>{const x=r=>{L.current&&!L.current.value.trim()&&(L.current.value=r)};try{const r=await N(f);if(r.indexOf(d())!==0)throw new Error("Provided url is not from Maestro embed.");x(r.substring(d().length))}catch{x(E(f))}})()},[f]),{embedCodeRef:L,generateUrl:I}}},915683:(ce,G,t)=>{t.r(G),t.d(G,{VideoSettingsModalV1:()=>Qn,default:()=>Ea});var e=t(63696),s=t(283722),o=t(551321),T=t(654584),a=t(498685),d=t(41989),n=t(430141),E=t(808201),c=t(33149),f=t(579226),L=t(942662),N=t(656440),I=t(238913),x=t(679101),r=t(970587),y=t(71119),l=t(476765),i=t(879272),u=t(990220),b=t(754280),D=t(932043),B=t(209095),F=t(365179),M=t(298116),P=t(463302),m=t(522262),h=t(576430),C=t(551258),O=t(312614),k=t(241411),Q=t(669865),S=t(718264),J=t.n(S);const U=v=>Object.fromEntries(Object.entries(v).map(([p,A])=>[p,A.enabled?A:{enabled:!1}])),j=(v,p)=>!J()(U(v),U(p)),w=24,Y=7,K=30,q=365,ae={hours:1,days:w,weeks:w*Y,months:w*K,years:w*q},le={hours:1/w,days:1,weeks:Y,months:K,years:q},fe=(v,p)=>Math.max(0,p==="hours"?v/w:v*le[p]),Le=(v,p)=>Math.max(0,v*ae[p]),Ce=v=>({startWindowDays:fe(v.startWatchingPeriod.value,v.startWatchingPeriod.unit),watchWindowHours:Le(v.rentalPeriod.value,v.rentalPeriod.unit)}),Qe=v=>Math.abs(v-Math.round(v))<.001,se=v=>{const p=Math.max(0,v);if(p===0)return{value:0,unit:"hours"};if(p>=1&&Qe(p)){const A=Math.round(p);return A%q===0?{value:A/q,unit:"years"}:A%K===0?{value:A/K,unit:"months"}:A%Y===0?{value:A/Y,unit:"weeks"}:{value:A,unit:"days"}}return{value:Math.round(p*w),unit:"hours"}},ge=v=>{const p=Math.max(0,Math.round(v));return p===0?{value:0,unit:"hours"}:p%w===0?{value:p/w,unit:"days"}:{value:p,unit:"hours"}},pe=v=>{var p,A;return{startWatchingPeriod:se((p=v.startWindowDays)!=null?p:0),rentalPeriod:ge((A=v.watchWindowHours)!=null?A:0)}};var Re=Object.defineProperty,we=Object.defineProperties,mt=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,Be=(v,p,A)=>p in v?Re(v,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):v[p]=A,_e=(v,p)=>{for(var A in p||(p={}))Ee.call(p,A)&&Be(v,A,p[A]);if(Ue)for(var A of Ue(p))We.call(p,A)&&Be(v,A,p[A]);return v},tt=(v,p)=>we(v,mt(p));const It=()=>({startWatchingPeriod:{value:30,unit:"days"},rentalPeriod:{value:48,unit:"hours"}}),he=()=>({enabled:!1,prices:[]}),ye=()=>({enabled:!1,prices:[],rentalPolicy:It()}),Oe={"one-time-purchase":he(),rental:ye(),membership:he(),ticket:he()},Ct=(v,p=!1)=>{var A;return{description:p?"":v?.description||"",tags:p?[]:v?.tags||[],thumbnail:p?null:(A=v?.thumbnail)!=null?A:null,title:v?.title||"",url:v?.url||""}},et=(v,p=!1)=>{var A,H,te,W,Z,ne,xe,de,ue;return{"1-1":p?null:(H=(A=v?.thumbnailVariants)==null?void 0:A["1-1"])!=null?H:null,"3-2":p?null:(W=(te=v?.thumbnailVariants)==null?void 0:te["3-2"])!=null?W:null,"4-3":p?null:(ne=(Z=v?.thumbnailVariants)==null?void 0:Z["4-3"])!=null?ne:null,"5-4":p?null:(de=(xe=v?.thumbnailVariants)==null?void 0:xe["5-4"])!=null?de:null,"default-16-9":p?null:(ue=v?.thumbnail)!=null?ue:null}},nt=v=>{var p,A,H,te;return{"1-1":(p=v["1-1"])!=null?p:null,"3-2":(A=v["3-2"])!=null?A:null,"4-3":(H=v["4-3"])!=null?H:null,"5-4":(te=v["5-4"])!=null?te:null}};function X({initialPaywallState:v,isBulk:p,video:A}){const[H]=e.useState(()=>{var $e,me;return{description:p?"":A?.description||"",tags:p?[]:A?.tags||[],thumbnail:p?null:($e=A?.thumbnail)!=null?$e:null,thumbnailVariants:nt(p?{}:(me=A?.thumbnailVariants)!=null?me:{}),title:A?.title||"",url:A?.url||void 0}}),[te,W]=e.useState(()=>Ct(A,p)),[Z]=e.useState(()=>et(A,p)),[ne,xe]=e.useState(()=>Z),[de,ue]=e.useState(()=>v||Oe),[ie,re]=e.useState(()=>v||Oe),[Me,je]=e.useState({});e.useEffect(()=>{v&&(ue(v),re(v))},[v]);const Ge=e.useCallback(($e,me)=>{re(Ze=>tt(_e({},Ze),{[$e]:_e(_e({},Ze[$e]),me)}))},[]),ot=e.useCallback(($e,me)=>{je(Ze=>tt(_e({},Ze),{[$e]:me}))},[]),Ye=e.useMemo(()=>
858{if(Object.entries(Me).some(([Ze,an])=>{var sn;return(sn=ie[Ze])!=null&&sn.enabled?an&&Object.keys(an).length>0:!1}))return!0;const me=ie.rental;if(me.enabled&&me.rentalPolicy){const Ze=fe(me.rentalPolicy.startWatchingPeriod.value,me.rentalPolicy.startWatchingPeriod.unit),an=Le(me.rentalPolicy.rentalPeriod.value,me.rentalPolicy.rentalPeriod.unit);if(Ze<=0||an<=0)return!0}return!1},[Me,ie]),xt=e.useCallback(($e,me)=>{W(Ze=>tt(_e({},Ze),{[$e]:me}))},[]),lt=e.useCallback(($e,me)=>{xe(Ze=>tt(_e({},Ze),{[$e]:me})),$e==="default-16-9"&&xt("thumbnail",me)},[xt]),bt=e.useCallback($e=>{xe(me=>tt(_e({},me),{[$e]:null})),$e==="default-16-9"&&xt("thumbnail",null)},[xt]),Pe=e.useMemo(()=>({description:te.description,tags:te.tags,thumbnail:te.thumbnail,thumbnailVariants:nt(ne),title:te.title,url:te.url||void 0}),[te,ne]),ze=e.useMemo(()=>te.title.trim().length===0,[te.title]),st=e.useMemo(()=>j(ie,de),[ie,de]),ve=e.useMemo(()=>!J()(Pe,H)||st,[st,H,Pe]);return{tabsWithPendingChanges:e.useMemo(()=>({metadata:te.title!==(H.title||"")||te.description!==(H.description||""),paywall:st,tags:!J()(te.tags,H.tags||[]),thumbnails:!J()(ne,Z)}),[st,Z,H,ne,te.description,te.tags,te.title]),handleClearThumbnail:bt,handlePaywallErrorsChange:ot,handlePaywallOptionChange:Ge,handleThumbnailChange:lt,handleVideoChange:xt,hasInvalidTitle:ze,hasPaywallErrors:Ye,hasPendingChanges:ve,initialVideoSavePayload:H,paywallErrors:Me,pendingPaywallState:ie,pendingVideoSavePayload:Pe,pendingThumbnailState:ne,pendingVideoState:te,thumbnailPreviews:ne}}var oe=t(964746),_=t(514245),Ae=t(80247),be=Object.defineProperty,ke=Object.defineProperties,Ot=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,Fe=(v,p,A)=>p in v?be(v,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):v[p]=A,Ke=(v,p)=>{for(var A in p||(p={}))ut.call(p,A)&&Fe(v,A,p[A]);if(vt)for(var A of vt(p))gt.call(p,A)&&Fe(v,A,p[A]);return v},at=(v,p)=>ke(v,Ot(p)),De=(v,p)=>{var A={};for(var H in v)ut.call(v,H)&&p.indexOf(H)<0&&(A[H]=v[H]);if(v!=null&&vt)for(var H of vt(v))p.indexOf(H)<0&&gt.call(v,H)&&(A[H]=v[H]);return A};const dt=v=>v.filter(p=>p.currency&&p.value&&!isNaN(Number(p.value))&&Number(p.value)>0).map(p=>({currency:p.currency,default:p.default,value:Number(p.value)})),Ve=async(v,p,A)=>{var H,te,W,Z,ne;const xe=(ne=(Z=(W=(te=(H=A.page)==null?void 0:H.data)==null?void 0:te.gate)==null?void 0:W.gate)==null?void 0:Z.subscriptions)==null?void 0:ne.find(de=>de.type===v);if(xe?._id)return xe;try{return await(0,h.YR)(p,A.siteId,A.primaryToken)}catch(de){return Ae.warn(`SKU lookup failed for ${p}; falling back to create:`,de),null}},Xe=async(v,p,A,H)=>{const te=await Ve(p,v,H);if(te?._id){const W=A,{sku:Z}=W,ne=De(W,["sku"]);return(0,h.nV)({id:te._id,payload:ne,primaryToken:H.primaryToken,siteId:H.siteId})}return(0,h.Ky)({payload:A,primaryToken:H.primaryToken,siteId:H.siteId})},Dt=async(v,p)=>{const A=dt(v.prices);if(A.length===0)return[];const H=`vod-purchase-${p.videoId}`;return[await Xe(H,_.Q.vodPurchase,{name:`${p.videoTitle} - VOD Purchase`,prices:A,recurrence:"once",sku:H,subscriptionProvider:"maestro",type:_.Q.vodPurchase},p)]},Et=async(v,p)=>{const A=dt(v.prices);if(A.length===0||!v.rentalPolicy)return[];const{startWindowDays:H,watchWindowHours:te}=Ce(v.rentalPolicy),W=`vod-rental-${p.videoId}`;return[await Xe(W,_.Q.vodRental,{name:`${p.videoTitle} - VOD Rental`,prices:A,recurrence:"once",rentalPolicy:{startWindowDays:H,watchWindowHours:te},sku:W,subscriptionProvider:"maestro",type:_.Q.vodRental},p)]},At=v=>async(p,A)=>{const H=p.selectedSubscriptions;return H?.length?await Promise.all(H.map(async W=>{var Z,ne,xe,de;try{const ue=await(0,h.Ie)(W._id,A.siteId,A.primaryToken);return at(Ke({},ue),{_id:(Z=ue._id)!=null?Z:W._id,id:(xe=(ne=ue.id)!=null?ne:ue._id)!=null?xe:W._id,type:(de=ue.type)!=null?de:v})}catch{return{_id:W._id,id:W._id,name:W.name,type:v}}})):[]},Lt={"one-time-purchase":Dt,membership:At(_.Q.subscription),rental:Et,ticket:At(_.Q.ticket)},ct=async(v,p)=>{const A=[];for(const[H,te]of Object.entries(v)){if(!te.enabled)continue;const W=Lt[H];if(!W)continue;const Z=await W(te,p);A.push(...Z)}return A}
858,Pt={[_.Q.subscription]:"membership",[_.Q.ticket]:"ticket"},Bt=v=>{var p,A,H,te,W,Z,ne;if(!((A=(p=v?.gate)==null?void 0:p.subscriptions)!=null&&A.length))return null;const xe={"one-time-purchase":{enabled:!1,prices:[]},rental:{enabled:!1,prices:[],rentalPolicy:It()},membership:{enabled:!1,prices:[]},ticket:{enabled:!1,prices:[]}};for(const de of v.gate.subscriptions){if(de.type===_.Q.vodPurchase){xe["one-time-purchase"]={enabled:!0,prices:(de.prices||[]).map(ie=>({currency:ie.currency,default:ie.default,stripePriceId:ie.stripePriceId,value:String(ie.value)}))};continue}if(de.type===_.Q.vodRental){xe.rental={enabled:!0,prices:(de.prices||[]).map(ie=>({currency:ie.currency,default:ie.default,stripePriceId:ie.stripePriceId,value:String(ie.value)})),rentalPolicy:pe({startWindowDays:(te=(H=de.rentalPolicy)==null?void 0:H.startWindowDays)!=null?te:1,watchWindowHours:(Z=(W=de.rentalPolicy)==null?void 0:W.watchWindowHours)!=null?Z:720})};continue}const ue=Pt[de.type];if(ue){const ie=(ne=xe[ue].selectedSubscriptions)!=null?ne:[];xe[ue]=at(Ke({},xe[ue]),{enabled:!0,selectedSubscriptions:[...ie,{_id:de.id,name:de.name}]})}}return xe},Vt=e.createContext(void 0);function Xt({children:v,data:p}){var A;const{editVideoMetadata:H,setFilters:te}=(0,i.Z2)(),W=(0,a.d4)(F.V2d),Z=(0,a.d4)(P.mC),ne=(0,a.d4)(B.L3),xe=ne?.[M.Xj.PAGES_V3]?u.iz:u._e,de=(0,a.d4)(
858F.iMf),ue=p?.videos||[],ie=ue.length>1,re=ue[0]||null,Me=!!re?.newId,je=re?.player===oe.PlayerTypes.iframe,Ge=!ie&&je,ot=Me&&je&&!re?.url,[Ye,xt]=e.useState(""),[lt,bt]=e.useState(""),Pe=e.useRef(!1),ze=e.useCallback(Te=>{Pe.current=!0,bt(Te)},[]);e.useEffect(()=>{if(!Ge)return;if(!re?.url){Pe.current=!1,xt(""),bt("");return}Pe.current=!1;const Te=(0,k.w)(re.url);xt(Te),bt(Te);let it=!1;const Yt=re.url;return(async()=>{try{const Tt=await(0,O.pw)(Yt);if(it||Tt.indexOf((0,k.h)())!==0)return;const Gt=Tt.substring((0,k.h)().length),gn=new URL(Yt).hostname,Pn=(0,l.pW)(Gt,{wrapperHost:gn});xt(Pn),Pe.current||bt(Pn)}catch{}})(),()=>{it=!0}},[Ge,re?.url]);const st=ue.some(Te=>(0,Q.$V)(Te?.player)||Te?.player===oe.PlayerTypes.iframe&&(0,l.RS)(Te?.url)),[ve,St]=e.useState(!1),$e=ie?ue.filter(Te=>Te?.player===oe.PlayerTypes.iframe&&Te?.url).map(Te=>Te.url).join("|"):"";e.useEffect(()=>{if(!$e){St(!1);return}let Te=!1;const it=$e.split("|");return(async()=>{const Yt=await Promise.all(it.map(async Tt=>{try{const Gt=await(0,O.pw)(Tt);return(0,l.RS)(Gt)}catch{return!1}}));Te||St(Yt.some(Boolean))})(),()=>{Te=!0}},[$e]);const me=Ge&&(0,l.RS)(lt),Ze=Ge&&lt!==Ye,an=st||ve||me,[sn,vn]=e.useState((A=p?.initialTab)!=null?A:"metadata"),[En,Xn]=e.useState(!1),[Jn,Zn]=e.useState(null),[ya,_n]=e.useState(null),[Sn,kn]=e.useState(null),qn=e.useRef(de);qn.current=de,e.useEffect(()=>{var Te;if(ie||!re?._id||!Z||!W)return;const it=qn.current;if(it?.slug===re._id){kn(it);const Tt=Bt((Te=it.data)==null?void 0:Te.gate);Tt&&_n(Tt);return}let Yt=!1;return(0,m.YC)({pageServiceURL:xe,primaryToken:Z,siteId:W,slug:re._id}).then(Tt=>{var Gt;if(Yt||!Tt)return;kn(Tt);const gn=Bt((Gt=Tt.data)==null?void 0:Gt.gate);gn&&_n(gn)}).catch(Tt=>{Ae.error("Failed to fetch video page for paywall state:",Tt)}),()=>{Yt=!0}},[ie,xe,Z,W,re?._id]);const Se=X({initialPaywallState:ya,isBulk:ie,video:re}),ea=(()=>{switch(sn){case"thumbnails":return"h-[887px] max-h-[calc(100dvh_-_32px)]";case"paywall":return"min-h-[clamp(400px,50vh,450px)] max-h-[calc(100dvh-96px)]";default:return"h-[clamp(560px,70vh,617px)]"}})(),yn=e.useCallback(async({paywallState:Te,videoId:it,videoPage:Yt,videoTitle:Tt})=>{var Gt,gn,Pn;if(!Z)return;const fn=Yt||await(0,m.YC)({pageServiceURL:xe,primaryToken:Z,siteId:W,slug:it});if(!fn?._id)return;const Wn=await ct(Te,{page:fn,pageServiceURL:xe,primaryToken:Z,siteId:W,videoTitle:Tt,videoId:it});await(0,m.Ud)({pageId:fn._id,pageServiceURL:xe,primaryToken:Z,siteId:W,update:{data:at(Ke({},fn.data),{gate:at(Ke({},(Gt=fn.data)==null?void 0:Gt.gate),{active:Wn.length>0,gate:at(Ke({},(Pn=(gn=fn.data)==null?void 0:gn.gate)==null?void 0:Pn.gate),{subscriptions:Wn}),kind:Wn.length>0?D.GQ.SUBSCRIPTION:D.GQ.NONE})})}})},[xe,Z,W]),ta=e.useCallback(async()=>{if(!re||!Z)return;const Te=re,{newId:it}=Te,Yt=De(Te,["newId"]),Tt=at(Ke(Ke({},Yt),Se.pendingVideoSavePayload),{siteId:W});if(Ge&&(ot||Ze||(0,l.DP)(lt))&&(Tt.url=await(0,k.qC)(lt)),await(0,C.Ry)({newId:it,primaryToken:Z,siteId:W,video:Tt}),Se.tabsWithPendingChanges.paywall){const Gt=re.newId;if(!Gt)return;await yn({paywallState:Se.pendingPaywallState,videoId:Gt,videoPage:null,videoTitle:Se.pendingVideoState.title||re.title||"Untitled"})}},[Ze,Ge,lt,Z,ot,yn,W,re,Se.pendingPaywallState,Se.pendingVideoSavePayload,Se.pendingVideoState.title,Se.tabsWithPendingChanges]),na=e.useCallback(async()=>{if(!re||!Z)return;const Te=at(Ke(Ke({},re),Se.pendingVideoSavePayload),{_id:re._id,siteId:W});if(Ge&&(Ze||(0,l.DP)(lt))&&(Te.url=await(0,k.qC)(lt)),await(0,C.Ry)({primaryToken:Z,siteId:W,video:Te}),Se.tabsWithPendingChanges.paywall){const it=re._id;if(!it)return;await yn({paywallState:Se.pendingPaywallState,videoId:it,videoPage:Sn,videoTitle:Se.pendingVideoState.title||re.title||"Untitled"})}},[Sn,Ze,Ge,lt,Z,yn,W,re,Se.pendingPaywallState,Se.pendingVideoSavePayload,Se.pendingVideoState.title,Se.tabsWithPendingChanges]),aa=e.useCallback(async()=>{Z&&(await H(ue.map(Te=>{const it=at(Ke({},Te),{_id:Te._id,newId:Te.newId,siteId:W});return Se.tabsWithPendingChanges.metadata&&(it.description=Se.pendingVideoSavePayload.description),Se.tabsWithPendingChanges.tags&&(it.tags=Se.pendingVideoSavePayload.tags),Se.tabsWithPendingChanges.thumbnails&&(it.thumbnail=Se.pendingVideoSavePayload.thumbnail,it.thumbnailVariants=Se.pendingVideoSavePayload.thumbnailVariants),it})),Se.tabsWithPendingChanges.paywall&&await Promise.all(ue.map(async Te=>{const it=Te._id||Te.newId;it&&await yn({paywallState:Se.pendingPaywallState,videoId:it,videoPage:null,videoTitle:Te.title||"Untitled"})})))},[H,Z,yn,W,Se.pendingPaywallState,Se.pendingVideoSavePayload,Se.tabsWithPendingChanges,ue]),ra=e.useCallback(async()=>
858{if(!(!W||En||!Me&&!Se.hasPendingChanges&&!Ze)){Xn(!0),Zn(null);try{ie?await aa():Me?await ta():await na(),te(Te=>at(Ke({},Te),{sortBy:"modified",sortDirection:"-1"}))}catch(Te){throw Ae.error("Failure when upserting video settings:",Te),Te}finally{Xn(!1)}}},[Ze,ie,Me,En,aa,ta,te,W,na,Se.hasPendingChanges]),oa=e.useMemo(()=>!re||En||!ie&&Se.hasInvalidTitle||Se.hasPaywallErrors||Ge&&!(0,l.ww)(lt)?!0:!Me&&!Se.hasPendingChanges&&!Ze,[Ze,ie,Me,Ge,lt,Se.hasInvalidTitle,Se.hasPaywallErrors,Se.hasPendingChanges,re,En]),la=e.useMemo(()=>{const Te=re?._id;return!Te||re?.type===oe.VideoTypes.livestream?"":(0,b.gM)(Te,u.o2)},[re?._id,re?.type]),ha=e.useMemo(()=>({activeTab:sn,hasInvalidTitle:Se.hasInvalidTitle,hasYoutubeOrTwitchVideo:an,isBulk:ie,tabsWithPendingChanges:at(Ke({},Se.tabsWithPendingChanges),{metadata:Se.tabsWithPendingChanges.metadata||Ze}),onSave:ra,hasPendingChanges:Se.hasPendingChanges||Ze,isSaveDisabled:oa,isSaving:En,modalErrorMessage:Jn,modalHeightClassName:ea,pendingEmbedCode:lt,initialEmbedCode:Ye,embedCodeIsDirty:Ze,isSingleIframeVideo:Ge,requiresEmbedCode:ot,setPendingEmbedCode:bt,handleEmbedCodeChange:ze,saveFoundationPayload:{video:Se.pendingVideoSavePayload},setModalErrorMessage:Zn,setActiveTab:vn,videoSource:re,videoUrl:la,video:Se,cachedVideoPage:Sn}),[sn,Sn,Ze,ze,an,Ye,ie,Ge,Jn,ra,oa,En,ea,lt,ot,re,Se,la]);return e.createElement(Vt.Provider,{value:ha},v)}function Mt(){const v=e.useContext(Vt);if(!v)throw new Error("useVideoSettingsContext must be used within VideoSettingsProvider");return v}function Jt(){return React.useContext(Vt)}const Ie=({className:v})=>e.createElement("svg",{"aria-hidden":"true",className:v,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M16.167 8c1.707 0 2.56 0 3.242.256a4 4 0 0 1 2.335 2.335c.256.681.256 1.535.256 3.242V15.6c0 2.24 0 3.36-.436 4.216a4 4 0 0 1-1.748 1.748C18.96 22 17.84 22 15.6 22h-1.766c-1.708 0-2.562 0-3.243-.256a4 4 0 0 1-2.334-2.335C8 18.728 8 17.874 8 16.167"}),e.createElement("path",{fill:"currentColor",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8.4 16
858h1.2c2.24 0 3.36 0 4.216-.436a4 4 0 0 0 1.748-1.748C16 12.96 16 11.84 16 9.6V8.4c0-2.24 0-3.36-.436-4.216a4 4 0 0 0-1.748-1.748C12.96 2 11.84 2 9.6 2H8.4c-2.24 0-3.36 0-4.216.436a4 4 0 0 0-1.748 1.748C2 5.04 2 6.16 2 8.4v1.2c0 2.24 0 3.36.436 4.216a4 4 0 0 0 1.748 1.748C5.04 16 6.16 16 8.4 16Z"}));function Je({}){const{isBulk:v,isSingleIframeVideo:p,modalErrorMessage:A,pendingEmbedCode:H,handleEmbedCodeChange:te,requiresEmbedCode:W,setModalErrorMessage:Z,video:ne,videoSource:xe,videoUrl:de}=Mt(),{t:ue}=(0,d._h)(),{copyToClipboard:ie}=(0,y.A)(de),[re,Me]=e.useState(!1),je=e.useRef(null),Ge=ue("ADMIN_VIDEO_SETTINGS_TITLE_REQUIRED_ERROR"),ot=ue("ADMIN_VIDEO_LIBRARY_INCORRECT_URL_FORMAT"),Ye=(0,e.useCallback)(async()=>{if(de){try{await navigator.clipboard.writeText(de)}catch{ie(de)}Me(!0),je.current&&clearTimeout(je.current),je.current=setTimeout(()=>{Me(!1)},2e3)}},[ie,de]),xt=e.useCallback(ze=>{const st=ze.target.value;if(ne.handleVideoChange("title",st),st.trim().length===0){Z(Ge);return}A===Ge&&Z(null)},[A,Z,Ge,ne]),lt=e.useCallback(ze=>{ne.handleVideoChange("description",ze.target.value)},[ne]),bt=e.useCallback(ze=>{const st=ze.target.value;if(te(st),!(0,l.ww)(st)){Z(ot);return}A===ot&&Z(null)},[ot,te,A,Z]),Pe=e.useRef(null);return e.useEffect(()=>{var ze;W&&((ze=Pe.current)==null||ze.focus())},[W]),e.useEffect(()=>()=>{je.current&&clearTimeout(je.current)},[]),e.createElement("div",{className:"flex h-full flex-col"},e.createElement("div",{className:"flex flex-col gap-[20px]"},!v&&e.createElement(e.Fragment,null,e.createElement("div",{className:"flex flex-col gap-2.5"},e.createElement(r.J,{className:"block text-[11px] font-medium leading-none text-[var(--admin-text-100)]"},ue("ADMIN_LABEL_TITLE")),e.createElement(x.p,{className:(0,c.cn)((0,I.y)(),"h-14"),"data-testid":"video-settings-metadata-title",onChange:xt,value:ne.pendingVideoState.title})),de&&e.createElement("div",{className:"flex flex-col gap-2.5"},e.createElement(r.J,{className:"block text-[11px] font-medium leading-none text-[var(--admin-text-100)]"},ue("ADMIN_LABEL_URL")),e.createElement("div",{className:"relative"},e.createElement(x.p,{className:(0,c.cn)((0,I.y)(),"h-14 pr-10 text-[var(--admin-text-300)] disabled:bg-[var(--admin-surface-2)] disabled:opacity-100"),"data-testid":"video-settings-metadata-url",disabled:!0,value:de}),e.createElement(o.$,{"aria-label":ue(re?"COPIED":"LABEL_COPY"),className:"absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 rounded-none bg-transparent p-0 text-[var(--admin-text-100)] transition-colors hover:bg-transparent hover:text-[var(--admin-text-100)] disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent disabled:hover:text-[var(--admin-text-100)]",context:"admin","data-testid":"video-settings-metadata-copy-url",onClick:Ye,size:"icon",type:"button",variant:"ghost"},re?e.createElement(L.Check,{className:"size-3.5"}):e.createElement(Ie,{className:"size-3.5"}))))),p&&e.createElement("div",{className:"flex flex-col gap-2.5"},e.createElement(r.J,{className:"block text-[11px] font-medium leading-none text-[var(--admin-text-100)]"},ue("ADMIN_LABEL_EMBED_CODE")),e.createElement(N.i,{ref:Pe,"aria-label":ue("ADMIN_LABEL_EMBED_CODE"),className:(0,c.cn)((0,I.y)(),"min-h-[120px] resize-none pt-3 font-mono text-[12px] leading-[18px]"),"data-testid":"video-settings-metadata-embed-code",maxRows:8,onChange:bt,placeholder:ue("ADMIN_VIDEO_SETTINGS_EMBED_CODE_PLACEHOLDER"),value:H})),e.createElement("div",{className:"flex flex-col gap-2.5"},e.createElement(r.J,{className:"block text-[11px] font-medium leading-none text-[var(--admin-text-100)]"},ue("ADMIN_LABEL_DESCRIPTION")),e.createElement(N.i,{className:(0,c.cn)((0,I.y)(),"min-h-[120px] resize-none pt-3"),"data-testid":"video-settings-metadata-description",maxRows:8,onChange:lt,placeholder:ue("ADMIN_PLACEHOLDER_ENTER_DESCRIPTION"),value:ne.pendingVideoState.description}))))}var Rt=t(406044);const He=6;function Nt(){const{video:v,activeTab:p}=Mt(),{t:A}=(0,d._h)(),H=(0,a.UC)(),[te,W]=e.useState(""),[Z,ne]=e.useState(!1),[xe,de]=e.useState(0),ue=v.pendingVideoState.tags,ie=e.useRef(void 0);e.useEffect(()=>{ie.current==="tags"&&p!=="tags"&&ne(!1),ie.current=p},[p]),e.useEffect(()=>{ue.length<He&&ne(!1)},[ue.length]);const re=e.useMemo(()=>H.filter(ve=>ve!=="system").map(ve=>({label:ve,value:ve})),[H]),Me=e.useMemo(()=>ue.map(ve=>({label:ve,value:ve})),[ue]),je=e.useCallback(ve=>ve.trim().toLowerCase()==="system",[]),Ge=e.useCallback(ve=>(W(ve.trim()),ve),[]),ot=e.useCallback(ve=>{v.handleVideoChange("tags",ve)},[v]),Ye=e.useCallback(()=>{ne(!0),W(""),de(ve=>ve+1)},[]),xt=e.useCallback(ve=>{const St=Array.isArray(ve)?ve.map(({value:$e})=>$e):[];if(St.length>He){Ye();return}ot(St)},[ot,Ye]),lt=e.useCallback(ve=>{if(ue.length>=He){Ye();return}ot([ve,...ue])},[ot,ue,Ye]),bt=e.useCallback(ve=>{ot(ue.filter(St=>St!==ve))},[ot,ue]),Pe=e.useCallback((ve,St,$e)=>{const me=ve.trim().toLowerCase();if(me.length===0||je(me))return!1;const an=(Array.isArray($e)&&$e.length>0&&"options"in $e[0]?$e.flatMap(vn=>vn.options):$e).some(vn=>vn.value.toLowerCase()===me),sn=Me.some(vn=>vn.value.toLowerCase()===me);return!an&&!sn},[je,Me]),ze=e.useCallback(()=>{const ve=te.trim().toLowerCase();return je(ve)?A("ADMIN_TAGS_NO_BANNED_TAG",{inputValue:te}):Me.some(St=>St.value.toLowerCase()===ve)?A("ADMIN_TAGS_NO_DUPE",{inputValue:te}):A("ADMIN_TAGS_NO_OPTIONS")},[je,Me,A,te]),st=e.useCallback(ve=>A("ADMIN_TAGS_CREATE_TAG",{inputValue:ve}),[A]);return e.createElement("div",{className:"flex h-full flex-col"},e.createElement("div",{className:"space-y-4"},e.createElement("div",{className:"block"},e.createElement("div",null,e.createElement(Rt.A,{key:xe,formatCreateLabel:st,inputClassName:Z?"border-b-[color:var(--admin-alert-warning)] placeholder:text-[var(--admin-alert-warning)]":void 0,isValidNewOption:Pe,noOptionsMessage:ze,onChange:xt,onCreateOption:lt,onInputChange:Ge,options:re,placeholder:A(Z?"ADMIN_LABEL_METADATA_TAG_LIMIT":"ADMIN_TAGS_PLACEHOLDER"),value:Me}),e.createElement("ul",{className:"mt-[10px] flex flex-wrap gap-[10px] p-0"},ue.map(ve=>e.createElement("li",{key:ve,className:"inline-flex h-6 min-h-6 items-center gap-[2px] rounded-full bg-[var(--admin-surface-5)] pb-1 pl-2 pr-3 pt-[3px] text-[12px] font-medium leading-[14px] text-[var(--admin-text-100)]"},e.createElement(o.$,{"aria-label":`${A("LABEL_REMOVE")} ${ve}
858`,className:"h-4 w-4 rounded-none bg-transparent p-0 text-[var(--admin-text-100)] hover:bg-transparent hover:text-[var(--admin-text-100)]",context:"admin",onClick:()=>bt(ve),type:"button",variant:"ghost"},e.createElement(s.Ay,{className:"size-2.5",name:"cancel-thin"})),e.createElement("span",null,ve))))))))}const wt="h-full min-h-0 flex-1 resize-none px-4 py-3 font-mono text-[12px] leading-[18px] text-[var(--admin-text-200)]",Ut=(v,p)=>{const A=p.replace(/"/g,"&quot;");return[`<iframe src="${v}"`,`title="${A}"`,'frameborder="0"','allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"','referrerpolicy="strict-origin-when-cross-origin"',"allowfullscreen",'style="width:100%;height:100%;min-width:1000px;min-height:575px;border:0"></iframe>'].join(" ")};function zt(){const{videoSource:v}=Mt(),{t:p}=(0,d._h)(),{copyToClipboard:A}=(0,y.A)(),[H,te]=e.useState(!1),W=e.useRef(null),Z=(0,e.useMemo)(()=>{const xe=v?._id;if(!xe)return"";const de=(0,b.gM)(xe,u.o2,{embed:!0});return Ut(de,v?.title||"")},[v?._id,v?.title]),ne=(0,e.useCallback)(async()=>{if(Z){try{await navigator.clipboard.writeText(Z)}catch{A(Z)}te(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>{te(!1)},2e3)}},[A,Z]);return e.useEffect(()=>()=>{W.current&&clearTimeout(W.current)},[]),e.createElement("div",{className:"flex h-full flex-col"},e.createElement(T.rr,{className:"mb-[10px] text-[12px] leading-[18px] text-[var(--admin-text-300)]"},p("ADMIN_VIDEO_SETTINGS_EMBED_CODE_NOTE")),e.createElement("div",{className:"relative flex min-h-0 flex-1 flex-col"},e.createElement(N.i,{"aria-label":p("ADMIN_LABEL_EMBED_CODE"),className:(0,c.cn)((0,I.y)(),wt,"pr-[132px]"),"data-testid":"video-settings-embed-code",maxRows:20,placeholder:p("ADMIN_VIDEO_SETTINGS_EMBED_CODE_UNAVAILABLE_PLACEHOLDER"),readOnly:!0,value:Z}),e.createElement(o.$,{"aria-label":p(H?"COPIED":"ADMIN_VIDEO_SETTINGS_COPY_CODE"),className:"absolute bottom-4 right-4 h-10 rounded-full bg-admin-surface-2 py-3 pl-4 pr-6 text-[14px] font-semibold leading-[16px] text-admin-text-100 transition-colors hover:bg-admin-surface-2 hover:text-admin-text-100",style:{border:"1px solid var(--admin-surface-6)"},context:"admin","data-testid":"video-settings-embed-copy",disabled:!Z,onClick:ne,type:"button",variant:"ghost"},H?e.createElement(L.Check,{className:"size-4"}):e.createElement(Ie,{className:"size-4"}),e.createElement("span",null,p(H?"COPIED":"ADMIN_VIDEO_SETTINGS_COPY_CODE")))))}var Zt=t(739218),dn=t(696105),yt=t(333618);function pt({checked:v=!1,name:p,onCheckedChange:A,subtitle:H,testId:te,title:W}){return e.createElement("label",{className:"flex cursor-pointer items-center gap-5","data-testid":te},e.createElement(yt.S,{checked:v,name:p,onCheckedChange:A}),e.createElement("div",{className:"flex flex-col gap-1"},e.createElement(r.J,{className:"text-[14px] font-medium leading-[18px] text-[var(--admin-text-100)]"},W),e.createElement("p",{className:"m-0 text-[14px] leading-[18px] text-[var(--admin-text-200)]"},H)))}var ht=t(825711),Kt=t(907079);const _t={membership:"ADMIN_VIDEO_SETTINGS_PAYWALL_ADD_MEMBERSHIP",ticket:"ADMIN_VIDEO_SETTINGS_PAYWALL_ADD_TICKET"},jt={membership:"memberships",ticket:"tickets"},xn=e.memo(function({onAdd:p,onRemove:A,optionKey:H,selectedSubscriptions:te}){var W,Z;const{t:ne}=(0,d._h)(),xe=e.useCallback(re=>A(H,re),[A,H]),de=e.useCallback(()=>p(H),[p,H]),ue=(W=_t[H])!=null?W:"ADMIN_VIDEO_SETTINGS_PAYWALL_ADD_MEMBERSHIP",ie=(Z=jt[H])!=null?Z:"entitlements";return e.createElement("div",{className:"pl-11 pt-3","data-testid":`video-settings-paywall-${H}-${ie}`},e.createElement("div",{className:"grid w-full grid-cols-2 gap-2"},te.map(re=>e.createElement(Kt.A,{id:re._id,key:re._id,label:re.name,onRemove:xe,testId:`video-settings-paywall-${H}-tag-${re._id}`})),e.createElement(o.$,{className:"flex h-10 items-center justify-start gap-2 rounded-[4px] bg-transparent px-4 py-0 text-[13px] font-medium text-[var(--admin-text-200)] hover:bg-[var(--admin-surface-4)] hover:text-[var(--admin-text-100)]",context:"admin","data-testid":`video-settings-paywall-${H}-add`,onClick:de,style:{border:"1px solid var(--admin-surface-5)"},type:"button",variant:"ghost"},e.createElement(ht.FWt,{className:"h-4 w-4"}),ne(ue))))});var kt=t(376676),qt=t(33849),cn=t(264965),rn=t(622112);const mn=/[^0-9]/g,un=/^0+(?=\d)/;function z({description:v,errorText:p,label:A,labelTooltip:H,onUnitChange:te,onValueChange:W,testId:Z,unit:ne,unitOptions:xe,value:de}){const{t:ue}=(0,d._h)(),ie=e.useCallback(re=>{const Me=re.target.value.replace(mn,"").replace(un,"");W(Me===""?0:Number(Me))},[W]);return e.createElement("div",{className:"flex flex-col gap-2"},e.createElement("div",{className:"flex items-center gap-1.5"},e.createElement("span",{className:"text-[12px] font-medium leading-none text-[var(--admin-text-100)]"},A),H?e.createElement(rn.m_,null,e.createElement(rn.k$,{asChild:!0},e.createElement(o.$,{"aria-label":ue("ADMIN_LABEL_INFO_BUTTON_ARIA"),className:(0,
858c.cn)("h-auto min-h-0 shrink-0 rounded-sm p-0.5 font-normal","text-[var(--admin-text-300)] hover:bg-transparent hover:text-[var(--admin-text-100)]","[&_svg]:size-[14px]"),context:"admin","data-testid":Z?`${Z}-label-info`:void 0,type:"button",variant:"ghost"},e.createElement(ht.R2D,{"aria-hidden":!0}))),e.createElement(rn.ZI,{className:(0,c.cn)("max-w-[min(300px,calc(100vw-32px))] border border-[var(--admin-surface-5)]","bg-[var(--admin-surface-1)] p-0 text-left font-normal text-[var(--admin-text-100)] shadow-md"),side:"top"},e.createElement("div",{className:"px-3 py-2.5"},H))):null),v&&e.createElement("span",{className:"text-[11px] leading-4 text-[var(--admin-text-300)]","data-testid":Z?`${Z}-description`:void 0},v),e.createElement("div",{className:"flex items-center gap-2"},e.createElement(x.p,{className:(0,c.cn)((0,I.y)(),"h-10 w-[72px] text-sm"),"data-testid":Z?`${Z}-value`:void 0,inputMode:"numeric",onChange:ie,type:"text",value:String(de)}),e.createElement(qt.l6,{onValueChange:re=>te(re),value:ne},e.createElement(qt.bq,{className:(0,c.cn)((0,cn.w6)({surface:2}),"w-[140px]"),"data-testid":Z?`${Z}-unit`:void 0},e.createElement(qt.yv,null)),e.createElement(qt.gC,{className:(0,c.cn)((0,cn.Nx)({surface:2})),position:"popper",side:"bottom"},xe.map(re=>e.createElement(qt.eb,{className:(0,c.cn)((0,cn.h8)({surface:2})),key:re.value,value:re.value},ue(re.labelKey)))))),p&&e.createElement("p",{className:"min-h-4 text-[11px] leading-4 text-[var(--admin-alert-error)]","data-testid":Z?`${Z}-error`:void 0},p))}function $({children:v}){return e.createElement("li",{className:"flex gap-2 text-[11px] leading-snug text-[var(--admin-text-200)]"},e.createElement("span",{"aria-hidden":!0,className:"mt-[5px] h-1 w-1 shrink-0 rounded-full bg-[var(--admin-text-400)]"}),e.createElement("span",null,v))}function ee({exampleKeys:v,meansKeys:p}){const{t:A}=(0,d._h)();return e.createElement("div",{className:"space-y-3"},e.createElement("div",null,e.createElement("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-[var(--admin-text-300)]"},A("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_TOOLTIP_HEADING_EXAMPLE")),e.createElement("ul",{className:"m-0 list-none space-y-1.5 p-0"},v.map(H=>e.createElement($,{key:H},A(H))))),e.createElement("div",null,e.createElement("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-[var(--admin-text-300)]"},A("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_TOOLTIP_HEADING_THAT_MEANS")),e.createElement("ul",{className:"m-0 list-none space-y-1.5 p-0"},p.map(H=>e.createElement($,{key:H},A(H))))))}var en=Object.defineProperty,tn=Object.defineProperties,nn=Object.getOwnPropertyDescriptors,on=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Tn=(v,p,A)=>p in v?en(v,p,{enumerable:!0,configurable:!0,writable:!0,value:A}):v[p]=A,Qt=(v,p)=>{for(var A in p||(p={}))pn.call(p,A)&&Tn(v,A,p[A]);if(on)for(var A of on(p))ln.call(p,A)&&Tn(v,A,p[A]);return v},Ht=(v,p)=>tn(v,nn(p));const Ln=["ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_TOOLTIP_EX_1","ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_TOOLTIP_EX_2"],Nn=["ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_TOOLTIP_MEANS_1","ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_TOOLTIP_MEANS_2"],On=["ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_PERIOD_TOOLTIP_EX_1","ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_PERIOD_TOOLTIP_EX_2"],Rn=["ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_PERIOD_TOOLTIP_MEANS_1","ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_PERIOD_TOOLTIP_MEANS_2"],An=e.createElement(ee,{exampleKeys:Ln,meansKeys:Nn}),bn=e.createElement(ee,{exampleKeys:On,meansKeys:Rn}),Dn=[{labelKey:"ADMIN_LABEL_HOURS",value:"hours"},{labelKey:"ADMIN_LABEL_DAYS",value:"days"},{labelKey:"ADMIN_LABEL_WEEKS",value:"weeks"},{labelKey:"ADMIN_LABEL_MONTHS",value:"months"},{labelKey:"ADMIN_LABEL_YEARS",value:"years"}],Mn=[{labelKey:"ADMIN_LABEL_HOURS",value:"hours"},{labelKey:"ADMIN_LABEL_DAYS",value:"days"}],wn=e.memo(function({errors:p,onPricesChange:A,onErrorsChange:H,onRentalPolicyChange:te,optionKey:W,prices:Z,rentalPolicy:ne,shopCurrencyCode:xe}){const{t:de}=(0,d._h)(),ue=e.useMemo(()=>{const Ye={}
858,xt=fe(ne.startWatchingPeriod.value,ne.startWatchingPeriod.unit),lt=Le(ne.rentalPeriod.value,ne.rentalPeriod.unit);return xt<=0&&(Ye.startWatchingPeriod=de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_PERIOD_ERROR")),lt<=0&&(Ye.rentalPeriod=de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_RENTAL_PERIOD_ERROR")),Ye},[ne,de]),ie=e.useCallback(Ye=>A(W,Ye),[A,W]),re=e.useCallback(Ye=>H(W,Ye),[H,W]),Me=e.useCallback(Ye=>{te(W,Ht(Qt({},ne),{startWatchingPeriod:Ht(Qt({},ne.startWatchingPeriod),{value:Ye})}))},[te,W,ne]),je=e.useCallback(Ye=>{te(W,Ht(Qt({},ne),{startWatchingPeriod:Ht(Qt({},ne.startWatchingPeriod),{unit:Ye})}))},[te,W,ne]),Ge=e.useCallback(Ye=>{te(W,Ht(Qt({},ne),{rentalPeriod:Ht(Qt({},ne.rentalPeriod),{value:Ye})}))},[te,W,ne]),ot=e.useCallback(Ye=>{te(W,Ht(Qt({},ne),{rentalPeriod:Ht(Qt({},ne.rentalPeriod),{unit:Ye})}))},[te,W,ne]);return e.createElement("div",{className:"flex flex-col gap-4 pl-11 pt-3","data-testid":`video-settings-paywall-${W}-rental`},e.createElement("div",{className:"grid grid-cols-2 gap-6 pt-2"},e.createElement("div",{className:"min-w-0"},e.createElement(z,{description:de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_PERIOD_HELP"),errorText:ue.startWatchingPeriod,label:de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_START_WATCHING_PERIOD"),labelTooltip:An,onUnitChange:je,onValueChange:Me,testId:`video-settings-paywall-${W}-start-watching`,unit:ne.startWatchingPeriod.unit,unitOptions:Dn,value:ne.startWatchingPeriod.value})),e.createElement("div",{className:"min-w-0"},e.createElement(z,{description:de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_RENTAL_PERIOD_HELP"),errorText:ue.rentalPeriod,label:de("ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_RENTAL_PERIOD"),labelTooltip:bn,onUnitChange:ot,onValueChange:Ge,testId:`video-settings-paywall-${W}-rental-period`,unit:ne.rentalPeriod.unit,unitOptions:Mn,value:ne.rentalPeriod.value}))),e.createElement(kt.A,{className:"mt-0",disableRemovePrice:!1,displayErrors:!0,errors:p??{},handlePrices:ie,initialPrices:Z,setErrors:re,shopCurrencyCode:xe}))}),Bn=e.memo(function({errors:p,onPricesChange:A,onErrorsChange:H,optionKey:te,prices:W,shopCurrencyCode:Z}){const ne=e.useCallback(de=>A(te,de),[A,te]),xe=e.useCallback(de=>H(te,de),[H,te]);return e.createElement("div",{className:"pl-10 pt-3","data-testid":`video-settings-paywall-${te}-pricing`},e.createElement(kt.A,{className:"mt-0",disableRemovePrice:!1,displayErrors:!0,errors:p,handlePrices:ne,initialPrices:W,setErrors:xe,shopCurrencyCode:Z}))}),V=[{descriptionKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_ONE_TIME_PURCHASE_DESCRIPTION",key:"one-time-purchase",titleKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_ONE_TIME_PURCHASE_TITLE"},{descriptionKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_DESCRIPTION",key:"rental",titleKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_RENTAL_TITLE"},{descriptionKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_MEMBERSHIP_DESCRIPTION",key:"membership",titleKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_MEMBERSHIP_TITLE"},{descriptionKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_TICKET_DESCRIPTION",key:"ticket",titleKey:"ADMIN_VIDEO_SETTINGS_PAYWALL_TICKET_TITLE"}],g=new Set(["one-time-purchase"]),R=new Set(["membership","ticket"]),Ne={membership:_.Q.subscription,ticket:_.Q.ticket};function qe(){var v,p;const{t:A}=(0,d._h)(),H=(0,a.d4)(dn.ZM),{video:te,hasYoutubeOrTwitchVideo:W}=Mt(),{pendingPaywallState:Z,handlePaywallOptionChange:ne,handlePaywallErrorsChange:xe,paywallErrors:de}=te,ue=e.useCallback((Pe,ze)=>{ne(Pe,{enabled:ze})},[ne]),ie=e.useCallback((Pe,ze)=>{ne(Pe,{prices:ze})},[ne]),re=e.useCallback((Pe,ze)=>{ne(Pe,{rentalPolicy:ze})},[ne]),Me=xe,je=e.useCallback((Pe,ze)=>{var st,ve;const St=(ve=(st=Z[Pe])==null?void 0:st.selectedSubscriptions)!=null?ve:[];ne(Pe,{selectedSubscriptions:St.filter($e=>$e._id!==ze)})},[ne,Z]),[Ge,ot]=e.useState(null),Ye=e.useCallback(Pe=>{ot(Pe)},[]),xt=e.useCallback(Pe=>{var ze,st;if(!Ge)return;const ve=(st=(ze=Z[Ge])==null?void 0:ze.selectedSubscriptions)!=null?st:[];ve.some($e=>$e._id===Pe._id)||ne(Ge,{selectedSubscriptions:[...ve,Pe]}),ot(null)},[ne,Z,Ge]),lt=Ge?Ne[Ge]:void 0,bt=Ge?((p=(v=Z[Ge])==null?void 0:v.selectedSubscriptions)!=null?p:[]).map(Pe=>Pe._id):[];return W?e.createElement("div",{className:"flex h-full items-center justify-center text-center text-[14px] leading-[18px] text-[var(--admin-text-300)]"},A("ADMIN_VIDEO_SETTINGS_PAYWALL_YOUTUBE_TWITCH_RESTRICTION")):e.createElement(e.Fragment,null,e.createElement("div",{"aria-label":A("ADMIN_LABEL_PAYWALL"),className:"flex flex-col gap-5",role:"group"},V.map(Pe=>{var ze,st;const ve=Z[Pe.key],St=g.has(Pe.key)&&ve.enabled,$e=R.has(Pe.key)&&ve.enabled,me=Pe.key==="rental"&&ve.enabled;return e.createElement("div",{className:"flex flex-col",key:Pe.key},e.createElement(pt,{checked:ve.enabled,name:"video-settings-paywall",onCheckedChange:Ze=>ue(Pe.key,Ze),subtitle:A(Pe.descriptionKey),testId:`video-settings-paywall-${Pe.key}`,title:A(Pe.titleKey)}),St&&e.createElement(Bn,{errors:de[Pe.key]||{},onPricesChange:ie,onErrorsChange:Me,optionKey:Pe.key,prices:ve.prices,shopCurrencyCode:H}),$e&&e.createElement(xn,{onAdd:Ye,onRemove:je,optionKey:Pe.key,selectedSubscriptions:(ze=ve.selectedSubscriptions)!=null?ze:[]}),me&&e.createElement(wn,{errors:de[Pe.key]||{},onPricesChange:ie,onErrorsChange:Me,onRentalPolicyChange:re,optionKey:Pe.key,prices:ve.prices,rentalPolicy:(st=ve.rentalPolicy)!=null?st:It(),shopCurrencyCode:H}))})),Ge&&lt&&e.createElement(Zt.A,{entitlementType:lt,onClose:()=>ot(null),onSelect:xt,selectedIds:bt}))}var rt=t(206441);
858const ft=1024*1024,Ft=[{aspectRatio:"16 / 9",aspectRatioLabel:"Default 16:9",maxSize:5*ft,sizeLabel:"1920x1080px 5 MB max",stateKey:"default-16-9"},{aspectRatio:"1 / 1",aspectRatioLabel:"1:1",maxSize:ft,sizeLabel:"1080x1080px 1 MB max",stateKey:"1-1"},{aspectRatio:"5 / 4",aspectRatioLabel:"5:4",maxSize:ft,sizeLabel:"1350x1080px 1 MB max",stateKey:"5-4"},{aspectRatio:"4 / 3",aspectRatioLabel:"4:3",maxSize:ft,sizeLabel:"1024x768px 1 MB max",stateKey:"4-3"},{aspectRatio:"3 / 2",aspectRatioLabel:"3:2",maxSize:ft,sizeLabel:"1080x720px 1 MB max",stateKey:"3-2"}],Wt={"default-16-9":{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:1080,pixelWidth:1920,verify:!0},"1-1":{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:1080,pixelWidth:1080,verify:!0},"5-4":{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:1080,pixelWidth:1350,verify:!0},"4-3":{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:768,pixelWidth:1024,verify:!0},"3-2":{exactDimensions:!0,exactHeight:!0,exactWidth:!0,pixelHeight:720,pixelWidth:1080,verify:!0}};function Vn(){const{setModalErrorMessage:v,video:p}=Mt(),{t:A}=(0,d._h)(),H=p.pendingThumbnailState,te=H["default-16-9"];return e.createElement("div",{className:"flex h-full min-h-0 w-full flex-col gap-[20px]"},e.createElement(T.rr,{className:"m-0 text-[14px] leading-[20px] text-[var(--admin-text-200)]"},A("ADMIN_VIDEO_SETTINGS_THUMBNAILS_DESCRIPTION")),e.createElement("div",{className:"flex w-full flex-col gap-[20px]"},e.createElement(T.L3,{className:"text-[16px] font-bold leading-[18px] tracking-normal text-[var(--admin-text-100)]"},A("ADMIN_LABEL_LANDSCAPE")),e.createElement("div",{className:"flex flex-col gap-[12px]"},e.createElement("div",{className:"flex items-start gap-[10px]"},Ft.slice(0,2).map((W,Z)=>e.createElement("div",{key:W.stateKey,className:`flex min-w-0 flex-col gap-[14px] ${Z===0?"flex-[510_1_0]":"flex-[229_1_0]"}`},e.createElement("div",{className:"flex items-center gap-[8px] leading-none"},e.createElement("span",{className:"text-[14px] leading-[16px] font-medium text-[var(--admin-text-100)]"},W.aspectRatioLabel),e.createElement("span",{className:"text-[12px] leading-[14px] text-[var(--admin-text-300)]"},W.sizeLabel)),e.createElement(rt.A,{key:`${W.stateKey}-${H[W.stateKey]||"empty"}`,aspectRatio:W.aspectRatio,autoDerivedPreview:W.stateKey==="default-16-9"?null:te,dimensionRequirements:Wt[W.stateKey],imagePreview:H[W.stateKey],maxSize:W.maxSize,onClearImage:()=>p.handleClearThumbnail(W.stateKey),onError:v,onFileSubmit:ne=>{p.handleThumbnailChange(W.stateKey,ne)},testIdThumbnail:`video-settings-thumbnail-${W.stateKey}`})))),e.createElement("div",{className:"flex items-start gap-[10px]"},Ft.slice(2).map(W=>e.createElement("div",{key:W.stateKey,className:"flex min-w-0 flex-1 flex-col gap-[14px]"},e.createElement("div",{className:"flex items-center gap-[8px] leading-none"},e.createElement("span",{className:"text-[14px] leading-[16px] font-medium text-[var(--admin-text-100)]"},W.aspectRatioLabel),e.createElement("span",{className:"text-[12px] leading-[14px] text-[var(--admin-text-300)]"},W.sizeLabel)),e.createElement(rt.A,{key:`${W.stateKey}-${H[W.stateKey]||"empty"}`,aspectRatio:W.aspectRatio,autoDerivedPreview:te,dimensionRequirements:Wt[W.stateKey],imagePreview:H[W.stateKey],maxSize:W.maxSize,onClearImage:()=>p.handleClearThumbnail(W.stateKey),onError:v,onFileSubmit:Z=>{p.handleThumbnailChange(W.stateKey,Z)},testIdThumbnail:`video-settings-thumbnail-${W.stateKey}`})))))))}var Un=t(191443),sa=t(359785);const ia=60,Fn=8,Cn=ia+Fn,Kn=4,Hn=320;function xa({isExpanded:v,onExpandedChange:p,titles:A}){const{t:H}=useAdminTranslation(),[te,W]=React.useState(!1),Z=v??te,ne=React.useCallback(xe=>{p?.(xe),v===void 0&&W(xe)},[v,p]);return A.length===0?null:React.createElement("div",{className:"pt-2 [@media(min-height:700px)]:pt-3"},React.createElement("div",{className:"flex items-baseline gap-3"},React.createElement("div",{className:"text-[14px] [@media(min-height:700px)]:text-[15px] font-medium leading-[18px] [@media(min-height:700px)]:leading-[19px] text-[var(--admin-text-100)]"},A.length," ",H("ADMIN_MODAL_VIDEO_METADATA_SELECTED")),React.createElement(Button,{className:"h-auto self-baseline p-0 text-[13px] [@media(min-height:700px)]:text-[14px] font-medium leading-[18px] [@media(min-height:700px)]:leading-[19px] text-[var(--admin-accent-primary)] hover:text-[var(--admin-accent-primary)]/90",context:"admin",onClick:()=>ne(!Z),type:"button",variant:"link"},Z?"Hide selected videos":"View selected videos")))}function Yn({items:v}){const p=e.useRef(null),[A,H]=e.useState(0),[te,W]=e.useState(Hn);e.useLayoutEffect(()=>{const ie=p.current;if(ie==null)return;const re=()=>{W(ie.clientHeight||Hn)};re();const Me=()=>{H(ie.scrollTop)};if(ie.addEventListener("scroll",Me,{passive:!0}),typeof ResizeObserver>"u")return()=>{ie.removeEventListener("scroll",Me)};const je=new ResizeObserver(()=>{re()});return je.observe(ie),()=>{ie.removeEventListener("scroll",Me),je.disconnect()}},[]);const Z=v.length===0?0:v.length*Cn-Fn,ne=Math.ceil(te/Cn)+Kn*2,xe=Math.max(0,Math.floor(A/Cn)-Kn),de=Math.min(v.length,xe+ne),ue=v.slice(xe,de);return e.createElement("div",{className:"flex-1 min-h-0 overflow-y-auto pr-1",ref:p},e.createElement("div",{className:"relative",style:{height:Z}},ue.map((ie,re)=>{const Me=xe+re;return e.createElement("div",{key:`${ie.title}-${Me}
858`,className:"absolute left-0 right-0",style:{top:Me*Cn}},e.createElement(Un.A,{thumbnail:ie.thumbnail||sa.kD,title:ie.title}))})))}function da({isOpen:v,items:p,variant:A="panel"}){const{t:H}=(0,d._h)();return!v||p.length===0?null:A==="tab"?e.createElement("div",{className:"flex min-h-0 flex-1 flex-col pt-[10px]"},e.createElement(Yn,{items:p})):e.createElement("div",{className:"flex h-full min-h-0 w-[min(30vw,320px)] min-w-[248px] shrink-0 self-stretch flex-col bg-[var(--admin-surface-3)]"},e.createElement("div",{className:"px-4 pt-2 [@media(min-height:700px)]:px-5 [@media(min-height:700px)]:pt-[15px]"},e.createElement("div",{className:"h-[22px] [@media(min-height:700px)]:h-[28px]"})),e.createElement("div",{className:"border-b border-[var(--admin-surface-5)] px-4 [@media(min-height:700px)]:px-5"},e.createElement("div",{className:"relative inline-flex items-center gap-2 rounded-none px-0 py-[10px] [@media(min-height:700px)]:py-[14px] text-[14px] [@media(min-height:700px)]:text-[16px] font-medium leading-[16px] [@media(min-height:700px)]:leading-[18px] text-[var(--admin-text-300)] after:absolute after:bottom-[-1px] after:left-0 after:h-[2px] after:w-full after:bg-[var(--admin-accent-primary)] after:content-['']"},e.createElement("span",null,H("ADMIN_MODAL_VIDEO_METADATA_SELECTED")),e.createElement("span",{className:"inline-flex shrink-0 items-center rounded-full bg-[var(--admin-surface-2)] px-2.5 py-1 text-[12px] font-medium leading-[16px] text-[var(--admin-text-300)] [@media(min-height:700px)]:text-[13px] [@media(min-height:700px)]:leading-[17px]"},p.length))),e.createElement("div",{className:"flex min-h-0 flex-1 flex-col px-4 pb-4 pt-[30px] [@media(min-height:700px)]:px-5 [@media(min-height:700px)]:pb-5 [@media(min-height:700px)]:pt-[38px]"},e.createElement(Yn,{items:p})))}var zn=t(467783),jn=t(777045),$n=t(318946),ca=t(747988),ma=t(106654);function ua(v,p){var A;return!v?._id||!p?!1:(0,ma.Qw)(v)===p||String((A=v.slug)!=null?A:"")===p}function pa(v,p,A){p?._id&&v((0,$n.N4)(p,A)),v((0,$n.wt)(A,!0)),p?._id&&v((0,$n.Dq)(p,A))}function va(v,p){if(!p.videoId)return;p.skipNavigation||v((0,ca.HC)({path:(0,b.KF)(p.videoId)}));const A=p.resolvedVideoPage;!p.skipNavigation&&A&&ua(A,p.videoId)&&pa(v,p.currentPage,A),v((0,zn.gl)(jn.hJ.EDIT)),v((0,zn.Bq)({actionKey:jn.aZ.access}))}var ga=t(80247);const fa=({data:v,onDismiss:p,onAfterNavigateToPaywallDesign:A})=>{const{t:H}=(0,d._h)(),te=v?.videos||[],{activeTab:W,tabsWithPendingChanges:Z,onSave:ne,isSaveDisabled:xe,modalErrorMessage:de,setActiveTab:ue,setModalErrorMessage:ie,hasYoutubeOrTwitchVideo:re,isBulk:Me,videoSource:je,cachedVideoPage:Ge}=Mt(),ot="inline-flex w-full items-center justify-start",Ye=(0,c.cn)("py-[14px] text-[var(--admin-text-300)] font-medium","text-[16px] leading-[18px]","data-[state=active]:font-bold"),xt=(0,a.wA)(),lt=(0,a.d4)(F.tom),bt=(0,a.d4)(
858F.iMf),Pe=[{label:H("ADMIN_LABEL_METADATA"),render:()=>e.createElement(Je,null),value:"metadata"},{label:H("ADMIN_LABEL_THUMBNAILS"),render:()=>e.createElement(Vn,null),value:"thumbnails"},{label:H("ADMIN_LABEL_TAGS"),render:()=>e.createElement(Nt,null),value:"tags"},{label:H("ADMIN_LABEL_PAYWALL"),render:()=>e.createElement(qe,null),value:"paywall"}],ze=e.useMemo(()=>te.map((me,Ze)=>({thumbnail:me.thumbnail,title:me.title||me.localFileName||`Untitled video ${Ze+1}`})),[te]),st=Me?Pe:[...Pe.slice(0,3),{label:H("ADMIN_LABEL_EMBED_CODE"),render:()=>e.createElement(zt,null),value:"embed-code"},Pe[3]],ve=e.useCallback(async()=>{try{ie(null),await ne(),p()}catch(me){ga.error("Failure when saving video settings:",me),ie(H("ADMIN_VIDEO_SETTINGS_SAVE_ERROR"))}},[p,ne,ie,H]),St=e.useCallback(me=>{ie(null),ue(me)},[ue,ie]),$e=e.useCallback(()=>{const me=je?._id;!(je&&me&&!je.newId&&!Me)||!me||(va(xt,{skipNavigation:me===lt,videoId:me,currentPage:bt,resolvedVideoPage:Ge}),p(),A?.())},[Ge,bt,xt,Me,A,p,lt,je]);return e.createElement(T.lG,{context:"admin",open:!0,onOpenChange:me=>{me||p()}},e.createElement(T.Cf,{className:"gap-0 overflow-hidden border-none p-0 text-[0.75rem] leading-4 font-[family-name:var(--admin-font-body)] data-[state=open]:animate-none data-[state=closed]:animate-none",size:"default",style:{width:"min(800px, 90vw)",height:"min(800px, 90vh)",maxWidth:"min(800px, 90vw)",maxHeight:"min(800px, 90vh)"}},e.createElement(T.L3,{className:"sr-only"},H("ADMIN_LABEL_VIDEO_SETTINGS")),e.createElement(T.rr,{className:"sr-only"},H("ADMIN_LABEL_VIDEO_SETTINGS")),e.createElement("div",{className:"absolute inset-0 flex items-stretch"},e.createElement("div",{className:"flex h-full min-w-0 flex-1 flex-col gap-4 bg-[var(--admin-surface-3)] pl-[30px] pt-[30px] pb-[30px] pr-0 text-[var(--admin-text-100)]"},e.createElement(T.c7,{className:"items-start space-y-0 pr-[30px] text-left"},e.createElement("h2",{className:"m-0 text-[20px] font-semibold leading-[28px] text-[var(--admin-text-100)]"},H("ADMIN_LABEL_VIDEO_SETTINGS"))),e.createElement("div",{className:"flex min-h-0 flex-1 gap-4"},Me&&e.createElement("div",{className:"flex h-full min-h-0 w-[min(30vw,320px)] min-w-[248px] shrink-0 flex-col"},e.createElement(n.tU,{className:"flex flex-col",value:"selected-videos-panel"},e.createElement(n.j7,{className:(0,c.cn)(E.A,ot)},e.createElement(n.Xi,{className:(0,c.cn)(E.c,Ye),value:"selected-videos"},e.createElement("span",{className:"flex items-center gap-2"},e.createElement("span",null,H("ADMIN_MODAL_VIDEO_METADATA_SELECTED")),e.createElement("span",{className:"inline-flex h-[14px] shrink-0 items-center rounded-full bg-[var(--admin-accent-primary)] px-1.5 text-[11px] font-medium leading-[14px] text-[var(--admin-text-100)]"},ze.length))))),e.createElement(da,{isOpen:!0,items:ze,variant:"tab"})),e.createElement(n.tU,{className:"flex h-full min-h-0 min-w-0 flex-1 flex-col gap-[30px]",onValueChange:St,value:W},e.createElement("div",{className:"shrink-0 pr-[30px]"},e.createElement(n.j7,{className:(0,c.cn)(E.A,ot,"gap-10")},st.map(me=>e.createElement(n.Xi,{key:me.value,value:me.value,className:(0,c.cn)(E.c,Ye)},e.createElement("span",{className:"flex items-center gap-2"},e.createElement("span",null,me.label),Z[me.value]&&e.createElement("span",{className:"size-2 rounded-full bg-[var(--admin-alert-warning)]","data-testid":`video-settings-tab-dirty-${me.value}`})))))),st.map(me=>me.value==="paywall"?e.createElement(n.av,{key:me.value,value:me.value,className:"mt-0 min-h-0 flex-1 outline-none flex flex-col"},e.createElement(f.A,{className:"flex-1 min-h-0",variant:"admin"},e.createElement("div",{className:"flex min-h-full flex-col pr-[30px]"},e.createElement("div",null,me.render()),e.createElement("div",{className:"mt-auto flex items-center justify-between gap-3 pt-[30px]"},e.createElement("div",null,!re&&!Me&&e.createElement(o.$,{className:"h-10 min-h-10 max-h-10 rounded-full border border-[var(--admin-surface-5)] bg-[var(--admin-surface-5)] px-6 py-3 text-[13px] [@media(min-height:700px)]:text-[14px] font-bold leading-[16px] text-[var(--admin-text-100)] hover:bg-[var(--admin-surface-6)]",context:"admin","data-testid":"video-settings-edit-paywall-design",disabled:!!(!je?._id||je?.newId),onClick:$e,type:"button"},H("ADMIN_LABEL_EDIT_PAYWALL_DESIGN"))),e.createElement("div",{className:"flex items-center gap-3"},de&&e.createElement("div",{className:"flex items-start gap-2"},e.createElement(s.Ay,{className:"mt-[1px] shrink-0 [&_path]:fill-[var(--admin-alert-error)]",name:"warning"}),e.createElement("span",{className:"whitespace-pre-wrap text-[12px] font-medium leading-[16
858px] text-[var(--admin-alert-error)]"},de)),!re&&e.createElement(o.$,{className:"h-8 [@media(min-height:700px)]:h-10 rounded-full bg-[var(--admin-accent-primary)] px-4 [@media(min-height:700px)]:px-6 text-[13px] [@media(min-height:700px)]:text-[14px] font-bold leading-[16px] text-[var(--admin-text-100)] hover:bg-[var(--admin-accent-primary)]/90",context:"admin","data-testid":"video-settings-modal-save",disabled:xe,onClick:ve,type:"button"},H("ACTION_SAVE"))))))):me.value==="embed-code"?e.createElement(n.av,{key:me.value,className:"mt-0 flex min-h-0 flex-1 flex-col outline-none data-[state=inactive]:hidden",value:me.value},e.createElement(f.A,{className:"min-h-0 min-w-0 flex-1",variant:"admin"},e.createElement("div",{className:"flex h-full min-h-0 flex-col pb-[80px] pr-[30px]"},me.render()))):e.createElement(n.av,{key:me.value,className:"mt-0 flex min-h-0 flex-1 flex-col outline-none data-[state=inactive]:hidden",value:me.value},e.createElement(f.A,{className:"min-h-0 min-w-0 flex-1",variant:"admin"},e.createElement("div",{className:"pb-[80px] pr-[30px]"},me.render())))))))),e.createElement("div",{className:"absolute bottom-[30px] right-[30px] z-10 flex items-center gap-3"},de&&e.createElement("div",{className:"flex items-start gap-2"},e.createElement(s.Ay,{className:"mt-[1px] shrink-0 [&_path]:fill-[var(--admin-alert-error)]",name:"warning"}),e.createElement("span",{className:"whitespace-pre-wrap text-[12px] font-medium leading-[16px] text-[var(--admin-alert-error)]"},de)),W!=="embed-code"&&W!=="paywall"&&e.createElement(o.$,{className:"h-8 [@media(min-height:700px)]:h-10 rounded-full bg-[var(--admin-accent-primary)] px-4 [@media(min-height:700px)]:px-6 text-[13px] [@media(min-height:700px)]:text-[14px] font-bold leading-[16px] text-[var(--admin-text-100)] hover:bg-[var(--admin-accent-primary)]/90",context:"admin","data-testid":"video-settings-modal-save",disabled:xe,onClick:ve,type:"button"},H("ACTION_SAVE")))))},Qn=({data:v,onDismiss:p,onAfterNavigateToPaywallDesign:A})=>e.createElement(Xt,{data:v},e.createElement(fa,{data:v,onAfterNavigateToPaywallDesign:A,onDismiss:p})),Ea=Qn},794690:(ce,G,t)=>{t.d(G,{ML:()=>d,P$:()=>o,il:()=>a,lj:()=>T});var e=t(514245);const s={[e.Q.vodPurchase]:0,[e.Q.vodRental]:1,[e.Q.ticket]:2,[e.Q.subscription]:3},o=n=>n._id||n.id||"",T=n=>n.type===e.Q.vodPurchase||n.type===e.Q.vodRental,a=n=>n.filter(E=>E.type!==e.Q.ticket),d=n=>[...n].sort((E,c)=>{const f=E.type||e.Q.ticket,L=c.type||e.Q.ticket,N=s[f],I=s[L];return N!==I?N-I:E.name.localeCompare(c.name)})},136517:(ce,G,t)=>{t.d(G,{YO:()=>i});var e=t(63696),s=t(224191),o=t.n(s),T=t(731694),a=t(368909),d=Object.defineProperty,n=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,f=(u,b,D)=>b in u?d(u,b,{enumerable:!0,configurable:!0,writable:!0,value:D}):u[b]=D,L=(u,b)=>{for(var D in b||(b={}))E.call(b,D)&&f(u,D,b[D]);if(n)for(var D of n(b))c.call(b,D)&&f(u,D,b[D]);return u};const N=420,I=34,x=16,r=20,y=92;function l(){if(typeof document>"u")return y;const u=document.getElementById(T.Gd)||document.getElementById(T.yG);return u?Math.round(u.getBoundingClientRect().bottom+x):y}function i(u){const b=(0,s.useSelector)(a.VC),[D,B]=(0,e.useState)(()=>l());(0,e.useLayoutEffect)(()=>{if(b)return;const P=()=>{B(l())};P(),window.addEventListener("resize",P);const m=typeof document<"u"?document.getElementById(T.DW):null;return m?.addEventListener("scroll",P,{passive:!0}),()=>{window.removeEventListener("resize",P),m?.removeEventListener("scroll",P)}},[b]);const F={maxHeight:`calc(100vh - ${D+r}px)`,maxWidth:N,position:"fixed",right:I,top:D,width:N},M={left:0,maxHeight:"100vh",maxWidth:"100vw",position:"fixed",right:0,top:0,width:"100vw"};return L(L({},u),b?M:F)}},248494:(ce,G,t)=>{t.d(G,{A:()=>s});const s={ADMIN_LIBRARY:"adminLibrary",EDIT_MODE:"editModeVideoPlaylistSelect",LIVESTREAM:"twitchLivestreamSelect",OFFLINE_CONTENT:"offlineContentVideoSelect",PLAYLIST_EDIT:"playlistVideoSelect",QUEST_EDIT:"questVideoSelect",SCHEDULE_EDIT:"scheduleVideoPlaylistSelect"}},94402:(ce,G,t)=>{t.d(G,{aL:()=>F,eH:()=>D,Ay:()=>Q,Ro:()=>M});var e=t(63696),s=t(776637),o=t.n(s),T=t(914347),a=t(221196),d=t.n(a),n=t(224191),E=t(463302),c=t(103742);function f(S){const[J,U]=(0,c.A)("poll",S);return(0,e.useMemo)(()=>({poll:J,loaded:U}),[J,U])}var L=Object.defineProperty,N=Object.defineProperties,I=Object.getOwnPropertyDescriptors,x=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,l=(S,J,U)=>J in S?L(S,J,{enumerable:!0,configurable:!0,writable:!0,value:U}):S[J]=U,i=(S,J)=>{for(var U in J||(J={}))r.call(J,U)&&l(S,U,J[U]);if(x)for(var U of x(J))y.call(J,U)&&l(S,U,J[U]);return S},u=(S,J)=>N(S,I(J)),b=(S,J)=>{var U={};for(var j in S)r.call(S,j)&&J.indexOf(j)<0&&(U[j]=S[j]);if(S!=null&&x)for(var j of x(S))J.indexOf(j)<0&&y.call(S,j)&&(U[j]=S[j]);return U},D=(S=>(S.OPEN="open",S.CLOSED="closed",S.COMPLETED="results",S))(D||{});const F=[...[{label:"Open",value:"open"},{label:"Closed",value:"closed"}],{label:"Completed",value:"results"}],M=S=>F.find(({value:J})=>S===J),P=({answers:S,correctAnswers:J,predictionStatus:U,type:j})=>{const w=U==="open",Y=U==="closed",K=j===T.d.Prediction&&!(w||Y),q=j===T.d.Trivia||K;return S.map(ae=>{var le=ae,{correct:fe,arrayId:Le}=le,Ce=b(le,["correct","arrayId"]);return Ce}).map(ae=>{const le=J.some(fe=>{const Le=fe._id&&fe._id===ae._id,Ce=fe.answer===ae.answer;return Le||Ce});return u(i({},ae),{answer:ae.answer,correct:le&&q})})},m=({correctAnswers:S,open:J,type:U})=>S.length>0&&U===T.d.Prediction?"results":J?"open":"closed",h=()=>[{answer:""},{answer:""}],C=S=>({correctAnswers:[],poll:{answers:h(),name:S?.name||"",open:!0,question:"",showCount:!1,type:S?.type||T.d.Poll,creator:S?.creator||"",owner:S?.owner||""},predictionStatus:"open"}),O=(S,J)=>{switch(J.type){case"ADD_BLANK_ANSWER":{const{correctAnswers:U,poll:j,predictionStatus:w}=S;return u(i({},S),{poll:u(i({},S.poll),{answers:P({answers:[...S.poll.answers,{answer:"",arrayId:d().generate()}],correctAnswers:U,predictionStatus:w,type:j.type})})})}case"DELETE_LAST_ANSWER":{const{correctAnswers:U,poll:j,predictionStatus:w}=S,{answers:Y,type:K}=j,q=Y.slice(0,Y.length-1);return u(i({},S),{poll:u(i({},S.poll),{answers:P({answers:q,correctAnswers:U,predictionStatus:w,type:K})})})}case"SET_ANSWERS":{const{correctAnswers:U,predictionStatus:j,poll:w}=S,Y=w.type;return u(i({},S),{poll:u(i({},S.poll),{answers:P({answers:J.payload,correctAnswers:U,predictionStatus:j,type:Y})})})}case"SET_CORRECT_ANSWERS":{const{poll:U,predictionStatus:j}=S,w=J.payload,{answers:Y,type:K}=U;return u(i({},S),{correctAnswers:w,poll:u(i({},S.poll),{answers:P({answers:Y,correctAnswers:w,predictionStatus:j,type:K})})})}case"SET_NAME":return u(i({},S),{poll:u(i({},S.poll),{name:J.payload})});case"SET_PREDICTION_STATUS":{const U=J.payload,{correctAnswers:j,poll:w}=S,{answers:Y,type:K}=w;return u(i({},S),{poll:u(i({},S.poll),{answers:P({answers:Y,correctAnswers:j,predictionStatus:U,type:K}),open:U==="open"}),predictionStatus:U})}case"SET_QUESTION":return u(i({},S),{poll:u(i({},S.poll),{question:J.payload})});case"SET_SHOW_COUNT":return u(i({},S),{poll:u(i({},S.poll),{showCount:J.payload})});case"SET_TYPE":{const{correctAnswers:U,poll:j}=S,{answers:w}=j,Y=J.payload,q=Y!==T.d.Prediction&&S.predictionStatus==="results"?"open":S.predictionStatus;return u(i({},S),{poll:u(i({},S.poll),{answers:P({answers:w,correctAnswers:U,predictionStatus:q,type:Y}),type:Y}),predictionStatus:q})}case"UPDATE_POLL":{const U=J.payload,{answers:j,modified:w,open:Y,showCount:K=!1,type:q}=U,ae=b(U,["answers","modified","open","showCount","type"]),le=j?j.filter(({correct:fe})=>fe):[];return u(i({},S),{correctAnswers:le,poll:u(i({},ae),{answers:j||h(),open:Y,type:q,showCount:K}
858),predictionStatus:m({correctAnswers:le,open:Y,type:q})})}default:return S}},Q=({initialDoc:S})=>{const J=(0,n.useSelector)(E.F6)||"",{poll:U}=f(S?._id),[j,w]=(0,e.useReducer)(O,C(u(i({},S),{creator:J,owner:J})));return(0,e.useEffect)(()=>{U&&w({payload:U,type:"UPDATE_POLL"})},[o()(U)]),[j,w]}},809512:(ce,G,t)=>{t.d(G,{A:()=>a});var e=t(103742),s=t(160788),o=t(63696),T=t(463302);function a(d){const n=(0,s.A)(T.F6),E=n&&d?`${n}:${d}`:null,[c,f]=(0,e.A)("poll_response_view",E);return o.useMemo(()=>f?{loaded:!0,response:c}:{loaded:!1,response:null},[c,f])}},669958:(ce,G,t)=>{t.d(G,{J:()=>s,y:()=>e});const e="data-overlay-bounds",s=`[${e}]`},309596:(ce,G,t)=>{t.d(G,{GD:()=>r,JI:()=>E,VM:()=>x,dp:()=>n,qk:()=>I});var e=Object.defineProperty,s=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,a=(y,l,i)=>l in y?e(y,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[l]=i,d=(y,l)=>{for(var i in l||(l={}))o.call(l,i)&&a(y,i,l[i]);if(s)for(var i of s(l))T.call(l,i)&&a(y,i,l[i]);return y};const n={desktop:{width:"desktopWidth",height:"desktopHeight"},mobile:{width:"mobileWidth",height:"mobileHeight"},tv:{width:"tvWidth",height:"tvHeight"}},E=["desktop","mobile","tv"],c=E.flatMap(y=>[n[y].width,n[y].height]),f=y=>{if(y==null||String(y).trim()==="")return;const l=Number(y);if(!(!Number.isFinite(l)||l<=0))return l},L=(y,l,i)=>{const u=l.find(({name:b})=>b===y);return f(u?u.value:i[y])},N=(y,l)=>{if(y!==void 0)return l===void 0||l<=0?y:Math.min(y,l)},I=(y=[],l={})=>E.reduce((i,u)=>{const b=n[u];return i[u]={width:L(b.width,y,l),height:L(b.height,y,l)},i},{}),x=({artboardSize:y,device:l,riveProperties:i=[],variables:u={}})=>{const b=n[l],D=L(b.width,i,u),B=L(b.height,i,u);return{width:D??y?.width,height:B??y?.height}},r=(y,l)=>{const i=d({},y);return E.forEach(u=>{const b=n[u];["width","height"].forEach(D=>{var B;const F=(B=l[u])==null?void 0:B[D];if(F===void 0){delete i[b[D]];return}i[b[D]]=String(F)})}),i}},971691:(ce,G,t)=>{t.d(G,{AK:()=>F,FB:()=>N,FT:()=>C,Gh:()=>I,IN:()=>f,KK:()=>d,Lj:()=>m,N1:()=>o,S9:()=>u,V5:()=>a,Vp:()=>b,aK:()=>P,al:()=>E,bZ:()=>n,dY:()=>D,fG:()=>B,fi:()=>y,g0:()=>M,hK:()=>c,nN:()=>L,pG:()=>x,pL:()=>l,qT:()=>r,rX:()=>T,uO:()=>i});var e=t(304006);const s=(0,e.Pl)("overlays"),o=s("ADD_OVERLAY"),T=s("ADD_LEGACY_OVERLAY"),a=s("UPDATE_OVERLAY"),d=s("ADD_PREVIEW_OVERLAY"),n=s("ENGAGE_OVERLAY"),E=s("ENTER_RAFFLE_REQUEST"),c=s("ENTER_RAFFLE_FAILURE"),f=s("ENTER_RAFFLE_SUCCESS"),L=s("RECEIVE_OVERLAY"),N=s("DECREASE_TIME"),I=s("REMOVE_OVERLAY"),x=s("REMOVE_PREVIEW_OVERLAY"),r=s("EDIT_OVERLAY"),y=s("BROADCAST_OVERLAY"),l=s("UPDATE_PENDING_STATUS"),i=s("CREATE_OVERLAY_REQUEST"),u=s("CREATE_OVERLAY_SUCCESS"),b=s("CREATE_OVERLAY_FAILURE"),D=s("FETCH_OVERLAYS_BY_SITE_REQUEST"),B=s("FETCH_OVERLAYS_BY_SITE_SUCCESS"),F=s("FETCH_OVERLAYS_BY_SITE_FAILURE"),M=s("FETCH_OVERLAY_BY_ID_REQUEST"),P=s("FETCH_OVERLAY_BY_ID_SUCCESS"),m=s("FETCH_OVERLAY_BY_ID_FAILURE"),h=s("UPDATE_CUSTOM_OVERLAY"),C=s("SET_RIVE_OVERLAY_TEMPLATES")},281843:(ce,G,t)=>{t.d(G,{$o:()=>u,Eu:()=>f,G4:()=>x,HU:()=>i,Kq:()=>a,Ks:()=>y,NM:()=>o,RQ:()=>B,Ss:()=>L,Tn:()=>h,UH:()=>c,W3:()=>M,Y$:()=>D,Zj:()=>I,Zn:()=>N,a0:()=>m,e:()=>T,fK:()=>F,fM:()=>n,fN:()=>r,n1:()=>E,tV:()=>l,ww:()=>d,xg:()=>b});var e=t(971691);const s=O=>({payload:O,type:e.bZ}),o=O=>({payload:O,type:e.rX}),T=O=>({payload:O,type:e.N1}),a=O=>({payload:O,type:e.V5}),d=O=>({payload:O,type:e.IN}),n=O=>({payload:O,type:e.hK}),E=O=>({payload:O,type:e.pL}),c=O=>({payload:O,type:e.fi}),f=O=>({payload:O,type:e.nN}),L=O=>({payload:O,type:e.FB}),N=O=>({payload:O,type:e.Gh}),I=O=>({payload:O,type:e.al}),x=O=>({payload:O,type:e.KK}),r=O=>({payload:O?{key:O}:void 0,type:e.pG}),y=O=>s({broadcastId:O,channel:`broadcasts:${O}`,data:{":inc":"engaged"},type:"stats"}),l=O=>{const{broadcastId:k,index:Q}=O;return s({answerIndex:Q,broadcastId:k,channel:`broadcasts:${k}`,data:{":inc":Q+1},type:"poll:response"})},i=O=>({payload:O,type:e.qT}),u=O=>({payload:O,type:e.uO}),b=O=>({payload:O,type:e.S9}),D=O=>({payload:O,type:e.Vp}),B=()=>({type:e.dY}),F=O=>({payload:O,type:e.fG}),M=O=>({payload:O,type:e.AK}),P=O=>({payload:O,type:FETCH_OVERLAY_BY_ID_REQUEST}),m=O=>({payload:O,type:e.aK}),h=O=>({payload:O,type:e.Lj}),C=O=>({payload:O,type:SET_RIVE_OVERLAY_TEMPLATES})},979028:(ce,G,t)=>
858{t.d(G,{CT:()=>u,Km:()=>D,M8:()=>F,NJ:()=>r,S5:()=>i,TI:()=>y,eb:()=>l,l3:()=>M,pC:()=>B,vF:()=>b});var e=t(990220),s=t(800886),o=t(16357),T=t(715766),a=t(445525),d=Object.defineProperty,n=Object.defineProperties,E=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,N=(P,m,h)=>m in P?d(P,m,{enumerable:!0,configurable:!0,writable:!0,value:h}):P[m]=h,I=(P,m)=>{for(var h in m||(m={}))f.call(m,h)&&N(P,h,m[h]);if(c)for(var h of c(m))L.call(m,h)&&N(P,h,m[h]);return P},x=(P,m)=>n(P,E(m));const r=P=>{if(e.yq){(0,T.D)("engage",P);return}return s.db.database().ref(e.HO).push(P)},y=async({broadcast:P,primaryToken:m,siteId:h})=>{await(0,a.Ay)({primaryToken:m,siteId:h}).post(e.KD,x(I({},P),{siteId:h}))},l=async({overlayId:P,channelIds:m,primaryToken:h,siteId:C})=>{await(0,a.Ay)({primaryToken:h,siteId:C}).post(`${e.V5}/broadcast/${P}`,{channelIds:m})},i=({broadcastId:P,siteId:m,token:h,userId:C})=>o.A.post(`${e.Ls}/raffle/v1/entry`,{broadcastId:P,siteId:m,userId:C},{headers:{Authorization:`Bearer ${h}`,"x-maestro-client-id":m}}),u=async P=>{const{data:m}=await(0,a.Ay)({primaryToken:P.token,siteId:P.siteId}).post(e.V5,P);return m},b=async({overlay:P,siteId:m,token:h})=>{const{data:C}=await(0,a.Ay)({primaryToken:h,siteId:m}).put(`${e.V5}/${P._id}`,P);return C},D=async P=>{const{data:m}=await(0,a.Ay)({primaryToken:P.token,siteId:P.siteId}).get(e.V5);return m.filter(h=>h.type==="template")},B=async P=>{const{data:m}=await(0,a.Ay)({primaryToken:P.token,siteId:P.siteId}).get(`${e.V5}/${P.id}`);return m},F=async(P,m,h)=>{const{data:C}=await(0,a.Ay)({primaryToken:m,siteId:h}).delete(`${e.V5}/${P}`);return C},M=async(P,m,h)=>{await(0,a.Ay)({primaryToken:m,siteId:h}).delete(`${e.E2}/objects/${P}`)}},804797:(ce,G,t)=>{t.d(G,{G4:()=>e.G4,UH:()=>e.UH,HU:()=>e.HU,tV:()=>e.tV,Ks:()=>e.Ks,Zj:()=>e.Zj,np:()=>L.np,Eu:()=>e.Eu,Zn:()=>e.Zn,fN:()=>e.fN,fn:()=>J});var e=t(281843),s=t(87464),o=t(100035),T=t(800886),a=t(993729),d=t(218938),n=t(365179),E=t(735898),c=t(171751),f=t(979028),L=t(206334),N=t(80247);const I=(U,j)=>{N.error(U,j)};var x=t(186165),r=t(971691),y=Object.defineProperty,l=Object.defineProperties,i=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,B=(U,j,w)=>j in U?y(U,j,{enumerable:!0,configurable:!0,writable:!0,value:w}):U[j]=w,F=(U,j)=>{for(var w in j||(j={}))b.call(j,w)&&B(U,w,j[w]);if(u)for(var w of u(j))D.call(j,w)&&B(U,w,j[w]);return U},M=(U,j)=>l(U,i(j));const P=function*(U){var j,w;const{payload:{answerIndex:Y,broadcastId:K,channel:q,type:ae,data:le}}=U;try{const fe=yield(0,o.Lt)(),Le=(0,L.b7)(fe,K);if(!Le?.engaged){const Ce={channel:`${q}:${ae}`,data:le||null,object_id:((j=fe.app.object)==null?void 0:j._id)||null,site_id:((w=fe.app.site)==null?void 0:w._id)||null,time:T.uf,token:(0,d.dG)(fe)};typeof Y=="number"&&(0,a.v)("session").write(K,Y),yield(0,o.T1)(f.NJ,Ce),yield(0,o.yJ)((0,e.Kq)({broadcastId:K,overlayData:{engaged:!0}}))}}catch(fe){I("engageOverlay error",fe)}},m=function*(U){var j;const{key:w}=U;try{const{duration:Y=1,durations:K={},kind:q}=U.payload.data,ae=q.startsWith("raffle")?K[(0,c.zm)(q)]||10:Y,le=M(F({},U),{timeRemaining:ae});yield(0,o.yJ)((0,e.NM)(le));let fe=ae;for(;fe>0;)yield(0,o.cb)(1e3),yield(0,o.yJ)((0,e.Ss)(w)),fe=((j=yield(0,o.Lt)(L.P0,w))==null?void 0:j.timeRemaining)||0}catch(Y){I("receiveOverlay error",Y)}finally{w&&(yield(0,o.yJ)((0,e.Zn)(w)))}},h=function*(U){var j,w;const Y=U.payload,{payload:K,key:q}=Y;let ae=!1;try{if((0,x.k8)(Y.payload)){yield(0,o.T1)(m,Y);return}const le="overlay"in K?K.overlay:null;if(!le)return;ae=((j=le.contents)==null?void 0:j.kind)==="html";const fe=yield(0,o.Lt)(),Le=(0,E.to)(fe),{tags:Ce=[]}=le;if(!(Ce.length>0?Ce.every(se=>Le.includes(se)):!0))return;switch(yield(0,o.yJ)((0,e.fN)()),(w=le.contents)==null?void 0:w.kind){case"html":yield(0,o.yJ)((0,e.e)(M(F({},Y),{payload:M(F({},K),{htmlStatusClassName:"enter"})})));break;case"rive":yield(0,o.yJ)((0,e.e)(Y));break}ae&&le.duration&&(yield(0,o.cb)(le.duration*1e3),yield(0,o.yJ)((0,e.e)(M(F({},Y),{payload:M(F({},K),{htmlStatusClassName:"exit"})}))),yield(0,o.cb)(300))}catch(le){I("receiveOverlay error",le)}finally{q&&ae&&(yield(0,o.yJ)((0,e.Zn)(q)))}},C=function*(U){const{payload:j}=U;try{const w=yield(0,o.Lt)(),Y=(0,d.F6)(w),K=(0,d.mC)(w),q=w.app.site._id;if(!Y){I("No userId found for raffle entry. Is the user logged in?",new Error("No userId found")),yield(0,o.yJ)((0,e.fM)(j));return}try{yield(0,o.T1)(f.S5,{broadcastId:j,siteId:q,token:K,userId:Y}),yield(0,o.yJ)((0,e.ww)(j))}catch(ae){I("Error entering raffle:",ae),yield(0,o.yJ)((0,e.fM)(j))}}catch(w){yield(0,o.yJ)((0,e.fM)(j)),I("enterRaffleSaga uncaught exception:",w)}},O=function*(U){const{payload:j}=U,w=yield(0,o.Lt)(),Y=(0,d.mC)(w),K=(0,n.V2d)(w);try{yield(0,o.yJ)((0,e.n1)(!0)),yield(0,o.T1)(f.TI,{broadcast:j,primaryToken:Y,siteId:K}),yield(0,o.yJ)((0,e.n1)(!1))}catch(q){yield(0,o.yJ)((0,e.n1)(!1)),I("broadcastOverlay sort of uncaught exception:",q)}},k=function*(U){const{payload:{contents:j,description:w,name:Y,image:K,t
858ype:q,duration:ae,cta:le}}=U;try{const fe=yield(0,o.Lt)(),Le=(0,n.V2d)(fe),Ce=(0,d.mC)(fe)||"",Qe={contents:j,description:w,token:Ce,duration:ae,image:K,name:Y,siteId:Le,type:q,cta:le},se=yield(0,o.T1)(f.CT,Qe);yield(0,o.yJ)((0,e.xg)(se))}catch(fe){yield(0,o.yJ)((0,e.Y$)(fe))}},Q=function*(){try{const U=yield(0,o.Lt)(),j=(0,n.V2d)(U),w=(0,d.mC)(U)||"",Y=yield(0,o.T1)(f.Km,{token:w,siteId:j});yield(0,o.yJ)((0,e.fK)(Y))}catch(U){yield(0,o.yJ)((0,e.W3)(U))}},S=function*(U){const{payload:j}=U;try{const w=yield(0,o.Lt)(),Y=(0,n.V2d)(w),K=(0,d.mC)(w)||"",q=yield(0,o.T1)(f.pC,{token:K,id:j,siteId:Y});yield(0,o.yJ)((0,e.a0)(q))}catch(w){yield(0,o.yJ)((0,e.Tn)(w))}};function*J(){yield(0,o.jP)(r.nN,h),yield(0,o.jP)(r.bZ,P),yield(0,o.jP)(r.al,C),yield(0,o.jP)(r.fi,O),yield(0,o.p8)(r.uO,k),yield(0,o.p8)(r.dY,Q),yield(0,o.p8)(r.g0,S)}},990634:(ce,G,t)=>{t.d(G,{Gi:()=>E,HM:()=>d,J8:()=>c,OI:()=>s,Pu:()=>n,al:()=>o,dN:()=>L,jA:()=>T,yk:()=>I,zY:()=>e});const e="polls/CREATE_POLL",s="polls/UPDATE_POLL",o="polls/DELETE_POLL",T="polls/CREATE_POLL_RESPONSE",a="polls/RESET_POLL_STATE",d="polls/SET_PANEL_POLL_IDS",n="polls/SET_UNSEEN_ITEM_VISITED",E=r=>({payload:{poll:r},type:e}),c=r=>({payload:{poll:r},type:s}),f=r=>({payload:{pollId:r},type:o}),L=r=>({payload:{pollResponse:r},type:T}),N=()=>({type:a}),I=(r,y)=>({payload:{panelId:r,pollIds:y},type:d}),x=(r,y)=>({payload:{panelId:r,pollId:y},type:n})},538873:(ce,G,t)=>{t.d(G,{Gi:()=>o,J8:()=>T,dN:()=>d,gU:()=>n,pF:()=>a});var e=t(16357),s=t(990220);const o=async(E,c,f)=>{const{data:L}=await e.A.post(`${s.cA}`,c,{headers:{Authorization:`Bearer ${E}
858`,"x-maestro-client-id":f}});return L},T=async(E,c,f)=>{const{data:L}=await e.A.put(`${s.cA}/${c._id}`,c,{headers:{Authorization:`Bearer ${E}`,"x-maestro-client-id":f}});return L},a=async(E,c,f)=>{await e.A.delete(`${s.cA}/${c}`,{headers:{Authorization:`Bearer ${E}`,"x-maestro-client-id":f}})},d=async(E,c,f)=>{const{data:L}=await e.A.post(`${s.Wo}`,c,{headers:{Authorization:`Bearer ${E}`,"x-maestro-client-id":f}});return L},n=async(E,c,f)=>{const{data:L}=await e.A.get(`${s.cA}/${c}`,{headers:{Authorization:`Bearer ${E}`,"x-maestro-client-id":f}});return L}},720012:(ce,G,t)=>{t.d(G,{dN:()=>s.dN,fn:()=>x,yk:()=>s.yk});var e=t(75917),s=t(990634),o=t(100035),T=t(990220),a=t(463302),d=t(299500),n=t(467783),E=t(538873),c=t(80247);const f=function*({payload:y}){const{poll:l}=y,i=yield(0,o.Lt)(),u=(0,a.mC)(i);if(u)try{yield(0,o.T1)(E.Gi,u,l,T.Cn),yield(0,o.yJ)((0,n._L)())}catch(b){c.error(b,"error creating poll in saga"),yield(0,o.yJ)((0,d.kh)(`Unable to create Poll: "${l.name}"`))}},L=function*({payload:y}){const{pollId:l}=y,i=yield(0,o.Lt)(),u=(0,a.mC)(i);if(u)try{yield(0,o.T1)(E.pF,u,l,T.Cn)}catch(b){c.error(b,"error deleting poll in saga")}},N=function*({payload:y}){const{poll:l}=y,i=yield(0,o.Lt)(),u=(0,a.mC)(i);if(u)try{yield(0,o.T1)(E.J8,u,l,T.Cn),yield(0,o.yJ)((0,n._L)())}catch(b){c.error(b,"error updating poll in saga"),yield(0,o.yJ)((0,d.kh)(`Unable to create Poll: "${l.name}"`))}},I=function*({payload:y}){const{pollResponse:l}=y,i=yield(0,o.Lt)(),u=(0,a.mC)(i);if(u)try{yield(0,o.T1)(E.dN,u,l,T.Cn)}catch(b){c.error(b,"error creating poll response in saga")}},x=function*(){yield(0,o.jP)(s.zY,f),yield(0,o.jP)(s.al,L),yield(0,o.jP)(s.OI,N),yield(0,o.jP)(s.jA,I)},r=null},914347:(ce,G,t)=>{t.d(G,{d:()=>e});var e=(s=>(s.Poll="poll",s.Prediction="prediction",s.Trivia="trivia",s))(e||{})},75917:(ce,G,t)=>{t.d(G,{A:()=>x});var e=t(990634),s=Object.defineProperty,o=Object.defineProperties,T=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,E=(r,y,l)=>y in r?s(r,y,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[y]=l,c=(r,y)=>{for(var l in y||(y={}))d.call(y,l)&&E(r,l,y[l]);if(a)for(var l of a(y))n.call(y,l)&&E(r,l,y[l]);return r},f=(r,y)=>o(r,T(y));const L=()=>c({},N),N={panels:{}},x=(r=N,y)=>{switch(y.type){case e.HM:{const{panelId:l,pollIds:i}=y.payload,u=r.panels[l]&&r.panels[l].questions||[],b=i.find(D=>!u.includes(D));return f(c({},r),{panels:f(c({},r.panels),{[l]:f(c({},r.panels[l]),{questions:i,unseenItem:b?{id:b,visited:!1}:{}})})})}case e.Pu:{const{panelId:l,pollId:i}=y.payload,u=r.panels[l]&&r.panels[l].unseenItem&&r.panels[l].unseenItem.id;return f(c({},r),{panels:f(c({},r.panels),{[l]:c(c({},r.panels[l]),r.panels[l]&&i===u&&{unseenItem:f(c({},r.panels[l].unseenItem),{visited:!0})})})})}default:return r}}},87464:(ce,G,t)=>{t.d(G,{A:()=>y});var e=t(971691),s=Object.defineProperty,o=Object.defineProperties,T=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,E=(l,i,u)=>i in l?s(l,i,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[i]=u,c=(l,i)=>{for(var u in i||(i={}))d.call(i,u)&&E(l,u,i[u]);if(a)for(var u of a(i))n.call(i,u)&&E(l,u,i[u]);return l},f=(l,i)=>o(l,T(i));const L={custom:{list:[],selected:{}},templates:{rive:[]},isPending:!1,list:[],preview:null},N=()=>c({},L),I=["raffle","raffle_active","raffle_picking","raffle_winner"],x={[e.hK]:"failure",[e.al]:"request",[e.IN]:"success"},y=(l=L,i)=>{var u,b;switch(i.type){case e.Gh:return l.list.length?f(c({},l),{list:l.list.filter(D=>D.key!==i.payload)}):l;case e.qT:return f(c({},l),{editing:i.payload});case e.KK:return f(c({},l),{editing:null,preview:i.payload});case e.pG:return(u=i.payload)!=null&&u.key&&((b=l.preview)!=null&&b.key)?l.preview.key===i.payload.key?f(c({},l),{preview:null}):l:f(c({},l),{preview:null});case e.FB:{const D=l.list.slice(),B=D.findIndex(F=>F.key===i.payload);return D[B]&&(D[B]=f(c({},D[B]),{timeRemaining:D[B].timeRemaining-1})),f(c({},l),{list:D})}case e.N1:{const D=i.payload;return f(c({},l),{list:[...l.list,D]})}case e.rX:{const D=i.payload,{data:B={broadcastId:"",kind:""}}=D.payload,{broadcastId:F,kind:M}=B;let P=[...l.list,D];const m=I.indexOf(M);if(m!==-1){const h=I.slice(0,m);P=P.filter(C=>{if(!("data"in C.payload))return!1;const{data:O}=C.payload;return O?"broadcastId"in O&&O.broadcastId!==F||h.indexOf(O?.kind)<0:!1})}return f(c({},l),{list:P.slice(-1)})}case e.V5:{const{broadcastId:D,overlayData:B}=i.payload,F=l.list.map(M=>"data"in M.payload&&M.payload.data&&"broadcastId"in M.payload.data&&M.payload.data.broadcastId!==D?M:c(c({},M),B));return f(c({},l),{list:F})}case e.al:case e.IN:case e.hK:{const D=i.payload,B=x[i.type],F=l.list.map(M=>"data"in M.payload&&M.payload.data&&"broadcastId"in M.payload.data&&M.payload.data.broadcastId===D?f(c({},M),{raffleStatus:B}):M);return f(c({},l),{list:F})}case e.pL:return f(c({},l),{isPending:i.payload});case e.S9:return f(c({},l),{custom:c({},i.payload)});case e.fG:return f(c({},l),{custom:f(c({},l.custom),{list:i.payload})});case e.aK:return f(c({},l),{custom:f(c({},l.custom),{selected:i.payload})});case e.FT:return f(c({},l),{templates:f(c({},l.templates),{rive:i.payload})});default:return l}}},206334:(ce,G,t)=>
858{t.d(G,{$c:()=>y,JI:()=>c,P0:()=>d,ZA:()=>f,b7:()=>a,eX:()=>r,np:()=>N,qT:()=>n,rb:()=>E});var e=t(217243),s=t.n(e),o=t(980672);const T=(0,o.Mz)(i=>i.overlays.templates.rive,i=>i),a=(0,o.Mz)((i,u)=>i.overlays.list.find(b=>"data"in b.payload&&b.payload.data&&"broadcastId"in b.payload.data&&b.payload.data.broadcastId===u),i=>i),d=(0,o.Mz)((i,u)=>i.overlays.list.find(b=>b.key===u),i=>i),n=i=>i.overlays.isPending,E=(0,o.Mz)(i=>i.overlays.list.length>0?i.overlays.list[i.overlays.list.length-1]:null,i=>i),c=(0,o.Mz)(i=>i.overlays.preview,i=>i),f=(0,o.Mz)(i=>i.overlays.editing,i=>i),L=i=>i.overlays.list,N=(0,o.Mz)((i,u,b)=>{const{payload:{data:{poll:D,kind:B}}}=i,F=B?.includes("_results");return{doc:{data:{broadcastId:u,isResult:F,kind:"multiple_choice",questionId:b,questions:[{kind:"poll",poll:D}]},overlayRenderer:i}}},i=>i),I=(0,o.Mz)(L,f,c,(i,u,b)=>!(0,e.isEmpty)(i)||!!u||!!b),x=i=>i.overlays.custom,r=(0,o.Mz)([x],i=>i.list),y=(0,o.Mz)([r,(i,u)=>u],(i,u)=>i?.find(b=>b._id===u));var l={getIsPendingOverlay:n,getLastOverlay:E,getOverlayBeingEdited:f,getOverlayBeingPreviewed:c,getOverlayById:a,getOverlayByKey:d,getOverlayPanelDoc:N,getOverlays:L}},186165:(ce,G,t)=>{t.d(G,{EK:()=>e,Ky:()=>s,k8:()=>T,zW:()=>a});const e=d=>d?.kind==="html"&&"html"in d,s=d=>"channel"in d&&"renderer"in d,o=d=>typeof d=="object"&&d!==null&&"broadcastId"in d&&typeof d.broadcastId=="string",T=d=>s(d)||"data"in d&&"channel"in d&&o(d.data),a=d=>"overlay"in d&&"contents"in d.overlay},817975:(ce,G,t)=>{t.d(G,{A:()=>T});var e=t(63696),s=t(186165);const T=({overlay:a,data:d})=>{const{htmlStatusClassName:n}=d;return(0,s.EK)(a.contents)?e.createElement("div",{className:`overlay ${n}`,dangerouslySetInnerHTML:{__html:a.contents.html}}):null}},491160:(ce,G,t)=>{t.d(G,{A:()=>k});var e=t(63696),s=t(242689),o=t.n(s),T=t(43686),a=t.n(T),d=t(46630),n=t(117914),E=t(982005),c=t(283722),f=t(41989),L=t(886550),N=t(545290),I=t(934193),x=t(429195);const r=L.Ay.div`
859  width: 100%;
860  ${({marginLeft:Q})=>Q?"margin-left: 20px;":null};
861  ${({showPreview:Q})=>Q?"margin-top: 5px;":"display: flex;"};
862  ${(0,N.nD)`
863    margin: 0 0 0 0;
864  `}
865`,y=L.Ay.div`
866  font-family: Noto Sans, sans-serif;
867  font-size: 14px;
868  font-weight: 700;
869  background-color: ${({isAdmin:Q})=>Q?x.Gjz:x.Mgw};
870  color: black;
871  text-transform: uppercase;
872  padding: 4px 12px 3px 12px;
873  border-radius: 4px;
874  width: 108px;
875  height: 27px;
876  display: table;
877  text-align: center;
878  vertical-align: middle;
879  ${({showTitle:Q})=>Q?"margin-bottom: 5px;":null};
880`,l=L.Ay.div`
881  background-color: black;
882  display: flex;
883  justify-content: center;
884  font-size: 14px;
885  font-weight: 700;
886  border-radius: 4px;
887  width: 100%;
888  max-width: max-content;
889  padding: 0 14px;
890  height: 39px;
891  align-items: center;
892  margin-right: 2px;
893  font-family: ${x.nL6};
894  ${(0,N.nD)`
895    margin: 0px 2px 0px 2px;
896    width: 170px;
897    height: 20px;
898    font-size: 9px;
899  `}
900`,i=L.Ay.div`
901  display: flex;
902  justify-content: center;
903  padding-right: 8px;
904  border-right: solid ${x.kjY} 1px;
905  width: fit-content;
906  justify-content: center;
907`,u=L.Ay.div`
908  display: flex;
909  padding: 0;
910  width: fit-content;
911  justify-content: center;
912  padding-left: 8px;
913`,b=(0,L.Ay)(c.Ay)`
914  display: flex;
915  align-items: center;
916  & svg {
917    width: ${({name:Q})=>Q==="cursorHand"?"16.06px":"17.18px"};
918    height: ${({name:Q})=>Q==="cursorHand"?"18.07px":"9px"};
919  }
920  ${(0,N.nD)`
921    & svg {
922      width: 9px;
923      height: 9px;
924    }
925  `}
926`,D=L.Ay.div`
927  padding-left: 8px;
928  color: ${x.zkP};
929  font-weight: 500;
930  ${(0,N.nD)`
931    padding: 0px 2px;
932  `}
933  overflow: hidden;
934  text-overflow: ellipsis;
935  white-space: nowrap;
936`,B=L.Ay.div`
937  display: flex;
938  flex-wrap: wrap;
939  max-width: 100%;
940  margin-top: 5px;
941  justify-content: space-between;
942`,F=L.Ay.div`
943  display: flex;
944  align-items: flex-end;
945  justify-content: space-between;
946  cursor: pointer;
947  padding: 0px;
948  margin: 0px;
949  flex: unset;
950  width: 100%;
951`,M=L.Ay.div`
952  font-family: Noto Sans, sans-serif;
953  font-size: 14px;
954  font-weight: 700;
955  background-color: ${x.mrt};
956  text-transform: uppercase;
957  padding: 12px;
958  border-radius: 4px;
959  margin-right: 5px;
960  width: max-content;
961  display: flex;
962  color: ${Q=>(0,I.o0)((0,x.mrt)(Q))};
963  ${(0,N.nD)`
964    padding: 2px 6px 2px 6px;
965  `}
966`,P=L.Ay.div`
967  align-content: flex-end;
968  align-self: center;
969  padding-right: 8px;
970  margin-top:auto;
971  background-color: ${x.AOI};
972  border-radius: 40px;
973  padding: 5px 9px;
974  ${N._i}
975  display: flex;
976  align-items: center;
977  min-width: 72px;
978  flex: 1 1 auto;
979  ${(0,N.nD)`
980    min-width: 45px;
981    padding: 0px 0px 0px 2px;
982    font-size: 9px;
983    margin: 0px;
984  `}
985`,m=(0,L.Ay)(n.A)`
986`,h=L.Ay.div`
987  margin-left: 7px;
988  font-size: 12px;
989  color: ${x.SP6};
990  ${(0,N.nD)`
991    font-size: 9px;
992    margin: 0px;
993    margin-left: 2px;
994  `}
995`,C=(0,L.Ay)(E.A)`
996  background-color: ${x.AOI};
997  padding: 8px;
998  border-radius: 4px;
999  height: fit-content;
1000  margin-top: auto;
1001  margin-left: 8px;
1002  opacity: 1;
1003  & span {
1004    display: grid;
1005  }
1006  & svg {
1007    width: 10px;
1008    height: 10px;
1009    & > path {
1010      fill: ${x.mz9};
1011    }
1012  }
1013  ${(0,N.nD)`
1014    & svg {
1015      width: 14px;
1016      height: 14px;
1017    }
1018    margin-left: 2px;
1019    padding: 7px;
1020  `}
1021`,k=({broadcastId:Q,data:S,defaultState:J,duration:U,isAdmin:j,onDismiss:w,overlayType:Y,showPreview:K,showTitle:q,trackDismiss:ae,timeRemaining:le,views:fe})=>{const[Le,Ce]=(0,e.useState)(J),{endUserT:Qe}=(0,f.T9)(),se=Ee=>{var We;const{engaged:Be}=((We=Ee?.data)==null?void 0:We.state)||{},{engaged:_e}=Le;_e!==Be&&Ce({engaged:Be})},ge=()=>{const{key:Ee}=S;w(Ee),ae(S)},pe=()=>K?e.createElement(y,{isAdmin:j,showTitle:q||!1},Qe([f.Rq.overlayPreview],["PREVIEW"])):"",Re=()=>{if(K||!j)return null;const{engaged:Ee=0}=Le,We=Math.max(1,fe,Ee),Be=Qe([f.Rq.overlayEngaged],["ENGAGED"]);return j&&e.createElement(l,null,e.createElement(i,null,e.createElement(b,{name:"eyeFilled"}),e.createElement(D,null,`${We||2}
1021 `,Qe([f.Rq.overlayViewed],["VIEWED"]))),e.createElement(u,null,e.createElement(b,{name:"cursorHand"}),e.createElement(D,null,`${Ee} ${Be} (${We?Math.trunc(Ee/We*100):1}%)`)),e.createElement(d.A,{collection:"objects",id:Q,onValue:se}))},we=()=>q?e.createElement(M,null,Qe([f.Rq.overlayTitle,{type:a()(Y)}],[Y?.toUpperCase()])):null,mt=()=>{if(typeof U>"u"&&typeof le>"u")return null;const Ee=le&&le>600?600:le;return e.createElement(P,null,e.createElement(m,{second:Ee||48,showSeconds:!1,size:12,totalSeconds:K&&Ee===0?192:U||0}),e.createElement(h,null,o().utc((Ee||48)*1e3).format("mm:ss")))},Ue=()=>{ge()};return e.createElement(B,null,e.createElement(F,null,e.createElement(r,{marginLeft:Y==="lower_third",showPreview:K},pe(),we(),Re()),mt(),e.createElement(C,{onClick:Ue})))}},452274:(ce,G,t)=>{t.d(G,{A:()=>nt});var e=t(63696),s=t(224191),o=t(990220),T=t(463302),a=t(368909),d=t(804797),n=t(887944),E=t(472661),c=t(720012),f=t(221196),L=t.n(f),N=t(204388),I=t(429195),x=t(41989),r=t(33149),y=t(491160),l=t(955807),i=t(46630),u=t(283722),b=t(914347),D=t(993729),B=Object.defineProperty,F=Object.defineProperties,M=Object.getOwnPropertyDescriptors,P=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,C=(X,oe,_)=>oe in X?B(X,oe,{enumerable:!0,configurable:!0,writable:!0,value:_}):X[oe]=_,O=(X,oe)=>{for(var _ in oe||(oe={}))m.call(oe,_)&&C(X,_,oe[_]);if(P)for(var _ of P(oe))h.call(oe,_)&&C(X,_,oe[_]);return X},k=(X,oe)=>F(X,M(oe));const Q=X=>({correctAnswer:X.answers.filter(oe=>oe.correct),pollType:X.type}),S=async(X,oe)=>{var _;const Ae=X.payload.data.questionId,be=oe&&Ae?await(0,D.v)("session").read(Ae):null;return{answered:!!oe,answerIndex:be,answers:oe&&(_=X.payload.data.state)!=null?_:null,engaged:0,openAnswersOnMobile:!1}},J=(X,oe,_)=>X===b.d.Trivia?"trivia":X===b.d.Prediction?"prediction":_||(oe?"poll_results":"poll"),U=(X,oe,_,Ae)=>X!==b.d.Trivia?null:oe&&_.length>0?_.some(be=>be._id===Ae):null,j=X=>!X.open||X.type!==b.d.Prediction,w=(X,oe)=>X.map((_,Ae)=>{if(!oe)return O({},_);const be=oe[`${Ae+1}`]||0,ke=Math.round(be/(oe.engaged||1)*100);return k(O({},_),{count:be,percent:ke})}),Y=(X,oe,_,Ae,be)=>{const ke={action:`answer_${X}`,poll:oe,response:_};return X===b.d.Poll||[b.d.Trivia,b.d.Prediction].includes(X)&&be.length>0&&(ke.correct=be.map(Ot=>Ot._id).includes(Ae)),ke},K=X=>X===b.d.Poll||[b.d.Trivia,b.d.Prediction].includes(X);var q=t(19719);const ae=({percent:X})=>e.createElement("div",{className:"ml-[5px] h-[7px] w-full max-w-[120px] rounded border border-[var(--highlight-secondary)] bg-[var(--highlight-primary)]"},e.createElement("div",{className:"h-full rounded-l opacity-[0.97] bg-[var(--highlight-tertiary)]",style:{width:`${X}%`}})),le=({count:X=0,isSelected:oe,percent:_=0})=>e.createElement("div",{className:(0,r.cn)("ml-auto mt-0.5",oe?"text-[var(--text-contrast-on-accent-primary)]":"text-[var(--text-100)]")},e.createElement("span",{className:(0,r.cn)(oe&&"text-[var(--text-contrast-on-accent-primary)]")},e.createElement(q.A,{target:_},Ae=>e.createElement("span",{className:"flex items-center text-[var(--highlight-primary)]"},e.createElement("span",null,`${Math.trunc(Ae)}%`),e.createElement(ae,{percent:Ae}))),` (${X})`)),fe=({checked:X,enableHoverStyle:oe=!0})=>e.createElement("input",{readOnly:!0,checked:X,type:"radio",className:(0,r.cn)("box-border h-[15px] w-[15px] shrink-0 flex-none cursor-pointer appearance-none rounded-full border border-[var(--accent-primary)] bg-transparent align-text-top outline-none",X&&"border-4 border-[var(--highlight-primary)] bg-[var(--surface-3)]",oe&&!X&&"group-hover:border-4 group-hover:border-[var(--surface-3)] group-hover:bg-[var(--highlight-primary)]")}),Le=({imageUrl:X,isCorrect:oe})=>e.createElement("div",{className:"h-[51.85px] w-[61.93px] shrink-0 rounded p-0"},e.createElement("img",{alt:"",src:X,className:(0,r.cn)("h-full w-full object-contain",!X&&"bg-black",oe&&"border border-[var(--alert-confirmation)]")})),Ce=({isCorrect:X})=>e.createElement("div",{"data-testid":X?"poll-trivia-correct-icon":"poll-trivia-wrong-icon",className:(0,r.cn)("flex h-full w-[53px] flex-auto items-center justify-center",X?"rounded-l bg-[var(--alert-confirmation)] text-white":"rounded bg-[var(--alert-error)] text-black")},e.createElement(u.Ay,{name:X?"correctCircle":"wrongCircle",className:"leading-none [&>svg]:h-4 [&>svg]:w-4"})),se=({answer:X,answerIndex:oe,answered:_,correctAnswer:Ae,endUserT:be,index:ke,isPreview:Ot,listKey:vt,onSelectAnswer:ut,onlyResults:gt,poll:Fe,pollType:Ke,showPercent:at,showStats:De})=>{var dt,Ve;const Xe=oe===ke,Dt=U(Ke,_,Ae,X._id),Et=(dt=Fe.answers[ke])==null?void 0:dt.imageUrl,At=!!(Et&&Ae.some(Pt=>Pt._id===X._id)),Lt=Fe.answers.findIndex(Pt=>Pt.correct),ct=()=>{Ot||ut(ke,X.answer,X._id)};return e.createElement("div",{key:vt,role:"presentation",onClick:ct,className:(0,r.cn)("group relative box-border flex min-h-[71.94px] w-[calc(50%-5px)] items-center rounded border border-[var(--accent-primary)] p-0 text-[var(--text-100)] mt-[5px] mr-[5px]",ke%2===1&&"mr-0",Xe&&_&&"cursor-default bg-[var(--accent-primary)]",_&&!Xe&&"curs
1021or-default",!_&&"hover:cursor-pointer hover:bg-[var(--accent-primary)]",_&&Dt===!0&&"border border-[var(--alert-confirmation)]",_&&Dt===!1&&"border-0")},e.createElement("div",{className:"pointer-events-none absolute left-0 top-0 -z-[1] h-full w-full rounded bg-[var(--surface-3)]"}),e.createElement("div",{className:(0,r.cn)("inline-flex h-full w-full items-center pl-[10px]",Dt===!1&&"opacity-50",!Xe&&!_&&"group-hover:text-[var(--text-contrast-on-accent-primary)]")},!gt&&(Ke===b.d.Trivia&&Xe?e.createElement(u.Ay,{name:"correctCircle",className:"leading-none [&>svg]:h-4 [&>svg]:w-4"}):e.createElement(fe,{checked:Xe,enableHoverStyle:!_})),Et?e.createElement(Le,{imageUrl:Et,isCorrect:At}):null,e.createElement("div",{className:(0,r.cn)("flow-root w-full flex-[100%] items-center",Et?"m-2.5":"m-[18px]")},e.createElement("span",{className:(0,r.cn)("text-sm font-medium",Xe&&"text-[var(--text-contrast-on-accent-primary)]",!Xe&&!_&&"group-hover:text-[var(--text-contrast-on-accent-primary)]")},be([x.Rq.multipleChoiceAnswer,{answerId:(Ve=X._id)!=null?Ve:"",multipleChoiceId:Fe._id,multipleChoiceType:Fe.type}])||X.answer),De&&at&&e.createElement(le,{count:X.count,isSelected:Xe,percent:X.percent}))),Ke===b.d.Trivia&&_&&Lt===ke&&e.createElement(Ce,{isCorrect:!0}),Ke===b.d.Trivia&&_&&oe===ke&&Lt!==ke&&e.createElement(Ce,{isCorrect:!1}))},pe=({answerIndex:X,answered:oe,answers:_,broadcastId:Ae,correctAnswer:be,endUserT:ke,isPreview:Ot,onReceiveAnswers:vt,onSelectAnswer:ut,onlyResults:gt,poll:Fe,pollType:Ke})=>{const at=w(Fe.answers,_);if(!at.length)return null;const De=j(Fe);return e.createElement("div",{className:"mx-auto flex max-w-full flex-row flex-wrap justify-between max-[896px]:hidden"},e.createElement(l.A,{keyField:"text",list:at},(dt,Ve,Xe)=>e.createElement(se,{key:dt,answer:Ve,answerIndex:X,answered:oe,correctAnswer:be,endUserT:ke,index:Xe,isPreview:Ot,listKey:dt,onSelectAnswer:ut,onlyResults:gt,poll:Fe,pollType:Ke,showPercent:De,showStats:!!_})),!gt&&oe&&Ae&&e.createElement(i.A,{collection:"objects",id:Ae,onValue:vt}))};var Re=t(551321);const mt=({label:X,onClick:oe})=>e.createElement(Re.$,{context:"site",variant:"default",type:"button","data-testid":"pollOverlayMobileActionButton",className:(0,r.cn)("hidden h-[45px] w-full uppercase max-[896px]:flex"),onClick:oe},X);var Ue=Object.defineProperty,Ee=Object.defineProperties,We=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,It=(X,oe,_)=>oe in X?Ue(X,oe,{enumerable:!0,configurable:!0,writable:!0,value:_}):X[oe]=_,he=(X,oe)=>{for(var _ in oe||(oe={}))_e.call(oe,_)&&It(X,_,oe[_]);if(Be)for(var _ of Be(oe))tt.call(oe,_)&&It(X,_,oe[_]);return X},ye=(X,oe)=>Ee(X,We(oe));const Ct=({data:X,isAdmin:oe,isLandscape:_,isMobileLayout:Ae,mobileOpenPollPanel:be,onAddMessageOverlay:ke,onDismiss:Ot,onEngageMultipleChoiceOverlay:vt,onlyResults:ut=!1,overlayType:gt,renderer:Fe,siteId:Ke,trackDismiss:at,trackEngage:De,userId:dt})=>{var Ve,Xe,Dt;const{endUserT:Et}=(0,x.T9)(),[At,Lt]=(0,e.useState)(null),{poll:ct}=Fe,{pollType:Pt,correctAnswer:Bt}=(0,e.useMemo)(()=>Q(ct),[ct]);(0,e.useEffect)(()=>{let yt=!0;return S(X,ut).then(pt=>{yt&&Lt(ht=>{var Kt;return ht?.answered?ye(he({},pt),{answered:ht.answered,answerIndex:ht.answerIndex,answers:(Kt=ht.answers)!=null?Kt:pt.answers}):pt})}),()=>{yt=!1}},[X.key,ut]);const Vt=(0,e.useCallback)(yt=>{var pt;(pt=yt?.data)!=null&&pt.state&&Lt(ht=>ht&&ye(he({},ht),{answers:yt.data.state}))},[]),Xt=(0,e.useCallback)((yt,pt,ht)=>{if(!At||At.answered||!ht)return;const{broadcastId:Kt}=X.payload.data;if(!Kt)return;const _t={answerId:ht,pollId:ct._id,siteId:Ke,userId:dt};vt(_t,{broadcastId:Kt,index:Number(yt)}),Lt(jt=>jt&&ye(he({},jt),{answered:!0,answerIndex:yt})),K(Pt)&&De(X,Y(Pt,ct._id,pt,ht,Bt))},[Bt,X,vt,ct._id,Pt,Ke,At,De,dt]),Mt=(0,e.useCallback)(yt=>{be((0,d.np)(X,yt,ct._id)),Lt(pt=>pt&&ye(he({},pt),{openAnswersOnMobile:!pt.openAnswersOnMobile})),De(X,{action:"open_panel",options:ct.type,pollId:ct._id})},[X,be,ct._id,ct.type,De]),Jt=(0,e.useCallback)(yt=>{if(Mt(yt),Ae&&_&&(0,N.cq)(I.eL1).matches){const pt=Et([x.Rq.overlayRotatePhone],["ADMIN_OVERLAYS_ROTATE_YOUR_PHONE"]);ke({key:L().generate(),timeRemaining:15,payload:{data:{duration:15,kind:"message",message:pt,trackName:"Message: Please rotate your phone"},removeOnPortrait:!0}})}},[Et,_,Ae,ke,Mt]);if(!At)return null;const{key:Ie,payload:Je,timeRemaining:Rt}=X,{broadcastId:He,views:Nt,duration:wt}=Je.data,Ut=(Ve=Fe.overlayType)==null?void 0:Ve.includes("_results"),zt=(Xe=Ie?.startsWith("preview"))!=null?Xe:!1,Zt=J(Pt,ut,(Dt=X.payload.renderer)==null?void 0:Dt.overlayType),dn=Ut?Et([x.Rq.multipleChoiceOverlayResults],["SEE_RESULTS"]):Et([x.Rq.multipleChoiceOverlayAnswer],["ANSWER"]);return e.createElement("div",{className:(0,r.cn)("w-full min-w-0",At.openAnswersOnMobile&&"max-[896px]:hidden")},e.createElement(y.A,{broadcastId:He??"",data:X,defaultState:{engaged:0},duration:wt,isAdmin:oe,onDismiss:Ot,overlayType:Zt,showPreview:zt,showTitle:!0,timeRemaining:Rt,trackDismiss:at,views:Nt??0}),e.createElement("div",{className:(0,r.cn)("font-[family-name:var
1021(--site-font-body)] text-[var(--admin-surface-5)]",gt)},e.createElement("div",{className:"mt-[5px] flex items-start rounded-[5px] bg-[var(--surface-3)] p-5"},e.createElement("span",{className:"flex-grow text-base font-bold text-[var(--text-100)]"},Et([x.Rq.multipleChoiceQuestion,{multipleChoiceId:ct._id,multipleChoiceType:ct.type}])||ct.question)),e.createElement(pe,{answerIndex:At.answerIndex,answered:At.answered,answers:At.answers,broadcastId:He,correctAnswer:Bt,endUserT:Et,isPreview:zt,onReceiveAnswers:Vt,onSelectAnswer:Xt,onlyResults:ut,poll:ct,pollType:Pt})),He&&e.createElement(mt,{label:dn,onClick:()=>Jt(He)}))},nt=({data:X,overlayType:oe,onlyResults:_=!1,renderer:Ae})=>{const be=(0,s.useDispatch)(),ke=(0,s.useSelector)(Ve=>(0,T.N6)(Ve)),Ot=(0,s.useSelector)(Ve=>(0,a.Yg)(Ve)),vt=(0,s.useSelector)(Ve=>(0,a.VC)(Ve)),ut=(0,s.useSelector)(Ve=>(0,T.F6)(Ve)),gt=(0,e.useCallback)(Ve=>{be((0,E.NE)(Ve))},[be]),Fe=(0,e.useCallback)(Ve=>{be((0,d.Eu)(Ve))},[be]),Ke=(0,e.useCallback)(Ve=>{be((0,d.Zn)(Ve))},[be]),at=(0,e.useCallback)((Ve,Xe)=>{be((0,c.dN)(Ve)),be((0,d.tV)(Xe))},[be]),De=(0,e.useCallback)((Ve,Xe)=>{be((0,n.o1)("dismiss",Ve,Xe))},[be]),dt=(0,e.useCallback)((Ve,Xe)=>{be((0,n.o1)("engage",Ve,Xe))},[be]);return e.createElement(Ct,{data:X,isAdmin:ke,isLandscape:Ot,isMobileLayout:vt,mobileOpenPollPanel:gt,onAddMessageOverlay:Fe,onDismiss:Ke,onEngageMultipleChoiceOverlay:at,onlyResults:_,overlayType:oe,renderer:Ae,siteId:o.Cn,trackDismiss:De,trackEngage:dt,userId:ut??""})}},508391:(ce,G,t)=>{t.d(G,{A:()=>I});var e=t(63696),s=t(452274),o=Object.defineProperty,T=Object.defineProperties,a=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,c=(x,r,y)=>r in x?o(x,r,{enumerable:!0,configurable:!0,writable:!0,value:y}):x[r]=y,f=(x,r)=>{for(var y in r||(r={}))n.call(r,y)&&c(x,y,r[y]);if(d)for(var y of d(r))E.call(r,y)&&c(x,y,r[y]);return x},L=(x,r)=>T(x,a(r));const I=x=>e.createElement(s.A,L(f({},x),{onlyResults:!0}))},199304:(ce,G,t)=>{t.d(G,{T:()=>e,Z:()=>s});function e(o){if(!o||o.price==null||o.price==="")return 0;const T=o.price;if(typeof T=="number")return Number.isFinite(T)?T:0;if(typeof T=="string"){const a=Number(T);return Number.isFinite(a)?a:0}if(typeof T=="object"&&T!==null&&"amount"in T){const a=T.amount;if(a==null||a==="")return 0;const d=Number(a);return Number.isFinite(d)?d:0}return 0}function s(o){if(!o||o.price==null)return"";const T=o.price;if(typeof T=="object"&&T!==null&&"amount"in T){const a=T.amount;return a!=null?String(a):""}return String(T)}},318082:(ce,G,t)=>{t.d(G,{A:()=>u});var e=t(63696),s=t(224191),o=t(463302),T=t(804797),a=t(887944),d=t(952143),n=t(287483),E=t(696105),c=t(368909),f=t(86138),L=t(171751),N=t(491160),I=t(199304),x=t(551321),r=t(33149);const l=b=>{var D;const{product:B,variant:F,image:M}=b.renderer,{addProductToCart:P,data:{key:m,timeRemaining:h,payload:{data:{broadcastId:C,views:O,duration:k}}},renderer:{imageUrl:Q},isVideoOnlyMode:S,showShopifyPanel:J,isAdmin:U,onDismiss:j,trackDismiss:w,isMobileLayout:Y,shopCurrencyCode:K,overlayType:q,data:ae}=b,le=(D=m?.startsWith("preview"))!=null?D:!1;if(S)return e.createElement("div",null,e.createElement("img",{className:"inline-block max-h-[360px] max-w-full cursor-pointer align-bottom",src:Q}));const fe=()=>{!B||!F||(P({productId:B.value,variantId:F.value}),J({kind:"shopifyBlockPanel",product:B,variant:F}))};if(!B||!F)return null;const Le=!!(M?.src||M?.url);return e.createElement("div",{className:(0,r.cn)("w-full min-w-[395px] max-w-[545px]","max-[896px]:max-w-[250px] max-[896px]:min-w-0",q)},e.createElement(N.A,{broadcastId:C??"",data:ae,defaultState:{engaged:0},duration:k,isAdmin:U,onDismiss:j,overlayType:"shopify",showPreview:le,timeRemaining:h,trackDismiss:w,views:O??0}),e.createElement("div",{className:(0,r.cn)("mt-[9px] flex flex-row items-stretch","max-[896px]:m-0.5")},e.createElement("img",{className:(0,r.cn)("mr-[5px] h-[149px] w-36 shrink-0 rounded-md object-cover","max-[896px]:h-full max-[896px]:min-h-0 max-[896px]:w-14 max-[896px]:self-stretch",!Le&&"hidden"),src:M?.src||M?.url}),e.createElement("div",{className:(0,r.cn)("flex min-h-0 w-full flex-col","max-[896px]:max-w-[195px] max-[896px]:min-w-0")},e.createElement("div",{className:(0,r.cn)("mb-1.25 h-[91px] rounded bg-[var(--surface-3)] px-5 pb-[27px] pt-5","font-[family-name:var
1021(--site-font-body)] text-xl font-medium leading-8 text-[var(--text-100)]","max-[896px]:h-auto max-[896px]:min-h-0 max-[896px]:px-0 max-[896px]:pb-1 max-[896px]:pl-1.5 max-[896px]:pt-1",Y?"max-[896px]:text-xs max-[896px]:font-medium max-[896px]:leading-snug":"max-[896px]:text-sm max-[896px]:font-medium max-[896px]:leading-5")},e.createElement("div",{className:(0,r.cn)(Y?"line-clamp-2 break-words leading-snug":"line-clamp-2 max-h-[4.5rem] break-words leading-normal")},B.label)),e.createElement("div",{className:(0,r.cn)("relative z-0 flex flex-row items-center justify-between rounded","border border-solid border-[var(--accent-primary)] text-[var(--text-100)]",Y?"min-h-9 gap-1 py-0.5 pl-0.5 pr-[2.5px]":"h-[53px] pr-[5px]")},e.createElement("div",{"aria-hidden":!0,className:"absolute left-0 top-0 z-0 h-full w-full rounded bg-[var(--surface-3)] opacity-60"}),e.createElement("div",{className:(0,r.cn)("relative z-[1] whitespace-nowrap pl-5 font-[family-name:var(--site-font-body)] not-italic",Y?"px-0.5 text-sm font-semibold leading-5":"text-xl font-medium leading-8"),"data-testid":"shopifyOverlayPrice"},(0,L.$g)(K||"USD",(0,I.T)(F))),e.createElement(x.$,{className:(0,r.cn)("relative z-[1] shrink-0 font-[family-name:var(--site-font-body)] font-semibold",Y?"h-9 min-w-[4.5rem] px-3 py-2 text-xs":"h-auto min-h-10 px-6 py-2.5 text-base"),context:"site",onClick:fe,size:"default",type:"button",variant:"default"},e.createElement(f.A,{stringKey:"SHOP_NOW"}))))))},u=({data:b,overlayType:D,renderer:B})=>{const F=(0,s.useDispatch)(),M=(0,s.useSelector)(S=>(0,o.N6)(S)),P=(0,s.useSelector)(S=>(0,c.VC)(S)),m=(0,s.useSelector)(S=>(0,n.Rc)(S)),h=(0,s.useSelector)(S=>(0,E.ZM)(S)),C=(0,e.useCallback)(S=>{F((0,d.addCartItem)({productId:S.productId,quantity:1,variantId:S.variantId}))},[F]),O=(0,e.useCallback)(S=>{F((0,T.Zn)(S))},[F]),k=(0,e.useCallback)(S=>{F((0,d.openEcommerceChannelCheckoutView)())},[F]),Q=(0,e.useCallback)(S=>{F((0,a.o1)("dismiss",S))},[F]);return e.createElement(l,{addProductToCart:C,data:b,isAdmin:M,isMobileLayout:P,isVideoOnlyMode:m,onDismiss:O,overlayType:D,renderer:B,shopCurrencyCode:h,showShopifyPanel:k,trackDismiss:Q})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.