1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7640],{497:e=>{e.exports={"media-container__image":"ImageWrapper_media-container__image__4Rgpy"}},1064:e=>{e.exports={avatar:"UserAvatar_avatar__JQE5m",small:"UserAvatar_small__HbzGf",medium:"UserAvatar_medium__eUV6U",image:"UserAvatar_image__bqars",placeholder:"UserAvatar_placeholder__daP8F"}},1374:e=>{e.exports={articleHeroBanner:"ArticleHeroBanner_articleHeroBanner__XMcWa",noImage:"ArticleHeroBanner_noImage__p8md6",heroBannerImageComponent:"ArticleHeroBanner_heroBannerImageComponent__iihdf",heroBannerTextWrapper:"ArticleHeroBanner_heroBannerTextWrapper__xmutD",heroBannerTextComponent:"ArticleHeroBanner_heroBannerTextComponent__ydV1f",patternContainerLeft:"ArticleHeroBanner_patternContainerLeft__W3ow3",patternContainer:"ArticleHeroBanner_patternContainer__0xEnY",patternContainerRight:"ArticleHeroBanner_patternContainerRight__bLVB2",pattern:"ArticleHeroBanner_pattern__ZJ7XE",provider:"ArticleHeroBanner_provider__INOSO",providerLogo:"ArticleHeroBanner_providerLogo__Ro53z",providerDetails:"ArticleHeroBanner_providerDetails__PWO__",providerDelimiter:"ArticleHeroBanner_providerDelimiter__I8ZTt",articleTitle:"ArticleHeroBanner_articleTitle__P4TwT",liveIndicator:"ArticleHeroBanner_liveIndicator__blvGd",articleTitleTextBackground:"ArticleHeroBanner_articleTitleTextBackground__utM2m",articleCta:"ArticleHeroBanner_articleCta__nb2T5"}},1792:(e,t,n)=>{"use strict";n.d(t,{x:()=>p});var o=n(28019);n(47451);var r=n(45585),l=n(497),a=n.n(l),i=n(48270),s=n(12160),d=n(31435),c=n(69832),u=n(51218),m=n(47877);let p=e=>{var t,n,l,p,_;let g=(null!=(l=null==(t=e.size)?void 0:t.width)?l:0)/(null!=(p=null==(n=e.size)?void 0:n.height)?p:0),C=Number.isFinite(g)&&g>0?g:d.N.Default3to2,h=""===e.darkModePath?e.path:e.darkModePath,f=(0,s.o4)(()=>{let t=t=>({media:c.Wi[t],width:i.I[t],ratio:C,lightModeUrl:u.g.buildImgSrc({ratio:C,src:e.path,width:i.I[t]}).unwrap(),darkModeUrl:u.g.buildImgSrc({ratio:C,src:h,width:i.I[t]}).unwrap()});return{desktop:t("desktop"),tabletLandscape:t("tabletLandscape"),tabletPortrait:t("tabletPortrait"),mobile:t("mobile")}});return f.isErr()?((0,m.z3)(f.error.message,f.error),null):(0,o.jsx)(r.n,{image:f.value,isPreloaded:e.isPreloaded,alt:e.alt,classNames:null!=(_=a()["media-container__image"])?_:""})}},5153:(e,t,n)=>{"use strict";n.d(t,{z:()=>eE,C:()=>eN});var o=n(28019),r=n(47451),l=n(26998),a=n(38710),i=n(70873),s=n.n(i);let d=e=>{let{label:t,totalCountLabel:n}=e;return(0,o.jsxs)("div",{className:s().container,children:[(0,o.jsx)("h2",{className:s().title,children:t}),(0,o.jsx)("span",{className:s().count,children:n})]})};var c=n(1064),u=n.n(c),m=n(50582),p=n.n(m);let _=e=>{let{avatarUrl:t,size:n="medium",className:r}=e;return(0,o.jsx)("div",{className:p()(u().avatar,u()[n],r),children:null!==t?(0,o.jsx)("img",{src:"https://image-service.onefootball.com/transform?w=".concat("small"===n?20:40,"&dpr=2&image=").concat(encodeURIComponent(t)),alt:"",className:u().image,loading:"lazy"}):(0,o.jsx)("div",{className:u().placeholder})})};var g=n(46221),C=n(80220),h=n.n(C);let f=r.useLayoutEffect,b=e=>{let{body:t,status:n,placeholder:l,submitLabel:a,errorMessage:i,charCountLabel:s=null,onBodyChange:d,onSubmit:c}=e,u=t.length>=g.wT,m="submitting"!==n&&t.trim().length>0&&!u,_=(0,r.useRef)(null);return f(()=>{let e=_.current;null!==e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"))},[t]),(0,o.jsxs)("div",{className:h().container,children:[(0,o.jsxs)("div",{className:h().inputRow,children:[(0,o.jsx)("textarea",{ref:_,rows:1,maxLength:g.wT,className:h().input,placeholder:l,value:t,onChange:e=>{d(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&m&&(e.preventDefault(),c())},disabled:"submitting"===n}),(0,o.jsx)("button",{type:"button",className:p()(h().submitButton,"submitting"===n&&h().submitting),onClick:c,disabled:!m,"aria-label":a,children:"submitting"===n?(0,o.jsx)("span",{className:h().spinner}):(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:h().sendIcon,children:(0,o.jsx)("path",{d:"M8 2L8 14M8 2L4 6M8 2L12 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),null!==i&&(0,o.jsx)("p",{className:h().error,children:i}),null!==s&&(0,o.jsx)("p",{className:h().charCount,children:s})]})};function v(e){let{t}=(0,l.A)("web-payments"),n=function(e){let t=e.length;return t>=g.wT?{kind:"limit",max:g.wT}:t>=g.mE?{kind:"warn",count:t,max:g.wT}:{kind:"none"}}(e);return"warn"===n.kind?t("COMMENTS_CHAR_COUNT",{count:String(n.count),max:String(n.max)}):"limit"===n.kind?t("COMMENTS_CHAR_LIMIT_REACHED",{max:String(n.max)}):null}var y=n(73071),x=n.n(y);let S=e=>{let{composer:t,currentUserAvatarUrl:n,placeholder:r,submitLabel:l,onBodyChange:a,onSubmit:i}=e,s=v(t.body);return(0,o.jsxs)("div",{className:x().container,children:[(0,o.jsx)(_,{avatarUrl:n,size:"medium"}),(0,o.jsx)(b,{body:t.body,status:t.status,placeholder:r,submitLabel:l,errorMessage:t.errorMessage,charCountLabel:s,onBodyChange:a,onSubmit:i})]})};var L=n(42149),E=n.n(L);let I=e=>{let{title:t,message:n}=e;return(0,o.jsxs)("div",{className:E().container,children:[(0,o.jsx)("img",{src:"https://images.onefootball.com/cw/images/comments-empty-avatar-head.png",alt:"",role:"presentation",className:E().image}),(0,o.jsx)("h3",{className:E().title,children:t}),(0,o.jsx)("p",{className:E().message,children:n})]})};var N=n(54916),T=n.n(N);let R=e=>{let{text:t,linkLabel:n,linkUrl:l,dismissAriaLabel:a,onDismiss:i}=e,[s,d]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{d(!0)},[]),u=(0,r.useCallback)(e=>{var t;let n=null!=(t=e.animationName)?t:"";(n.includes("fadeOut")||""===n&&s)&&i()},[s,i]);
1return(0,o.jsxs)("div",{className:p()(T().container,s&&T().dismissing),onAnimationEnd:u,children:[(0,o.jsxs)("p",{className:T().text,children:[t," ",(0,o.jsx)("a",{href:l,className:T().link,target:"_blank",rel:"noopener noreferrer",children:n}),"."]}),(0,o.jsx)("button",{type:"button",className:T().closeButton,onClick:c,disabled:s,"aria-label":a,children:(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:T().closeIcon,children:(0,o.jsx)("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})};var j=n(11668),M=n.n(j);let A=e=>{var t,n;let{author:r,createdAt:l,editedAt:a,editedLabel:i,verifiedBadgeAlt:s,isClubClaimed:d=!1}=e,c="https://images.onefootball.com/icons/teams/164/".concat(null!=(t=r.favoriteTeamId)?t:"-1",".png");return(0,o.jsxs)("div",{className:M().header,children:[(0,o.jsxs)("div",{className:M().avatarGroup,children:[(0,o.jsx)(_,{avatarUrl:r.avatarUrl,size:"small"}),(0,o.jsx)("img",{src:c,alt:"",className:M().teamLogo,loading:"lazy"})]}),(0,o.jsx)("span",{className:M().username,children:null!=(n=r.clubId)?n:r.userId}),d&&(0,o.jsx)("img",{src:"https://images.onefootball.com/cw/icons/club-id-claimed.svg",alt:s,className:M().verifiedBadge}),(0,o.jsx)("span",{className:M().timestamp,children:function(e){let t=Date.now()-new Date(e).getTime();if(t<0)return"just now";let n=Math.floor(t/1e3);if(n<60)return"just now";let o=Math.floor(n/60);if(o<60)return"".concat(o,"m ago");let r=Math.floor(o/60);if(r<24)return"".concat(r,"h ago");let l=Math.floor(r/24);if(l<30)return"".concat(l,"d ago");let a=Math.floor(l/30);if(a<12)return"".concat(a,"mo ago");let i=Math.floor(a/12);return"".concat(i,"y ago")}(l)}),null!==a&&(0,o.jsx)("span",{className:M().edited,children:i})]})};var w=n(82392),k=n.n(w);let D=e=>{let{body:t,status:n,deletedLabel:r,rejectedLabel:l,pendingLabel:a,repliedUserClubId:i,appealLabel:s,onAppeal:d}=e;return"deleted"===n?(0,o.jsx)("p",{className:p()(k().body,k().deleted),children:r}):"rejected"===n?(0,o.jsxs)("div",{className:k().rejectedRow,children:[(0,o.jsx)("p",{className:p()(k().body,k().rejected),children:l}),void 0!==s&&void 0!==d&&(0,o.jsx)("button",{type:"button",className:k().appealLink,onClick:d,children:s})]}):(0,o.jsxs)("div",{children:[(0,o.jsxs)("p",{className:k().body,children:[null!=i&&""!==i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("span",{className:k().mention,children:["@",i]})," "]}),t]}),"pending"===n&&(0,o.jsx)("span",{className:k().pending,children:a})]})};var O=n(15871),B=n.n(O);let P=r.useLayoutEffect,U=e=>{let{editState:t,saveLabel:n,cancelLabel:l,onBodyChange:a,onSave:i,onCancel:s}=e,d="submitting"!==t.status&&t.body.trim().length>0,c=(0,r.useRef)(null);return P(()=>{let e=c.current;null!==e&&(e.style.height="auto",e.style.height="".concat(e.scrollHeight,"px"))},[t.body]),(0,o.jsxs)("div",{className:B().container,children:[(0,o.jsx)("textarea",{ref:c,rows:1,className:B().input,value:t.body,onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&d&&(e.preventDefault(),i()),"Escape"===e.key&&s()},disabled:"submitting"===t.status}),(0,o.jsxs)("div",{className:B().buttonRow,children:[(0,o.jsx)("button",{type:"button",className:B().cancelButton,onClick:s,disabled:"submitting"===t.status,children:l}),(0,o.jsx)("button",{type:"button",className:p()(B().saveButton,"submitting"===t.status&&B().submitting),onClick:i,disabled:!d,children:"submitting"===t.status?(0,o.jsx)("span",{className:B().spinner}):n})]}),null!==t.errorMessage&&(0,o.jsx)("p",{className:B().error,children:t.errorMessage})]})};var V=n(20562),F=n.n(V),H=n(38645);let G=e=>{let{voteType:t,count:n,isActive:r,onClick:l,ariaLabel:a}=e,{schema:i}=(0,H.W)(),s="dark"===i?"dark":"light",d=r?"https://images.onefootball.com/cw/icons/upvote-filled-".concat(s,".svg"):"https://images.onefootball.com/cw/icons/upvote-".concat(s,".svg");return(0,o.jsxs)("button",{type:"button",className:p()(F().button,"downvote"===t&&F().downvote,r&&F().active),onClick:l,"aria-label":a,"aria-pressed":r,children:[(0,o.jsx)("span",{className:p()(F().iconWrapper,"downvote"===t&&F().flipped),children:(0,o.jsx)("img",{src:d,alt:"",className:F().icon})}),n>0&&(0,o.jsx)("span",{className:F().count,children:n})]})};var q=n(88826),W=n.n(q);let J=e=>{let{upvoteCount:t,currentUserVote:n,replyLabel:r,upvoteAriaLabel:l,downvoteAriaLabel:a,onUpvote:i,onDownvote:s,onReply:d}=e;return(0,o.jsxs)("div",{className:W().actions,children:[(0,o.jsx)(G,{voteType:"upvote",count:t,isActive:"upvote"===n,onClick:i,ariaLabel:l}),(0,o.jsx)(G,{voteType:"downvote",count:0,isActive:"downvote"===n,onClick:s,ariaLabel:a}),(0,o.jsx)("button",{type:"button",className:W().replyButton,onClick:d,children:r})]})};var z=n(85686),Y=n(39228),Z=n.n(Y);let K=e=>{var t,n;let{editLabel:l,deleteLabel:a,reportLabel:i,triggerAriaLabel:s,onEdit:d,onDelete:c,onReport:u}=e,[m,p]=(0,r.useState)(!1),[_,g]=(0,r.useState)(null),C=(0,r.useRef)(null),h=(0,r.useRef)(null),f=(0,r.useCallback)(()=>{p(e=>!e)},[]),b=(0,r.useCallback)(()=>{p(!1),null==d||d()},[d]),v=(0,r.useCallback)(()=>{p(!1),null==c||c()},[c]),y=(0,r.useCallback)(()=>{p(!1),null==u||u()},[u]),x=void 0!==l&&void 0!==d,S=void 0!==a&&void 0!==c,L=void 0!==i&&void 0!==u;(0,r.useLayoutEffect)(()=>{var e,t;if(!m)return void g(null);let n=C.current;if(null===n)return;let o=n.getBoundingClientRect(),r=null!=(t=null==(e=h.current)?void 0:e.offsetWidth)?t:120;g({top:o.bottom+4,left:o.right-r})},[m]),(0,r.useEffect)(()=>
1{if(!m)return;let e=e=>{var t,n,o,r;let l=e.target;if(!(l instanceof Node))return;let a=null!=(o=null==(t=C.current)?void 0:t.contains(l))&&o,i=null!=(r=null==(n=h.current)?void 0:n.contains(l))&&r;a||i||p(!1)},t=()=>{p(!1)};return document.addEventListener("mousedown",e),window.addEventListener("scroll",t,!0),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t)}},[m]);let E={position:"fixed",top:null!=(t=null==_?void 0:_.top)?t:0,left:null!=(n=null==_?void 0:_.left)?n:0,visibility:null===_?"hidden":"visible"};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("button",{ref:C,type:"button",className:Z().trigger,onClick:f,"aria-label":s,"aria-expanded":m,children:"â®"}),m&&"undefined"!=typeof document&&(0,z.createPortal)((0,o.jsxs)("div",{ref:h,className:Z().menu,role:"menu",style:E,children:[x&&(0,o.jsxs)("button",{type:"button",className:Z().menuItem,onClick:b,role:"menuitem",children:[(0,o.jsx)(X,{name:"edit"}),l]}),S&&(0,o.jsxs)("button",{type:"button",className:Z().menuItem,onClick:v,role:"menuitem",children:[(0,o.jsx)(X,{name:"delete"}),a]}),L&&(0,o.jsxs)("button",{type:"button",className:Z().menuItem,onClick:y,role:"menuitem",children:[(0,o.jsx)(X,{name:"report"}),i]})]}),document.body)]})},X=e=>{let{name:t}=e,{schema:n}=(0,H.W)(),r="dark"===n?"dark":"light";return"report"===t?(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"dark"===r?"#f5f5f5":"#1a1a1a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:Z().menuItemIcon,"aria-hidden":"true",children:[(0,o.jsx)("line",{x1:"4",y1:"22",x2:"4",y2:"3"}),(0,o.jsx)("path",{d:"M4 3 h11 l-2 4 2 4 H4"})]}):(0,o.jsx)("img",{src:"".concat("https://images.onefootball.com/cw/icons","/").concat(t,"-").concat(r,".svg"),alt:"",className:Z().menuItemIcon})};var Q=n(74847),$=n(31873),ee=n.n($);let et=e=>{let{label:t,isLoading:n,onClick:r}=e;return(0,o.jsx)("div",{className:ee().container,children:(0,o.jsx)("button",{type:"button",className:ee().button,onClick:r,disabled:n,children:t})})};var en=n(49200),eo=n.n(en);let er=e=>{var t,n,l,a,i,s,d;let{comment:c,labels:u,viewRepliesLabel:m,isRepliesExpanded:_=!1,repliesState:g,hideRepliesLabel:C,loadMoreRepliesLabel:h,repliesErrorRetryLabel:f,replyPlaceholder:b,replySubmitLabel:y,currentUserAvatarUrl:x,isCurrentUserLoggedIn:S=!1,isOwnComment:L=!1,currentUserId:E,onUpvote:I,onDownvote:N,onReply:T,onToggleReplies:R,onLoadMoreReplies:j,onReplyBodyChange:M,onSubmitReply:w,onStartEditing:k,onCancelEditing:O,onEditBodyChange:B,onSubmitEdit:P,onDelete:V,onReport:F,onAppeal:H,onFinalizeDelete:G,onCloseReplyComposer:q}=e,[W,z]=(0,r.useState)(!1),[Y,Z]=(0,r.useState)(!1),X=(0,r.useRef)(null),$=(0,r.useRef)(null),ee=(0,r.useCallback)(e=>{X.current=e,null!==e&&e.style.setProperty("--reply-composer-enter-end-height","".concat(e.scrollHeight,"px"))},[]),en=(0,r.useCallback)(e=>{null!==e&&e.style.setProperty("--comment-card-enter-end-height","".concat(e.scrollHeight,"px"))},[]),er=(0,r.useCallback)(e=>{$.current=e},[]),ea=(0,r.useCallback)(e=>{null!==e&&e.style.setProperty("--load-more-replies-slot-enter-end-height","".concat(e.scrollHeight,"px"))},[]),ei=(0,r.useCallback)(()=>{let e=$.current;null!==e&&e.style.setProperty("--replies-container-collapse-start-height","".concat(e.scrollHeight,"px")),z(!0)},[]),es=(0,r.useCallback)(()=>{let e=X.current;null!==e&&e.style.setProperty("--reply-composer-collapse-start-height","".concat(e.scrollHeight,"px")),Z(!0)},[]),ed=(0,r.useCallback)(e=>{var t;if(e.target!==e.currentTarget)return;let n=null!=(t=e.animationName)?t:"",o=n.includes("fadeOut"),r=""===n;(o||r&&W)&&(z(!1),null==R||R(c.id))},[W,c.id,R]),ec=(0,r.useCallback)(()=>{(null==g?void 0:g.replyComposer)!=null?es():T(c.id)},[null==g?void 0:g.replyComposer,T,c.id,es]),eu=(0,r.useCallback)(e=>{var t;let n=null!=(t=e.animationName)?t:"",o=n.includes("fadeOut"),r=""===n;(o||r&&Y)&&(Z(!1),null==q||q(c.id))},[Y,c.id,q]),em="deleted"===c.status,ep="approved"===c.status||"pending"===c.status,e_=c.hasOptionMenu&&"notEditing"===c.editState.kind,eg=S&&!L&&"approved"===c.status&&!c.isPendingDeletion&&void 0!==F&&void 0!==u.reportLabel,eC=S&&L&&"rejected"===c.status&&void 0!==H&&void 0!==u.appealLabel,eh="editing"===c.editState.kind,ef=c.replyCount>0&&void 0!==m,eb=null!=(t=null==g?void 0:g.replyComposer)?t:null,ev=v(null!=(n=null==eb?void 0:eb.composer.body)?n:""),ey=(0,r.useCallback)(e=>{var t;let n=null!=(t=e.animationName)?t:"";c.isPendingDeletion&&(n.includes("fadeOutCommentCard")||""===n)&&(null==G||G(c.id))},[c.isPendingDeletion,c.id,G]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{ref:en,className:p()(eo().card,c.isPendingDeletion&&eo().removing),onAnimationEnd:ey,children:[!em&&(0,o.jsxs)("div",{className:eo().headerRow,children:[(0,o.jsx)(A,{author:c.author,createdAt:c.createdAt,editedAt:c.editedAt,editedLabel:u.editedLabel,verifiedBadgeAlt:u.verifiedBadgeAlt,isClubClaimed:c.author.isClubClaimed}),e_&&(0,o.jsx)(K,{editLabel:null!=(l=u.editLabel)?l:"Edit",deleteLabel:null!=(a=u.deleteLabel)?a:"Delete",triggerAriaLabel:u.optionsMenuAriaLabel,onEdit:()=>{var e;null==k||k(c.id,null!=(e=c.body)?e:"")},onDelete:()=>{null==V||V(c.id)}}),!e_&&eg&&(0,o.jsx)(K,{reportLabel:u.reportLabel,triggerAriaLabel:u.optionsMenuAriaLabel,onReport:()=>{F(c.id)}})]}),eh?(0,o.jsx)(U,{editState:c.editState,saveLabel:null!=(i=u.saveLabel)?i:"Save",cancelLabel:null!=(s=u.cancelLabel)?s:"Cancel",onBodyChange:e=>{null==B||B(c.id,e)},onSave:()=>{null==P||P(c.id)},onCancel:()=>{null==O||O(c.id)}}):(0,o.jsx)(D,{body:c.body,status:c.status,deletedLabel:u.deletedLabel,rejectedLabel:u.rejectedLabel,pen
1dingLabel:u.pendingLabel,appealLabel:eC?u.appealLabel:void 0,onAppeal:eC?()=>{H(c.id)}:void 0}),ep&&!eh&&(0,o.jsx)(J,{upvoteCount:c.upvoteCount,currentUserVote:c.currentUserVote,replyLabel:u.replyLabel,upvoteAriaLabel:u.upvoteAriaLabel,downvoteAriaLabel:u.downvoteAriaLabel,onUpvote:()=>{I(c.id)},onDownvote:()=>{N(c.id)},onReply:ec}),ef&&(0,o.jsx)("button",{type:"button",className:eo().repliesToggle,onClick:()=>{_?ei():null==R||R(c.id)},disabled:W,children:m}),_&&void 0!==g&&(0,o.jsxs)("div",{ref:er,className:p()(eo().repliesContainer,W&&eo().collapsing),onAnimationEnd:ed,children:[g.pagination.isLoading&&0===g.items.length&&(0,o.jsx)(Q.v,{count:2,variant:"reply"}),null!==g.pagination.error&&0===g.items.length&&void 0!==f&&(0,o.jsx)("button",{type:"button",className:eo().retryButton,onClick:()=>{null==R||R(c.id)},children:f}),g.items.map((e,t)=>{var n,l,a,i,s,d;let m=t===g.items.length-1,_="editing"===e.editState.kind,C=e.hasOptionMenu&&"notEditing"===e.editState.kind,h=void 0!==E&&e.author.userId===E,f=S&&!h&&"approved"===e.status&&!e.isPendingDeletion&&void 0!==F&&void 0!==u.reportLabel,v=S&&h&&"rejected"===e.status&&void 0!==H&&void 0!==u.appealLabel,L=function(e,t,n){return e&&(null===n||n.anchoredToReplyId!==t)}(m,e.id,eb);return(0,o.jsxs)(r.Fragment,{children:[(0,o.jsxs)("div",{className:p()(eo().replyItemWrapper,L?eo().lastReply:eo().notLastReply,e.isPendingDeletion&&eo().removing),onAnimationEnd:t=>{var n;let o=null!=(n=t.animationName)?n:"";e.isPendingDeletion&&(o.includes("fadeOutCommentCard")||""===o)&&(null==G||G(e.id))},children:[(0,o.jsxs)("div",{className:eo().replyConnector,children:[(0,o.jsx)("div",{className:eo().connectorCorner}),!L&&(0,o.jsx)("div",{className:eo().connectorVertical})]}),(0,o.jsxs)("div",{className:eo().replyContent,children:[(0,o.jsxs)("div",{className:eo().headerRow,children:[(0,o.jsx)(A,{author:e.author,createdAt:e.createdAt,editedAt:e.editedAt,editedLabel:u.editedLabel,verifiedBadgeAlt:u.verifiedBadgeAlt,isClubClaimed:e.author.isClubClaimed}),C&&(0,o.jsx)(K,{editLabel:null!=(l=u.editLabel)?l:"Edit",deleteLabel:null!=(a=u.deleteLabel)?a:"Delete",triggerAriaLabel:u.optionsMenuAriaLabel,onEdit:()=>{var t;null==k||k(e.id,null!=(t=e.body)?t:"")},onDelete:()=>{null==V||V(e.id)}}),!C&&f&&(0,o.jsx)(K,{reportLabel:u.reportLabel,triggerAriaLabel:u.optionsMenuAriaLabel,onReport:()=>{F(e.id)}})]}),_?(0,o.jsx)(U,{editState:e.editState,saveLabel:null!=(i=u.saveLabel)?i:"Save",cancelLabel:null!=(s=u.cancelLabel)?s:"Cancel",onBodyChange:t=>{null==B||B(e.id,t)},onSave:()=>{null==P||P(e.id)},onCancel:()=>{null==O||O(e.id)}}):(0,o.jsx)(D,{body:e.body,status:e.status,deletedLabel:u.deletedLabel,rejectedLabel:u.rejectedLabel,pendingLabel:u.pendingLabel,repliedUserClubId:null==(n=e.repliedUser)?void 0:n.clubId,appealLabel:v?u.appealLabel:void 0,onAppeal:v?()=>{H(e.id)}:void 0}),("approved"===e.status||"pending"===e.status)&&!_&&(0,o.jsx)(J,{upvoteCount:e.upvoteCount,currentUserVote:e.currentUserVote,replyLabel:u.replyLabel,upvoteAriaLabel:u.upvoteAriaLabel,downvoteAriaLabel:u.downvoteAriaLabel,onUpvote:()=>{I(e.id)},onDownvote:()=>{N(e.id)},onReply:()=>{T(e.id)}})]})]}),null!==eb&&eb.anchoredToReplyId===e.id&&void 0!==b&&(0,o.jsxs)("div",{ref:ee,className:p()(eo().anchoredReplyComposer,Y&&eo().collapsing),onAnimationEnd:eu,children:[(0,o.jsx)("div",{className:eo().replyConnector,children:(0,o.jsx)("div",{className:eo().connectorCorner})}),(0,o.jsx)(el,{styles:eo(),replyComposerState:eb,currentUserAvatarUrl:null!=x?x:null,replySubmitLabel:null!=y?y:"Post",replyCharCountLabel:ev,cancelAriaLabel:null!=(d=u.cancelLabel)?d:"Cancel",replyingToTemplate:u.replyingToTemplate,isClosing:Y,onBodyChange:e=>{null==M||M(c.id,e)},onSubmit:()=>{null==w||w(c.id)},onRequestClose:es})]})]},e.id)}),g.pagination.hasMore&&g.items.length>0&&void 0!==h&&(0,o.jsx)("div",{ref:ea,className:eo().loadMoreRepliesSlot,children:g.pagination.isLoading?(0,o.jsx)(Q.v,{count:1,variant:"reply"}):(0,o.jsx)(et,{label:h,isLoading:!1,onClick:()=>{null==j||j(c.id)}})},g.pagination.isLoading?"loading":"button"),void 0!==C&&(0,o.jsx)("button",{type:"button",className:eo().hideRepliesButton,onClick:ei,disabled:W,children:C})]})]}),null!==eb&&null===eb.anchoredToReplyId&&void 0!==b&&(0,o.jsxs)("div",{ref:ee,className:p()(eo().replyComposerWrapper,Y&&eo().c
1ollapsing),onAnimationEnd:eu,children:[(0,o.jsx)("div",{className:eo().replyConnector,children:(0,o.jsx)("div",{className:eo().connectorCorner})}),(0,o.jsx)(el,{styles:eo(),replyComposerState:eb,currentUserAvatarUrl:null!=x?x:null,replySubmitLabel:null!=y?y:"Post",replyCharCountLabel:ev,cancelAriaLabel:null!=(d=u.cancelLabel)?d:"Cancel",replyingToTemplate:u.replyingToTemplate,isClosing:Y,onBodyChange:e=>{null==M||M(c.id,e)},onSubmit:()=>{null==w||w(c.id)},onRequestClose:es})]})]})},el=e=>{var t,n;let{styles:r,replyComposerState:l,currentUserAvatarUrl:a,replySubmitLabel:i,replyCharCountLabel:s,cancelAriaLabel:d,replyingToTemplate:c,isClosing:u,onBodyChange:m,onSubmit:p,onRequestClose:g}=e;return(0,o.jsxs)("div",{className:r.replyComposerContent,children:[(0,o.jsx)(_,{avatarUrl:a,size:"medium"}),(0,o.jsx)(b,{body:l.composer.body,status:l.composer.status,placeholder:c.replace("{{name}}",null!=(n=null==(t=l.repliedUser)?void 0:t.displayName)?n:""),submitLabel:i,errorMessage:l.composer.errorMessage,charCountLabel:s,onBodyChange:m,onSubmit:p}),(0,o.jsx)("button",{type:"button",className:r.replyComposerCloseButton,onClick:g,disabled:u,"aria-label":d,children:(0,o.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",className:r.replyComposerCloseIcon,children:(0,o.jsx)("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})};var ea=n(14141),ei=n.n(ea);let es=e=>{let{isOpen:t,message:n}=e,[l,a]=(0,r.useState)(t);return((0,r.useEffect)(()=>{t&&a(!0)},[t]),l)?(0,o.jsx)("div",{role:"alert",className:p()(ei().toast,!t&&ei().exiting),onAnimationEnd:e=>{var n;let o=null!=(n=e.animationName)?n:"",r=o.includes("fadeOut"),l=""===o;!t&&(r||l)&&a(!1)},children:(0,o.jsx)("span",{className:ei().message,children:n})}):null};var ed=n(48466),ec=n.n(ed);let eu=e=>{let{comments:t,labels:n,hasMore:l,isLoadingMore:a,loadMoreLabel:i,hideRepliesLabel:s,loadMoreRepliesLabel:d,repliesErrorRetryLabel:c,viewRepliesLabel:u,isLoadMoreErrorToastVisible:m,loadMoreErrorToastMessage:p,onLoadMore:_,onUpvote:g,onDownvote:C,replyPlaceholder:h,replySubmitLabel:f,currentUserAvatarUrl:b,onReply:v,onToggleReplies:y,onLoadMoreReplies:x,onReplyBodyChange:S,onSubmitReply:L,onCancelReply:E,onStartEditing:I,onCancelEditing:N,onEditBodyChange:T,onSubmitEdit:R,onDelete:j,onFinalizeDelete:M,onCloseReplyComposer:A,isCurrentUserLoggedIn:w=!1,currentUserId:k,onReport:D,onAppeal:O}=e,B=(0,r.useCallback)(e=>{null!==e&&e.style.setProperty("--load-more-slot-enter-end-height","".concat(e.scrollHeight,"px"))},[]);return(0,o.jsxs)("div",{className:ec().list,children:[t.map(e=>(0,o.jsx)("div",{className:ec().commentWrapper,children:(0,o.jsx)(er,{comment:e,labels:n,viewRepliesLabel:u(e.replyCount),isRepliesExpanded:e.repliesState.isExpanded,repliesState:e.repliesState,hideRepliesLabel:s,loadMoreRepliesLabel:d,repliesErrorRetryLabel:c,replyPlaceholder:h,replySubmitLabel:f,currentUserAvatarUrl:b,onUpvote:g,onDownvote:C,onReply:v,onToggleReplies:y,onLoadMoreReplies:x,onReplyBodyChange:S,onSubmitReply:L,onCancelReply:E,onStartEditing:I,onCancelEditing:N,onEditBodyChange:T,onSubmitEdit:R,onDelete:j,onFinalizeDelete:M,onCloseReplyComposer:A,isCurrentUserLoggedIn:w,isOwnComment:void 0!==k&&e.author.userId===k,currentUserId:k,onReport:D,onAppeal:O})},e.id)),l&&(0,o.jsx)("div",{ref:B,className:ec().loadMoreSlot,children:a?(0,o.jsx)(Q.v,{count:2}):(0,o.jsx)(et,{label:i,isLoading:!1,onClick:_})},a?"loading":"button"),(0,o.jsx)(es,{isOpen:m,message:p})]})};var em=n(7215),ep=n.n(em);let e_=e=>{let{isOpen:t,titleLabel:n,messageLabel:l,confirmLabel:a,cancelLabel:i,onConfirm:s,onCancel:d}=e,c=(0,r.useId)(),u=(0,r.useId)();return((0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&d()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t,d]),t&&"undefined"!=typeof document)?(0,z.createPortal)((0,o.jsx)("div",{role:"presentation",className:ep().backdrop,onClick:e=>{e.target===e.currentTarget&&d()},children:(0,o.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":c,"aria-describedby":u,className:ep().dialog,children:[(0,o.jsx)("h2",{id:c,className:ep().title,children:n}),(0,o.jsx)("p",{id:u,className:ep().message,children:l}),(0,o.jsxs)("div",{className:ep().actions,children:[(0,o.jsx)("button",{type:"button",className:p()(ep().button,ep().cancelButton),onClick:d,children:i}),(0,o.jsx)("button",{type:"button",className:p()(ep().button,ep().confirmButton),onClick:s,children:a})]})]})}),document.body):null};var eg=n(91727),eC=n.n(eg);let eh=e=>{let{isOpen:t,titleLabel:n,hintLabel:l,reasonsLegend:a,reasons:i,selectedReason:s,detailsLabel:d,detailsPlaceholder:c,details:u,maxDetailsLength:m,submitLabel:_,submittingLabel:g,cancelLabel:C,errorMessage:h,isSubmitting:f,onReasonChange:b,onDetailsChange:v,onSubmit:y,onCancel:x}=e,S=(0,r.useId)(),L=(0,r.useId)(),E=(0,r.useId)();if((0,r.useEffect)(()=>
1{if(!t)return;let e=e=>{"Escape"!==e.key||f||x()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t,f,x]),!t||"undefined"==typeof document)return null;let I=null===s||f;return(0,z.createPortal)((0,o.jsx)("div",{role:"presentation","data-testid":"report-dialog-backdrop",className:eC().backdrop,onClick:e=>{f||e.target===e.currentTarget&&x()},children:(0,o.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":S,"aria-describedby":L,className:eC().dialog,children:[(0,o.jsx)("h2",{id:S,className:eC().title,children:n}),(0,o.jsx)("p",{id:L,className:eC().hint,children:l}),(0,o.jsxs)("div",{className:eC().scrollableBody,children:[(0,o.jsxs)("fieldset",{className:eC().reasons,children:[(0,o.jsx)("legend",{className:eC().legend,children:a}),i.map(e=>(0,o.jsxs)("label",{className:eC().reasonRow,children:[(0,o.jsx)("input",{type:"radio",name:E,value:e.value,checked:s===e.value,onChange:()=>{b(e.value)},className:eC().radio}),(0,o.jsx)("span",{className:eC().reasonLabel,children:e.label})]},e.value))]}),(0,o.jsxs)("label",{className:eC().detailsField,children:[(0,o.jsx)("span",{className:eC().detailsLabel,children:d}),(0,o.jsx)("textarea",{className:eC().textarea,value:u,placeholder:c,maxLength:m,onChange:e=>{v(e.target.value)}})]})]}),null!==h&&(0,o.jsx)("p",{role:"alert",className:eC().error,children:h}),(0,o.jsxs)("div",{className:eC().actions,children:[(0,o.jsx)("button",{type:"button",className:p()(eC().button,eC().cancelButton),onClick:x,disabled:f,children:C}),(0,o.jsx)("button",{type:"button",className:p()(eC().button,eC().confirmButton),onClick:y,disabled:I,children:f?g:_})]})]})}),document.body)};var ef=n(81627),eb=n.n(ef);let ev=e=>{let{isOpen:t,titleLabel:n,hintLabel:l,detailsLabel:a,detailsPlaceholder:i,details:s,maxDetailsLength:d,submitLabel:c,submittingLabel:u,cancelLabel:m,errorMessage:_,isSubmitting:g,onDetailsChange:C,onSubmit:h,onCancel:f}=e,b=(0,r.useId)(),v=(0,r.useId)();if((0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||g||f()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t,g,f]),!t||"undefined"==typeof document)return null;let y=""===s.trim()||g;return(0,z.createPortal)((0,o.jsx)("div",{role:"presentation","data-testid":"appeal-dialog-backdrop",className:eb().backdrop,onClick:e=>{g||e.target===e.currentTarget&&f()},children:(0,o.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":b,"aria-describedby":v,className:eb().dialog,children:[(0,o.jsx)("h2",{id:b,className:eb().title,children:n}),(0,o.jsx)("p",{id:v,className:eb().hint,children:l}),(0,o.jsxs)("label",{className:eb().detailsField,children:[(0,o.jsx)("span",{className:eb().detailsLabel,children:a}),(0,o.jsx)("textarea",{className:eb().textarea,value:s,placeholder:i,maxLength:d,onChange:e=>{C(e.target.value)}})]}),null!==_&&(0,o.jsx)("p",{role:"alert",className:eb().error,children:_}),(0,o.jsxs)("div",{className:eb().actions,children:[(0,o.jsx)("button",{type:"button",className:p()(eb().button,eb().cancelButton),onClick:f,disabled:g,children:m}),(0,o.jsx)("button",{type:"button",className:p()(eb().button,eb().confirmButton),onClick:h,disabled:y,children:g?u:c})]})]})}),document.body)},ey="https://promo.onefootball.com/community-guidelines",ex=new Set(["de","en","es","fr","it","pt"]);var eS=n(13543),eL=n.n(eS);let eE="comments",eI=["inappropriateContent","harassmentOrBullying","selfHarmOrEatingDisorderContent","violentOrHatefulContent","restrictedItemPromotion","sexualContent","spamOrScam","misinformation","illegalActivity","other"],eN=()=>(0,o.jsx)("div",{id:eE,children:(0,o.jsx)(eT,{})}),eT=()=>{var e,t,n,i,s;let{t:c,lang:u}=(0,l.A)("web-payments"),m=(0,a.d)(e=>e.isInitialLoading),p=(0,a.d)(e=>e.initialLoadError),_=(0,a.d)(e=>e.currentUserProfile),C=(0,a.d)(e=>e.comments),h=(0,a.d)(e=>e.totalCount),f=(0,a.d)(e=>e.rootPagination),b=(0,a.d)(e=>e.isLoadMoreErrorToastVisible),v=(0,a.d)(e=>e.isPreviewMode),y=(0,a.d)(e=>e.rootComposer),x=(0,a.d)(e=>e.showCommunityGuidelines),L=(0,a.d)(e=>e.contentId),E=(0,a.d)(e=>e.loadMoreComments),N=(0,a.d)(e=>e.dismissCommunityGuidelines),T=(0,a.d)(e=>e.setRootComposerBody),j=(0,a.d)(e=>e.submitRootComment),M=(0,a.d)(e=>e.vote),A=(0,a.d)(e=>e.toggleReplies),w=(0,a.d)(e=>e.loadMoreReplies),k=(0,a.d)(e=>e.closeReplyComposer),D=(0,a.d)(e=>e.replyTo),O=(0,a.d)(e=>e.setReplyComposerBody),B=(0,a.d)(e=>e.submitReply),P=(0,a.d)(e=>e.startEditing),U=(0,a.d)(e=>e.cancelEditing),V=(0,a.d)(e=>e.setEditingBody),F=(0,a.d)(e=>e.submitEdit),H=(0,a.d)(e=>e.requestDeleteComment),G=(0,a.d)(e=>e.confirmDeleteComment),q=(0,a.d)(e=>e.cancelDeleteComment),W=(0,a.d)(e=>e.deleteConfirmation),J=(0,a.d)(e=>e.finalizeDelete),z=(0,a.d)(e=>e.reportConfirmation),Y=(0,a.d)(e=>e.requestReportComment),Z=(0,a.d)(e=>e.cancelReportComment),K=(0,a.d)(e=>e.setReportReason),X=(0,a.d)(e=>e.setReportDetails),$=(0,a.d)(e=>e.submitReportComment),ee=(0,a.d)(e=>e.appealConfirmation),et=(0,a.d)(e=>e.requestAppealComment),en=(0,a.d)(e=>e.cancelAppealComment),eo=(0,a.d)(e=>e.setAppealDetails),er=(0,a.d)(e=>e.submitAppealComment),el=(0,a.d)(e=>e.initialize),ea=(0,a.d)(e=>e.markCommentsOpened),ei=(0,r.useRef)(null),es=(0,r.useCallback)(e=>{if(null!==ei.current&&(ei.current.disconnect(),ei.current=null),null===e||"undefined"==typeof IntersectionObserver)return;let t=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){ea(),t.disconnect(),ei.current=null;return}},{threshold:0});t.observe(e),ei.current=t},[ea]),ed=v||f.hasMore;if(m)return(0,o.jsx)("div",{ref:es,className:eL().container,children:(0,o.jsx)(Q.v,{count:3})});if(null!==p)return(0,o.jsxs)("div",{ref:es,className:eL().container,children:[(0,o.jsx)("p",{className:eL().error,children:p}),(0,o.jsx)("button",{type:"button",className:eL().retryButton,onClick:()=>{el(L)},children:c("COMMENTS_RETRY")})]});let ec={editedLabel:c("COMMENTS_EDITED"),deletedLabel:c("COMMENTS_DELETED"),rejectedLabel:c("COMMENTS_REJECTED"),pendingLabel:c("COMMENTS_PENDING"),replyLabel:c("COMMENTS_REPLY"),editLabel:c("COMMENTS_EDIT"),deleteLabel:c("COMMENTS_DELETE"),reportLabel:c("COMMENTS_REPORT"),appealLabel:c("COMMENTS_APPEAL"),saveLabel:c("COMMENTS_SAVE"),
1cancelLabel:c("COMMENTS_CANCEL"),optionsMenuAriaLabel:c("COMMENTS_OPTIONS_MENU_ARIA"),upvoteAriaLabel:c("COMMENTS_UPVOTE_ARIA"),downvoteAriaLabel:c("COMMENTS_DOWNVOTE_ARIA"),verifiedBadgeAlt:c("COMMENTS_VERIFIED_BADGE_ALT"),replyingToTemplate:c("COMMENTS_REPLY_TO")};return(0,o.jsxs)("div",{ref:es,className:eL().container,children:[(0,o.jsx)(d,{label:c("COMMENTS_TITLE"),totalCountLabel:c("COMMENTS_TOTAL_COUNT_LABEL",{count:String(h)})}),(0,o.jsx)(S,{composer:y,currentUserAvatarUrl:_.avatarUrl,placeholder:c("COMMENTS_WRITE_PLACEHOLDER"),submitLabel:c("COMMENTS_SUBMIT"),onBodyChange:T,onSubmit:()=>{j()}}),x&&(0,o.jsx)(R,{text:c("COMMENTS_COMMUNITY_GUIDELINES_BODY"),linkLabel:c("COMMENTS_COMMUNITY_GUIDELINES_LINK"),linkUrl:function(e){var t;if("pt-br"===e)return"".concat(ey,"/pt-br");let n=null!=(t=e.split("-")[0])?t:"en";return"".concat(ey,"/").concat(ex.has(n)?n:"en")}(u),dismissAriaLabel:c("COMMENTS_COMMUNITY_GUIDELINES_DISMISS_ARIA"),onDismiss:N}),0===h&&0===C.length?(0,o.jsx)(I,{title:c("COMMENTS_EMPTY_STATE_TITLE"),message:c("COMMENTS_EMPTY_STATE_MESSAGE")}):(0,o.jsx)(eu,{comments:C,labels:ec,hasMore:ed,isLoadingMore:f.isLoading,hasLoadMoreError:null!==f.error,isLoadMoreErrorToastVisible:b,loadMoreErrorToastMessage:c("COMMENTS_LOAD_MORE_ERROR"),loadMoreLabel:c("COMMENTS_LOAD_MORE"),hideRepliesLabel:c("COMMENTS_HIDE_REPLIES"),loadMoreRepliesLabel:c("COMMENTS_LOAD_MORE_REPLIES"),repliesErrorRetryLabel:c("COMMENTS_REPLIES_ERROR_RETRY"),viewRepliesLabel:e=>c("COMMENTS_VIEW_REPLIES",{count:String(e)}),onLoadMore:()=>{E()},onUpvote:e=>{M(e,"upvote")},onDownvote:e=>{M(e,"downvote")},replyPlaceholder:c("COMMENTS_REPLY_PLACEHOLDER"),replySubmitLabel:c("COMMENTS_SUBMIT"),currentUserAvatarUrl:_.avatarUrl,onReply:D,onToggleReplies:e=>{A(e)},onLoadMoreReplies:e=>{w(e)},onReplyBodyChange:O,onSubmitReply:e=>{B(e)},onCancelReply:k,onStartEditing:P,onCancelEditing:U,onEditBodyChange:V,onSubmitEdit:e=>{F(e)},onDelete:H,onFinalizeDelete:J,onCloseReplyComposer:k,isCurrentUserLoggedIn:"authenticated"===_.kind,currentUserId:"authenticated"===_.kind?_.userId:void 0,onReport:Y,onAppeal:et}),(0,o.jsx)(e_,{isOpen:null!==W,titleLabel:c("COMMENTS_DELETE_DIALOG_TITLE"),messageLabel:c("COMMENTS_DELETE_DIALOG_MESSAGE"),confirmLabel:c("COMMENTS_DELETE_DIALOG_CONFIRM"),cancelLabel:c("COMMENTS_DELETE_DIALOG_CANCEL"),onConfirm:()=>{G()},onCancel:q}),(0,o.jsx)(eh,{isOpen:null!==z,titleLabel:c("COMMENTS_REPORT_DIALOG_TITLE"),hintLabel:c("COMMENTS_REPORT_DIALOG_HINT"),reasonsLegend:c("COMMENTS_REPORT_REASONS_LEGEND"),reasons:eI.map(e=>({value:e,label:c("COMMENTS_REPORT_REASON_".concat(e.replace(/([A-Z])/g,"_$1").toUpperCase()))})),selectedReason:null!=(e=null==z?void 0:z.selectedReason)?e:null,detailsLabel:c("COMMENTS_REPORT_DETAILS_LABEL"),detailsPlaceholder:c("COMMENTS_REPORT_DETAILS_PLACEHOLDER"),details:null!=(t=null==z?void 0:z.details)?t:"",maxDetailsLength:g.Mu,submitLabel:c("COMMENTS_REPORT_SUBMIT"),submittingLabel:c("COMMENTS_REPORT_SUBMITTING"),cancelLabel:c("COMMENTS_REPORT_CANCEL"),errorMessage:null!=(n=null==z?void 0:z.errorMessage)?n:null,isSubmitting:(null==z?void 0:z.status)==="submitting",onReasonChange:K,onDetailsChange:X,onSubmit:()=>{$()},onCancel:Z}),(0,o.jsx)(ev,{isOpen:null!==ee,titleLabel:c("COMMENTS_APPEAL_DIALOG_TITLE"),hintLabel:c("COMMENTS_APPEAL_DIALOG_HINT"),detailsLabel:c("COMMENTS_APPEAL_DETAILS_LABEL"),detailsPlaceholder:c("COMMENTS_APPEAL_DETAILS_PLACEHOLDER"),details:null!=(i=null==ee?void 0:ee.details)?i:"",maxDetailsLength:g.h0,submitLabel:c("COMMENTS_APPEAL_SUBMIT"),submittingLabel:c("COMMENTS_APPEAL_SUBMITTING"),cancelLabel:c("COMMENTS_APPEAL_CANCEL"),errorMessage:null!=(s=null==ee?void 0:ee.errorMessage)?s:null,isSubmitting:(null==ee?void 0:ee.status)==="submitting",onDetailsChange:eo,onSubmit:()=>{er()},onCancel:en})]})}},7215:e=>{e.exports={backdrop:"DeleteConfirmationDialog_backdrop__sNYQb",deleteDialogBackdropFadeIn:"DeleteConfirmationDialog_deleteDialogBackdropFadeIn__WLZg9",dialog:"DeleteConfirmationDialog_dialog__xP3_v",deleteDialogScaleIn:"DeleteConfirmationDialog_deleteDialogScaleIn__VdIZJ",title:"DeleteConfirmationDialog_title__7bcFo",message:"DeleteConfirmationDialog_message__JwtT3",actions:"DeleteConfirmationDialog_actions__XfmFA",button:"DeleteConfirmationDialog_button__Q5_Hl",cancelButton:"DeleteConfirmationDialog_cancelButton__aPNdE",confirmButton:"DeleteConfirmationDialog_confirmButton__KhUad"}},9662:e=>{e.exports={"text-1":"ArticleTwitter_text-1__fhsXp","text-2":"ArticleTwitter_text-2__qJOLx","text-3":"ArticleTwitter_text-3__daLwd","text-4":"ArticleTwitter_text-4__B3xLN","text-5":"ArticleTwitter_text-5__t9Srv",container:"ArticleTwitter_container__gcJAU",tweet:"ArticleTwitter_tweet__cMKol"}},11668:e=>{e.exports={header:"CommentHeader_header__DrHJM",avatarGroup:"CommentHeader_avatarGroup__zgwKV",teamLogo:"CommentHeader_teamLogo__2s7F0",username:"CommentHeader_username__bA4pE",verifiedBadge:"CommentHeader_verifiedBadge__dobOb",timestamp:"CommentHeader_timestamp__yDfZ7",edited:"CommentHeader_edited__Pfbgu"}},13543:e=>{e.exports={container:"Comments_container__MJzG7",loading:"Comments_loading__NLx5N",error:"Comments_error__zOJtq",retryButton:"Comments_retryButton__u9
1VbO"}},14141:e=>{e.exports={"base-font":"PaginationErrorToast_base-font__TkjZP",message:"PaginationErrorToast_message__dNSmn",toast:"PaginationErrorToast_toast__I6v6L",paginationToastFadeIn:"PaginationErrorToast_paginationToastFadeIn__5CuG9",exiting:"PaginationErrorToast_exiting__rh2mf",paginationToastFadeOut:"PaginationErrorToast_paginationToastFadeOut__AtgNU"}},15871:e=>{e.exports={"base-font":"CommentEditForm_base-font__qkM8y",input:"CommentEditForm_input__kiWVH",cancelButton:"CommentEditForm_cancelButton___j__C",saveButton:"CommentEditForm_saveButton__zTVcE",container:"CommentEditForm_container__L7RBM",buttonRow:"CommentEditForm_buttonRow__9m8sK",submitting:"CommentEditForm_submitting__KHO69",spinner:"CommentEditForm_spinner__lQXMv",spin:"CommentEditForm_spin__FTKXY",error:"CommentEditForm_error__urS9i"}},18377:e=>{e.exports={"text-1":"ArticleList_text-1__mSTm5",ofList__item:"ArticleList_ofList__item__URLZh","text-2":"ArticleList_text-2__KntMK","text-3":"ArticleList_text-3__RNRe_","text-4":"ArticleList_text-4__3GL_n","text-5":"ArticleList_text-5__UtSqD",ofList:"ArticleList_ofList__X49l4",ofListOrdered:"ArticleList_ofListOrdered__w8m5E",ofListUnordered:"ArticleList_ofListUnordered__RtNn1"}},20562:e=>{e.exports={button:"VoteButton_button__IYsgG",downvote:"VoteButton_downvote__Y5eKq",active:"VoteButton_active__x2v9I",iconWrapper:"VoteButton_iconWrapper__3afD1",flipped:"VoteButton_flipped__RZbXG",icon:"VoteButton_icon__FxkUW",count:"VoteButton_count__yi6VN"}},24913:(e,t,n)=>{"use strict";n.d(t,{V:()=>M});var o=n(28019);n(47451);var r=n(50582),l=n.n(r),a=n(1374),i=n.n(a),s=n(26509),d=n(90346),c=n(55756),u=n(97149),m=n(72173),p=n(59721),_=n(26998),g=n(19157),C=n.n(g),h=n(1792),f=n(84032),b=n(56242),v=n(82214),y=n(76235),x=n(21209),S=n(19978),L=n(28387),E=n.n(L),I=n(38710),N=n(5153);function T(){let e=(0,y._)(["COMMENTS_SECTION_NAV_BUTTON"]);return T=function(){return e},e}let R=e=>{let{commentSectionId:t}=e,{t:n}=(0,_.A)("web-payments"),r=(0,I.d)(e=>e.totalCount),a=(0,I.d)(e=>e.isInitialLoading),i=(0,I.d)(e=>e.initialLoadError);return(0,o.jsxs)(x.$,{className:E().wrapper,variant:"outline",onClick:()=>{var e;S.Pw.sendEvent({trackers:[{kind:"rudderstack",extraParams:{name:"see_comment_button_clicked"}}],params:{item_id:t,comment_item_type:"article"}}),null==(e=document.getElementById(N.z))||e.scrollIntoView({behavior:"smooth"})},children:[(0,o.jsx)(u.o,{src:"https://images.onefootball.com/cw/icons/comments-light.svg",darkModeSrc:"https://images.onefootball.com/cw/icons/comments-dark.svg",alt:"",width:24,height:24,isPreloaded:!1}),(0,o.jsx)("span",{className:"screen-reader-only",children:n(T())}),!a&&null===i&&r>0&&(0,o.jsx)("span",{className:l()(E().counter,"text-5"),children:r})]})},j={pattern:"var(--primary-text-color)",text:"var(--primary-text-color)",background:"var(--primary-background-color)"},M=e=>{var t,n,r,a;let{provider:g,publishedTime:y,image:x,title:S,colorsDarkTheme:L=j,colorsLightTheme:E=j,nativeShare:I,id:N,isBookmarked:T,liveArticleIndicator:M,commentsCounter:A}=e,{lang:w}=(0,_.A)(),k=(null!=(n=null==g?void 0:g.author)?n:"").length>0?null!=(r=null==g?void 0:g.author)?r:"":null!=(a=null==g?void 0:g.name)?a:"",D=(0,p.S)(k,w);return(0,o.jsxs)("article",{className:l()(i().articleHeroBanner,(0,c.w)(x)&&i().noImage),style:{"--color-pattern-dark":L.pattern,"--color-text-dark":L.text,"--color-background-dark":L.background,"--color-pattern-light":E.pattern,"--color-text-light":E.text,"--color-background-light":E.background},children:[(0,o.jsxs)("div",{className:i().heroBannerTextComponent,children:[(0,o.jsx)("div",{className:l()(i().patternContainer,i().patternContainerLeft),children:(0,o.jsx)(s.A,{className:i().pattern})}),(0,o.jsxs)("div",{className:i().heroBannerTextWrapper,children:[(0,o.jsxs)("div",{className:i().provider,children:[(null==g||null==(t=g.image)?void 0:t.path)!==void 0&&(0,o.jsx)(u.o,{className:i().providerLogo,width:48,height:48,alt:g.image.alt,src:g.image.path,darkModeSrc:""!==g.image.darkModePath?g.image.darkModePath:g.image.path}),(0,m.R)(g)&&(0,o.jsxs)("div",{children:[null!==D?(0,o.jsx)(C(),{href:D,className:"title-8-bold",children:g.name}):(0,o.jsx)("p",{className:"title-8-bold",children:g.name}),(0,o.jsxs)("p",{className:l()("title-8-regular",i().providerDetails),children:[(0,m.R)(g.name)&&""!==g.name&&(0,o.jsxs)(o.Fragment,{children:[null!==D?(0,o.jsx)(C(),{href:D,children:g.author}):g.author,(0,o.jsx)("span",{className:l()("title-8-bold",i().providerDelimiter),children:"\xb7"})]}),(0,m.R)(y)&&(0,o.jsx)("span",{children:y})]})]})]}),(0,o.jsxs)("h2",{className:l()("title-1-bold",i().articleTitle),children:[(0,m.R)(M)&&(0,o.jsx)(v.k,{...M,className:i().liveIndicator}
1),(0,o.jsx)("span",{className:i().articleTitleTextBackground,children:null==S?void 0:S.text})]}),(0,o.jsxs)("div",{className:i().articleCta,children:[(0,m.R)(A)&&(0,o.jsx)(R,{...A}),(0,m.R)(T)&&(0,o.jsx)(b.T,{isBookmarked:T,id:N,variant:"outline"}),(0,m.R)(I)&&(0,o.jsx)(f.o,{...I,iconOnly:!0})]})]})]}),(0,o.jsx)("div",{className:i().heroBannerImageComponent,children:(0,m.R)(x)&&(0,o.jsx)(h.x,{...x})}),(0,o.jsx)("div",{className:i().patternContainerRight,children:(0,o.jsx)(d.A,{className:i().pattern})})]})}},28387:e=>{e.exports={wrapper:"CommentsCounter_wrapper__77Wa1",counter:"CommentsCounter_counter__6DrJe"}},31618:e=>{e.exports={shimmer:"CommentShimmer_shimmer__Il0sM",shimmerAnimation:"CommentShimmer_shimmerAnimation__TTYQd",shimmerCard:"CommentShimmer_shimmerCard__EPgLb",fadeIn:"CommentShimmer_fadeIn__1sX07",replyWrapper:"CommentShimmer_replyWrapper__LAYG3",replyConnector:"CommentShimmer_replyConnector__P5nPH",connectorCorner:"CommentShimmer_connectorCorner__yAZK1",replyContent:"CommentShimmer_replyContent__ivwJ8",headerRow:"CommentShimmer_headerRow__z1Ngu",avatar:"CommentShimmer_avatar__UJ0UH",username:"CommentShimmer_username__6JWkV",timestamp:"CommentShimmer_timestamp__mExXU",bodyLine1:"CommentShimmer_bodyLine1__pP2Nb",bodyLine2:"CommentShimmer_bodyLine2__YPHOp",actionsRow:"CommentShimmer_actionsRow__0Rj2J",action:"CommentShimmer_action__YY_9j"}},31873:e=>{e.exports={"base-font":"LoadMoreButton_base-font__H_3KK",button:"LoadMoreButton_button__Atvis",container:"LoadMoreButton_container__o9LVD"}},38710:(e,t,n)=>{"use strict";n.d(t,{R:()=>ey,d:()=>ex});var o=n(28019),r=n(47451),l=n(54230),a=n(45699),i=n(46221);let s="https://loyalty-resources.onefootball.com/default-profile.webp",d=["https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-0.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-1.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-2.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-3.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-4.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-5.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-6.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-7.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-8.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-9.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-10.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-11.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-12.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-13.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-14.jpg","https://loyalty-resources.onefootball.com/images/avatars/defaults/AVI-15.jpg"];function c(e){return null!==e&&""!==e}function u(e,t){return{userId:e.user_id,clubId:e.club_id,isClubClaimed:e.is_club_claimed,avatarUrl:function(e){let{avatarUrl:t,avatarSettings:n,clubId:o,isCurrentUser:r}=e;return r?c(t)?t:s:c(t)&&c(n)?t:function(e){let t=function(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t&=t;return Math.abs(t)}(e)%d.length;return d[t]}(null!=o?o:"")}({avatarUrl:e.avatar_url,avatarSettings:e.avatar_settings,clubId:e.club_id,isCurrentUser:t}),favoriteTeamId:null!==e.favorite_team_id?String(e.favorite_team_id):null,favoriteNationalTeamId:null!==e.favorite_nation_team_id?String(e.favorite_nation_team_id):null}}function m(e,t,n){var o,r,l,a;let i=void 0!==t&&e.author.user_id===t,s="approved"===e.status||"pending"===e.status,d=i&&s?{kind:"notEditing"}:{kind:"cannotEdit"},c=i&&"approved"===e.status;return{id:e.id,parentId:null!=(o=e.parent_id)?o:null,author:u(e.author,i),body:null!=(r=e.body)?r:null,upvoteCount:e.upvote_count,downvoteCount:e.downvote_count,replyCount:e.reply_count,createdAt:e.created_at,editedAt:null!=(l=e.edited_at)?l:null,status:e.status,repliedUser:null!=e.replied_user?u(e.replied_user,!1):null,currentUserVote:null!=(a=n[e.id])?a:null,editState:d,hasOptionMenu:c,isPendingDeletion:!1}}function p(e,t,n){let o=m(e,t,n),r={items:[],pagination:{nextCursor:null,hasMore:e.reply_count>0,isLoading:!1,error:null},isExpanded:!1,replyComposer:null};return{...o,repliesState:r}}var _=n(42891);let g="https://api.onefootball.com/social/v1",C="".concat(_.ZU.webExperience,"/social/v1");function h(e){return{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}}async function f(e){return function e(t){if(null==t)return null;if(Array.isArray(t))return t.map(t=>e(t));if("object"==typeof t){let n={};for(let[o,r]of Object.entries(t))n[o]=void 0===r?null:e(r);return n}return t}(await e.json())}async function b(e){let t=new URLSearchParams({content_type:"article",content_id:e.contentId,sort:"popular"});
1void 0!==e.cursor&&""!==e.cursor&&t.set("cursor",e.cursor);let n=await fetch("".concat(g,"/comments?").concat(t.toString()),{credentials:"omit"});if(!n.ok)throw new T(n.status,"Failed to fetch comments");return f(n)}async function v(e,t){let n=new URLSearchParams;void 0!==t&&""!==t&&n.set("cursor",t);let o=n.toString(),r="".concat(g,"/comments/").concat(e,"/replies").concat(""!==o?"?".concat(o):""),l=await fetch(r,{credentials:"omit"});if(!l.ok)throw new T(l.status,"Failed to fetch replies");return f(l)}async function y(e,t){let n=await fetch("".concat(C,"/comments"),{method:"POST",headers:h(t),body:JSON.stringify(e)});if(!n.ok)throw new T(n.status,"Failed to create comment");return f(n)}async function x(e,t){let n=await fetch("".concat(C,"/comments/").concat(e),{headers:h(t)});if(!n.ok)throw new T(n.status,"Failed to get comment status");return f(n)}async function S(e,t,n){let o=await fetch("".concat(C,"/comments/").concat(e),{method:"PUT",headers:h(n),body:JSON.stringify(t)});if(!o.ok)throw new T(o.status,"Failed to edit comment");return f(o)}async function L(e,t){let n=await fetch("".concat(C,"/comments/").concat(e),{method:"DELETE",headers:h(t)});if(!n.ok)throw new T(n.status,"Failed to delete comment")}async function E(e,t){let n=await fetch("".concat(C,"/votes"),{method:"POST",headers:h(t),body:JSON.stringify(e)});if(!n.ok)throw new T(n.status,"Failed to submit vote")}async function I(e,t){let n=await fetch("".concat(C,"/votes/").concat(e),{method:"DELETE",headers:h(t)});if(!n.ok)throw new T(n.status,"Failed to remove vote")}async function N(e){let t=await fetch("".concat(C,"/votes/me/recent"),{headers:h(e)});if(!t.ok)throw new T(t.status,"Failed to fetch user votes");return f(t)}class T extends Error{constructor(e,t){super(t),this.statusCode=e,this.name="ApiError"}}class R extends T{constructor(){super(409,"Already reported"),this.name="ReportConflictError"}}class j extends T{constructor(){super(409,"Already appealed"),this.name="AppealConflictError"}}async function M(e,t,n,o){let r={message_id:e,message_type:"comment",reason:{category:t}},l=null===n?null:n.trim();null!==l&&""!==l&&(r.reason.details=l);let a=await fetch("".concat(C,"/reports"),{method:"POST",headers:h(o),body:JSON.stringify(r)});if(!a.ok){if(409===a.status)throw new R;throw new T(a.status,"Failed to report comment")}}async function A(e,t,n){let o=t.trim(),r=await fetch("".concat(C,"/complains"),{method:"POST",headers:h(n),body:JSON.stringify({message_id:e,message_type:"comment",details:o})});if(!r.ok){if(409===r.status)throw new j;throw new T(r.status,"Failed to submit appeal")}}function w(e){return"".concat("comments_votes_").concat(e)}function k(e){return"".concat("comments_votes_last_fetched_").concat(e)}let D={getVotes(e){try{let t=localStorage.getItem(w(e));if(null===t)return null;try{return JSON.parse(t)}catch(e){return null}}catch(e){return null}},setVotes(e,t){try{localStorage.setItem(w(e),JSON.stringify(t)),localStorage.setItem(k(e),new Date().toISOString())}catch(e){}},isExpired(e){try{let t=localStorage.getItem(k(e));if(null===t)return!0;let n=new Date(t).getTime();return Date.now()-n>12096e5}catch(e){return!0}},updateSingleVote(e,t,n){var o;let r=null!=(o=this.getVotes(e))?o:{};this.setVotes(e,{...r,[t]:n})},removeSingleVote(e,t){let n=this.getVotes(e);if(null===n)return;let{[t]:o,...r}=n;this.setVotes(e,r)},clear(e){try{localStorage.removeItem(w(e)),localStorage.removeItem(k(e))}catch(e){}}},O="comments_guidelines_dismissed",B={shouldShow(){try{return"true"!==localStorage.getItem(O)}catch(e){return!0}},dismiss(){try{localStorage.setItem(O,"true")}catch(e){}}},P="comments_draft_reply_";function U(e,t){return"".concat("comments_draft_root_").concat(e,"_").concat(t)}function V(e,t,n){return"".concat(P).concat(e,"_").concat(t,"_").concat(n)}function F(e){try{return JSON.parse(e)}catch(e){return null}}let H={getRootDraft(e,t){try{let n=sessionStorage.getItem(U(e,t));if(null===n)return null;return F(n)}catch(e){return null}},setRootDraft(e,t,n){try{sessionStorage.setItem(U(e,t),JSON.stringify({body:n}))}catch(e){}},clearRootDraft(e,t){try{sessionStorage.removeItem(U(e,t))}catch(e){}},getReplyDraft(e,t,n){try{let o=sessionStorage.getItem(V(e,t,n));if(null===o)return null;return F(o)}catch(e){return null}}
1,setReplyDraft(e,t,n,o){try{sessionStorage.setItem(V(e,t,n),JSON.stringify(o))}catch(e){}},clearReplyDraft(e,t,n){try{sessionStorage.removeItem(V(e,t,n))}catch(e){}},getAllReplyDraftsForContent(e,t){try{let n="".concat(P).concat(e,"_").concat(t,"_"),o={};for(let e=0;e<sessionStorage.length;e+=1){let t=sessionStorage.key(e);if(null===t||!t.startsWith(n))continue;let r=sessionStorage.getItem(t);if(null===r)continue;let l=F(r);null!==l&&(o[t.slice(n.length)]=l)}return o}catch(e){return{}}}},G={kind:"anonymous",avatarUrl:s};function q(e){return{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}}async function W(e){let t=await fetch("".concat(_.ZU.usersAccounts,"/settings/profile"),{headers:q(e)});if(!t.ok)throw new z(t.status,"Failed to fetch user profile settings");return await t.json()}async function J(e){let t=await fetch("".concat(_.ZU.usersAccounts,"/settings/teams/club"),{headers:q(e)});if(404===t.status)return"-1";if(!t.ok)throw new z(t.status,"Failed to fetch favorite club team");let n=function(e){if(null===e||"object"!=typeof e||!("id"in e))return null;let t=e.id;if(null==t)return null;let n="number"==typeof t?t:Number(t);return Number.isFinite(n)?n:null}(await t.json());return null===n||0===n?"-1":String(n)}class z extends Error{constructor(e,t){super(t),this.statusCode=e,this.name="UserProfileApiError"}}let Y="comments_user_profile_",Z="comments_user_profile_last_fetched_";function K(e){return"".concat(Y).concat(e)}function X(e){return"".concat(Z).concat(e)}let Q={getProfile(e){try{let t=localStorage.getItem(K(e));if(null===t)return null;try{return JSON.parse(t)}catch(e){return null}}catch(e){return null}},setProfile(e,t){try{localStorage.setItem(K(e),JSON.stringify(t)),localStorage.setItem(X(e),new Date().toISOString())}catch(e){}},isExpired(e){try{let t=localStorage.getItem(X(e));if(null===t)return!0;let n=new Date(t).getTime();return Date.now()-n>864e5}catch(e){return!0}},clear(e){try{localStorage.removeItem(K(e)),localStorage.removeItem(X(e))}catch(e){}},clearAll(){try{let e=[];for(let t=0;t<localStorage.length;t+=1){let n=localStorage.key(t);null!==n&&(n.startsWith(Y)||n.startsWith(Z))&&e.push(n)}for(let t of e)localStorage.removeItem(t)}catch(e){}}};async function $(e){try{return await J(e)}catch(e){return"-1"}}let ee={async getCurrentUserProfile(e,t){var n,o,r,l;if(void 0===e||null===t)return G;let a=Q.getProfile(e);if(null!==a&&!Q.isExpired(e))return a;let[i,s]=await Promise.all([W(t),$(t)]),d={kind:"authenticated",userId:e,avatarUrl:null!=(n=i.avatar)?n:null,avatarSettings:null!=(o=i.avatar_settings)?o:null,clubId:null!=(r=i.club_id)?r:null,isClubClaimed:null!=(l=i.is_club_id_claimed)&&l,favoriteTeamId:s};return Q.setProfile(e,d),d},updateFromAuthorDto(e,t){let n=Q.getProfile(e);if(null===n)return null;let o={kind:"authenticated",userId:e,avatarUrl:t.avatar_url,avatarSettings:t.avatar_settings,clubId:t.club_id,isClubClaimed:t.is_club_claimed,favoriteTeamId:null!==t.favorite_team_id?String(t.favorite_team_id):"-1"};return n.userId===o.userId&&n.avatarUrl===o.avatarUrl&&n.avatarSettings===o.avatarSettings&&n.clubId===o.clubId&&n.isClubClaimed===o.isClubClaimed&&n.favoriteTeamId===o.favoriteTeamId?null:(Q.setProfile(e,o),o)},clearAll(){Q.clearAll()}};var et=n(61456);function en(){return{nextCursor:null,hasMore:!1,isLoading:!1,error:null}}function eo(){return{body:"",status:"idle",errorMessage:null}}function er(e){if("object"!=typeof e||null===e||!("statusCode"in e))return!1;let{statusCode:t}=e;return"number"==typeof t}function el(e,t){return"authenticated"===t.kind&&t.userId===e?{userId:e,clubId:t.clubId,isClubClaimed:t.isClubClaimed,avatarUrl:t.avatarUrl,favoriteTeamId:t.favoriteTeamId,favoriteNationalTeamId:null}:{userId:e,clubId:null,isClubClaimed:!1,avatarUrl:null,favoriteTeamId:null,favoriteNationalTeamId:null}}var ea=n(71182),ei=n(15280),es=n(88292),ed=n(26998),ec=n(87774),eu=n(64564),em=n(37783),ep=n(87035);let e_="comments_avatar_";function eg(e){return"".concat(e_).concat(e)}let eC={getAvatar(e){try{let t=localStorage.getItem(eg(e));if(null===t)return null;let n=JSON.parse(t);if(Date.now()-n.timestamp>1728e5)return localStorage.removeItem(eg(e)),null;return n.url}catch(e){return null}},setAvatar(e,t){try{let n={url:t,timestamp:Date.now()};localStorage.setItem(eg(e),JSON.stringify(n))}catch(e){}},clear(e){try{localStorage.removeItem(eg(e))}catch(e){}},clearAll(){try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);(null==n?void 0:n.startsWith(e_))===!0&&e.push(n)}
1e.forEach(e=>{localStorage.removeItem(e)})}catch(e){}}};var eh=n(19978);let ef={commentsOpened:"comments_opened",commentSubmitted:"comment_submitted",commentReactionSubmitted:"comment_reaction_submitted"},eb={itemId:"comments_item_id",itemType:"comments_item_type",totalCount:"comments_total_count",entryPoint:"comments_entry_point",isReply:"comments_is_reply",reactionType:"comments_reaction_type"},ev=(0,r.createContext)(null),ey=e=>{let{contentId:t,children:n}=e,{authState:l}=(0,ea.u)(),s=(0,r.useContext)(ei.$),d=(0,es.useRouter)(),{t:c}=(0,ed.A)("web-payments"),u=(0,r.useRef)(null);return null===u.current&&(u.current=function(e){let t=[],n=null,o=!1,r=!1;return(0,a.y)((l,a)=>{function s(){if(r)return;let t=a();!t.isInitialLoading&&null===t.initialLoadError&&o&&(r=!0,e.analytics.commentsOpened({totalCount:t.totalCount}))}function d(){null!==n&&(clearTimeout(n),n=null)}function c(){d(),a().isLoadMoreErrorToastVisible&&l({isLoadMoreErrorToastVisible:!1})}function u(){d(),l({isLoadMoreErrorToastVisible:!0}),n=setTimeout(()=>{n=null,l({isLoadMoreErrorToastVisible:!1})},i.i6)}function _(e,t){var n;if(null!==e.repliesState.replyComposer)return e;let o=t[e.id];return void 0===o?e:{...e,repliesState:{...e.repliesState,replyComposer:{repliedUser:o.repliedUser,composer:{body:o.body,status:"idle",errorMessage:null},anchoredToReplyId:null!=(n=o.anchoredToReplyId)?n:null}}}}function g(e){return a().comments.findIndex(t=>t.id===e)}function C(e,t){l(n=>({comments:n.comments.map(n=>n.id===e?t(n):n)}))}function h(e,t,n){C(e,e=>({...e,repliesState:{...e.repliesState,items:e.repliesState.items.map(e=>e.id===t?n(e):e)}}))}function f(e){for(let t of a().comments){if(t.id===e)return t;for(let n of t.repliesState.items)if(n.id===e)return n}return null}function T(e){let t=a().pollingStates[e];(null==t?void 0:t.timeoutId)!==null&&(null==t?void 0:t.timeoutId)!==void 0&&clearTimeout(t.timeoutId),l(t=>{let{[e]:n,...o}=t.pollingStates;return{pollingStates:o}})}function R(e,t,n){l(t=>({pollingStates:{...t.pollingStates,[e]:{attempt:0,timeoutId:null}}})),j(e,0,t,n)}function j(e,t,n,o){if(t>=i.Lb.length)return void T(e);let r=setTimeout(()=>{w(e,t,n,o)},i.Lb[t]);l(n=>({pollingStates:{...n.pollingStates,[e]:{attempt:t,timeoutId:r}}}))}async function w(t,n,o,r){let a=e.getAccessToken();if(null===a)return void T(t);try{let i=await x(t,a);if("pending"===i.status)return void j(t,n+1,o,r);if(T(t),"rejected"===i.status){o&&void 0!==r?(C(r,e=>({...e,replyCount:Math.max(0,e.replyCount-1)})),h(r,t,e=>({...e,status:"rejected"})),l(e=>({totalCount:Math.max(0,e.totalCount-1)}))):l(e=>({totalCount:Math.max(0,e.totalCount-1),comments:e.comments.map(e=>e.id===t?{...e,status:"rejected"}:e)})),e.showNotification(e.translate("COMMENTS_ERROR_REJECTED"),et.Yw.error);return}let s="approved"===i.status;o&&void 0!==r?h(r,t,e=>({...e,status:i.status,hasOptionMenu:s})):l(e=>({comments:e.comments.map(e=>e.id===t?{...e,status:i.status,hasOptionMenu:s}:e)}))}catch(e){j(t,n+1,o,r)}}return{contentId:e.contentId,comments:[],totalCount:0,rootPagination:en(),isPreviewMode:!0,pollingStates:{},rootComposer:eo(),showCommunityGuidelines:!0,isInitialLoading:!0,initialLoadError:null,isLoadMoreErrorToastVisible:!1,currentUserProfile:G,deleteConfirmation:null,reportConfirmation:null,appealConfirmation:null,async initialize(n){l({isInitialLoading:!0,initialLoadError:null,contentId:n,showCommunityGuidelines:B.shouldShow()});try{var o;let r=e.getCurrentUserId(),a={};if(void 0!==r){let t=D.getVotes(r);null===t||D.isExpired(r)||(a=t);let n=e.getAccessToken();if(null!==n)try{let e=await N(n),t={};for(let n of e.votes)t[n.comment_id]=n.vote_type;a={...a,...t},D.setVotes(r,a)}catch(e){}}let d=ee.getCurrentUserProfile(r,e.getAccessToken()),c=await b({contentId:n}),u=H.getAllReplyDraftsForContent(i.Ty,n),m=c.comments.map(e=>_(p(e,r,a),u));t=m;let g=H.getRootDraft(i.Ty,n),C=await d;if(void 0!==r){let e=function(e,t){for(let n of e)if(n.author.user_id===t)return n.author;return null}(c.comments,r);if(null!==e){let t=ee.updateFromAuthorDto(r,e);null!==t&&(C=t)}}l({comments:m.slice(0,i.tB),totalCount:c.total_count,rootPagination:{nextCursor:null!=(o=c.cursor)?o:null,hasMore:null!=c.cursor,isLoading:!1,error:null},isPreviewMode:m.length>i.tB,isInitialLoading:!1,rootComposer:null!==g?{body:g.body,status:"idle",errorMessage:null}:eo(),currentUserProfile:C}),s()}catch(e){l({isInitialLoading:!1,initialLoadError:"Failed to load comments"})}},reset(){let{pollingStates:e}=a();for(let t of Object.values(e))null!==t.timeoutId&&clearTimeout(t.timeoutId);d(),t=[],o=!1,r=!1,l({comments:[],totalCount:0,rootPagination:en(),isPreviewMode:!0,pollingStates:{},rootComposer:eo(),isInitialLoading:!1,initialLoadError:null,isLoadMoreErrorToastVisible:!1,deleteConfirmation:null,reportConfirmation:null,appealConfirmation:null})},markCommentsOpened(){o=!0,s()}
1,dismissCommunityGuidelines(){B.dismiss(),l({showCommunityGuidelines:!1})},async loadMoreComments(){let n=a();if(n.isPreviewMode){let e=H.getAllReplyDraftsForContent(i.Ty,n.contentId),o=new Map(n.comments.map(e=>[e.id,e])),r=t.map(t=>{var n;return _(null!=(n=o.get(t.id))?n:t,e)});t=r,l({comments:[...r],isPreviewMode:!1});return}if(!n.rootPagination.isLoading&&n.rootPagination.hasMore){c(),l({rootPagination:{...n.rootPagination,isLoading:!0,error:null}});try{var o,r;let a=e.getCurrentUserId(),s={};void 0!==a&&(s=null!=(o=D.getVotes(a))?o:{});let d=await b({contentId:n.contentId,cursor:null!=(r=n.rootPagination.nextCursor)?r:void 0}),c=H.getAllReplyDraftsForContent(i.Ty,n.contentId),u=d.comments.map(e=>_(p(e,a,s),c));t=[...t,...u];let m=null!=d.cursor&&u.length>0;l(e=>{var t;return{comments:[...e.comments,...u],rootPagination:{nextCursor:null!=(t=d.cursor)?t:null,hasMore:m,isLoading:!1,error:null}}})}catch(e){l(e=>({rootPagination:{...e.rootPagination,isLoading:!1,error:"loadMoreFailed"}})),u()}}},dismissLoadMoreErrorToast(){d(),l({isLoadMoreErrorToastVisible:!1})},clearCurrentUserProfile(){ee.clearAll(),l({currentUserProfile:G})},async toggleReplies(t){let n=g(t);if(-1===n)return;let o=a().comments[n].repliesState;if(o.isExpanded&&null===o.pagination.error)return void C(t,e=>({...e,repliesState:{...e.repliesState,isExpanded:!1}}));if(c(),C(t,e=>({...e,repliesState:{...e.repliesState,isExpanded:!0,pagination:{...e.repliesState.pagination,isLoading:!0,error:null}}})),o.items.length>0)return void C(t,e=>({...e,repliesState:{...e.repliesState,pagination:{...e.repliesState.pagination,isLoading:!1}}}));try{let n=e.getCurrentUserId(),o={};if(void 0!==n){var r;o=null!=(r=D.getVotes(n))?r:{}}let l=await v(t),a=l.replies.map(e=>m(e,n,o));C(t,e=>{var t;return{...e,repliesState:{...e.repliesState,items:a,pagination:{nextCursor:null!=(t=l.cursor)?t:null,hasMore:null!=l.cursor,isLoading:!1,error:null}}}})}catch(e){C(t,e=>({...e,repliesState:{...e.repliesState,pagination:{...e.repliesState.pagination,isLoading:!1,error:"Failed to load replies"}}})),u()}},async loadMoreReplies(t){let n=g(t);if(-1===n)return;let{repliesState:o}=a().comments[n];if(!o.pagination.isLoading&&o.pagination.hasMore){c(),C(t,e=>({...e,repliesState:{...e.repliesState,pagination:{...e.repliesState.pagination,isLoading:!0,error:null}}}));try{var r,l;let n=e.getCurrentUserId(),a={};void 0!==n&&(a=null!=(r=D.getVotes(n))?r:{});let i=await v(t,null!=(l=o.pagination.nextCursor)?l:void 0),s=i.replies.map(e=>m(e,n,a));C(t,e=>{var t;return{...e,repliesState:{...e.repliesState,items:[...e.repliesState.items,...s],pagination:{nextCursor:null!=(t=i.cursor)?t:null,hasMore:null!=i.cursor,isLoading:!1,error:null}}}})}catch(e){C(t,e=>({...e,repliesState:{...e.repliesState,pagination:{...e.repliesState.pagination,isLoading:!1,error:"Failed to load more replies"}}})),u()}}},setRootComposerBody(e){let t=e.slice(0,i.wT);l(e=>({rootComposer:{...e.rootComposer,body:t,errorMessage:null}})),""===t?H.clearRootDraft(i.Ty,a().contentId):H.setRootDraft(i.Ty,a().contentId,t)},async submitRootComment(){let n=e.getCurrentUserId(),o=e.getAccessToken();if(void 0===n||null===o)return void e.redirectToLogin();let{rootComposer:r,contentId:s}=a();if(""!==r.body.trim()){l({rootComposer:{...r,status:"submitting",errorMessage:null}});try{let d=await y({content_type:i.Ty,content_id:s,comment_body:r.body.trim(),comment_type:"text",language:e.getLanguage()},o),c={id:d.id,parentId:null,author:el(n,a().currentUserProfile),body:r.body.trim(),upvoteCount:0,downvoteCount:0,replyCount:0,createdAt:new Date().toISOString(),editedAt:null,status:"pending",repliedUser:null,currentUserVote:null,editState:{kind:"notEditing"},hasOptionMenu:!1,isPendingDeletion:!1,repliesState:{items:[],pagination:en(),isExpanded:!1,replyComposer:null}};l(e=>({comments:[c,...e.comments],totalCount:e.totalCount+1,rootComposer:eo()})),t=[c,...t],H.clearRootDraft(i.Ty,s),e.analytics.commentSubmitted({totalCount:a().totalCount,isReply:!1}),R(d.id,!1)}catch(e){l({rootComposer:{body:r.body,status:"error",errorMessage:"Failed to post comment"}})}}},openReplyComposer(e,t){C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:{repliedUser:null!=t?t:null,composer:eo(),anchoredToReplyId:null}}}))},closeReplyComposer(e){C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:null}}
1)),H.clearReplyDraft(i.Ty,a().contentId,e)},toggleReplyComposer(e,t){let n=g(e);-1!==n&&(null!==a().comments[n].repliesState.replyComposer?(C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:null}})),H.clearReplyDraft(i.Ty,a().contentId,e)):C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:{repliedUser:null!=t?t:null,composer:eo(),anchoredToReplyId:null}}})))},replyTo(e){function t(e){var t;return{userId:e.userId,displayName:null!=(t=e.clubId)?t:e.userId}}let n=g(e);if(-1!==n){let o=a().comments[n],r=o.repliesState.replyComposer;if(null!==r&&null===r.anchoredToReplyId){C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:null}})),H.clearReplyDraft(i.Ty,a().contentId,e);return}C(e,e=>({...e,repliesState:{...e.repliesState,replyComposer:{repliedUser:t(o.author),composer:eo(),anchoredToReplyId:null}}}));return}for(let n of a().comments){let o=n.repliesState.items.find(t=>t.id===e);if(void 0===o)continue;let r=n.repliesState.replyComposer;if(null!==r&&r.anchoredToReplyId===e){C(n.id,e=>({...e,repliesState:{...e.repliesState,replyComposer:null}})),H.clearReplyDraft(i.Ty,a().contentId,n.id);return}C(n.id,n=>({...n,repliesState:{...n.repliesState,replyComposer:{repliedUser:t(o.author),composer:eo(),anchoredToReplyId:e}}}));return}},setReplyComposerBody(e,t){let n=t.slice(0,i.wT);C(e,e=>null===e.repliesState.replyComposer?e:{...e,repliesState:{...e.repliesState,replyComposer:{...e.repliesState.replyComposer,composer:{...e.repliesState.replyComposer.composer,body:n,errorMessage:null}}}});let o=g(e);if(-1===o)return;let r=a().comments[o].repliesState.replyComposer;if(null===r)return;let l=a().contentId;""===n?H.clearReplyDraft(i.Ty,l,e):H.setReplyDraft(i.Ty,l,e,{body:n,repliedUser:r.repliedUser,anchoredToReplyId:r.anchoredToReplyId})},async submitReply(t){let n=e.getCurrentUserId(),o=e.getAccessToken();if(void 0===n||null===o)return void e.redirectToLogin();let r=g(t);if(-1===r)return;let s=a().comments[r].repliesState.replyComposer;if(null!==s&&""!==s.composer.body.trim()){C(t,e=>({...e,repliesState:{...e.repliesState,replyComposer:null===e.repliesState.replyComposer?null:{...e.repliesState.replyComposer,composer:{...e.repliesState.replyComposer.composer,status:"submitting",errorMessage:null}}}}));try{var d;let r=await y({content_type:i.Ty,content_id:a().contentId,comment_body:s.composer.body.trim(),comment_type:"text",comment_parent_id:t,comment_replied_user_id:null==(d=s.repliedUser)?void 0:d.userId,language:e.getLanguage()},o),c={id:r.id,parentId:t,author:el(n,a().currentUserProfile),body:s.composer.body.trim(),upvoteCount:0,downvoteCount:0,replyCount:0,createdAt:new Date().toISOString(),editedAt:null,status:"pending",repliedUser:s.repliedUser?{userId:s.repliedUser.userId,clubId:null,isClubClaimed:!1,avatarUrl:null,favoriteTeamId:null,favoriteNationalTeamId:null}:null,currentUserVote:null,editState:{kind:"notEditing"},hasOptionMenu:!1,isPendingDeletion:!1},u=s.anchoredToReplyId;C(t,e=>{let t=e.repliesState.items,n=null===u?[...t,c]:function(e,t,n){let o=e.findIndex(e=>e.id===t);return -1===o?[...e,n]:[...e.slice(0,o+1),n,...e.slice(o+1)]}(t,u,c);return{...e,replyCount:e.replyCount+1,repliesState:{...e.repliesState,items:n,replyComposer:null}}}),l(e=>({totalCount:e.totalCount+1})),H.clearReplyDraft(i.Ty,a().contentId,t),e.analytics.commentSubmitted({totalCount:a().totalCount,isReply:!0}),R(r.id,!0,t)}catch(e){C(t,e=>({...e,repliesState:{...e.repliesState,replyComposer:null===e.repliesState.replyComposer?null:{...e.repliesState.replyComposer,composer:{body:s.composer.body,status:"error",errorMessage:"Failed to post reply"}}}}))}}},startEditing(e,t){if(-1!==g(e))return void C(e,e=>({...e,editState:{kind:"editing",body:t,status:"idle",errorMessage:null}}));for(let n of a().comments)if(-1!==n.repliesState.items.findIndex(t=>t.id===e))return void h(n.id,e,e=>({...e,editState:{kind:"editing",body:t,status:"idle",errorMessage:null}}))},cancelEditing(e){if(-1!==g(e))return void C(e,e=>({...e,editState:{kind:"notEditing"}}));for(let t of a().comments)if(-1!==t.repliesState.items.findIndex(t=>t.id===e))return void h(t.id,e,e=>({...e,editState:{kind:"notEditing"}}))},setEditingBody(e,t){if(-1!==g(e))return void C(e,e=>"editing"!==e.editState.kind?e:{...e,editState:{...e.editState,body:t,errorMessage:null}});
1for(let n of a().comments)if(-1!==n.repliesState.items.findIndex(t=>t.id===e))return void h(n.id,e,e=>"editing"!==e.editState.kind?e:{...e,editState:{...e.editState,body:t,errorMessage:null}})},async submitEdit(t){let n,o=e.getAccessToken();if(null===o)return void e.redirectToLogin();let r="",l=g(t);if(-1!==l){let e=a().comments[l];if("editing"!==e.editState.kind)return;r=e.editState.body,C(t,e=>"editing"!==e.editState.kind?e:{...e,editState:{...e.editState,status:"submitting",errorMessage:null}})}else for(let e of a().comments){let o=e.repliesState.items.find(e=>e.id===t);if(void 0!==o&&"editing"===o.editState.kind){r=o.editState.body,n=e.id,h(e.id,t,e=>"editing"!==e.editState.kind?e:{...e,editState:{...e.editState,status:"submitting",errorMessage:null}});break}}if(""!==r.trim())try{await S(t,{body:r.trim(),body_type:"text",language:e.getLanguage()},o);let l=e=>({...e,body:r.trim(),editedAt:new Date().toISOString(),editState:{kind:"notEditing"}});void 0!==n?h(n,t,l):C(t,e=>({...l(e),repliesState:e.repliesState}))}catch(l){let o=er(l)&&422===l.statusCode;o&&e.showNotification(e.translate("COMMENTS_ERROR_REJECTED"),et.Yw.error);let r=t=>"editing"!==t.editState.kind?t:{...t,editState:{...t.editState,status:"error",errorMessage:o?null:e.translate("COMMENTS_ERROR_GENERIC")}};void 0!==n?h(n,t,r):C(t,e=>({...r(e),repliesState:e.repliesState}))}},requestDeleteComment(t){if(null===e.getAccessToken())return void e.redirectToLogin();l({deleteConfirmation:{commentId:t}})},requestReportComment(t){if(null===e.getAccessToken()||void 0===e.getCurrentUserId())return;let n=f(t);null!==n&&n.author.userId!==e.getCurrentUserId()&&l({reportConfirmation:{commentId:t,selectedReason:null,details:"",status:"idle",errorMessage:null}})},cancelReportComment(){l({reportConfirmation:null})},setReportReason(e){l(t=>null===t.reportConfirmation?{}:{reportConfirmation:{...t.reportConfirmation,selectedReason:e,errorMessage:null,status:"error"===t.reportConfirmation.status?"idle":t.reportConfirmation.status}})},setReportDetails(e){l(t=>null===t.reportConfirmation?{}:{reportConfirmation:{...t.reportConfirmation,details:e.slice(0,i.Mu)}})},async submitReportComment(){let t=a().reportConfirmation;if(null===t)return;let n=e.getAccessToken();if(null===n)return void l({reportConfirmation:null});if(null===t.selectedReason)return;l(e=>null===e.reportConfirmation?{}:{reportConfirmation:{...e.reportConfirmation,status:"submitting",errorMessage:null}});let o=""===t.details.trim()?null:t.details.trim();try{await M(t.commentId,t.selectedReason,o,n),l({reportConfirmation:null}),e.showNotification(e.translate("COMMENTS_REPORT_SUCCESS"),et.Yw.success)}catch(t){if(er(t)&&409===t.statusCode)return void l(t=>null===t.reportConfirmation?{}:{reportConfirmation:{...t.reportConfirmation,status:"error",errorMessage:e.translate("COMMENTS_REPORT_ERROR_ALREADY_REPORTED")}});if(er(t)&&401===t.statusCode){l({reportConfirmation:null}),e.redirectToLogin();return}l(t=>null===t.reportConfirmation?{}:{reportConfirmation:{...t.reportConfirmation,status:"error",errorMessage:e.translate("COMMENTS_REPORT_ERROR_GENERIC")}})}},requestAppealComment(t){if(null===e.getAccessToken()||void 0===e.getCurrentUserId())return;let n=f(t);null!==n&&n.author.userId===e.getCurrentUserId()&&"rejected"===n.status&&l({appealConfirmation:{commentId:t,details:"",status:"idle",errorMessage:null}})},cancelAppealComment(){l({appealConfirmation:null})},setAppealDetails(e){l(t=>null===t.appealConfirmation?{}:{appealConfirmation:{...t.appealConfirmation,details:e.slice(0,i.h0)}})},async submitAppealComment(){let t=a().appealConfirmation;if(null===t)return;let n=e.getAccessToken();if(null===n)return void l({appealConfirmation:null});let o=t.details.trim();if(""!==o){l(e=>null===e.appealConfirmation?{}:{appealConfirmation:{...e.appealConfirmation,status:"submitting",errorMessage:null}});try{await A(t.commentId,o,n),l({appealConfirmation:null}),e.showNotification(e.translate("COMMENTS_APPEAL_SUCCESS"),et.Yw.success)}catch(t){if(er(t)&&409===t.statusCode)return void l(t=>null===t.appealConfirmation?{}:{appealConfirmation:{...t.appealConfirmation,status:"error",errorMessage:e.translate("COMMENTS_APPEAL_ERROR_ALREADY_APPEALED")}
1});if(er(t)&&401===t.statusCode){l({appealConfirmation:null}),e.redirectToLogin();return}l(t=>null===t.appealConfirmation?{}:{appealConfirmation:{...t.appealConfirmation,status:"error",errorMessage:e.translate("COMMENTS_APPEAL_ERROR_GENERIC")}})}}},cancelDeleteComment(){l({deleteConfirmation:null})},async confirmDeleteComment(){let e=a().deleteConfirmation;null!==e&&(l({deleteConfirmation:null}),await a().deleteComment(e.commentId))},async deleteComment(t){let n=e.getAccessToken();if(null===n)return void e.redirectToLogin();try{await L(t,n);let e=g(t);if(-1!==e)return void(a().comments[e].replyCount>0?(C(t,e=>({...e,body:null,status:"deleted",editState:{kind:"cannotEdit"}})),l(e=>({totalCount:Math.max(0,e.totalCount-1)}))):C(t,e=>({...e,isPendingDeletion:!0})));for(let e of a().comments){let n=e.repliesState.items.findIndex(e=>e.id===t);if(-1!==n)return void h(e.id,t,e=>({...e,isPendingDeletion:!0}))}}catch(t){e.showNotification(e.translate("COMMENTS_ERROR_GENERIC"),et.Yw.error)}},finalizeDelete(e){if(-1!==g(e)){l(t=>({comments:t.comments.filter(t=>t.id!==e),totalCount:Math.max(0,t.totalCount-1)})),t=t.filter(t=>t.id!==e);return}for(let t of a().comments)if(-1!==t.repliesState.items.findIndex(t=>t.id===e)){C(t.id,t=>({...t,replyCount:Math.max(0,t.replyCount-1),repliesState:{...t.repliesState,items:t.repliesState.items.filter(t=>t.id!==e)}})),l(e=>({totalCount:Math.max(0,e.totalCount-1)}));return}},async vote(t,n){let o,r=e.getCurrentUserId(),l=e.getAccessToken();if(void 0===r||null===l)return void e.redirectToLogin();let s=null,d=!1,c=g(t);if(-1!==c)s=a().comments[c].currentUserVote;else for(let e of a().comments){let n=e.repliesState.items.find(e=>e.id===t);if(void 0!==n){s=n.currentUserVote,d=!0,o=e.id;break}}let u=s===n,m=e=>{let{upvoteCount:t,downvoteCount:o}=e;return"upvote"===s&&(t=Math.max(0,t-1)),"downvote"===s&&(o=Math.max(0,o-1)),u||("upvote"===n&&(t+=1),"downvote"===n&&(o+=1)),{...e,upvoteCount:t,downvoteCount:o,currentUserVote:u?null:n}};d&&void 0!==o?h(o,t,m):C(t,e=>({...m(e),repliesState:e.repliesState}));try{u?(await I(t,l),D.removeSingleVote(r,t)):(null!==s&&await I(t,l),await E({vote_type:n,comment_id:t,content_id:a().contentId,content_type:i.Ty},l),D.updateSingleVote(r,t,n),e.analytics.commentReactionSubmitted({totalCount:a().totalCount,reactionType:n}))}catch(l){let r=e=>({...e,upvoteCount:"upvote"===s?e.upvoteCount+1:"upvote"===n?e.upvoteCount-1:e.upvoteCount,downvoteCount:"downvote"===s?e.downvoteCount+1:"downvote"===n?e.downvoteCount-1:e.downvoteCount,currentUserVote:s});d&&void 0!==o?h(o,t,r):C(t,e=>({...r(e),repliesState:e.repliesState})),e.showNotification(e.translate("COMMENTS_ERROR_GENERIC"),et.Yw.error)}}}})}({contentId:t,showNotification:(e,t)=>{null==s||s({message:e,type:t,dismissible:!0,autoHideDuration:et.fx})},getAccessToken:()=>{var e;return null!=(e=(()=>{var e;return null!=(e=eu.H.get(ec.G.Access))?e:""})())?e:null},getCurrentUserId:()=>"authenticated"===l.kind?l.user.id:void 0,redirectToLogin:()=>{var e,t;let n=function(e,t,n){let o=new URLSearchParams({[em.o.Redirect]:function(e){let t=e.indexOf("#"),n=-1===t?e:e.slice(0,t);return"".concat(n).concat("#comments")}(e),[em.o.Origin]:"comments"});return t===n?"/".concat(n).concat(ep.EU,"?").concat(o.toString()):"".concat(ep.EU,"?").concat(o.toString())}(d.asPath,null!=(e=d.locale)?e:"en",null!=(t=d.defaultLocale)?t:"en");d.push(n)},getLanguage:()=>{var e;return null!=(e=d.locale)?e:"en"},translate:e=>c(e),analytics:function(e){var t,n;let o=null!=(t=e.itemType)?t:"article",r=null!=(n=e.entryPoint)?n:"article_detail";function l(e,t){eh.Pw.sendEvent({trackers:[{kind:"rudderstack",extraParams:{name:e}}],params:t})}return{commentsOpened(t){let{totalCount:n}=t;l(ef.commentsOpened,{[eb.itemId]:e.contentId,[eb.itemType]:o,[eb.entryPoint]:r,[eb.totalCount]:String(n)})},commentSubmitted(t){let{totalCount:n,isReply:a}=t;l(ef.commentSubmitted,{[eb.itemId]:e.contentId,[eb.itemType]:o,[eb.entryPoint]:r,[eb.totalCount]:String(n),[eb.isReply]:a?"true":"false"})},commentReactionSubmitted(t){let{totalCount:n,reactionType:a}=t;l(ef.commentReactionSubmitted,{[eb.itemId]:e.contentId,[eb.itemType]:o,[eb.entryPoint]:r,[eb.totalCount]:String(n),[eb.reactionType]:a})}}}({contentId:t})})),(0,r.useEffect)(()=>{let e=u.current;if(null!==e)return e.getState().initialize(t),()=>{e.getState().reset()}},[t]),(0,r.useEffect)(()=>
1{if("unauthenticated"===l.kind){var e;eC.clearAll(),null==(e=u.current)||e.getState().clearCurrentUserProfile()}},[l.kind]),(0,o.jsx)(ev.Provider,{value:u.current,children:n})};function ex(e){let t=(0,r.useContext)(ev);if(null===t)throw Error("useCommentsStore must be used within a CommentsStoreProvider");return(0,l.Pj)(t,e)}},39228:e=>{e.exports={trigger:"CommentMenu_trigger__41FX9",menu:"CommentMenu_menu__bNQWg",menuItem:"CommentMenu_menuItem__SevEJ",menuItemIcon:"CommentMenu_menuItemIcon__idjo2"}},39375:(e,t,n)=>{"use strict";n.d(t,{G:()=>l});var o=n(38645),r=n(47451);function l(){let{schema:e,uiMode:t,schemaIsStable:n}=(0,o.W)(),l="auto"===t,[a,i]=(0,r.useState)(l?void 0:e);return(0,r.useEffect)(()=>{l&&n&&i(e)},[l,e,n]),a}},41243:(e,t,n)=>{"use strict";n.d(t,{y:()=>u});var o=n(28019),r=n(47451),l=n(50582),a=n.n(l),i=n(72173),s=n(9662),d=n.n(s),c=n(39375);let u=e=>{let{authorName:t,content:n,link:l,publishedTime:s}=e,{isLoaded:u}=(e=>{let[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(document.querySelector("[src='".concat(e,"']")))return void n(!0);let t=document.createElement("script");t.src=e,t.async=!0,t.onload=()=>{n(!0)};let o=document.getElementsByTagName("script")[0];return(null==o?void 0:o.parentNode)!==null&&(null==o||o.parentNode.insertBefore(t,o)),()=>{var e;null==(e=t.parentNode)||e.removeChild(t)}},[e]),{isLoaded:t}})("https://platform.twitter.com/widgets.js"),m=(0,r.useRef)(null),p=(0,c.G)();return(0,r.useEffect)(()=>{if((0,i.R)(m.current)&&u&&(0,i.R)(p)){var e;null==(e=window.twttr)||e.widgets.load(m.current)}},[u,m,p]),(0,o.jsx)("div",{className:d().container,children:(0,o.jsxs)("blockquote",{ref:m,className:a()(d().tweet,"twitter-tweet"),"data-theme":p,"data-conversation":"none",children:[(0,o.jsx)("a",{className:a()(d().link,"twitter-tweet"),href:l,children:n}),(0,o.jsxs)("p",{className:"text-1",children:[t,"\xa0â\xa0",(0,o.jsx)("time",{dateTime:s,children:s})]})]})})}},42149:e=>{e.exports={"base-font":"CommentsEmptyState_base-font__YIm13",title:"CommentsEmptyState_title__XMXRU",message:"CommentsEmptyState_message__SX6Iw",container:"CommentsEmptyState_container__7XsjK",image:"CommentsEmptyState_image__wZf_i"}},46221:(e,t,n)=>{"use strict";n.d(t,{Lb:()=>l,Mu:()=>d,Ty:()=>o,h0:()=>c,i6:()=>s,mE:()=>i,tB:()=>r,wT:()=>a});let o="article",r=3,l=[2e3,4e3,8e3,16e3,3e4],a=500,i=480,s=4e3,d=500,c=500},48466:e=>{e.exports={list:"CommentsList_list__00mX0",commentWrapper:"CommentsList_commentWrapper___3mBt",fadeSlideIn:"CommentsList_fadeSlideIn__ZBtd5",loadMoreSlot:"CommentsList_loadMoreSlot__ErUKK",fadeInLoadMoreSlot:"CommentsList_fadeInLoadMoreSlot__m2Rfh"}},49200:e=>{e.exports={card:"CommentItem_card__Yhjjp",fadeInCommentCard:"CommentItem_fadeInCommentCard__hhHCf",removing:"CommentItem_removing__Oi6ad",fadeOutCommentCard:"CommentItem_fadeOutCommentCard__ktFb8",headerRow:"CommentItem_headerRow__7yWIF",repliesToggle:"CommentItem_repliesToggle__cvyrK",repliesContainer:"CommentItem_repliesContainer__rGbHM",fadeInRepliesContainer:"CommentItem_fadeInRepliesContainer__TE62H",collapsing:"CommentItem_collapsing__cZuJq",fadeOutRepliesContainer:"CommentItem_fadeOutRepliesContainer__McL2U",replyItemWrapper:"CommentItem_replyItemWrapper__dVphq",fadeSlideIn:"CommentItem_fadeSlideIn__Aso_m",replyConnector:"CommentItem_replyConnector__D3FZs",connectorCorner:"CommentItem_connectorCorner__nkU6S",connectorVertical:"CommentItem_connectorVertical__JNX3o",lastReply:"CommentItem_lastReply__cEMhF",notLastReply:"CommentItem_notLastReply__FMuyW",connectorVerticalBelow:"CommentItem_connectorVerticalBelow__Q0aDM",replyContent:"CommentItem_replyContent__oTDGI",loadMoreRepliesSlot:"CommentItem_loadMoreRepliesSlot__9e8GV",fadeInLoadMoreRepliesSlot:"CommentItem_fadeInLoadMoreRepliesSlot__7A_YC",hideRepliesButton:"CommentItem_hideRepliesButton___mfLR",retryButton:"CommentItem_retryButton__ZabCC",replyComposerWrapper:"CommentItem_replyComposerWrapper__aB3FK",fadeInReplyComposer:"CommentItem_fadeInReplyComposer__A1asZ",fadeOutReplyComposer:"CommentItem_fadeOutReplyComposer__D8KkG",anchoredReplyComposer:"CommentItem_anchoredReplyComposer__LDQdL",replyComposerContent:"CommentItem_replyComposerContent__LpfeB",replyComposerCloseButton:"CommentItem_replyComposerCloseButton__mVuxp",replyComposerCloseIcon:"CommentItem_replyComposerCloseIcon__AheP7",fadeOut:"C
1ommentItem_fadeOut__iJcEl"}},54916:e=>{e.exports={container:"CommunityGuidelines_container__j7ALs",dismissing:"CommunityGuidelines_dismissing__XNhec",fadeOut:"CommunityGuidelines_fadeOut__CEN57",text:"CommunityGuidelines_text__CsYBx",link:"CommunityGuidelines_link__ZF8Gb",closeButton:"CommunityGuidelines_closeButton__L_2Vd",closeIcon:"CommunityGuidelines_closeIcon__SCjJM"}},58803:(e,t,n)=>{"use strict";n.d(t,{l:()=>p});var o=n(28019),r=n(47451),l=n(55756),a=n(72173),i=n(5165),s=n(50582),d=n.n(s),c=n(95202),u=n.n(c),m=n(53289);let p=e=>{let{playlistId:t,title:n,className:s,maxSize:c="34.5rem"}=e,p=(0,r.useRef)(null);return((0,r.useEffect)(()=>{let e=p.current;if(!e)return;let t=document.createElement("script");return t.setAttribute("data-ot-ignore",""),t.src="https://embed.onefootball.com/inline/onefootball-cweb.js",e.appendChild(t),()=>{e.innerHTML=""}},[]),(0,l.w)(t))?null:(0,o.jsxs)("div",{className:d()(u().container),style:{"--max-width":c},children:[(0,a.R)(n)&&(0,o.jsx)(i.h,{...n,className:s}),(0,o.jsxs)("div",{className:u().videoPlayerWrapper,children:[(0,o.jsx)("div",{ref:p,"data-testid":"video-player",id:t,className:d()("dugout-video ".concat(t),u().videoPlayer)}),(0,o.jsx)("div",{"data-testid":"loading-spinner",className:u().loading,children:(0,o.jsx)(m.F,{})})]})]})}},62555:e=>{e.exports={"text-1":"ArticleParagraph_text-1__uEmrs",articleParagraph:"ArticleParagraph_articleParagraph__k_2M8","text-2":"ArticleParagraph_text-2___hP4w","text-3":"ArticleParagraph_text-3__P_mZ_","text-4":"ArticleParagraph_text-4__lr368","text-5":"ArticleParagraph_text-5__xzBc5"}},67478:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var o=n(28019),r=n(62555),l=n.n(r);let a=e=>(0,o.jsx)(o.Fragment,{children:e.content&&(0,o.jsx)("div",{className:l().articleParagraph,dangerouslySetInnerHTML:{__html:e.content}})})},70873:e=>{e.exports={"base-font":"CommentsTotalCount_base-font__SSXef",title:"CommentsTotalCount_title__PGVD_",container:"CommentsTotalCount_container__ZF7_o",count:"CommentsTotalCount_count__IGvxL"}},73071:e=>{e.exports={container:"RootCommentComposer_container__mRIXZ"}},74847:(e,t,n)=>{"use strict";n.d(t,{v:()=>c});var o=n(28019),r=n(31618),l=n.n(r),a=n(50582),i=n.n(a);let s=()=>(0,o.jsxs)("div",{className:l().shimmerCard,"data-testid":"comment-shimmer",children:[(0,o.jsxs)("div",{className:l().headerRow,children:[(0,o.jsx)("div",{className:i()(l().shimmer,l().avatar)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().username)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().timestamp)})]}),(0,o.jsx)("div",{className:i()(l().shimmer,l().bodyLine1)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().bodyLine2)}),(0,o.jsxs)("div",{className:l().actionsRow,children:[(0,o.jsx)("div",{className:i()(l().shimmer,l().action)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().action)})]})]}),d=()=>(0,o.jsxs)("div",{className:l().replyWrapper,"data-testid":"comment-shimmer",children:[(0,o.jsx)("div",{className:l().replyConnector,children:(0,o.jsx)("div",{className:l().connectorCorner})}),(0,o.jsxs)("div",{className:l().replyContent,children:[(0,o.jsxs)("div",{className:l().headerRow,children:[(0,o.jsx)("div",{className:i()(l().shimmer,l().avatar)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().username)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().timestamp)})]}),(0,o.jsx)("div",{className:i()(l().shimmer,l().bodyLine1)}),(0,o.jsxs)("div",{className:l().actionsRow,children:[(0,o.jsx)("div",{className:i()(l().shimmer,l().action)}),(0,o.jsx)("div",{className:i()(l().shimmer,l().action)})]})]})]}),c=e=>{let{count:t=1,variant:n="card"}=e;return(0,o.jsx)(o.Fragment,{children:Array.from({length:t},(e,t)=>"reply"===n?(0,o.jsx)(d,{},t):(0,o.jsx)(s,{},t))})}},80220:e=>{e.exports={"base-font":"CommentInput_base-font__MLIV_",input:"CommentInput_input__DCJ_i",container:"CommentInput_container__lLvdF",inputRow:"CommentInput_inputRow__CpOSE",submitButton:"CommentInput_submitButton__bCZpI",submitting:"CommentInput_submitting__58iar",sendIcon:"CommentInput_sendIcon__rmZ1z",spinner:"CommentInput_spinner__c7pDs",spin:"CommentInput_spin__yFWf6",error:"CommentInput_error__x_iGv",charCount:"CommentInput_charCount__yCdMP"}},81627:e=>{e.exports={backdrop:"AppealCommentDialog_backdrop__svCBa",appealDialogBackdropFadeIn:"AppealCommentDialog_appealDialogBackdropFadeIn__VyTmT",dialog:"Ap
1pealCommentDialog_dialog__Fl9yG",appealDialogScaleIn:"AppealCommentDialog_appealDialogScaleIn__2Tn2h",title:"AppealCommentDialog_title__DgEaL",hint:"AppealCommentDialog_hint__P5eew",detailsField:"AppealCommentDialog_detailsField__iwBf3",detailsLabel:"AppealCommentDialog_detailsLabel__fDdwp",textarea:"AppealCommentDialog_textarea__wbgjo",error:"AppealCommentDialog_error__3edwi",actions:"AppealCommentDialog_actions__YPxaL",button:"AppealCommentDialog_button__EJuFH",cancelButton:"AppealCommentDialog_cancelButton__Mkf_J",confirmButton:"AppealCommentDialog_confirmButton__jv7_H",appealDialogSlideUp:"AppealCommentDialog_appealDialogSlideUp__Y9Q1v"}},82297:e=>{e.exports={"base-font":"ArticleBlockquote_base-font___sYKg",label:"ArticleBlockquote_label__08wvO","title-1-bold":"ArticleBlockquote_title-1-bold__M_fzR","title-2-bold":"ArticleBlockquote_title-2-bold__NbnXO","title-3-bold":"ArticleBlockquote_title-3-bold__WDFqg","title-4-bold":"ArticleBlockquote_title-4-bold__WC7yI","title-5-bold":"ArticleBlockquote_title-5-bold__Wc5HQ","title-6-bold":"ArticleBlockquote_title-6-bold__6bIHO","title-7-bold":"ArticleBlockquote_title-7-bold__Apk6D","title-8-bold":"ArticleBlockquote_title-8-bold__NIq6E","title-9-bold":"ArticleBlockquote_title-9-bold__NDpyN",blockquote__text:"ArticleBlockquote_blockquote__text__RZ8Vn","title-1-regular":"ArticleBlockquote_title-1-regular__qg_EB","title-2-regular":"ArticleBlockquote_title-2-regular__j9ppP","title-3-regular":"ArticleBlockquote_title-3-regular__oJ9tz","title-4-regular":"ArticleBlockquote_title-4-regular__8LoXe","title-5-regular":"ArticleBlockquote_title-5-regular__oekUu","title-6-regular":"ArticleBlockquote_title-6-regular__a4m5t","title-7-regular":"ArticleBlockquote_title-7-regular__cy_nA","title-8-regular":"ArticleBlockquote_title-8-regular__1Qi2h","title-9-regular":"ArticleBlockquote_title-9-regular__YJnbN",blockquote__icon:"ArticleBlockquote_blockquote__icon__5ciJ0",blockquote__textContainer:"ArticleBlockquote_blockquote__textContainer__4__UQ",blockquote__author:"ArticleBlockquote_blockquote__author__w1BdU"}},82392:e=>{e.exports={body:"CommentBody_body__81kFG",deleted:"CommentBody_deleted__9miDE",rejected:"CommentBody_rejected__Sc9tE",mention:"CommentBody_mention__s_bzs",pending:"CommentBody_pending__WvfrG",rejectedRow:"CommentBody_rejectedRow__4X5Ik",appealLink:"CommentBody_appealLink__U0fVc"}},87600:(e,t,n)=>{"use strict";n.d(t,{k:()=>a});var o=n(28019),r=n(82297),l=n.n(r);let a=e=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("svg",{className:l().blockquote__icon,fill:"none",viewBox:"0 0 24 18",children:(0,o.jsx)("path",{d:"M9.625 8.694V18H0V7.653L4.813 0h5.312l-4.75 7.653v1.04h4.25zm13.875 0V18h-9.625V7.653L18.688 0H24l-4.75 7.653v1.04h4.25z",fill:"
1currentColor"})}),(0,o.jsx)("blockquote",{className:l().blockquote__textContainer,children:(0,o.jsx)("p",{className:l().blockquote__text,children:e.text})}),e.authorName&&(0,o.jsx)("p",{className:l().blockquote__author,children:(0,o.jsx)("span",{className:l().label,children:e.authorName})})]})},88826:e=>{e.exports={actions:"CommentActions_actions__vMdgb",replyButton:"CommentActions_replyButton__WriAQ"}},91727:e=>{e.exports={backdrop:"ReportCommentDialog_backdrop__0kna3",reportDialogBackdropFadeIn:"ReportCommentDialog_reportDialogBackdropFadeIn__g39WM",dialog:"ReportCommentDialog_dialog__XBbWs",reportDialogScaleIn:"ReportCommentDialog_reportDialogScaleIn__lbR4A",title:"ReportCommentDialog_title__Wk6iv",hint:"ReportCommentDialog_hint__Pb5pp",scrollableBody:"ReportCommentDialog_scrollableBody__GdBS_",reasons:"ReportCommentDialog_reasons__TSYNL",legend:"ReportCommentDialog_legend__78lMP",reasonRow:"ReportCommentDialog_reasonRow__z7M5I",radio:"ReportCommentDialog_radio__8TvGq",reasonLabel:"ReportCommentDialog_reasonLabel__Koj8n",detailsField:"ReportCommentDialog_detailsField__cQ3k8",detailsLabel:"ReportCommentDialog_detailsLabel__sAAuO",textarea:"ReportCommentDialog_textarea__QjzbO",error:"ReportCommentDialog_error__BVW_N",actions:"ReportCommentDialog_actions__DNhSl",button:"ReportCommentDialog_button__MOztU",cancelButton:"ReportCommentDialog_cancelButton__dPEtl",confirmButton:"ReportCommentDialog_confirmButton__UhuFA",reportDialogSlide
1Up:"ReportCommentDialog_reportDialogSlideUp__bDBQe"}},95202:e=>{e.exports={container:"EmbeddedVideoPlayer_container__8dCSa",videoPlayerWrapper:"EmbeddedVideoPlayer_videoPlayerWrapper__P8Az0",videoPlayer:"EmbeddedVideoPlayer_videoPlayer__SO9Go",loading:"EmbeddedVideoPlayer_loading__4DaIp"}},96672:(e,t,n)=>{"use strict";n.d(t,{R:()=>a});var o=n(28019),r=n(18377),l=n.n(r);let a=e=>(0,o.jsx)(o.Fragment,{children:e.isOrdered?(0,o.jsx)("ol",{className:l().ofListOrdered,children:e.items.map((e,t)=>(0,o.jsx)("li",{className:l().ofList__item,dangerouslySetInnerHTML:{__html:e}},"list-key-ordered-".concat(t)))}):(0,o.jsx)("ul",{className:l().ofListUnordered,children:e.items.map((e,t)=>(0,o.jsx)("li",{className:l().ofList__item,dangerouslySetInnerHTML:{__html:e}},"list-key-unordered-".concat(t)))})})}}]);
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.