PageSourceSearch

https://cyber24days.pl/assets/Groups-BwcdyY0W.js

js cyber24days.pl collected 2026-10-09 04:46:47 UTC 13,945 bytes, 2 lines download raw bytes

1import{u as T,r as g,aM as z,m as oe,j as e,a5 as M,t as d,aN as ne,x as Y,aO as S,k as X,an as Z,L as ie,$ as P,aP as E,a4 as C,aE as k,w as le,Q as ce}from"./index-iKZctqkc.js";import{m as H}from"./react-error-boundary-DApaqVZl.js";import{l as se,m as ae,n as de,o as pe,G as me,E as ue,L as xe}from"./Styles-B_hrx-39.js";import{F as ge,u as fe}from"./useWidgetFilterSlot-C2i-jigD.js";import{u as te,c as he}from"./ProductModal-Dm-hIxYE.js";import{G as _,g as je,b as re,c as be}from"./index-eaeR3Ggg.js";import{C as m}from"./Card-CfqSTSc5.js";import{a as ye}from"./404-C_KbLL34.js";import{T as O}from"./Text-Dlsl_Pei.js";import{a6 as Ge,a7 as ve,L as Ie}from"./StatusWrapper-Cox6w-En.js";import{G as Ne,a as we,b as Ae,c as Le}from"./TopbarActions-DEEVzDpf.js";import{u as Re}from"./useNavItemTitle-CWHzx8XF.js";import{I as Ce}from"./Info-B2nsj9mU.js";import"./Styles-C3LETCWv.js";import"./Avatar-BYiY1cph.js";import"./Styles-BoNXvgNV.js";import"./navigation-D7-ETPC5.js";import"./Icon-CfZtCVGs.js";import"./Checkbox-xCm87T0H.js";import"./onClickOutside-BDQw4SAr.js";import"./Live-9UBdg0iu.js";import"./index-aW9hvg79.js";import"./Form-DJWiW8kL.js";import"./Flex-B7Q3BrpJ.js";import"./PrograssBar2-DDsKCqjm.js";import"./FileType-DWUGzhyK.js";import"./PrograssBar-BxeSvWor.js";import"./Badge-Ckh_MWEX.js";import"./SocialMedia-Lftcq8Ui.js";import"./ResourcesSimplified-CA9OhB0G.js";import"./index-J6I0aQn1.js";import"./usePopperHook-xt3THqo5.js";import"./Products-WZr9B8tW.js";import"./Styles-Cc-l8AeV.js";import"./LocalAlert-9tQfYccG.js";import"./guards-DQ1iPT3D.js";import"./NoData-4ES7yO1G.js";import"./useTranslatedLang-DaNmxmHr.js";import"./BottomTabs-CKnSDiXz.js";import"./Offcanvas-52A1gM3E.js";import"./hls-Cnr5ma_D.js";import"./useElementDimensions-PL-2hxN9.js";import"./index-BQU-hyIN.js";import"./getStatusWrapper-gSZ0xJMX.js";import"./useAgendaRating-BdgJ8Ho7.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"37b638917a0d057baf231e49ecc1802c4a928fbe"};var t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="30a10471-7a42-4b5f-8ca9-f968fcc58c05",s._sentryDebugIdIdentifier="sentry-dbid-30a10471-7a42-4b5f-8ca9-f968fcc58c05")}catch{}})();const B=(s,t)=>{let i=[...s];return t.text&&(i=i.filter(n=>{var u,l;const c=n.name?z(n.name,t.text):!1,p=(u=n.owner)!=null&&u.name?z(n.owner.name,t.text):!1;return c||p?!0:((l=n.confirmedAttendees)==null?void 0:l.some(f=>f.name?z(f.name,t.text):!1))??!1})),t.category&&(i=i.filter(n=>{var c;return((c=n.category)==null?void 0:c.id)===t.category})),i},Te=()=>{const s=T(({groups:o})=>o==null?void 0:o.data),t=T(({groups:o})=>o==null?void 0:o.attendeeGroups),i=T(({groups:o})=>o==null?void 0:o.pendingOrRejectedAttendeeGroups),n=T(({groups:o})=>o==null?void 0:o.categories),{filters:c,setField:p,applyFilters:u}=te(_),l=c,f=g.useMemo(()=>B(s??[],l),[s,l.text,l.category]),y=g.useMemo(()=>B(t??[],l),[t,l.text,l.category]),x=g.useMemo(()=>B(i??[],l),[i,l.text,l.category]),h=g.useMemo(()=>({category:n?Object.fromEntries(Object.entries(n)):{}}),[n]);return{filteredGroupsData:f,filteredAttendeeGroups:y,filteredPendingOrRejectedGroups:x,filters:c,setField:p,applyFilters:u,optionMaps:h}},ee=({children:s,content:t,disabled:i=!1})=>!i&&t&&t.trim().length>0?e.jsx(k.Provider,{children:e.jsxs(k.Root,{children:[e.jsx(k.Trigger,{className:"cursor-not-allowed self-end",children:s}),e.jsx(k.Content,{children:t})]})}):e.jsx(e.Fragment,{children:s}),V=({data:s,isInvitations:t})=>{var N,w,A,L,a,W,q,U,J,$;const i=oe(),{reloadGroups:n,scrollToTop:c}=g.useContext(se),{joinGroup:p,acceptToGroup:u,rejectToGroup:l,leaveGroup:f,getGroup:y,crudHandler:x}=ae(),h=x("joinGroup"),o=x("acceptToGroup"),j=x("rejectToGroup"),b=x("leaveGroup"),[F,G]=g.useState(!1),v=r=>{switch(r){case"requestedByAttendee":return{color:"sky",text:d("groups.status.requestedByAttendee",{defaultValue:"Requested"})};case"rejected":return{color:"red",text:d("groups.status.rejected",{defaultValue:"Rejected"})};case"invitationSent":return{color:"yellow",text:d("groups.status.invitation",{defaultValue:"Invitation"})};default:return{color:"gray",text:d("groups.status.unknown",{defaultValue:"Unknown"})}}},I=()=>{var K,Q;const r=s!=null&&s.confirmedAttendeeGroups?((K=s==null?void 0:s.confirmedAttendeeGroups)==null?void 0:K.length)===0:!0,R=s!=null&&s.pe
1ndingAttendeeGroups?((Q=s==null?void 0:s.pendingAttendeeGroups)==null?void 0:Q.length)===0:!0;return r&&R},D=()=>{var r;return((r=s.pendingAttendeeGroups)==null?void 0:r.some(R=>R.status==="requestedByAttendee"))||!1};return g.useEffect(()=>{s!=null&&s.updateGroup&&y(s.id,{onFinish:r=>{i(de({id:s.id,data:{...r,updateGroup:!1}}))}})},[s==null?void 0:s.updateGroup]),e.jsxs(e.Fragment,{children:[e.jsx(Ne,{open:F,setOpen:G,groupId:s.id}),e.jsxs("div",{className:"w-full text-left border border-gray-200 rounded-lg p-4 hover:shadow-md transition-shadow bg-white",children:[e.jsxs("button",{type:"button",onClick:()=>!I()&&G(!0),className:ie("w-full text-left cursor-default",!I()&&"cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500"),children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex-1 flex items-center gap-3",children:[e.jsx("h3",{className:"font-semibold text-gray-900 text-label-lg",children:s.name}),D()&&e.jsxs(M.Root,{variant:"light",color:"orange",size:"small",className:"relative shrink-0",children:[d("groups.status.pendingRequests",{defaultValue:"Pending Requests"}),e.jsx(ne.Root,{color:"bg-orange-600"})]})]}),s.limit&&e.jsxs("div",{className:`text-sm px-2 py-1 rounded ${s.attendeesCount>=s.limit?"text-red-600 bg-red-100":"text-gray-600 bg-gray-100"}`,children:[s.attendeesCount," / ",s.limit]})]}),e.jsx(we,{email:(N=s.myAttendeeGroup)==null?void 0:N.groupPairEmail,className:"mb-3"}),s.confirmedAttendees&&s.confirmedAttendees.length>0?e.jsx("div",{className:"mb-3 pb-3 border-b border-gray-100",children:e.jsx("div",{className:"flex flex-wrap gap-3",children:s.confirmedAttendees.map(r=>e.jsxs(Y,{to:X(Z.profile.full,{profileId:r.hash}),className:"inline-flex items-center hover:bg-gray-50 px-2 py-2 rounded transition-colors",onClick:R=>{R.stopPropagation()},children:[e.jsx(S.Root,{size:"40",children:e.jsx(S.Image,{src:r.avatar,alt:r.name})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 m-0",children:r.name}),r.headline&&e.jsx("p",{className:"text-xs text-gray-500 m-0",children:r.headline})]})]},r.id))})}):e.jsx(e.Fragment,{children:s.owner&&e.jsx("div",{className:"mb-3 pb-3 border-b border-gray-100",children:e.jsx("div",{className:"flex flex-wrap gap-3",children:e.jsxs(Y,{to:X(Z.profile.full,{profileId:s.owner.hash}),className:"inline-flex items-center hover:bg-gray-50 px-2 py-2 rounded transition-colors",onClick:r=>{r.stopPropagation()},children:[e.jsx(S.Root,{size:"40",children:e.jsx(S.Image,{src:s.owner.avatar,alt:s.owner.name})}),e.jsxs("div",{className:"ml-3",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900 m-0",children:s.owner.name}),s.owner.headline&&e.jsx("p",{className:"text-xs text-gray-500 m-0",children:s.owner.headline})]})]},s.owner.id)})})})]}),t&&s.myAttendeeGroup&&e.jsx("div",{className:"mb-3 pb-3 border-b border-gray-100",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(M.Root,{variant:"filled",size:"small",color:v(s.myAttendeeGroup.status).color,children:e.jsx("span",{className:"text-label-xs font-semibold text-white",children:v(s.myAttendeeGroup.status).text})}),s.myAttendeeGroup.rejectedReason&&e.jsx("span",{className:"text-sm text-gray-600 italic",children:s.myAttendeeGroup.rejectedReason})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row justify-between align-center gap-3 md:gap-2",children:[e.jsxs("div",{className:"flex mt-auto gap-2",children:[((w=s.category)==null?void 0:w.name)&&e.jsx(M.Root,{variant:"light",size:"small",children:s.category.name}),e.jsx(Ae,{joinCode:s.joinCode})]}),e.jsxs("div",{className:"flex gap-2 items-center",children:[s.permissions.canInviteAny&&e.jsx(Le,{groupId:s.id,onUpdate:()=>n(),triggerHasFullWidth:!0}),s.permissions.canJoin!==void 0&&e.jsx(ee,{content:(A=s.permissionsInfo)==null?void 0:A.canJoin,disabled:s.permissions.canJoin||h.isLoading,children:e.jsxs(P.Root,{size:"small",disabled:h.isLoading||s.permissions.canJoin===!1,onClick:r=>{r.stopPropagation(),p(s.id,{onFinish:()=>c&&c()})},children:[h.isLoading&&e.jsx(E.Root,{size:"sm"}),d("general.join")]})}),((L=s==null?void 0:s.myAttendeeGroup)==null?void 0:L.permissions.canAccept)!==void 0&&((a=s.myAttendeeGroup)==null?void 0:a.status)!=="confirmed"&&e.jsx(ee,{content:(q=(W=s.myAttendeeGroup)==null?void 0:W.permissionsInfo)==null?void 0:q.canAccept,disabled:((U=s.myAttendeeGroup)==null?void 0:U.permissions.canAccept)||o.isLoading||j.isLoading,children:e.jsxs(P.Root,{size:"small",disabled:((J=s.myAttendeeGroup)==null?void 0:J.permissions.canAccept)===!1||o.isLoading||j.isLoading,onClick:r=>{r.stopPropagation(),u(s.id,s.myAttendeeGroup.id,{onFinish:()=>n()})},children:[o.isLoading&&e.jsx(E.Root,{size:"sm"}),d("general.accept")]})}),(($=s==null?void 0:s.myAttendeeGroup)==null?void 0:$.permissions.canReject)&&e.jsxs(P.Root,{size:"small",variant:"error",disabled:j.isLoading||o.isLoading,onClick:r=>{r.stopPropagation(),l(s.id,s.myAttendeeGroup.id,{onFinish:()=>n()})},children:[j.isLoading&&e.jsx(E.Root,{size:"sm"}),d("general.reject")]}),s.permissions.canLeave&&e.jsxs(C.Root,{children:[e.jsx(C.Trigger,{asChild:!0,children:e.jsx(P.Root,{size:"small",variant:"neutral",mode:"stroke",disabled:b.isLoading,children:e.jsx(Ge,{size:16})})}),e.jsx(C.Content,{children:e.jsxs(C.Item,{disabled:b.isLoading,className:"text-red-600 hover:text-red-700 hover:bg-red-50 focus:text-red-700 focus:bg-red-50",onSelect:r=>{r.preventDefault(),r.stopPropagation(),f(s.id,{onFinish:()=>n()})},children:[!b.isLoading&&e.jsx(C.ItemIcon,{as:ve,className:"text-red-600"}),b.isLoading&&e.jsx(E.Root,{size:"sm"}),d("groups.action.leave",{defaultValue:"Leave"})]})})]})]})]})]})]})},Fe=({img:s})=>{const[t,i]=g.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",onClick:()=>i(!0),children:e.jsx("img",{className:"max-h-[600px] w-full object-contain",src:s,alt:""})}),e.jsx(Ie,{open:t,close:()=>i(!1),slides:[{src:s}],render:{buttonPrev:()=>null,buttonNext:()=>null},carousel:{finite:!0}})]})},De=({optionMaps:s})=>{const{id:t}=le(),i=Re("groups","groups.title",t),{filters:n,setField:c}=te(_),p=pe(n,_,{labels:je(),setField:c,optionMaps:s});return e.jsx(ge,{title:i,widgetId:re,activeFiltersCount:he(n,_),chips:p})},Se=()=>{var y,x,h,o,j,b,F,G,v,I,D,N,w,A,L;const s=T(({attendee:a})=>a==null?void 0:a.isLoggedIn),{groupsState:t,containerRef:i,isLoading:n,isError:c}=g.useContext(se);fe({id:re,scope:be});const{filteredGroupsData:p,filteredAttendeeGroups:u,filteredPendingOrRejectedGroups:l,optionMaps:f}=Te();return s?e.jsxs(xe,{variant:"scroll",scrollRef:i,children:[e.jsx(H,{FallbackComponent:()=>null,children:e.jsx(De,{optionMaps:f})}),e.jsxs("div",{className:"w-full flex justify-center items-center flex-col gap-4",children:[n&&e.jsx(m.Body,{children:e.jsx(ce,{size:"2"})}),c&&e.jsx(ye,{error:{message:c}}),(((y=t.settings)==null?void 0:y.generalDescription)||((x=t.settings)==null?void 0:x.groupsImg))&&e.jsx(m,{children:e.jsxs(m.Body,{children:[((h=t.settings)==null?void 0:h.generalDescription)&&e.jsx("div",{dangerouslySetInnerHTML:{__html:(o=t.settings)==null?void 0:o.generalDescription}}),((j=t.settings)==null?void 0:j.groupsImg)&&e.jsx(Fe,{img:t.settings.groupsImg})]})}),!((b=t.settings)!=null&&b.joiningEnabled)&&e.jsx("div",{className:"w-full bg-white",children:e.jsx(Ce,{title:d("groups.info.joiningDisabled",{defaultValue:"Making changes has been disabled"}),description:d("groups.info.joiningDisabledDescription",{defaultValue:"The option to make changes has been disabled."}),variant:"info"})}),l.length>0&&e.jsx(m,{children:e.jsxs(m.Body,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx(O,{fontWeight:"semiBold",size:"1.5rem",text:((F=t.customNames)==null?void 0:F.myInvitations)||d("groups.message.invitations",{defaultValue:"Invitations"})}),((G=t.settings)==null?void 0:G.pendingGroupsDescription)&&e.jsx("div",{dangerouslySetInnerHTML:{__html:(v=t.settings)==null?void 0:v.pendingGroupsDescription}})]}),e.jsx("div",{className:"space-y-3",children:l.map(a=>e.jsx(V,{data:a,isInvitations:!0},a.id))})]})}),u.length>0&&e.jsx(m,{children:e.jsxs(m.Body,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx(O,{fontWeight:"semiBold",size:"1.5rem",text:((I=t.customNames)==null?void 0:I.myGroups)||d("groups.message.myGroups",{defaultValue:"My Groups"})}),((D=t.settings)==null?void 0:D.myGroupsDescription)&&e.jsx("div",{dangerouslySetInnerHTML:{__html:(N=t.settings)==null?void 0:N.myGroupsDescription}})]}),e.jsx("div",{className:"space-y-3",children:u.map(a=>e.jsx(V,{data:a},a.id))})]})}),p!==null&&p.length>0&&e.jsx(m,{children:e.jsxs(m.Body,{children:[e.jsxs("div",{className:"mb-4",children:[e.jsx(O,{fontWeight:"semiBold",size:"1.5rem",text:((w=t.customNames)==null?void 0:w.allGroups)||d("groups.message.allGroups",{defaultValue:"All Groups"})}),((A=t.settings)==null?void 0:A.allGroupsDescription)&&e.jsx("div",{dangerouslySetInnerHTML:{__html:(L=t.settings)==null?void 0:L.allGroupsDescription}})]}),e.jsx("div",{className:"space-y-3",children:p==null?void 0:p.map(a=>e.jsx(V,{data:a},a.id))})]})})]})]}):e.jsx("div",{className:"w-full flex justify-center items-center wrap",children:e.jsx(m,{children:e.jsx(ue,{padding:"1rem",icon:"fa-user-shield",text:d("general.register-to-enter"),register:!0})})})},Pe=()=>e.jsx(H,{FallbackComponent:()=>null,children:e.jsx(me,{children:e.jsx(Se,{})})}),As=()=>e.jsx(H,{FallbackComponent:()=>null,children:e.jsx(Pe,{})});
1export{As as default};
2//# sourceMappingURL=Groups-BwcdyY0W.js.map

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.