!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="91d7bab8-e99c-4807-a63c-6aef9296113c",e._sentryDebugIdIdentifier="sentry-dbid-91d7bab8-e99c-4807-a63c-6aef9296113c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[480],{6695:(e,t,n)=>{n.r(t),n.d(t,{easeBack:()=>q,easeBackIn:()=>D,easeBackInOut:()=>q,easeBackOut:()=>P,easeBounce:()=>T,easeBounceIn:()=>S,easeBounceInOut:()=>B,easeBounceOut:()=>T,easeCircle:()=>w,easeCircleIn:()=>b,easeCircleInOut:()=>w,easeCircleOut:()=>A,easeCubic:()=>o.wq,easeCubicIn:()=>o.EY,easeCubicInOut:()=>o.wq,easeCubicOut:()=>o.Jx,easeElastic:()=>z,easeElasticIn:()=>N,easeElasticInOut:()=>Q,easeElasticOut:()=>z,easeExp:()=>y,easeExpIn:()=>x,easeExpInOut:()=>y,easeExpOut:()=>g,easeLinear:()=>r,easePoly:()=>c,easePolyIn:()=>u,easePolyInOut:()=>c,easePolyOut:()=>l,easeQuad:()=>i,easeQuadIn:()=>s,easeQuadInOut:()=>i,easeQuadOut:()=>a,easeSin:()=>h,easeSinIn:()=>f,easeSinInOut:()=>h,easeSinOut:()=>m});let r=e=>+e;function s(e){return e*e}function a(e){return e*(2-e)}function i(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var o=n(36729),u=function e(t){function n(e){return Math.pow(e,t)}return t*=1,n.exponent=e,n}(3),l=function e(t){function n(e){return 1-Math.pow(1-e,t)}return t*=1,n.exponent=e,n}(3),c=function e(t){function n(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t*=1,n.exponent=e,n}(3),d=Math.PI,p=d/2;function f(e){return 1==+e?1:1-Math.cos(e*p)}function m(e){return Math.sin(e*p)}function h(e){return(1-Math.cos(d*e))/2}function v(e){return(Math.pow(2,-10*e)-9765625e-10)*1.0009775171065494}function x(e){return v(1-e)}function g(e){return 1-v(e)}function y(e){return((e*=2)<=1?v(1-e):2-v(e-1))/2}function b(e){return 1-Math.sqrt(1-e*e)}function A(e){return Math.sqrt(1- --e*e)}function w(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var I=4/11,M=6/11,j=8/11,_=3/4,L=9/11,O=10/11,E=15/16,k=21/22,C=63/64,H=1/(4/11)/(4/11);function S(e){return 1-T(1-e)}function T(e){return(e*=1){n.r(t),n.d(t,{default:()=>Y});var r=n(6029),s=n(21377),a=n(76356),i=n(45860),o=n(48683),u=n(75751),l=n(37071),c=n(62042),d=n(90248),p=n(65078),f=n(94604);let m="recent-form-event-description",h=(0,c.cx)("group",(0,c.AH)({flexGrow:1,flexBasis:"[1px]",textAlign:"center",px:"2xs",_first:{pl:"0"},_last:{pr:"0"}})),v=(0,c.AH)({position:"relative",_groupHover:{opacity:"0.8"},"&.W":{bg:"status.success.default"},"&.D":{bg:"neutral.default"},"&.L":{bg:"status.error.default"}}),x=(0,c.AH)({h:"xl",w:"xl",minW:"xl",verticalAlign:"top",mb:"md",transitionDuration:"faster",transitionTimingFunction:"ease-out",transitionProperty:"transform",_groupHover:{transform:"scale(1.35)"}}),g=(0,c.AH)({mx:"auto",h:"[36px]",w:{base:"xl",lg:"[30px]"}}),y=(0,c.AH)({position:"absolute",h:{base:"[15px]",lg:"[18px]"},minW:{base:"[15px]",lg:"[18px]"},transitionDuration:"faster",transitionTimingFunction:"ease-out",transitionProperty:"transform",_groupHover:{transform:"scale(1.35)"},"@media all and (-webkit-min-device-pixel-ratio: 0) and (min-resolution: .001dpcm)":{imageRendering:"-webkit-optimize-contrast"},_first:{left:"0"},_last:{right:"0",top:"[6px]"}}),b=(0,c.AH)({top:"[1px]",position:"absolute",borderTop:"8px solid {colors.heatmap.hm_3}",borderStart:"8px solid transparent"}),A=e=>{let{event:t}=e,[n,s]=(0,p.jr)(t,"homeScore","awayScore",t),[a,i]=(0,p.jr)(t,"homeTeam","awayTeam",t);return void 0===n||void 0===s?null:(0,r.jsxs)("span",{className:(0,c.cx)("is-hidden","".concat(m,"-").concat(t.id),(0,c.AH)({px:"lg",textStyle:"assistive.default",color:"neutrals.nLv3",display:"block"})),children:[(0,r.jsxs)(l.EY,{textStyle:"assistive.default",color:s.displayn.display?"neutrals.nLv1":"neutrals.nLv3",children:[s.display," ",(0,r.jsx)(f.Rm,{team:i})]})]},t.id)},w=(0,a.I4)("div",{base:{"& .is-hidden":{display:"none"},"& .is-visible":{display:"block"}}}),I=e=>{let{events:t}=e;return(null==t?void 0:t.length)?(0,r.jsxs)(w,{hideBelow:"md",minH:"lg",children:[(0,r.jsx)("span",{className:(0,c.cx)("".concat(m,"-description"),(0,c.AH)({px:"lg",textStyle:"assistive.default",color:"neutrals.nLv3",display:"block"})),children:(0,r.jsx)(d.A,{id:"recent_form_hover"})}),t.map(e=>(0,r.jsx)(A,{event:e},e.id))]}):null};n(14632);var M=n(6695),j=n(28446),_=n(27956),L=n(81278),O=n(55729),E=n(26331),k=n(73088),C=n(62827),H=n(30479);let S=e=>Object.keys(e).reduce((t,n)=>Math.max(t,Math.abs(e[n])),0),T=e=>e===s.Jfo.Left||e===s.Jfo.Right||e===s.Jfo.Draw,B=(e,t)=>{let n=document.querySelectorAll(".".concat(m,"-description")),r=document.querySelectorAll(".".concat(m,"-").concat(e));n.length&&r.length&&(n.forEach(e=>{t?(e.classList.add("is-hidden"),e.classList.remove("is-visible")):(e.classList.add("is-visible"),e.classList.remove("is-hidden"))}),r.forEach(e=>{t?(e.classList.add("is-visible"),e.classList.remove("is-hidden")):(e.classList.add("is-hidden"),e.classList.remove("is-visible"))}))},D=e=>{var t,n;let{homeTeam:r,awayTeam:s}=e.event;return(null==(t=r.subTeams)?void 0:t.length)===2&&(null==(n=s.subTeams)?void 0:n.length)===2},P=(e,t,n)=>{let r,{homeTeam:a,awayTeam:i}=e.event;if(D(e)&&void 0!==n){let e=a.subTeams[n].id,s=i.subTeams[n].id;r=i.subTeams.map(e=>e.id).indexOf(t)>-1?e:s}else r=t===i.id?a.id:i.id;return s.cWY.image(r)},q={...M,..._},R=(e,t)=>{let n=e.tournament.category.sport.slug;return k.z.getTranslatedRoute(t,"event",{name:e.slug,id:e.customId,sport:n},(0,H.HL)({id:e.id})).route},N=(e,t,n,r,a,i,o)=>{let u=(0,j.A)().range([2,48]),l=(0,C.QX)(o,270)[1];u.domain([0,t]);let c=q.select(r).selectAll("a").data(e,e=>e.event.id);c.exit().remove();let d=c.enter().append("a").style("height","".concat(132,"px")).attr("href",e=>R(e.event,a)).attr("class",h).on("mouseenter",(e,t)=>{B(t.event.id,!0)}).on("mouseleave",(e,t)=>B(t.event.id,!1)).on("click",(e,t)=>{e.preventDefault(),i.push(R(t.event,a))}),p=d.filter(e=>D(e)).append("div").attr("class",g);p.append("img").attr("src",e=>P(e,n,0)).attr("class",y),p.append("img").attr("src",e=>P(e,n,1)).attr("class",y),d.filter(e=>!D(e)).append("img").attr("src",e=>P(e,n)).attr("class",x);let f=d.append("div").attr("class",e=>3===e.event.winnerCode?s.h18.Draw:e.point<0?s.h18.Lose:s.h18.Win).classed(v,!0).style("top",e=>e.point<0?"".concat(48,"px"):"".concat(48-u(e.point),"px")).style("margin-top",e=>e.point>0?"".concat(u(e.point),"px"):"0px");f.filter(function(e){return e.point<0&&(e.event.status.code===s.sum.AET||e.event.status.code===s.sum.AP)&&e.event.tournament.category.sport.slug===s.QCR.IceHockey}).append("div").attr("class",b).style("transform","rotate(".concat(l,"deg)")).style("left",function(){return o?"1px":null}).style("right",function(){return o?null:"1px"}),f.transition().ease(q.easeCubicInOut).duration(500).delay(300).style("margin-top","0px").style("height",e=>"".concat((Math.sign(e.point)||1)*u(e.point),"px"))},z=e=>{let{teamId:t,events:n,points:s}=e,i=(0,O.useRef)(null),o=(0,L.useRouter)(),u=(0,E.A)(),{textDirection:c}=(0,l.$c)(),d="rtl"===c,p=n.filter(e=>e.winnerCode&&T(e.winnerCode)).map(e=>({point:s[e.id],event:e})).sort((e,t)=>e.event.startTimestamp-t.event.startTimestamp);return(0,O.useEffect)(()=>{i.current&&p&&N(p,S(s),t,i.current,u,o,d)},[p]),(0,r.jsx)(a.so,{ref:i,position:"relative",w:"100%"})},Q=e=>{let{teamId:t,data:n}=e;return(0,r.jsx)(u.t,{tag:"FormGraph",children:(0,r.jsx)(a.az,{br:"sm",pb:"lg",pt:"md",px:"sm",bg:"surface.s2",children:n?(0,r.jsx)(z,{teamId:t,events:n.events,points:n.points},t):(0,r.jsx)("div",{style:{height:132}})})})};var W=n(47029);let Y=e=>{let{teamId:t}=e,{data:n,error:l}=(0,i.Ay)(s.cWY.form(t));return l?null:(0,r.jsx)(u.t,{tag:"TeamForm",children:(0,r.jsxs)(o.Zp,{children:[(0,r.jsx)(o.Zp.Header,{titleId:"recent_form",actionComponent:(0,r.jsx)(W.P,{})}),(0,r.jsx)(a.az,{minH:{md:"lg"},children:(0,r.jsx)(I,{events:null==n?void 0:n.events})}),(0,r.jsx)(a.az,{p:"sm",children:(0,r.jsx)(Q,{teamId:t,data:n})})]})})}},27956:(e,t,n)=>{n.r(t),n.d(t,{create:()=>a,creator:()=>r.A,local:()=>o,matcher:()=>l.A,namespace:()=>c.A,namespaces:()=>d.A,pointer:()=>p.A,pointers:()=>m,select:()=>s.A,selectAll:()=>h.A,selection:()=>v.Ay,selector:()=>x.A,selectorAll:()=>g.A,style:()=>y.j,window:()=>b.A});var r=n(5001),s=n(56591);function a(e){return(0,s.A)((0,r.A)(e).call(document.documentElement))}var i=0;function o(){return new u}function u(){this._="@"+(++i).toString(36)}u.prototype=o.prototype={constructor:u,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};var l=n(21107),c=n(70978),d=n(71323),p=n(86244),f=n(75394);function m(e,t){return e.target&&(e=(0,f.A)(e),void 0===t&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,e=>(0,p.A)(e,t))}var h=n(95342),v=n(59371),x=n(57374),g=n(45529),y=n(16845),b=n(79367)},95342:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(86352),s=n(59371);function a(e){return"string"==typeof e?new s.LN([document.querySelectorAll(e)],[document.documentElement]):new s.LN([(0,r.A)(e)],s.zr)}}}]);