Files
Lucky_Wheel/apps/client/dist/assets/wheel-rusticwoodwheel-B1GPATiK.js
T
2026-09-15 17:26:42 +03:30

2 lines
3.4 KiB
JavaScript

import{u as g,t as _}from"./wheel-classiccasinowheel-DHnlMe5J.js";import{d as b,a as s,b as l,e,n as c,u as i,F as d,f,t as v,g as B,h as S}from"./vendor-vue-kYoPQr5S.js";const C={class:"relative w-full max-w-[340px] xs:max-w-[380px] sm:max-w-[420px] aspect-square mx-auto select-none"},F={class:"absolute inset-0 rounded-full p-3 shadow-[0_12px_30px_rgba(60,30,10,0.55)]",style:{background:"linear-gradient(145deg, #c9a36a 0%, #6b3f1e 40%, #3e2412 100%)"}},z={class:"w-full h-full rounded-full border-[3px] border-[#c9a36a] relative overflow-hidden",style:{background:"radial-gradient(circle at 40% 35%, #5c3a1e 0%, #2a160c 70%)"}},A=["d","fill"],D=["transform"],G={x:"150",y:"45","text-anchor":"middle",fill:"#fff8e7","font-size":"11","font-weight":"700",class:"wheel-slice-text font-sans"},H=["href"],L=["cx","cy"],N=["cx","cy"],R=["x1","y1","x2","y2"],V={class:"absolute -top-3 left-1/2 -translate-x-1/2 z-20 pointer-events-none drop-shadow-lg"},E=b({__name:"RusticWoodWheel",props:{segments:{},targetSegmentIndex:{},spinning:{type:Boolean}},emits:["spin-finished"],setup(a,{emit:x}){const u=a,h=x,{wheelStyle:p,pointerStyle:y,getSlicePath:m,getTextRotation:w,pegs:k}=g(u,()=>h("spin-finished"),{radius:138,pegRadius:143}),n=["#8B5A2B","#A0522D","#6B4226","#C4A484","#8B5A2B","#5D4037"];return(W,o)=>(s(),l("div",C,[e("div",F,[e("div",z,[(s(),l("svg",{class:"w-full h-full",style:c(i(p)),viewBox:"0 0 300 300"},[o[0]||(o[0]=e("circle",{cx:"150",cy:"150",r:"136",fill:"none",stroke:"#4a2c14","stroke-width":"8",opacity:"0.35"},null,-1)),o[1]||(o[1]=e("circle",{cx:"150",cy:"150",r:"120",fill:"none",stroke:"#7a4a22","stroke-width":"2",opacity:"0.25"},null,-1)),(s(!0),l(d,null,f(a.segments,(t,r)=>(s(),l("g",{key:t.id},[e("path",{d:i(m)(r),fill:t.color||n[r%n.length],stroke:"#3e2723","stroke-width":"1.5"},null,8,A),e("g",{transform:i(w)(r)},[e("text",G,v(i(_)(t.title)),1),t.image?(s(),l("image",{key:0,href:t.image,x:"138",y:"54",width:"24",height:"24"},null,8,H)):B("",!0)],8,D)]))),128)),(s(!0),l(d,null,f(i(k),(t,r)=>(s(),l("g",{key:r},[e("circle",{cx:t.x,cy:t.y,r:"4",fill:"#2c1810",stroke:"#8d6e63","stroke-width":"0.8"},null,8,L),e("circle",{cx:t.x,cy:t.y,r:"2.6",fill:"url(#woodBolt)"},null,8,N),e("line",{x1:t.x-1.6,y1:t.y,x2:t.x+1.6,y2:t.y,stroke:"#5d4037","stroke-width":"0.7"},null,8,R)]))),128)),o[2]||(o[2]=S('<circle cx="150" cy="150" r="30" fill="url(#woodHub)" stroke="#d7ccc8" stroke-width="2"></circle><circle cx="150" cy="150" r="18" fill="#3e2723" stroke="#a1887f" stroke-width="1.5"></circle><text x="150" y="156" text-anchor="middle" font-size="14" fill="#efebe9">🪵</text><defs><radialGradient id="woodBolt" cx="35%" cy="30%" r="70%"><stop offset="0%" stop-color="#efebe9"></stop><stop offset="50%" stop-color="#9e9e9e"></stop><stop offset="100%" stop-color="#424242"></stop></radialGradient><radialGradient id="woodHub" cx="40%" cy="35%" r="65%"><stop offset="0%" stop-color="#bcaaa4"></stop><stop offset="100%" stop-color="#5d4037"></stop></radialGradient></defs>',4))],4))])]),e("div",V,[e("div",{style:c(i(y)),class:"w-9 h-[44px] origin-[50%_12px] will-change-transform"},[...o[3]||(o[3]=[e("svg",{width:"36",height:"44",viewBox:"0 0 36 44",fill:"none"},[e("path",{d:"M18 44L5 14C3 9 7 3 12 3H24C29 3 33 9 31 14L18 44Z",fill:"#8d6e63",stroke:"#efebe9","stroke-width":"1.5"}),e("circle",{cx:"18",cy:"12",r:"4.5",fill:"#5d4037",stroke:"#d7ccc8","stroke-width":"1.2"})],-1)])],4)])]))}});export{E as default};