PageSourceSearch

https://www.fightrealm.com/_next/static/chunks/1476-1a7d5ee2550d891a.js

js fightrealm.com collected 2026-09-24 14:43:14 UTC 53,212 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a1a34727-b06d-46c5-b616-816b948d0902",e._sentryDebugIdIdentifier="sentry-dbid-a1a34727-b06d-46c5-b616-816b948d0902")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1476],{24363:function(e,n,t){t.d(n,{l:function(){return M}});var r=t(85893),i=t(41664),o=t.n(i),a=t(67890),l=t(88053),s=t(82311),u=t(30137),c=t(76341),d=t(67462),m=t(93128),h=t(97582),p=t(67294),f=t(86501),x=t(56947),v=t(51414),b=t(76782),g=t(39990),w=s.xi[0],y=t(70402),j=t(25606),C=t(54369);function k(e){var n=e.open,t=e.emojis,i=e.userReactions,o=e.onPick,a=e.reactLoading,l=e.anchorRef,s=e.onPointerEnter,u=e.onPointerLeave;return(0,r.jsx)(C.Z,{open:n,anchorRef:l,align:"start",ariaLabel:"Choose reaction",children:(0,r.jsx)("div",{className:"flex items-center gap-0.5",onPointerEnter:s,onPointerLeave:u,children:t.map(function(e){var n=i.includes(e);return(0,r.jsx)("button",{type:"button",onClick:function(){return o(e)},disabled:a,className:(0,y.cn)("flex h-9 w-9 items-center justify-center rounded-full text-xl transition-all active:scale-95 disabled:opacity-50",n?"scale-110 bg-white/15 ring-1 ring-white/20":"hover:scale-110 hover:bg-white/10"),"aria-label":n?"Remove ".concat(e," reaction"):"React with ".concat(e),title:n?"Click to remove":"React with ".concat(e),children:e},e)})})})}var N=t(10718),_=t(67814),R=t(59417),E=t(93024),S=[{key:"facebook",label:"Facebook",icon:E.AYu},{key:"x",label:"X",icon:E.NCc},{key:"whatsapp",label:"WhatsApp",icon:E.VHX},{key:"email",label:"Email",icon:R.FU$},{key:"copy",label:"Copy link",icon:R.nNP}];function L(e){var n=e.open,t=e.url,i=e.title,o=e.onCopy,a=e.onClose,l=e.onShareChannel;return n?(0,r.jsx)("div",{className:"absolute bottom-full left-0 z-50 mb-2 min-w-[180px] rounded-lg border border-white/20 bg-[#1C1F23] p-1 shadow-xl sm:left-auto sm:right-0",role:"menu",children:S.map(function(e){var n,s,u;return"copy"===e.key?(0,r.jsxs)("button",{type:"button",role:"menuitem",onClick:function(){o(),a()},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-left font-inter text-sm text-white/90 transition-colors hover:bg-white/10",children:[(0,r.jsx)(_.G,{icon:e.icon,className:"h-3.5 w-3.5 text-white/75"}),(0,r.jsx)("span",{children:e.label})]},e.key):(0,r.jsxs)("a",{href:(n=e.key,s=encodeURIComponent(t),u=encodeURIComponent(i),"facebook"===n?"https://www.facebook.com/sharer/sharer.php?u=".concat(s):"x"===n?"https://twitter.com/intent/tweet?text=".concat(u,"&url=").concat(s):"whatsapp"===n?"https://wa.me/?text=".concat(encodeURIComponent("".concat(i," ").concat(t))):"email"===n?"mailto:?subject=".concat(u,"&body=").concat(encodeURIComponent("".concat(i,"\n\n").concat(t))):""),target:"_blank",rel:"noopener noreferrer",role:"menuitem",onClick:function(){null==l||l(e.key),a()},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 font-inter text-sm text-white/90 transition-colors hover:bg-white/10",children:[(0,r.jsx)(_.G,{icon:e.icon,className:"h-3.5 w-3.5 text-white/75"}),(0,r.jsx)("span",{children:e.label})]},e.key)})}):null}var P=t(25675),F=t.n(P);function T(e){var n=e.voteScore,t=e.userVote,i=e.voteLoading,o=e.canInteract,a=e.onUpvote,l=e.onDownvote;if("number"!=typeof n)return null;var s=1===t,u=-1===t;return o?(0,r.jsxs)("span",{className:b.zY,"aria-label":"Score ".concat(n),children:[(0,r.jsx)("button",{type:"button",disabled:i,onClick:function(e){e.stopPropagation(),(0,v.g_)(o)&&(null==a||a())},title:s?"Remove upvote":"Upvote","aria-label":s?"Remove upvote":"Upvote","aria-pressed":s,className:"rounded p-0.5 transition hover:bg-white/10 disabled:opacity-50",children:(0,r.jsx)(F(),{src:s?"/img/articles/arrow-up-active.png":"/img/articles/arrow-big-up.png",alt:"",width:14,height:14,className:s?"opacity-100":"opacity-70 hover:opacity-90"})}),(0,r.jsx)("span",{className:"min-w-[1.25rem] text-center font-inter text-[11px] font-medium tabular-nums text-white/55",children:n}),(0,r.jsx)("button",{type:"button",disabled:i,onClick:function(e){e.stopPropagation(),(0,v.g_)(o)&&(null==l||l())},title:u?"Remove downvote":"Downvote","aria-label":u?"Remove downvote":"Downvote","aria-pressed":u,className:"rounded p-0.5 transition hover:bg-white/10 disabled:opacity-50",children:(0,r.jsx)(F(),{src:u?"/img/articles/arrow-down-active.png":"/img/articles/arrow-big-down.png",alt:"",width:14,height:14,className:u?"opacity-100":"opacity-70 hover:opacity-90"})})]}):(0,r.jsxs)("span",{className:b.zY,"aria-label":"Score ".concat(n),title:"Article score",children:[(0,r.jsx)(F(),{src:"/img/articles/arrow-big-up.png",alt:"",width:14,height:14,className:"opacity-60"}),(0,r.jsx)("span",{className:"min-w-[1.25rem] text-center font-inter text-[11px] font-medium tabular-nums text-white/45",children:n}),(0,r.jsx)(F(),{src:"/img/articles/arrow-big-down.png",alt:"",width:14,height:14,className:"opacity-60"})]})}function M(e){var n,t,i,C,_,R,E,S,P,F,M,A,I,D,O,U,z,Z,V,W,H,B,Y,J=e.reactions,K=void 0===J?[]:J,q=e.userReactions,X=void 0===q?[]:q,G=e.displayUserReaction,$=e.reactLoading,Q=e.emojiPickerOpen,ee=e.onReact,en=e.setEmojiPickerOpen,et=e.canInteract,er=e.voteScore,ei=e.userVote,eo=e.voteLoading,ea=e.onUpvote,el=e.onDownvote,es=e.commentHref,eu=e.commentCount,ec=e.shareUrl,ed=e.shareTitle,em=e.anal
1yticsContentType,eh=e.analyticsContentId,ep=e.onCommentNavigate,ef=e.onCommentClick,ex=(t=(n={emojiPickerOpen:Q,setEmojiPickerOpen:en,canInteract:et,onReact:ee,shareUrl:ec,analyticsContentType:void 0===em?null:em,analyticsContentId:void 0===eh?null:eh}).emojiPickerOpen,i=n.setEmojiPickerOpen,C=n.canInteract,_=n.onReact,R=n.shareUrl,E=n.analyticsContentType,P=void 0===(S=n.analyticsContentId)?null:S,F=(0,p.useRef)(null),M=(0,p.useRef)(null),A=(0,p.useRef)(null),I=(0,p.useRef)(null),D=(0,p.useRef)(null),O=(0,p.useRef)(null),U=(0,p.useRef)(!1),z=(0,p.useRef)("mouse"),V=(Z=(0,m._)((0,p.useState)(!1),2))[0],W=Z[1],H=(0,p.useCallback)(function(){A.current&&(clearTimeout(A.current),A.current=null),I.current&&(clearTimeout(I.current),I.current=null),D.current&&(clearTimeout(D.current),D.current=null),O.current=null},[]),(0,p.useEffect)(function(){return function(){return H()}},[H]),(0,p.useEffect)(function(){if(t){var e=function(e){var n,t=e.target;if(null===(n=F.current)||void 0===n||!n.contains(t)){if(t instanceof Element&&t.closest("[data-fr-article-reaction-tray]"))return;i(!1)}},n=function(e){"Escape"===e.key&&i(!1)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",n)}}},[t,i]),(0,x.O)({ref:M,enabled:V,onOutside:function(){return W(!1)}}),B="news"===(void 0===E?null:E)?{content_type:"news",article_slug:null==P?null:String(P)}:{content_type:"post",post_id:null!=P?P:null},Y=(0,u._)(function(){return(0,h.Jh)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,navigator.clipboard.writeText(R)];case 1:return e.sent(),(0,g.SM)("copy_link",B),f.ZP.success("Link copied"),[3,3];case 2:return e.sent(),f.ZP.error("Failed to copy link"),[3,3];case 3:return[2]}})}),{emojiPickerRef:F,shareMenuRef:M,shareMenuOpen:V,setShareMenuOpen:W,handleCopyLink:function(){return Y.apply(this,arguments)},handleShareChannel:function(e){(0,g.SM)("share",(0,d._)((0,c._)({},B),{share_channel:e}))},handleDefaultReactClick:function(e){if(e.stopPropagation(),A.current&&(clearTimeout(A.current),A.current=null),U.current){U.current=!1;return}if("mouse"!==(("pointerType"in e?e.pointerType:void 0)||z.current)){i(!t);return}(0,v.g_)(C)&&_(w)},handleReactionPointerEnter:function(e){"mouse"===e.pointerType&&(I.current&&(clearTimeout(I.current),I.current=null),t||A.current||(A.current=setTimeout(function(){A.current=null,i(!0)},b.pd)))},handleReactionPointerLeave:function(e){if("mouse"===e.pointerType){var n=e.relatedTarget;n instanceof Element&&n.closest("[data-fr-article-reaction-tray]")||(A.current&&(clearTimeout(A.current),A.current=null),I.current=setTimeout(function(){i(!1)},b.f_))}},handleReactionPointerDown:function(e){z.current=e.pointerType||"mouse","mouse"!==e.pointerType&&(O.current={x:e.clientX,y:e.clientY},D.current=setTimeout(function(){U.current=!0,i(!0),D.current=null},b.u8))},handleReactionPointerMove:function(e){if(O.current&&D.current){var n=e.clientX-O.current.x,t=e.clientY-O.current.y;n*n+t*t>b.mh*b.mh&&(clearTimeout(D.current),D.current=null,O.current=null)}},handleReactionPointerEnd:function(){D.current&&(clearTimeout(D.current),D.current=null),O.current=null},handleReactionContextMenu:function(e){e.preventDefault(),i(!0)}}),ev=ex.emojiPickerRef,eb=ex.shareMenuRef,eg=ex.shareMenuOpen,ew=ex.setShareMenuOpen,ey=ex.handleCopyLink,ej=ex.handleShareChannel,eC=ex.handleDefaultReactClick,ek=ex.handleReactionPointerEnter,eN=ex.handleReactionPointerLeave,e_=ex.handleReactionPointerDown,eR=ex.handleReactionPointerMove,eE=ex.handleReactionPointerEnd,eS=ex.handleReactionContextMenu;return(0,r.jsxs)("div",{className:"relative z-10 mt-3 flex flex-wrap items-center gap-[.3rem] sm:gap-2",onClick:function(e){return e.stopPropagation()},children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,r.jsxs)("div",{className:"relative inline-flex shrink-0",ref:ev,onPointerEnter:ek,onPointerLeave:eN,children:[(0,r.jsx)("div",{className:"inline-flex",onPointerDown:e_,onPointerMove:eR,onPointerUp:eE,onPointerCancel:eE,onContextMenu:eS,children:K.length>0?(0,r.jsx)(N.E,{reactions:K,userReactions:X,reactLoading:$,onClick:eC,displayUserReaction:G,pickerOpen:Q}):(0,r.jsxs)("button",{type:"button",onClick:eC,disabled:$,className:(0,y.cn)(b.h3,"bg-transparent text-white/40 hover:bg-white/[0.04] hover:text-white/65"),"aria-label":"React","aria-expanded":Q,title:b.hs,children:[(0,r.jsx)("span",{className:"text-sm leading-none",children:w}),(0,r.jsx)("span",{children:"React"})]})}
1),(0,r.jsx)(k,{open:Q,emojis:s.xi,userReactions:X,onPick:ee,reactLoading:$,anchorRef:ev,onPointerEnter:ek,onPointerLeave:eN})]}),(0,r.jsx)(T,{voteScore:er,userVote:ei,voteLoading:eo,canInteract:et,onUpvote:ea,onDownvote:el}),ef?(0,r.jsxs)("button",{type:"button",className:b.PM,"aria-label":"Comment",onClick:function(e){e.stopPropagation(),null==ep||ep(),ef()},children:[(0,r.jsx)(a.j,{size:15,weight:"regular","aria-hidden":!0}),(0,r.jsx)("span",{children:(0,j.YK)(eu)})]}):(0,r.jsxs)(o(),{href:es,className:b.PM,"aria-label":"Comment",onClick:ep,children:[(0,r.jsx)(a.j,{size:15,weight:"regular","aria-hidden":!0}),(0,r.jsx)("span",{children:(0,j.YK)(eu)})]})]}),(0,r.jsxs)("div",{className:"relative ml-auto shrink-0",ref:eb,children:[(0,r.jsx)("button",{type:"button",onClick:function(){return ew(function(e){return!e})},className:b.ok,"aria-label":"Share","aria-expanded":eg,"aria-haspopup":"menu",children:(0,r.jsx)(l.L,{size:15,weight:"regular","aria-hidden":!0})}),(0,r.jsx)(L,{open:eg,url:ec,title:ed,onCopy:ey,onShareChannel:ej,onClose:function(){return ew(!1)}})]})]})}},13955:function(e,n,t){t.d(n,{Z:function(){return I}});var r=t(85893),i=t(67294),o=t(7002),a=t(81984),l=t(30137),s=t(76341),u=t(93128),c=t(97582),d=t(86501),m=t(7271),h=t(37861),p=t(82311),f=t(21142),x=t(78082),v=t(39990),b=t(12352),g=[],w=t(70402),y=t(67462),j=t(82449),C=t(51414),k=t(75806),N=t(67291),_=t(76876),R=t(62973),E=t(29883),S=t(30748);function L(e){var n,t=e.canInteract,o=e.loading,a=e.error,d=e.onSubmit,m=e.placeholder,h=e.inputRef,p=e.compact,f=void 0!==p&&p,x=(0,u._)((0,i.useState)(""),2),v=x[0],g=x[1],L=(0,u._)((0,i.useState)(""),2),P=L[0],F=L[1],T=(0,u._)((0,i.useState)(!1),2),M=T[0],A=T[1],I=(0,N.C)({textareaRef:h,value:v,setValue:g,maxLength:2e3}),D=I.insertEmoji,O=I.snapshotSelection,U=I.selectionProps,z=(0,R.$)({textareaRef:h,value:v,setValue:g,maxLength:2e3,enabled:t&&!o}),Z=(0,b.DY)(v,M?P:""),V=!!Z&&!o&&!z.lengthError,W=a||z.lengthError;(0,i.useLayoutEffect)(function(){(0,b.Sf)(h.current)},[v,f,h]);var H=(n=(0,l._)(function(e){return(0,c.Jh)(this,function(n){switch(n.label){case 0:if(e.preventDefault(),!V)return[2];return[4,d(z.serialize(Z))];case 1:return n.sent()&&(g(""),F(""),A(!1)),[2]}})}),function(e){return n.apply(this,arguments)});return(0,r.jsxs)("form",{onSubmit:H,className:"space-y-2",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("textarea",(0,s._)({ref:h,value:v,onChange:function(e){return g(e.target.value)},rows:2,maxLength:2e3,disabled:o,placeholder:t?"".concat(void 0===m?"Write a comment…":m).concat(z.mentionsEnabled?" Use @ to mention someone":""):"Log in to comment",readOnly:!t,onClick:function(){t||(0,C.Mo)()},onInput:function(){return(0,b.Sf)(h.current)},className:(0,w.cn)(S.WO,"composer-textarea-scrollbar resize-none overflow-hidden pr-12 text-base leading-relaxed",f?"min-h-[64px] bg-[#0A0A0A]/60":"min-h-[72px]",!t&&"cursor-pointer"),"aria-label":"Write a comment"},z.getTextareaProps((0,y._)((0,s._)({},U),{onBlur:k.V})))),(0,r.jsx)("div",{className:"absolute right-2 top-2",children:(0,r.jsx)(_.L,{insertEmoji:D,snapshotSelection:O,disabled:!t||o,onOpen:function(){var e;return null===(e=h.current)||void 0===e?void 0:e.blur()},placement:"above",buttonClassName:"h-9 w-9 rounded-xl text-white/45 hover:bg-white/[0.06] hover:text-white/80",iconClassName:"h-[18px] w-[18px]"})}),(0,r.jsx)(E.Z,(0,s._)({},z.suggestionsProps))]}),t&&M?(0,r.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-[#1F1F1F] bg-[#050505] px-3 py-2",children:[(0,r.jsx)(j.a,{size:16,className:"shrink-0 text-main-green","aria-hidden":!0}),(0,r.jsx)("input",{type:"url",value:P,onChange:function(e){return F(e.target.value)},maxLength:500,disabled:o,className:"min-w-0 flex-1 bg-transparent font-inter text-sm text-white placeholder:text-white/40 focus:outline-none","aria-label":"Comment link",placeholder:"https://"})]}):null,W?(0,r.jsx)("p",{className:"font-inter text-xs text-red-400",children:W}):null,t?(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:o,onClick:function(){A(function(e){var n=!e;return n||F(""),n})},"aria-label":M?"Remove link":"Add link",title:M?"Remove link":"Add link",className:(0,w.cn)("mr-auto flex h-9 w-9 cursor-pointer items-center justify-center rounded-xl transition",M?"bg-main-green/12 text-main-green":"text-white/45 hover:bg-white/[0.06] hover:text-white/80"),children:(0,r.jsx)(j.a,{size:18,weight:M?"fill":"regular"})}),(0,r.jsx)("button",{type:"button",disabled:o||!Z,onClick:function(){g(""),F(""),A(!1)}
1,className:(0,w.cn)(S.QD,"cursor-pointer disabled:cursor-pointer",f&&"px-2.5 py-1.5 text-xs"),children:"Cancel"}),(0,r.jsx)("button",{type:"submit",disabled:!V,className:(0,w.cn)(S.XL,"cursor-pointer disabled:cursor-pointer",f&&"px-3 py-1.5 text-xs"),children:o?"Posting…":"Comment"})]}):null]})}var P=t(91920);function F(e){var n=e.totalCount,t=e.expanded,i=e.onToggle,a="Comments";return 1===n?a="1 comment":n>0&&(a="".concat(n," comments")),(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-[#1F1F1F]/80 px-4 py-2.5 sm:px-5",children:[(0,r.jsxs)("button",{type:"button",onClick:i,className:"inline-flex items-center gap-1.5 font-inter text-[11px] font-semibold uppercase tracking-wider text-white/55 transition hover:text-white/80","aria-expanded":t,children:[(0,r.jsxs)("span",{children:["Comments",n>0?(0,r.jsxs)("span",{className:"text-white/30",children:[" \xb7 ",n]}):null]}),t?(0,r.jsx)(P.U,{size:12,weight:"bold",className:"text-white/40","aria-hidden":!0}):(0,r.jsx)(o.p,{size:12,weight:"bold",className:"text-white/40","aria-hidden":!0})]}),(0,r.jsx)("button",{type:"button",onClick:i,className:"font-inter text-xs font-semibold text-main-green/80 transition hover:text-main-green","aria-label":t?"Hide ".concat(a):"Show ".concat(a),children:t?"Hide":"Show"})]})}var T=[],M=(0,w.cn)("overflow-hidden rounded-xl border border-[#1F1F1F]","bg-[#050505]/90","shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]"),A=(0,i.forwardRef)(function(e,n){var t,y,j,C,k,N,_,R,E,S,P,A,I,D,O,U,z,Z,V,W,H,B,Y,J,K,q,X,G,$,Q,ee,en,et,er,ei,eo,ea,el,es,eu,ec,ed,em,eh,ep,ef,ex,ev,eb,eg,ew,ey,ej,eC,ek,eN,e_,eR,eE,eS,eL=e.kind,eP=e.resourceId,eF=void 0===eP?null:eP,eT=e.articleSlug,eM=void 0===eT?null:eT,eA=e.commentCount,eI=e.seedComments,eD=void 0===eI?T:eI,eO=e.analyticsContentType,eU=e.analyticsContentId,ez=e.attached,eZ=e.defaultExpanded,eV=(y=(t={kind:eL,resourceId:eF,articleSlug:eM,commentCount:void 0===eA?0:eA,seedComments:eD,analyticsContentType:void 0===eO?null:eO,analyticsContentId:void 0===eU?null:eU,defaultExpanded:void 0!==eZ&&eZ,ref:n}).kind,C=void 0===(j=t.resourceId)?null:j,N=void 0===(k=t.articleSlug)?null:k,R=void 0===(_=t.commentCount)?0:_,S=void 0===(E=t.seedComments)?g:E,A=void 0===(P=t.analyticsContentType)?null:P,D=void 0!==(I=t.defaultExpanded)&&I,O=t.ref,U=(0,f.Z)(function(e){return e.isAuthenticated}),z=(0,f.Z)(function(e){return e.user}),V=!!(null==(Z=(0,x.A)(z,U))?void 0:Z.id),W=(0,i.useRef)(null),H=(0,i.useRef)(null),B=(0,i.useRef)(!1),Y=(0,i.useRef)(!1),J=(0,i.useRef)(!1),K=(0,i.useMemo)(function(){return(0,b.LI)(S,y)},[S,y]),q=(0,i.useMemo)(function(){return K.map(function(e){return String(e.id)}).join("|")},[K]),G=(X=(0,u._)((0,i.useState)(!!D),2))[0],$=X[1],ee=(Q=(0,u._)((0,i.useState)(function(){return K.slice(0,6)}),2))[0],en=Q[1],er=(et=(0,u._)((0,i.useState)(R),2))[0],ei=et[1],ea=(eo=(0,u._)((0,i.useState)(null),2))[0],el=eo[1],eu=(es=(0,u._)((0,i.useState)(!1),2))[0],ec=es[1],em=(ed=(0,u._)((0,i.useState)(!1),2))[0],eh=ed[1],ef=(ep=(0,u._)((0,i.useState)(!1),2))[0],ex=ep[1],eb=(ev=(0,u._)((0,i.useState)(!1),2))[0],eg=ev[1],ey=(ew=(0,u._)((0,i.useState)(null),2))[0],ej=ew[1],(0,i.useEffect)(function(){B.current=!1,Y.current=!1,J.current=!1,el(null),ec(!1)},[y,C,N]),(0,i.useEffect)(function(){Y.current||en(function(e){var n=K.slice(0,6);return e.map(function(e){return String(e.id)}).join("|")===n.map(function(e){return String(e.id)}).join("|")?e:n})},[q,K]),(0,i.useEffect)(function(){ei(R)},[R]),eC=!eu&&(!!ea||ee.length<K.length||ee.length<er),(0,i.useEffect)(function(){if(G&&!(K.length>0)&&R&&!B.current){var e=!1;return eh(!0),(0,l._)(function(){var n,t,r,i;return(0,c.Jh)(this,function(o){switch(o.label){case 0:if(o.trys.push([0,5,6,7]),"messageboard"!==y)return[3,2];return[4,(0,p.Ph)(C,{pageSize:6})];case 1:return t=o.sent(),[3,4];case 2:return[4,(0,h.yr)(N,{pageSize:6})];case 3:t=o.sent(),o.label=4;case 4:if(n=t,e)return[2];return B.current=!0,Y.current=!0,en(null!==(r=n.results)&&void 0!==r?r:[]),el(null!==(i=n.next)&&void 0!==i?i:null),ec(!n.next),"number"==typeof n.count&&ei(function(e){return Math.max(e,n.count)}
1),[3,7];case 5:return o.sent(),e||(B.current=!0),[3,7];case 6:return e||eh(!1),[7];case 7:return[2]}})})(),function(){e=!0}}},[N,G,y,K.length,C,R]),ek=(0,i.useCallback)((0,l._)(function(){var e,n,t,r,i,o,a,l;return(0,c.Jh)(this,function(s){switch(s.label){case 0:if(J.current||eu)return[2];if(ee.length<K.length)return e=K.slice(ee.length,ee.length+6),en(function(n){return(0,m.ke)(n,e)}),[2];J.current=!0,ex(!0),s.label=1;case 1:if(s.trys.push([1,12,13,14]),!ea)return[3,6];if("messageboard"!==y)return[3,3];return[4,(0,p.oU)(ea)];case 2:return t=s.sent(),[3,5];case 3:return[4,(0,h.kR)(ea)];case 4:t=s.sent(),s.label=5;case 5:return n=t,[3,11];case 6:if("messageboard"!==y)return[3,8];return[4,(0,p.Ph)(C,{pageSize:10})];case 7:return r=s.sent(),[3,10];case 8:return[4,(0,h.yr)(N,{pageSize:10})];case 9:r=s.sent(),s.label=10;case 10:n=r,s.label=11;case 11:return Y.current=!0,en(function(e){return(0,m.ke)(e,null!==(i=n.results)&&void 0!==i?i:[])}),el(null!==(o=n.next)&&void 0!==o?o:null),ec(!n.next),[3,14];case 12:return a=s.sent(),d.ZP.error(null!==(l=null==a?void 0:a.message)&&void 0!==l?l:"Failed to load comments"),[3,14];case 13:return J.current=!1,ex(!1),[7];case 14:return[2]}})}),[N,ee.length,y,eu,ea,K,C]),e_=(0,i.useCallback)((eN=(0,l._)(function(e){var n,t,r,i,o,a;return(0,c.Jh)(this,function(l){switch(l.label){case 0:ej(null),eg(!0),l.label=1;case 1:if(l.trys.push([1,6,7,8]),"messageboard"!==y)return[3,3];return[4,(0,p.pq)(C,{body:e})];case 2:return n=l.sent(),[3,5];case 3:return t=e.split(/\s+/).slice(0,3).join(" ")||"",[4,(0,h.KJ)(N,{title:t,body:e})];case 4:n=l.sent(),l.label=5;case 5:return(r="messageboard"===y?(0,p.yv)(n):(0,h.BR)(n))&&(en(function(e){return(0,m.ke)(e,[r])}),ei(function(e){return e+1})),(0,v.SM)("comment",(0,s._)({content_type:null!=A?A:y},"messageboard"===y?{post_id:null!=C?C:null}:{article_slug:null!=N?N:null})),[2,!0];case 6:return ej(a=null!==(o=null==(i=l.sent())?void 0:i.message)&&void 0!==o?o:"Failed to post comment"),d.ZP.error(a),[2,!1];case 7:return eg(!1),[7];case 8:return[2]}})}),function(e){return eN.apply(this,arguments)}),[A,N,y,C]),eR=(0,i.useCallback)(function(e){en(function(n){return n.filter(function(n){return String(n.id)!==String(e)})}),ei(function(e){return Math.max(0,e-1)})},[]),eE=(0,i.useCallback)(function(e){(null==e?void 0:e.id)&&en(function(n){return n.map(function(n){return String(n.id)===String(e.id)?(0,s._)({},n,e):n})})},[]),eS=(0,i.useCallback)(function(e){e&&(en(function(n){return(0,m.ke)(n,[e])}),ei(function(e){return e+1}))},[]),(0,i.useImperativeHandle)(O,function(){return{expand:function(e){$(!0);var n=(null==e?void 0:e.focusComposer)!==!1,t=(null==e?void 0:e.scrollIntoView)!==!1;(n||t)&&window.requestAnimationFrame(function(){var e,r;t&&(null===(r=W.current)||void 0===r||r.scrollIntoView({block:"nearest",behavior:"smooth"})),n&&(null===(e=H.current)||void 0===e||e.focus())})}}}),{canInteract:V,currentUser:Z,threadRef:W,composeRef:H,expanded:G,setExpanded:$,comments:ee,totalCount:er,loading:em,loadMoreLoading:ef,composeLoading:eb,composeError:ey,hasMore:eC,loadMore:ek,handleCreateComment:e_,handleCommentRemoved:eR,handleCommentUpdated:eE,handleReplyRestore:e
1S}),eW=eV.canInteract,eH=eV.currentUser,eB=eV.threadRef,eY=eV.composeRef,eJ=eV.expanded,eK=eV.setExpanded,eq=eV.comments,eX=eV.totalCount,eG=eV.loading,e$=eV.loadMoreLoading,eQ=eV.composeLoading,e0=eV.composeError,e1=eV.hasMore,e2=eV.loadMore,e5=eV.handleCreateComment,e4=eV.handleCommentRemoved,e3=eV.handleCommentUpdated,e8=eV.handleReplyRestore,e7=(0,w.cn)(M,void 0!==ez&&ez?"mt-2":"mt-3 border-t border-[#1F1F1F] pt-3");return eJ||0!==eX||0!==eq.length?eJ?(0,r.jsxs)("div",{ref:eB,className:e7,onClick:function(e){return e.stopPropagation()},children:[(0,r.jsx)(F,{totalCount:eX,expanded:eJ,onToggle:function(){return eK(function(e){return!e})}}),eG?(0,r.jsx)("div",{className:"space-y-4 px-4 py-4 sm:px-5","aria-hidden":!0,children:[1,2].map(function(e){return(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("div",{className:"h-8 w-8 shrink-0 animate-pulse rounded-full bg-white/10"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,r.jsx)("div",{className:"h-3 w-24 animate-pulse rounded bg-white/10"}),(0,r.jsx)("div",{className:"h-3 w-full animate-pulse rounded bg-white/10"})]})]},e)})}):(0,r.jsxs)(r.Fragment,{children:[eq.length>0?(0,r.jsx)("div",{className:"chat-messages-scrollbar max-h-[min(48rem,70vh)] divide-y divide-[#1F1F1F]/70 overflow-y-auto px-3 py-1 sm:px-4",children:eq.map(function(e){var n=e.id;
1return(0,r.jsx)(a.Z,{response:e,isNested:"messageboard"===eL,canInteract:eW,rootPostId:"messageboard"===eL?eF:null,currentUserId:null==eH?void 0:eH.id,currentUsername:null==eH?void 0:eH.username,articleSlug:"article"===eL?eM:null,apiSource:"messageboard"===eL?"messageboard":"article",disableCardLink:!0,realmEmbedded:!0,onPostRemoved:function(){return e4(n)},onPostUpdated:e3,onReplyRemoved:e4,onReplyRestore:e8},String(n))})}):(0,r.jsx)("p",{className:"px-4 py-5 font-inter text-xs text-white/40 sm:px-5",children:"No comments yet — be the first to share your take."}),e1?(0,r.jsx)("div",{className:"border-t border-[#1F1F1F]/80 px-4 py-3 sm:px-5",children:(0,r.jsx)("button",{type:"button",onClick:e2,disabled:e$,className:"font-inter text-xs font-semibold text-main-green/75 transition hover:text-main-green disabled:opacity-50",children:function(e,n,t){if(e)return"Loading…";if(0===n)return 1===t?"Load comment":"Load ".concat(t," comments");var r=t-n;return 1===r?"Load 1 more comment":"Load ".concat(r," more")}(e$,eq.length,eX)})}):null]}),(0,r.jsx)("div",{className:"border-t border-[#1F1F1F]/80 bg-[#0A0A0A]/50 px-4 py-3.5 sm:px-5",children:(0,r.jsx)(L,{canInteract:eW,loading:eQ,error:e0,onSubmit:e5,inputRef:eY,compact:!0,placeholder:"article"===eL?"Share your take…":"Write a comment…"})})]}):(0,r.jsx)("div",{className:e7,children:(0,r.jsxs)("button",{type:"button",onClick:function(){return eK(!0)},className:"flex w-full items-center justify-between gap-3 px-4 py-3 text-left transition hover:bg-white/[0.02] sm:px-5","aria-expanded":!1,children:[(0,r.jsx)("span",{className:"font-inter text-xs font-semibold text-main-green/85",children:1===eX?"View 1 comment":"View ".concat(eX," comments")}),(0,r.jsx)(o.p,{size:14,weight:"bold",className:"shrink-0 text-white/40","aria-hidden":!0})]})}):null});A.displayName="FeedCommentThread";var I=A},99155:function(e,n,t){t.d(n,{Z:function(){return f}});var r=t(85893),i=t(32543),o=t(86228),a=t(48522),l=t(97724),s=t(70402),u=t(25675),c=t.n(u);function d(e){var n=e.src,t=e.name,i=e.size,o=void 0===i?40:i;return n?(0,r.jsx)(c(),{src:n,alt:"",width:o,height:o,className:"h-full w-full object-cover"}):(0,r.jsx)("span",{className:"flex h-full w-full items-center justify-center font-inter text-sm font-semibold text-white/70",children:(t||"?").slice(0,1).toUpperCase()})}var m=t(25606),h=o.Z,p=a.Z;function f(e){var n=e.name,t=e.handle,o=e.avatar,a=e.verified,u=e.timestamp,c=e.trailing,f=e.userSlug,x=e.badgeTier,v=e.flair,b=e.isFoundingMember,g=e.realmScore,w=e.compact,y=void 0!==w&&w,j=(0,m.M8)(f),C=t||n,k=y?32:40,N=(0,r.jsx)("span",{className:(0,s.cn)("flex overflow-hidden rounded-full border border-white/10 bg-[#050505]",y?"h-8 w-8":"h-10 w-10"),children:(0,r.jsx)(d,{src:o,name:n,size:k})}),_=N;j&&(_=(0,r.jsx)(h,{userSlug:j,username:C,avatar:o,badgeTier:x,flair:v,isFoundingMember:b,realmScore:g,children:(0,r.jsx)(l.Z,{avatarSize:k,badgeTier:x,flair:v,isFoundingMember:b,children:N})}));var R=(0,s.cn)("font-inter font-semibold text-white",y?"text-[13px]":"text-[15px]"),E="hidden truncate font-inter text-[13px] font-normal text-white/40 sm:inline",S=(0,r.jsx)("span",{className:(0,s.cn)("truncate",R),children:n});j&&(S=(0,r.jsx)(p,{userSlug:j,username:C,avatar:o,badgeTier:x,flair:v,isFoundingMember:b,realmScore:g,className:R,children:n}));var L=null;return t&&(L=j?(0,r.jsxs)(p,{userSlug:j,username:C,avatar:o,badgeTier:x,flair:v,isFoundingMember:b,realmScore:g,className:E,children:["@",t]}):(0,r.jsxs)("span",{className:E,children:["@",t]})),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"flex shrink-0 items-center leading-none",children:_}),(0,r.jsx)("div",{className:"flex min-h-0 min-w-0 flex-1 items-center",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 leading-none",children:[S,void 0!==a&&a?(0,r.jsx)(i.f,{size:y?13:15,weight:"fill",className:"shrink-0 text-main-green","aria-label":"Verified"}):null,L,u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"shrink-0 text-white/25","aria-hidden":!0,children:"\xb7"}),(0,r.jsx)("span",{className:"shrink-0 font-inter text-[13px] text-white/40",children:u})]}):null,(0,r.jsx)("span",{className:"ml-auto flex shrink-0 items-center",children:c})]})})]})}},60968:function(e,n,t){t.d(n,{Z:function(){return s}});var r=t(85893),i=t(41664),o=t.n(i),a=t(70402);function l(e){var n=e.src,t=e.alt,i=e.className,o=e.imageClassName;return(0,r.jsxs)("div",{className:(0,a.cn)("relative aspect-[4/3] w-full overflow-hidden rounded-xl border border-[#1F1F1F] bg-[#050505]",i),children:[(0,r.jsx)("img",{src:n,alt:"","aria-hidden":!0,
1className:"absolute inset-0 h-full w-full scale-110 object-cover blur-2xl brightness-[0.42] saturate-[1.15]"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/40","aria-hidden":!0}),(0,r.jsx)("img",{src:n,alt:void 0===t?"":t,className:(0,a.cn)("relative z-10 h-full w-full object-contain object-center",o)})]})}function s(e){var n=e.src,t=e.alt,i=e.href,s=e.className,u=e.onClick;if(!n)return null;var c=(0,r.jsx)(l,{src:n,alt:void 0===t?"":t,className:(0,a.cn)("mt-2.5","mx-auto w-full max-w-none sm:max-w-[28rem]",s)});return i?(0,r.jsx)(o(),{href:i,className:"block",onClick:u,children:c}):c}},19744:function(e,n,t){t.d(n,{f:function(){return $}});var r=t(93128),i=t(85893),o=t(67294),a=t(41664),l=t.n(a),s=t(82449),u=t(36084),c=t(87926),d=t(21142),m=t(14522),h=t(26124),p=t(30137),f=t(97582),x=t(86501),v=t(82311),b=t(39990),g=t(33893),w=t(85838),y=t(70402),j=t(25606),C=t(30748),k=t(60968),N=t(99155),_=t(76341),R=t(62973),E=t(29883);function S(e){var n=e.editTitle,t=e.setEditTitle,r=e.editBody,a=e.setEditBody,l=e.editLink,u=e.setEditLink,c=e.editLoading,d=e.onCancel,m=e.onSave,h=(0,o.useRef)(null),p=(0,R.$)({textareaRef:h,value:r,setValue:a,maxLength:2e3,enabled:!c});return(0,i.jsxs)("form",{onSubmit:function(e){return m(e,{serializeBody:p.serialize})},className:"mt-2.5 space-y-2.5",children:[(0,i.jsx)("input",{type:"text",value:n,onChange:function(e){return t(e.target.value)},maxLength:300,disabled:c,className:(0,y.cn)(C.WO,"text-[15px] font-semibold"),"aria-label":"Edit title",placeholder:"Title"}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("textarea",(0,_._)({ref:h,value:r,onChange:function(e){return a(e.target.value)},maxLength:2e3,rows:4,disabled:c,className:(0,y.cn)(C.WO,"composer-textarea-scrollbar resize-none text-[14px] leading-relaxed"),"aria-label":"Edit body",placeholder:p.mentionsEnabled?"What's on your mind? Use @ to mention someone":"What's on your mind?"},p.getTextareaProps())),(0,i.jsx)(E.Z,(0,_._)({},p.suggestionsProps))]}),p.lengthError?(0,i.jsx)("p",{className:"font-inter text-xs text-red-400",role:"alert",children:p.lengthError}):null,(0,i.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-[#1F1F1F] bg-[#050505] px-3 py-2",children:[(0,i.jsx)(s.a,{size:16,className:"shrink-0 text-main-green","aria-hidden":!0}),(0,i.jsx)("input",{type:"url",value:l,onChange:function(e){return u(e.target.value)},maxLength:500,disabled:c,className:"min-w-0 flex-1 bg-transparent font-inter text-sm text-white placeholder:text-white/40 focus:outline-none","aria-label":"Edit link",placeholder:"https://"})]}),(0,i.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,i.jsx)("button",{type:"button",onClick:d,disabled:c,className:C.QD,children:"Cancel"}),(0,i.jsx)("button",{type:"submit",disabled:c||!n.trim()||!r.trim()||!!p.lengthError,className:C.XL,children:c?"Saving…":"Save"})]})]})}var L=t(87761),P=t(73673),F=t(98247),T=t(61153),M=t(24363);function A(e){var n,t,r,a,l,s=e.post,u=e.onCommentClick,c=!!(0,d.Z)(function(e){return e.isAuthenticated}),m=(0,F.N)({canInteract:c,apiSource:"messageboard",isNested:!1,id:(null==s?void 0:s.id)==null?void 0:String(s.id),upvoteCount:null!==(n=null==s?void 0:s.upvoteCount)&&void 0!==n?n:0,userVote:null!==(t=null==s?void 0:s.userVote)&&void 0!==t?t:null,rawReactions:null!==(r=null==s?void 0:s.reactions)&&void 0!==r?r:[],rawUserReactions:null!==(l=null!==(a=null==s?void 0:s.userReactions)&&void 0!==a?a:null==s?void 0:s.user_reactions)&&void 0!==l?l:[]}),h=m.reactions,p=m.displayUserReactions,f=m.displayUserReaction,x=m.emojiPickerOpen,v=m.reactLoading,g=m.handleReact,y=m.setEmojiPickerOpen,j=m.displayUpvoteCount,C=m.displayUserVote,k=m.voteLoading,N=m.handleUpvote,_=m.handleDownvote,R=(0,o.useCallback)(function(e){var n;return(0,b.SM)("react",{content_type:"post",post_id:null!==(n=null==s?void 0:s.id)&&void 0!==n?n:null,emoji:e}),g(e)},[g,null==s?void 0:s.id]),E=(0,o.useCallback)(function(){var e;(0,b.SM)("upvote",{content_type:"post",post_id:null!==(e=null==s?void 0:s.id)&&void 0!==e?e:null}),N()},[N,null==s?void 0:s.id]),S=(0,o.useCallback)(function(){var e;(0,b.SM)("downvote",{content_type:"post",post_id:null!==(e=null==s?void 0:s.id)&&void 0!==e?e:null}),_()},[_,null==s?void 0:s.id]);if(!(null==s?void 0:s.id))return null;var L=(0,w.UF)(s.id);return(0,i.jsx)(M.l,{reactions:h,userReactions:p,displayUserReaction:f,reactLoading:v,emojiPickerOpen:x,onReact:R,setEmojiPickerOpen:y,canInteract:c,voteScore:j,userVote:C,voteLoading:k,onUpvote:E,onDownvote:S,commentHref:L,commentCount:s.replyCount,shareUrl:(0,T.BY)(L),shareTitle:s.title||"Fight Realm",analyticsContentType:"post",analyticsContentId:s.id,onCommentNavigate:function(){return(0,b.SM)("comment",{content_type:"post",post_id:s.id})},onCommentClick:u})}var I=t(13955),D=t(56947),O=t(71867),U=t(51414),z=O.cZ,Z=O.cN,V=O.fK,W=O.$N;function H(e){var n=e.open,t=e.onOpenChange,r=e.reason,o=e.setReason,a=e.details,l=e.setDetails,s=e.loading,u=e.error,c=e.onSubmit;return(0,i.jsx)(O.Vq,{open:n,onOpenChange:t,children:(0,i.jsxs)(z,{className:"border-white/20 bg-[#1C1F23] text-white shadow-2xl",closeClassName:"text-white/80 hover:text-white focus:ring-white/30",children:[(0,i.jsx)(V,{children:(0,i.jsx)(W,{className:"text-white",children:"Report"})}),(0,i.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"the-realm-report-reason",className:"mb-1 block font-inter text-sm font-medium text-white/80",children:"Reason"}),(0,i.jsxs)("select",{id:"the-realm-report-reason",value:r,onChange:function(e){return o(e.target.value)},required:!0,className:"w-full rounded-lg border border-white/20 bg-[#0C0D0E] px-3 py-2.5 font-inter text-sm text-white focus:border-white/40 focus:outline-none focus:ring-1 focus:ring-white/40 [&>option]:bg-[#1C1F23]",children:[(0,i.jsx)("option",{value:"",children:"Select a reason"}),v.u6.map(function(e){return(0,i.jsx)("option",{value:e.value,children:e.label},e.value)})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"the-realm-report-details",className:"mb-1 block font-inter text-sm font-medium text-white/80",children:"Details (optional)"}),(0,i.jsx)("textarea",{id:"the-realm-report-details",value:a,onChange:function(e){return l(e.target.value)},rows:3,placeholder:"Add any additional context...",className:"w-full resize-y rounded-lg border border-white/20 bg-[#0C0D0E] px-3 py-2.5 font-inter text-sm text-white placeholder:text-white/40 focus:border-white/40 focus:outline-none focus:ring-1 focus:ring-white/40"})]}),u?(0,i.jsx)("p",{className:"text-sm text-red-400",children:u}):null,(0,i.jsxs)(Z,{className:"gap-2 pt-1 sm:gap-0",children:[(0,i.jsx)("button",{type:"button",onClick:function(){return t(!1)},className:"rounded-xl border border-white/20 bg-white/5 px-4 py-2 font-inter text-sm font-medium text-white transition-colors hover:bg-white/10",children:"Cancel"}),(0,i.jsx)("button",{type:"submit",disabled:s,className:"rounded-xl bg-main-green px-4 py-2 font-inter text-sm font-medium text-black transition-opacity hover:opacity-90 disabled:opacity-50",children:s?"Submitting...":"Submit report"})]})]})]})})}var B=t(87554);function Y(e){var n=e.onClick,t=e.menuOpen;return(0,i.jsx)("button",{type:"button",onClick:function(e){e.preventDefault(),e.stopPropagation(),n()},className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-white/35 transition hover:bg-white/5 hover:text-white sm:h-8 sm:w-8","aria-label":"More options","aria-expanded":void 0!==t&&t,"aria-haspopup":"menu",children:(0,i.jsx)(B.x,{size:18,weight:"bold","aria-hidden":!0})})}var J=O.cZ,K=O.cN,q=O.fK,X=O.$N;function G(e){var n,t,a,l,s,u,c,m,h,g,w,y,j,C,k,N,_,R,E,S,L,P,F,T=e.post,M=e.onEdit,A=e.onRemoved,I=(0,d.Z)(function(e){return e.isAuthenticated}),z=(0,d.Z)(function(e){return e.user}),Z=!!I,V=(n=null==T?void 0:T.author,null!=z&&!!z.id&&(null==n?void 0:n.id)!=null&&String(z.id)===String(n.id)||!!(null==z?void 0:z.username)&&(null==n?void 0:n.username)!=null&&String(z.username).toLowerCase()===String(n.username).toLowerCase()),W=(0,r._)((0,o.useState)(!1),2),B=W[0],G=W[1],$=(0,r._)((0,o.useState)(!1),2),Q=$[0],ee=$[1],en=(0,r._)((0,o.useState)(!1),2),et=en[0],er=en[1],ei=(0,o.useRef)(null),eo=(l=(a={canInteract:Z,onSubmitReport:(t=(0,p._)(function(e){var n;return(0,f.Jh)(this,function(t){switch(t.label){case 0:if(!(null==T?void 0:T.id))return[2];return[4,(0,v.Qv)(T.id,e)];case 1:return t.sent(),(0,b.LZ)(T.id,null!==(n=null==e?void 0:e.reason)&&void 0!==n?n:null),[2]}})}),function(e){return t.apply(this,arguments)})}).canInteract,s=a.onSubmitReport,c=(u=(0,r._)((0,o.useState)(!1),2))[0],m=u[1],g=(h=(0,r._)((0,o.useState)(""),2))[0],w=h[1],j=(y=(0,r._)((0,o.useState)(""),2))[0],C=y[1],N=(k=(0,r._)((0,o.useState)(!1),2))[0],_=k[1],E=(R=(0,r._)((0,o.useState)(null),2))[0],S=R[1],L=(0,o.useCallback)(function(){(0,U.g_)(l)&&(w(""),C(""),S(null),m(!0))},[l]),P=(0,p._)(function(e){var n,t;return(0,f.Jh)(this,function(r){switch(r.label){case 0:if(e.preventDefault(),!l||!g.trim()||N)return[2];S(null),_(!0),r.label=1;case 1:return r.trys.push([1,3,4,5]),[4,s({reason:g.trim(),details:j.trim()})];case 2:return r.sent(),m(!1),w(""),C(""),x.ZP.success("Thanks for reporting. Our team will review the issue."),[3,5];case 3:return S(null!==(t=null==(n=r.sent())?void 0:n.message)&&void 0!==t?t:"Failed to submit report"),[3,5];case 4:return _(!1),[7];case 5:return[2]}})}),{open:c,setOpen:m,reason:g,setReason:w,details:j,setDetails:C,loading:N,error:E,openReport:L,handleSubmit:function(e){return P.apply(this,arguments)}});if((0,D.O)({ref:ei,enabled:B,onOutside:function(){return G(!1)}}),!(null==T?void 0:T.id))return null;var ea=(F=(0,p._)(function(){var e,n;return(0,f.Jh)(this,function(t){switch(t.label){case 0:if(et||!V)return[2];ee(!1),er(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,(0,v.Z$)(T.id)];case 2:return t.sent(),(0,b.v1)(T.id),null==A||A(T.id),x.ZP.success("Post removed"),[3,5];case 3:return e=t.sent(),x.ZP.error(null!==(n=null==e?void 0:e.message)&&void 0!==n?n:"Failed to remove post"),[3,5];case 4:return er(!1),[7];case 5:return[2]}})}),function(){return F.apply(this,arguments)});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"relative",ref:ei,children:[(0,i.jsx)(Y,{onClick:function(){if(!V&&!Z){(0,b.zu)("login","post_menu"),(0,U.g_)(!1);return}G(function(e){return!e})},menuOpen:B}),B?(0,i.jsx)("div",{role:"menu",className:"absolute right-0 top-full z-30 mt-1 min-w-[10rem] overflow-hidden rounded-xl border border-[#1F1F1F] bg-[#0A0A0A] py-1 shadow-xl",children:V?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("button",{type:"button",role:"menuitem",onClick:function(e){e.preventDefault(),e.stopPropagation(),G(!1),null==M||M()},className:"flex w-full px-3 py-2 text-left font-inter text-sm text-white/90 transition hover:bg-white/5",children:"Edit"}),(0,i.jsx)("button",{type:"button",role:"menuitem",onClick:function(e){e.preventDefault(),e.stopPropagation(),G(!1),ee(!0)},disabled:et,className:"flex w-full px-3 py-2 text-left font-inter text-sm text-red-400 transition hover:bg-white/5 disabled:opacity-50",children:et?"Removing…":"Remove"})]}):(0,i.jsx)("button",{type:"button",role:"menuitem",onClick:function(e){e.preventDefault(),e.stopPropagation(),G(!1),eo.openReport()},className:"flex w-full px-3 py-2 text-left font-inter text-sm text-white/90 transition hover:bg-white/5",children:"Report"})}):null]}),(0,i.jsx)(H,{open:eo.open,onOpenChange:eo.setOpen,reason:eo.reason,setReason:eo.setReason,details:eo.details,setDetails:eo.setDetails,loading:eo.loading,error:eo.error,onSubmit:eo.handleSubmit}),(0,i.jsx)(O.Vq,{open:Q,onOpenChange:ee,children:(0,i.jsxs)(J,{className:"border-white/20 bg-[#1C1F23] text-white shadow-2xl",closeClassName:"text-white/80 hover:text-white focus:ring-white/30",children:[(0,i.jsx)(q,{children:(0,i.jsx)(X,{className:"text-white",children:"Remove post?"})}),(0,i.jsx)("p",{className:"font-inter text-sm text-white/65",children:"This removes the post from the Feed. You can’t undo this."}),(0,i.jsxs)(K,{className:"gap-2 sm:gap-2",children:[(0,i.jsx)("button",{type:"button",onClick:function(){return ee(!1)},className:"rounded-xl px-4 py-2 text-sm font-medium text-white/70 transition hover:bg-white/5 hover:text-white",children:"Cancel"}),(0,i.jsx)("button",{type:"button",onClick:ea,disabled:et,className:"rounded-xl bg-red-500/90 px-4 py-2 text-sm font-semibold text-white transition hover:bg-red-500 disabled:opacity-50",children:et?"Removing…":"Remove"})]})]})})]})}function $(e){var n,t,a,_,R,E,F,T,M,D,O,U,z,Z,V,W,H,B,Y,J,K,q,X,$,Q,ee,en,et,er,ei,eo,ea,el,es,eu=e.post,ec=e.onPostRemoved,ed=e.variant,em=(0,o.useRef)(null),eh=(0,o.useRef)(null),ep=(0,m.Z)().videoMessageboardVisible,ef=(0,d.Z)(function(e){return e.isAuthenticated}),ex=(0,r._)((0,o.useState)(null!==(eo=null==eu?void 0:eu.video)&&void 0!==eo?eo:null),2),ev=ex[0],eb=ex[1],eg=(0,r._)((0,o.useState)(null!==(ea=null==eu?void 0:eu.poll)&&void 0!==ea?ea:null),2),ew=eg[0],ey=eg[1],ej=(0,r._)((0,o.useState)(!1),2),eC=ej[0],ek=ej[1],eN=(0,r._)((0,o.useState)(null),2),e_=eN[0],eR=eN[1],eE=(R=(_=(0,r._)((0,o.useState)(null!==(n=null==eu?void 0:eu.title)&&void 0!==n?n:""),2))[0],E=_[1],T=(F=(0,r._)((0,o.useState)(null!==(t=null==eu?void 0:eu.body)&&void 0!==t?t:""),2))[0],M=F[1],O
1=(D=(0,r._)((0,o.useState)(null!==(a=null==eu?void 0:eu.link)&&void 0!==a?a:""),2))[0],U=D[1],Z=(z=(0,r._)((0,o.useState)(!1),2))[0],V=z[1],H=(W=(0,r._)((0,o.useState)(""),2))[0],B=W[1],J=(Y=(0,r._)((0,o.useState)(""),2))[0],K=Y[1],X=(q=(0,r._)((0,o.useState)(""),2))[0],$=q[1],ee=(Q=(0,r._)((0,o.useState)(!1),2))[0],en=Q[1],(0,o.useEffect)(function(){var e,n,t;E(null!==(e=null==eu?void 0:eu.title)&&void 0!==e?e:""),M(null!==(n=null==eu?void 0:eu.body)&&void 0!==n?n:""),U(null!==(t=null==eu?void 0:eu.link)&&void 0!==t?t:""),V(!1)},[null==eu?void 0:eu.id,null==eu?void 0:eu.title,null==eu?void 0:eu.body,null==eu?void 0:eu.link]),et="string"==typeof O?O.trim():"",er=(0,p._)(function(e,n){var t,r,i,o,a,l,s;return(0,f.Jh)(this,function(u){switch(u.label){case 0:if(null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),r=H.trim(),o=(null!==(i=null==n?void 0:n.serializeBody)&&void 0!==i?i:function(e){return e})(J.trim()),a=(0,g.q7)(X.trim())||X.trim(),!(null==eu?void 0:eu.id)||!r||!o||ee)return[2];en(!0),u.label=1;case 1:return u.trys.push([1,3,4,5]),[4,(0,v.yF)(eu.id,{title:r,body:o,link:a||null})];case 2:return u.sent(),E(r),M(o),U(a),V(!1),(0,b.Yt)(eu.id),x.ZP.success("Post updated"),[3,5];case 3:return l=u.sent(),x.ZP.error(null!==(s=null==l?void 0:l.message)&&void 0!==s?s:"Failed to update post"),[3,5];case 4:return en(!1),[7];case 5:return[2]}})}),{title:R,body:T,displayLink:et,editing:Z,editTitle:H,setEditTitle:B,editBody:J,setEditBody:K,editLink:X,setEditLink:$,editLoading:ee,startEdit:function(){B(R||""),K(T||""),$(et),V(!0)},cancelEdit:function(){V(!1),B(""),K(""),$("")},saveEdit:function(e,n){return er.apply(this,arguments)}});(0,o.useEffect)(function(){var e;eb(null!==(e=null==eu?void 0:eu.video)&&void 0!==e?e:null)},[null==eu?void 0:eu.id,null==eu?void 0:eu.video]),(0,o.useEffect)(function(){var e;ey(null!==(e=null==eu?void 0:eu.poll)&&void 0!==e?e:null)},[null==eu?void 0:eu.id,null==eu?void 0:eu.poll]),(0,o.useEffect)(function(){ek(!1)},[null==eu?void 0:eu.id]);var eS=(0,h.z)(ep&&(null==eu?void 0:eu.id)!=null?String(eu.id):null,ev,function(e){(null==e?void 0:e.video)&&eb(e.video)}).timedOut,eL="detail"===(void 0===ed?"feed":ed);if((0,o.useLayoutEffect)(function(){if(eL||!eE.body){eR(null);return}var e=eh.current;if(e){var n=(Number.parseFloat(window.getComputedStyle(e).lineHeight)||22)*j.jt,t=e.textContent,r=(0,j.pH)(eE.body,function(n){return e.textContent=(0,P.kI)(n),e.scrollHeight},n);e.textContent=t,eR(r?(0,P.I9)(eE.body,r.length):r)}},[eE.body,eL]),!eu)return null;var eP=eu.author||{},eF=eP.username||"Member",eT=eF.replace(/\s+/g,"").toLowerCase(),eM=eP.avatar||eP.profileImage,eA=(0,w.UF)(eu.id),eI=ep?ev:null,eD={nestedInRouterLink:!eL,renderMention:L.W},eO=!eL&&!!e_,eU=eO&&!eC&&e_?e_:eE.body,ez=eE.title?(0,i.jsx)("h3",{className:(0,y.cn)("font-inter text-[15px] font-semibold leading-snug text-white",!eL&&"hover:text-main-green"),children:(0,g.S1)(eE.title,eD)}):null,eZ=(0,g.q7)(eE.displayLink);return(0,i.jsxs)("article",{className:(0,y.cn)(C.vv,"p-3 sm:p-4"),children:[(0,i.jsx)(N.Z,{name:eF,handle:eT,avatar:eM,timestamp:(0,j.U5)(eu.createdAtRaw),userSlug:(0,j.M8)(eP.slug,eP.user_slug,eP.username),badgeTier:eP.badgeTier||eP.badge_tier,flair:eP.flair,isFoundingMember:null!==(el=eP.isFoundingMember)&&void 0!==el?el:eP.is_founding_member,realmScore:null!==(es=eP.realmScore)&&void 0!==es?es:eP.realm_score,trailing:(0,i.jsx)(G,{post:eu,onEdit:eE.startEdit,onRemoved:ec})}),eE.editing?(0,i.jsx)(S,{editTitle:eE.editTitle,setEditTitle:eE.setEditTitle,editBody:eE.editBody,setEditBody:eE.setEditBody,editLink:eE.editLink,setEditLink:eE.setEditLink,editLoading:eE.editLoading,onCancel:eE.cancelEdit,onSave:eE.saveEdit}):(0,i.jsxs)(i.Fragment,{children:[eL?(0,i.jsxs)("div",{className:"mt-2.5",children:[ez,eE.body?(0,i.jsx)("p",{className:"mt-1.5 whitespace-pre-wrap font-inter text-[14px] leading-relaxed text-white/65",children:(0,g.S1)(eE.body,eD)}):null]}):(0,i.jsxs)("div",{className:"relative mt-2.5",children:[eE.title?(0,i.jsx)(l(),{href:eA,className:"block",onClick:function(){return(0,b.aI)(eu)},children:ez}):null,eE.body?(0,i.jsxs)("p",{className:"mt-1.5 whitespace-pre-wrap font-inter text-[14px] leading-relaxed text-white/65",children:[(0,i.jsx)(l(),{href:eA,className:"text-inherit no-underline",onClick:function(){return(0,b.aI)(eu)},children:(0,g.S1)(eU,{nestedInRouterLink:!0,renderMention:L.W})}),eO?(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsx)("button",{type:"button","aria-expanded":eC,className:j.vt,onClick:function(e){e.preventDefault(),e.stopPropagation(),ek(function(e){var n,t=!e;return t&&(null===(n=em.current)||void 0===n||n.expand({focusComposer:!1,scrollIntoView:!1})),t})},children:eC?"less":"... more"})]}):null]}):null,(0,i.jsx)("p",{ref:eh,className:"pointer-events-none invisible absolute inset-x-0 top-0 whitespace-pre-wrap font-inter text-[14px] leading-relaxed","aria-hidden":!0})]}),eZ?(0,i.jsxs)("a",{href:eZ,target:"_blank",rel:"noopener noreferrer",onClick:function(e){return e.stopPropagation()},className:"mt-2 inline-flex max-w-full items-center gap-1.5 truncate rounded-lg border border-[#1F1F1F] bg-[#050505] px-3 py-2 font-inter text-sm text-main-green transition hover:border-main-green/40 hover:bg-main-green/5",children:[(0,i.jsx)(s.a,{size:14,className:"shrink-0","aria-hidden":!0}),(0,i.jsx)("span",{className:"min-w-0 truncate",children:eE.displayLink}
1)]}):null]}),eI?(0,i.jsx)("div",{className:"mt-2.5 w-full",onClick:function(e){return e.stopPropagation()},children:(0,i.jsx)(u.Z,{video:eI,stalled:eS,wide:!0})}):(0,i.jsx)(k.Z,{src:eu.image,href:eL?null:eA}),Array.isArray(null==ew?void 0:ew.options)&&(null===(ei=ew.options)||void 0===ei?void 0:ei.length)?(0,i.jsx)("div",{onClick:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()},children:(0,i.jsx)(c.Z,{postId:String(eu.id),poll:ew,canInteract:!!ef,onPollUpdated:function(e){Array.isArray(null==e?void 0:e.options)&&ey(e)},className:"mt-3 px-0"})}):null,eE.editing?null:(0,i.jsxs)("div",{className:"mt-3 border-t border-[#1F1F1F] pt-3",children:[(0,i.jsx)(A,{post:eu,onCommentClick:function(){var e;return null===(e=em.current)||void 0===e?void 0:e.expand()}}),(0,i.jsx)(I.Z,{ref:em,attached:!0,kind:"messageboard",resourceId:eu.id,commentCount:Number(eu.replyCount)||0,seedComments:Array.isArray(eu.replies)?eu.replies:[],analyticsContentType:"post",analyticsContentId:eu.id,defaultExpanded:eL})]})]})}},58915:function(e,n,t){t.d(n,{Z:function(){return a}});var r=t(85893),i=t(70402),o=t(30748);function a(e){var n=e.children,t=e.className,a=e.rootRef,l=e.fillViewport,s=void 0!==l&&l,u=e.lockMobileViewport,c=void 0!==u&&u,d=e.embedded,m=void 0!==d&&d,h=m?"absolute inset-0":"fixed inset-0";return(0,r.jsxs)("div",{ref:a,className:(0,i.cn)("relative min-w-0 text-white",m&&"isolate",s?"flex flex-col lg:h-dvh lg:overflow-hidden":"min-h-screen",c&&"max-lg:fixed max-lg:inset-x-0 max-lg:bottom-0 max-lg:top-[calc(4rem+1px)] max-lg:overflow-hidden max-lg:overscroll-none",t),style:{backgroundColor:o.dV},children:[(0,r.jsx)("div",{className:(0,i.cn)("pointer-events-none z-0 bg-cover bg-center bg-no-repeat opacity-25",h),style:{backgroundColor:o.dV,backgroundImage:"url(/img/home/hero-background.png)"},"aria-hidden":!0}),(0,r.jsx)("div",{className:(0,i.cn)("pointer-events-none z-[1]",h),style:{background:"linear-gradient(to bottom, rgba(5,5,5,0.85), rgba(5,5,5,0.95) 40%, #050505)"},"aria-hidden":!0}),(0,r.jsx)("div",{className:(0,i.cn)("relative z-10 min-w-0",s&&"flex min-h-0 flex-1 flex-col lg:overflow-hidden",c&&"max-lg:h-full max-lg:overflow-hidden"),children:n})]})}},30748:function(e,n,t){t.d(n,{BA:function(){return m},Dt:function(){return f},Gi:function(){return c},OI:function(){return o},QD:function(){return l},Tn:function(){return p},WO:function(){return a},XL:function(){return s},Zu:function(){return x},ch:function(){return h},dV:function(){return r},p4:function(){return d},tS:function(){return u},vv:function(){return i}});var r="#050505",i="overflow-hidden rounded-2xl border border-[#1F1F1F] bg-[#0A0A0A]",o="rounded-2xl border border-[#1F1F1F] bg-[#0A0A0A]",a="w-full rounded-xl border border-[#1F1F1F] bg-[#050505] px-3 py-2 font-inter text-white placeholder:text-white/40 focus:border-main-green/40 focus:outline-none",l="cursor-pointer rounded-xl px-3 py-2 text-sm font-medium text-white/60 transition hover:bg-white/[0.06] hover:text-white disabled:cursor-not-allowed disabled:opacity-50",s="cursor-pointer rounded-xl border border-transparent bg-main-green px-4 py-2 text-sm font-semibold text-black transition hover:bg-main-green/90 disabled:cursor-not-allowed disabled:opacity-45",u="cursor-pointer rounded-xl border border-main-green bg-black px-4 py-2 text-sm font-semibold text-main-green transition hover:bg-main-green/10 disabled:cursor-not-allowed disabled:opacity-45",c="inline-flex items-center gap-2 font-inter text-sm font-medium text-white/70 transition hover:text-main-green",d="font-basement text-[1.45rem] font-black leading-none tracking-tight text-white sm:text-[1.75rem]",m="flex min-h-10 shrink-0 items-start",h="mt-1 font-inter text-xs leading-snug text-white/50 sm:text-sm",p="mb-4",f="rounded-2xl border border-[#1F1F1F] bg-[#0A0A0A] px-4 py-8 text-center font-inter text-sm text-white/55",x="h-52 animate-pulse rounded-2xl border border-[#1F1F1F] bg-[#0A0A0A]"},39990:function(e,n,t){t.d(n,{CS:function(){return s},FP:function(){return c},LZ:function(){return v},Mi:function(){return a},RY:function(){return h},Rp:function(){return d},SM:function(){return p},WR:function(){return u},Xq:function(){return l},Yt:function(){return f},aI:function(){return m},v1:function(){return x},zu:function(){return b}});var r=t(76341),i=t(45470);function o(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.eN)(e,(0,r._)({source:i.JV.THE_REALM},n))}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(i.dW.THE_REALM_VIEWED,e)}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o(i.dW.THE_REALM_TAB_CHANGED,{tab:e,previous_tab:n})}function s(e){o(i.dW.THE_REALM_CREATE_POST_CLICKED,{tab:null!=e?e:null})}function u(e){o(i.dW.THE_REALM_MAKE_PICKS_CLICKED,{tab:null!=e?e:null})}function c(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(i.dW.THE_REALM_POST_CREATED,{post_id:null!==(e=n.post_id)&&void 0!==e?e:null,has_poll:!!n.has_poll,has_image:!!n.has_image,has_video:!!n.has_video,has_link:!!n.has_link})}function d(e){var n,t;o(i.dW.THE_REALM_NEWS_CLICKED,{article_slug:null!==(n=null==e?void 0:e.slug)&&void 0!==n?n:null,article_title:null!==(t=null==e?void 0:e.title)&&void 0!==t?t:null})}function m(e){var n;o(i.dW.THE_REALM_POST_OPENED,{post_id:null!==(n=null==e?void 0:e.id)&&void 0!==n?n:null})}function h(e){o(i.dW.THE_REALM_POST_DETAIL_VIEWED,{post_id:null!=e?e:null})}function p(e){var n,t,r,a,l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(i.dW.THE_REALM_ENGAGED,{action:e,content_type:null!==(n=s.content_type)&&void 0!==n?n:null,post_id:null!==(t=s.post_id)&&void 0!==t?t:null,article_slug:null!==(r=s.article_slug)&&void 0!==r?r:null,emoji:null!==(a=s.emoji)&&void 0!==a?a:null,share_channel:null!==(l=s.share_channel)&&void 0!==l?l:null})}function f(e){o(i.dW.THE_REALM_POST_EDITED,{post_id:null!=e?e:null})}function x(e){o(i.dW.THE_REALM_POST_REMOVED,{post_id:null!=e?e:null})}function v(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;o(i.dW.THE_REALM_POST_REPORTED,{post_id:null!=e?e:null,reason:null!=n?n:null})}function b(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown";o(i.dW.THE_REALM_AUTH_PROMPTED,{intent:e,surface:n}
1)}},51414:function(e,n,t){function r(){window.dispatchEvent(new Event("auth:required"))}function i(){window.dispatchEvent(new Event("auth:signup"))}function o(e){return!!e||(r(),!1)}t.d(n,{Mo:function(){return r},g_:function(){return o},it:function(){return i}})}}]);
2//# sourceMappingURL=1476-1a7d5ee2550d891a.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.