PageSourceSearch

https://academy.lidiabaer.de/chunk-Cc-uf72A.js

js lidiabaer.de collected 2026-10-02 15:53:50 UTC 50,858 bytes, 1 lines download raw bytes

1import {P,f as f$1}from'./chunk-X0GVJYIS.js';import {s}from'./chunk-DspwZ24X.js';import {h as h$1}from'./chunk-ObSpuADX.js';import {b}from'./chunk-Ct2Ukvq4.js';import {e as qS,bJ as DM,h as ta,F as eM,cv as EM,P as Pd,u as uT,I as tM,j as QM,ak as yM,y as yD,b4 as Me,aD as z,aE as W,g as g$1,b9 as G,gx as Ko,A as wi$1,a5 as _$1,x as f,a$ as M,em as M$1,j7 as ut,aM as c,b8 as $E,Y as YG,s as st,q as qd,K as Kf,jh as wp,ci as Ip,dO as D,O as On,cu as _I,c as Es,a7 as EI,L as cN,b5 as t$1,b6 as k,b7 as y,dU as se,j9 as A,ac as yt,H as gv,aF as u,ji as i,dV as y$1,e5 as v,bH as wr,aZ as bx,bp as EN,bq as CN,S as Ss,aV as Pt,$ as L,X as X8,J as J8,f as g$2,l as le,av as $,jj as g$3,aI as kt,jk as h$2,jl as A$1,aj as fM,i as Vv,Z as Zv,ax as sh,ay as ah,ai as jv,bn as Hd,bo as $d,jm as OG,at as oM,au as iM,aA as BM,N as H,af as wD,ah as eN,W as s$1,_ as r$1,bk as le$1,b0 as Oe,gK as Ax,am as w$1,t as t3,h2 as X,h3 as W$2,jn as w$2,n as eD,o as bM,aN as H$1,bA as g5,dL as U1,C as Ce,a0 as O,jo as He,br as ae$1,dv as si,bT as Qe,bU as Xn,fm as gn$1,G as Gd,bK as fN,dc as dN,aC as tN,d8 as nN,jp as S,jb as u$2,cB as jd,cC as Bv,cD as Vd,cH as ID,cI as XM,dd as iS,cJ as ED,de as aS,d7 as vD,m as iD,k as Pv,h6 as TN,dJ as wN,M as Ma,dm as nM,da as pN}from'./main-EX6XMYYT.js';import {u as u$1}from'./chunk-DPk9RzoS.js';import {e as er,U as Uo,$ as $m,W as Wo,w,a as ae,Z as Zo}from'./chunk-MZTwyltx.js';import {I as It,E,c as Ml,p as pt,M as Me$1,x as xn$1,K as Ki$1,q,Y,d as cm,B,f as ft,$ as $O}from'./chunk-CQfhJ9KC.js';import {W as W$1,U,g as ge}from'./chunk-PsGW1fL9.js';import'./chunk-y5DfS6do.js';import {e as ee,d as de}from'./chunk-OIM-cEHS.js';import'./chunk-B4SUdkKC.js';import'./chunk-BSDrKaVY.js';import'./chunk-B7C2_HVw.js';import'./chunk-DWbPHvAx.js';import'./chunk-C1EiWQHk.js';import {g as g$4,v as v$1,d}from'./chunk-D6E7esiH.js';import {$ as $e}from'./chunk-Cl_amkP3.js';import'./chunk-BwSUHUSH.js';import'./chunk-DC4V-6Wc.js';import'./chunk-CWMsQ05w.js';import'./chunk-BSMepEVL.js';import'./chunk-B5nk6Ix8.js';import'./chunk-BiYbbh4v.js';var g=["*"];function _(t,y){if(t&1&&(ta(0,"div",2),QM(1),Pd()),t&2){let n=yM();uT(),yD(n.title);}}var h=(()=>{class t{static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-not-found"]],inputs:{title:"title"},ngContentSelectors:g,decls:5,vars:1,consts:[[1,"rounded-lg"],[1,"flex","flex-col","items-center","text-center"],[1,"pb-4","text-lg","font-bold"]],template:function(e,v){e&1&&(DM(),ta(0,"mspot-nav-card-wrapper")(1,"mspot-card",0)(2,"mspot-card-content",1),eM(3,_,2,1,"div",2),EM(4),Pd()()()),e&2&&(uT(3),tM(v.title?3:-1));},dependencies:[h$1,b,s],encapsulation:2});}}return t})();var Se={PENDING_REVIEW:"pending-review",TRENDING:"trending",SPACES:"spaces"},ai=[{type:Se.PENDING_REVIEW,enabled:true,priority:1},{type:Se.TRENDING,enabled:true,priority:2},{type:Se.SPACES,enabled:true,priority:3}];function ci(t){if(!t?.length)return ai;let c=new Set(t.map(l=>l.type)),i=Math.max(...t.map(l=>l.priority))+1,n=ai.filter(l=>!c.has(l.type)).map(l=>s$1(r$1({},l),{priority:i+=1}));return [...t,...n]}var Fi=t=>({name:t});function Mi(t,c){if(t&1){let e=fM();Hd(0),ta(1,"h3",1),QM(2),Pd(),ta(3,"mspot-form-field-std",2)(4,"textarea",3),ID("ngModelChange",function(n){sh(e);let l=yM();return XM(l.rejectText,n)||(l.rejectText=n),ah(n)}),Pd(),iS(),Pd(),ta(5,"footer",4)(6,"button",5),Zv("click",function(){sh(e);let n=yM();return ah(n.closeDialog())}),QM(7),Pd(),ta(8,"button",6),Zv("click",function(){sh(e);let n=yM();return ah(n.accept())}),QM(9),Pd()(),$d();}if(t&2){let e=c.$implicit,i=yM();uT(2),Gd(" ",e("community.postReview.rejectDialog.title")," "),uT(),jv("label",e("community.postReview.rejectDialog.message",fN(5,Fi,i.dialogData))),uT(),ED("ngModel",i.rejectText),aS(),uT(3),Gd(" ",e("common.cancel")," "),uT(2),Gd(" ",e("community.postReview.actions.reject")," ");}}var mi=(()=>{class t{constructor(){this.dialogRef=g$1(O),this.dialogData=g$1(He);}closeDialog(){this.dialogRef.close({isRejected:false});}accept(){this.dialogRef.close({isRejected:true,rejectReason:this.rejectText});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-post-review-reject-dialog"]],hostAttrs:[1,"flex","flex-col","gap-6"],decls:1,vars:0,consts:[[4,"transloco"],[1,"heading3"],[3,"label"],["id","message","name","message","rows","4",1,"border-mspot-neutral-400","dark:bg-mspot-neutral-100","w-full","rounded-md","border","shadow-sm",3,"ngModelChange","ngModel"],[1,"grid","grid-cols-2","gap-3"],[1,"btn","btn-gray--stroked","overflow-ellipsis",3,"click"],[1,"btn","btn-primary","overflow-ellipsis",3,"click"]],template:function(i,n){i&1&&gv(0,Mi,10,7,"ng-container",0);},dependencies:[ae$1,yt,si,Qe,Xn,gn$1],encapsulation:2});}}return t})();var di=(()=>{class t{constructor(){this._dialogService=g$1(Ss);}
1open(e){return this._dialogService.open(mi,{data:e,dialogConfig:{panelClass:H.SIZE_384,disableClose:true}})}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=L({token:t,factory:t.\u0275fac,providedIn:"root"});}}return t})();var re=(()=>{class t{constructor(){this.#i=g$1(wi$1),this.#e=g$1(Ki$1),this.#n=g$1(Me$1),this.#t=g$1(Ss),this._spacePostReviewService=g$1(pt),this._postReviewRejectDialogService=g$1(di),this._schoolId$=g$1(f).selectSchoolId();}#i;#e;#n;#t;setPostStatus(e,i,n){return this._schoolId$.pipe(Kf(l=>this._spacePostReviewService.setPostStatus(l,e,i,n)))}onModeratorActionClicked(e,i){if(!i)throw new Error("onModeratorActionClicked: spacePost is undefined");switch(e){case "approve":this._approvePost(i);break;case "reject":this._rejectPost(i);break;case "delete":this._deletePost(i);break;}}_rejectPost(e){this._postReviewRejectDialogService.open(e?.user?.name??"").pipe(Pt(({isRejected:i})=>i),Kf(i=>this.setPostStatus(e.spaceId,e.id,{postState:"rejected",note:i.rejectReason}).pipe(this.#i.observeIntl()))).subscribe(()=>{this.#e.removePostFromQueryCache(e.schoolId,e.id,e.spaceId),this.#e.addPostToQueryCacheByPostType(e.schoolId,e,"rejected"),this.#e.updateSinglePostInQueryCache(e.schoolId,e.spaceId,e.id,{postState:"rejected"}),this.#e.invalidatePendingReviewCount(e.schoolId);});}_approvePost(e){this.setPostStatus(e.spaceId,e.id,{postState:"approved"}).pipe(this.#i.observeIntl()).subscribe(()=>{this.#e.removePostFromQueryCache(e.schoolId,e.id,e.spaceId),this.#e.addPostToQueryCacheByPostType(e.schoolId,e,"approved"),this.#e.updateSinglePostInQueryCache(e.schoolId,e.spaceId,e.id,{postState:"approved"}),this.#e.invalidatePendingReviewCount(e.schoolId);});}_deletePost(e){this.#t.confirm({title:"community.spacePostDeleteDialog.title",message:"community.spacePostDeleteDialog.message"}).subscribe(i=>i&&this.#n.deleteSpacePostMutation.mutate({schoolId:e.schoolId,spaceId:e.spaceId?.toString(),spacePostId:e.id})),this.#e.invalidatePendingReviewCount(e.schoolId);}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275prov=L({token:t,factory:t.\u0275fac});}}return t})();var Ai=()=>["/community","join-requests"],Ri=t=>({count:t});function Ei(t,c){if(t&1&&(Hd(0),ta(1,"a",1)(2,"span",2),Vv(3,"ng-icon",3),ta(4,"span"),QM(5),Pd()(),ta(6,"span",4),QM(7),Vv(8,"ng-icon",5),Pd()(),$d()),t&2){let e=c.$implicit,i=yM(2);uT(),jv("routerLink",dN(3,Ai)),uT(4),Gd(" ",e("banner.title",fN(4,Ri,i.pendingCount()))," "),uT(2),Gd(" ",e("banner.cta")," ");}}function Ni(t,c){t&1&&gv(0,Ei,9,6,"ng-container",0),t&2&&jv("translocoPrefix","spaceJoinRequest");}var li=(()=>{class t{constructor(){this._memberAreaQuery=g$1(f),this._joinRequests=g$1(w),this.space=X8.required(),this.schoolUser=X8(),this._schoolId=YG(this._memberAreaQuery.selectSchoolId()),this.isModeratorOfSpace=qd(()=>{let e=this.space(),i=this.schoolUser();return !e||!i?false:!!i.moderatorOfSpaces?.includes(e.id)}),this._spaceId=qd(()=>{let e=this.space();if(!(!e||e.visibility!=="private"))return this.isModeratorOfSpace()?e.id:void 0}),this._pendingStatus=On("pending"),this._pageIndex=On(0),this._pageSize=On(1),this._pendingQuery=this._joinRequests.useListForSpace(this._schoolId,this._spaceId,this._pendingStatus,this._pageIndex,this._pageSize),this.pendingCount=qd(()=>this._pendingQuery.data()?.total??0),this.visible=qd(()=>{let e=this.space();return !e||e.visibility!=="private"?false:this.isModeratorOfSpace()&&this.pendingCount()>0});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-pending-requests-banner"]],hostAttrs:[1,"contents"],inputs:{space:[1,"space"],schoolUser:[1,"schoolUser"]},features:[cN([],[$({heroBellAlert:A$1,heroArrowRight:h$2})])],decls:1,vars:1,consts:[[4,"transloco","translocoPrefix"],[1,"bg-primary","mb-4","flex","items-center","justify-between","gap-3","rounded-lg","px-4","py-3","text-sm","font-semibold","text-white","shadow-sm","transition-[filter]","hover:brightness-90",3,"routerLink"],[1,"flex","items-center","gap-2"],["name","heroBellAlert","size","1.25rem",1,"shrink-0"],[1,"flex","shrink-0","items-center","gap-1"],["name","heroArrowRight","size","1rem"]],template:function(i,n){i&1&&eM(0,Ni,1,1,"ng-container"),i&2&&tM(n.visible()?0:-1);},dependencies:[yt,kt,le],encapsulation:2});}}return t})();var Ui=t=>({count:t});function Vi(t,c){if(t&1){let e=fM();ta(0,"button",2),Zv("click",function(){sh(e);let n=yM(2);
1return ah(n.clicked.emit())}),Vv(1,"ng-icon",3),ta(2,"span"),QM(3),Pd()();}if(t&2){let e=yM().$implicit,i=yM();uT(3),Gd(" ",e(i.count()===1?"community.newPostsAvailable.singular":"community.newPostsAvailable.plural",fN(1,Ui,i.count()))," ");}}function Li(t,c){if(t&1&&(Hd(0),eM(1,Vi,4,3,"button",1),$d()),t&2){let e=yM();uT(),tM(e.count()>0?1:-1);}}var pi=(()=>{class t{constructor(){this.count=X8.required(),this.clicked=J8();}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-new-posts-pill"]],hostAttrs:[1,"sticky","top-[calc(var(--content-top-offset,0px)+0.5rem)]","z-30","flex","h-0","justify-center"],inputs:{count:[1,"count"]},outputs:{clicked:"clicked"},features:[cN([],[$({heroArrowUp:g$3})])],decls:1,vars:0,consts:[[4,"transloco"],["type","button","mspotButton","","variant","strong","color","primary","aria-live","polite",1,"flex","items-center","gap-2","rounded-full","px-4","py-2","text-sm","font-medium","shadow-md"],["type","button","mspotButton","","variant","strong","color","primary","aria-live","polite",1,"flex","items-center","gap-2","rounded-full","px-4","py-2","text-sm","font-medium","shadow-md",3,"click"],["name","heroArrowUp","aria-hidden","true",1,"text-base"]],template:function(i,n){i&1&&gv(0,Li,2,1,"ng-container",0);},dependencies:[yt,g$2,le],encapsulation:2});}}return t})();function Qi(t,c){}function ji(t,c){if(t&1){let e=fM();Vv(0,"mspot-pending-requests-banner",0),ta(1,"mspot-new-posts-pill",1),Zv("clicked",function(){sh(e);let n=yM();return ah(n.onNewPostsPillClicked())}),Pd(),ta(2,"mspot-space",2),Zv("pinClicked",function(n){sh(e);let l=yM();return ah(l.pinClicked(n))})("loadNext",function(){sh(e);let n=yM();return ah(n.loadNext())})("moderatorActionClicked",function(n){sh(e);let l=yM();return ah(l.onModeratorActionClicked(n))}),Pd();}if(t&2){let e=yM();jv("space",e.space())("schoolUser",e.currentSchoolUser()),uT(),jv("count",e.newerPostsCount()),uT(),jv("space",e.space())("spacePosts",e.spacePosts())("isFeed",!e.space())("hasMore",e.spacePostQuery.hasNextPage())("isFetchingNextPage",e.spacePostQuery.isFetchingNextPage())("readOnly",e.readOnly())("currentSchoolUser",e.currentSchoolUser())("showModeratorActions",e.showModeratorActions())("isProLayout",e.isProLayout());}}function qi(t,c){t&1&&Vv(0,"mspot-feed-loading");}var De=(()=>{class t{constructor(){this._route=g$1(G),this.#i=g$1(Ko),this.#e=g$1(wi$1),this.#n=g$1(_$1),this.#t=g$1(f),this.#s=g$1(M),this.#o=g$1(E),this._feedFilterService=g$1(Ml),this.#r=g$1(pt),this.#a=g$1(M$1),this.#c=g$1(Me$1),this.#m=g$1(xn$1),this.#d=g$1(ut),this.#l=g$1(re),this._spaceFeedQueryService=g$1(Ki$1),this._window=g$1(c),this._logger=g$1($E),this.communityLayout=YG(this.#t.select("communityLayout").pipe(st(e=>e??"classic")),{initialValue:"classic"}),this.isProLayout=qd(()=>this.communityLayout()==="pro"),this.space$=this._route.params.pipe(st(e=>e.spaceId),Kf(e=>this.#a.selectEntity(e)),wp(this.#t.select()),Ip(([e,i])=>this.#i.setTitle(e?.name||i?.customView?.communityFeedTitle||i?.customView?.spacesLink||"Community")),st(([e])=>e)),this.space=YG(this.space$),this._routeSpaceId=D("spaceId"),this.currentSchoolUser$=this.#s.select(),this.currentSchoolUser=YG(this.currentSchoolUser$),this.isPrivateNoAccess=qd(()=>{if(!this._routeSpaceId())return  false;let e=this.space(),i=this.currentSchoolUser();return !e||!i?true:e.visibility!=="private"?false:!i.spaceAccess?.includes(e.id)}),this.spaceId=qd(()=>this.isPrivateNoAccess()?void 0:this._routeSpaceId()),this.selectedPostType=this.#o.selectedPostType,this.effectiveState=qd(()=>this.isProLayout()?this._feedFilterService.derivedState():this.#o.selectedPostType()),this.effectiveContentType=qd(()=>
1{if(this.isProLayout())return this._feedFilterService.derivedContentType()}),this.effectiveUpvoteStatuses=qd(()=>this._feedFilterService.derivedUpvoteStatuses()),this.effectiveSort=qd(()=>this._feedFilterService.selectedSort()),this.showModeratorActions=qd(()=>{let e=this.effectiveState();return e==="rejected"||e==="pending"}),this.spacePostQuery=this.#r.getCombinedPostsQuery(this.effectiveState,this.spaceId,qd(()=>this.currentSchoolUser()?.isModerator),On(void 0),this.effectiveContentType,this.effectiveUpvoteStatuses,this.effectiveSort),this.pinnedPostsQuery=this.#m.getPinnedPostsQuery(this.spaceId),this.spacePosts=qd(()=>this.spacePostQuery?.data()?.pages.flat()??[]),this.firstCachedPost=qd(()=>{let e=this.spacePosts()[0];if(!(!e||!e.publishedAt))return {id:e.id,publishedAt:e.publishedAt}}),this.newerPostsCountQuery=this.#r.getNewerPostsCountQuery(this.effectiveState,this.spaceId,this.firstCachedPost,this.effectiveSort,this.effectiveContentType,this.effectiveUpvoteStatuses),this.newerPostsCount=qd(()=>this.newerPostsCountQuery.data()?.count??0),this.readOnly$=_I([this.#s.selectComLegalConsent(),this.#t.select("spacesExternalConsent")]).pipe(st(([e,i])=>!e&&!i)),this.readOnly=YG(this.readOnly$,{initialValue:false}),this._spacePostTypeEffect=Es(()=>{if(this.effectiveState()!=="scheduled")return;let i=this.spacePostQuery;if(i.isFetching())return;i.data()?.pages?.[0]?.length===0&&(this.isProLayout()?this._feedFilterService.setFilter("all"):this.#o.setPostType("approved"));});}#i;#e;#n;#t;#s;#o;#r;#a;#c;#m;#d;#l;onDestroy(){let e=this.#t.getSchoolId(),i=this.spaceId();i&&this.#d.markSpacePostsAsReadMutation.mutate({schoolId:e,spaceId:i});let n=B(e,i,void 0),l=Y(e,i);this.#n.removeQueries({predicate:W=>n(W.queryKey)||l(W.queryKey)});}pinClicked(e){this.#c.pinUnpinMutation.mutate(e);}async onNewPostsPillClicked(){let e=this.#t.getSchoolId(),i=this.firstCachedPost();if(!e||!i)return;let n=this.spaceId();try{let l=await EI(this.#r.fetchNewerPosts(e,n,i.id,new Date(i.publishedAt),this.effectiveContentType(),this.effectiveUpvoteStatuses()));if(l.length>0){let we={schoolId:e,state:this.effectiveState(),spaceId:n,postId:void 0,contentType:this.effectiveContentType(),upvoteStatusesKey:q(this.effectiveUpvoteStatuses()),sort:this.effectiveSort()};this._spaceFeedQueryService.prependPostsToFeedCache(we,l);}this._window.scrollTo({top:0,behavior:"smooth"});let W=Y(e,n);this.#n.setQueriesData({predicate:we=>W(we.queryKey)},{count:0});}catch(l){this._logger.error(l,"Failed to fetch newer community posts"),this.#e.stdErrorIntl();}}loadNext(){let e=this.spacePostQuery;e&&e.fetchNextPage().catch(i=>{this._logger.error(i,"Failed to fetch next community feed page"),this.#e.stdErrorIntl();});}onModeratorActionClicked({action:e,spacePost:i}){this.#l.onModeratorActionClicked(e,i);}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-community-feed-view"]],hostAttrs:[1,"relative","block"],features:[cN([re])],decls:3,vars:1,consts:[[3,"space","schoolUser"],[3,"clicked","count"],[3,"pinClicked","loadNext","moderatorActionClicked","space","spacePosts","isFeed","hasMore","isFetchingNextPage","readOnly","currentSchoolUser","showModeratorActions","isProLayout"]],template:function(i,n){i&1&&eM(0,Qi,0,0)(1,ji,3,12)(2,qi,1,0,"mspot-feed-loading"),i&2&&tM(n.isPrivateNoAccess()?0:!n.spacePostQuery.isLoading()&&!n.pinnedPostsQuery.isLoading()?1:2);},dependencies:[er,Uo,pi,li],encapsulation:2});}}return t})();var ui=[{name:"community.menuItems.home",icon:"hero-home",dataCy:"community-home",path:"community/feed"}];var gi=(()=>{class t{constructor(){this.coverImageUrl=X8.required();}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-community-cover"]],inputs:{coverImageUrl:[1,"coverImageUrl"]},decls:2,vars:1,consts:[[1,"relative","aspect-[1440/408]","w-full","overflow-hidden","lg:rounded-lg"],["width","1440","height","408","priority","","alt","",1,"h-full","w-full","object-cover",3,"ngSrc"]],template:function(i,n){i&1&&(ta(0,"div",0),Vv(1,"img",1),Pd()),i&2&&(uT(),jv("ngSrc",n.coverImageUrl()));},dependencies:[OG],encapsulation:2});}}return t})();function hi(t,c){return Math.max(0,t-c)}var Wi=t=>({count:t}),Bi=(t,c)=>c._id;function Oi(t,c){t&1&&Vv(0,"span",8);}function $i(t,c){if(t&1&&(ta(0,"a",7),eM(1,Oi,1,0,"span",8),ta(2,"span",9)(3,"span",10)(4,"span",11),QM(5),Pd(),ta(6,"span",12),QM(7),EN(8,"eventTimeRange"),Pd()(),Vv(9,"ng-icon",13),Pd()()),t&2){let e=c.$implicit,i=c.$index,n=yM(2),l=n.isHighlighted(e,i);iD("bg-backgrounds-fill-brand-subtle",l),jv("queryParams",n.viewEventQueryParams(e._id)),Pv("data-cy","events-widget-item-"+e._id),uT(),tM(l?1:-1),uT(4),Gd(" ",e.title," "),uT(2),Gd(" ",TN(8,7,e.startsAt,e.endsAt,n.timeZone,n.locale())," ");}}function Gi(t,c){if(t&1&&(ta(0,"a",6),QM(1),Pd()),t&2){let e=yM().$implicit,i=yM();uT(),Gd(" ",e("widget.more",fN(1,Wi,i.remainingCount()))," ");}}function Ji(t,c){if(t&1&&(Hd(0),ta(1,"div",1),Vv(2,"ng-icon",2),ta(3,"span",3),QM(4),Pd()(),ta(5,"div",4),oM(6,$i,10,12,"a",5,Bi),Pd(),eM(8,Gi,2,3,"a",6),$d()),t&2){let e=c.$implicit,i=yM();uT(4),Gd(" ",e("widget.title")," "),uT(2),iM(i.events()),uT(2),tM(i.remainingCount()>0?8:-1);}}var fi=(()=>{class t{constructor(){this._eventsTanstack=g$1($e),this._transloco=g$1(Ce),this.timeZone=g$4(),this._now=On(new Date),this.upcomingQuery=this._eventsTanstack.getUpcomingQuery(this._now,2),this.locale=qd(()=>this._transloco.getActiveLang()),this.events=qd(()=>this.upcomingQuery.data()?.docs??[]),this.remainingCount=qd(()=>hi(this.upcomingQuery.data()?.totalDocs??0,this.events().length));}ngOnInit(){this._now.set(new Date);}isHighlighted(e,i){return i===0&&v$1(e,this._now())}viewEventQueryParams(e){return {[d]:e}}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-upcoming-events-widget"]],hostAttrs:[1,"block"],features:[cN([f$1()])],decls:1,vars:1,consts:[[4,"transloco","translocoPrefix"],[1,"mb-2","flex","items-center","gap-1.5"],["name","hero-calendar",1,"text-icons-subtle","text-base"],[1,"text-text-subtle","text-xs","font-medium"],[1,"flex","flex-col","gap-1"],["routerLink",".","queryParamsHandling","merge",1,"flex","min-h-8","w-full","items-stretch","overflow-hidden","rounded-md","text-left",3,"queryParams","bg-backgrounds-fill-brand-subtle"],["routerLink","/events","data-cy","events-widget-more",1,"text-text-link-default","mt-2","inline-flex","min-h-6","items-center","text-xs","font-medium"],["routerLink",".","queryParamsHandling","merge",1,"flex","min-h-8","w-full","items-stretch","overflow-hidden","rounded-md","text-left",3,"queryParams"],["aria-hidden","true",1,"bg-backgrounds-fill-brand-strong","w-[3px]","shrink-0"],[1,"flex","min-w-0","flex-1","items-center","gap-2","px-2","py-1.5"],[1,"flex","min-w-0","flex-1","flex-col","gap-px"],[1,"text-text-strong","truncate","text-xs","font-medium"],[1,"text-text-subtle","text-xs"],["name","hero-chevron-right",1,"text-icons-subtle","shrink-0","text-base"]],template:function(i,n){i&1&&gv(0,Ji,9,2,"ng-container",0),i&2&&jv("translocoPrefix","events");},dependencies:[kt,yt,le,P],encapsulation:2});}}return t})();var zi=t=>({count:t});function Hi(t,c){if(t&1){let e=fM();ta(0,"button",2),Zv("click",function(){sh(e);let n=yM(2);return ah(n.navigateToReports())}),Vv(1,"ng-icon",3),ta(2,"span",4),QM(3),Pd(),Vv(4,"ng-icon",5),Pd();}if(t&2){let e=yM().$implicit,i=yM();uT(3),vD(" ",i.openCount()," ",e("community.contentReport.widget.label",fN(2,zi,i.openCount()))," ");}}function Ki(t,c){if(t&1&&(Hd(0),eM(1,Hi,5,4,"button",1),$d()),t&2){let e=yM();uT(),tM(e.openCount()>0?1:-1);}}var _i=(()=>{class t{constructor(){this._router=g$1(H$1),this._visibility=g$1(ae),this.openCount=this._visibility.openContentReportsCount;}navigateToReports(){this._router.navigate(["/community","reports"]);}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-open-reports-widget"]],hostAttrs:[1,"contents"],decls:1,vars:0,consts:[[4,"transloco"],["type","button","data-cy","openReportsWidgetButton",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors"],["type","button","data-cy","openReportsWidgetButton",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors",3,"click"],["name","heroFlag",1,"text-icons-warning","shrink-0","text-xl"],[1,"text-text-default","min-w-0","flex-1","font-medium"],["name","heroChevronRight",1,"text-icons-subtle","shrink-0","text-base"]],template:function(i,n){i&1&&gv(0,Ki,2,1,"ng-container",0);},dependencies:[le,yt],encapsulation:2});}}return t})();function Zi(t,c){if(t&1){let e=fM();ta(0,"button",2),Zv("click",function(){sh(e);let n=yM(2);return ah(n.navigateToReview())}),Vv(1,"ng-icon",3),ta(2,"span",4),QM(3),Pd(),Vv(4,"ng-icon",5),Pd();}if(t&2){let e=yM().$implicit,i=yM();uT(3),vD(" ",i.pendingCount()," ",e("spaceJoinRequest.widget.label")," ");}}function Yi(t,c){if(t&1&&(Hd(0),eM(1,Zi,5,2,"button",1),$d()),t&2){let e=yM();uT(),tM(e.pendingCount()>0?1:-1);}}var vi=(()=>{class t{constructor(){this._router=g$1(H$1),this._activatedRoute=g$1(G),this._visibility=g$1(ae),this.pendingCount=this._visibility.pendingJoinRequestsCount;}navigateToReview(){this._router.navigate(["join-requests"],{relativeTo:this._activatedRoute});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-pending-join-requests-widget"]],hostAttrs:[1,"contents"],features:[cN([$({heroLockClosed:U1,heroChevronRight:X})])],decls:1,vars:0,consts:[[4,"transloco"],["type","button",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors"],["type","button",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors",3,"click"],["name","heroLockClosed",1,"text-icons-warning","shrink-0","text-xl"],[1,"text-mspot-neutral-700","min-w-0","flex-1","font-medium"],["name","heroChevronRight",1,"text-mspot-neutral-400","shrink-0","text-base"]],template:function(i,n){i&1&&gv(0,Yi,2,1,"ng-container",0);},dependencies:[le,yt],encapsulation:2});}}return t})();var Xi=(t,c)=>({current:t,total:c});function en(t,c){if(t&1&&QM(0),t&2){let e=yM().$implicit;Gd(" ",e("gamificationUi.level.maxLevel")," ");}}function tn(t,c){if(t&1&&(QM(0),EN(1,"number"),EN(2,"number")),t&2){let e=yM().$implicit,i=yM();Gd(" ",e("gamificationUi.level.pointsProgress",pN(5,Xi,CN(1,1,i.currentPoints),CN(2,3,i.nextThreshold)))," ");}}function nn(t,c){if(t&1&&(ta(0,"div",2)(1,"div",3),Vv(2,"mspot-community-member-
1avatar",4),ta(3,"span",5),QM(4),Pd()(),ta(5,"div",6)(6,"div",7)(7,"span",8),eM(8,en,1,1)(9,tn,3,8),Pd(),ta(10,"span",9),QM(11),EN(12,"number"),Pd()(),ta(13,"div",10),Vv(14,"div",11),Pd()()()),t&2){let e=yM();uT(2),jv("src",e.photoUrl)("alt",e.displayName)("customSizePx",40)("showGamification",true)("level",e.level)("progressPercentage",e.progressPercentage),uT(2),Gd(" ",e.displayName," "),uT(4),tM(e.isMaxLevel?8:9),uT(3),Gd(" ",wN(12,11,e.progressPercentage,"1.0-0"),"% "),uT(3),Ma("width",e.progressPercentage,"%");}}function on(t,c){t&1&&(Vv(0,"div",0),gv(1,nn,15,14,"div",1)),t&2&&(uT(),jv("translocoScope","gamificationUi"));}function rn(t,c){if(t&1&&eM(0,on,2,1),t&2){let e,i=yM();tM((e=i.levelProgress())?0:-1,e);}}var Ci=(()=>{class t{constructor(){this._gamificationService=g$1(le$1),this._schoolUserService=g$1(Oe),this._communityProfile=this._schoolUserService.getCommunityProfile(),this.isLevelsEnabled=this._gamificationService.isLevelsEnabled,this.levelProgress=qd(()=>{let e=this._communityProfile.data();if(!e?.badges?.length)return null;let i=W$1(e.badges);return i.hasActivity?{level:i.level,progressPercentage:i.progressPercentage,photoUrl:e.photoUrl,displayName:e.displayName,currentPoints:i.totalPoints,nextThreshold:i.nextThreshold,isMaxLevel:i.nextThreshold==null}:null});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-community-gamification-progress"]],hostAttrs:[1,"block","contents"],features:[cN([u$1()])],decls:1,vars:1,consts:[[1,"border-borders-secondary","mb-4","mt-2","border-t"],["class","bg-backgrounds-canvas flex flex-col gap-4 roun
1ded-lg p-2",4,"transloco","translocoScope"],[1,"bg-backgrounds-canvas","flex","flex-col","gap-4","rounded-lg","p-2"],[1,"flex","items-center","gap-3"],[3,"src","alt","customSizePx","showGamification","level","progressPercentage"],[1,"text-text-strong","min-w-0","flex-1","truncate","text-sm","font-medium"],[1,"flex","flex-col","gap-1"],[1,"flex","items-center","gap-4"],[1,"text-text-subtle","min-w-0","flex-1","text-xs"],[1,"text-text-default","shrink-0","text-sm","font-medium"],[1,"bg-backgrounds-subtle","h-1","w-full","overflow-clip","rounded-full"],[1,"bg-primary","h-1","rounded-full","transition-all"]],template:function(i,n){i&1&&eM(0,rn,1,1),i&2&&tM(n.isLevelsEnabled()?0:-1);},dependencies:[yt,U,Ax],encapsulation:2});}}return t})();var sn=t=>({count:t});function an(t,c){if(t&1){let e=fM();ta(0,"button",2),Zv("click",function(){sh(e);let n=yM(2);return ah(n.navigateToPendingFeed())}),Vv(1,"ng-icon",3),ta(2,"span",4),QM(3),Pd(),Vv(4,"ng-icon",5),Pd();}if(t&2){let e=yM().$implicit,i=yM();uT(3),vD(" ",i.pendingCount()," ",e("community.pendingReview.label",fN(2,sn,i.pendingCount()))," ");}}function cn(t,c){if(t&1&&(Hd(0),eM(1,an,5,4,"button",1),$d()),t&2){let e=yM();uT(),tM(e.pendingCount()>0?1:-1);}}var xi=(()=>{class t{constructor(){this._router=g$1(H$1),this._activatedRoute=g$1(G),this._visibility=g$1(ae),this.pendingCount=this._visibility.pendingCount;}navigateToPendingFeed(){this._router.navigate(["feed"],{relativeTo:this._activatedRoute,queryParams:{filter:"pending"},queryParamsHandling:"merge"});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-pending-review-widget"]],hostAttrs:[1,"block","contents"],features:[cN([$({heroShieldExclamation:g5,heroChevronRight:X})])],decls:1,vars:0,consts:[[4,"transloco"],["type","button",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors"],["type","button",1,"hover:bg-backgrounds-surface-raisedHovered","flex","h-8","w-full","items-center","gap-2","rounded-md","py-1.5","text-left","text-xs","transition-colors",3,"click"],["name","heroShieldExclamation",1,"shrink-0","text-xl","text-orange-500"],[1,"text-mspot-neutral-700","min-w-0","flex-1","font-medium"],["name","heroChevronRight",1,"text-mspot-neutral-400","shrink-0","text-base"]],template:function(i,n){i&1&&gv(0,cn,2,1,"ng-container",0);},dependencies:[le,yt],encapsulation:2});}}return t})();var yi=(()=>{class t{constructor(){this.spacePostId=X8.required(),this.spaceId=X8.required(),this.title=X8(),this.authorUid=X8(),this.authorName=X8.required(),this.authorPhotoUrl=X8(),this.onClickAction=X8.required(),this.safeAuthorUid=qd(()=>!this.authorUid()||this.authorName()===S?"":this.authorUid());}onClick(){this.onClickAction()(this.spaceId(),this.spacePostId());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-trending-post-slide"]],hostAttrs:[1,"block","py-1","pr-2"],inputs:{spacePostId:[1,"spacePostId"],spaceId:[1,"spaceId"],title:[1,"title"],authorUid:[1,"authorUid"],authorName:[1,"authorName"],authorPhotoUrl:[1,"authorPhotoUrl"],onClickAction:[1,"onClickAction"]},decls:8,vars:7,consts:[["type","button",1,"focus-primary","hover:bg-mspot-neutral-100","dark:hover:bg-mspot-neutral-800/50","flex","w-full","cursor-pointer","flex-col","gap-1.5","rounded-md","border-none","bg-transparent","p-2","text-left","transition-colors",3,"click"],[1,"flex","items-center","gap-2"],[3,"uid","src","customSizePx"],[1,"text-mspot-neutral-500","truncate","text-xs","font-medium"],[1,"text-mspot-neutral-900","line-clamp-1","h-5","text-sm","font-semibold","leading-5"]],template:function(i,n){i&1&&(ta(0,"button",0),Zv("click",function(){return n.onClick()}),ta(1,"div",1),Vv(2,"mspot-community-profile-avatar",2),ta(3,"span",3),QM(4),EN(5,"communityUsername"),Pd()(),ta(6,"p",4),QM(7),Pd()()),i&2&&(uT(2),jv("uid",n.safeAuthorUid())("src",n.authorPhotoUrl())("customSizePx",24),uT(2),Gd(" ",CN(5,5,n.authorName())," "),uT(3),Gd(" ",n.title()||"Untitled"," "));},dependencies:[ge,u$2],encapsulation:2});}}return t})();var bi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-trending-widget-skeleton"]],hostAttrs:[1,"block"],decls:17,vars:0,consts:[[1,"mb-2","flex","items-center","gap-1.5"],[1,"skeleton","h-4","w-4","rounded"],[1,"skeleton","h-3","w-16","rounded"],[1,"rounded-md","p-2"],[1,"flex","items-center","gap-2"],[1,"skeleton","h-6","w-6","rounded-full"],[1,"skeleton","h-3","w-24","rounded"],[1,"mt-2"],[1,"skeleton","h-3.5","w-3/4","rounded"],[1,"mt-1","flex","items-center","justify-between","pl-1","pr-2"],[1,"flex","gap-1"],[1,"skeleton","h-1.5","w-4","rounded-full"],[1,"skeleton","h-1.5","w-1.5","rounded-full"],[1,"skeleton","h-5","w-5","rounded-full"]],template:function(i,n){i&1&&(jd(0,"div",0),Bv(1,"div",1)(2,"div",2),Vd(),jd(3,"div",3)(4,"div",4),Bv(5,"div",5)(6,"div",6),Vd(),jd(7,"div",7),Bv(8,"div",8),Vd()(),jd(9,"div",9)(10,"div",10),Bv(11,"div",11)(12,"div",12)(13,"div",12),Vd(),jd(14,"div",10),Bv(15,"div",13)(16,"div",13),Vd()());},encapsulation:2});}}return t})();var mn=()=>[],dn=(t,c)=>({current:t,total:c});function ln(t,c){t&1&&Vv(0,"mspot-trending-widget-skeleton");}function pn(t,c){if(t&1){let e=fM();ta(0,"button",11),Zv("click",function(){let n=sh(e).$index,l=yM(4);return ah(l.carousel()?.navigateToFrame(n))}),Pd();}if(t&2){let e=c.$index,i=yM(3).$implicit,n=yM();iD("w-4",n.currentFrameIndex()===e)("bg-primary",n.currentFrameIndex()===e)("w-1",n.currentFrameIndex()!==e)("bg-mspot-neutral-300",n.currentFrameIndex()!==e),Pv("aria-label",i("community.trending.slideLabel",pN(10,dn,e+1,n.totalFrames())))("aria-current",n.currentFrameIndex()===e?"true":null);}}function un(t,c){if(t&1){let e=fM();ta(0,"div",5)(1,"div",6),oM(2,pn,1,13,"button",7,nM),Pd(),ta(4,"div",6)(5,"button",8),Zv("click",function(){sh(e);let n=yM(3);return ah(n.carousel()?.moveToPrevSlide())}),Vv(6,"ng-icon",9),Pd(),ta(7,"button",8),Zv("click",function(){sh(e);let n=yM(3);return ah(n.carousel()?.moveToNextSlide())}),Vv(8,"ng-icon",10),Pd()()();}if(t&2){let e=yM(2).$implicit,i=yM();uT(2),iM(dN(4,mn).constructor(i.totalFrames())),uT(3),jv("disabled",!i.carousel()?.notFirstSlide()),Pv("aria-label",e("community.trending.previous")),uT(2),jv("disabled",!i.carousel()?.notLastSlide()),Pv("aria-label",e("community.trending.next"));}}function gn(t,c){if(t&1&&(ta(0,"div")(1,"div",1),Vv(2,"ng-icon",2),ta(3,"span",3),QM(4),Pd()(),Vv(5,"mspot-carou
1sel",4),eM(6,un,9,5,"div",5),Pd()),t&2){let e=yM().$implicit,i=yM();uT(4),Gd(" ",e("community.trending.title")," "),uT(),jv("slideItems",i.slideItems())("slidesToShow",1)("gap",8),uT(),tM(i.totalFrames()>1?6:-1);}}function hn(t,c){if(t&1&&(Hd(0),eM(1,ln,1,0,"mspot-trending-widget-skeleton")(2,gn,7,5,"div"),$d()),t&2){let e=yM();uT(),tM(e.trendingQuery.isLoading()?1:e.slideItems().length>0?2:-1);}}var Si=(()=>{class t{constructor(){this._api=g$1(ft),this._dialogService=g$1($O),this._logger=g$1($E),this._schoolId=YG(g$1(w$1)),this._visibility=g$1(ae),this.trendingQuery=this._visibility.trendingQuery,this.carousel=t3(de),this.totalFrames=qd(()=>this.carousel()?.totalFrames()??0),this.currentFrameIndex=qd(()=>this.carousel()?.currentFrameIndex()??0),this.slideItems=qd(()=>{let e=this.trendingQuery.data();return e?e.slice(0,5).map(i=>({component:yi,inputs:{spacePostId:i.spacePostId,spaceId:i.spaceId,title:i.title,authorUid:i.authorUid,authorName:i.authorName,authorPhotoUrl:i.authorPhotoUrl,onClickAction:this._onSlideClick}})):[]}),this._onSlideClick=async(e,i)=>{let n=this._schoolId();if(n)try{let l=await EI(this._api.getSpacePost(n,e,i));this._dialogService.openPostDialog(null,l,"feed").subscribe();}catch(l){this._logger.error("Failed to load trending post",l);}};}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-trending-widget"]],viewQuery:function(i,n){i&1&&eD(n.carousel,de,5),i&2&&bM();},hostAttrs:[1,"block","contents"],features:[cN([$({heroArrowTrendingUp:w$2,heroChevronLeft:W$2,heroChevronRight:X})])],decls:1,vars:0,consts:[[4,"transloco"],[1,"mb-2","flex","items-center","gap-1.5"],["name","heroArrowTrendingUp",1,"text-mspot-neutral-500","text-base"],[1,"text-mspot-neutral-500","text-xs","font-medium"],[3,"slideItems","slidesToShow","gap"],[1,"mt-1","flex","items-center","justify-between","gap-2","pl-1","pr-2"],[1,"flex","gap-1"],["type","button",1,"hover:bg-mspot-neutral-400","h-1.5","rounded-full","transition-all",3,"w-4","bg-primary","w-1","bg-mspot-neutral-300"],["type","button",1,"text-mspot-neutral-500","hover:text-mspot-neutral-700","disabled:opacity-30",3,"click","disabled"],["name","heroChevronLeft",1,"text-lg"],["name","heroChevronRight",1,"text-lg"],["type","button",1,"hover:bg-mspot-neutral-400","h-1.5","rounded-full","transition-all",3,"click"]],template:function(i,n){i&1&&gv(0,hn,3,1,"ng-container",0);},dependencies:[de,le,yt,bi],encapsulation:2});}}return t})();var fn=()=>[],_n=(t,c)=>c.type;function vn(t,c){t&1&&(ta(0,"section",1),Vv(1,"mspot-upcoming-events-widget"),Pd());}function Cn(t,c){t&1&&(ta(0,"section",1),Vv(1,"mspot-pending-review-widget"),Pd());}function xn(t,c){t&1&&(ta(0,"section",1),Vv(1,"mspot-pending-join-requests-widget"),Pd());}function yn(t,c){t&1&&(ta(0,"section",1),Vv(1,"mspot-open-reports-widget"),Pd());}function bn(t,c){if(t&1&&(eM(0,Cn,2,0,"section",1),eM(1,xn,2,0,"section",1),eM(2,yn,2,0,"section",1)),t&2){let e=yM().$implicit,i=yM();tM(e.enabled&&i.hasPendingContent()?0:-1),uT(),tM(e.enabled&&i.hasPendingJoinRequests()?1:-1),uT(),tM(e.enabled&&i.hasOpenContentReports()?2:-1);}}function Sn(t,c){t&1&&(ta(0,"section",1),Vv(1,"mspot-trending-widget"),Pd());}function wn(t,c){if(t&1&&eM(0,Sn,2,0,"section",1),t&2){let e=yM().$implicit,i=yM();tM(e.enabled&&i.hasTrendingContent()?0:-1);}}function Pn(t,c){if(t&1&&(ta(0,"section",2),Vv(1,"mspot-community-space-nav-list",3)(2,"mspot-community-gamification-progress"),Pd()),t&2){let e=yM(2);uT(),jv("spaces",e.spaces()??dN(1,fn));}}function Tn(t,c){if(t&1&&eM(0,bn,3,3)(1,wn,1,1)(2,Pn,3,2,"section",2),t&2){let e,i=c.$implicit;tM((e=i.type)==="pending-review"?0:e==="trending"?1:e==="spaces"?2:-1);}}var wi=(()=>{class t{constructor(){this._memberArea=YG(g$1(f).select()),this._widgets=qd(()=>this._memberArea()?.widgets??void 0),this._visibility=g$1(ae),this.spaces=X8([]),this.sortedWidgets=qd(()=>ci(this._widgets()).sort(ee)),this.hasPendingContent=this._visibility.hasPendingContent,this.hasPendingJoinRequests=this._visibility.hasPendingJoinRequests,this.hasOpenContentReports=this._visibility.hasOpenContentReports,this.hasTrendingContent=this._visibility.hasTrendingContent,this.hasUpcomingEvents=this._visibility.hasUpcomingEvents;}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-community-sidebar"]],hostAttrs:[1,"block"],inputs:{spaces:[1,"spaces"]},decls:4,vars:1,consts:[[1,"bg-backgrounds-surface-raised","card-ring-color","divide-borders-primary","flex","flex-col","divide-y","rounded-lg","p-4","shadow","ring-1","backdrop-blur-sm"],[1,"py-4","first:pt-0","last:pb-0"],[1,"flex","flex-col","gap-3","py-4","first:pt-0","last:pb-0"],[3,"spaces"]],template:function(i,n){i&1&&(ta(0,"div",0),eM(1,vn,2,0,"section",1),oM(2,Tn,3,1,null,null,_n),Pd()),i&2&&(uT(),tM(n.hasUpcomingEvents()?1:-1),uT(),iM(n.sortedWidgets()));},dependencies:[Zo,Ci,Si,xi,vi,fi,_i],encapsulation:2});}}return t})();function In(t,c){if(t&1&&(Vv(0,"mspot-community-top-navigation",1),EN(1,"async"),EN(2,"async")),t&2){let e=yM(2);
1jv("isFeed",CN(1,3,e.isFeed$))("showSpaceFilters",CN(2,5,e.spaceFilterDisabled$)===false)("isProLayout",false);}}function kn(t,c){t&1&&Vv(0,"mspot-community-cover",5),t&2&&jv("coverImageUrl",c);}function Dn(t,c){if(t&1&&eM(0,kn,1,1,"mspot-community-cover",5),t&2){let e,i=yM(2);tM((e=i.communityCoverImageUrl())?0:-1,e);}}function Fn(t,c){if(t&1&&(Vv(0,"mspot-community-top-navigation",6),EN(1,"async"),EN(2,"async"),ta(3,"div",7),Vv(4,"mspot-feed-filter-select",8),Pd()),t&2){let e=yM(2);jv("isFeed",CN(1,6,e.isFeed$))("showSpaceFilters",CN(2,8,e.spaceFilterDisabled$)===false)("isProLayout",true),uT(4),jv("hasPostModerationAccess",e.hasPostModerationAccess())("hasScheduledPosts",e.hasScheduledPosts())("showBadge",e.hasPostModerationAccess()&&e.hasPendingPosts());}}function Mn(t,c){if(t&1&&(Vv(0,"mspot-community-sidebar",4),EN(1,"async")),t&2){let e=yM(2);jv("spaces",CN(1,1,e.spaces$));}}function An(t,c){if(t&1&&(ta(0,"div"),eM(1,In,3,7,"mspot-community-top-navigation",1),ta(2,"div",2)(3,"div",3),eM(4,Dn,1,1),eM(5,Fn,5,10),ta(6,"div"),Vv(7,"router-outlet"),Pd()(),eM(8,Mn,2,3,"mspot-community-sidebar",4),Pd()()),t&2){let e=yM(),i=e.hideCommunityFeatures(),n=e.communityLayout()==="pro";BM(n&&!i?"max-width-client-community-with-sidebar sm:px-4":"max-width-client-community-no-sidebar sm:px-4"),uT(),tM(!n&&i===false?1:-1),uT(3),tM(n&&!i?4:-1),uT(),tM(n&&i===false?5:-1),uT(3),tM(n&&i===false&&e.gtLgSign()?8:-1);}}var Pi=(()=>{class t{constructor(){this._spacesQuery=g$1(M$1),this._memberAreaQuery=g$1(f),this._feedFilterService=g$1(Ml),this._pageBreadcrumbWidth=g$1(u),this.spaces$=this._spacesQuery.selectAll(),this.gtLgSign=YG(g$1(i)),this.ma$=this._memberAreaQuery.select(),this.spaceFilterDisabled$=this._memberAreaQuery.select("spaceFilterDisabled").pipe(st(e=>!!e)),this.menuItems=ui,this.communityLayout=YG(this._memberAreaQuery.select("communityLayout").pipe(st(e=>e??"classic")),{initialValue:"classic"}),this._communityCoverImageUrl=YG(this._memberAreaQuery.select("communityCoverImageUrl")),this._spaceId=D("spaceId"),this._allSpaces=YG(this._spacesQuery.selectAll()),this._currentSpace=qd(()=>{let e=this._spaceId();return this._allSpaces()?.find(i=>i.id===e)}),this.communityCoverImageUrl=qd(()=>{let e=this._currentSpace();if(!e?.hideCoverImage)return e?.coverImageUrl||this._communityCoverImageUrl()}),this.isFeed$=y$1("spaceId").pipe(st(e=>!e)),this._isPostDetails$=y$1("spacePostId").pipe(st(e=>!!e)),this._hideCommunityFeatures$=v("hideCommunityFeatures").pipe(st(e=>!!e)),this.hideCommunityFeatures=YG(_I([this._isPostDetails$,this._hideCommunityFeatures$]).pipe(st(([e,i])=>e||i))),this.hasPostModerationAccess=this._feedFilterService.hasPostModerationAccess,this.hasScheduledPosts=this._feedFilterService.hasScheduledPosts,this.hasPendingPosts=this._feedFilterService.hasPendingPosts,this._syncBreadcrumbWidth=Es(()=>{let e=this.communityLayout()==="pro",i=this.hideCommunityFeatures()??false;this._pageBreadcrumbWidth.setContainerClass(e&&!i?"max-width-client-community-with-sidebar":"max-width-client-community-no-sidebar");});}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-community-view"]],hostAttrs:[1,"block"],decls:2,vars:3,consts:[[3,"class"],["view","communityView",1,"max-width-client-community-no-sidebar","mb-4","flex","flex-col","md:mb-6",3,"isFeed","showSpaceFilters","isProLayout"],[1,"flex","flex-col","items-center","gap-8","lg:flex-row","lg:items-start","lg:gap-10"],[1,"flex","w-full","min-w-0","flex-grow","flex-col","gap-4","md:gap-6"],[1,"block","w-[320px]","shrink-0",3,"spaces"],[1,"-mt-[var(--client-content-top)]","block","sm:-mx-4","lg:mx-0","lg:mt-0",3,"coverImageUrl"],["view","communityView",1,"flex","w-full","flex-col",3,"isFeed","showSpaceFilters","isProLayout"],[1,"flex","items-center","justify-end","px-4","lg:hidden"],[3,"hasPostModerationAccess","hasScheduledPosts","showBadge"]],template:function(i,n){if(i&1&&(eM(0,An,9,6,"div",0),EN(1,"async")),i&2){let l;tM((l=CN(1,1,n.ma$))?0:-1,l);}},dependencies:[$m,gi,wi,Wo,wr,bx],encapsulation:2});}}return t})();var Fe=t=>(t.onDestroy(),true);function Rn(t,c){if(t&1){let e=fM();ta(0,"mspot-space-text-post",4),Zv("moderatorActionClicked",function(n){sh(e),yM();let l=tN(0),W=yM(2);return ah(W.onModeratorActionClicked(n,l))})("pinClicked",function(n){sh(e);let l=yM(3);return ah(l.onPinClicked(n))})("commentsUpdated",function(n){sh(e);let l=yM(3);return ah(l.updatePostCommentCount(n))}),Pd();}if(t&2){yM();let e=tN(0),i=yM(2);jv("forceShowAll",true)("editorAutofocus",false)("isDialogView",true)("spacePost",e)("showPin",!i.readOnly())("showComments",!i.isCommentsInSpaceDisabled()&&!i.spacePost().commentsDisabled)("scrollToComments",!!i.targetCommentId())("targetCommentId",i.targetCommentId()??null)("currentSchoolUser",i.currentSchoolUser())("readOnly",i.readOnly())("showModeratorActions",i.showModeratorActions()||false);}}function En(t,c){if(t&1&&(ta(0,"mspot-not-found",3)(1,"p"),QM(2),Pd()()),t&2){let e=yM(2).$implicit;jv("title",nN(e("community.notFound.title"))),uT(2),yD(e("community.notFound.message"));}}function Nn(t,c){if(t&1&&(wD(0),ta(1,"div",1),eM(2,Rn,1,11,"mspot-space-text-post",2)(3,En,3,3,"mspot-not-found",3),Pd()),t&2){let e=eN(yM(2).spacePost());uT(2),tM(e?2:3);}}function Un(t,c){t&1&&Vv(0,"mspot-feed-loading");}function Vn(t,c){if(t&1&&(Hd(0),eM(1,Nn,4,2,"div",1)(2,Un,1,0,"mspot-feed-loading"),$d()),t&2){let e=yM();uT(),tM(e.spacePostQuery.isLoading()?2:1);}}var Ti=(()=>{class t{constructor(){this._spacePostTanstack=g$1(Me$1),this._spaceFeedQueryService=g$1(Ki$1),this._postReviewDataService=g$1(re),this._schoolUserQuery=g$1(M),this._memberAreaQuery=g$1(f),this._notifications=g$1(ut),this._titleService=g$1(Ko),this._breadcrumbService=g$1(se),this._spacesQuery=g$1(M$1),this._noti=g$1(wi$1),this.spaceId=D("spaceId"),this.spacePostId=D("spacePostId"),this.targetCommentId=A("commentId"),this.spacePostQuery=this._spacePostTanstack.getSpacePostQuery(this.spaceId,this.spacePostId),this.spacePost=this.spacePostQuery.data,this.spaces=YG(this._spacesQuery.selectAll()),this.space=qd(()=>{let e=this.spaceId();return this.spaces()?.find(i=>i.id===e)}),this.breadcrumbEffect=Es(()=>{let e=this.spacePost(),i=this.space();this._breadcrumbService.set("@Space",{skip:false,label:i?.name||"Space"}),this._breadcrumbService.set("@Post",e?.title||"Post");}),this.titleEffect=Es(()=>{this._titleService.setTitle(this.spacePostQuery.data()?.title||"Post");}),this.currentSchoolUser=YG(this._schoolUserQuery.select()),this.isCommentsInSpaceDisabled=qd(()=>this.space()?.disableComments||false),this._markedPostIds=new Set,this._markPostAsReadEffect=Es(()=>{let e=this.spacePost();if(!e||this._markedPostIds.has(e.id))return;let i=this._notifications.notifications().find(n=>!n.isRead&&n.payload.type==="newPost"&&"spacePostId"in n.payload&&n.payload.spacePostId===e.id);i&&(this._markedPostIds.add(e.id),this._notifications.markOneAsReadMutation.mutate({schoolId:e.schoolId,notificationId:i._id},{onError:()=>{this._markedPostIds.delete(e.id);}}));}),this.readOnly$=_I([this._schoolUserQuery.selectComLegalConsent(),this._memberAreaQuery.select("spacesExternalConsent")]).pipe(st(([e,i])=>!e&&!i)),this.readOnly=YG(this.readOnly$,{initialValue:false}),this.showModeratorActions=qd(()=>{let e=this.spacePost(),i=this.currentSchoolUser();return !e||!i?false:e.postState!=="approved"&&(i.moderatorOfSpaces?.includes(e.spaceId)||e.user.uid===i.uid)});}onModeratorActionClicked(e,i){this._postReviewDataService.onModeratorActionClicked(e,i);}onPinClicked(e){this._spacePostTanstack.pinUnpinMutation.mutate(e,{onSuccess:()=>{this._spacePostTanstack.invalidateSpacePostQuery(this.spaceId(),this.spacePostId());}});}updatePostCommentCount(e){let i=this.spacePost();i&&(this._spacePostTanstack.invalidateSpacePostQuery(i.spaceId,i.id),this._spaceFeedQueryService.updatePostInFeedQueryCache(i,{allCommentCount:e}));}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=qS({type:t,selectors:[["mspot-space-post-view"]],features:[cN([re])],decls:1,vars:0,consts:[[4,"transloco"],[1,""],[3,"forceShowAll","editorAutofocus","isDialogView","spacePost","showPin","showComments","scrollToComments","targetCommentId","currentSchoolUser","readOnly","showModeratorActions"],[3,"title"],[3,"moderatorActionClicked","pinClicked","commentsUpdated","forceShowAll","editorAutofocus","isDialogView","spacePost","showPin","showComments","scrollToComments","targetCommentId","currentSchoolUser","readOnly","showModeratorActions"]],template:function(i,n){i&1&&gv(0,Vn,3,1,"ng-container",0);},dependencies:[yt,cm,h,Uo],encapsulation:2});}}return t})();var Ii={banner:{cta:"Anfragen pr\xFCfen",title:"{{count}} neue Beitrittsanfragen"},cta:{body:"Inhalte sind erst nach Freigabe sichtbar.",requestBtn:"Beitritt anfragen",title:"Privater Space"},leave:{confirmBody:"Damit geht der Zugriff zu <b>{{spaceName}}</b> verloren. Eine neue Anfrage ist m\xF6glich, muss aber wieder von einem Moderator freigegeben werden.",confirmBtn:"Verlassen",confirmTitle:"Space verlassen?",menuItem:"Space verlassen",menuTooltip:"Weitere Optionen"},requestModal:{description:"Beschreibung des Spaces:",editSubmit:"Nachricht aktualisieren",editTitle:"Nachricht bearbeiten",messageLabel:"Nachricht",submit:"Anfrage senden",title:"Beitritt anfragen"},review:{approveBtn:"Annehmen",confirmReject:"Ablehnen best\xE4tigen",empty:"Keine offenen Anfragen.",emptyTitle:"Alles erledigt",noteLabel:"Hinweis (optional, wird der Person mitgeteilt)",rejectBtn:"Ablehnen",requesterMessage:"Nachricht",title:"Beitrittsanfrage pr\xFCfen",viewProfile:"Profil ansehen"},status:{editMessage:"Nachricht bearbeiten",pendingBody:"Die Anfrage wurde \xFCbermittelt und wird von der Moderation gepr\xFCft.",pendingTitle:"Anfrage wartet auf Freigabe",reasonLabel:"Begr\xFCndung",rejectedTitle:"Anfrage wurde nicht angenommen",requestAgain:"Erneut anfragen"},toast:{approveFailed:"Freigabe fehlgeschlagen",approved:"Beitritt freigegeben",leaveFailed:"Space verlassen fehlgeschlagen",leaving:"Space wird verlassen\u2026",left:"Space verlassen",rejectFailed:"Ablehnen fehlgeschlagen",rejected:"Anfrage abgelehnt",requestFailed:"Anfrage konnte nicht gesendet werden",requestSent:"Anfrage gesendet",sending:"Anfrage wird gesendet\u2026",updateFailed:"Nac
1hricht konnte nicht aktualisiert werden",updated:"Nachricht aktualisiert",updating:"Nachricht wird aktualisiert\u2026"},transitionConfirm:{toSecretBody:"{{count}} Nutzer:innen verlieren ihren Zugriff durch diese \xC4nderung. Fortfahren?",toSecretTitle:"Sichtbarkeit auf 'Geheim' \xE4ndern"},visibility:{privateLabel:"Privat \u2014 Beitritt auf Anfrage"},widget:{label:"Beitrittsanfragen"}};var ki={banner:{cta:"Review requests",title:"{{count}} new join requests"},cta:{body:"Content becomes visible after approval.",requestBtn:"Request to join",title:"Private space"},leave:{confirmBody:"Access to <b>{{spaceName}}</b> will be lost. A new request is possible but requires moderator approval.",confirmBtn:"Leave",confirmTitle:"Leave space?",menuItem:"Leave space",menuTooltip:"More options"},requestModal:{description:"About this space:",editSubmit:"Update message",editTitle:"Edit message",messageLabel:"Message",submit:"Send request",title:"Request to join"},review:{approveBtn:"Approve",confirmReject:"Confirm reject",empty:"No pending requests.",emptyTitle:"All caught up",noteLabel:"Note (optional, will be shared with the requester)",rejectBtn:"Reject",requesterMessage:"Message",title:"Review join request",viewProfile:"View profile"},status:{editMessage:"Edit message",pendingBody:"The request was sent and is being reviewed by the moderators.",pendingTitle:"Request awaiting approval",reasonLabel:"Reason",rejectedTitle:"Request was not approved",requestAgain:"Request again"},toast:{approveFailed:"Approval failed",approved:"Join request approved",leaveFailed:"Could not leave space",leaving:"Leaving space\u2026",left:"Space left",rejectFailed:"Rejection failed",rejected:"Join request rejected",requestFailed:"Could not send request",requestSent:"Request sent",sending:"Sending request\u2026",updateFailed:"Could not update message",updated:"Message updated",updating:"Updating message\u2026"},transitionConfirm:{toSecretBody:"{{count}} users will lose access through this change. Continue?",toSecretTitle:"Change visibility to 'Secret'"},visibility:{privateLabel:"Private \u2014 join on request"},widget:{label:"Join requests"}};var Di=()=>({provide:Me,multi:true,useValue:{scope:"spaceJoinRequest",loader:t$1({de:Ii,en:ki})}});var jn={provide:Me,multi:true,useValue:{scope:"memberChat",loader:t$1({de:y,en:k})}},tc=[{path:"",component:Pi,data:{hideFooter:true,breadcrumb:{icon:"hero-user-group"}},providers:[It(),Di()],canActivate:[z],children:[{path:"feed",component:De,canDeactivate:[Fe],data:{breadcrumb:{skip:true},isFeed:true}},{path:"join-requests",loadComponent:()=>import('./chunk-B1ODB3if.js').then(t=>t.SpaceJoinReviewOverviewComponent),data:{breadcrumb:{skip:true},hideCommunityFeatures:true}},{path:"reports",loadComponent:()=>import('./chunk-f9kxfkcF.js').then(t=>t.ContentReportQueueComponent),data:{breadcrumb:{skip:true},hideCommunityFeatures:true}},{path:"profile/:userId",providers:[It(),W(),jn],loadComponent:()=>import('./chunk-03oZOt_D.js').then(t=>t.CommunityProfileComponent),data:{hideCommunityFeatures:true,breadcrumb:{skip:true}}},{path:":spaceId",data:{breadcrumb:{alias:"Space",skip:true}},children:[{path:"",component:De,canDeactivate:[Fe]},{path:":spacePostId",component:Ti,data:{breadcrumb:{alias:"Post"}}}]},{path:"",redirectTo:"feed",pathMatch:"full"}]}];var chunk7KQAWXZE=/*#__PURE__*/Object.freeze({__proto__:null,clientCommunityShellRoutes:tc});export{chunk7KQAWXZE as c,h};

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.