PageSourceSearch

https://www.fantasymmadness.com/_next/static/chunks/pages/pro-wrestling/play/[matchId]-7d7c4b5e79a72c8e.js

js fantasymmadness.com collected 2026-10-05 03:47:55 UTC 11,324 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6975],{38284:(e,s,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/pro-wrestling/play/[matchId]",function(){return i(89975)}])},89975:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>u});var t=i(37876),r=i(14232),n=i(77328),a=i.n(n),l=i(48230),c=i.n(l),d=i(89099),o=i(31777),h=i(13734),p=i(15041),m=i(60656),x=i(95001);let j=e=>({...x.mL,...(0,x.yd)(e)}),u=()=>{let e=(0,d.useRouter)(),{matchId:s}=e.query,i=(0,o.d4)(e=>!!e.auth?.isAuthenticated),n=(0,o.d4)(e=>e.user),[l,u]=(0,r.useState)(null),[w,b]=(0,r.useState)(null),[g,v]=(0,r.useState)(null),[y,N]=(0,r.useState)(j()),[f,S]=(0,r.useState)(j()),[k,T]=(0,r.useState)(""),[A,R]=(0,r.useState)(""),[C,B]=(0,r.useState)(""),[M,P]=(0,r.useState)(!0),[E,F]=(0,r.useState)(""),[I,D]=(0,r.useState)("");(0,r.useEffect)(()=>{if(!e.isReady||!s)return;if(!i)return void P(!1);let t=!0;return(async()=>{P(!0),D("");try{let[e,i]=await Promise.all([(0,x.R0)(`/api/wrestling/matches/${s}`),(0,x.R0)(`/api/wrestling/matches/${s}/my-entry`,{auth:!0})]);if(!t)return;u(e),b(i?.entry||null);let r=i?.prediction||null;v(r),r&&(N(j(r.competitorA)),S(j(r.competitorB)),T(r.winnerPrediction||""),R(r.finishTypePrediction||""),B(r.matchTimeRangePrediction||""))}catch(e){console.error(e),t&&D(e.message||"The wrestling prediction card could not be loaded.")}finally{t&&P(!1)}})(),()=>{t=!1}},[i,s,e.isReady]);let _=(e,s,i)=>{let t=Math.max(0,Math.round(Number(i)||0));"A"===e?N(e=>({...e,[s]:t})):S(e=>({...e,[s]:t}))},$=async i=>{if(!k)return void h.oR.error("Select a predicted match winner before saving the scorecard.");if("DRAFT"!==i&&!A)return void h.oR.error("Select how you expect the match to finish.");if("DRAFT"!==i&&!C)return void h.oR.error("Select a non-overlapping match time range.");F(i);try{let t=await (0,x.R0)(`/api/wrestling/matches/${s}/prediction`,{auth:!0,method:g?"PUT":"POST",body:{competitorA:y,competitorB:f,winnerPrediction:k,finishTypePrediction:A,matchTimeRangePrediction:C,predictionStatus:i}});v(t?.prediction||g),h.oR.success("DRAFT"===i?"Wrestling prediction draft saved.":"Wrestling prediction submitted."),"DRAFT"!==i&&e.push(`/pro-wrestling/matches/${s}`)}catch(e){h.oR.error(e.message||"The wrestling scorecard could not be saved.")}finally{F("")}},H=(0,r.useMemo)(()=>x.K0.reduce((e,s)=>e+Number(y[s.key]||0)+Number(f[s.key]||0),0),[y,f]);if(!i)return(0,t.jsx)("div",{className:"pw-page pw-state-page",children:(0,t.jsxs)("div",{className:"pw-state-card",children:[(0,t.jsx)(p.SMR,{}),(0,t.jsx)("h1",{children:"Player login required"}),(0,t.jsx)("p",{children:"Sign in with your Fantasy MMAdness player account to enter and edit a Pro Wrestling scorecard."}),(0,t.jsxs)(c(),{href:`/auth?mode=login&role=player&next=${encodeURIComponent(e.asPath)}`,className:"pw-btn pw-btn-primary",children:["Player login ",(0,t.jsx)(p.Z0P,{})]})]})});if(M)return(0,t.jsx)("div",{className:"pw-page pw-state-page",children:(0,t.jsxs)("div",{className:"pw-state-card",children:[(0,t.jsx)(p.lHQ,{}),(0,t.jsx)("h1",{children:"Loading your scorecard…"})]})});if(I||!l||!w)return(0,t.jsx)("div",{className:"pw-page pw-state-page",children:(0,t.jsxs)("div",{className:"pw-state-card",children:[(0,t.jsx)(p.BS8,{}),(0,t.jsx)("h1",{children:"Prediction card unavailable"}),(0,t.jsx)("p",{children:I||"Join the wrestling contest before making predictions."}),(0,t.jsxs)(c(),{href:`/pro-wrestling/matches/${s}`,className:"pw-btn pw-btn-secondary",children:["Return to contest ",(0,t.jsx)(p.Z0P,{})]})]})});let O=(0,x.nH)(l)&&["JOINED","PREDICTION_SUBMITTED"].includes(w.status);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a(),{children:(0,t.jsxs)("title",{children:["Make Wrestling Predictions | ",l.matchTitle]})}),(0,t.jsxs)("div",{className:"pw-page pw-prediction-page",children:[(0,t.jsx)("section",{className:"pw-prediction-hero",children:(0,t.jsxs)("div",{className:"theme-container pw-prediction-hero-inner",children:[(0,t.jsxs)(c(),{href:`/pro-wrestling/matches/${l._id}`,className:"pw-inline-back",children:[(0,t.jsx)(p.QVr,{})," Contest overview"]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"pw-eyebrow",children:[(0,t.jsx)(p.SBv,{})," Full-match prediction card"]}),(0,t.jsxs)("h1",{children:["Call every move. ",(0,t.jsx)("span",{children:"Own the result."})]}),(0,t.jsxs)("p",{children:[l.matchTitle," \xb7 ",(0,x.nh)(l.matchDate)]})]}),(0,t.jsxs)("aside",{children:[(0,t.jsx)(m.VY,{status:l.status}),(0,t.jsxs)("span",{children:[(0,t.jsx)(p.JhU,{})," ",(0,x.KS)(l.lockAt)]}),(0,t.jsxs)("strong",{children:[n.tokens||0," FM COINS"]})]})]})}),(0,t.jsx)(m.Cu,{active:"contests"}),(0,t.jsxs)("main",{className:"theme-container pw-main pw-prediction-main",children:[!O&&(0,t.jsxs)("div",{className:"pw-lock-alert",children:[(0,t.jsx)(p.JhU,{}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"This scorecard is locked."}),(0,t.jsx)("small",{children:"You can review the submitted values, but the backend no longer accepts edits for this contest."})]})]}),(0,t.jsxs)("section",{className:"pw-prediction-board",children:[(0,t.jsxs)("header",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Prediction status"}),(0,t.jsx)("strong",{children:g?.predictionStatus||"New scorecard"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Total predicted actions"}),(0,t.jsx)("strong",{children:H})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:"Entry fee committed"}),(0,t.jsxs)("strong",{children:[w.entryFeeTokens," FM COINS"]})]})]}),(0,t.jsxs)("div",{className:"pw-prediction-competitors",children:[(0,t.jsxs)("article",{className:"is-a",children:[(0,t.jsx)("img",{src:(0,x.IG)(l.competitorA,"A"),alt:l.competitorA.displayName}),(0,t.jsxs)("span",{children:[(0,t.jsx)("small",{children:"Competitor A"}),(0,t.jsx)("strong",{children:l.competitorA.displayName}),(0,t.jsx)("em",{children:l.competitorA.promotion||l.promotionName})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("small",{children:l.matchFormat?.replaceAll?.("_"," ")}),(0,t.jsx)("b",{children:"VS"}),(0,t.jsx)("em",{children:"Predict full-match totals"})]}),(0,t.jsxs)("article",{className:"is-b",children:[(0,t.jsx)("img",{src:(0,x.IG)(l.competitorB,"B"),alt:l.competitorB.displayName}),(0,t.jsxs)("span",{children:[(0,t.jsx)("small",{children:"Competitor B"}),(0,t.jsx)("strong",{children:l.competitorB.displayName}),(0,t.jsx)("em",{children:l.competitorB.promotion||l.promotionName})]})]})]}),(0,t.jsxs)("div",{className:"pw-stat-table",role:"table","aria-label":"Pro Wrestling prediction inputs",children:[(0,t.jsxs)("div",{className:"pw-stat-table-head",role:"row",children:[(0,t.jsx)("span",{children:l.competitorA.displayName}),(0,t.jsx)("strong",{children:"Action category"}),(0,t.jsx)("span",{children:l.competitorB.displayName})]}),x.K0.map(e=>(0,t.jsxs)("div",{className:"pw-stat-input-row",role:"row",children:[(0,t.jsxs)("label",{children:[(0,t.jsx)("small",{children:e.short}),(0,t.jsx)("input",{type:"number",min:"0",step:"1",value:y[e.key],disabled:!O,onChange:s=>_("A",e.key,s.target.value),"aria-label":`${l.competitorA.displayName} ${e.label}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:e.label}),(0,t.jsx)("span",{children:e.short}),(0,t.jsx)("p",{children:e.description})]}),(0,t.jsxs)("label",{children:[(0,t.jsx)("small",{children:e.short}),(0,t.jsx)("input",{type:"number",min:"0",step:"1",value:f[e.key],disabled:!O,onChange:s=>_("B",e.key,s.target.value),"aria-label":`${l.competitorB.displayName} ${e.label}`})]})]},e.key))]}),(0,t.jsxs)("section",{className:"pw-winner-pick",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"pw-eyebrow",children:[(0,t.jsx)(p.SBv,{})," Headline prediction"]}),(0,t.jsx)("h2",{children:"Who wins the match?"}),(0,t.jsx)("span",{children:"The correct official winner receives the finalized 100-point winner bonus."})]}),(0,t.jsx)("div",{className:"pw-winner-options",children:[["A",l.competitorA.displayName,(0,x.IG)(l.competitorA,"A")],["B",l.competitorB.displayName,(0,x.IG)(l.competitorB,"B")]].map(([e,s,i])=>(0,t.jsxs)("button",{type:"button",className:k===e?"is-selected":"",disabled:!O,onClick:()=>T(e),children:[i?(0,t.jsx)("img",{src:i,alt:""}):(0,t.jsx)(p.SBv,{}),(0,t.jsxs)("span",{children:[(0,t.jsx)("small",{children:`Wrestler ${e}`}),(0,t.jsx)("strong",{children:s})]}),k===e&&(0,t.jsx)(p.CMH,{})]},e))})]}),(0,t.jsxs)("section",{className:"pw-outcome-picks",children:[(0,t.jsxs)("div",{className:"pw-outcome-pick-card",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"pw-eyebrow",children:[(0,t.jsx)(p.lHQ,{})," Finish prediction"]}),(0,t.jsx)("h2",{children:"How will the match end?"}),(0,t.jsx)("span",{children:"Choose one official finish type. This pick is locked when the match starts."})]}),(0,t.jsx)("div",{className:"pw-outcome-options",children:x.OQ.map(e=>(0,t.jsxs)("button",{type:"button",className:A===e.value?"is-selected":"",disabled:!O,onClick:()=>R(e.value),children:[(0,t.jsxs)("span",{children:[(0,t.jsx)("small",{children:"Finish type"}),(0,t.jsx)("strong",{children:e.label})]}),A===e.value&&(0,t.jsx)(p.CMH,{})]},e.value))})]}),(0,t.jsxs)("div",{className:"pw-outcome-pick-card",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"pw-eyebrow",children:[(0,t.jsx)(p.lHQ,{})," Match time range"]}),(0,t.jsx)("h2",{children:"When will the match finish?"}),(0,t.jsx)("span",{children:"Ranges never overlap, so the official duration always maps to exactly one selection."})]}),(0,t.jsx)("div",{className:"pw-time-range-options",children:x.FD.map(e=>(0,t.jsxs)("button",{type:"button",className:C===e.value?"is-selected":"",disabled:!O,onClick:()=>B(e.value),children:[(0,t.jsx)("small",{children:"Match duration"}),(0,t.jsx)("strong",{children:e.label}),C===e.value&&(0,t.jsx)(p.CMH,{})]},e.value))})]})]}),(0,t.jsxs)("footer",{className:"pw-prediction-actions",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(p.SMR,{}),(0,t.jsxs)("span",{children:[(0,t.jsx)("strong",{children:"Server-enforced lock"}),(0,t.jsx)("small",{children:"Saving in the browser cannot bypass the contest lock time."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("button",{type:"button",className:"pw-btn pw-btn-secondary",disabled:!O||!!E,onClick:()=>$("DRAFT"),children:[(0,t.jsx)(p.dIn,{})," ","DRAFT"===E?"Saving…":"Save draft"]}),(0,t.jsxs)("button",{type:"button",className:"pw-btn pw-btn-primary",disabled:!O||!!E,onClick:()=>$("SUBMITTED"),children:[(0,t.jsx)(p.CMH,{})," ","SUBMITTED"===E?"Submitting…":g?.predictionStatus==="SUBMITTED"?"Update submitted card":"Submit predictions"]})]})]})]}),(0,t.jsxs)("section",{className:"pw-prediction-help",children:[(0,t.jsx)("img",{src:"/images/pro-wrestling/prediction-mockup.webp",alt:"Fantasy MMAdness wrestling scorecard visual"}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"pw-eyebrow",children:[(0,t.jsx)(p.cEG,{})," Scoring mindset"]}),(0,t.jsx)("h2",{children:"Accuracy beats volume."}),(0,t.jsx)("p",{children:"Do not simply enter the highest possible numbers. Exact values earn the strongest multiplier, with reduced credit as the prediction moves farther from the official total."}),(0,t.jsxs)(c(),{href:"/pro-wrestling/how-to-play",children:["Review category weights and tie-breaks ",(0,t.jsx)(p.Z0P,{})]})]})]})]})]})]})}}},e=>{e.O(0,[656,636,6593,8792],()=>e(e.s=38284)),_N_E=e.O()}]);

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.