1import{d as v,g as i,o as r,n as _,u,t as p,A as N,b as t,F as x,D as y,E as R,c as V,C as D,i as f,k as B,q as F,e as O,a as c,j as T,s as z,B as W,w as E,f as j,h as C,G as P,H as A,l as L,W as U,I as q,m as H,J,K}from"./app-DDjXIuAw.js";import{P as Q}from"./PrimaryButton-BO1ZAnac.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as Y}from"./Layout.vue_vue_type_script_setup_true_lang-_A3kesZm.js";import"./AuthenticatedLayout.vue_vue_type_script_setup_true_lang-C-6FEOa8.js";import"./ApplicationLogo.vue_vue_type_script_setup_true_lang-BckecOe6.js";const S=[0,32,15,19,4,21,2,25,17,34,6,27,13,36,11,30,8,23,10,5,24,16,33,1,20,14,31,9,22,18,29,7,28,12,35,3,26],Z=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36];function I(o){return Z.includes(o)}function ee(o){o-=1;const e=Math.floor(o/12);return(o%12+1)*3-e}const te=2,M=4,G=v({__name:"Tile",props:{number:{}},setup(o){return(e,s)=>(r(),i("div",{class:_(["flex size-9 items-center justify-center border-2 text-center text-white",e.number===0?"bg-green-500":u(I)(e.number)?"bg-red-500":"bg-black"])},p(e.number),3))}}),se={class:"rounded-xl bg-green-700 p-4 text-white outline-white"},ne={class:"grid cursor-pointer grid-flow-row grid-cols-13 grid-rows-3 select-none"},oe=v({__name:"RouletteGrid",props:{modelValue:{},modelModifiers:{}},emits:["update:modelValue"],setup(o){const e=N(o,"modelValue");function s(l){if(e.value===l){e.value=null;return}e.value=l}const n=Array.from({length:36},(l,a)=>ee(a+1));return(l,a)=>(r(),i("div",se,[t("div",ne,[t("div",{class:_(["row-span-3 flex w-9 items-center justify-center border-2",e.value===0?"bg-white text-black":"bg-green-500"]),onClick:a[0]||(a[0]=d=>s(0))},a[3]||(a[3]=[t("div",null,"0",-1)]),2),(r(!0),i(x,null,y(u(n),(d,g,k,b)=>{const h=[d===e.value];if(b&&b.key===d&&R(b,h))return b;const w=(r(),V(G,{key:d,class:_({"z-10 bg-white! text-black!":d===e.value}),number:d,onClick:m=>s(d)},null,8,["class","number","onClick"]));return w.memo=h,w},a,1),128))])]))}}),le={class:"h-6"},re={class:"flex flex-col gap-4"},ae={class:"h-6"},ie={class:"text-sm text-red-500"},ue={class:"flex gap-4"},de={class:"flex items-center"},ce={class:"ml-auto flex items-center gap-4"},me={class:"flex flex-col"},pe={key:0,class:"pt-2 text-sm text-red-500"},ve={key:1,class:"pt-2 text-sm text-red-500"},be=v({__name:"PlaceBetForm",props:{betsClosed:{type:Boolean}},setup(o){const s=D({amount:1,position:void 0}),n=f(()=>s.errors);let l;function a(){s.submit("post",route("bet.store"),{preserveScroll:!0,onError:()=>{clearTimeout(l),l=setTimeout(()=>s.clearErrors(),1e4)}})}const d=f(()=>o.betsClosed||s.processing),g=B(k());function k(){return 60-new Date().getSeconds()}const b=setInterval(()=>g.value=k(),1e3);F(()=>clearInterval(b));const h=f(()=>o.betsClosed?"BETS CLOSED":g.value<3||g.value>55?"BETS CLOSING":`BETS OPEN (Closing in ${g.value})`);return(w,m)=>(r(),i(x,null,[t("div",le,[t("p",null,p(h.value),1)]),t("form",{onSubmit:O(a,["prevent"])},[t("div",re,[t("div",null,[t("div",ae,[T(t("span",ie," Please select a number on the grid below. ",512),[[z,n.value.position]])]),c(oe,{modelValue:u(s).position,"onUpdate:modelValue":m[0]||(m[0]=$=>u(s).position=$)},null,8,["modelValue"])]),t("div",ue,[t("p",de,"Balance: "+p(w.$page.props.auth.user.wallet.balance),1),t("div",ce,[m[2]||(m[2]=t("label",{for:"amount"},"Amount:",-1)),T(t("input",{id:"amount","onUpdate:modelValue":m[1]||(m[1]=$=>u(s).amount=$),class:"rounded-lg",type:"number",name:"amount",placeholder:"1",min:"1",max:"1000",required:""},null,512),[[W,u(s).amount]])]),c(Q,{type:"submit",disabled:d.value},{default:E(()=>m[3]||(m[3]=[j("Place Bet")])),_:1},8,["disabled"])]),t("div",me,[n.value.amount?(r(),i("span",pe,p(n.value.amount),1)):C("",!0),n.value.balance?(r(),i("span",ve,p(n.value.balance),1)):C("",!0)])])],32)],64))}}),fe={class:"flex basis-1/8 flex-col items-center gap-1"},_e={class:"flex flex-col items-end gap-1 rounded-md bg-green-700 px-2 py-4 text-white"},xe=v({__name:"Bets",props:{bets:{},result:{}},setup(o){return(e,s)=>(r(),i("div",fe,[s[0]||(s[0]=t("h3",{class:"text-xl"},"My Bets",-1)),T(t("div",_e,[(r(!0),i(x,null,y(e.bets,n=>(r(),i("div",{key:n.id,style:P(`transition-delay: ${u(M)+1}s`),class:_(["flex items-center gap-2 rounded-lg p-1 transition",{"ring-4 ring-yellow-500":n.position===e.result}])},[t("p",null,p(n.amount)+" on",1),c(G,{number:n.position},null,8,["number"])],6))),128))],512),[[z,e.bets.length>0]])]))}}),ge={class:"flex basis-1/10 flex-col items-center gap-1"},he={class:"flex flex-col rounded-md bg-green-700 px-8 py-4"},we=v({__name:"GamesList",props:{games:{},currentGame:{}},setup(o){const e=f(()=>o.games.filter(n=>{var l;return n.id!==((l=o.currentGame)==null?void 0:l.id)}
1)),s=20;return(n,l)=>(r(),i("div",ge,[l[0]||(l[0]=t("h3",{class:"text-center text-xl"},"Previous Games",-1)),t("div",he,[(r(!0),i(x,null,y(e.value,a=>(r(),V(G,{key:a.id,number:a.result,class:_(`nth-[n+${s+1}]:hidden`)},null,8,["number","class"]))),128))])]))}});async function ye(o){await new Promise(e=>setTimeout(e,o))}const ke={class:"text-white select-none"},$e={style:{"animation-duration":"24s"},class:"plate relative m-3 size-[350px] animate-spin rounded-full"},Te={id:"inner",class:"relative block size-[350px]"},Ce=["data-spinto"],Be={class:"absolute -top-[175px] -left-[17px] inline-block w-8 scale-y-180 pt-3 text-center text-xl leading-none"},Ge=v({__name:"Wheel",props:{spinTo:{}},setup(o){A(n=>({"311828aa":u(te),"4d22382f":e.value,"372f32e3":u(M)}));const e=f(()=>o.spinTo!==void 0?S.indexOf(o.spinTo):void 0),s=B(!1);return L(e,async()=>{e.value===void 0&&(s.value=!1,await ye(500),s.value=!0)},{immediate:!0}),(n,l)=>(r(),i("div",ke,[t("div",$e,[l[1]||(l[1]=t("div",{class:"absolute inset-[12%] z-1 block rounded-full border-stone-300 bg-black/65 inset-ring-3 inset-ring-zinc-500"},null,-1)),t("ul",Te,[s.value?(r(),i("p",{key:0,"data-spinto":e.value,class:"ball absolute z-10 block rounded-full text-6xl leading-normal"},p("â¢"),8,Ce)):C("",!0),(r(!0),i(x,null,y(u(S),(a,d)=>(r(),i("li",{key:a,style:P([`transform: rotate(${d*(360/37)}deg)`,{left:"calc(50% - 16px)","border-top-width":"175px"}]),class:_(["absolute top-0 box-border inline-block h-4 w-8 origin-bottom border-x-[16px] border-x-transparent",[a===0?"border-t-green-500":u(I)(a)?"border-t-red-500":"border-t-black"]])},[t("span",Be,p(a),1)],6))),128)),l[0]||(l[0]=t("div",{class:"absolute inset-[24%] z-3 block rounded-full border-3 border-zinc-500 bg-neutral-600"},null,-1))]),l[2]||(l[2]=t("div",{class:"absolute -inset-1.5 block rounded-full border-6 border-[gold] inset-ring-2 ring-2 ring-yellow-200 inset-ring-black"},null,-1))])]))}}),Se=X(Ge,[["__scopeId","data-v-6d7ea599"]]),Ve={class:"flex gap-8 px-10 py-6"},ze={class:"flex grow flex-col items-center gap-4"},Ee=v({__name:"Roulette",props:{previousGames:{},bets:{}},setup(o){const e=B(),s=f(()=>{var n;return(n=e.value)==null?void 0:n.result});return L(()=>{var n;return(n=o.previousGames[0])==null?void 0:n.id},()=>{e.value=o.previousGames[0],setTimeout(()=>{e.value=void 0,U.reload()},10*1e3)}),q(2e3,{except:["bets"]}),(n,l)=>(r(),i("div",Ve,[c(we,{games:n.previousGames,currentGame:e.value},null,8,["games","currentGame"]),t("div",ze,[c(Se,{spinTo:s.value},null,8,["spinTo"]),c(be,{betsClosed:s.value!==void 0},null,8,["betsClosed"])]),c(xe,{bets:n.bets,result:s.value},null,8,["bets","result"])]))}}),De=v({__name:"Roulette",props:{previousGames:{},bets:{}},setup(o){const e=o;return(s,n)=>(r(),i(x,null,[c(u(H),{title:"Roulette"}),c(Y,null,{default:E(()=>[c(Ee,J(K(e)),null,16)]),_:1})],64))}});export{De as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.