PageSourceSearch

https://www.bwfc.co.uk/modules/custom/clubcast_streamamg/js/commons/components.21ae02cf26ab8b22413b.js

js bwfc.co.uk collected 2026-10-01 11:33:01 UTC 24,575 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkclubcast=self.webpackChunkclubcast||[]).push([[606526],{941691(e,t,i){i.d(t,{A:()=>p});i(681278),i(423500);var r=i(296540),a=i(380492),s=i(15605),n=i(807851),l=i(111687),o=i(474848);function d(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function c(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function p(e){const{section:t,title:i,feedId:p,styles:u,settings:m,viewAllLabel:h,viewAllLink:y,onClick:g,showView:v=!0}=e,f=(0,r.useRef)(null),b=(0,r.useRef)(null),_=(0,r.useCallback)(e=>{if(!t.itemData.length)return;let i=e.target.closest("[data-entryid]");if(!e.target.closest(".glide__track").contains(i))return;let r=i.getAttribute("data-entryid"),a=t.itemData.find(e=>e.mediaData.entryId==r);a&&g&&g(e,i.getAttribute("feedid"),i.getAttribute("sectionid"),a)},[g,t]);(0,r.useEffect)(()=>{b.current&&b.current.update({startAt:0})},[t]),(0,r.useEffect)(()=>{if(!f.current)return null;const e=new s.Ay(f.current,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?d(Object(i),!0).forEach(function(t){c(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):d(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}({type:"carousel",center:"center",startAt:0,keyboard:!1},m.cmCarouselSettings));return e.mount({Swipe:s.Hp,Images:s.To,Anchors:s.ds,Controls:s.H2,Keyboard:s.s3,Breakpoints:s.Rp,A11y:n.A,ArrowDisabler:l.A}),b.current=e,()=>{e.destroy(),b.current=null}},[f,m]);let x=0,j=["o-videos","o-videos--carousel","o-videos--small-carousel"];u.forEach(e=>{e.startsWith("limit-")?x=Number(e.substring(6)):j.push(`o-videos--carousel--${e}`)});let D=t.itemData;return x>0&&(D=D.slice(0,x)),(0,r.useEffect)(()=>{document.querySelectorAll(".o-videos__article.glide__slide").forEach(e=>{e.removeAttribute("aria-hidden")})},[D]),(0,o.jsxs)("div",{className:j.join(" "),children:[(0,o.jsx)("h2",{className:"o-videos__section-title",children:(0,o.jsx)("span",{children:i})}),(0,o.jsx)("div",{className:"o-videos__inner",children:(0,o.jsxs)("div",{className:"glide",ref:f,children:[(0,o.jsx)("div",{className:"visually-hidden","data-glide-el":"live-region"}),(0,o.jsx)("div",{className:"glide__track","data-glide-el":"track",onClick:_,children:(0,o.jsx)("div",{className:"glide__slides no-bullet",children:D.map(e=>(0,o.jsx)("div",{className:"o-videos__article glide__slide",children:(0,o.jsx)(a.A,{feedId:p,sectionId:t.id,item:e,displayType:"carousel",displayStyles:u})},e.id))})}),0!=t.itemData.length?(0,o.jsx)("ul",{className:"m-glide-bullets glide__bullets","data-glide-el":"controls[nav]",children:t.itemData.map((e,t)=>(0,o.jsx)("li",{children:(0,o.jsx)("button",{className:"glide__bullet","data-glide-dir":"="+t,children:(0,o.jsxs)("span",{className:"show-for-sr",children:["Item ",t+1]})})},e.id))}):null,(0,o.jsxs)("div",{className:"glide__arrows","data-glide-el":"controls",children:[(0,o.jsx)("button",{className:"glide__arrow glide__arrow--left","data-glide-dir":"<",children:(0,o.jsx)("span",{className:"show-for-sr",children:Drupal.t("Previous",{},{context:"Previous item from the list"})})}),(0,o.jsx)("button",{className:"glide__arrow glide__arrow--right","data-glide-dir":">",children:(0,o.jsx)("span",{className:"show-for-sr",children:Drupal.t("Next",{},{context:"Next item from the list"})})})]})]})}),v?(0,o.jsx)("div",{className:"o-videos__btn-wrapper",children:(0,o.jsx)("a",{href:null!=y?y:`/video/section?feed=${e.feedId}&section=${e.section.id}`,className:"button o-videos__view-all",children:null!=h?h:Drupal.t("View all",{},{context:"View all the information"})})}):null]},t.id)}},380492(e,t,i){i.d(t,{A:()=>D});var r=i(173032),a=i.n(r),s=i(296540),n=(i(123792),i(327495),i(725440),i(423500),i(962953),i(459475)),l=i(435047),o=i(242062),d=i(432720),c=i(368395),p=i(602095),u=i(474848);function m(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class h extends s.Component{constructor(...e){super(...e),m(this,"onClick",e=>{this.props.onClick&&this.props.onClick(e,this.props.feedId,this.props.sectionId,this.props.item)})}getThumbnailUrl(e,t){return`${this.props.item.mediaData.thumbnailUrl.replace(/\/$/,"")}/width/${e}/height/${t}/type/2?updated_at=${(0,l._)((0,o.O)(this.props.item.publicationData.updatedAt))}`}getThumbnail(){if(!this.props.item.mediaData.thumbnailUrl)return null;let e={400:this.getThumbnailUrl(400,225),800:this.getThumbnailUrl(800,450)};return(0,u.jsx)(n.A,{imageObj:e,imageSizes:"33vw",lazyLoad:!0})}isFreemium(){return this.props.item.metaData.SysEntryEntitlements&&this.props.item.metaData.SysEntryEntitlements.includes("?")}isPremium(){return!(this.isFreemium||this.props.item.metaData.SysEntryEntitlements&&this.props.item.metaData.SysEntryEntitlements.includes("*"))}getPublishedDateTime(e){return(0,d.m)(new Date,new Date(e))<=7?(0,c.k)(new Date(e),new Date,{addSuffix:!0}):(0,p.AD)(new Date(e),"dd/MM/yyyy")}convertSeconds(e){let t=Math.floor(e/3600),i=Math.floor(e%3600/60),r=e%60;return t>0?(i<10&&(i="0"+i),`${t}:${i} hrs`):i>0?(r<10&&(r="0"+r),`${i}:${r} mins`):`${r} secs`}playIcon(){return(0,u.jsxs)("svg",{width:"46",height:"46",viewBox:"0 0 46 46",children:[(0,u.jsx)("defs",{children:(0,u.jsx)("path",{id:"play-arrow-icon-a",d:"M23 40c-9.389 0-17-7.611-17-17S13.611 6 23 6s17 7.611 17 17-7.611 17-17 17zm6-17l-10-5v10l10-5z"})}),(0,u.jsxs)("g",{fillRule:"evenodd",children:[(0,u.jsx)("circle",{cx:"23",cy:"23",r:"20",fill:"#FFF"}),(0,u.jsx)("mask",{id:"play-arrow-icon-b",fill:"#fff",children:(0,u.jsx)("use",{href:"#play-arrow-icon-a"})}),(0,u.jsx)("use",{href:"#play-arrow-icon-a"}),(0,u.jsx)("g",{mask:"url(#play-arrow-icon-b)",children:(0,u.jsx)("path",{d:"M0 0h46v46H0z"})})]})]})}truncateText(e){return e&&e.length>120?e.substring(0,120)+"...":e}render(){var e,t;let i=["m-video-card",`m-video-card--${this.props.displayType?this.props.displayType:"list"}`];
1null===(e=this.props.displayStyles)||void 0===e||e.forEach(e=>{i.push(`m-video-card--${e}`)}),this.props.item.metaData.SysEntryEntitlements.forEach(e=>{null!==e&&("?"===e?i.push("m-video-card--free"):"*"===e?i.push("m-video-card--requires-login"):i.push(`m-video-card--entitlement-${e.toLowerCase()}`))});let r="";return this.props.feedId&&this.props.sectionId&&(r=`?feed=${this.props.feedId}&section=${this.props.sectionId}`),(0,u.jsxs)("a",{href:`/video/player/${this.props.item.mediaData.entryId}${r}`,"data-feedid":this.props.feedId,"data-sectionid":this.props.sectionId,"data-entryid":this.props.item.mediaData.entryId,className:i.join(" "),onClick:this.onClick,children:[(0,u.jsxs)("div",{className:"m-video-card__thumbnail",children:[(0,u.jsx)("div",{className:"m-video-card__image-container",children:this.getThumbnail()}),(0,u.jsx)("span",{className:"m-video-card__play-icon",children:this.playIcon()}),this.props.item.metaData.VideoDuration>0?(0,u.jsx)("span",{className:"m-video-card__duration",children:this.convertSeconds(this.props.item.metaData.VideoDuration)}):null,(0,u.jsxs)("span",{className:"m-video-card__message",children:[this.isFreemium()?"Login to watch!":null,this.isPremium()?"Please subscribe to watch!":null,this.isFreemium()||this.isPremium()?null:"Free to watch!"]})]}),(0,u.jsxs)("div",{className:"m-video-card__details",children:[(0,u.jsx)("span",{className:"m-video-card__play-icon",children:this.playIcon()}),null!==(t=this.props.item.metaData.category)&&void 0!==t&&t.length?(0,u.jsx)("span",{className:"m-video-card__category",children:this.props.item.metaData.category}):null,(0,u.jsx)("span",{className:"m-video-card__title","aria-hidden":"true",children:this.props.item.metaData.title}),(0,u.jsx)("span",{className:"m-video-card__summary",children:this.truncateText(this.props.item.metaData.body)}),this.props.item.metaData.VideoDuration>0?(0,u.jsx)("span",{className:"m-video-card__duration",children:this.convertSeconds(this.props.item.metaData.VideoDuration)}):null,(0,u.jsx)("span",{className:"m-video-card__publish-date",children:this.getPublishedDateTime(this.props.item.publicationData.releaseFrom)}),(0,u.jsx)("span",{className:"m-video-card__tags",children:this.props.item.metaData.tags.join(", ")})]})]})}}const y=h;i(681278);var g=i(812541);function v(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function f(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?v(Object(i),!0).forEach(function(t){b(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function b(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class _ extends s.Component{constructor(...e){super(...e),b(this,"onClick",e=>{this.props.onClick&&this.props.onClick(e,this.props.feedId,this.props.sectionId,this.props.item)})}getThumbnailUrl(e,t){return`${this.props.item.mediaData.thumbnailUrl.replace(/\/$/,"")}/width/${e}/height/${t}/type/3?updated_at=${(0,l._)((0,o.O)(this.props.item.publicationData.updatedAt))}`}getThumbnail(){if(!this.props.item.mediaData.thumbnailUrl)return null;let e={400:this.getThumbnailUrl(400,225),800:this.getThumbnailUrl(800,450)};return(0,u.jsx)(n.A,{imageObj:e,imageSizes:"33vw",lazyLoad:!0})}isFreemium(){return this.props.item.metaData.SysEntryEntitlements&&this.props.item.metaData.SysEntryEntitlements.includes("?")}isPremium(){return!(this.isFreemium||this.props.item.metaData.SysEntryEntitlements&&this.props.item.metaData.SysEntryEntitlements.includes("*"))}getPublishedDateTime(e){return(0,d.m)(new Date,new Date(e))<=7?(0,c.k)(new Date(e),new Date,{addSuffix:!0}):(0,p.AD)(new Date(e),"dd/MM/yyyy")}getPublishedDateTimeFull(e){return(0,d.m)(new Date,new Date(e))<=7?(0,c.k)(new Date(e),new Date,{addSuffix:!0}):(0,g.GP)(new Date(e),"EEEE, d MMMM, yyyy")}convertSeconds(e){let t=Math.floor(e/3600),i=Math.floor(e%3600/60),r=e%60;return t>0?(i<10&&(i="0"+i),r<10&&(r="0"+r),`${t}:${i}:${r}`):i>0?(r<10&&(r="0"+r),`${i}:${r}`):(r<10&&(r+="0"+r),`${i}:${r}`)}truncateText(e){return e&&e.length>120?e.substring(0,120)+"...":e}render(){var e,t,i;let r=["m-video-card",`m-video-card--${this.props.displayType?this.props.displayType:"list"}`];
1null===(e=this.props.displayStyles)||void 0===e||e.forEach(e=>{r.push(`m-video-card--${e}`)});let a=!1;this.props.item.metaData.SysEntryEntitlements.forEach(e=>{null!==e&&("?"===e?r.push("m-video-card--free"):"*"===e?r.push("m-video-card--requires-login"):(a=!0,r.push(`m-video-card--entitlement-${e.toLowerCase()}`)))}),a&&r.push("m-video-card--entitlement");let s="";this.props.feedId&&this.props.sectionId&&(s=`?feed=${this.props.feedId}&section=${this.props.sectionId}`);const n={href:`/video/player/${this.props.item.mediaData.entryId}${s}`,"data-feedid":this.props.feedId,"data-sectionid":this.props.sectionId,"data-entryid":this.props.item.mediaData.entryId,onClick:this.onClick};return(0,u.jsxs)("article",{className:r.join(" "),children:[(0,u.jsx)("a",f(f({className:"m-video-card__link"},n),{},{children:(0,u.jsx)("h3",{className:"m-video-card__title visually-hidden",children:this.props.item.metaData.title})})),(0,u.jsxs)("div",{className:"m-video-card__container",children:[(0,u.jsxs)("div",{className:"m-video-card__thumbnail",children:[(0,u.jsx)("div",{className:"m-video-card__image-container",children:this.getThumbnail()}),this.props.item.metaData.VideoDuration>0?(0,u.jsx)("span",{className:"m-video-card__duration",children:this.convertSeconds(this.props.item.metaData.VideoDuration)}):null]}),(0,u.jsxs)("div",{className:"m-video-card__details",children:[(null===(t=this.props.item.metaData.category)||void 0===t?void 0:t.length)>0?(0,u.jsx)("span",{className:"m-video-card__category",children:this.props.item.metaData.category}):(0,u.jsx)(u.Fragment,{children:(null===(i=this.props.item.metaData.categories)||void 0===i?void 0:i.length)>0?(0,u.jsx)("span",{className:"m-video-card__category",children:this.props.item.metaData.categories[0]}):null}),(0,u.jsx)("h3",{className:"m-video-card__title","aria-hidden":"true",children:this.props.item.metaData.title}),this.props.item.metaData.VideoDuration>0?(0,u.jsx)("span",{className:"m-video-card__duration",children:this.convertSeconds(this.props.item.metaData.VideoDuration)}):null,(0,u.jsx)("span",{className:"m-video-card__publish-date",children:this.getPublishedDateTime(this.props.item.publicationData.releaseFrom)}),(0,u.jsx)("span",{className:"m-video-card__publish-date-full",children:this.getPublishedDateTimeFull(this.props.item.publicationData.releaseFrom)})]})]})]})}}const x=_;class j extends s.Component{clubcastVersion(){return"v2"===a().clubcastStreamamg.cloudMatrix.cmVersion}render(){return(0,u.jsx)(u.Fragment,{children:this.clubcastVersion()?(0,u.jsx)(x,{feedId:this.props.feedId,sectionId:this.props.sectionId,item:this.props.item,displayType:this.props.displayType,displayStyles:this.props.displayStyles}):(0,u.jsx)(y,{feedId:this.props.feedId,sectionId:this.props.sectionId,item:this.props.item,displayType:this.props.displayType,displayStyles:this.props.displayStyles})})}}const D=j},257897(e,t,i){i.d(t,{A:()=>d});i(123792),i(962953);var r=i(296540),a=i(941669),s=i.n(a),n=i(474848);function l(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class o extends r.Component{constructor(...e){super(...e),l(this,"removeMessage",e=>{let t=s()(e.target).closest(".close-button").data("key");void 0!==t&&this.props.removeMessage(t)})}render(){return this.props.messages.length?(0,n.jsx)("div",{className:"c-messages",children:this.props.messages.map(e=>(0,n.jsxs)("div",{role:"alert","data-closable":!0,className:"m-callout callout alert-callout-border "+(e.type||"alert"),children:[(0,n.jsx)("span",{className:"m-callout__title font-bold",children:e.title})," - ",e.message," ",e.linkUrl?(0,n.jsx)("a",{href:e.linkUrl,className:"m-callout__link font-bold",children:e.linkText||e.linkUrl}):null,e.persistent?null:(0,n.jsx)("button",{className:"m-callout__close close-button","aria-label":"Dismiss message",type:"button","data-close":!0,"data-key":e.key,onClick:this.removeMessage,children:(0,n.jsx)("span",{"aria-hidden":"true",children:"×"})})]},e.key))}):null}}const d=o},416509(e,t,i){i.d(t,{A:()=>
1o});i(123792),i(962953);var r=i(296540),a=i(941669),s=i.n(a),n=i(474848);function l(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class o extends r.Component{constructor(...e){super(...e),l(this,"handlePage",e=>{e.preventDefault();let t=s()(e.target).data();"pageIndex"in t&&this.props.setPage(t.pageIndex)}),l(this,"handlePagePrev",e=>{e.preventDefault(),this.props.setPage(this.props.pageIndex-1)}),l(this,"handlePageNext",e=>{e.preventDefault(),this.props.setPage(this.props.pageIndex+1)}),l(this,"getPage",e=>e==this.props.pageIndex?(0,n.jsx)("b",{children:e+1},e):(0,n.jsx)("a",{"data-key":e,href:"#",onClick:this.handlePage,children:e+1},e))}getPrev(){return(0,n.jsx)("li",{class:"m-pagination__control m-pagination__control--prev",children:(0,n.jsxs)("button",{class:"m-pagination__control-link m-pagination__link",title:Drupal.t("Go to previous page"),rel:"prev",onClick:this.handlePagePrev,children:[(0,n.jsx)("span",{class:"m-pagination__control-heading",children:Drupal.t("Previous Page")}),(0,n.jsx)("span",{class:"m-pagination__control-text",children:Drupal.t("@previous_page of @total_pages",{"@previous_page":0===this.props.pageIndex?1:this.props.pageIndex,"@total_pages":this.props.pageCount})})]})})}getNext(){return(0,n.jsx)("li",{className:"m-pagination__control m-pagination__control--next",children:(0,n.jsxs)("button",{className:"m-pagination__control-link m-pagination__link",title:Drupal.t("Go to next page"),rel:"next",onClick:this.handlePageNext,children:[(0,n.jsx)("span",{className:"m-pagination__control-heading",children:Drupal.t("Next Page")}),(0,n.jsx)("span",{className:"m-pagination__control-text",children:Drupal.t("@next_page of @total_pages",{"@next_page":this.props.pageIndex+2,"@total_pages":this.props.pageCount})})]})})}getPages(){let e=Math.min(Math.max(0,this.props.pageIndex-1),Math.max(0,this.props.pageCount-5)),t=Math.min(this.props.pageCount,e+5),i=[];if(e==t)return null;for(let r=e;r<t;r++)r==this.props.pageIndex?i.push((0,n.jsx)("li",{className:"m-pagination__item is-active",children:(0,n.jsx)("strong",{className:"m-pagination__current",children:r+1})},r)):i.push((0,n.jsx)("li",{className:"m-pagination__item",children:(0,n.jsx)("a",{className:"m-pagination__link","data-page-index":r,href:"#",onClick:this.handlePage,children:r+1},r)},r));return i}render(){let e=["m-pagination"];return this.props.styleModifier&&e.push(`m-pagination--${this.props.styleModifier}`),(0,n.jsxs)("div",{className:e.join(" "),children:[(0,n.jsx)("h4",{className:"visually-hidden",children:Drupal.t("Pagination")}),(0,n.jsxs)("ul",{className:"m-pagination__items",children:[this.props.pageIndex>0?this.getPrev():null,this.getPages(),this.props.pageIndex<this.props.pageCount-1?this.getNext():null]})]})}}},867264(e,t,i){i.d(t,{A:()=>g});i(123792),i(962953);var r=i(173032),a=i.n(r),s=i(296540),n=i(297715),l=i(987914),o=i.n(l),d=i(333092),c=i(507992),p=i(84478),u=i(15751),m=i(474848),h=0,y=new n.m(1);function g(e){const{entryId:t,autoplay:i,type:r,onFinished:a}=e,n=(0,s.useRef)(),[l,p]=(0,s.useState)(null),[g,v]=(0,s.useState)(null),[f,b]=(0,s.useState)(!0),[_,x]=(0,s.use
1State)(null),j=(0,u.gF)(),D=f||!l&&!g;return(0,s.useEffect)(()=>{j&&t!==(null==_?void 0:_.entryId)&&x({entryId:t,loginState:j})},[l,_,t,j]),(0,s.useEffect)(()=>{(h+=1)==Number.MAX_SAFE_INTEGER&&(h=0);const e=`video-player-${Number(new Date)}-${h}`,t=document.createElement("div");t.setAttribute("id",e),n.current.appendChild(t);let r=null,a=!1;return y.subscribe(()=>{a?t.remove():window.Playback.player(e,{autoplay:!o()(i)||i,muted:!o()(i)||i}).then(e=>{a?e.destroy().then(()=>{t.remove()}):(r=e,p(e))}).catch(i=>{if(a)return console.error("[StreamAMG:Player] Initialisation error (ignored as already destroyed)",e,i),void t.remove();console.error("[StreamAMG:Player] Initialisation error",e,i),p(null),v(i),b(!1)})}),()=>{t.style.display="none",r?r.destroy().then(()=>{t.remove()}):a=!0}},[n,i,t]),(0,s.useEffect)(()=>l&&a?(l.on("PlaybackPlayerFinished",a),()=>{l.off("PlaybackPlayerFinished",a)}):null,[l,a]),(0,s.useEffect)(()=>{var e;if(!l||!_)return null;b(!0);let t=!1;return l.play(_.entryId,null===(e=_.loginState)||void 0===e?void 0:e.authToken).then(()=>{t||(v(null),b(!1))}).catch(e=>{t?console.error("[StreamAMG:Player] Play error (ignored as already destroyed)",e):(console.error("[StreamAMG:Player] Playback error",e),v(e),b(!1))}),()=>{t=!0}},[l,_]),(0,m.jsx)("div",{className:`m-video-player m-video-player--${r||"video"} ${g?"m-video-player--error":""}`,children:(0,m.jsx)("div",{className:"m-video-player__container",children:(0,m.jsxs)(d.Ay,{className:"m-video-player__loader",loading:D,children:[g?(0,m.jsx)(c.A,{error:g}):null,(0,m.jsx)("div",{ref:n,className:"m-video-player__video",style:g?{display:"none"}:{}})]})})})}(0,p.A)("streamamg-playback-sdk",()=>window.Playback).subscribe(()=>{window.Playback.initialize(a().clubcastStreamamg.clubcastPlayer.playbackKey),y.next(!0)})},507992(e,t,i){i.d(t,{A:()=>l});var r=i(173032),a=i.n(r),s=i(474848);const n={NOT_AUTHENTICATED:{getActions:e=>[{text:Drupal.t("Login"),href:e.loginUrl,type:"primary"},{text:Drupal.t("Register"),href:e.registerUrl,type:"secondary"}],defaultTitle:Drupal.t("Please login or create an account"),defaultMessage:Drupal.t("To view this media you need an account, please login or register.")},NO_SUBSCRIPTION:{getActions:e=>[{text:Drupal.t("View Packages"),href:e.packagesUrl,type:"primary"}].filter(e=>e.href),defaultTitle:Drupal.t("Subscription required"),defaultMessage:Drupal.t("To view this content you need a paid subscription.")},NO_ENTITLEMENT:{getActions:e=>[{text:Drupal.t("View Packages"),href:e.packagesUrl}].filter(e=>e.href),defaultTitle:Drupal.t("Subscription required"),defaultMessage:Drupal.t("This content is not included with any of your current subscriptions. Check out some of our other packages.")},NO_ENTITY_EXIST:{getActions:()=>[],defaultTitle:Drupal.t("Unavailable"),defaultMessage:Drupal.t("We're sorry, this content is currently unavailable.")},TOO_MANY_DEVICES:{getActions:()=>[],defaultTitle:Drupal.t("Too many devices"),defaultMessage:Drupal.t("We're sorry, we can only stream content to you on a limited number of devices and you are already streaming this content on other devices. Please contact us if you require more information.")},NO_MOBILE:{getActions:()=>[],defaultTitle:Drupal.t("Not supported"),defaultMessage:Drupal.t("We're sorry, this content is not available to view on mobile devices.")},OFFLINE:{getActions:()=>[],titleKey:"OFFLINE_title",messageKey:"OFFLINE_message",defaultTitle:Drupal.t("Offline"),defaultMessage:Drupal.t("Come back later for our next live stream.")}};function l(e){var t,i;const{error:r}=e,{name:l}=r,o=(null===(t=a().clubcastStreamamg)||void 0===t?void 0:t.ui_settings)||{},d=(null===(i=a().clubcastStreamamg)||void 0===i?void 0:i.clubcastPlayer)||{};let c=[],p=Drupal.t("Playback Error"),u=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:Drupal.t("A problem was encountered while trying to play this video. Please try again later or contact us if the issue persists.")}),(0,s.jsx)("p",{children:(0,s.jsx)("i",{children:Drupal.t("Code: @errorcode",{"@errorcode":l})})})]});if(n[l]){var m;const e=n[l];c=e.getActions(d),p=o[`${l}_title`]||e.defaultTitle;const t=(null===(m=o[`${l}_message`])||void 0===m?void 0:m.value)||e.defaultMessage;u=(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:t}}),(0,s.jsx)("p",{children:(0,s.jsx)("i",{children:Drupal.t("Code: @errorcode",{"@errorcode":l})})})]})}return(0,s.jsxs)("div",{className:"m-video-player__error","aria-live":"polite",children:[(0,s.jsx)("div",{className:"m-video-player__error-icon"}),(0,s.jsxs)("div",{className:"m-video-player__error-copy",children:[(0,s.jsx)("h1",{className:"m-video-player__error-title",children:p}),(0,s.jsx)("div",{className:"m-video-player__error-message",children:u}),c.length?(0,s.jsx)("div",{className:"m-video-player__error-action-list",children:c.map((e,t)=>(0,s.jsx)("a",{href:e.href,className:`m-video-player__error-action button ${e.type}`,children:e.text},t))}):null]})]})}}}]);
2//# sourceMappingURL=components.21ae02cf26ab8b22413b.js.map

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.