PageSourceSearch

https://winscore.ai/_next/static/chunks/01j_th9hmhp-1.js

js winscore.ai collected 2026-10-05 14:01:03 UTC 27,338 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,44690,e=>{"use strict";e.s(["currentNext",0,function(e){return`${e.pathname}${e.search}`||"/"},"safeNext",0,function(e){if(!e)return"/";let s=e;try{s=decodeURIComponent(e)}catch{return"/"}return s.split("").some(e=>32>e.charCodeAt(0)||127===e.charCodeAt(0))||"/"!==s[0]||"/"===s[1]||"\\"===s[1]?"/":s}])},13979,e=>{e.v({busy:"FavoriteButton-module__cpS7pW__busy",fav:"FavoriteButton-module__cpS7pW__fav",favspin:"FavoriteButton-module__cpS7pW__favspin",follow:"FavoriteButton-module__cpS7pW__follow",on:"FavoriteButton-module__cpS7pW__on",pop:"FavoriteButton-module__cpS7pW__pop",popAct:"FavoriteButton-module__cpS7pW__popAct",popEnter:"FavoriteButton-module__cpS7pW__popEnter",popGhost:"FavoriteButton-module__cpS7pW__popGhost",popPrimary:"FavoriteButton-module__cpS7pW__popPrimary",popS:"FavoriteButton-module__cpS7pW__popS",popShow:"FavoriteButton-module__cpS7pW__popShow",popT:"FavoriteButton-module__cpS7pW__popT",sm:"FavoriteButton-module__cpS7pW__sm"})},69356,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(74080),n=e.i(48148),a=e.i(59942),i=e.i(44690);e.i(50711);var o=e.i(82045),l=e.i(1013),c=e.i(34870),u=e.i(13979);function d(){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M12 3l2.6 5.6 6 .8-4.4 4.2 1.1 6L12 17l-5.3 2.6 1.1-6L3.4 9.4l6-.8z"})})}function m({anchor:e,onClose:i,next:o,type:l}){let c=(0,t.useRef)(null),[h,p]=(0,t.useState)(!1),f=(0,n.useTranslations)("favoris.invite");return(0,t.useEffect)(()=>{let e=requestAnimationFrame(()=>p(!0));return()=>cancelAnimationFrame(e)},[]),(0,t.useEffect)(()=>{function e(e){c.current&&!c.current.contains(e.target)&&i()}function s(e){"Escape"===e.key&&i()}let t=window.setTimeout(()=>{document.addEventListener("click",e),document.addEventListener("keydown",s)},0);return()=>{window.clearTimeout(t),document.removeEventListener("click",e),document.removeEventListener("keydown",s)}},[i]),(0,r.createPortal)((0,s.jsxs)("div",{ref:c,className:`${u.default.pop} ${h?u.default.popShow:u.default.popEnter}`,style:{top:e.top,left:e.left},role:"dialog","aria-label":f("aria"),children:[(0,s.jsxs)("div",{className:u.default.popT,children:[(0,s.jsx)(d,{})," ",f("titre",{type:l})]}),(0,s.jsx)("div",{className:u.default.popS,children:f("sous")}),(0,s.jsxs)("div",{className:u.default.popAct,children:[(0,s.jsx)(a.default,{href:`/login?next=${encodeURIComponent(o)}`,className:u.default.popPrimary,children:f("seConnecter")}),(0,s.jsx)(a.default,{href:`/register?next=${encodeURIComponent(o)}`,className:u.default.popGhost,children:f("creerCompte")})]})]}),document.body)}e.s(["default",0,function({type:e,referenceId:r,variant:a="star",size:h,className:p,onToggled:f}){let{isFavorite:x,busy:v,canFavorite:j,toggle:g}=function(e,s){let{user:r,isAuthenticated:n,isLoading:a}=(0,c.useCurrentUser)(),[i,u]=(0,t.useState)(!1),d=!a&&n&&!!r,m=(0,o.useQuery)(l.api.favorites.getFavorites,d?{userId:String(r._id)}:"skip"),h=(0,o.useMutation)(l.api.favorites.addFavorite),p=(0,o.useMutation)(l.api.favorites.removeFavorite),f=(0,t.useMemo)(()=>null!==s&&(m??[]).some(t=>t.type===e&&t.referenceId===s),[m,e,s]),x=(0,t.useCallback)(async()=>{if(!d||!s)return{ok:!1,reason:"not_authenticated"};u(!0);try{let t={userId:String(r._id),type:e,referenceId:s};return f?await p(t):await h(t),{ok:!0,added:!f}}catch{return{ok:!1,reason:"error"}}finally{u(!1)}},[d,s,r,e,f,h,p]);return{isFavorite:f,busy:i,canFavorite:d,authLoading:a,toggle:x}}(e,r),b=(0,n.useTranslations)("favoris.bouton"),[y,N]=(0,t.useState)(null),[k,_]=(0,t.useState)("/"),w=(0,t.useCallback)(async e=>{if(e.preventDefault(),e.stopPropagation(),!j){_((0,i.currentNext)(window.location));let s=e.currentTarget.getBoundingClientRect();N({top:s.bottom+8,left:Math.max(12,Math.min(s.right-280,window.innerWidth-292))});return}let s=await g();s.ok&&f?.(s.added)},[j,g,f]),S=j&&x,C=b(S?"match"===e?"retirer":"nePlusSuivre":"match"===e?"ajouter":"suivre"),L=["follow"===a?u.default.follow:u.default.fav,"sm"===h?u.default.sm:"",S?u.default.on:"",v?u.default.busy:"",p??""].filter(
1Boolean).join(" ");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{type:"button",className:L,onClick:w,"aria-label":"follow"===a?void 0:C,"aria-pressed":S,title:C,children:[(0,s.jsx)(d,{}),"follow"===a&&(0,s.jsx)("span",{children:b(S?"suivi":"suivre")})]}),y&&(0,s.jsx)(m,{anchor:y,onClose:()=>N(null),next:k,type:e})]})}],69356)},88921,e=>{"use strict";var s=e.i(71645),t=e.i(68080);e.s(["onDemandErrorMessage",0,function(e){if(e.message)return e.message;switch(e.reason){case"early_access":return"Analyse réservée aux abonnés Pro et Elite pour l'instant.";case"insufficient_data":return"Données insuffisantes pour ce match. Aucun crédit n'a été débité.";case"generation_failed":return"Analyse temporairement indisponible (notre modèle est momentanément surchargé). Réessaie dans un instant — tes crédits t'ont été remboursés.";case"no_credits":return"Crédits insuffisants. Gagnez-en dans Mon Compte.";case"not_authenticated":return"Vous devez être connecté.";case"already_played":return"Ce match est déjà joué — son analyse n'est plus disponible à la génération.";default:return"Une erreur est survenue. Aucun crédit n'a été débité."}},"useOnDemandUnlock",0,function(){let[e,r]=(0,s.useState)("idle");return{phase:e,unlockOnDemand:(0,s.useCallback)(async e=>{r("generating"),(0,t.devLog)(`[OnDemand:front] matchId=${e} — d\xe9blocage + g\xe9n\xe9ration demand\xe9s`);try{let s=await fetch(`/api/predictions/${e}/unlock`,{method:"POST"}),r=await s.json().catch(()=>({}));if(s.ok&&r.success)return(0,t.devLog)(`[OnDemand:front] matchId=${e} — livr\xe9 (generated=${r.generated??!1})`),{success:!0,generated:!!r.generated};let n="not_authenticated"===r.error||"no_credits"===r.error||"early_access"===r.error||"insufficient_data"===r.error||"generation_failed"===r.error||"generation_in_progress"===r.error||"already_played"===r.error?r.error:"error";return(0,t.devWarn)(`[OnDemand:front] matchId=${e} — \xe9chec : ${n}`),{success:!1,reason:n,message:r.message}}catch{return(0,t.devWarn)(`[OnDemand:front] matchId=${e} — erreur r\xe9seau`),{success:!1,reason:"error"}}finally{r("idle")}},[])}}])},91946,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(48148),n=e.i(24121),a=e.i(23868);let i=()=>()=>{};e.s(["default",0,function({className:e}){let o=(0,r.useTranslations)("ui"),l=(0,n.useUserTimezone)();return(0,t.useSyncExternalStore)(i,()=>!0,()=>!1)?(0,s.jsx)("span",{className:e,children:o("heuresAffichees",{lieu:(0,a.timezoneLabel)(l)})}):null}])},98023,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(48148);e.i(59942);var n=e.i(84967);e.i(50711);var a=e.i(82045),i=e.i(1013),o=e.i(76880);let l=[{key:"20",labelKey:"seg20"},{key:"30",labelKey:"seg30"},{key:"50",labelKey:"seg50"},{key:"lite_free",labelKey:"segLite"}],c={20:45,30:135,50:225,lite_free:315};e.s(["default",0,function({onClose:e}){let u=(0,r.useTranslations)("offre"),d=(0,n.useRouter)(),m=(0,a.useMutation)(i.api.offers.spinRoulette),[h,p]=(0,t.useState)(!1),[f,x]=(0,t.useState)(0),[v,j]=(0,t.useState)(null),[g,b]=(0,t.useState)(null),y=(0,t.useRef)(null),N=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]),(0,t.useEffect)(()=>{N.current?.focus()},[]),(0,t.useEffect)(()=>{let s=s=>{"Escape"!==s.key||h||e()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[h,e]);let k=async()=>{if(!h&&!v){p(!0),b(null);try{let e=await m({});if(!e.success){b("already_spun"===e.reason?"roue.erreurDejaJoue":"already_subscribed"===e.reason?"roue.erreurAbonne":"roue.erreurIndispo"),p(!1);return}let s=1440+(360-c[e.couponKey]);x(s);let t=window.matchMedia("(prefers-reduced-motion: reduce)").matches;y.current=setTimeout(()=>{j({serverLabel:e.label,expiresAt:e.expiresAt,couponKey:e.couponKey}),p(!1)},t?200:3200)}catch{b("roue.erreurGenerique"),p(!1)}}};return(0,s.jsx)("div",{className:"rb-overlay",onClick:s=>{s.target!==s.currentTarget||h||e()},children:(0,s.jsxs)("div",{className:"rb-card",role:"dialog","aria-modal":"true","aria-label":u("roue.aria"),children:[(0,s.jsx)("button",{className:"rb-close",onClick:e,"aria-label":u("roue.fermer"),disabled:h,children:"✕"}),(0,s.jsx)("h3",{children:u("roue.titre")}),(0,s.jsx)("p",{className:"rb-sub",children:u("roue.sous")}),(0,s.jsxs)("div",{className:"rb-wheel-zone","aria-hidden":"true",children:[(0,s.jsx)("div",{className:"rb-pointer"}),(0,s.jsx)("div",{className:"rb-wheel",style:{transform:`rotate(${f}deg)`},children:l.map((e,t)=>(0,s.jsx)("span",{className:"rb-seg",style:{transform:`rotate(${45+90*t}deg)`},children:u(`roue.${e.labelKey}`)},e.key))})]}),v?(0,s.jsxs)("div",{className:"rb-result",role:"status",children:[(0,s.jsx)("div",{className:"rb-won",children:(0,o.offerLabel)(v.couponKey,u,v.serverLabel)}),(0,s.jsx)("p",{children:u("lite_free"===v.couponKey?"roue.detailLite":"roue.detail",{reste:(0,o.remainingLabel)(v.expiresAt,u)})}),(0,s.jsx)("button",{type:"button",className:"rb-cta",onClick:()=>{e(),d.push("/tarifs/abonnements")},children:u("roue.voirOffres")})]}):(0,s.jsxs)(s.Fragment,{children:[g&&(0,s.jsx)("p",{className:"rb-error",role:"alert",children:u(g)}
1),(0,s.jsx)("button",{type:"button",className:"rb-cta",ref:N,onClick:k,disabled:h,children:h?u("roue.enCours"):u("roue.tourner")})]})]})})}])},76880,e=>{"use strict";let s={20:"remise20",30:"remise30",50:"remise50",lite_free:"liteOfferte"};e.s(["offerLabel",0,function(e,t,r){let n=s[e];return n?t(n):r},"remainingLabel",0,function(e,s){let t=Math.max(0,e-Date.now()),r=Math.floor(t/36e5);return r>=48?s("resteJours",{n:Math.floor(r/24)}):r>=1?s("resteHeures",{n:r}):s("resteMinutes",{n:Math.max(1,Math.floor(t/6e4))})}])},20833,e=>{"use strict";var s=e.i(43476),t=e.i(57688),r=e.i(48148),n=e.i(55995),a=e.i(59942);e.i(50711);var i=e.i(82045),o=e.i(1013),l=e.i(34870),c=e.i(76880);e.s(["default",0,function({onNavigate:e,onChoice:u}){let d=(0,r.useTranslations)("tarifs.choix"),m=(0,r.useTranslations)("offre"),{user:h}=(0,l.useCurrentUser)(),p=(0,i.useQuery)(o.api.offers.getMyActiveOffer,h?{}:"skip"),f=!!p&&p.expiresAt>Date.now();return(0,s.jsxs)("div",{className:"tf-choice",children:[(0,s.jsxs)(a.default,{href:"/tarifs/abonnements",className:"tf-choice-card",onClick:()=>{u?.("carte"),e?.()},children:[(0,s.jsx)("strong",{children:d("carte")}),(0,s.jsx)("span",{className:"tf-choice-sub",children:f?d.rich("carteOffre",{offre:(0,c.offerLabel)(p.couponKey,m,p.label),b:e=>(0,s.jsx)("b",{children:e})}):d("carteSous")}),(0,s.jsx)("span",{className:"tf-choice-logos",children:(0,s.jsx)(t.default,{src:"/payments/cartes.png",alt:d("cartesAlt"),width:720,height:149,unoptimized:(0,n.skipImageOptimizer)("/payments/cartes.png")})})]}),(0,s.jsxs)(a.default,{href:"/tarifs/mobile-money",className:"tf-choice-card",onClick:()=>{u?.("momo"),e?.()},children:[(0,s.jsx)("strong",{children:d("momo")}),(0,s.jsx)("span",{className:"tf-choice-sub",children:d("momoSous")}),(0,s.jsx)("span",{className:"tf-choice-logos tf-choice-logos-momo",children:(0,s.jsx)(t.default,{src:"/payments/momo-operateurs.png",alt:d("momoAlt"),width:880,height:144,unoptimized:(0,n.skipImageOptimizer)("/payments/momo-operateurs.png")})})]})]})}])},44602,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(48148),n=e.i(59942);e.i(50711);var a=e.i(82045),i=e.i(1013),o=e.i(20833),l=e.i(98023);e.s(["default",0,function({origine:e,onClose:c}){let u=(0,r.useTranslations)("tarifs.recharge"),[d,m]=(0,t.useState)(!1),h=(0,a.useMutation)(i.api.funnel.record),p=(0,t.useRef)(!1);(0,t.useEffect)(()=>{p.current||(p.current=!0,h({kind:"recharge_shown",meta:e}).catch(()=>{}))},[]);let f=Number.parseInt((0,a.useQuery)(i.api.settings.getSetting,{key:"credits_referral"})??"",10)||15,x=(0,a.useQuery)(i.api.offers.getRouletteState);return d?(0,s.jsx)(l.default,{onClose:c}):(0,s.jsx)("div",{className:"wsx",children:(0,s.jsx)("div",{className:"tf-rm-overlay",onClick:e=>{e.target===e.currentTarget&&c()},children:(0,s.jsxs)("div",{className:"tf-rm-card",role:"dialog","aria-modal":"true","aria-label":u("aria"),children:[(0,s.jsx)("button",{type:"button",className:"tf-rm-close",onClick:c,"aria-label":u("fermer"),children:"✕"}),(0,s.jsx)("h3",{className:"tf-rm-title",children:u("titre")}),(0,s.jsx)("p",{className:"tf-rm-sub",children:u("sous")}),(0,s.jsx)(o.default,{onNavigate:c,onChoice:s=>{h({kind:"recharge_choice",meta:`${e}:${s}`}).catch(()=>{})}}),(0,s.jsxs)("div",{className:"tf-rm-alt",children:[(0,s.jsx)(n.default,{href:"/compte/parrainage",onClick:c,children:u("parrainer",{credits:f})}),x?.eligible&&(0,s.jsx)("button",{type:"button",onClick:()=>m(!0),children:u("roue")})]})]})})})}])},1485,e=>{"use strict";var s=e.i(43476),t=e.i(71645),r=e.i(61745),n=e.i(48148),a=e.i(57688),i=e.i(55995),o=e.i(59942),l=e.i(84967);e.i(50711);var c=e.i(82045),u=e.i(1013),d=e.i(34870),m=e.i(39118),h=e.i(52704),p=e.i(76626),f=e.i(88921),x=e.i(81597),v=e.i(44602),j=e.i(89136),g=e.i(72236),b=e.i(69356),y=e.i(74318),N=e.i(97538),k=e.i(68080),_=e.i(70271),w=e.i(23868),S=e.i(67130),C=e.i(24121),L=e.i(91946),M=e.i(68583),T=e.i(71786),$=e.i(63977),F=e.i(93454);let E=()=>(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2.6"})]}),I=()=>(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.6",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M6 6l12 12M18 6 6 18"})}),P=()=>(0,s.jsx)("svg",{className:"pr-chev",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M9 6l6 6-6 6"})}),B=()=>(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,s.jsx)("path",{d:"M21 21l-4.3-4.3"})]}),W=()=>(0,s.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,s.jsx)("path",{d:"M12 7v10M9.5 9.5h4a1.8 1.8 0 0 1 0 3.6h-3a1.8 1.8 0 0 0 0 3.6h4"})]}),A=()=>(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.9",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M13 2 4 14h7l-1 8 9-12h-7l1-8z"})}),D=M.pickLabel;function O(e){return(0,g.isLiveStatus)(e.status)?"live":(0,g.isFinishedStatus)(e.status)?"finished":(0,g.isOffStatus)(e.status)?"off":"upcoming"}function z({team:e,cls:r}){let[n,i]=(0,t.useState)(!1),o=(0,N.crestFor)(e.name,e.logo);return o&&!n?(0,s.jsx)("span",{className:`crest ${r??""}`,children:(0,s.jsx)(a.default,{src:o.src,alt:"",width:24,height:24,style:o.style,unoptimized:o.unoptimized,onError:()=>i(!0)})}):(0,s.jsx)("span",{className:`crest mono ${r??""}`,children:e.name.slice(0,2)})}function U({match:e,isUnlocked:a,isUnlocking:i,isGenerating:c,hasPrediction:u,predsLoading:d,isAuthenticated:m,geminiPick:h,band:p,costKey:f,costMinor:x,onView:v,onNoPrediction:N}){var k,_;let L=(0,n.useTranslations)("predictions"),M=(0,n.useTranslations)("pronostic"),T=(0,S.resolveLocale)((0,r.useLocale)()),$=(0,l.useRouter)(),F=(0,C.useUserTimezone)(),[I,B]=(0,t.useState)(null),W=(0,y.teamLabel)(e.homeTeam.name,T),A=(0,y.teamLabel)(e.awayTeam.name,T),R=O(e),K="live"===R,G="off"===R,Q=null!=e.score.home&&null!=e.score.away,V=`/match/${(0,j.matchSlug)(W,A,e.date,e.id)}`;(0,t.useEffect)(()=>
1{if(!a||I)return;let s=!0;return fetch(`/api/predictions/${e.id}`).then(e=>e.json()).then(t=>{if(!s)return;let r=t.data?.predictions??[];r.length>0?B(function(e,s,t,r){let n={};for(let s of e)n[s.result]=(n[s.result]??0)+1;let[[a]]=Object.entries(n).sort((e,s)=>s[1]-e[1]),i=e.map(e=>e.confidence).filter(e=>Number.isFinite(e)),o=i.length?Math.round(i.reduce((e,s)=>e+s,0)/i.length):null;return{verdict:D(a,s,t,r),confidence:o}}(r,W,A,M)):N(String(e.id))}).catch(()=>{s&&N(String(e.id))}),()=>{s=!1}},[a,e.id,W,A,I,N]);let q=Q&&(e.score.home??0)>(e.score.away??0),J=Q&&(e.score.away??0)>(e.score.home??0),H=(e,t,r)=>(0,s.jsxs)("div",{className:`pr-team ${t?"lead":""}`,children:[(0,s.jsx)(z,{team:e}),(0,s.jsx)("span",{className:"nm",children:(0,y.teamLabel)(e.name,T)}),Q&&(0,s.jsx)("span",{className:"sc",children:r})]});return(0,s.jsxs)("div",{className:"prow",role:"link",tabIndex:0,onClick:()=>$.push(V),onKeyDown:e=>{"Enter"===e.key&&$.push(V)},children:[(0,s.jsxs)("div",{className:`pr-time ${K?"live":""}`,children:[(0,s.jsx)("div",{className:"t",children:(k=e.date,_=e.status,(0,g.isLiveStatus)(_)?"LIVE":"FT"===_?"FT":(0,g.isOffStatus)(_)?L("PST"===_?"reporte":"annule"):(0,w.formatKickoffTime)(k,F,T))}),K&&(0,s.jsxs)("div",{className:"lp",children:[(0,s.jsx)("span",{className:"d"}),"Live"]})]}),(0,s.jsxs)(o.default,{className:"pr-teams",href:V,onClick:e=>e.stopPropagation(),children:[H(e.homeTeam,q,e.score.home),H(e.awayTeam,J,e.score.away)]}),(0,s.jsx)("div",{className:"pr-pred",children:(()=>{if(a)return I?(0,s.jsxs)("div",{className:"pred-open",children:[(0,s.jsxs)("div",{className:"pv",children:[(0,s.jsx)("div",{className:"pl",children:K?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"live-i",children:"●"})," ",L("enDirect")]}):L("verdictWinscore")}),(0,s.jsx)("div",{className:"pt",children:I.verdict})]}),null!==I.confidence&&(0,s.jsxs)("div",{className:"pc",children:[I.confidence,(0,s.jsx)("span",{children:"%"})]})]}):(0,s.jsx)("div",{className:"pred-open",children:(0,s.jsx)("div",{className:"pv",children:(0,s.jsx)("div",{className:"pt",children:"Chargement…"})})});if(G)return(0,s.jsx)("div",{className:"pred-lock",children:(0,s.jsxs)("div",{className:"free",children:[(0,s.jsx)("div",{className:"pl",children:L("indisponible")}),(0,s.jsx)("div",{className:"fp",children:(0,s.jsx)("span",{className:"fp-label",children:L("aucuneAnalyse")})})]})});let e=d?L("chargement"):h?D(h.result,W,A,M):u?L("debloquerConsensus"):L("analyseDemande"),t=d||h?null:L("prixCredits",{n:u?f:x}),r=i||c;return(0,s.jsxs)("div",{className:"pred-lock",children:[(0,s.jsxs)("div",{className:"free",children:[(0,s.jsx)("div",{className:"pl",children:L("apercu")}),(0,s.jsxs)("div",{className:"fp",children:[(0,s.jsx)("span",{className:"fp-label",children:e}),t&&(0,s.jsx)("span",{className:"fp-price",children:t})]}),p&&(0,s.jsx)("span",{className:`conf-tag ${p}`,children:"high"===p?L("confianceElevee"):L("confianceMoyenne")})]}),m?(0,s.jsxs)("button",{className:"see-btn",disabled:r,onClick:e=>{e.stopPropagation(),v()},children:[r?(0,s.jsx)("span",{className:"spin"}):(0,s.jsx)(E,{}),c?L("carte.analyseEnCours"):L("carte.voir")]}):(0,s.jsxs)(o.default,{className:"see-btn",href:`/register?next=${encodeURIComponent(V)}`,onClick:e=>e.stopPropagation(),children:[(0,s.jsx)(E,{}),L("carte.voir")]})]})})()}),(0,s.jsx)(b.default,{type:"match",referenceId:String(e.id),size:"sm"}),(0,s.jsx)(P,{})]})}e.s(["default",0,function({initialMatches:e,initialPreds:j}={}){let g=(0,n.useTranslations)("predictions"),b=(0,S.resolveLocale)((0,r.useLocale)()),[N,w]=(0,t.useState)("all"),[C,M]=(0,t.useState)("all"),[E,P]=(0,t.useState)("all"),[D,z]=(0,t.useState)(""),[R,K]=(0,t.useState)(new Set),[G,Q]=(0,t.useState)(null),[V,q]=(0,t.useState)(null),[J,H]=(0,t.useState)(null),[X,Y]=(0,t.useState)(!1),Z=(0,l.useRouter)(),ee=(0,F.useOrdreContexte)(),{isAuthenticated:es,isLoading:et,user:er}=(0,d.useCurrentUser)(),{credits:en}=(0,m.useCredits)(),{matches:ea,loading:ei}=(0,h.useDayMatches)(void 0,e?{matches:e,liveCount:0,loading:!1}:void 0),{matches:eo}=(0,p.useLiveMatches)(),el=(0,t.useMemo)(()=>(0,_.overlayLive)(ea,eo),[ea,eo]),ec=(0,x.useSignupCredits)(),eu=!et,ed=(0,c.useQuery)(u.api.settings.getSetting,{key:"unlock_cost_key"}),em=(0,c.useQuery)(u.api.settings.getSetting,{key:"unlock_cost_minor"}),eh=Number.parseInt(ed??"",10)||5,ep=Number.parseInt(em??"",10)||8,ef=(0,c.useMutation)(u.api.predictions.unlockPrediction),ex=(0,c.useMutation)(u.api.predictions.refundUnlock),{unlockOnDemand:ev}=(0,f.useOnDemandUnlock)(),ej=(0,c.useQuery)(u.api.predictions.getUnlockedMatchIds,!et&&er?{}:"skip"),eg=(0,t.useMemo)(()=>{let e=new Set(R);return ej?.forEach(s=>e.add(s)),e},[R,ej]),eb=D.trim().toLowerCase(),ey=(0,t.useMemo)(()=>el.filter(e=>{let s="all"===N||O(e)===N,t=""===eb||e.homeTeam.name.toLowerCase().includes(eb)||e.awayTeam.name.toLowerCase().includes(eb);return s&&t}),[el,N,eb]),eN=eu&&!es?ey.slice(0,2):ey,ek=(0,t.useMemo)(()=>eN.map(e=>String(e.id)),[eN]),e_=(0,c.useQuery)(u.api.predictions.getPredictionsForMatches,ek.length>0?{matchIds:ek}:"skip"),ew=void 0===e_?j:e_,eS=void 0===ew,eC=(0,t.useMemo)(()=>new Set(Object.keys(ew??{})),[ew]),eL=(0,t.useMemo)(()=>{let e={};for(let[s,t]of Object.entries(ew??{}
1))t.consensus.freePick&&(e[s]=t.consensus.freePick);return e},[ew]),eM=(0,t.useCallback)(e=>{let s=eL[e];return s?s.confidence>=70?"high":"mid":null},[eL]),eT=(0,t.useMemo)(()=>{let e=new Map;for(let s of eN){let t=String(s.id);if("all"!==C&&eM(t)!==C)continue;let r=s.competition.name;if("all"!==E&&r!==E)continue;let n=e.get(r)??{comp:r,logo:(0,T.leagueLogoSrc)(s.competition.id,s.competition.logo),leagueId:s.competition.id,country:s.competition.country,matches:[]};n.matches.push(s),e.set(r,n)}let s=e=>[e.homeTeam,e.awayTeam],t=[...e.values()].map(e=>({leagueId:e.leagueId,country:e.country,name:e.comp,teams:e.matches.flatMap(s),groupe:{comp:e.comp,logo:e.logo,matches:(0,$.trierMatchs)(e.matches,s,ee)}}));return(0,$.trierCompetitions)(t,ee,b).map(e=>e.groupe)},[eN,C,E,eM,ee,b]),e$=eT.reduce((e,s)=>e+s.matches.length,0),eF=(0,t.useMemo)(()=>{var e;return e=function(e,s,t){let r=0,n=0,a=0;for(let i of e)s(i)?a++:t(i)?r++:n++;return{published:r,onDemand:n,off:a,total:r+n+a}}(eT.flatMap(e=>e.matches),e=>"off"===O(e),e=>eC.has(String(e.id))),0===e.total?"":eS?g("cntMatchs",{n:e.total}):[e.published>0&&g("cntPublies",{n:e.published}),e.onDemand>0&&g("cntDemande",{n:e.onDemand}),e.off>0&&g("cntIndispo",{n:e.off})].filter(Boolean).join(" · ")},[eT,eC,eS,g]),eE=(0,t.useMemo)(()=>[...new Set(eN.map(e=>e.competition.name))],[eN]);async function eI(e){let s=String(e.id);if(eg.has(s)||"upcoming"!==O(e))return;if(0===en)return void Y(!0);let t={matchId:s,homeTeam:e.homeTeam.name,awayTeam:e.awayTeam.name,competition:e.competition.name};Q(s),H(null);try{let e=await ef(t);if(e.success)return void K(e=>new Set([...e,s]));if("no_credits"===e.reason)return void Y(!0);if("early_access"===e.reason){H(g("reserveProElite")),Z.push("/tarifs/abonnements");return}if("already_played"===e.reason)return void K(e=>new Set([...e,s]));if("not_ready"!==e.reason)return void H(g("erreurGenerique"));(0,k.devLog)(`[PredictionsV2] flux \xe0 la demande matchId=${s}`),q(s);let r=await ev(s);r.success?K(e=>new Set([...e,s])):"no_credits"===r.reason?Y(!0):((0,k.devWarn)(`[PredictionsV2] \xe0 la demande \xe9chou\xe9 ${s}: ${r.reason}`),H((0,f.onDemandErrorMessage)(r)))}catch(e){console.error(`[PredictionsV2] exception ${s}`,e),H(g("erreurGenerique"))}finally{Q(null),q(null)}}let eP=(0,t.useCallback)(async e=>{K(s=>{let t=new Set(s);return t.delete(e),t});
1try{await ex({matchId:e})}catch(s){console.error(`[PredictionsV2] refund ${e}`,s)}},[ex]);return(0,s.jsxs)(s.Fragment,{children:[X&&(0,s.jsx)(v.default,{origine:"predictions",onClose:()=>Y(!1)}),(0,s.jsxs)("div",{className:"page-head",children:[(0,s.jsx)("div",{className:"eyebrow",children:g("eyebrow")}),(0,s.jsx)("h1",{children:g("titre")}),(0,s.jsx)("p",{children:g("lead")})]}),(0,s.jsxs)("section",{className:"list-sec",children:[(0,s.jsxs)("div",{className:"list-head",children:[(0,s.jsx)("h2",{children:g("predictionsDuJour")}),(0,s.jsx)("span",{className:"cnt",children:ei?"":eF})]}),(0,s.jsxs)("p",{className:"list-sub",children:[g("listSub",{cle:eh,mineur:ep})," ",(0,s.jsx)(L.default,{})]}),eu&&es&&(0,s.jsxs)("div",{className:"cred-line",children:[(0,s.jsx)(W,{}),(0,s.jsx)("span",{children:g.rich("creditsDispo",{n:en,b:e=>(0,s.jsx)("b",{children:e})})})]}),(0,s.jsxs)("div",{className:"filters",children:[(0,s.jsx)("div",{className:"fgroup",children:["all","live","upcoming"].map(e=>(0,s.jsx)("button",{className:`fbtn ${N===e?"active":""}`,onClick:()=>w(e),children:"all"===e?g("tous"):"live"===e?g("live"):g("aVenir")},e))}),(0,s.jsx)("div",{className:"fgroup",children:["all","high","mid"].map(e=>(0,s.jsx)("button",{className:`fbtn ${C===e?"active":""}`,"data-conf":"high"===e?"high":void 0,onClick:()=>M(e),children:"all"===e?g("confianceToutes"):"high"===e?g("elevee"):g("moyenne")},e))}),eE.length>1&&(0,s.jsxs)("div",{className:"fgroup",children:[(0,s.jsx)("button",{className:`fbtn ${"all"===E?"active":""}`,onClick:()=>P("all"),children:g("toutesLigues")}),eE.map(e=>(0,s.jsx)("button",{className:`fbtn ${E===e?"active":""}`,onClick:()=>P(e),children:(0,y.competitionLabel)(e,b)},e))]}),(0,s.jsx)("div",{className:"fspring"}),(0,s.jsxs)("div",{className:"searchbox",children:[(0,s.jsx)(B,{}),(0,s.jsx)("input",{type:"search",value:D,onChange:e=>z(e.target.value),placeholder:g("rechercheEquipe"),"aria-label":g("rechercheEquipe")}),D&&(0,s.jsx)("button",{className:"clr","aria-label":g("effacer"),onClick:()=>z(""),children:(0,s.jsx)(I,{})})]})]}),ei&&Array.from({length:5}).map((e,t)=>(0,s.jsx)("div",{className:"pskel"},t)),!ei&&0===e$&&(0,s.jsxs)("div",{className:"empty",children:[(0,s.jsx)("div",{className:"eic",children:(0,s.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:(0,s.jsx)("path",{d:"M4 6h16M6 12h12M9 18h6"})})}),(0,s.jsx)("div",{className:"et",children:g("aucunePrediction")}),(0,s.jsx)("div",{className:"es",children:g("changeFiltre")})]}),!ei&&eT.map(e=>(0,s.jsxs)("div",{className:"pgroup",children:[(0,s.jsxs)("div",{className:"pgroup-h",children:[(0,s.jsx)("span",{className:"cem",children:e.logo?(0,s.jsx)(a.default,{src:e.logo,alt:"",width:18,height:18,unoptimized:(0,i.skipImageOptimizer)(e.logo)}):null}),(0,s.jsx)("span",{className:"cn",children:(0,y.competitionLabel)(e.comp,b)}),(0,s.jsx)("span",{className:"cc",children:g("cntMatchs",{n:e.matches.length})})]}),e.matches.map(e=>{let t=String(e.id),r=O(e);return(0,s.jsx)(U,{match:e,isUnlocked:eg.has(t)||"live"===r||"finished"===r,isUnlocking:G===t,isGenerating:V===t,hasPrediction:eC.has(t),predsLoading:eS,isAuthenticated:eu&&es,geminiPick:eL[t]??null,band:eM(t),costKey:eh,costMinor:ep,onView:()=>eI(e),onNoPrediction:eP},t)})]},e.comp)),J&&(0,s.jsx)("div",{className:"err-note",children:J}),!ei&&eu&&!es&&ey.length>0&&(0,s.jsxs)("div",{className:"guest-cta",children:[(0,s.jsxs)("div",{className:"gt",children:[(0,s.jsx)("b",{children:g("guestTitre")}),(0,s.jsx)("span",{children:g.rich("guestSous",{credits:ec,em:e=>(0,s.jsx)("em",{children:e})})})]}),(0,s.jsxs)("div",{className:"gbtns",children:[(0,s.jsxs)(o.default,{className:"gp",href:"/register?next=%2Fpredictions",children:[(0,s.jsx)(A,{}),g("sInscrire")]}),(0,s.jsx)(o.default,{className:"gs",href:"/login?next=%2Fpredictions",children:g("seConnecter")})]})]})]})]})}],1485)}]);

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.