@nice2dev/events 1.0.8 โ†’ 1.0.11

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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),le=i.forwardRef(function(k,C){const{messages:s,currentUserId:f,onSend:m,onReact:x,reactions:j=["๐Ÿ‘","โค๏ธ","๐Ÿ˜‚","๐ŸŽ‰","๐Ÿ”ฅ"],readOnly:v=!1,placeholder:S="Type a messageโ€ฆ",autoScroll:_=!0,className:g,style:b}=k,[l,h]=i.useState(""),N=i.useRef(null);i.useEffect(()=>{_&&N.current&&N.current.scrollIntoView({behavior:"smooth"})},[s.length,_]);const y=i.useCallback(()=>{!l.trim()||!m||(m(l.trim(),"text"),h(""))},[l,m]),p=a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),y())};return e.jsxs("div",{ref:C,className:`nice-event-chat ${g??""}`,style:b,children:[e.jsxs("div",{className:"nice-event-chat__messages",children:[s.length===0&&e.jsx("p",{className:"nice-event-chat__empty",children:"No messages yet. Start the conversation!"}),s.map(a=>{const t=a.senderId===f;return a.type==="system"||a.type==="announcement"?e.jsxs("div",{className:`nice-event-chat__system nice-event-chat__${a.type}`,children:[e.jsx("span",{children:a.content}),e.jsx("time",{children:a.timestamp})]},a.id):e.jsxs("div",{className:`nice-event-chat__bubble ${t?"nice-event-chat__bubble--own":""}`,children:[!t&&e.jsxs("div",{className:"nice-event-chat__sender",children:[a.senderAvatarUrl&&e.jsx("img",{src:a.senderAvatarUrl,alt:"",className:"nice-event-chat__avatar"}),e.jsx("strong",{children:a.senderName})]}),a.type==="image"?e.jsx("img",{src:a.content,alt:"Shared image",className:"nice-event-chat__image"}):e.jsx("p",{className:"nice-event-chat__text",children:a.content}),e.jsxs("div",{className:"nice-event-chat__meta",children:[e.jsx("time",{children:a.timestamp}),a.reactions&&Object.keys(a.reactions).length>0&&e.jsx("span",{className:"nice-event-chat__reactions",children:Object.entries(a.reactions).map(([n,u])=>e.jsxs("button",{className:"nice-event-chat__reaction",onClick:()=>x==null?void 0:x(a.id,n),children:[n," ",u]},n))})]}),x&&!v&&e.jsx("div",{className:"nice-event-chat__react-bar",children:j.map(n=>e.jsx("button",{onClick:()=>x(a.id,n),title:n,children:n},n))})]},a.id)}),e.jsx("div",{ref:N})]}),!v&&e.jsxs("div",{className:"nice-event-chat__input-bar",children:[e.jsx("textarea",{value:l,onChange:a=>h(a.target.value),onKeyDown:p,placeholder:S,rows:1}),e.jsx("button",{onClick:y,disabled:!l.trim(),children:"Send"})]})]})}),G={invited:"#3b82f6",confirmed:"#22c55e",declined:"#ef4444","checked-in":"#8b5cf6","no-show":"#9ca3af"},H={host:"๐Ÿ‘‘ Host","co-host":"๐ŸŽฏ Co-Host",moderator:"๐Ÿ›ก๏ธ Moderator",participant:"๐Ÿ‘ค Participant",spectator:"๐Ÿ‘๏ธ Spectator",vip:"โญ VIP"},oe=i.forwardRef(function(k,C){const{participants:s,currentParticipantId:f,onInvite:m,onRemove:x,onRoleChange:j,onCheckIn:v,onParticipantClick:S,showQR:_=!1,editable:g=!1,maxParticipants:b,className:l,style:h}=k,[N,y]=i.useState(""),[p,a]=i.useState(""),t=i.useMemo(()=>{let u=s;if(p&&(u=u.filter(c=>c.status===p)),N.trim()){const c=N.toLowerCase();u=u.filter(o=>o.name.toLowerCase().includes(c))}return u},[s,p,N]),d=i.useMemo(()=>{const u=new Map,c=["host","co-host","moderator","vip","participant","spectator"];for(const o of c)u.set(o,[]);for(const o of t)u.has(o.role)||u.set(o.role,[]),u.get(o.role).push(o);return Array.from(u.entries()).filter(([,o])=>o.length>0)},[t]),n=i.useMemo(()=>{const u={};for(const c of s)u[c.status]=(u[c.status]??0)+1;return u},[s]);return e.jsxs("div",{ref:C,className:`nice-event-participants ${l??""}`,style:h,children:[e.jsxs("div",{className:"nice-event-participants__header",children:[e.jsxs("h3",{children:["Participants (",s.length,b?` / ${b}`:"",")"]}),g&&m&&e.jsx("button",{onClick:m,disabled:b?s.length>=b:!1,children:"+ Invite"})]}),e.jsx("div",{className:"nice-event-participants__summary",children:Object.entries(n).map(([u,c])=>e.jsxs("span",{className:"nice-event-participants__stat",children:[e.jsx("span",{className:"nice-event-participants__dot",style:{backgroundColor:G[u]}}),u,": ",c]},u))}),e.jsxs("div",{className:"nice-event-participants__toolbar",children:[e.jsx("input",{type:"text",value:N,onChange:u=>y(u.target.value),placeholder:"Searchโ€ฆ"}),e.jsxs("select",{value:p,onChange:u=>a(u.target.value),children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"invited",children:"Invited"}),e.jsx("option",{value:"confirmed",children:"Confirmed"}),e.jsx("option",{value:"declined",children:"Declined"}),e.jsx("option",{value:"checked-in",children:"Checked In"}),e.jsx("option",{value:"no-show",children:"No Show"})]})]}),d.map(([u,c])=>e.jsxs("div",{className:"nice-event-participants__group",children:[e.jsxs("h4",{className:"nice-event-participants__role-label",children:[H[u]," (",c.length,")"]}),c.map(o=>e.jsxs("div",{className:`nice-event-participants__item ${o.id===f?"nice-event-participants__item--self":""}`,onClick:()=>S==null?void 0:S(o),children:[o.avatarUrl?e.jsx("img",{src:o.avatarUrl,alt:"",className:"nice-event-participants__avatar"}):e.jsx("span",{className:"nice-event-participants__avatar-placeholder",children:o.name.charAt(0)}),e.jsxs("div",{className:"nice-event-participants__info",children:[e.jsx("span",{className:"nice-event-participants__name",children:o.name}),e.jsx("span",{className:"nice-event-participants__status",style:{color:G[o.status]},children:o.status}),o.score!=null&&e.jsxs("span",{className:"nice-event-participants__score",children:["Score: ",o.score]})]}),_&&o.qrCode&&e.jsx("span",{className:"nice-event-participants__qr",title:"QR Code",children:"๐Ÿ“ฑ"}),g&&e.jsxs("div",{className:"nice-event-participants__actions",children:[j&&e.jsx("select",{value:o.role,onChange:w=>j(o.id,w.target.value),onClick:w=>w.stopPropagation(),children:Object.entries(H).map(([w,R])=>e.jsx("option",{value:w,children:R},w))}),v&&o.status==="confirmed"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),v(o.id)},children:"Check In"}),x&&o.role!=="host"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(o.id)},children:"Remove"})]})]},o.id))]},u))]})}),de=i.forwardRef(function(k,C){const{items:s,onUpload:f,onDelete:m,onLike:x,onItemClick:j,layout:v="grid",uploadEnabled:S=!0,typeFilter:_="all",className:g,style:b}=k,[l,h]=i.useState(""),N=i.useMemo(()=>_==="all"?s:s.filter(p=>p.type===_),[s,_]),y=p=>{var t;const a=(t=p.target.files)==null?void 0:t[0];!a||!f||(f(a,l.trim()||void 0),h(""),p.target.value="")};return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${v} ${g??""}`,style:b,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",N.length,")"]})}),S&&f&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx("input",{type:"file",accept:"image/*,video/*",onChange:y}),e.jsx("input",{type:"text",value:l,onChange:p=>h(p.target.value),placeholder:"Add a captionโ€ฆ",className:"nice-event-media__caption-input"})]}),N.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx("div",{className:`nice-event-media__gallery nice-event-media__gallery--${v}`,children:N.map(p=>e.jsxs("div",{className:"nice-event-media__item",onClick:()=>j==null?void 0:j(p),role:j?"button":void 0,children:[p.type==="photo"?e.jsx("img",{src:p.thumbnailUrl??p.url,alt:p.caption??"",className:"nice-event-media__thumb"}):e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx("span",{children:"โ–ถ"})}),e.jsxs("div",{className:"nice-event-media__overlay",children:[p.caption&&e.jsx("span",{className:"nice-event-media__item-caption",children:p.caption}),e.jsx("span",{className:"nice-event-media__uploader",children:p.uploadedByName}),e.jsxs("div",{className:"nice-event-media__item-actions",children:[x&&e.jsxs("button",{onClick:a=>{a.stopPropagation(),x(p.id)},children:["โค๏ธ ",p.likes??0]}),m&&e.jsx("button",{onClick:a=>{a.stopPropagation(),m(p.id)},children:"๐Ÿ—‘๏ธ"})]})]})]},p.id))})]})}),ue=i.forwardRef(function(k,C){var q,F,Q,W,K;const{event:s,surveys:f=[],billing:m=[],onUpdateEvent:x,onUpdateLocation:j,onAddSurvey:v,onSurveyRespond:S,onAddBilling:_,editable:g=!1,className:b,style:l}=k,[h,N]=i.useState("details"),[y,p]=i.useState(s.title),[a,t]=i.useState(s.description??""),[d,n]=i.useState(s.startDate??""),[u,c]=i.useState(s.endDate??""),[o,w]=i.useState(((q=s.location)==null?void 0:q.name)??""),[R,J]=i.useState(((F=s.location)==null?void 0:F.address)??""),[O,X]=i.useState(((Q=s.location)==null?void 0:Q.virtualUrl)??""),[I,Z]=i.useState(((W=s.location)==null?void 0:W.isVirtual)??!1),[L,V]=i.useState(""),[M,ee]=i.useState("single"),[$,z]=i.useState(""),[E,D]=i.useState(""),[B,U]=i.useState(""),[T,te]=i.useState("PLN"),ne=i.useCallback(()=>{x==null||x({title:y,description:a||void 0,startDate:d||void 0,endDate:u||void 0})},[y,a,d,u,x]),se=i.useCallback(()=>{j==null||j({name:o,address:R||void 0,virtualUrl:O||void 0,isVirtual:I})},[o,R,O,I,j]),ie=i.useCallback(()=>{if(!L.trim()||!v)return;const r=$.split(",").map(P=>P.trim()).filter(Boolean);v(L.trim(),M,r.length>0?r:void 0),V(""),z("")},[L,M,$,v]),ae=i.useCallback(()=>{!E.trim()||!_||(_({label:E.trim(),amount:parseFloat(B)||0,currency:T}),D(""),U(""))},[E,B,T,_]),ce=m.reduce((r,P)=>r+P.amount,0);return e.jsxs("div",{ref:C,className:`nice-event-planning ${b??""}`,style:l,children:[e.jsx("div",{className:"nice-event-planning__tabs",children:["details","location","surveys","billing"].map(r=>e.jsx("button",{className:`nice-event-planning__tab ${h===r?"nice-event-planning__tab--active":""}`,onClick:()=>N(r),children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),h==="details"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:["Title",e.jsx("input",{type:"text",value:y,onChange:r=>p(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["Description",e.jsx("textarea",{value:a,onChange:r=>t(r.target.value),readOnly:!g,rows:3})]}),e.jsxs("label",{children:["Start",e.jsx("input",{type:"datetime-local",value:d,onChange:r=>n(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["End",e.jsx("input",{type:"datetime-local",value:u,onChange:r=>c(r.target.value),readOnly:!g})]}),e.jsxs("div",{className:"nice-event-planning__status",children:["Status: ",e.jsx("strong",{children:s.status})]}),g&&e.jsx("button",{onClick:ne,children:"Save Details"})]}),h==="location"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:I,onChange:r=>Z(r.target.checked),disabled:!g})," Virtual event"]}),e.jsxs("label",{children:["Venue Name",e.jsx("input",{type:"text",value:o,onChange:r=>w(r.target.value),readOnly:!g})]}),!I&&e.jsxs("label",{children:["Address",e.jsx("input",{type:"text",value:R,onChange:r=>J(r.target.value),readOnly:!g})]}),I&&e.jsxs("label",{children:["Virtual URL",e.jsx("input",{type:"url",value:O,onChange:r=>X(r.target.value),readOnly:!g})]}),g&&e.jsx("button",{onClick:se,children:"Save Location"})]}),h==="surveys"&&e.jsxs("div",{className:"nice-event-planning__section",children:[f.length===0?e.jsx("p",{children:"No surveys yet."}):f.map(r=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:r.question}),e.jsxs("span",{className:"nice-event-planning__survey-type",children:["(",r.type,")"]}),r.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:r.options.map((P,re)=>e.jsx("button",{onClick:()=>S==null?void 0:S(r.id,P),children:P},re))}),r.responses&&e.jsxs("span",{children:[r.responses.length," responses"]})]},r.id)),g&&v&&e.jsxs("div",{className:"nice-event-planning__add-survey",children:[e.jsx("h4",{children:"Add Survey"}),e.jsx("input",{type:"text",value:L,onChange:r=>V(r.target.value),placeholder:"Question"}),e.jsxs("select",{value:M,onChange:r=>ee(r.target.value),children:[e.jsx("option",{value:"single",children:"Single choice"}),e.jsx("option",{value:"multiple",children:"Multiple choice"}),e.jsx("option",{value:"text",children:"Free text"}),e.jsx("option",{value:"rating",children:"Rating"})]}),e.jsx("input",{type:"text",value:$,onChange:r=>z(r.target.value),placeholder:"Options (comma-separated)"}),e.jsx("button",{onClick:ie,disabled:!L.trim(),children:"Add"})]})]}),h==="billing"&&e.jsxs("div",{className:"nice-event-planning__section",children:[m.length===0?e.jsx("p",{children:"No billing items yet."}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"nice-event-planning__billing-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Item"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Paid by"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:m.map(r=>e.jsxs("tr",{children:[e.jsx("td",{children:r.label}),e.jsxs("td",{children:[r.amount.toFixed(2)," ",r.currency]}),e.jsx("td",{children:r.paidByName??"โ€”"}),e.jsx("td",{children:r.isPaid?"โœ… Paid":"โณ Pending"})]},r.id))})]}),e.jsxs("div",{className:"nice-event-planning__billing-total",children:["Total: ",e.jsxs("strong",{children:[ce.toFixed(2)," ",((K=m[0])==null?void 0:K.currency)??""]})]})]}),g&&_&&e.jsxs("div",{className:"nice-event-planning__add-billing",children:[e.jsx("input",{type:"text",value:E,onChange:r=>D(r.target.value),placeholder:"Item"}),e.jsx("input",{type:"number",value:B,onChange:r=>U(r.target.value),placeholder:"Amount",min:0,step:.01}),e.jsxs("select",{value:T,onChange:r=>te(r.target.value),children:[e.jsx("option",{value:"PLN",children:"PLN"}),e.jsx("option",{value:"EUR",children:"EUR"}),e.jsx("option",{value:"USD",children:"USD"}),e.jsx("option",{value:"GBP",children:"GBP"})]}),e.jsx("button",{onClick:ae,disabled:!E.trim(),children:"Add"})]})]})]})}),he={upcoming:"โณ",active:"โ–ถ๏ธ",voting:"๐Ÿ—ณ๏ธ",scored:"๐Ÿ“Š",completed:"โœ…",skipped:"โญ๏ธ"},pe={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},me=i.forwardRef(function(k,C){const{rounds:s,activeRoundId:f,onSelect:m,onStart:x,onEnd:j,onCreate:v,editable:S=!1,className:_,style:g}=k,b=[...s].sort((l,h)=>l.order-h.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${_??""}`,style:g,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",s.length,")"]}),S&&v&&e.jsx("button",{onClick:v,children:"+ Add Round"})]}),b.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:b.map(l=>{const h=l.id===f;return e.jsxs("div",{className:`nice-round-list__item ${h?"nice-round-list__item--active":""}`,onClick:()=>m==null?void 0:m(l),role:m?"button":void 0,tabIndex:m?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",l.order]}),e.jsx("span",{className:"nice-round-list__icon",children:he[l.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:l.name}),l.description&&e.jsx("small",{children:l.description}),l.type&&e.jsx("span",{className:"nice-round-list__type",children:l.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:pe[l.status]},children:l.status}),l.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[l.durationMinutes,"m"]}),l.winnerIds&&l.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["๐Ÿ† ",l.winnerIds.length]}),S&&e.jsxs("div",{className:"nice-round-list__actions",onClick:N=>N.stopPropagation(),children:[l.status==="upcoming"&&x&&e.jsx("button",{onClick:()=>x(l.id),children:"Start"}),(l.status==="active"||l.status==="voting")&&j&&e.jsx("button",{onClick:()=>j(l.id),children:"End"})]})]},l.id)})})]})}),xe=i.forwardRef(function(k,C){const{round:s,timerRunning:f=!1,remainingSeconds:m,onSubmitScore:x,onStart:j,onEnd:v,onSkip:S,editable:_=!1,footerActions:g,className:b,style:l}=k,[h,N]=i.useState({}),y=i.useCallback(t=>{const d=parseFloat(h[t]??"");isNaN(d)||!x||(x(t,d),N(n=>({...n,[t]:""})))},[h,x]),p=t=>{const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`},a=s.scores?[...s.scores].sort((t,d)=>d.score-t.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${s.status} ${b??""}`,style:l,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",s.order]}),e.jsx("h3",{className:"nice-round-card__name",children:s.name}),e.jsx("span",{className:"nice-round-card__status",children:s.status})]}),s.description&&e.jsx("p",{className:"nice-round-card__description",children:s.description}),(f||m!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${f?"nice-round-card__timer--running":""}`,children:["โฑ๏ธ ",m!=null?p(m):"โ€”"]}),a.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:a.map((t,d)=>e.jsxs("tr",{className:d<3?`nice-round-card__top-${d+1}`:"",children:[e.jsxs("td",{children:[t.rank??d+1,d===0?" ๐Ÿฅ‡":d===1?" ๐Ÿฅˆ":d===2?" ๐Ÿฅ‰":""]}),e.jsx("td",{children:t.participantName}),e.jsx("td",{children:t.score})]},t.participantId))})]})]}),x&&(s.status==="active"||s.status==="voting")&&a.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),a.map(t=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:t.participantName}),e.jsx("input",{type:"number",value:h[t.participantId]??"",onChange:d=>N(n=>({...n,[t.participantId]:d.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>y(t.participantId),children:"Submit"})]},t.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[_&&e.jsxs("div",{className:"nice-round-card__actions",children:[s.status==="upcoming"&&j&&e.jsx("button",{onClick:j,children:"โ–ถ Start Round"}),(s.status==="active"||s.status==="voting")&&v&&e.jsx("button",{onClick:v,children:"โน End Round"}),s.status==="upcoming"&&S&&e.jsx("button",{onClick:S,children:"โญ Skip"})]}),g]}),s.winnerIds&&s.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["๐Ÿ† Winners: ",s.winnerIds.length]})]})}),ve=i.forwardRef(function(k,C){const{songs:s,onAdd:f,onRemove:m,onVote:x,onSearch:j,showQueue:v=!0,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),h=i.useMemo(()=>{if(!b.trim())return s;const t=b.toLowerCase();return s.filter(d=>d.title.toLowerCase().includes(t)||d.artist.toLowerCase().includes(t))},[s,b]),N=i.useMemo(()=>s.filter(t=>t.isQueued),[s]),y=s.find(t=>t.isPlaying),p=t=>{l(t),j==null||j(t)},a=t=>{if(!t)return"";const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"๐ŸŽต Now Playing"}),y.albumArt&&e.jsx("img",{src:y.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:y.title}),e.jsx("span",{children:y.artist})]}),e.jsx("input",{type:"text",value:b,onChange:t=>p(t.target.value),placeholder:"Search songsโ€ฆ",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:h.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):h.map(t=>e.jsxs("div",{className:`nice-song-picker__item ${t.isPlaying?"nice-song-picker__item--playing":""}`,children:[t.albumArt&&e.jsx("img",{src:t.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:t.title}),e.jsx("span",{children:t.artist}),t.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:a(t.duration)}),t.addedByName&&e.jsxs("small",{children:["Added by ",t.addedByName]})]}),!S&&e.jsxs("div",{className:"nice-song-picker__actions",children:[x&&e.jsxs("button",{onClick:()=>x(t.id),children:["๐Ÿ‘ ",t.votes??0]}),f&&!t.isQueued&&e.jsx("button",{onClick:()=>f(t.id),children:"+ Queue"}),m&&t.isQueued&&e.jsx("button",{onClick:()=>m(t.id),children:"Remove"})]})]},t.id))}),v&&N.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",N.length,")"]}),N.map((t,d)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[d+1,"."]}),e.jsxs("span",{children:[t.title," โ€” ",t.artist]})]},t.id))]})]})}),je=i.forwardRef(function(k,C){const{songs:s,queue:f=[],onEnqueue:m,onDequeue:x,onNext:j,nowPlayingId:v,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),[h,N]=i.useState(""),y=s.find(n=>n.id===v),p=i.useMemo(()=>{let n=s;if(b.trim()){const u=b.toLowerCase();n=n.filter(c=>c.title.toLowerCase().includes(u)||c.artist.toLowerCase().includes(u))}return h&&(n=n.filter(u=>u.difficulty===h)),n},[s,b,h]),a=i.useMemo(()=>new Set(f.map(n=>n.id)),[f]),t=["easy","medium","hard","expert"],d=n=>{switch(n){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:C,className:`nice-karaoke-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"๐ŸŽค Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:y.title})," โ€” ",y.artist,y.performerName&&e.jsxs("span",{children:[" (by ",y.performerName,")"]})]}),!S&&j&&e.jsx("button",{onClick:j,style:{marginTop:8},children:"Skip / Next โญ"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:b,onChange:n=>l(n.target.value),placeholder:"Search songs or artistsโ€ฆ",style:{flex:1}}),e.jsxs("select",{value:h,onChange:n=>N(n.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),t.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:p.length===0?e.jsx("p",{children:"No songs match your search."}):p.map(n=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:n.title})," โ€” ",n.artist,n.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:d(n.difficulty),fontWeight:600},children:["[",n.difficulty,"]"]}),n.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"๐Ÿ“"}),n.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",n.language,")"]})]}),!S&&e.jsx("div",{children:a.has(n.id)?e.jsx("button",{onClick:()=>x==null?void 0:x(n.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>m==null?void 0:m(n.id),children:"๐ŸŽค Sing"})})]},n.id))}),f.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["๐ŸŽถ Queue (",f.length,")"]}),f.map((n,u)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[u+1,"."]})," ",n.title," โ€” ",n.artist,n.performerName&&e.jsxs("em",{children:[" (",n.performerName,")"]})]}),!S&&x&&e.jsx("button",{onClick:()=>x(n.id),style:{fontSize:12},children:"โœ•"})]},n.id))]})]})}),Y={game:"๐ŸŽฎ",music:"๐ŸŽต",dance:"๐Ÿ’ƒ",quiz:"โ“",karaoke:"๐ŸŽค",photo:"๐Ÿ“ธ",custom:"โœจ"},ge={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},fe=i.forwardRef(function(k,C){const{attractions:s,onSelect:f,onDeselect:m,onVote:x,selectedIds:j=[],maxSelections:v,showVotes:S=!0,readOnly:_=!1,layout:g="grid",className:b,style:l}=k,[h,N]=i.useState(""),[y,p]=i.useState(""),a=i.useMemo(()=>new Set(j),[j]),t=i.useMemo(()=>{const c=new Set(s.map(o=>o.category));return Array.from(c)},[s]),d=i.useMemo(()=>{let c=s;if(h&&(c=c.filter(o=>o.category===h)),y.trim()){const o=y.toLowerCase();c=c.filter(w=>{var R;return w.name.toLowerCase().includes(o)||((R=w.description)==null?void 0:R.toLowerCase().includes(o))})}return c},[s,h,y]),n=!v||a.size<v,u=c=>{_||(a.has(c)?m==null||m(c):n&&(f==null||f(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${b??""}`,style:l,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),v&&e.jsxs("span",{style:{color:"#666",fontSize:14},children:[a.size,"/",v," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:y,onChange:c=>p(c.target.value),placeholder:"Search attractionsโ€ฆ",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>N(""),style:{fontWeight:h?400:700},children:"All"}),t.map(c=>e.jsxs("button",{onClick:()=>N(c===h?"":c),style:{fontWeight:c===h?700:400},children:[Y[c]," ",ge[c]]},c))]}),e.jsx("div",{style:{display:g==="grid"?"grid":"flex",gridTemplateColumns:g==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:g==="list"?"column":void 0},children:d.length===0?e.jsx("p",{children:"No attractions found."}):d.map(c=>{const o=a.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:o?"2px solid #1976d2":"1px solid #ddd",borderRadius:8,padding:12,cursor:_?"default":"pointer",background:o?"#e3f2fd":"#fff",transition:"all 0.2s"},onClick:()=>u(c.id),children:[c.imageUrl&&e.jsx("img",{src:c.imageUrl,alt:c.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{children:Y[c.category]}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"#666",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[S&&e.jsxs("span",{style:{fontSize:13},children:["๐Ÿ‘ ",c.votes??0]}),!_&&x&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),_e={game:"๐ŸŽฎ",music:"๐ŸŽต",dance:"๐Ÿ’ƒ",quiz:"โ“",karaoke:"๐ŸŽค",photo:"๐Ÿ“ธ",custom:"โœจ"},ye=i.forwardRef(function(k,C){const{attractions:s,onVote:f,onUnvote:m,votedIds:x=[],maxVotes:j,closed:v=!1,sortBy:S="votes",showResults:_=!0,className:g,style:b}=k,l=i.useMemo(()=>new Set(x),[x]),h=j?j-l.size:void 0,N=i.useMemo(()=>{const t=[...s];switch(S){case"votes":t.sort((d,n)=>(n.votes??0)-(d.votes??0));break;case"name":t.sort((d,n)=>d.name.localeCompare(n.name));break;case"category":t.sort((d,n)=>d.category.localeCompare(n.category));break}return t},[s,S]),y=i.useMemo(()=>Math.max(...s.map(t=>t.votes??0),1),[s]),p=t=>{v||(l.has(t)?m==null||m(t):(!h||h>0)&&(f==null||f(t)))},a=t=>{switch(t){case 0:return"๐Ÿฅ‡";case 1:return"๐Ÿฅˆ";case 2:return"๐Ÿฅ‰";default:return`${t+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${g??""}`,style:b,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsx("h3",{style:{margin:0},children:v?"๐Ÿ—ณ๏ธ Voting Results":"๐Ÿ—ณ๏ธ Vote for Attractions"}),!v&&h!==void 0&&e.jsxs("span",{style:{fontSize:14,color:h>0?"#1976d2":"#f44336"},children:[h," vote",h!==1?"s":""," remaining"]})]}),v&&e.jsx("p",{style:{color:"#666",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:N.map((t,d)=>{const n=l.has(t.id),u=t.votes??0,c=_?`${Math.round(u/y*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:n?"2px solid #1976d2":"1px solid #e0e0e0",background:n?"#e3f2fd":"#fff",cursor:v?"default":"pointer",transition:"all 0.2s"},onClick:()=>p(t.id),children:[_&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:a(d)}),e.jsx("span",{style:{fontSize:20},children:_e[t.category]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:t.name}),t.description&&e.jsx("div",{style:{fontSize:13,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.description}),_&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"#e0e0e0",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"#1976d2",borderRadius:3,transition:"width 0.3s"}})})]}),_&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:u}),!v&&e.jsx("button",{onClick:o=>{o.stopPropagation(),p(t.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:n?"#f44336":"#1976d2",color:"#fff",cursor:"pointer",fontSize:13},children:n?"Unvote":"Vote"})]},t.id)})}),_&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"#666"},children:["Total votes: ",s.reduce((t,d)=>t+(d.votes??0),0)]})]})});exports.NiceAttractionPicker=fe;exports.NiceAttractionVoting=ye;exports.NiceEventChat=le;exports.NiceEventMedia=de;exports.NiceEventParticipants=oe;exports.NiceEventPlanning=ue;exports.NiceKaraokePicker=je;exports.NiceRoundCard=xe;exports.NiceRoundList=me;exports.NiceSongPicker=ve;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),le=i.forwardRef(function(k,C){const{messages:s,currentUserId:f,onSend:m,onReact:x,reactions:j=["๐Ÿ‘","โค๏ธ","๐Ÿ˜‚","๐ŸŽ‰","๐Ÿ”ฅ"],readOnly:v=!1,placeholder:S="Type a messageโ€ฆ",autoScroll:_=!0,className:g,style:b}=k,[l,h]=i.useState(""),N=i.useRef(null);i.useEffect(()=>{_&&N.current&&N.current.scrollIntoView({behavior:"smooth"})},[s.length,_]);const y=i.useCallback(()=>{!l.trim()||!m||(m(l.trim(),"text"),h(""))},[l,m]),p=a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),y())};return e.jsxs("div",{ref:C,className:`nice-event-chat ${g??""}`,style:b,children:[e.jsxs("div",{className:"nice-event-chat__messages",children:[s.length===0&&e.jsx("p",{className:"nice-event-chat__empty",children:"No messages yet. Start the conversation!"}),s.map(a=>{const t=a.senderId===f;return a.type==="system"||a.type==="announcement"?e.jsxs("div",{className:`nice-event-chat__system nice-event-chat__${a.type}`,children:[e.jsx("span",{children:a.content}),e.jsx("time",{children:a.timestamp})]},a.id):e.jsxs("div",{className:`nice-event-chat__bubble ${t?"nice-event-chat__bubble--own":""}`,children:[!t&&e.jsxs("div",{className:"nice-event-chat__sender",children:[a.senderAvatarUrl&&e.jsx("img",{src:a.senderAvatarUrl,alt:"",className:"nice-event-chat__avatar"}),e.jsx("strong",{children:a.senderName})]}),a.type==="image"?e.jsx("img",{src:a.content,alt:"Shared image",className:"nice-event-chat__image"}):e.jsx("p",{className:"nice-event-chat__text",children:a.content}),e.jsxs("div",{className:"nice-event-chat__meta",children:[e.jsx("time",{children:a.timestamp}),a.reactions&&Object.keys(a.reactions).length>0&&e.jsx("span",{className:"nice-event-chat__reactions",children:Object.entries(a.reactions).map(([n,u])=>e.jsxs("button",{className:"nice-event-chat__reaction",onClick:()=>x==null?void 0:x(a.id,n),children:[n," ",u]},n))})]}),x&&!v&&e.jsx("div",{className:"nice-event-chat__react-bar",children:j.map(n=>e.jsx("button",{onClick:()=>x(a.id,n),title:n,children:n},n))})]},a.id)}),e.jsx("div",{ref:N})]}),!v&&e.jsxs("div",{className:"nice-event-chat__input-bar",children:[e.jsx("textarea",{value:l,onChange:a=>h(a.target.value),onKeyDown:p,placeholder:S,rows:1}),e.jsx("button",{onClick:y,disabled:!l.trim(),children:"Send"})]})]})}),G={invited:"#3b82f6",confirmed:"#22c55e",declined:"#ef4444","checked-in":"#8b5cf6","no-show":"#9ca3af"},H={host:"๐Ÿ‘‘ Host","co-host":"๐ŸŽฏ Co-Host",moderator:"๐Ÿ›ก๏ธ Moderator",participant:"๐Ÿ‘ค Participant",spectator:"๐Ÿ‘๏ธ Spectator",vip:"โญ VIP"},oe=i.forwardRef(function(k,C){const{participants:s,currentParticipantId:f,onInvite:m,onRemove:x,onRoleChange:j,onCheckIn:v,onParticipantClick:S,showQR:_=!1,editable:g=!1,maxParticipants:b,className:l,style:h}=k,[N,y]=i.useState(""),[p,a]=i.useState(""),t=i.useMemo(()=>{let u=s;if(p&&(u=u.filter(c=>c.status===p)),N.trim()){const c=N.toLowerCase();u=u.filter(o=>o.name.toLowerCase().includes(c))}return u},[s,p,N]),d=i.useMemo(()=>{const u=new Map,c=["host","co-host","moderator","vip","participant","spectator"];for(const o of c)u.set(o,[]);for(const o of t)u.has(o.role)||u.set(o.role,[]),u.get(o.role).push(o);return Array.from(u.entries()).filter(([,o])=>o.length>0)},[t]),n=i.useMemo(()=>{const u={};for(const c of s)u[c.status]=(u[c.status]??0)+1;return u},[s]);return e.jsxs("div",{ref:C,className:`nice-event-participants ${l??""}`,style:h,children:[e.jsxs("div",{className:"nice-event-participants__header",children:[e.jsxs("h3",{children:["Participants (",s.length,b?` / ${b}`:"",")"]}),g&&m&&e.jsx("button",{onClick:m,disabled:b?s.length>=b:!1,children:"+ Invite"})]}),e.jsx("div",{className:"nice-event-participants__summary",children:Object.entries(n).map(([u,c])=>e.jsxs("span",{className:"nice-event-participants__stat",children:[e.jsx("span",{className:"nice-event-participants__dot",style:{backgroundColor:G[u]}}),u,": ",c]},u))}),e.jsxs("div",{className:"nice-event-participants__toolbar",children:[e.jsx("input",{type:"text",value:N,onChange:u=>y(u.target.value),placeholder:"Searchโ€ฆ"}),e.jsxs("select",{value:p,onChange:u=>a(u.target.value),children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"invited",children:"Invited"}),e.jsx("option",{value:"confirmed",children:"Confirmed"}),e.jsx("option",{value:"declined",children:"Declined"}),e.jsx("option",{value:"checked-in",children:"Checked In"}),e.jsx("option",{value:"no-show",children:"No Show"})]})]}),d.map(([u,c])=>e.jsxs("div",{className:"nice-event-participants__group",children:[e.jsxs("h4",{className:"nice-event-participants__role-label",children:[H[u]," (",c.length,")"]}),c.map(o=>e.jsxs("div",{className:`nice-event-participants__item ${o.id===f?"nice-event-participants__item--self":""}`,onClick:()=>S==null?void 0:S(o),children:[o.avatarUrl?e.jsx("img",{src:o.avatarUrl,alt:"",className:"nice-event-participants__avatar"}):e.jsx("span",{className:"nice-event-participants__avatar-placeholder",children:o.name.charAt(0)}),e.jsxs("div",{className:"nice-event-participants__info",children:[e.jsx("span",{className:"nice-event-participants__name",children:o.name}),e.jsx("span",{className:"nice-event-participants__status",style:{color:G[o.status]},children:o.status}),o.score!=null&&e.jsxs("span",{className:"nice-event-participants__score",children:["Score: ",o.score]})]}),_&&o.qrCode&&e.jsx("span",{className:"nice-event-participants__qr",title:"QR Code",children:"๐Ÿ“ฑ"}),g&&e.jsxs("div",{className:"nice-event-participants__actions",children:[j&&e.jsx("select",{value:o.role,onChange:w=>j(o.id,w.target.value),onClick:w=>w.stopPropagation(),children:Object.entries(H).map(([w,R])=>e.jsx("option",{value:w,children:R},w))}),v&&o.status==="confirmed"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),v(o.id)},children:"Check In"}),x&&o.role!=="host"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(o.id)},children:"Remove"})]})]},o.id))]},u))]})}),de=i.forwardRef(function(k,C){const{items:s,onUpload:f,onDelete:m,onLike:x,onItemClick:j,layout:v="grid",uploadEnabled:S=!0,typeFilter:_="all",className:g,style:b}=k,[l,h]=i.useState(""),N=i.useMemo(()=>_==="all"?s:s.filter(p=>p.type===_),[s,_]),y=p=>{var t;const a=(t=p.target.files)==null?void 0:t[0];!a||!f||(f(a,l.trim()||void 0),h(""),p.target.value="")};return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${v} ${g??""}`,style:b,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",N.length,")"]})}),S&&f&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx("input",{type:"file",accept:"image/*,video/*",onChange:y}),e.jsx("input",{type:"text",value:l,onChange:p=>h(p.target.value),placeholder:"Add a captionโ€ฆ",className:"nice-event-media__caption-input"})]}),N.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx("div",{className:`nice-event-media__gallery nice-event-media__gallery--${v}`,children:N.map(p=>e.jsxs("div",{className:"nice-event-media__item",onClick:()=>j==null?void 0:j(p),role:j?"button":void 0,children:[p.type==="photo"?e.jsx("img",{src:p.thumbnailUrl??p.url,alt:p.caption??"",className:"nice-event-media__thumb"}):e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx("span",{children:"โ–ถ"})}),e.jsxs("div",{className:"nice-event-media__overlay",children:[p.caption&&e.jsx("span",{className:"nice-event-media__item-caption",children:p.caption}),e.jsx("span",{className:"nice-event-media__uploader",children:p.uploadedByName}),e.jsxs("div",{className:"nice-event-media__item-actions",children:[x&&e.jsxs("button",{onClick:a=>{a.stopPropagation(),x(p.id)},children:["โค๏ธ ",p.likes??0]}),m&&e.jsx("button",{onClick:a=>{a.stopPropagation(),m(p.id)},children:"๐Ÿ—‘๏ธ"})]})]})]},p.id))})]})}),ue=i.forwardRef(function(k,C){var q,F,Q,W,K;const{event:s,surveys:f=[],billing:m=[],onUpdateEvent:x,onUpdateLocation:j,onAddSurvey:v,onSurveyRespond:S,onAddBilling:_,editable:g=!1,className:b,style:l}=k,[h,N]=i.useState("details"),[y,p]=i.useState(s.title),[a,t]=i.useState(s.description??""),[d,n]=i.useState(s.startDate??""),[u,c]=i.useState(s.endDate??""),[o,w]=i.useState(((q=s.location)==null?void 0:q.name)??""),[R,J]=i.useState(((F=s.location)==null?void 0:F.address)??""),[O,X]=i.useState(((Q=s.location)==null?void 0:Q.virtualUrl)??""),[I,Z]=i.useState(((W=s.location)==null?void 0:W.isVirtual)??!1),[L,V]=i.useState(""),[M,ee]=i.useState("single"),[$,z]=i.useState(""),[E,D]=i.useState(""),[B,U]=i.useState(""),[T,te]=i.useState("PLN"),ne=i.useCallback(()=>{x==null||x({title:y,description:a||void 0,startDate:d||void 0,endDate:u||void 0})},[y,a,d,u,x]),se=i.useCallback(()=>{j==null||j({name:o,address:R||void 0,virtualUrl:O||void 0,isVirtual:I})},[o,R,O,I,j]),ie=i.useCallback(()=>{if(!L.trim()||!v)return;const r=$.split(",").map(P=>P.trim()).filter(Boolean);v(L.trim(),M,r.length>0?r:void 0),V(""),z("")},[L,M,$,v]),ae=i.useCallback(()=>{!E.trim()||!_||(_({label:E.trim(),amount:parseFloat(B)||0,currency:T}),D(""),U(""))},[E,B,T,_]),ce=m.reduce((r,P)=>r+P.amount,0);return e.jsxs("div",{ref:C,className:`nice-event-planning ${b??""}`,style:l,children:[e.jsx("div",{className:"nice-event-planning__tabs",children:["details","location","surveys","billing"].map(r=>e.jsx("button",{className:`nice-event-planning__tab ${h===r?"nice-event-planning__tab--active":""}`,onClick:()=>N(r),children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),h==="details"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:["Title",e.jsx("input",{type:"text",value:y,onChange:r=>p(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["Description",e.jsx("textarea",{value:a,onChange:r=>t(r.target.value),readOnly:!g,rows:3})]}),e.jsxs("label",{children:["Start",e.jsx("input",{type:"datetime-local",value:d,onChange:r=>n(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["End",e.jsx("input",{type:"datetime-local",value:u,onChange:r=>c(r.target.value),readOnly:!g})]}),e.jsxs("div",{className:"nice-event-planning__status",children:["Status: ",e.jsx("strong",{children:s.status})]}),g&&e.jsx("button",{onClick:ne,children:"Save Details"})]}),h==="location"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:I,onChange:r=>Z(r.target.checked),disabled:!g})," ","Virtual event"]}),e.jsxs("label",{children:["Venue Name",e.jsx("input",{type:"text",value:o,onChange:r=>w(r.target.value),readOnly:!g})]}),!I&&e.jsxs("label",{children:["Address",e.jsx("input",{type:"text",value:R,onChange:r=>J(r.target.value),readOnly:!g})]}),I&&e.jsxs("label",{children:["Virtual URL",e.jsx("input",{type:"url",value:O,onChange:r=>X(r.target.value),readOnly:!g})]}),g&&e.jsx("button",{onClick:se,children:"Save Location"})]}),h==="surveys"&&e.jsxs("div",{className:"nice-event-planning__section",children:[f.length===0?e.jsx("p",{children:"No surveys yet."}):f.map(r=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:r.question}),e.jsxs("span",{className:"nice-event-planning__survey-type",children:["(",r.type,")"]}),r.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:r.options.map((P,re)=>e.jsx("button",{onClick:()=>S==null?void 0:S(r.id,P),children:P},re))}),r.responses&&e.jsxs("span",{children:[r.responses.length," responses"]})]},r.id)),g&&v&&e.jsxs("div",{className:"nice-event-planning__add-survey",children:[e.jsx("h4",{children:"Add Survey"}),e.jsx("input",{type:"text",value:L,onChange:r=>V(r.target.value),placeholder:"Question"}),e.jsxs("select",{value:M,onChange:r=>ee(r.target.value),children:[e.jsx("option",{value:"single",children:"Single choice"}),e.jsx("option",{value:"multiple",children:"Multiple choice"}),e.jsx("option",{value:"text",children:"Free text"}),e.jsx("option",{value:"rating",children:"Rating"})]}),e.jsx("input",{type:"text",value:$,onChange:r=>z(r.target.value),placeholder:"Options (comma-separated)"}),e.jsx("button",{onClick:ie,disabled:!L.trim(),children:"Add"})]})]}),h==="billing"&&e.jsxs("div",{className:"nice-event-planning__section",children:[m.length===0?e.jsx("p",{children:"No billing items yet."}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"nice-event-planning__billing-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Item"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Paid by"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:m.map(r=>e.jsxs("tr",{children:[e.jsx("td",{children:r.label}),e.jsxs("td",{children:[r.amount.toFixed(2)," ",r.currency]}),e.jsx("td",{children:r.paidByName??"โ€”"}),e.jsx("td",{children:r.isPaid?"โœ… Paid":"โณ Pending"})]},r.id))})]}),e.jsxs("div",{className:"nice-event-planning__billing-total",children:["Total:"," ",e.jsxs("strong",{children:[ce.toFixed(2)," ",((K=m[0])==null?void 0:K.currency)??""]})]})]}),g&&_&&e.jsxs("div",{className:"nice-event-planning__add-billing",children:[e.jsx("input",{type:"text",value:E,onChange:r=>D(r.target.value),placeholder:"Item"}),e.jsx("input",{type:"number",value:B,onChange:r=>U(r.target.value),placeholder:"Amount",min:0,step:.01}),e.jsxs("select",{value:T,onChange:r=>te(r.target.value),children:[e.jsx("option",{value:"PLN",children:"PLN"}),e.jsx("option",{value:"EUR",children:"EUR"}),e.jsx("option",{value:"USD",children:"USD"}),e.jsx("option",{value:"GBP",children:"GBP"})]}),e.jsx("button",{onClick:ae,disabled:!E.trim(),children:"Add"})]})]})]})}),he={upcoming:"โณ",active:"โ–ถ๏ธ",voting:"๐Ÿ—ณ๏ธ",scored:"๐Ÿ“Š",completed:"โœ…",skipped:"โญ๏ธ"},pe={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},me=i.forwardRef(function(k,C){const{rounds:s,activeRoundId:f,onSelect:m,onStart:x,onEnd:j,onCreate:v,editable:S=!1,className:_,style:g}=k,b=[...s].sort((l,h)=>l.order-h.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${_??""}`,style:g,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",s.length,")"]}),S&&v&&e.jsx("button",{onClick:v,children:"+ Add Round"})]}),b.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:b.map(l=>{const h=l.id===f;return e.jsxs("div",{className:`nice-round-list__item ${h?"nice-round-list__item--active":""}`,onClick:()=>m==null?void 0:m(l),role:m?"button":void 0,tabIndex:m?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",l.order]}),e.jsx("span",{className:"nice-round-list__icon",children:he[l.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:l.name}),l.description&&e.jsx("small",{children:l.description}),l.type&&e.jsx("span",{className:"nice-round-list__type",children:l.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:pe[l.status]},children:l.status}),l.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[l.durationMinutes,"m"]}),l.winnerIds&&l.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["๐Ÿ† ",l.winnerIds.length]}),S&&e.jsxs("div",{className:"nice-round-list__actions",onClick:N=>N.stopPropagation(),children:[l.status==="upcoming"&&x&&e.jsx("button",{onClick:()=>x(l.id),children:"Start"}),(l.status==="active"||l.status==="voting")&&j&&e.jsx("button",{onClick:()=>j(l.id),children:"End"})]})]},l.id)})})]})}),xe=i.forwardRef(function(k,C){const{round:s,timerRunning:f=!1,remainingSeconds:m,onSubmitScore:x,onStart:j,onEnd:v,onSkip:S,editable:_=!1,footerActions:g,className:b,style:l}=k,[h,N]=i.useState({}),y=i.useCallback(t=>{const d=parseFloat(h[t]??"");isNaN(d)||!x||(x(t,d),N(n=>({...n,[t]:""})))},[h,x]),p=t=>{const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`},a=s.scores?[...s.scores].sort((t,d)=>d.score-t.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${s.status} ${b??""}`,style:l,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",s.order]}),e.jsx("h3",{className:"nice-round-card__name",children:s.name}),e.jsx("span",{className:"nice-round-card__status",children:s.status})]}),s.description&&e.jsx("p",{className:"nice-round-card__description",children:s.description}),(f||m!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${f?"nice-round-card__timer--running":""}`,children:["โฑ๏ธ ",m!=null?p(m):"โ€”"]}),a.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:a.map((t,d)=>e.jsxs("tr",{className:d<3?`nice-round-card__top-${d+1}`:"",children:[e.jsxs("td",{children:[t.rank??d+1,d===0?" ๐Ÿฅ‡":d===1?" ๐Ÿฅˆ":d===2?" ๐Ÿฅ‰":""]}),e.jsx("td",{children:t.participantName}),e.jsx("td",{children:t.score})]},t.participantId))})]})]}),x&&(s.status==="active"||s.status==="voting")&&a.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),a.map(t=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:t.participantName}),e.jsx("input",{type:"number",value:h[t.participantId]??"",onChange:d=>N(n=>({...n,[t.participantId]:d.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>y(t.participantId),children:"Submit"})]},t.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[_&&e.jsxs("div",{className:"nice-round-card__actions",children:[s.status==="upcoming"&&j&&e.jsx("button",{onClick:j,children:"โ–ถ Start Round"}),(s.status==="active"||s.status==="voting")&&v&&e.jsx("button",{onClick:v,children:"โน End Round"}),s.status==="upcoming"&&S&&e.jsx("button",{onClick:S,children:"โญ Skip"})]}),g]}),s.winnerIds&&s.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["๐Ÿ† Winners: ",s.winnerIds.length]})]})}),ve=i.forwardRef(function(k,C){const{songs:s,onAdd:f,onRemove:m,onVote:x,onSearch:j,showQueue:v=!0,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),h=i.useMemo(()=>{if(!b.trim())return s;const t=b.toLowerCase();return s.filter(d=>d.title.toLowerCase().includes(t)||d.artist.toLowerCase().includes(t))},[s,b]),N=i.useMemo(()=>s.filter(t=>t.isQueued),[s]),y=s.find(t=>t.isPlaying),p=t=>{l(t),j==null||j(t)},a=t=>{if(!t)return"";const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"๐ŸŽต Now Playing"}),y.albumArt&&e.jsx("img",{src:y.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:y.title}),e.jsx("span",{children:y.artist})]}),e.jsx("input",{type:"text",value:b,onChange:t=>p(t.target.value),placeholder:"Search songsโ€ฆ",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:h.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):h.map(t=>e.jsxs("div",{className:`nice-song-picker__item ${t.isPlaying?"nice-song-picker__item--playing":""}`,children:[t.albumArt&&e.jsx("img",{src:t.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:t.title}),e.jsx("span",{children:t.artist}),t.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:a(t.duration)}),t.addedByName&&e.jsxs("small",{children:["Added by ",t.addedByName]})]}),!S&&e.jsxs("div",{className:"nice-song-picker__actions",children:[x&&e.jsxs("button",{onClick:()=>x(t.id),children:["๐Ÿ‘ ",t.votes??0]}),f&&!t.isQueued&&e.jsx("button",{onClick:()=>f(t.id),children:"+ Queue"}),m&&t.isQueued&&e.jsx("button",{onClick:()=>m(t.id),children:"Remove"})]})]},t.id))}),v&&N.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",N.length,")"]}),N.map((t,d)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[d+1,"."]}),e.jsxs("span",{children:[t.title," โ€” ",t.artist]})]},t.id))]})]})}),je=i.forwardRef(function(k,C){const{songs:s,queue:f=[],onEnqueue:m,onDequeue:x,onNext:j,nowPlayingId:v,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),[h,N]=i.useState(""),y=s.find(n=>n.id===v),p=i.useMemo(()=>{let n=s;if(b.trim()){const u=b.toLowerCase();n=n.filter(c=>c.title.toLowerCase().includes(u)||c.artist.toLowerCase().includes(u))}return h&&(n=n.filter(u=>u.difficulty===h)),n},[s,b,h]),a=i.useMemo(()=>new Set(f.map(n=>n.id)),[f]),t=["easy","medium","hard","expert"],d=n=>{switch(n){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:C,className:`nice-karaoke-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"๐ŸŽค Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:y.title})," โ€” ",y.artist,y.performerName&&e.jsxs("span",{children:[" (by ",y.performerName,")"]})]}),!S&&j&&e.jsx("button",{onClick:j,style:{marginTop:8},children:"Skip / Next โญ"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:b,onChange:n=>l(n.target.value),placeholder:"Search songs or artistsโ€ฆ",style:{flex:1}}),e.jsxs("select",{value:h,onChange:n=>N(n.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),t.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:p.length===0?e.jsx("p",{children:"No songs match your search."}):p.map(n=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:n.title})," โ€” ",n.artist,n.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:d(n.difficulty),fontWeight:600},children:["[",n.difficulty,"]"]}),n.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"๐Ÿ“"}),n.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",n.language,")"]})]}),!S&&e.jsx("div",{children:a.has(n.id)?e.jsx("button",{onClick:()=>x==null?void 0:x(n.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>m==null?void 0:m(n.id),children:"๐ŸŽค Sing"})})]},n.id))}),f.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["๐ŸŽถ Queue (",f.length,")"]}),f.map((n,u)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[u+1,"."]})," ",n.title," โ€” ",n.artist,n.performerName&&e.jsxs("em",{children:[" (",n.performerName,")"]})]}),!S&&x&&e.jsx("button",{onClick:()=>x(n.id),style:{fontSize:12},children:"โœ•"})]},n.id))]})]})}),Y={game:"๐ŸŽฎ",music:"๐ŸŽต",dance:"๐Ÿ’ƒ",quiz:"โ“",karaoke:"๐ŸŽค",photo:"๐Ÿ“ธ",custom:"โœจ"},ge={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},fe=i.forwardRef(function(k,C){const{attractions:s,onSelect:f,onDeselect:m,onVote:x,selectedIds:j=[],maxSelections:v,showVotes:S=!0,readOnly:_=!1,layout:g="grid",className:b,style:l}=k,[h,N]=i.useState(""),[y,p]=i.useState(""),a=i.useMemo(()=>new Set(j),[j]),t=i.useMemo(()=>{const c=new Set(s.map(o=>o.category));return Array.from(c)},[s]),d=i.useMemo(()=>{let c=s;if(h&&(c=c.filter(o=>o.category===h)),y.trim()){const o=y.toLowerCase();c=c.filter(w=>{var R;return w.name.toLowerCase().includes(o)||((R=w.description)==null?void 0:R.toLowerCase().includes(o))})}return c},[s,h,y]),n=!v||a.size<v,u=c=>{_||(a.has(c)?m==null||m(c):n&&(f==null||f(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${b??""}`,style:l,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),v&&e.jsxs("span",{style:{color:"#666",fontSize:14},children:[a.size,"/",v," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:y,onChange:c=>p(c.target.value),placeholder:"Search attractionsโ€ฆ",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>N(""),style:{fontWeight:h?400:700},children:"All"}),t.map(c=>e.jsxs("button",{onClick:()=>N(c===h?"":c),style:{fontWeight:c===h?700:400},children:[Y[c]," ",ge[c]]},c))]}),e.jsx("div",{style:{display:g==="grid"?"grid":"flex",gridTemplateColumns:g==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:g==="list"?"column":void 0},children:d.length===0?e.jsx("p",{children:"No attractions found."}):d.map(c=>{const o=a.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:o?"2px solid #1976d2":"1px solid #ddd",borderRadius:8,padding:12,cursor:_?"default":"pointer",background:o?"#e3f2fd":"#fff",transition:"all 0.2s"},onClick:()=>u(c.id),children:[c.imageUrl&&e.jsx("img",{src:c.imageUrl,alt:c.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{children:Y[c.category]}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"#666",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[S&&e.jsxs("span",{style:{fontSize:13},children:["๐Ÿ‘ ",c.votes??0]}),!_&&x&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),_e={game:"๐ŸŽฎ",music:"๐ŸŽต",dance:"๐Ÿ’ƒ",quiz:"โ“",karaoke:"๐ŸŽค",photo:"๐Ÿ“ธ",custom:"โœจ"},ye=i.forwardRef(function(k,C){const{attractions:s,onVote:f,onUnvote:m,votedIds:x=[],maxVotes:j,closed:v=!1,sortBy:S="votes",showResults:_=!0,className:g,style:b}=k,l=i.useMemo(()=>new Set(x),[x]),h=j?j-l.size:void 0,N=i.useMemo(()=>{const t=[...s];switch(S){case"votes":t.sort((d,n)=>(n.votes??0)-(d.votes??0));break;case"name":t.sort((d,n)=>d.name.localeCompare(n.name));break;case"category":t.sort((d,n)=>d.category.localeCompare(n.category));break}return t},[s,S]),y=i.useMemo(()=>Math.max(...s.map(t=>t.votes??0),1),[s]),p=t=>{v||(l.has(t)?m==null||m(t):(!h||h>0)&&(f==null||f(t)))},a=t=>{switch(t){case 0:return"๐Ÿฅ‡";case 1:return"๐Ÿฅˆ";case 2:return"๐Ÿฅ‰";default:return`${t+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${g??""}`,style:b,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsx("h3",{style:{margin:0},children:v?"๐Ÿ—ณ๏ธ Voting Results":"๐Ÿ—ณ๏ธ Vote for Attractions"}),!v&&h!==void 0&&e.jsxs("span",{style:{fontSize:14,color:h>0?"#1976d2":"#f44336"},children:[h," vote",h!==1?"s":""," remaining"]})]}),v&&e.jsx("p",{style:{color:"#666",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:N.map((t,d)=>{const n=l.has(t.id),u=t.votes??0,c=_?`${Math.round(u/y*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:n?"2px solid #1976d2":"1px solid #e0e0e0",background:n?"#e3f2fd":"#fff",cursor:v?"default":"pointer",transition:"all 0.2s"},onClick:()=>p(t.id),children:[_&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:a(d)}),e.jsx("span",{style:{fontSize:20},children:_e[t.category]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:t.name}),t.description&&e.jsx("div",{style:{fontSize:13,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.description}),_&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"#e0e0e0",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"#1976d2",borderRadius:3,transition:"width 0.3s"}})})]}),_&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:u}),!v&&e.jsx("button",{onClick:o=>{o.stopPropagation(),p(t.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:n?"#f44336":"#1976d2",color:"#fff",cursor:"pointer",fontSize:13},children:n?"Unvote":"Vote"})]},t.id)})}),_&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"#666"},children:["Total votes: ",s.reduce((t,d)=>t+(d.votes??0),0)]})]})});exports.NiceAttractionPicker=fe;exports.NiceAttractionVoting=ye;exports.NiceEventChat=le;exports.NiceEventMedia=de;exports.NiceEventParticipants=oe;exports.NiceEventPlanning=ue;exports.NiceKaraokePicker=je;exports.NiceRoundCard=xe;exports.NiceRoundList=me;exports.NiceSongPicker=ve;