2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
import{u as v,t as S}from"./wheel-classiccasinowheel-D335SDnp.js";import{d as B,a as o,b as n,e as t,n as u,u as r,F as i,f as a,t as F,g as z,c as C}from"./vendor-vue-DYkhP7t5.js";const M={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},L={class:"absolute inset-0 rounded-full p-2.5 shadow-[0_0_40px_rgba(99,102,241,0.45)]",style:{background:"linear-gradient(135deg, #6366f1, #a855f7, #0ea5e9)"}},P={class:"w-full h-full rounded-full border border-indigo-300/40 relative overflow-hidden bg-[#050816]"},D=["cx","cy","r"],I=["d","fill"],N=["transform"],R={x:"150",y:"45","text-anchor":"middle",fill:"#eef2ff","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans"},V=["href"],W=["cx","cy"],q=["cx","cy"],A={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-[0_0_10px_#a78bfa]"},H=B({__name:"GalaxySpaceWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(c,{emit:h}){const x=c,m=h,{wheelStyle:y,pointerStyle:p,getSlicePath:g,getTextRotation:_,pegs:w}=v(x,()=>m("spin-finished"),{radius:138,pegRadius:143}),d=["#1e1b4b","#312e81","#4c1d95","#0f172a","#1e3a8a","#581c87"],k=C(()=>Array.from({length:28},(b,s)=>{const e=s*47%360,l=40+s*13%90,f=(e-90)*Math.PI/180;return{x:150+l*Math.cos(f),y:150+l*Math.sin(f),s:.6+s%3*.4}}));return(b,s)=>(o(),n("div",M,[t("div",L,[t("div",P,[(o(),n("svg",{class:"w-full h-full",style:u(r(y)),viewBox:"0 0 300 300"},[(o(!0),n(i,null,a(k.value,(e,l)=>(o(),n("circle",{key:"st"+l,cx:e.x,cy:e.y,r:e.s,fill:"#e0e7ff",opacity:"0.7"},null,8,D))),128)),(o(!0),n(i,null,a(c.segments,(e,l)=>(o(),n("g",{key:e.id},[t("path",{d:r(g)(l),fill:e.color||d[l%d.length],stroke:"#a5b4fc","stroke-width":"1","stroke-opacity":"0.6"},null,8,I),t("g",{transform:r(_)(l)},[t("text",R,F(r(S)(e.title)),1),e.image?(o(),n("image",{key:0,href:e.image,x:"138",y:"54",width:"24",height:"24"},null,8,V)):z("",!0)],8,N)]))),128)),(o(!0),n(i,null,a(r(w),(e,l)=>(o(),n("g",{key:l},[t("circle",{cx:e.x,cy:e.y,r:"3",fill:"#0f172a",stroke:"#c4b5fd","stroke-width":"1"},null,8,W),t("circle",{cx:e.x,cy:e.y,r:"1.4",fill:"#a78bfa"},null,8,q)]))),128)),s[0]||(s[0]=t("circle",{cx:"150",cy:"150",r:"30",fill:"#0b1026",stroke:"#818cf8","stroke-width":"2"},null,-1)),s[1]||(s[1]=t("circle",{cx:"150",cy:"150",r:"18",fill:"#312e81",stroke:"#e879f9","stroke-width":"1.5"},null,-1)),s[2]||(s[2]=t("text",{x:"150",y:"156","text-anchor":"middle","font-size":"14"},"🌌",-1))],4))])]),t("div",A,[t("div",{style:u(r(p)),class:"w-8 h-[42px] origin-[50%_10px] will-change-transform"},[...s[3]||(s[3]=[t("svg",{width:"32",height:"42",viewBox:"0 0 32 42",fill:"none"},[t("path",{d:"M16 42L4 12C2 7 6 2 11 2H21C26 2 30 7 28 12L16 42Z",fill:"#a78bfa",stroke:"#fff","stroke-width":"1.4"}),t("circle",{cx:"16",cy:"10",r:"4",fill:"#e879f9"})],-1)])],4)])]))}});export{H as default};
|