oraculo-ui 0.1.45 → 0.1.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,20 +1,20 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),P=require("@mui/material"),w=require("react"),me=require("@splidejs/react-splide"),Le=require("@mui/material/Box"),We=require("@mui/material/Typography"),Ge=require("@mui/material/Stack"),J=require("@mui/icons-material"),Me=require("@mui/icons-material/ChevronLeftRounded"),Ae=require("@mui/icons-material/ChevronRightRounded"),De=require("@mui/material/useMediaQuery"),ce=require("firebase/firestore"),q=t=>t&&t.__esModule?t:{default:t},He=q(w),S=q(Le),M=q(We),U=q(Ge),xe=q(Me),fe=q(Ae),qe=q(De);function R({children:t,onClick:r,href:s,target:a,rel:c,type:o="button",disabled:n=!1,variant:p="primary",size:m,fullWidth:g=!1,fullHeight:x=!1,className:y="",ariaLabel:i,leftIcon:d,rightIcon:l,iconOnly:u}){const h=!!t&&t!==!0,k=(!!d?1:0)+(!!l?1:0)==1,T=u!=null?u:k&&!h,O=["orc-btn",p==="secondary"?"orc-btn--secondary":p==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",g?"orc-btn--full":"",x?"orc-btn--fullHeight":"",T?"orc-btn--iconOnly":"",y].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"orc-btn__icon",children:d}),!T&&e.jsx("span",{className:"orc-btn__label",children:t}),l&&e.jsx("span",{className:"orc-btn__icon",children:l})]}),F=n?!0:void 0;return s?e.jsx(P.Link,{href:s,target:a,rel:c,"aria-label":i,"aria-disabled":F,tabIndex:F?-1:void 0,className:O,onClick:F?B=>B.preventDefault():r,children:I}):e.jsx("button",{type:o,onClick:r,disabled:!!F,"aria-label":i,className:O,children:I})}function A({title:t,iconUrl:r,size:s="md",className:a=""}){const o=["orc-section-title",s?`orc-section-title--${s}`:"",a].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[r&&e.jsx("img",{src:r,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const ne=({total:t,active:r,onSelect:s,className:a=""})=>{if(t<=1)return null;const c=["orc-dots",a].filter(Boolean).join(" ");return e.jsx("div",{className:c,role:"tablist",children:Array.from({length:t}).map((o,n)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":n===r,"aria-label":`Ir al slide ${n+1}`,className:"orc-dots__dot"+(n===r?" orc-dots__dot--active":""),onClick:()=>s==null?void 0:s(n)})},n))})};function G({children:t,minWidth:r=32,spacing:s=2,justify:a="stretch",columns:c=null}){const o=c||`repeat(auto-fit, minmax(${r}px, 1fr))`,n=typeof s=="number"?`${s*8}px`:s;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:a,gap:n,height:"inherit"},children:t})}function te({src:t,alt:r}){return e.jsx(P.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(P.Box,{component:"img",src:t,alt:r,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}function Xe({title:t,subtitle:r}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"6px",color:"#fff"},children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),r&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{style:{fontWeight:400,fontSize:"12px",lineHeight:"16px"},children:r})]})]})}function ge({text:t,color:r="#ff3b3b",textColor:s="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:r,color:s,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function he({live:t,time:r}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(ge,{text:"En vivo"}),r&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:r})]})}function ve({title:t,subtitle:r,live:s=!1,time:a=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(Xe,{title:t,subtitle:r}),e.jsx(he,{live:s,time:a})]})}const Je="oraculo__OraculoEventLabel-module__label___c64Xw",Ke={label:Je};function se({text:t}){return e.jsx("span",{className:Ke.label,children:t})}const Ye="oraculo__OraculoEventLeague-module__container___rdk4F",Qe={container:Ye};function je({title:t}){return e.jsx("div",{className:Qe.container,children:t.toUpperCase()})}const Ve="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",Ze="oraculo__OraculoEventScore-module__name___r4uL6",et="oraculo__OraculoEventScore-module__score___Xl03M",tt="oraculo__OraculoEventScore-module__normal___cCNFz",ot="oraculo__OraculoEventScore-module__small___fVt8E",X={scoreWrapper:Ve,name:Ze,score:et,normal:tt,small:ot};function ae({text:t,name:r,size:s="normal"}){return e.jsxs("div",{className:`${X.scoreWrapper} ${X[s]}`,children:[e.jsx("div",{className:`${X.score} ${X[s]}`,children:t}),r&&e.jsx("span",{className:`${X.name} ${X[s]}`,children:r})]})}const nt="oraculo__OraculoEventTeamInfo-module__team___UfpUs",st="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",at="oraculo__OraculoEventTeamInfo-module__name___4ikm-",rt="oraculo__OraculoEventTeamInfo-module__regular___ag826",it="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",Q={team:nt,logo:st,name:at,regular:rt,compact:it};function Y({name:t,logo:r,size:s="regular"}){return e.jsxs("div",{className:`oli-font ${Q.team} ${Q[s]}`,children:[e.jsx("img",{src:r,alt:t,className:Q.logo}),e.jsx("span",{className:Q.name,children:t})]})}const ct=me.Splide,lt=me.SplideSlide,D=w.forwardRef(({items:t=[],renderItem:r,perPage:s=1,gap:a="0px",breakpoints:c,options:o={},className:n="",onMove:p,useIndexAsKey:m=!1},g)=>{const x=w.useRef(null);w.useImperativeHandle(g,()=>({next:()=>{var l;return(l=x.current)==null?void 0:l.go(">")},prev:()=>{var l;return(l=x.current)==null?void 0:l.go("<")},go:l=>{var u;return(u=x.current)==null?void 0:u.go(l)}}));const y=w.useCallback(l=>{const u=l.index,h=l.length,E=l.options.perPage||1,C=u===0,k=u>=h-E;p==null||p({index:u,isStart:C,isEnd:k,total:h})},[p]),i=w.useCallback(l=>{y(l)},[y]),d={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:s,gap:a,breakpoints:c,...o};return e.jsx("div",{className:n,style:{width:"100%"},children:e.jsx(ct,{ref:x,options:d,onMove:y,onMounted:i,children:t.map((l,u)=>{var h;return e.jsx(lt,{children:r(l,u)},m?u:(h=l.id)!=null?h:u)})})})}),K=({imageUrl:t,onClick:r,size:s="sm",fillParent:a=!1})=>{const c=s==="lg"?{w:280,h:352}:{w:152,h:168},o=p=>{p.stopPropagation(),r==null||r()},n=a?{width:"100%",height:"100%"}:{width:`${c.w}px`,height:`${c.h}px`};return e.jsxs(S.default,{onClick:r,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...n,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(S.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(S.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(R,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function be({imageUrl:t,orden:r=1,onClick:s,sizes:a={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var x,y,i,d;const c=(l,u)=>{var h,E,C,k;return{xs:(E=(h=a.xs)==null?void 0:h[l])!=null?E:u,md:(k=(C=a.md)==null?void 0:C[l])!=null?k:u}},o=c("w",186),n=c("h",264),p=c("r",22.6),m=c("font",64),g={xs:Math.round(((y=(x=a.xs)==null?void 0:x.font)!=null?y:64)*.28),md:Math.round(((d=(i=a.md)==null?void 0:i.font)!=null?d:64)*.28)};return e.jsxs(S.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${n.xs}`,md:`${o.md}/${n.md}`},borderRadius:{xs:`${p.xs}px`,md:`${p.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${g.xs}px`,md:`${g.md}px`}},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(K,{imageUrl:t,onClick:s,size:"lg",fillParent:!0})}),e.jsx(S.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${g.xs}px`,md:`-${g.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:r})]})}const ye=({logo:t,provider:r,providerName:s,machine:a,onClick:c})=>{var o;return e.jsxs(S.default,{onClick:c,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(S.default,{component:"img",src:t,alt:`Juego ${a!=null?a:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(S.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(M.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=r!=null?r:s)!=null?o:""})})]})},V=12,re=({items:t,layout:r="grid",onClick:s})=>{var a;if(r==="mosaic"){const c=t[0],o=t.slice(1,5);return e.jsxs(S.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${V}px`,rowGap:`${V}px`,alignItems:"stretch",justifyItems:"stretch"},children:[c&&e.jsx(S.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(a=c.imageUrl)!=null?a:""}`,size:"lg",fillParent:!0,onClick:()=>s==null?void 0:s(c,0)})}),o.map((n,p)=>{var m;return e.jsx(S.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(m=n.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(n,p+1)})},n.id)})]})}return e.jsx(S.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${V}px`,gridAutoFlow:"column"},children:t.map((c,o)=>{var n,p;return e.jsx(S.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(K,{imageUrl:`https://olimpo.bet${(n=c.imageUrl)!=null?n:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(c,o)})},(p=c.id)!=null?p:o)})})},oe=({title:t,amount:r,subtitle:s,buttonText:a,onButtonClick:c,backgroundImage:o,alt:n,className:p="",variant:m="small"})=>{const g=r?r.slice(0,2):"",x=r?r.slice(2):"",y=m==="large";return e.jsxs(S.default,{className:p,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:y?618:456},mx:"auto"},children:[o&&e.jsx(S.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:y?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(S.default,{component:"img",src:o,alt:n!=null?n:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",lg:"45% 0%"},display:"block"}})}),e.jsx(S.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(S.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(M.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),r&&e.jsxs(S.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(S.default,{component:"span",sx:{fontSize:{xs:35,lg:48},mr:.5},children:g}),e.jsx(S.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:x})]}),s&&e.jsx(M.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:s}),a&&e.jsx(R,{onClick:c,children:a})]})})]})},_e=({text:t,buttonLabel:r="Conoce más",onClick:s,imgAlt:a="Club Olimpo",imgSrcMobile:c,imgSrcDesktopBg:o,imgSrcDesktopLogo:n})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:c,alt:a,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[o&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:o,alt:`${a} fondo`,className:"orc-co-bgDesktopImg"})}),n&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:n,alt:`${a} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(R,{onClick:s,variant:"primary",size:"md",children:r})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(R,{onClick:s,variant:"primary",size:"md",children:r})]})]}),dt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",ut="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",pt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",mt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",xt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",ft="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",gt="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",ht="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",H={card:dt,combinadas:ut,apuestaItem:pt,lineContainer:mt,circle:xt,line:ft,apuestaText:gt,cuotaTotal:ht};function Se({event:t}){var a;function r(c){var x;const o=(x=c.betoffers)!=null?x:[],n=c.homeName,p=c.awayName,m=o.map(y=>{var u,h,E,C;let i=y.outcomes[0],d="",l=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(d=`Más de ${l}`,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(d=`Menos de ${l}`,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["Sí","No"].includes(i==null?void 0:i.label)?(d=i==null?void 0:i.label,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?d=`${n} o Empate`:i.label==="12"?d=`${n} o ${p}`:i.label==="X2"&&(d=`${p} o Empate`):(i!=null&&i.participant?d=i.participant:d=(u=i==null?void 0:i.label)!=null?u:"",l!==""&&d===i.label&&(d=`${i.label} ${l}`)),{id:(h=i==null?void 0:i.id)!=null?h:0,value:d,label:y.criterion.label,odds:(E=i==null?void 0:i.odds)!=null?E:0,bl:(C=i==null?void 0:i.label)!=null?C:0}}),g=m.reduce((y,i)=>y+i.odds,0)/1e3;return{outcomes:m,total:g.toFixed(2)}}const s=r(t);return e.jsxs("div",{className:H.card,children:[e.jsx("div",{className:H.combinadas,children:e.jsxs(U.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(A,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(U.default,{direction:"column",spacing:.5,useFlexGap:!0,children:s.outcomes.map((c,o)=>e.jsxs("div",{className:H.apuestaItem,children:[e.jsxs("div",{className:H.lineContainer,children:[e.jsx("div",{className:H.circle}),o<s.outcomes.length-1&&e.jsx("div",{className:H.line})]}),e.jsxs("div",{className:H.apuestaText,children:[e.jsx("strong",{children:c.value})," ","| ",c.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var c,o;return console.log((o=(c=s==null?void 0:s.outcomes)==null?void 0:c.map(n=>n==null?void 0:n.id))!=null?o:[])},className:H.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((a=t.combinadoTotal)!=null?a:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}function Ce({event:t,liveData:r,betOffers:s,fondo:a="/assets/img/home/EnVivo/fondo.png"}){var c,o,n,p,m,g,x,y,i,d,l;return e.jsx("div",{style:{backgroundImage:`url(${a})`,backgroundSize:"cover",height:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(ve,{title:(c=t.path[0].name)!=null?c:"",subtitle:t.group,live:!0,time:(n=(o=r==null?void 0:r.matchClock)==null?void 0:o.minute)!=null?n:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(G,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(ae,{text:((m=(p=r==null?void 0:r.score)==null?void 0:p.home)!=null?m:0)+":"+((x=(g=r==null?void 0:r.score)==null?void 0:g.away)!=null?x:0),name:"En vivo"}),e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(G,{spacing:1,children:((i=(y=s==null?void 0:s[0])==null?void 0:y.outcomes)!=null?i:[]).map((u,h)=>e.jsx(se,{text:u.label.toUpperCase()},h))}),e.jsx(G,{spacing:2,children:((l=(d=s==null?void 0:s[0])==null?void 0:d.outcomes)!=null?l:[]).map((u,h)=>e.jsx(R,{variant:"primary",disabled:u.odds==null,onClick:()=>{console.log(u.id)},children:u.odds===void 0?"X":(u.odds/1e3).toFixed(2)},h))})]})]})})}const vt="oraculo__OraculoEventDate-module__date___xhIlh",jt={date:vt};function bt({text:t}){return e.jsx("div",{className:`oli-font ${jt.date}`,children:t})}const yt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",_t="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",St="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Z={cardContainer:yt,cardBackground:_t,jugadas:St};function we({event:t}){var s,a,c,o,n,p,m;function r(g){const x=new Date(g),y=x.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=x.getDate().toString().padStart(2,"0"),d=(x.getMonth()+1).toString().padStart(2,"0");let l=x.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return l=l.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${y} ${i}/${d} | ${l}`}return e.jsxs("div",{className:Z.cardContainer,children:[e.jsx(je,{title:(s=t.group)!=null?s:""}),e.jsx("div",{className:Z.cardBackground,children:e.jsxs(U.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(G,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(Y,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(ae,{text:"vs.",name:"",size:"small"}),e.jsx(Y,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(bt,{text:r(t.start)})]}),e.jsxs(U.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(G,{spacing:1,children:((o=(c=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:c.outcomes)!=null?o:[]).map((g,x)=>e.jsx(se,{text:g.label.toUpperCase()},x))}),e.jsx("div",{className:Z.jugadas,children:e.jsx(G,{spacing:1,children:((m=(p=(n=t==null?void 0:t.outcome)==null?void 0:n[0])==null?void 0:p.outcomes)!=null?m:[]).map((g,x)=>e.jsx(R,{variant:"primary",fullHeight:!0,onClick:()=>{console.log(g.id)},children:(g.odds/1e3).toFixed(2)},x))})})]})]})})]})}function Ee({items:t,title:r="Destacados",iconUrl:s,onViewMore:a,className:c=""}){const o=w.useRef(null),[n,p]=w.useState({isStart:!0,isEnd:!1}),m=()=>{var d;(d=o.current)==null||d.prev()},g=()=>{var d;(d=o.current)==null||d.next(),console.log("items: ",t)},x=()=>{a==null||a()},y=d=>{if(!d||typeof window=="undefined")return;const u=`https://www.olimpo.bet/promociones/${encodeURIComponent(d)}`;window.location.href=u},i=c||void 0;return e.jsxs("section",{className:i,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:m,disabled:n.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:x,children:"Ver más"})]}),e.jsx(D,{ref:o,items:t,perPage:3,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:d=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>y(d.promotion),children:e.jsx("img",{src:`https://olimpo.bet${d.image!==""?d.image:d.summary_image}`,alt:d.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${d.title}-${d.image}`),onMove:({isStart:d,isEnd:l})=>p({isStart:d,isEnd:l})})]})}const Ct=t=>{var i,d,l,u,h,E;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",s=(l=t.provider)!=null?l:"",a=(u=t.machine)!=null?u:"",c=(h=t.external_id)!=null?h:"",o=(E=t.type)!=null?E:"",n=encodeURIComponent(String(s)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),g=encodeURIComponent(String(c)),x=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/casino?${p}?provider=${n}&name=${m}&external_id=${g}&type=${x}`;window.location.href=y};function ie({items:t,title:r="Top Juegos",iconUrl:s,onCardClick:a}){const c=w.useMemo(()=>t.map((o,n)=>{var p;return{...o,orden:(p=o.orden)!=null?p:n+1,_originalIndex:n}}).sort((o,n)=>o.orden!=null&&n.orden!=null?o.orden-n.orden:o._originalIndex-n._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsx(S.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:c.slice(0,6).map(o=>{var n;return e.jsx(be,{imageUrl:`https://olimpo.bet${(n=o.logo)!=null?n:""}`,orden:o.orden,onClick:()=>{a?a(o):Ct(o)}},o.machine)})})]})})}const wt=(t,r)=>{var s,a;return(a=(s=t.orden)!=null?s:t.machine)!=null?a:r},Et=t=>{var i,d,l,u,h,E;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",s=(l=t.provider)!=null?l:"",a=(u=t.machine)!=null?u:"",c=(h=t.external_id)!=null?h:"",o=(E=t.type)!=null?E:"Live",n=encodeURIComponent(String(s)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),g=encodeURIComponent(String(c)),x=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/casino-en-vivo?${p}?provider=${n}&name=${m}&external_id=${g}&type=${x}`;window.location.href=y},Oe=({items:t,title:r="Casino en vivo",subtitle:s="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:a="",backgroundDesktopUrl:c="",onCardClick:o,onViewMore:n,className:p})=>e.jsxs(S.default,{className:p,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),P=require("@mui/material"),C=require("react"),xe=require("@splidejs/react-splide"),We=require("@mui/material/Box"),Ae=require("@mui/material/Typography"),Me=require("@mui/material/Stack"),K=require("@mui/icons-material"),Ge=require("@mui/icons-material/ChevronLeftRounded"),De=require("@mui/icons-material/ChevronRightRounded"),He=require("@mui/material/useMediaQuery"),le=require("firebase/firestore"),X=t=>t&&t.__esModule?t:{default:t},qe=X(C),_=X(We),M=X(Ae),U=X(Me),fe=X(Ge),ge=X(De),Xe=X(He);function N({children:t,onClick:r,href:s,target:n,rel:c,type:o="button",disabled:a=!1,variant:u="primary",size:m,fullWidth:v=!1,fullHeight:g=!1,className:S="",ariaLabel:i,leftIcon:d,rightIcon:l,iconOnly:p}){const b=!!t&&t!==!0,k=(!!d?1:0)+(!!l?1:0)==1,T=p!=null?p:k&&!b,$=["orc-btn",u==="secondary"?"orc-btn--secondary":u==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",v?"orc-btn--full":"",g?"orc-btn--fullHeight":"",T?"orc-btn--iconOnly":"",S].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"orc-btn__icon",children:d}),!T&&e.jsx("span",{className:"orc-btn__label",children:t}),l&&e.jsx("span",{className:"orc-btn__icon",children:l})]}),B=a?!0:void 0;return s?e.jsx(P.Link,{href:s,target:n,rel:c,"aria-label":i,"aria-disabled":B,tabIndex:B?-1:void 0,className:$,onClick:B?F=>F.preventDefault():r,children:I}):e.jsx("button",{type:o,onClick:r,disabled:!!B,"aria-label":i,className:$,children:I})}function G({title:t,iconUrl:r,size:s="md",className:n=""}){const o=["orc-section-title",s?`orc-section-title--${s}`:"",n].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[r&&e.jsx("img",{src:r,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const se=({total:t,active:r,onSelect:s,className:n=""})=>{if(t<=1)return null;const c=["orc-dots",n].filter(Boolean).join(" ");return e.jsx("div",{className:c,role:"tablist",children:Array.from({length:t}).map((o,a)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":a===r,"aria-label":`Ir al slide ${a+1}`,className:"orc-dots__dot"+(a===r?" orc-dots__dot--active":""),onClick:()=>s==null?void 0:s(a)})},a))})};function A({children:t,minWidth:r=32,spacing:s=2,justify:n="stretch",columns:c=null}){const o=c||`repeat(auto-fit, minmax(${r}px, 1fr))`,a=typeof s=="number"?`${s*8}px`:s;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:n,gap:a,height:"inherit"},children:t})}function oe({src:t,alt:r}){return e.jsx(P.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(P.Box,{component:"img",src:t,alt:r,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}function Je({title:t,subtitle:r}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"6px",color:"#fff"},children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),r&&e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[e.jsxs("svg",{width:"4",height:"4",viewBox:"0 0 5 5",xmlns:"http://www.w3.org/2000/svg",style:{flexShrink:0},children:[" ",e.jsx("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"white"})," "]}),e.jsx("span",{style:{fontWeight:400,fontSize:"12px",lineHeight:"16px"},children:r})]})]})}function he({text:t,color:r="#ff3b3b",textColor:s="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:r,color:s,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function ve({live:t,time:r}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(he,{text:"En vivo"}),r&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:r})]})}function be({title:t,subtitle:r,live:s=!1,time:n=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(Je,{title:t,subtitle:r}),e.jsx(ve,{live:s,time:n})]})}const Ke="oraculo__OraculoEventLabel-module__label___c64Xw",Ye={label:Ke};function ae({text:t}){return e.jsx("span",{className:Ye.label,children:t})}const Qe="oraculo__OraculoEventLeague-module__container___rdk4F",Ve={container:Qe};function je({title:t}){return e.jsx("div",{className:Ve.container,children:t.toUpperCase()})}const Ze="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",et="oraculo__OraculoEventScore-module__name___r4uL6",tt="oraculo__OraculoEventScore-module__score___Xl03M",ot="oraculo__OraculoEventScore-module__normal___cCNFz",nt="oraculo__OraculoEventScore-module__small___fVt8E",J={scoreWrapper:Ze,name:et,score:tt,normal:ot,small:nt};function re({text:t,name:r,size:s="normal"}){return e.jsxs("div",{className:`${J.scoreWrapper} ${J[s]}`,children:[e.jsx("div",{className:`${J.score} ${J[s]}`,children:t}),r&&e.jsx("span",{className:`${J.name} ${J[s]}`,children:r})]})}const st="oraculo__OraculoEventTeamInfo-module__team___UfpUs",at="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",rt="oraculo__OraculoEventTeamInfo-module__name___4ikm-",it="oraculo__OraculoEventTeamInfo-module__regular___ag826",ct="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",V={team:st,logo:at,name:rt,regular:it,compact:ct};function Q({name:t,logo:r,size:s="regular"}){return e.jsxs("div",{className:`oli-font ${V.team} ${V[s]}`,children:[e.jsx("img",{src:r,alt:t,className:V.logo}),e.jsx("span",{className:V.name,children:t})]})}const lt=xe.Splide,dt=xe.SplideSlide,D=C.forwardRef(({items:t=[],renderItem:r,perPage:s=1,gap:n="0px",breakpoints:c,options:o={},className:a="",onMove:u,useIndexAsKey:m=!1},v)=>{const g=C.useRef(null);C.useImperativeHandle(v,()=>({next:()=>{var l;return(l=g.current)==null?void 0:l.go(">")},prev:()=>{var l;return(l=g.current)==null?void 0:l.go("<")},go:l=>{var p;return(p=g.current)==null?void 0:p.go(l)}}));const S=C.useCallback(l=>{const p=l.index,b=l.length,O=l.options.perPage||1,w=p===0,k=p>=b-O;u==null||u({index:p,isStart:w,isEnd:k,total:b})},[u]),i=C.useCallback(l=>{S(l)},[S]),d={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:s,gap:n,breakpoints:c,...o};return e.jsx("div",{className:a,style:{width:"100%"},children:e.jsx(lt,{ref:g,options:d,onMove:S,onMounted:i,children:t.map((l,p)=>{var b;return e.jsx(dt,{children:r(l,p)},m?p:(b=l.id)!=null?b:p)})})})}),Y=({imageUrl:t,onClick:r,size:s="sm",fillParent:n=!1})=>{const c=s==="lg"?{w:280,h:352}:{w:152,h:168},o=u=>{u.stopPropagation(),r==null||r()},a=n?{width:"100%",height:"100%"}:{width:`${c.w}px`,height:`${c.h}px`};return e.jsxs(_.default,{onClick:r,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...a,"&:hover":{transform:"translateY(-2px)",boxShadow:8,cursor:"pointer"},"&:hover .oraculo-game-card-overlay":{opacity:1},"&:hover .oraculo-game-card-btn":{opacity:1,transform:"translate(-50%, -50%) scale(1)",pointerEvents:"auto"}},children:[e.jsx("img",{src:t,alt:"Juego de casino",loading:"lazy",style:{width:"100%",height:"100%",objectFit:"cover",display:"block",borderRadius:"inherit"}}),e.jsx(_.default,{className:"oraculo-game-card-overlay",sx:{position:"absolute",inset:0,backgroundColor:"rgba(0, 0, 0, 0.45)",opacity:0,transition:"opacity .15s ease",pointerEvents:"none",zIndex:1}}),e.jsx(_.default,{className:"oraculo-game-card-btn",sx:{position:"absolute",top:"50%",left:"50%",zIndex:2,transform:"translate(-50%, -50%) scale(0.95)",opacity:0,transition:"opacity .15s ease, transform .15s ease",pointerEvents:"none"},children:e.jsx(N,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function ye({imageUrl:t,orden:r=1,onClick:s,sizes:n={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var g,S,i,d;const c=(l,p)=>{var b,O,w,k;return{xs:(O=(b=n.xs)==null?void 0:b[l])!=null?O:p,md:(k=(w=n.md)==null?void 0:w[l])!=null?k:p}},o=c("w",186),a=c("h",264),u=c("r",22.6),m=c("font",64),v={xs:Math.round(((S=(g=n.xs)==null?void 0:g.font)!=null?S:64)*.28),md:Math.round(((d=(i=n.md)==null?void 0:i.font)!=null?d:64)*.28)};return e.jsxs(_.default,{sx:{position:"relative",width:"100%",maxWidth:{xs:`${o.xs}px`,md:`${o.md}px`},aspectRatio:{xs:`${o.xs}/${a.xs}`,md:`${o.md}/${a.md}`},borderRadius:{xs:`${u.xs}px`,md:`${u.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${v.xs}px`,md:`${v.md}px`}},children:[e.jsx(_.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(Y,{imageUrl:t,onClick:s,size:"lg",fillParent:!0})}),e.jsx(_.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${v.xs}px`,md:`-${v.md}px`},fontFamily:"secondary",fontSize:{xs:`${m.xs}px`,md:`${m.md}px`},lineHeight:1,color:"#3CC666",WebkitTextStroke:"1px #9ee86e",zIndex:3,userSelect:"none"},children:r})]})}const Se=({logo:t,provider:r,providerName:s,machine:n,onClick:c})=>{var o;return e.jsxs(_.default,{onClick:c,sx:{flex:"0 0 auto",position:"relative",borderRadius:"20px",overflow:"hidden",width:{xs:100,md:180},height:{xs:200,md:380},transition:"width .50s ease, transform .28s ease",willChange:"width, transform",cursor:"pointer",zIndex:0,"&:hover":{zIndex:2,width:{md:260,xs:110}},"&:hover .orc-live-provider-label":{opacity:1}},children:[e.jsx(_.default,{component:"img",src:t,alt:`Juego ${n!=null?n:""}`,sx:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",display:"block"}}),e.jsx(_.default,{className:"orc-live-provider-label",sx:{position:"absolute",left:"50%",top:{xs:"75%",md:"80%"},transform:"translate(-50%, -50%)",zIndex:3,opacity:0,transition:"opacity .25s ease",pointerEvents:"none"},children:e.jsx(M.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=r!=null?r:s)!=null?o:""})})]})},Z=12,ie=({items:t,layout:r="grid",onClick:s})=>{var n;if(r==="mosaic"){const c=t[0],o=t.slice(1,5);return e.jsxs(_.default,{sx:{display:"grid",gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gridTemplateColumns:{xs:"184px",md:"280px"},gridAutoFlow:"column",gridAutoColumns:{xs:"104px",md:"152px"},columnGap:`${Z}px`,rowGap:`${Z}px`,alignItems:"stretch",justifyItems:"stretch"},children:[c&&e.jsx(_.default,{sx:{width:{xs:184,md:280},height:{xs:234,md:352},gridRow:"1 / span 2",overflow:"hidden",borderRadius:2},children:e.jsx(Y,{imageUrl:`https://olimpo.bet${(n=c.imageUrl)!=null?n:""}`,size:"lg",fillParent:!0,onClick:()=>s==null?void 0:s(c,0)})}),o.map((a,u)=>{var m;return e.jsx(_.default,{sx:{width:{xs:104,md:152},height:{xs:112,md:168},overflow:"hidden",borderRadius:2},children:e.jsx(Y,{imageUrl:`https://olimpo.bet${(m=a.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(a,u+1)})},a.id)})]})}return e.jsx(_.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(2, 104px)",md:"repeat(2, 152px)"},gridTemplateRows:{xs:"repeat(2, 112px)",md:"repeat(2, 168px)"},gap:`${Z}px`,gridAutoFlow:"column"},children:t.map((c,o)=>{var a,u;return e.jsx(_.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(Y,{imageUrl:`https://olimpo.bet${(a=c.imageUrl)!=null?a:""}`,size:"sm",fillParent:!0,onClick:()=>s==null?void 0:s(c,o)})},(u=c.id)!=null?u:o)})})},ne=({title:t,amount:r,subtitle:s,buttonText:n,onButtonClick:c,backgroundImage:o,alt:a,className:u="",variant:m="small"})=>{const v=r?r.slice(0,2):"",g=r?r.slice(2):"",S=m==="large";return e.jsxs(_.default,{className:u,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:S?618:456},mx:"auto"},children:[o&&e.jsx(_.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:S?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(_.default,{component:"img",src:o,alt:a!=null?a:"Fondo promocional",sx:{width:"100%",height:"100%",objectFit:"cover",objectPosition:{xs:"50% 0%",lg:"45% 0%"},display:"block"}})}),e.jsx(_.default,{sx:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"flex-end",color:"#e7f8ff",textAlign:"center",pl:"14%",pr:{xs:"14%",lg:"15%"}},children:e.jsxs(_.default,{sx:{maxWidth:"60%",display:"flex",flexDirection:"column",alignItems:"center"},children:[t&&e.jsx(M.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),r&&e.jsxs(_.default,{component:"p",sx:{fontFamily:'"secondary", sans-serif',lineHeight:{xs:.9,lg:.87},m:"4px 0",background:"linear-gradient(175deg, #EDC421 -12.56%, #FFFABF 17.99%, #EDC421 49.74%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",WebkitTextStroke:"0.5px #fff8c1",filter:"drop-shadow(0px 4px 0px #8D4406) drop-shadow(0px 4px 4px rgba(28, 28, 28, 0.4))",display:"flex",alignItems:"baseline",justifyContent:"center"},children:[e.jsx(_.default,{component:"span",sx:{fontSize:{xs:35,lg:48},mr:.5},children:v}),e.jsx(_.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:g})]}),s&&e.jsx(M.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:s}),n&&e.jsx(N,{onClick:c,children:n})]})})]})},_e=({text:t,buttonLabel:r="Conoce más",onClick:s,imgAlt:n="Club Olimpo",imgSrcMobile:c,imgSrcDesktopBg:o,imgSrcDesktopLogo:a})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:c,alt:n,className:"orc-co-bgMobileImg"})}),e.jsxs("div",{className:"orc-co-bgDesktop",children:[o&&e.jsx("div",{className:"orc-co-fillHost",children:e.jsx("img",{src:o,alt:`${n} fondo`,className:"orc-co-bgDesktopImg"})}),a&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:a,alt:`${n} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(N,{onClick:s,variant:"primary",size:"md",children:r})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(N,{onClick:s,variant:"primary",size:"md",children:r})]})]}),ut="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",pt="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",mt="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",xt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",ft="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",gt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",ht="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",vt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",H={card:ut,combinadas:pt,apuestaItem:mt,lineContainer:xt,circle:ft,line:gt,apuestaText:ht,cuotaTotal:vt};function we({event:t}){var n;function r(c){var g;const o=(g=c.betoffers)!=null?g:[],a=c.homeName,u=c.awayName,m=o.map(S=>{var p,b,O,w;let i=S.outcomes[0],d="",l=i!=null&&i.line?i.line/1e3:"";return["Más de","Mas de","Over"].includes(i==null?void 0:i.label)?(d=`Más de ${l}`,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(d=`Menos de ${l}`,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["Sí","No"].includes(i==null?void 0:i.label)?(d=i==null?void 0:i.label,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["1X","12","X2"].includes(i==null?void 0:i.label)?i.label==="1X"?d=`${a} o Empate`:i.label==="12"?d=`${a} o ${u}`:i.label==="X2"&&(d=`${u} o Empate`):(i!=null&&i.participant?d=i.participant:d=(p=i==null?void 0:i.label)!=null?p:"",l!==""&&d===i.label&&(d=`${i.label} ${l}`)),{id:(b=i==null?void 0:i.id)!=null?b:0,value:d,label:S.criterion.label,odds:(O=i==null?void 0:i.odds)!=null?O:0,bl:(w=i==null?void 0:i.label)!=null?w:0}}),v=m.reduce((S,i)=>S+i.odds,0)/1e3;return{outcomes:m,total:v.toFixed(2)}}const s=r(t);return e.jsxs("div",{className:H.card,children:[e.jsx("div",{className:H.combinadas,children:e.jsxs(U.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(G,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(U.default,{direction:"column",spacing:.5,useFlexGap:!0,children:s.outcomes.map((c,o)=>e.jsxs("div",{className:H.apuestaItem,children:[e.jsxs("div",{className:H.lineContainer,children:[e.jsx("div",{className:H.circle}),o<s.outcomes.length-1&&e.jsx("div",{className:H.line})]}),e.jsxs("div",{className:H.apuestaText,children:[e.jsx("strong",{children:c.value})," ","| ",c.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var c,o;return console.log((o=(c=s==null?void 0:s.outcomes)==null?void 0:c.map(a=>a==null?void 0:a.id))!=null?o:[])},className:H.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((n=t.combinadoTotal)!=null?n:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}function Ce({event:t,liveData:r,betOffers:s,fondo:n="/assets/img/home/EnVivo/fondo.png"}){var c,o,a,u,m,v,g,S,i,d,l;return e.jsx("div",{style:{backgroundImage:`url(${n})`,backgroundSize:"cover",height:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(be,{title:(c=t.path[0].name)!=null?c:"",subtitle:t.group,live:!0,time:(a=(o=r==null?void 0:r.matchClock)==null?void 0:o.minute)!=null?a:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(A,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(Q,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(re,{text:((m=(u=r==null?void 0:r.score)==null?void 0:u.home)!=null?m:0)+":"+((g=(v=r==null?void 0:r.score)==null?void 0:v.away)!=null?g:0),name:"En vivo"}),e.jsx(Q,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((i=(S=s==null?void 0:s[0])==null?void 0:S.outcomes)!=null?i:[]).map((p,b)=>e.jsx(ae,{text:p.label.toUpperCase()},b))}),e.jsx(A,{spacing:2,children:((l=(d=s==null?void 0:s[0])==null?void 0:d.outcomes)!=null?l:[]).map((p,b)=>e.jsx(N,{variant:"primary",disabled:p.odds==null,onClick:()=>{console.log(p.id)},children:p.odds===void 0?"X":(p.odds/1e3).toFixed(2)},b))})]})]})})}const bt="oraculo__OraculoEventDate-module__date___xhIlh",jt={date:bt};function yt({text:t}){return e.jsx("div",{className:`oli-font ${jt.date}`,children:t})}const St="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",_t="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",wt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",ee={cardContainer:St,cardBackground:_t,jugadas:wt};function Ee({event:t}){var s,n,c,o,a,u,m;function r(v){const g=new Date(v),S=g.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=g.getDate().toString().padStart(2,"0"),d=(g.getMonth()+1).toString().padStart(2,"0");let l=g.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return l=l.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${S} ${i}/${d} | ${l}`}return e.jsxs("div",{className:ee.cardContainer,children:[e.jsx(je,{title:(s=t.group)!=null?s:""}),e.jsx("div",{className:ee.cardBackground,children:e.jsxs(U.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(U.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(A,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(Q,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(re,{text:"vs.",name:"",size:"small"}),e.jsx(Q,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(yt,{text:r(t.start)})]}),e.jsxs(U.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(A,{spacing:1,children:((o=(c=(n=t==null?void 0:t.outcome)==null?void 0:n[0])==null?void 0:c.outcomes)!=null?o:[]).map((v,g)=>e.jsx(ae,{text:v.label.toUpperCase()},g))}),e.jsx("div",{className:ee.jugadas,children:e.jsx(A,{spacing:1,children:((m=(u=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:u.outcomes)!=null?m:[]).map((v,g)=>e.jsx(N,{variant:"primary",fullHeight:!0,onClick:()=>{console.log(v.id)},children:(v.odds/1e3).toFixed(2)},g))})})]})]})})]})}function Oe({items:t,title:r="Destacados",iconUrl:s,onViewMore:n,className:c=""}){const o=C.useRef(null),[a,u]=C.useState({isStart:!0,isEnd:!1}),m=()=>{var d;(d=o.current)==null||d.prev()},v=()=>{var d;(d=o.current)==null||d.next(),console.log("items: ",t)},g=()=>{n==null||n()},S=d=>{if(!d||typeof window=="undefined")return;const p=`https://www.olimpo.bet/promociones/${encodeURIComponent(d)}`;window.location.href=p},i=c||void 0;return e.jsxs("section",{className:i,style:{width:"100%"},children:[e.jsxs("header",{style:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:12,rowGap:8,marginBottom:16},children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(N,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(K.ChevronLeftRounded,{}),onClick:m,disabled:a.isStart}),e.jsx(N,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(K.ChevronRightRounded,{}),onClick:v,disabled:a.isEnd})]}),e.jsx(N,{variant:"secondary",onClick:g,children:"Ver más"})]}),e.jsx(D,{ref:o,items:t,perPage:3,gap:"16px",options:{autoWidth:!1},breakpoints:{768:{perPage:1.15,focus:"start"},1024:{perPage:2.5,focus:"start"}},renderItem:d=>e.jsx("div",{style:{textAlign:"center",marginTop:16,cursor:"pointer"},onClick:()=>S(d.promotion),children:e.jsx("img",{src:`https://olimpo.bet${d.image!==""?d.image:d.summary_image}`,alt:d.title,style:{width:"100%",height:"150px",borderRadius:8,display:"block"}})},`${d.title}-${d.image}`),onMove:({isStart:d,isEnd:l})=>u({isStart:d,isEnd:l})})]})}const Ct=t=>{var i,d,l,p,b,O;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",s=(l=t.provider)!=null?l:"",n=(p=t.machine)!=null?p:"",c=(b=t.external_id)!=null?b:"",o=(O=t.type)!=null?O:"",a=encodeURIComponent(String(s)),u=encodeURIComponent(String(n)),m=encodeURIComponent(String(r)),v=encodeURIComponent(String(c)),g=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino?${u}?provider=${a}&name=${m}&external_id=${v}&type=${g}`;window.location.href=S};function ce({items:t,title:r="Top Juegos",iconUrl:s,onCardClick:n}){const c=C.useMemo(()=>t.map((o,a)=>{var u;return{...o,orden:(u=o.orden)!=null?u:a+1,_originalIndex:a}}).sort((o,a)=>o.orden!=null&&a.orden!=null?o.orden-a.orden:o._originalIndex-a._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsx(_.default,{sx:{display:"grid",gridTemplateColumns:{xs:"repeat(3, minmax(0, 1fr))",md:"repeat(6, minmax(0, 1fr))"},gap:{xs:1.5,md:2},justifyItems:"center",width:"100%"},children:c.slice(0,6).map(o=>{var a;return e.jsx(ye,{imageUrl:`https://olimpo.bet${(a=o.logo)!=null?a:""}`,orden:o.orden,onClick:()=>{n?n(o):Ct(o)}},o.machine)})})]})})}const Et=(t,r)=>{var s,n;return(n=(s=t.orden)!=null?s:t.machine)!=null?n:r},Ot=t=>{var i,d,l,p,b,O;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",s=(l=t.provider)!=null?l:"",n=(p=t.machine)!=null?p:"",c=(b=t.external_id)!=null?b:"",o=(O=t.type)!=null?O:"Live",a=encodeURIComponent(String(s)),u=encodeURIComponent(String(n)),m=encodeURIComponent(String(r)),v=encodeURIComponent(String(c)),g=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino-en-vivo?${u}?provider=${a}&name=${m}&external_id=${v}&type=${g}`;window.location.href=S},$e=({items:t,title:r="Casino en vivo",subtitle:s="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:n="",backgroundDesktopUrl:c="",onCardClick:o,onViewMore:a,className:u})=>e.jsxs(_.default,{className:u,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(_.default,{sx:{position:"absolute",inset:0,backgroundImage:{xs:`
2
2
  linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
3
3
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
4
- url('${a}')
4
+ url('${n}')
5
5
  `,md:`
6
6
  linear-gradient(to bottom, #121212 0%, rgba(18,18,18,0) 10%),
7
7
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
8
8
  url('${c}')
9
- `},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(S.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(U.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(M.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:r}),e.jsx(M.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:s}),e.jsx(S.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(R,{variant:"primary",size:"md",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]}),e.jsx(S.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((m,g)=>{var x;return e.jsx(ye,{logo:`https://olimpo.bet${(x=m.logo)!=null?x:""}`,provider:m.provider,providerName:m.web_name,machine:m.machine,onClick:()=>{o?o(m,g):Et(m)}},wt(m,g))})}),e.jsx(S.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(R,{variant:"primary",size:"lg",onClick:()=>n==null?void 0:n(),children:"Ver más"})})]})]}),Ie=(t,r)=>{var s,a;return(a=(s=t.orden)!=null?s:t.machine)!=null?a:r},Ot=t=>{var i,d,l,u,h;if(typeof window=="undefined")return;const r=(i=t.name)!=null?i:"",s=(d=t.provider)!=null?d:"",a=(l=t.machine)!=null?l:"",c=(u=t.external_id)!=null?u:"",o=(h=t.type)!=null?h:"Casino",n=encodeURIComponent(String(s)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),g=encodeURIComponent(String(c)),x=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/casino?${p}?provider=${n}&name=${m}&external_id=${g}&type=${x}`;window.location.href=y},It=(t,r=!0,s=4)=>{const a=t.map((n,p)=>{var m;return{id:Ie(n,p),imageUrl:(m=n.logo)!=null?m:""}});if(!a.length)return[];const c=[];let o=0;if(r){const n=Math.min(a.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:a.slice(0,n)}),o=n}for(;o<a.length;){const n=Math.min(o+s,a.length);c.push({id:`grid-${o}`,kind:"grid",items:a.slice(o,n)}),o=n}return c},$e=({items:t,title:r="Casino",iconUrl:s="/assets/img/home/Casino/diamante.svg",onItemClick:a,onViewMore:c,mosaicFirst:o=!0,gridSize:n=4})=>{const p=w.useRef(null),[m,g]=w.useState({isStart:!0,isEnd:!1}),x=It(t,o,n),y=()=>{var l;(l=p.current)==null||l.prev()},i=()=>{var l;(l=p.current)==null||l.next()},d=()=>{c==null||c()};return e.jsx("section",{children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(S.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsxs(S.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(xe.default,{}),onClick:y,disabled:m.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(S.default,{sx:{justifySelf:"end"},children:e.jsx(R,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(D,{ref:p,items:x,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:l=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:l.items,layout:l.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const h=t.find((E,C)=>Ie(E,C)===u.id);h&&(a?a(h):Ot(h))}})}),onMove:({isStart:l,isEnd:u})=>g({isStart:l,isEnd:u})})]})})},ke=(t,r)=>{var s,a;return(a=(s=t.orden)!=null?s:t.machine)!=null?a:r},$t=t=>{var i,d,l,u,h;if(typeof window=="undefined")return;const r=(i=t.name)!=null?i:"",s=(d=t.provider)!=null?d:"",a=(l=t.machine)!=null?l:"",c=(u=t.external_id)!=null?u:"",o=(h=t.type)!=null?h:"Virtuales",n=encodeURIComponent(String(s)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),g=encodeURIComponent(String(c)),x=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/juegos-virtuales?${p}?provider=${n}&name=${m}&external_id=${g}&type=${x}`;window.location.href=y},kt=(t,r=!0,s=4)=>{const a=t.map((n,p)=>{var m;return{id:ke(n,p),imageUrl:(m=n.logo)!=null?m:""}});if(!a.length)return[];const c=[];let o=0;if(r){const n=Math.min(a.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:a.slice(0,n)}),o=n}for(;o<a.length;){const n=Math.min(o+s,a.length);c.push({id:`grid-${o}`,kind:"grid",items:a.slice(o,n)}),o=n}return c},Re=({items:t,title:r="Virtuales",iconUrl:s="/assets/img/home/Virtuales/virtuales.svg",onItemClick:a,onViewMore:c,mosaicFirst:o=!0,gridSize:n=4})=>{const p=w.useRef(null),[m,g]=w.useState({isStart:!0,isEnd:!1}),x=kt(t,o,n),y=()=>{var l;(l=p.current)==null||l.prev()},i=()=>{var l;(l=p.current)==null||l.next()},d=()=>{c==null||c()};return e.jsx("section",{children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(S.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsxs(S.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(xe.default,{}),onClick:y,disabled:m.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(fe.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(S.default,{sx:{justifySelf:"end"},children:e.jsx(R,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(D,{ref:p,items:x,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:l=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(re,{items:l.items,layout:l.kind==="mosaic"?"mosaic":"grid",onClick:u=>{const h=t.find((E,C)=>ke(E,C)===u.id);h&&(a?a(h):$t(h))}})}),onMove:({isStart:l,isEnd:u})=>g({isStart:l,isEnd:u})})]})})},Rt=t=>({position:"relative",py:8,color:"#fff",backgroundImage:`
9
+ `},backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",zIndex:0}}),e.jsxs(_.default,{sx:{position:"relative",zIndex:1,maxWidth:1200,height:{xs:"450px",md:"550px"},mx:"auto",px:{xs:2.5,md:6},display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"center",md:"center"},justifyContent:"center",gap:{xs:0,md:15},textAlign:{xs:"center",md:"left"}},children:[e.jsxs(U.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(M.default,{variant:"h4",sx:{fontWeight:800,fontSize:{xs:24,md:40},WebkitTextStroke:"0.5px rgba(255, 255, 255, .5)",textShadow:"0 0 2px rgba(255, 255, 255, .95),0 0 4px rgba(255, 255, 255, .6),0 1px 0 #898989"},children:r}),e.jsx(M.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:s}),e.jsx(_.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(N,{variant:"primary",size:"md",onClick:()=>a==null?void 0:a(),children:"Ver más"})})]}),e.jsx(_.default,{sx:{display:"flex",gap:{xs:2,md:3},justifyContent:"center",overflowX:{xs:"auto",md:"visible"},py:{xs:3,md:0},alignItems:"center"},children:(t!=null?t:[]).slice(0,3).map((m,v)=>{var g;return e.jsx(Se,{logo:`https://olimpo.bet${(g=m.logo)!=null?g:""}`,provider:m.provider,providerName:m.web_name,machine:m.machine,onClick:()=>{o?o(m,v):Ot(m)}},Et(m,v))})}),e.jsx(_.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(N,{variant:"primary",size:"lg",onClick:()=>a==null?void 0:a(),children:"Ver más"})})]})]}),Ie=(t,r)=>{var s,n;return(n=(s=t.orden)!=null?s:t.machine)!=null?n:r},$t=t=>{var i,d,l,p,b;if(typeof window=="undefined")return;const r=(i=t.name)!=null?i:"",s=(d=t.provider)!=null?d:"",n=(l=t.machine)!=null?l:"",c=(p=t.external_id)!=null?p:"",o=(b=t.type)!=null?b:"Casino",a=encodeURIComponent(String(s)),u=encodeURIComponent(String(n)),m=encodeURIComponent(String(r)),v=encodeURIComponent(String(c)),g=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/casino?${u}?provider=${a}&name=${m}&external_id=${v}&type=${g}`;window.location.href=S},It=(t,r=!0,s=4)=>{const n=t.map((a,u)=>{var m;return{id:Ie(a,u),imageUrl:(m=a.logo)!=null?m:""}});if(!n.length)return[];const c=[];let o=0;if(r){const a=Math.min(n.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:n.slice(0,a)}),o=a}for(;o<n.length;){const a=Math.min(o+s,n.length);c.push({id:`grid-${o}`,kind:"grid",items:n.slice(o,a)}),o=a}return c},ke=({items:t,title:r="Casino",iconUrl:s="/assets/img/home/Casino/diamante.svg",onItemClick:n,onViewMore:c,mosaicFirst:o=!0,gridSize:a=4})=>{const u=C.useRef(null),[m,v]=C.useState({isStart:!0,isEnd:!1}),g=It(t,o,a),S=()=>{var l;(l=u.current)==null||l.prev()},i=()=>{var l;(l=u.current)==null||l.next()},d=()=>{c==null||c()};return e.jsx("section",{children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(_.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsxs(_.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(N,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(fe.default,{}),onClick:S,disabled:m.isStart}),e.jsx(N,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(ge.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(_.default,{sx:{justifySelf:"end"},children:e.jsx(N,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(D,{ref:u,items:g,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:l=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:l.items,layout:l.kind==="mosaic"?"mosaic":"grid",onClick:p=>{const b=t.find((O,w)=>Ie(O,w)===p.id);b&&(n?n(b):$t(b))}})}),onMove:({isStart:l,isEnd:p})=>v({isStart:l,isEnd:p})})]})})},Re=(t,r)=>{var s,n;return(n=(s=t.orden)!=null?s:t.machine)!=null?n:r},kt=t=>{var i,d,l,p,b;if(typeof window=="undefined")return;const r=(i=t.name)!=null?i:"",s=(d=t.provider)!=null?d:"",n=(l=t.machine)!=null?l:"",c=(p=t.external_id)!=null?p:"",o=(b=t.type)!=null?b:"Virtuales",a=encodeURIComponent(String(s)),u=encodeURIComponent(String(n)),m=encodeURIComponent(String(r)),v=encodeURIComponent(String(c)),g=encodeURIComponent(String(o)),S=`https://www.olimpo.bet/juegos-virtuales?${u}?provider=${a}&name=${m}&external_id=${v}&type=${g}`;window.location.href=S},Rt=(t,r=!0,s=4)=>{const n=t.map((a,u)=>{var m;return{id:Re(a,u),imageUrl:(m=a.logo)!=null?m:""}});if(!n.length)return[];const c=[];let o=0;if(r){const a=Math.min(n.length,5);c.push({id:"mosaic-0",kind:"mosaic",items:n.slice(0,a)}),o=a}for(;o<n.length;){const a=Math.min(o+s,n.length);c.push({id:`grid-${o}`,kind:"grid",items:n.slice(o,a)}),o=a}return c},Ne=({items:t,title:r="Virtuales",iconUrl:s="/assets/img/home/Virtuales/virtuales.svg",onItemClick:n,onViewMore:c,mosaicFirst:o=!0,gridSize:a=4})=>{const u=C.useRef(null),[m,v]=C.useState({isStart:!0,isEnd:!1}),g=Rt(t,o,a),S=()=>{var l;(l=u.current)==null||l.prev()},i=()=>{var l;(l=u.current)==null||l.next()},d=()=>{c==null||c()};return e.jsx("section",{children:e.jsxs(U.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsxs(_.default,{sx:{display:"grid",gridTemplateColumns:"1fr auto auto",alignItems:"center",columnGap:1.5,rowGap:1},children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsxs(_.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(N,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(fe.default,{}),onClick:S,disabled:m.isStart}),e.jsx(N,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(ge.default,{}),onClick:i,disabled:m.isEnd})]}),e.jsx(_.default,{sx:{justifySelf:"end"},children:e.jsx(N,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(D,{ref:u,items:g,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:l=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:l.items,layout:l.kind==="mosaic"?"mosaic":"grid",onClick:p=>{const b=t.find((O,w)=>Re(O,w)===p.id);b&&(n?n(b):kt(b))}})}),onMove:({isStart:l,isEnd:p})=>v({isStart:l,isEnd:p})})]})})},Nt=t=>({position:"relative",py:8,color:"#fff",backgroundImage:`
10
10
  linear-gradient(to bottom,#121212 0%, rgba(18,18,18,0) 10%),
11
11
  linear-gradient(to top, #121212 0%, rgba(18,18,18,0) 10%),
12
12
  linear-gradient(to left, #121212 0%, rgba(18,18,18,0) 10%),
13
13
  linear-gradient(to right, #121212 0%, rgba(18,18,18,0) 10%),
14
14
  url("${t}")
15
- `,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}),le={textAlign:"center",lineHeight:1.1,mb:1.5},de={display:"inline-block",fontWeight:600,fontSize:24},ue={display:"inline-block",fontSize:24,lineHeight:1.1,WebkitTextStroke:"0.3px rgba(255, 255, 255, .5)",textShadow:`
15
+ `,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}),de={textAlign:"center",lineHeight:1.1,mb:1.5},ue={display:"inline-block",fontWeight:600,fontSize:24},pe={display:"inline-block",fontSize:24,lineHeight:1.1,WebkitTextStroke:"0.3px rgba(255, 255, 255, .5)",textShadow:`
16
16
  0 0 2px rgba(255, 255, 255, .95),
17
17
  0 0 6px rgba(255, 255, 255, .6),
18
18
  0 1px 0 rgba(137, 137, 137, .85)
19
- `},Ne=({headline:t,headline2:r,items:s,backgroundImageUrl:a})=>{const c=t,o=r,n=qe.default("(max-width: 767px)"),p=s.length>1,m=a!=null?a:"",g=Rt(m),x=w.useRef(null),[y,i]=w.useState({isStart:!0,isEnd:!1}),[d,l]=w.useState(0);return n?e.jsxs(S.default,{component:"section",sx:{...g,textAlign:"center"},children:[(c||o)&&e.jsxs(S.default,{sx:le,children:[c&&e.jsx(M.default,{component:"span",sx:de,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(M.default,{component:"span",sx:ue,children:o})]})]}),e.jsxs(S.default,{children:[e.jsx(D,{ref:x,items:s,perPage:1,gap:"12px",breakpoints:{480:{perPage:1,gap:"8px",padding:{left:"8px",right:"8px"}},768:{perPage:1,gap:"12px",padding:{left:"8px",right:"8px"}}},options:{autoWidth:!1},renderItem:u=>e.jsx(oe,{...u,onButtonClick:s[0].onButtonClick}),onMove:({index:u,isStart:h,isEnd:E})=>{i({isStart:h,isEnd:E}),l(u)}}),p&&e.jsx(ne,{total:s.length,active:d,onSelect:u=>{var h;l(u),(h=x.current)==null||h.go(u)}})]})]}):e.jsx(S.default,{component:"section",sx:g,children:e.jsxs(S.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(c||o)&&e.jsx(S.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(S.default,{sx:{...le,textAlign:"left",mb:0},children:[c&&e.jsx(M.default,{component:"span",sx:de,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(M.default,{component:"span",sx:ue,children:o})]})]})}),e.jsx(S.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:s.map((u,h)=>e.jsx(oe,{onButtonClick:u.onButtonClick,...u},h))})]})})},Te=({className:t="",fullBleed:r=!0,items:s,selectedIndex:a=0,ariaLabel:c})=>{const o=w.useRef(null),n=w.useRef(null);if(!s)return null;const p=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=s;w.useLayoutEffect(()=>{if(!o.current||!n.current||typeof ResizeObserver=="undefined")return;const x=o.current,y=n.current,i=()=>{x.style.setProperty("--orc-co-bottomH",`${y.offsetHeight+16}px`)},d=new ResizeObserver(i);return d.observe(y),i(),()=>d.disconnect()},[]);const g=["orc-co-wrap",r?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:g,"aria-label":c||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:n,children:e.jsx(_e,{text:m.text,onClick:p,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Nt="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",Tt={controls:Nt};function Pe({items:t,title:r="Combinadas del Olimpo",iconUrl:s,onViewMore:a,className:c=""}){const o=w.useRef(null),[n,p]=w.useState({isStart:!0,isEnd:!1}),[m,g]=w.useState([]),x=()=>{var C;(C=o.current)==null||C.prev()},y=()=>{var C;(C=o.current)==null||C.next(),console.log("items: ",t)},i=()=>{a==null||a()};function d(C,k,T){const O=[];for(const I of T){const F=u([I]),B=k.reduce((f,_)=>{f[_.eventId]||(f[_.eventId]=[]);const v=_.outcomes.filter(b=>F.has(b.id));return v.length>0&&f[_.eventId].push({..._,outcomes:v}),f},{}),j=l(I);C.forEach(f=>{if(f.id!==I.prePackCouponRows[0].eventId)return;const _=F;let v=null;for(const b of j)if([...b.requiredOutcomeIds].every(N=>_.has(N))){v=b.decimal;break}O.push({...f,combinadoTotal:v,betoffers:B[f.id]||[],couponId:I.id})})}return O}function l(C){var T;const k=[];for(const O of C.prePackCouponRows)if(O.type==="BET_BUILDER"&&((T=O.group)!=null&&T.groups)){const I=new Set;O.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(j=>I.add(j.id))}),k.push({requiredOutcomeIds:I,decimal:O.odds.decimal})}return k}function u(C){var T;const k=new Set;for(const O of C)for(const I of O.prePackCouponRows)I.type==="BET_BUILDER"&&((T=I.group)!=null&&T.groups)&&I.group.groups.forEach(F=>{var B;(B=F.outcomes)==null||B.forEach(j=>k.add(j.id))}),I.type==="SIMPLE"&&I.outcome&&k.add(I.outcome.id);return k}async function h(){var C,k,T;try{const O=(T=(k=(C=t==null?void 0:t.group)==null?void 0:C.groups)==null?void 0:k[0])==null?void 0:T.id;if(!O){console.error("Could not extract group ID");return}const I=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${O}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,B=await(await fetch(I)).json();g(d(B.events,B.betOffers,B.prePackCoupons))}catch(O){console.error("loadDataEventSpecial error:",O)}}w.useEffect(()=>{t&&h()},[t]);const E=c||void 0;return e.jsx("section",{className:E,style:{width:"100%"},children:e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(G,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{className:Tt.controls,children:[e.jsxs(G,{spacing:1,columns:"auto auto",children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:x,disabled:n.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:y,disabled:n.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:i,children:"Ver más"})]})]}),e.jsx(D,{ref:o,items:m,perPage:3.72,gap:"16px",options:{autoWidth:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:C=>e.jsx(Se,{event:C}),onMove:({isStart:C,isEnd:k})=>p({isStart:C,isEnd:k})})]})})}function Fe({items:t,title:r="En vivo",iconUrl:s,onViewMore:a,className:c=""}){var i,d;console.log("wefwef",t);const o=w.useRef(null),[n,p]=w.useState({isStart:!0,isEnd:!1}),m=()=>{var l;(l=o.current)==null||l.prev()},g=()=>{var l;(l=o.current)==null||l.next(),console.log("items: ",t)},x=()=>{a==null||a()},y=c||void 0;return e.jsxs("section",{className:y,style:{width:"100%"},children:[e.jsxs(G,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(A,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(J.ChevronLeftRounded,{}),onClick:m,disabled:n.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(J.ChevronRightRounded,{}),onClick:g,disabled:n.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:x,children:"Ver más"})]}),e.jsx(D,{ref:o,items:(d=(i=t==null?void 0:t.events)==null?void 0:i.filter(l=>l.event.sport==="FOOTBALL").sort((l,u)=>new Date(u.event.start).getTime()-new Date(l.event.start).getTime()))!=null?d:[],perPage:3.395,gap:"16px",options:{autoWidth:!0},breakpoints:{768:{perPage:1,gap:"8px",focus:"center",padding:{left:"16px",right:"16px"}},1024:{perPage:2.5,gap:"10px",padding:{right:"16px"}}},renderItem:l=>e.jsx(Ce,{...l}),onMove:({isStart:l,isEnd:u})=>p({isStart:l,isEnd:u})})]})}const Pt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Ft="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",Bt="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",ee={wrapper:Pt,container:Ft,buttonWrapper:Bt};function Be({items:t,title:r="En vivo",iconUrl:s,onViewMore:a,className:c=""}){const o=new Date;o.toISOString();const n=new Date(o);n.setDate(n.getDate()+7),n.toISOString();const p=w.useRef(null),[m,g]=w.useState({isStart:!0,isEnd:!1}),[x,y]=w.useState([]),i=()=>{a==null||a()};async function d(){try{const E=t.events.map(O=>{var I;return(I=O.event)==null?void 0:I.id}),C=E.map(O=>`id=${O}`).join("&"),T=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/betoffer/selected/combined_layout/event/${E[0]}?${C}&lang=es_PE&market=PE`;l(T)}catch(E){console.error(E)}}async function l(E){try{const k=await(await fetch(E)).json(),T=k.events.map(I=>I.event),O=k.events.flatMap(I=>I.betOffers||[]);y(u(T,O))}catch(C){console.error(C)}}function u(E,C){const T=C.filter(O=>{var I;return((I=O.betOfferType)==null?void 0:I.id)===2}).reduce((O,I)=>(O[I.eventId]||(O[I.eventId]=[]),O[I.eventId].push(I),O),{});return E.filter(O=>T[O.id]).map(O=>({...O,outcome:T[O.id]}))}w.useEffect(()=>{t&&t.events.length>0&&d()},[t]);const h=c||void 0;return e.jsx("section",{className:h,style:{width:"100%"},children:e.jsxs("div",{className:ee.wrapper,children:[e.jsx("div",{className:ee.container,children:e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(A,{title:"Eventos de la semana"}),e.jsx("div",{className:ee.buttonWrapper,children:e.jsx(R,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{i()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(D,{ref:p,items:x,perPage:3.5,gap:"16px",options:{autoWidth:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:E=>e.jsx(we,{event:E}),onMove:({isStart:E,isEnd:C})=>g({isStart:E,isEnd:C})})})]})})}function Ue({backgrounds:t,items:r}){const[s,a]=w.useState(0),c=t.length||1;return e.jsxs(P.Box,{component:"section",sx:{position:"relative",overflow:"visible",pb:{xs:7,sm:8}},children:[e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(D,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>a(o),renderItem:o=>{var n;return e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(P.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:o.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:o.mobileSrc,media:"(max-width:799px)"}),e.jsx(P.Box,{component:"img",src:(n=o.fallbackSrc)!=null?n:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(P.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.75) 100%)"}}})]})}}),e.jsx(P.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(ne,{total:c,active:s})})]}),e.jsx(P.Box,{sx:{position:"absolute",bottom:{xs:36,sm:38},left:"50%",transform:"translateX(-50%)",width:"90%",backgroundColor:"#363636",borderRadius:2,py:1.5,px:1,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:r.map(o=>e.jsxs(P.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",color:"#FFFFFF",minWidth:68,cursor:o.onclick?"pointer":"default"},onClick:()=>{var n;return(n=o.onclick)==null?void 0:n.call(o)},children:[o.icon&&e.jsx(P.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:28,md:32},height:{xs:28,md:32},mb:{xs:.5,md:0},mr:{xs:0,md:4},objectFit:"contain"}}),e.jsx(P.Typography,{sx:{fontSize:12,fontWeight:600,color:"#E0E0E0",textAlign:{xs:"center",md:"left"}},children:o.label})]},o.id))})]})}const Ut=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function zt({title:t="Medios de pago",rows:r=Ut}){const s=r.flat();return e.jsxs(P.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(P.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(P.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(P.Box,{sx:{display:{xs:"block",md:"none"}},children:r.map((a,c)=>e.jsx(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:a.map(o=>e.jsx(te,{...o},`${o.src}-${o.alt}`))},c))}),e.jsx(P.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:s.map(a=>e.jsx(te,{...a},`${a.src}-${a.alt}`))})]})}const Lt={OraculoSeccionDestacados:Ee,OraculoSeccionTopJuegos:ie,OraculoSeccionCasinoEnVivo:Oe,OraculoSeccionCasino:$e,OraculoSeccionVirtuales:Re,OraculoSeccionClubOlimpo:Te,OraculoSeccionBonoBienvenida:Ne,OraculoSeccionBanners:Ue,OraculoSeccionMediosPago:zt,OraculoSeccionEventoEnVivo:Fe,OraculoSeccionEventoSemana:Be,OraculoSeccionEventoCombinadas:Pe},Wt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Gt=t=>/^OraculoSeccion[A-Z]/.test(t),Mt=Object.fromEntries(Object.entries(Lt).filter(([t,r])=>Gt(t)&&Wt(r)));class pe extends Error{constructor(r,s,a){super(`HTTP ${r} ${a}`),this.status=r,this.url=s,this.statusText=a,this.name="HttpError"}}const ze=({sectionsOverride:t,docId:r="home",db:s})=>{const[a,c]=w.useState([]),[o,n]=w.useState(!1),[p,m]=w.useState({}),[g,x]=w.useState({}),[y,i]=w.useState({}),[d,l]=w.useState({});w.useEffect(()=>{if(t||!s)return;n(!0);const j=ce.onSnapshot(ce.doc(s,"landings",r),f=>{var _;try{let v=f.exists()?((_=f.data())==null?void 0:_.sections)||[]:[];v=v.slice().sort((b,$)=>{var N,z;return((N=b.order)!=null?N:0)-((z=$.order)!=null?z:0)}).map((b,$)=>({...b,order:$+1})),c(v),console.log("fetched: ",v)}catch(v){console.error("Error procesando landings/"+r,v)}finally{n(!1)}},f=>{console.error("Error escuchando landings/"+r,f),n(!1)});return()=>j()},[t,r,s]);const u=async j=>{const f=(j.apiUrl||"").trim();if(!f)return;const _=j.apiMethod||"GET",v=j.apiParams||[];let b=f,$,N;if(_==="GET"){const W=new URL(f,typeof window=="undefined"?"http://localhost":window.location.origin);for(const L of v)L.key&&W.searchParams.append(L.key,L.value);b=W.toString()}else{const W=new URLSearchParams;for(const L of v)L.key&&W.append(L.key,L.value);$=W.toString(),N={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const z=await fetch(b,{method:_,headers:N,body:$});if(!z.ok)throw new pe(z.status,b,z.statusText);return z.json()},h=w.useMemo(()=>t?t.slice():a.slice(),[t,a]),E=He.default.useRef(new Set);w.useEffect(()=>{const j=h.map(f=>({s:f,url:(f.apiUrl||"").trim()})).filter(({url:f})=>!!f);if(j.length)for(const{s:f,url:_}of j){const v=`${f.id}|${_}`;E.current.has(v)||(E.current.add(v),i(b=>({...b,[f.id]:!0})),l(b=>({...b,[f.id]:""})),(async()=>{try{const b=await u(f);x($=>({...$,[f.id]:b}))}catch(b){let $="Error desconocido";b instanceof pe?$=`Error HTTP ${b.status} (${b.statusText}) en ${b.url}`:b instanceof SyntaxError?$="Respuesta no es JSON válido":b instanceof TypeError?$="Fallo de red / CORS / conexión":typeof b=="string"&&($=b.toString()),l(N=>({...N,[f.id]:$}))}finally{i(b=>({...b,[f.id]:!1}))}})())}},[h]);const C=w.useMemo(()=>h.filter(j=>j.visible).sort((j,f)=>j.order-f.order),[h]),k=j=>Array.isArray(j)?j.map(f=>{const _={};for(const v of f.fields||[]){const b=(v.type||"string").toLowerCase();if(b==="number")_[v.name]=Number(v.value);else if(b==="boolean")_[v.name]=String(v.value).toLowerCase()==="true";else if(b==="function"){const $=String(v.value||"").trim();_[v.name]=()=>{if($)try{return new Function($)()}catch(N){console.error("Error función manual",N)}}}else _[v.name]=v.value}return _}):[],T=j=>{const f={};if(!Array.isArray(j))return f;for(const _ of j){if(!_.name)continue;const v=(_.type||"string").toLowerCase();if(v==="number")f[_.name]=Number(_.value);else if(v==="boolean")f[_.name]=String(_.value).toLowerCase()==="true";else if(v==="function"){const b=String(_.value||"").trim();f[_.name]=()=>{if(b)try{return new Function(b)()}catch($){console.error("Error función escalar manual",$)}}}else f[_.name]=_.value}return f},O=(j,f,_)=>{const v=_?{..._}:{};if(f){const L=(f.variableName||"items").trim()||"items";return v[L]=f.arr||[],v}const b=j,$=Array.isArray(b),N=!$&&typeof b=="object"&&b!==null?b:void 0,z=N&&Array.isArray(N.lobby||N.items)?N.lobby||N.items:void 0,W=L=>$?b:z||L;return v.items=W(z||[]),v},I=j=>{var b;const f=!!((b=j.apiUrl)!=null&&b.trim()),_=f?g[j.id]:void 0;if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(j.componentKey))return console.log(_),{items:_};let v=j.props?{...j.props}:{};if(f)v=O(_,null,v);else if(j.dataMode==="manual"){const $=k(j.manualItems);v=O(null,{arr:$,variableName:j.variableName},v);const N=T(j.manualScalarFields);v={...v,...N}}return v},F=(j,f,_)=>{const v={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${v[f]}`,children:_},j)},B=j=>{var W;const f=j.componentKey,_=Mt[f]||p[f];if(!_)return console.warn(`No hay componente registrado para "${f}"`),F(j.id,"component",`Componente "${f}" no encontrado`);const v=!!((W=j.apiUrl)!=null&&W.trim()),b=v?g[j.id]:void 0,$=v?!!y[j.id]:!1,N=v?d[j.id]:"";if(v){if($&&!b)return F(j.id,"loading",`Cargando datos desde ${j.apiUrl}...`);if(N&&!b)return F(j.id,"error",`Error cargando ${j.apiUrl}: ${N}`)}const z=I(j);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(_,{...z})},j.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&a.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(P.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,pt:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(P.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:C.map(B)})})};exports.OraculoButton=R;exports.OraculoCarousel=D;exports.OraculoCarouselDots=ne;exports.OraculoClubOlimpoVisual=_e;exports.OraculoEventCombinadasCard=Se;exports.OraculoEventEnVivoCard=Ce;exports.OraculoEventHeader=ve;exports.OraculoEventLabel=se;exports.OraculoEventLeague=je;exports.OraculoEventScore=ae;exports.OraculoEventSemanaCard=we;exports.OraculoEventStatus=he;exports.OraculoEventStatusBadge=ge;exports.OraculoEventTeamInfo=Y;exports.OraculoGameCard=K;exports.OraculoGameRankCard=be;exports.OraculoGameSlide=re;exports.OraculoGridGroup=G;exports.OraculoLiveCasinoCard=ye;exports.OraculoLogoMediosPago=te;exports.OraculoPageLandingPreview=ze;exports.OraculoSeccionBanners=Ue;exports.OraculoSeccionBonoBienvenida=Ne;exports.OraculoSeccionCasino=$e;exports.OraculoSeccionCasinoEnVivo=Oe;exports.OraculoSeccionClubOlimpo=Te;exports.OraculoSeccionDestacados=Ee;exports.OraculoSeccionEventoCombinadas=Pe;exports.OraculoSeccionEventoEnVivo=Fe;exports.OraculoSeccionEventoSemana=Be;exports.OraculoSeccionTopJuegos=ie;exports.OraculoSeccionVirtuales=Re;exports.OraculoSectionTitle=A;exports.OraculoTopJuegoItem=ie;exports.OraculoWelcomeBanner=oe;exports.default=ze;
19
+ `},Te=({headline:t,headline2:r,items:s,backgroundImageUrl:n})=>{const c=t,o=r,a=Xe.default("(max-width: 767px)"),u=s.length>1,m=n!=null?n:"",v=Nt(m),g=C.useRef(null),[S,i]=C.useState({isStart:!0,isEnd:!1}),[d,l]=C.useState(0);return a?e.jsxs(_.default,{component:"section",sx:{...v,textAlign:"center"},children:[(c||o)&&e.jsxs(_.default,{sx:de,children:[c&&e.jsx(M.default,{component:"span",sx:ue,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(M.default,{component:"span",sx:pe,children:o})]})]}),e.jsxs(_.default,{children:[e.jsx(D,{ref:g,items:s,perPage:1,gap:"12px",breakpoints:{480:{perPage:1,gap:"8px",padding:{left:"8px",right:"8px"}},768:{perPage:1,gap:"12px",padding:{left:"8px",right:"8px"}}},options:{autoWidth:!1},renderItem:p=>e.jsx(ne,{...p,onButtonClick:s[0].onButtonClick}),onMove:({index:p,isStart:b,isEnd:O})=>{i({isStart:b,isEnd:O}),l(p)}}),u&&e.jsx(se,{total:s.length,active:d,onSelect:p=>{var b;l(p),(b=g.current)==null||b.go(p)}})]})]}):e.jsx(_.default,{component:"section",sx:v,children:e.jsxs(_.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(c||o)&&e.jsx(_.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(_.default,{sx:{...de,textAlign:"left",mb:0},children:[c&&e.jsx(M.default,{component:"span",sx:ue,children:c}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(M.default,{component:"span",sx:pe,children:o})]})]})}),e.jsx(_.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:s.map((p,b)=>e.jsx(ne,{onButtonClick:p.onButtonClick,...p},b))})]})})},Pe=({className:t="",fullBleed:r=!0,items:s,selectedIndex:n=0,ariaLabel:c})=>{const o=C.useRef(null),a=C.useRef(null);if(!s)return null;const u=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=Array.isArray(s)?s[n]:s;C.useLayoutEffect(()=>{if(!o.current||!a.current||typeof ResizeObserver=="undefined")return;const g=o.current,S=a.current,i=()=>{g.style.setProperty("--orc-co-bottomH",`${S.offsetHeight+16}px`)},d=new ResizeObserver(i);return d.observe(S),i(),()=>d.disconnect()},[]);const v=["orc-co-wrap",r?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:v,"aria-label":c||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:a,children:e.jsx(_e,{text:m.text,onClick:u,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Tt="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",Pt={controls:Tt};function Fe({items:t,title:r="Combinadas del Olimpo",iconUrl:s,onViewMore:n,className:c=""}){const o=C.useRef(null),[a,u]=C.useState({isStart:!0,isEnd:!1}),[m,v]=C.useState([]),g=()=>{var w;(w=o.current)==null||w.prev()},S=()=>{var w;(w=o.current)==null||w.next(),console.log("items: ",t)},i=()=>{n==null||n()};function d(w,k,T){const $=[];for(const I of T){const B=p([I]),F=k.reduce((x,f)=>{x[f.eventId]||(x[f.eventId]=[]);const j=f.outcomes.filter(h=>B.has(h.id));return j.length>0&&x[f.eventId].push({...f,outcomes:j}),x},{}),q=l(I);w.forEach(x=>{if(x.id!==I.prePackCouponRows[0].eventId)return;const f=B;let j=null;for(const h of q)if([...h.requiredOutcomeIds].every(E=>f.has(E))){j=h.decimal;break}$.push({...x,combinadoTotal:j,betoffers:F[x.id]||[],couponId:I.id})})}return $}function l(w){var T;const k=[];for(const $ of w.prePackCouponRows)if($.type==="BET_BUILDER"&&((T=$.group)!=null&&T.groups)){const I=new Set;$.group.groups.forEach(B=>{var F;(F=B.outcomes)==null||F.forEach(q=>I.add(q.id))}),k.push({requiredOutcomeIds:I,decimal:$.odds.decimal})}return k}function p(w){var T;const k=new Set;for(const $ of w)for(const I of $.prePackCouponRows)I.type==="BET_BUILDER"&&((T=I.group)!=null&&T.groups)&&I.group.groups.forEach(B=>{var F;(F=B.outcomes)==null||F.forEach(q=>k.add(q.id))}),I.type==="SIMPLE"&&I.outcome&&k.add(I.outcome.id);return k}async function b(){var w,k,T;try{const $=(T=(k=(w=t==null?void 0:t.group)==null?void 0:w.groups)==null?void 0:k[0])==null?void 0:T.id;if(!$){console.error("Could not extract group ID");return}const I=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${$}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,F=await(await fetch(I)).json();v(d(F.events,F.betOffers,F.prePackCoupons))}catch($){console.error("loadDataEventSpecial error:",$)}}C.useEffect(()=>{t&&b()},[t]);const O=c||void 0;return e.jsx("section",{className:O,style:{width:"100%"},children:e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{className:Pt.controls,children:[e.jsxs(A,{spacing:1,columns:"auto auto",children:[e.jsx(N,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(K.ChevronLeftRounded,{}),onClick:g,disabled:a.isStart}),e.jsx(N,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(K.ChevronRightRounded,{}),onClick:S,disabled:a.isEnd})]}),e.jsx(N,{variant:"secondary",onClick:i,children:"Ver más"})]})]}),e.jsx(D,{ref:o,items:m,perPage:3.72,gap:"16px",options:{autoWidth:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:w=>e.jsx(we,{event:w}),onMove:({isStart:w,isEnd:k})=>u({isStart:w,isEnd:k})})]})})}function Be({items:t,title:r="En vivo",iconUrl:s,onViewMore:n,className:c=""}){var i,d;console.log("wefwef",t);const o=C.useRef(null),[a,u]=C.useState({isStart:!0,isEnd:!1}),m=()=>{var l;(l=o.current)==null||l.prev()},v=()=>{var l;(l=o.current)==null||l.next(),console.log("items: ",t)},g=()=>{n==null||n()},S=c||void 0;return e.jsxs("section",{className:S,style:{width:"100%"},children:[e.jsxs(A,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(G,{title:r,iconUrl:s,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(N,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(K.ChevronLeftRounded,{}),onClick:m,disabled:a.isStart}),e.jsx(N,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(K.ChevronRightRounded,{}),onClick:v,disabled:a.isEnd})]}),e.jsx(N,{variant:"secondary",onClick:g,children:"Ver más"})]}),e.jsx(D,{ref:o,items:(d=(i=t==null?void 0:t.events)==null?void 0:i.filter(l=>l.event.sport==="FOOTBALL").sort((l,p)=>new Date(p.event.start).getTime()-new Date(l.event.start).getTime()))!=null?d:[],perPage:3.395,gap:"16px",options:{autoWidth:!0},breakpoints:{768:{perPage:1,gap:"8px",focus:"center",padding:{left:"16px",right:"16px"}},1024:{perPage:2.5,gap:"10px",padding:{right:"16px"}}},renderItem:l=>e.jsx(Ce,{...l}),onMove:({isStart:l,isEnd:p})=>u({isStart:l,isEnd:p})})]})}const Ft="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Bt="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",Ut="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",te={wrapper:Ft,container:Bt,buttonWrapper:Ut};function Ue({items:t,title:r="En vivo",iconUrl:s,onViewMore:n,className:c=""}){const o=new Date;o.toISOString();const a=new Date(o);a.setDate(a.getDate()+7),a.toISOString();const u=C.useRef(null),[m,v]=C.useState({isStart:!0,isEnd:!1}),[g,S]=C.useState([]),i=()=>{n==null||n()};async function d(){try{const O=t.events.map($=>{var I;return(I=$.event)==null?void 0:I.id}),w=O.map($=>`id=${$}`).join("&"),T=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/betoffer/selected/combined_layout/event/${O[0]}?${w}&lang=es_PE&market=PE`;l(T)}catch(O){console.error(O)}}async function l(O){try{const k=await(await fetch(O)).json(),T=k.events.map(I=>I.event),$=k.events.flatMap(I=>I.betOffers||[]);S(p(T,$))}catch(w){console.error(w)}}function p(O,w){const T=w.filter($=>{var I;return((I=$.betOfferType)==null?void 0:I.id)===2}).reduce(($,I)=>($[I.eventId]||($[I.eventId]=[]),$[I.eventId].push(I),$),{});return O.filter($=>T[$.id]).map($=>({...$,outcome:T[$.id]}))}C.useEffect(()=>{t&&t.events.length>0&&d()},[t]);const b=c||void 0;return e.jsx("section",{className:b,style:{width:"100%"},children:e.jsxs("div",{className:te.wrapper,children:[e.jsx("div",{className:te.container,children:e.jsxs(U.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(G,{title:"Eventos de la semana"}),e.jsx("div",{className:te.buttonWrapper,children:e.jsx(N,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{i()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(D,{ref:u,items:g,perPage:3.5,gap:"16px",options:{autoWidth:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:O=>e.jsx(Ee,{event:O}),onMove:({isStart:O,isEnd:w})=>v({isStart:O,isEnd:w})})})]})})}const Lt=[{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"},{desktopSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoDesktop.png",mobileSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.png",fallbackSrc:"https://stg-www.contodobet.com/static/img/landing/Banner/FondoMisiones.jpg"}],zt=[{id:1,label:"APUESTAS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon1.svg",onclick:()=>console.log("APUESTAS")},{id:2,label:"EXPLORAR",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon2.svg",onclick:()=>console.log("EXPLORAR")},{id:3,label:"TOP JUEGOS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon3.svg",onclick:()=>console.log("TOP JUEGOS")},{id:4,label:"MISIONES",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon4.svg",onclick:()=>console.log("MISIONES")}];function Le({backgrounds:t=Lt,items:r=zt}){const[s,n]=C.useState(0),c=t.length||1;return e.jsxs(P.Box,{component:"section",sx:{position:"relative",overflow:"visible",pb:{xs:7,sm:8}},children:[e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(D,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>n(o),renderItem:o=>{var a;return e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(P.Box,{component:"picture",sx:{position:"absolute",inset:0,lineHeight:0},children:[e.jsx("source",{srcSet:o.desktopSrc,media:"(min-width:800px)"}),e.jsx("source",{srcSet:o.mobileSrc,media:"(max-width:799px)"}),e.jsx(P.Box,{component:"img",src:(a=o.fallbackSrc)!=null?a:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(P.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",inset:0,background:"linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.75) 100%)"}}})]})}}),e.jsx(P.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(se,{total:c,active:s})})]}),e.jsx(P.Box,{sx:{position:"absolute",bottom:{xs:36,sm:38},left:"50%",transform:"translateX(-50%)",width:"90%",backgroundColor:"#363636",borderRadius:2,py:1.5,px:1,display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:r.map(o=>e.jsxs(P.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",color:"#FFFFFF",minWidth:68,cursor:o.onclick?"pointer":"default"},onClick:()=>{var a;return(a=o.onclick)==null?void 0:a.call(o)},children:[o.icon&&e.jsx(P.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:28,md:32},height:{xs:28,md:32},mb:{xs:.5,md:0},mr:{xs:0,md:4},objectFit:"contain"}}),e.jsx(P.Typography,{sx:{fontSize:12,fontWeight:600,color:"#E0E0E0",textAlign:{xs:"center",md:"left"}},children:o.label})]},o.id))})]})}const Wt=[[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/IBK.svg",alt:"Interbank"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/Yape.svg",alt:"Yape"}],[{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/tupay.svg",alt:"Tupay"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/monnet.svg",alt:"Monnet"},{src:"https://stg-www.contodobet.com/static/img/landing/MediosPago/niubiz.svg",alt:"Niubiz"}]];function At({title:t="Medios de pago",rows:r=Wt}){const s=r.flat();return e.jsxs(P.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(P.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(P.Box,{sx:{width:"288px",height:"2px",mx:"auto",mb:3,opacity:.95,filter:"blur(0.2px)",background:"linear-gradient(90deg, rgba(0,0,0,0) 0%, #1dd75b 18%, #23d46b 50%, #1dd75b 82%, rgba(0,0,0,0) 100%)"}}),e.jsx(P.Box,{sx:{display:{xs:"block",md:"none"}},children:r.map((n,c)=>e.jsx(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:n.map(o=>e.jsx(oe,{...o},`${o.src}-${o.alt}`))},c))}),e.jsx(P.Box,{sx:{mt:3,display:{xs:"none",md:"grid"},gap:{xs:2.5,md:2.75},justifyItems:"center",alignItems:"center",gridTemplateColumns:{md:"repeat(auto-fit, 160px)"},justifyContent:{md:"center"}},children:s.map(n=>e.jsx(oe,{...n},`${n.src}-${n.alt}`))})]})}const Mt={OraculoSeccionDestacados:Oe,OraculoSeccionTopJuegos:ce,OraculoSeccionCasinoEnVivo:$e,OraculoSeccionCasino:ke,OraculoSeccionVirtuales:Ne,OraculoSeccionClubOlimpo:Pe,OraculoSeccionBonoBienvenida:Te,OraculoSeccionBanners:Le,OraculoSeccionMediosPago:At,OraculoSeccionEventoEnVivo:Be,OraculoSeccionEventoSemana:Ue,OraculoSeccionEventoCombinadas:Fe},Gt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Dt=t=>/^OraculoSeccion[A-Z]/.test(t),Ht=Object.fromEntries(Object.entries(Mt).filter(([t,r])=>Dt(t)&&Gt(r)));class me extends Error{constructor(r,s,n){super(`HTTP ${r} ${n}`),this.status=r,this.url=s,this.statusText=n,this.name="HttpError"}}const ze=({sectionsOverride:t,docId:r="home",db:s})=>{const[n,c]=C.useState([]),[o,a]=C.useState(!1),[u,m]=C.useState({}),[v,g]=C.useState({}),[S,i]=C.useState({}),[d,l]=C.useState({});C.useEffect(()=>{if(t||!s)return;a(!0);const x=le.onSnapshot(le.doc(s,"landings",r),f=>{var j;try{let h=f.exists()?((j=f.data())==null?void 0:j.sections)||[]:[];h=h.slice().sort((y,E)=>{var R,L;return((R=y.order)!=null?R:0)-((L=E.order)!=null?L:0)}).map((y,E)=>({...y,order:E+1})),c(h),console.log("fetched: ",h)}catch(h){console.error("Error procesando landings/"+r,h)}finally{a(!1)}},f=>{console.error("Error escuchando landings/"+r,f),a(!1)});return()=>x()},[t,r,s]),C.useEffect(()=>{const f=(t?t.slice():n.slice()).map(j=>j.componentKey).filter(j=>!!j&&!u[j]);if(f.length!==0)for(const j of f)I(j)},[t,n,u]);const p=async x=>{const f=(x.apiUrl||"").trim();if(!f)return;const j=x.apiMethod||"GET",h=x.apiParams||[];let y=f,E,R;if(j==="GET"){const W=new URL(f,typeof window=="undefined"?"http://localhost":window.location.origin);for(const z of h)z.key&&W.searchParams.append(z.key,z.value);y=W.toString()}else{const W=new URLSearchParams;for(const z of h)z.key&&W.append(z.key,z.value);E=W.toString(),R={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const L=await fetch(y,{method:j,headers:R,body:E});if(!L.ok)throw new me(L.status,y,L.statusText);return L.json()},b=C.useMemo(()=>t?t.slice():n.slice(),[t,n]),O=qe.default.useRef(new Set);C.useEffect(()=>{const x=b.map(f=>({s:f,url:(f.apiUrl||"").trim()})).filter(({url:f})=>!!f);if(x.length)for(const{s:f,url:j}of x){const h=`${f.id}|${j}`;O.current.has(h)||(O.current.add(h),i(y=>({...y,[f.id]:!0})),l(y=>({...y,[f.id]:""})),(async()=>{try{const y=await p(f);g(E=>({...E,[f.id]:y}))}catch(y){let E="Error desconocido";y instanceof me?E=`Error HTTP ${y.status} (${y.statusText}) en ${y.url}`:y instanceof SyntaxError?E="Respuesta no es JSON válido":y instanceof TypeError?E="Fallo de red / CORS / conexión":typeof y=="string"&&(E=y.toString()),l(R=>({...R,[f.id]:E}))}finally{i(y=>({...y,[f.id]:!1}))}})())}},[b]);const w=C.useMemo(()=>b.filter(x=>x.visible).sort((x,f)=>x.order-f.order),[b]),k=x=>Array.isArray(x)?x.map(f=>{const j={};for(const h of f.fields||[]){const y=(h.type||"string").toLowerCase();if(y==="number"){const E=String(h.value||"").trim();if(E!==""){const R=Number(E);Number.isNaN(R)||(j[h.name]=R)}}else if(y==="boolean")j[h.name]=String(h.value).toLowerCase()==="true";else if(y==="function"){const E=String(h.value||"").trim();if(E)try{const R=new Function(E);j[h.name]=R}catch(R){console.error(`❌ Error creando función en item '${h.name}':`,R)}}else j[h.name]=h.value}return j}):[],T=x=>{const f={};if(!Array.isArray(x))return f;for(const j of x){if(!j.name)continue;const h=(j.type||"string").toLowerCase();if(h==="number"){const y=String(j.value||"").trim();if(y!==""){const E=Number(y);Number.isNaN(E)||(f[j.name]=E)}}else if(h==="boolean")f[j.name]=String(j.value).toLowerCase()==="true";else if(h==="function"){const y=String(j.value||"").trim();if(y)try{const E=new Function(y);f[j.name]=E}catch(E){console.error(`❌ Error creando función en item '${j.name}':`,E)}}else f[j.name]=j.value}return f},$=(x,f,j)=>{const h=j?{...j}:{};if(f){const z=(f.variableName||"items").trim()||"items";return h[z]=f.arr||[],h}const y=x,E=Array.isArray(y),R=!E&&typeof y=="object"&&y!==null?y:void 0,L=R&&Array.isArray(R.lobby||R.items)?R.lobby||R.items:void 0,W=z=>E?y:L||z;return h.items=W(L||[]),h},I=x=>{import(`../organisms/${x}/${x}`).then(f=>{var y;const j=f,h=(y=j.default)!=null?y:j[x];h&&m(E=>({...E,[x]:h}))}).catch(f=>{console.error(`Error cargando componente en OP ${x}:`,f)})},B=x=>{var E;const f=!!((E=x.apiUrl)!=null&&E.trim()),j=f?v[x.id]:void 0;let h=x.props?{...x.props}:{};const y=T(x.manualScalarFields);if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(x.componentKey))return console.log(j),{items:j,...h,...y};if(h={...h,...y},f)h=$(j,null,h);else if(x.dataMode==="manual"){const R=k(x.manualItems);h=$(null,{arr:R,variableName:x.variableName},h)}return h},F=(x,f,j)=>{const h={loading:"bg-blue-100 text-blue-800",error:"bg-red-100 text-red-800",component:"bg-yellow-100 text-yellow-800"};return e.jsx("div",{className:`mx-4 p-4 rounded ${h[f]}`,children:j},x)},q=x=>{var W;const f=x.componentKey,j=u[f]||Ht[f];if(!j)return console.warn(`No hay componente registrado para "${f}"`),F(x.id,"component",`Componente "${f}" no encontrado`);const h=!!((W=x.apiUrl)!=null&&W.trim()),y=h?v[x.id]:void 0,E=h?!!S[x.id]:!1,R=h?d[x.id]:"";if(h){if(E&&!y)return F(x.id,"loading",`Cargando datos desde ${x.apiUrl}...`);if(R&&!y)return F(x.id,"error",`Error cargando ${x.apiUrl}: ${R}`)}const L=B(x);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(j,{...L})},x.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&n.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(P.Container,{className:"oli-font",maxWidth:!1,disableGutters:!0,sx:{backgroundColor:"#121212",position:"relative",pb:5,pt:5,width:"100%",maxWidth:"100%",overflowX:"hidden"},children:e.jsx(P.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:w.map(q)})})};exports.OraculoButton=N;exports.OraculoCarousel=D;exports.OraculoCarouselDots=se;exports.OraculoClubOlimpoVisual=_e;exports.OraculoEventCombinadasCard=we;exports.OraculoEventEnVivoCard=Ce;exports.OraculoEventHeader=be;exports.OraculoEventLabel=ae;exports.OraculoEventLeague=je;exports.OraculoEventScore=re;exports.OraculoEventSemanaCard=Ee;exports.OraculoEventStatus=ve;exports.OraculoEventStatusBadge=he;exports.OraculoEventTeamInfo=Q;exports.OraculoGameCard=Y;exports.OraculoGameRankCard=ye;exports.OraculoGameSlide=ie;exports.OraculoGridGroup=A;exports.OraculoLiveCasinoCard=Se;exports.OraculoLogoMediosPago=oe;exports.OraculoPageLandingPreview=ze;exports.OraculoSeccionBanners=Le;exports.OraculoSeccionBonoBienvenida=Te;exports.OraculoSeccionCasino=ke;exports.OraculoSeccionCasinoEnVivo=$e;exports.OraculoSeccionClubOlimpo=Pe;exports.OraculoSeccionDestacados=Oe;exports.OraculoSeccionEventoCombinadas=Fe;exports.OraculoSeccionEventoEnVivo=Be;exports.OraculoSeccionEventoSemana=Ue;exports.OraculoSeccionTopJuegos=ce;exports.OraculoSeccionVirtuales=Ne;exports.OraculoSectionTitle=G;exports.OraculoTopJuegoItem=ce;exports.OraculoWelcomeBanner=ne;exports.default=ze;
20
20
  //# sourceMappingURL=index.cjs.js.map