1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9b62131f-db8a-48d5-93ee-be5494a083ae",e._sentryDebugIdIdentifier="sentry-dbid-9b62131f-db8a-48d5-93ee-be5494a083ae")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"e5dbbc3dc57a15eab4f17a2bfac2884867ca84be"}}catch(e){}}(),(self.webpackChunkstaylive_partnerplatform=self.webpackChunkstaylive_partnerplatform||[]).push([[6076],{36833:(e,t,s)=>{s.r(t),s.d(t,{defaultAction:()=>r});var a=s(8915);function r(){return{type:a.DEFAULT_ACTION}}},8915:(e,t,s)=>{s.r(t),s.d(t,{DEFAULT_ACTION:()=>a});const a="app/SearchBar/DEFAULT_ACTION"},69314:(e,t,s)=>{s.r(t),s.d(t,{SearchBar:()=>v,default:()=>S});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(1081),d=s(82960),c=s(38267),u=s(89736),p=s(92257),m=s(40260),h=s(74980),g=s(47767),y=s(94411),x=s(13070),b=s(66108);const f=(0,c.Ay)(u.A)` 2 input { 3 border-radius: 26px !important; 4 border-color: #ccc !important; 5 } 6`;function v({defaultSearchValue:e}){(0,h.N)({key:"searchBar",reducer:x.default}),(0,m.f)({key:"searchBar",saga:b.default});const[t,s]=(0,r.useState)(e),n=(0,g.Zp)();return(0,a.jsx)(f,{onSubmit:()=>n(`/search?q=${t}`),children:(0,a.jsx)(p.A,{fluid:!0,iconPosition:"left",value:t,onChange:(e,{value:t})=>s(t),size:"small",icon:"search"})})}v.propTypes={defaultSearchValue:o().object};const j=(0,l.j8)({searchBar:(0,y.default)()}),C=(0,i.Ng)(j,(function(e){return{dispatch:e}})),S=(0,d.Zz)(C,r.memo)(v)},13070:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(8915);const n={},o=(e=n,t)=>(0,a.Ay)(e,(()=>{t.type,r.DEFAULT_ACTION}))},66108:(e,t,s)=>{function*a(){}s.r(t),s.d(t,{default:()=>a})},94411:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectSearchBarDomain:()=>n});var a=s(1081),r=s(13070);const n=e=>e.searchBar||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},22059:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});const a=(0,s(40313).A)((()=>Promise.all([s.e(6146),s.e(5134),s.e(7115),s.e(8620),s.e(508),s.e(7774),s.e(3049),s.e(1268),s.e(45),s.e(644),s.e(4899),s.e(2009),s.e(8117),s.e(8740),s.e(2116),s.e(9374),s.e(6486),s.e(6076),s.e(9761),s.e(1326),s.e(4622),s.e(628)]).then(s.bind(s,9259))))},37480:(e,t,s)=>{s.r(t),s.d(t,{searchAction:()=>r,searchErrorAction:()=>o,searchSuccessAction:()=>n,setTabIndexAction:()=>i});var a=s(75758);function r(e){return{type:a.SEARCH,payload:e}}function n(e){return{type:a.SEARCH_SUCCESS,payload:e}}function o(e){return{type:a.SEARCH_ERROR,payload:e}}function i(e){return{type:a.SET_TAB_INDEX,payload:e}}},75758:(e,t,s)=>{s.r(t),s.d(t,{SEARCH:()=>a,SEARCH_ERROR:()=>n,SEARCH_SUCCESS:()=>r,SET_TAB_INDEX:()=>o});const a="app/SearchHandler/SEARCH",r="app/SearchHandler/SEARCH_SUCCESS",n="app/SearchHandler/SEARCH_ERROR",o="app/SearchHandler/SET_TAB_INDEX"},9259:(e,t,s)=>{s.r(t),s.d(t,{SearchHandler:()=>L,default:()=>H});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(67438),d=s(3279),c=s(1081),u=s(82960),p=s(40260),m=s(74980),h=s(68420),g=s(23045),y=s(94686),x=s(69314),b=s(68074),f=s(42088),v=s(86663),j=s(39522),C=s(47767),S=s(56637),A=s(37480),T=s(59499),w=s(7979),E=Object.defineProperty,_=Object.defineProperties,O=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,I=(e,t,s)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,R=(e,t)=>{for(var s in t||(t={}))P.call(t,s)&&I(e,s,t[s]);if(N)for(var s of N(t))V.call(t,s)&&I(e,s,t[s]);return e},k=(e,t)=>_(e,O(t));const D=(e,t,s)=>{const{q:a="",video:r=1,livestream:n=1}=v.parse(window.location.search);e(`${window.location.pathname}?q=${a}&video=${"video"===t?s:r}&livestream=${"livestream"===t?s:n}`)};function L(e){(0,m.N)({key:"searchHandler",reducer:T.default}
6),(0,p.f)({key:"searchHandler",saga:w.default});const{q:t="",video:s,livestream:n}=v.parse(window.location.search),{searchContent:o,intl:i,setTabIndex:d,customHref:c={livestreams:null,videos:null}}=e,{result:u,loading:S,pagination:A,tabIndex:E}=e.searchHandler,_=(0,C.Zp)();(0,r.useEffect)((()=>{t.length>=2&&o({query:t,videoPage:s,livestreamPage:n})}),[n,t,o,s]);const{background:O,content:N,header:P}=e,V=[{menuItem:`${i.formatMessage(j.default.livestreams)} (${A.livestreams.objects})`,render:()=>(0,a.jsxs)(h.A.Pane,{attached:!1,loading:S,children:[(0,a.jsx)(f.default,{result:u.livestreams,type:"livestream",customHref:c.livestreams}),u.livestreams.length>0&&(0,a.jsx)(g.A,{activePage:n||1,size:"mini",className:"stackable",style:{margin:"26px 0"},totalPages:A.livestreams.totalPages,onPageChange:(e,{activePage:t})=>D(_,"livestream",t),firstItem:!1,lastItem:!1})]},"livestreams")},{menuItem:`${i.formatMessage(j.default.videos)} (${A.videos.objects})`,render:()=>(0,a.jsxs)(h.A.Pane,{attached:!1,loading:S,children:[(0,a.jsx)(f.default,{result:u.videos,type:"video",customHref:c.videos}),u.videos.length>0&&(0,a.jsx)(g.A,{activePage:s||1,style:{margin:"26px 0"},size:"mini",totalPages:A.videos.totalPages,onPageChange:(e,{activePage:t})=>D(_,"video",t),firstItem:!1,lastItem:!1})]},"videos")}];return(0,a.jsx)(y.default,k(R({},O),{children:(0,a.jsxs)("div",k(R({},N),{children:[(0,a.jsx)(b.default,{as:"h1",style:k(R({},P.style),{marginBottom:"20px"}),children:(0,a.jsx)(l.A,R({},j.default.search))}),(0,a.jsx)(x.default,{defaultSearchValue:t}),(0,a.jsx)(h.A,{menu:{secondary:!0,pointing:!0,stackable:!0},style:{marginTop:"8px"},panes:V,activeIndex:E,onTabChange:(e,{activeIndex:t})=>d(t)})]}))}))}L.propTypes={dispatch:o().func.isRequired,searchContent:o().func,searchHandler:o().object,background:o().object,content:o().object,header:o().object,pagination:o().object,intl:o().object,setTabIndex:o().func,customHref:o().object};const $=(0,c.j8)({searchHandler:(0,S.default)()}),U=(0,i.Ng)($,(function(e){return{dispatch:e,searchContent:t=>e((0,A.searchAction)(t)),setTabIndex:t=>e((0,A.setTabIndexAction)(t))}})),H=(0,u.Zz)(U,r.memo)((0,d.Ay)(L))},59499:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(75758);const n={loading:!1,error:null,tabIndex:0,result:{livestreams:[],videos:[]},pagination:{livestreams:{totalPages:0,objects:0},videos:{totalPages:0,objects:0}}},o=(e=n,t)=>(0,a.Ay)(e,(e=>{switch(t.type){case r.SEARCH:e.loading=!0,e.result=n.result,e.error=null;break;case r.SEARCH_SUCCESS:e.loading=!1,e.result={livestreams:t.payload.message.livestreams.message,videos:t.payload.message.videos.message},e.pagination={livestreams:t.payload.message.livestreams.data,videos:t.payload.message.videos.data},e.error=null;break;case r.SEARCH_ERROR:e.loading=!1,e.result=n.result,e.error=t.payload;break;case r.SET_TAB_INDEX:e.tabIndex=t.payload}}))},7979:(e,t,s)=>{s.r(t),s.d(t,{default:()=>c,search:()=>d});var a=s(43786),r=s(72748),n=s(32689),o=s(17386),i=s(75758),l=s(37480);function*d(e){try{const{tags:t,dates:s,query:i,videoPage:d=1,livestreamPage:c=1,showEndedStreams:u=!1}=e.payload,p=yield(0,a.Lt)((0,o.makeSelectPlatform)());let m="";const h=`${s&&s.start.active?`&start=${s.start.date}`:""}${s&&s.stop.active?`&stop=${s.stop.date}`:""}`;if(!h.length&&!u){const e=new Date;m=`&start=${new Date(e.getFullYear(),e.getMonth(),e.getDate()-1).toISOString().slice(0,10)}`}let g=t?t.map((e=>e.name)):"";g=g.length>0?`&tags=${g.toString()}`:"";const y=`${n.DEFAULT_STAYLIVE_API}search/streams?query=${i}${h||m}${g}&page=${c}&limit=20`,x=`${n.DEFAULT_STAYLIVE_API}search/videos?query=${i}${h}${g}&page=${d}&limit=20`,b=yield(0,a.T1)(r.Ay,y,{method:"GET",headers:{"Content-Type":"application/json","X-STAYLIVE-CHANNELS":p.metadata.channels.map((e=>e.id)).toString()}}),f=yield(0,a.T1)(r.Ay,x,{method:"GET",headers:{"Content-Type":"application/json","X-STAYLIVE-CHANNELS":p.metadata.channels.map((e=>e.id)).toString()}});yield(0,a.yJ)((0,l.searchSuccessAction)({message:{livestreams:"string"==typeof f.message?{message:[],data:{totalPages:0,objects:0}}:b,videos:"string"==typeof f.message?{message:[],data:{totalPages:0,objects:0}}:f}}))}catch(e){console.log(e),yield(0,a.yJ)((0,l.searchErrorAction)(e))}}function*c(){yield(0,a.p8)(i.SEARCH,d)}},56637:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectSearchHandlerDomain:()=>n});var a=s(1081),r=s(59499);const n=e=>e.searchHandler||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},41419:(e,t,s)=>{s.r(t),s.d(t,{default:()=>m});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(84976),i=s(23114),l=s(24712),d=s(15979),c=s(15422),u=s(65107);const p=({channelData:e,channelLink:t,labels:s,loadMore:r,searchCategory:n,showChannelSection:p,loadMoreContent:m,errorProps:h,channelError:g,isValidating:y})=>{var x,b;if(!p)return null;if(y&&!(null==e?void 0:e.results))return(0,a.jsx)("div",{className:n.wrapperClasses,children:(0,a.jsx)(c.default,{})});if(g)return(0,a.jsx)(u.default,{errorProps:h});const f=e=>{var s;return(null==(s=null==t?void 0:t.subdirectory)?void 0:s.length)>0?`${t.subdirectory}${e}`:`/${e}`};return(null==(x=null==e?void 0:e.results)?void 0:x.length)>=1?(0,a.jsxs)("div",{className:n.wrapperClasses,children:[(0,a.jsx)("div",{className:n.labelClasses,children:(0,a.jsx)(i.default,{text:s.channelsLabel})}),null==e?void 0:e.results.map((e=>(0,a.jsxs)(o.N_,{to:f(e.path),className:n.containerClasses,children:[(0,a.jsx)("div",{className:n.thumbnailClasses,children:(0,a.jsx)(d.default,{src:`${e.image}?width=500`,alt:`thumbnail of ${e.name}`,className:n.thumbnailClasses,loading:"lazy",decoding:"async"})}),(0,a.jsxs)("div",{className:n.textContainerClasses,children:[(0,a.jsx)("h4",{className:n.headerClasses||"mb-2 text-xl",children:e.name}),e.about&&(0,a.jsx)("p",{className:n.textClasses||"mb-2",children:e.about.replace(/(<([^>]+)>)/gi,"")}),(0,a.jsx)(o.N_,{to:f(e.path),className:t.anchorClasses,style:{alignSelf:"start"},children:(0,a.jsx)(i.default,{text:t.content,className:t.textClasses})})]})]},e.id))),(null==e?void 0:e.totalCount)>(null==(b=null==e?void 0:e.results)?void 0:b.length)&&(0,a.jsxs)("button",{type:"button",onClick:()=>{m();const e=document.documentElement.scrollTop;setTimeout((()=>{window.scroll({top:e,behavior:"smooth"})}),0)},className:r.className,style:{alignSelf:"flex-start"},children:[(0,a.jsx)(i.default,{text:r.channelText}),(0,a.jsx)(l.default,{icon:["fa","plus"],className:"ml-2"})]})]}):null};p.propTypes={channelData:n().array,channelLink:n().shape({anchorClasses:n().string,content:n().oneOfType([n().string,n().object]),textClasses:n().string,
6subdirectory:n().string}),errorProps:n().shape({wrapperClasses:n().string,headerClasses:n().string,headerContent:n().oneOfType([n().string,n().object]),descriptionClasses:n().string,descriptionContent:n().oneOfType([n().string,n().object])}),labels:n().shape({allLabel:n().oneOfType([n().string,n().object]),channelsLabel:n().oneOfType([n().string,n().object]),livestreamsLabel:n().oneOfType([n().string,n().object]),videosLabel:n().oneOfType([n().string,n().object])}),loadMore:n().shape({className:n().string,channelText:n().oneOfType([n().string,n().object]),videoText:n().oneOfType([n().string,n().object]),livestreamText:n().oneOfType([n().string,n().object])}),searchCategory:n().oneOfType([n().string,n().object]),loadMoreContent:n().func,showChannelSection:n().bool,channelError:n().bool,isValidating:n().bool};const m=p},31125:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(67438),i=s(29236),l=s(68841),d=s(24100),c=s(79780),u=Object.defineProperty,p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,g=(e,t,s)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,y=(e,t)=>{for(var s in t||(t={}))m.call(t,s)&&g(e,s,t[s]);if(p)for(var s of p(t))h.call(t,s)&&g(e,s,t[s]);return e};const x=({start:e,end:t,dateTimeClasses:s="flex flex-row",endedClasses:r="px-3 py-1.5 bg-primary opacity-50 text-white border-solid border-2 border-primary mt-4 rounded",liveClasses:n="px-3 py-1.5 bg-primary text-white border-solid border-2 border-primary mt-4 rounded",upcomingClasses:u="px-3 py-1.5 border-solid border-primary mt-4 rounded opacity-75"})=>{const p=new Date((0,d.u4)(e))<new Date,m=new Date((0,d.u4)(t))<new Date;return p&&!m?(0,a.jsxs)("div",{className:"flex flex-col items-start",children:[(0,a.jsxs)("div",{className:s,children:[(0,a.jsx)(i.default,{date:e}),(0,a.jsx)("span",{className:"ml-3",children:(0,a.jsx)(l.default,{date:e})})]}),(0,a.jsx)("div",{className:n,children:(0,a.jsx)(o.A,y({},c.default.liveText))})]}):(0,a.jsxs)("div",{className:"flex flex-col items-start",children:[(0,a.jsxs)("div",{className:s,children:[(0,a.jsx)(i.default,{date:e}),(0,a.jsx)("span",{className:"ml-3",children:(0,a.jsx)(l.default,{date:e})})]}),(0,a.jsx)("div",{className:u,children:(0,a.jsx)(o.A,y({},c.default.upcomingText))})]})},b=x;x.propTypes={start:n().oneOfType([n().string,n().number]),end:n().oneOfType([n().string,n().number]),dateTimeClasses:n().string,upcomingClasses:n().string,liveClasses:n().string,endedClasses:n().string}},65107:(e,t,s)=>{s.r(t),s.d(t,{default:()=>g});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(67438),i=s(79780),l=Object.defineProperty,d=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,p=(e,t,s)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,m=(e,t)=>{for(var s in t||(t={}))c.call(t,s)&&p(e,s,t[s]);if(d)for(var s of d(t))u.call(t,s)&&p(e,s,t[s]);return e};const h=({errorProps:e})=>(0,a.jsxs)("div",{className:e.wrapperClasses,children:[(0,a.jsx)("h3",{className:e.headerClasses,children:(0,a.jsx)(o.A,m({},i.default.errorHeader))}),(0,a.jsx)("p",{className:e.descriptionClasses,children:(0,a.jsx)(o.A,m({},i.default.errorDescription))})]}),g=h;h.propTypes={errorProps:n().shape({wrapperClasses:n().string,headerClasses:n().string,headerContent:n().oneOfType([n().string,n().object]),descriptionClasses:n().string,descriptionContent:n().oneOfType([n().string,n().object])})}},75322:(e,t,s)=>{s.r(t),s.d(t,{default:()=>h});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(84976),i=s(23114),l=s(15422),d=s(24712),c=s(15979),u=s(31125),p=s(65107);const m=({errorProps:e,labels:t,livestreamData:s,livestreamError:r,livestreamsHref:n,loadMore:m,searchCategory:h,showLivestreamSection:g,isValidating:y,loadMoreContent:x})=>{var b,f,v,j;return g?y&&0===(null==(b=null==s?void 0:s.results)?void 0:b.length)?(0,a.jsx)("div",{className:h.wrapperClasses,children:(0,a.jsx)(l.default,{})}):r?(0,a.jsx)(p.default,{errorProps:e}):(null==(f=null==s?void 0:s.results)?void 0:f.length)?(0,a.jsxs)("div",{className:h.wrapperClasses,children:[(0,a.jsx)("div",{className:h.labelClasses,children:(0,a.jsx)(i.default,{text:t.livestreamsLabel})}),null==(v=null==s?void 0:s.results)?void 0:v.map((e=>(0,a.jsxs)(o.N_,{to:`${n}${e.seo_string||e.id}`,className:h.containerClasses,children:[(0,a.jsx)("div",{className:h.thumbnailClasses,children:(0,a.jsx)(c.default,{src:`${e.thumbnail}?width=500`,alt:`thumbnail of ${e.name}`,className:h.thumbnailClasses,loading:"lazy",decoding:"async"})}),(0,a.jsxs)("div",{className:h.textContainerClasses,children:[(0,a.jsx)("h4",{className:h.headerClasses||"mb-2 text-xl",children:e.name}),(0,a.jsx)("p",{className:h.textClasses||"mb-2",children:e.channelName}),(0,a.jsx)(u.default,{start:e.start,end:e.end,endedText:h.endedText,liveText:h.liveText,upcomingText:h.upcomingText,dateTimeClasses:h.dateTimeClasses,upcomingClasses:h.upcomingClasses,liveClasses:h.liveClasses,endedClasse
6s:h.endedClasses})]})]},e.id))),(null==s?void 0:s.totalCount)>(null==(j=null==s?void 0:s.results)?void 0:j.length)&&(0,a.jsxs)("button",{type:"button",onClick:()=>{x();const e=document.documentElement.scrollTop;setTimeout((()=>{window.scroll({top:e,behavior:"smooth"})}),0)},className:m.className,style:{alignSelf:"flex-start"},children:[(0,a.jsx)(i.default,{text:m.livestreamText}),(0,a.jsx)(d.default,{icon:["fa","plus"],className:"ml-2"})]})]}):null:null};m.propTypes={livestreamError:n().object,errorProps:n().shape({wrapperClasses:n().string,headerClasses:n().string,headerContent:n().oneOfType([n().string,n().object]),descriptionClasses:n().string,descriptionContent:n().oneOfType([n().string,n().object])}),labels:n().shape({allLabel:n().oneOfType([n().string,n().object]),channelsLabel:n().oneOfType([n().string,n().object]),livestreamsLabel:n().oneOfType([n().string,n().object]),videosLabel:n().oneOfType([n().string,n().object])}),livestreamData:n().object,livestreamsHref:n().string,loadMore:n().shape({className:n().string,channelText:n().oneOfType([n().string,n().object]),videoText:n().oneOfType([n().string,n().object]),livestreamText:n().oneOfType([n().string,n().object])}),searchCategory:n().oneOfType([n().string,n().object]),loadMoreContent:n().func,showLivestreamSection:n().bool,isValidating:n().bool};const h=m},30834:(e,t,s)=>{s.r(t),s.d(t,{default:()=>l});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(23114);const i=({noResultsProps:e})=>(0,a.jsxs)("div",{className:e.wrapperClasses,children:[(0,a.jsx)("h3",{className:e.headerClasses,children:(0,a.jsx)(o.default,{text:e.headerContent})}),(0,a.jsx)("p",{className:e.descriptionClasses,children:(0,a.jsx)(o.default,{text:e.descriptionContent})})]}),l=i;i.propTypes={noResultsProps:n().shape({wrapperClasses:n().string,headerClasses:n().string,headerContent:n().oneOfType([n().string,n().object]),descriptionClasses:n().string,descriptionContent:n().oneOfType([n().string,n().object])})}},14393:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var a=s(74848),r=(s(96540),s(30261)),n=s(5556),o=s.n(n),i=s(23114),l=Object.defineProperty,d=Object.defineProperties,c=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,h=(e,t,s)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t)=>{for(var s in t||(t={}))p.call(t,s)&&h(e,s,t[s]);if(u)for(var s of u(t))m.call(t,s)&&h(e,s,t[s]);return e},y=(e,t)=>d(e,c(t));const x=({radioProps:e,form:t,field:s,labels:n})=>{const{headerClassName:o,headerContent:l,buttonClasses:d}=e,{allLabel:c,channelsLabel:u,livestreamsLabel:p,videosLabel:m,enableChannels:h}=n,{values:{searchCategories:x},submitForm:b}=(0,r.j7)(),f=[y(g({},c),{key:"all"}),h?y(g({},u),{key:"channels"}):null,y(g({},p),{key:"livestreams"}),y(g({},m),{key:"videos"})];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:o||"w-full pt-4 pb-6 text-lg font-medium border-t border-b-0 border-zinc-700 border-solid border-x-0",children:(0,a.jsx)(i.default,{text:l})}),(0,a.jsx)("div",{role:"group","aria-labelledby":"radio-group",className:"flex flex-row mb-2 space-x-2",children:f.map((e=>e&&(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:`${d||"bg-primary text-lg border-2 border-primary border-solid capitalize cursor-pointer hover:opacity-100 mr-1 px-2 sm:px-6 py-2.5 rounded-lg text-white duration-100"} ${x===e.key?" opacity-100":" opacity-50"}`,htmlFor:e.key,children:(0,a.jsx)(i.default,{text:e})}),(0,a.jsx)(r.D0,{type:"radio",name:"searchCategories",value:e.key,id:e.key,className:"hidden",onClick:e=>{(e=>{const a=e.target.value||"";t.setFieldValue(s.name,a),b()})(e)}})]},e.key)))})]})},b=x;x.propTypes={radioProps:o().shape({headerClassName:o().string,headerContent:o().object,buttonClasses:o().string}),labels:o().shape({allLabel:o().object,channelsLabel:o().object,livestreamsLabel:o().object,videosLabel:o().object}),form:o().any,field:o().any}},98666:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var a=s(74848),r=s(96540),n=s(30261),o=s(24712),i=s(5556),l=s.n(i),d=s(45581);const c=({isValid:e,dirty:t,field:s})=>{const{baseColor:i,BASE_COLORS:l}=(0,d.m)(),c=i===l.dark;(0,r.useEffect)((()=>{document.getElementById("SearchInput").focus()}),[]);const u=c?"w-full py-4 pl-10 pr-4 mb-3 text-lg bg-zinc-800 border border-gray-700 text-gray-100 rounded-lg focus:outline-none focus:ring-0 focus:border-primary":"w-full py-4 pl-10 pr-4 mb-3 text-lg bg-white border border-gray-300 text-gray-900 rounded-lg focus:outline-none focus:ring-0 focus:border-primary",p=c?"text-gray-400":"text-gray-600";return(0,a.jsxs)("div",{className:"relative mb-2 w-full max-w-lg",children:[(0,a.jsx)("span",{className:"flex absolute inset-y-0 left-0 items-center pr-2",children:(0,a.jsx)("button",{type:"submit",disabled:!(e&&t&&!s.Value),className:`absolute flex mb-3 inset-y-0 items-center pl-3 text-xl border-none bg-transparent outline-none ${p} ${e&&t?"cursor-pointer":"cursor-default"}`,children:(0,a.jsx)(o.default,{icon:["fa","search"]})})}),(0,a.jsx)(n.D0,{id:"SearchInput",name:"searchString",type:"search",className:u,placeholder:"Search..."})]})},u=c;c.propTypes={field:l().any,isValid:l().bool,dirty:l().bool}},80615:(e,t,s)=>{s.r(t),s.d(t,{default:()=>h});var a=s(74848),r=(s(96540),s(5556)),n=s.n(r),o=s(84976),i=s(23114),l=s(24712),d=s(15979),c=s(26840),u=s(15422),p=s(65107);const m=({errorProps:e,labels:t,loadMore:s,searchCategory:r,videoData:n,videoError:m,videosHref:h,showVideoSection:g,isValidating:y,loadMoreContent:x})=>{var b,f,v;return g?y&&!(null==n?void 0:n.results)?(0,a.jsx)("div",{className:r.wrapperClasses,children:(0,a.jsx)(u.default,{})}):m?(0,a.jsx)(p.default,{errorProps:e}):(null==(b=null==n?void 0:n.results)?void 0:b.length)>=1?(0,a.jsxs)("div",{className:r.wrapperClasses,children:[(0,a.jsx)("div",{className:r.labelClasses,children:(0,a.jsx)(i.default,{text:t.videosLabel})}),null==(f=null==n?void 0:n.results)?void 0:f.map((e=>(0,a.jsxs)(o.N_,{to:`${h}${e.seo_string||e.id}`,className:r.containerClasses,children:[(0,a.jsxs)("div",{className:r.thumbnailClasses,children:[(0,a.jsx)(d.default,{src:`${e.thumbnail}?width=500`,alt:`thumbnail of ${e.name}`,className:r.thumbnailClasses}),(0,a.jsx)("div",{className:r.videoDurationClasses,children:e.duration})]}),(0,a.jsxs)("div",{className:r.textContainerClasses,children:[(0,a.jsx)("h4",{className:r.headerClasses||"mb-2 text-xl",children:e.name}),(0,a.jsx)("p",{className:r.textClasses||"mb-2",children:e.channel_name.replace(/(<([^>]+)>)/gi,"")}
6),(0,a.jsx)(c.default,{date:e.publish_date||e.created_at,short:!0,time:!1,showYear:r.showYear})]})]},e.id))),(null==n?void 0:n.totalCount)>(null==(v=null==n?void 0:n.results)?void 0:v.length)&&(0,a.jsxs)("button",{type:"button",onClick:()=>{x();const e=document.documentElement.scrollTop;setTimeout((()=>{window.scroll({top:e,behavior:"smooth"})}),0)},className:s.className,style:{alignSelf:"flex-start"},children:[(0,a.jsx)(i.default,{text:s.videoText}),(0,a.jsx)(l.default,{icon:["fa","plus"],className:"ml-2"})]})]}):null:null};m.propTypes={videoError:n().bool,errorProps:n().shape({wrapperClasses:n().string,headerClasses:n().string,headerContent:n().oneOfType([n().string,n().object]),descriptionClasses:n().string,descriptionContent:n().oneOfType([n().string,n().object])}),labels:n().shape({allLabel:n().oneOfType([n().string,n().object]),channelsLabel:n().oneOfType([n().string,n().object]),livestreamsLabel:n().oneOfType([n().string,n().object]),videosLabel:n().oneOfType([n().string,n().object])}),loadMore:n().shape({className:n().string,channelText:n().oneOfType([n().string,n().object]),videoText:n().oneOfType([n().string,n().object]),livestreamText:n().oneOfType([n().string,n().object])}),searchCategory:n().oneOfType([n().string,n().object]),loadMoreContent:n().func,showVideoSection:n().bool,videoData:n().object,videosHref:n().string,isValidating:n().bool};const h=m},9174:(e,t,s)=>{s.r(t),s.d(t,{SearchPage:()=>T,default:()=>w});var a=s(74848),r=s(96540),n=s(30261),o=s(16683),i=s(84976),l=s(47767),d=s(1081),c=s(5556),u=s.n(c),p=s(23114),m=s(17386),h=s(14727),g=s(43018),y=s(72748),x=s(41419),b=s(75322),f=s(80615),v=s(14393),j=s(98666),C=s(30834),S=(e,t,s)=>new Promise(((a,r)=>{var n=e=>{try{i(s.next(e))}catch(e){r(e)}},o=e=>{try{i(s.throw(e))}catch(e){r(e)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(n,o);i((s=s.apply(e,t)).next())}));const A=(0,d.j8)({theme:(0,m.makeSelectTheme)(),platform:(0,m.makeSelectPlatform)()});function T({wrapperClasses:e="w-full my-0 pt-20 pb-4 mb-auto",containerClasses:t="py-10 text-gray-900 bg-transparent mx-5% sm:my-6 sm:rounded-lg",title:s={content:"Search",classes:"my-3 text-4xl font-medium"},description:d={content:"Find channels, livestreams & videos",classes:"mb-3 text-lg"},radioProps:c={headerClassName:"w-full pt-4 pb-6 text-lg font-medium border-t border-b-0 border-zinc-700 border-solid border-x-0",headerContent:"I'm looking for...",buttonClasses:"bg-primary text-lg border-2 border-primary border-solid capitalize cursor-pointer hover:opacity-100 mr-1 px-2 sm:px-6 py-2.5 rounded-lg text-white duration-100"},labels:u={enableChannels:!0,allLabel:{en:"all"},channelsLabel:{en:"channels"},livestreamsLabel:{en:"livestreams"},videosLabel:{en:"videos"}},noResultsProps:m={wrapperClasses:"w-full pt-6 mt-4 border-t border-b-0 border-zinc-700 border-solid border-x-0",headerClasses:"font-medium",headerContent:"Your search did not yield any results",descriptionClasses:"",descriptionContent:"Try searching for something else"},errorProps:T={wrapperClasses:"w-full pt-4 mt-4 border-t border-b-0 border-zinc-700 border-solid border-x-0",headerClasses:"font-medium",descriptionClasses:""},channelLink:w={anchorClasses:"bg-primary text-white border-2 border-primary border-solid cursor-pointer hover:text-white hover:opacity-100 mr-1 px-6 py-2.5 duration-100 rounded-lg opacity-50",textClasses:"hover:opacity-100",content:"Go to channel",subdirectory:"/channel"},loadMore:E={className:"p-4 text-lg duration-100 border-none cursor-pointer bg-inherit hover:text-primary hover:underline outline-inherit text-primary",channelText:"Load more channels",videoText:"Load more videos",livestreamText:"Load more Livestreams"},searchCategory:_={wrapperClasses:"flex flex-col w-full pt-4 mt-4 border-t border-b-0 border-zinc-700 border-solid border-x-0",labelClasses:"pt-1 pb-3 text-2xl font-medium capitalize",containerClasses:"relative flex flex-col p-4 m-2 my-1 duration-300 rounded-lg cursor-pointer sm:flex-row hover:bg-gray-100 text-inherit hover:text-inherit group-hover:-translate-y-1 hover:-translate-y-1",textContainerClasses:"flex flex-col justify-start mt-2 sm:ml-4 text-inherit hover:text-inherit",headerClasses:"",textClasses:"mb-2 line-clamp-2 sm:line-clamp-none",thumbnailClasses:"object-cover mb-2 rounded-lg h-44 w-72 sm:mb-auto relative group",dateTimeClasses:"flex flex-row",upcomingClasses:"px-3 py-1.5 bg-primary opacity-50 text-white border-solid border-2 border-primary mt-4 rounded",liveClasses:"px-3 py-1.5 bg-primary text-white border-solid border-2 border-primary mt-4 rounded",endedClasse
6s:"px-3 py-1.5 border-solid border-primary mt-4 rounded opacity-50",videoDurationClasses:"absolute right-0 px-1 py-0.5 rounded-md text-white bg-black bottom-2 mr-1",showYear:!1},initialResults:O=2,specificCategoryResults:N=10,iterationResults:P=20}){const[V]=(0,i.ok)(),I=(0,l.zy)(),R=(0,l.Zp)(),k=V.get("q"),D=V.get("cat"),L=k||null,$=D||null,[U,H]=(0,r.useState)(O),{platform:M,theme:{contentHref:{livestreams:F,videos:B}}}=(0,o.d4)(A);(0,r.useEffect)((()=>{document.getElementById("SearchInput").focus()}),[]);const{data:z,error:G,isValidating:Y,mutate:J}=(0,g.f)({query:null===L||"all"!==$&&"videos"!==$?null:L,limit:$&&"all"!==$?N:O,contentTypes:"video"}),{data:q,error:K,isValidating:W,mutate:X}=(0,g.f)({query:null===L||"all"!==$&&"livestreams"!==$?null:L,limit:$&&"all"!==$?N:O,contentTypes:"stream"}),{data:Z,error:Q,isValidating:ee,mutate:te}=(0,g.f)({query:null===L||"all"!==$&&"channels"!==$?null:L,limit:$&&"all"!==$?N:O,contentTypes:"channel"});(0,r.useEffect)((()=>{null!==L&&(0,h.track)("SearchQuery",{props:{query:L,category:$}})}),[L,$]);const se=u.enableChannels&&("all"===$||"channels"===$),ae="all"===$||"livestreams"===$,re="all"===$||"videos"===$,ne=e=>S(this,null,(function*(){const t=Number(U)+Number(P);let s;"videos"===e?(s=yield(0,y.GO)(`platforms/${M.uid}/search?query=${L}&page=1&limit=${t}&content_type=video`),J({results:[...s.message],totalCount:s.data.objects,totalPages:s.data.totalPages},!1)):"livestreams"===e?(s=yield(0,y.GO)(`/platforms/${M.uid}/search?query=${L}&page=1&limit=${t}&content_type=stream`),X({results:[...s.message],totalCount:s.data.objects,totalPages:s.data.totalPages},!1)):"channels"===e&&(s=yield(0,y.GO)(`/platforms/${M.uid}/search?query=${L}&page=1&limit=${t}&content_type=channel`),te({results:[...s.message],totalCount:s.data.objects,totalPages:s.data.totalPages},!1)),H(t)}));return(0,a.jsx)("div",{className:e,children:(0,a.jsxs)("div",{className:t,children:[s&&(0,a.jsx)("h1",{className:s.classes,children:(0,a.jsx)(p.default,{text:s.content})}),d&&(0,a.jsx)("p",{className:d.classes,children:(0,a.jsx)(p.default,{text:d.content})}),(0,a.jsx)(n.l1,{initialValues:{searchString:L||"",searchCategories:$||"all"},onSubmit:e=>{switch(e.searchCategories){case"channels":case"livestreams":case"videos":H(N);break;default:H(O)}R({pathname:I.pathname,search:`?q=${e.searchString}&cat=${e.searchCategories}`})},enableReinitialize:!0,children:({isValid:e,dirty:t})=>{var s,r,o,i,l,d;return(0,a.jsxs)(n.lV,{className:"flex flex-col items-start",children:[(0,a.jsx)(n.D0,{name:"searchString",component:j.default,dirty:t,isValid:e}),(0,a.jsx)(n.D0,{name:"searchCategories",component:v.default,radioProps:c,labels:u}),null!==L&&(!(null==(s=null==Z?void 0:Z.results)?void 0:s.length)&&!(null==(r=null==q?void 0:q.results)?void 0:r.length)&&0===(null==(o=null==z?void 0:z.results)?void 0:o.length)&&"all"===$||"channels"===$&&!(null==(i=null==Z?void 0:Z.results)?void 0:i.length)&&!ee||"livestreams"===$&&!(null==(l=null==q?void 0:q.results)?void 0:l.length)&&!W||"videos"===$&&0===(null==(d=null==z?void 0:z.results)?void 0:d.length)&&!Y)&&(0,a.jsx)(C.default,{noResultsProps:m})]})}}),(0,a.jsx)(x.default,{channelData:Z,channelLink:w,labels:u,loadMore:E,searchCategory:_,showChannelSection:se,loadMoreContent:()=>ne("channels"),channelError:Q,errorProps:T,isValidating:ee}),(0,a.jsx)(b.default,{errorProps:T,labels:u,livestreamData:q,livestreamError:K,livestreamsHref:F,loadM
6ore:E,searchCategory:_,showLivestreamSection:ae,isValidating:W,loadMoreContent:()=>ne("livestreams")}),(0,a.jsx)(f.default,{errorProps:T,labels:u,loadMore:E,searchCategory:_,showVideoSection:re,videoData:z,videoError:G,videosHref:B,isValidating:Y,loadMoreContent:()=>ne("videos")})]})})}const w=T;T.propTypes={wrapperClasses:u().string,containerClasses:u().string,title:u().shape({content:u().oneOfType([u().string,u().object]),classes:u().string}),description:u().shape({content:u().oneOfType([u().string,u().object]),classes:u().string}),radioProps:u().shape({headerClassName:u().string,headerContent:u().oneOfType([u().string,u().object]),buttonClasses:u().string}),labels:u().shape({allLabel:u().object,channelsLabel:u().object,livestreamsLabel:u().object,videosLabel:u().object}),noResultsProps:u().shape({wrapperClasses:u().string,headerClasses:u().string,headerContent:u().oneOfType([u().string,u().object]),descriptionClasses:u().string,descriptionContent:u().oneOfType([u().string,u().object])}),errorProps:u().shape({wrapperClasses:u().string,headerClasses:u().string,headerContent:u().oneOfType([u().string,u().object]),descriptionClasses:u().string,descriptionContent:u().oneOfType([u().string,u().object])}),channelLink:u().shape({anchorClasses:u().string,textClasses:u().string,content:u().oneOfType([u().string,u().object]),subdirectory:u().string}),loadMore:u().shape({className:u().string,channelText:u().oneOfType([u().string,u().object]),videoText:u().oneOfType([u().string,u().object]),livestreamText:u().oneOfType([u().string,u().object])}),searchCategory:u().shape({wrapperClasses:u().string,labelClasses:u().string,containerClasses:u().string,textContainerClasses:u().string,headerClasses:u().string,textClasses:u().string,thumbnailClasses:u().string,dateTimeClasses:u().string,endedClasses:u().string,liveClasses:u().string,upcomingClasses:u().string,videoDurationClasses:u().string,showYear:u().bool}),initialResults:u().number,specificCategoryResults:u().number,iterationResults:u().number}},79780:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.SearchPage",n=(0,a.YK)({upcomingText:{id:`${r}.upcomingText`,defaultMessage:"UPCOMING"},liveText:{id:`${r}.liveText`,defaultMessage:"LIVE"},errorHeader:{id:`${r}.errorHeader`,defaultMessage:"Oops, something went wrong with your search"},errorDescription:{id:`${r}.errorDescription`,defaultMessage:"Try searching for something else"}})},96557:(e,t,s)=>{s.r(t),s.d(t,{SignupCompletePage:()=>I,default:()=>R});var a=s(74848),r=s(96540),n=s(67438),o=s(16683),i=s(1081),l=s(47767),d=s(60799),c=s(15422),u=s(45523),p=s(17386),m=s(82520),h=s(78210),g=s(45581),y=s(56352),x=s(72748),b=s(49087),f=s(85861),v=Object.defineProperty,j=Object.defineProperties,C=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,w=(e,t,s)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,E=(e,t)=>{for(var s in t||(t={}))A.call(t,s)&&w(e,s,t[s]);if(S)for(var s of S(t))T.call(t,s)&&w(e,s,t[s]);return e},_=(e,t)=>j(e,C(t)),O=(e,t,s)=>new Promise(((a,r)=>{var n=e=>{try{i(s.next(e))}catch(e){r(e)}},o=e=>{try{i(s.throw(e))}catch(e){r(e)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(n,o);i((s=s.apply(e,t)).next())}));const N=(0,i.j8)({platform:(0,p.makeSelectPlatform)(),theme:(0,p.makeSelectTheme)()}),P=(e,t)=>{var s,a;if("CHECKBOX"===e.input_type){const r=null==(a=null==(s=e.options)?void 0:s[0])?void 0:a.id;return t&&r?r:null}return"SELECT"===e.input_type&&""===t?null:t},V=e=>{const t=new URLSearchParams(e).get("returnTo")||"/";return t.startsWith("/")&&!t.startsWith("//")?t:"/"};function I(){const{platform:e,theme:t}=(0,o.d4)(N),{user:s,isAuthenticated:i,isLoading:p}=(0,h.Jd)(),{baseColor:v,BASE_COLORS:j}=(0,g.m)(),C=v===j.dark,S=(0,l.Zp)(),A=(0,l.zy)(),T=V(A.search),{data:w,error:I,isValidating:R,mutate:k}=(0,y.n)(),[D,L]=(0,r.useState)({}),[$,U]=(0,r.useState)(!1),H=(0,b.ID)(s),M=null==w?void 0:w.filter((e=>null===e.answer||!1===e.answered)),F=(null==M?void 0:M.filter((e=>1===e.is_required)))||[],B=F.every((e=>{const t=D[e.attribute_uid];return"CHECKBOX"===e.input_type?!0===t:null!=t&&""!==t})),z=F.some((e=>"SIGNUP"===e.when_to_collect)),G=(0,r.useRef)(!1),Y=()=>{G.current||(G.current=!0,(0,b.U$)(),S(T,{replace:!0}))};(0,r.useEffect)((()=>{p||(!i||I&&!w?S(T,{replace:!0}):w&&(H||z?0===M.length&&Y():S(T,{replace:!0})))}),[p,i,I,H,w,null==M?void 0:M.length,z]);const J=t=>O(this,null,(function*(){try{U(!0),t.length>0&&(yield(0,x.hr)(`platforms/${e.uid}/user-attributes/answers`,{answers:t}),yield k()),Y()}catch(e){console.error(e),d.Ay.error((0,a.jsx)(n.A,E({},f.default.saveError)))}finally{U(!1)}}));return p||!M||R&&!w?(0,a.jsx)("div",{className:"flex items-center justify-center min-h-[60vh]",children:(0,a.jsx)(c.default,{})}):(0,a.jsx)("div",{className:"flex flex-col items-center pt-50% sm:pt-10% min-h-[1000px]",children:(0,a.jsx)("div",{className:"max-w-2xl w-full px-6",children:(0,a.jsxs)("div",{className:m.defaultLoginClasses.wrapper,children:[(0,a.jsx)("h1",{className:m.defaultLoginClasses.title,children:(0,a.jsx)(n.A,E({},f.default.title))}),(0,a.jsx)("p",{className:m.defaultLoginClasses.subtitle,children:(0,a.jsx)(n.A,_(E({},f.default.subtitle),{values:{platform:t.platform.name}}))}),(0,a.jsx)(u.default,{attributes:M,labelClasses:m.defaultLoginClasses.signup.checkboxLabel,isDarkTheme:C,values:D,onChange:L,"data-testid":`user-attributes-${b.vS}`}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("button",{type:"submit",className:"text-center rounded-md cursor-pointer disabled:opacity-50 bg-primary text-white font-medium py-4 px-6 text-xl border border-primary hover:bg-primaryDarker transition-all duration-300",onClick:()=>J(Object.entries(D).map((([e,t])=>{const s=M.find((t=>t.attribute_uid===e));return s?{attribute_id:s.id,answer:P(s,t)}:null}
6)).filter(Boolean)),disabled:!B||$,"data-testid":"signup-complete-finish",children:(0,a.jsx)(n.A,E({},f.default.finish))}),0===F.length&&(0,a.jsx)("button",{type:"button",className:"font-medium bg-transparent border-none cursor-pointer hover:underline text-md text-primaryText",onClick:()=>J(M.map((e=>({attribute_id:e.id,answer:"CHECKBOX"===e.input_type||"SELECT"===e.input_type?null:""})))),disabled:$,"data-testid":"signup-complete-skip",children:(0,a.jsx)(n.A,E({},f.default.skipForNow))})]})]})})})}const R=I},85861:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.SignupCompletePage",n=(0,a.YK)({title:{id:`${r}.title`,defaultMessage:"Your account is ready"},subtitle:{id:`${r}.subtitle`,defaultMessage:"One last step before you dive into {platform}: tell us a little about yourself."},finish:{id:`${r}.finish`,defaultMessage:"Finish"},skipForNow:{id:`${r}.skipForNow`,defaultMessage:"Skip for now"},saveError:{id:`${r}.saveError`,defaultMessage:"Failed to save your answers, please try again"}})},472:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});const a=(0,s(40313).A)((()=>Promise.all([s.e(6146),s.e(5134),s.e(7115),s.e(8620),s.e(508),s.e(6032),s.e(7774),s.e(3049),s.e(1268),s.e(45),s.e(644),s.e(4899),s.e(2009),s.e(8117),s.e(8740),s.e(2116),s.e(9374),s.e(6486),s.e(6076),s.e(9761),s.e(1326),s.e(4622),s.e(628)]).then(s.bind(s,54638))))},32909:(e,t,s)=>{s.r(t),s.d(t,{checkVoucherAction:()=>l,checkVoucherErrorAction:()=>c,checkVoucherSuccessAction:()=>d,startSubscriptionAction:()=>r,startSubscriptionErrorAction:()=>o,startSubscriptionSuccessAction:()=>n,updateVoucherAction:()=>i});var a=s(97503);function r(e){return{type:a.START_SUBSCRIPTION,payload:e}}function n(e){return{type:a.START_SUBSCRIPTION_SUCCESS,payload:e}}function o(e){return{type:a.START_SUBSCRIPTION_ERROR,payload:e}}function i(e){return{type:a.UPDATE_VOUCHER,payload:e}}function l(e){return{type:a.CHECK_VOUCHER,payload:e}}function d(e){return{type:a.CHECK_VOUCHER_SUCCESS,payload:e}}function c(){return{type:a.CHECK_VOUCHER_ERROR}}},97503:(e,t,s)=>{s.r(t),s.d(t,{CHECK_VOUCHER:()=>i,CHECK_VOUCHER_ERROR:()=>d,CHECK_VOUCHER_SUCCESS:()=>l,START_SUBSCRIPTION:()=>a,START_SUBSCRIPTION_ERROR:()=>n,START_SUBSCRIPTION_SUCCESS:()=>r,UPDATE_VOUCHER:()=>o});const a="app/SubscriptionForm/START_SUBSCRIPTION",r="app/SubscriptionForm/START_SUBSCRIPTION_SUCCESS",n="app/SubscriptionForm/START_SUBSCRIPTION_ERROR",o="app/SubscriptionForm/UPDATE_VOUCHER",i="app/SubscriptionForm/CHECK_VOUCHER",l="app/SubscriptionForm/CHECK_VOUCHER_SUCCESS",d="app/SubscriptionForm/CHECK_VOUCHER_ERROR"},54638:(e,t,s)=>{s.r(t),s.d(t,{SubscriptionForm:()=>G,default:()=>W});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(67438),d=s(1081),c=s(82960),u=s(21535),p=s(40260),m=s(74980),h=s(23615),g=s(55969),y=s(14294),x=s(6957),b=s(89736),f=s(12870),v=s(35907),j=s(64011),C=s(68074),S=s(1802),A=s(47494),T=s(54766),w=s(20932),E=s(82903),_=s(17386),O=s(86663),N=s(51058),P=s(23844),V=s(32909),I=s(87186),R=s(35664),k=s(16268),D=Object.defineProperty,L=Object.defineProperties,$=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,F=(e,t,s)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,B=(e,t)=>{for(var s in t||(t={}))H.call(t,s)&&F(e,s,t[s]);if(U)for(var s of U(t))M.call(t,s)&&F(e,s,t[s]);return e},z=(e,t)=>L(e,$(t));class G extends r.PureComponent{constructor(){var e,t;super(...arguments),e="state",t={setupNewCard:null,toggleVoucher:void 0!==O.parse(window.location.search).voucher},F(this,e+"",t)}componentDidMount(){void 0!==O.parse(window.location.search).voucher&&this.props.checkVoucher({voucher:O.parse(window.location.search).voucher,subscription:this.props.subscription.id})}render(){const{loading:e,error:t,success:s,voucher:r,furtherActionsNeeded:n}=this.props.subscriptionForm;(0,u.R)("[[SubscriptionForm]]","isMounted:",this.props);const{subscription:o,user:i,label:d,links:c,button:p,text:m,input:E,termsAndConditions:_,onSuccess:O,updateVoucher:P,successStatus:V,embed:I,showLogotype:R=!0}=this.props;return i.token?e||!i.email?(0,a.jsx)(j.default,{}):(this.props.successCallback&&s&&this.props.successCallback(),(0,a.jsxs)(h.A,{children:[(0,a.jsxs)(h.A.Row,{style:{padding:"10px 0 0 0"},children:[R&&(0,a.jsx)(h.A.Column,{width:3,verticalAlign:"middle",only:"tablet
6computer",children:(0,a.jsx)(g.A,{size:"tiny",inline:!0,src:`https://image.staylive.se/subscriptions/${o.id}.png`})}),(0,a.jsx)(h.A.Column,{textAlign:"left",verticalAlign:"middle",mobile:16,tablet:11,computer:11,children:(0,a.jsxs)(C.default,{style:B({},d.style),as:"h5",children:[o.name,(0,a.jsx)(y.A.Subheader,{children:(0,a.jsxs)(x.A,{style:{marginLeft:0},children:[(0,a.jsxs)("span",{style:{display:"inline-block"},children:[o.price," ",o.currency.toUpperCase()," / "]}),"Â ",(0,a.jsx)("span",{style:{textTransform:"lowercase"},children:(0,a.jsx)(N.default,{billingInterval:o.billing_interval,billingIntervalCount:o.billing_interval_count})}),(0,a.jsx)(x.A.Detail,{style:{display:"inline-block"},children:(0,a.jsx)(l.A,B({},k.default.automaticRenewal))})]})})]})})]}),(0,a.jsx)(h.A.Row,{children:(0,a.jsx)(h.A.Column,{children:(0,a.jsx)(C.default,{as:"p",style:B({},m.style),text:o.description})})}),(0,a.jsx)(h.A.Row,{children:(0,a.jsxs)(h.A.Column,{children:[!o.subscribed&&!s&&(this.state.setupNewCard||!o.existingCustomer.exists||n.payment_intent)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(T.default,{loading:e,error:t,links:c,button:p,paymentIntent:n.payment_intent,label:d,text:m,input:E,onSuccess:O,success:V,voucher:{available:!0,validVoucher:{status:r.status,days:r.days,priceReduction:r.priceReduction},loading:r.loading,value:r.value,checkVoucher:e=>this.props.checkVoucher({voucher:e,subscription:o.id})},updateVoucher:e=>P(e),price:o.price,billingInterval:o.billing_interval,billingIntervalCount:o.billing_interval_count,currency:o.currency,setupIntent:o.setupIntent.intent,renewal:!0,onSubmit:({requestPayload:e})=>this.props.startSubscription({paymentToken:e,id:o.id,embed:I})}),(0,a.jsx)("div",{role:"button",tabIndex:-1,onKeyPress:this.props.signOut,onClick:this.props.signOut,style:B({cursor:"pointer",textDecoration:"underline",margin:"10px auto 0 auto",textAlign:"center"},m.style),children:(0,a.jsxs)(C.default,{children:[i.email,(0,a.jsx)("br",{}),(0,a.jsx)(l.A,B({},A.default.signInWithDifferentAccount))]})})]})," ",o.existingCustomer.exists&&!o.subscribed&&(!s||o.subscribed)&&!this.state.setupNewCard&&!n.actions_required&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{style:B({},m.style),children:[(0,a.jsx)(C.default,{children:(0,a.jsx)(l.A,B({},k.default.savedCardInformation))}),(0,a.jsx)(w.default,{showActions:!1,data:o.existingCustomer.card})]}),(0,a.jsxs)(h.A,{doubling:!0,stackable:!0,style:{marginTop:"12px"},children:[!this.state.toggleVoucher&&(0,a.jsx)(h.A.Row,{children:(0,a.jsx)(h.A.Column,{textAlign:"left",children:(0,a.jsx)("div",{onClick:()=>this.setState({toggleVoucher:!0}),tabIndex:-1,role:"button",onKeyDown:()=>this.setState({toggleVoucher:!0}),style:B({textAlign:"right",marginTop:"6px",cursor:"pointer"},m.style),children:(0,a.jsx)(C.default,{children:(0,a.jsx)(l.A,B({},A.default.iHaveAVoucher))})})})}),this.state.toggleVoucher&&(0,a.jsx)(h.A.Row,{columns:1,children:(0,a.jsx)(h.A.Column,{width:16,textAlign:"left",style:{margin:"6px auto",padding:0},children:(0,a.jsxs)("div",{style:B({textAlign:"left",marginTop:"6px"},m.style),children:[(0,a.jsx)("label",{htmlFor:"voucher",style:B({fontWeight:"700"},d.style),children:(0,a.jsx)(l.A,B({},A.default.voucher))}),(0,a.jsx)(b.A.Input,{value:r.value,id:"voucher",fluid:!0,onChange:(e,{value:t})=>P(t),action:{content:(0,a.jsx)(l.A,B({},A.default.addVoucher)),loading:r.loading,type:"button",basic:!0,onClick:()=>this.props.checkVoucher({voucher:r.value,subscription:o.id})}}),null!==r.status&&(0,a.jsxs)("div",{children:[!1===r.status&&(0,a.jsx)(C.default,{children:(0,a.jsx)(l.A,B({},A.default.voucherNotValidOrNotFound))}),r.status&&r.days&&(0,a.jsx)(C.default,{children:(0,a.jsx)(l.A,z(B({},A.default.validVoucherDays),{values:{days:r.days}}))}),r.status&&r.priceReduction&&(0,a.jsx)(C.default,{children:(0,a.jsx)(l.A,z(B({},A.default.validVoucherPriceReduction),{values:{days:r.priceReduction}}))})]})]})})}),(0,a.jsxs)(h.A.Row,{columns:2,verticalAlign:"middle",children:[(0,a.jsx)(h.A.Column,{children:(0,a.jsx)(f.A,{style:z(B({},p.style),{width:"100%"}),disabled:e,loading:e,onClick:()=>this.props.startSubscription({paymentToken:" ",id:o.id}),children:(0,a.jsx)(l.A,B({},k.default.useExistingCard))})}),(0,a.jsx)(h.A.Column,{children:(0,a.jsx)(f.A,{style:z(B({}
6,p.style),{background:"transparent",border:"2px solid black",color:"black",width:"100%"}),disabled:e,onClick:()=>this.setState({setupNewCard:!0}),children:(0,a.jsx)(l.A,B({},k.default.setupNewCard))})})]})]})]}),(o.subscribed||s)&&(0,a.jsxs)("div",{style:{margin:"0 auto",textAlign:"center"},children:[(0,a.jsx)(y.A,{children:(0,a.jsx)(l.A,B({},k.default.alreadySubscribed))}),(0,a.jsxs)(f.A,{icon:!0,labelPosition:"left",href:"/account",target:"_blank",style:B({textTransform:"uppercase"},m.style),children:[(0,a.jsx)(v.A,{name:"external"}),(0,a.jsx)("strong",{children:(0,a.jsx)(l.A,B({},k.default.manageSubscription))})]}),(0,a.jsx)("br",{}),(0,a.jsx)("div",{role:"button",tabIndex:-1,onKeyPress:this.props.signOut,onClick:this.props.signOut,style:{cursor:"pointer",textDecoration:"underline",marginTop:"10px"},children:(0,a.jsxs)(C.default,{children:[i.email,(0,a.jsx)("br",{}),(0,a.jsx)(l.A,B({},A.default.signInWithDifferentAccount))]})})]})]})})]})):(0,a.jsx)(S.default,{label:d,links:c,termsAndConditions:_,button:p,text:m})}}G.propTypes={dispatch:o().func.isRequired,subscription:o().object.isRequired,onSuccess:o().func,signOut:o().func,updateVoucher:o().func,user:o().object,label:o().object,links:o().object,button:o().object,text:o().object,input:o().object,startSubscription:o().func,successCallback:o().func,subscriptionForm:o().object,success:o().bool,showLogotype:o().bool,successStatus:o().object,termsAndConditions:o().string,checkVoucher:o().func};const Y=(0,d.j8)({subscriptionForm:(0,P.default)(),user:(0,_.makeSelectUser)()}),J=(0,i.Ng)(Y,(function(e){return{dispatch:e,signOut:()=>e((0,E.signOutAction)()),startSubscription:t=>e((0,V.startSubscriptionAction)(t)),updateVoucher:t=>e((0,V.updateVoucherAction)(t)),checkVoucher:t=>e((0,V.checkVoucherAction)(t))}})),q=(0,m.A)({key:"subscriptionForm",reducer:I.default}),K=(0,p.A)({key:"subscriptionForm",saga:R.default}),W=(0,c.Zz)(q,K,J)(G)},16268:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.SubscriptionForm",n=(0,a.YK)({automaticRenewal:{id:`${r}.automaticRenewal`,defaultMessage:"Automatic renewal"},alreadySubscribed:{id:`${r}.alreadySubscribed`,defaultMessage:"You are subscribed."},manageSubscription:{id:`${r}.manageSubscription`,defaultMessage:"Manage your subscription"},useExistingCard:{id:`${r}.useExistingCard`,defaultMessage:"Subscribe using existing card"},setupNewCard:{id:`${r}.setupNewCard`,defaultMessage:"Setup a new card"},savedCardInformation:{id:`${r}.savedCardInformation`,defaultMessage:"You have a saved card from a previous subscription. Do you want to use it, or setup a new card for your account?"}})},87186:(e,t,s)=>{s.r(t),s.d(t,{default:()=>i,initialState:()=>o});var a=s(64852),r=s(86663),n=s(97503);const o={loading:!1,error:null,success:!1,voucher:{value:r.parse(window.location.search).voucher||"",status:null,days:null,priceReduction:null,loading:!1},furtherActionsNeeded:{actions_required:!1,payment_intent:""}},i=(e=o,t)=>(0,a.Ay)(e,(e=>{switch(t.type){case n.START_SUBSCRIPTION:e.loading=!0,e.error=null;break;case n.START_SUBSCRIPTION_SUCCESS:e.loading=!1,e.furtherActionsNeeded=t.payload.message.further_actions_needed,e.error=null,e.success=!t.payload.message.further_actions_needed.actions_required;break;case n.START_SUBSCRIPTION_ERROR:e.loading=!1,e.error=t.payload,e.success=!1;break;case n.UPDATE_VOUCHER:e.voucher.value=t.payload;break;case n.CHECK_VOUCHER:e.voucher.status=null,e.voucher.days=null,e.voucher.priceReduction=null,e.voucher.loading=!0;break;case n.CHECK_VOUCHER_SUCCESS:e.voucher.status=!0,e.voucher.days=t.payload.data.days||null,e.voucher.priceReduction=t.payload.data.priceReduction||null,e.voucher.loading=!1;break;case n.CHECK_VOUCHER_ERROR:e.voucher.status=!1,e.voucher.days=null,e.voucher.priceReduction=null,e.voucher.loading=!1}}))},35664:(e,t,s)=>{s.r(t),s.d(t,{checkVoucher:()=>m,default:()=>h,startSubscription:()=>p});var a=s(43786),r=s(32689),n=s(30727),o=s(72748),i=s(21535),l=s(86663),d=s(32909),c=s(23844),u=s(97503);function*p(e){try{(0,i.R)("[[SubscriptionSaga]]","startSubscription",e);const{id:t,paymentToken:s}=e.payload,u=`${r.DEFAULT_STAYLIVE_API}subscription/${t}`,p=yield(0,a.T1)(n.k0),{voucher:m}=yield(0,a.Lt)((0,c.default)()),{embed:h}=l.parse(window.location.search);if((0,i.R)("[[SubscriptionSaga]]","embed code is: ",h),!t||!p||!s)throw(0,i.R)("[[SubscriptionSaga]]","id or token not provided"),new Error("id or token not provided");const g=yield(0,a.T1)(o.Ay,u,{method:"POST",body:JSON.stringify({token:s,embed:e.payload.embed||h,voucher:m.value}),headers:{Authorization:`Bearer ${p}`,"Content-Type":"application/json"}});(0,i.R)("[[SubscriptionSaga]]","subscription started",g),yield(0,a.yJ)((0,d.startSubscriptionSuccessAction)(g))}catch(e){(0,i.R)("[[SubscriptionSaga]]","error",e),yield(0,a.yJ)((0,d.startSubscriptionErrorAction)(e))}}function*m(e){try{const{voucher:t,subscription:s}=e.payload,l=`${r.DEFAULT_STAYLIVE_API}check/coupon/${s}`,c=yield(0,a.T1)(n.k0),u=yield(0,a.T1)(o.Ay,l,{method:"POST",body:JSON.stringify({voucher:t}),headers:{"Content-Type":"application/json",Authorization:`Bearer ${c}`}});(0,i.R)("[[SubscriptionSaga]]","subscription started",u),yield(0,a.yJ)((0,d.checkVoucherSuccessAction)(u))}catch(e){yield(0,a.yJ)((0,d.checkVoucherErrorAction)())}}
6function*h(){yield(0,a.p8)(u.START_SUBSCRIPTION,p),yield(0,a.p8)(u.CHECK_VOUCHER,m)}},23844:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectSubscriptionFormDomain:()=>n});var a=s(1081),r=s(87186);const n=e=>e.subscriptionForm||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},11243:(e,t,s)=>{s.r(t),s.d(t,{contentClickAction:()=>i,getVideosAction:()=>r,getVideosErrorAction:()=>o,getVideosSuccessAction:()=>n});var a=s(82789);function r(e){return{type:a.GET_VIDEOS,payload:e}}function n(e){return{type:a.GET_VIDEOS_SUCCESS,payload:e}}function o(e){return{type:a.GET_VIDEOS_ERROR,payload:e}}function i(e){return{type:a.CONTENT_CLICK,payload:e}}},82789:(e,t,s)=>{s.r(t),s.d(t,{CONTENT_CLICK:()=>o,GET_VIDEOS:()=>a,GET_VIDEOS_ERROR:()=>n,GET_VIDEOS_SUCCESS:()=>r});const a="app/VideoFeed/GET_VIDEOS",r="app/VideoFeed/GET_VIDEOS_SUCCESS",n="app/VideoFeed/GET_VIDEOS_ERROR",o="app/VideoFeed/CONTENT_CLICK"},2448:(e,t,s)=>{s.r(t),s.d(t,{VideoFeed:()=>L,default:()=>H});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(1081),d=s(78210),c=s(82960),u=s(6549),p=s(23615),m=s(56584),h=s(23045),g=s(15792),y=s(74980),x=s(50504),b=s(94686),f=s(75252),v=s(14773),j=s(31743),C=s(47767),S=s(86663),A=s(11243),T=s(66254),w=s(52132),E=Object.defineProperty,_=Object.defineProperties,O=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,I=(e,t,s)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,R=(e,t)=>{for(var s in t||(t={}))P.call(t,s)&&I(e,s,t[s]);if(N)for(var s of N(t))V.call(t,s)&&I(e,s,t[s]);return e},k=(e,t)=>_(e,O(t));const D=(e,t=1,s=0,a=null)=>{a?(e(`${window.location.pathname}?page=${t}&partners=${s}&c=${a}`),window.scroll(0,0)):(e(`${window.location.pathname}?page=${t}&partners=${s}`),window.scroll(0,0))};function L(e){(0,y.N)({key:"videoFeed",reducer:w.default});const t=(0,C.Zp)(),s=(0,r.useRef)(),n=(0,d.Pd)(s,"0px"),[o,i]=(0,r.useState)(!1),[l,c]=(0,r.useState)(1),[A]=(0,r.useState)(Math.random().toString(36).substring(7)),{page:T=1,partners:E,c:_=null}=S.parse(window.location.search),{channels:O,collectionCategory:N,collection:P,collections:V,getVideos:I,videoFeed:L,category:$,subscription:U,dateLabel:H,includeCategories:M=!1,background:F,container:B,paginationActivated:z=!0,uncategorizedTranslation:G="bandyplayHomeClubtv",topBannerAdvertisement:Y=null,bottomBannerAdvertisement:J=null,categoryButtonStyle:q=null,customHref:K=null,designType:W="lolomo",disableCategories:X=!1,onContentClick:Z,type:Q="horizontal",header:ee={title:"Videos",showMore:!1},cardHeader:te={style:{color:"white !important",fontSize:"1em !important"}},cardSubHeader:se={style:{color:"white !important",fontSize:"0.8em !important"},disabled:!1}}=e,ae=({currentPage:e=null,append:t=!1})=>{t&&c(l+1),O&&A.length>0&&I({index:A,channels:O,includeCategories:M,page:e||T,append:t}),P&&A.length>0&&I({index:A,collection:P,includeCategories:M,page:e||T,append:t}),V&&!_&&A.length>0&&I({index:A,collection:E?V[E].id:V[0].id,includeCategories:M,page:e||T,append:t}),$&&A.length>0&&I({index:A,category:_||$,page:e||T,append:t}),(N||_)&&A.length>0&&I({index:A,collectionCategory:_||N,page:e||T,append:t}),U&&A.length>0&&I({index:A,subscription:U,includeCategories:M,page:e||T,append:t})};if((0,r.useEffect)((()=>{!n&&"vertical"!==Q||o||(i(!0),ae({}))}),[_,$,O,P,N,V,I,M,o,A,ae,n,T,E,Q,L]),!e.videoFeed[A])return"vertical"===Q?(0,a.jsx)("div",{ref:s,style:{height:"180px"},children:(0,a.jsx)(u.A,{active:!0,inline:"centered"})}):(0,a.jsx)("div",{ref:s,children:(0,a.jsx)(g.default,{})});const{videos:re,loading:ne,loadingAppend:oe=!1,error:ie,pagination:le={}}=e.videoFeed[A];return"vertical"===Q?F?ne?(0,a.jsx)(b.default,k(R({},F),{children:(0,a.jsx)(p.A,{verticalAlign:"middle",style:{paddingTop:"120px"},children:(0,a.jsx)(p.A.Row,{children:(0,a.jsx)(p.A.Column,{children:(0,a.jsxs)("div",k(R({},B),{children:["number"!=typeof V&&V.length>1&&(0,a.jsx)(p.A.Row,{style:{marginBottom:"20px"},children:(0,a.jsx)(p.A.Column,{children:(0,a.jsx)(m.A,{trigger:(0,a.jsx)("span",{children:E?V[E].name:V[0].name}),options:V.map(((e,s)=>(0,a.jsx)(m.A.Item,{value:e.id,onClick:()=>D(t,1,s),children:e.name},e.id))),placeholder:E?V[E].name:V[0].name,value:E?V[E].id:V[0].id,selected:E?V[E].id:V[0].id})})}),(0,a.jsx)(u.A,{active:!0})]}))})})})})):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(b.default,k(R({},F),{children:(0,a.jsx)(p.A,{verticalAlign:"middle",style:{paddingTop:"120px"},children:(0,a.jsx)(p.A.Row,{children:(0,a.jsx)(p.A.Column,{children:(0,a.jsxs)("div",k(R({},B),{children:[Y&&(0,a.jsx)(f.default,R({},Y)),"number"!=typeof V&&V.length>1&&(0,a.jsx)(p.A.Row,{style:{margin:"20px 0"},children:(0,a.jsx)(p.A.Column,{children:(0,a.jsx)(m.A,{trigger:(0,a.jsx)("span",{children:E?V[E].name:V[0].name}),options:V.map(((e,s)=>(0,a.jsx)(m.A.Item,{value:e.id,onClick:()=>D(t,1,s),children:e.name},e.id))),placeholder:E?V[E].name:V[0].name,value:E?V[E].id:V[0].id,selected:E?V[E].id:V[0].id})})}),!X&&(0,a.jsx)(v.default,{collection:E?V[E].id:V[0].id,channel:e.channels,uncategorizedTranslation:G,active:_||0,categoryButtonStyle:q,onChange:({id:e})=>D(t,1,E||0,e)}),(0,a.jsx)(j.default,{customHref:K,content:re,dateLabel:H}),re.length>0&&(0,a.jsx)(h.A,{activePage:T||1,size:"mini",className:"stackable",style:{margin:"26px 0"},totalPages:le.totalPages,onPageChange:(e,{activePage:s})=>D(t,s,E||0,_||null),firstItem:!1,lastItem:!1}),J&&(0,a.jsx)(f.default,R({},J))]}))})})})}))}):ne?(0,a.jsx)("div",{ref:s,style:{height:"180px"},children:(0,a.jsx)(u.A,{active:!0,inline:"centered"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.default,{content:re,dateLabel:H}),re.length>0&&z&&(0,a.jsx)(h.A,{activePage:T||1,size:"mini",className:"stackable",style:{margin:"26px 0"},totalPages:le.pageCount.totalPages,onPageChange:(e,{activePage:s})=>D(t,s,E||0),firstItem:!1,lastItem:!1})]}):ne?(0,a.jsx)("div",{ref:s,children:(0,a.jsx)(g.default,{})}):!ie&&re&&re.length?(0,a.jsx)("div",{ref:s,children:(0,a.jsx)(x.default,{content:re,customHref:K,type:"video",id:A,loadingAppend:oe,dateLabel:H,designType:W,title:ee,onLoadMore:()=>{ae({currentPage:l+1,append:!0})},cardHeader:te,cardSubHeader:se,onContentClick:Z})}):null}L.propTypes={channels:o().array,type:o().string,customHref:o().string,header:o().object,getVideos:o().func,collection:o().number,videoFeed:o().object,dateLabel:o().object,collectionCategory:o().number,subscription:o().number,category:o().number,includeCategories:o().bool,partners:o().oneOfType([o().number,o().array]),collections:o().array,background:o().object,container:o().object,topB
6annerAdvertisement:o().object,bottomBannerAdvertisement:o().object,categoryButtonStyle:o().object,paginationActivated:o().bool,disableCategories:o().bool,uncategorizedTranslation:o().string,designType:o().string,cardHeader:o().object,cardSubHeader:o().object,onContentClick:o().func};const $=(0,l.j8)({videoFeed:(0,T.default)()}),U=(0,i.Ng)($,(function(e){return{dispatch:e,getVideos:t=>e((0,A.getVideosAction)(t)),onContentClick:t=>e((0,A.contentClickAction)(t))}})),H=(0,c.Zz)(U)(L)},52132:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(82789);const n={},o=(e=n,t)=>(0,a.Ay)(e,(s=>{switch(t.type){case r.GET_VIDEOS:t.payload.append||(s[t.payload.index]={},s[t.payload.index].videos=[]),s[t.payload.index].loading=!t.payload.append,s[t.payload.index].loadingAppend=!0,s[t.payload.index].error=!1;break;case r.GET_VIDEOS_SUCCESS:s[t.payload.index].loading=!1,s[t.payload.index].error=!1,s[t.payload.index].loadingAppend=!1,t.payload.append?t.payload.message&&t.payload.message.length&&(s[t.payload.index].videos=[...e[t.payload.index].videos,...t.payload.message]):(s[t.payload.index].videos=t.payload.message,t.payload.pagination&&(s[t.payload.index].pagination=t.payload.pagination));break;case r.GET_VIDEOS_ERROR:s[t.payload.index].loading=!1,s[t.payload.index].loadingAppend=!1,t.payload.append||(s[t.payload.index].error=!0)}}))},60370:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d,getVideos:()=>l});var a=s(43786),r=s(72748),n=s(32689),o=s(11243),i=s(82789);function*l(e){const{index:t,channels:s,limit:i,page:l,category:d,collection:c,collectionCategory:u,includeCategories:p,subscription:m,append:h}=e.payload;try{if(!t)throw new Error("no index defined");if(s){const e=`${n.DEFAULT_STAYLIVE_API}videos/feed?limit=${i||20}&page=${l||1}&categories=${p}`,d=yield(0,a.T1)(r.Ay,e,{headers:{"X-STAYLIVE-CHANNELS":s.toString()}});return void(yield(0,a.yJ)((0,o.getVideosSuccessAction)({index:t,message:d.message,pagination:d.data.pageCount,append:h})))}if(d){const e=`${n.DEFAULT_STAYLIVE_API}videos/categories/${d}?limit=${i||20}&page=${l||1}`,s=yield(0,a.T1)(r.Ay,e,{});return void(yield(0,a.yJ)((0,o.getVideosSuccessAction)({index:t,message:s.message[0].videos,pagination:s.data,categories:s.categories,append:h})))}if(u){const e=`${n.DEFAULT_STAYLIVE_API}collection/videos/category/${u}?limit=${i||20}&page=${l||1}`,s=yield(0,a.T1)(r.Ay,e,{});return void(yield(0,a.yJ)((0,o.getVideosSuccessAction)({index:t,message:s.message.videos,pagination:s.data,categories:s.categories,append:h})))}if(m){const e=`${n.DEFAULT_STAYLIVE_API}subscription/${m}`,s=yield(0,a.T1)(r.Ay,e,{}),d=`${n.DEFAULT_STAYLIVE_API}videos/feed?limit=${i||20}&page=${l||1}&categories=${p}`,c=yield(0,a.T1)(r.Ay,d,{headers:{"X-STAYLIVE-CHANNELS":s.message.channels.map((e=>e.id)).toString()}});return void(yield(0,a.yJ)((0,o.getVideosSuccessAction)({index:t,message:c.message,pagination:c.data.pageCount,append:h})))}if(c){const e=`${n.DEFAULT_STAYLIVE_API}collections/feed/${c}`,s=yield(0,a.T1)(r.Ay,e,{}),d=`${n.DEFAULT_STAYLIVE_API}videos/feed?limit=${i||20}&page=${l||1}&categories=${p}`,u=yield(0,a.T1)(r.Ay,d,{headers:{"X-STAYLIVE-CHANNELS":s.message.channels.map((e=>e.id)).toString()}});yield(0,a.yJ)((0,o.getVideosSuccessAction)({index:t,message:u.message,pagination:u.data.pageCount,append:h}))}}catch(e){yield(0,a.yJ)((0,o.getVideosErrorAction)({index:t,append:h}))}}function*d(){yield(0,a.jP)(i.GET_VIDEOS,l)}},66254:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectVideoFeedDomain:()=>n});var a=s(1081),r=s(52132);const n=e=>e.videoFeed||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},40304:(e,t,s)=>{s.r(t),s.d(t,{PlaylistProvider:()=>h,usePlaylistOpen:()=>g});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(1081),d=s(17386),c=s(91005),u=s(73679);const p=(0,l.j8)({cmsPreview:(0,d.makeSelectCmsPreviewMode)()}),m=(0,r.createContext)();function h({children:e}){const t=(0,c.A)(),{cmsPreview:s}=(0,i.d4)(p),n=t.get("playlist"),{data:o,isValidating:l}=(0,u.s)(s?"playlistpage":null),d=(0,r.useMemo)((()=>{var e,t;return!!s&&Boolean(null==(t=null==(e=null==o?void 0:o.message)?void 0:e.videos)?void 0:t.length)}),[s,o]),[h,g]=(0,r.useState)((()=>
6{if(s)return!0;const e=localStorage.getItem("openPlaylist");try{const t=null===e?void 0:JSON.parse(e);return"boolean"==typeof t?t:Boolean(n)}catch(e){return Boolean(n)}}));(0,r.useEffect)((()=>{n&&!s&&localStorage.setItem("openPlaylist",JSON.stringify(h))}),[h,n,s]);const y=(0,r.useCallback)((()=>{g((e=>!e))}),[]);let x;return x=s?l?h:d:Boolean(n),(0,a.jsx)(m.Provider,{value:{playlistIsOpen:h,togglePlaylist:y,hasPlaylist:x},children:e})}function g(){return(0,r.useContext)(m)}h.propTypes={children:o().node}},95028:(e,t,s)=>{s.r(t),s.d(t,{default:()=>C});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(24712),l=s(26840),d=s(23114),c=s(896),u=s(15979),p=s(24100),m=s(16683),h=s(38267),g=s(45581),y=s(86600),x=s(37134);const b=h.Ay.div` 7 position: absolute; 8 top: 0; 9 left: 0; 10 right: 0; 11 bottom: 0; 12 height: 100%; 13 width: 100%; 14 background: linear-gradient(transparent, ${e=>e.gradientColor}) 0% 15 0% / cover no-repeat; 16 background-repeat: no-repeat; 17 z-index: 5; 18`,f=h.Ay.div` 19 padding-top: calc(720 / 1280 * 100%); 20 position: relative; 21 overflow: hidden; 22`,v=h.Ay.div` 23 max-height: 70vh; 24 position: relative; 25 overflow: hidden; 26 z-index: 0; 27`,j=(0,h.Ay)(u.default)` 28 position: absolute; 29 top: 0; 30 left: 0; 31 right: 0; 32 bottom: 0; 33 margin: auto; 34 max-width: 100%; 35 36 height: auto; 37 width: 100vw; 38 vertical-align: middle; 39`;function C({video:e,customGradientColor:t,classes:s}){const[n,o]=(0,r.useState)(null),u=(0,m.wA)(),{backgroundColor:h}=(0,g.m)(),C=t||h;return(0,r.useEffect)((()=>{0===n&&u((0,y.setVideoStatus)({status:x.STATUS.success}))}),[n]),(0,a.jsxs)("div",{style:{backgroundColor:C},children:[(0,a.jsxs)(v,{children:[(0,a.jsx)(b,{gradientColor:C}),(0,a.jsx)("div",{className:"flex absolute inset-0 z-10 items-center px-10 text-4xl text-white md:text-3xl sm:px-12 md:px-0",children:(0,a.jsx)(c.default,{date:(0,p.u4)(e.publish_date),onTimeReached:e=>o(e)})}),(0,a.jsx)(f,{children:(0,a.jsx)(j,{alt:"Upcoming video background",src:e.thumbnail})})]}),(0,a.jsxs)("div",{className:s.containerClasses,children:[(0,a.jsx)("h3",{className:s.titleClasses,children:e.name}),(0,a.jsxs)("div",{className:s.descriptionClasses,children:[(0,a.jsxs)("div",{className:s.metaDataClasses,children:[(0,a.jsx)(i.default,{icon:"calendar-alt",className:"mr-1 ml-4"}),(0,a.jsx)(l.default,{date:e.publish_date||e.created_at,short:!0,time:!1})]}),(0,a.jsx)(d.default,{className:"block pt-1 text-m",text:e.description})]})]})]})}C.propTypes={video:o().object,classes:o().object,customGradientColor:o().string}},31488:(e,t,s)=>{s.r(t),s.d(t,{default:()=>q,getCurrentTime:()=>G});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(88744),l=s(24712),d=s(86663),c=s(67438),u=s(84976),p=s(38267),m=s(23114),h=s(39522),g=s(26840),y=s(8406),x=s(33932),b=s(79409),f=s(88277),v=s(24100),j=s(22254),C=s(69471),S=s(68207),A=s(45581),T=s(91005),w=s(17386),E=s(1081),_=s(16683),O=s(41038),N=s(74321),P=s(70810),V=s(40304),I=s(63323),R=s(13945),k=Object.defineProperty,D=Object.defineProperties,L=Object.getOwnPropertyDescriptors,$=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,M=(e,t,s)=>t in e?k(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))U.call(t,s)&&M(e,s,t[s]);if($)for(var s of $(t))H.call(t,s)&&M(e,s,t[s]);return e};const B=p.Ay.div` 40 background: ${e=>e.color}; 41`,z={containerClasses:"inline-block bg-red-700 rounded py-4 px-6 my-2",textClasses:"text-white text-lg font-semibold"};function G(e,t){if(null==e?void 0:e.duration){const s=null==e?void 0:e.duration;return{currentTime:t?0:s}}return{currentTime:0}}const Y=(0,E.j8)({cmsPreview:(0,w.makeSelectCmsPreviewMode)()}),J=({video:e,videoStatus:t,defaultVast:s=null,classes:n={videoWrapperClasses:"px-0 pb-8 max-w-screen-2xl lg:px-1% mx-auto mt-24",containerClasses:"relative px-6 pb-12 md:max-w-screen-xl md:-mt-32 md:mx-auto md:z-50",titleClasses:"text-3xl text-white sm:text-4xl md:text-5xl xl:text-6xl",informationSectionClasses:"px-6 mt-8 max-w-screen-2xl mx-auto",loginBtnClasses:"block px-1 py-2 mt-2 text-gray-100 underline cursor-pointer font-base hover:text-gray-400",metaDataClasses:"mt-6 space-x-4 font-semibold text-gray-500",descriptionClasses:"mt-2 mb-4 leading-6 text-white md:max-w-6xl",informationContainer:{containerClasses:"inline-block mt-2 rounded shadow",textClasses:"text-xl font-medium text-white md:text-2xl"}
41,alreadyWatching:z,actionButtons:{buttonClasses:"inline-flex px-6 py-3 mt-2 mr-2 text-lg font-semibold text-gray-100 uppercase duration-200 border border-transparent rounded cursor-pointer sm:py-4 sm:text-xl bg-primary hover:text-gray-100 hover:opacity-75",secondaryButtonClasses:"flex items-center px-6 mt-2 text-lg font-semibold text-gray-100 uppercase duration-200 bg-transparent border-4 border-gray-100 border-solid rounded cursor-pointer sm:py-3 sm:text-xl hover:text-gray-100 hover:opacity-75",multipleButtonContainerClasses:"flex flex-wrap items-center"},videoDownloadClasses:"px-3 py-2 mt-3 text-white border-2 border-white border-solid rounded-md hover:border-gray-500 hover:text-white",chapterTimeClasses:"",chapterTitleClasses:""},playerAccentColor:o={color:"",useCustomColor:!1},playListClasses:p,userLoggedIn:w,useModal:E,showShareButton:k,customButtons:$,loginText:U,customGradientColor:H,showChapters:M,showYear:G=!1,multipleProductsModal:J})=>{var q,K;const W=(0,T.A)().get("playlist"),{cmsPreview:X}=(0,_.d4)(Y),{data:Z}=(0,C.W)({playlistUID:W}),{data:Q}=(0,S.e)(e.id),{backgroundColor:ee}=(0,A.m)(),{playlistIsOpen:te,togglePlaylist:se,hasPlaylist:ae}=(0,V.usePlaylistOpen)(),{mutate:re}=(0,P.Ay)({type:O.CONTENT_TYPES.videoContinueWatching,id:O.CONTENT_TYPES.videoContinueWatching}),{data:ne}=(0,R.K)({video:e}),oe=H||ee,{autoplay:ie}=d.parse(window.location.search),[le,de]=(0,r.useState)(!1),ce=(ue=Number(null==e?void 0:e.id),(null==Z?void 0:Z.videos.findIndex((e=>(null==e?void 0:e.id)===ue)))+1);var ue;const pe={element:"staylive_player",type:"video",objectID:e.id,autoplay:!(X||ie&&"1"!==ie),muted:!1,debug:!1,fillMode:!1,poster:e.thumbnail,video:e};!e.advertising&&s&&(pe.video.advertising=s);const me=(0,v.zG)(null==Q?void 0:Q.duration,(0,i.convertToSeconds)(e.duration)),he=null!=(q=null==Q?void 0:Q.duration)?q:0,ge=me?0:he,[ye,xe]=(0,r.useState)(ge),[be,fe]=(0,r.useState)(ge);(0,r.useEffect)((()=>{(null==Q?void 0:Q.duration)&&!me&&(xe(Q.duration),fe(Q.duration))}),[null==Q?void 0:Q.duration,me]);const ve=()=>{var t;return(0,a.jsxs)("div",{className:n.descriptionClasses,children:[(0,a.jsxs)("div",{className:n.metaDataClasses,children:[(0,a.jsx)(l.default,{icon:["fas","clock"],className:"mr-1"}),e.duration,(0,a.jsx)(l.default,{icon:["fas","calendar-alt"],className:"ml-4 mr-1"}),(0,a.jsx)(g.default,{date:e.publish_date||e.created_at,short:!0,time:!1,showYear:G})]}),(0,a.jsx)(m.default,{className:"block pt-1 text-m",text:e.description}),M&&(null==(t=null==e?void 0:e.chapters)?void 0:t.length)>0&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)("ul",{className:"p-0 mt-2 list-none",children:e.chapters.map((({id:e,time:t,name:s})=>(0,a.jsxs)("li",{className:"flex items-center",children:[(0,a.jsx)("span",{className:n.chapterTimeClasses||"text-blue-500 cursor-pointer hover:underline",role:"button",tabIndex:0,"aria-label":`Jump to chapter "${s}" at ${t}`,onClick:()=>xe(+(0,i.convertToSeconds)(t)),onKeyDown:e=>("Enter"===e.key||" "===e.key)&&(e.preventDefault(),xe(+(0,i.convertToSeconds)(t))),children:t}),(0,a.jsx)("span",{className:n.chapterTitleClasses||"ml-2 text-primary",children:s})]},e)))})})]})};if(t===y.Bu.hasContentAccess)return(0,a.jsxs)("div",{className:n.videoWrapperClasses,style:{backgroundColor:oe},children:[(0,a.jsxs)("div",{className:(0,N.x)("flex flex-col w-full lg:flex-row lg:max-h-[70vh]",ae&&te?"lg:gap-4":""),children:[(0,a.jsx)("div",{className:(0,N.x)("w-full",ae&&te?"lg:w-3/4":""),children:(0,a.jsx)(i.default,{setup:pe,onVideoEnded:de,playerAccentColor:o,playlistId:null==Z?void 0:Z.id,startTime:ye,fetchContinueWatching:re,subtitles:ne,onTimeUpdate:({currentTime:e})=>{const t=Math.floor(null!=e?e:0);fe((e=>e!==t?t:e))}})}),ae&&te&&Z&&(0,a.jsx)("div",{className:(0,N.x)("w-full mt-4 lg:mt-0 lg:w-1/4","flex-shrink-0"),children:(0,a.jsx)(j.default,{playlistUID:W,clipHasEnded:le,customGradientColor:H,playListClasses:p,selectedVideo:e.id})})]}),(0,a.jsxs)("div",{className:n.informationSectionClasses,children:[ae&&!te&&(null==(K=null==Z?void 0:Z.videos)?void 0:K.length)>0&&(0,a.jsxs)("div",{className:"py-4 pl-6 pr-3 border border-solid rounded-md border-zinc-700 md:max-w-md bg-zinc-800",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)(u.N_,{to:`/playlist/${W}`,className:"mb-0 text-xl font-semibold text-white line-clamp-1 hover:text-gray-400",children:(0,a.jsx)(m.default,{text:null==Z?void 0:Z.name})}),(0,a.jsx)("button",{type:"button",className:"text-xl text-gray-400 bg-transparent border-none rounded-full cursor-pointer hover:bg-gray-700",onClick:se,children:(0,a.jsx)(l.default,{icon:["fas","chevron-right"]})})]}),(0,a.jsx)("div",{className:"flex text-gray-400",children:(0,a.jsxs)("p",{className:"font-semibold",children:[ce,(0,a.jsx)("span",{className:"mx-0.5",children:"/"}),null==Z?void 0:Z.videos.length]})})]}),(0,a.jsx)("h3",{className:n.titleClasses,children:e.name}),(0,a.jsx)(ve,{}),k&&(0,a.jsx)("div",{className:e.download_url?"mb-4":"",children:(0,a.jsx)(b.default,{currentTime:be})}),e.download_url&&(0,a.jsx)("a",{href:e.download_url,download:!0,className:n.videoDownloadClasses,children:(0,a.jsx)(c.A,F({},h.default.download))})]})]});const je=e.subscription.general_access.length+e.subscription.specific_access.length;return(0,a.jsxs)(B,{color:oe,children:[(0,a.jsx)(f.default,{image:e.thumbnail,backgroundColor:oe}),(0,a.jsxs)("div",{className:n.containerClasses,children:[(0,a.jsx)("h3",{className:n.titleClasses,children:e.name}),t===y.Bu.isGeoBlocked&&(0,a.jsx)("div",{className:n.informationContainer.containerClasses,children:(0,a.jsx)("span",{className:n.informationContainer.textClasses,children:(0,a.jsx)(c.A,F({},h.default.videoIsNotAvailableInCountry))})}),(0,a.jsx)(x.default,{contentStatus:t,content:e,classes:n.actionButtons,isLiveStream:!1,useModal:E,customButtons:$,multipleProductsModal:J}),1===je&&!e.packages.length&&!e.discount&&null!==(null==e?void 0:e.price_with_discount_applied)&&(0,a.jsx)("div",{className:"mt-2 text-base text-gray-50",children:(0,a.jsx)(c.A,(Ce=F({},I.default.subscriptionDiscount),Se={values:{price:null==e?void 0:e.price_with_discount_applied,currency:e.currency.toUpperCase()}},D(Ce,L(Se))))}),je>1&&!e.packages.length&&!e.discount&&null!==(null==e?void 0:e.price_with_discount_applied)&&(0,a.jsx)("div",{className:"mt-2 text-base text-gray-50",children:(0,a.jsx)(c.A,F({},I.default.multiSubscriptionDiscount))}),!w&&t!==y.Bu.loggedInOnly&&(0,a.jsx)(u.N_,{to:(0,v.dE)(),className:n.loginBtnClasses,children:U&&!Object.values(U).every((e=>""===e))?(0,a.jsx)(m.default,{text:U}):(0,a.jsx)(c.A,F({},h.default.signInToAccount))}),t===y.Bu.watchingOnDifferentSession&&(0,a.jsx)("div",{className:n.alreadyWatching?n.alreadyWatching.containerClasses:z.containerClasses,children:(0,a.jsx)("span",{className:n.alreadyWatching?n.alreadyWatching.textClasses:z.textClasses,children:(0,a.jsx)(c.A,F({},h.default.alreadyWatchingFromDifferentSession))})}),(0,a.jsx)(ve,{}),k&&(0,a.jsx)(b.default,{})]})]});var Ce,Se};J.propTypes={video:o().object,playlistUID:o().string,playlist:o().string,customGradientColor:o().string,classes:o().object,playerAccentColor:o().shape({color:o().string,useCustomColor:o().bool}),userLoggedIn:o().bool,videoStatus:o().string,useModal:o().bool,showShareButton:o().bool,loginText:o().object,customButtons:o().object,defaultVast:o().shape({preroll:o().string,postroll:o().string}),playListClasses:o().shape({wrapper:o().string,title:o().string,info:o().string,videoCardTitle:o().string,videoCardDuration:o().string,videoCardIndex:o().string}),cmsData:o().object,showChapters:o().bool,showYear:o().bool,multipleProductsModal:o().shape({titleColor:o().string})};const q=J},86600:(e,t,s)=>{s.r(t),s.d(t,{loadVideoAction:()=>r,loadVideoCompletedAction:()=>n,resetReduxState:()=>i,setVideoStatus:()=>o});var a=s(37134);function r(e){return{type:a.LOAD_VIDEO,payload:e}}function n(e){return{type:a.LOAD_VIDEO_COMPLETED,payload:e}}function o(e){return{type:a.SET_VIDEO_STATUS,payload:e}}function i(){return{type:a.RESET_STATE}}},37134:(e,t,s)=>{s.r(t),s.d(t,{LOAD_VIDEO:()=>a,LOAD_VIDEO_COMPLETED:()=>r,RESET_STATE:()=>o,SET_VIDEO_STATUS:()=>n,STATUS:()=>i});const a="app/VideoPage/LOAD_VIDEO",r="app/VideoPage/LOAD_VIDEO_COMPLETED",n="app/VideoPage/SET_VIDEO_STATUS",o="app/VideoPage/RESET_STATE",i={initial:"INIT",loading:"LOADING",success:"SUCCESS",error:"ERROR",not_connected:"NOT_CONNECTED",upcoming:"UPCOMING"}},90251:(e,t,s)=>{s.r(t),s.d(t,{VideoPage:()=>M,default:()=>F});var a=s(74848),r=s(96540),n=s(31357),o=s(16683),i=s(1081),l=s(40260),d=s(74980),c=s(5556),u=s.n(c),p=s(39125),m=s(15422),h=s(22453),g=s(17386),y=s(78210),x=s(8406),b=s(49941),f=s(67438),v=s(47767),j=s(24100),C=s(65838),S=s(69757),A=s(67915),T=s(98219),w=s(86600),E=s(37134),_=s(31488),O=s(63323),N=s(95028),P=s(40304),V=s(57644),I=Object.defineProperty,R=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,L=(e,t,s)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,$=(e,t)=>{for(var s in t||(t={}))k.call(t,s)&&L(e,s,t[s]);if(R)for(var s of R(t))D.call(t,s)&&L(e,s,t[s]);return e};const U=(0,i.j8)({video:(0,S.makeSelectVideo)(),status:(0,S.makeSelectStatus)(),platform:(0,g.makeSelectPlatform)(),cmsPreview:(0,g.makeSelectCmsPreviewMode)()}),H=(e,t)=>{var s,r,n,o;const i={"@context":"https://schema.org","@type":"VideoObject",name:(0,j.$J)(e.name)||"Video",description:(0,j.$J)(e.description)||"",thumbnailUrl:e.thumbnail||"",uploadDate:(l=e.publish_date||e.created_at,l?new Date(l).toISOString():(new Date).toISOString()),duration:(e=>{const t=(0,h.convertToSeconds)(e);return`PT${Math.floor(t/3600)}H${Math.floor(t%3600/60)}M${t%60}S`})(e.duration||0),requiresSubscription:1===e.subscribers_only,publisher:{"@type":"Organization",name:(null==(r=null==(s=null==t?void 0:t.metadata)?void 0:s.platform)?void 0:r.name)||e.channelName||"Staylive",logo:{"@type":"ImageObject",url:(null==(o=null==(n=null==t?void 0:t.theme)?void 0:n.logos)?void 0:o.webLogo)||""}}};var l;const d=JSON.parse(JSON.stringify(i,((e,t)=>void 0===t?void 0:t))),c=(0,C.Ew)(t),u=e.seo_string||e.id,{lang:m}=(0,V.vM)(window.location.pathname);return(0,a.jsxs)(p.m,{children:[(0,a.jsx)("title",{children:(0,j.$J)(e.name)||"-"}),(0,a.jsx)("script",{type:"application/ld+json",children:JSON.stringify(d)}),(0,a.jsx)("meta",{property:"og:description",content:(0,j.$J)(e.description)||"-"}),(0,a.jsx)("meta",{property:"og:type",content:"product"}),(0,a.jsx)("meta",{property:"fb:app_id",content:"917977778550841"}),(0,a.jsx)("meta",{property:"og:title",content:(0,j.$J)(e.name)||"-"}),(0,a.jsx)("meta",{property:"og:url",content:window.location.href}),(0,a.jsx)("meta",{property:"og:image",content:e.thumbnail||"-"}),(0,a.jsx)("meta",{property:"product:brand",content:e.channelName||"-"}),(0,a.jsx)("meta",{property:"product:price:amount",content:e.price||"0"}),(0,a.jsx)("meta",{property:"og:image:width",content:"1280"}),(0,a.jsx)("meta",{property:"og:image:height",content:"720"}),(0,a.jsx)("meta",{property:"product:price:currency",content:e.currency||"0"}),(0,a.jsx)("meta",{property:"product:availability",content:"in stock"}),(0,a.jsx)("meta",{property:"product:condition",content:"new"}),(0,a.jsx)("meta",{property:"product:retailer_item_id",content:e.id||"0"}),(0,a.jsx)("link",{rel:"canonical",href:`${c}/${m}/video/${u}`})]})};function M({classes:e,customGradientColor:t,canvasColor:s,useModal:i=!1,playerAccentColor:c,relatedContent:u,urlIdentifierParam:p="id",showShareButton:h=!0,showChapters:g=!0,showYear:j=!1,canvasOpacity:C=1,
41customButtons:S={},defaultVast:V=null,loginText:I,playListClasses:R,multipleProductsModal:k}){(0,d.N)({key:"videoPage",reducer:A.default}),(0,l.f)({key:"videoPage",saga:T.default});const{user:D}=(0,y.Jd)(),L=(0,o.wA)(),M=(0,v.g)();let{id:F}=M;const{video:B,status:z,platform:G,cmsPreview:Y}=(0,o.d4)(U);if(Array.isArray(F)&&([F]=F),!F){const e=new URLSearchParams(window.location.search);F=e.get(p||"id")}return(0,r.useEffect)((()=>()=>{L((0,w.resetReduxState)())}),[L]),(0,r.useEffect)((()=>{!Y&&F&&B.id!==F&&B.seo_string!==F&&L((0,w.loadVideoAction)({id:F,platform:G}))}),[L,F,G,Y]),z===E.STATUS.loading?(0,a.jsx)("div",{className:"flex items-center justify-center h-screen pt-10",children:(0,a.jsx)(m.default,{})}):z===E.STATUS.not_connected?(0,a.jsx)("div",{className:"flex items-center justify-center h-screen pt-10",children:(0,a.jsx)("span",{className:"text-3xl font-semibold text-primary",children:(0,a.jsx)(f.A,$({},O.default.notConnected))})}):z===E.STATUS.upcoming?(0,a.jsx)(N.default,{classes:e,video:B,customGradientColor:t}):z===E.STATUS.error?(0,a.jsx)("div",{className:"flex items-center justify-center h-screen pt-10",children:(0,a.jsx)("span",{className:"text-3xl font-semibold text-primary",children:(0,a.jsx)(f.A,$({},O.default.errorMsg))})}):(0,a.jsxs)(a.Fragment,{children:[H(B,G),(0,a.jsx)("div",{style:{backgroundColor:(0,n.B3)(s,C)},children:(0,a.jsx)(P.PlaylistProvider,{children:(0,a.jsx)(_.default,{video:B,videoStatus:(0,x.A6)(B,!1),userLoggedIn:!!D,customGradientColor:t,classes:e,useModal:i,showShareButton:h,showChapters:g,showYear:j,customButtons:S,loginText:I,defaultVast:V,playerAccentColor:c,playListClasses:R,multipleProductsModal:k})})}),(0,a.jsx)(b.default,{relatedContent:u,content:{channelid:B.channel,channelName:B.channelName,tags:B.tags},platform:G})]})}M.propTypes={urlIdentifierParam:u().string,match:u().object,classes:u().shape({videoPageClasses:u().string,descriptionClasses:u().string,wrapperAccessClasses:u().string,informationSectionClasses:u().string,titleClasses:u().string,videoDownloadClasses:u().string,wrapperNoAccessClasses:u().string,informationContainer:u().shape({containerClasses:u().string,textClasses:u().string}),actionButtons:u().object}),customGradientColor:u().string,canvasColor:u().string,playerAccentColor:u().shape({color:u().string,useCustomColor:u().bool}),canvasOpacity:u().number,relatedContent:u().shape({livestreams:u().shape({show:u().bool,includeCategories:u().bool,type:u().oneOf(["LIVESTREAM_COLLECTION","LIVESTREAM_CHANNELS","LIVESTREAM_CHANNEL_TAGS"]),livestreamText:u().shape({sv:u().string})}),videos:u().shape({show:u().bool,includeCategories:u().bool,type:u().oneOf(["VIDEO_COLLECTION","VIDEO_CHANNELS","VIDEO_CHANNEL_TAGS"]),videoText:u().shape({sv:u().string})}),contentFeedProps:u().object}),useModal:u().bool,showShareButton:u().bool,loginText:u().object,customButtons:u().shape({startYouSubscriptionText:u().object,buySeparatelyForText:u().object,unlockNowText:u().object,buyNowText:u().object,voucherDescriptionText:u().object}),defaultVast:u().shape({preroll:u().string,postroll:u().string}),playListClasses:u().shape({wrapper:u().string,title:u().string,info:u().string,videoCardTitle:u().string,videoCardDuration:u().string,videoCardIndex:u().string}),showChapters:u().bool,showYear:u().bool,multipleProductsModal:u().bool};const F=M},63323:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.VideoPage",n=(0,a.YK)({header:{id:`${r}.header`,defaultMessage:"This is the VideoPage container!"},errorMsg:{id:`${r}.errorMsg`,defaultMessage:"Something went wrong when loading the video."},notConnected:{id:`${r}.notConnected`,defaultMessage:"The video you're trying to watch is not connected to this platform."},subscriptionDiscount:{id:`${r}.subscriptionDiscount`,defaultMessage:"* Subscribe today and access the video for {price} {currency}."},showPlaylist:{id:`${r}.showPlaylist`,defaultMessage:"Show Playlist"},multiSubscriptionDiscount:{id:`${r}.multiSubscriptionDiscount`,defaultMessage:"* Subscribe today and access the video with a discounted PPV price."}})},67915:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(37134);const n={status:r.STATUS.loading,video:{}},o=(e=n,t)=>(0,a.Ay)(e,(e=>{switch(t.type){case r.LOAD_VIDEO:e.status=r.STATUS.loading;break;case r.RESET_STATE:e.status=r.STATUS.loading,e.video={};break;case r.LOAD_VIDEO_COMPLETED:t.payload.status!==r.STATUS.success&&t.payload.status!==r.STATUS.upcoming||(e.video=t.payload.message),e.status=t.payload.status;break;case r.SET_VIDEO_STATUS:e.status=t.payload.status}}))},98219:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u,getVideo:()=>c});var a=s(43786),r=s(72748),n=s(32689),o=s(30727),i=s(24100),l=s(37134),d=s(86600);function*c({payload:e}){const{id:t,platform:s}=e,c=yield(0,a.T1)(o.k0,!0),u=`${n.DEFAULT_STAYLIVE_API}videos/${t}`;try{if(!t)throw new Error("No id for video provided");const e=yield(0,a.T1)(r.Ay,u,{method:"GET",headers:{"Content-Type":"application/json",Authorization:c?`Bearer ${c}`:""}}),o=s.metadata.channels.find((t=>t.id===e.message.channel)),p=s.uid===n.EMBED_PLATFORM_UID,m=e.message.list_before_publish_date&&new Date((0,i.u4)(e.message.publish_date))>new Date;o||p?m?yield(0,a.yJ)((0,d.loadVideoCompletedAction)({message:e.message,status:l.STATUS.upcoming})):yield(0,a.yJ)((0,d.loadVideoCompletedAction)({message:e.message,status:l.STATUS.success})):yield(0,a.yJ)((0,d.loadVideoCompletedAction)({status:l.STATUS.not_connected}))}catch(e){yield(0,a.yJ)((0,d.loadVideoCompletedAction)({error:e,status:l.STATUS.error}))}}function*u(){yield(0,a.p8)(l.LOAD_VIDEO,c)}},69757:(e,t,s)=>{s.r(t),s.d(t,{default:()=>d,makeSelectStatus:()=>i,makeSelectVideo:()=>l});var a=s(1081),r=s(37134),n=s(67915);const o=e=>e.videoPage||n.initialState,i=()=>(0,a.Mz)(o,(e=>void 0!==e.status?e.status:r.STATUS.loading)),l=()=>(0,a.Mz)(o,(e=>void 0!==e.video?e.video:{})),d=()=>(0,a.Mz)(o,(e=>e))},1353:(e,t,s)=>{s.r(t),s.d(t,{default:()=>a});const a=(0,s(40313).A)((()=>Promise.all([s.e(6146),s.e(5134),s.e(7115),s.e(8620),s.e(508),s.e(919),s.e(2285),s.e(2641),s.e(1387),s.e(177),s.e(6392),s.e(7827),s.e(2679),s.e(1707),s.e(7774),s.e(3049),s.e(1268),s.e(45),s.e(644),s.e(4899),s.e(2009),s.e(8117),s.e(8740),s.e(2
41116),s.e(9374),s.e(6486),s.e(6076),s.e(9761),s.e(1326),s.e(4622),s.e(628),s.e(6032)]).then(s.bind(s,15977))))},6090:(e,t,s)=>{s.r(t),s.d(t,{getUpcomingVideoAction:()=>o,getVideoAction:()=>r,getVideoErrorAction:()=>i,getVideoSuccessAction:()=>n,setStepAction:()=>l});var a=s(40784);function r(e){return{type:a.GET_VIDEO,payload:e}}function n(e){return{type:a.GET_VIDEO_SUCCESS,payload:e}}function o(e){return{type:a.GET_UPCOMING_VIDEO,payload:e}}function i(e){return{type:a.GET_VIDEO_ERROR,payload:e}}function l(e){return{type:a.SET_STEP,payload:e}}},40784:(e,t,s)=>{s.r(t),s.d(t,{GET_UPCOMING_VIDEO:()=>o,GET_VIDEO:()=>a,GET_VIDEO_ERROR:()=>n,GET_VIDEO_SUCCESS:()=>r,PLAY_AD_ACTION:()=>l,SET_STEP:()=>i,STOP_AD_ACTION:()=>d});const a="app/VideoPlayer/GET_VIDEO",r="app/VideoPlayer/GET_VIDEO_SUCCESS",n="app/VideoPlayer/GET_VIDEO_ERROR",o="app/VideoPlayer/GET_UPCOMING_VIDEO",i="app/VideoPlayer/SET_STEP",l="PLAY_AD",d="STOP_AD"},15977:(e,t,s)=>{s.r(t),s.d(t,{LabelContainer:()=>Q,VideoPlayer:()=>se,default:()=>ne});var a=s(74848),r=s(96540),n=s(47767),o=s(84976),i=s(5556),l=s.n(i),d=s(16683),c=s(39125),u=s(67438),p=s(3279),m=s(1081),h=s(82960),g=s(28094),y=s(86663),x=s(38267),b=s(23114),f=s(12870),v=s(23615),j=s(35907),C=s(40260),S=s(74980),A=s(78210),T=s(39522),w=s(64011),E=s(88744),_=s(2448),O=s(24100),N=(s(32367),s(13248)),P=s(22875),V=s(26840),I=s(2703),R=s(94686),k=s(68074),D=s(1104),L=s(1802),$=s(2890),U=s(12539),H=s(6090),M=s(73705),F=s(31105),B=Object.defineProperty,z=Object.defineProperties,G=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,K=(e,t,s)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,W=(e,t)=>{for(var s in t||(t={}))J.call(t,s)&&K(e,s,t[s]);if(Y)for(var s of Y(t))q.call(t,s)&&K(e,s,t[s]);return e},X=(e,t)=>z(e,G(t));const Z="1200px",Q=x.Ay.span` 42 position: relative; 43 display: inline-block; 44 45 @media screen and (max-width: 390px) { 46 display: block; 47 width: auto; 48 margin-left: 0; 49 margin: 10px auto 0 auto; 50 } 51 52 span:first-child { 53 top: -3px; 54 border-radius: 2px; 55 padding: 4px 14px 3px 14px; 56 border: 2px solid #ff1a5a; 57 color: #ff1a5a; 58 font-size: 1em; 59 font-weight: 100; 60 } 61`,ee=(0,x.Ay)(f.A)` 62 padding: 10px 10px; 63 box-shadow: none !important; 64 width: 320px; 65 max-width: 98% !important; 66 text-align: center; 67 margin-left: 0 !important; 68 font-size: 1.1em !important; 69 70 &.livestream-player-second-button { 71 margin-top: 10px !important; 72 padding: 6px 0 !important; 73 } 74 75 @media screen and (min-width: 820px) { 76 font-size: 1.4em !important; 77 padding: 10px 0 !important; 78 79 &.livestream-player-second-button { 80 margin-left: 10px !important; 81 margin-top: 0px !important; 82 padding: 8px 0px !important; 83 } 84 } 85`,te=e=>(0,a.jsxs)(c.m,{children:[(0,a.jsx)("title",{children:(0,O.$J)(e.name)||"-"}),(0,a.jsx)("meta",{property:"og:description",content:(0,O.$J)(e.description)||"-"}),(0,a.jsx)("meta",{property:"og:type",content:"product"}),(0,a.jsx)("meta",{property:"fb:app_id",content:"917977778550841"}),(0,a.jsx)("meta",{property:"og:title",content:(0,O.$J)(e.name)||"-"}),(0,a.jsx)("meta",{property:"og:url",content:window.location.href}),(0,a.jsx)("meta",{property:"og:image",content:e.thumbnail||"-"}),(0,a.jsx)("meta",{property:"product:brand",content:e.channelName||"-"}),(0,a.jsx)("meta",{property:"product:price:amount",content:e.price||"0"}),(0,a.jsx)("meta",{property:"og:image:width",content:"1280"}),(0,a.jsx)("meta",{property:"og:image:height",content:"720"}),(0,a.jsx)("meta",{property:"product:price:currency",content:e.currency||"0"}),(0,a.jsx)("meta",{property:"product:availability",content:"in stock"}),(0,a.jsx)("meta",{property:"product:condition",content:"new"}),(0,a.jsx)("meta",{property:"product:retailer_item_id",content:e.id||"0"})]});function se(e){(0,S.N)({key:"videoPlayer",reducer:M.default}),(0,C.f)({key:"videoPlayer",saga:F.default});const t=(0,n.Zp)(),s=(0,n.g)(),{autoplay:i}=y.parse(window.location.search);let{id:l}=y.parse(window.location.search);Array.isArray(l)&&([l]=l);const{loading:d,video:c,error:p,isUpcoming:m}=e.videoPlayer,{user:h}=(0,A.Jd)(),{intl:x,getVideo:U,shadow:H,verifiedlabels:B,subscriptionbutton:z={style:{}},ppvbutton:G={style:{}},setStep:Y,logotypeOverlay:J,disableSubscriptions:q=!1,disablePackages:K=!1,defaultvast:se=null,useNewCheckout:ae=!1,urlIdentifierParam:re=null,customHref:ne={livestreams:null,videos:null}}=e;re&&(l=s[re]);const{label:oe={style:{}},button:ie={style:{}},links:le={style:{}},text:de={style:{}}
85,container:ce={style:{}},termsAndConditions:ue,creditCardPaneTitle:pe}=e.loginAndPaymentFlow,{step:me}=e.videoPlayer,he=c.geo_restricted&&!c.geo_restricted.allowed;if((0,r.useEffect)((()=>{l&&c.id!=l&&c.seo_string!=l&&void 0!==l&&U({id:l})}),[l,U,c]),(0,r.useEffect)((()=>{c.playback_url&&[1,2].includes(me)&&e.setStep(3)}),[me,e,c]),(0,r.useEffect)((()=>{!h||c.playback_url||d||c.id!=l&&c.seo_string!==l||0===me||(U({id:l}),Y(2))}),[h]),(0,r.useEffect)((()=>{1!==me||!h||c.playback_url||d||e.setStep(2)}),[U,l,c.playback_url,d,e,me,h]),d)return(0,a.jsx)(R.default,{color:H.color,children:(0,a.jsx)(v.A,{style:{height:"88vh",minHeight:"840px"},verticalAlign:"middle",children:(0,a.jsx)(v.A.Row,{children:(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(w.default,{inverted:!0})})})})});if(null!==p)return(0,a.jsx)("div",{children:"Something went wrong."});const ge={element:"staylive_player",type:"video",objectID:c.id,autoplay:!i||"1"===i,muted:!1,debug:!1,fillMode:!1,poster:c.thumbnail,logotype:J,video:c};!c.advertising&&se&&(ge.vast=se);const ye=c.subscription&&c.subscription.general_access.length?c.subscription.general_access.map((e=>e.id)).toString():"",xe=c.packages?c.packages.map((e=>e.id)).toString():"",be=!c.playback_url;return 2===me?(0,a.jsxs)(a.Fragment,{children:[te(c),(0,a.jsx)(R.default,{color:H.color,image:c.thumbnail,children:(0,a.jsx)(v.A,{verticalAlign:"middle",style:{padding:"120px 0 60px 0"},children:(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[(0,a.jsx)("div",{style:W({margin:"0 auto",maxWidth:"550px",background:"#fafafa",padding:"20px 8px"},ce.style),children:(0,a.jsx)(D.default,{content:c,type:"videos",title:c.name,termsAndConditions:ue,price:c.price,currency:c.currency,paymentIntent:c.payment.stripe.intent,successCallback:()=>e.getVideo({id:l}),label:oe,links:le,button:ie,text:de,subscriptions:q&&!c.subscribers_only?"":ye,packages:K?"":xe,subscribersOnly:c.subscribers_only,creditCardPaneTitle:pe})}),(0,a.jsx)("div",{style:{margin:"10px auto 0 auto",maxWidth:"550px"},children:(0,a.jsx)(f.A,{fluid:!0,style:{border:"2px solid white",background:"none",color:"white",marginLeft:0},onClick:()=>Y(0),children:(0,a.jsx)("strong",{children:(0,a.jsx)(u.A,W({},T.default.cancel))})})})]})})})})]}):1===me?(0,a.jsxs)(a.Fragment,{children:[te(c),(0,a.jsx)(R.default,{color:H.color,image:c.thumbnail,style:{minHeight:"100%"},children:(0,a.jsx)(v.A,{verticalAlign:"middle",style:{padding:"120px 0 60px 0"},children:(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[(0,a.jsx)("div",{style:W({margin:"0 auto",maxWidth:"550px",background:"#fff",padding:"20px 8px",borderRadius:"6px"},ce.style),children:(0,a.jsx)(L.default,{label:oe,links:le,termsAndConditions:ue,button:ie,text:de.style,forceLoginFirst:!0})}),(0,a.jsx)("div",{style:{margin:"10px auto 0 auto",maxWidth:"550px"},children:(0,a.jsx)(f.A,{fluid:!0,style:{border:"2px solid white",background:"none",color:"white",marginLeft:0},onClick:()=>Y(0),children:(0,a.jsx)("strong",{children:(0,a.jsx)(u.A,W({},T.default.cancel))})})})]})})})})]}):(0,a.jsxs)(a.Fragment,{children:[te(c),(0,a.jsx)(R.default,{color:H.color,image:c.thumbnail,children:(0,a.jsx)(v.A,{style:{padding:"120px 0 60px 0",minHeight:"100%"},verticalAlign:"middle",children:(0,a.jsx)(v.A.Row,{style:{maxWidth:Z,margin:"0 auto"},textAlign:"center",children:(0,a.jsx)(v.A.Column,{style:{padding:0},textAlign:"center",verticalAlign:"middle",children:(0,a.jsx)(v.A,{style:{maxWidth:Z},verticalAlign:"middle",children:(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[(3===me||!be)&&!he&&(0,a.jsxs)(a.Fragment,{children:[!m&&(0,a.jsx)(E.default,{setup:ge}),(0,a.jsxs)(v.A.Row,{columns:1,style:W({padding:"20px",textAlign:"left",color:"#00274a"},ce.style),children:[(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{as:"h1",children:c.name})}),(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{as:"h6",children:(0,a.jsx)("span",{role:"button",style:{cursor:"pointer"},tabIndex:-1,onKeyPress:()=>{},onClick:()=>t(`/tournament?name=${c.channelPath}`),children:c.channelName})})}),(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{as:"p",style:W({marginTop:"12px"},de.style),children:(0,a.jsx)(V.default,{date:c.publish_date||c.created_at,time:!!m})})}),(0,a.jsxs)(v.A.Column,{style:{margin:"20px auto"},className:"styledText",children:[B.active&&(0,a.jsx)(Q,{children:(0,a.jsxs)("span",{children:[(0,a.jsx)(j.A,{name:c.verified?B.verified.icon:B.notverified.icon}),c.verified?(0,a.jsx)(b.default,{text:B.verified.name}):(0,a.jsx)(b.default,{text:B.notverified.name})]})}),c.origin&&(0,a.jsx)(Q,{style:{margin:"0 0 0 12px"},children:(0,a.jsxs)("span",{children:[(0,a.jsx)(j.A,{name:"camera"}),(0,a.jsx)(u.A,W({},T.default.replay))]})})]}),(0,a.jsx)(v.A.Column,{style:{marginTop:"8px"},children:(0,a.jsx)(k.default,{as:"p",style:de.style,text:c.description})}),(0,a.jsxs)(v.A.Column,{style:{marginTop:"8px"},children:[(0,a.jsx)(N.default,{}),(0,a.jsx)(P.default,{}),c.download_url&&(0,a.jsxs)(f.A,{target:"_blank",style:X(W({},ie.style),{paddingTop:"5px",paddingBottom:"5px",width:"auto"}),href:c.download_url,icon:!0,children:[(0,a.jsx)(j.A,{name:"download"}),(0,a.jsx)("span",{style:{marginLeft:"8px"},children:"Download video"})]})]})]})]}),0===me&&be&&(0,a.jsx)("div",{style:W({background:"white",maxWidth:"850px",margin:"0 auto",padding:"32px 22px",color:"#00274a"},ce.style),children:(0,a.jsxs)(v.A,{verticalAlign:"middle",style:{height:"100%"},children:[(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[(0,a.jsx)(k.default,{as:"h1",style:{fontWeight:"bold"},children:c.name}),(0,a.jsx)("br",{}),(0,a.jsx)(k.default,{as:"h5",style:{cursor:"pointer"},children:c.channelName}),(0,a.jsx)("br",{}),(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{as:"p",style:W({marginTop:"0px"},de.style),children:(0,a.jsx)(V.default,{date:c.created_at,time:!1})})})]})}),(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[B.active&&(0,a.jsx)(Q,{children:(0,a.jsxs)("span",{children:[(0,a.jsx)(j.A,{name:c.verified?B.verified.icon:B.notverified.icon}),c.verified?(0,a.jsx)(b.default,{text:B.verified.name}):(0,a.jsx)(b.default,{text:B.notverified.name})]})}
85),c.origin&&c.origin.length>0&&(0,a.jsx)(Q,{style:{margin:"0 0 0 12px"},className:"styledText",children:(0,a.jsxs)("span",{children:[(0,a.jsx)(j.A,{name:"camera"}),(0,a.jsx)(u.A,W({},T.default.replay))]})})]})}),(0,a.jsx)(v.A.Row,{children:(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{style:de.style,as:"p",text:`<StringLimit limit={100}>${c.description}</StringLimit>`})})}),(0,a.jsx)(v.A.Row,{children:(0,a.jsxs)(v.A.Column,{children:[be&&!he&&0===c.price&&1===c.requires_login&&0===c.subscribers_only&&!h&&(0,a.jsx)(ee,{style:W({color:"white",background:"#FF1A5A"},z.style),href:(0,O.dE)(),children:(0,a.jsx)("strong",{children:(0,a.jsx)(u.A,W({},T.default.signInToAccount))})}),be&&!he&&ye&&(!q||1===c.subscribers_only)&&(0,a.jsx)(ee,{style:W({color:"white",background:"#FF1A5A"},z.style),onClick:()=>ae?t(`/subscribe?cta=${window.location.pathname+window.location.search}`):Y(1),children:(0,a.jsx)("strong",{children:(0,a.jsx)(u.A,W({},T.default.startYourSubscription))})}),!c.subscribers_only&&!he&&c.price>0&&(0,a.jsx)(ee,{style:W({color:"white",background:"#FF1A5A"},G.style),className:q?"":"livestream-player-second-button",onClick:()=>ae?t(`/checkout?v=${c.seo_string||c.id}&cta=${window.location.pathname+window.location.search}`):Y(1),children:(0,a.jsx)("strong",{style:{textTransform:"uppercase"},children:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(u.A,X(W({},T.default.buySeparatelyFor),{values:{price:(0,a.jsx)("span",{className:"ml-2",children:(0,$.O)(c.price_with_discount_applied||c.price,c.currency)})}}))})})}),be&&1===c.subscribers_only&&!he&&0===c.price&&!ye.length&&(0,a.jsx)(ee,{onClick:()=>ae?t(c.subscription.general_access.length>0?`/subscribe?cta=${window.location.pathname+window.location.search}`:`/checkout?cta=${window.location.pathname+window.location.search}\n &v=${c.seo_string||c.id}`):Y(1),style:W({color:"white",background:"#FF1A5A"},z.style),children:(0,a.jsx)("strong",{children:(0,a.jsx)(u.A,W({},T.default.unlockNow))})}),he&&(0,a.jsx)(k.default,{children:(0,a.jsx)(u.A,W({},T.default.videoIsNotAvailableInCountry))})]})}),!h&&!he&&(0,a.jsx)(v.A.Row,{children:(0,a.jsx)(v.A.Column,{children:(0,a.jsx)(k.default,{as:"p",children:(0,a.jsx)(o.N_,{style:{cursor:"pointer",textDecoration:"underline",color:"#000"},role:"button",to:(0,O.dE)(),children:(0,a.jsx)(u.A,W({},T.default.signInToAccount))})})})})]})})]})})})})})})}),!d&&(0,a.jsxs)("div",{style:{width:"100%",padding:"40px 0",background:e.relatedContent.background||H.color},children:[c.collectionCategories&&c.collectionCategories[0]&&(0,a.jsx)(_.default,{type:"videos",header:{title:`${c.collectionCategories[0].name}`,style:W({color:e.relatedContent.title.color},e.relatedContent.title.style),as:e.relatedContent.title.as||"h2"},dateLabel:e.relatedContent.liveLabel.upcoming,collectionCategory:c.collectionCategories[0].id,customHref:ne.videos,designType:e.relatedContent.designType,cardHeader:e.relatedContent.cardHeader,cardSubHeader:e.relatedContent.cardSubHeader}),c.collectionCategories&&!c.collectionCategories[0]&&c.categories&&c.categories[0]&&(0,a.jsx)(_.default,{type:"videos",header:{title:`${c.categories[0].name}`,style:W({color:e.relatedContent.title.color},e.relatedContent.title.style),as:e.relatedContent.title.as||"h2"},dateLabel:e.relatedContent.liveLabel.upcoming,category:c.categories[0].id,customHref:ne.videos,designType:e.relatedContent.designType,cardHeader:e.relatedContent.cardHeader,cardSubHeader:e.relatedContent.cardSubHeader}),!e.hideChannelVideos&&(0,a.jsx)(_.default,{type:"videos",header:{title:x.formatMessage(e.relatedContent.translations&&e.relatedContent.translations.videosFrom?g.default[e.relatedContent.translations.videosFrom]:T.default.videosFrom,{channel:c.channelName}),style:W({color:e.relatedContent.title.color},e.relatedContent.title.style),as:e.relatedContent.title.as||"h2"},dateLabel:e.relatedContent.liveLabel.upcoming,channels:[c.channel],customHref:ne.videos,designType:e.relatedContent.designType,cardHeader:e.relatedContent.cardHeader,cardSubHeader:e.relatedContent.cardSubHeader}),!e.hideChannelLivestreams&&(0,a.jsx)(I.default,{type:"livestreams",header:{title:x.formatMessage(e.relatedContent.translations&&e.relatedContent.translations.livestreamsFrom?g.default[e.relatedContent.translations.livestreamsFrom]:T.default.livestreamsFrom,{channel:c.channelName}),style:W({color:e.relatedContent.title.color},e.relatedContent.title.style),as:e.relatedContent.title.as||"h2"},liveLabel:e.relatedContent.liveLabel||null,channels:[c.channel],customHref:ne.livestreams,designType:e.relatedContent.designType,cardHeader:e.relatedContent.cardHeader,cardSubHeader:e.relatedContent.cardSubHeader})]})]})}se.propTypes={loginAndPaymentFlow:l().object,videoPlayer:l().object,relatedContent:l().object,getVideo:l().func,shadow:l().object,verifiedlabels:l().object,subscriptionbutton:l().object,ppvbutton:l().object,setStep:l().func,intl:l().object,logotypeOverlay:l().object,disableSubscriptions:l().bool,disablePackages:l().bool,defaultvast:l().string,urlIdentifierParam:l().string,hideChannelLivestreams:l().bool,hideChannelVideos:l().bool,customHref:l().object,useNewCheckout:l().bool};const ae=(0,m.j8)({videoPlayer:(0,U.default)()}),re=(0,d.Ng)(ae,(function(e){return{dispatch:e,getVideo:t=>e((0,H.getVideoAction)(t)),setStep:t=>e((0,H.setStepAction)(t))}})),ne=(0,h.Zz)(re,r.memo)((0,p.Ay)(se))},73705:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(40784);const n={loading:!0,error:null,video:{id:0},step:0,isUpcoming:!1},o=(e=n,t)=>(0,a.Ay)(e,(e=>{switch(t.type){case r.GET_VIDEO:e.loading=!0,e.error=null,e.video.id=t.payload.id,e.step=0;break;case r.GET_VIDEO_SUCCESS:e.isUpcoming=!1,e.loading=!1,e.error=null,e.video=t.payload.message;break;case r.GET_VIDEO_ERROR:e.isUpcoming=!1,e.loading=!1,e.error=t.payload,e.video=n.video;break;case r.GET_UPCOMING_VIDEO:e.loading=!1,e.video=t.payload.message,e.isUpcoming=!0;break;case r.SET_STEP:e.step=t.payload}}))},31105:(e,t,s)=>{s.r(t),s.d(t,{default:()=>p,getVideo:()=>u});var a=s(43786),r=s(72748),n=s(32689),o=s(30727),i=s(24100),l=s(86663),d=s(40784),c=s(6090);function*u(e){const{id:t}=e.payload,s=yield(0,a.T1)(o.k0),{embed:d}=l.parse(window.location.search);try{const e=`${n.DEFAULT_STAYLIVE_API}videos/${t}${d?`?embed=${d}`:""}`,o=yield(0,a.T1)(r.Ay,e,{method:"GET",headers:{Authorization:s?`Bearer ${s}`:"","Content-Type":"application/json"}});o.message.list_before_publish_date&&new Date((0,i.u4)(o.message.publish_date))>
85new Date?yield(0,a.yJ)((0,c.getUpcomingVideoAction)(o)):yield(0,a.yJ)((0,c.getVideoSuccessAction)(o))}catch(e){yield(0,a.yJ)((0,c.getVideoErrorAction)(e))}}function*p(){yield(0,a.p8)(d.GET_VIDEO,u)}},12539:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectVideoPlayerDomain:()=>n});var a=s(1081),r=s(73705);const n=e=>e.videoPlayer||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},98052:(e,t,s)=>{s.r(t),s.d(t,{submitVoucherAction:()=>r,submitVoucherErrorAction:()=>o,submitVoucherSuccessAction:()=>n});var a=s(45418);function r(e){return{type:a.SUBMIT_VOUCHER,payload:e}}function n(e){return{type:a.SUBMIT_VOUCHER_SUCCESS,payload:e}}function o(e){return{type:a.SUBMIT_VOUCHER_ERROR,payload:e}}},45418:(e,t,s)=>{s.r(t),s.d(t,{SUBMIT_VOUCHER:()=>a,SUBMIT_VOUCHER_ERROR:()=>n,SUBMIT_VOUCHER_SUCCESS:()=>r});const a="app/VoucherForm/SUBMIT_VOUCHER",r="app/VoucherForm/SUBMIT_VOUCHER_SUCCESS",n="app/VoucherForm/SUBMIT_VOUCHER_ERROR"},9044:(e,t,s)=>{s.r(t),s.d(t,{VoucherForm:()=>N,default:()=>k});var a=s(74848),r=s(96540),n=s(5556),o=s.n(n),i=s(16683),l=s(67438),d=s(3279),c=s(1081),u=s(82960),p=s(40260),m=s(74980),h=s(23615),g=s(73574),y=s(35907),x=s(89736),b=s(12870),f=s(98052),v=s(43241),j=s(6095),C=s(66895),S=s(98407),A=Object.defineProperty,T=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,_=(e,t,s)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,O=(e,t)=>{for(var s in t||(t={}))w.call(t,s)&&_(e,s,t[s]);if(T)for(var s of T(t))E.call(t,s)&&_(e,s,t[s]);return e};class N extends r.PureComponent{constructor(){var e;super(...arguments),_(this,"symbol"!=typeof(e="state")?e+"":e,{voucher:""})}render(){const{loading:e,error:t,success:s}=this.props.voucherForm,{type:r,id:n,intl:o,button:i,label:d,collectionId:c}=this.props;return this.props.successCallback&&s&&this.props.successCallback(),s?(0,a.jsx)(h.A,{children:(0,a.jsx)(h.A.Row,{children:(0,a.jsx)(h.A.Column,{children:(0,a.jsxs)(g.A,{icon:!0,positive:!0,size:"small",children:[(0,a.jsx)(y.A,{name:"check circle",size:"small"}),(0,a.jsxs)(g.A.Content,{children:[(0,a.jsx)(g.A.Header,{children:(0,a.jsx)(l.A,O({},S.default.voucherSuccess))}),(0,a.jsx)(l.A,O({},S.default.voucherSuccessDescription))]})]})})})}):(0,a.jsx)(x.A,{onSubmit:()=>this.props.submitVoucher({voucher:this.state.voucher,type:r,id:n,collectionId:c}),children:(0,a.jsxs)(h.A,{children:[t&&(0,a.jsx)(h.A.Row,{children:(0,a.jsx)(h.A.Column,{children:(0,a.jsx)(g.A,{negative:!0,content:(0,a.jsx)(l.A,O({},S.default.voucherError)),size:"small"})})}),(0,a.jsx)(h.A.Row,{style:{margin:"0px auto",padding:"2px 0"},children:(0,a.jsx)(h.A.Column,{style:{margin:"6px auto"},children:(0,a.jsxs)(x.A.Field,{children:[(0,a.jsx)("label",{htmlFor:"phonenumber",style:O({},d.style),children:(0,a.jsx)(l.A,O({},S.default.voucher))}),(0,a.jsx)(x.A.Input,{name:"voucher",id:"voucher",placeholder:o.formatMessage(S.default.voucherPlaceholder),type:"text",value:this.state.voucher,onChange:(e,{value:t})=>this.setState({voucher:t}),required:!0,icon:"gift",iconPosition:"left",fluid:!0})]})})}),(0,a.jsx)(h.A.Row,{children:(0,a.jsx)(h.A.Column,{children:(0,a.jsxs)(b.A,{fluid:!0,type:"submit",disabled:e,loading:e,icon:!0,labelPosition:"left",style:O({marginLeft:0},i.style),children:[(0,a.jsx)(y.A,{name:"unlock alternate"}),(0,a.jsx)("strong",{children:(0,a.jsx)(l.A,O({},S.default.useVoucher))})]})})})]})})}}N.propTypes={dispatch:o().func.isRequired,type:o().string,id:o().number,intl:o().object,currency:o().string,theme:o().object,submitVoucher:o().func,successCallback:o().func,voucherForm:o().object,label:o().object,button:o().object,collectionId:o().number},N.defaultProps={theme:{primaryColor:"blue"}};const P=(0,c.j8)({voucherForm:(0,v.default)()}),V=(0,i.Ng)(P,(function(e){return{dispatch:e,submitVoucher:t=>e((0,f.submitVoucherAction)(t))}})),I=(0,m.A)({key:"voucherForm",reducer:j.default}),R=(0,p.A)({key:"voucherForm",saga:C.default}),k=(0,u.Zz)(I,R,V)((0,d.Ay)(N))},98407:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.VoucherForm",n=(0,a.YK)({voucher:{id:`${r}.voucher`,defaultMessage:"Voucher"},voucherPlaceholder:{id:`${r}.voucherPlaceholder`,defaultMessage:"Enter your voucher here"},useVoucher:{id:`${r}.useVoucher`,defaultMessage:"USE VOUCHER"},voucherSuccess:{id:`${r}.voucherSuccess`,defaultMessage:"Unlock succeeded!"},voucherSuccessDescription:{id:`${r}.voucherSuccessDescription`,defaultMessage:"The content is now unlocked"},voucherError:{id:`${r}
85.voucherError`,defaultMessage:"Voucher is not valid. Check that you typed the voucher correctly and try again."}})},6095:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,initialState:()=>n});var a=s(64852),r=s(45418);const n={loading:!1,success:!1,error:null},o=(e=n,t)=>(0,a.Ay)(e,(e=>{switch(t.type){case r.SUBMIT_VOUCHER:e.loading=!0,e.success=!1,e.error=null;break;case r.SUBMIT_VOUCHER_SUCCESS:e.loading=!1,e.success=!0,e.error=null;break;case r.SUBMIT_VOUCHER_ERROR:e.loading=!1,e.success=!1,e.error=t.payload}}))},66895:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u,submitVoucher:()=>c});var a=s(43786),r=s(72748),n=s(17386),o=s(30727),i=s(32689),l=s(98052),d=s(45418);function*c(e){const t=yield(0,a.T1)(o.k0),{type:s,id:d,voucher:c}=e.payload;try{let e="video";if("livestreams"!==s&&"LIVESTREAM"!==s&&"LIVESTREAMS"!==s&&"livestream"!==s||(e="livestream"),!d)throw Error("no id provided");const n=`${i.DEFAULT_STAYLIVE_API}coupons/${e}/${d}`;yield(0,a.T1)(r.Ay,n,{method:"POST",body:JSON.stringify({coupon:c}),headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}}),yield(0,a.yJ)((0,l.submitVoucherSuccessAction)())}catch(s){try{const s=yield(0,a.Lt)((0,n.makeSelectPlatform)()),{collectionId:o}=e.payload,d=`${i.DEFAULT_STAYLIVE_API}coupons/collection/${o||s.metadata.platform.id}`,u=yield(0,a.T1)(r.Ay,d,{method:"POST",body:JSON.stringify({coupon:c}),headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});yield(0,a.yJ)((0,l.submitVoucherSuccessAction)(u))}catch(e){yield(0,a.yJ)((0,l.submitVoucherErrorAction)(e))}}}function*u(){yield(0,a.p8)(d.SUBMIT_VOUCHER,c)}},43241:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o,selectVoucherFormDomain:()=>n});var a=s(1081),r=s(6095);const n=e=>e.voucherForm||r.initialState,o=()=>(0,a.Mz)(n,(e=>e))},47053:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var a=s(74848),r=s(96540),n=s(51449),o=s(5556),i=s.n(o),l=s(24100),d=s(24326),c=s(16683),u=s(17386),p=s(1081),m=s(84976),h=s(96541),g=s(24712),y=s(74751);const x=(0,p.j8)({theme:(0,u.makeSelectTheme)()});function b({item:e,cardClasses:t,linkClasses:s,onRemove:o}){var i,u,p,b;const{theme:f}=(0,c.d4)(x),v=(0,h.A)(),[j,C]=(0,r.useState)(!1),S=(0,r.useRef)(null),A=null!=(u=null==(i=null==f?void 0:f.contentHref)?void 0:i.videos)?u:"/videos/";return(0,r.useEffect)((()=>{if(j)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){S.current&&!S.current.contains(e.target)&&C(!1)}}),[j]),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)(m.N_,{to:`${A}${null==e?void 0:e.id}${(null==(p=null==e?void 0:e.watch_history)?void 0:p.playlist_uid)?`?playlist=${null==(b=null==e?void 0:e.watch_history)?void 0:b.playlist_uid}`:""}`,className:`flex-1 min-w-0 ${s}`,children:[(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"relative overflow-hidden rounded-md",children:(0,a.jsxs)("div",{className:"h-28 aspect-video",children:[(0,a.jsx)("img",{className:"object-cover w-full h-full",src:null==e?void 0:e.thumbnail,alt:"thumbnail"}),(0,a.jsx)(n.default,{videoLength:null==e?void 0:e.duration}),(0,a.jsx)(d.default,{item:e,progressbarClasses:t.progressbarClasses})]})})}),(0,a.jsxs)("div",{className:"flex flex-col justify-center ml-3",children:[(0,a.jsx)("p",{className:t.cardTitleClasses,children:null==e?void 0:e.name}),(0,a.jsx)("p",{className:t.cardDescriptionClasses,children:(0,l.$J)(null==e?void 0:e.description)})]})]}),(0,a.jsxs)("div",{ref:S,className:"relative flex-shrink-0 ml-3",children:[(0,a.jsx)("button",{type:"button",onClick:e=>{e.preventDefault(),C((e=>!e))},"data-testid":"history-card-menu-btn","aria-haspopup":"true","aria-expanded":j,"aria-label":v.formatMessage(y.default.removeFromHistory),className:"p-1 text-3xl bg-transparent border-none cursor-pointer text-zinc-400 hover:text-zinc-700",children:(0,a.jsx)(g.default,{icon:["fas","ellipsis-vertical"]})}),j&&(0,a.jsx)("div",{role:"menu",className:"absolute right-0 z-50 py-1 bg-white border border-gray-100 rounded-md shadow-lg min-w-max",children:(0,a.jsxs)("button",{type:"button",role:"menuitem",onClick:()=>{C(!1),o(null==e?void 0:e.id)},"data-testid":"history-card-remove-btn",className:"flex items-center w-full px-3 py-2 text-sm text-left text-red-600 border-none rounded cursor-pointer hover:bg-red-100 whitespace-nowrap",children:[(0,a.jsx)(g.default,{icon:["fas","trash-can"],className:"mr-2"}),v.formatMessage(y.default.removeFromHistory)]})})]})]})}b.propTypes={item:i().shape({id:i().string.isRequired,thumbnail:i().string.isRequired,duration:i().number.isRequired,name:i().string.isRequired,description:i().string}),linkClasses:i().string,onRemove:i().func.isRequired,cardClasses:i().shape({progressbarClasses:i().string,cardTitleClasses:i().string,cardDescriptionClasses:i().string})}},35695:(e,t,s)=>{s.r(t),s.d(t,{default:()=>N});var a=s(74848),r=s(96540),n=s(96541),o=s(67438),i=s(36078),l=s(15422),d=s(5556),c=s.n(d),u=s(11721),p=s(26840),m=s(24100),h=s(16683),g=s(1081),y=s(17386),x=s(72748),b=s(60799),f=s(47053),v=s(74751),j=Object.defineProperty,C=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,T=(e,t,s)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,w=(e,t)=>{for(var s in t||(t={}))S.call(t,s)&&T(e,s,t[s]);if(C)for(var s of C(t))A.call(t,s)&&T(e,s,t[s]);return e},E=(e,t,s)=>new Promise(((a,r)=>
85{var n=e=>{try{i(s.next(e))}catch(e){r(e)}},o=e=>{try{i(s.throw(e))}catch(e){r(e)}},i=e=>e.done?a(e.value):Promise.resolve(e.value).then(n,o);i((s=s.apply(e,t)).next())}));const _=(0,g.j8)({platform:(0,y.makeSelectPlatform)()});function O(e,t){const s=new Date(e)-new Date,r=Math.ceil(s/864e5);if(-1*r>1)return(0,a.jsx)(p.default,{date:e,time:!1});const n=t.formatRelativeTime(r,"day",{numeric:"auto"});return(0,a.jsx)("span",{children:n.charAt(0).toUpperCase()+n.slice(1)})}function N({wrapperClasses:e="w-full py-6 mx-auto my-20 md:max-w-4xl",containerClasses:t="px-4 py-6 bg-white rounded-md",headerClasses:s="mb-6 text-3xl font-medium leading-6 text-zinc-900",dateLabelClasses:d="text-lg font-medium text-zinc-800 pt-6",noHistoryLabelClasses:c="text-lg text-zinc-800",linkClasses:p="flex rounded-md hover:bg-gray-100 hover:cursor-pointer",cardClasses:g={cardTitleClasses:"mb-2 text-lg font-medium text-zinc-900 line-clamp-1 md:line-clamp-2",cardDescriptionClasses:"m-0 text-sm leading-5 line-clamp-2 md:line-clamp-3 text-zinc-700",progressbarClasses:"bg-primary"},paginationSettings:y={activeClasses:"text-md sm:text-xl font-medium text-primary underline",nextAndPrevButton:"font-semibold text-gray-900",pageClasses:"p-1.5 text-gray-900 text-md sm:text-xl"}}){const[j,C]=(0,r.useState)(0),S=(0,n.A)(),{platform:A}=(0,h.d4)(_),{data:T,pagination:N,isValidating:P,mutate:V}=(0,i.d)({limit:10,page:j+1}),I=e=>E(this,null,(function*(){try{yield(0,x.tX)(`platforms/${A.uid}/watch-history/${e}`);const t=yield V();b.Ay.success((0,a.jsx)(o.A,w({},v.default.removeSuccess))),0===(null==t?void 0:t.length)&&j>0&&C((e=>e-1))}catch(e){b.Ay.error((0,a.jsx)(o.A,w({},v.default.removeError)))}}));return P?(0,a.jsx)("div",{className:e,children:(0,a.jsxs)("div",{className:t,children:[(0,a.jsx)("h3",{className:s,children:(0,a.jsx)(o.A,w({},v.default.watchHistory))}),(0,a.jsx)(l.default,{})]})}):(0,a.jsx)("div",{className:e,children:(0,a.jsxs)("div",{className:t,children:[(0,a.jsx)("h3",{className:s,children:(0,a.jsx)(o.A,w({},v.default.watchHistory))}),T&&0!==T.length||P?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col space-y-6",children:T.map(((e,t)=>(0,a.jsxs)("div",{children:[(0,m.z6)(e.watch_history.updated_at,0!==t?T[t-1].watch_history.updated_at:null)&&(0,a.jsx)("p",{className:d,children:O(e.watch_history.updated_at,S)}),(0,a.jsx)(f.default,{item:e,linkClasses:p,cardClasses:g,onRemove:I},e.watch_history.id||`${e.id}-${t}`)]},e.id)))}),(null==N?void 0:N.totalPages)>1&&(0,a.jsx)(u.default,{activeClassName:y.activeClasses,previousAndNextClassName:y.nextAndPrevButton,pageClassName:y.pageClasses,currentPage:j,totalItems:null==N?void 0:N.totalCount,itemsPerPage:null==T?void 0:T.length,pageCount:null==N?void 0:N.totalPages,onPagination:e=>{C(e)}})]}):(0,a.jsx)("div",{className:c,children:(0,a.jsx)(o.A,w({},v.default.noWatchHistory))})]})})}N.propTypes={wrapperClasses:c().string,containerClasses:c().string,headerClasses:c().string,dateLabelClasses:c().string,noHistoryLabelClasses:c().string,linkClasses:c().string,cardClasses:c().shape({cardTitleClasses:c().string,cardDescriptionClasses:c().string,progressbarClasses:c().string}),paginationSettings:c().shape({activeClasses:c().string,nextAndPrevButton:c().string,pageClasses:c().string})}},74751:(e,t,s)=>{s.r(t),s.d(t,{default:()=>n,scope:()=>r});var a=s(11164);const r="app.containers.WatchhistoryPage",n=(0,a.YK)({watchHistory:{id:`${r}.watchHistory`,defaultMessage:"Watch History"},noWatchHistory:{id:`${r}.noWatchHistory`,defaultMessage:"No watch history available."},removeFromHistory:{id:`${r}.removeFromHistory`,defaultMessage:"Remove from watch history"},removeError:{id:`${r}.removeError`,defaultMessage:"Failed to remove video. Please try again."},removeSuccess:{id:`${r}.removeSuccess`,defaultMessage:"Video removed from watch history."}})}}]);
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.