import{d as R,Q as _,am as T,c as E,ag as C,w as L,ab as a,an as X,b as d,f as b,m as g,n as F,a9 as l,F as A,o as n,at as ie,au as ce,D as ue,t as Q,p as Y,h as ee,aU as me,Z as y,aV as de,aW as ve,ar as fe,as as pe,J as ae,ai as ge,ao as he,aX as _e,aY as be,ad as K,a7 as te,aZ as we,ah as O,aH as ye,E as xe,ap as q,a_ as ke,aj as le,al as $e,a$ as Le,b0 as Ce}from"./index-BTTFajzp.js";import{_ as Ie}from"./Index.vue_vue_type_script_setup_true_lang-B2sEhv-d.js";import{u as Se}from"./useProviders-CUqQczNI.js";import{_ as oe}from"./Index.vue_vue_type_script_setup_true_lang-BZPGjRJE.js";import{u as Ee}from"./useCategoryGames-2RXfJpFf.js";import{f as Me,a as J,p as Pe,n as ze,_ as Ae}from"./Index.vue_vue_type_script_setup_true_lang-eoQh5PjQ.js";import{_ as Fe}from"./Index.vue_vue_type_script_setup_true_lang-D_beMPZ0.js";import{u as Re,_ as je}from"./Index-B1YI_KxN.js";const Be=["aria-label"],Ve={class:"xs:min-w-[calc(33.33vw-1.6rem)] flex aspect-[18/10] min-w-[calc(50vw-1.8rem)] shrink-0 sm:min-w-[calc(25vw-1.4rem)] md:min-w-[calc(20vw-1.6rem)] lg:min-w-[calc(16.6666666667vw-4.5rem)] xl:min-w-[162px]"},Ne=12,Qe=R({__name:"Index",setup(o){const{isLoading:t,providers:e,hasFetched:s,error:f,fetchProviders:h}=Se(),u=_(()=>!s.value||t.value||e.value.length>0||!!f.value),p=_(()=>t.value||!!f.value&&e.value.length===0);function c(m){const r=m;return r.id??r.slug}return T(()=>{h()}),(m,r)=>{const w=Ie,I=X;return u.value?(n(),E(I,{key:0,class:"my-5",title:a(l)("providers.title"),"button-label":a(l)("providers.view-all"),"button-link":"/providers","button-aria-label":a(l)("providers.view-all-aria"),"button-title":a(l)("providers.view-all-aria"),"aria-label":a(l)("providers.carousel-aria"),"fallback-aria-label":a(l)("carousel.fallback-aria"),"empty-aria-label":a(l)("carousel.empty-aria"),"prev-arrow-label":a(l)("providers.carousel-prev"),"next-arrow-label":a(l)("providers.carousel-next"),items:a(e),loading:p.value,"item-key":c,"show-arrows":""},{loading:L(()=>[(n(),g(A,null,F(Ne,k=>d("div",{key:`provider-shimmer-${k}`,class:"bg-brand-card xs:min-w-[calc(33.33vw-1.6rem)] flex aspect-[18/10] min-w-[calc(50vw-1.8rem)] shrink-0 animate-pulse rounded-md sm:min-w-[calc(25vw-1.4rem)] md:min-w-[calc(20vw-1.6rem)] lg:min-w-[calc(16.6666666667vw-4.5rem)] xl:min-w-[162px]",role:"status","aria-label":a(l)("providers.loading-aria")},null,8,Be)),64))]),item:L(({item:k})=>[d("div",Ve,[b(w,{provider:k},null,8,["provider"])])]),_:1},8,["title","button-label","button-aria-label","button-title","aria-label","fallback-aria-label","empty-aria-label","prev-arrow-label","next-arrow-label","items","loading"])):C("",!0)}}}),Te=["aria-label"],De={class:"absolute bottom-0 z-10 flex h-2/3 w-full items-end rounded-b-md bg-gradient-to-t from-black/80 to-transparent"},Ge={class:"flex w-full select-none flex-col gap-4 p-3 md:w-3/4 md:p-5"},Ue={class:"text-whitebase overflow-hidden text-ellipsis text-sm font-semibold leading-tight lg:text-lg"};function W(o,t){return o.name||o.title||t||""}function He(o){return`/promotions/${o.slug||o.id}`}function Ke(o,t){const e=W(o).trim(),s=t.trim();return e?s?`${s} ${e}`:e:s}function qe(o,t){const e=o.image?me(o.image):"";return o.image_cf?t(o.image_cf,e,"banDesktop"):e}const Oe=R({__name:"Index",props:{promotion:{},shimmer:{type:Boolean,default:!1},loadingAriaLabel:{}},setup(o){const t=o,{getCloudflareImage:e}=ie(),s=_(()=>l("promotions.join")),f=_(()=>t.promotion?W(t.promotion,l("promotions.fallback-name")):""),h=_(()=>t.promotion?Ke({name:W(t.promotion,l("promotions.fallback-name")),title:void 0},l("promotions.join-aria-prefix")):l("promotions.join-aria-prefix").trim()),u=_(()=>t.promotion?qe(t.promotion,e):"");return(p,c)=>{const m=ce("router-link");return o.shimmer?(n(),g("div",{key:0,class:"bg-brand-card flex aspect-video w-full animate-pulse rounded-md",role:"status","aria-label":o.loadingAriaLabel},null,8,Te)):o.promotion?(n(),E(m,{key:1,to:He(o.promotion),class:"bg-brand-card relative flex aspect-video w-full flex-col overflow-hidden rounded-md","aria-label":h.value,title:h.value},{default:L(()=>[d("div",{class:"absolute inset-0 bg-cover bg-top bg-no-repeat",style:ue({backgroundImage:`url('${u.value}')`})},null,4),c[0]||(c[0]=d("div",{class:"absolute inset-0 rounded-md bg-black/50 transition-colors duration-200"},null,-1)),d("div",De,[d("div",Ge,[d("p",Ue,Q(f.value),1),b(Y,{color:"primary",size:"large",class:"pointer-events-none self-start font-bold",tabindex:"-1","aria-hidden":"true"},{default:L(()=>[ee(Q(s.value),1)]),_:1})])])]),_:1},8,["to","aria-label","title"])):C("",!0)}}}),We=["aria-label"],Ze={class:"xs:min-w-[calc(33.33vw-1.6rem)] flex aspect-video min-h-[150px] min-w-[calc(50vw-1.8rem)] shrink-0 sm:min-w-[calc(25vw-1.4rem)] md:min-w-[calc(20vw-1.6rem)] lg:min-h-[200px] lg:min-w-[calc(16.6666666667vw-4.5rem)] xl:min-w-[340px]"},Je=12,Xe=R({__name:"Index",setup(o){const t=y(!1),e=de(),s=_(()=>t.value&&!!(e.fetchedAt&&!e.isLoading&&!e.hasList&&e.source==="fallback")),f=_(()=>e.isLoading||e.hasList||!e.fetchedAt||s.value),h=_(()=>e.isLoading||s.value&&!e.hasList);function u(p){const c=p;return c.id??c.slug}return T(async()=>{await e.fetchPromotions(),t.value=!0}),(p,c)=>{const m=Oe,r=X;return f.value?(n(),E(r,{key:0,class:"my-5",title:a(l)("promotions.title"),"button-label":a(l)("promotions.view-all"),"button-link":"/promotions","button-aria-label":a(l)("promotions.view-all-aria"),"button-title":a(l)("promotions.view-all-aria"),"aria-label":a(l)("promotions.carousel-aria"),"fallback-aria-label":a(l)("carousel.fallback-aria"),"empty-aria-label":a(l)("carousel.empty-aria"),"prev-arrow-label":a(l)("promotions.carousel-prev"),"next-arrow-label":a(l)("promotions.carousel-next"),items:a(e).list,loading:h.value,"item-key":u,"show-arrows":""},{loading:L(()=>[(n(),g(A,null,F(Je,w=>d("div",{key:`promotion-shimmer-${w}`,class:"bg-brand-card xs:min-w-[calc(33.33vw-1.6rem)] flex aspect-video min-h-[150px] min-w-[calc(50vw-1.8rem)] shrink-0 animate-pulse rounded-md sm:min-w-[calc(25vw-1.4rem)] md:min-w-[calc(20vw-1.6rem)] lg:min-h-[200px] lg:min-w-[calc(16.6666666667vw-4.5rem)] xl:min-w-[340px]",role:"status","aria-label":a(l)("promotions.loading-aria")},null,8,We)),64))]),item:L(({item:w})=>[d("div",Ze,[b(m,{promotion:w},null,8,["promotion"])])]),_:1},8,["title","button-label","button-aria-label","button-title","aria-label","fallback-aria-label","empty-aria-label","prev-arrow-label","next-arrow-label","items","loading"])):C("",!0)}}}),Ye={class:"flex flex-col gap-6"},ea=6,aa=R({__name:"Index",setup(o){const t=ve(),{categories:e,isLoading:s,hasFetched:f,error:h,fetchCategories:u}=Ee();return T(()=>{u()}),(p,c)=>{const m=oe;return n(),g("section",null,[d("div",Ye,[a(s)?(n(),g(A,{key:0},F(ea,r=>b(m,{key:`category-loader-${r}`,title:"",games:[],loading:!0})),64)):a(e).length?(n(!0),g(A,{key:1},F(a(e),r=>(n(),E(m,{key:`category-${r.id}`,games:r.games,title:r.name,"view-all-link":`/casino/${r.slug}`,"view-all-aria":a(l)("games.view-all-category").replace("{name}",r.name)},null,8,["games","title","view-all-link","view-all-aria"]))),128)):a(f)&&a(h)?(n(!0),g(A,{key:2},F(a(t),r=>(n(),E(m,{key:`category-fallback-${r.id}`,games:[],title:r.name,loading:!0,"view-all-link":`/casino/${r.slug}`,"view-all-aria":a(l)("games.view-all-category").replace("{name}",r.name)},null,8,["title","view-all-link","view-all-aria"]))),128)):C("",!0)])])}}}),ta=12,la=R({__name:"Index",setup(o){const t=fe(),e=Me(),s=_(()=>t.isAuthenticated&&(e.loading||e.favorites.length>0));return T(()=>{t.isAuthenticated&&e.fetchFavorites()}),(f,h)=>{const u=oe;return s.value?(n(),E(u,{key:0,games:a(e).favorites,loading:a(e).loading,title:a(l)("games.title-favorites"),"view-all-link":"/casino/favorites","view-all-aria":a(l)("games.view-all-aria"),"carousel-aria":a(l)("games.carousel-aria"),"loading-placeholder-count":ta},null,8,["games","loading","title","view-all-aria","carousel-aria"])):C("",!0)}}});function oa(o){if(!o||typeof o!="object")return!1;const t=o;return t.code==="ERR_CANCELED"||t.name==="CanceledError"}function na(o,t={}){const e=t.minLength??3,s=t.limit??18,f=t.order??"clicks",h=t.debounceMs??500,u=y([]),p=y(!1),c=y(null),m=y(null),r=y({currentPage:1,lastPage:1,showingItems:0,totalItems:0}),w=y(!1),I=y("");let k=null,i=0,x=null;const v=_(()=>pe(o).trim()),M=_(()=>v.value.length>=e),D=_(()=>!p.value&&M.value&&u.value.length===0&&m.value===null&&!c.value&&I.value===v.value);function j(){k?.abort(),k=new AbortController,i+=1,u.value=[],c.value=null,r.value=J(null),w.value=!1,I.value=""}function G(P){j(),m.value=P.length>0&&P.length{x=null;const P=v.value;if(P.length{U()},{immediate:!0,flush:"post"}),{games:u,isLoading:p,error:c,validation:m,meta:r,canLoadMore:w,isQueryValid:M,isEmptyResult:D,trimmedQuery:v,search:$,loadMore:S,resetForQueryChange:j}}const ra=["placeholder"],sa={key:0,class:"pointer-events-none absolute inset-y-0 right-0 flex w-10 items-center justify-center","aria-hidden":"true"},ia={class:"p-4"},ca=R({inheritAttrs:!1,__name:"Index",setup(o){const t=y(!1),e=y(""),s=y(null),f=y(null),h=y(null),{games:u,isLoading:p,error:c,validation:m,canLoadMore:r,isEmptyResult:w,loadMore:I,resetForQueryChange:k}=na(e),i=_(()=>e.value.trim().length>0),x=_(()=>t.value&&i.value),v=_(()=>m.value==="min-length"?l("search.min-length"):c.value?l("search.error"):w.value?l("search.empty"):null);function M(){if(typeof document>"u")return;const $=f.value;$&&document.activeElement===$&&$.blur()}function D(){t.value||(t.value=!0,q(()=>{s.value?.scrollIntoView({block:"start",behavior:"smooth"}),q(()=>{h.value?.scrollEl?.addEventListener("scroll",M,{passive:!0})})}))}function j(){t.value=!1,e.value="",k(),f.value?.blur(),h.value?.scrollEl?.removeEventListener("scroll",M)}function G(){if(i.value){e.value="",k(),q(()=>f.value?.focus());return}j()}function B($){$.key==="Escape"&&j()}return ae(t,$=>{typeof document>"u"||($?(document.body.style.overflow="hidden",document.addEventListener("keydown",B)):(document.body.style.overflow="",document.removeEventListener("keydown",B)))}),he(()=>{typeof document<"u"&&(document.body.style.overflow="",document.removeEventListener("keydown",B)),h.value?.scrollEl?.removeEventListener("scroll",M)}),($,S)=>{const U=Ae,P=Fe,V=ye;return n(),g("div",_e(be($.$attrs)),[t.value?(n(),g("div",{key:0,class:"fixed left-0 top-0 z-[900] h-dvh w-screen bg-black/70 backdrop-blur-sm","aria-hidden":"true",onClick:j})):C("",!0),d("div",{ref_key:"wrapperRef",ref:s,class:xe(["relative scroll-mt-4",{"z-[1000]":t.value}])},[d("form",{autocomplete:"off",class:"border-brand-separator bg-brand-background-brighten relative flex h-10 w-full items-center overflow-hidden rounded-md border",onSubmit:S[1]||(S[1]=K(()=>{},["prevent"])),onClick:S[2]||(S[2]=K(()=>{},["stop"]))},[te(d("input",{ref_key:"searchInputRef",ref:f,"onUpdate:modelValue":S[0]||(S[0]=z=>e.value=z),name:"search-games",class:"h-full w-full min-w-0 bg-transparent pl-3 pr-10 text-sm leading-none outline-none placeholder:text-gray-400",type:"search",placeholder:a(l)("search.placeholder"),autocomplete:"off",enterkeyhint:"search",inputmode:"search",onFocus:D},null,40,ra),[[we,e.value]]),t.value?(n(),E(Y,{key:1,type:"button",variant:"text",icon:"",size:"small",class:"absolute inset-y-0 right-0 my-auto flex h-10 w-10 items-center justify-center","aria-label":i.value?a(l)("search.clear"):a(l)("search.close"),title:i.value?a(l)("search.clear"):a(l)("search.close"),onClick:G},{default:L(()=>[b(O,{icon:i.value?"fa6-solid:delete-left":"fa6-solid:xmark",size:"small"},null,8,["icon"])]),_:1},8,["aria-label","title"])):(n(),g("span",sa,[b(O,{class:"text-lg text-gray-400",icon:"fa6-solid:magnifying-glass",size:"small"})]))],32),x.value?(n(),g("div",{key:0,class:"search-panel border-brand-separator/30 bg-brand-background absolute z-20 mt-2 w-full overflow-hidden rounded-xl border shadow-2xl",onClick:S[3]||(S[3]=K(()=>{},["stop"]))},[b(V,{ref_key:"searchScrollRef",ref:h,class:"search-panel__scroll","overscroll-contain":""},{default:L(()=>[d("div",ia,[b(P,{"is-loading":a(p),"can-load-more":a(r),"has-items":a(u).length>0,"loading-count":12,"grid-class":"grid min-w-0 grid-cols-3 gap-2 sm:grid-cols-4 sm:gap-3 md:grid-cols-5 lg:grid-cols-6",onLoadMore:a(I)},{skeleton:L(()=>[b(U,{shimmer:"","loading-aria-label":a(l)("search.loading-aria")},null,8,["loading-aria-label"])]),item:L(()=>[(n(!0),g(A,null,F(a(u),z=>(n(),E(U,{key:z.id,game:z},null,8,["game"]))),128))]),_:1},8,["is-loading","can-load-more","has-items","onLoadMore"]),v.value?(n(),E(ke,{key:0,type:"warning",variant:"tonal",density:"compact",class:"mt-3 text-sm"},{default:L(()=>[ee(Q(v.value),1)]),_:1})):C("",!0)])]),_:1},512)])):C("",!0)],2)],16)}}}),ua=le(ca,[["__scopeId","data-v-f1f7a4e0"]]),ma={key:0,class:"circle-menu-root scrollbar-hide"},da={class:"circle-menu-fade pointer-events-none absolute bottom-0 right-0 top-0 z-10 w-10","aria-hidden":"true"},va=["aria-label"],fa=["aria-label","title","onClick"],pa={class:"circle-menu-trigger flex h-14 w-14 items-center justify-center rounded-full p-0 transition-[background-color,color,filter] duration-[280ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] xl:mb-2 xl:h-16 xl:w-16"},ga=["innerHTML"],ha={class:"circle-menu-label mt-1 max-w-[5.5rem] text-xs font-medium leading-none text-gray-300 transition-[color] duration-[280ms] ease-[cubic-bezier(0.2,0.8,0.2,1)]"},_a={class:"block"},ba={key:0,class:"mt-0.5 block font-normal leading-tight text-gray-400 transition-[color] duration-[280ms] ease-[cubic-bezier(0.2,0.8,0.2,1)]"},wa=["aria-label"],ya=6,xa=790,ka=R({__name:"Index",props:{ariaLabel:{default:"Menu rĂ¡pido"}},setup(o){const t=$e(),{navigateFromMenuLink:e}=Re(),s=_(()=>{const i=t.business.general_menu_start;return Array.isArray(i)?i:[]}),f=_(()=>s.value.length===0&&!t.hasRemoteSettings),h=_(()=>s.value.length>0||f.value),u=_(()=>l("circle-menu.loading-aria")),p=y(!0);let c=null;function m(){if(typeof window>"u"||!c){p.value=!0;return}p.value=!c.matches}T(()=>{typeof window>"u"||!window.matchMedia||(c=window.matchMedia(`(min-width: ${xa}px)`),m(),c.addEventListener("change",m))}),Le(()=>{c?.removeEventListener("change",m)});function r(i){return typeof i=="string"&&i.includes("<")&&i.includes(">")}function w(i){return i.trim().split(/\s+/)[0]??""}function I(i){const x=i.trim().split(/\s+/);return x.length>1?x.slice(1).join(" "):""}async function k(i){i.link&&await e(i.link)}return(i,x)=>h.value?(n(),g("div",ma,[te(d("div",da,null,512),[[Ce,p.value]]),s.value.length?(n(),g("div",{key:0,class:"circle-menu-list scrollbar-hide flex min-w-full justify-start gap-5 overflow-x-auto overflow-y-hidden px-4 lg:px-0",role:"navigation","aria-label":o.ariaLabel},[(n(!0),g(A,null,F(s.value,(v,M)=>(n(),g("button",{key:`${v.title}-${M}`,type:"button",class:"circle-menu-item flex shrink-0 flex-col items-center border-0 bg-transparent p-0 text-center outline-none transition-[color,background-color,filter,box-shadow] duration-[280ms] ease-[cubic-bezier(0.2,0.8,0.2,1)] focus-visible:ring-2 focus-visible:ring-[rgb(var(--v-theme-primary))]","aria-label":v.title,title:v.title??void 0,onClick:D=>k(v)},[d("div",pa,[r(v.icon)?(n(),g("span",{key:0,class:"circle-menu-icon-html text-[rgb(var(--v-theme-primary))]","aria-hidden":"true",innerHTML:v.icon},null,8,ga)):(n(),E(O,{key:1,class:"text-[rgb(var(--v-theme-primary))]",icon:String(v.icon),size:"32"},null,8,["icon"]))]),d("p",ha,[d("span",_a,Q(w(v.title)),1),I(v.title)?(n(),g("small",ba,Q(I(v.title)),1)):C("",!0)])],8,fa))),128))],8,va)):f.value?(n(),g("div",{key:1,class:"circle-menu-list scrollbar-hide flex min-w-full justify-start gap-5 overflow-x-auto overflow-y-hidden px-4 lg:px-0",role:"status","aria-label":u.value},[(n(),g(A,null,F(ya,v=>d("div",{key:`circle-menu-skeleton-${v}`,class:"circle-menu-skeleton-item flex shrink-0 flex-col items-center","aria-hidden":"true"},[...x[0]||(x[0]=[d("div",{class:"bg-brand-card h-14 w-14 animate-pulse rounded-full xl:mb-2 xl:h-16 xl:w-16"},null,-1),d("div",{class:"mt-2 flex w-[4.5rem] flex-col items-center gap-1"},[d("div",{class:"bg-brand-card h-2.5 w-full animate-pulse rounded"}),d("div",{class:"bg-brand-card h-2 w-3/4 animate-pulse rounded"})],-1)])])),64))],8,wa)):C("",!0)])):C("",!0)}}),$a=le(ka,[["__scopeId","data-v-e9fb95be"]]),Aa={auth:!1},Fa=R({__name:"Index",setup(o){return(t,e)=>{const s=je,f=$a,h=ua,u=la,p=aa,c=Xe,m=Qe;return n(),g(A,null,[b(s),b(f,{class:"my-5"}),b(h,{class:"mb-5"}),b(u),b(p),b(c),b(m)],64)}}});export{Fa as default,Aa as page};