(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{"5Sd5":function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("Siuj"),o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=function(e){function t(){var e,n,r;l(this,t);for(var i=arguments.length,c=Array(i),d=0;d0){var r=function(e,t){var n=l(e,t,a.Ub),r=n.eventId,i=n.provider;return{videoEventId:r,videoProvider:a.qi[i]||null}}(e,t),i=r.videoEventId,c=r.videoProvider,u=l(e,t,a.Vb),d=u.provider,m=u.eventId;return o.Ld&&(n=e.some((function(e){return"GBVISION"===e.get("provider")&&e.get("type")===a.Tb}))),{vizEventId:d===a.Rb?m:null,performEventId:d===a.qi.PERFORM_V2?m:null,statsEventId:s(e,a.Sb,a.Wb,t),videoEventId:i,videoProvider:c,audioCommentaryAvailable:n}}return{vizEventId:null,statsEventId:null,videoEventId:null,audioCommentaryAvailable:n}}))},Cmpn:function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("5Sd5"),o=Object.assign||function(e){for(var t=1;t0?n.get(0,0).toString():"",p2Nsets:n.size>0?n.get(1,0).toString():""})}))},FknV:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF");t.a=i.a.div.withConfig({componentId:"sc-5xo8o4-0"})(["font-size:",";color:",";"],Object(a.K)(24),(function(e){return e.visualizationArea?o.yl:o.Rm}))},IgcK:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1x7ccw5-0"})(["color:",";font-size:",";"],o.Sl,Object(a.K)(28));t.a=c},MHjO:function(e,t,n){"use strict";var r=n("tOpy"),i=n("FvK5"),a=n("Siuj"),o=Object.assign||function(e){for(var t=1;th.size&&(h=h.push("empty")),h.size>g.size&&(g=g.push("empty"));g.size>5;)g=g.shift();for(;h.size>5;)h=h.shift()}var v={};if(s.size){var b=s.first().getIn(["statistics","leaguePosition"]),E=s.last().getIn(["statistics","leaguePosition"]),O=s.first().getIn(["statistics","form"],Object(i.List)()),S=s.last().getIn(["statistics","form"],Object(i.List)());b&&E&&(v.teamOneLeaguePosition=b,v.teamTwoLeaguePosition=E),O.size>0&&S.size>0&&(v.teamOneLastFiveGamesForm=O,v.teamTwoLastFiveGamesForm=S)}return o({},e,v,{hRedCards:l,aRedCards:u,teamOnePenalties:g.toArray(),teamTwoPenalties:h.toArray(),teamOneTotalPenaltyGoals:p,teamTwoTotalPenaltyGoals:f,teamOneScore:a.get(0,""),teamTwoScore:a.get(1,""),score:a.toList()})}))},MSyb:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("iZzW"),o=n("Qi1R"),c=n("wurE"),s=n.n(c),l=n("rOcY"),u=n("g6nF"),d=s.a.div.withConfig({componentId:"sc-1forjg9-0"})(["display:flex;justify-content:center;padding:",";",";"],Object(o.K)(0,4),(function(e){var t=e.headerRow,n=e.periodFinished,r=e.highestScore,i=e.mainScore,a=e.withScore,s=e.currentSetScore,d=e.eventFinished,m=e.firstColumn,p="",f=30;return d?p=u.hn:s?p=l.y?u.u:u.Sl:n||t||a||(p=u.u),l.C&&m&&(f=110),Object(c.css)(["",";",";color:",";width:",";"],t&&"padding-bottom: "+Object(o.K)(2),(n&&r||i)&&"font-weight: bold",p,Object(o.K)(f))})),m=s.a.div.withConfig({componentId:"sc-1forjg9-1"})(["position:relative;top:",";right:",";font-size:",";margin:0;"],Object(o.K)(-12),Object(o.K)(4),Object(o.K)(20)),p=function(e){var t=e.gameScore,n=e.tieBreakEnding,o=e.highestScore,c=e.periodFinished,s=e.headerRow,l=e.mainScore,u=e.text,p=e.withScore,f=e.currentSetScore,g=e.eventFinished,h=e.firstColumn;return i.a.createElement(r.Fragment,null,i.a.createElement(d,{highestScore:o,periodFinished:c,headerRow:s,mainScore:l,withScore:p,currentSetScore:f,eventFinished:g,firstColumn:h},i.a.createElement(a.a,{id:t||u})),n&&i.a.createElement(m,null,n))};p.defaultProps={highestScore:!1};var f=p;t.a=f},Rqpn:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-10y2rsg-0"})(["position:relative;left:",";top:",";height:",";width:",";border-radius:50%;background-color:",";visibility:",";"],Object(a.K)(10),Object(a.K)(14),Object(a.K)(12),Object(a.K)(12),(function(e){return e.serve?o.u:"transparent"}),(function(e){return e.servingIndicatorVisible?"visible":"hidden"}));t.a=c},WBb7:function(e,t,n){"use strict";var r=n("mpt1"),i=n("Qi1R"),a=n("mXGw"),o=n.n(a),c=n("wurE"),s=n.n(c),l=n("rOcY"),u=n("g6nF"),d=s.a.iframe.attrs((function(e){return{scrolling:i.Ld||e.showScrolling||e.pageInModal?"auto":"no"}})).withConfig({componentId:"dxxfk7-0"})(["display:block;width:100%;border:0;",";"],(function(e){if(e.fullScreenView)return Object(c.css)(["height:100vh;"]);if(e.pageInModal){var t=e.bottomOffset+l.mc+4;return Object(c.css)(["height:calc(90vh - ",");"],Object(i.K)(t))}if(e.height&&!1===e.rulesLoaded)return Object(c.css)(["height:0;"]);if(e.height)return Object(c.css)(["height:",";"],e.height);if(i.Ld&&!e.height&&!1===e.rulesLoaded)return Object(c.css)(["height:0;"]);var n=e.bottomOffset+(e.hasBottomNavigation?l.x+l.gc:0)+(e.hasLoginBar?l.Ib:0)+(e.hasTopBar?l.ob:4+l.mc);return Object(c.css)(["height:calc(100vh - ",");"],Object(i.K)(n))})),m=s.a.div.withConfig({componentId:"dxxfk7-1"})(["box-sizing:border-box;z-index:1;color:",";background-color:",";",";",";",";",";"],u.Sl,u.Oh,(function(e){if(!e.pageInModal&&e.height&&0!==e.height){var t=e.height<600?"100%":Object(i.K)(Object(i.le)(e.height));return Object(c.css)(["height:",";"],t)}return null}),(function(e){return!e.fullScreenView&&!e.noPaddings&&Object(c.css)(["border:"," solid ",";"],Object(i.K)(2),u.yl)}),(function(e){return e.noMargins?Object(c.css)([""]):Object(c.css)(["margin-bottom:",";"],i.Ld&&Object(i.K)(36))}),(function(e){return e.hasTopNavigation?Object(c.css)(["padding-top:",";"],Object(i.K)(80)):null})),p=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["url","onRef","fullScreenView","hasBottomNavigation","hasTopNavigation","hasTopBar","hasLoginBar","bottomOffset","containerHeight","iframeHeight"]);return o.a.createElement(m,p({hasBottomNavigation:i,hasTopNavigation:a,fullScreenView:r,height:u},g),o.a.createElement(d,p({src:t,ref:n,fullScreenView:r,hasBottomNavigation:i,hasTopBar:c,hasLoginBar:s,bottomOffset:l,height:f},g)))}}]),t}(a.PureComponent);v.defaultProps={onRef:function(){},fullScreenView:!1,hasBottomNavigation:!1,hasTopNavigation:!1,hasTopBar:!1,hasLoginBar:!1,bottomOffset:0};var b=v,E={componentDidUpdate:function(e){var t=this.props,n=t.heightPx,r=t.rerenderLocked,i=t.setContainerHeight,a=t.setIframeHeight,o=t.setRerenderLocked;r||e.heightPx===n||(i(n),a("100%"),o(!0),setTimeout((function(){o(!1)}),50))}},O=Object(r.compose)(Object(r.setDisplayName)("IFrameContainer"),Object(r.withState)("rerenderLocked","setRerenderLocked",!1),Object(r.withState)("containerHeight","setContainerHeight",0),Object(r.withState)("iframeHeight","setIframeHeight",(function(e){var t=e.iframeHeight;return t||(i.Ld?null:"100vh")})),Object(r.lifecycle)(E),Object(r.mapProps)((function(e){return{url:e.url,onRef:e.onRef,fullScreenView:e.fullScreenView,hasBottomNavigation:e.hasBottomNavigation,hasTopNavigation:e.hasTopNavigation,hasTopBar:e.hasTopBar,hasLoginBar:e.hasLoginBar,bottomOffset:e.bottomOffset,pageInModal:e.pageInModal,rulesLoaded:e.rulesLoaded,onLoad:e.onLoad,onError:e.onError,showScrolling:e.showScrolling,containerHeight:e.containerHeight,iframeHeight:e.iframeHeight,noPaddings:e.noPaddings,noMargins:e.noMargins}})))(b);t.a=O},WDf2:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("wurE"),o=n.n(a),c=n("Qi1R"),s=n("g6nF"),l=o.a.div.withConfig({componentId:"sc-1ldbxjj-0"})(["display:inline-block;margin-right:",";border-radius:50%;",";",";"],Object(c.K)(6),(function(e){var t=e.mevView?12:16;return Object(a.css)(["height:",";width:",";"],Object(c.K)(t),Object(c.K)(t))}),(function(e){var t=e.goal;return"empty"===t?Object(a.css)(["border:"," solid ",";background-color:",";"],Object(c.K)(2),s.kn,s.in):Object(a.css)(["background-color:",";"],Number(t)?s.jn:s.kn)})),u=o.a.span.withConfig({componentId:"sc-1ldbxjj-1"})(["margin-left:",";font-weight:bold;color:",";line-height:1;"],Object(c.K)(6),(function(e){return e.inplay?s.u:s.Sl})),d=o.a.div.withConfig({componentId:"sc-1ldbxjj-2"})(["display:flex;align-items:center;justify-content:flex-start;width:",";"],(function(e){return e.mevView?Object(c.K)(100):Object(c.K)(120)})),m=o()(d).withConfig({componentId:"sc-1ldbxjj-3"})(["justify-content:flex-end;width:fit-content;"]),p=function(e){var t=e.penaltyShoots,n=void 0===t?[]:t,r=e.mevView,a=void 0!==r&&r,o=e.penaltyScore,c=void 0===o?null:o,s=e.inplay,p=void 0!==s&&s;return i.a.createElement(m,null,i.a.createElement(d,{mevView:a},n.map((function(e,t){return i.a.createElement(l,{key:t,goal:e,mevView:a})}))),c>=0&&i.a.createElement(u,{inplay:p},c))};t.a=p},"Y1g+":function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("Qi1R"),c=n("tOpy"),s=n("FvK5"),l=n("bVOX"),u=Object(c.createSelector)(l.a,(function(e,t){return e.getIn(["removedEntities","events"],Object(s.Set)()).includes(t)}),(function(e,t){var n=e.get("scoreboard",Object(s.Map)()).get("timer",Object(s.Map)()),r=e.getIn(["eventNotes","isScoreBoardTimerVisible"],!0);return{inplay:e.get("inplay",!1),clockValue:n.get("value",0),clockCountsDown:n.get("countsDown",!1),clockValueTimestamp:Object(o.Tc)(n.get("timestamp","")),clockVisible:n.get("visible",!0)&&r,timerRunning:!t&&!n.get("stopped",!0),timerExist:n.size>0}})),d=n("wurE"),m=n.n(d).a.span.withConfig({componentId:"vnimhi-0"})(["white-space:nowrap;margin-left:0 !important;"]),p=function(){function e(e,t){for(var n=0;n span{",";}"],Object(o.K)(40),Object(o.K)(4),p)),b=i.a.div.withConfig({componentId:"pqag6n-4"})(["display:flex;align-items:center;height:",";font-size:",";padding-top:",";& > span{padding-top:",";line-height:1;}& > span:last-of-type{padding-right:",";}"],Object(o.K)(32),Object(o.K)(28),Object(o.K)(12),Object(o.K)(o.Wd===a.zb?0:4),Object(o.K)(16)),E=i.a.div.withConfig({componentId:"pqag6n-5"})(["display:flex;flex-direction:column;justify-content:center;align-items:stretch;",";"],f),O=i()(E).withConfig({componentId:"pqag6n-6"})(["flex:0;align-items:center;justify-content:flex-start;",";"],f),S=i.a.div.withConfig({componentId:"pqag6n-7"})(["display:flex;justify-content:",";align-items:center;padding:",";height:",";margin-bottom:",";",";"],(function(e){return e.centrifyContent?"center":"flex-end"}),Object(o.K)(0,4),Object(o.K)(40),Object(o.K)(4),p),I=i()(S).withConfig({componentId:"pqag6n-8"})(["color:",";"],(function(e){return e.eventFinished?c.hn:c.u})),w=i.a.div.withConfig({componentId:"pqag6n-9"})(["display:flex;flex-direction:column;justify-content:center;font-weight:bold;",";"],f),y=i.a.div.withConfig({componentId:"pqag6n-10"})(["min-width:",";color:",";text-align:center;line-height:",";border-radius:",";"],Object(o.K)(46),(function(e){return e.eventFinished?c.hn:c.u}),Object(o.K)(40),Object(o.K)(4)),j=(i.a.div.withConfig({componentId:"pqag6n-11"})(["font-weight:bold;"]),i.a.div.withConfig({componentId:"pqag6n-12"})(["font-weight:bold;color:",";min-width:",";padding:",";text-align:center;"],c.u,Object(o.K)(32),Object(o.K)(0,4)),i()(m.a).withConfig({componentId:"pqag6n-13"})(["position:inherit;left:auto;top:auto;"]));t.l=i()(l.a).withConfig({componentId:"pqag6n-14"})(["justify-content:space-between;align-items:flex-end;width:100%;color:",";font-size:",";padding-left:",";min-width:0;"],c.Sl,Object(o.K)(28),Object(o.K)(32))},aZ8X:function(e,t,n){"use strict";n.d(t,"k",(function(){return u})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return m})),n.d(t,"f",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return h})),n.d(t,"b",(function(){return v})),n.d(t,"d",(function(){return b})),n.d(t,"i",(function(){return E}));var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=n("IgcK"),s=n("xlnk"),l=n("Rqpn"),u=function(e){return e.sevScoreboard&&Object(r.css)(["text-align:left;white-space:normal;",""],Object(a.ub)(1))},d=i.a.div.withConfig({componentId:"sc-16os30c-0"})(["display:flex;justify-content:space-between;align-items:center;font-size:",";font-weight:",";line-height:1;margin-bottom:",";"],Object(a.K)(28),(function(e){return e.bold?"bold":"normal"}),Object(a.K)(4)),m=i()(d).withConfig({componentId:"sc-16os30c-1"})(["& > span{color:",";}"],o.ln),p=i.a.span.withConfig({componentId:"sc-16os30c-2"})(["margin-right:",";color:",";"],Object(a.K)(8),(function(e){var t=e.eventFinished,n=e.emptyScoreboard;return t||n?o.hn:o.u})),f=(i.a.div.withConfig({componentId:"sc-16os30c-3"})(["display:flex;align-items:center;"]),i()(s.a).withConfig({componentId:"sc-16os30c-4"})(["margin-right:",";font-size:",";line-height:",";font-weight:bold;text-align:center;color:",";",""],Object(a.K)(8),Object(a.K)(32),Object(a.K)(40),(function(e){return e.eventFinished?o.gn:o.Xn}),u));i.a.div.withConfig({componentId:"sc-16os30c-5"})(["display:flex;flex:1;flex-direction:column;justify-content:center;height:100%;"]).defaultProps={twoParticipants:!0};i()(c.a).withConfig({componentId:"sc-16os30c-6"})(["color:",";display:flex;line-height:1;white-space:nowrap;"],o.u),i.a.div.withConfig({componentId:"sc-16os30c-7"})(["display:flex;justify-content:center;margin-bottom:",";color:",";"],Object(a.K)(8),o.Sl),i.a.div.withConfig({componentId:"sc-16os30c-8"})(["font-size:",";font-weight:bold;color:",";"],Object(a.K)(36),o.Xn);var g=i()(l.a).withConfig({componentId:"sc-16os30c-9"})(["position:inherit;left:auto;top:auto;"]),h=i.a.div.withConfig({componentId:"sc-16os30c-10"})(["display:flex;position:relative;align-items:center;"]),v=i.a.div.withConfig({componentId:"sc-16os30c-11"})(["color:",";font-weight:normal;font-size:",";"],o.To,Object(a.K)(32)),b=i.a.div.withConfig({componentId:"sc-16os30c-12"})(["display:flex;align-items:center;margin-right:",";"],Object(a.K)(10)),E=i.a.div.withConfig({componentId:"sc-16os30c-13"})(["display:grid;grid-template-columns:",";font-size:",";line-height:1;margin-bottom:",";"],(function(e){return"minmax(0, 1fr) "+(e.hasForm&&Object(a.K)(92)||"")}),Object(a.K)(28),Object(a.K)(4));t.j=i.a.div.withConfig({componentId:"sc-16os30c-14"})(["width:100%;color:",";margin-left:",";"],o.u,Object(a.K)(32))},jedm:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("rOcY"),c=n("5Sd5"),s=n("xlnk"),l=n("9lff"),u=n("wurE"),d=n.n(u),m=n("Qi1R"),p=n("g6nF"),f=n("Rqpn"),g=n("zF6H"),h=n("YuNe"),v=function(e){return!e.inplay&&Object(u.css)(["color:",";"],p.Dl)},b=d()(h.f).withConfig({componentId:"sc-1ec3qhn-0"})(["flex:5;justify-content:flex-start;& *:last-child{margin-bottom:0;}"]),E=d()(f.a).withConfig({componentId:"sc-1ec3qhn-1"})(["top:0;left:0;"]),O=d.a.div.withConfig({componentId:"sc-1ec3qhn-2"})(["flex:1;min-width:0;padding-right:",";& *:last-child{margin-bottom:0;}"],Object(m.K)(8)),S=d()(g.a).withConfig({componentId:"sc-1ec3qhn-3"})(["flex:0;justify-content:flex-end;height:",";"],Object(m.K)(80)),I=d.a.div.withConfig({componentId:"sc-1ec3qhn-4"})(["",";padding-right:",";",";"],(function(e){return e.visualizationArea&&Object(u.css)(["color:",";"],p.yl)}),Object(m.K)(6),Object(m.N)()),w=d()(s.a).withConfig({componentId:"sc-1ec3qhn-5"})(["",";"],v),y=d.a.div.withConfig({componentId:"sc-1ec3qhn-6"})(["display:flex;justify-content:space-between;align-items:center;font-size:",";line-height:1;margin-bottom:",";"],Object(m.K)(28),Object(m.K)(12)),j=d()(s.a).withConfig({componentId:"sc-1ec3qhn-7"})(["display:flex;align-items:center;flex:1;margin-right:",";",";"],Object(m.K)(20),v),T=d()(h.h).withConfig({componentId:"sc-1ec3qhn-8"})(["justify-content:flex-start;flex:1;"]),R=d()(h.h).withConfig({componentId:"sc-1ec3qhn-9"})(["flex:0 0 ",";margin-right:",";& >:not(:last-child){margin-bottom:",";}"],Object(m.K)(50),(function(e){return e.margin?Object(m.K)(10):0}),Object(m.K)(8)),P=d()(h.c).withConfig({componentId:"sc-1ec3qhn-10"})(["margin-right:",";font-weight:",";& >:not(:last-child){margin-bottom:",";}"],Object(m.K)(10),(function(e){return e.bold?"bold":"normal"}),Object(m.K)(8)),M=d.a.div.withConfig({componentId:"sc-1ec3qhn-11"})(["display:flex;justify-content:center;align-items:center;line-height:",";",";"],Object(m.K)(32),(function(e){return e.headerRow&&Object(u.css)(["font-weight:normal;font-size:",";color:",";"],Object(m.K)(24),p.ln)})),A=d()(M).withConfig({componentId:"sc-1ec3qhn-12"})(["margin:0;"]),_=d.a.div.withConfig({componentId:"sc-1ec3qhn-13"})(["display:flex;justify-content:space-between;align-items:center;line-height:",";margin-bottom:",";"],Object(m.K)(32),Object(m.K)(12)),C=d.a.div.withConfig({componentId:"sc-1ec3qhn-14"})(["font-weight:bold;color:",";min-width:",";padding:",";text-align:center;"],p.u,Object(m.K)(32),Object(m.K)(0,4)),N=d.a.div.withConfig({componentId:"sc-1ec3qhn-15"})(["min-width:",";color:",";text-align:center;border-radius:",";"],Object(m.K)(46),(function(e){return e.eventFinished?p.hn:p.u}),Object(m.K)(4)),z=d.a.div.withConfig({componentId:"sc-1ec3qhn-16"})(["color:",";font-size:",";"],p.To,Object(m.K)(24)),V=d.a.div.withConfig({componentId:"sc-1ec3qhn-17"})(["display:flex;justify-content:space-between;width:100%;color:",";"],p.Sl),x=function(e){var t=e.cricketExist,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(c.a)(e,n)})),u=o.inplay,d=o.twoParticipants,m=o.eventName,p=o.teamOneName,f=o.teamTwoName,g=o.teamOneScore,h=o.teamTwoScore,v=o.showScore,b=o.eventFinished,S=o.p1Serve,w=o.p2Serve,T=o.servingIndicatorVisible;return i.a.createElement(O,null,d?i.a.createElement(r.Fragment,null,i.a.createElement(y,null,i.a.createElement(j,{inplay:u},i.a.createElement(I,null,p)),v&&i.a.createElement(A,null,i.a.createElement(l.a,{eventFinished:b},g||"-"),t&&i.a.createElement(E,{serve:S,servingIndicatorVisible:T}))),i.a.createElement(y,null,i.a.createElement(j,{inplay:u},i.a.createElement(I,null,f)),v&&i.a.createElement(A,null,i.a.createElement(l.a,{eventFinished:b},h||"-"),t&&i.a.createElement(E,{serve:w,servingIndicatorVisible:T})))):i.a.createElement(s.a,{inplay:u},m))},F=n("tGBs"),L=n("MSyb"),k=function(e){var t=e.withPoints,n=e.eventId,c=Object(a.useSelector)((function(e){return Object(F.a)(e,n)})),s=c.inplay,u=c.teamOneName,d=c.teamTwoName,m=c.p1CurrentScore,p=c.p2CurrentScore,f=c.p1Games,g=c.p2Games,h=c.p1Nsets,v=c.p2Nsets,O=c.p1Serve,I=c.p2Serve,y=c.servingIndicatorVisible,j=c.set,T=c.showStarted,A=c.showScore,C=c.eventProvider,z=c.eventFinished,x=z&&C===o.xe.LIVESCORE;return i.a.createElement(V,null,i.a.createElement(b,null,i.a.createElement(_,{inplay:s},i.a.createElement(w,{inplay:s},u)),i.a.createElement(_,{inplay:s},i.a.createElement(w,{inplay:s},d))),A&&!T&&i.a.createElement(r.Fragment,null,!x&&i.a.createElement(r.Fragment,null,s&&i.a.createElement(R,null,i.a.createElement(M,null,i.a.createElement(L.a,{gameScore:h,mainScore:!0})),i.a.createElement(M,null,i.a.createElement(L.a,{gameScore:v,mainScore:!0}))),t&&""!==f.get(j-1)&&i.a.createElement(R,null,i.a.createElement(M,null,i.a.createElement(L.a,{currentSetScore:!0,gameScore:f.get(j-1)})),i.a.createElement(M,null,i.a.createElement(L.a,{currentSetScore:!0,gameScore:g.get(j-1)}))),i.a.createElement(P,{bold:t},i.a.createElement(M,null,i.a.createElement(N,null,m),i.a.createElement(E,{serve:O,servingIndicatorVisible:y})),i.a.createElement(M,null,i.a.createElement(N,null,p),i.a.createElement(E,{serve:I,servingIndicatorVisible:y})))),x&&i.a.createElement(S,null,i.a.createElement(l.a,{eventFinished:z},h),i.a.createElement(l.a,{eventFinished:z},v))))};k.defaultProps={withPoints:!0,tableTennis:!1};var K=k,U=n("MHjO"),G=n("oRiN"),D=function(e){var t=e.inplay,n=e.visualizationArea,r=e.showScore,a=e.redCards,c=e.eventFinished,s=e.teamName,u=e.teamScore,d=e.leaguePosition;return i.a.createElement(y,null,i.a.createElement(j,{inplay:t},i.a.createElement(I,{visualizationArea:n},s),o.y&&!t&&i.a.createElement(z,null,Object(m.ic)(d)),i.a.createElement(G.a,{visualizationArea:n},a)),r&&i.a.createElement(l.a,{visualizationArea:n,eventFinished:c},u))},B=function(e){var t=e.visualizationArea,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(U.a)(e,n)})),c=o.inplay,l=o.eventName,u=o.twoParticipants,d=o.hRedCards,m=o.aRedCards,p=o.showScore,f=o.eventFinished,g=o.teamOneName,h=o.teamTwoName,v=o.teamOneScore,b=o.teamTwoScore,E=o.teamOneLeaguePosition,S=o.teamTwoLeaguePosition;return i.a.createElement(O,null,u?i.a.createElement(r.Fragment,null,i.a.createElement(D,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:d,teamName:g,teamScore:v,leaguePosition:E}),i.a.createElement(D,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:m,teamName:h,teamScore:b,leaguePosition:S})):i.a.createElement(s.a,{inplay:c},l))},H=n("WDf2"),W=function(e){var t=e.inplay,n=e.visualizationArea,r=e.showScore,a=e.eventFinished,c=e.redCards,s=e.teamName,u=e.teamScore,d=e.penaltiesExists,p=e.teamPenalties,f=e.teamTotalPenaltyGoals,g=e.leaguePosition;return i.a.createElement(y,null,i.a.createElement(j,{inplay:t},i.a.createElement(I,{visualizationArea:n},s),o.y&&!t&&i.a.createElement(z,null,Object(m.ic)(g)),i.a.createElement(G.a,{visualizationArea:n},c)),r&&(d?i.a.createElement(H.a,{mevView:!0,penaltyShoots:p,penaltyScore:f,inplay:t}):i.a.createElement(l.a,{visualizationArea:n,eventFinished:a}," ",u," ",d&&a&&"("+f+")")))},q=function(e){var t=e.visualizationArea,n=e.eventId,o=Object(a.useSelector)((function(e){return Object(U.a)(e,n)})),c=o.inplay,l=o.eventName,u=o.twoParticipants,d=o.hRedCards,m=o.aRedCards,p=o.showScore,f=o.eventFinished,g=o.penaltiesExists,h=o.teamOnePenalties,v=o.teamTwoPenalties,b=o.teamOneTotalPenaltyGoals,E=o.teamTwoTotalPenaltyGoals,S=o.teamOneName,I=o.teamTwoName,w=o.teamOneScore,y=o.teamTwoScore,j=o.teamOneLeaguePosition,T=o.teamTwoLeaguePosition;return i.a.createElement(O,null,u?i.a.createElement(r.Fragment,null,i.a.createElement(W,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:d,teamName:S,teamScore:w,penaltiesExists:g,teamPenalties:h,teamTotalPenaltyGoals:b,leaguePosition:j}),i.a.createElement(W,{inplay:c,visualizationArea:t,showScore:p,eventFinished:f,redCards:m,teamName:I,teamScore:y,penaltiesExists:g,teamPenalties:v,teamTotalPenaltyGoals:E,leaguePosition:T})):i.a.createElement(s.a,{inplay:c},l))},X=function(e){var t=e.eventId,n=Object(a.useSelector)((function(e){return Object(F.a)(e,t)})),o=n.inplay,c=n.teamOneName,s=n.teamTwoName,l=n.p1CurrentScore,u=n.p2CurrentScore,d=n.p1Nsets,m=n.p2Nsets,p=n.p1Serve,f=n.p2Serve,g=n.servingIndicatorVisible,h=n.showStarted,v=n.showScore,O=n.periodNumber,S=n.periodSuffix;return i.a.createElement(V,null,i.a.createElement(b,null,i.a.createElement(_,{inplay:o},i.a.createElement(w,{inplay:o},c)),i.a.createElement(_,{inplay:o},i.a.createElement(w,{inplay:o},s))),v&&!h&&i.a.createElement(r.Fragment,null,i.a.createElement(R,null,i.a.createElement(M,null,i.a.createElement(C,null,d)),i.a.createElement(M,null,i.a.createElement(C,null,m)),i.a.createElement(M,{headerRow:!0},i.a.createElement(L.a,{headerRow:!0,text:"scoreboards.baseball.runs"}))),i.a.createElement(R,{margin:!0},i.a.createElement(M,null,i.a.createElement(L.a,{gameScore:l}),i.a.createElement(E,{serve:p,servingIndicatorVisible:g})),i.a.createElement(M,null,i.a.createElement(L.a,{gameScore:u}),i.a.createElement(E,{serve:f,servingIndicatorVisible:g})),i.a.createElement(M,{headerRow:!0},i.a.createElement(L.a,{headerRow:!0,text:O,tieBreakEnding:S})))))},Y=n("Cmpn"),Q=function(e){var t=e.eventId,n=Object(a.useSelector)((function(e){return Object(Y.a)(e,t)})),o=n.inplay,c=n.teamOneName,s=n.teamTwoName,l=n.p1Nsets,u=n.p2Nsets,d=n.p1Serve,m=n.p2Serve,p=n.servingIndicatorVisible,f=n.showScore;return i.a.createElement(V,null,i.a.createElement(b,null,i.a.createElement(_,{inplay:o},i.a.createElement(w,{inplay:o},c)),i.a.createElement(_,{inplay:o},i.a.createElement(w,{inplay:o},s))),f&&i.a.createElement(r.Fragment,null,i.a.createElement(T,null,i.a.createElement(M,null,i.a.createElement(C,null,l),i.a.createElement(E,{serve:d,servingIndicatorVisible:p})),i.a.createElement(M,null,i.a.createElement(C,null,u),i.a.createElement(E,{serve:m,servingIndicatorVisible:p})),i.a.createElement(M,{headerRow:!0},i.a.createElement(L.a,{headerRow:!0,text:"scoreboards.snooker.frame"})))))},J=function(e){var t=e.sportId,n=e.eventId,r=e.visualizationArea,c=Object(a.useSelector)((function(e){return e.getIn(["appConfig","featureToggles","enableScoreboardV2"],!0)}));switch(t){case o.Sc:return i.a.createElement(K,{eventId:n});case o.ld:case o.Qc:return i.a.createElement(K,{eventId:n,withPoints:!1});case o.i:return i.a.createElement(X,{eventId:n});case o.Ic:return c?i.a.createElement(B,{eventId:n,visualizationArea:r}):i.a.createElement(q,{eventId:n,visualizationArea:r});case o.Hc:return i.a.createElement(Q,{eventId:n});case o.fd:case o.gd:return i.a.createElement(x,{eventId:n});case o.M:return i.a.createElement(x,{eventId:n,cricketExist:!0});default:return i.a.createElement(x,{eventId:n})}};t.a=J},oRiN:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1ia3x3v-0"})(["",";font-weight:bold;font-size:",";height:",";border-radius:",";padding:",";line-height:",";"],(function(e){var t=e.children;return t?Object(r.css)(["display:block;background:",";color:",";"],o.Sm,1===t?o.Sm:o.Tm):Object(r.css)(["display:none;"])}),Object(a.K)(28),Object(a.K)(34),Object(a.K)(2),Object(a.K)(0,4),Object(a.K)(36));t.a=c},rR46:function(e,t,n){"use strict";var r=n("mXGw"),i=n.n(r),a=n("XSEl"),o=n("FvK5"),c=n("tOpy"),s=n("rOcY"),l=n("bVOX"),u=Object(c.createSelector)(l.a,(function(e){var t=e.get("inplay",!1),n=e.getIn(["scoreboard","period","id"],""),r=e.get("outright",!1),i=e.get("categories",Object(o.List)()).last(Object(o.Map)()).get("id"),a=""===n||s.Ig.PRE_GAME.includes(n)||r&&t,c=void 0;switch(i){case s.Ic:c=!a;break;case s.Sc:case s.ld:case s.i:c=!1;break;default:c=t}return c})),d=n("Y1g+"),m=n("t/rl"),p=n("FknV"),f=function(e){var t=e.eventId,n=e.visualizationArea,r=void 0!==n&&n,o=Object(a.useSelector)((function(e){return u(e,t)}));return i.a.createElement(p.a,{visualizationArea:r,"data-element":"EventTime"},i.a.createElement(m.a,{eventId:t,visualizationArea:r,mevView:!0}),o&&i.a.createElement(d.a,{eventId:t}))};t.a=f},tGBs:function(e,t,n){"use strict";var r,i=n("tOpy"),a=n("FvK5"),o=n("rOcY"),c=n("Siuj"),s=Object.assign||function(e){for(var t=1;t0?b.get(0,0).toString():"",p2Nsets:b.size>0?b.get(1,0).toString():"",p1Serve:r.getIn(["servingIndicator","homeServing"],!1),p2Serve:r.getIn(["servingIndicator","awayServing"],!1),servingIndicatorVisible:r.getIn(["servingIndicator","visible"],!1),periodsList:v,eventProvider:t.get("provider",null),periodNumber:h.match(/\d+/)?h.match(/\d+/)[0]:"",periodSuffix:h.match(/\D+/)?h.match(/\D+/)[0]:""})}))},xlnk:function(e,t,n){"use strict";var r=n("wurE"),i=n.n(r),a=n("Qi1R"),o=n("g6nF"),c=i.a.div.withConfig({componentId:"sc-1lugp45-0"})(["font-size:",";",";display:block;color:",";"],Object(a.K)(28),Object(a.N)(),o.Cl);t.a=c},yIDL:function(e,t,n){"use strict";n.r(t);var r,i=n("XSEl"),a=n("mpt1"),o=n("ymme"),c=n("BmqR"),s=n("FvK5"),l=n("rOcY"),u=n("Qi1R"),d=n("YMdE"),m=n("tOpy"),p=Object(m.createSelector)((function(e,t){return e.getIn(["eventEntities",t],Object(s.Map)())}),(function(e){var t=e.get("participants",Object(s.List)());return{sportId:e.get("categories",Object(s.List)()).last(Object(s.Map)()).get("id"),inplay:e.get("inplay",!1),startTime:e.get("startTime",""),teamOneName:t.size?t.first().get("name",""):"",teamTwoName:t.size?t.last().get("name",""):"",eventName:e.get("name",""),eventType:e.get("type",""),participants:t,twoParticipants:"headtohead"===e.get("type","").toLowerCase()&&2===t.size,racetrackName:e.getIn(["racingData","racetrackName"],""),raceHour:e.getIn(["racingData","raceHour"],""),periodId:e.getIn(["scoreboard","period","id"],""),eventCountryCode:e.get("categories",Object(s.OrderedSet)()).find((function(e){return"Country"===e.get("type")}),null,Object(s.Map)()).get("countryCode","")}})),f=n("Tgit"),g=n("A9fm"),h=n("mXGw"),v=n.n(h),b=n("PBYb"),E=n.n(b),O=(n("Pdmf"),n("g6nF")),S=n("iZzW"),I=n("rR46"),w=n("jedm"),y=n("+wJ6"),j=n("wurE"),T=n.n(j),R=n("uXGu"),P=n("I2FV"),M=n("goda"),A=n("co3k"),_=n("WBb7"),C=l.wi.IFRAME_VIDEO_STREAM,N=l.wi.SPORT_RADAR_WIDGET,z=l.wi.IFRAME_PERFORM_V2_VIDEO_STREAM,V=l.wi.IFRAME_PERFORM_RMG_VIDEO_STREAM,x=function(e){var t=e.mode,n=e.maxPlayerSizePercentage;if(t===z)return Object(j.css)(["width:","px;"],l.Ac/100*n);if(t===C||t===V){var r=Object(u.K)(l.kd);return Object(j.css)(["height:calc(","vw / "," + ",");"],n,l.od,r)}return Object(j.css)([""])},F=T.a.div.withConfig({componentId:"sc-3s96ha-0"})(["",";"],(function(){return u.Ld?Object(j.css)(["border:0 none;transform-origin:top left;will-change:transform;transform:",";"],(function(e){return"scale("+(e.minimized?l.jd:1)+")"})):null})),L=T.a.div.withConfig({componentId:"sc-3s96ha-1"})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;overflow:hidden;padding:",";color:",";"],Object(u.K)(20,0,20,20),O.zp),k=T()(P.a).withConfig({componentId:"sc-3s96ha-2"})(["display:flex;flex-direction:column;width:100%;"]),K=T.a.div.withConfig({componentId:"sc-3s96ha-3"})(["display:flex;align-items:center;width:100%;"]),U=T.a.div.withConfig({componentId:"sc-3s96ha-4"})(["position:absolute;width:100%;height:",";display:flex;justify-content:flex-end;align-items:start;padding:",";box-sizing:border-box;white-space:nowrap;z-index:10;color:",";background:linear-gradient(179deg,rgba(0,0,0,0.75) -6%,rgba(0,0,0,0) 90%);"],Object(u.K)(194),Object(u.K)(20),O.Ap),G=T()(U).withConfig({componentId:"sc-3s96ha-5"})(["align-items:flex-end;flex-direction:row-reverse;justify-content:space-between;bottom:0;background:linear-gradient(359deg,rgba(0,0,0,0.75) -6%,rgba(0,0,0,0) 90%);& > *{color:",";}"],O.Ap),D=T()(P.a).withConfig({componentId:"sc-3s96ha-6"})(["display:flex;align-items:center;margin-left:",";font-size:",";"],Object(u.K)(12),Object(u.K)(28)),B=T()(R.a).attrs((function(e){var t=e.fill,n=void 0===t?O.Ap:t,r=e.stroke,i=void 0===r?"none":r;return{fill:n,width:Object(u.K)(40),height:Object(u.K)(40),stroke:i}})).withConfig({componentId:"sc-3s96ha-7"})(["margin-left:",";cursor:pointer;"],(function(e){return"arrow02"===e.name?Object(u.K)(4):Object(u.K)(40)})),H=T()(B).attrs((function(e){var t=e.pinned;return{name:t?l.Pf.PIN_SELECTED:l.Pf.PIN,fill:t?O.El:O.np,stroke:t?O.El:O.vi}})).withConfig({componentId:"sc-3s96ha-8"})([""]),W=T.a.div.withConfig({componentId:"sc-3s96ha-9"})(["display:flex;flex-direction:column;justify-content:space-between;align-items:flex-end;flex-shrink:0;padding:",";box-sizing:border-box;z-index:10;"],Object(u.K)(20,20,20,0)),q=T.a.div.withConfig({componentId:"sc-3s96ha-10"})(["display:flex;"]),X=T.a.div.withConfig({componentId:"sc-3s96ha-11"})(["flex:1;margin-left:",";font-size:",";font-weight:bold;",";"],Object(u.K)(12),Object(u.K)(28),Object(u.N)()),Y=T.a.div.withConfig({componentId:"sc-3s96ha-12"})(["",";color:",";"],Object(u.N)(),O.Ij),Q=T.a.div.withConfig({componentId:"sc-3s96ha-13"})(["color:",";"],O.Ij),J=T.a.div.withConfig({componentId:"sc-3s96ha-14"})(["position:absolute;top:0;left:",";right:0;height:100%;display:flex;justify-content:space-between;background:",";color:",";"],Object(u.K)(l.id*l.Mc),O.Hj,O.Ij),Z=T.a.div.withConfig({componentId:"sc-3s96ha-15"})(["width:100%;min-height:",";display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;padding:",";box-sizing:border-box;text-align:center;background:",";color:",";z-index:10;& > a{color:",";}"],Object(u.K)(u.Ld?l.hd:l.X),Object(u.K)(20),O.zp,O.Ap,O.Ap),$=T()(M.a).attrs((function(){return{color:O.Ap}})).withConfig({componentId:"sc-3s96ha-16"})([""]),ee=T.a.div.withConfig({componentId:"sc-3s96ha-17"})(["display:flex;justify-content:center;align-items:center;min-height:",";width:100%;background:",";"],Object(u.K)(u.Ld?l.hd:l.X),O.zp),te=T()(R.a).attrs((function(){return{name:"warning",fill:O.Ap,width:Object(u.K)(100),height:Object(u.K)(100)}})).withConfig({componentId:"sc-3s96ha-18"})([""]),ne=T()(S.a).withConfig({componentId:"sc-3s96ha-19"})(["text-decoration:underline;"]),re=T.a.div.withConfig({componentId:"sc-3s96ha-20"})(["display:flex;flex-direction:column;align-items:center;"]),ie=T()(A.a).withConfig({componentId:"sc-3s96ha-21"})(["flex:0 0 ",";width:",";margin-top:",";"],Object(u.K)(64),Object(u.K)(349),Object(u.K)(40)),ae=T()(ie).attrs((function(){return{buttonStyle:"secondary"}})).withConfig({componentId:"sc-3s96ha-22"})([""]),oe=T()(ie).attrs((function(){return{buttonStyle:"primary"}})).withConfig({componentId:"sc-3s96ha-23"})([""]),ce=function(e){var t=e.fullScreen,n=e.maxPlayerSizePercentage,r=e.provider,i=e.mode;return r===l.qi.PERFORM_V2&&i!==l.wi.IFRAME_PERFORM_RMG_VIDEO_STREAM?t?"calc("+n+"vw / "+l.qc+")":Object(u.K)(l.oc-l.kd):t?"calc("+n+"vw / "+l.od+")":Object(u.K)(l.md-l.kd)},se=T()(_.a).attrs((function(e){var t=e.fullScreen,n=e.maxPlayerSizePercentage,r=e.provider,i=e.mode;return{iframeHeight:ce({fullScreen:t,maxPlayerSizePercentage:n,provider:r,mode:i}),noPaddings:!0,noMargins:!0}})).withConfig({componentId:"sc-3s96ha-24"})([""]),le=T()(U).withConfig({componentId:"sc-3s96ha-25"})(["position:static;align-items:start;height:",";background:",";"],Object(u.K)(l.kd),O.zp),ue=T.a.div.withConfig({componentId:"sc-3s96ha-26"})(["",";"],(function(e){var t=e.height,n=e.messagesHeight,r=e.maxPlayerSizePercentage,i=e.fullScreen,a=e.mode;return i&&!u.Ld&&a!==N?Object(j.css)(["position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:",";",";z-index:121;"],r?r+"%":"100%",x):u.Ld?Object(j.css)(["position:fixed;top:",";height:",";width:100%;background:",";z-index:15;"],n?Object(u.K)(n):"0",Object(u.K)(t),O.zp):Object(j.css)(["position:relative;"])}));function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me=(de(r={},l.Hb,"videoStream.error.youNeedToLogIn"),de(r,l.ni.NOT_AVAILABLE,"videoStream.error.notAvailable"),de(r,l.ni.IMG_NOT_AVAILABLE,"videoStream.error.StreamNotAvailableLocation"),de(r,l.ni.IMG_WILL_START_SOON,"videoStream.error.willStartSoon"),de(r,l.ni.BET_1_TO_WATCH,"videoStream.error.bet1"),de(r,l.oi.EVENT_NOT_STARTED,"videoStream.error.notYetAvailable"),de(r,l.oi.USAGE_LIMITS_BREACHED,"videoStream.error.maxAttemptsExceeded"),de(r,l.oi.EVENT_OVER,"videoStream.error.streamFinished"),de(r,l.oi.EVENT_NO_STREAMS,"videoStream.error.noStreamAvailable"),de(r,l.oi.GENERIC_ERROR,"videoStream.error.anErrorHasOccurred"),de(r,l.pi.INVALID_EVENT_ID,"videoStream.error.notAvailable"),de(r,l.pi.EVENT_OVER,"videoStream.error.streamFinished"),de(r,l.pi.GEO_BLOCKED,"videoStream.error.streamNotAvailableInThisLocation"),de(r,l.pi.EVENT_NOT_STARTED,"videoStream.error.notYetAvailable"),de(r,l.pi.FAIRUSE_BREACH,"videoStream.error.maxAttemptsExceeded"),r),pe=function(e){return me.hasOwnProperty(e)?me[e]:"videoStream.error.videoEventNotStartedTextForLoggedInUser"},fe=function(e){var t=e.errorCode,n=e.onContactUs,r=e.currency,i=Object(y.a)(),a=i.openLogin,o=i.openRegistration,c=Intl.NumberFormat(l.de.locale,{style:"currency",currency:r}).formatToParts(0).find((function(e){return"currency"===e.type})).value;return v.a.createElement(Z,null,function(){switch(t){case l.ni.NO_MONEY:return v.a.createElement(h.Fragment,null,v.a.createElement(te,null),v.a.createElement("div",{onClick:n},v.a.createElement(S.a,{id:"videoStream.error.noMoney.a"}),v.a.createElement("br",null),v.a.createElement(ne,{id:"videoStream.error.noMoney.b"})," ",v.a.createElement(S.a,{id:"videoStream.error.noMoney.c"})));case l.Hb:return v.a.createElement(re,null,v.a.createElement(S.a,{id:pe(t),enabled:!0,values:{currency:c}}),v.a.createElement(ae,{onClick:a},v.a.createElement(S.a,{id:"login.button.login"})),v.a.createElement(oe,{onClick:o},v.a.createElement(S.a,{id:"generic.registration"})));default:return v.a.createElement(h.Fragment,null,v.a.createElement(te,null),v.a.createElement(S.a,{id:pe(t),enabled:!0,breakSpaces:!0,values:{currency:c}}))}}())},ge=n("5bUc"),he=T.a.video.withConfig({componentId:"sc-14x81uh-0"})(["display:block;width:100%;",";background:",";"],(function(e){var t=e.maxPlayerSizePercentage;return t?Object(j.css)(["height:'","%';"],t):Object(j.css)(["height:",";"],Object(u.K)(u.Ld?l.hd:l.X))}),O.wp),ve=function(){function e(e,t){for(var n=0;n1?t-1:0),r=1;r1?t-1:0),r=1;r50||0===i?50:i),(n===p&&Object(u.W)("streaming.enableRUKiFrame",l.de.features.streaming.enableRUKiFrame)||n===h)&&0===r.resultCode&&r.data)return n===h?void Qe(Ve({},e,{urlFromGateway:r.data.url})):void De(Ve({},e,{urlRmgIFrame:r.data.urlRmgIFrame}));0===r.resultCode&&r.data&&r.data.url?-1!==[v,f].indexOf(n)?(Be(e,r.data.url),o(!1)):n===b?(Ye(e,r.data),o(!1)):a(r.data.url).then((function(t){switch(n){case p:He(e,t);break;case m:We(e,t);break;case g:qe(e,t);break;default:Xe(e,t)}o(!1)})):(r.response&&r.response.resultCode?c(r.response.resultCode):r.resultCode?c(r.resultCode):c(l.Vc),o(!1))}))},De=function(e){var t=e.urlRmgIFrame,n=e.getRmgHtml,r=e.setWatchAndBetIframeUrl,i=e.setSpinner,a=e.setError,o=e.provider,c=e.fullScreen,s=e.maxPlayerSizePercentage,d=l.qi.PERFORM_V2;n(t).then((function(e){try{e.payload.text().then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("html");t.innerHTML=e;var n=t.getElementsByTagName("iframe")[0],a=new URL(n.getAttribute("src"));o===d&&(c?a.searchParams.set("width",l.Ac/100*s):(a.searchParams.set("width",Object(u.ke)(l.pd)),a.searchParams.set("height",Object(u.ke)(l.oc)))),r(o===d?a.href:n.getAttribute("src")),i(!1)}))}catch(t){i(!1),a(l.Vc)}}))},Be=function(e,t){e.setVideoStreamUrl(t),Je(e.setShowBar)},He=function(e,t){if(Object.values(l.pi).indexOf(t.payload)>-1)e.setError(t.payload);else try{var n=(new DOMParser).parseFromString(t.payload,"application/xml").getElementById("854").getElementsByTagName("streamLaunchCode")[0].textContent;e.setVideoStreamUrl(n),Je(e.setShowBar)}catch(r){e.setError(l.Vc)}},We=function(e,t){if(t.payload.IsOK)try{e.setVideoStreamUrl(t.payload.EventInfo.Streams.find((function(e){return"Adaptive"===e.BitrateLevel&&e.MediaFormat===l.ri.HLS})).Url),Je(e.setShowBar)}catch(r){e.setError(l.Vc)}else{var n=t.payload.Error&&t.payload.Error.ErrorCode||l.Vc;e.setError(n)}},qe=function(e,t){var n=Object(u.lc)("payload.hlsUrl",t);n?e.setVideoStreamUrl(n):e.setError(l.Vc)},Xe=function(e,t){try{200===t.payload.statusCode&&t.payload.hlsUrl?(e.setVideoStreamUrl(t.payload.hlsUrl),Je(e.setShowBar)):200!==t.payload.statusCode||t.payload.hlsUrl?403===t.payload.response.statusCode?e.setError(t.payload.response.statusCode):e.setError(l.Vc):e.setError(l.ni.IMG_WILL_START_SOON)}catch(n){e.setError(l.Vc)}},Ye=function(e,t){try{var n=t.protocol===l.ri.DASH,r=t.drm;if(t.url&&(!n&&r&&u.qe||!n&&!r||n&&!u.qe)){var i=n?"application/dash+xml":"application/x-mpegURL",a={src:t.url,type:i,withCredentials:!0};r&&(a.keySystems={"com.apple.fps.1_0":{certificateUri:r.fairplayCertificate,getLicense:function(e,t,n,i){window.videojs&&window.videojs.xhr({url:r.fairplay,method:"POST",responseType:"arraybuffer",body:n,headers:{"Content-type":"application/octet-stream"}},(function(e,t,n){e?i(e):i(null,n)}))}},"com.widevine.alpha":r.widevine,"com.microsoft.playready":r.playready}),e.setBetGeniusStreamSources(a)}else e.setError(l.Vc)}catch(o){e.setError(l.Vc)}},Qe=function(e){var t=e.setWatchAndBetIframeUrl,n=e.setSpinner,r=e.urlFromGateway,i=new URL(r);t(new URL(l.de.host+l.de.country+l.de.performV2TemplatePage+i.search).href),n(!1)},Je=function(e){e(!0),ke&&clearTimeout(ke),ke=setTimeout((function(){return e(!1)}),2e3)},Ze=function(e){return function(t){var n=rt(e);e.minimizeVisualization(n),t&&!e.minimized&&Le(e,l.Wh.SHRINK,t)}},$e={onPin:function(e){return function(){e.pinned?(e.unpinVisualization(),Le(e,l.Wh.UNPIN,l.gi.TAP)):(e.pinVisualization(),Le(e,l.Wh.PIN,l.gi.TAP))}},onVizualization:function(e){return function(){Ke?function(e){if(clearTimeout(Ke),Ke=null,e.error)return e.sendStreamEnd(l.Xh.STREAM),e.resetVisualization(),void(e.fullScreen&&!u.Ld&&e.hideModal("VisualizationAreaModal"));if(u.Ld)if(e.minimized)e.maximizeVisualization(Fe[e.mode]),Le(e,l.Wh.ENLARGE,l.gi.DOUBLE_TAP);else{var t=rt(e);e.minimizeVisualization(t),Le(e,l.Wh.SHRINK,l.gi.DOUBLE_TAP)}}(e):Ke=setTimeout((function(){Ke=null,Je(e.setShowBar)}),500)}},onClose:function(e){return function(){e.fullScreen?(u.Ld&&e.setFullScreen(!1),!u.Ld&&e.setVideoStreamUrl(null),!u.Ld&&e.hideModal("VisualizationAreaModal")):(e.sendStreamEnd(l.Xh.STREAM),e.resetVisualization())}},onVideoError:function(e){return function(){e.setError(l.Vc)}},onSoundMute:function(e){return function(){e.setSoundMute(!e.soundMute)}},onContactUs:function(e){var t=e.showModal,n=e.showLiveChat,r=e.contactUsEnabled;return function(){r&&Object(u.Rd)({showModal:t,showLiveChat:n})}},onMouseOver:function(e){var t=e.showBar,n=e.setShowBar;return function(e){e.stopPropagation(),!t&&Je(n)}},onIframeTopBar:function(){return function(e){e.stopPropagation()}},onMinimizeVisualization:Ze,onMaximizeVisualization:function(e){return function(t){e.maximizeVisualization(Fe[e.mode]),e.setShowBar(!1),e.minimized&&Le(e,l.Wh.ENLARGE,t)}},onOpenViewMarkets:function(e){return function(){e.fullScreen&&!u.Ld&&e.hideModal("VisualizationAreaModal"),function(e){Le(e,l.Wh.VIEW_MARKETS,l.gi.TAP)}(e)}},onFullScreen:function(e){var t=e.showModal,n=e.setFullScreen,r=e.setVideoStreamUrl;return function(){u.Ld||(n(!0),!u.Ld&&r(null),!u.Ld&&t("VisualizationAreaModal",{overlay:!0}))}}},et=function(e){var t=e.eventId,n=e.eventExist,r=e.fetchEvent,i=e.resetVisualization,a=e.sendStreamEnd;t&&!n&&r({eventId:t,alive:!0}).then((function(e){Object(u.lc)("payload.event.sportId",e)||(a(l.Xh.STREAM),i())}))},tt={componentDidMount:function(){var e=this.props,t=e.eventId,n=e.subscribeToEventDetails,r=e.subscribeToEventScoreboard,i=e.eventExist,a=this.props,o=a.videoStream,c=a.videoStreamUrl,s=a.loggedIn,u=a.setError;o&&c&&!s?u(l.Hb):(et(this.props),i&&(n(t),r(t)),o&&!c&&Ue(this.props),nt(this.props),it(this.props))},componentDidUpdate:function(e){var t=this;et(this.props);var n=this.props,r=n.betPlacementResultCode,i=n.minimized,a=n.keyboardShown,o=n.resetVisualization,s=n.sportradarWidgetId,d=this.props,m=d.eventExist,p=d.eventId,f=d.subscribeToEventDetails,g=d.subscribeToEventScoreboard,h=d.error,v=d.loggedIn,b=this.props,E=b.videoStream,O=b.setError,S=b.setSpinner,I=b.setVideoStreamUrl,w=b.setWatchAndBetIframeUrl,y=b.mode,j=this.props,T=j.videoStreamUrl,R=j.watchAndBetIframeUrl,P=j.soundMute,M=j.setSoundMute,A=j.fullScreen,_=j.hideModal,C=this.props,N=C.maximizeVisualization,z=C.sendStreamEnd,V=C.provider,x=C.performMatchTracker,F=C.performWidgetId,L=this.props,k=L.pinned,K=L.location,U=L.betGeniusStreamSources;!e.eventExist&&m&&(f(p),g(p)),function(e,t){var n=e.location,r=e.pinned,i=e.visualizationEnabledState,a=e.resetVisualization,o=e.sendStreamEnd,s=n.pathname,u=t.location.pathname,d=Object(c.matchPath)(s,{path:l.Dh}),m=d&&d.params.eventId,p=d&&e.eventId===m,f=!!Object(c.matchPath)(s,{path:l.sg.login}),g=!!Object(c.matchPath)(u,{path:l.sg.login});!r&&(s!==u&&!(f||g))&&!p&&i&&(o(l.Xh.STREAM),a()),e.visEventId||e.videoStream||(o(l.Xh.STREAM),a())}(this.props,e),(h===l.Hb&&!e.loggedIn&&v||h&&e.videoStream&&!E)&&O(null),e.videoStream&&!E&&(O(null),S(!1),I(null),w(null));var G=e.eventId!==p,D=e.mode!==l.wi.UNKNOWN&&y!==l.wi.UNKNOWN&&e.mode!==y,B=e.loggedIn!==v&&E;(G||D||B)&&i&&N(Fe[y]);var H=!e.videoStream&&E,W=G&&E,q=e.performMatchTracker&&!x&&E,X=e.betPlacementResultCode!==r&&h===l.ni.BET_1_TO_WATCH;if(H||B||W||q){var Y=at(this.props);P!==Y&&M(Y),Ue(this.props)}X&&setTimeout((function(){Ue(t.props)}),1e3),u.Ld&&!i&&!e.keyboardShown&&a&&(h?(z(l.Xh.STREAM),o()):Ze(this.props)()),e.error===h&&e.eventExist===m&&e.videoStream===E&&e.videoStreamUrl===T&&e.sportradarWidgetId===s&&e.watchAndBetIframeUrl===R&&e.performMatchTracker===x&&e.performWidgetId===F&&e.betGeniusStreamSources===U||nt(this.props,e),e.mode!==y&&it(this.props),(E&&!e.provider&&e.provider!==V||!e.performMatchTracker&&e.performMatchTracker!==x)&&Ue(this.props),A&&e.location.pathname!==K.pathname&&(_("VisualizationAreaModal"),!k&&o())},componentWillUnmount:function(){var e=this.props,t=e.eventId,n=e.unsubscribeFromEventDetails,r=e.unsubscribeFromEventScoreboard,i=e.setVisualizationHeight;clearTimeout(ke),clearTimeout(Ke),n(t),r(t),i(0),Ke=null}},nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.error,r=e.videoStream,i=e.videoStreamUrl,a=e.watchAndBetIframeUrl,o=e.sendStreamStart,c=e.sendStreamEnd,s=e.mode,u=e.setMode,d=e.startUIElement,m=e.provider,p=e.performMatchTracker,f=e.betGeniusStreamSources,g=l.qi.RUK,h=l.qi.PERFORM_V2,v=l.qi.BETGENIUS,b=l.wi.UNKNOWN;if(!n)if(r&&i)b=l.wi.VIDEO_STREAM;else if(p||a&&m===h){var E=new URLSearchParams(e.watchAndBetIframeUrl).get("rmg");b="true"===E?l.wi.IFRAME_PERFORM_RMG_VIDEO_STREAM:l.wi.IFRAME_PERFORM_V2_VIDEO_STREAM}else a&&m===g?b=l.wi.IFRAME_VIDEO_STREAM:r&&m===v&&f?b=l.wi.VIDEO_STREAM_BETGENIUS:r||p||(b=l.wi.SPORT_RADAR_WIDGET);s!==b&&(b===l.wi.UNKNOWN&&c(l.Xh.STREAM),u(b));var O=b===l.wi.SPORT_RADAR_WIDGET&&!t.videoStream&&!r,S=b!==l.wi.UNKNOWN&&t.videoStream&&r&&(!!i||!!a);(O||S)&&o(d)},rt=function(e){switch(e.mode){case l.wi.IFRAME_VIDEO_STREAM:case l.wi.IFRAME_PERFORM_RMG_VIDEO_STREAM:return l.nd;case l.wi.IFRAME_PERFORM_V2_VIDEO_STREAM:return l.pc;default:return l.id}},it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.setVisualizationHeight,r=e.mode,i=e.minimized,a=i?rt(e):Fe[r];n(null===t?a:t)},at=function(e){var t=e.autoPlaySoundOnSportVideo,n=e.autoPlaySoundOnHorseVideo,r=e.eventDetails.sportId;return l.Jg.includes(r)?!n:!t},ot=Object(a.compose)(Object(a.setDisplayName)("VisualizationAreaContainer"),c.withRouter,Object(i.connect)((function(e){var t=e.getIn(["visualization","eventId"],null),n=p(e,t),r=e.getIn(["eventEntities",t],Object(s.Map)()),i=Object(g.a)(e,t);return{minimized:e.getIn(["visualization","minimized"],!1),height:e.getIn(["visualization","height"],0),pinned:e.getIn(["visualization","pinned"],!1),sportradarWidgetId:e.getIn(["visualization","sportradarWidgetId"],null),performWidgetId:e.getIn(["visualization","performWidgetId"],null),videoStream:e.getIn(["visualization","videoStream"],!1),videoStreamUrl:e.getIn(["visualization","videoStreamUrl"],""),performMatchTracker:e.getIn(["visualization","performMatchTracker"],!1),eventRemoved:e.getIn(["removedEntities","events"],Object(s.Set)()).includes(t),visualizationEnabledState:e.getIn(["visualization","enabled"],!1),visEventId:i.vizEventId,videoProvider:i.videoProvider,videoEventId:i.videoEventId,maxPlayerSizePercentage:e.getIn(["visualization","maxPlayerSizePercentage"],50),disableEventStats:n.sportId===l.Ic,event:r,eventExist:!r.isEmpty(),eventDetails:n,eventId:t,loggedIn:Object(f.a)(e),betPlacementResultCode:e.getIn(["betplacement","resultCode"],null),keyboardShown:e.getIn(["keyboardState","keyboardShown"],!1),mode:e.getIn(["visualization","mode"],0),startUIElement:e.getIn(["visualization","startUIElement"],null),sportRadarWidgetType:n.sportId===l.M?"match.lmtLight":"match.lmtEssential",fullScreen:e.getIn(["visualization","fullScreen"],!1),betGeniusStreamSources:e.getIn(["visualization","betGeniusStreamSources"]),autoPlaySoundOnSportVideo:e.getIn(["userSettings","settings","media","autoPlaySoundOnSportVideo"]),autoPlaySoundOnHorseVideo:e.getIn(["userSettings","settings","media","autoPlaySoundOnHorseVideo"]),contactUsEnabled:e.getIn(["appConfig","featuresEnabled","contactUs"],!0),currency:e.getIn(["user","balance","currency"],"GBP")}}),(function(e){return Object(o.bindActionCreators)({resetVisualization:d.sd.resetVisualization,minimizeVisualization:d.sd.minimizeVisualization,maximizeVisualization:d.sd.maximizeVisualization,pinVisualization:d.sd.pinVisualization,unpinVisualization:d.sd.unpinVisualization,fetchEvent:d.eb.fetchEvent,getVideoUrl:d.sd.getVideoUrl,getVideoStreamingUrl:d.sd.getVideoStreamingUrl,disableVideoStream:d.sd.disableVideoStream,showModal:d.fc.showModal,hideModal:d.fc.hideModal,setVideoStreamUrl:d.sd.setVideoStreamUrl,setBetGeniusStreamSources:d.sd.setBetGeniusStreamSources,setMaxPlayerSizePercentage:d.sd.setMaxPlayerSizePercentage,setVisualizationHeight:d.sd.setVisualizationHeight,getRmgHtml:d.sd.getRmgHtml,setMode:d.sd.setMode,setFullScreen:d.sd.setFullScreen,subscribeToEventDetails:d.L.subscribeToEventDetails,unsubscribeFromEventDetails:d.L.unsubscribeFromEventDetails,subscribeToEventScoreboard:d.L.subscribeToEventScoreboard,unsubscribeFromEventScoreboard:d.L.unsubscribeFromEventScoreboard,sendStreamStart:d.Wc.sendStreamStart,sendStreamEnd:d.Wc.sendStreamEnd,statisticsPush:d.Wc.statisticsPush,showLiveChat:d.Ob.showLiveChat},e)})),Object(a.branch)((function(e){var t=e.visualizationEnabledState,n=e.location;return!Object(u.bd)(t,n)}),a.renderNothing),Object(a.withState)("showBar","setShowBar",!1),Object(a.withState)("error","setError",null),Object(a.withState)("spinner","setSpinner",!1),Object(a.withState)("soundMute","setSoundMute",at),Object(a.withState)("watchAndBetIframeUrl","setWatchAndBetIframeUrl",null),Object(a.withHandlers)($e),Object(a.withProps)((function(e){var t=e.onVizualization,n=e.minimized,r=e.showBar,i=e.eventId,a=e.location,o=e.eventDetails,d=e.event,m=e.performWidgetId,p=e.performMatchTracker,f=Object(c.matchPath)(a.pathname,{path:[l.sg.horseRacingSev,l.sg.greyhoundsSev,l.sg.sev],exact:!0}),g=f&&f.params.eventId!==i,h=!n&&r&&(!f||g),v=o.sportId===l.pb&&l.sg.horseRacingSev||o.sportId===l.jb&&l.sg.greyhoundsSev||l.sg.sev,b=Object(u.F)({pathname:v,rawParams:{sportName:d.get("categories",Object(s.OrderedSet)()).last(Object(s.Map)()).get("name"),categoryName:d.get("categories",Object(s.OrderedSet)()).first(Object(s.Map)()).get("name"),eventName:d.get("name")},preparedParams:{eventId:i}});return{onVizualizationAttributes:xe({},u.Ld?"onTouchStart":"onClick",t),noSevOrAnotherSevPage:h,sevUrl:Object(c.matchPath)(a.pathname,{path:b})?null:b,provider:m&&p?l.qi.PERFORM_V2:e.videoProvider,providerEventId:m&&p?m:e.videoEventId}})),Object(a.lifecycle)(tt))(ze);t.default=ot}}]);