!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a5fe5c71-f72d-4b4f-a53a-feec5c6647c9",t._sentryDebugIdIdentifier="sentry-dbid-a5fe5c71-f72d-4b4f-a53a-feec5c6647c9")}catch(t){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8065],{970:(t,e,n)=>{n.d(e,{z:()=>M});var r=n(6029),a=n(21377),i=n(37071),u=n(76356),s=n(93338),o=n(6695),l=n(59411),c=n(27956),d=n(14632),m=n(55729),f=n(90248),p=n(947),h=n(48683),g=n(8703),x=n(14395),v=n(62827),P=n(74843),b=n(73022);let y=Object.assign({},c,d,o,l);function w(t){let{event:e}=t;return e.time&&!v.p2.includes(e.status.code)?(0,r.jsx)(b.lx,{time:e.time,status:e.status}):e.status.code===a.sum["Extra time halftime"]?(0,r.jsx)(f.A,{id:"extraTimeHalftime.short"}):e.status.code===a.sum["Awaiting penalties"]?(0,r.jsx)(f.A,{id:"awaitingPenalties.short"}):e.status.code===a.sum.Penalties||e.status.code===a.sum["Penalties alt."]?(0,r.jsx)(f.A,{id:"penalties"}):(0,r.jsx)(r.Fragment,{children:(0,g.Sw)(e)})}function M(t){var e;let{event:n}=t,o=(0,m.useRef)(null),l=(0,m.useRef)(null),c=(0,p.A)(),{textDirection:d}=(0,i.$c)(),f="rtl"===d,g=n.status.type===a.XUj.InProgress;function v(){let t=o.current;if(!t)return;let e=y.select(t),r=t.getBoundingClientRect(),a=P.rj(n);if(a<0)return;let i=P.Ol(n);if(!i)return;let u=y.scaleLinear().domain([0,i]).range([0,r.width]),d=e.selectAll("rect").data([a]);d.enter().append("rect").merge(d).attr("fill",g?(0,s.S)("colors.status.live"):(0,s.S)("colors.secondary.default")).attr("x",0).attr("y",0).transition().duration(200).ease(y.easeCubicInOut).attr("width",t=>u(t)).attr("height",2);let m=P.EX(n,c),p=e.selectAll("circle").data(m);p.exit().remove(),p.enter().append("circle").merge(p).attr("fill",(0,s.S)("colors.surface.s1")).attr("r",3).transition().duration(200).ease(y.easeCubicInOut).attr("stroke",t=>u(a)>=u(t.x)?g?(0,s.S)("colors.status.live"):(0,s.S)("colors.secondary.default"):(0,s.S)("colors.neutral.default")).attr("stroke-width",2).attr("cx",t=>u(t.x)).attr("cy",1);let h=e.selectAll("text").data(m);if(h.exit().remove(),h.enter().append("text").merge(h).attr("font",(0,s.S)("fonts.sans")).attr("font-weight","500").attr("font-size",(0,s.S)("fontSizes.xs")).attr("text-anchor",t=>0===t.x?"start":"middle").transition().duration(200).ease(y.easeCubicInOut).attr("fill",(0,s.S)("colors.neutral.default")).attr("x",t=>t.x>0?u(t.x):-4).attr("transform",t=>f?"scale(-1,1) translate(-".concat(2*u(t.x),",0)"):"").attr("y",20).text(t=>t.label),l.current){let t=l.current.getBoundingClientRect().width;y.select(l.current).style("display","inline-block").transition().duration(200).ease(y.easeCubicInOut).style("transform",()=>{let e=u(a);return(e=e{if(n.status.type!==a.XUj.InProgress)return;v();let t=window.setInterval(()=>{v()},1e3);return()=>window.clearInterval(t)},[o.current,n.time,n.startTimestamp]),n.tournament.category.sport.slug===a.QCR.Football||(null==(e=n.time)?void 0:e.totalPeriodCount)&&n.time.periodLength)?n.status.type!==a.XUj.InProgress?(0,r.jsx)(x.n,{event:n}):(0,r.jsx)(h.Zp,{children:(0,r.jsxs)(u.az,{pt:"xs",h:"5xl",children:[(0,r.jsx)(i.Ym,{ref:l,textStyle:"assistive.default",color:"status.live",textAlign:"center",children:(0,r.jsx)(w,{event:n})}),(0,r.jsx)("svg",{ref:o,width:"calc(100% - 32px)",height:"2",style:{backgroundColor:(0,s.S)("colors.neutrals.nLv4"),display:"block",margin:"auto",marginTop:(0,s.S)("spacing.xs"),overflow:"visible",transform:f?"scale(-1,1)":void 0}})]})}):null}},6695:(t,e,n)=>{n.r(e),n.d(e,{easeBack:()=>R,easeBackIn:()=>D,easeBackInOut:()=>R,easeBackOut:()=>Q,easeBounce:()=>k,easeBounceIn:()=>A,easeBounceInOut:()=>B,easeBounceOut:()=>k,easeCircle:()=>w,easeCircleIn:()=>b,easeCircleInOut:()=>w,easeCircleOut:()=>y,easeCubic:()=>s.wq,easeCubicIn:()=>s.EY,easeCubicInOut:()=>s.wq,easeCubicOut:()=>s.Jx,easeElastic:()=>F,easeElasticIn:()=>X,easeElasticInOut:()=>z,easeElasticOut:()=>F,easeExp:()=>P,easeExpIn:()=>x,easeExpInOut:()=>P,easeExpOut:()=>v,easeLinear:()=>r,easePoly:()=>c,easePolyIn:()=>o,easePolyInOut:()=>c,easePolyOut:()=>l,easeQuad:()=>u,easeQuadIn:()=>a,easeQuadInOut:()=>u,easeQuadOut:()=>i,easeSin:()=>h,easeSinIn:()=>f,easeSinInOut:()=>h,easeSinOut:()=>p});let r=t=>+t;function a(t){return t*t}function i(t){return t*(2-t)}function u(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var s=n(36729),o=function t(e){function n(t){return Math.pow(t,e)}return e*=1,n.exponent=t,n}(3),l=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e*=1,n.exponent=t,n}(3),c=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e*=1,n.exponent=t,n}(3),d=Math.PI,m=d/2;function f(t){return 1==+t?1:1-Math.cos(t*m)}function p(t){return Math.sin(t*m)}function h(t){return(1-Math.cos(d*t))/2}function g(t){return(Math.pow(2,-10*t)-9765625e-10)*1.0009775171065494}function x(t){return g(1-t)}function v(t){return 1-g(t)}function P(t){return((t*=2)<=1?g(1-t):2-g(t-1))/2}function b(t){return 1-Math.sqrt(1-t*t)}function y(t){return Math.sqrt(1- --t*t)}function w(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var M=4/11,I=6/11,C=8/11,O=3/4,S=9/11,L=10/11,E=15/16,j=21/22,_=63/64,T=1/(4/11)/(4/11);function A(t){return 1-k(1-t)}function k(t){return(t*=1){n.d(e,{_:()=>s});var r=n(21377),a=n(45860),i=n(65078),u=n(71046);function s(t,e){let n=e?r.bnp.graphDataWinProbability(t.id):r.bnp.graphData(t.id),s=(0,u.rf)(t),o=(0,i.g3)(),{data:l,error:c}=(0,a.Ay)(n,s);return{graphPoints:o?null==l?void 0:l.graphPoints.map(t=>({...t,value:-1*t.value})):null==l?void 0:l.graphPoints,error:c,periodCount:null==l?void 0:l.periodCount,periodTime:null==l?void 0:l.periodTime,overtimeLength:null==l?void 0:l.overtimeLength}}},74843:(t,e,n)=>{n.d(e,{EX:()=>m,Ol:()=>d,rj:()=>c});var r=n(21377),a=n(8703);let i=[r.sum["1st extra"],r.sum["2nd extra"],r.sum["Extra time halftime"]],u=[r.sum.Pause,r.sum.Halftime,r.sum["Extra time halftime"],r.sum["Awaiting extra time"],r.sum["Awaiting penalties"],r.sum.Penalties,r.sum["Penalties alt."]],s=t=>{let[e,n,r,a]=[2700,5400,6300,7200];if(t.defaultPeriodCount&&t.defaultPeriodLength){var i,u;a=(r=(n=2*(e=60*t.defaultPeriodLength))+((null==(i=t.time)?void 0:i.overtimeLength)||900))+((null==(u=t.time)?void 0:u.overtimeLength)||900)}return[e,n,r,a]},o=t=>{var e;let n=(null==(e=t.time)?void 0:e.currentPeriodStartTimestamp)||t.currentPeriodStartTimestamp;return n?n-t.startTimestamp:0},l=t=>{let e=5400;if(t.defaultPeriodCount&&t.defaultPeriodLength&&(e=t.defaultPeriodCount*t.defaultPeriodLength*60),t.time){if("number"==typeof t.time.initial)return t.time.initial>=e;else if("number"==typeof t.time.max)return t.time.max>e}let n=o(t);return!!n&&n>e||i.includes(t.status.code)},c=t=>{var e,n,a,i,l,c;if(t.tournament.category.sport.slug===r.QCR.Football){let e=Math.floor(Date.now()/1e3),n=(null==(a=t.time)?void 0:a.currentPeriodStartTimestamp)||t.currentPeriodStartTimestamp;if(t.time&&t.time.max&&!u.includes(t.status.code)){let r=t.time.initial,a=t.time.max;if(n&&"number"==typeof r)return Math.min(a,Math.max(r,r+(e-n)))}let[c,d,m,f]=s(t);switch(t.status.code){case r.sum.Halftime:return c;case r.sum["Awaiting extra time"]:case r.sum["1st extra"]:return d;case r.sum["2nd extra"]:case r.sum["Extra time halftime"]:return m;case r.sum["Awaiting penalties"]:case r.sum.Penalties:case r.sum["Penalties alt."]:case r.sum.Shootout:return(null!=(l=null==(i=t.time)?void 0:i.initial)?l:o(t))>d?f:d;default:return -1}}return(null==(e=t.time)?void 0:e.played)?t.status.code===r.sum.Pause&&(null==(c=t.time)?void 0:c.periodLength)?t.time.played-t.time.played%t.time.periodLength:t.time.played:(null==(n=t.time)?void 0:n.currentPeriodStartTimestamp)?Math.floor(Date.now()-1e3*t.time.currentPeriodStartTimestamp)/1e3:Math.floor(Date.now()-1e3*t.startTimestamp)/1e3},d=t=>{var e,n;if(t.tournament.category.sport.slug===r.QCR.Football){let{status:e,time:a}=t,[i,u,c,d]=s(t),m=u;return(null==a?void 0:a.totalPeriodCount)&&(null==a?void 0:a.periodLength)&&(m=a.totalPeriodCount*a.periodLength),l(t)&&(m=d),e.code===r.sum["Awaiting penalties"]&&(null!=(n=null==a?void 0:a.initial)?n:o(t))>=m&&(m=d),m}if((null==(e=t.time)?void 0:e.totalPeriodCount)&&t.time.periodLength)return t.time.totalPeriodCount*t.time.periodLength},m=(t,e)=>{let n=t.tournament.category.sport.slug,i=(0,a.jY)(n);if(n===r.QCR.Football){let[n,r,a,i]=s(t),u=[{x:0,label:e.formatTime(1e3*t.startTimestamp)},{x:n,label:e.formatMessage({id:"ht_status"})},{x:r,label:e.formatMessage({id:"full_time_short"})}];return l(t)&&u.push({x:a,label:e.formatMessage({id:"status_extra_short"},{n:1})},{x:i,label:e.formatMessage({id:"status_extra_short"},{n:2})}),u}if(t.time&&t.time.totalPeriodCount&&t.time.periodLength){let n=[{x:0,label:e.formatTime(1e3*t.startTimestamp)}];for(let r=1;r<=t.time.totalPeriodCount;r++){let a=t.time.periodLength*r,u=i?"status_quarter_short":"ordinalPeriod.short",s=e.formatMessage({id:u},{n:r});n.push({x:a,label:s})}return n}return[]}}}]);