1import{c as jt,e as he,l as Ce,s as Jt}from"./chunk-4JCYTRQ6.js";import{B as ve,D as qt,O as ge,R as Yt,S as xe,ba as Wt,d as Ft,da as Ie,ea as Re,ga as Kt,ha as Me,ma as Zt}from"./chunk-LF3ALSUW.js";import{a as Gt}from"./chunk-J44N46VW.js";import{a as Se}from"./chunk-ONKY6DZF.js";import{c as Ht}from"./chunk-GNS6RQDO.js";import{b as kt,c as Vt,e as Ut}from"./chunk-ZJVNVFA2.js";import{Ca as vt,Ih as C,Ij as Qt,Jj as zt,Kb as Ot,Lb as P,Lh as Nt,Ma as gt,Mh as Lt,Pe as bt,Qa as It,S as pt,Te as Et,Va as Mt,Ye as Tt,Yh as At,_h as Dt,af as _t,ai as xt,cf as Ae,ci as Rt,df as Z,if as wt,mb as oe,mi as z,nb as ue,ob as ie,qb as ne,qi as Bt,ri as re,si as se,ti as fe,ui as $t,vi as De}from"./chunk-6Y6SJRNX.js";import{F as at,L as de,Q as St,S as yt}from"./chunk-STDQTB2J.js";import{da as Le,ma as le,pa as ht}from"./chunk-HOJB2KOO.js";import{I as ut,ab as dt,e as _,jb as W,k as Y,kb as ce,l as rt,m as te,p as ct,r as lt,zc as ft}from"./chunk-OLMDJNX5.js";import{t as Pt}from"./chunk-VMDE2SQU.js";import{c as Ct,d as $}from"./chunk-GEDR3PBK.js";import{e as K}from"./chunk-A26PE6T6.js";import{n as R,t as B,y as G}from"./chunk-F45KP72J.js";import{A,B as He,Cc as m,Db as we,Dc as d,Dd as a,Ea as ee,Ec as f,Ed as p,Fa as h,Fc as g,Ha as Ke,Ia as Te,Ja as D,Lb as u,Mc as Q,N as Ge,Pa as V,Qa as U,Sc as T,V as Ye,Vc as M,Xa as pe,Xb as O,_ as We,cc as E,dc as v,ec as Pe,ed as et,fd as F,gb as Ze,gc as Xe,gd as Ne,hc as b,hd as tt,ib as _e,jb as Je,od as H,pd as ot,r as qe,ra as X,sd as it,ud as nt,wc as j,z as S}from"./chunk-Z5YOIIAC.js";import{a as mt}from"./chunk-XHWV4DJW.js";import{a as st,c as w}from"./chunk-Y5HJX4PP.js";import{a as y,b as k,j as je,l as t,t as Fe}from"./chunk-ATLPHYUF.js";var Be=(()=>{let e=class e{static forRoot(o){return{ngModule:e,providers:o}}static forChild(o){return{ngModule:e,providers:o}}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({providers:[Ut,kt],imports:[G,Vt.forRoot()]}));let i=e;return i})();var ye=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C,P,Pt,Se,z,ge]}));let i=e;return i})();var Xt=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({providers:[Ht],imports:[C,Gt,z]}));let i=e;return i})();var J=je(st());function fo(i,e){if(i&1){let c=Q();d(0,"button",1),a(1,"translate"),a(2,"translate"),T("click",function(n){V(c);let r=M();return U(r.execute(n))}),g(3,"i",2),f()}i&2&&m("popupText",H(p(1,3,"PLAYER_CONTROLS.PLACE_ITEM_TOOLTIP")))("title",p(2,5,"PLAYER_CONTROLS.PLACE_ITEM_TOOLTIP"))}var ke=(()=>{let e=class e{constructor(o){t(this,"store");t(this,"item");t(this,"liveMode$");t(this,"nowMode$");t(this,"position$");this.store=o,this.liveMode$=o.select(dt).pipe(S(n=>n.baseItem.liveMode)),this.nowMode$=o.select(ce),this.position$=o.select(ve)}get canExecute(){return!this.item.isPlaced}get canExecuteRx(){return A(this.canEdit$,this.notLiveAndStarted$,this.notNowInLiveMode$,(o,n,r)=>o&&(n||r))}execute(o){this.store.dispatch(At(this.item)),o.stopPropagation()}get canEdit$(){return this.store.select(Z(this.item))}get notNowInLiveMode$(){return A(this.liveMode$,this.nowMode$,(o,n)=>({liveMode:o,nowMode:n})).pipe(S(o=>o.liveMode&&!o.nowMode.value))}get notLiveAndStarted$(){return A(this.nowMode$,this.position$,(o,n)=>({nowMode:o,position:n})).pipe(S(o=>!o.nowMode.value&&o.position.getTime()>0))}};t(e,"\u0275fac",function(n){return new(n||e)(O(_))}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-place-question-button"]],inputs:{item:"item"},standalone:!1,decls:2,vars:3,consts:[["class","ui mini icon button blue place-item-button","fuiPopup","","popupInverted","true","popupPlacement","top right",3,"popupText","title","click",4,"ngIf"],["fuiPopup","","popupInverted","true","popupPlacement","top right",1,"ui","mini","icon","button","blue","place-item-button",3,"click","popupText","title"],[1,"fa","fa-map-pin","e2e-place-item-button"]],template:function(n,r){n&1&&(b(0,fo,4,7,"button",0),a(1,"async")),n&2&&m("ngIf",r.canExecute&&p(1,1,r.canExecuteRx))},dependencies:[R,K,B,$],styles:[".ui.button[_ngcontent-%COMP%]{display:inline-block;height:2rem;margin:0 0 0 .5rem;padding:0;width:2rem}.ui.place-item-button.button[_ngcontent-%COMP%]{margin-right:0}"],changeDetection:0}));let i=e;return i})();function vo(i,e){if(i&1){let c=Q();d(0,"button",1),a(1,"translate"),T("click",function(n){return V(c),M().execute(n),U(n.stopPropagation())}),g(2,"i",2),f()}i&2&&m("popupText",H(p(1,2,"PLAYER_CONTROLS.ACTIVATE_ITEM_TOOLTIP")))}var Ve=(()=>{let e=class e{constructor(o){t(this,"store");t(this,"item");t(this,"showLiveMode");t(this,"liveMode$");this.store=o,this.liveMode$=this.store.select(W)}execute(o){this.store.dispatch(Dt(this.item)),o.stopPropagation()}get canExecute(){return!this.item.isPlaced&&!this.item.isActivated}get canExecuteRx(){return A(this.canEdit$,this.liveMode$,(o,n)=>(o!=null?o:!1)&&n)}get canEdit$(){return this.store.select(Z(this.item))}};t(e,"\u0275fac",function(n){return new(n||e)(O(_))}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-activate-question-button"]],inputs:{item:"item",showLiveMode:"showLiveMode"},standalone:!1,decls:2,vars:3,consts:[["class","ui icon button mini red","fuiPopup","","popupInverted","true","popupPlacement","top right",3,"popupText","click",4,"ngIf"],["fuiPopup","","popupInverted","true","popupPlacement","top right",1,"ui","icon","button","mini","red",3,"click","popupText"],[1,"ui","play","icon"]],template:function(n,r){n&1&&(b(0,vo,3,4,"button",0),a(1,"async")),n&2&&m("ngIf",r.canExecute&&p(1,1,r.canExecuteRx)&&r.showLiveMode)},dependencies:[R,K,B,$],styles:[".ui.button[_ngcontent-%COMP%]{display:inline-block;height:2rem;margin:0 0 0 .5rem;padding:0;width:2rem}"],changeDetection:0}));let i=e;return i})();function Co(i,e){if(i&1){let c=Q();d(0,"button",1),a(1,"translate"),T("click",function(n){V(c);let r=M();return U(r.execute(n))}),g(2,"i",2),f()}i&2&&m("popupText",H(p(1,2,"PLAYER_CONTROLS.MARK_END_TOOLTIP")))}var Ue=(()=>{let e=class e{constructor(o){t(this,"store");t(this,"item");t(this,"liveMode$");this.store=o,this.liveMode$=this.store.select(W)}execute(o){this.store.dispatch(xt(this.item)),o.stopPropagation()}get canExecute(){return this.item.isActivated&&this.item.duration===0}get canExecuteRx(){return A(this.canEdit$,this.liveMode$,(o,n)=>(o!=null?o:!1)&&n)}get canEdit$(){return this.store.select(Z(this.item))}};t(e,"\u0275fac",function(n){return new(n||e)(O(_))}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-mark-question-end-button"]],inputs:{item:"item"},standalone:!1,decls:2,vars:3,consts:[["class","ui mini green icon check button activate-item-button","fuiPopup","","popupInverted","true","popupPlacement","top right",3,"popupText","click",4,"ngIf"],["fuiPopup","","popupInverted","true","popupPlacement","top right",1,"ui","mini","green","icon","check","button","activate-item-button",3,"click","popupText"],[1,"ui","check","icon"]],template:function(n,r){n&1&&(b(0,Co,3,4,"button",0),a(1,"async")),n&2&&m("ngIf",p(1,1,r.canExecute&&r.canExecuteRx))},dependencies:[R,K,B,$],styles:[".ui.button[_ngcontent-%COMP%]{display:inline-block;height:2rem;margin:0 0 0 .5rem;padding:0;width:2rem}.ui.button[_ngcontent-%COMP%] .ui.icon[_ngcontent-%COMP%]{margin:0}"],changeDetection:0}));let i=e;return i})();var Mo=()=>["delete"];function So(i,e){if(i&1&&g(0,"hz-show-comments-button",4),i&2){let c=M();m("item",c.item)}}function yo(i,e){if(i&1&&g(0,"hz-mark-question-end-button",4),i&2){let c=M();m("item",c.item)}}function Oo(i,e){if(i&1&&(d(0,"span"),F(1),a(2,"amTimeAgo"),f()),i&2){let c=M();u(),Ne(p(2,1,c.item.dateCreated))}}function bo(i,e){if(i&1&&(d(0,"span"),F(1),f()),i&2){let c=M();u(),Ne(c.item.authorLocation)}}function Eo(i,e){if(i&1&&g(0,"hz-item-options",10),i&2){let c=M();m("baseItem",c.baseItem)("item",c.item)("itemOptionsState",c.itemOptions())("options",nt(4,Mo))}}var oo=(()=>{let e=class e{constructor(){t(this,"store",D(_));t(this,"item");t(this,"baseItem");t(this,"showLocation");t(this,"showComment");t(this,"voteOptions");t(this,"permission");t(this,"itemOptions",this.store.selectSignal(Ft));t(this,"votes",this.store.selectSignal(te));t(this,"getPermission",o=>this.store.select(_t(o)))}get currentUserVote(){let o=this.votes();return o[this.item.key]?o[this.item.key].currentUserVote:0}get showLiveMode(){return this.baseItem.showLiveMode}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-question-item"]],inputs:{item:"item",baseItem:"baseItem",showLocation:"showLocation",showComment:"showComment",voteOptions:"voteOptions",permission:"permission"},standalone:!1,decls:17,vars:21,consts:[["hzTab","",3,"item"],[1,"ui","header"],[3,"item",4,"ngIf"],[3,"item","permission","voteOptions","currentUserVote","basic"],[3,"item"],[3,"item","showLiveMode"],[1,"title",3,"innerHTML"],[4,"ngIf"],["class","question-menu","iconClass","ui small grey down chevron icon","position","top",3,"baseItem","item","itemOptionsState","options",4,"ngIf"],[1,"event-date",3,"innerHTML"],["
1iconClass","ui small grey down chevron icon","position","top",1,"question-menu",3,"baseItem","item","itemOptionsState","options"]],template:function(n,r){if(n&1&&(d(0,"hz-item",0),g(1,"icon-info"),d(2,"header")(3,"item-accessories",1),b(4,So,1,1,"hz-show-comments-button",2),g(5,"hz-vote-button",3)(6,"hz-place-question-button",4)(7,"hz-activate-question-button",5),b(8,yo,1,1,"hz-mark-question-end-button",2),f(),g(9,"a",6),a(10,"translate"),b(11,Oo,3,3,"span",7)(12,bo,2,1,"span",7)(13,Eo,1,5,"hz-item-options",8),a(14,"async"),f(),d(15,"extra-info"),g(16,"span",9),f()()),n&2){let s;m("item",r.item),j("e2e-title",r.item==null?null:r.item.titleText.trim()),u(4),m("ngIf",r.showComment),u(),m("item",r.item)("permission",r.permission)("voteOptions",r.voteOptions)("currentUserVote",r.currentUserVote)("basic",!1),u(),m("item",r.item),u(),m("item",r.item)("showLiveMode",r.showLiveMode),u(),m("ngIf",r.showLiveMode),u(),m("innerHTML",p(10,17,r.item.displayName||"COMMON.ANONYMOUS_USER"),we),u(2),m("ngIf",!r.showLocation),u(),m("ngIf",r.showLocation),u(),m("ngIf",(s=p(14,19,r.getPermission(r.item)))==null?null:s.edit),u(3),m("innerHTML",r.item.title,we)}},dependencies:[R,wt,Lt,ke,Ve,Ue,Re,Kt,Yt,B,$,bt],styles:["[_nghost-%COMP%] hz-item[_ngcontent-%COMP%]{display:block;padding:.6em 0}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-size:14px;line-height:1em}[_nghost-%COMP%] header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#000;margin-right:5px}[_nghost-%COMP%] header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#0006;display:inline-block;font-size:.875em;font-weight:400;line-height:1.5em}[_nghost-%COMP%] item-accessories[_ngcontent-%COMP%]{align-items:center;display:flex;margin-left:.5em}[_nghost-%COMP%] hz-show-comments-button[_ngcontent-%COMP%]{padding-right:.5em}[_nghost-%COMP%] extra-info[_ngcontent-%COMP%]{color:#0006}[_nghost-%COMP%] .itemTop{width:inherit}[_nghost-%COMP%] .itemTop .ui.content{margin-left:.3em;width:inherit}[_nghost-%COMP%] .ui.header item-accessories{float:right;margin-bottom:0}[_nghost-%COMP%] .question-menu[_ngcontent-%COMP%]{display:inline-flex}"],changeDetection:0}));let i=e;return i})();function _o(i,e){i&1&&(d(0,"div",6),g(1,"div",7),f())}function wo(i,e){i&1&&(d(0,"div",0),F(1,"TABS.NO_ITEMS"),f())}function Po(i,e){if(i&1&&g(0,"hz-question-item",9),i&2){let c=e.$implicit,o=M(2);m("item",c)("showComment",o.showComment)("voteOptions",o.voteOptions)("permission",o.permission)("showLocation",o.showLocation)("baseItem",o.baseItem)}}function No(i,e){if(i&1&&(d(0,"hz-list",8),b(1,Po,1,6,"ng-template"),f()),i&2){let c=M();m("items",c.items)("isQuestionsSection",c.isQuestionsSection)}}function Lo(i,e){if(i&1){let c=Q();d(0,"button",10),T("click",function(n){V(c);let r=M();return U(r.clickLoadMore(n))}),F(1," TABS.LOAD_MORE "),f()}i&2&&j("e2e-load-more-button",!0)}var io=(()=>{let e=class e{constructor(){t(this,"items");t(this,"baseItem");t(this,"title");t(this,"showLoadMore");t(this,"showLocation",!1);t(this,"showComment",!1);t(this,"isLoading");t(this,"icon");t(this,"permission");t(this,"voteOptions");t(this,"loadMore",new pe);t(this,"isQuestionsSection",!0)}clickLoadMore(o){this.loadMore.emit(o)}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-question-section"]],inputs:{items:"items",baseItem:"baseItem",title:"title",showLoadMore:"showLoadMore",showLocation:"showLocation",showComment:"showComment",isLoading:"isLoading",icon:"icon",permission:"permission",voteOptions:"voteOptions"},outputs:{loadMore:"loadMore"},standalone:!1,decls:8,vars:8,consts:[["translate",""],[1,"relative"],["class","ui inverted active dimmer",4,"ngIf"],["translate","",4,"ngIf"],[3,"items","isQuestionsSection",4,"ngIf"],["class","ui primary basic button fluid","translate","",3,"click",4,"ngIf"],[1,"ui","inverted","active","dimmer"],[1,"ui","loader"],[3,"items","isQuestionsSection"],[3,"item","showComment","voteOptions","permission","showLocation","baseItem"],["translate","",1,"ui","primary","basic","button","fluid",3,"click"]],template:function(n,r){n&1&&(d(0,"h2",0),g(1,"i"),F(2),f(),d(3,"div",1),b(4,_o,2,0,"div",2)(5,wo,2,0,"div",3)(6,No,2,2,"hz-list",4)(7,Lo,2,1,"button",5),f()),n&2&&(u(),et(ot("ui red ",r.icon," icon")),u(),tt(" ",r.title),u(2),m("ngIf",r.isLoading),u(),m("ngIf",!r.isLoading&&r.items.length===0),u(),m("ngIf",!r.isLoading),u(),m("ngIf",r.showLoadMore))},dependencies:[R,Ct,Nt,oo],styles:["h2[_ngcontent-%COMP%]{margin-bottom:1rem;margin-top:1rem}"],changeDetection:0}));let i=e;return i})();var Jn=(()=>{let e=class e{constructor(o,n,r,s,l,N){t(this,"interactionService");t(this,"store");t(this,"actions$");t(this,"logService");t(this,"itemsService");t(this,"graphService");t(this,"name","TABS.QUESTIONS_TAB");t(this,"color","#59585a");t(this,"icon","fa-question");t(this,"priority",5);t(this,"popularCount",5);t(this,"recentCount",10);t(this,"votingEnabled",!0);t(this,"inputText","");t(this,"baseItem");t(this,"tab");t(this,"linkAnchor");t(this,"parentId");
1t(this,"questionCreated",new pe);t(this,"enableDebug",!1);t(this,"state$");t(this,"popularItemsOrdered$");t(this,"liveMode$");t(this,"nowMode$");t(this,"position$");t(this,"grahpPositionNotAtInit$");t(this,"question$");t(this,"voteOptions$");t(this,"currentUserVote$");t(this,"questionPermission$");t(this,"votePermission$");this.interactionService=o,this.store=n,this.actions$=r,this.logService=s,this.itemsService=l,this.graphService=N,this.state$=o.interaction$,this.popularItemsOrdered$=this.store.select(lt),this.liveMode$=this.store.select(W),this.nowMode$=this.store.select(ce).pipe(We((x,q)=>(0,J.get)(x,"value")===(0,J.get)(q,"value"))),this.position$=this.store.select(ve),this.grahpPositionNotAtInit$=this.position$.pipe(S(x=>x&&x.getTime()!==0&&this.baseItem&&x.getTime()!==this.baseItem.start)),this.question$=this.store.select(ct),this.voteOptions$=this.store.select(ut),this.questionPermission$=this.store.select(Ae(w.question)),this.votePermission$=this.store.select(Ae(w.vote))}ngOnChanges(o){(0,J.get)(o,"tab")&&(this.initSettings(),this.loadQuestions())}isActive(o){return this.store.select(qt).pipe(S(n=>(0,J.filter)(n,r=>r.key===o.key).length>0))}initSettings(){this.name=this.tab.title,this.color=this.tab.color,this.icon=this.tab.icon,this.priority=this.tab.priority,this.popularCount=5,this.recentCount=10}onHoverOnPlaceItem(o){this.graphService.hoverOnPlaceItem(o)}onInputConentChanged(o){this.logService.printDebugInfo(this.enableDebug,this,"onInputConentChanged","content: ".concat(o)),this.interactionService.updateLatestQuestion(o)}submit(){this.interactionService.createQuestion()}popularLoadMore(){this.popularCount+=5,this.interactionService.loadPopularQuestions(this.popularCount)}recentLoadMore(){this.recentCount+=10,this.interactionService.loadRecentQuestions(this.recentCount)}loadQuestions(){this.interactionService.loadPopularQuestions(this.popularCount),this.interactionService.loadRecentQuestions(this.recentCount)}};t(e,"\u0275fac",function(n){return new(n||e)(O(zt),O(_),O(ue),O(St),O(Rt),O(Qt))}),t(e,"\u0275cmp",E({type:e,selectors:[["hz-interaction"]],inputs:{baseItem:"baseItem",tab:"tab",linkAnchor:"linkAnchor",parentId:"parentId"},outputs:{questionCreated:"questionCreated"},standalone:!1,features:[Ze],decls:21,vars:59,consts:[[3,"permission","action"],[3,"onInputConentChanged","onSubmit","maxRows","placeholder","inputContent","autoDisableWhenEmitOnSubmitEvent"],[1,"ui","middle","aligned","selection","hazu","list"],[3,"loadMore","title","items","icon","showLocation","showComment","voteOptions","permission","showLoadMore","isLoading","baseItem"],[3,"loadMore","title","showComment","voteOptions","icon","items","showLoadMore","permission","isLoading","baseItem"]],template:function(n,r){if(n&1&&(d(0,"hz-action-permitted",0),a(1,"async"),a(2,"translate"),d(3,"hz-autosize-editor",1),a(4,"translate"),a(5,"async"),T("onInputConentChanged",function(l){return r.onInputConentChanged(l)})("onSubmit",function(){return r.submit()}),f()(),d(6,"div",2)(7,"hz-question-section",3),a(8,"translate"),a(9,"async"),a(10,"async"),a(11,"async"),a(12,"async"),a(13,"async"),T("loadMore",function(){return r.popularLoadMore()}),f(),d(14,"hz-question-section",4),a(15,"translate"),a(16,"async"),a(17,"async"),a(18,"async"),a(19,"async"),a(20,"async"),T("loadMore",function(){return r.recentLoadMore()}),f()()),n&2){let s,l,N;m("permission",(s=p(1,27,r.questionPermission$))==null?null:s.create)("action",p(2,29,"TABS.ASK_A_QUESTION")),u(3),m("maxRows",5)("placeholder",p(4,31,"TABS.QUESTION_PLACEHOLDER"))("inputContent",p(5,33,r.question$))("autoDisableWhenEmitOnSubmitEvent",!0),u(4),m("title",p(8,35,"TABS.POPULAR"))("items",p(9,37,r.popularItemsOrdered$))("icon","fire")("showLocation",!0)("showComment",r.baseItem.commentsEnabled)("voteOptions",p(10,39,r.voteOptions$))("permission",(l=p(11,41,r.votePermission$))==null?null:l.create)("showLoadMore",!p(12,43,r.state$).isAllPopular)("isLoading",p(13,45,r.state$).isLoadingPopular)("baseItem",r.baseItem),j("e2e-popular-questions-section",!0),u(7),m("title",p(15,47,"TABS.RECENT"))("showComment",r.baseItem.commentsEnabled)("voteOptions",p(16,49,r.voteOptions$))("icon","fas fa-bolt")("items",p(17,51,r.state$).recentItems)("showLoadMore",!p(18,53,r.state$).isAllRecent)("permission",(N=p(19,55,r.votePermission$))==null?null:N.create)("isLoading",p(20,57,r.state$).isLoadingRecent)("baseItem",r.baseItem),j("e2e-recent-questions-section",!0)}},dependencies:[Ot,jt,io,B,$],styles:["[_nghost-%COMP%] hz-autosize-editor[_ng
1content-%COMP%]{display:block;margin:1.3rem 0 1rem}[_nghost-%COMP%] .ui.selection.list .list>.item{padding:2px 0!important}[_nghost-%COMP%] .relative{position:relative}[_nghost-%COMP%] hz-list-item[_ngcontent-%COMP%]{padding:0!important}"],changeDetection:0}));let i=e;return i})();var Oe=je(st());var Do=(()=>{let e=class e{constructor(){t(this,"actions$",D(ue));t(this,"store",D(_));t(this,"voteService",D(Ie));t(this,"queryService",D(It));t(this,"votesDataService",D(vt));t(this,"localStorage",D(yt));t(this,"vote$",oe(()=>this.actions$.pipe(ie(De),ne(()=>[this.store.select(le),this.store.select(te)]),S(([o,n,r])=>{let s=r[o.item.id]||{votes:[],isLoading:!1,currentUserVote:0,likes:0,dislikes:0,neutrals:0,totalScore:o.item.totalScore||0};n||(n=this.localStorage.getItem(de.HAZU_ANONYMOUS_USER));let l=new Date;return{item:o.item,itemVote:s,saveParemeters:{userId:n,value:o.vote,date:l}}}),X(o=>this.voteService.saveVote(o.item,o.itemVote,o.saveParemeters))),{dispatch:!1}));t(this,"reloadOnUserChange$",oe(()=>this.actions$.pipe(ie(pt)).pipe(ne(()=>this.store.select(te))).pipe(X(([o,n])=>(0,Oe.keys)(n).map(r=>re(r.toString()))))));t(this,"loadVote$",oe(()=>this.actions$.pipe(ie(re),ne(()=>[this.store.select(le),this.store.select(Le)]),He(([o,n,r])=>{let s=n;return r||(s=this.localStorage.getItem(de.HAZU_ANONYMOUS_USER)),this.queryService.getUserVotedItem(o.id,s).pipe(Ge(()=>qe(0)),Mt(),Ye(1),S(l=>se(o.id,l)))}))));t(this,"loadVotedUsers$",oe(()=>this.actions$.pipe(ie(se,De),ne(()=>[this.store.select(ft),this.store.select(ht),this.store.select(le),this.store.select(Le)]),X(([o,n,r,s,l])=>{let N=r;(!r||!l)&&(N=this.localStorage.getItem(de.HAZU_ANONYMOUS_USER)||r);let q=n.filter(L=>L.isItem||L.isQuestion).map(L=>L.key).map(L=>this.votesDataService.getVotes(L));return A(q).pipe(S(L=>({items:(0,Oe.flatten)(L),displayName:N})))}),X(o=>{let n=o.items.map(r=>this.queryService.getUser(r.loginId).pipe(S(s=>k(y({userName:s?s.displayName:r.loginId},r),{currentUserName:o.displayName}))));return A(n)}),S(o=>this.voteService.prepareVote(o)),S(o=>fe(o)))))}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275prov",ee({token:e,factory:e.\u0275fac}));let i=e;return i})();var no={},yr=rt(no,Y(re,(i,{id:e})=>k(y({},i),{[e]:k(y({},i[e]),{isLoading:!0,currentUserVote:0})})),Y(se,(i,{id:e,vote:c})=>k(y({},i),{[e]:k(y({},i[e]),{isLoading:!1,currentUserVote:c})})),Y(Bt,(i,{id:e})=>k(y({},i),{[e]:k(y({},i[e]),{isLoading:!1,currentUserVote:i[e].currentUserVote})})),Y(fe,(i,{items:e})=>y(y({},i),e)),Y($t,i=>y(y({},i),no)));var ro=[Ie];var be=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:ro}}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C,P]}));let i=e;return i})();var so=(()=>{let e=class e{constructor(o,n){t(this,"dataService");t(this,"eventDataService");this.dataService=o,this.eventDataService=n}markQuestionEnd(o,n){if(o.type!==w.question)throw new Error("Invalid item type: '".concat(o.type,"'. Only '").concat(w.question,"' is supported by this method"));let r=this.dataService.batchUpdate(),s=o.clone();s.duration=n.liveClock-s.date,s.placed=!0,s.isActivated=!1;let l=o.clone();return l.placed=!1,r.saveItem(s),r.remove(l),r.save()}placeQuestionIntoTimeline(o,n){if(o.type!==w.question)throw new Error("Invalid item type: '".concat(o.type,"'. Only '").concat(w.question,"' is supported by this method"));if(!o.parentId)throw new Error("Given question doesn't have parentId. You can place only questions from question tab");let r=this.dataService.batchUpdate(),s=o.clone();s.placed=!0,s.duration=30*1e3,s.date=n.position.getTime();let l=o.clone();return l.placed=!1,r.remove(l),r.saveItem(s),r.save()}activateToTimeline(o,n){if(o.type!==w.question)throw new Error("Invalid item type: '".concat(o.type,"'. Only '").concat(w.question,"' is supported by this method"));if(!o.parentId)throw new Error("Given question doesn't have parentId.");let r=this.dataService.batchUpdate(),s=o.clone();s.placed=!0,s.duration=0,s.isActivated=!0,s.date=n.position;let l=o.clone();l.isActivated=!0,l.date=n.position;let N=n.itemsMissingDuration||[],x=[l,s,...N];
1return r.saveItems(x),r.save()}unplaceQuestion(o){if(o.type!==w.question)throw new Error("Invalid item type: '".concat(o.type,"'. Only '").concat(w.question,"' is supported by this method"));if(!o.parentId)throw new Error("Given question doesn't have parentId.");let n=this.dataService.batchUpdate(),r=o.clone();return r.placed=!1,r.duration=0,r.date=0,r.isActivated=!1,n.saveItem(r),n.remove(o),n.save()}createNewQuestionItem(o){return Fe(this,null,function*(){let n=mt.newQuestion(o.question.text,o.user.loginId,o.user.displayName,o.question.baseItemId,o.user.location,o.user.locationGeoCode),r=this.dataService.batchUpdate(),{key:s}=r.saveItem(n);return r.addEventData(this.eventDataService.onQuestionCreatedEvent(s,o.user.loginId,o.question.baseItemId)),yield r.save(),s})}};t(e,"\u0275fac",function(n){return new(n||e)(Te(gt),Te(at))}),t(e,"\u0275prov",ee({token:e,factory:e.\u0275fac}));let i=e;return i})();var mo=[so];var Qe=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({providers:mo,imports:[C,z,be,Me,he,P]}));let i=e;return i})();var ze=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C,P,Wt]}));let i=e;return i})();var xo=typeof IntersectionObserver<"u"?IntersectionObserver:class{constructor(){t(this,"root",null);t(this,"rootMargin","");t(this,"thresholds",[])}observe(){}unobserve(){}disconnect(){}takeRecords(){return[]}},ao=new Ke("[INTERSECTION_ROOT]: Root element for IntersectionObserver"),Ro="0px 0px 0px 0px";function Bo(i){return i||Ro}var $o=0;function ko(i){return(i==null?void 0:i.split(",").map(parseFloat))||$o}var _s=(()=>{let e=class e extends xo{constructor(n,r){let s=D(ao,{optional:!0});super(l=>{this.callbacks.forEach((N,x)=>{let q=l.filter(({target:L})=>L===x);return q.length&&N(q,this)})},{root:s==null?void 0:s.nativeElement,rootMargin:Bo(n),threshold:ko(r)});t(this,"callbacks",new Map)}observe(n,r=()=>{}){super.observe(n),this.callbacks.set(n,r)}unobserve(n){super.unobserve(n),this.callbacks.delete(n)}ngOnDestroy(){this.disconnect()}};t(e,"\u0275fac",function(r){return new(r||e)(_e("waIntersectionRootMargin"),_e("waIntersectionThreshold"))}),t(e,"\u0275dir",Pe({type:e,selectors:[["","waIntersectionObserver",""]],exportAs:["IntersectionObserver"],features:[Xe]}));let i=e;return i})();var ws=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275dir",Pe({type:e,selectors:[["","waIntersectionRoot",""]],features:[it([{provide:ao,useExisting:Je}])]}));let i=e;return i})(),po=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({}));let i=e;return i})();var Ee=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({providers:[Et],imports:[C,z,Xt,Se,P,ze,Be.forChild(),Qe,be,he,Tt,Me,ye,G,Jt,po,Ce,ge,Zt,Be,ze,Qe]}));let i=e;return i})();var co=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C,P,Ee,ye,G]}));let i=e;return i})();var lo=[xe];var uo=(()=>{let e=class e{static forRoot(){return{ngModule:e,providers:[lo]}}};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C]}));let i=e;return i})();var Va=(()=>{let e=class e{};t(e,"\u0275fac",function(n){return new(n||e)}),t(e,"\u0275mod",v({type:e})),t(e,"\u0275inj",h({imports:[C,Ee,co,uo,Ce]}));let i=e;return i})();export{Be as a,Do as b,be as c,Xt as d,Jn as e,so as f,Qe as g,ye as h,ze as i,_s as j,ws as k,po as l,Ee as m,co as n,uo as o,Va as p};
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.