PageSourceSearch

https://senoval.cdn.sports.ru/roberto-contentos/short-posts-ssi/st…atfishWithBetsElements-d1eb43ed-B2nYgbAI.js

js sports.ru collected 2026-09-24 15:19:56 UTC 5,713 bytes, 3 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="55f66a2b-c9f3-5ba5-80a3-4a76cbc795f1")}catch(e){}}();
2import{S as I,a as x,Q as L}from"./modal.es-CuZSa7Jx.js";import{d as O,u as j,r as D,l as C,o as E,f as N,i as t,n as d,t as c,v as P}from"./index-CGqfqx9g.js";const A={betting:"https://www.sports.ru/core/stat/match/betting/",topBettingMatches:"https://www.sports.ru/core/stat/tournament/top_betting_matches/"};async function R({tagIds:_,bookmakerId:a,interval:l}){try{const e=_.split(", ").map(f=>+f),i=(await(await fetch(`${A.topBettingMatches}?args=${JSON.stringify({tag_ids:e,bookmaker_id:[+a],interval:+l})}`,{headers:{"Content-Type":"application/json"}})).json()).matches;return i[Math.floor(Math.random()*i.length)]}catch(e){throw console.error("[SPORTS][CatfishBets]: Error while getting top matches",e),e}}const q={class:"catfish-with-bets__left"},M={class:"catfish-with-bets__header-text"},$={class:"catfish-with-bets__header-text"},U={class:"catfish-with-bets__content"},V={class:"catfish-with-bets__team"},J=["src"],Q={class:"catfish-with-bets__team-name"},z={class:"catfish-with-bets__team"},W=["src"],F={class:"catfish-with-bets__team-name"},G={class:"catfish-with-bets__line"},H={class:"catfish-with-bets__bet-value"},K={class:"catfish-with-bets__line"},X={class:"catfish-with-bets__bet-value"},Y={class:"catfish-with-bets__line"},Z={class:"catfish-with-bets__bet-value"},tt={class:"catfish-with-bets__right"},at=["href"],et=["src"],st=["href"],ot="first_team_win",rt="draw",it="second_team_win",nt=O({__name:"CatfishWithBetsElements",props:{action:{type:String,required:!0},otherData:{type:Object,required:!0},analyticsData:{type:Object,required:!0},slotProps:{type:Object,required:!0}},setup(_){const a=_,l=j(a),e=D(null);let i;const f={betting:"https://www.sports.ru/core/stat/match/betting/",topBettingMatches:"https://www.sports.ru/core/stat/tournament/top_betting_matches/"},r=D(null);async function T({matchId:s,bookmakerId:o,geo:p}){try{const h=await(await fetch(`${f.betting}?args=${JSON.stringify({id:[+s],bookmaker_id:[+o],...p&&{geo:p.toLowerCase()}})}`,{headers:{"Content-Type":"application/json"}})).json();if(!h||!h.length)return null;const n=h[0],u=n.lines.length?n.lines[0]:null;if(!u)return null;const b=u.odds||[],k=b.find(m=>m.field===ot),v=b.find(m=>m.field===rt),y=b.find(m=>m.field===it);if(!k||!v||!y)return null;const S=u.bookmaker.empty_url+a.otherData.utmTail;return{matchDateTime:n.match_data.start.bunin,tournamentName:n.match_data.tournament_name,team1:{name:n.match_data.first_team_name,logo:n.match_data.first_team_logo},team2:{name:n.match_data.second_team_name,logo:n.match_data.second_team_logo},odds:{firstTeam:k.value,draw:v.value,secondTeam:y.value},bookmakerName:u.bookmaker.name,betsUrl:S}}catch(h){throw console.error("[SPORTS][CatfishBets]: Error while getting match betting",h),h}}function B(){if(!e.value||!a.analyticsData.id)return;const s=new x(a.otherData.buttonAndLogoLink,a.analyticsData.elementContext);i=L({analyticsDataId:a.analyticsData.id,analyticsDataExtraProvider:s}),i?.sendViewAnalytics(e.value)}function g(){!i||!e.value||i.sendRealImpressionAnalytics(e.value)}function w(){!i||!e.value||i.sendClickAnalytics(e.value)}return R({tagIds:l.otherData.tournamentIds,bookmakerId:l.otherData.bookmakerId,interval:l.otherData.daysOffset}).then(async s=>{r.value=await T({matchId:s,bookmakerId:l.otherData.bookmakerId,geo:l.otherData.geo})}).then(()=>{a.slotProps.isShown&&g()}).catch(s=>{console.error("[SPORTS][CatfishBets]: Error while getting top match",s)}),C(e,s=>{s&&B()}),C(()=>a.slotProps.isShown,(s,o)=>{s&&!o&&g()},{deep:!0}),(s,o)=>r.value?(E(),N("div",{key:0,ref_key:"rootElement",ref:e,class:"catfish-with-bets",style:d({"background-color":a.otherData.creativeBackgroundColor})},[t("div",q,[t("div",{class:"catfish-with-bets__header",style:d({"background-color":a.otherData.headerBackgroundColor,color:a.otherData.headerTextColor})}
2,[t("span",M,c(r.value.matchDateTime),1),t("span",$,c(r.value.tournamentName),1)],4),t("div",U,[t("div",{class:"catfish-with-bets__teams",style:d({color:a.otherData.teamsTextColor})},[t("div",V,[t("img",{class:"catfish-with-bets__team-logo",src:r.value.team1.logo},null,8,J),t("span",Q,c(r.value.team1.name),1)]),t("div",z,[t("img",{class:"catfish-with-bets__team-logo",src:r.value.team2.logo},null,8,W),t("span",F,c(r.value.team2.name),1)])],4),t("a",{href:"betsUrl",target:"_blank",class:"catfish-with-bets__bets",style:d({"background-color":a.otherData.betsBlockBackground,color:a.otherData.betsTextColor})},[t("div",G,[o[0]||(o[0]=t("span",{class:"catfish-with-bets__outcome"},"1",-1)),t("span",H,c(r.value.odds.firstTeam),1)]),t("div",K,[o[1]||(o[1]=t("span",{class:"catfish-with-bets__outcome"},"x",-1)),t("span",X,c(r.value.odds.draw),1)]),t("div",Y,[o[2]||(o[2]=t("span",{class:"catfish-with-bets__outcome"},"2",-1)),t("span",Z,c(r.value.odds.secondTeam),1)])],4)])]),t("div",tt,[t("a",{href:a.otherData.buttonAndLogoLink,target:"_blank",class:"catfish-with-bets__logo-link",onClick:w},[t("img",{src:a.otherData.bookmakerLogoURL,class:"catfish-with-bets__logo"},null,8,et)],8,at),t("a",{href:a.otherData.buttonAndLogoLink,target:"_blank",class:"catfish-with-bets__button",style:d({"background-color":a.otherData.buttonBackgroundColor,color:a.otherData.buttonTextColor}),onClick:w},c(a.otherData.buttonText),13,st),o[3]||(o[3]=t("div",{class:"catfish-with-bets__label"}," Реклама 18+ ",-1))])],4)):P("",!0)}}),ht=I(nt,[["__scopeId","data-v-ffad90f2"]]);export{ht as default};
3//# debugId=55f66a2b-c9f3-5ba5-80a3-4a76cbc795f1

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.