oraculo-ui 0.1.49 → 0.1.50
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/atoms/OraculoButtonBet/OraculoButtonBet.d.ts +20 -0
- package/dist/atoms/OraculoEvent/KambiOpenBet.d.ts +1 -0
- package/dist/index.cjs.js +5 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +1128 -1021
- package/dist/index.es.js.map +1 -1
- package/dist/molecules/OraculoCarousel/OraculoCarousel.d.ts +1 -1
- package/dist/organisms/OraculoSeccionEventoCombinadas/OraculoSeccionEventoCombinadas.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface OraculoButtonProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
onClick?: any;
|
|
5
|
+
href?: string;
|
|
6
|
+
target?: React.HTMLAttributeAnchorTarget;
|
|
7
|
+
rel?: string;
|
|
8
|
+
type?: "button" | "submit" | "reset";
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
variant?: "primary" | "secondary" | "tertiary";
|
|
11
|
+
size?: "sm" | "md" | "lg";
|
|
12
|
+
fullWidth?: boolean;
|
|
13
|
+
fullHeight?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
leftIcon?: React.ReactNode;
|
|
17
|
+
rightIcon?: React.ReactNode;
|
|
18
|
+
iconOnly?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export default function OraculoButtonBet({ children, onClick, href, target, rel, type, disabled, variant, size, fullWidth, fullHeight, className, ariaLabel, leftIcon, rightIcon, iconOnly, }: OraculoButtonProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function redirectHomeWithOutcomes(outcomes: number | number[]): void;
|
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"),E=require("react"),pe=require("@splidejs/react-splide"),Le=require("@mui/material/Box"),ze=require("@mui/material/Typography"),We=require("@mui/material/Stack"),q=require("@mui/icons-material"),Ae=require("@mui/icons-material/ChevronLeftRounded"),Ge=require("@mui/icons-material/ChevronRightRounded"),De=require("@mui/material/useMediaQuery"),ie=require("firebase/firestore"),D=t=>t&&t.__esModule?t:{default:t},He=D(E),S=D(Le),z=D(ze),M=D(We),me=D(Ae),xe=D(Ge),qe=D(De);function R({children:t,onClick:r,href:n,target:a,rel:l,type:o="button",disabled:s=!1,variant:p="primary",size:m,fullWidth:b=!1,fullHeight:h=!1,className:y="",ariaLabel:i,leftIcon:d,rightIcon:c,iconOnly:u}){const j=!!t&&t!==!0,N=(!!d?1:0)+(!!c?1:0)==1,T=u!=null?u:N&&!j,O=["orc-btn",p==="secondary"?"orc-btn--secondary":p==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",b?"orc-btn--full":"",h?"orc-btn--fullHeight":"",T?"orc-btn--iconOnly":"",y].filter(Boolean).join(" "),$=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}),c&&e.jsx("span",{className:"orc-btn__icon",children:c})]}),x=s?!0:void 0;return n?e.jsx(P.Link,{href:n,target:a,rel:l,"aria-label":i,"aria-disabled":x,tabIndex:x?-1:void 0,className:O,onClick:x?f=>f.preventDefault():r,children:$}):e.jsx("button",{type:o,onClick:r,disabled:!!x,"aria-label":i,className:O,children:$})}function W({title:t,iconUrl:r,size:n="md",className:a=""}){const o=["orc-section-title",n?`orc-section-title--${n}`:"",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 oe=({total:t,active:r,onSelect:n,className:a=""})=>{if(t<=1)return null;const l=["orc-dots",a].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((o,s)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":s===r,"aria-label":`Ir al slide ${s+1}`,className:"orc-dots__dot"+(s===r?" orc-dots__dot--active":""),onClick:()=>n==null?void 0:n(s)})},s))})};function L({children:t,minWidth:r=32,spacing:n=2,justify:a="stretch",columns:l=null}){const o=l||`repeat(auto-fit, minmax(${r}px, 1fr))`,s=typeof n=="number"?`${n*8}px`:n;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:a,gap:s,height:"inherit"},children:t})}function ee({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 Ve({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 fe({text:t,color:r="#ff3b3b",textColor:n="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:r,color:n,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function ge({live:t,time:r}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(fe,{text:"En vivo"}),r&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:r})]})}function he({title:t,subtitle:r,live:n=!1,time:a=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(Ve,{title:t,subtitle:r}),e.jsx(ge,{live:n,time:a})]})}const Xe="oraculo__OraculoEventLabel-module__label___c64Xw",Je={label:Xe};function ne({text:t}){return e.jsx("span",{className:Je.label,children:t})}const Ke="oraculo__OraculoEventLeague-module__container___rdk4F",Ye={container:Ke};function ve({title:t}){return e.jsx("div",{className:Ye.container,children:t.toUpperCase()})}const Qe="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",H={scoreWrapper:Qe,name:Ze,score:et,normal:tt,small:ot};function se({text:t,name:r,size:n="normal"}){return e.jsxs("div",{className:`${H.scoreWrapper} ${H[n]}`,children:[e.jsx("div",{className:`${H.score} ${H[n]}`,children:t}),r&&e.jsx("span",{className:`${H.name} ${H[n]}`,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",J={team:nt,logo:st,name:at,regular:rt,compact:it};function X({name:t,logo:r,size:n="regular"}){return e.jsxs("div",{className:`oli-font ${J.team} ${J[n]}`,children:[e.jsx("img",{src:r,alt:t,className:J.logo}),e.jsx("span",{className:J.name,children:t})]})}const ct=pe.Splide,lt=pe.SplideSlide,A=E.forwardRef(({items:t=[],renderItem:r,perPage:n=1,gap:a="0px",breakpoints:l,options:o={},className:s="",onMove:p,useIndexAsKey:m=!1},b)=>{const h=E.useRef(null);E.useImperativeHandle(b,()=>({next:()=>{var c;return(c=h.current)==null?void 0:c.go(">")},prev:()=>{var c;return(c=h.current)==null?void 0:c.go("<")},go:c=>{var u;return(u=h.current)==null?void 0:u.go(c)}}));const y=E.useCallback(c=>{const u=c.index,j=c.length,I=c.options.perPage||1,w=u===0,N=u>=j-I;p==null||p({index:u,isStart:w,isEnd:N,total:j})},[p]),i=E.useCallback(c=>{y(c)},[y]),d={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:n,gap:a,breakpoints:l,...o};return e.jsx("div",{className:s,style:{width:"100%"},children:e.jsx(ct,{ref:h,options:d,onMove:y,onMounted:i,children:t.map((c,u)=>{var j;return e.jsx(lt,{children:r(c,u)},m?u:(j=c.id)!=null?j:u)})})})}),V=({imageUrl:t,onClick:r,size:n="sm",fillParent:a=!1})=>{const l=n==="lg"?{w:280,h:352}:{w:152,h:168},o=p=>{p.stopPropagation(),r==null||r()},s=a?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.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",...s,"&: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:n,sizes:a={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var h,y,i,d;const l=(c,u)=>{var j,I,w,N;return{xs:(I=(j=a.xs)==null?void 0:j[c])!=null?I:u,md:(N=(w=a.md)==null?void 0:w[c])!=null?N:u}},o=l("w",186),s=l("h",264),p=l("r",22.6),m=l("font",64),b={xs:Math.round(((y=(h=a.xs)==null?void 0:h.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}/${s.xs}`,md:`${o.md}/${s.md}`},borderRadius:{xs:`${p.xs}px`,md:`${p.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${b.xs}px`,md:`${b.md}px`}},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(V,{imageUrl:t,onClick:n,size:"lg",fillParent:!0})}),e.jsx(S.default,{component:"span",sx:{position:"absolute",left:8,bottom:{xs:`-${b.xs}px`,md:`-${b.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 je=({logo:t,provider:r,providerName:n,machine:a,onClick:l})=>{var o;return e.jsxs(S.default,{onClick:l,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(z.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=r!=null?r:n)!=null?o:""})})]})},K=12,ae=({items:t,layout:r="grid",onClick:n})=>{var a;if(r==="mosaic"){const l=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:`${K}px`,rowGap:`${K}px`,alignItems:"stretch",justifyItems:"stretch"},children:[l&&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(V,{imageUrl:`https://olimpo.bet${(a=l.imageUrl)!=null?a:""}`,size:"lg",fillParent:!0,onClick:()=>n==null?void 0:n(l,0)})}),o.map((s,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(V,{imageUrl:`https://olimpo.bet${(m=s.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>n==null?void 0:n(s,p+1)})},s.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:`${K}px`,gridAutoFlow:"column"},children:t.map((l,o)=>{var s,p;return e.jsx(S.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(V,{imageUrl:`https://olimpo.bet${(s=l.imageUrl)!=null?s:""}`,size:"sm",fillParent:!0,onClick:()=>n==null?void 0:n(l,o)})},(p=l.id)!=null?p:o)})})},te=({title:t,amount:r,subtitle:n,buttonText:a,onButtonClick:l,backgroundImage:o,alt:s,className:p="",variant:m="small"})=>{const b=r?r.slice(0,2):"",h=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:s!=null?s:"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(z.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:b}),e.jsx(S.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:h})]}),n&&e.jsx(z.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:n}),a&&e.jsx(R,{onClick:l,children:a})]})})]})},ye=({text:t,buttonLabel:r="Conoce más",onClick:n,imgAlt:a="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:o,imgSrcDesktopLogo:s})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,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"})}),s&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:s,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:n,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:n,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",G={card:dt,combinadas:ut,apuestaItem:pt,lineContainer:mt,circle:xt,line:ft,apuestaText:gt,cuotaTotal:ht};function _e({event:t}){var a;function r(l){var h;const o=(h=l.betoffers)!=null?h:[],s=l.homeName,p=l.awayName,m=o.map(y=>{var u,j,I,w;let i=y.outcomes[0],d="",c=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 ${c}`,i!=null&&i.participant&&(d=`${i.participant} - ${d}`)):["Menos de","Menos"].includes(i==null?void 0:i.label)?(d=`Menos de ${c}`,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=`${s} o Empate`:i.label==="12"?d=`${s} 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:"",c!==""&&d===i.label&&(d=`${i.label} ${c}`)),{id:(j=i==null?void 0:i.id)!=null?j:0,value:d,label:y.criterion.label,odds:(I=i==null?void 0:i.odds)!=null?I:0,bl:(w=i==null?void 0:i.label)!=null?w:0}}),b=m.reduce((y,i)=>y+i.odds,0)/1e3;return{outcomes:m,total:b.toFixed(2)}}const n=r(t);return e.jsxs("div",{className:G.card,children:[e.jsx("div",{className:G.combinadas,children:e.jsxs(M.default,{direction:"column",spacing:.5,useFlexGap:!0,children:[e.jsx(W,{title:t.name,iconUrl:"/assets/img/home/Combinadas/pelota.png",size:"xs"}),e.jsx("img",{src:"/assets/img/home/Combinadas/line.png"}),e.jsx(M.default,{direction:"column",spacing:.5,useFlexGap:!0,children:n.outcomes.map((l,o)=>e.jsxs("div",{className:G.apuestaItem,children:[e.jsxs("div",{className:G.lineContainer,children:[e.jsx("div",{className:G.circle}),o<n.outcomes.length-1&&e.jsx("div",{className:G.line})]}),e.jsxs("div",{className:G.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var l,o;return console.log((o=(l=n==null?void 0:n.outcomes)==null?void 0:l.map(s=>s==null?void 0:s.id))!=null?o:[])},className:G.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 Se({event:t,liveData:r,betOffers:n,fondo:a="/assets/img/home/EnVivo/fondo.png"}){var l,o,s,p,m,b,h,y,i,d,c;return e.jsx("div",{style:{backgroundImage:`url(${a})`,backgroundSize:"cover",height:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(M.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(M.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(he,{title:(l=t.path[0].name)!=null?l:"",subtitle:t.group,live:!0,time:(s=(o=r==null?void 0:r.matchClock)==null?void 0:o.minute)!=null?s:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(L,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(X,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(se,{text:((m=(p=r==null?void 0:r.score)==null?void 0:p.home)!=null?m:0)+":"+((h=(b=r==null?void 0:r.score)==null?void 0:b.away)!=null?h:0),name:"En vivo"}),e.jsx(X,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(M.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(L,{spacing:1,children:((i=(y=n==null?void 0:n[0])==null?void 0:y.outcomes)!=null?i:[]).map((u,j)=>e.jsx(ne,{text:u.label.toUpperCase()},j))}),e.jsx(L,{spacing:2,children:((c=(d=n==null?void 0:n[0])==null?void 0:d.outcomes)!=null?c:[]).map((u,j)=>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)},j))})]})]})})}const vt="oraculo__OraculoEventDate-module__date___xhIlh",bt={date:vt};function jt({text:t}){return e.jsx("div",{className:`oli-font ${bt.date}`,children:t})}const yt="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",_t="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",St="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Y={cardContainer:yt,cardBackground:_t,jugadas:St};function we({event:t}){var n,a,l,o,s,p,m;function r(b){const h=new Date(b),y=h.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),i=h.getDate().toString().padStart(2,"0"),d=(h.getMonth()+1).toString().padStart(2,"0");let c=h.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return c=c.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${y} ${i}/${d} | ${c}`}return e.jsxs("div",{className:Y.cardContainer,children:[e.jsx(ve,{title:(n=t.group)!=null?n:""}),e.jsx("div",{className:Y.cardBackground,children:e.jsxs(M.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(M.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(L,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(X,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(se,{text:"vs.",name:"",size:"small"}),e.jsx(X,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(jt,{text:r(t.start)})]}),e.jsxs(M.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(L,{spacing:1,children:((o=(l=(a=t==null?void 0:t.outcome)==null?void 0:a[0])==null?void 0:l.outcomes)!=null?o:[]).map((b,h)=>e.jsx(ne,{text:b.label.toUpperCase()},h))}),e.jsx("div",{className:Y.jugadas,children:e.jsx(L,{spacing:1,children:((m=(p=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:p.outcomes)!=null?m:[]).map((b,h)=>e.jsx(R,{variant:"primary",fullHeight:!0,onClick:()=>{console.log(b.id)},children:(b.odds/1e3).toFixed(2)},h))})})]})]})})]})}function Ce({items:t,title:r="Destacados",iconUrl:n,onViewMore:a,className:l=""}){const o=E.useRef(null),[s,p]=E.useState({isStart:!0,isEnd:!1}),m=()=>{var d;(d=o.current)==null||d.prev()},b=()=>{var d;(d=o.current)==null||d.next(),console.log("items: ",t)},h=()=>{window.location.href="https://www.olimpo.bet/promociones"},y=d=>{if(!d||typeof window=="undefined")return;const u=`https://www.olimpo.bet/promociones/${encodeURIComponent(d)}`;window.location.href=u},i=l||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(W,{title:r,iconUrl:n,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:b,disabled:s.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:h,children:"Ver más"})]}),e.jsx(A,{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:c})=>p({isStart:d,isEnd:c})})]})}const wt=t=>{var i,d,c,u,j,I;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",n=(c=t.provider)!=null?c:"",a=(u=t.machine)!=null?u:"",l=(j=t.external_id)!=null?j:"",o=(I=t.type)!=null?I:"",s=encodeURIComponent(String(n)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),b=encodeURIComponent(String(l)),h=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/casino?${p}?provider=${s}&name=${m}&external_id=${b}&type=${h}`;window.location.href=y};function re({items:t,title:r="Top Juegos",iconUrl:n,onCardClick:a}){const l=E.useMemo(()=>t.map((o,s)=>{var p;return{...o,orden:(p=o.orden)!=null?p:s+1,_originalIndex:s}}).sort((o,s)=>o.orden!=null&&s.orden!=null?o.orden-s.orden:o._originalIndex-s._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(M.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(W,{title:r,iconUrl:n,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:l.slice(0,6).map(o=>{var s;return e.jsx(be,{imageUrl:`https://olimpo.bet${(s=o.logo)!=null?s:""}`,orden:o.orden,onClick:()=>{a?a(o):wt(o)}},o.machine)})})]})})}const Ct=(t,r)=>{var n,a;return(a=(n=t.orden)!=null?n:t.machine)!=null?a:r},Et=t=>{var i,d,c,u,j,I;if(typeof window=="undefined")return;const r=(d=(i=t.name)!=null?i:t.web_name)!=null?d:"",n=(c=t.provider)!=null?c:"",a=(u=t.machine)!=null?u:"",l=(j=t.external_id)!=null?j:"",o=(I=t.type)!=null?I:"Live",s=encodeURIComponent(String(n)),p=encodeURIComponent(String(a)),m=encodeURIComponent(String(r)),b=encodeURIComponent(String(l)),h=encodeURIComponent(String(o)),y=`https://www.olimpo.bet/casino-en-vivo?${p}?provider=${s}&name=${m}&external_id=${b}&type=${h}`;window.location.href=y},Ee=({items:t,title:r="Casino en vivo",subtitle:n="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:a="",backgroundDesktopUrl:l="",onCardClick:o,onViewMore:s,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"),T=require("@mui/material"),C=require("react"),fe=require("@splidejs/react-splide"),Ge=require("@mui/material/Box"),Ae=require("@mui/material/Typography"),De=require("@mui/material/Stack"),q=require("@mui/icons-material"),He=require("@mui/icons-material/ChevronLeftRounded"),Ve=require("@mui/icons-material/ChevronRightRounded"),qe=require("@mui/material/useMediaQuery"),de=require("firebase/firestore"),H=t=>t&&t.__esModule?t:{default:t},Je=H(C),S=H(Ge),W=H(Ae),F=H(De),ge=H(He),he=H(Ve),Ke=H(qe);function B({children:t,onClick:n,href:a,target:r,rel:l,type:o="button",disabled:s=!1,variant:x="primary",size:m,fullWidth:v=!1,fullHeight:b=!1,className:j="",ariaLabel:c,leftIcon:d,rightIcon:i,iconOnly:f}){const y=!!t&&t!==!0,R=(!!d?1:0)+(!!i?1:0)==1,$=f!=null?f:R&&!y,E=["orc-btn",x==="secondary"?"orc-btn--secondary":x==="tertiary"?"orc-btn--tertiary":"orc-btn--primary",m?`orc-btn--${m}`:"",v?"orc-btn--full":"",b?"orc-btn--fullHeight":"",$?"orc-btn--iconOnly":"",j].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:"orc-btn__icon",children:d}),!$&&e.jsx("span",{className:"orc-btn__label",children:t}),i&&e.jsx("span",{className:"orc-btn__icon",children:i})]}),p=s?!0:void 0;return a?e.jsx(T.Link,{href:a,target:r,rel:l,"aria-label":c,"aria-disabled":p,tabIndex:p?-1:void 0,className:E,onClick:p?u=>u.preventDefault():n,children:I}):e.jsx("button",{type:o,onClick:n,disabled:!!p,"aria-label":c,className:E,children:I})}function G({title:t,iconUrl:n,size:a="md",className:r=""}){const o=["orc-section-title",a?`orc-section-title--${a}`:"",r].filter(Boolean).join(" ");return e.jsxs("div",{className:o,children:[n&&e.jsx("img",{src:n,alt:"",className:"orc-section-title__icon"}),e.jsx("h2",{className:"orc-section-title__title",children:t})]})}const se=({total:t,active:n,onSelect:a,className:r=""})=>{if(t<=1)return null;const l=["orc-dots",r].filter(Boolean).join(" ");return e.jsx("div",{className:l,role:"tablist",children:Array.from({length:t}).map((o,s)=>e.jsx("span",{className:"orc-dots__cell",children:e.jsx("button",{type:"button",role:"tab","aria-selected":s===n,"aria-label":`Ir al slide ${s+1}`,className:"orc-dots__dot"+(s===n?" orc-dots__dot--active":""),onClick:()=>a==null?void 0:a(s)})},s))})};function U({children:t,minWidth:n=32,spacing:a=2,justify:r="stretch",columns:l=null}){const o=l||`repeat(auto-fit, minmax(${n}px, 1fr))`,s=typeof a=="number"?`${a*8}px`:a;return e.jsx("div",{style:{display:"grid",gridTemplateColumns:o,justifyItems:r,gap:s,height:"inherit"},children:t})}function oe({src:t,alt:n}){return e.jsx(T.Box,{sx:{position:"relative",width:{xs:80,md:160},height:{xs:48,md:96},display:"inline-block"},children:e.jsx(T.Box,{component:"img",src:t,alt:n,sx:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"contain"}})})}const Xe="oraculo__OraculoEventTitle-module__contenedor___rg1vw",Qe="oraculo__OraculoEventTitle-module__flexGroup___jMLFO",Ye="oraculo__OraculoEventTitle-module__subtitle___TmHna",Q={contenedor:Xe,flexGroup:Qe,subtitle:Ye};function Ze({title:t,subtitle:n}){return e.jsxs("div",{className:Q.contenedor,children:[e.jsx("span",{style:{fontWeight:700,fontSize:"12px",lineHeight:"16px"},children:t}),n&&e.jsxs("div",{className:Q.flexGroup,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",{className:Q.subtitle,children:n}),e.jsx("div",{})]})]})}function _e({text:t,color:n="#ff3b3b",textColor:a="#fff"}){return e.jsx("span",{className:"oli-font",style:{backgroundColor:n,color:a,borderRadius:"8px",padding:"4px 8px",fontSize:"12px",lineHeight:"16px",fontWeight:700,width:"41px",height:"16px",textAlign:"center"},children:t})}function be({live:t,time:n}){return e.jsxs("div",{className:"oli-font",style:{display:"flex",alignItems:"center",gap:"8px"},children:[t&&e.jsx(_e,{text:"En vivo"}),n&&e.jsx("span",{style:{fontSize:"14px",fontWeight:400,lineHeight:"18px",paddingTop:"4px"},children:n})]})}function ve({title:t,subtitle:n,live:a=!1,time:r=""}){return e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",color:"#FFFFFF"},children:[e.jsx(Ze,{title:t,subtitle:n}),e.jsx(be,{live:a,time:r})]})}const et="oraculo__OraculoEventLabel-module__label___c64Xw",tt={label:et};function ae({text:t}){return e.jsx("span",{className:tt.label,children:t})}const ot="oraculo__OraculoEventLeague-module__container___rdk4F",nt={container:ot};function je({title:t}){return e.jsx("div",{className:nt.container,children:t.toUpperCase()})}const st="oraculo__OraculoEventScore-module__scoreWrapper___fWwEr",at="oraculo__OraculoEventScore-module__name___r4uL6",rt="oraculo__OraculoEventScore-module__score___Xl03M",it="oraculo__OraculoEventScore-module__normal___cCNFz",ct="oraculo__OraculoEventScore-module__small___fVt8E",V={scoreWrapper:st,name:at,score:rt,normal:it,small:ct};function re({text:t,name:n,size:a="normal"}){return e.jsxs("div",{className:`${V.scoreWrapper} ${V[a]}`,children:[e.jsx("div",{className:`${V.score} ${V[a]}`,children:t}),n&&e.jsx("span",{className:`${V.name} ${V[a]}`,children:n})]})}const lt="oraculo__OraculoEventTeamInfo-module__team___UfpUs",dt="oraculo__OraculoEventTeamInfo-module__regular___ag826",ut="oraculo__OraculoEventTeamInfo-module__logo___fKCl3",pt="oraculo__OraculoEventTeamInfo-module__name___4ikm-",mt="oraculo__OraculoEventTeamInfo-module__compact___RCNOs",X={team:lt,regular:dt,logo:ut,name:pt,compact:mt};function K({name:t,logo:n,size:a="regular"}){return e.jsxs("div",{className:`oli-font ${X.team} ${X[a]}`,children:[e.jsx("img",{src:n,alt:t,className:X.logo}),e.jsx("span",{className:X.name,children:t})]})}const xt=fe.Splide,ft=fe.SplideSlide,A=C.forwardRef(({items:t=[],renderItem:n,perPage:a=1,gap:r="0px",breakpoints:l,options:o={},className:s="",onMove:x,useIndexAsKey:m=!1},v)=>{const b=C.useRef(null);C.useImperativeHandle(v,()=>({next:()=>{var i;return(i=b.current)==null?void 0:i.go(">")},prev:()=>{var i;return(i=b.current)==null?void 0:i.go("<")},go:i=>{var f;return(f=b.current)==null?void 0:f.go(i)}}));const j=C.useCallback(i=>{const f=i.Components.Controller,y=f.getIndex(),k=f.getEnd(),O=y===0,R=y>=k,$=i.Components.Slides.getLength();x==null||x({index:y,isStart:O,isEnd:R,total:$})},[x]),c=C.useCallback(i=>{j(i)},[j]),d={type:"slide",trimSpace:!1,drag:!0,pagination:!1,arrows:!1,rewind:!1,focus:"start",autoWidth:!1,perPage:a,gap:r,breakpoints:l,...o};return e.jsx("div",{className:s,style:{width:"100%"},children:e.jsx(xt,{ref:b,options:d,onMove:j,onMounted:c,children:t.map((i,f)=>{var y;return e.jsx(ft,{children:n(i,f)},m?f:(y=i.id)!=null?y:f)})})})}),J=({imageUrl:t,onClick:n,size:a="sm",fillParent:r=!1})=>{const l=a==="lg"?{w:280,h:352}:{w:152,h:168},o=x=>{x.stopPropagation(),n==null||n()},s=r?{width:"100%",height:"100%"}:{width:`${l.w}px`,height:`${l.h}px`};return e.jsxs(S.default,{onClick:n,role:"button",sx:{position:"relative",borderRadius:"12px",overflow:"hidden",boxSizing:"border-box",transition:"transform .15s ease, box-shadow .15s ease",...s,"&: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(B,{variant:"primary",size:"md",onClick:o,children:"JUGAR"})})]})};function ye({imageUrl:t,orden:n=1,onClick:a,sizes:r={xs:{w:104,h:112,r:18,font:48},md:{w:186,h:264,r:22.6,font:64}}}){var b,j,c,d;const l=(i,f)=>{var y,k,O,R;return{xs:(k=(y=r.xs)==null?void 0:y[i])!=null?k:f,md:(R=(O=r.md)==null?void 0:O[i])!=null?R:f}},o=l("w",186),s=l("h",264),x=l("r",22.6),m=l("font",64),v={xs:Math.round(((j=(b=r.xs)==null?void 0:b.font)!=null?j:64)*.28),md:Math.round(((d=(c=r.md)==null?void 0:c.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}/${s.xs}`,md:`${o.md}/${s.md}`},borderRadius:{xs:`${x.xs}px`,md:`${x.md}px`},boxSizing:"border-box",overflow:"visible",pb:{xs:`${v.xs}px`,md:`${v.md}px`}},children:[e.jsx(S.default,{sx:{position:"absolute",inset:0,borderRadius:"inherit",overflow:"hidden"},children:e.jsx(J,{imageUrl:t,onClick:a,size:"lg",fillParent:!0})}),e.jsx(S.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:n})]})}const we=({logo:t,provider:n,providerName:a,machine:r,onClick:l})=>{var o;return e.jsxs(S.default,{onClick:l,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 ${r!=null?r:""}`,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(W.default,{sx:{color:"#fff",fontWeight:700,fontSize:{xs:11,md:14},textTransform:"capitalize"},children:(o=n!=null?n:a)!=null?o:""})})]})},Y=12,ie=({items:t,layout:n="grid",onClick:a})=>{var r;if(n==="mosaic"){const l=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:`${Y}px`,rowGap:`${Y}px`,alignItems:"stretch",justifyItems:"stretch"},children:[l&&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(J,{imageUrl:`https://olimpo.bet${(r=l.imageUrl)!=null?r:""}`,size:"lg",fillParent:!0,onClick:()=>a==null?void 0:a(l,0)})}),o.map((s,x)=>{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(J,{imageUrl:`https://olimpo.bet${(m=s.imageUrl)!=null?m:""}`,size:"sm",fillParent:!0,onClick:()=>a==null?void 0:a(s,x+1)})},s.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:`${Y}px`,gridAutoFlow:"column"},children:t.map((l,o)=>{var s,x;return e.jsx(S.default,{sx:{overflow:"hidden",borderRadius:2},children:e.jsx(J,{imageUrl:`https://olimpo.bet${(s=l.imageUrl)!=null?s:""}`,size:"sm",fillParent:!0,onClick:()=>a==null?void 0:a(l,o)})},(x=l.id)!=null?x:o)})})},ne=({title:t,amount:n,subtitle:a,buttonText:r,onButtonClick:l,backgroundImage:o,alt:s,className:x="",variant:m="small"})=>{const v=n?n.slice(0,2):"",b=n?n.slice(2):"",j=m==="large";return e.jsxs(S.default,{className:x,sx:{position:"relative",width:"100%",maxWidth:{xs:328,lg:j?618:456},mx:"auto"},children:[o&&e.jsx(S.default,{sx:{position:"relative",width:"100%",aspectRatio:{xs:"328 / 188",lg:j?"618 / 346":"456 / 272"},borderRadius:"14px",overflow:"hidden"},children:e.jsx(S.default,{component:"img",src:o,alt:s!=null?s:"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(W.default,{sx:{fontSize:{xs:12,lg:20},fontWeight:400,color:"#e7f8ff"},children:t}),n&&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:v}),e.jsx(S.default,{component:"span",sx:{fontSize:{xs:52,lg:77}},children:b})]}),a&&e.jsx(W.default,{sx:{pb:"20px",fontSize:14,fontWeight:600,color:"#e7f8ff"},children:a}),r&&e.jsx(B,{onClick:l,children:r})]})})]})},Se=({text:t,buttonLabel:n="Conoce más",onClick:a,imgAlt:r="Club Olimpo",imgSrcMobile:l,imgSrcDesktopBg:o,imgSrcDesktopLogo:s})=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"orc-co-bgMobile",children:e.jsx("img",{src:l,alt:r,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:`${r} fondo`,className:"orc-co-bgDesktopImg"})}),s&&e.jsx("div",{className:"orc-co-logo",children:e.jsx("img",{src:s,alt:`${r} logo`,className:"orc-co-logoImg"})}),e.jsxs("div",{className:"orc-co-desktopContent",children:[e.jsx("p",{className:"orc-co-captionDesktop",children:t}),e.jsx(B,{onClick:a,variant:"primary",size:"md",children:n})]})]}),e.jsxs("div",{className:"orc-co-bottom",children:[e.jsx("p",{className:"orc-co-caption",children:t}),e.jsx(B,{onClick:a,variant:"primary",size:"md",children:n})]})]}),gt="oraculo__OraculoEventCombinadasCard-module__card___ulQeY",ht="oraculo__OraculoEventCombinadasCard-module__combinadas___Gxrld",_t="oraculo__OraculoEventCombinadasCard-module__apuestaItem___YnYMy",bt="oraculo__OraculoEventCombinadasCard-module__lineContainer___G5rbU",vt="oraculo__OraculoEventCombinadasCard-module__circle___eehm-",jt="oraculo__OraculoEventCombinadasCard-module__line___Eb2pK",yt="oraculo__OraculoEventCombinadasCard-module__apuestaText___b5s7S",wt="oraculo__OraculoEventCombinadasCard-module__cuotaTotal___Lohvu",D={card:gt,combinadas:ht,apuestaItem:_t,lineContainer:bt,circle:vt,line:jt,apuestaText:yt,cuotaTotal:wt};function ce(t){const n=Array.isArray(t)?t:[t];sessionStorage.setItem("landingOutcomes",JSON.stringify(n)),window.location.href="/#home"}function Ce({event:t}){var r;function n(l){var b;const o=(b=l.betoffers)!=null?b:[],s=l.homeName,x=l.awayName,m=o.map(j=>{var f,y,k,O;let c=j.outcomes[0],d="",i=c!=null&&c.line?c.line/1e3:"";return["Más de","Mas de","Over"].includes(c==null?void 0:c.label)?(d=`Más de ${i}`,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["Menos de","Menos"].includes(c==null?void 0:c.label)?(d=`Menos de ${i}`,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["Sí","No"].includes(c==null?void 0:c.label)?(d=c==null?void 0:c.label,c!=null&&c.participant&&(d=`${c.participant} - ${d}`)):["1X","12","X2"].includes(c==null?void 0:c.label)?c.label==="1X"?d=`${s} o Empate`:c.label==="12"?d=`${s} o ${x}`:c.label==="X2"&&(d=`${x} o Empate`):(c!=null&&c.participant?d=c.participant:d=(f=c==null?void 0:c.label)!=null?f:"",i!==""&&d===c.label&&(d=`${c.label} ${i}`)),{id:(y=c==null?void 0:c.id)!=null?y:0,value:d,label:j.criterion.label,odds:(k=c==null?void 0:c.odds)!=null?k:0,bl:(O=c==null?void 0:c.label)!=null?O:0}}),v=m.reduce((j,c)=>j+c.odds,0)/1e3;return{outcomes:m,total:v.toFixed(2)}}const a=n(t);return e.jsxs("div",{className:D.card,children:[e.jsx("div",{className:D.combinadas,children:e.jsxs(F.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(F.default,{direction:"column",spacing:.5,useFlexGap:!0,children:a.outcomes.map((l,o)=>e.jsxs("div",{className:D.apuestaItem,children:[e.jsxs("div",{className:D.lineContainer,children:[e.jsx("div",{className:D.circle}),o<a.outcomes.length-1&&e.jsx("div",{className:D.line})]}),e.jsxs("div",{className:D.apuestaText,children:[e.jsx("strong",{children:l.value})," ","| ",l.label]})]},o))})]})}),e.jsxs("button",{onClick:()=>{var l,o;return ce((o=(l=a==null?void 0:a.outcomes)==null?void 0:l.map(s=>s==null?void 0:s.id))!=null?o:[])},className:D.cuotaTotal,children:[e.jsxs("span",{children:["Cuota total: ",e.jsx("strong",{children:(((r=t.combinadoTotal)!=null?r:0)/1e3).toFixed(2)})]}),e.jsx("img",{src:"/assets/img/home/Combinadas/cuotaTotal.svg",alt:"cuota total"})]})]})}const z={"orc-btn":"oraculo__OraculoButtonBet-module__orc-btn___jakza","orc-btn__label":"oraculo__OraculoButtonBet-module__orc-btn__label___zNFEH","orc-btn__icon":"oraculo__OraculoButtonBet-module__orc-btn__icon___5Rhyd","orc-btn--primary":"oraculo__OraculoButtonBet-module__orc-btn--primary___7TlJB","orc-btn--secondary":"oraculo__OraculoButtonBet-module__orc-btn--secondary___X4kJt","orc-btn--tertiary":"oraculo__OraculoButtonBet-module__orc-btn--tertiary___iS6eD","orc-btn--sm":"oraculo__OraculoButtonBet-module__orc-btn--sm___lIF2e","orc-btn--md":"oraculo__OraculoButtonBet-module__orc-btn--md___x4SI7","orc-btn--lg":"oraculo__OraculoButtonBet-module__orc-btn--lg___0BQNI","orc-btn--iconOnly":"oraculo__OraculoButtonBet-module__orc-btn--iconOnly___hQGwI","orc-btn--full":"oraculo__OraculoButtonBet-module__orc-btn--full___z-Myo","orc-btn--fullHeight":"oraculo__OraculoButtonBet-module__orc-btn--fullHeight___pCxq1"};function St({children:t,onClick:n,href:a,target:r,rel:l,type:o="button",disabled:s=!1,variant:x="primary",size:m,fullWidth:v=!1,fullHeight:b=!1,className:j="",ariaLabel:c,leftIcon:d,rightIcon:i,iconOnly:f}){const y=!!t&&t!==!0,R=(!!d?1:0)+(!!i?1:0)==1,$=f!=null?f:R&&!y,E=[z["orc-btn"],z[`orc-btn--${x}`],m?z[`orc-btn--${m}`]:"",v?z["orc-btn--full"]:"",b?z["orc-btn--fullHeight"]:"",$?z["orc-btn--iconOnly"]:"",j].filter(Boolean).join(" "),I=e.jsxs(e.Fragment,{children:[d&&e.jsx("span",{className:z["orc-btn__icon"],children:d}),!$&&e.jsx("span",{className:z["orc-btn__label"],children:t}),i&&e.jsx("span",{className:z["orc-btn__icon"],children:i})]}),p=s?!0:void 0;return a?e.jsx(T.Link,{href:a,target:r,rel:l,"aria-label":c,"aria-disabled":p,tabIndex:p?-1:void 0,className:E,onClick:p?u=>u.preventDefault():n,children:I}):e.jsx("button",{type:o,onClick:n,disabled:!!p,"aria-label":c,className:E,children:I})}function Ee({event:t,liveData:n,betOffers:a,fondo:r="/assets/img/home/EnVivo/fondo.png"}){var o,s,x,m,v,b,j,c;const l=a==null?void 0:a.find(d=>{var i;return((i=d.betOfferType)==null?void 0:i.id)===2});return e.jsx("div",{style:{backgroundImage:`url(${r})`,backgroundSize:"cover",minHeight:"160px",width:"296px",padding:"12px 16px",borderRadius:"16px"},children:e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(ve,{title:(o=t.path[0].name)!=null?o:"",subtitle:t.group,live:!0,time:((s=n==null?void 0:n.matchClock)==null?void 0:s.minute)!=null?`${n.matchClock.minute}'`:""}),e.jsx("div",{style:{padding:"0 4px"},children:e.jsxs(U,{spacing:1.5,columns:"1fr auto 1fr",children:[e.jsx(K,{name:t.homeName,logo:"/assets/img/home/EnVivo/Juventus.png"}),e.jsx(re,{text:((m=(x=n==null?void 0:n.score)==null?void 0:x.home)!=null?m:0)+":"+((b=(v=n==null?void 0:n.score)==null?void 0:v.away)!=null?b:0),name:"En vivo"}),e.jsx(K,{name:t.awayName,logo:"/assets/img/home/EnVivo/Racing.png"})]})})]}),e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((j=l==null?void 0:l.outcomes)!=null?j:[]).map((d,i)=>e.jsx(ae,{text:d.label.toUpperCase()},i))}),e.jsx(U,{spacing:2,children:((c=l==null?void 0:l.outcomes)!=null?c:[]).map((d,i)=>e.jsx(St,{variant:"primary",disabled:d.odds==null||(l==null?void 0:l.cashOutStatus)=="SUSPENDED",onClick:()=>{ce(d.id)},children:d.odds===void 0?"":(d.odds/1e3).toFixed(2)},i))})]})]})})}const Ct="oraculo__OraculoEventDate-module__date___xhIlh",Et={date:Ct};function Ot({text:t}){return e.jsx("div",{className:`oli-font ${Et.date}`,children:t})}const It="oraculo__OraculoEventSemanaCard-module__cardContainer___4JuDe",$t="oraculo__OraculoEventSemanaCard-module__cardBackground___vfalD",Nt="oraculo__OraculoEventSemanaCard-module__jugadas___W8b7H",Z={cardContainer:It,cardBackground:$t,jugadas:Nt};function Oe({event:t}){var a,r,l,o,s,x,m;function n(v){const b=new Date(v),j=b.toLocaleDateString("es-ES",{weekday:"short"}).toUpperCase(),c=b.getDate().toString().padStart(2,"0"),d=(b.getMonth()+1).toString().padStart(2,"0");let i=b.toLocaleTimeString("es-PE",{hour:"numeric",minute:"2-digit",hour12:!0}).toUpperCase();return i=i.replace(/\./g,"").replace(/A\s*M/i,"AM").replace(/P\s*M/i,"PM"),`${j} ${c}/${d} | ${i}`}return e.jsxs("div",{className:Z.cardContainer,children:[e.jsx(je,{title:(a=t.group)!=null?a:""}),e.jsx("div",{className:Z.cardBackground,children:e.jsxs(F.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsxs(F.default,{direction:"column",spacing:1,useFlexGap:!0,children:[e.jsxs(U,{spacing:1,columns:"1fr auto 1fr",children:[e.jsx(K,{name:t.awayName,logo:"/assets/img/home/EventoSemana/Flamengo.png",size:"compact"}),e.jsx(re,{text:"vs.",name:"",size:"small"}),e.jsx(K,{name:t.homeName,logo:"/assets/img/home/EventoSemana/RealMadrid.png",size:"compact"})]}),e.jsx(Ot,{text:n(t.start)})]}),e.jsxs(F.default,{direction:"column",spacing:{xs:.5,md:1},useFlexGap:!0,children:[e.jsx(U,{spacing:1,children:((o=(l=(r=t==null?void 0:t.outcome)==null?void 0:r[0])==null?void 0:l.outcomes)!=null?o:[]).map((v,b)=>e.jsx(ae,{text:v.label.toUpperCase()},b))}),e.jsx("div",{className:Z.jugadas,children:e.jsx(U,{spacing:1,children:((m=(x=(s=t==null?void 0:t.outcome)==null?void 0:s[0])==null?void 0:x.outcomes)!=null?m:[]).map((v,b)=>e.jsx(B,{variant:"primary",fullHeight:!0,onClick:()=>{ce(v.id)},children:(v.odds/1e3).toFixed(2)},b))})})]})]})})]})}function Ie({items:t,title:n="Destacados",iconUrl:a,onViewMore:r,className:l=""}){const o=C.useRef(null),[s,x]=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)},b=()=>{window.location.href="https://www.olimpo.bet/promociones"},j=d=>{if(!d||typeof window=="undefined")return;const f=`https://www.olimpo.bet/promociones/${encodeURIComponent(d)}`;window.location.href=f},c=l||void 0;return e.jsxs("section",{className:c,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:n,iconUrl:a,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:v,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:b,children:"Ver más"})]}),e.jsx(A,{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:()=>j(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:i})=>x({isStart:d,isEnd:i})})]})}const kt=t=>{var c,d,i,f,y,k;if(typeof window=="undefined")return;const n=(d=(c=t.name)!=null?c:t.web_name)!=null?d:"",a=(i=t.provider)!=null?i:"",r=(f=t.machine)!=null?f:"",l=(y=t.external_id)!=null?y:"",o=(k=t.type)!=null?k:"",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/casino?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j};function le({items:t,title:n="Top Juegos",iconUrl:a,onCardClick:r}){const l=C.useMemo(()=>t.map((o,s)=>{var x;return{...o,orden:(x=o.orden)!=null?x:s+1,_originalIndex:s}}).sort((o,s)=>o.orden!=null&&s.orden!=null?o.orden-s.orden:o._originalIndex-s._originalIndex),[t]);return e.jsx("section",{style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:2,useFlexGap:!0,children:[e.jsx(G,{title:n,iconUrl:a,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:l.slice(0,6).map(o=>{var s;return e.jsx(ye,{imageUrl:`https://olimpo.bet${(s=o.logo)!=null?s:""}`,orden:o.orden,onClick:()=>{r?r(o):kt(o)}},o.machine)})})]})})}const Rt=(t,n)=>{var a,r;return(r=(a=t.orden)!=null?a:t.machine)!=null?r:n},Bt=t=>{var c,d,i,f,y,k;if(typeof window=="undefined")return;const n=(d=(c=t.name)!=null?c:t.web_name)!=null?d:"",a=(i=t.provider)!=null?i:"",r=(f=t.machine)!=null?f:"",l=(y=t.external_id)!=null?y:"",o=(k=t.type)!=null?k:"Live",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/casino-en-vivo?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j},$e=({items:t,title:n="Casino en vivo",subtitle:a="Disfruta la emoción en tus juegos favoritos y gana en tiempo real.",backgroundMobileUrl:r="",backgroundDesktopUrl:l="",onCardClick:o,onViewMore:s,className:x})=>e.jsxs(S.default,{className:x,sx:{position:"relative",color:"white",overflow:"hidden"},children:[e.jsx(S.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('${
|
|
4
|
+
url('${r}')
|
|
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('${l}')
|
|
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(
|
|
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(F.default,{spacing:3,sx:{maxWidth:{md:280}},children:[e.jsx(W.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:n}),e.jsx(W.default,{sx:{fontSize:{xs:14,md:18},color:"rgba(255,255,255,0.9)",marginX:{xs:4,md:0},lineHeight:1.5},children:a}),e.jsx(S.default,{sx:{display:{xs:"none",md:"block"}},children:e.jsx(B,{variant:"primary",size:"md",onClick:()=>s==null?void 0:s(),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,v)=>{var b;return e.jsx(we,{logo:`https://olimpo.bet${(b=m.logo)!=null?b:""}`,provider:m.provider,providerName:m.web_name,machine:m.machine,onClick:()=>{o?o(m,v):Bt(m)}},Rt(m,v))})}),e.jsx(S.default,{sx:{display:{xs:"block",md:"none"}},children:e.jsx(B,{variant:"primary",size:"lg",onClick:()=>s==null?void 0:s(),children:"Ver más"})})]})]}),Ne=(t,n)=>{var a,r;return(r=(a=t.orden)!=null?a:t.machine)!=null?r:n},Tt=t=>{var c,d,i,f,y;if(typeof window=="undefined")return;const n=(c=t.name)!=null?c:"",a=(d=t.provider)!=null?d:"",r=(i=t.machine)!=null?i:"",l=(f=t.external_id)!=null?f:"",o=(y=t.type)!=null?y:"Casino",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/casino?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j},Pt=(t,n=!0,a=4)=>{const r=t.map((s,x)=>{var m;return{id:Ne(s,x),imageUrl:(m=s.logo)!=null?m:""}});if(!r.length)return[];const l=[];let o=0;if(n){const s=Math.min(r.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:r.slice(0,s)}),o=s}for(;o<r.length;){const s=Math.min(o+a,r.length);l.push({id:`grid-${o}`,kind:"grid",items:r.slice(o,s)}),o=s}return l},ke=({items:t,title:n="Casino",iconUrl:a="/assets/img/home/Casino/diamante.svg",onItemClick:r,onViewMore:l,mosaicFirst:o=!0,gridSize:s=4})=>{const x=C.useRef(null),[m,v]=C.useState({isStart:!0,isEnd:!1}),b=Pt(t,o,s),j=()=>{var i;(i=x.current)==null||i.prev()},c=()=>{var i;(i=x.current)==null||i.next()},d=()=>{window.location.href="https://www.olimpo.bet/casino"};return e.jsx("section",{children:e.jsxs(F.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(G,{title:n,iconUrl:a,size:"md"}),e.jsxs(S.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(ge.default,{}),onClick:j,disabled:m.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(he.default,{}),onClick:c,disabled:m.isEnd})]}),e.jsx(S.default,{sx:{justifySelf:"end"},children:e.jsx(B,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(A,{ref:x,items:b,perPage:1,gap:"0px",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start"},renderItem:i=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:i.items,layout:i.kind==="mosaic"?"mosaic":"grid",onClick:f=>{const y=t.find((k,O)=>Ne(k,O)===f.id);y&&(r?r(y):Tt(y))}})}),onMove:({isStart:i,isEnd:f})=>v({isStart:i,isEnd:f})})]})})},Re=(t,n)=>{var a,r;return(r=(a=t.orden)!=null?a:t.machine)!=null?r:n},Ft=t=>{var c,d,i,f,y;if(typeof window=="undefined")return;const n=(c=t.name)!=null?c:"",a=(d=t.provider)!=null?d:"",r=(i=t.machine)!=null?i:"",l=(f=t.external_id)!=null?f:"",o=(y=t.type)!=null?y:"Virtuales",s=encodeURIComponent(String(a)),x=encodeURIComponent(String(r)),m=encodeURIComponent(String(n)),v=encodeURIComponent(String(l)),b=encodeURIComponent(String(o)),j=`https://www.olimpo.bet/juegos-virtuales?${x}?provider=${s}&name=${m}&external_id=${v}&type=${b}`;window.location.href=j},Lt=(t,n=!0,a=4)=>{const r=t.map((s,x)=>{var m;return{id:Re(s,x),imageUrl:(m=s.logo)!=null?m:""}});if(!r.length)return[];const l=[];let o=0;if(n){const s=Math.min(r.length,5);l.push({id:"mosaic-0",kind:"mosaic",items:r.slice(0,s)}),o=s}for(;o<r.length;){const s=Math.min(o+a,r.length);l.push({id:`grid-${o}`,kind:"grid",items:r.slice(o,s)}),o=s}return l},Be=({items:t,title:n="Virtuales",iconUrl:a="/assets/img/home/Virtuales/virtuales.svg",onItemClick:r,onViewMore:l,mosaicFirst:o=!0,gridSize:s=4})=>{const x=C.useRef(null),[m,v]=C.useState({isStart:!0,isEnd:!1}),b=Lt(t,o,s),j=()=>{var i;(i=x.current)==null||i.prev()},c=()=>{var i;(i=x.current)==null||i.next()},d=()=>{window.location.href="https://www.olimpo.bet/virtuales"};return e.jsx("section",{children:e.jsxs(F.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(G,{title:n,iconUrl:a,size:"md"}),e.jsxs(S.default,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(ge.default,{}),onClick:j,disabled:m.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(he.default,{}),onClick:c,disabled:m.isEnd})]}),e.jsx(S.default,{sx:{justifySelf:"end"},children:e.jsx(B,{variant:"secondary",onClick:d,children:"Ver más"})})]}),e.jsx(A,{ref:x,items:b,perPage:1,gap:"0",options:{autoWidth:!0,gap:"12px",trimSpace:!1,pagination:!1,arrows:!1,drag:!0,focus:"start",perMove:1},renderItem:i=>e.jsx("div",{style:{alignSelf:"start"},children:e.jsx(ie,{items:i.items,layout:i.kind==="mosaic"?"mosaic":"grid",onClick:f=>{const y=t.find((k,O)=>Re(k,O)===f.id);y&&(r?r(y):Ft(y))}})}),onMove:({isStart:i,isEnd:f})=>v({isStart:i,isEnd:f})})]})})},Mt=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"}),
|
|
15
|
+
`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"}),ue={textAlign:"center",lineHeight:1.1,mb:1.5},pe={display:"inline-block",fontWeight:600,fontSize:24},me={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:n,backgroundImageUrl:a})=>{const l=t,o=r,s=qe.default("(max-width: 767px)"),p=n.length>1,m=a!=null?a:"",b=Nt(m),h=E.useRef(null),[y,i]=E.useState({isStart:!0,isEnd:!1}),[d,c]=E.useState(0);return s?e.jsxs(S.default,{component:"section",sx:{...b,textAlign:"center"},children:[(l||o)&&e.jsxs(S.default,{sx:ce,children:[l&&e.jsx(z.default,{component:"span",sx:le,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(z.default,{component:"span",sx:de,children:o})]})]}),e.jsxs(S.default,{children:[e.jsx(A,{ref:h,items:n,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(te,{...u,onButtonClick:n[0].onButtonClick}),onMove:({index:u,isStart:j,isEnd:I})=>{i({isStart:j,isEnd:I}),c(u)}}),p&&e.jsx(oe,{total:n.length,active:d,onSelect:u=>{var j;c(u),(j=h.current)==null||j.go(u)}})]})]}):e.jsx(S.default,{component:"section",sx:b,children:e.jsxs(S.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(l||o)&&e.jsx(S.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(S.default,{sx:{...ce,textAlign:"left",mb:0},children:[l&&e.jsx(z.default,{component:"span",sx:le,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(z.default,{component:"span",sx:de,children:o})]})]})}),e.jsx(S.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:n.map((u,j)=>e.jsx(te,{onButtonClick:u.onButtonClick,...u},j))})]})})},Re=({className:t="",fullBleed:r=!0,items:n,selectedIndex:a=0,ariaLabel:l})=>{const o=E.useRef(null),s=E.useRef(null);if(!n)return null;const p=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=Array.isArray(n)?n[a]:n;E.useLayoutEffect(()=>{if(!o.current||!s.current||typeof ResizeObserver=="undefined")return;const h=o.current,y=s.current,i=()=>{h.style.setProperty("--orc-co-bottomH",`${y.offsetHeight+16}px`)},d=new ResizeObserver(i);return d.observe(y),i(),()=>d.disconnect()},[]);const b=["orc-co-wrap",r?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:b,"aria-label":l||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:s,children:e.jsx(ye,{text:m.text,onClick:p,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Rt="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",Tt={controls:Rt};function Te({items:t,title:r="Combinadas del Olimpo",iconUrl:n,onViewMore:a,className:l=""}){const o=E.useRef(null),[s,p]=E.useState({isStart:!0,isEnd:!1}),[m,b]=E.useState([]),h=()=>{var w;(w=o.current)==null||w.prev()},y=()=>{var w;(w=o.current)==null||w.next(),console.log("items: ",t)},i=()=>{a==null||a()};function d(w,N,T){const O=[];for(const $ of T){const x=u([$]),f=N.reduce((g,v)=>{g[v.eventId]||(g[v.eventId]=[]);const C=v.outcomes.filter(k=>x.has(k.id));return C.length>0&&g[v.eventId].push({...v,outcomes:C}),g},{}),_=c($);w.forEach(g=>{if(g.id!==$.prePackCouponRows[0].eventId)return;const v=x;let C=null;for(const k of _)if([...k.requiredOutcomeIds].every(B=>v.has(B))){C=k.decimal;break}O.push({...g,combinadoTotal:C,betoffers:f[g.id]||[],couponId:$.id})})}return O}function c(w){var T;const N=[];for(const O of w.prePackCouponRows)if(O.type==="BET_BUILDER"&&((T=O.group)!=null&&T.groups)){const $=new Set;O.group.groups.forEach(x=>{var f;(f=x.outcomes)==null||f.forEach(_=>$.add(_.id))}),N.push({requiredOutcomeIds:$,decimal:O.odds.decimal})}return N}function u(w){var T;const N=new Set;for(const O of w)for(const $ of O.prePackCouponRows)$.type==="BET_BUILDER"&&((T=$.group)!=null&&T.groups)&&$.group.groups.forEach(x=>{var f;(f=x.outcomes)==null||f.forEach(_=>N.add(_.id))}),$.type==="SIMPLE"&&$.outcome&&N.add($.outcome.id);return N}async function j(){var w,N,T;try{const O=(T=(N=(w=t==null?void 0:t.group)==null?void 0:w.groups)==null?void 0:N[0])==null?void 0:T.id;if(!O){console.error("Could not extract group ID");return}const $=`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`,f=await(await fetch($)).json();b(d(f.events,f.betOffers,f.prePackCoupons))}catch(O){console.error("loadDataEventSpecial error:",O)}}E.useEffect(()=>{t&&j()},[t]);const I=l||void 0;return e.jsx("section",{className:I,style:{width:"100%"},children:e.jsxs(M.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(L,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(W,{title:r,iconUrl:n,size:"md"}),e.jsxs("div",{className:Tt.controls,children:[e.jsxs(L,{spacing:1,columns:"auto auto",children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:h,disabled:s.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:y,disabled:s.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:i,children:"Ver más"})]})]}),e.jsx(A,{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(_e,{event:w}),onMove:({isStart:w,isEnd:N})=>p({isStart:w,isEnd:N})})]})})}function Pe({items:t,title:r="En vivo",iconUrl:n,onViewMore:a,className:l=""}){var i,d;console.log("wefwef",t);const o=E.useRef(null),[s,p]=E.useState({isStart:!0,isEnd:!1}),m=()=>{var c;(c=o.current)==null||c.prev()},b=()=>{var c;(c=o.current)==null||c.next(),console.log("items: ",t)},h=()=>{a==null||a()},y=l||void 0;return e.jsxs("section",{className:y,style:{width:"100%"},children:[e.jsxs(L,{spacing:1.5,columns:"1fr auto auto",justify:"start",children:[e.jsx(W,{title:r,iconUrl:n,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx(R,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(R,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:b,disabled:s.isEnd})]}),e.jsx(R,{variant:"secondary",onClick:h,children:"Ver más"})]}),e.jsx(A,{ref:o,items:(d=(i=t==null?void 0:t.events)==null?void 0:i.filter(c=>c.event.sport==="FOOTBALL").sort((c,u)=>new Date(u.event.start).getTime()-new Date(c.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:c=>e.jsx(Se,{...c}),onMove:({isStart:c,isEnd:u})=>p({isStart:c,isEnd:u})})]})}const Pt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Ft="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",Bt="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",Q={wrapper:Pt,container:Ft,buttonWrapper:Bt};function Fe({items:t,title:r="En vivo",iconUrl:n,onViewMore:a,className:l=""}){const o=new Date;o.toISOString();const s=new Date(o);s.setDate(s.getDate()+7),s.toISOString();const p=E.useRef(null),[m,b]=E.useState({isStart:!0,isEnd:!1}),[h,y]=E.useState([]),i=()=>{a==null||a()};async function d(){try{const I=t.events.map(O=>{var $;return($=O.event)==null?void 0:$.id}),w=I.map(O=>`id=${O}`).join("&"),T=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/betoffer/selected/combined_layout/event/${I[0]}?${w}&lang=es_PE&market=PE`;c(T)}catch(I){console.error(I)}}async function c(I){try{const N=await(await fetch(I)).json(),T=N.events.map($=>$.event),O=N.events.flatMap($=>$.betOffers||[]);y(u(T,O))}catch(w){console.error(w)}}function u(I,w){const T=w.filter(O=>{var $;return(($=O.betOfferType)==null?void 0:$.id)===2}).reduce((O,$)=>(O[$.eventId]||(O[$.eventId]=[]),O[$.eventId].push($),O),{});return I.filter(O=>T[O.id]).map(O=>({...O,outcome:T[O.id]}))}E.useEffect(()=>{t&&t.events.length>0&&d()},[t]);const j=l||void 0;return e.jsx("section",{className:j,style:{width:"100%"},children:e.jsxs("div",{className:Q.wrapper,children:[e.jsx("div",{className:Q.container,children:e.jsxs(M.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(W,{title:"Eventos de la semana"}),e.jsx("div",{className:Q.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(A,{ref:p,items:h,perPage:3.5,gap:"16px",options:{autoWidth:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:I=>e.jsx(we,{event:I}),onMove:({isStart:I,isEnd:w})=>b({isStart:I,isEnd:w})})})]})})}const Mt=[{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"}],Z=t=>`${window.location.origin}${t}`,Ut=[{id:1,label:"APUESTAS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon1.svg",onclick:()=>Z("https://www.olimpo.bet/#home")},{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:()=>Z("https://www.olimpo.bet/casino")},{id:4,label:"MISIONES",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon4.svg",onclick:()=>Z("https://www.olimpo.bet/misiones")}];function Be({backgrounds:t=Mt,items:r=Ut}){const[n,a]=E.useState(0),l=t.length||1;return e.jsxs(P.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(P.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(A,{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 s;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:(s=o.fallbackSrc)!=null?s: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",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(P.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(oe,{total:l,active:n})})]}),e.jsx(P.Box,{sx:{position:"absolute",bottom:{xs:10,sm:10},left:"50%",transform:"translateX(-50%)",width:{xs:"92%",sm:"88%",md:"80%"},maxWidth:900,backgroundColor:"#363636",borderRadius:2,py:{xs:.8,md:1.2},px:{xs:1.5,md:2},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",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:o.onclick?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var s;return(s=o.onclick)==null?void 0:s.call(o)},children:[o.icon&&e.jsx(P.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(P.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:o.label})]},o.id))})]})}const Lt=[[{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 Me({title:t="Medios de pago",rows:r=Lt}){const n=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,l)=>e.jsx(P.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:a.map(o=>e.jsx(ee,{...o},`${o.src}-${o.alt}`))},l))}),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:n.map(a=>e.jsx(ee,{...a},`${a.src}-${a.alt}`))})]})}const zt={OraculoSeccionDestacados:Ce,OraculoSeccionTopJuegos:re,OraculoSeccionCasinoEnVivo:Ee,OraculoSeccionCasino:Ie,OraculoSeccionVirtuales:ke,OraculoSeccionClubOlimpo:Re,OraculoSeccionBonoBienvenida:Ne,OraculoSeccionBanners:Be,OraculoSeccionMediosPago:Me,OraculoSeccionEventoEnVivo:Pe,OraculoSeccionEventoSemana:Fe,OraculoSeccionEventoCombinadas:Te},Wt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,At=t=>/^OraculoSeccion[A-Z]/.test(t),Gt=Object.fromEntries(Object.entries(zt).filter(([t,r])=>At(t)&&Wt(r)));class ue extends Error{constructor(r,n,a){super(`HTTP ${r} ${a}`),this.status=r,this.url=n,this.statusText=a,this.name="HttpError"}}const Ue=({sectionsOverride:t,docId:r="home",db:n})=>{const[a,l]=E.useState([]),[o,s]=E.useState(!1),[p,m]=E.useState({}),[b,h]=E.useState({}),[y,i]=E.useState({});E.useEffect(()=>{if(t||!n)return;s(!0);const x=ie.onSnapshot(ie.doc(n,"landings",r),f=>{var _;try{let g=f.exists()?((_=f.data())==null?void 0:_.sections)||[]:[];g=g.slice().sort((v,C)=>{var k,F;return((k=v.order)!=null?k:0)-((F=C.order)!=null?F:0)}).map((v,C)=>({...v,order:C+1})),l(g),console.log("fetched: ",g)}catch(g){console.error("Error procesando landings/"+r,g)}finally{s(!1)}},f=>{console.error("Error escuchando landings/"+r,f),s(!1)});return()=>x()},[t,r,n]),E.useEffect(()=>{(t?t.slice():a.slice()).map(_=>_.componentKey).filter(_=>!!_).length},[t,a]);const d=async x=>{const f=(x.apiUrl||"").trim();if(!f)return;const _=x.apiMethod||"GET",g=x.apiParams||[];let v=f,C,k;if(_==="GET"){const B=new URL(f,typeof window=="undefined"?"http://localhost":window.location.origin);for(const U of g)U.key&&B.searchParams.append(U.key,U.value);v=B.toString()}else{const B=new URLSearchParams;for(const U of g)U.key&&B.append(U.key,U.value);C=B.toString(),k={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const F=await fetch(v,{method:_,headers:k,body:C});if(!F.ok)throw new ue(F.status,v,F.statusText);return F.json()},c=E.useMemo(()=>t?t.slice():a.slice(),[t,a]),u=He.default.useRef(new Set);E.useEffect(()=>{const x=c.map(f=>({s:f,url:(f.apiUrl||"").trim()})).filter(({url:f})=>!!f);if(x.length)for(const{s:f,url:_}of x){const g=`${f.id}|${_}`;u.current.has(g)||(u.current.add(g),h(v=>({...v,[f.id]:!0})),i(v=>({...v,[f.id]:""})),(async()=>{try{const v=await d(f);m(C=>({...C,[f.id]:v}))}catch(v){let C="Error desconocido";v instanceof ue?C=`Error HTTP ${v.status} (${v.statusText}) en ${v.url}`:v instanceof SyntaxError?C="Respuesta no es JSON válido":v instanceof TypeError?C="Fallo de red / CORS / conexión":typeof v=="string"&&(C=v.toString()),i(k=>({...k,[f.id]:C}))}finally{h(v=>({...v,[f.id]:!1}))}})())}},[c]);const j=E.useMemo(()=>c.filter(x=>x.visible).sort((x,f)=>x.order-f.order),[c]),I=x=>Array.isArray(x)?x.map(f=>{const _={};for(const g of f.fields||[]){const v=(g.type||"string").toLowerCase();if(v==="number"){const C=String(g.value||"").trim();if(C!==""){const k=Number(C);Number.isNaN(k)||(_[g.name]=k)}}else if(v==="boolean")_[g.name]=String(g.value).toLowerCase()==="true";else if(v==="function"){const C=String(g.value||"").trim();if(C)try{const k=new Function(C);_[g.name]=k}catch(k){console.error(`❌ Error creando función en item '${g.name}':`,k)}}else _[g.name]=g.value}return _}):[],w=x=>{const f={};if(!Array.isArray(x))return f;for(const _ of x){if(!_.name)continue;const g=(_.type||"string").toLowerCase();if(g==="number"){const v=String(_.value||"").trim();if(v!==""){const C=Number(v);Number.isNaN(C)||(f[_.name]=C)}}else if(g==="boolean")f[_.name]=String(_.value).toLowerCase()==="true";else if(g==="function"){const v=String(_.value||"").trim();if(v)try{const C=new Function(v);f[_.name]=C}catch(C){console.error(`❌ Error creando función en item '${_.name}':`,C)}}else f[_.name]=_.value}return f},N=(x,f,_)=>{const g=_?{..._}:{};if(f){const U=(f.variableName||"items").trim()||"items";return g[U]=f.arr||[],g}const v=x,C=Array.isArray(v),k=!C&&typeof v=="object"&&v!==null?v:void 0,F=k&&Array.isArray(k.lobby||k.items)?k.lobby||k.items:void 0,B=U=>C?v:F||U;return g.items=B(F||[]),g},T=x=>{var C;const f=!!((C=x.apiUrl)!=null&&C.trim()),_=f?p[x.id]:void 0;let g=x.props?{...x.props}:{};const v=w(x.manualScalarFields);if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(x.componentKey))return console.log(_),{items:_,...g,...v};if(g={...g,...v},f)g=N(_,null,g);else if(x.dataMode==="manual"){const k=I(x.manualItems);if(g=N(null,{arr:k,variableName:x.variableName},g),x.variableName2&&x.manualItems2){const F=I(x.manualItems2),B=(x.variableName2||"items2").trim()||"items2";g[B]=F}}return g},O=(x,f,_)=>{const g={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 ${g[f]}`,children:_},x)},$=x=>{var B;const f=x.componentKey,_=Gt[f];if(!_)return console.warn(`No hay componente registrado para "${f}"`),O(x.id,"component",`Componente "${f}" no encontrado`);const g=!!((B=x.apiUrl)!=null&&B.trim()),v=g?p[x.id]:void 0,C=g?!!b[x.id]:!1,k=g?y[x.id]:"";if(g){if(C&&!v)return O(x.id,"loading",`Cargando datos desde ${x.apiUrl}...`);if(k&&!v)return O(x.id,"error",`Error cargando ${x.apiUrl}: ${k}`)}const F=T(x);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(_,{...F})},x.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:j.map($)})})};exports.OraculoButton=R;exports.OraculoCarousel=A;exports.OraculoCarouselDots=oe;exports.OraculoClubOlimpoVisual=ye;exports.OraculoEventCombinadasCard=_e;exports.OraculoEventEnVivoCard=Se;exports.OraculoEventHeader=he;exports.OraculoEventLabel=ne;exports.OraculoEventLeague=ve;exports.OraculoEventScore=se;exports.OraculoEventSemanaCard=we;exports.OraculoEventStatus=ge;exports.OraculoEventStatusBadge=fe;exports.OraculoEventTeamInfo=X;exports.OraculoGameCard=V;exports.OraculoGameRankCard=be;exports.OraculoGameSlide=ae;exports.OraculoGridGroup=L;exports.OraculoLiveCasinoCard=je;exports.OraculoLogoMediosPago=ee;exports.OraculoPageLandingPreview=Ue;exports.OraculoSeccionBanners=Be;exports.OraculoSeccionBonoBienvenida=Ne;exports.OraculoSeccionCasino=Ie;exports.OraculoSeccionCasinoEnVivo=Ee;exports.OraculoSeccionClubOlimpo=Re;exports.OraculoSeccionDestacados=Ce;exports.OraculoSeccionEventoCombinadas=Te;exports.OraculoSeccionEventoEnVivo=Pe;exports.OraculoSeccionEventoSemana=Fe;exports.OraculoSeccionMediosPago=Me;exports.OraculoSeccionTopJuegos=re;exports.OraculoSeccionVirtuales=ke;exports.OraculoSectionTitle=W;exports.OraculoTopJuegoItem=re;exports.OraculoWelcomeBanner=te;exports.default=Ue;
|
|
19
|
+
`},Te=({headline:t,headline2:n,items:a,backgroundImageUrl:r})=>{const l=t,o=n,s=Ke.default("(max-width: 767px)"),x=a.length>1,m=r!=null?r:"",v=Mt(m),b=C.useRef(null),[j,c]=C.useState({isStart:!0,isEnd:!1}),[d,i]=C.useState(0);return s?e.jsxs(S.default,{component:"section",sx:{...v,textAlign:"center"},children:[(l||o)&&e.jsxs(S.default,{sx:ue,children:[l&&e.jsx(W.default,{component:"span",sx:pe,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W.default,{component:"span",sx:me,children:o})]})]}),e.jsxs(S.default,{children:[e.jsx(A,{ref:b,items:a,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:f=>e.jsx(ne,{...f,onButtonClick:a[0].onButtonClick}),onMove:({index:f,isStart:y,isEnd:k})=>{c({isStart:y,isEnd:k}),i(f)}}),x&&e.jsx(se,{total:a.length,active:d,onSelect:f=>{var y;i(f),(y=b.current)==null||y.go(f)}})]})]}):e.jsx(S.default,{component:"section",sx:v,children:e.jsxs(S.default,{sx:{maxWidth:1200,mx:5,px:2,display:"grid",gridTemplateColumns:"200px auto",alignItems:"center"},children:[(l||o)&&e.jsx(S.default,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",minHeight:"100%"},children:e.jsxs(S.default,{sx:{...ue,textAlign:"left",mb:0},children:[l&&e.jsx(W.default,{component:"span",sx:pe,children:l}),o&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W.default,{component:"span",sx:me,children:o})]})]})}),e.jsx(S.default,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flexWrap:"nowrap",gap:4},children:a.map((f,y)=>e.jsx(ne,{onButtonClick:f.onButtonClick,...f},y))})]})})},Pe=({className:t="",fullBleed:n=!0,items:a,selectedIndex:r=0,ariaLabel:l})=>{const o=C.useRef(null),s=C.useRef(null);if(!a)return null;const x=()=>{window.location.href="https://www.olimpo.bet/conoce-club-olimpo"},m=Array.isArray(a)?a[r]:a;C.useLayoutEffect(()=>{if(!o.current||!s.current||typeof ResizeObserver=="undefined")return;const b=o.current,j=s.current,c=()=>{b.style.setProperty("--orc-co-bottomH",`${j.offsetHeight+16}px`)},d=new ResizeObserver(c);return d.observe(j),c(),()=>d.disconnect()},[]);const v=["orc-co-wrap",n?"orc-co-fullBleed":"",t].filter(Boolean).join(" ");return e.jsx("section",{ref:o,className:v,"aria-label":l||m.imgAlt||"Club Olimpo",children:e.jsx("div",{ref:s,children:e.jsx(Se,{text:m.text,onClick:x,imgAlt:m.imgAlt,imgSrcMobile:m.imgMobile,imgSrcDesktopBg:m.imgDesktopBg,imgSrcDesktopLogo:m.imgDesktopLogo})})})},Ut="oraculo__OraculoSeccionEventoCombinadas-module__controls___Zsta4",zt={controls:Ut};function Fe({items:t,title:n="Combinadas del Olimpo",iconUrl:a="https://stg-www.contodobet.com/static/img/landing/EventoCombinada/rayoIcon.svg",onViewMore:r,className:l=""}){const o=C.useRef(null),[s,x]=C.useState({isStart:!0,isEnd:!1}),[m,v]=C.useState([]),b=()=>{var O;(O=o.current)==null||O.prev()},j=()=>{var O;(O=o.current)==null||O.next(),console.log("items: ",t)},c=()=>{r==null||r()};function d(O,R,$){const E=[];for(const I of $){const p=f([I]),u=R.reduce((g,_)=>{g[_.eventId]||(g[_.eventId]=[]);const w=_.outcomes.filter(N=>p.has(N.id));return w.length>0&&g[_.eventId].push({..._,outcomes:w}),g},{}),h=i(I);O.forEach(g=>{if(g.id!==I.prePackCouponRows[0].eventId)return;const _=p;let w=null;for(const N of h)if([...N.requiredOutcomeIds].every(L=>_.has(L))){w=N.decimal;break}E.push({...g,combinadoTotal:w,betoffers:u[g.id]||[],couponId:I.id})})}return E}function i(O){var $;const R=[];for(const E of O.prePackCouponRows)if(E.type==="BET_BUILDER"&&(($=E.group)!=null&&$.groups)){const I=new Set;E.group.groups.forEach(p=>{var u;(u=p.outcomes)==null||u.forEach(h=>I.add(h.id))}),R.push({requiredOutcomeIds:I,decimal:E.odds.decimal})}return R}function f(O){var $;const R=new Set;for(const E of O)for(const I of E.prePackCouponRows)I.type==="BET_BUILDER"&&(($=I.group)!=null&&$.groups)&&I.group.groups.forEach(p=>{var u;(u=p.outcomes)==null||u.forEach(h=>R.add(h.id))}),I.type==="SIMPLE"&&I.outcome&&R.add(I.outcome.id);return R}async function y(){var O,R,$;try{const E=($=(R=(O=t==null?void 0:t.group)==null?void 0:O.groups)==null?void 0:R[0])==null?void 0:$.id;if(!E){console.log("Could not extract group ID");return}const I=`https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/prepackcoupon/eventgroup/${E}.json?lang=es_PE&market=PE&client_id=200&channel_id=1&ncid=1764283566783&prePackCouponTags=CUSTOM`,u=await(await fetch(I)).json();v(d(u.events,u.betOffers,u.prePackCoupons))}catch(E){console.error("loadDataEventSpecial error:",E)}}C.useEffect(()=>{t&&y()},[t]);const k=l||void 0;return!m||m.length===0?null:e.jsx("section",{className:k,style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:a,size:"md"}),e.jsxs("div",{className:zt.controls,children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:b,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:j,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:c,children:"Ver más"})]})]}),e.jsx(A,{ref:o,items:m,perPage:3.72,gap:"16px",options:{autoWidth:!0,trimSpace:!0},useIndexAsKey:!0,breakpoints:{768:{perPage:1.2,gap:"12px",padding:{left:"0px",right:"0px"}}},renderItem:O=>e.jsx(Ce,{event:O}),onMove:({isStart:O,isEnd:R})=>x({isStart:O,isEnd:R})})]})})}function Le({items:t,title:n="En vivo",iconUrl:a="https://stg-www.contodobet.com/static/img/landing/EventoEnVivo/icon.svg",onViewMore:r,className:l=""}){var c,d;const o=C.useRef(null),[s,x]=C.useState({isStart:!0,isEnd:!1}),m=()=>{var i;(i=o.current)==null||i.prev()},v=()=>{var i;(i=o.current)==null||i.next(),console.log("items: ",t)},b=()=>{r==null||r()},j=l||void 0;return e.jsx("section",{className:j,style:{width:"100%"},children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsxs(U,{spacing:1.5,columns:"1fr auto ",justify:"start",children:[e.jsx(G,{title:n,iconUrl:a,size:"md"}),e.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[e.jsxs(U,{spacing:1,columns:"auto auto",children:[e.jsx(B,{ariaLabel:"Anterior",variant:"secondary",iconOnly:!0,leftIcon:e.jsx(q.ChevronLeftRounded,{}),onClick:m,disabled:s.isStart}),e.jsx(B,{ariaLabel:"Siguiente",variant:"secondary",iconOnly:!0,rightIcon:e.jsx(q.ChevronRightRounded,{}),onClick:v,disabled:s.isEnd})]}),e.jsx(B,{variant:"secondary",onClick:b,children:"Ver más"})]})]}),e.jsx(A,{ref:o,items:(d=(c=t==null?void 0:t.events)==null?void 0:c.filter(i=>i.event.sport==="FOOTBALL").sort((i,f)=>new Date(f.event.start).getTime()-new Date(i.event.start).getTime()))!=null?d:[],perPage:void 0,gap:"16px",options:{autoWidth:!0,trimSpace:"move"},breakpoints:{768:{gap:"8px",focus:"center"},1024:{gap:"10px",focus:"center"}},renderItem:i=>e.jsx(Ee,{...i}),onMove:({isStart:i,isEnd:f})=>x({isStart:i,isEnd:f})})]})})}const Wt="oraculo__OraculoSeccionEventoSemana-module__wrapper___eqVq-",Gt="oraculo__OraculoSeccionEventoSemana-module__container___5yFQs",At="oraculo__OraculoSeccionEventoSemana-module__buttonWrapper___-6IDT",ee={wrapper:Wt,container:Gt,buttonWrapper:At};function Me({items:t,title:n="En vivo",iconUrl:a,onViewMore:r,className:l=""}){const o=new Date;o.toISOString();const s=new Date(o);s.setDate(s.getDate()+7),s.toISOString();const x="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/group.json?channel_id=1&client_id=200&lang=es_PE&market=PE",m=C.useRef(null),[v,b]=C.useState({isStart:!0,isEnd:!1}),[j,c]=C.useState([]);function d($){return[...$].sort((E,I)=>new Date(E.start).getTime()-new Date(I.start).getTime())}function i($){const E=new Date,I=new Date(E.getTime()+10080*60*1e3);return $.filter(p=>{if(!p.start)return!1;const u=new Date(p.start);return u>=E&&u<=I})}const f=()=>{r==null||r()};async function y(){try{const I=(await(await fetch(x)).json()).group.groups.find(_=>_.englishName==="Football");if(!I||!Array.isArray(I.groups)){console.error("Football groups not found");return}const u=I.groups.slice(0,4);console.log("First Football groups:",u);const h=_=>{const w="https://us1.offering-api.kambicdn.com/offering/v2018/nexuspe/listView/football";if(_.groups&&_.groups.length>0){const N=_.groups[0];return[`${w}/${_.termKey}/${N.termKey}/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]}return[`${w}/${_.termKey}/all/all/matches.json?channel_id=1&channel_id=1&client_id=200&client_id=200&competitionId=undefined&lang=es_PE&lang=es_PE&market=PE&market=PE&useCombined=true&useCombinedLive=true`]},g=u.flatMap(h);k(g)}catch($){console.error($)}}async function k($){try{const E=await Promise.all($.map(h=>fetch(h).then(g=>g.json())));let I=[],p=[];E.forEach(h=>{h.events&&(I.push(...h.events.map(g=>g.event)),p.push(...h.events.flatMap(g=>g.betOffers||[])))});const u=O(I,p);c(d(i(u)))}catch(E){console.error("Error loading events:",E)}}function O($,E){const p=E.filter(u=>{var h;return((h=u.betOfferType)==null?void 0:h.id)===2}).reduce((u,h)=>(u[h.eventId]||(u[h.eventId]=[]),u[h.eventId].push(h),u),{});return $.filter(u=>p[u.id]).map(u=>({...u,outcome:p[u.id]}))}C.useEffect(()=>{t&&t.events.length>0&&y()},[t]);const R=l||void 0;return e.jsx("section",{className:R,style:{width:"100%"},children:e.jsxs("div",{className:ee.wrapper,children:[e.jsx("div",{className:ee.container,children:e.jsxs(F.default,{direction:"column",spacing:1.5,useFlexGap:!0,children:[e.jsx(G,{title:"Eventos de la semana"}),e.jsx("div",{className:ee.buttonWrapper,children:e.jsx(B,{variant:"secondary",size:"lg",fullWidth:!0,onClick:()=>{f()},children:"Ver más"})})]})}),e.jsx("div",{style:{minWidth:0},children:e.jsx(A,{ref:m,items:j,perPage:3.5,gap:"16px",options:{autoWidth:!0,trimSpace:!0},breakpoints:{1024:{perPage:1.4,gap:"8px",focus:"center",padding:{left:"8px",right:"8px"}}},renderItem:$=>e.jsx(Oe,{event:$}),onMove:({isStart:$,isEnd:E})=>b({isStart:$,isEnd:E})})})]})})}const Dt=[{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"}],te=t=>`${window.location.origin}${t}`,Ht=[{id:1,label:"APUESTAS",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon1.svg",onclick:()=>te("https://www.olimpo.bet/#home")},{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:()=>te("https://www.olimpo.bet/casino")},{id:4,label:"MISIONES",icon:"https://stg-www.contodobet.com/static/img/landing/Banner/icon4.svg",onclick:()=>te("https://www.olimpo.bet/misiones")}];function Ue({backgrounds:t=Dt,items:n=Ht}){const[a,r]=C.useState(0),l=(t==null?void 0:t.length)||1;return e.jsxs(T.Box,{component:"section",sx:{position:"relative",overflow:"visible"},children:[e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420},borderRadius:0,overflow:"hidden"},children:[e.jsx(A,{items:t,perPage:1,gap:"0px",options:{type:"loop",pagination:!1,arrows:!1,drag:!0,focus:"center"},onMove:({index:o})=>r(o),renderItem:o=>{var s;return e.jsxs(T.Box,{sx:{position:"relative",height:{xs:300,sm:360,md:420}},children:[e.jsxs(T.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(T.Box,{component:"img",src:(s=o.fallbackSrc)!=null?s:o.desktopSrc,alt:"","aria-hidden":!0,loading:"lazy",sx:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})]}),e.jsx(T.Box,{sx:{position:"absolute",inset:0,pointerEvents:"none","&::before":{content:'""',position:"absolute",left:0,right:0,bottom:0,top:"40%",background:"linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(18,18,18,0.85) 80%, #121212 100%)"}}})]})}}),e.jsx(T.Box,{sx:{position:"absolute",left:0,right:0,bottom:72,display:"flex",justifyContent:"center",zIndex:2},children:e.jsx(se,{total:l,active:a})})]}),e.jsx(T.Box,{sx:{position:"absolute",bottom:{xs:10,sm:10},left:"50%",transform:"translateX(-50%)",width:{xs:"92%",sm:"88%",md:"80%"},maxWidth:900,backgroundColor:"#363636",borderRadius:2,py:{xs:.8,md:1.2},px:{xs:1.5,md:2},display:"flex",justifyContent:"space-around",alignItems:"center",boxShadow:"0 10px 24px rgba(0,0,0,.35)",zIndex:3},children:n==null?void 0:n.map(o=>e.jsxs(T.Box,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:"center",justifyContent:"center",gap:{xs:.5,md:1},color:"#FFFFFF",minWidth:0,cursor:o.onclick?"pointer":"default",whiteSpace:"nowrap"},onClick:()=>{var s;return(s=o.onclick)==null?void 0:s.call(o)},children:[o.icon&&e.jsx(T.Box,{component:"img",src:o.icon,alt:o.label||`icon-${o.id}`,sx:{width:{xs:20,sm:22,md:24},height:{xs:20,sm:22,md:24},objectFit:"contain"}}),e.jsx(T.Typography,{sx:{fontSize:{xs:10,sm:11,md:12},fontWeight:600,color:"#E0E0E0",textAlign:"center"},children:o.label})]},o.id))})]})}const Vt=[[{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 ze({title:t="Medios de pago",rows:n=Vt}){const a=n.flat();return e.jsxs(T.Box,{component:"section","aria-labelledby":"mp-title",sx:{color:"#fff"},children:[e.jsx(T.Typography,{id:"mp-title",variant:"h6",sx:{fontWeight:800,fontSize:{xs:20,md:32},textAlign:"center",mb:1.5},children:t}),e.jsx(T.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(T.Box,{sx:{display:{xs:"block",md:"none"}},children:n.map((r,l)=>e.jsx(T.Stack,{direction:"row",justifyContent:"center",alignItems:"center",gap:2.5,flexWrap:"wrap",children:r.map(o=>e.jsx(oe,{...o},`${o.src}-${o.alt}`))},l))}),e.jsx(T.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:a.map(r=>e.jsx(oe,{...r},`${r.src}-${r.alt}`))})]})}const qt={OraculoSeccionDestacados:Ie,OraculoSeccionTopJuegos:le,OraculoSeccionCasinoEnVivo:$e,OraculoSeccionCasino:ke,OraculoSeccionVirtuales:Be,OraculoSeccionClubOlimpo:Pe,OraculoSeccionBonoBienvenida:Te,OraculoSeccionBanners:Ue,OraculoSeccionMediosPago:ze,OraculoSeccionEventoEnVivo:Le,OraculoSeccionEventoSemana:Me,OraculoSeccionEventoCombinadas:Fe},Jt=t=>typeof t=="function"||t&&typeof t=="object"&&"$$typeof"in t,Kt=t=>/^OraculoSeccion[A-Z]/.test(t),Xt=Object.fromEntries(Object.entries(qt).filter(([t,n])=>Kt(t)&&Jt(n)));class xe extends Error{constructor(n,a,r){super(`HTTP ${n} ${r}`),this.status=n,this.url=a,this.statusText=r,this.name="HttpError"}}const We=({sectionsOverride:t,docId:n="home",db:a})=>{const[r,l]=C.useState([]),[o,s]=C.useState(!1),[x,m]=C.useState({}),[v,b]=C.useState({}),[j,c]=C.useState({});C.useEffect(()=>{if(t||!a)return;s(!0);const p=de.onSnapshot(de.doc(a,"landings",n),u=>{var h;try{let g=u.exists()?((h=u.data())==null?void 0:h.sections)||[]:[];g=g.slice().sort((_,w)=>{var N,P;return((N=_.order)!=null?N:0)-((P=w.order)!=null?P:0)}).map((_,w)=>({..._,order:w+1})),l(g),console.log("fetched: ",g)}catch(g){console.error("Error procesando landings/"+n,g)}finally{s(!1)}},u=>{console.error("Error escuchando landings/"+n,u),s(!1)});return()=>p()},[t,n,a]),C.useEffect(()=>{(t?t.slice():r.slice()).map(h=>h.componentKey).filter(h=>!!h).length},[t,r]);const d=async p=>{const u=(p.apiUrl||"").trim();if(!u)return;const h=p.apiMethod||"GET",g=p.apiParams||[];let _=u,w,N;if(h==="GET"){const L=new URL(u,typeof window=="undefined"?"http://localhost":window.location.origin);for(const M of g)M.key&&L.searchParams.append(M.key,M.value);_=L.toString()}else{const L=new URLSearchParams;for(const M of g)M.key&&L.append(M.key,M.value);w=L.toString(),N={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}const P=await fetch(_,{method:h,headers:N,body:w});if(!P.ok)throw new xe(P.status,_,P.statusText);return P.json()},i=C.useMemo(()=>t?t.slice():r.slice(),[t,r]),f=Je.default.useRef(new Set);C.useEffect(()=>{const p=i.map(u=>({s:u,url:(u.apiUrl||"").trim()})).filter(({url:u})=>!!u);if(p.length)for(const{s:u,url:h}of p){const g=`${u.id}|${h}`;f.current.has(g)||(f.current.add(g),b(_=>({..._,[u.id]:!0})),c(_=>({..._,[u.id]:""})),(async()=>{try{const _=await d(u);m(w=>({...w,[u.id]:_}))}catch(_){let w="Error desconocido";_ instanceof xe?w=`Error HTTP ${_.status} (${_.statusText}) en ${_.url}`:_ instanceof SyntaxError?w="Respuesta no es JSON válido":_ instanceof TypeError?w="Fallo de red / CORS / conexión":typeof _=="string"&&(w=_.toString()),c(N=>({...N,[u.id]:w}))}finally{b(_=>({..._,[u.id]:!1}))}})())}},[i]);const y=C.useMemo(()=>i.filter(p=>p.visible).sort((p,u)=>p.order-u.order),[i]),k=p=>Array.isArray(p)?p.map(u=>{const h={};for(const g of u.fields||[]){const _=(g.type||"string").toLowerCase();if(_==="number"){const w=String(g.value||"").trim();if(w!==""){const N=Number(w);Number.isNaN(N)||(h[g.name]=N)}}else if(_==="boolean")h[g.name]=String(g.value).toLowerCase()==="true";else if(_==="function"){const w=String(g.value||"").trim();if(w)try{const N=new Function(w);h[g.name]=N}catch(N){console.error(`❌ Error creando función en item '${g.name}':`,N)}}else h[g.name]=g.value}return h}):[],O=p=>{const u={};if(!Array.isArray(p))return u;for(const h of p){if(!h.name)continue;const g=(h.type||"string").toLowerCase();if(g==="number"){const _=String(h.value||"").trim();if(_!==""){const w=Number(_);Number.isNaN(w)||(u[h.name]=w)}}else if(g==="boolean")u[h.name]=String(h.value).toLowerCase()==="true";else if(g==="function"){const _=String(h.value||"").trim();if(_)try{const w=new Function(_);u[h.name]=w}catch(w){console.error(`❌ Error creando función en item '${h.name}':`,w)}}else u[h.name]=h.value}return u},R=(p,u,h)=>{const g=h?{...h}:{};if(u){const M=(u.variableName||"items").trim()||"items";return g[M]=u.arr||[],g}const _=p,w=Array.isArray(_),N=!w&&typeof _=="object"&&_!==null?_:void 0,P=N&&Array.isArray(N.lobby||N.items)?N.lobby||N.items:void 0,L=M=>w?_:P||M;return g.items=L(P||[]),g},$=p=>{var w;const u=!!((w=p.apiUrl)!=null&&w.trim()),h=u?x[p.id]:void 0;let g=p.props?{...p.props}:{};const _=O(p.manualScalarFields);if(["OraculoSeccionEventoEnVivo","OraculoSeccionEventoSemana","OraculoSeccionEventoCombinadas"].includes(p.componentKey))return console.log(h),{items:h,...g,..._};if(g={...g,..._},u)g=R(h,null,g);else if(p.dataMode==="manual"){const N=k(p.manualItems);if(g=R(null,{arr:N,variableName:p.variableName},g),p.variableName2&&p.manualItems2){const P=k(p.manualItems2),L=(p.variableName2||"items2").trim()||"items2";g[L]=P}}return g},E=(p,u,h)=>{const g={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 ${g[u]}`,children:h},p)},I=p=>{var L;const u=p.componentKey,h=Xt[u];if(!h)return console.warn(`No hay componente registrado para "${u}"`),E(p.id,"component",`Componente "${u}" no encontrado`);const g=!!((L=p.apiUrl)!=null&&L.trim()),_=g?x[p.id]:void 0,w=g?!!v[p.id]:!1,N=g?j[p.id]:"";if(g){if(w&&!_)return E(p.id,"loading",`Cargando datos desde ${p.apiUrl}...`);if(N&&!_)return E(p.id,"error",`Error cargando ${p.apiUrl}: ${N}`)}const P=$(p);return e.jsx("div",{style:{paddingLeft:16,paddingRight:16,width:"100%",boxSizing:"border-box"},children:e.jsx(h,{...P})},p.id)};return o&&!t?e.jsx("div",{className:"text-xs text-gray-400",children:"Cargando preview..."}):!o&&!t&&r.length===0?e.jsx("div",{className:"text-xs text-gray-500",children:"Sin secciones (Firestore)"}):e.jsx(T.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(T.Stack,{direction:"column",spacing:8,useFlexGap:!0,children:y.map(I)})})};exports.OraculoButton=B;exports.OraculoCarousel=A;exports.OraculoCarouselDots=se;exports.OraculoClubOlimpoVisual=Se;exports.OraculoEventCombinadasCard=Ce;exports.OraculoEventEnVivoCard=Ee;exports.OraculoEventHeader=ve;exports.OraculoEventLabel=ae;exports.OraculoEventLeague=je;exports.OraculoEventScore=re;exports.OraculoEventSemanaCard=Oe;exports.OraculoEventStatus=be;exports.OraculoEventStatusBadge=_e;exports.OraculoEventTeamInfo=K;exports.OraculoGameCard=J;exports.OraculoGameRankCard=ye;exports.OraculoGameSlide=ie;exports.OraculoGridGroup=U;exports.OraculoLiveCasinoCard=we;exports.OraculoLogoMediosPago=oe;exports.OraculoPageLandingPreview=We;exports.OraculoSeccionBanners=Ue;exports.OraculoSeccionBonoBienvenida=Te;exports.OraculoSeccionCasino=ke;exports.OraculoSeccionCasinoEnVivo=$e;exports.OraculoSeccionClubOlimpo=Pe;exports.OraculoSeccionDestacados=Ie;exports.OraculoSeccionEventoCombinadas=Fe;exports.OraculoSeccionEventoEnVivo=Le;exports.OraculoSeccionEventoSemana=Me;exports.OraculoSeccionMediosPago=ze;exports.OraculoSeccionTopJuegos=le;exports.OraculoSeccionVirtuales=Be;exports.OraculoSectionTitle=G;exports.OraculoTopJuegoItem=le;exports.OraculoWelcomeBanner=ne;exports.default=We;
|
|
20
20
|
//# sourceMappingURL=index.cjs.js.map
|