1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5637],{4991:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var n=l(18543),a=l(59662),s=l(20432),r=l(50358);let i=e=>{var t,l,i,o,d,c,u,m;let{eId:h,eTypeId:p,isCompetetion:x=!1}=e,f=(0,a.d4)(e=>e.authentication.isLoggedIn),b=(0,a.d4)(e=>e.authentication.isLoading),v=(0,n.useMemo)(()=>"4"===p,[p]),g=(0,s.RU)({eventTypeId:p,eventId:h,isLoggedIn:f},{skip:b||!p||!h||!v||x,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!0,pollingInterval:f?2e3:3e3,selectFromResult:e=>{let{data:t,isLoading:l}=e;return{latestFeedData:t,isLatestFeedDataLoading:l}}}),y=(0,n.useMemo)(()=>"1"!==p&&"2"!==p,[p]),w=(0,s.rl)({eventTypeId:p,eventId:h,isLoggedIn:f},{skip:b||!p||!h||v||x||y,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!0,pollingInterval:f?2e3:3e3,selectFromResult:e=>{let{data:t,isLoading:l}=e;return{matchStats:t,isMatchStatsLoading:l}}}),k=(0,n.useMemo)(()=>{var e,t,l,n,a,s;return"4"!=p?null==w||null==(s=w.matchStats)||null==(a=s.result)?void 0:a.stats:(null==g||null==(t=g.latestFeedData)||null==(e=t.result)?void 0:e.stats)?null==g||null==(n=g.latestFeedData)||null==(l=n.result)?void 0:l.stats:null},[null==w||null==(l=w.matchStats)||null==(t=l.result)?void 0:t.stats,null==g||null==(o=g.latestFeedData)||null==(i=o.result)?void 0:i.stats,p,h]),j=(0,a.wA)();return(0,n.useEffect)(()=>{var e,t,l,n;v?(null==g||null==(t=g.latestFeedData)||null==(e=t.result)?void 0:e.hasVideo)?j((0,r.d8)(!0)):j((0,r.d8)(!1)):(null==w||null==(n=w.matchStats)||null==(l=n.result)?void 0:l.hasVideo)?j((0,r.d8)(!0)):j((0,r.d8)(!1))},[null==w||null==(c=w.matchStats)||null==(d=c.result)?void 0:d.hasVideo,null==g||null==(m=g.latestFeedData)||null==(u=m.result)?void 0:u.hasVideo]),{finalScoreData:k,cricketLatestFeedData:null==g?void 0:g.latestFeedData,isLatestFeedDataLoading:null==g?void 0:g.isLatestFeedDataLoading,isMatchStatsLoading:null==w?void 0:w.isMatchStatsLoading}}},6069:(e,t,l)=>{"use strict";l.d(t,{default:()=>P});var n=l(3591),a=l(18543),s=l(59662),r=l(20432),i=l(25696),o=l(68564);let d=(0,a.memo)(e=>{var t,l,a,s;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_2152_26700)",children:[(0,n.jsx)("path",{d:"M10.8506 9.41291L8.61975 7.73979V4.3316C8.61975 3.98891 8.34275 3.71191 8.00006 3.71191C7.65737 3.71191 7.38037 3.98891 7.38037 4.3316V8.04966C7.38037 8.24485 7.47209 8.42891 7.62825 8.54541L10.1069 10.4044C10.2185 10.4881 10.3486 10.5284 10.4781 10.5284C10.6671 10.5284 10.853 10.4435 10.9745 10.2799C11.1803 10.0066 11.1245 9.61804 10.8506 9.41291Z",fill:"url(#paint0_linear_2152_26700)"}),(0,n.jsx)("path",{d:"M8 0C3.58853 0 0 3.58853 0 8C0 12.4115 3.58853 16 8 16C12.4115 16 16 12.4115 16 8C16 3.58853 12.4115 0 8 0ZM8 14.7607C4.27266 14.7607 1.23934 11.7273 1.23934 8C1.23934 4.27266 4.27266 1.23934 8 1.23934C11.728 1.23934 14.7607 4.27266 14.7607 8C14.7607 11.7273 11.7273 14.7607 8 14.7607Z",fill:"url(#paint1_linear_2152_26700)"})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("linearGradient",{id:"paint0_linear_2152_26700",x1:"7.38037",y1:"10.9544",x2:"11.5202",y2:"10.6827",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:null!=(t=null==e?void 0:e.stroke1)?t:"#C10B32"}),(0,n.jsx)("stop",{offset:"1",stopColor:null!=(l=null==e?void 0:e.stroke2)?l:"#6A061C"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_2152_26700",x1:"-1.1269e-07",y1:"17",x2:"17.6354",y2:"14.8782",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:null!=(a=null==e?void 0:e.stroke1)?a:"#C10B32"}),(0,n.jsx)("stop",{offset:"1",stopColor:null!=(s=null==e?void 0:e.stroke2)?s:"#6A061C"})]}),(0,n.jsx)("clipPath",{id:"clip0_2152_26700",children:(0,n.jsx)("rect",{width:"16",height:"16",fill:"white"})})]})]})});var c=l(76074),u=l(76610),m=l(71266),h=l(1953),p=l(69552),x=l(83232),f=l(5245),b=l(78182);let v={price:0,size:0,line:null},g=[{index:0,type:"back"},{index:0,type:"lay"}],y=[{index:0,type:"back"},{index:1,type:"back"},{index:2,type:"back"},{index:0,type:"lay"},{index:1,type:"lay"},{index:2,type:"lay"}];function w(e,t){var l,n,a,s,r,i;return"back"===t.type?(l=t.index,null!=(a=null==e||null==(n=e.back)?void 0:n[l])?a:v):(s=t.index,null!=(i=null==e||null==(r=e.lay)?void 0:r[s])?i:v)}function k(e){var t,l,r,o,d;let{runner:c,race:u}=e,{isSuspended:h,isFancy:p,isBookmakerOrMiniBookmaker:v}={isSuspended:(null==u||null==(t=u.status)?void 0:t.toLowerCase())==="suspended",isFancy:null!=(l=null==u?void 0:u.isFancy)&&l,isBookmakerOrMiniBookmaker:(0,x.KO)({mtype:null!=(r=null==u?void 0:u.mtype)?r:"",name:null!=(o=null==u?void 0:u.name)?o:"",id:null!=(d=null==u?void 0:u.id)?d:""})},k={isDisabled:h||!u.isBettable,isFancy:p,isBookmakerOrMiniBookmaker:v},j=(0,s.wA)(),_=(0,a.useCallback)((e,t,l)=>{let n={side:+("back"!==l),selectionId:e.id,btype:u.btype,mtype:u.mtype,oddsType:u.oddsType,eventTypeId:u.eventTypeId,marketId:u.id,betSlipRef:0,fromOneClick:0,betDelay:u.betDelay,runner:e.name,runnerId:e.id,eventId:u.event.i
1d,eventName:u.event.name,groupById:u.groupById,isFancy:p,isBookmakerOrMiniBookmaker:v,isLineMarket:!1,index:t};j((0,m.oj)(n))},[u,p,v]),N=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),C=(0,a.useCallback)((e,t)=>(null==N?void 0:N.marketId)===u.id&&(null==N?void 0:N.runnerId)===c.id&&(null==N?void 0:N.index)===e&&(null==N?void 0:N.side)===+("back"!==t),[null==N?void 0:N.marketId,null==N?void 0:N.runnerId,null==N?void 0:N.index,null==N?void 0:N.side,u.id,c.id]);return(0,n.jsx)("div",{className:(0,i.cn)("h-12 gap-x-[1px] px-[1px] py-[1px] min-w-[50%] lg:min-w-[60%] pr-1"),children:h?(0,n.jsx)("div",{className:"col-span-12 w-full h-full",children:(0,n.jsx)(f.Mg,{})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"col-span-12 grid grid-cols-4 gap-x-[1px] sm:hidden h-full",children:g.map(e=>(0,n.jsx)(b.J4,{runnerPrice:w(c,e),type:e.type,onClick:()=>_(c,e.index,e.type),isSelected:C(e.index,e.type),...k},"".concat(e.type,"-").concat(e.index)))}),(0,n.jsx)("div",{className:"col-span-12 hidden sm:grid sm:grid-cols-12 gap-x-[1px] h-full",children:y.map(e=>(0,n.jsx)(b.J4,{runnerPrice:w(c,e),type:e.type,onClick:()=>_(c,e.index,e.type),isSelected:C(e.index,e.type),...k},"".concat(e.type,"-").concat(e.index)))})]})})}var j=l(90466),_=l(80952),N=l(30156),C=l(24926);let I="min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",M="text-text_color_success",F="text-text_color_danger",A="text-[12px] font-bold";function B(e){var t;let{marketId:l,runnerId:a,eventId:r}=e,o=(0,C.w4)({marketId:l,runnerId:a,eventId:r,disableCalculationWhileBetPlacing:!1}),d=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),c=(null==d?void 0:d.marketId)===l&&(null==o?void 0:o.finalPnl)!=null&&(null==o?void 0:o.existingPnl)!==(null==o?void 0:o.finalPnl);return(0,n.jsxs)("div",{className:"flex items-center gap-x-1",children:[c&&(null==o?void 0:o.existingPnl)?(0,n.jsxs)("span",{className:(0,i.cn)(A,o.existingPnl>=0?M:F),children:[o.existingPnl," ",">>"]}):null,c?(0,n.jsx)("span",{className:(0,i.cn)(A,(null!=(t=null==o?void 0:o.finalPnl)?t:0)>=0?M:F),children:null==o?void 0:o.finalPnl}):(null==o?void 0:o.existingPnl)?(0,n.jsx)("span",{className:(0,i.cn)(A,o.existingPnl>=0?M:F),children:o.existingPnl}):null]})}function S(e){var t,l,a,s,r,o,d,c,u,m,h,p;let{runner:x,race:b}=e,v=null!=(c=null==(t=x.metadata)?void 0:t.CLOTH_NUMBER)?c:"â",g=null!=(u=null==(l=x.metadata)?void 0:l.CLOTH_NUMBER_ALPHA)?u:"â",y=null!=(m=null==(a=x.metadata)?void 0:a.JOCKEY_NAME)?m:"",w=(null==(s=x.metadata)?void 0:s.COLOURS_FILENAME_BASE64)?"".concat(f.wE).concat(x.metadata.COLOURS_FILENAME_BASE64):"",k="â"!==v||"â"!==g||""!==w;return(0,n.jsxs)("div",{className:(0,i.cn)("text-text_color_primary1 h-full min-w-[45%] px-2 lg:min-w-[40%] flex items-center justify-start"),role:"group","aria-label":"Runner: ".concat(x.name,", Jockey: ").concat(y,", Cloth number: ").concat(v),children:[k&&(0,n.jsxs)("div",{className:"flex items-center justify-between gap-x-1 h-full py-1 px-0.5",children:[(0,n.jsxs)("div",{className:"text-xs font-[400] shrink-0 flex flex-col items-center justify-center",children:[(0,n.jsx)("span",{className:"text-xs font-[400] shrink-0",children:v}),(0,n.jsxs)("span",{className:"text-xs font-[400] shrink-0",children:["(",g,")"]})]}),(0,n.jsx)(j.default,{path:w,alt:"Silk colours for ".concat(x.name),className:"w-5 h-5 mr-1.5 shrink-0",imgClassName:"w-5 h-5",noPathLoaderClass:"bg-bg_color_skeletonBgLoaderColor1",title:x.name})]}),(0,n.jsxs)("div",{className:"flex-1 min-w-0 h-full py-1 pr-1 flex flex-col justify-center",children:[(0,n.jsx)("div",{className:(0,i.cn)("text-xs md:text-sm font-bold",I),title:x.name,children:x.name}),(0,n.jsx)("small",{className:(0,i.cn)("text-x leading-normal",I),title:y,children:y}),(0,n.jsx)(B,{marketId:b.id,runnerId:null!=(h=null==(r=x.id)?void 0:r.toString())?h:"",eventId:null!=(p=null==(d=b.event)||null==(o=d.id)?void 0:o.toString())?p:""})]})]})}let E=(0,a.memo)(function(e){var t;let{eventTypeId:l,selectedRaceId:o}=e,d=(0,s.d4)(e=>e.authentication.isLoggedIn),{raceResult:c,isRaceResultLoading:u}=(e=>{var t,l;let{eventTypeId:n,raceId:i,intervalTime:o=5e3}=e,d=(0,s.d4)(e=>e.authentication.isLoggedIn),c=(0,s.d4)(e=>e.authentication.isLoading),u=(0,r.Ee)({eventTypeId:n,raceId:i,isLoggedIn:d},{skip:c,pollingInterval:o,selectFromResult:e=>{let{data:t,isLoading:l}=e;return{raceResult:t,isRaceResultLoading:l}}});return{raceResult:(0,a.useMemo)(()=>{var e;return null==u||null==(e=u.raceResult)?void 0:e.result},[null==u||null==(t=u.raceResult)?void 0:t.result]),isRaceResultLoading:(null==u?void 0:u.isRaceResultLoading)||!(null==u||null==(l=u.raceResult)?void 0:l.result)}})({eventTypeId:l.toString(),raceId:o,intervalTime:d?1500:2e3}),m=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),h=null==(t=(0,N.v)())?void 0:t.width;return u?(0,n.jsx)("div",{className:"w-full divide-y divide-border_color_primary",role:"status","aria-label":"Loading race runners and odds","aria-busy":"true",children:[1,2,3,4,5,6,7,8].map(e=>(0,n.jsxs)("div",{className:"px-2 h-12 flex items-center justify-between w-full animate-pulse","aria-hidden":!0,
1children:[(0,n.jsxs)("div",{className:"text-text_color_primary1 h-full min-w-0 max-w-[45%] lg:max-w-[40%] flex items-center justify-start px-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-x-1 h-full py-1 px-0.5",children:[(0,n.jsxs)("div",{className:"shrink-0 flex flex-col items-center justify-center gap-y-0.5",children:[(0,n.jsx)("div",{className:"h-3 w-4 bg-bg_color_skeletonBgLoaderColor1 rounded"}),(0,n.jsx)("div",{className:"h-3 w-5 bg-bg_color_skeletonBgLoaderColor1 rounded"})]}),(0,n.jsx)("div",{className:"h-5 w-5 bg-bg_color_skeletonBgLoaderColor1 rounded shrink-0"})]}),(0,n.jsxs)("div",{className:"flex-1 min-w-0 h-full py-1 pr-1 flex flex-col justify-center gap-y-1",children:[(0,n.jsx)("div",{className:"h-3.5 w-[75%] max-w-24 bg-bg_color_skeletonBgLoaderColor1 rounded"}),(0,n.jsx)("div",{className:"h-3 w-1/2 max-w-16 bg-bg_color_skeletonBgLoaderColor1 rounded"})]})]}),(0,n.jsx)("div",{className:"h-12 gap-x-[1px] px-[1px] py-[1px] min-w-[50%] lg:min-w-[60%] pr-1 flex items-center",children:(0,n.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-12 gap-x-[1px] h-full w-full",children:[1,2,3,4,5,6].map(e=>(0,n.jsx)("div",{className:(0,i.cn)("h-8 bg-bg_color_skeletonBgLoaderColor1 rounded",e>2&&"hidden sm:block")},e))})})]},e))}):(null==c?void 0:c.length)?(0,n.jsx)(a.Fragment,{children:c.map(e=>{var t,l,s;return(0,n.jsx)("div",{className:"w-full divide-y divide-border_color_primary",role:"list","aria-label":"Race at ".concat(null!=(s=null==e||null==(t=e.event)?void 0:t.venue)?s:"venue"," â runners and odds"),children:null==e||null==(l=e.runners)?void 0:l.map(t=>(0,n.jsxs)(a.Fragment,{children:[(0,n.jsxs)("div",{role:"listitem",className:(0,i.cn)("min-h-12 py-1","flex items-stretch justify-between w-full"),children:[(0,n.jsx)(S,{runner:t,race:e}),(0,n.jsx)(k,{runner:t,race:e})]},"".concat(e.id,"-").concat(t.id)),(null==m?void 0:m.marketId)===e.id&&(null==m?void 0:m.runnerId)===t.id&&h<1024?(0,n.jsx)(_.A,{}):null]},"".concat(e.id,"-").concat(t.id)))},e.id)})}):null});var O=l(66684);function L(e){var t,l;let{data:r,eventTypeId:h,isDesktop:p}=e,x=(0,s.wA)(),f=(0,s.d4)(e=>e.racingStates.selectedRaceEvent),b=(null==f?void 0:f.id)===(null==r?void 0:r.id),v=new Date(null==r?void 0:r.startTime)>new Date,g="".concat(null==r?void 0:r.venue," (").concat(null==r?void 0:r.countryCode,")"),y=(0,O.useRouter)(),w=(0,a.useCallback)(()=>{let e=null==r?void 0:r.id,t=(0,i.iy)(h),l="".concat(null==r?void 0:r.venue," (").concat(null==r?void 0:r.countryCode,")");y.push("/".concat(t,"/").concat(encodeURIComponent(l),"/").concat(h,"/").concat(e))},[r,h,y]);return p?(0,n.jsxs)("div",{className:"w-full space-y-2",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-y-0",children:[(0,n.jsxs)("span",{className:"text-base font-bold flex items-center justify-start gap-x-1 text-text_color_primary1",children:[(0,n.jsx)(i.Sq,{country:null==r?void 0:r.countryCode}),(0,n.jsxs)("span",{children:[null==r?void 0:r.venue,"(",null==r?void 0:r.countryCode,")"]})]}),(null==r?void 0:r.startTime)&&(0,n.jsx)("time",{dateTime:null==r?void 0:r.startTime,className:"text-sm pb-2 font-[400] capitalize text-text_color_tertiary5",children:(0,n.jsx)(o.default,{date:null==r?void 0:r.startTime,format:"hh:mm a , dd MMM, yyyy",hours24:!1})})]}),(0,n.jsx)("section",{className:"w-full h-max pb-0.5 bg-bg_color_primary rounded-md","aria-label":"Race runners and betting odds",children:(0,n.jsx)(E,{eventTypeId:h,selectedRaceId:null!=(t=null==r?void 0:r.id)?t:""})})]}):(0,n.jsxs)("article",{role:"button",tabIndex:0,onClick:w,onKeyDown:e=>"Enter"===e.key&&x((0,m.lk)(r)),"aria-label":"".concat(g,". ").concat(v?"Upcoming race":"In play",". ").concat(b?"Collapse":"Expand"," race details"),"aria-expanded":b,className:(0,i.cn)("w-full shadow-[rgba(0,_0,_0,_0.24)_0px_3px_8px] rounded-md bg-bg_color_primary ",b?"pt-2":"py-2"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between w-full px-2.5 active:scale-95 cursor-pointer transition-all ease-in-out duration-300",children:[(0,n.jsxs)("div",{className:"flex items-center gap-x-2 text-text_color_primary1",children:[(0,n.jsx)(i.Sq,{country:null==r?void 0:r.countryCode}),(0,n.jsxs)("div",{className:"flex flex-col items-start",children:[(0,n.jsxs)("span",{className:"text-base font-[700]",children:[null==r?void 0:r.venue,"(",null==r?void 0:r.countryCode,")"]}),(null==r?void 0:r.startTime)&&(0,n.jsx)("time",{dateTime:null==r?void 0:r.startTime,className:"text-xs font-[400]",children:(0,n.jsx)(o.default,{date:null==r?void 0:r.startTime,format:"relative",hours24:!1,eventsFormatePast:"Started",eventsFormatePastSuffix:"ago"})})]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-center gap-x-3",children:[v?(0,n.jsx)(d,{stroke1:"var(--icon-color-brand-primary)",stroke2:"var(--icon-color-brand-primary1)"}):(0,n.jsx)(c.A,{fill:"var(--icon-color-brand-primary)",height:"20",width:"20"}),(0,n.jsx)("button",{type:"button","aria-expanded":b,"aria-label":b?"Collapse race details":"Expand race details",className:"transition-all ease-in-out duration-300 transform ".concat(b?"rotate-180":""),onClick:e=>{e.stopPropagation(),x((0,m.lk)(r))},children:(0,n.jsx)(u.A,{fill:"var(--icon-color-brand-secondary)"})})]})]}),b&&(0,n.jsx)("section",{className:"w-full h-max pt-2 pb-0.5","aria-label":"Race runners and betting odds",children:(0,n.jsx)(E,{eventTypeId:h,selectedRaceId:null!=(l=null==f?void 0:f.id)?l:""})})]})}let P=(0,a.memo)(function(e){var t,l,i,o,d;let{eventTypeId:c,eventTitle:u,activeTab:f}=e,{t:b}=(0,h.B)(),{inPlayUpcomingRacingEvents:v,racingEventsLoading:g}=(e=>{var t,l,n;let{eventTypeId:i,intervalTime:o=5e3,isGroupingRequired:d=!1,formateInPlayOrUpcoming:c=!1}=e,u=(0,s.d4)(e=>e.authentication.isLoggedIn),m=(0,s.d4)(e=>e.authentication.isLoading),h=(0,a.useCallback)(e=>{var t,l;return!!(e&&"object"==typeof e&&(null==(t=e.countryCode)?void 0:t.trim())&&(null==(l=e.venue)?void 0:l.trim())&&e.id)},[]),p=(0,a.useCallback)(e=>{let t={};for(let l of e){if(!h(l)){console.warn("Skipping invalid racing event:",l);continue}let e=l.countryCode.trim(),n=l.venue.trim();t[e]||(t[e]={}),t[e][n]||(t[e][n]=[]),t[e][n].push(l)}return t},[]),x=(0,r.N2)({eventTypeId:i,isLoggedIn:u},{pollingInterval:o,skip:m,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!0,selectFromResult:e=>{let{data:t,isLoading:l}=e;return{racingEvents:t,isRacingEventsLoading:l}}}),f=(0,a.useMemo)(()=>{var e,t,l,n;return(null==x||null==(e=x.racingEvents)?void 0:e.result)&&Array.isArray(null==x||null==(t=x.racingEvents)?void 0:t.result)&&(null==x||null==(l=x.racingEvents)?void 0:l.result.length)!==0?d?p(null==x||null==(n=x.racingEvents)?void 0:n.result):[]:{}}
1,[null==x||null==(t=x.racingEvents)?void 0:t.result,d]),b=(0,a.useMemo)(()=>{var e;let t=[],l=[];if(!c)return{inPlayEvents:t,upcomingEvents:l};let n=Date.now();for(let a of(null==x||null==(e=x.racingEvents)?void 0:e.result)||[])(new Date(null==a?void 0:a.startTime).getTime()<=n?t:l).push(a);return{inPlayEvents:t,upcomingEvents:l}},[null==x||null==(l=x.racingEvents)?void 0:l.result,c]);return{racingEvents:null==x?void 0:x.racingEvents,groupedRacingEvents:f,racingEventsLoading:(null==x?void 0:x.isRacingEventsLoading)||!(null==x||null==(n=x.racingEvents)?void 0:n.result)||m,inPlayOrUpcomingFormate:b,inPlayUpcomingRacingEvents:b}})({eventTypeId:c.toString(),intervalTime:3e4,formateInPlayOrUpcoming:!0}),y="inPlay"===f?null!=(l=null==v?void 0:v.inPlayEvents)?l:[]:null!=(i=null==v?void 0:v.upcomingEvents)?i:[],w=(0,N.v)(),k=(null!=(o=null==w?void 0:w.width)?o:0)>1024,j=(0,s.d4)(e=>e.racingStates.selectedRaceEvent),_=null!=(d=null==(t=(0,N.v)())?void 0:t.width)?d:0,C=(0,s.wA)();return(0,a.useEffect)(()=>{if(_>1024&&null===j){var e,t;(null==v||null==(e=v.inPlayEvents)?void 0:e.length)>0?C((0,m.lk)(null==v?void 0:v.inPlayEvents[0])):(null==v||null==(t=v.upcomingEvents)?void 0:t.length)>0&&C((0,m.lk)(null==v?void 0:v.upcomingEvents[0]))}},[_,v,j,C]),(0,a.useEffect)(()=>()=>{C((0,m.lk)(null))},[]),(0,n.jsx)(n.Fragment,{children:k?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(L,{data:j,eventTypeId:c,isDesktop:!0})}):g?(0,n.jsx)("ul",{className:"space-y-2 list-none p-0 m-0",role:"list","aria-label":"Loading racing events","aria-busy":"true",children:[1,2,3,4,5].map(e=>(0,n.jsx)("li",{role:"listitem","aria-hidden":!0,children:(0,n.jsx)("div",{className:"w-full shadow-[rgba(0,_0,_0,_0.24)_0px_3px_8px] rounded-md bg-bg_color_primary py-2 px-2.5 animate-pulse","aria-hidden":!0,children:(0,n.jsxs)("div",{className:"flex items-center justify-between w-full",children:[(0,n.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,n.jsx)("div",{className:"h-5 w-6 bg-bg_color_skeletonBgLoaderColor1 rounded"}),(0,n.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,n.jsx)("div",{className:"h-4 w-24 bg-bg_color_skeletonBgLoaderColor1 rounded"}),(0,n.jsx)("div",{className:"h-3 w-16 bg-bg_color_skeletonBgLoaderColor1 rounded"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-x-3",children:[(0,n.jsx)("div",{className:"h-5 w-5 bg-bg_color_skeletonBgLoaderColor1 rounded"}),(0,n.jsx)("div",{className:"h-5 w-5 bg-bg_color_skeletonBgLoaderColor1 rounded"})]})]})})},e))}):0===y.length?(0,n.jsx)(p.A,{labelForMarket:"".concat(b("No")," ").concat(b("Events Found for")," ").concat(u),labelClassName:" text-text_color_primary1 font-semibold text-[14px] py-[4px] px-[2px] capitalize ",labelIcon:(0,x.L8)(Number(c)),minHeight:"h-[60dvh]"}):(0,n.jsx)("ul",{className:"space-y-2 list-none p-0 m-0",role:"list",children:y.map(e=>(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(L,{data:e,eventTypeId:c,isDesktop:!1})},null==e?void 0:e.id))})})})},14346:(e,t,l)=>{Promise.resolve().then(l.bind(l,55777)),Promise.resolve().then(l.bind(l,26114)),Promise.resolve().then(l.bind(l,80898)),Promise.resolve().then(l.bind(l,73080)),Promise.resolve().then(l.bind(l,37479)),Promise.resolve().then(l.bind(l,94005)),Promise.resolve().then(l.bind(l,6069)),Promise.resolve().then(l.bind(l,88642)),Promise.resolve().then(l.bind(l,22742)),Promise.resolve().then(l.bind(l,93087)),Promise.resolve().then(l.bind(l,64778)),Promise.resolve().then(l.bind(l,29622)),Promise.resolve().then(l.bind(l,52868)),Promise.resolve().then(l.bind(l,22596)),Promise.resolve().then(l.bind(l,52695)),Promise.resolve().then(l.bind(l,15953)),Promise.resolve().then(l.bind(l,50286)),Promise.resolve().then(l.bind(l,68870)),Promise.resolve().then(l.bind(l,30508)),Promise.resolve().then(l.bind(l,19812)),Promise.resolve().then(l.bind(l,71616)),Promise.resolve().then(l.bind(l,78437)),Promise.resolve().then(l.bind(l,42351)),Promise.resolve().then(l.bind(l,47643)),Promise.resolve().then(l.bind(l,91138)),Promise.resolve().then(l.bind(l,24088)),Promise.resolve().then(l.bind(l,14350)),Promise.resolve().then(l.bind(l,80630)),Promise.resolve().then(l.bind(l,54244)),Promise.resolve().then(l.bind(l,43335)),Promise.resolve().then(l.bind(l,43379)),Promise.resolve().then(l.bind(l,94240)),Promise.resolve().then(l.t.bind(l,5531,23)),Promise.resolve().then(l.bind(l,30693))},14928:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var n=l(3591);let a=(0,l(18543).memo)(e=>{let{height:t,width:l,dotHeight:a,dotWidth:s}=e;return(0,n.jsxs)("div",{className:"[&>span]:before:animate-fadeIn relative ".concat(null!=t?t:"h-8"," ").concat(null!=l?l:"w-8"," [&>span]:absolute [&>span]:inset-0 [&>span]:inline-flex [&>span]:h-full [&>span]:w-full [&>span]:before:h-1.5 [&>span]:before:w-1.5 [&>span]:before:rounded-full [&>span]:before:bg-bg_color_brand_primary1"),children:[(0,n.jsx)("span",{className:""}),(0,n.jsx)("span",{className:"before:!animation-delay-[-1.1s] rotate-[30deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-1s] rotate-[60deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.9s] rotate-[90deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.8s] rotate-[120deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.7s] rotate-[150deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.6s] rotate-[180deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.5s] rotate-[210deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.4s] rotate-[240deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.3s] rotate-[270deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.2s] rotate-[300deg]"}),(0,n.jsx)("span",{className:"before:!animation-delay-[-0.1s] rotate-[330deg]"})]})})},15356:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var n=l(3591),a=l(18543),s=l(91361);let r=(0,a.memo)(function(e){let{src:t,alt:l,title:r,className:i="",fallbackSrc:o=s.bY,loading:d="lazy"}=e,c=(null==t?void 0:t.trim())||"",u=(null==o?void 0:o.trim())||"",[m,h]=(0,a.useState)(()=>c||u);return((0,a.useEffect)(()=>{h(c||u)},[c,u]),m)?(0,n.jsx)("img",{src:m,alt:l,title:null!=r?r:l,className:i,loading:d,onError:()=>{if(!u||m===u)return void h("");h(u)}}):null})},20347:(e,t,l)=>{"use strict";l.d(t,{A:()=>A});var n=l(3591),a=l(18543),s=l(5245),r=l(25696),i=l(45308),o=l(68564),d=l(59662),c=l(1953);let u=function(){for(var e=arguments.length,t=Array(e),l=0;l<e;l++)t[l]=arguments[l];return t.filter(Boolean).join(" ")},m="flex items-center justify-center flex-col pl-[1px] pr-[1px]",h="text-text_color_InPlayEventsScoreAndTime text-[9px] font-medium w-full text-center",p=e=>{let{score:t}=e;
1return t?(0,n.jsxs)("span",{className:u(m),"aria-hidden":!0,children:[(0,n.jsx)("span",{className:h,children:(0,r.pB)(t)}),(0,n.jsx)("span",{className:u(h,"text-ellipsis overflow-hidden"),children:(null==t?void 0:t.overs)?"".concat(t.overs," Ov"):"0 Ov"}),Number(null==t?void 0:t.target)>=0&&(0,n.jsx)("span",{className:u(h,"text-[6px] xs:text-[9px]"),children:(null==t?void 0:t.target)>0&&"Tgt ".concat(t.target)})]}):null},x=e=>{var t;let{score:l}=e;return l?(0,n.jsx)("span",{className:u(m),"aria-hidden":!0,children:null==l||null==(t=l.players)?void 0:t.map((e,t)=>{var l,a;return(0,n.jsxs)("span",{className:u(h,"flex gap-x-2"),children:[(0,n.jsx)("span",{children:null!=(l=null==e?void 0:e.setsWon)?l:"0"}),(0,n.jsx)("span",{className:"text-text_color_primary1",children:null!=(a=null==e?void 0:e.currentScore)?a:"0"})]},t)})}):null},f=e=>{var t;let{score:l}=e;return l?(0,n.jsx)("span",{className:u(m),"aria-hidden":!0,children:(0,n.jsxs)("span",{className:u(h,"text-[8px] xs:text-xs flex gap-x-2"),children:[(0,n.jsx)("span",{children:(0,r.ai)(null==l?void 0:l.time)}),(0,n.jsx)("span",{className:"flex flex-col",children:null==l||null==(t=l.players)?void 0:t.map((e,t)=>{var l;return(0,n.jsx)("span",{className:"text-text_color_primary1",children:null!=(l=null==e?void 0:e.score)?l:"0"},t)})})]})}):null},b="flex w-full gap-x-1 items-center justify-center px-0.5",v=(0,a.memo)(function(){let{t:e}=(0,c.B)(),t=e("LIVE");return(0,n.jsxs)("div",{className:b,children:[(0,n.jsx)(i.A,{height:6,width:6,fill:"var(--icon-color-success)",className:"animate-pulse"}),(0,n.jsx)("div",{id:"inPlay",className:"font-semibold bg-bg_inPlayBlockBg text-transparent bg-clip-text text-x",children:t})]})}),g=(0,a.memo)(e=>{let{scores:t,eventTypeId:l,openDate:s,isInPlay:r}=e,i=(0,d.d4)(e=>e.layout.selectedTimeZone),c=(0,a.useMemo)(()=>{if(!t)return null;switch(l){case 4:return(0,n.jsx)(p,{score:t});case 2:return(0,n.jsx)(x,{score:t});case 1:return(0,n.jsx)(f,{score:t});default:return null}},[l,t]),m=(0,a.useMemo)(()=>{let e=new Date;return new Date(new Date(s).toLocaleString("en-US",{timeZone:null==i?void 0:i.timeZone}))>e?(0,n.jsx)(o.default,{date:s,format:"dd-mm-yyyy hh:mm a",hours24:!1,showStartedOn:!0,startedOnFormat:"hh:mm a"}):(0,n.jsx)(v,{})},[s,i]),h=u("flex items-center justify-center flex-col col-span-2","active:scale-[94%] transition-all ease-in-out duration-100 border-r border-border_color_primary h-full"),b=u(r?"text-text_color_InPlayEventsScoreAndTime":"text-text_color_UpcomingEventsScoreAndTime","text-[8px] xs:text-[9px] md:text-[10px] font-semibold w-full text-center");return(0,n.jsx)(a.Fragment,{children:t?(0,n.jsx)("span",{className:u(h,"text-selection-none pl-[2px] pr-[2px] min-h-9"),children:c}):(0,n.jsx)("span",{className:u(h,"pl-[1px] pr-[1px]"),children:(0,n.jsx)("span",{className:b,children:m})})})}),y=(0,a.memo)(e=>{var t,l,a;return(0,n.jsx)("svg",{height:null!=(t=e.height)?t:"12",width:null!=(l=null==e?void 0:e.width)?l:"12",fill:null!=(a=null==e?void 0:e.fill)?a:"#000",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,n.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"})})}),w="text-selection-none w-full flex items-center justify-start",k="w-[5px] h-[5px] p-[1px] mr-[2px]",j="text-[11px] font-bold text-text_color_primary1 truncate sm:text-xs md:text-sm",_=(0,a.memo)(e=>{let{isTournamentWinner:t,showEventName:l,eventName:i="",eventAltName:o="",players:d}=e;if(l){let e=i||o,l=s.hn.find(t=>e.includes(t)),a=null!=l?e.split(l):null,r=Array.isArray(a)&&2===a.length;return(0,n.jsx)(n.Fragment,{children:r?a.map((e,l)=>(0,n.jsxs)("span",{className:w,children:[(0,n.jsx)("span",{className:k}),(0,n.jsxs)("span",{className:j,children:[0===l&&t?"\uD83C\uDFC6 ":"",e.trim()]})]},l)):(0,n.jsxs)("div",{className:w,children:[(0,n.jsx)("span",{className:k}),(0,n.jsxs)("span",{className:"text-[11px] font-bold text-text_color_primary1 line-clamp-2 break-words sm:text-xs md:text-sm",children:[t?"\uD83C\uDFC6 ":"",e]})]})})}return Array.isArray(d)&&0!==d.length?(0,n.jsx)(a.Fragment,{children:d.map((e,t)=>(0,n.jsxs)("span",{className:w,children:[(0,n.jsx)("span",{className:k,children:(0,r.Ff)(d[t])&&(0,n.jsx)(y,{height:"4",width:"4",fill:"var(--icon-color-primary1)"})}),(0,n.jsx)("span",{className:j,children:null==e?void 0:e.name})]},t))}):null}),N=(0,a.memo)(e=>{var t,l,a;return(0,n.jsx)("svg",{width:null!=(t=null==e?void 0:e.width)?t:"13",height:null!=(l=null==e?void 0:e.he
1ight)?l:"11",viewBox:"0 0 13 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:null==e?void 0:e.className,children:(0,n.jsx)("path",{d:"M11.8182 0H1.18182C0.525909 0 0 0.543889 0 1.22222V8.55556C0 9.22778 0.525909 9.77778 1.18182 9.77778H4.13636V11H8.86364V9.77778H11.8182C12.4682 9.77778 12.9941 9.22778 12.9941 8.55556L13 1.22222C13 0.543889 12.4682 0 11.8182 0ZM11.8182 8.55556H1.18182V1.22222H11.8182V8.55556ZM8.86364 4.88889L4.72727 7.33333V2.44444L8.86364 4.88889Z",fill:null!=(a=null==e?void 0:e.fill)?a:"#257B24"})})});var C=l(5531),I=l.n(C);let M="".concat(s.YP," w-full h-full items-center justify-center grid grid-cols-7 border-r border-border_color_primary"),F=(0,a.memo)(function(e){let{eventName:t,eventAltName:l,players:a,mtype:s}=e,i="TOURNAMENT_WINNER"===s||"WINNER"===s,o=i||0===a.length;return"Ball By Ball"===t?(0,n.jsxs)("div",{className:"col-span-5 text-selection-none w-full flex items-center justify-start pl-1.5 relative overflow-hidden h-full",children:[(0,n.jsx)("span",{className:"text-[13px] sm:text-sm font-semibold uppercase truncate text-transparent bg-clip-text bg-bg_text_brand_primary",children:"BALL BY BALL"}),(0,n.jsx)("span",{className:(0,r.cn)("shimmer"),"aria-hidden":!0})]}):(0,n.jsx)("div",{className:"col-span-5",children:(0,n.jsx)(_,{isTournamentWinner:i,showEventName:o,eventName:null!=t?t:"",eventAltName:l,players:a})})}),A=(0,a.memo)(e=>{let{scores:t,openDate:l,eventTypeId:a,isInPlay:s,eventName:i,eventAltName:o,players:d,mtype:c,isVideoAvailable:u,link:m}=e;return(0,n.jsxs)(I(),{href:m,className:(0,r.cn)(M,u?"relative":"","pr-2"),title:"".concat(i," - ").concat(o),prefetch:!0,children:[(0,n.jsx)(g,{scores:t,eventTypeId:a,isInPlay:s,openDate:l}),(0,n.jsx)(F,{eventName:i,eventAltName:o,players:2378962==a?[]:d,mtype:c}),u?(0,n.jsx)("span",{className:" absolute top-0.5 right-0.5",children:(0,n.jsx)(N,{height:"11",width:"13",fill:"var(--icon-color-primary1)"})}):null]})})},20930:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var n=l(3591);let a=(0,l(18543).memo)(e=>{var t,l,a,s,r;return(0,n.jsxs)("svg",{fill:null!=(t=null==e?void 0:e.fill)?t:"#ffffff",className:"".concat(null!=(l=null==e?void 0:e.className)?l:""),version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:null!=(a=null==e?void 0:e.width)?a:20,height:null!=(s=null==e?void 0:e.height)?s:20,viewBox:"0 0 32.707 32.707",xmlSpace:"preserve",stroke:null!=(r=null==e?void 0:e.stroke)?r:"#ffffff",children:[(0,n.jsx)("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),(0,n.jsx)("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsxs)("g",{id:"SVGRepo_iconCarrier",children:[" ",(0,n.jsxs)("g",{children:[" ",(0,n.jsx)("path",{d:"M21.477,4.511c0,2.487-2.021,4.508-4.508,4.508c-2.49,0-4.509-2.021-4.509-4.508c0-2.49,2.02-4.511,4.509-4.511 C19.458,0,21.477,2.021,21.477,4.511z M16.972,27.68c-1.386-0.002-2.513,1.119-2.517,2.508c-0.003,1.391,1.117,2.518,2.505,2.52 c1.39,0.004,2.517-1.117,2.519-2.506C19.484,28.811,18.361,27.684,16.972,27.68z M31.451,17.352c0-0.906-0.734-1.641-1.641-1.641 c-0.908,0-1.644,0.732-1.644,1.641c0,0.904,0.733,1.643,1.644,1.643C30.716,18.994,31.451,18.258,31.451,17.352z M6.995,17.352 c0-1.585-1.284-2.87-2.87-2.87s-2.869,1.285-2.869,2.87c0,1.584,1.283,2.869,2.869,2.869S6.995,18.936,6.995,17.352z M26.962,7.354 c-0.504-0.506-1.319-0.504-1.825,0c-0.505,0.506-0.505,1.328,0,1.832c0.506,0.506,1.321,0.506,1.825,0S27.466,7.86,26.962,7.354z M9.973,24.354c-1.152-1.146-3.019-1.146-4.17-0.002c-1.151,1.146-1.152,3.012,0,4.16c1.152,1.148,3.018,1.15,4.168,0 C11.125,27.367,11.125,25.502,9.973,24.354z M27.251,27.631c0.658-0.662,0.658-1.734-0.002-2.396 c-0.658-0.658-1.726-0.658-2.385,0.004c-0.658,0.66-0.658,1.732,0,2.395C25.525,28.293,26.591,28.293,27.251,27.631z M10.047,10.427c1.188-1.189,1.188-3.119,0-4.311c-1.188-1.189-3.115-1.189-4.305,0c-1.188,1.189-1.188,3.119,0.001,4.311 S8.858,11.618,10.047,10.427z"})," "]})," "]})]})})},24926:(e,t,l)=>{"use strict";l.d(t,{Fy:()=>i,w4:()=>o});var n=l(20432),a=l(18543),s=l(59662),r=l(25696);let i=e=>{var t;let{eventId:l}=e,a=(0,s.d4)(e=>e.authentication.decodedToken),{data:r,status:i,refetch:o}=(0,n.jG)({eId:l,memberCode:null!=(t=null==a?void 0:a.memberCode)?t:""},{skip:!(null==a?void 0:a.memberCode)});return{exposureData:r,exposureStatus:i,refetchExposure:o}},o=e=>{let{marketId:t,runnerId:l,eventId:n,setIsLaddedEnabled:o,disableCalculationWhileBetPlacing:d=!1}=e,{exposureData:c}=i({eventId:n}),u=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),m=(0,s.d4)(e=>
1e.newBetSlipStates.betSlipPrice),h=(0,s.d4)(e=>e.newBetSlipStates.betSlipStake),p=(0,a.useMemo)(()=>{if((null==u?void 0:u.marketId)===t&&u&&!1===d){let e=(null==u?void 0:u.isBookmakerOrMiniBookmaker)?(0,r._k)(Number(m)/100+1):m,t=0;h>0&&(t=(null==u?void 0:u.isFancy)||(null==u?void 0:u.isLineMarket)?h:h*e-h);let l=(null==u?void 0:u.side)===0?(null==u?void 0:u.isFancy)||(null==u?void 0:u.isLineMarket)?-t:t:-t;return{selectedRunnerData:l,otherThanSelectedRunnerData:(null==u?void 0:u.side)===0?-h:h}}return null},[u,m,h,t,d]),x=(0,a.useCallback)(e=>{let t=Math.abs(e)/10;return 0==t?0:1+t},[]),f=(0,a.useMemo)(()=>{var e,n,a;return!!(null==c||null==(e=c.result)?void 0:e.pnlBySelection)&&void 0!==((null==(n=c.result.pnlBySelection["".concat(t,"-").concat(l)])?void 0:n.pnl)||(null==(a=c.result.pnlBySelection[t])?void 0:a.pnl))},[c,t,l]);return(0,a.useEffect)(()=>{f?null==o||o(!0):null==o||o(!1)},[f,o]),(0,a.useMemo)(()=>{var e,n,a,s,r,i,o,m,h,f,b;let v=(null==u?void 0:u.marketId)===t&&(null==u||null==(e=u.runnerId)?void 0:e.toString())===l;if((null==c||null==(n=c.result)?void 0:n.pnlBySelection)&&Object.keys(null==c||null==(a=c.result)?void 0:a.pnlBySelection).length>0){let e="".concat(t,"-").concat(l),n="".concat(t),a=null!=(f=null==c||null==(i=c.result)||null==(r=i.pnlBySelection)||null==(s=r[e])?void 0:s.pnl)?f:null==c||null==(h=c.result)||null==(m=h.pnlBySelection)||null==(o=m[n])?void 0:o.pnl,d=0;if(v&&p?d=Number(p.selectedRunnerData):(null==u?void 0:u.marketId)===t&&p&&(d=Number(p.otherThanSelectedRunnerData)),isNaN(d)&&(d=0),d=Number(null==d?void 0:d.toFixed(2)),void 0==a||null==a){let e=d;isNaN(e)&&(e=0);let t=Number(null==e?void 0:e.toFixed(2));return 0===t?{pnlSuffix:0,existingPnl:0,pnlWhilePlacingBet:0,finalPnl:0}:{pnlSuffix:x(Number(t)),existingPnl:0,pnlWhilePlacingBet:d,finalPnl:t}}{let e=0;v&&p?e=Number(p.selectedRunnerData):(null==u?void 0:u.marketId)===t&&p&&(e=Number(p.otherThanSelectedRunnerData));let l=Number(a)+e;isNaN(l)&&(l=Number(null==a?void 0:a.toFixed(2)));let n=Number(null==l?void 0:l.toFixed(2));return{pnlSuffix:x(l),existingPnl:Number(null==(b=Number(a))?void 0:b.toFixed(2)),pnlWhilePlacingBet:Number(null==e?void 0:e.toFixed(2)),finalPnl:n}}}if(!1===d){let e=0;v&&p?e=Number(p.selectedRunnerData):(null==u?void 0:u.marketId)===t&&p&&(e=Number(p.otherThanSelectedRunnerData));let l=Number(null==e?void 0:e.toFixed(2));return{pnlSuffix:null,existingPnl:0,pnlWhilePlacingBet:l,finalPnl:l||null}}return{pnlSuffix:null,existingPnl:null,pnlWhilePlacingBet:null,finalPnl:null}},[c,l,t,p,null==u?void 0:u.marketId,null==u?void 0:u.runnerId])}},27330:(e,t,l)=>{"use strict";function n(e){if(!Array.isArray(e)||0===e.length)return null;let t=e.filter(e=>(null==e?void 0:e.status)==="OPEN"&&!(null==e?void 0:e.hidden));if(t.length>0)return t[t.length-1];let l=e.filter(e=>(null==e?void 0:e.status)==="SUSPENDED"&&!(null==e?void 0:e.hidden));return l.length>0?l[l.length-1]:null}function a(e,t,l){let a=Array.isArray(e)?e:[];if("4"!==String(l))return a;let s=n(t);return(null==s?void 0:s.id)?a.filter(e=>
1(null==e?void 0:e.id)!==s.id):a}l.d(t,{Wv:()=>n,Xs:()=>a})},30693:(e,t,l)=>{"use strict";l.d(t,{default:()=>i});var n=l(3591),a=l(66684),s=l(18543),r=l(82809);let i=(0,s.memo)(e=>{let{url:t,pushTo:l}=e,i=(0,a.useRouter)();return(0,s.useEffect)(()=>{window.open(t,"_self"),l&&i.push(l)},[t,l]),(0,n.jsx)(r.default,{})})},32376:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(3591),a=l(1953);let s=(0,l(18543).memo)(e=>{let{className:t="w-full flex items-center justify-center h-full pr-[2px] py-[1px] rounded-sm col-span-12",title:l="Live"}=e,{t:s}=(0,a.B)();return(0,n.jsx)("div",{title:l,className:t,children:(0,n.jsxs)("span",{className:"text-xs text-center w-full h-full flex items-center bg-bg_color_ballRunning text-text_color_suspendedFontColor font-bold justify-center rounded-sm gap-1.5 animate-pulse",children:[(0,n.jsxs)("span",{className:"relative inline-flex h-2 w-2",children:[(0,n.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-bg_Success opacity-70"}),(0,n.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full bg-bg_Success"})]}),(0,n.jsx)("span",{children:s("LIVE")})]})})})},37479:(e,t,l)=>{"use strict";l.d(t,{default:()=>c});var n=l(3591),a=l(18543),s=l(66684);let r=(0,a.memo)(e=>{var t;let{tabs:l,defaultTabId:s,activeTabId:r,onTabChange:i,className:o="",tabsContainerClassName:d="",tabButtonClassName:c="",activeTabClassName:u="",inactiveTabClassName:m="",contentClassName:h="",renderContent:p,indicatorType:x="underline",indicatorClassName:f="",enableAnimation:b=!0}=e,v=s||(null==(t=l[0])?void 0:t.id)||"",[g,y]=(0,a.useState)(v),w=(0,a.useRef)([]),k=(0,a.useRef)(null),[j,_]=(0,a.useState)({width:0,left:0}),N=null!=r?r:g,C=void 0!==r,I=(0,a.useCallback)(e=>{e!==N&&(C||y(e),null==i||i(e))},[N,C,i]),M=(0,a.useMemo)(()=>l.find(e=>e.id===N),[l,N]);(0,a.useEffect)(()=>{if("none"===x)return;let e=requestAnimationFrame(()=>{let e=l.findIndex(e=>e.id===N);if(e>=0&&w.current[e]&&k.current){let t=w.current[e];if(t){let e=k.current.getBoundingClientRect(),l=t.getBoundingClientRect();_({width:l.width,left:l.left-e.left})}}});return()=>cancelAnimationFrame(e)},[N,l,x]);let F=(0,a.useMemo)(()=>l.map((e,t)=>{let l=e.id===N;return(0,n.jsx)("button",{type:"button",ref:e=>{w.current[t]=e},onClick:()=>I(e.id),className:"relative z-10 ".concat(c," ").concat(l?u:m),children:e.label},e.id)}),[l,N,c,u,m,I]),A=(0,a.useMemo)(()=>({width:"".concat(j.width,"px"),left:"".concat(j.left,"px")}),[j.width,j.left]),B=(0,a.useMemo)(()=>{let e=b?"transition-all ease-in-out duration-200 transform-gpu":"",t="absolute z-[5] ".concat(e).trim(),l="filled"===x?"h-full":"bottom-0 h-0.5";return"".concat(t," ").concat(l," ").concat(f||"bg-primary")},[x,f,b]);return(0,n.jsxs)("div",{className:o,children:[(0,n.jsxs)("div",{ref:k,className:"relative ".concat(d),children:[F,"none"!==x&&(0,n.jsx)("div",{style:A,className:B})]}),M&&(p||(null==M?void 0:M.content))&&(0,n.jsx)("div",{className:h,children:p?p(M):null==M?void 0:M.content})]})});var i=l(25696);let o=(0,a.memo)(e=>{let{activeTab:t,onTabChange:l,showInPlayUpcomingTabs:a,options:s=[{label:"In Play",value:"inPlay"},{label:"Competitions",value:"competitions"}],className:o,enableAnimation:d=!0}=e;return a?(0,n.jsx)(r,{tabs:s.map(e=>({id:e.value,label:e.label})),activeTabId:t,onTabChange:e=>l(e),className:(0,i.cn)("w-full",o),tabsContainerClassName:"flex flex-row font-manrope-regular items-center justify-start gap-2.5",tabButtonClassName:"px-[25px] py-2 text-[13px] md:text-sm lg:text-base font-bold leading-4 active:scale-95",activeTabClassName:(0,i.cn)("bg-bg_brand_primary rounded-full","text-text_color_primary2"),inactiveTabClassName:"bg-bg_color_primary rounded-full text-text_color_primary1",indicatorType:"filled",indicatorClassName:"bg-bg_brand_primary rounded-full",enableAnimation:d}):null});var d=l(30156);function c(e){var t,l,r;let{activeTab:i,tabOptions:c}=e,u=(0,s.useRouter)(),m=(0,s.usePathname)(),h=(0,s.useSearchParams)(),p=null!=(r=null==(t=(0,d.v)())?void 0:t.width)?r:0,x=(null==c||null==(l=c[0])?void 0:l.value)||"inPlay",f=p>=1024;(0,a.useEffect)(()=>
1{if(!f||i===x)return;let e=new URLSearchParams(h.toString());e.delete("tab");let t=e.toString();u.replace(t?"".concat(m,"?").concat(t):m,{scroll:!1})},[i,x,f,m,u,h]);let b=(0,a.useCallback)(e=>{let t=((null==c?void 0:c.map(e=>e.value))||[]).includes(e)?e:x,l=new URLSearchParams(h.toString());t===x?l.delete("tab"):l.set("tab",t);let n=l.toString();u.replace(n?"".concat(m,"?").concat(n):m,{scroll:!1})},[x,m,u,h,c]),v=f?x:i;return(0,n.jsx)(o,{activeTab:v,onTabChange:b,showInPlayUpcomingTabs:!0,options:c})}},38771:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var n=l(18543),a=l(20432),s=l(59662);let r=e=>{let{eventId:t,eventTypeId:l}=e,r=(0,s.d4)(e=>e.authentication.isLoggedIn),i=(0,s.d4)(e=>e.authentication.isLoading),o=(0,n.useMemo)(()=>"4"!==l&&"1"!==l&&"2"!==l,[l]),d=(0,a.bK)({eventTypeId:l,eventId:t,isLoggedIn:r},{skip:i||!l||!t||o,selectFromResult:e=>{var t;let{data:l,isLoading:n}=e;return{widgetUrl:null==l||null==(t=l.result)?void 0:t.url,isWidgetUrlLoading:n}}});return{widgetUrl:null==d?void 0:d.widgetUrl,isWidgetUrlLoading:(null==d?void 0:d.isWidgetUrlLoading)||!1}}},47512:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var n=l(20432),a=l(59662);function s(e,t){let l=null==e?void 0:e.sortOrder,n=null==t?void 0:t.sortOrder;return -1===l&&-1===n?0:-1===l?1:-1===n?-1:(null!=l?l:0)-(null!=n?n:0)}let r=e=>{let{eventTypeId:t,idsToRemove:l=[],intervalTime:r=3e5,renameFootballToSoccer:i=!1,groupId:o}=e,d=(0,a.d4)(e=>e.authentication.isLoggedIn),c=(0,a.d4)(e=>e.authentication.isLoading),u=(0,n._4)({eventTypeId:t||"",isLoggedIn:d},{skip:c,pollingInterval:r,selectFromResult:e=>{let{data:n,isLoading:a}=e,r=(null==n?void 0:n.result)||[],d=t?r.filter(e=>{var l;return(null==e||null==(l=e.id)?void 0:l.toString())===(null==t?void 0:t.toString())}):[...r];if(o&&(d=d.flatMap(e=>{var t,l;return null!=(l=null==e||null==(t=e.children)?void 0:t.filter(e=>{var t;return(null==e||null==(t=e.id)?void 0:t.toString())===(null==o?void 0:o.toString())}))?l:[]})),l&&l.length>0){let e=new Set(l.map(e=>null==e?void 0:e.toString()));d=d.filter(t=>{var l;return!e.has(null==t||null==(l=t.id)?void 0:l.toString())})}let c=d.sort(s);return i&&c.length>0&&(c=c.map(e=>{let t=null==e?void 0:e.name;return"football"===t||t&&"football"===t.toLowerCase()?{...e,name:"Soccer"}:e})),{smaMenu:c,isSmaMenuLoading:a}}});return{smaMenu:null==u?void 0:u.smaMenu,isSmaMenuLoading:(null==u?void 0:u.isSmaMenuLoading)||c}}},47846:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var n=l(3591);let a=(0,l(18543).memo)(e=>{var t,l,a;return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:null!=(t=null==e?void 0:e.width)?t:"7",height:null!=(l=null==e?void 0:e.height)?l:"12",viewBox:"0 0 7 12",fill:"none",children:(0,n.jsx)("path",{d:"M5.3673 11.2346L0 5.8673L5.3673 0.5L6.32 1.4527L1.90539 5.8673L6.32 10.2819L5.3673 11.2346Z",fill:null!=(a=e.fill)?a:"#C10B32"})})})},49683:(e,t,l)=>{"use strict";l.d(t,{A:()=>m});var n=l(3591),a=l(76074),s=l(75950),r=l(1953),i=l(18543),o=l(59662),d=l(5531),c=l.n(d),u=l(32600);let m=(0,i.memo)(e=>{var t,l,d,m,h,p;let{tab:x="inPlay",showOpenBetsSection:f=!0,bgColor:b}=e,v=(0,o.d4)(e=>e.authentication.isLoggedIn),{t:g}=(0,r.B)(),y=(0,i.useMemo)(()=>b||("inPlay"===x?"bg-bg_inPlayBlockBg":"bg-bg_UpcomingBg"),[x,b]),{allOrderCount:w}=(0,u.kg)(),k=g("inPlay"===x?"In Play":"Upcoming Events");return(0,n.jsxs)("div",{className:" w-full flex items-center justify-between border-b border-border_color_primary rounded-t-[10px] py-1.5 px-[7px] ".concat(y),"aria-label":k,children:[(0,n.jsx)("div",{className:" flex items-center text-text_color_primary2 font-semibold text-[18px] tracking-wide justify-start w-full gap-[5px] ",children:"inPlay"===x?(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(a.A,{height:"29",width:"29",fill:"var(--icon-color-secondary)","aria-hidden":!0}),(0,n.jsx)("h2",{className:"m-0 p-0 font-inherit text-text_color_primary2 text-[18px] font-semibold tracking-wide",children:k})]}):(0,n.jsxs)(i.Fragment,{children:[(0,n.jsx)(s.A,{height:"20",width:"20",fill:"var(--icon-color-secondary)","aria-hidden":!0}),(0,n.jsx)("h2",{className:"m-0 p-0 font-inherit text-text_color_primary2 text-[18px] font-semibold tracking-wide",children:k})]})}),"inPlay"===x&&v&&f&&(0,n.jsxs)(c(),{href:"/open-bets",className:" w-max text-nowrap cursor-pointer no-underline",title:g("Open Bets Count"),"aria-label":"".concat(g("Open Bets")," ").concat(null!=(p=null==w||null==(t=w.result)?void 0:t.count)?p:0),children:[(0,n.jsx)("span",{className:" text-xs tracking-wide text-text_color_primary2 text-nowrap whitespace-nowrap font-normal",children:g("Open Bets")}),(0,n.jsx)("sup",{className:"font-features sups",children:(0,n.jsx)("span",{className:"text-x font-normal tracking-wide text-text_color_primary2 bg-bg_brand_primary min-w-4 min-h-4 text-center px-1 py-0.5 font-lato rounded-full",children:(null==w||null==(l=w.result)?void 0:l.count)&&(null==w||null==(d=w.result)?void 0:d.count)>
199?"99+":(null==w||null==(m=w.result)?void 0:m.count)?null==w||null==(h=w.result)?void 0:h.count:0})})]})]})})},53286:(e,t,l)=>{"use strict";l.d(t,{A:()=>f});var n=l(20432),a=l(18543),s=l(59662),r=l(16032),i=l(38771);let o={soccer:1,tennis:2,golf:3,cricket:4,"rugby-union":5,boxing:6,"horse-racing":7,"american-football":138,darts:3503,"greyhound-racing":4339,basketball:7522,snooker:1444001,politics:2378962,"mixed-martial-arts":0x19324a3},d={football:"soccer",election:"politics"},c={1:"football",2:"tennis",3:"golf",4:"cricket",5:"rugby-union",6:"boxing",7:"horse-racing",138:"american-football",3503:"darts",4339:"greyhound-racing",7522:"basketball",1444001:"snooker",2378962:"election",0x19324a3:"mixed-martial-arts"};var u=l(50358),m=l(96439),h=l(83232);(0,m.pU)({selectId:e=>e.id});var p=l(74952),x=l(12990);let f=e=>{var t,l,m;let{eventTypeId:f,eventId:b,intervalTime:v=3e3,getMarketAccordingToKey:g="",groupingBy:y="marketId",ignoreMarketsWhileGettingMarketNameAndIds:w=null}=e,{isLoggedIn:k,isLoading:j}=(0,s.d4)(e=>e.authentication),_=(0,s.d4)(e=>e.globalCommonStates.selectedLanguage),N=((0,s.d4)(e=>{var t,l;return null!=(l=null==(t=e.authentication.decodedToken)?void 0:t.currency)?l:null}),(0,s.d4)(e=>e.eventDetailsStates.startTime)),C=null==(t=(0,i.A)({eventId:b,eventTypeId:f}))?void 0:t.widgetUrl,I=(0,a.useMemo)(()=>{var e,t;return null!=(t=null==C||null==(e=C.match(/\/([\w.]+)\?token/))?void 0:e[1])?t:""},[C]),{handleAccToEventTypeId:M}={handleAccToEventName:(0,a.useCallback)(e=>{let t=(null==e?void 0:e.toLowerCase())||"",l=o[d[t]||t];return null!=l?l:4},[]),handleAccToEventTypeId:(0,a.useCallback)(e=>{let t=c[parseInt(e,10)];return null!=t?t:"cricket"},[])},F=(e,t)=>{var l,n,a,s,r,i;return JSON.stringify(null!=(r=null==(n=e.runners[t])||null==(l=n.back)?void 0:l.map(e=>({odds:e.price})))?r:[])+JSON.stringify(null!=(i=null==(s=e.runners[t])||null==(a=s.lay)?void 0:a.map(e=>({odds:e.price})))?i:[])},{data:A,isLoading:B,originalResult:S}=(0,n.Aq)({eventTypeId:f,eventId:b,isLoggedIn:k},{skip:j||!f||!b,pollingInterval:0===v?void 0:v,skipPollingIfUnfocused:!1,refetchOnFocus:!0,refetchOnReconnect:!0,selectFromResult:e=>{var t,l,n;if(!(null==(t=e.data)?void 0:t.result))return{...e,data:void 0,originalResult:null==(n=e.data)?void 0:n.result};let a=function(e,t,l,n){let a=null,s=!1,r=null,i={},o=[],d=[],c=[],u=[],m=[],p=[],x=[],f=[],b=[];for(let n=0;n<e.length;n++){var v,g,y,w,k,j,_,N,C,I,M,F;let A=e[n];if(t(null==A?void 0:A.id)||(null==A?void 0:A.hidden))continue;let B=null!=(_=null==(v=A.name)?void 0:v.toLowerCase())?_:"",S=null!=(N=A.id)?N:"unknown",E=null==(g=A.tabGroupName)?void 0:g.toLowerCase(),O=Number(A.tabGroupIndex),L=(null==(y=A.op)?void 0:y.toLowerCase())==="betfair";!a&&B.includes("winner")&&(a=A),!s&&"MATCH_ODDS"===A.mtype&&A.runners.length>=3&&(s=!0),r||(r=A),(0,h.gw)({marketBettingType:A.btype,marketType:A.mtype})&&m.push(A),(0,h.KO)({mtype:A.mtype,name:A.name,id:A.id})&&((null==(C=A.id)?void 0:C.endsWith("LT_SB"))?b.push(A):f.push(A)),(null==(w=A.mtype)?void 0:w.includes("OVER_UNDER"))&&p.push(A);let P="fancy"===E&&0===O&&(null==(k=A.id)?void 0:k.endsWith("FY")),D=(0,h.gw)({marketBettingType:A.btype,marketType:A.mtype}),T=(0,h.KO)({mtype:A.mtype,name:A.name,id:A.id});Array.isArray(l)&&l.length>0&&(l.includes("fancy")&&P||l.includes("line")&&D||l.includes("bookmaker")&&T)||x.push({id:S,name:null!=(M=A.name)?M:"",competitionId:null!=(F=null==(I=A.competition)?void 0:I.id)?F:""}),null!=i[S]||(i[S]=[]),i[S].push(A),P?o.push(A):"premium cricket"===E&&1===O&&(null==(j=A.id)?void 0:j.endsWith("BR"))?d.push(A):"TIED_MATCH"===A.mtype&&L?c.push(A):u.push(A)}return{winnerMarket:a,detectedTestMatch:s,firstMarket:r,groupedById:i,lineMarkets:m,overUnderMarkets:p,fancyMarkets:o,marketNameAndIds:x,premiumMarket:d,tieMarket:c,otherMarkets:u,bookmakerMarkets:f,nextBallMarkets:b,hasEventEnded:0===e.length,groupedFancyMarkets:{}}}(e.data.result||[],()=>!1,w,0),s={status:e.data.status,success:e.data.success,result:[],...a};return{...e,data:s,originalResult:null==(l=e.data)?void 0:l.result}}}),E=(0,a.useMemo)(()=>{if(S&&0!==S.length)return(0,x.nX)(S)},[S]),O=(0,a.useMemo)(()=>f&&b?{eventTypeId:f,eventId:b,isLoggedIn:k}:null,[f,b,k]);(0,p.Q$)(E,O);let L=(0,a.useRef)(!1);(0,a.useEffect)(()=>{var e,t,l,n,a,s,i,o,d,c;if(!(null==A?void 0:A.winnerMarket)||L.current)return;let u=null==A?void 0:A.winnerMarket,m=3===u.runners.length;(0,r.UI)(null==(e=u.event)?void 0:e.id,I,null==(t=u.runners[0])?void 0:t.name,null==(l=u.runners[0])?void 0:l.name,null==(n=u.runners[0])?void 0:n.name,null==(a=u.runners[1])?void 0:a.name,null==(s=u.runners[1])?void 0:s.name,null==(i=u.runners[1])?void 0:i.name,null==(o=u.event)?void 0:o.openDate,null==(d=u.status)?void 0:d.toLowerCase(),null==(c=u.competition)?void 0:c.name,M(u.eventTypeId),F(u,0),m?F(u,1):"",m?F(u,2):F(u,1),null==_?void 0:_.shortLabel),L.current=!0},[null==A?void 0:A.winnerMarket]);let P=(0,s.wA)(),D=(0,a.useMemo)(()=>{var e;return"marketId"!==y?null:g?decodeURIComponent(g):null==A||null==(e=A.firstMarket)?void 0:e.id},[g,null==A||null==(l=A.firstMarket)?void 0:l.id]),T=(0,a.useMemo)(()=>{var e,t,l,n;return D?null!=(t=null==A||null==(e=A.groupedById)?void 0:e[D])?t:[]:null!=(n=null==A||null==(l=A.groupedById)?void 0:l[D])?n:[]},[null==A?void 0:A.groupedById,g]),R=(0,a.useMemo)(()=>{var e,t,l,n;return(null==A||null==(t=A.firstMarket)||null==(e=t.event)?void 0:e.openDate)||(null==T||null==(n=T[0])||null==(l=n.event)?void 0:l.openDate)},[null==A?void 0:A.firstMarket,T]);return(0,a.useEffect)(()=>{(null==A?void 0:A.detectedTestMatch)&&P((0,u.Ci)(!0)),!N&&R&&P((0,u.gJ)(R))},[null==A?void 0:A.detectedTestMatch,R]),{marketsData:null!=T?T:[],isLoading:B||j,hasEventEnded:!B&&(null==A?void 0:A.hasEventEnded),lineMarkets:null==A?void 0:A.lineMarkets,overUnderMarkets:null==A?void 0:A.overUnderMarkets,fancyMarkets:null==A?void 0:A.fancyMarkets,marketNameAndIds:null==A?void 0:A.marketNameAndIds,firstMarket:null!=(m=null==A?void 0:A.firstMarket)?m:null,premiumMarket:null==A?void 0:A.premiumMarket,tieMar
1ket:null==A?void 0:A.tieMarket,otherMarkets:null==A?void 0:A.otherMarkets,winnerMarket:null==A?void 0:A.winnerMarket,groupedFancyMarkets:null==A?void 0:A.groupedFancyMarkets,bookmakerMarkets:null==A?void 0:A.bookmakerMarkets,nextBallMarkets:null==A?void 0:A.nextBallMarkets}}},69552:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var n=l(3591);let a=(0,l(18543).memo)(e=>{let{labelForMarket:t,labelIcon:l,labelClassName:a,minHeight:s}=e;return(0,n.jsxs)("div",{className:" flex flex-col w-full items-center justify-center ".concat(s||""),children:[(0,n.jsx)("div",{className:" flex flex-row items-center justify-evenly w-full",children:(0,n.jsx)("span",{children:l&&l})}),(0,n.jsx)("span",{className:" ".concat(a||" text-sm md:text-bas"),children:decodeURIComponent(null!=t?t:"")})]})})},73080:(e,t,l)=>{"use strict";l.d(t,{CompetetionDetailsSkeleton:()=>g,default:()=>y});var n=l(3591),a=l(1953),s=l(20432),r=l(59662),i=l(18543),o=l(5245),d=l(66684),c=l(95969),u=l(39357),m=l(69552),h=l(25696),p=l(49683),x=l(78182),f=l(44809),b=l(30156),v=l(83232);let g=()=>(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)("div",{className:(0,h.cn)("w-full flex items-center justify-between border-b border-border_color_primary rounded-t-[10px] py-1.5 px-[7px]","bg-bg_competetionInPlayUpComingBg"),children:(0,n.jsx)("div",{className:(0,h.cn)(o.fh,"h-5 w-24"),"aria-hidden":!0})}),(0,n.jsx)("div",{className:(0,h.cn)(o.nO),children:Array.from({length:5}).map((e,t)=>(0,n.jsx)(x.MY,{},t))})]}),y=(0,i.memo)(e=>{var t,l,y,w,k,j,_;let{eventTypeId:N,groupId:C,competitionName:I,incomingData:M}=e,{t:F}=(0,a.B)(),A=(0,r.d4)(e=>e.authentication.isLoggedIn),B=null==(t=(0,b.v)())?void 0:t.width,{matchesAccToInPlayAndUpcoming:S,isOddsGroupLoading:E}=(e=>{var t,l,n;let{eventTypeId:a,groupId:i,pollingInterval:o=2e3,incomingData:d}=e,c=(0,r.d4)(e=>e.authentication.isLoggedIn),u=(0,r.d4)(e=>e.authentication.isLoading),{data:m,isLoading:h,error:p}=(0,s.lj)({eventTypeId:a,groupId:i,isLoggedIn:c},{skip:u,pollingInterval:0===o?void 0:o}),x=null!=(t=null==m?void 0:m.inPlayMatches)?t:null==d?void 0:d.filter(e=>e.inPlay);return{isOddsGroupLoading:h,oddsGroupError:p,matchesAccToInPlayAndUpcoming:{inPlayMatches:x,upcomingMatches:null!=(l=null==m?void 0:m.upcomingMatches)?l:null==d?void 0:d.filter(e=>!e.inPlay),allMatches:null!=(n=null==m?void 0:m.filteredMatches)?n:d}}})({eventTypeId:N,groupId:C,pollingInterval:(0,o.pY)(A),incomingData:M}),O=(0,i.useCallback)(()=>{if(I){let e=I.split("-");return null==e?void 0:e.join(" ")}return""},[I]),L=(0,d.useRouter)(),P=(0,r.wA)();(0,i.useEffect)(()=>(P((0,c.GD)({title:O(),backButtonClickFunction:()=>{L.back()}})),()=>{P((0,c.GD)(u.EG))}),[O()]);let D=(null!=(j=null==S||null==(l=S.inPlayMatches)?void 0:l.length)?j:0)>0,T=(null!=(_=null==S||null==(y=S.upcomingMatches)?void 0:y.length)?_:0)>0;return E||void 0==E?(0,n.jsx)(g,{}):D||T?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"w-full h-full px-2 space-y-2",children:[D?(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)(p.A,{tab:"inPlay",showOpenBetsSection:!1,bgColor:"bg-bg_competetionInPlayUpComingBg"}),(0,n.jsx)("div",{className:(0,h.cn)(o.nO),children:null==S||null==(w=S.inPlayMatches)?void 0:w.map(e=>(0,n.jsx)(i.Fragment,{children:(0,n.jsx)(i.Fragment,{children:(0,n.jsx)(x.FW,{event:e,isInPlay:!0})},e.id)},e.id))})]}):null,T?(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)(p.A,{tab:"upcoming",showOpenBetsSection:!1,bgColor:"bg-bg_competetionInPlayUpComingBg"}),(0,n.jsx)("div",{className:(0,h.cn)(o.nO),children:null==S||null==(k=S.upcomingMatches)?void 0:k.map(e=>(0,n.jsx)(i.Fragment,{children:(0,n.jsx)(x.FW,{event:e,isInPlay:!1})},e.id))})]}):null]}),B<1024?(0,n.jsx)(f.default,{isMobile:!0}):null]}):(0,n.jsx)(m.A,{labelForMarket:"".concat(F("No")," ").concat(F("Events Found for")," ").concat(O()),labelClassName:" text-text_color_primary1 font-semibold text-[14px] py-[4px] px-[2px] ",labelIcon:(0,v.L8)(Number(N)),minHeight:"h-[60dvh]"})})},75950:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var n=l(3591);let a=(0,l(18543).memo)(e=>{var t,l,a,s;return(0,n.jsxs)("svg",{width:null!=(t=null==e?void 0:e.width)?t:"16",height:null!=(l=null==e?void 0:e.he
1ight)?l:"16",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",fill:null!=(a=null==e?void 0:e.fill)?a:"#fff",strokeWidth:null!=(s=null==e?void 0:e.strokeWidth)?s:1,className:null==e?void 0:e.className,children:[(0,n.jsx)("rect",{width:"16",height:"16",id:"icon-bound",fill:"none"}),(0,n.jsx)("path",{d:"M7,9h2V4H7V9z M9,11c0-0.553-0.447-1-1-1s-1,0.447-1,1s0.447,1,1,1S9,11.553,9,11z M16,8c0-4.419-3.581-8-8-8S0,3.581,0,8 s3.581,8,8,8S16,12.419,16,8z M14,8c0,1.603-0.625,3.109-1.756,4.244C11.109,13.375,9.603,14,8,14s-3.109-0.625-4.244-1.756 C2.625,11.109,2,9.603,2,8s0.625-3.109,1.756-4.244C4.891,2.625,6.397,2,8,2s3.109,0.625,4.244,1.756C13.375,4.891,14,6.397,14,8z"})]})})},76127:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(3591),a=l(18543);let s=(0,a.memo)(e=>{let{type:t,options:l,activeTab:s,setActiveTab:r,className:i="shadow rounded-lg ",textStyles:o,btnPaddings:d,btnClassName:c,activeTabTextColor:u,inActiveTabTextColor:m,bottomLineProp:h,bottomLineColor:p="bg-bg_brand_primary",filledColor:x="bg-bg_text_brand_primary",roundedFilled:f="rounded-lg",unFilledColor:b="bg-none",defaultGap:v=0,bottomLineClassName:g="rounded-lg"}=e,y=(0,a.useCallback)(e=>"filled"===t?e===s?"text-text_color_primary2":"text-text_color_tertiary1":e===s?"text-text_brand_primary":"text-text_color_tertiary1",[s,t]);return(0,n.jsxs)("div",{id:"step-selectMode",className:"relative flex w-[100%] overflow-clip ".concat(i),children:[l.map((e,t)=>(0,n.jsxs)("button",{style:{zIndex:10},onClick:()=>r(e.value),className:" flex items-center justify-center w-full gap-1.5 tracking-wider ".concat(c," ").concat(d||"p-3"," ").concat(o||"text-sm font-semibold ".concat(y(e.value))," ").concat(e.value===s?u:"".concat(m," ").concat(b)),children:[e.startAdornment&&(0,n.jsx)("span",{children:e.startAdornment}),e.img?e.img:e.label,e.endAdornment&&(0,n.jsx)("span",{children:e.endAdornment})]},t)),(0,n.jsx)("div",{style:{zIndex:9,width:"".concat((100-(l.length-1)*v)/l.length,"%"),left:"".concat(l.findIndex(e=>e.value===s)*((100+v)/l.length),"%"),bottom:0},className:"w-[48%] ".concat("filled"===t?"absolute z-10 h-full transition-all ease-in-out":"border"===t?"absolute z-10 h-full transition-all ease-in-out p-1 border-2 border-border_color_brand_primary rounded-lg":"absolute z-10 transition-all ease-in-out ".concat(p," ").concat(g," ").concat(h||"h-[2px]")),children:"filled"===t&&(0,n.jsx)("div",{className:"w-full h-full ".concat(x," ").concat(f)})})]})})},78182:(e,t,l)=>{"use strict";l.d(t,{FW:()=>k,J4:()=>b,MY:()=>j,kv:()=>f});var n=l(3591),a=l(83232),s=l(85621),r=l(25696),i=l(5245),o=l(18543),d=l(20347),c=l(59662),u=l(71266),m=l(80952),h=l(30156),p=l(32376);let x={price:0,size:0,line:null};function f(e){var t,l,n,s,r,i,o,d;return{isSuspended:(null==e||null==(t=e.status)?void 0:t.toLowerCase())==="suspended",isBallRunning:(null==e||null==(l=e.statusLabel)?void 0:l.toLowerCase())==="ball running",isFancy:(0,a.fx)({marketId:null!=(n=null==e?void 0:e.id)?n:"",marketBettingType:null!=(s=null==e?void 0:e.btype)?s:"",marketType:null!=(r=null==e?void 0:e.mtype)?r:""}),isBookmakerOrMiniBookmaker:(0,a.KO)({mtype:null!=(i=null==e?void 0:e.mtype)?i:"",name:null!=(o=null==e?void 0:e.name)?o:"",id:null!=(d=null==e?void 0:e.id)?d:""}),isTournamentWinner:(null==e?void 0:e.mtype)==="TOURNAMENT_WINNER"||(null==e?void 0:e.mtype)==="WINNER"}}function b(e){var t,l,d,m;let{runnerPrice:p,type:x,isFancy:f,isBookmakerOrMiniBookmaker:b,isDisabled:v,onClick:g,isSelected:y}=e,w={price:null!=(l=null==p?void 0:p.price)?l:0,size:null!=(d=null==p?void 0:p.size)?d:0,line:null!=(m=null==p?void 0:p.line)?m:null},k=(0,a.Mt)({runnerDetails:w,isFancy:f,isBookmakerOrMiniBookmaker:b}),j=(0,a.Cp)({runnerDetails:w,isFancy:f,isBookmakerOrMiniBookmaker:b}),_=(0,c.wA)(),N=null==(t=(0,h.v)())?void 0:t.width,C=(0,o.useCallback)(()=>{var e,t;null==g||g();let l=null!=(e=null==p?void 0:p.size)?e:0,n=null!=(t=null==p?void 0:p.line)?t:null;_((0,u.Vg)(f?null==p?void 0:p.price:k)),_((0,u.LR)(l)),_((0,u.YG)(n)),N>=1024&&_((0,u.c7)("Betslip"))},[g,k,null==p?void 0:p.size,null==p?void 0:p.line,null==p?void 0:p.price,f,N]),I=(0,o.useMemo)(()=>(0,r.cn)(i.gj,y?"bg-transparent text-text_color_primary1 border ".concat("back"===x?"border-backBtn":"border-layBtn"):"back"===x?i.Wr:i.Hw,"w-full block"),[x,y,i.Wr,i.Hw]);return(0,n.jsx)(s.A,{className:I,price:k,size:j,type:x,isDisabled:v||(null==w?void 0:w.price)===0||!(null==w?void 0:w.price),onClick:C})}let v=[0,2,1];function g(e){var t,l;return null!=(l=null==e||null==(t=e.back)?void 0:t[0])?l:x}function y(e){var t,l;return null!=(l=null==e||null==(t=e.lay)?void 0:t[0])?l:x}function w(e){let{runners:t,status:l,isBettable:a,isFancy:s,isBookmakerOrMiniBookmaker:r,btype:i,mtype:d,oddsType:m,eventTypeId:h,marketId:p,betDelay:x,eventId:f,eventName:w,groupById:k}=e,j=v.map(e=>{var l;return null!=(l=(null!=t?t:[])[e])?l:null}),_={isDisabled:(null==l?void 0:l.toLowerCase())==="suspended"||!a,isFancy:s,isBookmakerOrMiniBookmaker:r},N=(0,c.wA)(),C=(0,o.useCallback)((e,l)=>{var n,a,o;let c={side:+("back"!==e),selectionId:null==t||null==(n=t[l])?void 0:n.id,btype:i,mtype:d,oddsType:m,eventTypeId:h,marketId:p,betSlipRef:0,fromOneClick:0,betDelay:x,runner:null==t||null==(a=t[l])?void 0:a.name,runnerId:null==t||null==(o=t[l])?void 0:o.id,eventId:f,eventName:w,groupById:k,isFancy:s,isBookmakerOrMiniBookmaker:r,isLineMarket:!1,index:l};N((0,u.oj)(c))},[t,i,d,m,h,p,x,f,w,k,s,r]),I=(0,c.d4)(e=>e.newBetSlipStates.betSlipData),M=(0,o.useCallback)((e,l)=>{var n;return(null==I?void 0:I.marketId)===p&&(null==I?void 0:I.selectionId)===(null==t||null==(n=t[e])?void 0:n.id)&&(null==I?void 0:I.side)===+("back"!==l)},[null==I?void 0:I.marketId,null==I?void 0:I.selectionId,p,t,null==I?void 0:I.side]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"col-span-12 w-full overflow-x-auto overflow-y-hidden sm:hidden no-scrollbar scroll-smooth h-full",children:(0,n.jsxs)("div",{className:"grid min-w-[200%] grid-cols-12 h-full gap-x-[1px]",children:[j.map((e,t)=>(0,n.jsx)(b,{runnerPrice:g(e),type:"back",onClick:()=>C("back",t),isSelected:M(t,"back"),..._},"back-slot-".concat(t))),j.map((e,t)=>(0,n.jsx)(b,{runnerPrice:y(e),type:"lay",onClick:()=>C("lay",t),isSelected:M(t,"lay"),..._},"lay-slot-".concat(t)))]})}),(0,n.jsx)("div",{className:"hidden sm:contents",children:j.map((e,t)=>(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(b,{runnerPrice:g(e),type:"back",..._,onClick:()=>C("back",t),isSelected:M(t,"back")}),(0,n.jsx)(b,{runnerPrice:y(e),type:"lay",..._,onClick:()=>C("lay",t),isSelected:M(t,"lay")})]},"pair-slot-".concat(t)))})]})}function k(e){var t,l,a,s,u,x,b,v,g,y,k,j,_,N,C,I,M,F,A,B,S,E,O;let{event:L,isInPlay:P}=e,{isSuspended:D,isBallRunning:T,isFancy:R,isBookmakerOrMiniBookmaker:W,isTournamentWinner:U}=f(L),H=(0,c.d4)(e=>e.newBetSlipStates.betSlipData),z=null==(t=(0,h.v)())?void 0:t.width,V=(0,o.useMemo)(()=>{var e,t,l,n,a,s,o;
1if(!L)return"";let d=null==L||null==(e=L.event)?void 0:e.id,c=null==L?void 0:L.eventTypeId,u=(0,r.iy)(c),m=(null==L||null==(t=L.event)?void 0:t.name)||(null==L||null==(l=L.event)?void 0:l.altName),h=i.hn.find(e=>m.includes(e)),p=null!=h?m.split(h):null,x=Array.isArray(p)&&2===p.length,f="";return f=U||2378962===Number(c)?null!=(a=null==L||null==(n=L.event)?void 0:n.name)?a:"":x?"".concat(p[0]," vs ").concat(p[1]):null!=(o=null!=(s=null==L?void 0:L.name)?s:null==L?void 0:L.altName)?o:"","/".concat(u,"/").concat(encodeURIComponent(f),"/").concat(c,"/").concat(d)},[U,L]);return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(d.A,{scores:null,openDate:null!=(b=null==L||null==(l=L.event)?void 0:l.openDate)?b:"",eventTypeId:null!=(v=Number(null==L?void 0:L.eventTypeId))?v:4,isInPlay:P,eventName:null==L||null==(a=L.event)?void 0:a.name,eventAltName:null!=(g=null==L||null==(s=L.event)?void 0:s.altName)?g:"",players:[],mtype:null==L?void 0:L.mtype,isVideoAvailable:null!=(y=null==L?void 0:L.isStreamAvailable)&&y,link:V}),D?(0,n.jsx)("div",{className:(0,r.cn)(i.As,"h-12 gap-x-[1px] px-[1px] py-[1px]"),children:2378962===Number(null!=(k=null==L?void 0:L.eventTypeId)?k:0)?(0,n.jsx)(p.A,{title:"Live - ".concat(null==L?void 0:L.name)}):(0,n.jsx)(i.Mg,{})}):T?(0,n.jsx)("div",{className:(0,r.cn)(i.As,"h-12 gap-x-[1px] px-[1px] py-[1px]"),children:(0,n.jsx)(i.vn,{})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:(0,r.cn)(i.As,"h-12 gap-x-[1px] px-[1px] py-[1px]"),children:(0,n.jsx)(w,{runners:null!=(j=null==L?void 0:L.runners)?j:[],status:null!=(_=null==L?void 0:L.status)?_:"",isBettable:null!=(N=null==L?void 0:L.isBettable)&&N,isFancy:R,isBookmakerOrMiniBookmaker:W,btype:null!=(C=null==L?void 0:L.btype)?C:"",mtype:null!=(I=null==L?void 0:L.mtype)?I:"",oddsType:null!=(M=null==L?void 0:L.oddsType)?M:"",eventTypeId:null!=(F=null==L?void 0:L.eventTypeId)?F:"",marketId:null!=(A=null==L?void 0:L.id)?A:"",betDelay:null!=(B=null==L?void 0:L.betDelay)?B:0,eventId:null!=(S=null==L||null==(u=L.event)?void 0:u.id)?S:"",eventName:null!=(E=null==L||null==(x=L.event)?void 0:x.name)?E:"",groupById:null!=(O=null==L?void 0:L.groupById)?O:""})})}),(null==H?void 0:H.marketId)===(null==L?void 0:L.id)&&z<1024?(0,n.jsx)("div",{className:"col-span-12",children:(0,n.jsx)(m.A,{})}):null]})}function j(){return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsxs)("div",{className:(0,r.cn)(i.YP,"w-full h-full items-center justify-center border-r border-border_color_primary px-2 py-2 flex gap-2"),children:[(0,n.jsx)("div",{className:(0,r.cn)(i.fh,"min-w-[3.375rem] w-[3.375rem] h-8 shrink-0")}),(0,n.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,n.jsx)("div",{className:(0,r.cn)(i.fh,"h-3.5 w-full")}),(0,n.jsx)("div",{className:(0,r.cn)(i.fh,"h-3.5 w-3/4")})]})]}),(0,n.jsx)("div",{className:(0,r.cn)(i.As,"h-12 gap-x-[1px] px-[1px] py-[1px]"),children:Array.from({length:6}).map((e,t)=>(0,n.jsx)("div",{className:(0,r.cn)(i.fh,"col-span-2 min-h-[2rem]"),"aria-hidden":!0},t))})]})}},80898:(e,t,l)=>{"use strict";l.d(t,{default:()=>tt});var n=l(3591),a=l(18543),s=l(59662),r=l(82213),i=l(48160),o=l(20432);let d=[{marketId:"static-premium-match-betting",marketName:"Match Betting",category:"Match Markets",description:"Who will win the match?",ruleItems:["All match betting will be settled in accordance with official competition rules.","In matches affected by adverse weather, bets will be settled according to the official result.","If there is no official result, all bets will be void.","In the case of a tie, if the official competition rules do not determine a winner, then dead-heat rules will apply. In competitions where a bowl off or super over determines a winner, bets will be settled on the official result.","In First Class Matches, if the official result is a tie, bets will be settled as a dead-heat between both teams. Bets on the draw will be settled as losers.","If a match is abandoned due to external factors, then bets will be void unless a winner is declared based on the official competition rules.","If a match is cancelled, then all bets will be void if it is not restarted within 48 hours of its advertised start time.","If a team forfeits or concedes a match before or after the designated start time, all bets will be void if there have not been any deliveries bowled. Bets will settle in line with competition rules if a team forfeits or concedes a match after any deliveries have been bowled."]},{marketId:"static-premium-match-betting-double-chance",marketName:"Match Betting: Double Chance",category:"Match Markets",description:"Will the match result be any two of the three options given?",ruleItems:["A tie will be settled as a dead heat.","All match betting will be settled in accordance with official competition rules.","If there is no official result, all bets will be void."]},{marketId:"static-premium-match-betting-draw-no-bet",marketName:"Match Betting: Draw No Bet",category:"Match Markets",description:"Who will win the match given that all bets will be void if the match is a draw?",ruleItems:["A tie will be settled as a dead heat.","All match betting will be settled in accordance with official competition rules.","If there is no official result, all bets will be void."]},{marketId:"static-premium-toss-winner",marketName:"Toss Winner",category:"Match Markets",description:"Who will win the toss?",ruleItems:["If no toss takes place, all bets will be void.","Other equivalents are considered a toss e.g. bat flip."]},{marketId:"static-premium-toss-win-double",marketName:"Toss/Win Double",category:"Match Markets",description:"Who will win the toss, and then who will win the game?",ruleItems:["Toss Winner rules as above.","Match Betting rules as above."]},{marketId:"static-premium-tied-match",marketName:"Tied Match",category:"Match Markets",description:"Will the match be tied?",ruleItems:["All bets will be settled according to the official result.","If the match is abandoned or there is no official result, all bets will be void.","For First Class matches a tie is when the side batting second is bowled out for a second time with scores level.","Settles as Yes if the match goes to a Super Over."]},{marketId:"static-premium-most-fours",marketName:"Most Fours",category:"Match Markets",description:"Which team will hit the most fours?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Only fours scored from the bat (off any delivery â legal or not) will count towards the total fours. Overthrows, all run fours and extras do not count.","Fours scored in a super over do not count.","In First Class games, only first innings fours will count."]},{marketId:"static-premium-most-sixes",marketName:"Most Sixes",category:"Match Markets",description:"Which team will hit the most sixes?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Only sixes scored from the bat (off any delivery â legal or not) will count towards the total sixes. Overthrows, all run sixes and extras do not count.","Sixes scored in a super over do not count.","In First Class games, only first innings sixes will count."]},{marketId:"static-premium-most-extras",marketName:"Most Extras",category:"Match Markets",description:"Which team will have the most extras added to their batting score?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","All wide deliveries, no balls, byes, leg byes and penalty runs in the match count towards the final result. If there are runs off the bat as well as extras from the same delivery, the runs off the bat do not count towards the final total.","Extras in a super over do not count.","In First Class games, only first innings extras will count."]},{marketId:"static-premium-most-run-outs-conceded",marketName:"Most Run Outs Conceded",category:"Match Markets",description:"Which team will c
1oncede the most run outs in the match?",ruleItems:['A run out "conceded" means that a member of that team will be run out while batting.',"In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the scheduled overs in either innings due to external factors, including bad weather, unless settlement has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Run Outs in a super over do not count.","In First Class games, only first innings run outs will count."]},{marketId:"static-premium-highest-first-over",marketName:"Highest First Over",category:"Match Markets",description:"Which team will score the most runs in the first over of their innings?",ruleItems:["The first over must be completed for bets to stand unless settlement has already been determined. In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In First Class matches the market refers only to each team's first innings.","Extras and penalty runs in the particular over count towards settlement.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other formats."]},{marketId:"static-premium-most-runs-in-groups-of-overs",marketName:"Most Runs in Groups of Overs",category:"Match Markets",description:"Which team will score the most runs after the first specified number of overs?",ruleItems:["Which team will score the most runs after the first specified number overs of their innings?","If the specified number of overs are not complete bets will be void, unless the team is all out, declares, reaches their target or settlement of the bet has already been determined.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In First Class matches the market refers only to each team's first innings.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other limited overs formats."]},{marketId:"static-premium-highest-opening-partnership",marketName:"Highest Opening Partnership",category:"Match Markets",description:"Which team will score the most runs before losing their first wicket?",ruleItems:["If the batting team reaches the end of their allotted overs, reaches their target or declares before the first wicket falls, the result will be the total amassed.","For settlement purposes, a batter retiring hurt does not count as a wicket.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","In First Class matches the market refers only to each team's first innings."]},{marketId:"static-premium-team-highest-opening-partnership-first-over-group",marketName:"Team to have Highest Opening Partnership, First Over and Specified Group",category:"Match Markets",description:"Will the specified team have the highest score for first dismissal, most runs in first over and specified group?",ruleItems:["Will the specified team have the highest score for first dismissal, most runs in respective first over and specified group of overs.",'As "Highest Opening Partnership", "Highest First Over" and "Most Runs in Groups of Overs".','Bets will be void if any of the specified head-to-head markets are void. The specified team must win all three of the mentioned head-to-head markets to settle as "Yes".']},{marketId:"static-premium-match-runs",marketName:"Match Runs",category:"Match Markets",description:"How many runs will be scored in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Runs scored in a super over do not count."]},{marketId:"static-premium-match-fours",marketName:"Match Fours",category:"Match Markets",description:"How many fours will be hit in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Only fours scored from the bat (off any delivery â legal or not) will count towards the total fours. Overthrows, all run fours and extras do not count.","Fours scored in a super over do not count."]},{marketId:"static-premium-match-sixes",marketName:"Match Sixes",category:"Match Markets",description:"How many sixes will be hit in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Only sixes scored from the bat (off any delivery â legal or not) will count towards the total sixes. Overthrows and extras do not count.","Sixes scored in a super over do not count."]},{marketId:"static-premium-match-extras",marketName:"Match Extras",category:"Match Markets",description:"How many extras will be scored in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","All wide deliveries, no balls, byes, leg byes and penalty runs in the match count towards the final result. If there are runs off the bat as well as extras from the same delivery, the runs off the bat do not count towards the final total.","Extras in a super over do not count."]},{marketId:"static-premium-match-wides",marketName:"Match Wides",category:"Match Markets",description:"How many wides will be scored in total in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Any runs resulting from a wide delivery, except penalty runs, will count towards the final total.","Wides in a super over do not count."]},{marketId:"static-premium-match-run-outs",marketName:"Match Run Outs",category:"Match Markets",description:"How many run outs will there be in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the scheduled overs in either innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Run outs in a super over do not count."]},{marketId:"static-premium-match-wickets",marketName:"Match Wickets",category:"Match Markets",description:"How many wickets will fall in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Retired hurt does not count as a dismissal.","Wickets in a super over do not count."]},{marketId:"static-premium-match-ducks",marketName:"Match Ducks",category:"Match Markets",description:"How many ducks will be scored in total in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","A duck is classed as someone being dismissed for zero runs. Ret
1ired hurt does not count as a dismissal.","Ducks in a super over do not count."]},{marketId:"static-premium-match-milestones",marketName:"Match Milestones",category:"Match Markets",description:"How many of the specified milestone (50/100) will be scored in total in the match?",ruleItems:["This is determined by how many individual innings of 50+ or 100+ are scored in the match. A score of 100 or more would count as both a 50 and a 100.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion."]},{marketId:"static-premium-maximum-over-in-match",marketName:"Maximum Over in Match",category:"Match Markets",description:"How many runs will be scored in the highest scoring over of the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","All runs, including extras, count towards settlement.","Super overs do not count.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other limited overs formats."]},{marketId:"static-premium-match-top-batter",marketName:"Match Top Batter",category:"Match Markets",description:"Which batter will score the most runs in the match?",ruleItems:["The result of this market is determined on the batter with the highest individual score in the match.","In limited overs matches, bets will be void if it has not been possible to complete at least 50% of the overs scheduled to be bowled in either innings at the time the bet was placed due to external factors, including bad weather.","Bets will settle if the game is scheduled to have at least 50% of the original overs in both innings, and the match is complete, regardless of the number of overs completed for the individual innings and match to reach its conclusion.","Top batter bets for First Class matches apply only to the first innings of each team. In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined. If a player was named at the toss, but later is removed as a concussion sub, that player will still be counted, as will the replacement player.","If a batter does not bat, but was named in the starting XI, bets on that batter will stand.","If a batter is substituted in after the in-play market has been offered, the original market will be removed and settled as normal even if the substitute scores the highest individual score. A new market with updated selections may be offered. If a batter is substituted into the match after the batting innings is over, bets on that batter will be void.","When two or more players score the same number of runs, dead-heat rules will apply.","Runs scored in a super over do not count."]},{marketId:"static-premium-match-top-bowler",marketName:"Match Top Bowler",category:"Match Markets",description:"Which bowler will take the most wickets in the match?",ruleItems:["The result of this market is determined on the bowler with the most wickets in the match.","In limited overs matches, bets will be void if it has not been possible to complete at least 50% of the overs scheduled to be bowled in either innings at the time the bet was placed due to external factors, including bad weather.","Bets will settle if the game is scheduled to have at least 50% of the original overs in both innings, and the match is complete, regardless of the number of overs completed for the individual innings and match to reach its conclusion.","Top bowler bets for First Class matches apply only to the first innings of each team. In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined. If a player was named at the toss, but later is removed as a concussion sub, that player will still be counted, as will the replacement player.","If a bowler does not bowl, but was named in the starting XI, bets on that bowler will stand.","If a bowler is substituted in after the in-play market has been offered, the original market will be removed and settled as normal even if the substitute takes the most wickets. A new market with updated selections may be offered. If a bowler is substituted into the match after the bowling innings is over, bets on that bowler will be void.","If two or more bowlers have taken the same number of wickets, the bowler who has conceded the fewest runs will be the winner. If there are two or more bowlers with the same wickets taken and runs conceded, dead heat rules will apply. Wickets taken in a super over don't count.","If no bowlers take a wicket in both innings, then all bets will be void."]},{marketId:"static-premium-team-of-top-batter",marketName:"Team of Top Batter",category:"Match Markets",description:"Which team will c
1ontain the top batter in the match?",ruleItems:["Same rules apply as Match Top Batter, with dead heat rules applying if the runs scored by the top batter on both teams is the same. If settlement is already determined at the time a match is curtailed, bets will stand."]},{marketId:"static-premium-team-of-top-bowler",marketName:"Team of Top Bowler",category:"Match Markets",description:"Which team will contain the top bowler in the match?",ruleItems:["Same rules apply as Match Top Bowler, with dead heat rules applying if the wickets taken by the top bowler on both teams is the same. If settlement is already determined at the time a match is curtailed, bets will stand."]},{marketId:"static-premium-player-of-the-match",marketName:"Player of the Match",category:"Match Markets",description:"Who will be named player of the match?",ruleItems:["Bets will be settled on the officially declared player of the match.","Dead-heat rules apply.","If no player of the match is officially declared then all bets will be void.","All players who played in the match will be settled, including substitutes. If a player does not play, bets will be void."]},{marketId:"static-premium-runs-in-first-innings",marketName:"Runs in First Innings",category:"Match Markets",description:"How many runs will be scored in the first innings of the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in the first innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined or the first innings of the match is complete. The innings will be deemed complete if the team is all out or declares.","In First Class matches, this market refers to just the first innings of the match, not both teams' first innings."]},{marketId:"static-premium-first-innings-lead",marketName:"First Innings Lead",category:"Match Markets",description:"What will be the run deficit between first innings in a First Class match?",ruleItems:["Both first innings must be completed. Dead heat rules apply in the case of a tie.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined."]},{marketId:"static-premium-fifty-hundred-in-match",marketName:"Fifty/Hundred in Match",category:"Match Markets",description:"Will there be a fifty/hundred scored in the match?",ruleItems:["Any score of 50 and above counts as a fifty. 100 and above for hundred.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined."]},{marketId:"static-premium-fifty-hundred-in-first-innings",marketName:"Fifty/Hundred in First Innings",category:"Match Markets",description:"Will there be a fifty/hundred scored in the first innings of the match?",ruleItems:["Any score of 50 and above counts as a fifty. 100 and above for hundred.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled in the first innings due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined or the first innings of the match is complete. The innings will be deemed complete if the team is all out or declares.","In First Class matches, this market refers to just the first innings of the match, not both teams' first innings."]},{marketId:"static-premium-highest-individual-score",marketName:"Highest Individual Score",category:"Match Markets",description:"What will be the highest score by a batter in the match?",ruleItems:["In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to be bowled due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. Bets will settle if the game is scheduled to have at least 80% of the original total match overs, and the match is complete, regardless of the number of overs completed for the match to reach its conclusion.","In drawn First Class matches, bets will be void if fewer than 200 overs have been bowled, unless settlement of the bet has already been determined.","Dead heat rules apply."]},{marketId:"static-premium-runs-off-delivery",marketName:"Runs off Delivery",category:"Delivery Markets",description:"How many runs will be scored off the specified delivery?",ruleItems:["The result will be determined by the number of runs added to the team total, off the specified delivery.","For settlement purposes, all illegal balls count as deliveries. For example, if an over starts with a wide, then the first delivery will be settled as 1 and, although there has not been a legal ball bowled, the next ball will be deemed as delivery 2 for that over.","If a delivery leads to free hit or a free hit is to be re-bowled because of an illegal delivery, the runs scored off the additional delivery do not count.","All runs, whether off the bat or not are included. For example, a wide with three extra runs taken equates to 4 runs in total off that delivery. This also includes penalty runs which occur during the delivery. For example, if the ball hits a fielder's helmet on the outfield (5 penalty runs) while the batters run 1, this would result in 6 runs off that delivery.",'For the Hundred, an over will c
1onsist of 5 legal deliveries, so a full innings will be made up of 20 overs. For example, if there are no illegal deliveries, the 5th ball bowled in the innings will be displayed as "X runs off 5th delivery, 1st over" and the 6th ball bowled in the innings will be displayed as "X runs off 1st delivery, 2nd over". If there is an illegal delivery in the first five balls bowled, the 6th ball bowled in the innings will be displayed as "X runs off 6th delivery, 1st over". All other rules remain the same as other formats.',"Any penalty runs added prior to an innings commencing will not count towards settlement of any individual delivery in the relevant innings."]},{marketId:"static-premium-exact-runs-off-delivery",marketName:"Exact Runs off Delivery",category:"Delivery Markets",description:"Exact runs scored off the specified delivery.",ruleItems:["How many runs will be scored off the specified delivery?",'As "Runs off Delivery".']},{marketId:"static-premium-runs-in-over",marketName:"Runs in Over",category:"Over Markets",description:"How many runs will be scored in the specified over?",ruleItems:["The specified over must be completed for bets to stand unless settlement has already been determined. If an innings ends during an over then that over will be deemed to be complete unless the innings is ended due to external factors, including bad weather, in which case all bets will be void, unless settlement has already been determined.","If the over does not commence for any reason, all bets will be void.","Extras and penalty runs in the particular over count towards settlement unless penalty runs cause the innings or match end before a ball is bowled in the over, in which case that over will be void. Any penalty runs added prior to an innings commencing will not count towards settlement of any individual over in the relevant innings. Any penalty runs awarded after an over has concluded but before another has commenced will count for settlement in the next over bowled.","If a run out occurs in the bowler's run up to end the game, and no deliveries have been completed in that over, bets will be void.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other formats."]},{marketId:"static-premium-exact-runs-in-over",marketName:"Exact Runs in Over",category:"Over Markets",description:"Exact runs scored in the specified over.",ruleItems:["How many runs will be scored in the specified over?",'As "Runs in Over".',"Results will be considered determined if the runs in the specified over are within the highest range (X Runs +'), or the current result is already higher than an individual selection.","If an over is incomplete due to external factors, any selection whose outcome has already been determined will settle. All other selections, whose outcomes haven't yet been determined, will be void.","For example, if an over is incomplete due to external factors, with 4 runs scored in it, the 0â3 selections would be settled as a loss, and all other yet determined selections would be settled as void."]},{marketId:"static-premium-runs-in-over-ranged",marketName:"Runs in Over â Ranged",category:"Over Markets",description:"Ranged selection for runs in the specified over.",ruleItems:["How many runs will be scored in the specified over?",'As "Runs in Over".','Results will be considered determined if the runs in the specified over are within the highest range ("X Runs +"), or the current result is already higher than the bounds of an individual range.',"If an over is incomplete due to external factors, any range whose outcome has already been determined will settle. All other ranges, whose outcomes cannot yet be determined, will be void.","For example, if an over is incomplete due to external factors, with 4 runs scored in it, the 0â3 selection would be settled as a loss, and all other yet determined selections would be settled as void."]},{marketId:"static-premium-boundary-in-over",marketName:"Boundary in Over",category:"Over Markets",description:"Will there be a boundary scored in the specified over?",ruleItems:['As "Runs in Over".',"Only boundaries scored from the bat (off any delivery â legal or not) will count as a boundary. Overthrows, all run fours and extras do not count as boun
1daries."]},{marketId:"static-premium-wicket-in-over",marketName:"Wicket in Over",category:"Over Markets",description:"Will a wicket fall in the specified over?",ruleItems:["As \"Runs in Over\" except that if a run out occurs in the bowler's run up, a wicket is deemed to have taken place in that bowler's over.","For settlement purposes, any wicket will count, including run outs. A batter retiring hurt does not count as a wicket. If a batter is timed out or retired out then the wicket is deemed to have taken place on the previous ball. Retired hurt does not count as a dismissal."]},{marketId:"static-premium-over-odd-even",marketName:"Over Odd/Even",category:"Over Markets",description:"Will the number of runs in the specified over be odd or even?",ruleItems:["Will the number of runs scored in the specified over be odd or even?",'As "Runs in Over".',"Zero is an even number."]},{marketId:"static-premium-runs-in-groups-of-overs",marketName:"Runs in Groups of Overs",category:"Group Markets",description:"How many runs will be scored in the specified number of overs?",ruleItems:["If the specified number of overs is not complete the bet will be void, unless the team is all out, declares, reaches their target or settlement of the bet has already been determined.","Extras and penalty runs in the particular group of overs count towards settlement of that group.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to have been bowled at the time the bet was placed due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction. In these cases, a new market may be created for the same group of overs.","In drawn First Class matches, bets will be void if the number of overs in question is not complete, unless settlement of the bet has already been determined. If the specified number of overs is complete, bets will settle.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other limited overs formats."]},{marketId:"static-premium-wickets-in-groups-of-overs",marketName:"Wickets in Groups of Overs",category:"Group Markets",description:"How many wickets will fall in the specified number of overs?",ruleItems:["If the specified number of overs are not complete then bets will be void, unless the team is all out, declares, reaches their target or settlement of the bet has already been determined.","In limited overs matches, bets will be void if it has not been possible to complete at least 80% of the overs scheduled to have been bowled at the time the bet was placed due to external factors, including bad weather, unless settlement of the bet has already been determined before the reduction.","For settlement purposes, if a batter is timed out or retired out then the wicket is deemed to have taken place on the previous ball. Retired hurt does not count as a dismissal.","For the Hundred, an over will consist of 5 legal deliveries, so a full innings will be made up of 20 overs. All other rules remain the same as other limited overs formats."]},{marketId:"static-premium-wickets-in-groups-of-overs-ranged",marketName:"Wickets in Groups of Overs - Ranged",category:"Group Markets",description:"Ranged selection for wickets in the specified group of overs.",ruleItems:["How many wickets will fall in the specified number of overs?",'As "Wickets in Groups of Overs".',"Results will be considered determined if the wickets in the specified group of overs are within the highest range ('X Wickets +'), or the current result is already higher than the bounds of an individual range.","For example, if a game is reduced to less than 80% of the scheduled overs at the time the bet was placed, and 2 wickets had occurred before the reduction in the named group, the 0â1 selection would be settled as a loss, and all other undetermined selections would be settled as void."]},{marketId:"static-premium-runs-in-groups-of-overs-ranged",marketName:"Runs in Groups of Overs â Ranged",category:"Group Markets",description:"Ranged selection for runs in the specified group of overs.",ruleItems:["How many runs will be scored in the specified number of overs?",'As "Runs in Groups of Overs".',"Results will be considered determined if the runs in the specified group of overs are within the highest range ('X Runs +'), or the current result is already higher than the bounds of an individual range.","For example, if a game is reduced to less than 80% of the scheduled overs at the time the bet was placed, and 30 runs had been scored before the reduction in the named group, the 0â29 selection would be settled as a loss, and all other undetermined selections would be settled as void."]},{marketId:"static-premium-runs-in-session",marketName:"Runs in Session",category:"Group Markets",description:"How many runs will be scored in the specified session?",ruleItems:["The result is determined by the total number of runs scored in the specified session, regardless of which team has scored them.","If fewer than 20 overs are bowled in a session, bets will be void unless settlement has already been determined."]}],c=["Match Markets","Delivery Markets","Over Markets","Group Markets","Innings Markets","Player Markets","Partnership Markets","One-sided Markets"].map(e=>({category:e,rules:d.filter(t=>t.category===e)})).filter(e=>e.rules.length>0);var u=l(10600);let m=(0,a.memo)(e=>{var t,l,a,s,r;return(0,n.jsxs)("svg",{width:null!=(t=null==e?void 0:e.width)?t:"30",height:null!=(l=null==e?void 0:e.he
1ight)?l:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("mask",{id:"path-1-inside-1_3039_16413",fill:"white",children:(0,n.jsx)("path",{d:"M30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0C23.2843 0 30 6.71573 30 15ZM2.08392 15C2.08392 22.1334 7.86664 27.9161 15 27.9161C22.1334 27.9161 27.9161 22.1334 27.9161 15C27.9161 7.86664 22.1334 2.08392 15 2.08392C7.86664 2.08392 2.08392 7.86664 2.08392 15Z"})}),(0,n.jsx)("path",{d:"M30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0C23.2843 0 30 6.71573 30 15ZM2.08392 15C2.08392 22.1334 7.86664 27.9161 15 27.9161C22.1334 27.9161 27.9161 22.1334 27.9161 15C27.9161 7.86664 22.1334 2.08392 15 2.08392C7.86664 2.08392 2.08392 7.86664 2.08392 15Z",fill:null!=(a=null==e?void 0:e.fill)?a:"#9D9D9D",stroke:null!=(s=null==e?void 0:e.fill)?s:"#9D9D9D",strokeWidth:"2",mask:"url(#path-1-inside-1_3039_16413)"}),(0,n.jsx)("path",{d:"M15.7071 9.29289C15.3166 8.90237 14.6834 8.90237 14.2929 9.29289L7.92893 15.6569C7.53841 16.0474 7.53841 16.6805 7.92893 17.0711C8.31946 17.4616 8.95262 17.4616 9.34315 17.0711L15 11.4142L20.6569 17.0711C21.0474 17.4616 21.6805 17.4616 22.0711 17.0711C22.4616 16.6805 22.4616 16.0474 22.0711 15.6569L15.7071 9.29289ZM16 11V10H14V11H16Z",fill:null!=(r=null==e?void 0:e.fill)?r:"#9D9D9D"})]})}),h=(0,a.memo)(e=>{let{id:t,title:l,subtitle:a,children:s}=e;return(0,n.jsxs)("details",{id:t,className:"group overflow-hidden rounded-lg border border-border_color_primary1 bg-bg_color_primary transition-all duration-200 hover:border-border_color_brand_primary",children:[(0,n.jsxs)("summary",{className:"relative flex cursor-pointer list-none items-start gap-2 px-3 py-3 text-left transition-colors hover:bg-bg_color_quaternary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border_color_brand_primary sm:gap-3 sm:px-4 sm:py-3.5 [&::-webkit-details-marker]:hidden [&[open]]:border-b [&[open]]:border-border_color_primary1 [&[open]]:bg-bg_color_quaternary",children:[(0,n.jsx)("span",{className:"absolute inset-y-2 left-0 w-[3px] rounded-r-full bg-bg_color_brand_primary1 opacity-0 transition-opacity duration-200 group-open:opacity-100","aria-hidden":!0}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5 pl-1 sm:gap-1",children:[(0,n.jsx)("span",{className:"break-words text-xs font-semibold leading-snug text-text_color_primary1 sm:text-sm sm:leading-5",children:l}),a?(0,n.jsx)("span",{className:"break-words text-[11px] leading-relaxed text-text_color_primary3 xs:text-xs",children:a}):null]}),(0,n.jsx)("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center transition-transform duration-200 ease-in-out group-open:rotate-180 sm:h-[18px] sm:w-[18px]","aria-hidden":!0,children:(0,n.jsx)(m,{height:"16",width:"16",fill:"var(--icon-color-primary)"})})]}),(0,n.jsx)("div",{className:"bg-bg_color_quaternary px-3 pb-3 pt-2.5 sm:px-4 sm:pb-4 sm:pt-3",children:s})]})}),p=(0,a.memo)(e=>{let{rules:t}=e,l=(0,a.useCallback)(e=>{if(!e)return{__html:""};let t=e.replaceAll("\\n","").replace(/â¢/g," ");return{__html:t=t.replace(/<span([^>]*)>/gi,"<div$1>").replace(/<\/span>/gi,"</div>").replace(/(<br\s*\/?>){1,}/gi,"").replace(/(<[^>]+) style=".*?"/gi,"$1")}},[]);return 0===t.length?null:(0,n.jsx)("div",{className:"space-y-2","aria-label":"Event rules",children:t.map((e,t)=>(0,n.jsx)(h,{id:"event-rule-".concat(e.marketId,"-").concat(t),title:e.marketName,children:(0,n.jsx)("div",{className:"rounded-md border border-border_color_primary1 bg-bg_color_primary px-2.5 py-2 sm:px-3 sm:py-2.5",children:(0,n.jsx)(u.default,{html:l(e.rules).__html,title:"Rules for ".concat(e.marketName),className:"prose prose-sm max-w-none break-words leading-relaxed text-text_color_primary1 [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_p]:mb-2 [&_p]:text-xs [&_p]:sm:text-[13px] [&_li]:text-xs [&_li]:sm:text-[13px]"})})},"".concat(e.marketId,"-").concat(t)))})}),x=(0,a.memo)(e=>{let{id:t,badge:l,title:a,description:s,count:r}=e;return(0,n.jsx)("header",{id:t,className:"rounded-lg border border-border_color_brand_primary bg-bg_color_quaternary px-3 py-2.5 sm:px-4 sm:py-3",children:(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2 sm:gap-3",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5 sm:space-y-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"h-1 w-5 flex-shrink-0 rounded-full bg-bg_color_brand_primary1 sm:w-6","aria-hidden":!0}),(0,n.jsx)("span",{className:"text-[9px] font-bold uppercase tracking-widest text-text_brand_primary xs:text-[10px] sm:text-xs",children:l})]}),(0,n.jsx)("h3",{className:"break-words text-xs font-semibold text-text_color_primary1 sm:text-sm",children:a}),(0,n.jsx)("p",{className:"break-words text-[11px] leading-relaxed text-text_color_tertiary2 xs:text-xs",children:s})]}),(0,n.jsxs)("span",{className:"flex-shrink-0 rounded-full border border-border_color_primary1 bg-bg_color_primary px-2 py-0.5 text-[9px] font-semibold text-text_brand_primary xs:px-2.5 xs:py-1 xs:text-[10px] sm:text-xs",children:[r," rule",1!==r?"s":""]})]})})}),f=(0,a.memo)(e=>{let{id:t,label:l,count:a}=e;return(0,n.jsxs)("div",{id:t,className:"flex items-center gap-2 sm:gap-3",children:[(0,n.jsx)("span",{className:"min-w-0 break-words text-[9px] font-bold uppercase tracking-wider text-text_brand_primary xs:text-[10px] sm:tracking-widest sm:text-xs",children:l}),(0,n.jsx)("div",{className:"h-px min-w-[1.5rem] flex-1 bg-border_color_primary1"}),(0,n.jsx)("span",{className:"flex-shrink-0 rounded-full bg-bg_color_quaternary px-1.5 py-0.5 text-[9px] font-semibold text-text_color_tertiary2 xs:px-2 xs:text-[10px] sm:text-xs",children:a})]})}),b=(0,a.memo)(e=>{let{categoryGroups:t}=e,l=t.reduce((e,t)=>
1e+t.rules.length,0);return 0===l?null:(0,n.jsxs)("section",{"aria-label":"Premium market rules",className:"mt-1 space-y-3 sm:space-y-4",children:[(0,n.jsx)(x,{id:"section-premium-rules",badge:"Premium",title:"Premium Market Rules",description:"Settlement guidelines by market category",count:l}),(0,n.jsx)("div",{className:"space-y-3 sm:space-y-4",children:t.map((e,t)=>(0,n.jsxs)("div",{className:"space-y-1.5 sm:space-y-2",children:[(0,n.jsx)(f,{id:"premium-category-".concat(t),label:e.category,count:e.rules.length}),(0,n.jsx)("div",{className:"space-y-2",children:e.rules.map(e=>(0,n.jsx)(h,{id:"premium-rule-".concat(e.marketId),title:e.marketName,subtitle:e.description,children:(0,n.jsx)("ol",{className:"space-y-1.5 sm:space-y-2",children:e.ruleItems.map((t,l)=>(0,n.jsxs)("li",{className:"flex items-start gap-2 rounded-md border border-border_color_primary1 bg-bg_color_primary px-2.5 py-2 sm:gap-3 sm:px-3 sm:py-2.5",children:[(0,n.jsx)("span",{className:"mt-px flex h-4 w-4 flex-shrink-0 items-center justify-center rounded bg-bg_color_brand_primary1 text-[9px] font-bold text-text_color_primary2 xs:h-5 xs:w-5 xs:text-[10px]",children:l+1}),(0,n.jsx)("span",{className:"min-w-0 flex-1 break-words text-xs leading-relaxed text-text_color_primary1 sm:text-[13px]",children:t})]},"".concat(e.marketId,"-item-").concat(l)))})},e.marketId))})]},e.category))})]})}),v=(0,a.memo)(e=>{var t;let{eventTypeId:l,eventId:d,className:u=""}=e,m=(0,s.d4)(e=>e.authentication.decodedToken),h=(0,s.d4)(e=>e.authentication.isLoggedIn),x=(0,a.useMemo)(()=>h&&(null==m?void 0:m.memberCode)?"".concat(m.memberCode,"/").concat(l,"/").concat(d):"notLoggedIn/".concat(l,"/").concat(d),[h,null==m?void 0:m.memberCode,l,d]),{data:f,isLoading:v,isError:g,refetch:y}=(0,o.dj)({endPoint:x},{skip:!d||!l}),[w,k]=(0,a.useState)(""),j=w.trim().toLowerCase(),_=null!=(t=null==f?void 0:f.result)?t:[],N=(0,a.useMemo)(()=>j?_.filter(e=>e.marketName.toLowerCase().includes(j)||e.rules.toLowerCase().includes(j)):_,[_,j]),C=(0,a.useMemo)(()=>j?c.map(e=>({category:e.category,rules:e.rules.filter(e=>e.marketName.toLowerCase().includes(j)||e.description.toLowerCase().includes(j)||e.ruleItems.some(e=>e.toLowerCase().includes(j)))})).filter(e=>e.rules.length>0):c,[j]),I=N.length+C.reduce((e,t)=>e+t.rules.length,0);return v?(0,n.jsxs)("div",{className:"w-full space-y-3 px-2 py-2 ".concat(u),children:[(0,n.jsx)("div",{className:"h-9 w-full animate-pulse rounded-md bg-bg_color_quaternary"}),[1,2,3].map(e=>(0,n.jsx)("div",{className:"h-14 animate-pulse rounded-lg bg-bg_color_quaternary"},e))]}):(0,n.jsxs)("div",{className:"flex h-full w-full flex-col ".concat(u),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 border-b border-border_color_primary1 px-2 py-2 sm:gap-3 sm:px-3 sm:py-2.5",children:[(0,n.jsx)(i.A,{placeholder:"Search rulesâ¦",value:w,onChange:e=>k(e.target.value),className:"flex-1 rounded-md border border-border_color_primary1 py-1.5 pl-1.5 pr-2 transition-all focus-within:border-border_color_brand_primary",startAdornment:(0,n.jsx)(r.A,{height:"18",width:"18",fill:"var(--icon-color-primary)"}),inputClassName:"pl-2 text-xs text-text_color_primary1 sm:text-sm"}),(0,n.jsxs)("span",{className:"flex-shrink-0 rounded-full bg-bg_color_quaternary px-2 py-0.5 text-[10px] font-medium text-text_color_tertiary2 xs:px-2.5 xs:py-1 xs:text-xs",children:[I," rule",1!==I?"s":""]})]}),(0,n.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 py-2 sm:px-3 sm:py-3",children:[0===I?(0,n.jsx)("p",{className:"py-12 text-center text-xs text-text_color_tertiary2 sm:text-sm",children:"No rules match your search."}):(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(p,{rules:N}),N.length>0&&C.length>0&&(0,n.jsx)("div",{className:"my-3 h-px bg-border_color_primary1"}),(0,n.jsx)(b,{categoryGroups:C})]}),g?(0,n.jsxs)("div",{className:"mt-2 flex flex-col gap-2 rounded-lg border border-border_color_primary1 bg-bg_color_quaternary px-3 py-2.5 sm:flex-row sm:items-center sm:justify-between sm:px-4",children:[(0,n.jsx)("p",{className:"text-[11px] text-text_color_tertiary2 xs:text-xs",children:"Event rules could not be loaded."}),(0,n.jsx)("button",{type:"button",onClick:()=>y(),className:"flex-shrink-0 rounded-md bg-bg_text_brand_primary px-3 py-1 text-[11px] font-medium text-text_color_primary2 transition-opacity hover:opacity-90 xs:text-xs sm:ml-3",children:"Retry"})]}):null]})]})});var g=l(76127),y=l(68564),w=l(87287);let k=(0,a.memo)(e=>{var t,l,a,s;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:null!=(t=null==e?void 0:e.width)?t:"20",height:null!=(l=null==e?void 0:e.he
1ight)?l:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_1875_77994)",children:[(0,n.jsx)("path",{d:"M13.2984 9.60764L9.14541 6.58877C8.993 6.4783 8.79068 6.46166 8.62363 6.54751C8.45525 6.6327 8.3501 6.80574 8.3501 6.99275V13.0285C8.3501 13.2175 8.45525 13.3899 8.62363 13.4751C8.69485 13.511 8.77271 13.529 8.85125 13.529C8.95374 13.529 9.05756 13.4964 9.14541 13.4318L13.2984 10.4156C13.4295 10.3191 13.506 10.17 13.506 10.0116C13.5067 9.85056 13.4281 9.70215 13.2984 9.60764Z",fill:null!=(a=null==e?void 0:e.fill)?a:"#C10B32"}),(0,n.jsx)("path",{d:"M10.0003 0C4.47639 0 0 4.47639 0 10.0003C0 15.5223 4.47639 19.9973 10.0003 19.9973C15.5229 19.9973 20 15.5216 20 10.0003C20.0007 4.47639 15.5229 0 10.0003 0ZM10.0003 18.3288C5.40015 18.3288 1.67049 14.6012 1.67049 10.0003C1.67049 5.40148 5.40015 1.66916 10.0003 1.66916C14.5998 1.66916 18.3288 5.40082 18.3288 10.0003C18.3295 14.6012 14.5998 18.3288 10.0003 18.3288Z",fill:null!=(s=null==e?void 0:e.fill)?s:"#C10B32"})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_1875_77994",children:(0,n.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})});var j=l(78437);let _=(0,a.memo)(e=>{var t,l,a,s,r,i;return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:null!=(t=null==e?void 0:e.width)?t:"21",height:null!=(l=null==e?void 0:e.height)?l:"20",viewBox:"0 0 21 20",fill:"none",children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_1717_31137)",children:[(0,n.jsx)("path",{d:"M10.5 19.8571C8.55041 19.8571 6.64463 19.279 5.02363 18.1959C3.40264 17.1128 2.13922 15.5733 1.39316 13.7721C0.647093 11.971 0.451889 9.98903 0.832229 8.07694C1.21257 6.16484 2.15137 4.40846 3.52992 3.02992C4.90846 1.65137 6.66484 0.712569 8.57694 0.332229C10.489 -0.0481111 12.471 0.147093 14.2721 0.893157C16.0733 1.63922 17.6128 2.90264 18.6959 4.52363C19.779 6.14463 20.3571 8.05041 20.3571 9.99997C20.3541 12.6133 19.3146 15.1188 17.4667 16.9667C15.6188 18.8146 13.1133 19.8541 10.5 19.8571ZM10.5 1.5714C8.83296 1.5714 7.20338 2.06572 5.81731 2.99187C4.43123 3.91801 3.35092 5.23437 2.71298 6.77449C2.07505 8.31461 1.90813 10.0093 2.23335 11.6443C2.55857 13.2793 3.36131 14.7811 4.54007 15.9599C5.71883 17.1386 7.22065 17.9414 8.85564 18.2666C10.4906 18.5918 12.1853 18.4249 13.7254 17.787C15.2656 17.149 16.5819 16.0687 17.5081 14.6826C18.4342 13.2966 18.9285 11.667 18.9285 9.99997C18.926 7.76536 18.0371 5.62302 16.457 4.04291C14.8769 2.4628 12.7346 1.57397 10.5 1.5714Z",fill:"url(#paint0_linear_1717_31137)"}),(0,n.jsx)("path",{d:"M15.6915 11.5172H10.5629C10.3735 11.5172 10.1918 11.4419 10.0578 11.308C9.92389 11.174 9.84863 10.9923 9.84863 10.8029V5.67376C9.84863 5.48432 9.92389 5.30264 10.0578 5.16868C10.1918 5.03473 10.3735 4.95947 10.5629 4.95947C10.7524 4.95947 10.934 5.03473 11.068 5.16868C11.2019 5.30264 11.2772 5.48432 11.2772 5.67376V10.0886H15.6915C15.8809 10.0886 16.0626 10.1639 16.1966 10.2978C16.3305 10.4318 16.4058 10.6135 16.4058 10.8029C16.4058 10.9923 16.3305 11.174 16.1966 11.308C16.0626 11.4419 15.8809 11.5172 15.6915 11.5172Z",fill:"url(#paint1_linear_1717_31137)"})]}),(0,n.jsxs)("defs",{children:[(0,n.jsxs)("linearGradient",{id:"paint0_linear_1717_31137",x1:"0.642822",y1:"21.0893",x2:"22.3721",y2:"18.475",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:null!=(a=null==e?void 0:e.fill)?a:"#C10B32"}),(0,n.jsx)("stop",{offset:"1",stopColor:null!=(s=null==e?void 0:e.fill)?s:"#6A061C"})]}),(0,n.jsxs)("linearGradient",{id:"paint1_linear_1717_31137",x1:"9.84863",y1:"11.927",x2:"17.076",y2:"11.0576",gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:null!=(r=null==e?void 0:e.fill)?r:"#C10B32"}),(0,n.jsx)("stop",{offset:"1",stopColor:null!=(i=null==e?void 0:e.fill)?i:"#6A061C"})]}),(0,n.jsx)("clipPath",{id:"clip0_1717_31137",children:(0,n.jsx)("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.5)"})})]})]})});var N=l(47846),C=l(30156),I=l(71883),M=l(26396),F=l(16361),A=l(725),B=l(25696),S=l(4991),E=l(50358),O=l(32600),L=l(53286),P=l(5245),D=l(27330),T=l(79149),R=l(78182),W=l(71266);let U="min-w-0 flex items-center justify-center px-1 py-[1px] text-center";function H(e){var t,l,a,r;let{marketId:i,runnerId:d}=e,c=(0,s.d4)(e=>e.authentication.isLoggedIn),{data:u}=(0,o.np)({marketId:i,runnerId:d},{skip:!i||!d||!c}),m=null!=(a=null==u||null==(t=u.result)?void 0:t.maxBet)?a:0,h=null!=(r=null==u||null==(l=u.result)?void 0:l.maxWinPerMarket)?r:0;return(0,n.jsxs)("section",{className:"col-span-2 flex flex-col gap-y-[1px] items-start justify-center min-w-0","aria-label":"Max bet and max market limits",title:"Betting limits: max bet and max win per market",children:[(0,n.jsxs)("div",{className:(0,B.cn)(U,"font-medium text-x sm:text-xs"),"aria-label":"Max bet: ".concat(m),title:"Maximum bet amount",children:["Max Bet :"," ",(0,n.jsx)(T.A,{number:m,maxFractionDigits:2,formateToMultiplesOf:m>99999,formateValue:"k"})]}),(0,n.jsxs)("div",{className:(0,B.cn)(U,"font-medium text-x sm:text-xs"),"aria-label":"Max market win: ".concat(h),title:"Maximum win per market",children:["Max Mar
1ket :"," ",(0,n.jsx)(T.A,{number:h,maxFractionDigits:2,minimumFractionDigits:0,formateToMultiplesOf:h>99999,formateValue:"k"})]})]})}let z={price:0,size:0,line:null};function V(e,t){var l,n;return null!=(n=null==e||null==(l=e.back)?void 0:l[t])?n:z}function q(e,t){var l,n;return null!=(n=null==e||null==(l=e.lay)?void 0:l[t])?n:z}let G=[2,1,0],Z=[0,1,2];function X(e){let{runner:t,index:l,order:a,sharedOddProps:s,onClick:r,checkIsSelectedOddButton:i,wrapInDiv:o=!1}=e,d=(0,n.jsx)(R.J4,{runnerPrice:q(t,l),type:"lay",onClick:()=>r(t,l,"lay"),isSelected:i(l,"lay"),...s}),c=(0,n.jsx)(R.J4,{runnerPrice:V(t,l),type:"back",onClick:()=>r(t,l,"back"),isSelected:i(l,"back"),...s}),[u,m]="lay-first"===a?[d,c]:[c,d];return o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"min-w-0",children:u}),(0,n.jsx)("div",{className:"min-w-0",children:m})]}):(0,n.jsxs)(n.Fragment,{children:[u,m]})}function Y(e){var t,l;let{runner:r,market:i,isSuspended:o,isBallRunning:d,isBookmakerOrMiniBookmaker:c,isFancy:u}=e,m=(0,B.cn)(u?P.j_:P.bz,"h-12 gap-x-[1px] px-[1px] py-[1px] min-w-0"),h=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),p=(0,a.useCallback)((e,t)=>(null==h?void 0:h.marketId)===i.id&&(null==h?void 0:h.runnerId)===r.id&&(null==h?void 0:h.index)===e&&(null==h?void 0:h.side)==+("back"!==t),[null==h?void 0:h.marketId,null==h?void 0:h.runnerId,null==h?void 0:h.index,i.id,r.id,null==h?void 0:h.side]),x=(0,s.wA)(),f=(0,a.useCallback)((e,t,l)=>{let n={side:+("back"!==l),selectionId:e.id,btype:i.btype,mtype:i.mtype,oddsType:i.oddsType,eventTypeId:i.eventTypeId,marketId:i.id,betSlipRef:0,fromOneClick:0,betDelay:i.betDelay,runner:e.name,runnerId:e.id,eventId:i.event.id,eventName:i.event.name,groupById:i.groupById,isFancy:u,isBookmakerOrMiniBookmaker:c,isLineMarket:!1,index:t};x((0,W.oj)(n))},[i,u,c]),{width:b}=(0,C.v)();if(o)return(0,n.jsx)("div",{className:m,"aria-label":"Market suspended",title:"Market suspended - betting unavailable",role:"status",children:(0,n.jsx)(P.Mg,{})});if(d)return(0,n.jsx)("div",{className:m,"aria-label":"Ball in play",title:"Ball in play - odds updating",role:"status",children:(0,n.jsx)(P.vn,{})});let v={isDisabled:o||(null==i||null==(t=i.status)?void 0:t.toLowerCase())==="suspended"||!(null==i?void 0:i.isBettable),isFancy:u,isBookmakerOrMiniBookmaker:c},g=null!=(l=null==r?void 0:r.name)?l:"Runner";return(0,n.jsxs)("section",{className:m,"aria-label":"Back and lay odds for ".concat(g),title:"".concat(g," - back and lay odds"),children:[(0,n.jsx)("div",{className:"col-span-12 h-full grid grid-cols-4 gap-x-[1px] sm:hidden","aria-label":"".concat(g," odds - mobile view"),children:(0,n.jsx)(X,{runner:r,index:0,order:u?"lay-first":"back-first",sharedOddProps:v,onClick:f,checkIsSelectedOddButton:p})}),(0,n.jsx)("div",{className:"col-span-12 h-full hidden sm:grid gap-x-[1px] min-w-0",style:{gridTemplateColumns:u?"repeat(4, minmax(0, 1fr))":"repeat(6, minmax(0, 1fr))"},"aria-label":"".concat(g," odds - desktop view"),children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(X,{runner:r,index:0,order:"lay-first",sharedOddProps:v,onClick:f,checkIsSelectedOddButton:p,wrapInDiv:!0}),b>=640?(0,n.jsx)(H,{marketId:i.id,runnerId:String(r.id)}):null]}):(0,n.jsxs)(n.Fragment,{children:[G.map(e=>(0,n.jsx)("div",{className:"min-w-0",role:"group","aria-label":"Back odds ".concat(e+1),children:(0,n.jsx)(R.J4,{runnerPrice:V(r,e),type:"back",onClick:()=>f(r,e,"back"),isSelected:p(e,"back"),...v})},"back-".concat(e))),Z.map(e=>(0,n.jsx)("div",{className:"min-w-0",role:"group","aria-label":"Lay odds ".concat(e+1),children:(0,n.jsx)(R.J4,{runnerPrice:q(r,e),type:"lay",onClick:()=>f(r,e,"lay"),isSelected:p(e,"lay"),...v})},"lay-".concat(e)))]})})]})}let K=(0,a.memo)(e=>{var t,l,a;return(0,n.jsx)("svg",{version:"1.0",height:null!=(t=null==e?void 0:e.height)?t:"16",width:null!=(l=null==e?void 0:e.width)?l:"16",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 840.000000 936.000000",preserveAspectRatio:"xMidYMid meet",children:(0,n.jsxs)("g",{transform:"translate(0.000000,936.000000) scale(0.100000,-0.100000)",fill:null!=(a=null==e?void 0:e.fill)?a:"#000",stroke:"none",children:[(0,n.jsx)("path",{d:"M3472 8818 l3 -243 243 -3 242 -2 0 -244 0 -243 -122 -12 c-1359 -130 -2543 -950 -3143 -2176 -155 -318 -271 -677 -334 -1035 -75 -424 -73 -934 5 -1360 226 -1229 1014 -2267 2136 -2810 694 -335 1447 -455 2228 -354 567 74 1147 294 1640 624 792 530 1374 1353 1605 2270 133 529 156 1092 65 1627 -175 1029 -775 1959 -1645 2552 -539 367 -1135 586 -1792 657 l-163 18
10 243 0 243 243 2 242 3 3 243 2 242 -730 0 -730 0 2 -242z m1138 -1242 c478 -59 937 -216 1346 -463 765 -461 1323 -1208 1543 -2067 190 -738 131 -1502 -171 -2206 -175 -408 -460 -814 -789 -1122 -519 -487 -1138 -787 -1845 -895 -164 -25 -204 -27 -484 -27 -325 -1 -422 7 -685 60 -1170 231 -2155 1089 -2543 2214 -222 647 -250 1318 -82 1975 283 1104 1112 1999 2195 2372 215 74 531 144 735 162 63 6 133 13 155 15 85 9 506 -4 625 -18z"}),(0,n.jsx)("path",{d:"M3960 5620 c0 -654 -3 -1010 -10 -1010 -5 0 -41 -30 -80 -66 -51 -49 -80 -86 -105 -138 -133 -272 18 -605 310 -681 132 -34 277 -11 391 63 202 131 276 400 169 618 -25 52 -54 89 -105 138 -39 36 -75 66 -80 66 -7 0 -10 356 -10 1010 l0 1010 -240 0 -240 0 0 -1010z"})]})})});var J=l(24926),Q=l(75720);let $=e=>Math.round(100*e)/100,ee=e=>{let t=Number(e);return Number.isFinite(t)?t:0};function et(e){var t;let l=ee((null==e?void 0:e.back)&&e.back.length>0?null==(t=e.back[0])?void 0:t.price:null);return l>=1.01?l:null}function el(e){var t;let l=ee((null==e?void 0:e.lay)&&e.lay.length>0?null==(t=e.lay[0])?void 0:t.price:null);return l>=1.01?l:null}function en(e){var t,l;return Math.min(null!=(t=et(e))?t:Number.MAX_VALUE,null!=(l=el(e))?l:Number.MAX_VALUE)}let ea=e=>({status:"nothing",runnerId:0,runnerName:"",price:0,stake:0,side:0,cashoutValue:$(e)}),es=e=>{let t=Number(e);return isNaN(t)||null==t?0:t};var er=l(80952),ei=l(76564);let eo=(0,a.memo)(e=>{var t,l,r;let{handleCloseLadderPopUp:i,ladderPopUpDetails:d}=e,{startClosing:c,handleStartClosing:u}=(0,M.x)(),m=(0,s.d4)(e=>e.authentication.decodedToken),h=(0,s.d4)(e=>e.authentication.isLoggedIn),{data:p,isLoading:x,isError:f}=(0,o.cm)({memberCode:null!=(r=null==m?void 0:m.memberCode)?r:"",ladderId:d.marketId},{skip:!m||!h,refetchOnMountOrArgChange:!0}),b=(0,a.useCallback)(()=>{u(300,()=>{i()})},[u]);return(0,n.jsx)(I.A,{startClosing:c,closeFunction:b,type:"center",positionClassName:"bottom-0 left-0 right-0 top-0 flex overflow-hidden z-[100000]",popUpClass:"w-[95%] max-w-lg bg-bg_color_primary flex justify-start overflow-y-auto flex-col rounded-lg p-3 font-lato gap-y-3 overflow-hidden text-text_color_primary1",title:"".concat(d.runnerName," - Ladder"),id:"ladder-popup-".concat(d.runnerName),headAvaible:!1,closeIconClassName:"hidden",popupAnimations:{close:"popUpCloseAnimation1",open:"popUpOpenAnimation1"},parentContainerBgColor:"bg-black/20 backdrop-blur-xs",shouldParentScroll:!1,children:(0,n.jsxs)("div",{className:"flex flex-col items-start justify-center gap-y-2",children:[(0,n.jsxs)("div",{className:"text-text_color_primary1 font-lato font-semibold capitalize",children:[d.runnerName," - Ladder"]}),(0,n.jsxs)("table",{className:"w-full table-auto font-lato",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:"text-center",children:"Runs"}),(0,n.jsx)("th",{className:"text-center",children:"P&L"})]})}),(0,n.jsxs)("tbody",{children:[(null==p?void 0:p.success)&&(null==p||null==(l=p.result)||null==(t=l[d.marketId])?void 0:t.map((e,t)=>(0,n.jsxs)("tr",{children:[(0,n.jsxs)("td",{className:"text-center font-normal",children:[null==e?void 0:e.start,(null==e?void 0:e.end)?"-".concat(null==e?void 0:e.end):""]}),(0,n.jsx)("td",{className:"text-center font-normal ".concat((null==e?void 0:e.exposure)<0?" text-text_brand_primary":" text-text_color_success"),children:null==e?void 0:e.exposure})]},t))),x&&(0,n.jsx)(a.Fragment,{children:Array.from({length:4}).map((e,t)=>(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"px-2 py-1",children:(0,n.jsx)("div",{className:"mx-auto h-4 w-12 rounded bg-bg_color_secondary_light animate-pulse"})}),(0,n.jsx)("td",{className:"px-2 py-1",children:(0,n.jsx)("div",{className:"mx-auto h-4 w-16 rounded bg-bg_color_secondary_light animate-pulse"})})]},"ladder-skeleton-".concat(t)))}),f&&(0,n.jsx)(a.Fragment,{children:(0,n.jsx)("tr",{children:(0,n.jsx)("td",{colSpan:2,className:"text-center font-normal",children:"Failed to load data"})})})]})]}),(0,n.jsx)(ei.A,{onClick:b,type:"button",className:"bg-bg_brand_secondary px-2.5 py-1 rounded-md w-full flex items-center justify-center shadow-md",children:(0,n.jsx)("span",{className:" text-text_color_primary2 font-semibold fonn-lato text-base",children:"OK"})})]})})});var ed=l(44809),ec=l(1788),eu=l(48388),em=l(36820),eh=l(70858),ep=l(20930);let ex="border-ternary6",ef=(0,a.memo)(()=>(0,n.jsx)("div",{className:"w-full",role:"status","aria-label":"Loading c
1ash out offer","aria-busy":"true",children:(0,n.jsxs)("div",{className:"bg-bg_color_quaternary border border-ternary6 rounded-lg overflow-hidden shadow-sm",children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4 px-3 py-2 border-b border-ternary6 bg-bg_color_quaternary5 text-sm font-semibold text-text_color_tertiary4 font-lato",children:[(0,n.jsx)("span",{children:"Price"}),(0,n.jsx)("span",{children:"Stake"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4 px-3 py-3 items-center",children:[(0,n.jsx)("div",{className:"h-5 w-16 md:w-20 bg-bg_color_skeletonBgLoaderColor rounded animate-pulse","aria-hidden":"true"}),(0,n.jsx)("div",{className:"h-5 w-20 md:w-24 bg-bg_color_skeletonBgLoaderColor rounded animate-pulse","aria-hidden":"true"})]})]})}));ef.displayName="TableSkeleton";let eb=(0,a.memo)(()=>{var e,t,l,r,i,d,c,u,m,h,p,x;let{startClosing:f,handleStartClosing:b}=(0,M.x)(),v=(0,s.wA)(),{showToast:g}=(0,eh.d)(),y=(0,s.d4)(e=>e.cashOutStates.cashOutData),k=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.currentBookSetValue}),j=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.initialBookSetValue}),_=(0,a.useCallback)(()=>{b(0,()=>{v((0,W.Q7)(null))})},[b,v]),{data:N,isLoading:C,error:F,refetch:A}=(()=>{let e=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.marketId}),t=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.marketType}),l=(0,a.useMemo)(()=>"order",[t]),n=(0,s.d4)(e=>e.authentication.decodedToken),r={"x-user-id":null==n?void 0:n.memberCode,"x-app-version":"4.0.19.2","x-client":"mobile","x-client-id":"451012928.1605029998","x-client-info":"e883e9a15db99de2fdd0579c576a0693","x-log-timing":!0,"x-xid":"6b76ff17-70d2-b5fe-2373-08f62ee312af"},{data:i,isLoading:d,error:c,refetch:u}=(0,o.lz)({marketId:null!=e?e:"",endPoint:l,headers:r},{skip:!e||!(null==n?void 0:n.memberCode),refetchOnMountOrArgChange:!0,refetchOnFocus:!0,refetchOnReconnect:!0});return{data:i,isLoading:d,error:c,refetch:u}})(),{CashOutOperation:S,loader:E,error:O}=(e=>{let{onSuccess:t,onError:l}=e,n=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.marketId}),{showToast:r}=(0,eh.d)(),[i,d]=(0,a.useState)(null),[c,u]=(0,a.useState)(!1),m=(0,a.useRef)(!1);m.current=c;let h=(0,s.d4)(e=>e.authentication.decodedToken),p=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.marketType}),x=(0,s.wA)();return{CashOutOperation:(0,a.useCallback)(async()=>{try{if(m.current)return;if(!n){let e="Market ID is required";d(e),r({message:e,type:"error"}),null==l||l(e);return}if(!(null==h?void 0:h.memberCode)){let e="Authentication required";d(e),r({message:e,type:"error"}),null==l||l(e);return}u(!0),d(null);let g={"x-user-id":h.memberCode,"x-app-version":"4.0.19.2","x-client":"mobile","x-client-id":"451012928.1605029998","x-client-info":"e883e9a15db99de2fdd0579c576a0693","x-log-timing":!0,"x-xid":"6b76ff17-70d2-b5fe-2373-08f62ee312af"},y=await (0,em.q)({endPoint:"/exchange/order/cashout?marketId=".concat(n),method:"GET",additionalHeaders:g,sendHeaders:!0});if(!y.success||200!==y.status){var e,a,s,i,c,p,f,b,v;let t="Cash Out Failed",n=null==y||null==(e=y.error)?void 0:e.message;if(n&&"object"==typeof n&&n["0"]&&Array.isArray(n["0"])){let e=null==(s=n["0"])||null==(a=s[0])?void 0:a.description;e&&(t=e)}else{let e=null==y||null==(c=y.error)||null==(i=c.details)?void 0:i.error;if((null==e?void 0:e["0"])&&Array.isArray(e["0"])){let l=null==(v=e["0"])||null==(b=v[0])?void 0:b.description;l&&(t=l)}"Cash Out Failed"===t&&"string"==typeof(null==y||null==(p=y.error)?void 0:p.message)?t=y.error.message:"Cash Out Failed"===t&&(null==y||null==(f=y.error)?void 0:f.code)&&(t="Error: ".concat(y.error.code))}d(t),r({message:t,type:"error"}),null==l||l(t);return}y.data&&(r({message:"Book Set Operation Performed Successfully!",type:"success"}),x(o.Z4.util.invalidateTags(["OnBalanceChanges"])),null==t||t())}catch(t){console.error("BfOrderCashout error",t);let e="An unexpected error occurred";d(e),r({message:e,type:"error"}),null==l||l(e)}finally{u(!1)}},[n,p,null==h?void 0:h.memberCode,x,r,t,l]),error:i,loader:c}})({onSuccess:_,onError:()=>{}}),L=(0,a.useMemo)(()=>
1{if(F){var e,t,l,n;return(null==F||null==(n=F.data)||null==(l=n.error)||null==(t=l[0])||null==(e=t[0])?void 0:e.description)||"Something went wrong"}return null},[F]),P=(0,a.useCallback)(()=>{C||A().then(e=>{var t,l;if((null==e||null==(t=e.data)?void 0:t.result)!=null){let e=null==(l=eu.M.getState().cashOutStates.cashOutData)?void 0:l.currentBookSetValue;null!=e&&v((0,W.nt)(e))}})},[A,C,v]),D=null!=j&&null!=k&&j!==k,R=(0,a.useMemo)(()=>{var e,t,l,n;return(null==y?void 0:y.marketType)==="bookmakerorminibookmaker"?(null==N||null==(l=N.result)?void 0:l.price)?parseFloat(((Number(null==N||null==(n=N.result)?void 0:n.price)-1)*100).toFixed(2)):0:(null==N||null==(e=N.result)?void 0:e.price)?Number(null==N||null==(t=N.result)?void 0:t.price):0},[null==y?void 0:y.marketType,null==N||null==(e=N.result)?void 0:e.price]);return(0,n.jsxs)(I.A,{startClosing:f,closeFunction:_,type:"center",positionClassName:"bottom-0 left-0 right-0 top-0 flex overflow-hidden z-[100000]",popUpClass:"w-[95%] max-w-lg bg-bg_color_primary flex justify-start overflow-y-auto flex-col rounded-lg p-3 font-lato gap-y-3 overflow-hidden",title:"Cash out your bet â ".concat(null===w.qk||void 0===w.qk?void 0:w.qk.APP_NAME),id:"cash-out-".concat(null===w.qk||void 0===w.qk?void 0:w.qk.APP_NAME),headAvaible:!1,closeIconClassName:"hidden",popupAnimations:{close:"popUpCloseAnimation1",open:"popUpOpenAnimation1"},parentContainerBgColor:"bg-black/20 backdrop-blur-xs",shouldParentScroll:!1,children:[(0,n.jsxs)("div",{className:"flex flex-col items-center text-start gap-3 w-full max-w-full",children:[y&&(0,n.jsx)("header",{className:"w-full shrink-0",role:"banner",children:(0,n.jsx)("h2",{className:"text-lg font-bold text-start tracking-tight min-w-0 text-text_color_primary1 font-lato","aria-label":(null==N?void 0:N.result)!=null?0===N.result.side?"Cash out: Back bet on ".concat((null!=(m=N.result.runnerName)?m:"").trim()||"selection"):"Cash out: Lay bet on ".concat((null!=(h=N.result.runnerName)?h:"").trim()||"selection"):"Cash out your bet",children:(null==N?void 0:N.result)!=null?(0,n.jsxs)(n.Fragment,{children:[0===N.result.side?"Back":"Lay"," on"," ",null!=(p=N.result.runnerName)?p:"runner"]}):"Cash out"})}),(L||O||D)&&(0,n.jsxs)("div",{className:"w-full flex flex-col gap-1.5",children:[L&&(0,n.jsx)("div",{className:"w-full",role:"alert","aria-live":"assertive","aria-atomic":"true","aria-label":"Error loading cash out offer",children:(0,n.jsx)("div",{className:(0,B.cn)("rounded-md border px-2 py-1.5",ex),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-1.5 text-sm text-text_color_danger font-lato",children:[(0,n.jsx)("p",{className:"font-medium flex-1 text-start min-w-0 leading-tight",title:"Unable to load cash out offer. Try again.",children:L}),(0,n.jsx)("button",{type:"button",onClick:P,disabled:C,className:"shrink-0 h-7 min-w-[3.5rem] font-semibold hover:opacity-80 underline focus:outline-none focus:ring-2 focus:ring-danger focus:ring-offset-1 rounded px-1.5 text-text_color_danger disabled:opacity-70 disabled:cursor-not-allowed flex items-center justify-center gap-1","aria-label":C?"Retrying to load cash out offer":"Retry loading cash out offer",title:C?"Retryingâ¦":"Retry","aria-busy":C,children:C?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ep.A,{className:"animate-spin",width:12,height:12,fill:"currentColor","aria-hidden":"true"}),"Retrying..."]}):"Retry"})]})})}),O&&(0,n.jsx)("div",{className:"w-full",role:"alert","aria-live":"assertive","aria-atomic":"true","aria-label":"Cash out failed",children:(0,n.jsx)("div",{className:(0,B.cn)("rounded-md border px-2 py-1.5",ex),children:(0,n.jsx)("p",{className:"font-medium text-sm text-text_color_danger text-start font-lato leading-tight",title:"Cash out could not be completed. Please try again.",children:O})})}),D&&(0,n.jsx)("div",{className:(0,B.cn)("w-full rounded-md border px-2 py-1.5 text-sm font-medium text-text_color_info font-lato",ex),role:"status","aria-live":"polite","aria-label":"Odds have changed. Refresh to see the latest cash out offer.",children:(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-1.5",children:[(0,n.jsx)("p",{className:"flex-1 min-w-0 leading-tight",title:"Market odds have changed since you opened this offer.",children:"Odds may have changed."}),(0,n.jsx)(Q.A,{type:"button",onClick:P,disabled:C,className:"flex-shrink-0 h-7 min-w-[4.5rem] bg-bg_color_info/25 text-text_color_info rounded-md py-0 px-2 text-sm font-semibold hover:bg-bg_color_info/35 transition-colors disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-[var(--border-color-info)] focus:ring-offset-1 flex items-center justify-center",title:C?"Refreshingâ¦":"Refresh to get latest cash out offer","aria-label":C?"Refreshing cash out offerâ¦":"Refresh to get latest cash out offer","aria-busy":C,children:C?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ep.A,{className:"animate-spin shrink-0 text-text_color_info",width:12,height:12,fill:"currentColor","aria-hidden":"true"}),(0,n.jsx)("span",{children:"Refreshing..."})]}):"Refresh"})]})})]}),C&&!(null==N?void 0:N.result)&&(0,n.jsx)("div",{className:"w-full","aria-busy":"true","aria-live":"polite",children:(0,n.jsx)(ef,{})}),(null==N?void 0:N.result)&&y&&y.eventId&&(0,n.jsxs)("div",{className:"w-full antialiased",children:[(0,n.jsxs)("div",{className:(0,B.cn)("rounded-lg border border-ternary6 overflow-hidden mb-3 shadow-sm transition-colors font-semibold font-lato",(null==N||null==(t=N.result)?void 0:t.side)===0?"bg-bg_color_backBtnBg hover:opacity-95":"bg-bg_color_layBtnBg hover:opacity-95"),role:"region","aria-label":"Cash out offer: ".concat((null==N||null==(l=N.result)?void 0:l.side)===0?"Back":"Lay"," on ").concat((null!=(x=null==N||null==(r=N.result)?void 0:r.runnerName)?x:"").trim()||"selection",", price and stake"),title:"Your cash out offer: ".concat((null==N||null==(i=N.result)?void 0:i.side)===0?"Back":"Lay"," â price and stake"),children:[(0,n.jsx)("span",{className:"sr-only",children:"Cash out offer: price and stake for this bet."}),(0,n.jsxs)("div",{className:(0,B.cn)("grid grid-cols-2 gap-4 px-3 py-2 border-b border-ternary6 text-sm font-semibold text-text_color_tertiary4 text-center",(null==N||null==(d=N.result)?void 0:d.side)===0?"bg-bg_color_backBtnBg/90":"bg-bg_color_layBtnBg/90"),role:"row","aria-label":"Offer price and stake labels",children:[(0,n.jsx)("span",{role:"columnheader",children:"Price"}),(0,n.jsx)("span",{role:"columnheader",children:"Stake"})]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4 px-3 py-3 items-center text-base font-semibold tabular-nums text-text_color_oddValue text-center",role:"row",children:[(0,n.jsx)("span",{role:"cell",title:"Cash out price: ".concat(R),children:(0,n.jsx)(T.A,{number:R,maxFractionDigits:2,showCurrency:!1})}),(0,n.jsx)("span",{role:"cell",title:"Cash out stake: ".concat(null==N||null==(c=N.result)?void 0:c.totalSize),children:(0,n.jsx)(T.A,{number:null==N||null==(u=N.result)?void 0:u.totalSize,maxFractionDigits:2,showCurrency:!1})})]})]}),(0,n.jsx)("div",{className:(0,B.cn)("border rounded-md px-2 py-1.5 text-sm font-medium font-lato","text-text_color_info",ex),role:"note","aria-label":"Minimum stake required for cash out. Operation will not succeed below minimum stakes.",title:"Cash out has a minimum stake requirement",children:(0,n.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,n.jsx)("svg",{className:"h-3.5 w-3.5 mt-0.5 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),(0,n.jsxs)("p",{className:"leading-tight",title:"Cash out will not succeed below the minimum stake.",children:[(0,n.jsx)("span",{className:"font-semibold",children:"Note:"})," Operation will not succeed below minimum stakes."]})]})})]}),!C&&!F&&!(null==N?void 0:N.result)&&y&&(0,n.jsx)("div",{className:"w-full",role:"status","aria-live":"polite","aria-label":"No cash out offer available. Try again later.",children:(0,n.jsx)("div",{className:(0,B.cn)("bg-bg_color_primary rounded-md px-2 py-1.5 text-sm text-text_color_tertiary4 font-medium text-center font-lato leading-tight",ex),children:(0,n.jsx)("p",{title:"No cash out offer is currently available for this bet.",children:"No cash out offer available at this time."})})})]}),(0,n.jsxs)("footer",{className:(0,B.cn)("border-t p-3 grid grid-cols-2 gap-3 w-full shrink-0",ex),role:"contentinfo",children:[(0,n.jsx)(Q.A,{type:"button",onClick:()=>
1{if(C||E)return void g({message:"Please wait for the cash out operation to complete",type:"error"});_()},disabled:C||E,className:"h-10 w-full min-w-0 flex items-center justify-center rounded-md bg-transperent text-text_brand_primary text-sm font-semibold font-lato border border-border_color_brand_primary disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-1",title:"Cancel and close cash out","aria-label":"Cancel and close cash out",children:"Cancel"}),(0,n.jsxs)(Q.A,{type:"button",onClick:()=>S(),className:"h-10 w-full min-w-0 relative text-text_color_primary2 text-sm font-semibold font-lato active:scale-[0.98] rounded-md border flex items-center justify-center gap-1.5 bg-bg_cashOutBtnGrd border-success cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed focus:outline-none focus:ring-2 focus:ring-success focus:ring-offset-1",title:C?"Loading cash out offer":E?"Processing your cash outâ¦":"Confirm cash out","aria-label":C?"Loading cash out offer":E?"Processing your cash outâ¦":"Confirm cash out","aria-busy":C||E,disabled:C||E||!(null==N?void 0:N.result),children:[(C||E)&&(0,n.jsx)(ep.A,{className:"animate-spin text-text_color_primary2",width:14,height:14,fill:"currentColor","aria-hidden":"true"}),(0,n.jsx)("span",{children:C?"Loading...":E?"Processing...":"Cash Out"})]})]})]})});var ev=l(90466),eg=l(5531),ey=l.n(eg),ew=l(66684),ek=l(83232);function ej(e){let{icon:t,variant:l}=e;return(0,n.jsx)("span",{className:(0,B.cn)("flex h-24 w-24 shrink-0 items-center justify-center rounded-full p-4","light"===l?"bg-bg_color_tertiary1 shadow-inner":"bg-bg_color_primary shadow-md"),"aria-hidden":!0,children:(0,n.jsx)("span",{className:"flex items-center justify-center [&>svg]:max-h-14 [&>svg]:max-w-14 [&>svg]:shrink-0",children:t})})}let e_=(0,a.memo)(e=>{let{eventId:t,eventTypeId:l,eventName:s,labelForMarket:r,labelIcon:i,labelClassName:o,minHeight:d}=e,c=(0,ew.useRouter)(),u=(null==s?void 0:s.trim())?s.trim():null,m=(0,a.useMemo)(()=>null!=r?r:((e,t)=>(null==e?void 0:e.trim())&&!t?"".concat(e.trim()," has finished. Explore more events from in-play."):"This event has finished. Explore more events from in-play.")(s,!!u),[s,r,u]),h=(0,a.useMemo)(()=>null!=i?i:(0,ek.L8)(Number(l)),[l,i]),p=(0,a.useMemo)(()=>(0,B.iy)(Number(l)),[Number(l)]),x=(0,a.useCallback)(()=>{c.push("/".concat(p))},[c,p]),f=(0,B.cn)("text-text_color_tertiary2 font-normal",null!=o?o:"text-xs xs:text-sm md:text-base"),b=(0,B.cn)("w-full rounded-xl bg-bg_color_primary overflow-hidden",null!=d?d:""),v=(0,n.jsx)("div",{className:"h-1 w-full bg-gradient-to-r from-border_color_brand_primary to-border_color_brand_primary/70","aria-hidden":!0}),g=(0,n.jsx)(Q.A,{type:"button",onClick:x,className:"group relative w-full min-h-[44px] overflow-hidden rounded-xl border border-border_color_brand_primary bg-bg_text_brand_primary px-5 py-2.5 text-sm font-semibold text-text_color_primary2 shadow-sm transition-all duration-200 hover:shadow-md hover:brightness-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border_color_brand_primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg_color_primary active:scale-[0.98] sm:w-auto sm:min-w-[160px] sm:px-6 sm:py-3 md:min-w-[180px] md:px-7 md:text-base",ariaLabel:"View more events",children:(0,n.jsxs)("span",{className:"relative z-10 inline-flex w-full items-center justify-center gap-2.5",children:[(0,n.jsx)("span",{className:"tracking-wide",children:"More Events"}),(0,n.jsx)("svg",{className:"h-4 w-4 shrink-0 transition-transform duration-200 group-hover:translate-x-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,"aria-hidden":!0,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})}),y=(0,n.jsx)(ey(),{href:"/#inplay",className:(0,B.cn)("text-sm font-medium text-text_brand_primary underline-offset-4 transition-colors hover:text-text_color_primary1 hover:underline","text-center sm:text-right"),children:"Browse in-play"});return(0,n.jsxs)("section",{"aria-label":t?"Event ".concat(t," ended"):"Event ended",className:(0,B.cn)(b,"border border-border_color_primary shadow-md"),children:[v,(0,n.jsx)("div",{className:"p-4 sm:p-5 md:p-6",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 sm:gap-5",children:[(0,n.jsx)(()=>(0,n.jsx)("div",{className:"space-y-1 text-center sm:text-left",children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-lg font-bold leading-snug tracking-tight text-text_color_primary1 sm:text-xl md:text-2xl lg:text-3xl",children:u}),(0,n.jsx)("span",{className:"inline-block rounded-full bg-bg_color_tertiary1 px-2.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-text_brand_primary sm:text-xs sm:px-3",children:"Ended"})]}):(0,n.jsx)("h2",{className:"text-lg font-bold leading-tight tracking-tight text-text_color_primary1 sm:text-xl md:text-2xl lg:text-3xl",children:"Event ended"})}),{}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-3 rounded-lg bg-bg_color_tertiary1/40 p-3 sm:flex-row sm:items-center sm:gap-5 sm:p-4",children:[(0,n.jsx)(ej,{icon:h,variant:"light"}),(0,n.jsx)(e=>{let{className:t}=e;return(0,n.jsxs)("div",{className:(0,B.cn)("min-w-0 flex-1",t),children:[(0,n.jsx)("p",{className:(0,B.cn)("leading-snug",f),children:m}),(0,n.jsx)("p",{className:"mt-1.5 text-xs text-text_color_tertiary2",children:"Find live and upcoming events to bet on."})]})},{className:"border-t border-border_color_primary/60 pt-3 text-center sm:border-l sm:border-t-0 sm:pl-4 sm:pt-0 sm:text-left md:pl-5"})]}),(0,n.jsx)(()=>(0,n.jsxs)("div",{className:"flex flex-col items-stretch gap-2 border-t border-border_color_primary/60 pt-4",children:[(0,n.jsx)("p",{className:"text-center text-xs font-medium text-text_color_tertiary2 sm:text-left",children:"Continue to explore live and upcoming events"}),(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2 sm:flex-row sm:items-center sm:gap-4",children:[g,y]})]}),{})]})})]})});var eN=l(90053);
1let eC=(0,a.memo)(()=>(0,n.jsx)(a.Fragment,{children:(0,n.jsx)("div",{className:"flex-1 flex justify-center items-center",children:(0,n.jsx)(eN.A,{title:"Loading Markets...",height:"h-[50vh]"})})})),eI=(0,a.memo)(e=>{let{content:t,children:l,placement:s="top",delay:r=3e3,mainClassName:i="relative w-full h-full",mainTooltipClassName:o="min-w-[100%] max-w-[300px]",contentClassName:d="leading-relaxed break-words font-bold text-xs md:text-sm",role:c="tooltip"}=e,[u,m]=(0,a.useState)(!1),[h,p]=(0,a.useState)({top:0,left:0}),[x,f]=(0,a.useState)("top"),[b,v]=(0,a.useState)("left"),g=(0,a.useRef)(null),y=(0,a.useRef)(null),w=(0,a.useRef)(null),k=(0,a.useCallback)(()=>{let e=g.current,t=y.current;if(!e||!t)return;let l=e.getBoundingClientRect(),n=t.getBoundingClientRect(),a=window.innerHeight-l.bottom,s=l.top,r=l.left,i=window.innerWidth-l.right,o=-n.height-8;f("top"),s<n.height+8&&a>=n.height+8&&(o=l.height+8,f("bottom"));let d=0,c=(l.width-n.width)/2;n.width<=l.width?(d=c,v("center")):r>=n.width?(d=-n.width+l.width,v("right")):i>=n.width?(d=0,v("left")):(d=c,v("center")),p({top:o,left:Math.max(0,Math.min(d,window.innerWidth-n.width))})},[]);return(0,a.useEffect)(()=>()=>{w.current&&clearTimeout(w.current)},[]),(0,a.useEffect)(()=>{if(!u)return;let e=()=>k();return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[u,k]),(0,n.jsxs)("div",{className:i,ref:g,onMouseEnter:()=>{m(!0),requestAnimationFrame(()=>{requestAnimationFrame(k)})},onMouseLeave:()=>{m(!1),w.current&&(clearTimeout(w.current),w.current=null)},onClick:()=>{m(e=>!e),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>m(!1),r)},role:c,children:[l,(0,n.jsxs)("div",{ref:y,className:"absolute z-10 ".concat(o," px-3 py-2 bg-bg_color_tooltip text-text_color_tooltip text-xs rounded-lg transition-all duration-300 ease-in-out shadow-lg ").concat(u?"opacity-100 scale-100 translate-y-0":"opacity-0 scale-95 translate-y-1 pointer-events-none"," ").concat("top"===x?"bottom-full mb-2":"top-full mt-2"," ").concat("left"===b?"left-0":"right"===b?"right-0":"left-1/2 transform -translate-x-1/2"),style:{top:"bottom"===x?"".concat(h.top,"px"):void 0,left:"center"===b?void 0:"".concat(h.left,"px")},children:[(0,n.jsx)("div",{className:d,children:t}),(0,n.jsx)("div",{className:"absolute w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent transition-all duration-300 ".concat("top"===x?"top-full border-t-border_color_tooltip":"bottom-full border-b-border_color_tooltip"," ").concat("left"===b?"left-3":"right"===b?"right-3":"left-1/2 transform -translate-x-1/2")})]})]})}),eM=(0,a.memo)(e=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,n.jsx)("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),(0,n.jsx)("path",{d:"M8 21l8 0"}),(0,n.jsx)("path",{d:"M12 17l0 4"}),(0,n.jsx)("path",{d:"M7 4l10 0"}),(0,n.jsx)("path",{d:"M17 4v8a5 5 0 0 1 -10 0v-8"}),(0,n.jsx)("path",{d:"M3 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"}),(0,n.jsx)("path",{d:"M17 9a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"})]}));var eF=l(91361),eA=l(15356);let eB=e=>"number"==typeof e&&Number.isFinite(e)&&e>1,eS=e=>{let t=(e=>{var t;return null==(t=e.back.find(e=>eB(e.price)))?void 0:t.price})(e),l=(e=>{var t;return null==(t=e.lay.find(e=>eB(e.price)))?void 0:t.price})(e);return eB(t)&&eB(l)&&l>=t?(t+l)/2:eB(l)?l:eB(t)?t:eB(e.lastPriceTraded)?e.lastPriceTraded:null},eE=e=>e<0?0:e>100?100:e,eO=(e,t)=>{var l,n;return e?{color:null!=(l=(0,eF.Kr)(e))?l:t,flagUrl:null!=(n=(0,eF._S)("4",e,48))?n:"",shortFormName:e}:{color:t,flagUrl:""}},eL=e=>{let t=e.replace("#","");if(6!==t.length)return"var(--color-win-probability-muted-text)";let l=Number.parseInt(t.slice(0,2),16),n=Number.parseInt(t.slice(2,4),16),a=Number.parseInt(t.slice(4,6),16);return Number.isNaN(l)||Number.isNaN(n)||Number.isNaN(a)?"var(--color-win-probability-muted-text)":(.2126*l+.7152*n+.0722*a)/255<.42?"var(--color-win-probability-readable-text)":e},eP=e=>/draw|tie/i.test(e),eD=(0,a.memo)(e=>{var t,l,s,r,i,o,d,c,u;let{market:m}=e,h=(0,a.useMemo)(()=>(e=>{let t=e.reduce((e,t)=>
1e+t.probability,0);return t<=0?e:e.map(e=>({...e,probability:e.probability/t*100}))})((e=>{let t=0,l=[];for(let n of e){if("ACTIVE"!==n.status)continue;let e=eS(n);if(!e)continue;let a=1/e;t+=a,l.push({id:n.id,name:n.name,rawProbability:a})}if(!t||0===l.length)return[];let n=l.map(e=>({id:e.id,name:e.name,probability:e.rawProbability/t*100}));if(3===n.length){let e=n.find(e=>eP(e.name));if(e){let t=n.filter(t=>t.id!==e.id);if(t.length>=2)return[t[0],e,t[1]]}return n}return 2===n.length?n:[...n].sort((e,t)=>t.probability-e.probability).slice(0,2)})(m.runners)),[m.runners]);if(0===h.length)return null;let p=3===h.length,x=h[0],f=p?h[1]:void 0,b=p?h[2]:h[1],v=eE(null!=(t=null==x?void 0:x.probability)?t:0),g=eE(null!=(l=null==f?void 0:f.probability)?l:0),y=eE(null!=(s=null==b?void 0:b.probability)?s:0),w=eO(null==x?void 0:x.name,"var(--color-win-probability-fallback-left)"),k=eO(null==f?void 0:f.name,"var(--color-win-probability-muted-text)"),j=eO(null==b?void 0:b.name,"var(--color-win-probability-fallback-right)"),_=eL(w.color),N=eL(k.color),C=eL(j.color),I=Math.max(v,g,y),M=v>=I,F=void 0!==f&&g>=I,A=y>=I;return(0,n.jsx)("div",{className:"w-full px-2",children:(0,n.jsxs)("section",{className:"w-full space-y-2 rounded-md border border-color_scorecard_border bg-bg_color_primary/95 px-2.5 py-2 shadow-[0_6px_16px_rgba(0,0,0,0.16)]",children:[(0,n.jsxs)("h3",{className:"flex items-center justify-start gap-1.5 text-left font-lato text-[11px] font-semibold uppercase tracking-[0.06em] text-text_color_primary1 md:text-xs",children:[(0,n.jsx)(eM,{stroke:"var(--icon-color-brand-secondary)",className:"size-[14px] shrink-0"}),"Win Probability"]}),(0,n.jsxs)("div",{className:"grid items-center gap-2 ".concat(p?"grid-cols-3":"grid-cols-2"),children:[(0,n.jsxs)("div",{className:"min-w-0 flex items-center gap-1",children:[(0,n.jsx)(eA.A,{src:w.flagUrl,alt:null!=(r=null==x?void 0:x.name)?r:"",className:"h-auto w-5 shrink-0",title:null==x?void 0:x.name,fallbackSrc:null}),(0,n.jsx)("p",{className:"truncate font-lato text-[11px] font-semibold leading-4 text-text_color_primary1 md:text-xs",title:null==x?void 0:x.name,children:null!=(o=null!=(i=w.shortFormName)?i:null==x?void 0:x.name)?o:"-"}),(0,n.jsxs)("p",{className:"inline-flex items-center gap-1 rounded-md bg-bg_color_quaternary7/40 px-1.5 py-[2px] font-lato text-[10px] font-bold leading-none transition-all duration-300 md:text-[11px] ".concat(M?"animate-pulse drop-shadow-[0_0_8px_var(--color-win-probability-leader-glow)]":"opacity-95"),style:{color:_},children:[(0,n.jsx)("span",{className:"text-[10px] leading-none md:text-[11px]","aria-hidden":"true",children:M?"\uD83D\uDD25":"â¡"}),v.toFixed(0),"%"]})]}),p?(0,n.jsxs)("div",{className:"min-w-0 flex items-center justify-center gap-1 text-center",children:[(0,n.jsx)("p",{className:"truncate font-lato text-[11px] font-semibold leading-4 text-text_color_primary1 md:text-xs",title:null==f?void 0:f.name,children:(e=>e?eP(e)?"Draw":e:"-")(null==f?void 0:f.name)}),(0,n.jsxs)("p",{className:"inline-flex items-center gap-1 rounded-md bg-bg_color_quaternary7/40 px-1.5 py-[2px] font-lato text-[10px] font-bold leading-none transition-all duration-300 md:text-[11px] ".concat(F?"animate-pulse drop-shadow-[0_0_8px_var(--color-win-probability-leader-glow)]":"opacity-95"),style:{color:N},children:[(0,n.jsx)("span",{className:"text-[10px] leading-none md:text-[11px]","aria-hidden":"true",children:F?"\uD83D\uDD25":"â¡"}),g.toFixed(0),"%"]})]}):null,(0,n.jsxs)("div",{className:"min-w-0 flex items-center justify-end gap-1 text-right",children:[(0,n.jsxs)("p",{className:"inline-flex items-center gap-1 rounded-md bg-bg_color_quaternary7/40 px-1.5 py-[2px] font-lato text-[10px] font-bold leading-none transition-all duration-300 md:text-[11px] ".concat(A?"animate-pulse drop-shadow-[0_0_8px_var(--color-win-probability-leader-glow)]":"opacity-95"),style:{color:C},children:[(0,n.jsx)("span",{className:"text-[10px] leading-none md:text-[11px]","aria-hidden":"true",children:A?"\uD83D\uDD25":"â¡"}),y.toFixed(0),"%"]}),(0,n.jsx)(eA.A,{src:j.flagUrl,alt:null!=(d=null==b?void 0:b.name)?d:"",className:"h-auto w-5 shrink-0",title:null==b?void 0:b.name,fallbackSrc:null}),(0,n.jsx)("p",{className:"truncate font-lato text-[11px] font-semibold leading-4 text-text_color_primary1 md:text-xs",title:null==b?void 0:b.name,children:(0,n.jsx)("span",{children:null!=(u=null!=(c=j.shortFormName)?c:null==b?void 0:b.name)?u:"-"})})]})]}),(0,n.jsxs)("div",{className:"relative h-2 w-full flex overflow-hidden rounded-full bg-bg_color_quaternary7/50 ring-1 ring-border_color_primary/40",children:[(0,n.jsx)("div",{className:"relative h-full transition-all duration-700 ease-out",style:{width:"".concat(v,"%"),backgroundColor:w.color},children:(0,n.jsx)("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-color_wp_shimmer_strong to-transparent animate-[pulse_1.8s_ease-in-out_infinite]"})}),p?(0,n.jsx)("div",{className:"relative h-full transition-all duration-700 ease-out",style:{width:"".concat(g,"%"),backgroundColor:k.color},children:(0,n.jsx)("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-color_wp_shimmer_soft to-transparent animate-[pulse_2s_ease-in-out_infinite]"})}):null,(0,n.jsx)("div",{className:"relative h-full transition-all duration-700 ease-out",style:{width:"".concat(y,"%"),backgroundColor:j.color},children:(0,n.jsx)("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-color_wp_shimmer_soft to-transparent animate-[pulse_2.1s_ease-in-out_infinite]"})}),(0,n.jsx)("span",{className:"absolute top-0 h-full w-[2px] bg-color_wp_divi
1der transition-all duration-700 ease-out",style:{left:"calc(".concat(v,"% - 1px)")}}),p?(0,n.jsx)("span",{className:"absolute top-0 h-full w-[2px] bg-color_wp_divider transition-all duration-700 ease-out",style:{left:"calc(".concat(v+g,"% - 1px)")}}):null]})]})})});var eT=l(52648);let eR=(0,A.default)(()=>l.e(5061).then(l.bind(l,35061)),{loadableGenerated:{webpack:()=>[35061]},ssr:!1}),eW="capitalize font-bold text-[13px] sm:text-sm md:text-[15px]",eU="".concat(eW," text-center"),eH=e=>{let{onClick:t,cashOutValue:l,disabled:a=!1}=e,s=null!=l&&0!==l,r=(0,B.cn)("leading-normal relative overflow-hidden transition duration-150 ease-in-out rounded-md px-2.5 py-1.5 text-center shadow-sm flex items-center justify-center flex-row h-max max-w-[74%] mr-1 text-[10px] md:text-sm text-text_color_primary2 whitespace-nowrap font-semibold flex-shrink-0",(null!=l?l:0)>=0?"bg-bg_cashOutBtnGrd":"bg-bg_lossGrad",a?"opacity-50 cursor-not-allowed":"cursor-pointer");return(0,n.jsxs)(Q.A,{className:r,role:"button","aria-label":s?"Cash out ".concat(l):"Cash out",onClick:a?void 0:t,disabled:a,title:a?"Nothing to cash out":"Cash out",children:["Cashout"," ",s?(0,n.jsxs)(n.Fragment,{children:[" : ",(0,n.jsx)(T.A,{number:l,maxFractionDigits:2,minimumFractionDigits:2,showCurrency:!0})]}):null]})},ez=e=>{let{title:t,id:l,marketCashOutValue:a,cashOutDisabled:s,showCashOutButton:r,openCashOutModel:i,additionalMarketName:o}=e;return(0,n.jsxs)("div",{className:(0,B.cn)(P.Xc,"flex items-center justify-start gap-x-1 md:gap-x-1 text-text_color_primary1"),"aria-label":"Market: ".concat(t),title:"Market: ".concat(t),children:[(0,n.jsxs)("div",{className:(0,B.cn)(eW,"flex flex-col items-start justify-start w-max"),id:l,children:[t,o?(0,n.jsx)("span",{className:"text-x font-normal text-text_color_info",children:o}):null]}),r&&(0,n.jsx)(eH,{cashOutValue:a,disabled:s,onClick:i})]})},eV="text-text_color_success",eq="text-text_color_danger",eG="text-[12px] font-bold",eZ=e=>{let{name:t,metadata:l,isFancy:r,betDelay:i,marketId:o,runnerId:d,eventId:c,onLadderClick:u}=e,[m,h]=(0,a.useState)(!1),p=(0,J.w4)({marketId:o,runnerId:d,eventId:c,disableCalculationWhileBetPlacing:!1,setIsLaddedEnabled:h}),x=(0,s.d4)(e=>e.newBetSlipStates.betSlipData);return(0,n.jsxs)("div",{className:(0,B.cn)(r?P.rD:P.Xc,"flex items-center min-w-0 text-text_color_primary1 text-[13px] md:text-sm font-semibold gap-x-2 w-full justify-center text-start h-full pr-2 pl-2"),"aria-label":r?"Runner: ".concat(t,". Bet delay: ").concat(null!=i?i:0," seconds"):"Runner: ".concat(t),role:"rowheader",children:[(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsxs)("div",{title:t,className:(0,B.cn)("flex-1 flex items-center justify-start gap-x-1"),children:[l?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-center flex-col",children:[(0,n.jsx)("span",{children:null==l?void 0:l.CLOTH_NUMBER_ALPHA}),(0,n.jsxs)("small",{children:["(",null==l?void 0:l.CLOTH_NUMBER,")"]})]}),(0,n.jsx)(ev.default,{path:"".concat(P.wE).concat(null==l?void 0:l.COLOURS_FILENAME_BASE64),alt:t,className:"w-5 h-5 mx-1 shrink-0",imgClassName:"w-5 h-5",noPathLoaderClass:"bg-bg_color_skeletonBgLoaderColor1",title:t})]}):null,(0,n.jsx)(eI,{content:t,contentClassName:" text-x xs1:text-[11px] sm:text-xs capitalize leading-relaxed break-words font-bold",role:"tooltip",mainClassName:"relative h-full flex-1 capitalize max-w-full",children:(0,n.jsx)("span",{className:"line-clamp-1",children:t})})]}),(null==x?void 0:x.marketId)===o&&(null==p?void 0:p.finalPnl)!=null&&(null==p?void 0:p.existingPnl)!==(null==p?void 0:p.finalPnl)&&(null==p?void 0:p.existingPnl)?(0,n.jsxs)("span",{className:(0,B.cn)(eG,(null==p?void 0:p.existingPnl)>=0?eV:eq),children:[null==p?void 0:p.existingPnl," ",">>"]}):null,(null==p?void 0:p.finalPnl)!=null&&(null==p?void 0:p.existingPnl)!==(null==p?void 0:p.finalPnl)?(0,n.jsx)("span",{className:(0,B.cn)(eG,(null==p?void 0:p.finalPnl)>=0?eV:eq),children:null==p?void 0:p.finalPnl}):(null==p?void 0:p.existingPnl)?(0,n.jsx)("span",{className:(0,B.cn)(eG,(null==p?void 0:p.existingPnl)>=0?eV:eq),children:null==p?void 0:p.existingPnl}):null]}),r?(0,n.jsxs)("div",{className:"flex items-center gap-x-1","aria-hidden":"true",children:[(0,n.jsxs)("div",{className:"flex items-center gap-x-0.5",children:[(0,n.jsx)(K,{height:"15",width:"15",fill:"var(--icon-color-brand-tertiary1)"}),(0,n.jsxs)("span",{className:" font-[480] text-sm text-text_color_primary1 ",children:[i,"s"]})]}),(0,n.jsx)(Q.A,{className:"cursor-pointer disabled:cursor-not-allowed",onClick:u,disabled:!m,children:(0,n.jsx)("svg",{height:"18",width:"18",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",className:(0,B.cn)(m?"opacity-100":"opacity-50"),children:(0,n.jsxs)("g",{id:"63d691358b4e4026f6539708_stairs 1",children:[(0,n.jsx)("path",{id:"Vector",d:"M5.21875 3.13672V13.1367",stroke:"var(--icon-color-brand-tertiary1)"}),(0,n.jsx)("path",{id:"Vector_2",d:"M5.21875 5.48047H10.5312",stroke:"var(--icon-color-brand-tertiary1)"}),(0,n.jsx)("path",{id:"Vector_3",d:"M5.21875 8.13672H10.5312",stroke:"var(--icon-color-brand-tertiary1)"}),(0,n.jsx)("path",{id:"Vector_4",d:"M5.21875 11.1055H10.5312",stroke:"var(--icon-color-brand-tertiary1)"}),(0,n.jsx)("path",{id:"Vector_5",d:"M10.5312 3.13672V13.1367",stroke:"var(--icon-color-brand-tertiary1)"})]})})})]}):null]})},eX=e=>{let{isFancy:t}=e,l=t?"col-span-6 sm:col-span-3":"col-span-6 sm:col-span-2";return(0,n.jsxs)("div",{className:(0,B.cn)(t?P.j_:P.bz),role:"row","aria-label":t?"No and Yes odds column headers":"Back and Lay odds column headers",children:[t?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"col-span-2 hidden sm:block","aria-hidden":"true"}),(0,n.jsx)("span",{className:"col-span-2 hidden sm:block","aria-hidden":"true"})]}),(0,n.jsx)("h3",{className:"".concat(l," ").concat(eU," flex items-end justify-center"),children:t?"No":"Back"}),(0,n.jsx)("h3",{className:"".concat(l," ").concat(eU," flex items-end justify-center"),children:t?"Yes":"Lay"}),t?(0,n.jsx)("span",{className:"col-span-6 hidden sm:block","aria-hidden":"true"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"col-span-2 hidden sm:block","aria-hidden":"true"}),(0,n.jsx)("span",{className:"col-span-2 hidden sm:block","aria-hidden":"true"})]})]})};function eY(e){var t,l,r,i,o,d,c;let{market:u,setLadderPopUpDetails:m,showCashoutButton:h=!0,showOddsColumnHeaders:p=!0}=e,{isSuspended:x,isBallRunning:f,isFancy:b,isBookmakerOrMiniBookmaker:v}=(0,R.kv)(u),g="market-title-".concat(u.id),y=(e=>{let{marketId:t,eventId:l,runnerInfo:n,calculateCashOut:r=!0}=e,{exposureData:i}=(0,J.Fy)({eventId:l}),o=(0,s.d4)(e=>e.authentication.isLoggedIn);return(0,a.useMemo)(()=>{try{var e,l,a;if(!o||!r)return null;let s=(null==i?void 0:i.result)&&Object.entries(null!=(l=null==i||null==(e=i.result)?void 0:e.pnlBySelection)?l:{}),d={};
1s&&s.forEach(e=>{let l=e[1];if((null==l?void 0:l.marketId)===t||(null==l?void 0:l.MarketId)===t){let t=Number(e[0].split("-")[1]);if(Number.isFinite(t)){var n;d[t]=(null!=(n=d[t])?n:0)+es(null==l?void 0:l.pnl)}}});let c=function(e,t){var l;let n,a,s,r,i;if(!e||2!==e.length||!t)return{status:"unsupported",runnerId:0,runnerName:"",price:0,stake:0,side:0,cashoutValue:0};let o=en(e[0])<=en(e[1])?e[0]:e[1],d=o===e[0]?e[1]:e[0],c=ee(t[o.id]),u=ee(t[d.id]),m=c-u;if(.01>Math.abs(m))return ea(c);if(m>0){let e=el(o);null!=e?(n=o,a=1,s=e):(n=d,a=0,s=et(d))}else{let e=et(o);null!=e?(n=o,a=0,s=e):(n=d,a=1,s=el(d))}if(null==s)return{status:"suspended",runnerId:0,runnerName:"",price:0,stake:0,side:0,cashoutValue:0};let h=$(Math.abs(m)/s);if(h<=0)return ea(c);let p=h*(s-1),x=n===o?c:u,f=n===o?u:c;return 1===a?(r=x-p,i=f+h):(r=x+p,i=f-h),{status:"offer",runnerId:n.id,runnerName:null!=(l=n.name)?l:"",price:s,stake:h,side:a,cashoutValue:$(Math.min(r,i))}}(null!=(a=null==n?void 0:n.runners)?a:[],d);if("offer"!==c.status)return null;return es(c.cashoutValue)}catch(e){return console.error("Error calculating cashout:",e),null}},[i,n,t,o,r])})({marketId:null==u?void 0:u.id,eventId:null!=(d=null==u||null==(t=u.event)?void 0:t.id)?d:"",runnerInfo:{runners:null==u?void 0:u.runners},calculateCashOut:(null==u||null==(l=u.runners)?void 0:l.length)===2}),w=(0,s.d4)(e=>e.newBetSlipStates.betSlipData),k=null==(r=(0,C.v)())?void 0:r.width,j=(0,a.useMemo)(()=>{var e;return!!h&&(null==u||null==(e=u.runners)?void 0:e.length)===2},[null==u||null==(i=u.runners)?void 0:i.length,h]),_=(0,s.d4)(e=>e.authentication.isLoggedIn),N=(0,s.wA)(),{handleLoginRegisterAccToTab:I}=(0,ec.J)(),M=(0,a.useCallback)(()=>{var e,t;if(!_)return void I("login");N((0,W.Q7)({marketId:u.id,betDelay:u.betDelay,groupById:u.groupById,eventId:null!=(t=null==(e=u.event)?void 0:e.id.toString())?t:"",initialBookSetValue:y,currentBookSetValue:y,marketType:v?"bookmakerorminibookmaker":"other"}))},[u.id,u.betDelay,u.groupById,null==(o=u.event)?void 0:o.id,N,_,y,v]),F=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.marketId}),A=(0,s.d4)(e=>{var t;return null==(t=e.cashOutStates.cashOutData)?void 0:t.currentBookSetValue});return(0,a.useEffect)(()=>{F!==(null==u?void 0:u.id)||null==y||Number.isNaN(y)||y===A||N((0,W.C8)(y))},[F,null==u?void 0:u.id,y,A,N]),(0,n.jsxs)("section",{className:"w-full grid grid-cols-12 gap-y-1.5 px-2 text-text_color_primary1","aria-labelledby":b?void 0:g,"aria-label":b?"Fancy market: ".concat(null==u?void 0:u.name):void 0,children:[b?p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:P.rD,"aria-hidden":"true"}),(0,n.jsx)(eX,{isFancy:b})]}):null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ez,{title:null==u?void 0:u.name,id:g,marketCashOutValue:y,cashOutDisabled:_&&null==y,showCashOutButton:j,openCashOutModel:M,additionalMarketName:(null==u?void 0:u.mtype)=="MATCH_ODDS"&&(null==eT||null==eT.env?void 0:"lotus365club")=="bangla11"?"2% Commission":void 0}),(0,n.jsx)(eX,{isFancy:b})]}),(0,n.jsx)("div",{className:"bg-bg_color_primary rounded-[3px] shadow-[0_8px_30px_rgb(0,0,0,0.12)] py-[1px] cursor-pointer col-span-12 divide-y divide-border_color_primary",role:"list","aria-label":"".concat(null!=(c=null==u?void 0:u.name)?c:"Market"," runners and odds"),children:u.runners.map(e=>{var t,l,a,s;return(0,n.jsxs)("div",{className:"grid grid-cols-12 w-full",role:"listitem",children:[(0,n.jsx)(eZ,{name:e.name,isFancy:b,betDelay:u.betDelay,marketId:u.id,runnerId:null!=(a=null==e||null==(t=e.id)?void 0:t.toString())?a:"",eventId:null==u||null==(l=u.event)?void 0:l.id,onLadderClick:()=>m({runnerName:e.name,marketId:u.id}),metadata:null!=(s=null==e?void 0:e.metadata)?s:null}),(0,n.jsx)(Y,{runner:e,market:u,isSuspended:x,isBallRunning:f,isFancy:b,isBookmakerOrMiniBookmaker:v}),(null==w?void 0:w.marketId)===u.id&&(null==w?void 0:w.runnerId)===e.id&&k<1024?(0,n.jsx)("div",{className:"col-span-12",children:(0,n.jsx)(er.A,{})}):null]},e.id)})})]},u.id)}function eK(e){let{markets:t,ariaLabel:l,showCashoutButton:s=!0}=e,[r,i]=(0,a.useState)(null),o=(0,a.useMemo)(()=>{let e=null==t?void 0:t[0];return!!e&&(0,R.kv)(e).isFancy},[t]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("section",{className:"space-y-2","aria-label":null!=l?l:"Markets list",children:[o?(0,n.jsxs)("div",{className:"w-full grid grid-cols-12 gap-y-1.5 px-2 text-text_color_primary1",children:[(0,n.jsx)("div",{className:P.rD,"aria-hidden":"true"}),(0,n.jsx)(eX,{isFancy:!0})]}):null,null==t?void 0:t.map(e=>(0,n.jsx)(eY,{market:e,setLadderPopUpDetails:i,showCashoutButton:s,showOddsColumnHeaders:!o},e.id))]}
1),r?(0,n.jsx)(eo,{ladderPopUpDetails:r,handleCloseLadderPopUp:()=>i(null)}):null]})}let eJ=(0,B.cn)("px-[15px] py-2 rounded-[100px] flex items-center justify-center flex-shrink-0 whitespace-nowrap w-max pointer-events-none cursor-default transition-all border ease-in-out duration-100","bg-bg_brand_primary border-border_color_brand_primary","text-text_color_primary2"),eQ=(0,a.memo)(e=>{var t,l,r,i;let{eventId:o,eventTypeId:d,eventName:c}=e,[u,m]=(0,a.useState)("fancy"),h=(0,s.d4)(e=>e.authentication.isLoggedIn),{otherMarkets:p,fancyMarkets:x,premiumMarket:f,tieMarket:b,hasEventEnded:v,isLoading:g,firstMarket:y,nextBallMarkets:k}=(0,L.A)({eventTypeId:"".concat(d),eventId:"".concat(o),intervalTime:h?500:3e3,groupingBy:"marketId"}),j=(null!=(r=null==x?void 0:x.length)?r:0)>0,_=(null!=(i=null==f?void 0:f.length)?i:0)>0,N=j&&_,I=N?[{label:"Fancy Markets",value:"fancy"},{label:"Premium Markets",value:"premium"}]:j?[{label:"Fancy Markets",value:"fancy"}]:[{label:"Premium Markets",value:"premium"}],M=N?"fancy"===u?null!=x?x:[]:null!=f?f:[]:j?null!=x?x:[]:null!=f?f:[],F=null==(t=(0,C.v)())?void 0:t.width,A=(0,s.d4)(e=>e.cashOutStates.cashOutData);return(0,n.jsxs)(n.Fragment,{children:[g||void 0==g?(0,n.jsx)(eC,{}):null,(0,n.jsxs)("section",{className:"w-full space-y-2 pt-2","aria-label":"Event betting markets",title:"Event markets and odds",children:[(null==y?void 0:y.mtype)==="MATCH_ODDS"&&(null===w.qk||void 0===w.qk||null==(l=w.qk.EVENTS_SECTION)?void 0:l.CRICKET_SCORE_CARD_VERSION)==="v1"?(0,n.jsx)(eD,{market:y}):null,"4"===d&&k&&k.length>0&&(0,n.jsx)(eR,{nextBallMarkets:k,eventTypeId:d,eventId:o}),(0,n.jsx)(eK,{markets:(0,D.Xs)(p,k,d),ariaLabel:"Other betting markets"}),(j||_)&&(0,n.jsxs)("section",{className:"w-full space-y-2","aria-label":"Fancy and premium markets",children:[(0,n.jsx)("div",{className:"px-2","aria-label":"Fancy and premium market tabs",children:N?(0,n.jsx)("div",{className:"flex flex-row flex-nowrap font-manrope-regular items-center justify-start gap-2.5",children:I.map(e=>{let t=u===e.value;return(0,n.jsx)("button",{type:"button",role:"tab","aria-selected":t,"aria-label":"".concat(e.label," tab"),onClick:()=>{m(e.value)},className:(0,B.cn)("px-[15px] py-2 rounded-[100px] flex flex-shrink-0 whitespace-nowrap w-max items-center justify-center cursor-pointer active:scale-[99%] transition-all border ease-in-out duration-100 bg-bg_color_primary ",t?(0,B.cn)("bg-bg_brand_primary border-border_color_brand_primary","text-text_color_primary2"):"bg-bg_color_primary text-text_color_tertiary2 border-border_color_primary"),children:(0,n.jsx)("span",{className:"text-[13px] md:text-sm lg:text-base font-bold leading-4",children:e.label})},e.value)})}):(0,n.jsx)("div",{className:"flex flex-row flex-nowrap font-manrope-regular items-center justify-start gap-2.5",children:(0,n.jsx)("span",{className:eJ,children:(0,n.jsx)("span",{className:"text-[13px] md:text-sm lg:text-base font-bold leading-4",children:j?"Fancy Markets":"Premium Markets"})})})}),(0,n.jsx)(eK,{markets:M,ariaLabel:j?"Fancy markets":"Premium markets",showCashoutButton:!1})]}),(0,n.jsx)(eK,{markets:null!=b?b:[],ariaLabel:"Tie markets"})]}),F<1024?(0,n.jsx)(ed.default,{isMobile:!0}):null,A?(0,n.jsx)(eb,{}):null,v?(0,n.jsx)(e_,{eventId:o,eventTypeId:d,eventName:c}):null]})}),e$=(0,A.default)(()=>l.e(4541).then(l.bind(l,14541)),{loadableGenerated:{webpack:()=>[14541]},ssr:!1}),e0=(0,A.default)(()=>l.e(1692).then(l.bind(l,11692)),{loadableGenerated:{webpack:()=>[11692]},loading:()=>(0,n.jsx)(n.Fragment,{})}),e1=(0,A.default)(()=>l.e(7298).then(l.bind(l,87298)),{loadableGenerated:{webpack:()=>[87298]},loading:()=>(0,n.jsx)(n.Fragment,{})}),e2=(0,A.default)(()=>l.e(860).then(l.bind(l,80860)),{loadableGenerated:{webpack:()=>[80860]},loading:()=>(0,n.jsx)(n.Fragment,{})}),e5=(0,A.default)(()=>{var e;return(null===w.qk||void 0===w.qk||null==(e=w.qk.EVENTS_SECTION)?void 0:e.CRICKET_SCORE_CARD_VERSION)==="v1"?l.e(3352).then(l.bind(l,23352)):l.e(7096).then(l.bind(l,57096))},{loadableGenerated:{webpack:()=>[57096]}}),e3=(0,A.default)(()=>l.e(6498).then(l.bind(l,66498)),{loadableGenerated:{webpack:()=>[66498]},loading:()=>(0,n.jsx)(n.Fragment,{})}),e4=(0,A.default)(()=>{var e;return(null===w.qk||void 0===w.qk||null==(e=w.qk.EVENTS_SECTION)?void 0:e.CRICKET_SCORE_CARD_VERSION)==="v1"?l.e(1242).then(l.bind(l,31242)):l.e(418).then(l.bind(l,60418))},{loadableGenerated:{webpack:()=>[60418]}}),e6=(0,A.default)(()=>l.e(8261).then(l.bind(l,58261)),{loadableGenerated:{webpack:()=>[58261]},loading:()=>(0,n.jsx)(n.Fragment,{})}),e8=(0,a.memo)(e=>{var t,l;let{eventId:a}=e,{orderCountByEventId:s}=(0,O.gu)({eventId:a});return(0,n.jsx)("div",{children:(null==s||null==(t=s.result)?void 0:t.count)>0?"(".concat(null==s||null==(l=s.result)?void 0:l.count,")"):null})}),e9=(0,a.memo)(e=>{let{setRules:t,eventId:l,eventTypeId:s}=e,{startClosing:r,handleStartClosing:i}=(0,M.x)(),{width:o}=(0,C.v)(),d=(0,a.useCallback)(()=>
1{i(300,()=>{t(!1)})},[i,t]),c=o<760;return(0,n.jsx)(I.A,{startClosing:r,closeFunction:d,type:c?"bottom":"center",headAvaible:!0,popUpClass:"bg-bg_color_primary flex justify-start overflow-y-auto flex-col rounded-lg ".concat(c?"w-full h-[80%] max-w-full":"w-[94%] h-[75%] max-w-[700px]"),id:"rulesPopUp",title:"Rules-Cricket",closeIcon:(0,n.jsx)(F.A,{height:"15",width:"15",fill:"var(--icon-color-brand-secondary)",className:"cursor-pointer rounded-full p-1 size-7 active:scale-95 transition-all duration-300"}),closeIconClassName:"",titleClassName:"text-lg md:text-2xl text-text_color_primary1 font-semibold fon-lato bg-bg_color_primary",titleContainerClassName:"flex items-center justify-between sticky top-0 bg-bg_color_primary z-10 px-4 py-2 border-b border-border_color_primary",popupAnimations:{close:c?"slideDown":"popUpCloseAnimation1",open:c?"slideUp":"popUpOpenAnimation1"},children:(0,n.jsx)(v,{eventId:l,eventTypeId:s})})}),e7=(0,a.memo)(e=>{var t;let{params:l,getTeamNames:a,renderInPlayOrWaitIcon:s,handleTopBarScoreCard:r,handleRules:i,scoreCondition:o}=e,d="4"===l.slug[2];return(0,n.jsxs)("div",{style:{zIndex:20},id:"eventDetails".concat(l.slug[2],"-").concat(l.slug[1]),className:"w-full flex items-center justify-between px-1 py-1.5 bg-bg_color_primary ".concat((null===w.qk||void 0===w.qk||null==(t=w.qk.EVENTS_SECTION)?void 0:t.CRICKET_SCORE_CARD_VERSION)==="v1"&&!0===o?"":"sticky top-0"),children:[(0,n.jsxs)("div",{id:"playIcon",className:"flex items-start justify-center gap-x-3 w-max ".concat(d?"flex-1 pr-2":"w-full"),children:[(0,n.jsx)("div",{onClick:()=>window.history.back(),className:(0,B.cn)("w-8 cursor-pointer rounded-sm h-6 flex items-center transition-all duration-300 ease-in-out justify-center active:scale-[120%] active:opacity-90","bg-color_cricket_back_btn"),children:(0,n.jsx)(N.A,{fill:"var(--icon-color-brand-secondary)"})}),(0,n.jsx)("span",{className:"w-max mt-0.5",children:s}),r]}),d&&(0,n.jsx)("div",{className:"flex items-start justify-start w-max h-full",onClick:()=>i(!0),children:(0,n.jsx)(j.default,{fill:"var(--icon-color-brand-secondary)"})})]})}),te=(0,a.memo)(e=>{let{getTeamNames:t,renderInPlayOrWaitIconForDesktop:l,getMatchOpenTimerForDesktop:s,isInPlay:r,startTime:i,params:o,handleRules:d}=e;return(0,n.jsx)("div",{className:"flex flex-col w-full",children:(0,n.jsxs)("div",{className:"flex flex-row w-full justify-between items-center px-2 mt-2 bg-bg_appBg rounded-sm py-2",children:[(0,n.jsxs)("div",{id:"playIcon",className:"flex items-start justify-center gap-x-3 flex-1",children:[(0,n.jsx)("span",{className:"mt-1.5",children:l}),(0,n.jsxs)("span",{className:"flex-1 bg-bg_text_brand_primary text-transparent bg-clip-text font-lato text-xl font-bold gap-x-2",children:[(0,n.jsx)("span",{className:"capitalize",children:null==t?void 0:t.team1}),(null==t?void 0:t.team2)&&(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)("span",{className:"ml-[2px]",children:"vs"}),(0,n.jsx)("span",{className:"capitalize w-max ml-[2px] break-words",children:null==t?void 0:t.team2})]})]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-center gap-x-2",children:[i&&!r&&(0,n.jsx)("span",{className:"w-max break-words bg-bg_text_brand_primary text-transparent bg-clip-text font-lato text-xs font-bold",children:s}),"4"===o.slug[2]&&(0,n.jsx)(j.default,{onClick:()=>d(!0),fill:"var(--icon-color-brand-secondary)",className:"cursor-pointer"})]})]})})}),tt=(0,a.memo)(e=>{var t,l;let{params:r}=e,[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)("LIVE"),u=(0,s.d4)(e=>e.eventDetailsStates.startTime),{width:m}=(0,C.v)(),h=(0,s.d4)(e=>e.eventDetailsStates.isVideoAvailable),p=(0,a.useMemo)(()=>{var e,t,l;let n=null==(e=decodeURIComponent(r.slug[1]))?void 0:e.split(" vs ");return{team1:null==(t=n[0])?void 0:t.trim(),team2:null==(l=n[1])?void 0:l.trim()}},[r.slug[1]]),{finalScoreData:x}=(0,S.A)({eId:r.slug[3],eTypeId:r.slug[2],isCompetetion:null!=p&&!!p.team1&&(null==p||!p.team2)}),f=(0,a.useCallback)(e=>{c(e)},[]),b=(0,a.useCallback)(e=>{o(e)},[]),v=(0,a.useMemo)(()=>!!u&&new Date(u)<new Date,[u]),j=(0,a.useMemo)(()=>u?(0,n.jsx)(y.default,{date:u,format:"relative"}):(0,n.jsx)(n.Fragment,{}),[u]),N=(0,a.useMemo)(()=>{let e="var(--icon-color-brand-secondary)";return u&&v?(0,n.jsx)(k,{fill:e}):(0,n.jsx)(_,{fill:e})},[v,u,!1]),I=(0,a.useMemo)(()=>{let e="var(--icon-color-brand-secondary)";return u&&v?(0,n.jsx)(k,{height:"18",width:"18",fill:e}):(0,n.jsx)(_,{height:"18",width:"18",fill:e})},[v,u]),M=(0,a.useMemo)(()=>(0,n.jsxs)("div",{className:"flex flex-col items-start justify-start flex-1 break-words gap-y-0",children:[(0,n.jsxs)("span",{className:"w-full text-start font-lato text-base font-bold ".concat("bg-bg_text_brand_primary text-transparent bg-clip-text"),children:[(0,n.jsx)("span",{className:"capitalize break-words",children:null==p?void 0:p.team1}),(null==p?void 0:p.team2)&&(0,n.jsxs)(a.Fragment,{children:[(0,n.jsx)("span",{className:"mx-1",children:"vs"}),(0,n.jsx)("span",{className:"capitalize break-words",children:null==p?void 0:p.team2})]})]}),(0,n.jsx)("span",{className:"w-auto max-w-[90%]",children:u&&!v&&(0,n.jsx)("span",{className:"w-full break-words bg-bg_text_brand_primary inline-block text-transparent bg-clip-text font-lato text-xs font-bold",children:j})})]}),[p,u,v,j,!1]),F=(0,a.useMemo)(()=>{let e=r.slug[2];if(!x)return null;switch(e){case"1":return(0,n.jsx)(e2,{teams:x});case"2":return(0,n.jsx)(e3,{stats:x});case"4":return(0,n.jsx)(e5,{matchStats:x});default:return null}},[x,r.slug[2]]),A=(0,a.useMemo)(()=>(0,n.jsx)("div",{className:"w-full text-selection-none pb-3 lg:pb-0",children:(0,n.jsx)(eQ,{eventId:r.slug[3],eventTypeId:r.slug[2],eventName:r.slug[1]?decodeURIComponent(r.slug[1]):void 0})}),[r.slug]),B=(0,a.useMemo)(()=>{let e=r.slug[2],t=["1","2","4"].includes(e),l=0===Object.keys(x||{}).length;return t?(0,n.jsx)("div",{title:"Live Score",className:"".concat("LIVE"===d?"block":"hidden"," w-full h-full flex-grow"),children:(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-5 lg:grid-cols-7 w-full h-max",children:[(0,n.jsx)("div",{className:"".concat(h?"col-span-1 sm:col-span-3 lg:col-span-4":"col-span-1 sm:col-span-5 lg:col-span-7"," w-full h-max"),children:"4"===e?(0,n.jsx)("div",{className:"w-full h-max",children:l?(0,n.jsx)(e0,{eventId:r.slug[3],eventTypeId:r.slug[2]}):(0,n.jsx)(e4,{gameId:e,matchStats:x})}):(0,n.jsx)("div",{className:"w-full h-max",children:(0,n.jsx)(e0,{eventId:r.slug[3],eventTypeId:r.slug[2]})})}),h&&(0,n.jsx)("div",{className:"col-span-1 sm:col-span-2 lg:col-span-3 w-full h-max",children:(0,n.jsx)(e1,{gameId:e,eventId:r.slug[3]}
1)})]})}):null},[r.slug,x,h,d]),O=(0,a.useMemo)(()=>(0,n.jsx)("div",{title:"Open Bets",className:"".concat("OPEN BETS"===d?"":"hidden"),children:(0,n.jsx)(e6,{id:r.slug[2],eventId:r.slug[3]})}),[d,r.slug[2]]),L=(0,a.useRef)(null),P=(0,s.wA)();(0,a.useEffect)(()=>{let e=document.getElementById("main-body"),t=document.getElementById("main-content-container"),l=document.getElementById("mainHeader");return null==e||e.classList.add("overflow-y-auto","lg:overflow-y-hidden"),null==l||l.classList.remove("sticky","top-0"),null==t||t.classList.remove("overflow-y-auto"),null==t||t.classList.add("lg:overflow-y-auto"),()=>{P((0,E.gJ)(null)),P((0,E.Ci)(!1)),null==e||e.classList.remove("overflow-y-auto","lg:overflow-y-hidden"),null==t||t.classList.add("overflow-y-auto"),null==l||l.classList.add("sticky","top-0"),null==t||t.classList.remove("lg:overflow-y-auto")}},[]),(0,a.useEffect)(()=>{if(!L.current||"OPEN BETS"!==d)return;let e=L.current.getBoundingClientRect();e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)||L.current.scrollIntoView({behavior:"smooth"})},[d]);let D=(0,a.useMemo)(()=>r.slug[2],[r.slug[2]]),T=(0,a.useMemo)(()=>!!["1","2","4"].includes(D)&&!!x&&null!==x&&0!==Object.keys(x).length,[D,x]),R=(0,a.useMemo)(()=>{var e;return(null===w.qk||void 0===w.qk||null==(e=w.qk.EVENTS_SECTION)?void 0:e.CRICKET_SCORE_CARD_VERSION)==="v1"&&"4"===D?F:(0,n.jsx)("div",{className:"w-full ".concat("bg-bg_color_quaternary1"," ").concat("4"===D?"px-0":"px-3"),children:F})},[F,!1,D,T]),W=(0,a.useMemo)(()=>{let e=r.slug[2];return["1","2","4"].includes(e)&&x?(0,n.jsx)("div",{className:"w-full bg-bg_color_quaternary ".concat("4"===e?"px-0":"px-3"),children:F}):null},[r.slug[2],x,F]),U=(0,a.useMemo)(()=>(0,n.jsx)("div",{title:"Live And Open Bets",className:"lg:hidden w-full bg-bg_color_primary shadow-sm",children:(0,n.jsx)(g.A,{type:"transperent",options:[{label:"LIVE",startAdornment:(0,n.jsx)("div",{className:"w-2 h-2 bg-bg_color_brand_primary1 rounded-full mr"}),value:"LIVE"},{label:"OPEN BETS",endAdornment:(0,n.jsx)(e8,{eventId:r.slug[3]}),value:"OPEN BETS"}],activeTab:d,setActiveTab:f,className:"rounded-none bg-bg_color_primary w-full border-none shadow-none overflow-clip gap-x-2.5 active:scale-100 ".concat(""),btnClassName:"font-lato py-2.5 uppercase active:opacity-90",activeTabTextColor:"bg-clip-text font-bold font-lato text-xs ".concat("text-text_color_primary1"),inActiveTabTextColor:"text-text_color_primary3 font-lato font-bold text-xs",bottomLineColor:"bg-bg_color_brand_primary1"})}),[d,f,!1]);return(0,n.jsxs)(a.Fragment,{children:[(0,n.jsxs)("h1",{className:"hidden",children:[null==p||null==(t=p.team1)?void 0:t.toUpperCase()," vs"," ",null==p||null==(l=p.team2)?void 0:l.toUpperCase()," - - Live Betting Odds |"," ",(null===w.qk||void 0===w.qk?void 0:w.qk.APP_NAME)||"lotus365club"]}),(0,n.jsxs)("div",{className:"md:mb-3",children:["OPEN BETS"===d&&(0,n.jsx)("div",{ref:L,className:"w-full h-0"}),m<1024?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e7,{params:r,getTeamNames:p,renderInPlayOrWaitIcon:N,handleTopBarScoreCard:M,handleRules:b,scoreCondition:T}),R,(0,n.jsx)("hr",{className:"w-full"}),U]}):(0,n.jsxs)("div",{className:"flex flex-col w-full",children:[(0,n.jsx)(te,{getTeamNames:p,renderInPlayOrWaitIconForDesktop:I,getMatchOpenTimerForDesktop:j,isInPlay:v,startTime:u,params:r,handleRules:b}),W]}),(null==p?void 0:p.team1)&&(null==p?void 0:p.team2)&&B,O,A]}),i&&(0,n.jsx)(e9,{setRules:o,eventId:r.slug[3],eventTypeId:r.slug[2]}),"4"===r.slug[2]&&(0,n.jsx)(e$,{})]})})},85621:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var n=l(3591),a=l(18543),s=l(75720),r=l(25696);let i=(0,a.memo)(e=>{let{price:t,size:l,type:i,className:o,onClick:d,isDisabled:c}=e,u=(0,a.useRef)(t),[m,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(u.current!==t){if(u.current=t,0!==t){h(!0);let e=setTimeout(()=>h(!1),300);return()=>clearTimeout(e)}}else u.current=t},[t]);let p=(null==i?void 0:i.toLowerCase())==="lay"?"Lay":"Back",x=0!==t?String(t):"Unavailable",f="".concat(p," odds ").concat(x).concat(null!=l&&l>0?", size ".concat(l):"");return(0,n.jsxs)(s.A,{className:(0,r.cn)(o,0===t?"opacity-80 curs
1or-not-allowed":"","relative disabled:opacity-60 disabled:cursor-not-allowed"),onClick:d,disabled:c,type:"button",ariaLabel:f,title:f,"aria-disabled":c,"data-odd-type":null==i?void 0:i.toLowerCase(),"data-price":t,"data-size":l,children:[(0,n.jsx)("span",{className:"relative z-10 transition-all ease-in-out duration-300 origin-center flex items-center justify-center w-full leading-5 text-sm md:text-[15px] font-semibold","aria-hidden":"true",children:0!==t?t:"-"}),l?(0,n.jsx)("small",{className:"z-10 transition-all ease-in-out duration-300 origin-center flex items-center justify-center w-full text-[10px] leading-3 text-center whitespace-normal font-normal","aria-hidden":"true",children:l}):null,m&&(0,n.jsx)("div",{className:"absolute top-0 z-0 left-0 w-full h-full highLightChange transition-all ease-in-out duration-300","aria-hidden":"true"})]})})},88642:(e,t,l)=>{"use strict";l.d(t,{default:()=>c});var n=l(3591),a=l(76564),s=l(69552),r=l(66684),i=l(18543),o=l(47512),d=l(83232);let c=(0,i.memo)(e=>{var t;let{eventName:l,eventId:c}=e,{smaMenu:u,isSmaMenuLoading:m}=(0,o.A)({eventTypeId:c.toString()}),h=(0,r.useRouter)(),p=(0,i.useCallback)(e=>{let t=encodeURIComponent((null==e?void 0:e.name)||(null==e?void 0:e.altName));h.push("/".concat(l,"/competitions/").concat(t,"/").concat(c,"/").concat(null==e?void 0:e.id))},[h,l,c]),x=(0,i.useMemo)(()=>{var e;return null==u||null==(e=u.map(e=>null==e?void 0:e.children))?void 0:e.flat()},[u]);return(0,n.jsx)("nav",{className:"w-full block lg:hidden","aria-label":"".concat(l," competitions navigation"),"aria-busy":m,"aria-live":"polite",children:(0,n.jsxs)("ul",{className:"font-lato flex flex-col gap-y-[5px] pb-2 h-full list-none w-full",role:"list","aria-label":"List of ".concat(l," competitions"),children:[null==(t=m?Array.from({length:10}):x)?void 0:t.map((e,t)=>{let s=(null==e?void 0:e.name)||(null==e?void 0:e.altName),r=m?"Loading competition ".concat(t+1):"View ".concat(s," competition details"),i=m?"Loading competition...":"Click to view ".concat(s," competition details for ").concat(l);return(0,n.jsx)("li",{role:"listitem","aria-label":m?void 0:s,children:(0,n.jsxs)(a.A,{onClick:()=>{m||p(e)},title:i,"aria-label":r,"aria-disabled":m,disabled:m,className:"bg-bg_color_primary py-2.5 px-2 active:scale-95 rounded min-h-[40px] flex items-center shadow-sm text-start w-full ".concat(m?"cursor-not-allowed animate-pulse":""),children:[(0,n.jsx)("span",{className:"font-semibold w-full truncate text-left text-text_color_primary1 leading-5","aria-hidden":m,children:m?"Loading...":s}),m&&(0,n.jsx)("span",{className:"sr-only","aria-live":"polite",children:"Loading competitions..."})]})},t)}),!m&&(null==x?void 0:x.length)===0&&(0,n.jsx)("li",{className:"flex w-full h-full min-h-[50dvh] items-center justify-center gap-y-2",role:"listitem","aria-label":"No competitions found for ".concat(l),children:(0,n.jsx)(s.A,{labelForMarket:"No Competitions Found for ".concat(l,"..."),labelClassName:" text-text_color_primary1 font-semibold text-[14px] py-[4px] px-[2px] ",labelIcon:(0,d.L8)(Number(c))})})]})})})},90053:(e,t,l)=>{"use strict";l.d(t,{A:()=>s});var n=l(3591),a=l(14928);let s=e=>{let{title:t,height:l}=e;return(0,n.jsxs)("div",{className:"w-full flex flex-col gap-y-4 items-center justify-center ".concat(l||"min-h-full"),children:[(0,n.jsx)(a.A,{}),(0,n.jsx)("span",{className:" bg-bg_text_brand_primary w-full text-transparent text-center bg-clip-text font-lato text-base font-bold",children:t})]})}},91361:(e,t,l)=>{"use strict";l.d(t,{Kr:()=>c,_S:()=>o,bY:()=>a});var n=l(97058).Buffer;let a="/assets/images/brandWiseImages/tomexch/deskSideMenu/cricket.png",s={1:"1",2:"2",4:"4"},r=new Set(["w","a","b","cc","a women","women","srl"]);function i(e){let t=e.trim();return t&&(t.includes(",")&&(t=t.split(",").map(e=>e.trim()).filter(Boolean).reverse().join(" ")),t=function(e){let t=e.trim().split(/[\s_-]+/).filter(Boolean);for(;t.length>0;){let e=t[t.length-1].toLowerCase();if(r.has(e))t.pop();else break}return t.join(" ")}(t))?t.toLowerCase().replace(/[\s-]+/g,"_"):""}function o(e,t,l){let a=s[e],r=t.trim();if(!a||!r)return"";let o=i(r);if(!o)return"";let d=o?n.from(o,"utf-8").toString("base64"):"";return"".concat("https://media22.cc/insecure","/rs:fit:").concat(l,":").concat(l,"/plain/").concat(a,"/").concat(d,".png")}let d={india:"#0033A0",australia:"#FFCD00",england:"#0057B8",new_zealand:"#000000",south_africa:"#007A4D",pakistan:"#006629",sri_lanka:"#FFB612",bangladesh:"#006A4E",afghanistan:"#D32011",west_indies:"#7B0041",zimbabwe:"#FCCE00",ireland:"#169B62",netherlands:"#FF6600",scotland:"#0065BD",nepal:"#DC143C",namibia:"#003580",uae:"#FF0000",oman:"#C8102E",usa:"#3C3B6E",canada:"#FF0000",papua_new_guinea:"#D91E18",kenya:"#006600",hong_kong:"#DE2910",singapore:"#EF3340",malaysia:"#010066",thailand:"#2D2A4A",japan:"#BC002D",germany:"#000000",italy:"#009246",spain:"#AA151B",france:"#0055A4",denmark:"#C60C30",mumbai_indians:"#004B8D",chennai_super_kings:"#F9CD05",royal_challengers_bengaluru:"#CC1213",royal_challengers_bangalore:"#CC1213",kolkata_knight_riders:"#3A225D",sunrisers_hyderabad:"#EE7429",delhi_capitals:"#2561AE",delhi_daredevils:"#2561AE",punjab_kings:"#DD1F2D",kings_xi_punjab:"#DD1F2D",rajasthan_royals:"#E50693",lucknow_super_giants:"#0057E2",gujarat_titans:"#1B2133",deccan_chargers:"#004BA0",pune_warriors_india:"#2F9BE3",kochi_tuskers_kerala:"#6A8A1F",rising_pune_supergiant:"#9E3495",rising_pune_supergiants:"#9E3495",gujarat_lions:"#F58220",mumbai_indians_women:"#004B8D",delhi_capitals_women:"#2561AE",royal_challengers_bengaluru_women:"#CC1213",up_warriorz:"#5C2D91",gujarat_giants:"#F58220",gujarat_giants_women:"#F58220",karachi_kings:"#0752C2",lahore_qalandars:"#78FF06",islamabad_united:"#FF0000",peshawar_zalmi:"#FFFF00",quetta_gladiators:"#5F0182",multan_sultans:"#589F28",sydney_sixers:"#EC2A90",sydney_thunder:"#97D700",melbourne_stars:"#287246",melbourne_renegades:"#EE343F",perth_scorchers:"#CC5A1E",brisbane_heat:"#27A6B0",adelaide_strikers:"#0084D6",hobart_hurricanes:"#674398",sydney_sixers_women:"#EC2A90",sydney_thunder_women:"#97D700",melbourne_stars_women:"#287246",melbourne_renegades_w
1omen:"#EE343F",perth_scorchers_women:"#CC5A1E",brisbane_heat_women:"#27A6B0",adelaide_strikers_women:"#0084D6",hobart_hurricanes_women:"#674398",mi_cape_town:"#004B8D",joburg_super_kings:"#F9CD05",sunrisers_eastern_cape:"#EE7429",durban_super_giants:"#0057E2",pretoria_capitals:"#2561AE",paarl_royals:"#E50693",dubai_capitals:"#2561AE",mi_emirates:"#004B8D",abu_dhabi_knight_riders:"#3A225D",desert_vipers:"#C8102E",sharjah_warriorz:"#FF6B00",gulf_giants:"#F95800",trinbago_knight_riders:"#3A225D",barbados_royals:"#E50693",barbados_tridents:"#E50693",guyana_amazon_warriors:"#006400",saint_lucia_kings:"#D4AF37",st_lucia_zouks:"#D4AF37",st_kitts_and_nevis_patriots:"#D71920",antigua_and_barbuda_falcons:"#00AEEF",oval_invincibles:"#00BFA5",manchester_originals:"#000000",northern_superchargers:"#5C2D91",sunrisers_leeds:"#EE7429",southern_brave:"#0B8F3C",welsh_fire:"#D71920",london_spirit:"#0057B8",birmingham_phoenix:"#FF7F00",trent_rockets:"#FECC00",texas_super_kings:"#F9CD05",mi_new_york:"#004B8D",seattle_orcas:"#2561AE",washington_freedom:"#C8102E",san_francisco_unicorns:"#800080",los_angeles_knight_riders:"#3A225D",jaffna_kings:"#222550",colombo_strikers:"#E50693",colombo_kaps:"#E50693",kandy_falcons:"#F9A602",dambulla_aura:"#00AEEF",galle_marvels:"#512B81",comilla_victorians:"#D71920",fortune_barishal:"#006A4E",khulna_tigers:"#F58220",rangpur_riders:"#3A225D",sylhet_strikers:"#00AEEF",durdanto_dhaka:"#006A4E",chattogram_challengers:"#FF6600",auckland_aces:"#0057B8",canterbury_kings:"#D71920",central_stags:"#006400",northern_brave:"#0B8F3C",otago_volts:"#F9CD05",wellington_firebirds:"#000000",yorkshire:"#1C4FA0",lancashire:"#D71920",surrey:"#572700",middlesex:"#C8102E",essex:"#003DA5",kent:"#512B81",somerset:"#000000",warwickshire:"#F58220",hampshire:"#0057B8",nottinghamshire:"#00843D",mumbai:"#004B8D",tamil_nadu:"#F9CD05",karnataka:"#D71920",vidarbha:"#FF6600",delhi:"#2561AE",punjab:"#DD1F2D",saurashtra:"#FFB81C",baroda:"#0057B8",bengal:"#6A0DAD",maharashtra:"#0033A0",railways:"#006400",services:"#808080",rajasthan:"#E50693",uttar_pradesh:"#0057E2",kerala:"#00843D"};function c(e){let t=i(e);if(t&&t in d)return d[t]}},94005:(e,t,l)=>{"use strict";l.r(t),l.d(t,{RenderBetDelayAndConfirmBetSection:()=>b,SkeletonLoaderForRenderClientSideEvebtTypeDetailsData:()=>v,default:()=>g});var n=l(3591),a=l(25696),s=l(1953),r=l(20432),i=l(59662);function o(e){return null!=e&&"object"==typeof e&&"inPlayEvents"in e&&Array.isArray(e.inPlayEvents)}var d=l(18543),c=l(5245),u=l(78182),m=l(69552),h=l(49683),p=l(83232),x=l(30156),f=l(44809);let b=()=>{var e,t;return(null!=(t=null==(e=(0,x.v)())?void 0:e.width)?t:0)<1024?(0,n.jsx)(f.default,{isMobile:!0}):null},v=()=>(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)("div",{className:(0,a.cn)("w-full flex items-center justify-between border-b border-border_color_primary rounded-t-[10px] py-1.5 px-[7px]","bg-bg_competetionInPlayUpComingBg"),children:(0,n.jsx)("div",{className:(0,a.cn)(c.fh,"h-5 w-24"),"aria-hidden":!0})}),(0,n.jsx)("div",{className:(0,a.cn)(c.nO),children:Array.from({length:5}).map((e,t)=>(0,n.jsx)(u.MY,{},t))})]}),g=(0,d.memo)(e=>{var t,l;let{eventTypeId:x,initialData:f}=e,{data:b,isLoading:g}=(e=>{var t,l,n;let{eventTypeId:a,pollingInterval:s=2e3,groupBy:o="competition",initialData:d}=e,c=(0,i.d4)(e=>e.authentication.isLoggedIn),u=(0,i.d4)(e=>e.authentication.isLoading),{data:m,isLoading:h}=(0,r.Um)({eventTypeId:a,isLoggedIn:c,groupBy:o},{skip:u||!a,pollingInterval:0===s?void 0:s}),p="competition"===o?{}:"inplayupcoming"===o?{inPlayEvents:[],upcomingEvents:[]}:[],x="inplayupcoming"===o?{inPlayEvents:null!=(t=null==m?void 0:m.inPlayEvents)?t:[],upcomingEvents:null!=(l=null==m?void 0:m.upcomingEvents)?l:[]}:null!=(n=null==m?void 0:m.processedEvents)?n:p,f=h||u;return{data:f&&null!=d?d:x,isLoading:f}})({eventTypeId:x,groupBy:"inplayupcoming",pollingInterval:(0,i.d4)(e=>e.authentication.isLoggedIn)?1500:3e3,initialData:f}),{t:y}=(0,s.B)(),w=o(b)&&b.inPlayEvents.length>0,k=o(b)&&b.upcomingEvents.length>0;return f||!g||w||k?w||k?(0,n.jsxs)(d.Fragment,{children:[w?(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)(h.A,{tab:"inPlay",showOpenBetsSection:!1,bgColor:"bg-bg_competetionInPlayUpComingBg"}),(0,n.jsx)("div",{className:(0,a.cn)(c.nO),children:null==b||null==(t=b.inPlayEvents)?void 0:t.map(e=>(0,n.jsx)(d.Fragment,{children:(0,n.jsx)(u.FW,{event:e,isInPlay:!0})},e.id))})]}):null,k?(0,n.jsxs)("div",{className:"w-full h-max",children:[(0,n.jsx)(h.A,{tab:"upcoming",showOpenBetsSection:!1,bgColor:"bg-bg_competetionInPlayUpComingBg"}),(0,n.jsx)("div",{className:(0,a.cn)(c.nO,"font-helvetica"),children:null==b||null==(l=b.upcomingEvents)?void 0:l.map(e=>(0,n.jsx)(d.Fragment,{children:(0,n.jsx)(u.FW,{event:e,isInPlay:!1}
1)},e.id))})]}):null]}):(0,n.jsx)(m.A,{labelForMarket:"".concat(y("No")," ").concat(y("Events Found for")),labelClassName:" text-text_color_primary1 font-semibold text-[14px] py-[4px] px-[2px] ",labelIcon:(0,p.L8)(Number(x)),minHeight:"h-[60dvh]"}):(0,n.jsx)(v,{})})}},e=>{e.O(0,[2346,9662,3207,6439,3740,5531,8126,6210,7287,5696,4859,8203,838,3394,8691,1391,6747,952,3214,3944,4186,4809,5245,7415,8641,8731,7358],()=>e(e.s=14346)),_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.