PageSourceSearch

https://icforum.swiss/chunk-4JCYTRQ6.js

js icforum.swiss collected 2026-09-28 11:16:06 UTC 316,495 bytes, 1 lines download raw bytes

1import{A as Ga,B as gn,C as fn,F as $a,H as Wa,Q as ja,R as Ya,S as Xa,T as qa,U as Zt,V as Ka,Y as Za,_ as Qa,aa as Ja,b as qt,d as Kt,ja as el,oa as Qt,pa as tl,t as Aa,u as La,v as Va,w as Ua,x as pi,y as Fa,z as Ha}from"./chunk-LF3ALSUW.js";import{s as Da}from"./chunk-QCLGEWHK.js";import{q as Ra}from"./chunk-CCLKQ42F.js";import{a as Ts,d as nn}from"./chunk-W2QV3FTD.js";import{a as mi,b as ka}from"./chunk-ZJVNVFA2.js";import{E as Ds,G as Rs,I as Bs,Ia as Ta,Ja as za,K as Ns,Ka as Ea,L as As,O as Ls,Q as Vs,Va as di,Wa as Pt,ga as on,ha as rn,x as Es,z as ks}from"./chunk-BQUK3EQE.js";import{e as Us,f as Fs,g as Hs,h as Gs,i as $s,j as Ws}from"./chunk-IHC2A25W.js";import{$d as ot,Be as Qs,Bh as Ia,Bi as jn,Ch as Pa,Ci as Oa,D as lr,De as Lt,Di as xa,Fd as sn,Fe as Vt,Fh as ba,Gb as Nt,Gj as Xt,Ib as De,Ih as ht,Ij as ut,Je as pt,Jg as jt,Jj as Ba,Kb as Ms,Ke as Ut,Lb as Os,Le as ea,Ma as ds,Me as Ft,Mj as Na,Nd as Fn,Ne as ta,Ng as ra,Nh as hn,Og as Wn,Oh as Ze,Pa as hs,Pe as Ht,Qa as Rt,Re as ia,Se as Gt,Ta as us,Te as $t,Ue as cn,Ve as na,Wg as sa,Xe as Wt,Xg as aa,Za as Ln,Zd as Hn,_d as Gn,ab as gs,af as Re,aj as Ne,b as qo,bc as xs,bh as Ke,cb as Qi,cf as It,ci as ye,db as fs,eb as Xe,ef as oa,fb as _s,fh as la,gb as Bt,ge as an,gi as wa,hb as pe,ib as nt,if as Se,jb as Cs,ka as Ki,ke as ln,la as cs,lc as js,me as Ks,mi as un,nb as vs,nd as Xs,ni as ci,ob as ys,oc as Ys,od as qs,oe as Zs,pc as Un,ph as va,qe as At,se as $n,ui as Sa,vh as ya,xh as Yt,yi as Ma,ze as si}from"./chunk-6Y6SJRNX.js";import{E as sr,G as ar,H as ms,Q as ve,W as Js,Y as dn,Z as mn,p as Bi,s as Ni,u as Ee,x as ke,z as rr}from"./chunk-STDQTB2J.js";import{k as Ye}from"./chunk-IO44HIO6.js";import{B as ts,P as dt,Q as ns,T as Dt,U as os,ca as mt,d as cr,ea as rs,ga as ss,ia as as,ma as ls,va as zs,w as qi,wa as Vn}from"./chunk-HOJB2KOO.js";import{Ac as Xi,Ba as Or,Bc as es,Ca as Gi,Cb as Fr,D as mr,Ec as is,Ga as xr,Ha as Tr,I as pr,L as hr,La as zr,M as yt,Ma as Rn,Mb as Yi,N as ur,O as Li,Oa as Er,Pa as kr,Qa as Dr,R as gr,Sa as Rr,U as fr,V as _r,W as Cr,Wb as Hr,X as Vi,Yb as Gr,Z as vr,_b as $r,ab as $i,ac as Wr,bc as jr,ca as Ui,da as yr,e as D,ea as Ir,f as ri,g as Zo,ga as at,gb as zt,ha as Fi,hb as Br,ib as Bn,ja as Hi,jb as lt,jc as ct,ka as Pr,kb as Wi,kc as Yr,lb as Nr,lc as Xr,m as dr,ma as br,mb as ji,mc as An,nb as Ar,nc as qr,oa as wr,ob as Lr,pa as Sr,pb as Vr,pc as Kr,rc as Et,sc as Zr,ta as Mr,tc as kt,ub as Nn,uc as Qr,vc as Jr,xb as Ur}from"./chunk-OLMDJNX5.js";import{a as Ko,c as O}from"./chunk-FDN33MRG.js";import{b as Zi,c as _e,d as V,e as ps}from"./chunk-GEDR3PBK.js";import{e as Ce,g as qe,t as bs,u as ws,v as Ss}from"./chunk-A26PE6T6.js";import{c as Ji,e as en,i as tn,o as Is,p as Ps}from"./chunk-LNAR5CK6.js";import{k as H,m as ze,n as R,r as jo,t as W,u as Yo,y as Xo}from"./chunk-F45KP72J.js";import{$a as Y,$c as Uo,A as ii,Ac as Mi,Ad as $o,Bc as Oi,Cc as c,Cd as Wo,Db as be,Dc as d,Dd as h,Ea as st,Ec as m,Ed as f,Fa as Pi,Fb as We,Fc as _,Fd as A,G as ue,Gc as Do,Gd as oi,Hc as Ro,Ia as it,Ib as ko,Ic as Bo,Id as re,Ja as M,Jc as xi,K as ni,Kc as Ti,L as vi,Lb as l,Ld as je,Mc as S,Nc as No,Pa as C,Qa as v,Qd as Ri,Sc as b,T as Oo,Ta as bi,Uc as Ao,V as yi,Vc as u,Wb as kn,Wc as zi,Xa as E,Xb as x,Xc as Ei,Ya as wi,Zc as Lo,_ as $e,_c as Vo,ad as le,bd as Fo,c as So,cb as ie,cc as k,cd as ki,d as Te,dc as Si,dd as Ho,ec as Dn,fd as y,gb as F,gd as U,hc as P,hd as T,id as _t,j as Mo,jb as ge,ld as Ve,md as Ue,na as xo,nd as Fe,od as Ct,pd as Go,r as _i,ra as Ii,sa as To,ua as zo,ud as vt,v as Ci,va as Eo,vd as N,wc as ne,wd as X,xc as Oe,yc as xe,yd as Di,z as te}from"./chunk-Z5YOIIAC.js";import{a as Ai}from"./chunk-XHWV4DJW.js";import{a as we,c as se,e as Qo,ga as er,ha as tr,i as Jo,j as K,ja as ir,ka as He,ma as nr,n as xt,na as or,o as Q,p as ce,pa as Tt}from"./chunk-Y5HJX4PP.js";import{b as ca}from"./chunk-V5YH6CLL.js";import{C as pa,D as ha,E as ua,F as ga,G as fa,N as pn,O as _a,P as Ge,Q as Ca,a as ai,b as li,j as oe,k as Be,l as da,z as ma}from"./chunk-KAYYNT2L.js";import{a as me,b as ft,j as Pe,l as s,n as bo,p as wo,t as $}from"./chunk-ATLPHYUF.js";var fe=class n{constructor(r,o){this.x=r,this.y=o}static fromEvent(r,o=null){if(this.isMouseEvent(r))return new n(r.clientX,r.clientY);if(o===null||r.changedTouches.length===1)return new n(r.changedTouches[0].clientX,r.changedTouches[0].clientY);for(let e=0;e<r.changedTouches.length;e++)if(r.changedTouches[e].target===o)return new n(r.changedTouches[e].clientX,r.changedTouches[e].clientY);return null}static isMouseEvent(r){return Object.prototype.toString.apply(r).indexOf("MouseEvent")===8}static isIPosition(r){return!!r&&"x"in r&&"y"in r}static getCurrent(r){let o=new n(0,0);if(window){let e=window.getComputedStyle(r);if(e){let t=parseInt(e.getPropertyValue("left"),10),i=parseInt(e.getPropertyValue("top"),10);o.x=isNaN(t)?0:t,o.y=isNaN(i)?0:i}return o}else return console.error("Not Supported!"),null}static copy(r){return new n(0,0).set(r)}get value(){return{x:this.x,y:this.y}}add(r){return this.x+=r.x,this.y+=r.y,this}subtract(r){return this.x-=r.x,this.y-=r.y,this}multiply(r){this.x*=r,this.y*=r}divide(r){this.x/=r,this.y/=r}reset(){return this.x=0,this.y=0,this}set(r){return this.x=r.x,this.y=r.y,this}},_n=class{constructor(r,o){this.parent=r,this.renderer=o,this._added=!1;let e=o.createElement("div");o.setStyle(e,"position","absolute"),o.setStyle(e,"width","100%"),o.setStyle(e,"height","100%"),o.setStyle(e,"background-color","transparent"),o.setStyle(e,"top","0"),o.setStyle(e,"left","0"),this._helper=e}add(){this.parent&&!this._added&&(this.parent.appendChild(this._helper),this._added=!0)}remove(){this.parent&&this._added&&(this.parent.removeChild(this._helper),this._added=!1)}dispose(){this._helper=null,this._added=!1}get el(){return this._helper}},ru=(()=>{let r=class r{set zIndex(e){this.renderer.setStyle(this.el.nativeElement,"z-index",e),this._zIndex=e}set ngDraggable(e){if(e!=null&&e!==""){this.allowDrag=!!e;let t=this.getDragEl();
1this.allowDrag?this.renderer.addClass(t,"ng-draggable"):(this.putBack(),this.renderer.removeClass(t,"ng-draggable"))}}constructor(e,t){this.el=e,this.renderer=t,this.allowDrag=!0,this.moving=!1,this.orignal=null,this.oldTrans=new fe(0,0),this.tempTrans=new fe(0,0),this.currTrans=new fe(0,0),this.oldZIndex="",this._zIndex="",this.needTransform=!1,this.draggingSub=null,this._helperBlock=null,this.started=new E,this.stopped=new E,this.edge=new E,this.outOfBounds={top:!1,right:!1,bottom:!1,left:!1},this.gridSize=1,this.inBounds=!1,this.trackPosition=!0,this.scale=1,this.preventDefaultEvent=!1,this.position={x:0,y:0},this.lockAxis=null,this.movingOffset=new E,this.endOffset=new E,this._helperBlock=new _n(e.nativeElement,t)}ngOnInit(){if(this.allowDrag){let e=this.getDragEl();this.renderer.addClass(e,"ng-draggable")}this.resetPosition()}ngOnDestroy(){this.bounds=null,this.handle=null,this.orignal=null,this.oldTrans=null,this.tempTrans=null,this.currTrans=null,this._helperBlock.dispose(),this._helperBlock=null,this.draggingSub&&this.draggingSub.unsubscribe()}ngOnChanges(e){if(e.position&&!e.position.isFirstChange()){let t=e.position.currentValue;this.moving?this.needTransform=!0:(fe.isIPosition(t)?this.oldTrans.set(t):this.oldTrans.reset(),this.transform())}}ngAfterViewInit(){this.inBounds&&(this.boundsCheck(),this.oldTrans.add(this.tempTrans),this.tempTrans.reset())}getDragEl(){return this.handle?this.handle:this.el.nativeElement}resetPosition(){fe.isIPosition(this.position)?this.oldTrans.set(this.position):this.oldTrans.reset(),this.tempTrans.reset(),this.transform()}moveTo(e){if(this.orignal){if(e.subtract(this.orignal),this.tempTrans.set(e),this.tempTrans.divide(this.scale),this.transform(),this.bounds){let t=this.boundsCheck();t&&this.edge.emit(t)}this.movingOffset.emit(this.currTrans.value)}}transform(){let e=this.tempTrans.x+this.oldTrans.x,t=this.tempTrans.y+this.oldTrans.y;this.lockAxis==="x"?(e=this.oldTrans.x,this.tempTrans.x=0):this.lockAxis==="y"&&(t=this.oldTrans.y,this.tempTrans.y=0),this.gridSize>1&&(e=Math.round(e/this.gridSize)*this.gridSize,t=Math.round(t/this.gridSize)*this.gridSize);let i="translate(".concat(Math.round(e),"px, ").concat(Math.round(t),"px)");this.renderer.setStyle(this.el.nativeElement,"transform",i),this.renderer.setStyle(this.el.nativeElement,"-webkit-transform",i),this.renderer.setStyle(this.el.nativeElement,"-ms-transform",i),this.renderer.setStyle(this.el.nativeElement,"-moz-transform",i),this.renderer.setStyle(this.el.nativeElement,"-o-transform",i),this.currTrans.x=e,this.currTrans.y=t}pickUp(){if(this.oldZIndex=this.el.nativeElement.style.zIndex?this.el.nativeElement.style.zIndex:"",window&&(this.oldZIndex=window.getComputedStyle(this.el.nativeElement,null).getPropertyValue("z-index")),this.zIndexMoving&&this.renderer.setStyle(this.el.nativeElement,"z-index",this.zIndexMoving),!this.moving){this.started.emit(this.el.nativeElement),this.moving=!0;let e=this.getDragEl();this.renderer.addClass(e,"ng-dragging"),this.subscribeEvents()}}subscribeEvents(){this.draggingSub=ue(document,"mousemove",{passive:!1}).subscribe(t=>this.onMouseMove(t)),this.draggingSub.add(ue(document,"touchmove",{passive:!1}).subscribe(t=>this.onMouseMove(t))),this.draggingSub.add(ue(document,"mouseup",{passive:!1}).subscribe(()=>this.putBack())),/msie\s|trident\//i.test(window.navigator.userAgent)||this.draggingSub.add(ue(document,"mouseleave",{passive:!1}).subscribe(()=>this.putBack())),this.draggingSub.add(ue(document,"touchend",{passive:!1}).subscribe(()=>this.putBack())),this.draggingSub.add(ue(document,"touchcancel",{passive:!1}).subscribe(()=>this.putBack()))}unsubscribeEvents(){this.draggingSub.unsubscribe(),this.draggingSub=null}boundsCheck(){if(this.bounds){let e=this.bounds.getBoundingClientRect(),t=this.el.nativeElement.getBoundingClientRect(),i={top:this.outOfBounds.top?!0:e.top<t.top,right:this.outOfBounds.right?!0:e.right>t.right,bottom:this.outOfBounds.bottom?!0:e.bottom>t.bottom,left:this.outOfBounds.left?!0:e.left<t.left};return this.inBounds&&(i.top||(this.tempTrans.y-=(t.top-e.top)/this.scale),i.bottom||(this.tempTrans.y-=(t.bottom-e.bottom)/this.scale),i.right||(this.tempTrans.x-=(t.right-e.right)/this.scale),i.left||(this.tempTrans.x-=(t.left-e.left)/this.scale),this.transform()),i}return null}getCurrentOffset(){return this.currTrans.value}putBack(){if(this._zIndex?this.renderer.setStyle(this.el.nativeElement,"z-index",this._zIndex):this.zIndexMoving&&(this.oldZIndex?this.renderer.setStyle(this.el.nativeElement,"z-index",this.oldZIndex):this.el.nativeElement.style.removeProperty("z-index")),this.moving){if(this.stopped.emit(this.el.nativeElement),this._helperBlock.remove(),this.needTransform&&(fe.isIPosition(this.position)?this.oldTrans.set(this.position):this.oldTrans.reset(),this.transform(),this.needTransform=!1),this.bounds){let t=this.boundsCheck();t&&this.edge.emit(t)}this.moving=!1,this.endOffset.emit(this.currTrans.value),this.trackPosition&&this.oldTrans.add(this.tempTrans),this.tempTrans.reset(),this.trackPosition||this.transform();let e=this.getDragEl();this.renderer.removeClass(e,"ng-dragging"),this.unsubscribeEvents()}}checkHandleTarget(e,t){if(t.tagName==="BUTTON")return!1;if(t===e)return!0;for(let i in t.children)if(t.children.hasOwnProperty(i)&&this.checkHandleTarget(e,t.children[i]))return!0;return!1}onMouseDown(e){if(e instanceof MouseEvent&&e.button===2)return;let t=e.target||e.srcElement;this.handle!==void 0&&!this.checkHandleTarget(t,this.handle)||this.allowDrag!==!1&&(this.preventDefaultEvent&&(e.stopPropagation(),e.preventDefault()),this.orignal=fe.from
1Event(e,this.getDragEl()),this.pickUp())}onMouseMove(e){this.moving&&this.allowDrag&&(this.preventDefaultEvent&&(e.stopPropagation(),e.preventDefault()),this._helperBlock.add(),this.moveTo(fe.fromEvent(e,this.getDragEl())))}};r.\u0275fac=function(t){return new(t||r)(x(ge),x(kn))},r.\u0275dir=Dn({type:r,selectors:[["","ngDraggable",""]],hostBindings:function(t,i){t&1&&b("mousedown",function(p){return i.onMouseDown(p)})("touchstart",function(p){return i.onMouseDown(p)})},inputs:{handle:"handle",bounds:"bounds",outOfBounds:"outOfBounds",gridSize:"gridSize",zIndexMoving:"zIndexMoving",zIndex:"zIndex",inBounds:"inBounds",trackPosition:"trackPosition",scale:"scale",preventDefaultEvent:"preventDefaultEvent",position:"position",lockAxis:"lockAxis",ngDraggable:"ngDraggable"},outputs:{started:"started",stopped:"stopped",edge:"edge",movingOffset:"movingOffset",endOffset:"endOffset"},exportAs:["ngDraggable"],standalone:!1,features:[F]});let n=r;return n})(),Yn=class{constructor(r,o,e,t,i,a){this.parent=r,this.renderer=o,this.type=e,this.css=t,this.onMouseDown=i,this.existHandle=a;let p=this.existHandle||o.createElement("div");o.addClass(p,"ng-resizable-handle"),o.addClass(p,t),e==="se"&&o.addClass(p,"ng-resizable-diagonal"),this.parent&&!this.existHandle&&r.appendChild(p),this._onResize=g=>{i(g,this)},p.addEventListener("mousedown",this._onResize,{passive:!1}),p.addEventListener("touchstart",this._onResize,{passive:!1}),this._handle=p}dispose(){this._handle.removeEventListener("mousedown",this._onResize),this._handle.removeEventListener("touchstart",this._onResize),this.parent&&!this.existHandle&&this.parent.removeChild(this._handle),this._handle=null,this._onResize=null}get el(){return this._handle}},bt=class n{constructor(r,o){this.width=r,this.height=o}static getCurrent(r){let o=new n(0,0);if(window){let e=window.getComputedStyle(r);return e&&(o.width=parseInt(e.getPropertyValue("width"),10),o.height=parseInt(e.getPropertyValue("height"),10)),o}else return console.error("Not Supported!"),null}static copy(r){return new n(0,0).set(r)}set(r){return this.width=r.width,this.height=r.height,this}},su=(()=>{let r=class r{set ngResizable(e){e!=null&&e!==""&&(this._resizable=!!e,this.updateResizable())}constructor(e,t){this.el=e,this.renderer=t,this._resizable=!0,this._handles={},this._handleType=[],this._handleResizing=null,this._direction=null,this._directionChanged=null,this._aspectRatio=0,this._containment=null,this._origMousePos=null,this._origSize=null,this._origPos=null,this._currSize=null,this._currPos=null,this._initSize=null,this._initPos=null,this._gridSize=null,this._bounding=null,this._helperBlock=null,this.draggingSub=null,this._adjusted=!1,this.rzHandles="e,s,se",this.rzHandleDoms={},this.rzAspectRatio=!1,this.rzContainment=null,this.rzGrid=null,this.rzMinWidth=null,this.rzMinHeight=null,this.rzMaxWidth=null,this.rzMaxHeight=null,this.rzScale=1,this.preventDefaultEvent=!0,this.rzStart=new E,this.rzResizing=new E,this.rzStop=new E,this._helperBlock=new _n(e.nativeElement,t)}ngOnChanges(e){e.rzHandles&&!e.rzHandles.isFirstChange()&&this.updateResizable(),e.rzAspectRatio&&!e.rzAspectRatio.isFirstChange()&&this.updateAspectRatio(),e.rzContainment&&!e.rzContainment.isFirstChange()&&this.updateContainment()}ngOnInit(){this.updateResizable()}ngOnDestroy(){this.removeHandles(),this._containment=null,this._helperBlock.dispose(),this._helperBlock=null}ngAfterViewInit(){let e=this.el.nativeElement;this._initSize=bt.getCurrent(e),this._initPos=fe.getCurrent(e),this._currSize=bt.copy(this._initSize),this._currPos=fe.copy(this._initPos),this.updateAspectRatio(),this.updateContainment()}resetSize(){this._currSize=bt.copy(this._initSize),this._currPos=fe.copy(this._initPos),this.doResize()}getStatus(){return!this._currPos||!this._currSize?null:{size:{width:this._currSize.width,height:this._currSize.height},position:{top:this._currPos.y,left:this._currPos.x}}}updateResizable(){let e=this.el.nativeElement;this.renderer.removeClass(e,"ng-resizable"),this.removeHandles(),this._resizable&&(this.renderer.addClass(e,"ng-resizable"),this.createHandles())}updateAspectRatio(){if(typeof this.rzAspectRatio=="boolean")this.rzAspectRatio&&this._currSize.height?this._aspectRatio=this._currSize.width/this._currSize.height:this._aspectRatio=0;else{let e=Number(this.rzAspectRatio);this._aspectRatio=isNaN(e)?0:e}}updateContainment(){if(!this.rzContainment){this._containment=null;return}typeof this.rzContainment=="string"?this.rzContainment==="parent"?this._containment=this.el.nativeElement.parentElement:this._containment=document.querySelector(this.rzContainment):this._containment=this.rzContainment}createHandles(){if(!this.rzHandles)return;let e;if(typeof this.rzHandles=="string"){this.rzHandles==="all"?e=["n","e","s","w","ne","se","nw","sw"]:e=this.rzHandles.replace(/ /g,"").toLowerCase().split(",");for(let t of e){let i=this.createHandleByType(t,"ng-resizable-".concat(t));i&&(this._handleType.push(t),this._handles[t]=i)}}else{e=Object.keys(this.rzHandles);for(let t of e){let i=this.createHandleByType(t,this.rzHandles[t]);i&&(this._handleType.push(t),this._handles[t]=i)}}}createHandleByType(e,t){let i=this.el.nativeElement,a=this.rzHandleDoms[e]?this.rzHandleDoms[e].nativeElement:null;return e.match(/^(se|sw|ne|nw|n|e|s|w)$/)?new Yn(i,this.renderer,e,t,this.onMouseDown.bind(this),a):(console.error("Invalid handle type:",e),null)}removeHandles(){for(let e of this._handleType)this._handles[e].dispose();this._handleType=[],this._handles={}}onMouseDown(e,t){e instanceof MouseEvent&&e.button===2||(this.preventDefaultEvent&&(e.stopPropagation(),e.preventDefault()),this._handleResizing||(this._origMousePos=fe.fromEvent(e),this.startResize(t),this.subscribeEvents()))}subscribeEvents(){this.draggingSub=ue(document,"mousemove",{passive:!1}).subscribe(t=>this.onMouseMove(t)),this.draggingSub.add(ue(document,"touchmove",{passive:!1}).subscribe(t=>this.onMouseMove(t))),this.draggingSub.add(ue(document,"mouseup",{passive:!1}).subscribe(()=>this.onMouseLeave())),/msie\s|trident\//i.test(window.navigator.userAgent)||this.draggingSub.add(ue(document,"mouseleave",{passive:!1}).subscribe(()=>this.onMouseLeave())),this.draggingSub.add(ue(document,"touchend",{passive:!1}).subscribe(()=>this.onMouseLeave())),this.draggingSub.add(ue(document,"touchcancel",{passive:!1}).subscribe(()=>this.onMouseLeave()))}unsubscribeEvents(){this.draggingSub.unsubscribe(),this.draggingSub=null}onMouseLeave(){this._handleResizing&&(this.stopResize(),this._origMousePos=null,this.unsubscribeEvents())}onMouseMove(e){this._handleResizing&&this._resizable&&this._origMousePos&&this._origPos&&this._origSize&&(this.resizeTo(fe.fromEvent(e)),this.onResizing())}startResize(e){let t=this.el.nativeElement;this._origSize=bt.getCurrent(t),this._origPos=fe.getCurrent(t),this._currSize=bt.copy(this._origSize),this._currPos=fe.copy(this._origPos),this._containment&&this.getBounding(),this.getGridSize(),this._helperBlock.add(),this._handleResizing=e,this.updateDirection(),this.rzStart.emit(this.getResizingEvent())}stopResize(){this._helperBlock.remove(),this.rzStop.emit(this.getResizingEvent()),this._handleResizing=null,this._direction=null,this._origSize=null,this._origPos=null,this._containment&&this.resetBounding()}onResizing(){this.rzResizing.emit(this.getResizingEvent())}getResizingEvent(){return{host:this.el.nativeElement,handle:this._handleResizing?this._handleResizing.el:null,size:{width:this._currSize.width,height:this._currSize.height},position:{top:this._currPos.y,left:this._currPos.x},direction:me({},this._directionChanged)}}updateDirection(){this._direction={n:!!this._handleResizing.type.match(/n/),s:!!this._handleResizing.type.match(/s/),w:!!this._handleResizing.type.match(/w/),e:!!this._handleResizing.type.match(/e/)},this._directionChanged=me({},this._direction),this.rzAspectRatio&&(this._directionChanged.n&&!this._directionChanged.e&&(this._directionChanged.w=!0),this._directionChanged.s&&!this._directionChanged.w&&(this._directionChanged.e=!0),this._directionChanged.e&&!this._directionChanged.n&&(this._directionChanged.s=!0),this._directionChanged.w&&
1!this._directionChanged.n&&(this._directionChanged.s=!0))}resizeTo(e){e.subtract(this._origMousePos).divide(this.rzScale);let t=Math.round(e.x/this._gridSize.x)*this._gridSize.x,i=Math.round(e.y/this._gridSize.y)*this._gridSize.y;this._direction.n?(this._currPos.y=this._origPos.y+i,this._currSize.height=this._origSize.height-i):this._direction.s&&(this._currSize.height=this._origSize.height+i),this._direction.e?this._currSize.width=this._origSize.width+t:this._direction.w&&(this._currSize.width=this._origSize.width-t,this._currPos.x=this._origPos.x+t),this.checkBounds(),this.checkSize(),this.adjustByRatio(),this.doResize()}doResize(){let e=this.el.nativeElement;(!this._direction||this._direction.n||this._direction.s||this._aspectRatio)&&this.renderer.setStyle(e,"height",this._currSize.height+"px"),(!this._direction||this._direction.w||this._direction.e||this._aspectRatio)&&this.renderer.setStyle(e,"width",this._currSize.width+"px"),this.renderer.setStyle(e,"left",this._currPos.x+"px"),this.renderer.setStyle(e,"top",this._currPos.y+"px")}adjustByRatio(){if(this._aspectRatio&&!this._adjusted)if(this._direction.e||this._direction.w){let e=Math.floor(this._currSize.width/this._aspectRatio);this._direction.n&&(this._currPos.y+=this._currSize.height-e),this._currSize.height=e}else{let e=Math.floor(this._aspectRatio*this._currSize.height);this._direction.n&&(this._currPos.x+=this._currSize.width-e),this._currSize.width=e}}checkBounds(){if(this._containment){let e=this._bounding.width-this._bounding.pr-this._bounding.deltaL-this._bounding.translateX-this._currPos.x,t=this._bounding.height-this._bounding.pb-this._bounding.deltaT-this._bounding.translateY-this._currPos.y;if(this._direction.n&&this._currPos.y+this._bounding.translateY<0&&(this._currPos.y=-this._bounding.translateY,this._currSize.height=this._origSize.height+this._origPos.y+this._bounding.translateY),this._direction.w&&this._currPos.x+this._bounding.translateX<0&&(this._currPos.x=-this._bounding.translateX,this._currSize.width=this._origSize.width+this._origPos.x+this._bounding.translateX),this._currSize.width>e&&(this._currSize.width=e),this._currSize.height>t&&(this._currSize.height=t),this._aspectRatio){if(this._adjusted=!1,(this._direction.w||this._direction.e)&&this._currSize.width/this._aspectRatio>=t){let i=Math.floor(t*this._aspectRatio);this._direction.w&&(this._currPos.x+=this._currSize.width-i),this._currSize.width=i,this._currSize.height=t,this._adjusted=!0}if((this._direction.n||this._direction.s)&&this._currSize.height*this._aspectRatio>=e){let i=Math.floor(e/this._aspectRatio);this._direction.n&&(this._currPos.y+=this._currSize.height-i),this._currSize.width=e,this._currSize.height=i,this._adjusted=!0}}}}checkSize(){let e=this.rzMinHeight?this.rzMinHeight:1,t=this.rzMinWidth?this.rzMinWidth:1;this._currSize.height<e&&(this._currSize.height=e,this._direction.n&&(this._currPos.y=this._origPos.y+(this._origSize.height-e))),this._currSize.width<t&&(this._currSize.width=t,this._direction.w&&(this._currPos.x=this._origPos.x+(this._origSize.width-t))),this.rzMaxHeight&&this._currSize.height>this.rzMaxHeight&&(this._currSize.height=this.rzMaxHeight,this._direction.n&&(this._currPos.y=this._origPos.y+(this._origSize.height-this.rzMaxHeight))),this.rzMaxWidth&&this._currSize.width>this.rzMaxWidth&&(this._currSize.width=this.rzMaxWidth,this._direction.w&&(this._currPos.x=this._origPos.x+(this._origSize.width-this.rzMaxWidth)))}getBounding(){let e=this._containment,t=window.getComputedStyle(e);if(t){let i=t.getPropertyValue("position"),p=window.getComputedStyle(this.el.nativeElement).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");this._bounding={},this._bounding.width=e.clientWidth,this._bounding.height=e.clientHeight,this._bounding.pr=parseInt(t.getPropertyValue("padding-right"),10),this._bounding.pb=parseInt(t.getPropertyValue("padding-bottom"),10),this._bounding.deltaL=this.el.nativeElement.offsetLeft-this._currPos.x,this._bounding.deltaT=this.el.nativeElement.offsetTop-this._currPos.y,p.length>=6?(this._bounding.translateX=parseInt(p[4],10),this._bounding.translateY=parseInt(p[5],10)):(this._bounding.translateX=0,this._bounding.translateY=0),this._bounding.position=t.getPropertyValue("position"),i==="static"&&this.renderer.setStyle(e,"position","relative")}}resetBounding(){this._bounding&&this._bounding.position==="static"&&this.renderer.setStyle(this._containment,"position","relative"),this._bounding=null}getGridSize(){this._gridSize={x:1,y:1},this.rzGrid&&(typeof this.rzGrid=="number"?this._gridSize={x:this.rzGrid,y:this.rzGrid}
1:Array.isArray(this.rzGrid)&&(this._gridSize={x:this.rzGrid[0],y:this.rzGrid[1]}))}};r.\u0275fac=function(t){return new(t||r)(x(ge),x(kn))},r.\u0275dir=Dn({type:r,selectors:[["","ngResizable",""]],inputs:{ngResizable:"ngResizable",rzHandles:"rzHandles",rzHandleDoms:"rzHandleDoms",rzAspectRatio:"rzAspectRatio",rzContainment:"rzContainment",rzGrid:"rzGrid",rzMinWidth:"rzMinWidth",rzMinHeight:"rzMinHeight",rzMaxWidth:"rzMaxWidth",rzMaxHeight:"rzMaxHeight",rzScale:"rzScale",preventDefaultEvent:"preventDefaultEvent"},outputs:{rzStart:"rzStart",rzResizing:"rzResizing",rzStop:"rzStop"},exportAs:["ngResizable"],standalone:!1,features:[F]});let n=r;return n})(),au=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=Si({type:r}),r.\u0275inj=Pi({});let n=r;return n})();var uc=["*"];function gc(n,r){n&1&&(d(0,"div"),Ei(1),m())}function fc(n,r){if(n&1){let o=S();d(0,"div")(1,"button",3),b("click",function(t){C(o);let i=u(2);return v(i.doLogin(t))}),y(2),m()()}if(n&2){let o=u(2);l(2),T(" ",o.action," ")}}function _c(n,r){n&1&&(d(0,"span"),y(1),h(2,"translate"),m()),n&2&&(l(),T(" ",f(2,1,"TABS.VERIFY_EMAIL"),". "))}function Cc(n,r){if(n&1&&(d(0,"div",2),P(1,fc,3,1,"div",0),h(2,"async"),P(3,_c,3,3,"span",0),h(4,"async"),m()),n&2){let o=u();l(),c("ngIf",f(2,2,o.showSignIn)),l(2),c("ngIf",f(4,4,o.showUserIsNotVerified))}}var Xn=(()=>{let r=class r{constructor(e,t){s(this,"layoutService");s(this,"store");s(this,"showUserIsNotVerified");s(this,"showPermissionMessage");s(this,"hasExplicitPermission");s(this,"showSignIn");s(this,"action","perform this operation");s(this,"permission");this.layoutService=e,this.store=t,this.showSignIn=this.store.select(rs),this.showPermissionMessage=this.store.select(ss),this.showUserIsNotVerified=this.store.select(as)}doLogin(){this.layoutService.showModal(Ke.AUTHENTICATION)}};s(r,"\u0275fac",function(t){return new(t||r)(x(Ne),x(D))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-action-permitted"]],inputs:{action:"action",permission:"permission"},standalone:!1,ngContentSelectors:uc,decls:2,vars:2,consts:[[4,"ngIf"],["class","no-permission-message",4,"ngIf"],[1,"no-permission-message"],[1,"ui","small","red","button",3,"click"]],template:function(t,i){t&1&&(zi(),P(0,gc,2,0,"div",0)(1,Cc,5,6,"div",1)),t&2&&(c("ngIf",i.permission),l(),c("ngIf",!i.permission))},dependencies:[R,W,V],styles:["[_nghost-%COMP%]   .no-permission-message[_ngcontent-%COMP%]{font-style:italic}"],changeDetection:0}));let n=r;return n})();function wt(n,r){return nt(n,ft(me({},r),{weekStartsOn:1}))}function Cn(n,r){let o=pe(n,r==null?void 0:r.in),e=o.getFullYear(),t=Xe(o,0);t.setFullYear(e+1,0,4),t.setHours(0,0,0,0);let i=wt(t),a=Xe(o,0);a.setFullYear(e,0,4),a.setHours(0,0,0,0);let p=wt(a);return o.getTime()>=i.getTime()?e+1:o.getTime()>=p.getTime()?e:e-1}function qn(n,r){let o=pe(n,r==null?void 0:r.in);return o.setHours(0,0,0,0),o}function il(n,r,o){let[e,t]=_s(o==null?void 0:o.in,n,r),i=qn(e),a=qn(t),p=+i-$n(i),g=+a-$n(a);return Math.round((p-g)/fs)}function nl(n,r){let o=Cn(n,r),e=Xe((r==null?void 0:r.in)||n,0);return e.setFullYear(o,0,4),e.setHours(0,0,0,0),wt(e)}function ol(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function rl(n){return!(!ol(n)&&typeof n!="number"||isNaN(+pe(n)))}function sl(n,r){let o=pe(n,r==null?void 0:r.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function al(n,r){let o=pe(n,r==null?void 0:r.in);return il(o,sl(o))+1}function ll(n,r){let o=pe(n,r==null?void 0:r.in),e=+wt(o)-+nl(o);return Math.round(e/Qi)+1}function vn(n,r){var w,z,L,B,q,ee,de,tt;let o=pe(n,r==null?void 0:r.in),e=o.getFullYear(),t=Bt(),i=(tt=(de=(B=(L=r==null?void 0:r.firstWeekContainsDate)!=null?L:(z=(w=r==null?void 0:r.locale)==null?void 0:w.options)==null?void 0:z.firstWeekContainsDate)!=null?B:t.firstWeekContainsDate)!=null?de:(ee=(q=t.locale)==null?void 0:q.options)==null?void 0:ee.firstWeekContainsDate)!=null?tt:1,a=Xe((r==null?void 0:r.in)||n,0);a.setFullYear(e+1,0,i),a.setHours(0,0,0,0);let p=nt(a,r),g=Xe((r==null?void 0:r.in)||n,0);g.setFullYear(e,0,i),g.setHours(0,0,0,0);let I=nt(g,r);return+o>=+p?e+1:+o>=+I?e:e-1}function cl(n,r){var p,g,I,w,z,L,B,q;let o=Bt(),e=(q=(B=(w=(I=r==null?void 0:r.firstWeekContainsDate)!=null?I:(g=(p=r==null?void 0:r.locale)==null?void 0:p.options)==null?void 0:g.firstWeekContainsDate)!=null?w:o.firstWeekContainsDate)!=null?B:(L=(z=o.locale)==null?void 0:z.options)==null?void 0:L.firstWeekContainsDate)!=null?q:1,t=vn(n,r),i=Xe((r==null?void 0:r.in)||n,0);return i.setFullYear(t,0,e),i.setHours(0,0,0,0),nt(i,r)}function dl(n,r){let o=pe(n,r==null?void 0:r.in),e=+nt(o,r)-+cl(o,r);return Math.round(e/Qi)+1}function j(n,r){let o=n<0?"-":"",e=Math.abs(n).toString().padStart(r,"0");return o+e}var rt={y(n,r){let o=n.getFullYear(),e=o>0?o:1-o;return j(r==="yy"?e%100:e,r.length)},M(n,r){let o=n.getMonth();return r==="M"?String(o+1):j(o+1,2)},d(n,r){return j(n.getDate(),r.length)},a(n,r){let o=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(n,r){return j(n.getHours()%12||12,r.length)},H(n,r){return j(n.getHours(),r.length)},m(n,r){return j(n.getMinutes(),r.length)},s(n,r){return j(n.getSeconds(),r.length)},S(n,r){let o=r.length,e=n.getMilliseconds(),t=Math.trunc(e*Math.pow(10,o-3));return j(t,r.length)}};var Jt={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Kn={G:function(n,r,o){let e=n.getFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return o.era(e,{width:"abbreviated"});case"GGGGG":return o.era(e,{width:"narrow"});case"GGGG":default:return o.era(e,{width:"wide"})}},y:function(n,r,o){if(r==="yo"){let e=n.getFullYear(),t=e>0?e:1-e;return o.ordinalNumber(t,{unit:"year"})}return rt.y(n,r)},Y:function(n,r,o,e){let t=vn(n,e),i=t>0?t:1-t;if(r==="YY"){let a=i%100;return j(a,2)}return r==="Yo"?o.ordinalNumber(i,{unit:"year"}):j(i,r.length)},R:function(n,r){let o=Cn(n);return j(o,r.length)},u:function(n,r){let o=n.getFullYear();return j(o,r.length)},Q:function(n,r,o){let e=Math.ceil((n.getMonth()+1)/3);switch(r){case"Q":return String(e);case"QQ":return j(e,2);case"Qo":return o.ordinalNumber(e,{unit:"quarter"});case"QQQ":return o.quarter(e,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(e,{width:"wide",context:"formatting"})}},q:function(n,r,o){let e=Math.ceil((n.getMonth()+1)/3);switch(r){case"q":return String(e);case"qq":return j(e,2);case"qo":return o.ordinalNumber(e,{unit:"quarter"});case"qqq":return o.quarter(e,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(e,{width:"wide",context:"standalone"})}},M:function(n,r,o){let e=n.getMonth();switch(r){case"M":case"MM":return rt.M(n,r);case"Mo":return o.ordinalNumber(e+1,{unit:"month"});case"MMM":return o.month(e,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(e,{width:"wide",context:"formatting"})}},L:function(n,r,o){let e=n.getMonth();switch(r){case"L":return String(e+1);case"LL":return j(e+1,2);case"Lo":return o.ordinalNumber(e+1,{unit:"month"});case"LLL":return o.month(e,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(e,{width:"wide",context:"standalone"})}},w:function(n,r,o,e){let t=dl(n,e);return r==="wo"?o.ordinalNumber(t,{unit:"week"}):j(t,r.length)},I:function(n,r,o){let e=ll(n);return r==="Io"?o.ordinalNumber(e,{unit:"week"}):j(e,r.length)},d:function(n,r,o){return r==="do"?o.ordinalNumber(n.getDate(),{unit:"date"}):rt.d(n,r)},D:function(n,r,o){let e=al(n);return r==="Do"?o.ordinalNumber(e,{unit:"dayOfYear"}):j(e,r.length)},E:function(n,r,o){let e=n.getDay();switch(r){case"E":case"EE":case"EEE":return o.day(e,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(e,{width:"short",context:"formatting"});case"EEEE":default:return o.day(e,{width:"wide",context:"formatting"})}},e:function(n,r,o,e){let t=n.getDay(),i=(t-e.weekStartsOn+8)%7||7;switch(r){case"e":return String(i);case"ee":return j(i,2);case"eo":return o.ordinalNumber(i,{unit:"day"});case"eee":return o.day(t,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(t,{width:"short",context:"formatting"});case"eeee":default:return o.day(t,{width:"wide",context:"formatting"})}},c:function(n,r,o,e){let t=n.getDay(),i=(t-e.weekStartsOn+8)%7||7;switch(r){case"c":return String(i);case"cc":return j(i,r.length);case"co":return o.ordinalNumber(i,{unit:"day"});case"ccc":return o.day(t,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(t,{width:"narrow",context:"standalone"});case"cccccc":return o.day(t,{width:"short",context:"standalone"});case"cccc":default:return o.day(t,{width:"wide",context:"standalone"})}},i:function(n,r,o){let e=n.getDay(),t=e===0?7:e;switch(r){case"i":return String(t);case"ii":return j(t,r.length);case"io":return o.ordinalNumber(t,{unit:"day"});case"iii":return o.day(e,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(e,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(e,{width:"short",context:"formatting"});case"iiii":default:return o.day(e,{width:"wide",context:"formatting"})}},a:function(n,r,o){let t=n.getHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})}},b:function(n,r,o){let e=n.getHours(),t;switch(e===12?t=Jt.noon:e===0?t=Jt.midnight:t=e/12>
vendor: 3,552 bytes, line 1
1=1?"pm":"am",r){case"b":case"bb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})}},B:function(n,r,o){let e=n.getHours(),t;switch(e>=17?t=Jt.evening:e>=12?t=Jt.afternoon:e>=4?t=Jt.morning:t=Jt.night,r){case"B":case"BB":case"BBB":return o.dayPeriod(t,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(t,{width:"wide",context:"formatting"})}},h:function(n,r,o){if(r==="ho"){let e=n.getHours()%12;return e===0&&(e=12),o.ordinalNumber(e,{unit:"hour"})}return rt.h(n,r)},H:function(n,r,o){return r==="Ho"?o.ordinalNumber(n.getHours(),{unit:"hour"}):rt.H(n,r)},K:function(n,r,o){let e=n.getHours()%12;return r==="Ko"?o.ordinalNumber(e,{unit:"hour"}):j(e,r.length)},k:function(n,r,o){let e=n.getHours();return e===0&&(e=24),r==="ko"?o.ordinalNumber(e,{unit:"hour"}):j(e,r.length)},m:function(n,r,o){return r==="mo"?o.ordinalNumber(n.getMinutes(),{unit:"minute"}):rt.m(n,r)},s:function(n,r,o){return r==="so"?o.ordinalNumber(n.getSeconds(),{unit:"second"}):rt.s(n,r)},S:function(n,r){return rt.S(n,r)},X:function(n,r,o){let e=n.getTimezoneOffset();if(e===0)return"Z";switch(r){case"X":return pl(e);case"XXXX":case"XX":return St(e);case"XXXXX":case"XXX":default:return St(e,":")}},x:function(n,r,o){let e=n.getTimezoneOffset();switch(r){case"x":return pl(e);case"xxxx":case"xx":return St(e);case"xxxxx":case"xxx":default:return St(e,":")}},O:function(n,r,o){let e=n.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+ml(e,":");case"OOOO":default:return"GMT"+St(e,":")}},z:function(n,r,o){let e=n.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+ml(e,":");case"zzzz":default:return"GMT"+St(e,":")}},t:function(n,r,o){let e=Math.trunc(+n/1e3);return j(e,r.length)},T:function(n,r,o){return j(+n,r.length)}};function ml(n,r=""){let o=n>0?"-":"+",e=Math.abs(n),t=Math.trunc(e/60),i=e%60;return i===0?o+String(t):o+String(t)+r+j(i,2)}function pl(n,r){return n%60===0?(n>0?"-":"+")+j(Math.abs(n)/60,2):St(n,r)}function St(n,r=""){let o=n>0?"-":"+",e=Math.abs(n),t=j(Math.trunc(e/60),2),i=j(e%60,2);return o+t+r+i}var hl=(n,r)=>{switch(n){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},ul=(n,r)=>{switch(n){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},yc=(n,r)=>{let o=n.match(/(P+)(p+)?/)||[],e=o[1],t=o[2];if(!t)return hl(n,r);let i;switch(e){case"P":i=r.dateTime({width:"short"});break;case"PP":i=r.dateTime({width:"medium"});break;case"PPP":i=r.dateTime({width:"long"});break;case"PPPP":default:i=r.dateTime({width:"full"});break}return i.replace("{{date}}",hl(e,r)).replace("{{time}}",ul(t,r))},gl={p:ul,P:yc};var Ic=/^D+$/,Pc=/^Y+$/,bc=["D","DD","YY","YYYY"];function fl(n){return Ic.test(n)}function _l(n){return Pc.test(n)}function Cl(n,r,o){let e=wc(n,r,o);if(console.warn(e),bc.includes(n))throw new RangeError(e)}function wc(n,r,o){let e=n[0]==="Y"?"years":"days of the month";return"Use `".concat(n.toLowerCase(),"` instead of `").concat(n,"` (in `").concat(r,"`) for formatting ").concat(e," to the input `").
1concat(o,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}var Sc=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mc=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oc=/^'([^]*?)'?$/,xc=/''/g,Tc=/[a-zA-Z]/;function vl(n,r,o){var w,z,L,B,q,ee,de,tt,ho,uo,go,fo,_o,Co,vo,yo,Io,Po;let e=Bt(),t=(z=(w=o==null?void 0:o.locale)!=null?w:e.locale)!=null?z:Cs,i=(uo=(ho=(ee=(q=o==null?void 0:o.firstWeekContainsDate)!=null?q:(B=(L=o==null?void 0:o.locale)==null?void 0:L.options)==null?void 0:B.firstWeekContainsDate)!=null?ee:e.firstWeekContainsDate)!=null?ho:(tt=(de=e.locale)==null?void 0:de.options)==null?void 0:tt.firstWeekContainsDate)!=null?uo:1,a=(Po=(Io=(Co=(_o=o==null?void 0:o.weekStartsOn)!=null?_o:(fo=(go=o==null?void 0:o.locale)==null?void 0:go.options)==null?void 0:fo.weekStartsOn)!=null?Co:e.weekStartsOn)!=null?Io:(yo=(vo=e.locale)==null?void 0:vo.options)==null?void 0:yo.weekStartsOn)!=null?Po:0,p=pe(n,o==null?void 0:o.in);if(!rl(p))throw new RangeError("Invalid time value");let g=r.match(Mc).map(Me=>{let Ie=Me[0];if(Ie==="p"||Ie==="P"){let En=gl[Ie];return En(Me,t.formatLong)}return Me}).join("").match(Sc).map(Me=>{if(Me==="''")return{isToken:!1,value:"'"};let Ie=Me[0];if(Ie==="'")return{isToken:!1,value:zc(Me)};if(Kn[Ie])return{isToken:!0,value:Me};if(Ie.match(Tc))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Ie+"`");return{isToken:!1,value:Me}});t.localize.preprocessor&&(g=t.localize.preprocessor(p,g));let I={firstWeekContainsDate:i,weekStartsOn:a,locale:t};return g.map(Me=>{if(!Me.isToken)return Me.value;let Ie=Me.value;(!(o!=null&&o.useAdditionalWeekYearTokens)&&_l(Ie)||!(o!=null&&o.useAdditionalDayOfYearTokens)&&fl(Ie))&&Cl(Ie,r,String(n));let En=Kn[Ie[0]];return En(p,Ie,t.localize,I)}).join("")}function zc(n){let r=n.match(Oc);return r?r[1].replace(xc,"'"):n}var Pl=Pe(we());var yl=(()=>{let r=class r extends rr{constructor(e){super(e)}};s(r,"\u0275fac",function(t){return new(t||r)(it(sr))}),s(r,"\u0275prov",st({token:r,factory:r.\u0275fac}));let n=r;return n})();var he=(()=>{let r=class r{constructor(e,t,i,a,p,g){s(this,"rngService");s(this,"queryService");s(this,"dataService");s(this,"itemDataService");s(this,"httpsCallableFunctionsService");s(this,"anonymousUsersDataService");this.rngService=e,this.queryService=t,this.dataService=i,this.itemDataService=a,this.httpsCallableFunctionsService=p,this.anonymousUsersDataService=g}addAclUsers(e,t,i,a,p,g=!0){return $(this,null,function*(){let I=yield Ci(this.itemDataService.findByEmails(t).pipe(yi(1)),{defaultValue:[]}),w={isSuccess:!0},z=this.dataService.batchUpdate(),L=window.location.host;I.length>0&&(I.forEach(q=>{z.addAcl(e.id,q.authorId,e.parentId,i),g&&z.addMailer({itemId:e.id,inviteType:Jo.User,loginId:q.authorId,language:a,email:q.email,invitingUserId:p,host:L}),z.addSharedHazus(q.authorId,e.id,e.isUser)}),w=yield z.save());let B=[];if(I.length<t.length){let q=I.map(ee=>ee.email);B=t.filter(ee=>q.indexOf(ee)<0)}return w.isSuccess===!1||B.length===0?w:{isSuccess:!1,code:ke.NotFound,payload:B}})}propagateUserAclPermissions(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate(),a=yield this.itemDataService.findItemsByIdsOnce(e);for(let p=a.length;p--;){let g=a[p];i.addAcl(g.id,t.authorId,g.parentId,t.role)}return i.save()})}deletePropagatedUserAclPermissions(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate();for(let a=e.length;a--;){let p=e[a];i.removeAcl(p,t.authorId)}return i.save()})}propagateGroups(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate(),a=yield this.itemDataService.findItemsByIdsOnce(e);for(let p=a.length;p--;){let g=a[p];i.addGroup(g.id,t.itemId,g.parentId,t.overrideRole)}return i.save()})}deletePropagatedGroups(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate();for(let a=e.length;a--;){let p=e[a];i.removeGroup(p,t.key)}return i.save()})}addUserToItemACL(e,t,i,a,p,g,I){return $(this,null,function*(){if(I){let L=(yield this.itemDataService.getItemAclOnce(e))[t];L&&Q[L]>Q[i]&&(i=L)}let w=this.dataService.batchUpdate(),z=yield this.queryService.getItemPromise(e);return w.addAcl(e,t,z.parentId,i,a,p,g),w.save()})}addUserToACLByToken(e,t){return $(this,null,function*(){return this.httpsCallableFunctionsService.addAclByToken(e,t)})}addAnonymousToTokenACL(e,t,i){return $(this,null,function*(){yield this.addAnonymousUserTokenKeyLookup(t,e,
1i.key),yield this.addUserToACLByToken(e,i.key)})}addAnonymousUserTokenKeyLookup(e,t,i){return $(this,null,function*(){if(!e||!t||!i){let p="Make sure anonymous uid and itemId and token are provided.";return console.error(p),{isSuccess:!1,code:ke.ArgumentException,message:p}}let a=this.dataService.batchUpdate();return a.addAnonymousUser(e,{itemId:t,tokenId:i}),a.save()})}getAnonymousUserTokenId(e){try{return Ci(this.anonymousUsersDataService.get(e).pipe(yi(1)))}catch(t){return console.error("getAnonymousUserTokenId couldn't find a token for user ".concat(e,", error: ").concat(t instanceof Error?t.message:"UNKNOWN")),Promise.resolve(void 0)}}setAclUsers(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate(),a=yield this.queryService.getItemPromise(e);return t.forEach(p=>i.addAcl(e,p.authorId,a.parentId,p.role)),i.save()})}removeAcl(e,t,i){return $(this,null,function*(){if(!e||!t){let p="Make sure item id and user id are provided.";return console.error(p),Promise.reject({type:"UNHANDLED_ERROR",payload:{error:p}})}let a=this.dataService.batchUpdate();return a.removeAcl(e,t),a.removeMailer(e,t),yield a.removeSharedHazus(t,e),a.save()})}getToken(e,t){return $(this,null,function*(){let i=yield this.itemDataService.getItemTokenInfo(e,t);return me({key:t},i)})}getInvite(e){return $(this,null,function*(){let{tokenId:t,itemId:i}=yield this.getAnonymousUserTokenId(e);return t?yield this.getToken(i,t):null})}addGenericInvite(e,t,i,a){return $(this,null,function*(){if(!e||!t){let I="Make sure item id and role are provided.";return console.error(I),{isSuccess:!1,code:ke.ArgumentException,message:I}}let p=this.dataService.batchUpdate(),g=window.location.host;return p.addInvite(e,this.rngService.generateTokenCryptoNumber(),t,i,a,g),p.save()})}addPersonalInvites(e,t,i,a,p,g=!0,I){return $(this,null,function*(){if(!e||!t||!i){let L="Make sure item id, role and email(-s) are provided.";return console.error(L),{isSuccess:!1,code:ke.ArgumentException,message:L}}let w=this.dataService.batchUpdate(),z=window.location.host;return i.forEach(L=>{w.addInvite(e,I||this.rngService.generateTokenCryptoNumber(),t,a,p,z,L.toLowerCase(),g)}),w.save()})}updateInviteRole(e,t,i){return $(this,null,function*(){if(!e||!i||!t){let w="Make sure itemId, token and role are provided.";return console.error(w),{isSuccess:!1,code:ke.ArgumentException,message:w}}let a=this.dataService.batchUpdate();a.updateTokenRole(e,i,t);let p=yield this.getToken(e,i),g=yield this.getAnonymousUsersForToken(e,i),I=yield this.queryService.getItemPromise(e);return g.forEach(w=>{a.addAcl(e,w,I.parentId,t)}),a.save()})}propagateInviteAclPermissions(e,t,i,a){return $(this,null,function*(){let p=yield this.getItemTokenByEmail(e,t.recipientEmail);return p&&p.role!==t.role?this.updateInviteRole(e,t.role,p.key):this.addPersonalInvites(e,t.role,[t.recipientEmail],i,a,!1,t.key)})}deletePropagatedInviteAclPermissions(e,t){return $(this,null,function*(){let i=yield this.getItemTokenByEmail(e,t);return i?this.removeInvite(e,i.key):{isSuccess:!0}})}removeInvite(e,t){return $(this,null,function*(){if(!e||!t){let p="Make sure item id and token are provided.";return console.error(p),{isSuccess:!1,code:ke.ArgumentException,message:p}}let i=this.dataService.batchUpdate();i.removeToken(e,t),yield i.removeMailerByToken(e,t);let a=yield this.getToken(e,t);return i.save()})}addAnonymousIdToToken(e,t,i){return $(this,null,function*(){if(!e||!t||!i){let p="Make sure itemId, token and firebase loginId are provided.";return console.error(p),{isSuccess:!1,code:ke.ArgumentException,message:p}}let a=this.dataService.batchUpdate();return a.addTokenLoginId(e,t,i),a.save()})}updateUserRole(e,t,i,a){return $(this,null,function*(){if(!e.id||!t||!i||!a){let g="Make sure item id, user id and role are provided.";return console.error(g),{isSuccess:!1,code:ke.ArgumentException,message:g}}let p=this.dataService.batchUpdate();return p.addAcl(e.id,t,e.parentId,i),p.save()})}updateGroupRole(e,t,i){return $(this,null,function*(){if(!e.id||!t){let p="Make sure item id and group key are provided.";
1return console.error(p),{isSuccess:!1,code:ke.ArgumentException,message:p}}let a=this.dataService.batchUpdate();return a.addGroup(e.id,t,e.parentId,i),a.save()})}getItemTokenByEmail(e,t){return $(this,null,function*(){return this.itemDataService.getTokenByEmailAndItemId(t,e)})}getInvitesList(e){return this.itemDataService.getItemTokens(e).pipe(te(t=>Object.keys(t).map(i=>ft(me({},t[i]),{key:i}))))}getGroupsList(e){return this.itemDataService.getItemGroups(e).pipe(te(t=>({parentId:e,groupDocs:Object.keys(t).map(i=>ft(me({},t[i]),{key:i}))})))}getAnonymousUsersForToken(e,t){try{return Ci(this.anonymousUsersDataService.getAnonymousUserIds(e,t).pipe(yi(1)))}catch(i){return qo(i instanceof Error?i:new Error(typeof i=="string"?i:void 0)),Promise.resolve([])}}addGroupToAcl(e,t,i,a){return $(this,null,function*(){if(!t)return{isSuccess:!1,code:ke.ArgumentException,payload:"ArgumentException"};if(i.role!=="root"){let g=(yield this.itemDataService.getItemAclOnce(t))[i.loginId];if(!g||Q[g]<Q[K.Editor])return{isSuccess:!1,code:ke.PermissionDenied,payload:"PermissionDenied"}}let p=this.dataService.batchUpdate();return p.addGroup(e.id,t,e.parentId,a),p.save()})}removeGroup(e,t){return $(this,null,function*(){let i=this.dataService.batchUpdate();return i.removeGroup(e,t),i.save()})}removeAclUser(e,t,i){return $(this,null,function*(){let a=yield this.itemDataService.getItemGroupsListOnce(e),g=(0,Pl.flatten)(yield Promise.all(a.map(I=>this.itemDataService.getItemAclListOnce(I.itemId)))).filter(I=>I.loginId===t&&I.rootId!==e).sort((I,w)=>cs(I.role,w.role)===w.role?1:-1)[0];g?yield this.addUserToItemACL(e,t,g.role,!0,g.itemId,g.rootId):yield this.removeAcl(e,t,i)})}};s(r,"\u0275fac",function(t){return new(t||r)(it(Ee),it(Rt),it(ds),it(ar),it(hs),it(yl))}),s(r,"\u0275prov",st({token:r,factory:r.\u0275fac}));let n=r;return n})();var bl=[he];var Zn=Pe(we());function In(n){return n.split(/[ ,]+/g).map(r=>r.trim()).filter(r=>r.length>0)}var kc=["hz-group-permissions-new",""];function Dc(n,r){if(n&1&&(d(0,"div",8)(1,"span",9),y(2),h(3,"translate"),m()()),n&2){let o=r.$implicit;l(),c("hzFocus",o),l(),U(f(3,2,o))}}function Rc(n,r){if(n&1&&(d(0,"div")(1,"div",10),y(2),h(3,"translate"),m(),d(4,"span",11),y(5),h(6,"translate"),m()()),n&2){let o=r.$implicit,e=u();ki("disabled",e.isDisabled(o.key)),l(2),U(f(3,4,o.name)),l(3),T(" ",f(6,6,o.description)," ")}}function Bc(n,r){n&1&&_(0,"button",12)}function Nc(n,r){if(n&1){let o=S();d(0,"button",13),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.addGroup(t.groupPath))}),_(2,"i",14),m()}if(n&2){let o=u();c("disabled",!o.groupPath)("title",f(1,2,"COMMON.ACTION_CONFIRM"))}}var Qn=(()=>{let r=class r{constructor(){s(this,"aclService",M(he));s(this,"store",M(D));s(this,"rngService",M(Ee));s(this,"errorMessage$",new Te);s(this,"currentUserRole");s(this,"isUserRoot",!1);s(this,"onAddGroup",new E);s(this,"possibleRoleOptions",[{key:"Inherit",name:"USER_PERMISSIONS.INHERIT",description:"USER_ROLE_DESCRIPTION.INHERIT"},...ce]);s(this,"roleOptions",[{key:"Inherit",name:"USER_PERMISSIONS.INHERIT",description:"USER_ROLE_DESCRIPTION.INHERIT"},...ce]);s(this,"groupPath","");s(this,"currentRole","Inherit");s(this,"isActionInProgress",Y(!1));s(this,"customDomains",O(this.store.select(Rr),{initialValue:[]}));s(this,"currentRequestId",Y(null));ie(()=>{var t;let e=this.currentRequestId();if(e){let i=O(rn(this.store,e),{initialValue:!1});this.isActionInProgress.set((t=i())!=null?t:!1)}})}ngOnChanges(e){(e.isUserRoot||e.currentUserRole)&&(this.possibleRoleOptions=this.roleOptions.filter(t=>this.checkPermissionToChange(t.key)))}checkPermissionToChange(e){return e==="Inherit"?!0:this.isUserRoot||this.currentUserRole===K.Owner||Q[this.currentUserRole]>Q[e]}isDisabled(e){return!this.isUserRoot&&this.currentUserRole!==K.Owner&&Q[this.currentUserRole]<=Q[e]}addGroup(e){let t=this.customDomains(),i=this.rngService.guid(),p=In(e).map(g=>{if(!g.includes("/"))return{isLink:!1,link:g,overrideRole:this.currentRole==="Inherit"?void 0:this.currentRole};try{let I=new URL(g),w=t.map(L=>L.host).indexOf(I.hostname),z=I.pathname.endsWith("/")?I.pathname.slice(0,-1):I.pathname;return w!==-1?{isLink:!0,link:"".concat(t[w].pathPrefix).concat(z),overrideRole:this.currentRole==="Inherit"?void 0:this.currentRole}:{isLink:!0,link:z,overrideRole:this.currentRole==="Inherit"?void 0:this.currentRole}}catch(I){}return{isLink:!0,link:g.endsWith("/")?g.slice(0,-1):g,overrideRole:this.currentRole==="Inherit"?void 0:this.currentRole}});this.onAddGroup.emit({groups:p,requestId:i}),this.groupPath="",this.currentRequestId.set(i),ie(()=>{let g=O(on(this.store,i),{initialValue:null})();if(g&&g.isSuccess===!1){switch(g.code){case 401:this.errorMessage$.next("SHARING.ADD_ACL_ERROR_401");break;default:this.errorMessage$.next("SHARING.ADD_ACL_ERROR");break}return}g&&g.isSuccess===!0&&this.errorMessage$.next("")})}getCurrentRole(e){return(0,Zn.find)(this.roleOptions,t=>t.key===e).name}changeRole(e){let t=(0,Zn.find)(this.roleOptions,i=>i.name===e).key;this.currentRole=t}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["","hz-group-permissions-new",""]],inputs:{errorMessage$:"errorMessage$",currentUserRole:"currentUserRole",isUserRoot:"isUserRoot"},outputs:{onAddGroup:"onAddGroup"},standalone:!1,features:[F],attrs:kc,decls:13,vars:12,consts:[["optionTemplate",""],["colspan","5"],[1,"ui","fluid","input"],["type","text","name","groupPath",1,"ui","input",3,"ngModelChange","keyup.enter","placeholder","ngModel"],["class","ui negative message",4,"ngIf"],["labelField","name","valueField","name",1,"ui","fluid",3,"valueChange","value","o
1ptions","template"],["class","ui loading fluid button disabled",4,"ngIf"],["class","ui green fluid icon button","hzTab","",3,"disabled","title","click",4,"ngIf"],[1,"ui","negative","message"],[3,"hzFocus"],[1,"header"],[1,"role-description"],[1,"ui","loading","fluid","button","disabled"],["hzTab","",1,"ui","green","fluid","icon","button",3,"click","disabled","title"],[1,"ui","add","user","icon"]],template:function(t,i){if(t&1){let a=S();d(0,"td",1)(1,"div",2)(2,"input",3),h(3,"translate"),Fe("ngModelChange",function(g){return C(a),Ue(i.groupPath,g)||(i.groupPath=g),v(g)}),b("keyup.enter",function(){return C(a),v(i.groupPath?i.addGroup(i.groupPath):"")}),m()(),P(4,Dc,4,4,"div",4),h(5,"async"),m(),d(6,"td")(7,"hz-select",5),b("valueChange",function(g){return C(a),v(i.changeRole(g))}),m(),P(8,Rc,7,8,"ng-template",null,0,re),m(),d(10,"td"),P(11,Bc,1,0,"button",6)(12,Nc,3,4,"button",7),m()}if(t&2){let a=le(9);l(2),c("placeholder",f(3,8,"USER_PERMISSIONS.HAZU_LINK")),Ve("ngModel",i.groupPath),l(2),c("ngIf",f(5,10,i.errorMessage$)),l(3),c("value",i.getCurrentRole(i.currentRole))("options",i.possibleRoleOptions)("template",a),l(4),c("ngIf",i.isActionInProgress()),l(),c("ngIf",!i.isActionInProgress())}},dependencies:[R,Ji,en,tn,De,Yt,Se,W,V],styles:["hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}"],changeDetection:0}));let n=r;return n})();var Vc=["hz-group-permissions-row",""];function Uc(n,r){if(n&1&&(d(0,"span"),y(1),m()),n&2){let o=u();l(),U(o.gr.itemTitle)}}function Fc(n,r){if(n&1&&(d(0,"a",21),y(1),m()),n&2){let o=u();c("popupText",o.gr.itemLink)("popupDelay",300)("href",o.routerService.getPermalinkFromAclGroup(o.gr),We),l(),U(o.gr.itemId)}}function Hc(n,r){if(n&1&&(d(0,"div",22),h(1,"async"),d(2,"span"),y(3),h(4,"initials"),m()()),n&2){let o=u();c("popupText",o.getUserName(f(1,3,o.roleList$)).join(", ")),ne("data-position","top center"),l(3),U(A(4,5,o.getUserName(),3))}}function Gc(n,r){if(n&1&&(d(0,"div",23),y(1),h(2,"translate"),m(),d(3,"span",24),y(4),h(5,"translate"),m()),n&2){let o=r.$implicit;l(),T(" ",f(2,2,o.name)," "),l(3),T(" ",f(5,4,o.description)," ")}}var Jn=(()=>{let r=class r{constructor(e,t,i,a,p){s(this,"aclService");s(this,"store");s(this,"routerService");s(this,"translate");s(this,"rngService");s(this,"gr");s(this,"groupUsers");s(this,"currentUser");s(this,"currentUserRole");s(this,"isUserRoot",!1);s(this,"onUpdateRole",new E);s(this,"onRemoveGroup",new E);s(this,"onPropagatePermissions",new E);s(this,"onDeletePropagatedPermissions",new E);s(this,"isDropdownOpened",!1);s(this,"possibleRoleOptions",[{key:"Inherit",name:"USER_PERMISSIONS.INHERIT",description:"USER_ROLE_DESCRIPTION.INHERIT"},...ce]);s(this,"roleOptions",[{key:"Inherit",name:"USER_PERMISSIONS.INHERIT",description:"USER_ROLE_DESCRIPTION.INHERIT"},...ce]);s(this,"baseItem$");s(this,"roleList$");s(this,"hasPermissionToChange",!1);s(this,"roleName","");this.aclService=e,this.store=t,this.routerService=i,this.translate=a,this.rngService=p,this.baseItem$=t.select(zt);let g=["owner","admin","reader","editor"],I=["USER_PERMISSIONS.ROLE_OWNER","USER_PERMISSIONS.ROLE_ADMIN","USER_PERMISSIONS.ROLE_READER","USER_PERMISSIONS.ROLE_EDITOR"];this.roleList$=vi(...I.map(w=>this.translate.get(w))).pipe(te(w=>w.map((z,L)=>({value:z,key:g[L]}))))}ngOnChanges(e){var t;if((e.isUserRoot||e.currentUserRole)&&(this.possibleRoleOptions=this.roleOptions.filter(i=>this.checkPermissionToChange(i.key))),e.gr){let i=this.gr.overrideRole;i!==void 0?this.hasPermissionToChange=this.checkPermissionToChange(i):this.hasPermissionToChange=!0,this.roleName=this.gr.overrideRole===void 0?"USER_PERMISSIONS.INHERIT":(t=this.roleOptions.find(a=>a.key===this.gr.overrideRole))==null?void 0:t.name}}checkPermissionToChange(e){return e==="Inherit"?!0:this.isUserRoot||this.currentUserRole===K.O
1wner||Q[this.currentUserRole]>Q[e]}getUserName(e){if(!this.groupUsers)return[];let t=this.groupUsers.filter(i=>i.displayName);return e?t.map(i=>{let a=e.map(p=>p.key).indexOf(i.role.toLowerCase());return"".concat(i.displayName," (").concat(e[a].value,")")}):t.map(i=>i.displayName)}changeRole(e){var i;let t=(i=this.roleOptions.find(a=>a.name===e))==null?void 0:i.key;t!=="Inherit"?this.onUpdateRole.emit({groupKey:this.gr.key,role:t}):this.onUpdateRole.emit({groupKey:this.gr.key,role:void 0})}get isCurrentUserOwner(){return this.currentUserRole===K.Owner}};s(r,"\u0275fac",function(t){return new(t||r)(x(he),x(D),x(At),x(Zi),x(Ee))}),s(r,"\u0275cmp",k({type:r,selectors:[["","hz-group-permissions-row",""]],inputs:{gr:"gr",groupUsers:"groupUsers",currentUser:"currentUser",currentUserRole:"currentUserRole",isUserRoot:"isUserRoot"},outputs:{onUpdateRole:"onUpdateRole",onRemoveGroup:"onRemoveGroup",onPropagatePermissions:"onPropagatePermissions",onDeletePropagatedPermissions:"onDeletePropagatedPermissions"},standalone:!1,features:[F],attrs:Vc,decls:44,vars:36,consts:[["optionTemplate",""],["hzTab","",1,"group-title"],[4,"ngIf"],["hzTab","",1,"group-link"],["fuiPopup","","target","_blank",3,"popupText","popupDelay","href",4,"ngIf"],["hzTab","",1,"center"],["fuiPopup","",3,"popupText","popupDelay"],["ngxClipboard","","hzTab","","aria-hidden","true",1,"ui","large","grey","copy","icon",3,"cbContent","title"],["class","ui label","data-inverted","","fuiPopup","","hzTab","",3,"popupText",4,"ngIf"],[1,"center","propagate-dropdown","group"],["position","right top","autoClose","outsideClick",3,"isOpenChange","isOpen"],["hzTab","",3,"title"],[1,"ui","large","grey","setting","icon"],["hz-item","",1,"ui","header"],["href","javascript:;",1,"closeBtn"],[1,"remove","icon","grey",3,"click"],["hz-item","","hzTab","",3,"click","title"],["translate",""],["labelField","name","valueField","name",3,"valueChange","value","options","isDisabled","template"],["type","button",1,"ui","fluid","red","icon","button",3,"click","title"],[1,"ui","remove","user","icon"],["fuiPopup","","target","_blank",3,"popupText","popupDelay","href"],["data-inverted","","fuiPopup","","hzTab","",1,"ui","label",3,"popupText"],[1,"header"],[1,"role-description"]],template:function(t,i){if(t&1){let a=S();d(0,"td",1),P(1,Uc,2,1,"span",2),m(),d(2,"td",3),P(3,Fc,2,4,"a",4),m(),d(4,"td",5)(5,"a",6),h(6,"translate"),_(7,"i",7),h(8,"translate"),m()(),d(9,"td"),P(10,Hc,5,8,"div",8),h(11,"async"),m(),d(12,"td",9)(13,"hz-dropdown",10),Fe("isOpenChange",function(g){return C(a),Ue(i.isDropdownOpened,g)||(i.isDropdownOpened=g),v(g)}),d(14,"hz-text",11),h(15,"translate"),_(16,"i",12),m(),d(17,"div",13)(18,"a",14)(19,"i",15),b("click",function(){return C(a),v(i.isDropdownOpened=!1)}),m()()(),d(20,"div",16),h(21,"translate"),b("click",function(){return C(a),v(i.onPropagatePermissions.emit({group:i.gr,publicItemsOnly:!1}))}),d(22,"span",17),y(23,"USER_PERMISSIONS.ALL_HAZU"),m()(),d(24,"div",16),h(25,"translate"),b("click",function(){return C(a),v(i.onPropagatePermissions.emit({group:i.gr,publicItemsOnly:!0}))}),d(26,"span",17),y(27,"USER_PERMISSIONS.ALL_BUT_PRIVATE_HAZU"),m()(),d(28,"div",16),h(29,"translate"),b("click",function(){return C(a),v(i.onDeletePropagatedPermissions.emit({group:i.gr,publicItemsOnly:!1}))}),d(30,"span",17),y(31,"USER_PERMISSIONS.DELETE_ALL_HAZU"),m()(),d(32,"div",16),h(33,"translate"),b("click",function(){return C(a),v(i.onDeletePropagatedPermissions.emit({group:i.gr,publicItemsOnly:!0}))}),d(34,"span",17),y(35,"USER_PERMISSIONS.DELETE_ALL_BUT_PRIVATE_HAZU"),m()()()(),d(36,"td")(37,"hz-select",18),b("valueChange",function(g){return C(a),v(i.changeRole(g))}),m(),P(38,Gc,6,6,"ng-template",null,0,re),m(),d(40,"td")(41,"button",19),h(42,"translate"),b("click",function(){return C(a),v(i.onRemoveGroup.emit(i.gr))}),_(43,"i",20),m()()}if(t&2){let a,p=le(39);l(),c("ngIf",i.gr.itemTitle),l(2),c("ngIf",i.gr.itemId),l(2),c("popupText",f(6,18,"SHARING.COPY_PERMALINK"))("popupDelay",300),l(2),c("cbContent",i.routerService.getPermalinkFromAclGroup(i.gr))("title",f(8,20,"SHARING.COPY_PERMALINK")),l(3),c("ngIf",((a=i.getUserName(f(11,22,i.roleList$)))==null?null:a.length)>0),l(3),Ve("isOpen",i.isDropdownOpened),l(),c("title",f(15,24,"ACTIONS.OPEN_SETTINGS")),l(6),c("title",f(21,26,"USER_PERMISSIONS.ALL_HAZU_DESC")),l(4),c("title",f(25,28,"USER_PERMISSIONS.ALL_BUT_PRIVATE_HAZU_DESC")),l(4),c("title",f(29,30,"USER_PERMISSIONS.DELETE_ALL_HAZU_DESC")),l(4),c("title",f(33,32,"USER_PERMISSIONS.DELETE_ALL_BUT_PRIVATE_HAZU_DESC")),l(5),c("value",i.roleName)("options",i.hasPermissionToChange?i.possibleRoleOptions:i.roleOptions)("isDisabled",!i.hasPermissionToChange)("template",p),l(4),c("title",f(42,34,"COMMON.ACTION_DELET
1E"))}},dependencies:[R,_e,Ce,Nt,De,Wt,Se,W,V,ea],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]   .circle[_ngcontent-%COMP%]{background-color:#7f7f7f;border-radius:3rem;color:#fff;display:block;font-size:1.5rem;height:3rem;line-height:3rem;margin:0 auto;text-align:center;width:3rem}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]{height:5px;text-align:right}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]{height:5px;text-align:right}}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{display:block;float:right;margin-top:-70px}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{display:block;float:right;margin-top:-70px}}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:none}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:block}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:block}}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header .closeBtn{cursor:pointer;float:right;font-size:1rem;margin-right:.5rem;position:absolute;right:0}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header .closeBtn .icon{margin-left:.25rem;margin-right:.25rem}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option.active{background:#00000026!important}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .header{font-size:1.1rem;font-weight:700;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none;line-height:1.5em}"],changeDetection:0}));let n=r;return n})();var eo=(n,r)=>({"fa-sort-alpha-asc":n,"fa-sort-alpha-desc":r});function jc(n,r){if(n&1&&(d(0,"div",8),y(1),m(),d(2,"span",9),y(3),m()),n&2){let o=r.$implicit;l(),U(o.name),l(2),T(" ",o.description," ")}}function Yc(n,r){if(n&1&&_(0,"i",5),n&2){let o=u();c("ngClass",X(1,eo,!o.sort.order,o.sort.order))}}function Xc(n,r){if(n&1&&_(0,"i",5),n&2){let o=u();c("ngClass",X(1,eo,!o.sort.order,o.sort.order))}}function qc(n,r){if(n&1){let o=S();d(0,"tr",10),b("onPropagatePermissions",function(t){C(o);let i=u();return v(i.propagatePermissions(t.group,t.publicItemsOnly))})("onDeletePropagatedPermissions",function(t){C(o);let i=u();return v(i.deletePropagatedPermissions(t.group,t.publicItemsOnly))})("onRemoveGroup",function(t){C(o);let i=u();return v(i.remove(t.key))})("onUpdateRole",function(t){C(o);let i=u();return v(i.updateRole(t.groupKey,t.role))}),m()}if(n&2){let o=r.$implicit,e=u();c("gr",o)("groupUsers",e.usersFromGroups[o.key])("currentUser",e.authentication())("isUserRoot",e.isUserRoot())("currentUserRole",e.currentUserRole())}}var to=(()=>{let r=class r{constructor(e){s(this,"aclService");
1s(this,"store",M(D));s(this,"item");s(this,"loadedGroups");s(this,"usersFromGroups",{});s(this,"errorMessage$",new Te);s(this,"authentication",this.store.selectSignal(mt));s(this,"currentUserRole",this.store.selectSignal(Dt));s(this,"isUserRoot",this.store.selectSignal(dt));s(this,"sort",{column:"title",order:!0});this.aclService=e}addGroup(e){let{requestId:t,groups:i}=e;if(i.filter(p=>this.loadedGroups.filter(g=>(p.isLink?g.itemLink:g.itemId)===p.link).length!==0).length){this.errorMessage$.next("SHARING.HAZU_ALREADY_ADDED");return}this.store.dispatch(ks(i,t,e.groups[0].overrideRole))}remove(e){this.store.dispatch(Rs(this.item.id,e))}propagatePermissions(e,t){this.store.dispatch(jt(Ke.SHOULD_PROPAGATED_GROUPS,{group:e,publicItemsOnly:t}))}deletePropagatedPermissions(e,t){this.store.dispatch(jt(Ke.SHOULD_DELETE_PROPAGATED_GROUPS,{group:e,publicItemsOnly:t}))}updateRole(e,t){this.store.dispatch(As(this.item,e,t))}changeSorting(e){this.sort.column===e?this.sort.order=!this.sort.order:(this.sort.column=e,this.sort.order=!0)}convertSorting(){return this.sort.order?"-"+this.sort.column:this.sort.column}};s(r,"\u0275fac",function(t){return new(t||r)(x(he))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-group-permissions"]],inputs:{item:"item",loadedGroups:"loadedGroups",usersFromGroups:"usersFromGroups"},standalone:!1,decls:31,vars:28,consts:[["optionTemplate",""],[1,"ui","info","message"],[1,"ui","sortable","celled","striped","table"],[3,"click"],["class","fa",3,"ngClass",4,"ngIf"],[1,"fa",3,"ngClass"],["class","row","hz-group-permissions-row","",3,"gr","groupUsers","currentUser","isUserRoot","currentUserRole","onPropagatePermissions","onDeletePropagatedPermissions","onRemoveGroup","onUpdateRole",4,"ngFor","ngForOf"],["hz-group-permissions-new","",1,"row",3,"onAddGroup","currentUserRole","isUserRoot","errorMessage$"],[1,"header"],[1,"role-description"],["hz-group-permissions-row","",1,"row",3,"onPropagatePermissions","onDeletePropagatedPermissions","onRemoveGroup","onUpdateRole","gr","groupUsers","currentUser","isUserRoot","currentUserRole"]],template:function(t,i){if(t&1){let a=S();P(0,jc,4,2,"ng-template",null,0,re),d(2,"div",1)(3,"p"),y(4),h(5,"translate"),m()(),d(6,"table",2)(7,"thead")(8,"tr")(9,"th",3),b("click",function(){return C(a),v(i.changeSorting("itemTitle"))}),y(10),h(11,"translate"),P(12,Yc,1,4,"i",4),m(),d(13,"th",3),b("click",function(){return C(a),v(i.changeSorting("itemId"))}),y(14),h(15,"translate"),P(16,Xc,1,4,"i",4),m(),_(17,"th"),d(18,"th",3),b("click",function(){return C(a),v(i.changeSorting("users"))}),y(19),h(20,"translate"),m(),_(21,"th"),d(22,"th",3),b("click",function(){return C(a),v(i.changeSorting("roleIndex"))}),y(23),h(24,"translate"),_(25,"i",5),m(),_(26,"th"),m()(),d(27,"tbody"),P(28,qc,1,5,"tr",6),h(29,"orderBy"),d(30,"tr",7),b("onAddGroup",function(g){return C(a),v(i.addGroup(g))}),m()()()}t&2&&(l(4),U(f(5,12,"USER_PERMISSIONS.INFO_MESSAGE_GROUP")),l(6),T(" ",f(11,14,"USER_PERMISSIONS.HAZU_TITLE")," "),l(2),c("ngIf",i.sort.column==="itemTitle"),l(2),T(" ",f(15,16,"USER_PERMISSIONS.HAZU_ID")," "),l(2),c("ngIf",i.sort.column==="itemId"),l(3),T(" ",f(20,18,"USER_PERMISSIONS.HAZU_USERS")," "),l(4),T(" ",f(24,20,"USER_PERMISSIONS.ROLE")," "),l(2),c("ngClass",X(25,eo,!i.sort.order,i.sort.order)),l(3),c("ngForOf",A(29,22,i.loadedGroups,i.convertSorting())),l(2),c("currentUserRole",i.currentUserRole())("isUserRoot",i.isUserRoot())("errorMessage$",i.errorMessage$))},dependencies:[H,ze,R,Qn,Jn,V,Ft],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]{display:block;width:100%}
1[_nghost-%COMP%]   .circle[_ngcontent-%COMP%]{background-color:#7f7f7f;border-radius:3rem;color:#fff;display:block;font-size:1.5rem;height:3rem;line-height:3rem;margin:0 auto;text-align:center;width:3rem}th.center[_ngcontent-%COMP%]{text-align:center!important}th.emails[_ngcontent-%COMP%]{display:flex}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}@container sidebar (max-width: 767px){[_nghost-%COMP%]{padding-bottom:140px!important}[_nghost-%COMP%]     div.role{margin:0!important}}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding-bottom:140px!important}[_nghost-%COMP%]     div.role{margin:0!important}}"],changeDetection:0}));let n=r;return n})();function Zc(n,r){if(n&1&&(d(0,"div",13),y(1),h(2,"translate"),m(),d(3,"span",14),y(4),h(5,"translate"),m()),n&2){let o=r.$implicit;l(),U(f(2,2,o.name)),l(3),T(" ",f(5,4,o.description)," ")}}var io=(()=>{let r=class r{constructor(e){s(this,"window");s(this,"inviteItem");s(this,"item");s(this,"onRemoveUser",new E);s(this,"roleOptions",ce);s(this,"getCurrentRole",e=>{var t;return(t=this.roleOptions.find(i=>i.key===e))==null?void 0:t.name});this.window=e}buildInviteLinkToShare(e){return"".concat(this.window.location.origin,"/").concat(this.item.key,"?accessToken=").concat(e)}buildCalendarLinkToShare(e){return"https://"+"".concat(Ye.CLOUD_FUNCTIONS_REGION,"-")+"".concat(Ye.FIREBASE_CONFIG.projectId,".")+"cloudfunctions.net/getCalendarFeeds?id=".concat(this.item.key,"&token=").concat(e)}};s(r,"\u0275fac",function(t){return new(t||r)(x(ms))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-invite-permissions-row"]],inputs:{inviteItem:"inviteItem",item:"item"},outputs:{onRemoveUser:"onRemoveUser"},standalone:!1,decls:22,vars:25,consts:[["optionTemplate",""],[1,"ui","eight","wide","computer","eleven","wide","mobile","column"],[1,"ui","header"],[1,"description"],[1,"ui","two","wide","computer","five","wide","mobile","column","copy-buttons"],["fuiPopup","",3,"popupText","popupDelay"],["ngxClipboard","","hzTab","","aria-hidden","true",1,"ui","large","grey","copy","icon",3,"cbContent","title"],["ngxClipboard","","hzTab","","aria-hidden","true",1,"ui","large","grey","calendar","icon",3,"cbContent","title"],[1,"ui","four","wide","computer","sixteen","wide","mobile","column","role"],["labelField","name","valueField","name",1,"ui","fluid",3,"value","options","template","isDisabled"],[1,"ui","two","wide","computer","sixteen","wide","mobile","column"],["type","button",1,"ui","fluid","red","icon","button",3,"click","title"],["aria-hidden","true",1,"ui","remove","user","icon"],[1,"header"],[1,"role-description"]],template:function(t,i){if(t&1){let a=S();d(0,"div",1)(1,"div",2),y(2),m(),d(3,"div",3),y(4),m()(),d(5,"div",4)(6,"div",5),h(7,"translate"),_(8,"i",6),h(9,"translate"),m(),d(10,"div",5),h(11,"translate"),_(12,"i",7),h(13,"translate"),m()(),d(14,"div",8),_(15,"hz-select",9),P(16,Zc,6,6,"ng-template",null,0,re),m(),d(18,"div",10)(19,"button",11),h(20,"translate"),b("click",function(){return C(a),v(i.onRemoveUser.emit(i.inviteItem))}),_(21,"i",12),m()()}if(t&2){let a=le(17);l(2),T(" ",i.inviteItem.key," "),l(2),U(i.buildInviteLinkToShare(i.inviteItem.key)),l(2),c("popupText",f(7,15,"SHARING.COPY_INVITE_TOOLTIP"))("popupDelay",300),l(2),c("cbContent",i.buildInviteLinkToShare(i.inviteItem.key))("title",f(9,17,"SHARING.COPY_INVITE_TOOLTIP")),l(2),c("popupText",f(11,19,"SHARING.COPY_CALENDAR_TOOLTIP"))("popupDelay",300),l(2),c("cbContent",i.buildCalendarLinkToShare(i.inviteItem.key))("title",f(13,21,"SHARING.COPY_CALENDAR_TOOLTIP")),l(3),c("value",i.getCurrentRole(i.inviteItem.role))("options",i.roleOptions)("template",a)("isDisabled",!0),l(4),c("title",f(20,23,"COMMON.ACTION_DELET
1E"))}},dependencies:[Ce,De,Wt,Se,V],styles:["[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   .header[_ngcontent-%COMP%]{margin-bottom:auto}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}[_nghost-%COMP%]   [fuipopup][_ngcontent-%COMP%]{display:inline-block;min-width:40px}[_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{cursor:pointer}"],changeDetection:0}));let n=r;return n})();function Jc(n,r){if(n&1){let o=S();d(0,"hz-invite-permissions-row",17),b("onRemoveUser",function(t){C(o);let i=u();return v(i.removeInvite(t.key))}),m()}if(n&2){let o=r.$implicit,e=u();c("inviteItem",o)("item",e.item)}}function ed(n,r){if(n&1&&(d(0,"div",18)(1,"span",19),y(2),h(3,"translate"),m()()),n&2){let o=r.$implicit;l(),c("hzFocus",o),l(),U(f(3,2,o))}}function td(n,r){if(n&1&&(d(0,"div",20),y(1),h(2,"translate"),m(),d(3,"span",21),y(4),h(5,"translate"),m()),n&2){let o=r.$implicit;l(),U(f(2,2,o.name)),l(3),T(" ",f(5,4,o.description)," ")}}function id(n,r){n&1&&_(0,"button",22)}function nd(n,r){if(n&1){let o=S();d(0,"button",23),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.addInvite(t.currentRole))}),_(2,"i",24),m()}n&2&&c("title",f(1,1,"SHARING.NEW_INVITATION"))}function od(n,r){if(n&1&&(d(0,"div",28)(1,"div",20),y(2),h(3,"translate"),m(),d(4,"div",26)(5,"div",28),_(6,"i",29),d(7,"div",25),y(8),h(9,"translate"),m()()()()),n&2){let o=r.$implicit;l(2),U(f(3,2,o.name)),l(6),U(f(9,4,o.description))}}function rd(n,r){if(n&1&&(d(0,"div",25)(1,"div",26),P(2,od,10,6,"div",27),m()()),n&2){let o=u();l(2),c("ngForOf",o.roleOptions)}}var no=(()=>{let r=class r{constructor(){s(this,"store",M(D));s(this,"rngService",M(Ee));s(this,"aclService",M(he));s(this,"isPersonal",!1);s(this,"item");s(this,"loadedInvites");s(this,"errorMessage",Y(""));s(this,"isActionInProgress",Y(!1));s(this,"userEmail","");s(this,"currentRole",K.Admin);s(this,"roleOptions",ce);s(this,"possibleRoleOptions",ce);s(this,"isMobile",O(this.store.select(at),{initialValue:!1}));s(this,"currentUserRole",O(this.store.select(Dt),{initialValue:void 0}));s(this,"isUserRoot",O(this.store.select(dt),{initialValue:!1}));s(this,"getCurrentRole",e=>{var t;return(t=this.roleOptions.find(i=>i.key===e))==null?void 0:t.name});ie(()=>{this.currentUserRole(),this.isUserRoot(),this.updatePossibleRoleOptions()})}ngOnChanges(){this.updatePossibleRoleOptions()}updatePossibleRoleOptions(){this.possibleRoleOptions=this.roleOptions.filter(t=>!this.isDisabled(t.key)),!this.possibleRoleOptions.find(t=>t.key===this.currentRole)&&this.possibleRoleOptions.length>0&&(this.currentRole=K.Editor)}isDisabled(e){let t=this.currentUserRole();return!this.isUserRoot()&&t!==K.Owner&&Q[t]<=Q[e]}get publicInvites(){return this.loadedInvites.filter(e=>!e.recipientEmail)}changeRole(e){var i;let t=(i=this.roleOptions.find(a=>a.name===e))==null?void 0:i.key;t!==void 0&&(this.currentRole=t)}addInvite(e){let t=this.rngService.guid();this.store.dispatch(Vs(t,e))}removeInvite(e){this.aclService.removeInvite(this.item.id,e)}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-invite-permissions"]],inputs:{isPersonal:"isPersonal",item:"item",loadedInvites:"loadedInvites"},standalone:!1,features:[F],decls:21,vars:10,consts:[["optionTemplate",""],["popupTemplate",""],["translate","",1,"ui","header"],[1,"ui","vertically","divided","form","grid"],["class","ui row",3,"inviteItem","item","onRemoveUser",4,"ngFor","ngForOf"],[1,"ui","row"],[1,"ui","eight","wide","computer","thirteen","wide","mobile","column"],["translate","",1,"ui","header","grey"],["class","ui negative message",4,"ngIf"],[1,"ui","two","wide","computer","three","wide","mobile","column","copy-buttons"],["fuiPopup","",1,"invite-info",3,"popupTemplate","popupDelay","popupPlacement"],["aria-hidden","true",1,"ui","link","icon","question","outline","circle","large"],[1,"ui","four","wide","computer","sixteen","wide","mobile","column","role"],["labelField","name","valueField","name",1,"ui","fluid",3,"valueChange","value","o
1ptions","template"],[1,"ui","two","wide","computer","sixteen","wide","mobile","column"],["class","ui loading fluid button disabled",4,"ngIf"],["class","ui green fluid icon button",3,"title","click",4,"ngIf"],[1,"ui","row",3,"onRemoveUser","inviteItem","item"],[1,"ui","negative","message"],[3,"hzFocus"],[1,"header"],[1,"role-description"],[1,"ui","loading","fluid","button","disabled"],[1,"ui","green","fluid","icon","button",3,"click","title"],["aria-hidden","true",1,"ui","add","user","icon"],[1,"content"],[1,"ui","list"],["class","item",4,"ngFor","ngForOf"],[1,"item"],["aria-hidden","true",1,"green","check","icon"]],template:function(t,i){if(t&1){let a=S();d(0,"h3",2),y(1,"SHARING.GLOBAL_TOKENS"),m(),d(2,"div",3),P(3,Jc,1,2,"hz-invite-permissions-row",4),d(4,"div",5)(5,"div",6)(6,"p",7),y(7,"SHARING.NEW_INVITATION"),m(),P(8,ed,4,4,"div",8),m(),d(9,"div",9)(10,"div",10),_(11,"i",11),m()(),d(12,"div",12)(13,"hz-select",13),b("valueChange",function(g){return C(a),v(i.changeRole(g))}),m(),P(14,td,6,6,"ng-template",null,0,re),m(),d(16,"div",14),P(17,id,1,0,"button",15)(18,nd,3,3,"button",16),m()()(),P(19,rd,3,1,"ng-template",null,1,re)}if(t&2){let a=le(15),p=le(20);l(3),c("ngForOf",i.publicInvites),l(5),c("ngIf",i.errorMessage()),l(2),c("popupTemplate",p)("popupDelay",300)("popupPlacement",i.isMobile()?"left center":"bottom center"),l(3),c("value",i.getCurrentRole(i.currentRole))("options",i.possibleRoleOptions)("template",a),l(4),c("ngIf",i.isActionInProgress()),l(),c("ngIf",!i.isActionInProgress())}},dependencies:[ze,R,_e,qe,Ce,De,Yt,io,V],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]{display:block;width:100%}[_nghost-%COMP%]   h3[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]     .external.share:not(:active){margin-top:0;transition:all 50ms step-end}[_nghost-%COMP%]     .external.share:active{margin-top:5px}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}[_nghost-%COMP%]     .copy-buttons{text-align:center}@container sidebar (max-width: 767px){[_nghost-%COMP%]     .copy-buttons{text-align:right}}@media only screen and (max-width:767px){[_nghost-%COMP%]     .copy-buttons{text-align:right}}"],changeDetection:0}));let n=r;return n})();var Je=Pe(we());var oo=Pe(we());var ad=["hz-user-permissions-new",""];function ld(n,r){if(n&1&&(d(0,"div",13)(1,"span",14),y(2),h(3,"translate"),m()()),n&2){let o=r.$implicit;l(),c("hzFocus",o),l(),U(f(3,2,o))}}function cd(n,r){if(n&1&&(d(0,"div")(1,"div",15),y(2),h(3,"translate"),m(),d(4,"span",16),y(5),h(6,"translate"),m()()),n&2){let o=r.$implicit,e=u();ki("disabled",e.isDisabled(o.key)),l(2),U(f(3,4,o.name)),l(3),T(" ",f(6,6,o.description)," ")}}function dd(n,r){n&1&&_(0,"button",17)}function md(n,r){if(n&1){let o=S();d(0,"button",18),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.addUser(t.userEmail,t.currentRole))}),_(2,"i",19),m()}if(n&2){let o=u();c("disabled",!o.userEmail)("title",f(1,2,"COMMON.ACTION_SEND"))}}var ro=(()=>{let r=class r{constructor(){s(this,"aclService",M(he));s(this,"store",M(D));s(this,"rngService",M(Ee));s(this,"errorMessage$",new Te);s(this,"currentUserRole");s(this,"isUserRoot",!1);s(this,"isSupportUsername",!1);s(this,"gmail");s(this,"onAddUser",new E);s(this,"possibleRoleOptions",ce);s(this,"roleOptions",ce);s(this,"currentRole",K.Admin);s(this,"userEmail","");s(this,"isActionInProgress",Y(!1));s(this,"sendInvitation",!0);s(this,"actionProgressSubscription",null);s(this,"actionResultSubscription",null)}ngOnChanges(){this.possibleRoleOptions=this.roleOptions.filter(t=>!this.isDisabled(t.key)),this.possibleRoleOptions.find(t=>t.key===this.currentRole)||(this.currentRole=K.Editor)}getCurrentRole(e){return(0,oo.find)(this.roleOptions,t=>t.key===e).name}isDisabled(e){return!this.isUserRoot&&this.currentUserRole!==K.Owner&&Q[this.currentUserRole]<=Q[e]}changeRole(e){let t=(0,oo.find)(this.roleOptions,i=>i.name===e).key;this.currentRole=t}addUser(e,t){var a,p;let i=this.rngService.guid();this.gmail&&!si(e)&&(e=this.gmail.replace("@","+".concat(e,"@"))),e=e.toLowerCase(),this.onAddUser.emit({email:e,role:t,requestId:i,sendInvitation:this.sendInvitation}
1),(a=this.actionProgressSubscription)==null||a.unsubscribe(),this.actionProgressSubscription=rn(this.store,i).subscribe(g=>{this.isActionInProgress.set(g!=null?g:!1)}),(p=this.actionResultSubscription)==null||p.unsubscribe(),this.actionResultSubscription=on(this.store,i).subscribe(g=>{if((g==null?void 0:g.isSuccess)===!1){this.errorMessage$.next("SHARING.ADD_ACL_ERROR");return}(g==null?void 0:g.isSuccess)===!0&&(this.userEmail="",this.errorMessage$.next(""))})}ngOnDestroy(){var e,t;(e=this.actionProgressSubscription)==null||e.unsubscribe(),(t=this.actionResultSubscription)==null||t.unsubscribe()}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["","hz-user-permissions-new",""]],inputs:{errorMessage$:"errorMessage$",currentUserRole:"currentUserRole",isUserRoot:"isUserRoot",isSupportUsername:"isSupportUsername",gmail:"gmail"},outputs:{onAddUser:"onAddUser"},standalone:!1,features:[F],attrs:ad,decls:21,vars:21,consts:[["optionTemplate",""],["colspan","3"],[1,"ui","fluid","input"],["type","text","name","userEmail",1,"ui","input",3,"ngModelChange","keyup.enter","placeholder","ngModel"],["class","ui negative message",4,"ngIf"],[1,"center"],[1,"ui","toggle","checkbox"],["fuiPopup","",3,"popupText","popupDelay","popupInverted"],["type","checkbox","name","public",3,"change","checked","title"],["aria-hidden","true",1,"large","grey","icon","envelope"],["labelField","name","valueField","name",1,"ui","fluid",3,"valueChange","value","options","template"],["class","ui loading fluid button disabled",4,"ngIf"],["class","ui green fluid icon button",3,"disabled","title","click",4,"ngIf"],[1,"ui","negative","message"],[3,"hzFocus"],[1,"header"],[1,"role-description"],[1,"ui","loading","fluid","button","disabled"],[1,"ui","green","fluid","icon","button",3,"click","disabled","title"],["aria-hidden","true",1,"ui","add","user","icon"]],template:function(t,i){if(t&1){let a=S();d(0,"td",1)(1,"div",2)(2,"input",3),h(3,"translate"),Fe("ngModelChange",function(g){return C(a),Ue(i.userEmail,g)||(i.userEmail=g),v(g)}),b("keyup.enter",function(){return C(a),v(i.userEmail?i.addUser(i.userEmail,i.currentRole):"")}),m()(),P(4,ld,4,4,"div",4),h(5,"async"),m(),d(6,"td",5)(7,"div",6)(8,"div",7),h(9,"translate"),d(10,"input",8),h(11,"translate"),b("change",function(){return C(a),v(i.sendInvitation=!i.sendInvitation)}),m(),d(12,"label"),_(13,"i",9),m()()()(),d(14,"td")(15,"hz-select",10),b("valueChange",function(g){return C(a),v(i.changeRole(g))}),m(),P(16,cd,7,8,"ng-template",null,0,re),m(),d(18,"td"),P(19,dd,1,0,"button",11)(20,md,3,4,"button",12),m()}if(t&2){let a=le(17);l(2),c("placeholder",f(3,13,i.isSupportUsername?"USER_PERMISSIONS.EMAIL_OR_USERNAME":"USER_PERMISSIONS.EMAIL_ADDRESS")),Ve("ngModel",i.userEmail),l(2),c("ngIf",f(5,15,i.errorMessage$)),l(4),c("popupText",f(9,17,"SHARING.SEND_INVITATION"))("popupDelay",300)("popupInverted",!0),l(2),c("checked",i.sendInvitation)("title",f(11,19,"SHARING.SEND_INVITATION")),l(5),c("value",i.getCurrentRole(i.currentRole))("options",i.possibleRoleOptions)("template",a),l(4),c("ngIf",i.isActionInProgress()),l(),c("ngIf",!i.isActionInProgress())}},dependencies:[R,Ji,en,tn,Ce,De,Yt,W,V],styles:["hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{dis
1play:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}"],changeDetection:0}));let n=r;return n})();var hd=["hz-user-permissions-row",""],ud=n=>({invited:n}),gd=n=>({inviteCode:n}),fd=n=>({"font-style-italic":n}),_d=(n,r)=>({sourceGroupTitle:n,sourceGroupId:r}),Cd=n=>({sourceGroupId:n});function vd(n,r){if(n&1&&(d(0,"span"),y(1),m()),n&2){let o=u();l(),U(o.user.displayName)}}function yd(n,r){if(n&1&&(d(0,"span"),h(1,"translate"),_(2,"i",15),y(3),h(4,"translate"),m()),n&2){let o=u();ne("data-tooltip",A(1,2,"SHARING.INVITE_CODE_LABEL",N(7,gd,o.user.key))),l(3),U(f(4,5,"SHARING.INVITED_LABEL"))}}function Id(n,r){if(n&1){let o=S();d(0,"hz-dropdown",16),Fe("isOpenChange",function(t){C(o);let i=u();return Ue(i.isDropdownOpened,t)||(i.isDropdownOpened=t),v(t)}),d(1,"hz-text",17),h(2,"translate"),_(3,"i",18),m(),d(4,"div",19)(5,"a",20)(6,"i",21),b("click",function(){C(o);let t=u();return v(t.isDropdownOpened=!1)}),m()()(),d(7,"div",22),h(8,"translate"),b("click",function(){C(o);let t=u();return v(t.onPropagatePermissions.emit({user:t.user,publicItemsOnly:!1}))}),d(9,"span",23),y(10,"USER_PERMISSIONS.ALL_HAZU"),m()(),d(11,"div",22),h(12,"translate"),b("click",function(){C(o);let t=u();return v(t.onPropagatePermissions.emit({user:t.user,publicItemsOnly:!0}))}),d(13,"span",23),y(14,"USER_PERMISSIONS.ALL_BUT_PRIVATE_HAZU"),m()(),d(15,"div",22),h(16,"translate"),b("click",function(){C(o);let t=u();return v(t.onDeletePropagatedPermissions.emit({user:t.user,publicItemsOnly:!1}))}),d(17,"span",23),y(18,"USER_PERMISSIONS.DELETE_ALL_HAZU"),m()(),d(19,"div",22),h(20,"translate"),b("click",function(){C(o);let t=u();return v(t.onDeletePropagatedPermissions.emit({user:t.user,publicItemsOnly:!0}))}),d(21,"span",23),y(22,"USER_PERMISSIONS.DELETE_ALL_BUT_PRIVATE_HAZU"),m()()()}if(n&2){let o=u();Ve("isOpen",o.isDropdownOpened),l(),c("title",f(2,6,"ACTIONS.OPEN_SETTINGS")),l(6),c("title",f(8,8,"USER_PERMISSIONS.ALL_HAZU_DESC")),l(4),c("title",f(12,10,"USER_PERMISSIONS.ALL_BUT_PRIVATE_HAZU_DESC")),l(4),c("title",f(16,12,"USER_PERMISSIONS.DELETE_ALL_HAZU_DESC")),l(4),c("title",f(20,14,"USER_PERMISSIONS.DELETE_ALL_BUT_PRIVATE_HAZU_DESC"))}}function Pd(n,r){if(n&1&&(d(0,"hz-text"),h(1,"translate"),_(2,"i",24),m()),n&2){let o=u();ne("data-tooltip",f(1,1,o.sourceGroupTitle||"SHARING.PRIVATE"))}}function bd(n,r){if(n&1&&(d(0,"div",25),y(1),h(2,"translate"),m(),d(3,"span",26),y(4),h(5,"translate"),m()),n&2){let o=r.$implicit,e=u();c("ngClass",N(7,fd,!!e.user.isGroup)),l(),T(" ",f(2,3,o.name)," "),l(3),T(" ",f(5,5,o.description)," ")}}function wd(n,r){if(n&1){let o=S();d(0,"button",27),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.onRemoveUser.emit(t.user))}),_(2,"i",28),m()}n&2&&c("title",f(1,1,"COMMON.ACTION_DELETE"))}function Sd(n,r){if(n&1&&(d(0,"a",29),_(1,"i",30),m()),n&2){u();let o=le(22);c("popupTemplate",o)("popupTrigger","click")}}function Md(n,r){if(n&1&&(d(0,"a",29),_(1,"i",31),m()),n&2){u();let o=le(24);c("popupTemplate",o)("popupTrigger","click")}}function Od(n,r){if(n&1&&(d(0,"a",29),_(1,"i",30),m()),n&2){u();let o=le(26);c("popupTemplate",o)("popupTrigger","click")}}function xd(n,r){if(n&1&&(_(0,"span",32),h(1,"translate"),h(2,"translate")),n&2){let o=u();c("innerHTML",o.sourceGroupTitle?A(1,1,"USER_PERMISSIONS.WARNING_REMOVE_USER_IS_GROUP",X(7,_d,o.sourceGroupTitle,o.sourceGroupId)):A(2,4,"USER_PERMISSIONS.WARNING_REMOVE_USER_IS_GROUP_PRIVATE",N(10,Cd,o.sourceGroupId)),be)}}function Td(n,r){n&1&&(y(0),h(1,"translate")),n&2&&T(" ",f(1,1,"USER_PERMISSIONS.WARNING_REMOVE_USER_IS_OWNER"),"\n")}function zd(n,r){n&1&&(y(0),h(1,"translate")),n&2&&T(" ",f(1,1,"USER_PERMISSIONS.WARNING_REMOVE_USER_NOT_ENOUGH_PERMISSIONS"),"\n")}var so=(()=>{let r=class r{constructor(e,t,i,a){s(this,"aclService");s(this,"store");s(this,"rngService");s(this,"translate");s(this,"user");s(this,"currentUser");s(this,"currentUserRole");s(this,"isUserRoot",!1);s(this,"sourceGroupTitle");s(this,"sourceGroupId");s(this,"onUpdateRole",new E);s(this,"onRemoveUser",new E);s(this,"onPropagatePermissions",new E);s(this,"onDeletePropagatedPermissions",new E);s(this,"errorMessage$",new Te);s(this,"isDropdownOpened",!1);s(this,"hasPermissionToChange",!1);s(this,"roleIcon",{});s(this,"roleName","");s(this,"possibleRoleOptions",ce);s(this,"roleOptions",ce);s(this,"sort",{column:"",order:!0});s(this,"baseItem$");s(this,"roleList$");s(this,"getIcon",e=>({fas:!0,"fa-user-tie":e===K.Owner,"fa-user-cog":e===K.Admin,"fa-user-edit":e===K.Editor,"fa-user":e===K.Reader}));this.aclService=e,this.store=t,this.rngService=i,this.translate=a,this.baseItem$=t.select(zt);let p=["owner","admin","reader","editor"],g=["USER_PERMISSIONS.ROLE_OWNER","USER_PERMISSIONS.ROLE_ADMIN","USER_PERMISSIONS.ROLE_READER","USER_PERMISSIONS.ROLE_EDITOR"];this.roleList$=vi(...g.map(I=>this.translate.get(I))).pipe(te(I=>I.map((w,z)=>({value:w,key:p[z]}))))}ngOnChanges(e){var t;(e.isUserRoot||e.currentUserRole)&&(this.possibleRoleOptions=this.roleOptions.filter(i=>this.checkPermissionToChange(i.key)),this.hasPermissionToChange=this.checkPermissionToChange(this.user.role)),e.user&&(this.roleIcon=this.getIcon(this.user.role),this.roleName=(t=this.roleOptions.find(i=>i.key===this.user.role))==null?void 0:t.name)}checkPermissionToChange(e){return this.isUserRoot||this.currentUserRole===K.O
1wner||Q[this.currentUserRole]>Q[e]}changeRole(e){var i;let t=(i=this.roleOptions.find(a=>a.name===e))==null?void 0:i.key;this.user.role!==t&&this.onUpdateRole.emit({user:this.user,role:t,requestId:this.user.isGroup?this.rngService.guid():void 0})}getEmail(e){var a,p,g,I;let t=this.user.description||this.user.recipientEmail,i=(I=(g=(a=e==null?void 0:e.item)==null?void 0:a.gmail)!=null?g:(p=e==null?void 0:e.rootItem)==null?void 0:p.gmail)!=null?I:null;if(i){let w=i.split("@")[0];if(new RegExp("".concat(w,"+.+")).test(t)){let z=Qs(t);t=z!=null?z:t}}return t}get isCurrentUser(){return this.user.key===this.currentUser.key}get isCurrentUserOwner(){return this.isCurrentUser&&this.currentUserRole===K.Owner}};s(r,"\u0275fac",function(t){return new(t||r)(x(he),x(D),x(Ee),x(Zi))}),s(r,"\u0275cmp",k({type:r,selectors:[["","hz-user-permissions-row",""]],inputs:{user:"user",currentUser:"currentUser",currentUserRole:"currentUserRole",isUserRoot:"isUserRoot",sourceGroupTitle:"sourceGroupTitle",sourceGroupId:"sourceGroupId"},outputs:{onUpdateRole:"onUpdateRole",onRemoveUser:"onRemoveUser",onPropagatePermissions:"onPropagatePermissions",onDeletePropagatedPermissions:"onDeletePropagatedPermissions"},standalone:!1,features:[F],attrs:hd,decls:27,vars:19,consts:[["optionTemplate",""],["popupWarningIsGroupTemplate",""],["popupWarningIsOwnerTemplate",""],["popupWarningNotEnoughPermissionsTemplate",""],[1,"role-icon"],[1,"circle"],[3,"ngClass"],["hzTab",""],[4,"ngIf"],["hzTab","",1,"user-email",3,"ngClass"],[1,"center","propagate-dropdown"],["position","right top","autoClose","outsideClick",3,"isOpen","isOpenChange",4,"ngIf"],["labelField","name","valueField","name",3,"valueChange","value","options","isDisabled","template"],["type","button","class","ui fluid red icon button",3,"title","click",4,"ngIf"],["class","circle icon","fuiPopup","","popupPlacement","top right",3,"popupTemplate","popupTrigger",4,"ngIf"],[1,"mail","icon"],["position","right top","autoClose","outsideClick",3,"isOpenChange","isOpen"],["hzTab","",3,"title"],[1,"ui","large","grey","setting","icon"],["hz-item","",1,"ui","header"],["href","javascript:;",1,"closeBtn"],[1,"remove","icon","grey",3,"click"],["hz-item","","hzTab","",3,"click","title"],["translate",""],[1,"ui","large","grey","users","icon"],[1,"header",3,"ngClass"],[1,"role-description"],["type","button",1,"ui","fluid","red","icon","button",3,"click","title"],[1,"ui","remove","user","icon"],["fuiPopup","","popupPlacement","top right",1,"circle","icon",3,"popupTemplate","popupTrigger"],[1,"ui","link","icon","question","outline","circle","large"],[1,"ui","link","icon","question","outline","circle","large","isOwner"],[3,"innerHTML"]],template:function(t,i){if(t&1){let a=S();d(0,"td",4)(1,"span",5),_(2,"i",6),m()(),d(3,"td",7),P(4,vd,2,1,"span",8)(5,yd,5,9,"span",8),m(),d(6,"td",9),y(7),h(8,"async"),m(),d(9,"td",10),P(10,Id,23,16,"hz-dropdown",11)(11,Pd,3,3,"hz-text",8),m(),d(12,"td")(13,"hz-select",12),b("valueChange",function(g){return C(a),v(i.changeRole(g))}),m(),P(14,bd,6,9,"ng-template",null,0,re),m(),d(16,"td"),P(17,wd,3,3,"button",13)(18,Sd,2,2,"a",14)(19,Md,2,2,"a",14)(20,Od,2,2,"a",14),m(),P(21,xd,3,12,"ng-template",null,1,re)(23,Td,2,3,"ng-template",null,2,re)(25,zd,2,3,"ng-template",null,3,re)}if(t&2){let a=le(15);l(2),c("ngClass",i.roleIcon),l(2),c("ngIf",i.user.displayName),l(),c("ngIf",!i.user.displayName),l(),c("ngClass",N(17,ud,!i.user.description)),l(),T(" ",i.getEmail(f(8,15,i.baseItem$)),"\n"),l(3),c("ngIf",!i.isCurrentUser&&i.hasPermissionToChange&&!i.user.isGroup),l(),c("ngIf",!!i.user.isGroup),l(2),c("value",i.roleName)("options",i.hasPermissionToChange?i.possibleRoleOptions:i.roleOptions)("isDisabled",!i.hasPermissionToChange||i.isCurrentUserOwner)("template",a),l(4),c("ngIf",i.hasPermissionToChange&&!i.user.isGroup&&!i.isCurrentUserOwner),l(),c("ngIf",i.user.isGroup),l(),c("ngIf",i.isCurrentUserOwner),l(),c("ngIf",!i.user.isGroup&&!i.hasPermissionToChange)}},dependencies:[H,R,_e,Ce,Nt,De,Se,W,V],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}
1[_nghost-%COMP%]   .circle[_ngcontent-%COMP%]{background-color:#7f7f7f;border-radius:3rem;color:#fff;display:block;font-size:1.5rem;height:3rem;line-height:3rem;margin:0 auto;text-align:center;width:3rem}.circle.icon[_ngcontent-%COMP%]{cursor:pointer;background-color:inherit;color:#4183c4}td.center.propagate-dropdown[_ngcontent-%COMP%]{text-align:center}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]{height:5px;text-align:right}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]{height:5px;text-align:right}}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{display:block;float:right;margin-top:-50px}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{display:block;float:right;margin-top:-50px}}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:none}@container sidebar (max-width: 767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:block}}@media only screen and (max-width:767px){td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header{display:block}}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header .closeBtn{cursor:pointer;float:right;font-size:1rem;margin-right:.5rem;position:absolute;right:0}td.propagate-dropdown[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]     .ui.header .closeBtn .icon{margin-left:.25rem;margin-right:.25rem}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%;font-size:1em!important}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option.active{background:#00000026!important}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .header{font-size:1.1rem;font-weight:700;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none;line-height:1.5em}.font-style-italic[_ngcontent-%COMP%]{font-style:italic}"],changeDetection:0}));let n=r;return n})();var Pn=(n,r)=>({"fa-sort-alpha-asc":n,"fa-sort-alpha-desc":r});function kd(n,r){if(n&1&&(d(0,"div",2),y(1),m(),d(2,"span",3),y(3),m()),n&2){let o=r.$implicit;l(),U(o.name),l(2),T(" ",o.description," ")}}function Dd(n,r){if(n&1&&_(0,"i",13),n&2){let o=u(2);c("ngClass",X(1,Pn,!o.sort.order,o.sort.order))}}function Rd(n,r){if(n&1&&_(0,"i",13),n&2){let o=u(2);c("ngClass",X(1,Pn,!o.sort.order,o.sort.order))}}function Bd(n,r){if(n&1&&_(0,"i",13),n&2){let o=u(2);c("ngClass",X(1,Pn,!o.sort.order,o.sort.order))}}function Nd(n,r){if(n&1&&_(0,"i",13),n&2){let o=u(2);c("ngClass",X(1,Pn,!o.sort.order,o.sort.order))}}function Ad(n,r){if(n&1){let o=S();d(0,"tr",14),h(1,"async"),h(2,"async"),h(3,"async"),b("onPropagatePermissions",function(t){C(o);let i=u(2);return v(i.propagatePermissions(t.user,t.publicItemsOnly))})("onDeletePropagatedPermissions",function(t){C(o);let i=u(2);return v(i.deletePropagatedPermissions(t.user,t.publicItemsOnly))})("onUpdateRole",function(t){C(o);let i=u(2);return v(i.updateRole(t.user.key,t.role,t.user.authorId,t.requestId,t.user.description))})("onRemoveUser",function(t){C(o);let i=u(2);return v(i.remove(t.key,t.authorId))}),m()}if(n&2){let o=r.$implicit,e=u(2);c("user",o)("sourceGroupTitle",e.getSourceGroupTitle(o==null?null:o.groupId))("sourceGroupId",(o==null?null:o.groupId)||"")("currentUser",f(1,6,e.authentication$))("isUserRoot",f(2,8,e.isUserRoot$))("currentUserRole",f(3,10,e.currentUserRole$))}}function Ld(n,r){if(n&1){let o=S();d(0,"table",4)(1,"thead")(2,"tr")(3,"th",5),b("click",function(){C(o);let t=u();return v(t.changeSorting("roleIndex"))}),P(4,Dd,1,4,"i",6),m(),d(5,"th",7),b("click",function(){C(o);let t=u();return v(t.changeSorting("displayName"))}),y(6),h(7,"translate"),P(8,Rd,1,4,"i",6),m(),d(9,"th",8),b("click",function(){C(o);let t=u();return v(t.changeSorting("description"))}),y(10),h(11,"async"),h(12,"translate"),d(13,"div",9),h(14,"translate"),d(15,"i",10),b("click",function(t){return C(o),v(t.stopPropagation())}),m()(),P(16,Bd,1,4,"i",6),m(),_(17,"th"),d(18,"th",7),b("click",function(){C(o);let t=u();return v(t.changeSorting("roleIndex"))}),y(19),h(20,"translate"),P(21,Nd,1,4,"i",6),m(),_(22,"th"),m()(),d(23,"tbody"),P(24,Ad,4,12,"tr",11),h(25,"orderBy"),d(26,"tr",12),h(27,"async"),h(28,"async"),h(29,"async"),h(30,"async"),b("onAddUser",function(t){C(o);let i=u();return v(i.addUser(t.email,t.role,t.requestId,t.sendInvitation))}),m()()()}if(n&2){let o=u();l(4),c("ngIf",o.sort.column==="roleIndex"),l(2),T(" ",f(7,17,"USER_PERMISSIONS.NAME")," "),l(2),c("ngIf",o.sort.column==="displayName"),l(2),T(" ",f(12,21,f(11,19,o.isSupportUsername$)?"USER_PERMISSIONS.EMAIL_OR_USERNAME":"USER_PERMISSIONS.EMAIL_ADDRESS")," "),l(3),c("popupText",f(14,23,"SHARING.COPY_EMAILS_TOOLTIP"))("popupDelay",300),l(2),c("cbContent",o.buildEmailsToShare()),l(),c("ngIf",o.sort.column==="description"),l(3),T(" ",f(20,25,"USER_PERMISSIONS.ROLE")," "),l(2),c("ngIf",o.sort.column==="roleIndex"),l(3),c("ngForOf",A(25,27,o.aclCollaborators,o.convertSorting()))("ngForTrackBy",o.trackUser),l(2),c("currentUserRole",f(27,30,o.currentUserRole$))("gmail",f(28,32,o.gmail$))("isUserRoot",f(29,34,o.isUserRoot$))("errorMessage$",o.errorMessage$)("isSupportUsername",f(30,36,o.isSupportUsername$))}}var ao=(()=>
1{let r=class r{constructor(e,t){s(this,"aclService");s(this,"store");s(this,"item");s(this,"loadedAcls");s(this,"loadedInvites");s(this,"usersFromGroups");s(this,"loadedGroups");s(this,"privateInvites",[]);s(this,"aclCollaborators",[]);s(this,"errorMessage$",new Te);s(this,"authentication$");s(this,"currentUserRole$");s(this,"isUserRoot$");s(this,"isSupportUsername$");s(this,"gmail$");s(this,"roleOptions",ce);s(this,"sort",{column:"roleIndex",order:!0});s(this,"columns",[{variable:"icon",display:"",type:"string"},{variable:"title",display:"TABLE_VIEW.TITLE",type:"string"},{variable:"email",display:"Email",type:"string"},{variable:"role",display:"Role",type:"string"}]);s(this,"getCurrentRole",e=>(0,Je.find)(this.roleOptions,t=>t.key===e).name);this.aclService=e,this.store=t,this.authentication$=t.select(mt),this.currentUserRole$=t.select(Dt),this.isUserRoot$=t.select(dt),this.isSupportUsername$=t.select(Lr),this.gmail$=t.select(Ar)}ngOnChanges(e){(0,Je.get)(e,"loadedInvites")&&(this.privateInvites=this.loadedInvites.filter(t=>t.recipientEmail)),((0,Je.get)(e,"loadedInvites")||(0,Je.get)(e,"loadedAcls")||(0,Je.get)(e,"usersFromGroups"))&&(this.aclCollaborators=this.loadedAcls.map(t=>t).concat(this.privateInvites).map(t=>ft(me({},t),{roleIndex:Q[t.role]})))}changeRole(e,t){let i=(0,Je.find)(this.roleOptions,a=>a.name===t).key;this.updateRole(e.key,i,e.authorId)}get existingEmails(){return this.loadedAcls.filter(e=>!e.isGroup).map(e=>e.description).concat(this.privateInvites.map(e=>e.recipientEmail))}updateRole(e,t,i,a,p){a?this.addUser(p,t,a):i?this.store.dispatch(Ns(this.item,i,t,e)):this.store.dispatch(Ls(this.item,t,e))}addUser(e,t,i,a=!1){return $(this,null,function*(){let p=In(e),g=p.filter(I=>!si(I));if(p.length===null||g.length>0){this.errorMessage$.next("SHARING.INPUT_INVALID");return}if((0,Je.intersection)(p,this.existingEmails).length>0){this.errorMessage$.next("SHARING.EMAIL_ALREADY_EXISTS");return}this.store.dispatch(Es(i,p,t,!1,a))})}remove(e,t){t?this.store.dispatch(Ds({itemId:this.item.id,userLoginId:t,userKey:e})):this.store.dispatch(Bs(this.item.id,e))}propagatePermissions(e,t){this.store.dispatch(jt(Ke.SHOULD_PROPAGATE_PERMISSIONS,{users:[e],publicItemsOnly:t}))}deletePropagatedPermissions(e,t){this.store.dispatch(jt(Ke.SHOULD_DELETE_PROPAGATED_PERMISSIONS,{users:[e],publicItemsOnly:t}))}changeSorting(e){this.sort.column===e?this.sort.order=!this.sort.order:(this.sort.column=e,this.sort.order=!0)}buildEmailsToShare(){return this.aclCollaborators.sort((e,t)=>e.index-t.index).filter(e=>si(e.description)).map(e=>e.description).join(", ")}convertSorting(){return this.sort.order?"-"+this.sort.column:this.sort.column}trackUser(e,t){return t.index=e,t.description}getIcon(e){return{fas:!0,"fa-user-tie":e===K.Owner,"fa-user-cog":e===K.Admin,"fa-user-edit":e===K.Editor,"fa-user":e===K.Reader}}getSourceGroupTitle(e){let t=this.loadedGroups.find(i=>i.itemId===e);return t?t.itemTitle:null}};s(r,"\u0275fac",function(t){return new(t||r)(x(he),x(D))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-user-permissions"]],inputs:{item:"item",loadedAcls:"loadedAcls",loadedInvites:"loadedInvites",usersFromGroups:"usersFromGroups",loadedGroups:"loadedGroups"},standalone:!1,features:[F],decls:3,vars:1,consts:[["optionTemplate",""],["class","ui sortable celled striped table",4,"ngIf"],[1,"header"],[1,"role-description"],[1,"ui","sortable","celled","striped","table"],[1,"center",3,"click"],["class","fa",3,"ngClass",4,"ngIf"],[3,"click"],[1,"emails",3,"click"],["fuiPopup","",3,"popupText","popupDelay"],["ngxClipboard","",1,"ui","grey","copy","icon",3,"click","cbContent"],["class","row","hz-user-permissions-row","",3,"user","sourceGroupTitle","sourceGroupId","currentUser","isUserRoot","currentUserRole","onPropagatePermissions","onDeletePropagatedPermissions","onUpdateRole","onRemoveUser",4,"ngFor","ngForOf","ngForTrackBy"],["hz-user-permissions-new","",1,"row",3,"onAddUser","currentUserRole","gmail","isUserRoot","errorMessage$","isSupportUsername"],[1,"fa",3,"ngClass"],["hz-user-permissions-row","",1,"row",3,"onPropagatePermissions","onDeletePropagatedPermissions","onUpdateRole","onRemoveUser","user","sourceGroupTitle","sourceGroupId","currentUser","isUserRoot","currentUserRole"]],template:function(t,i){t&1&&P(0,kd,4,2,"ng-template",null,0,re)(2,Ld,31,38,"table",1),t&2&&(l(2),c("ngIf",i.aclCollaborators))},dependencies:[H,ze,R,Ce,Wt,ro,so,W,V,Ft],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]{display:block;width:100%}
1[_nghost-%COMP%]   .circle[_ngcontent-%COMP%]{background-color:#7f7f7f;border-radius:3rem;color:#fff;display:block;font-size:1.5rem;height:3rem;line-height:3rem;margin:0 auto;text-align:center;width:3rem}th.center[_ngcontent-%COMP%]{text-align:center!important}th.emails[_ngcontent-%COMP%]{display:flex}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]{cursor:pointer;max-width:25em;padding:1em}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]:hover{background:#0000000d}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]{border-bottom:1px solid rgba(34,36,38,.15);color:silver;cursor:default;font-weight:400}hz-dropdown[_ngcontent-%COMP%]   div[hz-item].title[_ngcontent-%COMP%]:hover{background:#fff}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-bottom:0}hz-dropdown[_ngcontent-%COMP%]   div[hz-item][_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{white-space:pre-wrap;word-wrap:break-word}hz-dropdown[_ngcontent-%COMP%]     .menu{margin-bottom:2em!important}hz-dropdown[_ngcontent-%COMP%]     .menu.transition.hiddenMenu{display:none!important}hz-select[_ngcontent-%COMP%]     fui-select{width:100%}hz-select[_ngcontent-%COMP%]     fui-select .text h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select .text .role-description{display:none}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option h3{font-size:1.1rem;margin:0}hz-select[_ngcontent-%COMP%]     fui-select fui-select-option .role-description{float:none}@container sidebar (max-width: 767px){[_nghost-%COMP%]{padding-bottom:140px!important}[_nghost-%COMP%]     div.role{margin:0!important}}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding-bottom:140px!important}[_nghost-%COMP%]     div.role{margin:0!important}}"],changeDetection:0}));let n=r;return n})();function Ud(n,r){if(n&1&&(_(0,"hz-user-permissions",19),h(1,"async"),h(2,"async"),h(3,"async"),h(4,"async"),h(5,"async")),n&2){let o=u();c("loadedAcls",f(1,5,o.loadedAcls$))("loadedInvites",f(2,7,o.loadedInvites$))("usersFromGroups",f(3,9,o.usersFromGroups$))("loadedGroups",f(4,11,o.loadedGroups$))("item",f(5,13,o.currentAclItem$))}}function Fd(n,r){n&1&&(d(0,"div",20),_(1,"div",21),m())}function Hd(n,r){if(n&1&&(_(0,"hz-group-permissions",22),h(1,"async"),h(2,"async"),h(3,"async")),n&2){let o=u();c("loadedGroups",f(1,3,o.loadedGroups$))("usersFromGroups",f(2,5,o.usersFromGroups$))("item",f(3,7,o.currentAclItem$))}}function Gd(n,r){n&1&&(d(0,"div",20),_(1,"div",21),m())}function $d(n,r){if(n&1&&(_(0,"hz-invite-permissions",23),h(1,"async"),h(2,"async")),n&2){let o=u();c("loadedInvites",f(1,2,o.loadedInvites$))("item",f(2,4,o.currentAclItem$))}}function Wd(n,r){n&1&&(d(0,"div",20),_(1,"div",24),m())}var jd=(()=>{let r=class r{constructor(e,t){s(this,"store");s(this,"layoutService");s(this,"currentAclItem$");s(this,"loadedAcls$");s(this,"loadedInvites$");s(this,"loadedGroups$");s(this,"usersFromGroups$");s(this,"isLoading$");s(this,"currentActive","1");s(this,"toggleSharing",()=>{this.store.dispatch(ra())});this.store=e,this.layoutService=t,this.currentAclItem$=this.store.select($s),this.loadedAcls$=this.store.select(Us),this.loadedInvites$=this.store.select(Hs),this.loadedGroups$=this.store.select(Fs),this.isLoading$=this.store.select(Ws),this.usersFromGroups$=this.store.select(Gs)}setCurrentActive(e){this.currentActive=e}ngOnInit(){this.store.dispatch(Wn(!0))}ngOnDestroy(){this.store.dispatch(Wn(!1))}};s(r,"\u0275fac",function(t){return new(t||r)(x(D),x(Ne))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-sharing"]],standalone:!1,decls:35,vars:25,consts:[[1,"ui","header"],[1,"icon","users"],["translate","",1,"content"],["hzTab","",1,"close-btn",3,"click"],[1,"large","grey","close","icon","link"],[1,"ui","pointing","secondary","menu"],["id","collaboratorsTabHeader","fuiTabHeader","1","translate","","hzTab","",1,"item",3,"isActiveChange","isActive"],["id","groupsTabHeader","fuiTabHeader","2","translate","","hzTab","",1,"item",3,"isActiveChange","isActive"],["id","invitesTabHeader","fuiTabHeader","3","translate","","hzTab","",1,"item",3,"isActiveChange","isActive"],["fuiPopup","",3,"popupText","popupDelay"],[1,"ui","icon","question","outline","circle"],["fuiTabContent","1",1,"ui"],[3,"loadedAcls","loadedInvites","usersFromGroups","loadedGroups","item",4,"ngIf"],[1,"loader-wrapper"],["class","ui inverted active dimmer",4,"ngIf"],["fuiTabContent","2",1,"ui"],[3,"loadedGroups","usersFromGroups","item",4,"ngIf"],["fuiTabContent","3",1,"ui"],[3,"loadedInvites","item",4,"ngIf"],[3,"loadedAcls","loadedInvites","usersFromGroups","loadedGroups","item"],[1,"ui","inverted","active","dimmer"],[1,"ui","loader"],[3,"loadedGroups","usersFromGroups","item"],[3,"loadedInvites","item"],[1,"ui","loader","active","visible"]],template:function(t,i){t&1&&(d(0,"div",0),_(1,"i",1),d(2,"div",2),y(3,"TOOLBAR.SHARE"),m(),d(4,"div",3),b("click",function(){return i.toggleSharing()}),_(5,"i",4),m()(),d(6,"fui-tabset")(7,"div",5)(8,"a",6),b("isActiveChange",function(){return i.setCurrentActive("1")}),y(9," TOOLBAR.COLLABORATORS "),m(),d(10,"a",7),b("isActiveChange",function(){return i.setCurrentActive("2")}),y(11," TOOLBAR.GROUPS "),m(),d(12,"a",8),b("isActiveChange",function(){return i.setCurrentActive("3")}),y(13," TOOLBAR.INVITES\xA0 "),d(14,"div",9),h(15,"translate"),_(16,"i",10),m()()(),d(17,"div",11),P(18,Ud,6,15,"hz-user-permissions",12),h(19,"async"),d(20,"div",13),P(21,Fd,2,0,"div",14),h(22,"async"),m()(),d(23,"div",15),P(24,Hd,4,9,"hz-group-permissions",16),h(25,"async"),d(26,"div",13),P(27,Gd,2,0,"div",14),h(28,"async"),m()(),d(29,"div",17),P(30,$d,3,6,"hz-invite-permissions",18),h(31,"async"),d(32,"div",13),P(33,Wd,2,0,"div",14),h(34,"async"),m()()()),t&2&&(l(8),c("isActive",!0),l(2),c("isActive",!1),l(2),c("isActive",!1),l(2),c("popupText",f(15,11,"TOOLBAR.INVITES_TOOLTIP"))("popupDelay",300),l(4),c("ngIf",!f(19,13,i.isLoading$)),l(3),c("ngIf",f(22,15,i.isLoading$)),l(3),c("ngIf",!f(25,17,i.isLoading$)),l(3),c("ngIf",f(28,19,i.isLoading$)),l(3),c("ngIf",!f(31,21,i.isLoading$)),l(3),c("ngIf",f(34,23,
1i.isLoading$)))},dependencies:[R,_e,qe,Ce,Ss,bs,ws,Se,to,no,ao,W,V],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]   .ui.header[_ngcontent-%COMP%]{display:flex;margin-top:1rem}[_nghost-%COMP%]   .ui.header[_ngcontent-%COMP%]   .close-btn[_ngcontent-%COMP%]{cursor:pointer;font-size:initial;margin-left:auto}[_nghost-%COMP%]   hz-user-permissions[_ngcontent-%COMP%], [_nghost-%COMP%]   hz-invite-permissions[_ngcontent-%COMP%], [_nghost-%COMP%]   hz-group-permissions[_ngcontent-%COMP%], [_nghost-%COMP%]   .ui.menu[_ngcontent-%COMP%], [_nghost-%COMP%]   .ui.header[_ngcontent-%COMP%]{padding:0 1rem}@container sidebar (max-width: 1024px){[_nghost-%COMP%]   hz-user-permissions[_ngcontent-%COMP%]{padding-bottom:3rem}}@media only screen and (max-width:1024px){[_nghost-%COMP%]   hz-user-permissions[_ngcontent-%COMP%]{padding-bottom:3rem}}@container sidebar (max-width: 767px){[_nghost-%COMP%]{padding-bottom:100px}}@media only screen and (max-width:767px){[_nghost-%COMP%]{padding-bottom:100px}}[_nghost-%COMP%]   .loader-wrapper[_ngcontent-%COMP%]{position:relative}@container sidebar (max-width: 767px){.ui.header[_ngcontent-%COMP%]{display:flex;justify-content:center}}@media only screen and (max-width:767px){.ui.header[_ngcontent-%COMP%]{display:flex;justify-content:center}}@container sidebar (max-width: 767px){hz-user-permissions[_ngcontent-%COMP%]     table.ui.table thead{display:none!important}}@media only screen and (max-width:767px){hz-user-permissions[_ngcontent-%COMP%]     table.ui.table thead{display:none!important}}@container sidebar (max-width: 767px){hz-user-permissions[_ngcontent-%COMP%]     table.ui.table tbody tr td.role-icon{display:none!important}}@media only screen and (max-width:767px){hz-user-permissions[_ngcontent-%COMP%]     table.ui.table tbody tr td.role-icon{display:none!important}}  fui-select-option .disabled{opacity:.45;pointer-events:none}"],changeDetection:0}));let n=r;return n})();var Qf=(()=>{let r=class r{static forRoot(){return{ngModule:r,providers:bl}}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275mod",Si({type:r})),s(r,"\u0275inj",Pi({imports:[ht,Os]}));let n=r;return n})();var co=Pe(we());var Yd="items",Xd=Zo(Yd),lo=ri(Xd,n=>n.itemsComments),Tl=ri(lo,n=>n.itemComments),i_=ri(lo,n=>n.lastNewComment),zl=ri(lo,n=>n.newComment);var Qd=n=>({"sm-list-loading":n}),Jd=(n,r)=>({active:n,"comment-loading":r}),em=()=>[],tm=n=>({small:n}),im=(n,r)=>({"non-first-comment":n,"last-comment":r}),nm=()=>["delete"];function om(n,r){if(n&1){let o=S();d(0,"hz-play-and-progress-icon",12),h(1,"iconRadius"),b("click",function(){C(o);let t=u(2);return v(t.doPlayItem())}),m()}if(n&2){let o,e,t=u(2);c("item",(o=t.state())==null?null:o.parentItem)("radius",A(1,2,(e=t.state())==null?null:e.parentItem,1.25))}}function rm(n,r){if(n&1&&(_(0,"span",13),h(1,"emptyTitle")),n&2){let o,e,t=u(2);c("ngClass",N(4,tm,((o=t.state())==null?null:o.parentItem.title.length)>50))("innerHTML",f(1,2,(e=t.state())==null?null:e.parentItem.title),be)}}function sm(n,r){if(n&1){let o=S();d(0,"div",7),b("click",function(){C(o);let t=u();return v(t.doFocusItem())}),P(1,om,2,5,"hz-play-and-progress-icon",8)(2,rm,2,6,"span",9),_(3,"div",10),d(4,"i",11),b("click",function(){C(o);let t=u();return v(t.commentParentItem.set(null))}),m()()}if(n&2){let o,e,t,i=u();l(),c("ngIf",(o=i.state())==null?null:o.parentItem),l(),c("ngIf",(e=i.state())==null?null:e.parentItem),l(),c("ngClass",X(5,Jd,!((t=i.state())!=null&&t.parentItem),!((t=i.state())!=null&&t.parentItem))),l(),c("routerLink",vt(8,em))("queryParams",i.removeCommentParam)}}function am(n,r){if(n&1&&_(0,"hz-item-info",14),n&2){let o,e=u();c("item",(o=e.state())==null?null:o.parentItem)("itemOptionsState",e.itemOptions)("baseItem",e.baseItem)("canEdit",e.permission==null?null:e.permission.edit)}}function lm(n,r){if(n&1&&(d(0,"div",15),y(1),m()),n&2){let o=u();l(),T(" ",o.noItemsLabel,"\n")}}function cm(n,r){if(n&1&&_(0,"hz-item-options",22),n&2){let o=u().$implicit,e=u();c("baseItem",e.baseItem)("item",o)("itemOptionsState",e.itemOptionsFromStore())("options",vt(4,nm))}}function dm(n,r){if(n&1&&(d(0,"div",16)(1,"div",17)(2,"span",18),y(3),h(4,"translate"),m(),d(5,"span",19),h(6,"localizedDate"),y(7),h(8,"amTimeAgo"),m(),P(9,cm,1,5,"hz-item-options",20),h(10,"async"),_(11,"div",21),h(12,"htmlToPlaintext"),h(13,"urlToLink"),h(14,"nl2br"),m()()),n&2){let o=r.$implicit,e=r.first,t=r.last,i=u();c("ngClass",X(21,im,!e,t)),l(3),U(f(4,6,o.displayName||"COMMON.ANONYMOUS_USER")),l(2),c("title",A(6,8,o.dateCreated,"medium")),l(2),U(f(8,11,o.dateCreated)),l(2),c("ngIf",f(10,13,i.getPermission(o)).edit),l(2),c("innerHTML",f(14,19,f(13,17,f(12,15,o.title))),be)}}var k_=(()=>
1{let r=class r{constructor(){s(this,"baseItem");s(this,"chatMode",!1);s(this,"commentParentItemId","");s(this,"itemOptions");s(this,"permission");s(this,"onCloseButtonClick",new E);s(this,"itemActivated",new E);s(this,"logService",M(ve));s(this,"store",M(D));s(this,"cdr",M(Ri));s(this,"itemsService",M(ye));s(this,"commentsService",M(gs));s(this,"interactionService",M(Ba));s(this,"actions$",M(vs));s(this,"auth",M(Ki));s(this,"routerService",M(At));s(this,"route",M(Bi));s(this,"element",M(ge));s(this,"itemOptionsFromStore",O(this.store.select(Kt)));s(this,"inputLabel","TABS.COMMENT_PLACEHOLDER");s(this,"noItemsLabel","TABS.NO_COMMENTS");s(this,"enableDebug",!1);s(this,"commentParentItem",Y(null));s(this,"isPlayOverlay",!1);s(this,"allCommentsState",O(this.store.select(Tl),{initialValue:{}}));s(this,"state",je(()=>{let e=this.allCommentsState();return e==null?void 0:e[this.commentParentItemId]}));s(this,"newComment",O(this.store.select(zl),{initialValue:""}));s(this,"getPermission",e=>this.store.select(Re(e)));s(this,"commentPermission",O(this.store.select(It(se.comment)),{initialValue:{}}));this.actions$.pipe(ys(Ln),Ko()).subscribe(e=>{this.logService.printDebugInfo(this.enableDebug,this,"action$","x: ".concat(JSON.stringify(e))),e.type===Ln.type&&e.parentItem&&e.parentItem.type==="question"&&(this.logService.printDebugInfo(this.enableDebug,this,"action$","Re-load question list","important"),this.interactionService.refreshQuestions())}),ie(()=>{let e=this.state();this.commentParentItem.set(e?e.parentItem:null)})}ngOnInit(){this.chatMode&&(this.inputLabel="TABS.CHAT_PLACEHOLDER",this.noItemsLabel="TABS.NO_MESSAGES")}ngOnChanges(e){(0,co.get)(e,"commentParentItemId")&&this.baseItem&&(this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","commentParentItemId changed: ".concat(this.commentParentItemId)),this.getComments())}getComments(){this.commentParentItemId&&(this.logService.printDebugInfo(this.enableDebug,this,"getComments","this.commentParentItemId: ".concat(this.commentParentItemId)),this.commentsService.loadComments(this.commentParentItemId,this.baseItem),this.commentsService.checkUserStatus())}doFocusItem(){let e=this.commentParentItem();e&&(this.store.dispatch(Gn(ot,e.id)),this.store.dispatch(Gn(an,e.id)),this.logService.printDebugInfo(this.enableDebug,this,"doFocusItem","item: ".concat(e.title)))}doPlayItem(){let e=this.commentParentItem();if(!e){this.logService.printDebugInfo(this.enableDebug,this,"doPlayItem","item: ".concat(e));return}this.itemActivated.emit(e)}get icon(){let e=this.commentParentItem();return this.isPlayOverlay?"play":(0,co.get)(e,"icon","")}ngAfterViewInit(){this.setupIconMouseHandler(),setTimeout(()=>{jQuery("hz-comment-list textarea").focus()},1e3)}setupIconMouseHandler(){setTimeout(()=>{let e=jQuery(this.element.nativeElement).find(".item-icon");e?(e.on("mouseenter",()=>{this.isPlayOverlay=!0,this.cdr.markForCheck(),this.logService.printDebugInfo(this.enableDebug,this,"mouseenter","isPlayOverlay: ".concat(this.isPlayOverlay))}),e.on("mouseleave",()=>{this.isPlayOverlay=!1,this.cdr.markForCheck(),this.logService.printDebugInfo(this.enableDebug,this,"mouseleave","isPlayOverlay: ".concat(this.isPlayOverlay))})):this.logService.printDebugInfo(this.enableDebug,this,"setupIconMouseHandler","cannot get the iconDom>>>>>>>>>","error"),this.logService.printDebugInfo(this.enableDebug,this,"setupIconMouseHandler",">>>>>>>>>")},1e3)}onUnplaceItem(e){this.onCloseButtonClick.emit()}onInputConentChanged(e){this.logService.printDebugInfo(this.enableDebug,this,"onInputConentChanged","content: ".concat(e)),this.commentsService.updateNewComment(e)}submitComment(){this.commentsService.createComment(this.commentParentItemId)}trackByItemKey(e,t){return t.key}get removeCommentParam(){let e=me({},this.route.snapshot.queryParams);return delete e.showComment,e}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-comment-list"]],inputs:{baseItem:"baseItem",chatMode:"chatMode",commentParentItemId:"commentParentItemId",itemOptions:"itemOptions",permission:"permission"},outputs:{onCloseButtonClick:"onCloseButtonClick",itemActivated:"itemActivated"},standalone:!1,features:[F],decls:9,vars:19,consts:[["class","toolbar selection",3,"click",4,"ngIf"],[3,"item","itemOptionsState","baseItem","canEdit",4,"ngIf"],["class","no-comments","translate","",4,"ngIf"],["data-hz-test","comment-list",1,"ui","list","middle","aligned","relaxed","divided","list",3,"ngClass","hzAutoScroll"],["class","item","data-hz-test","comment-item",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[3,"permission","action"],["data-hz-test","comment-input",3,"onInputConentChanged","onSubmit","maxRows","placeholder","autoDisableWhenEmitOnSubmitEvent","inputContent"],[1,"toolbar","selection",3,"click"],[3,"item","radius","click",4,"ngIf"],["class","item-title",3,"ngClass","innerHTML",4,"ngIf"],[1,"ui","centered","inline","medium","loader",3,"ngClass"],[1,"close-button","large","grey","close","icon","link",3,"click","routerLink","queryParams"],[3,"click","item","radius"],[1,"item-title",3,"ngClass","innerHTML"],[3,"item","itemOptionsState","baseItem","canEdit"],["translate","",1,"no-comments"],["data-hz-test","comment-item",1,"item",3,"ngClass"],["hzTab","",1,"content"],[1,"author"],[1,"time-ago",3,"title"],["class","comment-menu","iconClass","ui small grey down chevron icon","direction","right",3,"baseItem","item","itemOptionsState","options",4,"ngIf"],["data-hz-test","comment-text",1,"comment-text",3,"innerHTML"],["
1iconClass","ui small grey down chevron icon","direction","right",1,"comment-menu",3,"baseItem","item","itemOptionsState","options"]],template:function(t,i){if(t&1&&(P(0,sm,5,9,"div",0)(1,am,1,4,"hz-item-info",1)(2,lm,2,1,"div",2),d(3,"div",3),P(4,dm,15,24,"div",4),m(),d(5,"hz-action-permitted",5),h(6,"translate"),d(7,"hz-autosize-editor",6),h(8,"translate"),b("onInputConentChanged",function(p){return i.onInputConentChanged(p)})("onSubmit",function(){return i.submitComment()}),m()()),t&2){let a,p,g,I,w;c("ngIf",!i.chatMode),l(),c("ngIf",!i.chatMode),l(),c("ngIf",!((a=i.state())!=null&&a.comments)||((a=i.state())==null?null:a.comments.length)===0),l(),c("ngClass",N(17,Qd,!((p=i.state())!=null&&p.parentItem)))("hzAutoScroll",(g=i.state())==null?null:g.comments),l(),c("ngForOf",(I=i.state())==null?null:I.comments)("ngForTrackBy",i.trackByItemKey),l(),c("permission",(w=i.commentPermission())==null?null:w.create)("action",f(6,13,"TABS.ADD_MESSAGE")),l(2),c("maxRows",2)("placeholder",f(8,15,i.inputLabel))("autoDisableWhenEmitOnSubmitEvent",!0)("inputContent",i.newComment())}},dependencies:[H,ze,R,Ni,_e,qe,Ms,ya,Se,hn,Xn,Wa,Ya,W,V,Vt,Ut,Js,na,Ht,ia,cn],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]     .comment-loading{left:45%!important;position:absolute!important;top:50%!important;transform:translate(-50%) translateY(-50%)!important}[_nghost-%COMP%]   .comment-menu[_ngcontent-%COMP%]     .menu{left:0!important;right:auto!important}[_nghost-%COMP%]     .toolbar{flex:0 0 auto;align-items:center;background:transparent;border-radius:.35em;cursor:pointer;display:flex;flex-flow:row nowrap;justify-content:space-between;padding:.5rem 0;position:relative;text-align:center}[_nghost-%COMP%]     .toolbar:hover{background-color:#00000008!important}[_nghost-%COMP%]     .toolbar .item{align-items:center;display:flex}[_nghost-%COMP%]     .toolbar .item .item-icon{padding:.8rem}[_nghost-%COMP%]     .toolbar .item .item-title{margin:0 2rem 0 .5rem}[_nghost-%COMP%]     .toolbar .item-options{display:flex}[_nghost-%COMP%]     .item-icon{flex:0 0 auto;border-radius:1.5rem;color:#fff;display:block;font-size:1.25em;height:2.6rem;line-height:2.6rem;margin-left:.5rem;width:2.6rem}[_nghost-%COMP%]     .item-title.small{font-size:1.1rem}[_nghost-%COMP%]     .item-title{flex:1 1 auto;display:block;font-size:1.5rem;margin:0 2rem 0 .5rem;padding:0;text-align:left}[_nghost-%COMP%]     .close-button{flex:0 0 auto;display:block;height:2rem;line-height:2rem!important;width:2rem}[_nghost-%COMP%]     .ui.list{flex:1 1 auto;background-color:#fff;height:100%;min-height:0;overflow-y:auto;padding:.5rem;width:100%}[_nghost-%COMP%]     .sm-list-loading{display:none}[_nghost-%COMP%]     .ui.list>div{padding:.5rem .2rem!important}[_nghost-%COMP%]     .no-comments{background-color:#fff;color:#9e9e9e;font-style:italic;height:4rem;line-height:4rem;text-align:left;vertical-align:middle;width:100%}[_nghost-%COMP%]     .author{color:#000000de;font-size:1em;font-weight:700}[_nghost-%COMP%]     .time-ago{color:#0006;display:inline-block;font-size:.875em;margin-left:.5em}[_nghost-%COMP%]     .comment-text{color:#000000de;font-size:1em;line-height:1.3;margin:.25em 0 .5em;word-wrap:break-word}[_nghost-%COMP%]     .ui.form textarea{font-size:1.1rem!important}[_nghost-%COMP%]     .non-first-comment{border-top:1px solid rgba(34,36,38,.15)!important;padding-bottom:.2em!important;padding-top:.8em!important}[_nghost-%COMP%]     .last-comment{margin-bottom:1em!important}[_nghost-%COMP%] > .ui.list[_ngcontent-%COMP%]   hz-item-options[_ngcontent-%COMP%]     .hz-icon-edit>.ui.menu.list{min-width:150px}[_nghost-%COMP%]   hz-item-options[_ngcontent-%COMP%]     .ui.floating.labeled{display:inline-flex}[_nghost-%COMP%]   hz-play-and-progress-icon[_ngcontent-%COMP%]{padding:.8em}[_nghost-%COMP%]     .icon.priority-0{font-size:.5em}[_nghost-%COMP%]     .icon.priority-1{font-size:.6em}[_nghost-%COMP%]     .icon.priority-2{font-size:.7em}[_nghost-%COMP%]     .icon.priority-3{font-size:.8em}[_nghost-%COMP%]     .icon.priority-4{font-size:.9em}[_nghost-%COMP%]     .icon.priority-5{font-size:1em}[_nghost-%COMP%]     .icon.priority-6{font-size:1.1em}[_nghost-%COMP%]     .icon.priority-7{font-size:1.2em}[_nghost-%COMP%]     .icon.priority-8{font-size:1.3em}[_nghost-%COMP%]     .icon.priority-9{font-size:1.4em}[_nghost-%COMP%]     .icon.priority-10{font-size:1.5em}
1hz-autosize-editor[_ngcontent-%COMP%]{flex:0 0 auto;margin-top:.5rem}"],changeDetection:0}));let n=r;return n})();var Rl=Pe(we());var bn=n=>({active:n});function mm(n,r){if(n&1&&(d(0,"div",3),y(1),m()),n&2){let o=u();l(),U(o.noItemsLabel)}}function pm(n,r){if(n&1){let o=S();d(0,"div",11),b("click",function(){C(o);let t=u(2);return v(t.checkVotes(t.voteTabs.Likes))}),d(1,"div",12),_(2,"i",13),m(),d(3,"span"),y(4),m()()}if(n&2){let o=u(2);c("ngClass",N(2,bn,o.shownTab===o.voteTabs.Likes)),l(4),U(o.vote.likes)}}function hm(n,r){if(n&1){let o=S();d(0,"div",11),b("click",function(){C(o);let t=u(2);return v(t.checkVotes(t.voteTabs.Dislikes))}),d(1,"div",14),_(2,"i",15),m(),d(3,"span"),y(4),m()()}if(n&2){let o=u(2);c("ngClass",N(2,bn,o.shownTab===o.voteTabs.Dislikes)),l(4),U(o.vote.dislikes)}}function um(n,r){if(n&1){let o=S();d(0,"div",11),b("click",function(){C(o);let t=u(2);return v(t.checkVotes(t.voteTabs.Neutrals))}),d(1,"div",16),_(2,"i",17),m(),d(3,"span"),y(4),m()()}if(n&2){let o=u(2);c("ngClass",N(2,bn,o.shownTab===o.voteTabs.Neutrals)),l(4),U(o.vote.neutrals)}}function gm(n,r){if(n&1&&(d(0,"option",18),y(1),m()),n&2){let o=r.$implicit;c("value",o),l(),T(" ",o," ")}}function fm(n,r){if(n&1&&(d(0,"div",3),y(1),m()),n&2){let o=u(2);l(),T(" ",o.noItemsLabel," ")}}function _m(n,r){n&1&&(d(0,"div",12),_(1,"i",13),m())}function Cm(n,r){n&1&&(d(0,"div",16),_(1,"i",17),m())}function vm(n,r){n&1&&(d(0,"div",14),_(1,"i",15),m())}function ym(n,r){if(n&1&&(d(0,"div",21)(1,"div",22),P(2,_m,2,0,"div",23)(3,Cm,2,0,"div",24)(4,vm,2,0,"div",25),d(5,"span",26),y(6),h(7,"translate"),m()(),d(8,"span",27),y(9),m()()),n&2){let o=r.$implicit;l(2),c("ngIf",o.vote===1),l(),c("ngIf",o.vote==="novote"),l(),c("ngIf",o.vote===-1),l(2),T(" ",f(7,5,o.userName||"COMMON.ANONYMOUS_USER")," "),l(3),U(o.date==null?null:o.date.formatDate)}}function Im(n,r){if(n&1&&(d(0,"div",19),P(1,ym,10,7,"div",20),m()),n&2){let o=u(2);l(),c("ngForOf",o.shownUsers)}}function Pm(n,r){n&1&&(d(0,"div",12),_(1,"i",13),m())}function bm(n,r){if(n&1&&(d(0,"div",21)(1,"div",22),P(2,Pm,2,0,"div",23),d(3,"span",26),y(4),h(5,"translate"),m()(),d(6,"span",27),y(7),m()()),n&2){let o=r.$implicit;l(2),c("ngIf",o.vote===1),l(2),T(" ",f(5,3,o.userName||"COMMON.ANONYMOUS_USER")," "),l(3),U(o.date==null?null:o.date.formatDate)}}function wm(n,r){if(n&1&&(d(0,"div",19),P(1,bm,8,5,"div",20),m()),n&2){let o=u(2);l(),c("ngForOf",o.shownUsers)}}function Sm(n,r){n&1&&(d(0,"div",14),_(1,"i",15),m())}function Mm(n,r){if(n&1&&(d(0,"div",21)(1,"div",22),P(2,Sm,2,0,"div",25),d(3,"span",26),y(4),h(5,"translate"),m()(),d(6,"span",27),y(7),m()()),n&2){let o=r.$implicit;l(2),c("ngIf",o.vote===-1),l(2),T(" ",f(5,3,o.userName||"COMMON.ANONYMOUS_USER")," "),l(3),U(o.date==null?null:o.date.formatDate)}}function Om(n,r){if(n&1&&(d(0,"div",19),P(1,Mm,8,5,"div",20),m()),n&2){let o=u(2);l(),c("ngForOf",o.shownUsers)}}function xm(n,r){n&1&&(d(0,"div",16),_(1,"i",17),m())}function Tm(n,r){if(n&1&&(d(0,"div",21)(1,"div",22),P(2,xm,2,0,"div",24),d(3,"span",26),y(4),h(5,"translate"),m()(),d(6,"span",27),y(7),m()()),n&2){let o=r.$implicit;l(2),c("ngIf",o.vote==="novote"),l(2),T(" ",f(5,3,o.userName||"COMMON.ANONYMOUS_USER")," "),l(3),U(o.date==null?null:o.date.formatDate)}}function zm(n,r){if(n&1&&(d(0,"div",19),P(1,Tm,8,5,"div",20),m()),n&2){let o=u(2);l(),c("ngForOf",o.shownUsers)}}function Em(n,r){if(n&1){let o=S();d(0,"div")(1,"div",4)(2,"div",5)(3,"div",6),b("click",function(){C(o);let t=u();return v(t.checkVotes(t.voteTabs.All))}),d(4,"span"),y(5),h(6,"translate"),m(),y(7),m(),P(8,pm,5,4,"div",7),h(9,"async"),P(10,hm,5,4,"div",7),h(11,"async"),P(12,um,5,4,"div",7),h(13,"async"),m(),d(14,"select",8,0),b("change",function(){C(o);let t=le(15),i=u();return v(i.changeFilterType(t.value))}),P(16,gm,2,2,"option",9),m()(),P(17,fm,2,1,"div",1)(18,Im,2,1,"div",10)(19,wm,2,1,"div",10)(20,Om,2,1,"div",10)(21,zm,2,1,"div",10),m()}if(n&2){let o=u();l(3),c("ngClass",N(20,bn,o.shownTab===o.voteTabs.All)),l(2),U(f(6,12,"TABS.ALL")),l(2),T("\xA0(",o.vote.likes+o.vote.dislikes+o.vote.neutrals,") "),l(),c("ngIf",f(9,14,o.voteOptions$).showLikes),l(2),c("ngIf",f(11,16,o.voteOptions$).showDislikes),l(2),c("ngIf",f(13,18,o.voteOptions$).showNeutrals),l(4),c("ngForOf",o.filterTypes),l(),c("ngIf",o.shownUsers.length===0),l(),c("ngIf",o.shownTab===o.voteTabs.All),l(),c("ngIf",o.shownTab===o.voteTabs.Likes),l(),c("ngIf",o.shownTab===o.voteTabs.Dislikes),l(),c("ngIf",o.shownTab===o.voteTabs.Neutrals)}}var Bl=(()=>
1{let r=class r{constructor(e){s(this,"store");s(this,"vote");s(this,"likes");s(this,"dislikes");s(this,"neutrals");s(this,"voteOptions$");s(this,"noItemsLabel","TABS.NO_VOTES");s(this,"shownUsers");s(this,"voteTabs",xt);s(this,"shownTab","TABS.ALL");s(this,"filterTypes",["TABS.DATE","TABS.NAME","TABS.VOTE"]);s(this,"currentFilterType","TABS.DATE");this.store=e,this.voteOptions$=e.select(pr)}ngOnChanges(){this.checkVotes(this.shownTab)}checkVotes(e){this.shownTab=e,this.shownUsers=this.vote.votes,this.vote.votes&&(e===xt.All?(this.shownUsers=this.vote.votes.filter(t=>t.vote!==0),this.filterTypes.splice(2,1,"TABS.VOTE")):e===xt.Likes?(this.shownUsers=this.vote.votes.filter(t=>t.vote===1),this.filterTypes.splice(2,1)):e===xt.Dislikes?(this.shownUsers=this.vote.votes.filter(t=>t.vote===-1),this.filterTypes.splice(2,1)):e===xt.Neutrals&&(this.shownUsers=this.vote.votes.filter(t=>t.vote==="novote"),this.filterTypes.splice(2,1))),this.filterList(this.currentFilterType)}changeFilterType(e){this.filterList(e),this.currentFilterType=e}filterList(e){this.shownUsers&&(e==="TABS.DATE"?this.shownUsers.sort((t,i)=>i.date.comparisonValue-t.date.comparisonValue):e==="TABS.NAME"?this.shownUsers=(0,Rl.orderBy)(this.shownUsers,[t=>t.userName.toLowerCase()]):e==="TABS.VOTE"&&this.shownUsers.sort((t,i)=>{let a=t.vote==="novote"?-2:t.vote,p=i.vote==="novote"?-2:i.vote;return p<a?-1:p>a?1:0}))}ngOnDestroy(){this.store.dispatch(Sa())}};s(r,"\u0275fac",function(t){return new(t||r)(x(D))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-vote-list"]],inputs:{vote:"vote",likes:"likes",dislikes:"dislikes",neutrals:"neutrals"},standalone:!1,features:[F],decls:2,vars:2,consts:[["filterType",""],["class","no-votes","translate","",4,"ngIf"],[4,"ngIf"],["translate","",1,"no-votes"],[1,"menu"],[1,"tabs-menu"],["translate","",1,"tab","all-tab",3,"click","ngClass"],["class","tab",3,"ngClass","click",4,"ngIf"],[1,"sort-dropdown",3,"change"],["translate","",3,"value",4,"ngFor","ngForOf"],["class","ui",4,"ngIf"],[1,"tab",3,"click","ngClass"],[1,"vote-icon","green-icon"],[1,"thumbs","up","icon"],[1,"vote-icon","red-icon"],[1,"thumbs","down","icon"],[1,"vote-icon","grey-icon"],[1,"times","icon"],["translate","",3,"value"],[1,"ui"],["class","vote-row",4,"ngFor","ngForOf"],[1,"vote-row"],[1,"vote"],["class","vote-icon green-icon",4,"ngIf"],["class","vote-icon grey-icon",4,"ngIf"],["class","vote-icon red-icon",4,"ngIf"],[1,"vote-person"],[1,"vote-date"]],template:function(t,i){t&1&&P(0,mm,2,1,"div",1)(1,Em,22,22,"div",2),t&2&&(c("ngIf",!i.shownUsers),l(),c("ngIf",i.shownUsers))},dependencies:[H,ze,R,Is,Ps,_e,W,V],styles:[".menu[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.menu[_ngcontent-%COMP%]   .tabs-menu[_ngcontent-%COMP%]{display:flex;font-weight:800;margin:1rem .5rem}.menu[_ngcontent-%COMP%]   .tabs-menu[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]{border-bottom:3px solid rgb(255,255,255)!important;cursor:pointer;display:flex;margin:0 .5rem;padding-bottom:.3rem}.menu[_ngcontent-%COMP%]   .tabs-menu[_ngcontent-%COMP%]   .tab[_ngcontent-%COMP%]   .vote-icon[_ngcontent-%COMP%]{margin:0 .3rem}.menu[_ngcontent-%COMP%]   .tabs-menu[_ngcontent-%COMP%]   .all-tab[_ngcontent-%COMP%]{display:flex;justify-content:center;width:3rem}.menu[_ngcontent-%COMP%]   .tabs-menu[_ngcontent-%COMP%]   .active[_ngcontent-%COMP%]{border-bottom:3px solid black!important}.menu[_ngcontent-%COMP%]   .sort-dropdown[_ngcontent-%COMP%]{align-self:baseline;border:none;color:#767676!important;margin:1rem 0}[_nghost-%COMP%]   i.icon[_ngcontent-%COMP%]{line-height:unset}[_nghost-%COMP%]     .no-votes{background-color:#fff;color:#9e9e9e;font-style:italic;height:4rem;line-height:4rem;text-align:left;vertical-align:middle;width:100%}.vote-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.vote-row[_ngcontent-%COMP%]   .vote[_ngcontent-%COMP%]{display:flex;margin:.5rem 0}.vote-row[_ngcontent-%COMP%]   .vote-date[_ngcontent-%COMP%]{align-self:center;color:#767676!important;font-style:italic;margin-right:1rem}.vote-person[_ngcontent-%COMP%]{font-weight:600}.green-icon[_ngcontent-%COMP%]{background-color:#21ba45!important;border-radius:100%;color:#fff!important;display:flex;font-size:.6rem;height:1.5rem;justify-content:center;margin:0 1rem;width:1.5rem}.green-icon[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{margin:0}.grey-icon[_ngcontent-%COMP%]{background-color:#767676!important;border-radius:100%;color:#fff!important;display:flex;font-size:.6rem;height:1.5rem;justify-content:center;margin:0 1rem;width:1.5rem}.grey-icon[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{margin:0}.red-icon[_ngcontent-%COMP%]{background-color:#db2828!important;border-radius:100%;color:#fff!important;display:flex;font-size:.6rem;height:1.5rem;justify-content:center;margin:0 1rem;width:1.5rem}.red-icon[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{margin:0}"],changeDetection:0}));let n=r;return n})();var Dm=(n,r)=>({active:n,"votes-loading":r}),Rm=()=>[],Bm=n=>({small:n});function Nm(n,r){if(n&1&&(_(0,"hz-play-and-progress-icon",9),h(1,"iconRadius")),n&2){let o=u();c("item",o.votesParentItem)("radius",A(1,2,o.votesParentItem,1.25))}}function Am(n,r){if(n&1&&(_(0,"span",10),h(1,"emptyTitle")),n&2){let o=u();c("ngClass",N(4,Bm,o.votesParentItem.title.length>50))("innerHTML",f(1,2,o.votesParentItem.title),be)}}function Lm(n,r){if(n&1&&(d(0,"div",11),y(1),m()),n&2){let o=u();l(),T(" ",o.noItemsLabel,"\n")}}function Vm(n,r){if(n&1&&(_(0,"hz-vote-list",12),h(1,"async")),n&2){let o=u();c("vote",f(1,1,o.vote$))}}var H_=(()=>
1{let r=class r{constructor(e,t){s(this,"store");s(this,"route");s(this,"baseItem");s(this,"votesParentItemId","");s(this,"votesParentItem");s(this,"itemOptions");s(this,"userRole");s(this,"voteRole");s(this,"noItemsLabel","TABS.NO_VOTES");s(this,"vote$");this.store=e,this.route=t}ngOnChanges(){this.vote$=this.store.select(dr).pipe(te(e=>e[this.votesParentItemId]))}get removeVoteParam(){let e=me({},this.route.snapshot.queryParams);return delete e.showVotes,e}get isShowResults(){return this.userRole===void 0&&this.voteRole==="everybody"?!0:Q[this.voteRole]<=Q[this.userRole]}};s(r,"\u0275fac",function(t){return new(t||r)(x(D),x(Bi))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-vote-sidebar"]],inputs:{baseItem:"baseItem",votesParentItemId:"votesParentItemId",votesParentItem:"votesParentItem",itemOptions:"itemOptions",userRole:"userRole",voteRole:"voteRole"},standalone:!1,features:[F],decls:11,vars:15,consts:[[1,"toolbar","selection"],[1,"item"],["class","item-icon",3,"item","radius",4,"ngIf"],["class","item-title",3,"ngClass","innerHTML",4,"ngIf"],[1,"ui","centered","inline","medium","loader",3,"ngClass"],[1,"item-options"],[1,"close-button","large","grey","close","icon","link",3,"routerLink","queryParams"],["class","no-votes","translate","",4,"ngIf"],[3,"vote",4,"ngIf"],[1,"item-icon",3,"item","radius"],[1,"item-title",3,"ngClass","innerHTML"],["translate","",1,"no-votes"],[3,"vote"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1),P(2,Nm,2,5,"hz-play-and-progress-icon",2)(3,Am,2,6,"span",3),_(4,"div",4),m(),d(5,"div",5),_(6,"i",6),m()(),P(7,Lm,2,1,"div",7),h(8,"async"),P(9,Vm,2,3,"hz-vote-list",8),h(10,"async")),t&2&&(l(2),c("ngIf",i.votesParentItem),l(),c("ngIf",i.votesParentItem),l(),c("ngClass",X(11,Dm,!i.votesParentItem,!i.votesParentItem)),l(2),c("routerLink",vt(14,Rm))("queryParams",i.removeVoteParam),l(),c("ngIf",!f(8,7,i.vote$)),l(2),c("ngIf",f(10,9,i.vote$)))},dependencies:[H,R,Ni,_e,qe,hn,Bl,W,Vt,cn],styles:["[_nghost-%COMP%]     .votes-loading{left:45%!important;position:absolute!important;top:50%!important;transform:translate(-50%) translateY(-50%)!important}[_nghost-%COMP%]     .toolbar{align-items:center;display:flex;justify-content:space-between;min-height:55px;padding:.5rem 0}[_nghost-%COMP%]     .toolbar .item{align-items:center;display:flex}[_nghost-%COMP%]     .toolbar .item .item-icon{padding:.8rem}[_nghost-%COMP%]     .toolbar .item .item-title{margin:0 2rem 0 .5rem}[_nghost-%COMP%]     .toolbar .item-options{display:flex}[_nghost-%COMP%]     .no-votes{background-color:#fff;color:#9e9e9e;font-style:italic;height:4rem;line-height:4rem;text-align:left;vertical-align:middle;width:100%}"],changeDetection:0}));let n=r;return n})();function Um(n,r){if(n&1){let o=S();Do(0,"a",1),h(1,"translate"),Ao("click",function(t){C(o);let i=u();return v(i.navigateToHazu(t))}),Bo(2,"i",2),Ro()}if(n&2){let o=u();No("href",o.link,We),ne("title",f(1,2,"ACTIONS.NAVIGATE"))}}var Nl=(()=>{let r=class r{constructor(e){s(this,"store");s(this,"snapshot");s(this,"isHazu",!1);s(this,"link","");this.store=e}ngOnInit(){var e;this.isHazu=((e=this.snapshot)==null?void 0:e.type)===se.hazu,this.snapshot&&"link"in this.snapshot&&(this.link=this.snapshot.link)}navigateToHazu(e){e.preventDefault(),this.snapshot&&this.store.dispatch(sn({item:new Tt(this.snapshot),mouseEvent:e}))}};s(r,"\u0275fac",function(t){return new(t||r)(x(D))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-user-created-content-accessories"]],inputs:{snapshot:"snapshot"},decls:1,vars:1,consts:[[1,"ui","basic","icon","button","open-button","accessory",3,"href"],[1,"ui","basic","icon","button","open-button","accessory",3,"click","href"],[1,"chevron","right","icon"]],template:function(t,i){t&1&&Oe(0,Um,3,4,"a",0),t&2&&xe(i.snapshot&&i.isHazu?0:-1)},dependencies:[ht,V],styles:["[_nghost-%COMP%]   .open-button[_ngcontent-%COMP%]{box-shadow:none;padding:0}[_nghost-%COMP%]   .open-button[_ngcontent-%COMP%]:hover{background:transparent;box-shadow:none}"],changeDetection:0}));let n=r;return n})();var Fm=(n,r,o,e)=>({progress:n,"show-play-pause-icons":r,play:o,pause:e}),Hm=(n,r)=>
1["icon",n,r],Gm=n=>({time:n}),$m=n=>({backgroundColor:n}),Wm=(n,r)=>["font-awesome",n,r];function jm(n,r){var o,e;if(n&1){let t=S();d(0,"div",1)(1,"span",2),h(2,"async"),h(3,"formatDuration"),h(4,"translate"),b("click",function(a){C(t);let p=u();return v(p.isHazu||p.showPlayPauseIcons()?p.clickOnIcon(a):null)}),_(5,"i",3),m()()}if(n&2){let t=u();Ho("--progress: "+t.percentCompleted*100+"%"),c("ngClass",Di(15,Fm,t.showProgress,t.showPlayPauseIcons(),t.showPlayButton(),t.showPauseButton())),l(),c("ngClass",X(20,Hm,"priority-"+t.getPriority(t.snapshot.priority,t.snapshot.interaction.totalScore,(o=f(2,7,t.maxScore$))!=null?o:0),t.isHazu?"hazu-icon":"item-icon"))("title",t.isHazu||t.showPlayPauseIcons()?A(4,12,t.getTitle(),N(23,Gm,A(3,9,(e=t.snapshot.timelineDate)!=null?e:0,!0))):"")("ngStyle",N(25,$m,t.snapshot.color)),l(4),c("ngClass",X(27,Wm,t.iconClass,t.snapshot.icon))}}var Al=(()=>{let r=class r{constructor(e,t){s(this,"store");s(this,"iconService");s(this,"snapshot");s(this,"baseSnapshot");s(this,"videoState");s(this,"viewState");s(this,"maxScore$");s(this,"isHazu",!1);s(this,"iconClass","fa");s(this,"isActive",!1);s(this,"percentCompleted",0);s(this,"showProgress",!1);s(this,"item");this.store=e,this.iconService=t}ngOnInit(){var e,t,i,a;this.snapshot&&(this.isHazu=this.snapshot.type===se.hazu,this.item=new Tt(this.snapshot),this.maxScore$=this.store.select(ct),this.percentCompleted=(t=(e=this.viewState)==null?void 0:e.playingPercent)!=null?t:0,this.isActive=(a=(i=this.viewState)==null?void 0:i.isActive)!=null?a:!1)}ngOnChanges(e){var a,p,g,I,w,z,L,B;e.snapshot&&((a=e.snapshot.currentValue)==null?void 0:a.icon)!==((p=e.snapshot.previousValue)==null?void 0:p.icon)&&(this.iconClass=this.iconService.getPrefix((I=(g=this.snapshot)==null?void 0:g.icon)!=null?I:"")),e.viewState&&((w=e.viewState.currentValue)==null?void 0:w.playingPercent)!==((z=e.viewState.previousValue)==null?void 0:z.playingPercent)&&(this.showProgress=!this.isHazu&&this.percentCompleted>=1e-9&&this.percentCompleted<=.999999999&&((B=(L=this.snapshot)==null?void 0:L.timelineDuration)!=null?B:0)>1)}clickOnIcon(e){var t,i;if(this.showPlayPauseIcons()){if(this.showPlayButton()){if(this.isActive){this.store.dispatch(Ta());return}let p=((i=(t=this.snapshot)==null?void 0:t.timelineDate)!=null?i:0)/1e3;this.store.dispatch(za(p));return}this.store.dispatch(Ea());return}else this.isHazu&&this.item&&this.store.dispatch(sn({item:this.item,mouseEvent:e}))}getTitle(){return this.showPlayPauseIcons()?"ACTIONS.PLAY_AT":"ACTIONS.NAVIGATE"}getPriority(e,t,i=0){if(e!==0)return e;if(!i)return 5;let a=10/i*t+1;return Math.min(Math.max(a,1),10)}showPlayPauseIcons(){var e,t;return!((e=this.snapshot)!=null&&e.isPlaced)||!((t=this.baseSnapshot)!=null&&t.event)?!1:"videoId"in this.baseSnapshot.event?this.baseSnapshot.event.videoId!=="":!1}showPauseButton(){return this.showPlayPauseIcons()?!!(this.isActive&&this.videoState===mr.Started):!1}showPlayButton(){return this.showPlayPauseIcons()?!this.showPauseButton():!1}};
1s(r,"\u0275fac",function(t){return new(t||r)(x(D),x(mn))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-user-created-content-icon"]],inputs:{snapshot:"snapshot",baseSnapshot:"baseSnapshot",videoState:"videoState",viewState:"viewState"},features:[F],decls:1,vars:1,consts:[[1,"icon-container",3,"ngClass","style"],[1,"icon-container",3,"ngClass"],[3,"click","ngClass","title","ngStyle"],[3,"ngClass"]],template:function(t,i){t&1&&Oe(0,jm,6,30,"div",0),t&2&&xe(i.snapshot?0:-1)},dependencies:[Xo,H,jo,un,ps,ht,W,V,pt],styles:['[_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{padding:.5em;color:#fff;display:inline-flex;align-items:center;justify-content:center;font-size:1.28571429em}[_nghost-%COMP%]   .priority-0[_ngcontent-%COMP%]{width:14px;height:14px;font-size:8px}[_nghost-%COMP%]   .priority-1[_ngcontent-%COMP%]{width:16.625px;height:16.625px;font-size:9.5px}[_nghost-%COMP%]   .priority-2[_ngcontent-%COMP%]{width:19.25px;height:19.25px;font-size:11px}[_nghost-%COMP%]   .priority-3[_ngcontent-%COMP%]{width:21.875px;height:21.875px;font-size:12.5px}[_nghost-%COMP%]   .priority-4[_ngcontent-%COMP%]{width:24.5px;height:24.5px;font-size:14px}[_nghost-%COMP%]   .priority-5[_ngcontent-%COMP%]{width:27.125px;height:27.125px;font-size:15.5px}[_nghost-%COMP%]   .priority-6[_ngcontent-%COMP%]{width:29.75px;height:29.75px;font-size:17px}[_nghost-%COMP%]   .priority-7[_ngcontent-%COMP%]{width:32.375px;height:32.375px;font-size:18.5px}[_nghost-%COMP%]   .priority-8[_ngcontent-%COMP%]{width:35px;height:35px;font-size:20px}[_nghost-%COMP%]   .priority-9[_ngcontent-%COMP%]{width:37.625px;height:37.625px;font-size:21.5px}[_nghost-%COMP%]   .priority-10[_ngcontent-%COMP%]{width:40.25px;height:40.25px;font-size:23px}[_nghost-%COMP%]   .item-icon[_ngcontent-%COMP%]{border-radius:50%}[_nghost-%COMP%]   .hazu-icon[_ngcontent-%COMP%]{cursor:pointer;border-radius:.5em}[_nghost-%COMP%]   .show-play-pause-icons[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{cursor:pointer}.user-created-container:has(.title:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.title:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.title:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f303"}.user-created-container:has(.hazu-icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%], .user-created-container:has(.open-button:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.hazu-icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], .user-created-container:has(.open-button:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.hazu-icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before, .user-created-container:has(.open-button:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f061"}.user-created-container:has(.title a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%], .user-created-container:has(.description a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.title a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%], .user-created-container:has(.description a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.title a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before, .user-created-container:has(.description a:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f35d"}.user-created-container:has(.description img:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.description img:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.description img:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f03e"}.user-created-container:has(.icon-switcher .text:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.icon-switcher .text:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.icon-switcher .text:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f1fc"}.user-created-container:has(.show-play-pause-icons.play .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.show-play-pause-icons.play .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.show-play-pause-icons.play .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f04b"}.user-created-container:has(.show-play-pause-icons.pause .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]{background-color:#626262!important}.user-created-container:has(.show-play-pause-icons.pause .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-family:"Font Awesome 5 Free";font-weight:900}.user-created-container:has(.show-play-pause-icons.pause .icon:hover)   [_nghost-%COMP%]   .icon[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{content:"\\f04c"}[_nghost-%COMP%]   .icon-container.progress[_ngcontent-%COMP%]{display:flex;border-radius:50%;background:conic-gradient(rgb(97,97,97) var(--progress),rgb(222,222,222) 0deg);font-size:0;padding:4px}'],changeDetection:0}));let n=r;return n})();var Ll=n=>[n],Ym=n=>({"show-popup":n}),Xm=()=>[];function qm(n,r){if(n&1){let o=S();d(0,"hz-item-icon-edit-button",10,0),b("onShow",function(t){C(o);let i=u(3);return v(i.showIconPopupChange(t))})("click",function(t){return C(o),v(t.stopPropagation())})("itemChange",function(t){C(o);let i=u(3);return v(i.item.set(t))}),m()}if(n&2){let o=u(3);c("ngClass",N(2,Ym,o.showIconPopup))("items",o.item()?N(4,Ll,o.item()):vt(6,Xm))}}function Km(n,r){n&1&&(d(0,"section",8)(1,"button",11),y(2,"Read More"),m()())}function Zm(n,r){var o,e;if(n&1){let t=S();
1d(0,"article",2),b("mouseenter",function(){C(t);let a=u(),p=u();return v(a.isPlaced?p.hoverTimelineItem():null)})("mouseleave",function(){C(t);let a=u(),p=u();return v(a.isPlaced?p.leaveTimelineItem():null)}),Oe(1,qm,2,7,"hz-item-icon-edit-button",3),_(2,"hz-user-created-content-icon",4),d(3,"section",5),_(4,"h2",6),h(5,"filterLanguages"),h(6,"safeHtml"),m(),_(7,"section",7),h(8,"filterLanguages"),h(9,"safeHtml"),Oe(10,Km,3,0,"section",8),_(11,"hz-user-created-content-accessories",9),m()}if(n&2){let t=u(),i=u();l(),xe(i.canEditIcon()?1:-1),l(),c("snapshot",t)("baseSnapshot",r)("viewState",(o=i.viewState())!=null?o:void 0)("videoState",(e=i.videoState())!=null?e:void 0),l(2),c("ngClass",N(19,Ll,"priority-"+t.priority))("innerHTML",f(6,13,f(5,11,t.title)),be),l(3),c("hzSignatureContext",i.itemId)("innerHTML",f(9,17,f(8,15,t.description||"")),be),l(3),xe(t.longdescription?10:-1),l(),c("snapshot",t)}}function Qm(n,r){if(n&1&&Oe(0,Zm,12,21,"article",1),n&2){let o,e=u();xe((o=e.baseItemSnapshot())?0:-1,o)}}var wn=(()=>{let r=class r{constructor(){s(this,"store",M(D));s(this,"itemId");s(this,"videoState",O(this.store.select(Zt)));s(this,"baseItemSnapshot",O(this.store.select(Vr)));s(this,"snapshot",je(()=>{let e=this.itemId;if(e)return O(this.store.select(Xi(e)))()}));s(this,"viewState",je(()=>{let e=this.itemId;if(e)return O(this.store.select(es(e)))()}));s(this,"item",Y(void 0));s(this,"canEditIcon",je(()=>{let e=this.item();if(e)return O(this.store.select(oa(e)))()}));s(this,"showIconPopup",!1);ie(()=>{let e=this.snapshot();e&&(tr(e.snapshot)||er(e.snapshot))?this.item.set(new Tt(e.snapshot)):this.item.set(void 0)})}showIconPopupChange(e){this.showIconPopup=e}hoverTimelineItem(){let e=this.item();e&&this.store.dispatch(Oa(e))}leaveTimelineItem(){this.store.dispatch(xa())}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-user-created-content-container"]],inputs:{itemId:"itemId"},decls:1,vars:1,consts:[["itemIconEditor",""],[1,"user-created-container"],[1,"user-created-container",3,"mouseenter","mouseleave"],["title","",1,"icon-switcher",3,"ngClass","items"],[1,"icon",3,"snapshot","baseSnapshot","viewState","videoState"],[1,"title","user-created-text"],[3,"ngClass","innerHTML"],["hzModelViewer","",1,"description","user-created-text",3,"hzSignatureContext","innerHTML"],[1,"long-description"],[1,"accessories",3,"snapshot"],["title","",1,"icon-switcher",3,"onShow","click","itemChange","ngClass","items"],[1,"ui","button","small","primary","readmore"]],template:function(t,i){if(t&1&&Oe(0,Qm,1,1),t&2){let a;xe((a=i.snapshot())?0:-1,a)}},dependencies:[ht,H,Pa,ba,un,wa,Nl,Al,ta,dn],styles:['.isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]     .user-created-container{display:grid;grid-template-columns:3.8em auto 1fr;grid-template-rows:auto;grid-template-areas:"icon title accessories" ". description description" ". long-description long-description";padding:1em;border:1px solid transparent;border-radius:5px;font-size:.8em;position:relative}@container sidebar (max-width: 767px){[_nghost-%COMP%]     .user-created-container{border-bottom:1px solid rgb(218,217,215);border-radius:0;margin:0 -1.5em;grid-template-areas:"icon title accessories" "description description description" "long-description long-description long-description"}}@media only screen and (max-width:767px){[_nghost-%COMP%]     .user-created-container{border-bottom:1px solid rgb(218,217,215);border-radius:0;margin:0 -1.5em;grid-template-areas:"icon title accessories" "description description description" "long-description long-description long-description"}}@container sidebar (min-width: $large-breakpoint){[_nghost-%COMP%]     .user-created-container:hover{border-color:#d1d2d2}}@media only screen and (min-width:992px){[_nghost-%COMP%]     .user-created-container:hover{border-color:#d1d2d2}}[_nghost-%COMP%]     .user-created-text{color:#000000b3;margin-left:1rem}@container sidebar (min-width: $large-breakpoint){@media only screen and (any-hover:hover)and (any-pointer:fine){.icon-switcher[_ngcontent-%COMP%]{grid-area:icon;align-self:center;display:none;width:3.5rem;height:2em;position:relative;
1left:-30px;padding:0 5px;background:#f1f1f2;border-radius:5px;cursor:pointer}[_nghost-%COMP%]:hover   .icon-switcher[_ngcontent-%COMP%], .icon-switcher.show-popup[_ngcontent-%COMP%]{display:inline-block}}}@media only screen and (min-width:992px)and (any-hover:hover)and (any-pointer:fine){.icon-switcher[_ngcontent-%COMP%]{grid-area:icon;align-self:center;display:none;width:3.5rem;height:2em;position:relative;left:-30px;padding:0 5px;background:#f1f1f2;border-radius:5px;cursor:pointer}[_nghost-%COMP%]:hover   .icon-switcher[_ngcontent-%COMP%], .icon-switcher.show-popup[_ngcontent-%COMP%]{display:inline-block}}@container sidebar (max-width: $large-breakpoint){[_nghost-%COMP%]   .icon-switcher[_ngcontent-%COMP%]{grid-area:accessories}}@media only screen and (max-width:992px){[_nghost-%COMP%]   .icon-switcher[_ngcontent-%COMP%]{grid-area:accessories}}@media not screen and (any-hover:hover)and (any-pointer:fine){[_nghost-%COMP%]   .icon-switcher[_ngcontent-%COMP%]{grid-area:accessories}}[_nghost-%COMP%]     .icon{grid-area:icon;justify-self:center;align-self:center;z-index:1}[_nghost-%COMP%]     .title h2.priority-10{font-size:1.7em;line-height:1.7em}[_nghost-%COMP%]     .title h2.priority-9, [_nghost-%COMP%]     .title h2.priority-8, [_nghost-%COMP%]     .title h2.priority-7{font-size:1.6em;line-height:1.7em}[_nghost-%COMP%]     .title h2.priority-6, [_nghost-%COMP%]     .title h2.priority-5, [_nghost-%COMP%]     .title h2.priority-4, [_nghost-%COMP%]     .title h2.priority-0{font-size:1.4em;line-height:1.8em}[_nghost-%COMP%]     .title h2.priority-3, [_nghost-%COMP%]     .title h2.priority-2, [_nghost-%COMP%]     .title h2.priority-1{font-size:1.1em;line-height:1.6em}[_nghost-%COMP%]     .title{grid-area:title;margin-block-start:0;margin-block-end:0;align-self:center;font-weight:400;font-size:1.28571429em}[_nghost-%COMP%]     .title div, [_nghost-%COMP%]     .title p{font-size:inherit!important;display:inline-block}[_nghost-%COMP%]     .description{grid-area:description}[_nghost-%COMP%]     .description img{max-width:100%}[_nghost-%COMP%]     .long-description{margin-top:10px;grid-area:long-description}[_nghost-%COMP%]     .accessories{grid-area:accessories;justify-self:end;align-self:center}'],changeDetection:0}));let n=r;return n})();var Jm=n=>({item:!0,active:n}),ep=(n,r)=>r.key;function tp(n,r){if(n&1){let o=S();d(0,"h4",8),b("click",function(){C(o);let t=u(2);return v(t.changeSortOrder())}),_(1,"i",9),y(2),h(3,"translate"),m()}if(n&2){let o=u(2);l(),c("ngClass",o.sortClass),l(),T("",f(3,2,"COMMON.TIMELINE")," ")}}function ip(n,r){n&1&&_(0,"div",10)}function np(n,r){if(n&1){let o=S();d(0,"button",11),b("click",function(){C(o);let t=u(2);return v(t.togglePastItems())}),y(1),h(2,"translate"),m()}n&2&&(l(),T(" ",f(2,1,"COMMON.SHOW_PREVIOUS")," "))}function op(n,r){if(n&1){let o=S();d(0,"button",12),b("click",function(){C(o);let t=u(2);return v(t.loadMore())}),y(1),h(2,"translate"),m()}n&2&&(l(),T(" ",f(2,1,"COMMON.LOAD_MORE")," "))}function rp(n,r){if(n&1){let o=S();d(0,"hz-item-detailed",15),h(1,"async"),h(2,"async"),h(3,"async"),h(4,"async"),h(5,"async"),h(6,"async"),h(7,"async"),b("playPauseIconClicked",function(t){C(o);let i=u(3);return v(i.onPlayPauseIconClicked.emit(t))})("playIconClicked",function(){C(o);let t=u().$implicit,i=u(2);return v(i.itemActivated.emit(t))}),m()}if(n&2){let o,e,t,i,a=u(),p=a.$implicit,g=a.$index,I=u(2);c("ngClass",N(28,Jm,(o=I.viewStateByKey()[p.key])==null?null:o.isActive))("baseItem",I.baseItem)("permission",f(1,14,I.getPermission(p)))("item",p)("isSidebar",I.isSidebar)("isFocused",(e=I.viewStateByKey()[p.key])==null?null:e.isFocused)("canShowItemResetOption",f(2,16,I.canShowItemResetOption$))("maxScore",f(3,18,I.maxScore$))("isActiveItem",(t=I.viewStateByKey()[p.key])==null?null:t.isActive)("playingPercent",(i=I.viewStateByKey()[p.key])==null?null:i.playingPercent)("videoState",f(4,20,I.videoState$))("isCalendarView",f(5,22,I.isCalendarView$))("alwaysShowDescription",I.isSidebar||f(6,24,I.lazyLoadItemDescriptionEnabled$)===!1||g<f(7,26,I.showDescriptionCount$)),ne("data-id",p.key)}}function sp(n,r){if(n&1&&_(0,"hz-user-created-content-container",14),n&2){let o=u().$implicit;c("itemId",o==null?null:o.id)}}function ap(n,r){if(n&1&&Oe(0,rp,8,30,"hz-item-detailed",13)(1,sp,1,1,"hz-user-created-content-container",14),n&2){let o=u(2);xe(o.showNewItemStructure?1:0)}}function lp(n,r){if(n&1){let o=S();d(0,"button",12),b("click",function(){C(o);let t=u(2);return v(t.loadMore())}),y(1),h(2,"translate"),m()}n&2&&(l(),T(" ",f(2,1,"COMMON.LOAD_MORE")," "))}function cp(n,r){if(n&1){let o=S();d(0,"button",11),b("click",function(){C(o);let t=u(2);return v(t.togglePastItems())}),y(1),h(2,"translate"),m()}n&2&&(l(),T(" ",f(2,1,"COMMON.SHOW_PREVIOUS")," "))}function dp(n,r){if(n&1&&(d(0,"div",1)(1,"div",2),_(2,"div",3),P(3,tp,4,4,"h4",4),h(4,"async"),m(),P(5,ip,1,0,"div",5),h(6,"async"),P(7,np,3,3,"button",6),h(8,"async"),P(9,op,3,3,"button",7),h(10,"async"),Mi(11,ap,2,1,null,null,ep),h(13,"async"),h(14,"filterSearch"),h(15,"filterPast"),h(16,"sliceItems"),P(17,lp,3,3,"button",7),h(18,"async"),P(19,cp,3,3,"button",6),h(20,"async"),m()),n&2){let o,e=u();l(3),c("ngIf",(o=f(4,6,e.items$))==null?null:o.length),l(2),c("ngIf",f(6,8,e.isLoading$)),l(2),c("ngIf",!(e.baseItem!=null&&e.baseItem.messengerMode)&&f(8,10,e.shouldShowPrevious$)&&e.isAsce
1nding()),l(2),c("ngIf",!(e.baseItem!=null&&e.baseItem.messengerMode)&&f(10,12,e.shouldShowLoadMore$)&&!e.isAscending()&&(e.baseItem==null?null:e.baseItem.hidePast)),l(2),Oi(A(16,22,A(15,19,A(14,16,f(13,14,e.items$),e.filterParams),e.hidePast),e.countItemsLoad)),l(6),c("ngIf",!(e.baseItem!=null&&e.baseItem.messengerMode)&&f(18,25,e.shouldShowLoadMore$)&&(e.isAscending()||!(e.baseItem!=null&&e.baseItem.hidePast))),l(2),c("ngIf",!(e.baseItem!=null&&e.baseItem.messengerMode)&&f(20,27,e.shouldShowPrevious$)&&!e.isAscending())}}var $l=(()=>{let r=class r{constructor(e,t,i,a,p,g,I,w){s(this,"queryService");s(this,"store");s(this,"logService");s(this,"itemsService");s(this,"element");s(this,"authService");s(this,"layoutService");s(this,"filterPastPipe");s(this,"videoPlayerMinimized");s(this,"hasYoutubeVideo");s(this,"hidePast",!1);s(this,"autoScrollToItemId");s(this,"isAllowSyncFocusItemWhenScroll");s(this,"sortOrder");s(this,"filterParams");s(this,"baseItem");s(this,"countItemsLoad",0);s(this,"isSidebar",!1);s(this,"itemActivated",new E);s(this,"onPlayPauseIconClicked",new E);s(this,"items$");s(this,"itemsFiltered$");s(this,"isAvailable$");s(this,"liveMode$");
1s(this,"canShowItemResetOption$");s(this,"maxScore$");s(this,"videoState$");s(this,"isMobile$");s(this,"canHover$");s(this,"isLoading$");s(this,"isCalendarView$");s(this,"shouldShowPrevious$");s(this,"shouldShowLoadMore$");s(this,"showDescriptionCount$");s(this,"lazyLoadItemDescriptionEnabled$");s(this,"viewStateByKey",M(D).selectSignal(kt));s(this,"showNewItemStructure",!1);s(this,"getPermission",e=>this.store.select(Re(e)));this.queryService=e,this.store=t,this.logService=i,this.itemsService=a,this.element=p,this.authService=g,this.layoutService=I,this.filterPastPipe=w,this.maxScore$=this.store.select(ct),this.isAvailable$=this.store.select(Zr),this.isLoading$=this.store.select(Et),this.showDescriptionCount$=this.store.select(Li),this.lazyLoadItemDescriptionEnabled$=this.store.select(Gi),this.shouldShowPrevious$=this.store.select(wr),this.shouldShowLoadMore$=this.store.select(Sr),this.isMobile$=this.store.select(at),this.canHover$=this.store.select(Fi),this.liveMode$=this.store.select(lt),this.videoState$=t.select(Zt),this.canShowItemResetOption$=this.store.select(Ua).pipe(te(z=>z>0)).pipe($e()),this.isCalendarView$=this.store.select(Ui),this.showNewItemStructure=Ye.showNewItemStructure}ngOnInit(){this.isSidebar?(this.items$=ii([this.store.select($i),this.store.select(qi),this.store.select(yt),this.store.select(Bn)]).pipe(te(([e,t,i,a])=>{if(!t)return[];if(t&&e.multiStateItems.itemsByBaseItemId[t.id]){let g=e.multiStateItems.itemsByBaseItemId[t.id].filter(I=>I.parentId===t.id);return An(g,i,a)}return[]})),this.itemsFiltered$=this.items$):(this.items$=ii([this.store.select(Yi),this.store.select(yt),this.store.select(Bn)]).pipe(te(([e,t,i])=>{let a=e.filter(p=>{var g;return p.parentId===((g=this.baseItem)==null?void 0:g.id)});return An(a,t,i)})),this.itemsFiltered$=this.items$)}ngOnDestroy(){this.layoutService.setItemsLoadedTimeline(this.baseItem.itemsPerPage)}onDoneItem(e){this.itemsService.markItemEndTime(e)}changeSortOrder(){this.layoutService.setSortOrder(this.sortOrder===He.Newest?He.Oldest:He.Newest)}loadMore(){let e=0;this.baseItem.itemsPerPage>0&&(e=this.countItemsLoad+this.baseItem.itemsPerPage,this.countItemsLoad=e),this.layoutService.setItemsLoadedTimeline(e)}togglePastItems(){this.layoutService.setHidePast(!this.hidePast)}isAscending(){return this.sortOrder===He.Oldest}get sortClass(){return this.sortOrder===He.Oldest?"ascending":"descending"}get order(){return this.sortOrder===He.Oldest?"date":"-date"}};s(r,"\u0275fac",function(t){return new(t||r)(x(Rt),x(D),x(ve),x(ye),x(ge),x(Ki),x(Ne),x($t))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-detail-item-list"]],inputs:{videoPlayerMinimized:"videoPlayerMinimized",hasYoutubeVideo:"hasYoutubeVideo",hidePast:"hidePast",autoScrollToItemId:"autoScrollToItemId",isAllowSyncFocusItemWhenScroll:"isAllowSyncFocusItemWhenScroll",sortOrder:"sortOrder",filterParams:"filterParams",baseItem:"baseItem",countItemsLoad:"countItemsLoad",isSidebar:"isSidebar"},outputs:{itemActivated:"itemActivated",onPlayPauseIconClicked:"onPlayPauseIconClicked"},standalone:!1,decls:4,vars:7,consts:[["class","ui middle aligned selection hazu list",4,"ngIf"],[1,"ui","middle","aligned","selection","hazu","list"],[1,"hz-timeline-header"],[1,"ui","hidden","divider"],["class","ui horizontal divider header",3,"click",4,"ngIf"],["class","ui active centered inline loader",4,"ngIf"],["class","ui primary basic button fluid load-bottom","data-hz-test","showPreviousBtn",3,"click",4,"ngIf"],["class","ui primary basic button fluid load-bottom","data-hz-test","loadMoreBtn",3,"click",4,"ngIf"],[1,"ui","horizontal","divider","header",3,"click"],[1,"sort","content","icon",3,"ngClass"],[1,"ui","active","centered","inline","loader"],["data-hz-test","showPreviousBtn",1,"ui","primary","basic","button","fluid","load-bottom",3,"click"],["data-hz-test","loadMoreBtn",1,"ui","primary","basic","button","fluid","load-bottom",3,"click"],[3,"ngClass","baseItem","permission","item","isSidebar","isFocused","canShowItemResetOption","maxScore","isActiveItem","playingPercent","videoState","isCalendarView","alwaysShowDescription"],[3,"itemId"],[3,"playPauseIconClicked","playIconClicked","ngClass","baseItem","permission","item","isSidebar","isFocused","canShowItemResetOption","maxScore","isActiveItem","playingPercent","videoState","isCalendarView","alwaysShowDescription"]],template:function(t,i){t&1&&(P(0,dp,21,29,"div",0),h(1,"async"),h(2,"async"),h(3,"async")),t&2&&c("ngIf",f(1,1,i.isAvailable$)||f(2,3,i.isLoading$)||f(3,5,i.shouldShowPrevious$))},dependencies:[H,R,wn,Qt,W,V,Lt,Gt,$t],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]     .ui.selection.list>.item{border:1px solid transparent;cursor:inherit;margin:0;padding:0;position:relative}[_nghost-%COMP%]     .ui.selection.list>.item.active{background:transparent;border:1px solid #bdbdbd}[_nghost-%COMP%]     .timecode{cursor:pointer}[_nghost-%COMP%]     .timecode:hover{font-weight:700}[_nghost-%COMP%]     hz-privacy-button{margin:0 12px 0 4px}[_nghost-%COMP%]   .ui.horizontal.divider.header[_ngcontent-%COMP%]{cursor:pointer}.load-bottom[_ngcontent-%COMP%]{margin:1rem auto}@container sidebar (max-width: 767px){[_nghost-%COMP%]   hz-item-detailed.item[_ngcontent-%COMP%]{border-bottom:1px solid #dad9d7!important;border-radius:unset!important;margin:0 -1em!important;padding:1.5em 1em!important}[_nghost-%COMP%]   hz-item-detailed[_ngcontent-%COMP%]:has(hz-item.isEditMode){border-bottom-color:#db2828!important}}@media only screen and (max-width:767px){[_nghost-%COMP%]   hz-item-detailed.item[_ngcontent-%COMP%]{border-bottom:1px solid #dad9d7!important;border-radius:unset!important;margin:0 -1em!important;padding:1.5em 1em!important}[_nghost-%COMP%]   hz-item-detailed[_ngcontent-%COMP%]:has(hz-item.isEditMode){border-bottom-color:#db2828!important}}"],changeDetection:0}));let n=r;return n})();var pp=n=>({item:!0,messenger:n}),Mn=(()=>
1{let r=class r{constructor(){s(this,"parentId");s(this,"baseItem");s(this,"item");s(this,"items");s(this,"layout");s(this,"subscription");s(this,"inputText","");s(this,"store",M(D));s(this,"isOwner",this.store.selectSignal(os));s(this,"newItemPermission",je(()=>({create:!0,edit:!0,delete:!0,isOwner:this.isOwner()})))}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-new-item"]],inputs:{parentId:"parentId",baseItem:"baseItem",item:"item",items:"items",layout:"layout"},standalone:!1,decls:3,vars:8,consts:[[1,"ui","list"],[1,"ui","hazu","list","selection","edit-container"],["listName","UnplacedView","attr.tempItemId","detail-item-0",3,"ngClass","baseItem","item","permission","newItemMode","alwaysShowDescription"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1),_(2,"hz-item-detailed",2),m()()),t&2&&(l(2),c("ngClass",N(6,pp,i.baseItem.messengerMode))("baseItem",i.baseItem)("item",i.item)("permission",i.newItemPermission())("newItemMode",!0)("alwaysShowDescription",!0))},dependencies:[H,Qt],styles:[".info-icon[_ngcontent-%COMP%]{background-color:orange!important;border:none;box-shadow:none!important;color:#fff}.edit-box[_ngcontent-%COMP%]{border:none!important}.edit-container[_ngcontent-%COMP%]{margin:0!important;padding:0!important}.edit-container[_ngcontent-%COMP%]   hz-item-detailed[_ngcontent-%COMP%]:after{display:none}.edit-container[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{border:none;margin:0;padding:0}.edit-container[_ngcontent-%COMP%]   .messenger[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-top:2.5rem!important}.edit-container[_ngcontent-%COMP%]   .detail-item[_ngcontent-%COMP%]{border:none}.edit-container[_ngcontent-%COMP%]   .detail-item[_ngcontent-%COMP%]:after{display:none!important}.unplaced-agenda-list[_ngcontent-%COMP%]{margin:0!important;padding:0!important}[_nghost-%COMP%]     .hazu-accessory-floating-container{margin:.3em 0 0 1em!important}[_nghost-%COMP%]     .hazu-accessory-floating-container hz-privacy-button{margin-right:0}[_nghost-%COMP%]     .detail-item:after{display:none!important}"]}));let n=r;return n})();var Xl=Pe(we());var hp=n=>({placeNextItem:n}),up=(n,r)=>({item:!0,messengerMode:n,hide:r}),gp=(n,r)=>r.key;function fp(n,r){if(n&1){let o=S();d(0,"button",5),b("click",function(){C(o);let t=u();return v(t.loadMore())}),y(1),h(2,"translate"),m()}n&2&&(l(),T(" ",f(2,1,"COMMON.LOAD_MORE"),"\n"))}function _p(n,r){if(n&1&&(d(0,"div",3),_(1,"hz-item-detailed",7),h(2,"async"),m()),n&2){let o,e=r.$implicit,t=r.index,i=u(2);c("id",Go("box",t)),l(),c("ngClass",X(17,up,i.baseItem.messengerMode,i.baseItem.hideLegendItems&&e.tags.includes(i.LEGEND_TAG)))("baseItem",i.baseItem)("item",e)("isSidebar",i.isSidebar)("maxScore",i.maxScore)("isFocused",(o=i.viewStateByKey()[e.key])==null?null:o.isFocused)("permission",f(2,15,i.permission$[e.key]))("draggable",!1)("hidePlaceItemButton",!i.graphPosition)("grahpPositionNotAtInit",i.grahpPositionNotAtInit)("isCalendarView",i.isCalendarView)("alwaysShowDescription",i.isSidebar||i.lazyLoadItemDescriptionEnabled()===!1||t<i.showDescriptionCount()),ne("data-id",e.key)}}function Cp(n,r){if(n&1&&(P(0,_p,3,20,"div",6),h(1,"filterSearch"),h(2,"sliceItems")),n&2){let o=u();c("ngForOf",oi(2,5,A(1,2,o.getItems(),o.filterParams),o.countItemsLoad,o.isShowLast))("ngForTrackBy",o.trackByItemKey)}}function vp(n,r){if(n&1&&_(0,"hz-user-created-content-container",8),n&2){let o=r.$implicit;c("itemId",o.key)}}function yp(n,r){if(n&1&&(Mi(0,vp,1,1,"hz-user-created-content-container",8,gp),h(2,"filterSearch"),h(3,"sliceItems")),n&2){let o=u();Oi(oi(3,3,A(2,0,o.getItems(),o.filterParams),o.countItemsLoad,o.isShowLast))}}function Ip(n,r){if(n&1){let o=S();d(0,"button",9),b("click",function(){C(o);let t=u();return v(t.loadMore())}),y(1," Load more...\n"),m()}}var ql=(()=>{let r=class r{constructor(e,t,i){s(this,"store");s(this,"logService");s(this,"layoutService");s(this,"parentId");s(this,"baseItem");s(this,"maxScore");s(this,"unplacedItems");s(this,"messageModeItems");s(this,"filterParams");s(this,"liveMode");s(this,"isListItem");s(this,"nowMode");s(this,"canEdit");s(this,"graphPosition",null);s(this,"countItemsLoad",0);s(this,"isCalendarView",!1);s(this,"isSidebar",!1);s(this,"itemClicked",new E);s(this,"isMobile");s(this,"canHover");s(this,"showDescriptionCount");s(this,"lazyLoadItemDescriptionEnabled");s(this,"viewStateByKey",M(D).selectSignal(kt));s(this,"enableDebug",!1);s(this,"grahpPositionNotAtInit",!1);s(this,"LEGEND_TAG",Qo.Legend);s(this,"permission$",{});s(this,"showNewItemStructure",!1);s(this,"placeNextItem",()=>{var t;let e=this.graphPosition&&(this.grahpPositionNotAtInit&&!this.liveMode||this.liveMode&&!((t=this.nowMode)!=null&&t.value));this.unplacedItems.length&&e&&this.canEdit&&this.store.dispatch(ln(this.unplacedItems[0]))});this.store=e,this.logService=t,this.layoutService=i,this.isMobile=this.store.selectSignal(at),this.canHover=this.store.selectSignal(Fi),this.showDescriptionCount=this.store.selectSignal(Li),this.lazyLoadItemDescriptionEnabled=this.store.selectSignal(Gi),this.showNewItemStructure=Ye.showNewItemStructure}ngOnDestroy(){this.layoutService.setItemsLoaded(this.baseItem.itemsPerPage)}trackByItemKey(e,t){return t.key}ngOnChanges(e){var t,i,a,p;(0,Xl.get)(e,"graphPosition")&&(this.grahpPositionNotAtInit=this.graphPosition&&this.graphPosition.getTime()!==0&&this.baseItem&&this.graphPosition.getTime()!==this.baseItem.start,this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","graphPosition changed: ".concat(String(this.graphPosition),", grahpPositionNotAtInit: ").concat(String(this.grahpPositionNotAtInit)),"important")),((i=(t=e.unplacedItems)==null?void 0:t.currentValue)!=null&&i.length||(p=(a=e.messageModeItems)==null?void 0:a.currentValue)!=null&&p.length)&&this.updatePermissions()}
1updatePermissions(){this.getItems().forEach(e=>{this.permission$[e.key]||(this.permission$[e.key]=this.store.select(Re(e)))})}getItems(){return this.baseItem.messengerMode?this.messageModeItems:this.unplacedItems}loadMore(){let e=0;this.baseItem.itemsPerPage>0&&(e=this.countItemsLoad+this.baseItem.itemsPerPage,this.countItemsLoad=e),this.baseItem.messengerMode?this.layoutService.setItemsLoadedMessenger(e):this.layoutService.setItemsLoaded(e)}get isShowLast(){return this.baseItem.messengerMode&&!this.baseItem.sortOrder}};s(r,"\u0275fac",function(t){return new(t||r)(x(D),x(ve),x(Ne))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-unplaced-agenda-list"]],inputs:{parentId:"parentId",baseItem:"baseItem",maxScore:"maxScore",unplacedItems:"unplacedItems",messageModeItems:"messageModeItems",filterParams:"filterParams",liveMode:"liveMode",isListItem:"isListItem",nowMode:"nowMode",canEdit:"canEdit",graphPosition:"graphPosition",countItemsLoad:"countItemsLoad",isCalendarView:"isCalendarView",isSidebar:"isSidebar"},outputs:{itemClicked:"itemClicked"},standalone:!1,features:[F],decls:6,vars:6,consts:[["class","ui primary basic button fluid load-up",3,"click",4,"ngIf"],["hzHotkeys","",1,"ui","list","middle","aligned","selection","hazu","list","unplaced-agenda-list",3,"hotkeys"],["id","container"],[1,"ui","hazu","list","selection","no-after",3,"id"],["class","ui primary basic button fluid load-bottom","data-hz-test","loadMoreBtn",3,"click",4,"ngIf"],[1,"ui","primary","basic","button","fluid","load-up",3,"click"],["class","ui hazu list selection no-after",3,"id",4,"ngFor","ngForOf","ngForTrackBy"],["listName","UnplacedView",3,"ngClass","baseItem","item","isSidebar","maxScore","isFocused","permission","draggable","hidePlaceItemButton","grahpPositionNotAtInit","isCalendarView","alwaysShowDescription"],[3,"itemId"],["data-hz-test","loadMoreBtn",1,"ui","primary","basic","button","fluid","load-bottom",3,"click"]],template:function(t,i){t&1&&(P(0,fp,3,3,"button",0),d(1,"div",1)(2,"div",2),Oe(3,Cp,3,9,"div",3)(4,yp,4,7),m()(),P(5,Ip,2,0,"button",4)),t&2&&(c("ngIf",i.isShowLast&&i.getItems().length>i.countItemsLoad&&i.countItemsLoad>0),l(),c("hotkeys",N(4,hp,i.placeNextItem)),l(2),xe(i.showNewItemStructure?4:3),l(2),c("ngIf",!i.isShowLast&&i.getItems().length>i.countItemsLoad&&i.countItemsLoad>0))},dependencies:[H,ze,R,qt,wn,Qt,W,V,Lt,Gt],styles:[".content[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#000!important}.no-after[_ngcontent-%COMP%]{padding:0!important}div.item.no-after[_ngcontent-%COMP%]:after{content:none}[_nghost-%COMP%]     .ui.selection.list>.item{cursor:inherit;margin:0;padding:0 .5rem}[_nghost-%COMP%]     .unplaced-agenda-list, [_nghost-%COMP%]     .unplaced-agenda-list .hazu.list{display:inherit}[_nghost-%COMP%]   .unplaced-agenda-list[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{padding:0}[_nghost-%COMP%]   .unplaced-agenda-list[_ngcontent-%COMP%]   .isSidebar[_ngcontent-%COMP%]   .item[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0!important}[_nghost-%COMP%]   .button.load-up[_ngcontent-%COMP%]{margin-bottom:2.6rem}[_nghost-%COMP%]   .button.load-bottom[_ngcontent-%COMP%]{margin:1rem auto}.messengerMode[_ngcontent-%COMP%]{border-bottom:0!important;margin-top:2.5rem!important}.hide[_ngcontent-%COMP%]{display:none!important}"],changeDetection:0}));let n=r;return n})();var et=Pe(we());var bp=n=>({messengerNewItem:n}),wp=n=>({messenger:n});function Sp(n,r){n&1&&(d(0,"div",5),_(1,"div",6),m())}function Mp(n,r){if(n&1){let o=S();d(0,"div",7)(1,"hz-new-item",8),b("cancel",function(t){C(o);let i=u();return v(i.itemCreatingCancel(t))})("onCancelClick",function(t){C(o);let i=u();return v(i.cancelClick(t))}),m()()}if(n&2){let o=u();c("ngClass",N(5,bp,o.baseItem.messengerMode)),l(),c("baseItem",o.baseItem)("parentId",o.baseItem.id)("items",o.unplacedItems())("item",o.itemToEdit)}}function Op(n,r){if(n&1){let o=S();d(0,"span",11)(1,"a",12),h(2,"translate"),b("click",function(){C(o);let t=u(2);return v(t.newItem())}),_(3,"i",13),y(4),h(5,"translate"),m()()}if(n&2){let o=u(2);l(),ne("data-tooltip",f(2,2,"COMMON.ACTION_NEW_ITEM_TOOLTIP")),l(3),T(" ",o.baseItem.messengerMode?"":f(5,4,"COMMON.ACTION_NEW_ITEM")," ")}}function xp(n,r){if(n&1&&(d(0,"div",9),P(1,Op,6,6,"span",10),m()),n&2){let o,e=u();c("ngClass",N(2,wp,e.baseItem.messengerMode)),l(),c("ngIf",(o=e.itemPermission())==null?null:o.create)}}function Tp(n,r){if(n&1){let o=S();d(0,"hz-unplaced-agenda-list",14),b("itemClicked",function(t){C(o);let i=u();
1return v(i.itemClicked.emit(t))}),m()}if(n&2){let o=u();c("baseItem",o.baseItem)("maxScore",o.maxScore())("parentId",o.baseItem.id)("canEdit",o.permission().edit)("isListItem",o.isListItem)("unplacedItems",o.unplacedItems())("isSidebar",o.isSidebar)("messageModeItems",o.messageModeItems())("countItemsLoad",o.countItemsLoad())("filterParams",o.filterParams())("nowMode",o.nowMode())("liveMode",o.liveMode())("graphPosition",o.position())("isCalendarView",o.isCalendarView())}}var Kl=(()=>{let r=class r{constructor(){s(this,"itemsService",M(ye));s(this,"logService",M(ve));s(this,"store",M(D));s(this,"layoutService",M(Ne));s(this,"graphService",M(ut));s(this,"notifications",M(Xt));s(this,"baseItem");s(this,"isSidebar",!1);s(this,"isListItem");s(this,"routerDefaults");s(this,"tabs");s(this,"itemClicked",new E);s(this,"hiddenNewItemInputForm",!1);s(this,"importOpened",!1);s(this,"backupOpened",!1);s(this,"enableDebug",!1);s(this,"isMessenger",!1);s(this,"itemToEdit");s(this,"currentType",se.item);s(this,"liveMode",O(this.store.select(lt),{initialValue:!1}));s(this,"nowMode",O(this.store.select(Wi).pipe($e((e,t)=>(0,et.get)(e,"value")===(0,et.get)(t,"value"))),{initialValue:{value:!1,byUser:!1}}));s(this,"messageModeItems",O(this.store.select(Jr),{initialValue:[]}));s(this,"filterParams",O(this.store.select(nn),{initialValue:xs}));s(this,"position",O(this.store.select(gn),{initialValue:new Date}));s(this,"baseItemSignal",Y(null));s(this,"unplacedItems",Y([]));s(this,"user",this.store.selectSignal(mt));s(this,"maxScore",this.store.selectSignal(ct));s(this,"assistantVisible",this.store.selectSignal(yr));s(this,"countItemsLoad",this.store.selectSignal(Ir));s(this,"isCalendarView",this.store.selectSignal(Ui));s(this,"isLoading",this.store.selectSignal(Et));s(this,"permission",Y({}));s(this,"itemPermission",Y({}));s(this,"cancelSignal",O(this.notifications.onCancel$,{initialValue:null}));s(this,"nextItemSignal",O(this.notifications.onNextItem$,{initialValue:null}));s(this,"itemsStateSignal",O(this.store.select($i),{initialValue:null}));s(this,"sidebarBaseItemSignal",O(this.store.select(qi),{initialValue:null}));s(this,"itemsItemsSignal",O(this.store.select(Yi),{initialValue:[]}));this.closeSavePanel(),ie(()=>{this.cancelSignal()&&(this.closeSavePanel(),this.currentType=se.item,this.createItemToEdit())}),ie(()=>{this.nextItemSignal()&&setTimeout(()=>{this.createItemToEdit(),this.showForm(this.currentType)},1)}),ie(()=>{if(this.isSidebar){let e=this.itemsStateSignal(),t=this.sidebarBaseItemSignal();if(!t||!e){this.unplacedItems.set([]);return}if(e.multiStateItems.itemsByBaseItemId[t.id]){let a=e.multiStateItems.itemsByBaseItemId[t.id].filter(p=>p.parentId===t.id&&!p.isPlaced).sort((p,g)=>p.order-g.order);this.unplacedItems.set(a)}else this.unplacedItems.set([])}else{let e=this.itemsItemsSignal(),t=this.baseItemSignal();if(!t){this.unplacedItems.set([]);return}let i=e.filter(a=>a.parentId===t.id&&!a.isPlaced).sort((a,p)=>a.order-p.order);this.unplacedItems.set(i)}})}ngOnInit(){this.baseItem&&this.baseItemSignal.set(this.baseItem),this.isMessengerMode()&&this.newItem()}ngOnChanges(e){if((0,et.get)(e,"parentId")&&this.createItemToEdit(),(0,et.get)(e,"tabs")&&this.loadItems(),(0,et.get)(e,"baseItem")){let t=e.baseItem,i=t.currentValue,a=t.previousValue;if(this.baseItemSignal.set(i),(t.firstChange||i.messengerMode!==(a==null?void 0:a.messengerMode))&&(this.hiddenNewItemInputForm=i.messengerMode,this.loadItems(),a!=null&&a.messengerMode&&this.itemToEdit&&this.store.dispatch(di.cancelAction("UnplacedView",this.itemToEdit))),!t.firstChange&&this.itemToEdit&&this.setNewDefaultSettings(),i.key!==(a==null?void 0:a.key)){let p=this.store.selectSignal(Re(this.baseItem)),g=this.store.selectSignal(It(se.item));this.permission.set(p()||{}),this.itemPermission.set(g()||{})}}}setNewDefaultSettings(){let e=this.itemToEdit.isItem?this.baseItem.defaultsSettings.itemDefaults:this.baseItem.defaultsSettings.hazuDefaults,t=this.itemToEdit.clone();t.icon=e.icon,t.color=e.color,t.priority=e.priority,t.privacy=e.privacy,t.authorGeocodeLocation=e.locationGeoCode,t.authorLocation=e.location,this.itemToEdit=t}itemCreatingCancel(){this.hiddenNewItemInputForm=!1}placeItem(e){this.logService.printDebugInfo(this.enableDebug,this,"placeItem","".concat(e.title)),this.store.dispatch(ln(e))}activateItem(e){this.logService.printDebugInfo(this.enableDebug,this,"activateItem","".concat(e.title)),this.store.dispatch(Ks(e))}loadItems(){this.hiddenNewItemInputForm&&this.itemsService.filterItems((0,et.map)(this.tabs,e=>e.isChatTab?this.baseItem.key:e.key),[])}cancelClick(){this.closeSavePanel(),this.createItemToEdit()}closeSavePanel(){this.hiddenNewItemInputForm=!1}createItemToEdit(e=!1){var p,g;let t=e?"baseItem.defaultsSettings.hazuDefaults":"baseItem.defaultsSettings.itemDefaults",i=e?this.routerDefaults.defaultsHazu:this.routerDefaults.defaultsItem,a=this.user();this.itemToEdit=Ai.newItem("",(p=a==null?void 0:a.loginId)!=null?p:"",(g=a==null?void 0:a.displayName)!=null?g:"",this.baseItem.id,(0,et.get)(this,t),i,!!(0,et.get)(this,"baseItem.autoDate",!1)),this.itemToEdit.key="newkey",this.itemToEdit.type=this.currentType}
1newItem(){this.createItemToEdit(),this.showForm(se.item)}newHazu(){this.createItemToEdit(!0),this.showForm(se.hazu)}showForm(e){this.itemToEdit.type=e,this.currentType=e,this.hiddenNewItemInputForm=!0,this.store.dispatch(di.editTitle("UnplacedView",this.itemToEdit))}getRoot(e){return(e.isHazu?e.link:this.baseItem.link).split("/").filter(i=>!!i)[0]}isOwningUser(){var i;let e=(i=this.user())==null?void 0:i.email,t=this.baseItem.email;return e===t}hoverOnPlaceItem(e){this.graphService.hoverOnPlaceItem(e)}isMessengerMode(){return this.baseItem.messengerMode}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-item-agenda"]],inputs:{baseItem:"baseItem",isSidebar:"isSidebar",isListItem:"isListItem",routerDefaults:"routerDefaults",tabs:"tabs"},outputs:{itemClicked:"itemClicked"},standalone:!1,features:[F],decls:5,vars:4,consts:[["smForm","","name","form","novalidate","",1,"ui","form"],["class","ui inverted active dimmer",4,"ngIf"],[3,"ngClass",4,"ngIf"],["class","newItemButtons",3,"ngClass",4,"ngIf"],[3,"baseItem","maxScore","parentId","canEdit","isListItem","unplacedItems","isSidebar","messageModeItems","countItemsLoad","filterParams","nowMode","liveMode","graphPosition","isCalendarView","itemClicked",4,"ngIf"],[1,"ui","inverted","active","dimmer"],[1,"ui","loader"],[3,"ngClass"],[3,"cancel","onCancelClick","baseItem","parentId","items","item"],[1,"newItemButtons",3,"ngClass"],["class","field newItemButton new-item",4,"ngIf"],[1,"field","newItemButton","new-item"],["tabindex","2","data-inverted","","data-position","bottom left",1,"ui","blue","link",3,"click"],[1,"plus","icon","circle"],[3,"itemClicked","baseItem","maxScore","parentId","canEdit","isListItem","unplacedItems","isSidebar","messageModeItems","countItemsLoad","filterParams","nowMode","liveMode","graphPosition","isCalendarView"]],template:function(t,i){if(t&1&&(d(0,"div",0),P(1,Sp,2,0,"div",1)(2,Mp,2,7,"div",2)(3,xp,2,4,"div",3)(4,Tp,1,14,"hz-unplaced-agenda-list",4),m()),t&2){let a;l(),c("ngIf",i.isLoading()),l(),c("ngIf",i.baseItem.messengerMode&&i.baseItem.sortOrder&&((a=i.itemPermission())==null?null:a.create)),l(),c("ngIf",i.baseItem.messengerMode&&i.baseItem.sortOrder),l(),c("ngIf",!i.isLoading())}},dependencies:[H,R,Mn,ql,V],styles:['.isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]   .form.piled.segment[_ngcontent-%COMP%]{padding:.4em}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]:before{background-color:#fff;border-bottom:solid 1px #4183c4;border-left:solid 1px #4183c4;bottom:auto;box-shadow:-1px 1px #d4d4d5;content:"";display:block;height:20px;position:absolute;right:3%;top:100%;transform:translate(-50%) translateY(-50%) rotate(-45deg);width:20px;z-index:1}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]{line-height:2.5em;margin-top:.9em}[_nghost-%COMP%]   .newItemButtons.messenger[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:3%;margin-top:2%}[_nghost-%COMP%]   .newItemButtons.messenger[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{font-size:2rem}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:1.4em}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{line-height:1em}.ui.dropdown.import[_ngcontent-%COMP%]   .menu[_ngcontent-%COMP%]{z-index:500!important}@container sidebar (max-width: 767px){[_nghost-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:5em!important;margin-top:1.5em!important}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:1em!important}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:.5em}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{margin-left:.5em}}@media only screen and (max-width:767px){[_nghost-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:5em!important;margin-top:1.5em!important}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:1em!important}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:.5em}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{margin-left:.5em}}']}));let n=r;return n})();var gt=Pe(we());var Ep=n=>({messengerNewItem:n}),kp=n=>({messenger:n});function Dp(n,r){if(n&1){let o=S();d(0,"div",3)(1,"hz-new-item",4),b("cancel",function(t){C(o);let i=u();return v(i.itemCreatingCancel(t))})("onCancelClick",function(t){C(o);let i=u();return v(i.cancelClick(t))}),m()()}if(n&2){let o=u();c("ngClass",N(7,Ep,o.baseItem.messengerMode)),l(),c("baseItem",o.baseItem)("parentId",o.baseItem.id)("editStateByKey",o.editStateByKey)("items",o.unplacedItems())("item",o.itemToEdit),ne("data-id",o.itemToEdit.key)}}function Rp(n,r){if(n&1){let o=S();d(0,"div")(1,"hz-new-item",4),b("cancel",function(t){C(o);let i=u();return v(i.itemCreatingCancel(t))})("onCancelClick",function(t){C(o);let i=u();return v(i.cancelClick(t))}),m()()}if(n&2){let o=u();l(),c("baseItem",o.baseItem)("parentId",o.baseItem.id)("editStateByKey",o.editStateByKey)("items",o.unplacedItems())("item",o.itemToEdit),ne("data-id",o.itemToEdit.key)}}function Bp(n,r){if(n&1){let o=S();d(0,"span",10)(1,"a",11),h(2,"translate"),b("click",function(){C(o);let t=u(2);return v(t.newItem())}
1),_(3,"i",12),y(4),h(5,"translate"),m()()}if(n&2){let o=u(2);l(),ne("data-tooltip",f(2,2,"COMMON.ACTION_NEW_ITEM_TOOLTIP")),l(3),T(" ",o.baseItem.messengerMode?"":f(5,4,"COMMON.ACTION_NEW_ITEM")," ")}}function Np(n,r){if(n&1){let o=S();d(0,"span",13)(1,"a",14),h(2,"translate"),b("click",function(){C(o);let t=u(2);return v(t.newHazu())}),_(3,"i",15),y(4),h(5,"translate"),m()()}n&2&&(l(),ne("data-tooltip",f(2,2,"COMMON.ACTION_NEW_HAZU_TOOLTIP")),l(3),T(" ",f(5,4,"COMMON.ACTION_NEW_HAZU")," "))}function Ap(n,r){if(n&1){let o=S();d(0,"hz-browse-backup",21),b("onClose",function(){C(o);let t=u(3);return v(t.backupOpened=!1)}),m()}if(n&2){let o=u(3);c("baseItem",o.baseItem)}}function Lp(n,r){if(n&1){let o=S();d(0,"hz-dropdown",16),Fe("isOpenChange",function(t){C(o);let i=u(2);return Ue(i.backupOpened,t)||(i.backupOpened=t),v(t)}),b("show",function(){C(o);let t=u(2);return v(t.browseUpdate.emit())}),d(1,"hz-text")(2,"a",17),_(3,"i",18),y(4),h(5,"translate"),m()(),d(6,"div",19),P(7,Ap,1,1,"hz-browse-backup",20),m()()}if(n&2){let o=u(2);Ve("isOpen",o.backupOpened),l(4),T(" ",f(5,3,"COMMON.ACTION_RESTORE")," "),l(3),c("ngIf",o.backupOpened)}}function Vp(n,r){if(n&1){let o=S();d(0,"hz-browse",25),b("onBack",function(){C(o);let t=u(3);return v(t.importOpened=!1)})("onClose",function(){C(o);let t=u(3);return v(t.importOpened=!1)})("onDone",function(){C(o);let t=u(3);return v(t.copyItem())}),m()}if(n&2){let o=u(3);c("rootPath",o.baseItem.link)("filter",o.filterBrowseItems())("update",o.browseUpdate)("multiselect",!0)("isDisabled",o.isDisabledBrowseButton())}}function Up(n,r){if(n&1){let o=S();d(0,"hz-dropdown",22),Fe("isOpenChange",function(t){C(o);let i=u(2);return Ue(i.importOpened,t)||(i.importOpened=t),v(t)}),b("show",function(){C(o);let t=u(2);return v(t.browseUpdate.emit())}),d(1,"hz-text")(2,"a",23),h(3,"translate"),_(4,"i",18),y(5),h(6,"translate"),m()(),d(7,"div",19),P(8,Vp,1,5,"hz-browse",24),m()()}if(n&2){let o=u(2);Ve("isOpen",o.importOpened),l(2),ne("data-tooltip",f(3,4,"COMMON.ACTION_IMPORT_TOOLTIP")),l(3),T(" ",f(6,6,"COMMON.ACTION_IMPORT")," "),l(3),c("ngIf",o.importOpened)}}function Fp(n,r){if(n&1){let o=S();xi(0),d(1,"span",26)(2,"a",27),h(3,"translate"),b("click",function(){C(o);let t=u(2);
1return v(t.openGenius())}),_(4,"i",28),y(5),h(6,"translate"),m()(),Ti()}n&2&&(l(2),ne("data-tooltip",f(3,2,"GENIUS.BUTTON_TOOLTIP")),l(3),T(" ",f(6,4,"GENIUS.BUTTON_LABEL")," "))}function Hp(n,r){if(n&1&&(d(0,"div",5),P(1,Bp,6,6,"span",6)(2,Np,6,6,"span",7)(3,Lp,8,5,"hz-dropdown",8)(4,Up,9,8,"hz-dropdown",9)(5,Fp,7,6,"ng-container",1),m()),n&2){let o,e,t,i,a=u();c("ngClass",N(7,kp,a.baseItem.messengerMode))("hidden",a.hiddenNewItemInputForm&&!(a.baseItem.messengerMode&&!a.baseItem.sortOrder)||!((o=a.itemPermission())!=null&&o.create||(o=a.hazuPermission())!=null&&o.create)),l(),c("ngIf",(e=a.itemPermission())==null?null:e.create),l(),c("ngIf",((t=a.hazuPermission())==null?null:t.create)&&!a.baseItem.messengerMode),l(),c("ngIf",a.isRoot()&&!a.baseItem.messengerMode),l(),c("ngIf",a.canImportInto()&&!a.baseItem.messengerMode),l(),c("ngIf",((i=a.hazuPermission())==null?null:i.create)&&a.isGeniusEnabled())}}var Zl=(()=>{let r=class r{constructor(){s(this,"itemsService",M(ye));s(this,"skillsService",M(Ra));s(this,"geniusService",M(va));s(this,"store",M(D));s(this,"notifications",M(Xt));s(this,"browseService",M(us));s(this,"cdr",M(Ri));s(this,"hotkeysService",M(ka));s(this,"baseItem");s(this,"editStateByKey");s(this,"user");s(this,"routerDefaults");s(this,"hiddenNewItemInputForm",!1);s(this,"importOpened",!1);s(this,"backupOpened",!1);s(this,"browseUpdate",new E);s(this,"itemToEdit");s(this,"currentType",se.item);s(this,"unplacedItems");s(this,"canImportInto");s(this,"isRoot");s(this,"geniusViewMode");s(this,"parentItems");s(this,"cancelSignal",O(M(Xt).onCancel$));s(this,"nextItemSignal",O(M(Xt).onNextItem$));s(this,"isGeniusEnabled",Y(!1));s(this,"newItem",()=>$(this,null,function*(){yield this.newElement(se.item)}));s(this,"newHazu",()=>$(this,null,function*(){yield this.newElement(se.hazu)}));s(this,"newElement",e=>$(this,null,function*(){yield import("./chunk-AW2TDH4Y.js"),this.createItemToEdit(e),this.showForm(e);let t=document.querySelector(".newItemButtons"),i=document.querySelector(".main-content");scrollTo&&!this.itemsService.isElementVisible(t,i)&&(yield this.itemsService.scrollToItem("",!1,"hz-new-item"))}));s(this,"openGenius",()=>{this.store.dispatch(Vn({viewMode:"modal"}))});s(this,"openGeniusSidebar",()=>{this.store.dispatch(Vn({viewMode:"sidebar"}))});s(this,"closeGenius",()=>{this.store.dispatch(zs({viewMode:"closed"}))});this.unplacedItems=this.store.selectSignal(Yr),this.canImportInto=this.store.selectSignal(ns),this.isRoot=this.store.selectSignal(dt),this.parentItems=this.store.selectSignal(ji),this.geniusViewMode=this.store.selectSignal(Da),this.closeSavePanel(),ie(()=>{this.cancelSignal()&&(this.closeSavePanel(),this.currentType=se.item,this.createItemToEdit())}),ie(()=>{this.nextItemSignal()&&setTimeout(()=>{this.createItemToEdit(),this.showForm(this.currentType)},1)}),ie(()=>{let e=this.parentItems(),t=this.geniusService.shouldGeniusBeEnabled(e,this.baseItem);this.isGeniusEnabled.set(t)}),this.hotkeysService.add(new mi("alt+g",e=>(this.openGeniusSidebar(),!1),void 0,"Open Genius in sidebar")),this.hotkeysService.add(new mi("shift+g",e=>(this.openGenius(),!1),void 0,"Open Genius")),this.hotkeysService.add(new mi("n",e=>{var t;return(t=this.itemPermission())!=null&&t.create&&this.newItem(),!1},void 0,"Create new item")),this.hotkeysService.add(new mi("shift+n",e=>{var t;return(t=this.hazuPermission())!=null&&t.create&&this.newHazu(),!1},void 0,"Create new hazu"))}ngOnChanges(e){var t,i;if((0,gt.get)(e,"user")&&this.createItemToEdit(),(0,gt.get)(e,"editStateByKey")&&((i=(t=e.editStateByKey.currentValue)==null?void 0:t.newkey)!=null&&i.current||this.itemCreatingCancel(null)),(0,gt.get)(e,"baseItem")){let a=(0,gt.get)(e,"baseItem");(a.firstChange||a.currentValue&&a.previousValue&&a.currentValue.messengerMode!==a.previousValue.messengerMode)&&(this.hiddenNewItemInputForm=a.currentValue.messengerMode)}}itemCreatingCancel(e){this.hiddenNewItemInputForm=!1}cancelClick(){this.closeSavePanel(),this.createItemToEdit()}closeSavePanel(){this.hiddenNewItemInputForm=!1}createItemToEdit(e=se.item){let t=e===se.hazu,i=t?"baseItem.defaultsSettings.hazuDefaults":"baseItem.defaultsSettings.itemDefaults",a=t?this.routerDefaults.defaultsHazu:this.routerDefaults.defaultsItem;this.itemToEdit=Ai.newItem("",(0,gt.get)(this,"user.loginId",""),this.user.displayName,this.baseItem.id,(0,gt.get)(this,i),a,!!(0,gt.get)(this,"baseItem.autoDate",!1)),t&&JSON.stringify(this.baseItem.rolesSettings)!==JSON.stringify(or)&&(this.itemToEdit.rolesSettings=this.baseItem.rolesSettings),this.itemToEdit.key="newkey",this.itemToEdit.type=this.currentType}showForm(e){this.itemToEdit.type=e,this.currentType=e,this.hiddenNewItemInputForm=!0,this.store.dispatch(di.editTitle("UnplacedView",this.itemToEdit))}filterBrowseItems(){return()=>!0}isDisabledBrowseButton(){return e=>this.browseService.canDoCopyOperation(e,this.baseItem).pipe(te(t=>!t))}copyItem(){this.itemsService.copyItem(),this.importOpened=!1}get itemPermission(){return this.store.selectSignal(It(se.item))}get hazuPermission(){return this.store.selectSignal(It(se.hazu))}};s(r,"\u0275fac",function(t){return new(t||r)}
1),s(r,"\u0275cmp",k({type:r,selectors:[["hz-new-item-buttons"]],inputs:{baseItem:"baseItem",editStateByKey:"editStateByKey",user:"user",routerDefaults:"routerDefaults"},standalone:!1,features:[F],decls:3,vars:3,consts:[[3,"ngClass",4,"ngIf"],[4,"ngIf"],["class","newItemButtons",3,"ngClass","hidden",4,"ngIf"],[3,"ngClass"],[3,"cancel","onCancelClick","baseItem","parentId","editStateByKey","items","item"],[1,"newItemButtons",3,"ngClass","hidden"],["class","field newItemButton new-item",4,"ngIf"],["class","field newItemButton new-event",4,"ngIf"],["position","left top",3,"isOpen","isOpenChange","show",4,"ngIf"],["position","left top","class","import",3,"isOpen","isOpenChange","show",4,"ngIf"],[1,"field","newItemButton","new-item"],["data-inverted","","data-position","bottom left","hzTab","","data-hz-test","newItemButton",1,"ui","blue","link",3,"click"],[1,"plus","icon","circle"],[1,"field","newItemButton","new-event"],["data-inverted","","data-position","bottom left","hzTab","","data-hz-test","newHazuButton",1,"ui","blue","link",3,"click"],[1,"plus","icon","square"],["position","left top",3,"isOpenChange","show","isOpen"],["tabindex","2","data-inverted","","data-position","bottom left",1,"ui","blue","link"],[1,"upload","icon"],["hz-item",""],[3,"baseItem","onClose",4,"ngIf"],[3,"onClose","baseItem"],["position","left top",1,"import",3,"isOpenChange","show","isOpen"],["data-inverted","","data-position","bottom left","hzTab","",1,"ui","blue","link"],["type","copy",3,"rootPath","filter","update","multiselect","isDisabled","onBack","onClose","onDone",4,"ngIf"],["type","copy",3,"onBack","onClose","onDone","rootPath","filter","update","multiselect","isDisabled"],[1,"field","newItemButton","genius-button"],["data-inverted","","data-position","bottom left","hzTab","","data-hz-test","geniusButton",1,"ui","blue","link",3,"click"],[1,"robot","icon"]],template:function(t,i){if(t&1&&P(0,Dp,2,9,"div",0)(1,Rp,2,6,"div",1)(2,Hp,6,9,"div",2),t&2){let a,p;c("ngIf",i.baseItem.messengerMode&&!i.baseItem.sortOrder&&((a=i.itemPermission())==null?null:a.create)),l(),c("ngIf",i.hiddenNewItemInputForm&&!i.baseItem.messengerMode),l(),c("ngIf",((p=i.itemPermission())==null?null:p.create)||((p=i.hazuPermission())==null?null:p.create))}},dependencies:[H,R,Nt,Se,ja,Mn,V],styles:['.isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]{line-height:2.5em;margin-top:.9em}[_nghost-%COMP%]   .newItemButtons.messenger[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;margin-right:3%;margin-top:2%}[_nghost-%COMP%]   .newItemButtons.messenger[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{font-size:2rem}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]{position:relative}[_nghost-%COMP%]   .messengerNewItem[_ngcontent-%COMP%]:before{background-color:#fff;border-bottom:solid 1px #4183c4;border-left:solid 1px #4183c4;bottom:auto;box-shadow:-1px 1px #d4d4d5;content:"";display:block;height:20px;position:absolute;right:3%;top:100%;transform:translate(-50%) translateY(-50%) rotate(-45deg);width:20px;z-index:1}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:21px;display:inline-flex}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{line-height:1em}[_nghost-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{margin-left:1.4em}[_nghost-%COMP%]   hz-dropdown[_ngcontent-%COMP%]   hz-text[_ngcontent-%COMP%]{font-size:1.4em}[_nghost-%COMP%]   hz-dropdown[_ngcontent-%COMP%]   hz-text[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{font-size:1.14em;line-height:1em}[_nghost-%COMP%]   .import[_ngcontent-%COMP%]     .ui.dropdown .menu{bottom:auto;font-size:1.14em;margin-bottom:initial!important}.ui.dropdown.import[_ngcontent-%COMP%]   .menu[_ngcontent-%COMP%]{z-index:500!important}@container sidebar (max-width: 767px){[_nghost-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:1em!important;margin-top:1.5em!important}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:.5em}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{margin-left:.5em}}@media only screen and (max-width:767px){[_nghost-%COMP%]   hz-new-item[_ngcontent-%COMP%]     .ui.list{margin-bottom:1em!important;margin-top:1.5em!important}[_nghost-%COMP%]   .newItemButton[_ngcontent-%COMP%]{font-size:1.4em;margin-bottom:1em!important;margin-left:.5em}[_nghost-%COMP%]   .newItemButtons[_ngcontent-%COMP%]   hz-dropdown[_ngcontent-%COMP%]{margin-left:.5em}}@keyframes _ngcontent-%COMP%_fade-in{0%{opacity:0}
1to{opacity:1}}.genius-button[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fade-in 2s}']}));let n=r;return n})();var zn=Pe(we());var Ql=(()=>{let r=class r{constructor(){s(this,"CACHE_PREFIX","form_cache_");s(this,"POSTHOOK_MESSAGE_PREFIX","posthook_message_")}getCacheKey(e){return"".concat(this.CACHE_PREFIX).concat(e)}loadFormCache(e){try{let t=this.getCacheKey(e),i=localStorage.getItem(t);if(i)return JSON.parse(i)}catch(t){console.error("Error loading form cache:",t)}return null}saveFormCache(e,t){try{let i=this.getCacheKey(e);localStorage.setItem(i,JSON.stringify(t))}catch(i){console.error("Error saving form cache:",i),i instanceof DOMException&&i.name==="QuotaExceededError"&&(console.warn("localStorage quota exceeded, clearing oldest form cache"),this.clearOldestCache())}}clearFormCache(e){try{let t=this.getCacheKey(e);localStorage.removeItem(t)}catch(t){console.error("Error clearing form cache:",t)}}clearOldestCache(){try{let e=[];for(let t=0;t<localStorage.length;t++){let i=localStorage.key(t);if(i!=null&&i.startsWith(this.CACHE_PREFIX)){let a=localStorage.getItem(i);if(a)try{let p=JSON.parse(a);e.push({key:i,timestamp:Object.keys(p).length})}catch(p){e.push({key:i,timestamp:0})}}}e.length>0&&(e.sort((t,i)=>t.timestamp-i.timestamp),localStorage.removeItem(e[0].key))}catch(e){console.error("Error clearing oldest cache:",e)}}getPosthookMessageKey(e){return"".concat(this.POSTHOOK_MESSAGE_PREFIX).concat(e)}savePosthookMessage(e,t){try{let i=this.getPosthookMessageKey(e);sessionStorage.setItem(i,t)}catch(i){console.error("Error saving posthook message:",i)}}loadPosthookMessage(e){try{let t=this.getPosthookMessageKey(e);return sessionStorage.getItem(t)}catch(t){return console.error("Error loading posthook message:",t),null}}clearPosthookMessage(e){try{let t=this.getPosthookMessageKey(e);sessionStorage.removeItem(t)}catch(t){console.error("Error clearing posthook message:",t)}}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275prov",st({token:r,factory:r.\u0275fac,providedIn:"root"}));let n=r;return n})();function $p(n,r){if(n&1&&(d(0,"span"),y(1),h(2,"translate"),h(3,"amTimeAgo"),m()),n&2){let o=u();l(),_t("",f(2,2,"ADD_EVENT.EVENT_STARTS")," ",f(3,4,o.item.start))}}function Wp(n,r){if(n&1&&(_(0,"add-to-calendar-button",17),h(1,"translate"),h(2,"date"),h(3,"date"),h(4,"date"),h(5,"date"),h(6,"async")),n&2){let o=u();ne("name",f(1,8,(o.item==null?null:o.item.title)||"ADD_EVENT.UNNAMED_EVENT"))("description",o.item==null?null:o.item.description)("startDate",A(2,10,o.item==null?null:o.item.start,"YYYY-MM-dd"))("startTime",A(3,13,o.item==null?null:o.item.start,"HH:mm"))("endDate",A(4,16,o.item==null?null:o.item.end,"YYYY-MM-dd"))("endTime",A(5,19,o.item==null?null:o.item.end,"HH:mm"))("location",o.item==null?null:o.item.authorLocation)("language",f(6,22,o.language$))}}var Jl=(()=>{let r=class r{constructor(e,t){s(this,"routerService");s(this,"store");s(this,"item");s(this,"isFuture",!1);s(this,"language$",Mo);this.routerService=e,this.store=t}ngOnInit(){this.language$=this.store.select(is),this.isFuture&&import("./chunk-S7SU5JOO.js")}get permalinkUrl(){return this.item?this.routerService.getPermalink(this.item,!0):""}};s(r,"\u0275fac",function(t){return new(t||r)(x(At),x(D))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-share-buttons"]],inputs:{item:"item",isFuture:"isFuture"},standalone:!1,decls:24,vars:26,consts:[[1,"ui","info","message"],[4,"ngIf"],[1,"share-buttons"],["shareButton","facebook",1,"ui","button","color-facebook",3,"url","title"],[1,"ui","facebook","square","small","icon"],["shareButton","twitter",1,"ui","button","color-twitter",3,"url","title"],[1,"ui","twitter","square","small","icon"],["shareButton","linkedin",1,"ui","button","color-linkedin",3,"url","title"],[1,"ui","linkedin","square","small","icon"],["shareButton","whatsapp",1,"ui","button","color-whatsapp",3,"url","title"],[1,"ui","whatsapp","square","small","icon"],["shareButton","email",1,"ui","button",3,"url","title"],[1,"ui","envelope","grey","small","icon"],["shareButton","copy",1,"ui","button",3,"url","title"],[1,"ui","copy","grey","small","icon"],["options","'Apple','Google','iCal','Outlook.com','Microsoft365','MicrosoftTeams'","location","World Wide Web","styleLight","--btn-shadow: none; --btn-shadow-active: none;
1","size","5","hideBackground","","hideCheckmark","","timeZone","currentBrowser",4,"ngIf"],[1,"ui","hidden","divider"],["options","'Apple','Google','iCal','Outlook.com','Microsoft365','MicrosoftTeams'","location","World Wide Web","styleLight","--btn-shadow: none; --btn-shadow-active: none;","size","5","hideBackground","","hideCheckmark","","timeZone","currentBrowser"]],template:function(t,i){t&1&&(d(0,"div",0),P(1,$p,4,6,"span",1),d(2,"div")(3,"div",2)(4,"button",3),h(5,"translate"),_(6,"i",4),m(),d(7,"button",5),h(8,"translate"),_(9,"i",6),m(),d(10,"button",7),h(11,"translate"),_(12,"i",8),m(),d(13,"button",9),h(14,"translate"),_(15,"i",10),m(),d(16,"button",11),h(17,"translate"),_(18,"i",12),m(),d(19,"button",13),h(20,"translate"),_(21,"i",14),m()(),P(22,Wp,7,24,"add-to-calendar-button",15),m()(),_(23,"div",16)),t&2&&(l(),c("ngIf",i.isFuture),l(3),c("url",i.permalinkUrl)("title",f(5,14,"SHARING.VIA_FACEBOOK")),l(3),c("url",i.permalinkUrl)("title",f(8,16,"SHARING.VIA_TWITTER")),l(3),c("url",i.permalinkUrl)("title",f(11,18,"SHARING.VIA_LINKED_IN")),l(3),c("url",i.permalinkUrl)("title",f(14,20,"SHARING.VIA_WHATSAPP")),l(3),c("url",i.permalinkUrl)("title",f(17,22,"SHARING.VIA_EMAIL")),l(3),c("url",i.permalinkUrl)("title",f(20,24,"SHARING.VIA_LINK")),l(3),c("ngIf",i.isFuture))},dependencies:[R,Ja,W,Yo,V,Ht],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]{display:flex;margin-bottom:1em;width:100%}.share-buttons[_ngcontent-%COMP%]{float:right;margin-right:1em;z-index:1!important}.share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:transparent;font-size:2.2em;padding:0}.share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i.icon[_ngcontent-%COMP%]{margin:0;padding:0}.info.message[_ngcontent-%COMP%]{display:flex;justify-content:space-evenly;margin:0;padding:.5em .5em .5em 1em;width:100%}.info.message[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{align-items:center;display:flex}.info.message[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{align-items:center;display:flex}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]{align-items:center;justify-content:space-evenly;display:flex;float:inherit}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:0}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{display:flex}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]:before{align-items:center;display:flex}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   i.mailto[_ngcontent-%COMP%]{padding-bottom:.05em}.info.message.share[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin:0 auto}@container sidebar (max-width: 767px){.info.message[_ngcontent-%COMP%]{display:block}.info.message[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:block}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]{margin:10px 0}}@media only screen and (max-width:767px){.info.message[_ngcontent-%COMP%]{display:block}.info.message[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:block}.info.message[_ngcontent-%COMP%]   .share-buttons[_ngcontent-%COMP%]{margin:10px 0}}"],changeDetection:0}));let n=r;return n})();var Yp=(n,r,o,e,t,i,a,p,g)=>({nextItem:n,prevItem:r,playPause:o,rewind5Sec:e,rewind15Sec:t,rewind60Sec:i,forward5Sec:a,forward15Sec:p,forward60Sec:g}),po=n=>({disabled:n}),Xp=(n,r)=>({"fa-pause":n,"fa-play":r});function qp(n,r){if(n&1){let o=S();d(0,"button",7),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.togglePlayPause())}),_(2,"i",8),m()}if(n&2){let o=u();c("ngClass",N(5,po,o.playPauseDisabled))("title",f(1,3,"PLAYER_CONTROLS.PLAY_AND_PAUSE")),l(2),c("ngClass",X(7,Xp,o.isPlaying,!o.isPlaying))}}function Kp(n,r){if(n&1){let o=S();d(0,"button",9),h(1,"translate"),h(2,"translate"),b("click",function(){C(o);let t=u();return v(t.endNow())}),_(3,"i",10),m()}n&2&&c("popupText",Ct(f(1,3,"PLAYER_CONTROLS.END_NOW_TOOLTIP")))("title",f(2,5,"PLAYER_CONTROLS.END_NOW_TOOLTIP"))}function Zp(n,r){if(n&1){let o=S();d(0,"button",9),h(1,"translate"),h(2,"translate"),b("click",function(){C(o);let t=u();return v(t.reopen())}
1),_(3,"i",11),m()}n&2&&c("popupText",Ct(f(1,3,"PLAYER_CONTROLS.REOPEN_TOOLTIP")))("title",f(2,5,"PLAYER_CONTROLS.REOPEN_TOOLTIP"))}function Qp(n,r){if(n&1){let o=S();d(0,"button",1),h(1,"translate"),b("click",function(){C(o);let t=u();return v(t.next())}),_(2,"i",12),m()}if(n&2){let o=u();c("ngClass",N(4,po,o.nextDisabled))("title",f(1,2,"PLAYER_CONTROLS.NEXT_ITEM"))}}function Jp(n,r){if(n&1){let o=S();d(0,"button",13),h(1,"translate"),h(2,"translate"),b("click",function(){C(o);let t=u();return v(t.next())}),_(3,"i",12),m()}n&2&&(c("title",f(1,3,"PLAYER_CONTROLS.ACTIVATE_NEXT_ITEM")),ne("data-tooltip",f(2,5,"PLAYER_CONTROLS.ACTIVATE_NEXT_ITEM"))("data-position","top center"))}var ec=(()=>{let r=class r{constructor(){s(this,"onPlayClicked",new E);s(this,"onPauseClicked",new E);s(this,"onEndNowClicked",new E);s(this,"onReopenClicked",new E);s(this,"onNextClicked",new E);s(this,"onActivateNextClicked",new E);s(this,"onPreviousClicked",new E);s(this,"onGoToPosition",new E);s(this,"onGoToNowMode",new E);s(this,"hasVideo",!1);s(this,"liveMode");s(this,"showLiveMode");s(this,"canEdit");s(this,"nowMode");s(this,"currentIndex",0);s(this,"totalCount",0);s(this,"isPlaying",!1);s(this,"hidePlayButton",!1);s(this,"playerPosition");s(this,"position");s(this,"unplacedCount");s(this,"previous",()=>{let e=this.currentIndex-1;this.liveMode&&this.nowMode&&(e=this.currentIndex),this.onPreviousClicked.emit(e)});s(this,"togglePlayPause",e=>{e&&e.preventDefault(),this.isPlaying?this.onPauseClicked.emit(this.currentIndex):this.onPlayClicked.emit(this.currentIndex)});s(this,"next",()=>{if(this.nextNowMode)return this.onGoToNowMode.emit();if(this.activateMode)return this.onActivateNextClicked.emit();this.nextDisabled||this.onNextClicked.emit(this.currentIndex+1)});s(this,"rewind5Sec",()=>{this.goToRelativePosition(-5)});s(this,"rewind15Sec",()=>{this.goToRelativePosition(-15)});s(this,"rewind60Sec",()=>{this.goToRelativePosition(-60)});s(this,"forward5Sec",()=>{this.goToRelativePosition(5)});s(this,"forward15Sec",()=>{this.goToRelativePosition(15)});s(this,"forward60Sec",()=>{this.goToRelativePosition(60)})}get previousDisabled(){return this.currentIndex<=0&&this.playerPosition<2}get playPauseDisabled(){return!1}endNow(){this.onEndNowClicked.emit()}reopen(){this.onReopenClicked.emit()}get nextNowMode(){return this.currentIndex===this.totalCount-1&&this.liveMode&&!this.nowMode}get nextDisabled(){return this.currentIndex>=this.totalCount-1&&!this.nextNowMode}get activateMode(){return this.nextDisabled&&this.unplacedCount!==0&&this.liveMode&&this.nowMode&&this.canEdit}first(){this.onNextClicked.emit(0)}last(){this.onNextClicked.emit(this.totalCount-1)}goToRelativePosition(e){this.onGoToPosition.emit(new Date(this.position.getTime()+e*1e3))}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-player-controls"]],inputs:{hasVideo:"hasVideo",liveMode:"liveMode",showLiveMode:"showLiveMode",canEdit:"canEdit",nowMode:"nowMode",currentIndex:"currentIndex",totalCount:"totalCount",isPlaying:"isPlaying",hidePlayButton:"hidePlayButton",playerPosition:"playerPosition",position:"position",unplacedCount:"unplacedCount"},outputs:{onPlayClicked:"onPlayClicked",onPauseClicked:"onPauseClicked",onEndNowClicked:"onEndNowClicked",onReopenClicked:"onReopenClicked",onNextClicked:"onNextClicked",onActivateNextClicked:"onActivateNextClicked",onPreviousClicked:"onPreviousClicked",onGoToPosition:"onGoToPosition",onGoToNowMode:"onGoToNowMode"},standalone:!1,decls:9,vars:22,consts:[["hzHotkeys","",1,"ui","icon","buttons",2,"margin-right","10px",3,"hotkeys"],[1,"ui","button",3,"click","ngClass","title"],[1,"fa-step-backward","icon"],["class","ui button active e2e-play-button",3,"ngClass","title","click",4,"ngIf"],["class","ui button active","fuiPopup","","popupPlacement","top left","popupInverted","true",3,"popupText","title","click",4,"ngIf"],["class","ui button",3,"ngClass","title","click",4,"ngIf"],["class","ui button red","data-inverted","",3,"title","click",4,"ngIf"],[1,"ui","button","active","e2e-play-button",3,"click","ngClass","title"],[1,"icon",3,"ngClass"],["fuiPopup","","popupPlacement","top left","popupInverted","true",1,"ui","button","active",3,"click","popupText","t
1itle"],[1,"icon","stop"],[1,"icon","undo"],[1,"fa-step-forward","icon"],["data-inverted","",1,"ui","button","red",3,"click","title"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"button",1),h(2,"translate"),b("click",function(){return i.previous()}),_(3,"i",2),m(),P(4,qp,3,10,"button",3)(5,Kp,4,7,"button",4)(6,Zp,4,7,"button",4)(7,Qp,3,6,"button",5)(8,Jp,4,7,"button",6),m()),t&2&&(c("hotkeys",Wo(10,Yp,[i.next,i.previous,i.togglePlayPause,i.rewind5Sec,i.rewind15Sec,i.rewind60Sec,i.forward5Sec,i.forward15Sec,i.forward60Sec])),l(),c("ngClass",N(20,po,i.previousDisabled))("title",f(2,8,"PLAYER_CONTROLS.PREVIOUS_ITEM")),l(3),c("ngIf",i.hasVideo&&!i.hidePlayButton),l(),c("ngIf",i.liveMode&&i.canEdit&&!i.hasVideo),l(),c("ngIf",!i.liveMode&&!i.hasVideo&&i.canEdit),l(),c("ngIf",!i.activateMode),l(),c("ngIf",i.activateMode&&i.canEdit))},dependencies:[H,R,Ce,qt,V],encapsulation:2,changeDetection:0}));let n=r;return n})();var dc=Pe(we());var tc=(()=>{let r=class r{constructor(){s(this,"ngZone",M(wi));s(this,"tick$",new So(e=>{let t=0,i=this.ngZone.runOutsideAngular(()=>window.setInterval(()=>{t+=1,this.ngZone.run(()=>e.next(t))},6e4));return()=>window.clearInterval(i)}).pipe(xo()))}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275prov",st({token:r,factory:r.\u0275fac,providedIn:"root"}));let n=r;return n})();var Z=Pe(we());var xn,ic,On=class{constructor(r,o,e,t){bo(this,xn);s(this,"base");s(this,"activeItemProgressRingConfig");s(this,"logService");s(this,"iconService");s(this,"enableDebug",!1);this.base=r,this.activeItemProgressRingConfig=o,this.logService=e,this.iconService=t}draw(r){this.base.baseItem.type!=="user"&&this.drawDurationBar(r),this.drawCircle()}drawDurationBar(r){this.base.elementEnter&&(this.base.elementEnter.append("line").attr("class","line").attr("y1",0).attr("y2",0).attr("x1",0).attr("pointer-events","all").on("mouseover",(o,e)=>{oe(o.currentTarget).classed("line-hover",!0)}).on("mousemove",(o,e)=>{var a;let t=(a=this.base.domainBar)==null?void 0:a.node();if(!t)return;let[i]=Be(o,t);this.base.updateTimecodeTipsByX(i,e,!1,!1)}).on("mouseout",o=>{oe(o.currentTarget).classed("line-hover",!1)}).attr("pointer-events",this.base.detached?"visibleStroke":"none"),this.base.selection&&this.base.selection.select(".line").attr("x2",o=>this.getItemBarWidth(o,r)).style("stroke",o=>o.color).attr("pointer-events",this.base.detached?"visibleStroke":"none"))}drawCircle(){var e,t,i,a;if(!this.base.elementEnter||!this.base.selection)return;let r=this.base.elementEnter.append("g").classed("itemIcon",!0),o=r.append("g").attr("class","progress-ring").style("display","none").style("transform","rotate(270deg)");o.append("circle").attr("class","progress-ring-step").attr("stroke-dashoffset","0").style("fill","none").style("transform","rotate(0.1deg)").style("stroke",(e=this.activeItemProgressRingConfig.activeItemProgressRingStepColor)!=null?e:"").style("stroke-width",(t=this.activeItemProgressRingConfig.activeItemProgressRingWidth)!=null?t:""),o.append("circle").attr("class","progress-ring-background").attr("stroke-dashoffset","0").style("fill","none").style("transform","rotate(0.1deg)").style("stroke",(i=this.activeItemProgressRingConfig.activeItemProgressRingBackgroundColor)!=null?i:"").style("stroke-width",(a=this.activeItemProgressRingConfig.activeItemProgressRingWidth)!=null?a:""),r.append("rect").attr("class","item-circle").attr("pointer-events","all").on("click",(p,g)=>this.base.itemClick(g)).on("mousemove",(p,g)=>{var z;let I=(z=this.base.domainBar)==null?void 0:z.node();if(!I)return;let[w]=Be(p,I);this.base.updateTimecodeTipsByX(w,g,!1,!1)}),r.append("text").attr("pointer-events","none").attr("class","icon fontawesome"),this.base.selection.select(".progress-ring-step").attr("r",p=>this.getIconRadius(p)).attr("stroke-dasharray",p=>this.getProgressRingCircumference(p)).attr("circumference",p=>this.getProgressRingCircumference(p)),wo(this,xn,ic).call(this)}getDateEnd(r){let o=r.duration*1e3;return o!==0?o+r.date:0}getItemBarWidth(r,o){if(this.base.isNoDateEvent&&!this.base.duration)return 0;let e=this.getDateEnd(r),t=e>0?this.base.xScale(e):0,i=this.base.xScale(r.date),a=0;return isNaN(i)||isNaN(t)?a=0:t===0&&this.base.liveMode?a=o>0?this.base.xScale(o)-i:this.base.width-i:a=t-i,a>0?a:0}getIconRadius(r){return this.iconService.getIconRadius(r,!1,!1,this.base.maxScore)*.6}getProgressRingCircumference(r){return Math.round(2*this.getIconRadius(r)*Math.PI)}getItemStartTime(r){return r.date}getItemEndTime(r){return r.date+r.duration*1e3}};xn=new WeakSet,ic=function(){this.base.selection&&(this.base.selection.select(".progress-ring-background").attr("r",r=>this.getIconRadius(r)).attr("stroke-dasharray",r=>this.getProgressRingCircumference(r)).attr("circumference",r=>this.getProgressRingCircumference(r)).attr("start-time",r=>this.getItemStartTime(r)).attr("end-time",r=>this.getItemEndTime(r)),this.base.selection.select(".item-circle").attr("width",r=>2*this.getIconRadius(r)).attr("height",r=>2*this.getIconRadius(r)).attr("rx",r=>r.isHazu?2:this.getIconRadius(r)).attr("ry",r=>r.isHazu?2:this.getIconRadius(r)).attr("transform",r=>"translate(-".concat(this.getIconRadius(r),",-").concat(this.getIconRadius(r),")")).style("fill",r=>r.color).style("stroke",r=>r.color),this.base.selection.select("text.icon").attr("font-size",r=>"".concat(this.getIconRadius(r)*1,"px")).attr("class",r=>"icon fontawesome ".concat(this.iconService.getPrefix(r.icon))).text(r=>this.iconService.getUnicodeValueByClass(r.icon)).attr("dy","0.5ex").attr("x",0))};var oc=Pe(we());function th(n,r){if(n&1&&(_(0,"div",2),h(1,"emptyTitle")),n&2){let o=u();c("innerHTML",f(1,1,o.itemTitle),be)}}function ih(n,r){if(n&1&&(d(0,"div",3),y(1),h(2,"localizedDate"),h(3,"localizedDate"),m()),n&2){let o=u();
1l(),_t(" ",A(2,2,o.timeCodeInfo.time,"E")," ",A(3,5,o.timeCodeInfo.time,"mediumDate"),"\n")}}function nh(n,r){if(n&1&&(d(0,"div",3),y(1),h(2,"localizedDate"),h(3,"localizedDate"),m()),n&2){let o=u();l(),_t(" ",A(2,2,o.exactStart,"mediumDate")," \u2013 ",A(3,5,o.exactEnd,"mediumDate"),"\n")}}function oh(n,r){if(n&1&&(d(0,"div",3),y(1),h(2,"formatDuration"),m()),n&2){let o=u();l(),T(" ",oi(2,1,o.timeCodeInfo.time,!0,o.showExactDuration),"\n")}}var rc=(()=>{let r=class r{constructor(e,t,i){s(this,"logService");s(this,"timelineService");s(this,"element");s(this,"baseItem");s(this,"timecodeTips");s(this,"playheadDragging");s(this,"showExactDuration",!1);s(this,"exactStart");s(this,"exactEnd");s(this,"enableDebug",!1);s(this,"itemTitle","");s(this,"timeCodeInfo",{time:0,isDuration:!1});this.logService=e,this.timelineService=t,this.element=i}ngOnChanges(e){var t,i,a,p;if((0,oc.get)(e,"timecodeTips"))if(this.timecodeTips&&this.baseItem)if(this.timeCodeInfo=this.timelineService.getTimeCodeInfo(this.baseItem,this.timecodeTips.currentTimeOnGraph,this.timecodeTips.hoveringItem),this.itemTitle=this.timecodeTips.detailMode?this.timecodeTips.displayCenterX===-1?"":ir(this.timecodeTips.itemTitle).trim():"",this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","timecodeTips changed: ".concat(JSON.stringify(this.timecodeTips))),this.showExactDuration&&this.timecodeTips.hoveringItem){let g=this.timecodeTips.hoveringItem,I=(t=g.durationMs)!=null?t:typeof g.duration=="number"?g.duration*1e3:0;this.exactStart=(a=(i=g.date)!=null?i:g.start)!=null?a:0,this.exactEnd=(p=g.end)!=null?p:I&&this.exactStart?this.exactStart+I:this.exactStart}else this.exactStart=void 0,this.exactEnd=void 0;else this.itemTitle="",this.timeCodeInfo={time:0,isDuration:!1},this.exactStart=void 0,this.exactEnd=void 0}ngAfterViewChecked(){this.updateUI()}updateUI(){if(!this.timecodeTips)return;let e=oe(this.element.nativeElement),t=e.node().getBoundingClientRect(),i=t.right-t.left,a=t.bottom-t.top,p=e.text();if(this.logService.printDebugInfo(this.enableDebug,this,"updateUI","domWidth: ".concat(i,", domHeight: ").concat(a),"important"),this.logService.printDebugInfo(this.enableDebug,this,"updateUI","currentHtmlText: ".concat(p)),this.timecodeTips.displayCenterX!==-1&&(!this.playheadDragging||!this.playheadDragging.isDragging)){let g=this.timecodeTips.displayCenterX-i/2,I=15,w=I-a,z={left:"".concat(g,"px"),top:"".concat(w,"px"),"border-color":this.timecodeTips.hoveringItem?this.timecodeTips.hoveringItem.color:"#b6b6b6"};this.logService.printDebugInfo(this.enableDebug,this,"updateUI","domLeft: ".concat(g,", domTop: ").concat(w)),e.style("left","".concat(g,"px")).style("top","".concat(w,"px")).style("border-color",this.timecodeTips.hoveringItem?this.timecodeTips.hoveringItem.color:"#b6b6b6")}else e.style("left","-800px")}};s(r,"\u0275fac",function(t){return new(t||r)(x(ve),x(Ze),x(ge))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-timecode-tips"]],inputs:{baseItem:"baseItem",timecodeTips:"timecodeTips",playheadDragging:"playheadDragging",showExactDuration:"showExactDuration"},standalone:!1,features:[F],decls:4,vars:4,consts:[["class","itemTitle",3,"innerHTML",4,"ngIf"],["class","timeCode",4,"ngIf"],[1,"itemTitle",3,"innerHTML"],[1,"timeCode"]],template:function(t,i){t&1&&P(0,th,2,3,"div",0)(1,ih,4,8,"div",1)(2,nh,4,8,"div",1)(3,oh,3,5,"div",1),t&2&&(c("ngIf",i.itemTitle!==""),l(),c("ngIf",!i.timeCodeInfo.isDuration),l(),c("ngIf",i.showExactDuration&&i.exactStart!==void 0&&i.exactEnd!==void 0),l(),c("ngIf",i.timeCodeInfo.isDuration&&!(i.showExactDuration&&i.exactStart!==void 0&&i.exactEnd!==void 0)))},dependencies:[R,Vt,pt,Ut],styles:["[_nghost-%COMP%]   .timeCode[_ngcontent-%COMP%]{color:#757575;font-size:1rem;font-weight:700;text-align:center}[_nghost-%COMP%]   .itemTitle[_ngcontent-%COMP%]{color:#757575;font-size:1rem;font-weight:400;line-height:1.2rem;margin-bottom:.1em}"],changeDetection:0}));let n=r;return n})();var ui=Pe(we());var sh=n=>({dragging:n});function ah(n,r){if(n&1&&(d(0,"div",3),y(1),h(2,"localizedDate"),h(3,"localizedDate"),m()),n&2){let o=u(2);
1l(),_t(" ",A(2,2,o.timeCodeInfo.time,"E")," ",A(3,5,o.timeCodeInfo.time,"mediumDate")," ")}}function lh(n,r){if(n&1&&(d(0,"div",3),y(1),h(2,"formatDuration"),m()),n&2){let o=u(2);l(),T(" ",A(2,1,o.timeCodeInfo.time,!0)," ")}}function ch(n,r){if(n&1&&(d(0,"div",1),P(1,ah,4,8,"div",2)(2,lh,3,4,"div",2),m()),n&2){let o=u();c("ngClass",N(3,sh,o.playheadDragging.isDragging)),l(),c("ngIf",!o.timeCodeInfo.isDuration),l(),c("ngIf",o.timeCodeInfo.isDuration)}}var sc=(()=>{let r=class r{constructor(e,t,i,a){s(this,"logService");s(this,"timelineService");s(this,"graphService");s(this,"element");s(this,"playhead");s(this,"playheadDragging");s(this,"nowMode");s(this,"hoverOnPlaceItem",!1);s(this,"baseItem");s(this,"enableDebug",!1);s(this,"timeCodeInfo",{time:0,isDuration:!1});this.logService=e,this.timelineService=t,this.graphService=i,this.element=a}ngOnChanges(e){(0,ui.get)(e,"playhead")&&this.playhead&&(this.timeCodeInfo=this.timelineService.getTimeCodeInfo(this.baseItem,this.baseItem.date+this.playhead.elapsedTime),this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","playhead changed, elapsedTime: ".concat(this.playhead.elapsedTime,", timeCode: ").concat(this.timeCodeInfo.time,", displayCenterX: ").concat(this.playhead.displayCenterX))),(0,ui.get)(e,"playheadDragging")&&this.playheadDragging&&(this.timeCodeInfo=this.timelineService.getTimeCodeInfo(this.baseItem,this.baseItem.date+this.playheadDragging.elapsedTime),this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","playheadDragging changed, elapsedTime: ".concat(this.playheadDragging.elapsedTime,", timeCode: ").concat(this.timeCodeInfo.time,", displayCenterX: ").concat(this.playheadDragging.displayCenterX))),(0,ui.get)(e,"nowMode")&&this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","nowMode changed, nowMode: ".concat(JSON.stringify(this.nowMode))),(0,ui.get)(e,"hoverOnPlaceItem")&&this.logService.printDebugInfo(this.enableDebug,this,"ngOnChanges","hoverOnPlaceItem changed, hoverOnPlaceItem: ".concat(String(this.hoverOnPlaceItem)))}ngAfterViewChecked(){this.updateUI()}updateUI(){var t,i;if(!this.playhead)return;let e=oe(this.element.nativeElement);if(this.playhead.elapsedTime!==-1&&this.playhead.displayCenterX!==-1){let a=e.node().getBoundingClientRect(),p=a.right-a.left,g=this.playhead.displayCenterX-p/2;this.logService.printDebugInfo(this.enableDebug,this,"updateUI","domWidth: ".concat(p,", domLeft: ").concat(g)),e.style("left","".concat(g,"px"))}else e.style("left","-300px");if((t=this.playheadDragging)!=null&&t.isDragging&&((i=this.playheadDragging)==null?void 0:i.displayCenterX)!==-1){let a=e.node().getBoundingClientRect(),p=a.right-a.left,g=this.playheadDragging.displayCenterX-p/2,I={left:"".concat(g,"px")};this.logService.printDebugInfo(this.enableDebug,this,"updateUI","dragging domWidth: ".concat(p,", domLeft: ").concat(g)),e.style("left","".concat(g,"px"))}}onMouseOver(){this.graphService.updatePlayheadHovering(!0)}onMouseLeave(){this.graphService.updatePlayheadHovering(!1)}};s(r,"\u0275fac",function(t){return new(t||r)(x(ve),x(Ze),x(ut),x(ge))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-playhead"]],hostBindings:function(t,i){t&1&&b("mouseover",function(){return i.onMouseOver()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{playhead:"playhead",playheadDragging:"playheadDragging",nowMode:"nowMode",hoverOnPlaceItem:"hoverOnPlaceItem",baseItem:"baseItem"},standalone:!1,features:[F],decls:1,vars:1,consts:[["class","elapsedTime",3,"ngClass",4,"ngIf"],[1,"elapsedTime",3,"ngClass"],["class","timeCode",4,"ngIf"],[1,"timeCode"]],template:function(t,i){t&1&&P(0,ch,3,5,"div",0),t&2&&c("ngIf",i.playhead&&i.playhead.elapsedTime!==-1||i.playheadDragging&&i.playheadDragging.elapsedTime!==-1)},dependencies:[H,R,pt,Ut],styles:["[_nghost-%COMP%]   .elapsedTime[_ngcontent-%COMP%]{background-color:transparent;color:#ffffffe6!important;cursor:grab;font-size:1rem;font-weight:700;text-align:center}[_nghost-%COMP%]   .dragging[_ngcontent-%COMP%]{cursor:grabbing}"],changeDetection:0}));let n=r;return n})();var mh=n=>({"always-show-ticks":n}),ph=(n,r,o,e)=>({"playhead-live-mode":n,"playhead-hover-on-place-item-mode":r,dragging:o,"playhead-hover":e});function hh(n,r){if(n&1&&_(0,"hz-playhead",3),n&2){let o,e=u();c("ngClass",Di(6,ph,e.nowMode&&e.nowMode.value&&e.showLiveMode,e.hoverOnPlaceItem&&(!e.nowMode||!e.nowMode.value),(o=e.playheadDragging())==null?null:o.isDragging,e.isPlayheadHovering))("playhead",e.playhead())("playheadDragging",e.playheadDragging())("baseItem",e.baseItem)("nowMode",e.nowMode)("hoverOnPlaceItem",e.hoverOnPlaceItem)}}function uh(n,r){if(n&1&&_(0,"hz-timecode-tips",4),n&2){let o=u();c("baseItem",o.baseItem)("timecodeTips",o.timecodeTips())("playheadDragging",o.playheadDragging())("showExactDuration",o.detached)}}var gi=new Map,Ot=new Set,fi=new Set,Le,ti;function gh(n){var r,o,e;return(e=(o=(r=n.borderBoxSize)==null?void 0:r[0])==null?void 0:o.inlineSize)!=null?e:n.target.getBoundingClientRect().width}function fh(n){for(let r of n){let o=gi.get(r.target);!o||gh(r)===o.laidOutWidth()||Ot.add(o)}Ot.size&&lc()}function lc(){ti===void 0&&(ti=requestAnimationFrame(Ch))}function _h(n){fi.add(n),lc()}function ac(n){try{n()}catch(r){setTimeout(()=>{throw r})}}function Ch(){ti=void 0;let n=[...fi];fi.clear();
1for(let o of n)ac(()=>{o.hasStaleWidth()&&Ot.add(o)});let r=[...Ot];Ot.clear(),r.length&&r[0].ngZone.run(()=>{for(let o of r)ac(()=>o.onResize())})}function vh(n,r){gi.set(n,r),!(typeof ResizeObserver>"u")&&(Le||(Le=new ResizeObserver(fh)),r.ngZone.runOutsideAngular(()=>Le==null?void 0:Le.observe(n)))}function yh(n){let r=gi.get(n);r&&(gi.delete(n),Ot.delete(r),fi.delete(r),Le==null||Le.unobserve(n),!Ot.size&&!fi.size&&ti!==void 0&&(cancelAnimationFrame(ti),ti=void 0),gi.size||(Le==null||Le.disconnect(),Le=void 0))}var Tn=(()=>{let r=class r{constructor(){s(this,"svg");s(this,"domainBar");s(this,"data",[]);s(this,"prevData",{});s(this,"currentData",{});s(this,"selection");s(this,"elementEnter");s(this,"tooltip");s(this,"currentTime",0);s(this,"windowResized",!1);s(this,"isBaseItemUpdated",!1);s(this,"isDomainUpdated",!1);s(this,"isWidthUpdated",!1);s(this,"prevDomainX0",NaN);s(this,"prevDomainX1",NaN);s(this,"prevWidth",NaN);s(this,"hostWidth",NaN);s(this,"resizeEntry");s(this,"width",0);s(this,"height",0);s(this,"xScale");s(this,"yScale");s(this,"xAxis");s(this,"yAxis");s(this,"margin",{top:15,right:5,bottom:0,left:20});s(this,"baseItem");s(this,"duration");s(this,"items");s(this,"position");s(this,"hoverItem");s(this,"liveMode");s(this,"nowMode");s(this,"currentItem");s(this,"liveClockTick");s(this,"maxScore",10);s(this,"totalScore",0);s(this,"playerState");s(this,"hoverOnPlaceItem",!1);s(this,"detached",!1);s(this,"itemHoverEffectType");s(this,"itemHoverEffectScale");s(this,"itemHoverEffectBorderWidth");s(this,"enableGraphScaleEffect");s(this,"graphItemScalePercentageAtNormalState");s(this,"graphItemDurationLineScalePercentageAtNormalState");s(this,"showEntireEventProgressBar");s(this,"progressBarColor");s(this,"progressBarOpacity");s(this,"playheadColor");s(this,"isPlayheadHovering",!1);s(this,"timecodeTipsBarColor");s(this,"timecodeTipsBarOpacity");s(this,"activeItemProgressRingBackgroundColor");s(this,"activeItemProgressRingStepColor");s(this,"activeItemProgressRingWidth");s(this,"alwaysShowTicks");s(this,"tickInterval");s(this,"showNowMarker");s(this,"playheadDraggingInput");s(this,"graphCurrentPositionChanged",new E);s(this,"graphNowModeChanged",new E);s(this,"graphFocusItem",new E);s(this,"graphCurrentItemChanged",new E);s(this,"isNoDateEvent",!1);s(this,"timecodeTips",Y(null));s(this,"playhead",Y({displayCenterX:-1,elapsedTime:-1}));s(this,"playheadDragging",Y({startDraggingTime:0,deltaPosX:0,displayCenterX:-1,elapsedTime:-1,isDragging:!1,draggingTimeOnGraph:-1}));s(this,"enableDebug",!1);s(this,"prevItems");s(this,"maxPosXOfDomainBar",0);s(this,"isItemsUpdated",!1);s(this,"injector",M(bi));s(this,"logger",M(ve));s(this,"element",M(ge));s(this,"timelineService",M(Ze));s(this,"graphService",M(ut));s(this,"itemsService",M(ye));s(this,"playerService",M(Xa));s(this,"iconService",M(mn));s(this,"store",M(D));s(this,"filterLanguagesPipe",M(dn));s(this,"ngZone",M(wi));s(this,"clockTickService",M(tc));s(this,"destroyed",!1);s(this,"nowMarkerTickSub");s(this,"HOUR",3600*1e3);s(this,"DAY",this.HOUR*24);s(this,"MONTH",this.DAY*30);s(this,"YEAR",this.MONTH*12);s(this,"customTickFormat");s(this,"minX");s(this,"maxX");s(this,"isFirstTick");s(this,"storeTimecodeTips",O(this.store.select(La),{initialValue:null}));s(this,"storePlayhead",O(this.store.select(Va),{initialValue:{displayCenterX:-1,elapsedTime:-1}}));s(this,"storePlayheadDragging",O(this.store.select(pi),{initialValue:{startDraggingTime:0,deltaPosX:0,displayCenterX:-1,elapsedTime:-1,isDragging:!1,draggingTimeOnGraph:-1}}));s(this,"initialPlayhead",{displayCenterX:-1,elapsedTime:-1});s(this,"initialPlayheadDragging",{startDraggingTime:0,deltaPosX:0,displayCenterX:-1,elapsedTime:-1,isDragging:!1,draggingTimeOnGraph:-1});s(this,"localTimecodeTips",Y(null));s(this,"localPlayhead",Y(this.initialPlayhead));s(this,"localPlayheadDragging",Y(this.initialPlayheadDragging));s(this,"localPlayheadHovering",!1);this.updateDetachedSources(),this.graphNowModeChanged.emit(!1),ie(()=>{this.detached||(this.timecodeTips.set(this.storeTimecodeTips()),this.playhead.set(this.storePlayhead()),this.playheadDragging.set(this.storePlayheadDragging()))}),ie(()=>{this.detached&&(this.timecodeTips.set(this.localTimecodeTips()),this.playhead.set(this.localPlayhead()),this.playheadDragging.set(this.localPlayheadDragging()))});let e=Ge("00:00"),t=Ge(".%L"),i=Ge(":%S"),a=Ge("%I:%M %p"),p=Ge("%M:%S"),g=Ge("%I:%M %p"),I=Ge("%b %d"),w=Ge("%b %d"),z=Ge("%b"),L=Ge("%Y");this.customTickFormat=(B,q)=>{let ee=()=>this.isFirstTick&&this.isNoDateEvent&&!this.baseItem.isNotificationPage;return(B.getTime()-B.getTimezoneOffset()*60*1e3)/1e3<1e3?p(B):(this.isNoDateEvent&&(this.isFirstTick=!1),(ee()?e:pa(B)<B?t:ha(B)<B?i:ua(B)<B?a:ga(B)<B?g:pn(B)<B?fa(B)<B?I:w:_a(B)<B?z:L)(B))}}runIfAttached(e){this.detached||e()}emitTimecodeTips(e){this.detached?this.localTimecodeTips.set(e):this.graphService.updateTimecodeTips(e)}emitPlayhead(e){this.detached?this.localPlayhead.set(e):this.graphService.updatePlayhead(e)}emitPlayheadDragging(e){this.detached?this.localPlayheadDragging.set(e):this.graphService.updatePlayHeadDragging(e)}emitPlayheadHovering(e){this.detached?(this.localPlayheadHovering=e,this.isPlayheadHovering=e,this.updatePlayheadIndicatorHovering()):this.graphService.updatePlayheadHovering(e)}
1resetLocalPlayheadState(){this.localTimecodeTips.set(null),this.localPlayhead.set(this.initialPlayhead),this.localPlayheadDragging.set(this.initialPlayheadDragging),this.localPlayheadHovering=!1,this.isPlayheadHovering=!1}updateDetachedSources(){this.detached?(this.resetLocalPlayheadState(),this.timecodeTips.set(this.localTimecodeTips()),this.playhead.set(this.localPlayhead()),this.playheadDragging.set(this.localPlayheadDragging())):(this.timecodeTips.set(this.storeTimecodeTips()),this.playhead.set(this.storePlayhead()),this.playheadDragging.set(this.storePlayheadDragging()))}get detachedPlayheadDragging(){return this.localPlayheadDragging()}get detachedPlayheadHovering(){return this.localPlayheadHovering}ngOnInit(){this.logger.printDebugInfo(this.enableDebug,this,"ngOnInit")}ngOnChanges(e){var t,i;if((0,Z.get)(e,"detached")&&this.updateDetachedSources(),(0,Z.get)(e,"baseItem")&&this.baseItem&&(this.isNoDateEvent=this.baseItem.isHazu&&this.baseItem.date===0||this.baseItem.isNotification||this.baseItem.isNotificationPage,this.data&&(this.isBaseItemUpdated=!0,this.updateChart())),(0,Z.get)(e,"items")){this.logger.printDebugInfo(this.enableDebug,this,"ngOnChanges","items changed >>>>>");let a=(0,Z.get)(e,"items").currentValue;this.itemsService.isItemsChanged((t=this.prevItems)!=null?t:[],a,["title","color","icon","priority","parentId","type","isPlaced","date","duration","text","dateCreated","order","totalScore"])&&(this.prevItems=(0,Z.cloneDeep)(a),this.emitTimecodeTips({currentTimeOnGraph:-1,itemTitle:"",displayCenterX:-1,hoveringItem:null,detailMode:!1}),this.emitPlayhead({displayCenterX:-1,elapsedTime:-1}),this.emitPlayheadHovering(!1),this.items&&this.processData(this.items),this.hoverItem&&this.updateHoverTimecode(this.hoverItem),this.isItemsUpdated=!0,this.setDimensions(),(i=this.nowMode)!=null&&i.value&&this.showLiveMode?this.updateLiveMode():this.updateChart())}if(this.items&&((0,Z.get)(e,"maxScore")||(0,Z.get)(e,"totalScore"))&&(this.processData(this.items),this.updateChart()),(0,Z.get)(e,"position")&&this.position&&this.setCurrentTime(this.position.getTime()),(0,Z.get)(e,"hoverItem")&&this.baseItem&&this.svg&&this.hoverItem&&this.updateHoverTimecode(this.hoverItem),(0,Z.get)(e,"liveMode")&&(this.updateLiveMode(),this.updatePlayheadIndicatorStyle()),(0,Z.get)(e,"nowMode")&&(this.updateChartNowMode(),this.updatePlayheadIndicatorStyle()),(0,Z.get)(e,"liveClockTick")&&this.updateLiveMode(),(0,Z.get)(e,"duration")&&this.updateChart(),(0,Z.get)(e,"hoverOnPlaceItem")&&this.updatePlayheadIndicatorStyle(),(0,Z.get)(e,"playheadDragging")&&this.playheadDragging()){let a=this.playheadDragging();a.isDragging&&a.draggingTimeOnGraph!==-1&&this.setCurrentTime(a.draggingTimeOnGraph)}(0,Z.get)(e,"isPlayheadHovering")&&this.updatePlayheadIndicatorHovering(),(0,Z.get)(e,"showNowMarker")&&this.updateNowMarkerTickSubscription()}updateChart(){this.setup(),this.draw()}onResize(){this.updateDimensions()}updateDimensions(){var a;let e=this.baseItem.startWithStreamOffset,t=!!((a=this.nowMode)!=null&&a.value),i=t?-1:this.currentTime-e;this.emitPlayhead({displayCenterX:-1,elapsedTime:i}),this.setDimensions(),this.windowResized=!0,this.updateChart()}ngAfterViewInit(){this.setupMouseDrag(),this.observeHostResize(),this.updateDimensions(),this.updateNowMarkerTickSubscription()}observeHostResize(){let e=this.element.nativeElement;this.resizeEntry={laidOutWidth:()=>this.hostWidth,hasStaleWidth:()=>!this.destroyed&&e.getBoundingClientRect().width!==this.hostWidth,ngZone:this.ngZone,onResize:()=>{this.destroyed||this.updateDimensions()}},vh(e,this.resizeEntry)}updateNowMarkerTickSubscription(){this.showNowMarker&&!this.nowMarkerTickSub?this.nowMarkerTickSub=this.clockTickService.tick$.subscribe(()=>this.drawNowMarker()):!this.showNowMarker&&this.nowMarkerTickSub&&(this.nowMarkerTickSub.unsubscribe(),this.nowMarkerTickSub=void 0)}ngOnDestroy(){var e;this.destroyed=!0,yh(this.element.nativeElement),this.resizeEntry=void 0,(e=this.nowMarkerTickSub)==null||e.unsubscribe(),this.nowMarkerTickSub=void 0}processData(e){this.isItemsUpdated=!1,this.prevData=(0,Z.keyBy)(this.data,"id"),this.data=[...e.map(t=>t.clone())].sort((t,i)=>t.priority!==i.priority?i.priority-t.priority:t.date-i.date),this.currentData=(0,Z.keyBy)(this.data,"id")}xValue(e){return(e.isNotification?e.dateCreated:e.date)||0}
1xValueForMax(e){let t=e.durationMs,i=t!==0?e.end:0;return i!=null?i:0}xMinValueOfBaseItem(){return this.baseItem?this.baseItem.startWithStreamOffset:new Date().getTime()}xMaxValueOfBaseItem(){return this.baseItem&&this.duration?this.timelineService.getEnd(this.baseItem):new Date().getTime()}get showLiveMode(){var e;return(e=this.baseItem)==null?void 0:e.showLiveMode}getDetachedDomainFromItems(){var g;if(!this.detached)return null;let e=((g=this.data)!=null?g:[]).filter(I=>this.xValue(I)>0);if(!e.length)return null;let t=li(e,I=>this.xValue(I)),i=ai(e,I=>Math.max(this.xValue(I),this.xValueForMax(I)));if(t===void 0||i===void 0)return null;let a=28*this.DAY,p=35*this.DAY;if(i-t<a){let I=(t+i)/2;return[I-p/2,I+p/2]}return[t,i]}yValue(e){return 0}cValue(e){return e.color}xMap(e){return this.xScale?this.xScale(this.xValue(e)):0}yMap(e){return this.yScale?this.yScale(this.yValue(e)):0}setDimensions(){var i;let e=oe(this.element.nativeElement),t=(i=e.node())==null?void 0:i.getBoundingClientRect();!e||!t||(this.hostWidth=t.width,this.width=t.width-this.margin.left-this.margin.right,this.height=60-this.margin.top-this.margin.bottom,Object.is(this.width,this.prevWidth)||(this.prevWidth=this.width,this.isWidthUpdated=!0),this.verifyWidthAfterLayout())}verifyWidthAfterLayout(){let e=this.resizeEntry;!e||this.destroyed||this.ngZone.runOutsideAngular(()=>_h(e))}setScales(e=null){var t,i;if(this.minX=1,this.maxX=1,this.isFirstTick=!0,this.baseItem&&(this.baseItem.type==="user"||this.isNoDateEvent)&&(!this.baseItem.duration||this.baseItem.date||this.baseItem.dateCreated)?(this.minX=(t=li(this.data,this.xValue))!=null?t:1,this.maxX=(i=ai(this.data,this.isNoDateEvent?this.xValue:this.xValueForMax))!=null?i:100,this.baseItem.end&&(this.maxX=this.baseItem.end)):(this.minX=this.xMinValueOfBaseItem(),this.maxX=this.xMaxValueOfBaseItem()),e&&([this.minX,this.maxX]=e),this.isNoDateEvent){let a=vl(0,"XXX"),p=parseInt(a)*3600*1e3;p=a.charAt(0)==="+"?-p:p,this.minX+=p,this.maxX+=p}this.xScale=Ca().rangeRound([0,this.width-this.margin.left-this.margin.right]).domain([new Date(this.minX),new Date(this.maxX)]).clamp(!0),this.yScale=ma().range([this.height-this.margin.top,0])}setAxes(){if(this.xAxis&&this.svg){this.xAxis.ticks(this.tickInterval==="monthly"?pn.every(1):5),this.xAxis.scale(this.xScale),this.svg.selectAll("g.x.axis").call(this.xAxis),da("g.tick").each((e,t,i)=>{let a=oe(i[t]),p=a.attr("transform"),g=p.replace(",0",",-48"),I=a.select("line"),w=a.select("text");a.attr("transform",g),w.attr("y","15").attr("color","#949495"),I.attr("x1","0").attr("stroke","#949495").attr("x2","0").attr("y1","28").attr("y2","35")});return}this.xAxis=ca(this.xScale).tickSize(15).tickPadding(5).tickSizeOuter(0).ticks(this.tickInterval==="monthly"?pn.every(1):5).tickFormat(this.customTickFormat),this.svg&&this.svg.append("g").attr("class","x axis").attr("transform","translate(0, ".concat(this.margin.top,")")).call(this.xAxis).on("click",e=>{let[t]=Be(e);if(!this.xScale)return;let i=this.xScale.invert(t).getTime(),a=!1;this.baseItem.isLiveEvent&&this.liveClockTick&&i>this.liveClockTick&&(i=this.liveClockTick,a=!0),this.graphNowModeChanged.emit(a),this.graphCurrentPositionChanged.emit(new Date(i))})}setDomainX(e,t){if(!this.xScale)return;let i=e-1,a=t+1;this.xScale.domain([i,a]),(!Object.is(i,this.prevDomainX0)||!Object.is(a,this.prevDomainX1))&&(this.prevDomainX0=i,this.prevDomainX1=a,this.isDomainUpdated=!0)}setDomainY(e,t){var i;(i=this.yScale)==null||i.domain([e-1,t+1])}setup(){var t;let e=this.getDetachedDomainFromItems();this.svg?(this.setScales(e),this.setAxes()):(this.svg=oe(this.element.nativeElement).select(".chart-view").html("").append("svg").attr("width","100%").attr("height","100%").append("g").attr("transform","translate(".concat(this.margin.left,",").concat(this.margin.top+7,")")),this.setDimensions(),this.tooltip=oe("#tooltip").style("opacity",0),this.setScales(e),this.setAxes(),this.domainBar=this.svg.select("path.domain"),this.applyMouseEvents(this.domainBar)),!(!this.xValue||!this.yValue)&&(e?this.setDomainX(e[0],e[1]):(t=this.baseItem)!=null&&t.isHazu&&(!this.isNoDateEvent||this.baseItem.duration)?this.setDomainX(this.xMinValueOfBaseItem(),this.xMaxValueOfBaseItem()):this.setDomainX(li(this.data,this.xValue),ai(this.data,this.xValue)),this.setDomainY(li(this.data,this.yValue),ai(this.data,this.yValue)))}applyMouseEvents(e){e.on("mouseover",t=>{t.stopPropagation();let[i]=Be(t);this.updateTimecodeTipsByX(i,null,!0,!1)}).on("mousemove",t=>{let[i]=Be(t);this.updateTimecodeTipsByX(i,null,!0,!1)}).on("mouseout",t=>{t.stopPropagation(),this.updateTimecodeTipsByX(-1,null,!1,!1)})}draw(){this.logger.printDebugInfo(this.enableDebug,this,"draw","re-draw chart component","important"),this.showEntireEventProgressBar&&this.baseItem.startWithStreamOffset>0&&this.duration&&this.duration>0&&!this.liveMode&&this.drawProgressBar(),this.drawTimecodeTipsAndPlayhead(),this.drawItems(),this.drawTimecodeTipsItemHighlightBar(),this.drawNowMarker(),this.enableGraphScaleEffect&&this.updateGraphScale(!0),this.svg&&this.svg.on("mouseleave.detached",()=>this.handleMouseLeave()),this.maxPosXOfDomainBar=oe(this.element.nativeElement).select("path.domain").node().getBoundingClientRect().width+this.margin.left}drawItems(){var t;if(!this.svg)return;this.elementEnter=null;let e=this.liveMode||this.windowResized||this.isNoDateEvent||this.isBaseItemUpdated||this.isDomainUpdated||this.isWidthUpdated;this.selection=null,this.selection=this.svg.selectAll(".item").data(this.data,i=>i.key),this.selection.filter((i,a)=>!(this.prevData[i.id]&&i.isSameItem(this.prevData[i.id],["date"]))||e).attr("transform",i=>{let a="translate("+this.xMap(i)+","+this.yMap(i)+")";return this.logger.printDebugInfo(this.enableDebug,this,"drawItems --> transform","title: ".concat(i.title,", translateStyle: ").concat(a)),a}),this.elementEnter=this.selection.enter().append("g").attr("class","item").attr("transform",i=>"translate(".concat(this.xMap(i),", ").concat(this.yMap(i),")")).append("g").attr("class","child"),this.selection.exit().remove(),this.selection=this.selection.filter((i,a)=>!(this.prevData[i.id]&&i.isSameItem(this.prevData[i.id],["title","color","icon","priority","type","date","duration","dateCreated","totalScore"]))||e),this.selection=this.elementEnter.merge(this.selection),this.windowResized=!1,this.isBaseItemUpdated=!1,this.isDomainUpdated=!1,this.isWidthUpdated=!1,(t=this.data)!=null&&t.length&&new On(this,{activeItemProgressRingBackgroun
1dColor:this.activeItemProgressRingBackgroundColor,activeItemProgressRingStepColor:this.activeItemProgressRingStepColor,activeItemProgressRingWidth:this.activeItemProgressRingWidth},this.logger,this.iconService).draw(this.liveClockTick)}drawProgressBar(){var t,i,a,p;let e=oe("svg .progress-bar");if(this.svg&&!(e!=null&&e.node())){let g=this.svg.append("line").attr("class","progress-bar").attr("y1","30").attr("x1","0").attr("y2","30").attr("x2","0").attr("transform","translate(0,-15)").style("opacity",this.progressBarOpacity?this.progressBarOpacity:"0.4").style("stroke",this.progressBarColor?this.progressBarColor:"#616161").on("click",I=>{I.stopPropagation();let[w]=Be(I),z=this.xScale.invert(w);this.graphNowModeChanged.emit(!1),this.graphCurrentPositionChanged.emit(new Date(z))});this.applyMouseEvents(g)}this.updateProgressBar(((i=(t=this.nowMode)==null?void 0:t.value)!=null?i:!1)&&((p=(a=this.nowMode)==null?void 0:a.byUser)!=null?p:!1))}drawTimecodeTipsAndPlayhead(){var t,i;if(!this.svg)return;let e=this.svg.select(".timecode-tips-bar");if(!(e!=null&&e.node())){let a=this.svg.append("line").attr("class","timecode-tips-bar").attr("y1","30").attr("x1","0").attr("y2","30").attr("x2","0").attr("transform","translate(0,-15)").style("stroke",this.timecodeTipsBarColor?this.timecodeTipsBarColor:"#616161").style("opacity",this.timecodeTipsBarOpacity?this.timecodeTipsBarOpacity:"0.45").on("click",g=>{g.stopPropagation();let[I]=Be(g),w=this.baseItem.startWithStreamOffset,z=this.xScale.invert(I).getTime();this.logger.printDebugInfo(this.enableDebug,this,"drawTimecodeTipsAndPlayhead","timecode-tips-bar click event handler, eventStartTime: ".concat(w,", x: ").concat(I,", currentPlayingTime: ").concat(z)),this.graphNowModeChanged.emit(!1),this.graphCurrentPositionChanged.emit(new Date(z))});this.applyMouseEvents(a),this.svg.append("line").attr("class","playhead-indicator").attr("y1","30").attr("x1","0").attr("y2","30").attr("x2","0").attr("transform","translate(0,-20)").style("stroke",this.playheadColor?this.playheadColor:"#616161").on("mouseover",g=>{g.stopPropagation(),this.emitPlayheadHovering(!0)}).on("mouseout",g=>{g.stopPropagation(),this.emitPlayheadHovering(!1)});let p=this.svg.append("line").attr("class","timecode-tips-bar-indicator").attr("y1","30").attr("x1","0").attr("y2","30").attr("x2","0").attr("transform","translate(0,-20)").style("stroke",this.timecodeTipsBarColor?this.timecodeTipsBarColor:"#616161").style("opacity",this.timecodeTipsBarOpacity?this.timecodeTipsBarOpacity:"0.45").on("click",g=>{g.stopPropagation();let[I]=Be(g),w=this.baseItem.startWithStreamOffset,z=this.xScale.invert(I);this.logger.printDebugInfo(this.enableDebug,this,"drawTimecodeTipsAndPlayhead","timecode-tips-bar-indicator click event handler, eventStartTime: ".concat(w,", x: ").concat(I,", currentPlayingTime: ").concat(String(z))),this.graphNowModeChanged.emit(!1),this.graphCurrentPositionChanged.emit(new Date(z))});this.applyMouseEvents(p)}this.updatePlayhead((i=(t=this.nowMode)==null?void 0:t.value)!=null?i:!1),this.updatePlayheadIndicatorStyle()}drawNowMarker(){if(!this.svg)return;let e=this.svg.select("g.now-marker");if(!this.showNowMarker||!this.xScale){e.remove();return}let t=Date.now(),[i,a]=this.xScale.domain();if(!i||!a||t<i.getTime()||t>a.getTime()){e.remove();return}let p=this.xScale(new Date(t));if(isNaN(p)){e.remove();return}let g=e,I=!g.node();I&&(g=this.svg.append("g").attr("class","now-marker").attr("pointer-events","none"),g.append("line").attr("class","now-marker-line"),g.append("circle").attr("class","now-marker-cap").attr("r",2.5)),(I||this.elementEnter&&!this.elementEnter.empty())&&g.raise(),g.select("line.now-marker-line").attr("x1",p).attr("x2",p).attr("y1",0).attr("y2",30),g.select("circle.now-marker-cap").attr("cx",p).attr("cy",0)}drawTimecodeTipsItemHighlightBar(){if(!this.svg)return;let e=this.svg.select(".timecode-tips-item-highlight-bar");e!=null&&e.node()||this.svg.append("line").attr("class","timecode-tips-item-highlight-bar").attr("y1",0).attr("y2",0).attr("x1",0).attr("x2",0).attr("transform","translate(0,15)").attr("pointer-events","none").style("stroke","transparent").on("mouseover",t=>{if(t.stopPropagation(),!this.domainBar)return;let[i]=Be(this.domainBar.node());this.updateTimecodeTipsByX(i,null,!0,!1)}).on("mousemove",t=>{if(!this.domainBar)return;let[i]=Be(this.domainBar.node());this.updateTimecodeTipsByX(i,null,!0,!1)}).on("mouseout",t=>{this.domainBar&&(t.stopPropagation(),this.updateTimecodeTipsByX(-1,null,!1,!1))})}getIconRadius(e){return 5+e.priority*.9}setCurrentTime(e){var i;this.currentTime=e;let t=this.duration&&this.duration>0&&!this.liveMode;this.showEntireEventProgressBar&&t&&this.updateProgressBar(!1),(i=this.playheadDragging())!=null&&i.isDragging||this.updatePlayhead(this.nowMode?this.nowMode.value:!1),t&&this.updateActiveItemProgressRing(this.currentTime)}itemClick(e){this.detached||(this.baseItem.isNotificationPage?this.graphFocusItem.emit(e.id):this.baseItem.hasVideo?(this.graphNowModeChanged.emit(!1),this.graphCurrentPositionChanged.emit(new Date(e.date)),this.store.dispatch(ci.focusItemAction(ot,e.id)),this.store.dispatch(ci.focusItemAction(an,e.id)),this.store.dispatch(ci.activateItem(ot,e))):e.isHazu?this.store.dispatch(lr(e.link)):this.store.dispatch(ci.focusItemAction(ot,e.id)))}updateGraphScale(e){if(!this.svg)return;let t=200,i=this.graphItemScalePercentageAtNormalState&&!isNaN(parseInt(this.graphItemScalePercentageAtNormalState,10))?(parseInt(this.graphItemScalePercentageAtNormalState,10)*.01).toString():"0.8",a=this.graphItemDurationLineScalePercentageAtNormalState&&!isNaN(parseInt(this.graphItemDurationLineScalePercentageAtNormalState,10))?(parseInt(this.graphItemDurationLineScalePercentageAtNormalState,10)*.01).toString():"0.5",p=this.svg.selectAll("g.itemIcon"),g=this.svg.selectAll("line.line");p.each(function(I){let w=oe(this),z=w.classed("active-item");e&&!z?w.transition().duration(t).style("transform","scale( ".concat(i,", ").concat(i," )")):w.transition().duration(t).style("transform",0)}),g.each(function(I){e?oe(this).transition().duration(t).style("transform","scale( 1, ".concat(a," )")):oe(this).transition().duration(t).style("transform",0)})}updateProgressBar(e){if(!this.svg)return;let t=e?0:this.xScale(new Date(this.currentTime));this.logger.printDebugInfo(this.enableDebug,this,"updateProgressBar","x: ".concat(t)),!(isNaN(t)||t<0)&&this.svg.select(".progress-bar").attr("x2",t)}updateActiveItemProgressRing(e){if(!this.svg)return;let t=this;this.svg.selectAll("g.progress-ring").each(function(){let a=oe(this),p=a.select(".progress-ring-background"),g=parseInt(p.attr("start-time"),10),I=parseInt(p.attr("end-time"),10),w=parseInt(p.attr("circumference"),10);if(t.currentTime>=g&&t.currentTime<=I){let z=(t.currentTime-g)/(I-g),L="-".concat(parseFloat((w*z).toString()).toFixed(3).toString());a.style("display","block"),p.attr("stroke-dashoffset",L),oe(a.node().parentNode).classed("active-item",!0),oe(a.node().parentNode).style("transform",0),t.logger.printDebugInfo(t.enableDebug,t,"updateActiveItemProgressRing","startTime: ".concat(g,", endTime: ").concat(I,", currentTime: ").concat(t.currentTime,", playingPercent: ").concat(z,", newOffset: ").concat(L))}else a.style("display","none"),oe(a.node().parentNode).classed("active-item",!1)})}updateLiveMode(){var e;this.liveMode&&this.baseItem&&(this.logger.printDebugInfo(this.enableDebug,this,"updateLiveMode","refreshing per second"),(e=this.nowMode)!=null&&e.value&&this.updateProgressBar(!0),this.updateChart())}updateChartNowMode(){var e;!((e=this.nowMode)!=null&&e.value)||!this.showLiveMode||(this.currentTime=new Date().getTime(),this.updatePlayhead(!0),this.updateLiveMode())}extendPrevItem(){if(!this.position)return;let e=this.position.getTime(),t=new Date(e),i=(0,Z.findLast)(this.items,a=>t.getTime()>Math.floor(a.start));if(i){let a=e-i.start;this.runIfAttached(()=>this.graphService.changeItemDuration(i,a))}}setItemDate(){if(!this.position)return;let e=this.position.getTime(),t=new Date(e),i=(0,Z.findLast)(this.items,a=>t.getTime()>Math.floor(a.start));(!i||i.start+i.duration*1e3<e)&&(i=(0,Z.find)(this.items,a=>t.getTime()<Math.floor(a.start))),i&&this.runIfAttached(()=>this.graphService.changeItemDate(i,e))}updateHoverTimecode(e){let t=e&&(e.key===this.baseItem.key||e.isNew)?null:e,i=t?this.currentData[t.id]:null,a=i?this.xMap(i):-1;this.updateTimecodeTipsByX(a,i,!1,!0)}updateTimecodeTipsByX(e,t,i,a){let p=e,g=-1,I="",w=-1,z=0,L=0,B=0,q=0,ee=t;if(e!==-1&&!this.liveMode){let de=new Date(this.xScale.invert(e));g=de.getTime(),g=isNaN(g)?-1:g,!t&&i&&(this.baseItem.isNotificationPage||(ee=(0,Z.find)(this.items,tt=>tt.isActive(de)))),(ee||this.baseItem.hasVideo)&&(z=e-1,L=e+1,w=e+this.margin.left),ee&&(I=this.filterLanguagesPipe.transform(ee.title),B=this.xMap(ee)+5,q=e,q<=B&&(B=0,q=0))}else e=0;
1this.emitTimecodeTips({currentTimeOnGraph:g,itemTitle:I,displayCenterX:w,hoveringItem:ee,detailMode:!a}),this.updateTimecodeTipsBar(e),this.updateTimecodeTipsBarIndicator(z,L,ee),this.updateTimecodeTipsHighlightBar(B,q,ee),this.detached&&p===-1&&(this.emitPlayhead(this.initialPlayhead),this.emitPlayheadDragging(this.initialPlayheadDragging),this.emitPlayheadHovering(!1),this.updatePlayheadIndicator(0,0))}updateTimecodeTipsBar(e){var t;(t=this.playheadDragging())!=null&&t.isDragging||!this.svg||this.svg.select(".timecode-tips-bar").attr("x2",e)}updateTimecodeTipsBarIndicator(e,t,i){var a;(a=this.playheadDragging())!=null&&a.isDragging||!this.svg||this.svg.select(".timecode-tips-bar-indicator").attr("x1",e).attr("x2",t).attr("y1",i?"25":"30").attr("y2",i?"25":"30").style("stroke",i?i.color:this.timecodeTipsBarColor?this.timecodeTipsBarColor:"#616161").style("opacity",i?"1":this.timecodeTipsBarOpacity?this.timecodeTipsBarOpacity:"0.45").classed("timecode-tips-bar-indicator-inside-item",!!i)}updatePlayhead(e){var I;if(!this.svg)return;e&&this.baseItem.duration>0&&this.showLiveMode&&(this.currentTime=(I=this.liveClockTick)!=null?I:0);let t=this.baseItem.startWithStreamOffset,i=e&&this.showLiveMode?this.liveClockTick-t:this.currentTime-t,a=e&&this.baseItem.duration<=0?oe(this.element.nativeElement).select("path.domain").node().getBBox().width+this.margin.left:this.xScale(new Date(this.currentTime))+this.margin.left,p=a,g=p-this.margin.left;a>0?(this.emitPlayhead({displayCenterX:p,elapsedTime:i}),g===0?(this.emitPlayhead({displayCenterX:-1,elapsedTime:-1}),this.updatePlayheadIndicator(0,0)):this.updatePlayheadIndicator(g-1,g+1)):(this.emitPlayhead({displayCenterX:-1,elapsedTime:-1}),this.updatePlayheadIndicator(0,0)),this.updateProgressBar(e)}updatePlayheadIndicator(e,t){this.logger.printDebugInfo(this.enableDebug,this,"updatePlayheadIndicator","posX1: ".concat(e,", posX2: ").concat(t)),this.svg.select(".playhead-indicator").attr("x1","".concat(e)).attr("x2","".concat(t))}updatePlayheadIndicatorStyle(){this.svg&&this.svg.select(".playhead-indicator").style("display",this.baseItem.isSetDate?"block":"none").style("stroke",()=>{var t;let e=this.playheadColor?this.playheadColor:"#616161";return(t=this.nowMode)!=null&&t.value&&this.showLiveMode?e="#d85030":this.hoverOnPlaceItem&&(e="#1678c2"),this.logger.printDebugInfo(this.enableDebug,this,"updatePlayheadIndicatorStyle","color: ".concat(e)),e})}updateTimecodeTipsHighlightBar(e,t,i){var a;(a=this.playheadDragging())!=null&&a.isDragging||!this.svg||this.svg.select(".timecode-tips-item-highlight-bar").attr("x1","".concat(e)).attr("x2","".concat(t)).style("stroke",i?i.color:"transparent")}setupMouseDrag(){this.logger.printDebugInfo(this.enableDebug,this,"setupMouseDrag","","important");let e=document,t=ue(e,"mousedown"),i=ue(e,"mousemove"),a=ue(e,"mouseup"),p=t.pipe(Ii(g=>{let I=oe(g.target),w=I.node().nodeName,z=w==="PLAYHEAD"||I.classed("elapsedTime"),L=z||w==="line"||w==="circle",B=0,q=this.currentTime,ee=0;return L&&(B=g.x,z||(ee=g.pageX-this.domainBar.node().getBoundingClientRect().left,q=this.xScale.invert(ee).getTime()),this.logger.printDebugInfo(this.enableDebug,this,"dragging - mouseDown$","ReadyToDrag -- startX: ".concat(B,", eventPosXOnDomainBar: ").concat(ee,", startChartDraggingTime: ").concat(q),"important")),i.pipe(ni(de=>L)).pipe(te(de=>(L&&de.preventDefault(),{isHappenInDraggableArea:L,startDraggingTime:q,deltaX:de.x-B}))).pipe(To(a.pipe(Eo(this.store.select(pi),(de,tt)=>({mouseUpEvent:de,latestPlayheadDragging:tt}))).pipe(zo(de=>{de.latestPlayheadDragging.isDragging&&(this.logger.printDebugInfo(this.enableDebug,this,"dragging - mouseUp$","stopDragging","important"),this.dragPlayhead(de.latestPlayheadDragging.startDraggingTime,de.latestPlayheadDragging.deltaPosX,!0))}))))}));ie(g=>{let I=p.subscribe(w=>{w.isHappenInDraggableArea&&(this.updateTimecodeTipsBarIndicator(0,0,null),this.updateTimecodeTipsBar(0),this.updateTimecodeTipsHighlightBar(0,0,null),this.dragPlayhead(w.startDraggingTime,w.deltaX))});g(()=>I.unsubscribe())},{injector:this.injector})}dragPlayhead(e,t,i){if(!this.svg||!this.xScale)return;let a=this.baseItem.startWithStreamOffset,p=this.xScale(new Date(e)),g=p+t,I=this.xScale.invert(g).getTime(),w=I-a,z=g+this.margin.left,L=z,B=L-this.margin.left;if(z>=this.margin.left&&z<=this.maxPosXOfDomainBar&&w>=0){let q=!i;this.emitPlayheadDragging({startDraggingTime:e,deltaPosX:t,displayCenterX:L,elapsedTime:w,isDragging:q,draggingTimeOnGra
1ph:q?I:-1}),this.updatePlayheadIndicator(B-1,B+1),this.baseItem.videoId&&!this.detached&&this.playerService.seekTo(Math.round(w/1e3),!1),i&&this.runIfAttached(()=>this.graphService.startMoveToPosition(new Date(I)))}}updatePlayheadIndicatorHovering(){this.svg&&this.svg.select(".playhead-indicator").classed("playhead-indicator-hover",this.isPlayheadHovering)}handleMouseLeave(){this.updateTimecodeTipsByX(-1,null,!1,!1),this.emitPlayhead(this.initialPlayhead),this.emitPlayheadDragging(this.initialPlayheadDragging),this.emitPlayheadHovering(!1),this.updatePlayheadIndicator(0,0)}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-chart"]],hostBindings:function(t,i){t&1&&b("resize",function(){return i.onResize()},ko)},inputs:{baseItem:"baseItem",duration:"duration",items:"items",position:"position",hoverItem:"hoverItem",liveMode:"liveMode",nowMode:"nowMode",currentItem:"currentItem",liveClockTick:"liveClockTick",maxScore:"maxScore",totalScore:"totalScore",playerState:"playerState",hoverOnPlaceItem:"hoverOnPlaceItem",detached:"detached",itemHoverEffectType:"itemHoverEffectType",itemHoverEffectScale:"itemHoverEffectScale",itemHoverEffectBorderWidth:"itemHoverEffectBorderWidth",enableGraphScaleEffect:"enableGraphScaleEffect",graphItemScalePercentageAtNormalState:"graphItemScalePercentageAtNormalState",graphItemDurationLineScalePercentageAtNormalState:"graphItemDurationLineScalePercentageAtNormalState",showEntireEventProgressBar:"showEntireEventProgressBar",progressBarColor:"progressBarColor",progressBarOpacity:"progressBarOpacity",playheadColor:"playheadColor",isPlayheadHovering:"isPlayheadHovering",timecodeTipsBarColor:"timecodeTipsBarColor",timecodeTipsBarOpacity:"timecodeTipsBarOpacity",activeItemProgressRingBackgroundColor:"activeItemProgressRingBackgroundColor",activeItemProgressRingStepColor:"activeItemProgressRingStepColor",activeItemProgressRingWidth:"activeItemProgressRingWidth",alwaysShowTicks:"alwaysShowTicks",tickInterval:"tickInterval",showNowMarker:"showNowMarker",playheadDraggingInput:"playheadDraggingInput"},outputs:{graphCurrentPositionChanged:"graphCurrentPositionChanged",graphNowModeChanged:"graphNowModeChanged",graphFocusItem:"graphFocusItem",graphCurrentItemChanged:"graphCurrentItemChanged"},standalone:!1,features:[F],decls:3,vars:5,consts:[[1,"chart-view",3,"ngClass"],[3,"ngClass","playhead","playheadDragging","baseItem","nowMode","hoverOnPlaceItem",4,"ngIf"],[3,"baseItem","timecodeTips","playheadDragging","showExactDuration",4,"ngIf"],[3,"ngClass","playhead","playheadDragging","baseItem","nowMode","hoverOnPlaceItem"],[3,"baseItem","timecodeTips","playheadDragging","showExactDuration"]],template:function(t,i){t&1&&(_(0,"div",0),P(1,hh,1,11,"hz-playhead",1)(2,uh,1,4,"hz-timecode-tips",2)),t&2&&(c("ngClass",N(3,mh,i.alwaysShowTicks)),l(),c("ngIf",(i.baseItem==null?null:i.baseItem.isSetDate)&&i.playhead()&&i.playhead().displayCenterX!==-1),l(),c("ngIf",i.timecodeTips()&&i.timecodeTips().displayCenterX!==-1))},dependencies:[H,R,rc,sc],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]     *{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]{display:inline-block;overflow:visible;padding-bottom:100%;position:relative;vertical-align:top;width:100%}[_nghost-%COMP%]     .axis path, [_nghost-%COMP%]     .axis line{fill:none;shape-rendering:crispedges;stroke:#fff}[_nghost-%COMP%]     svg .tick text{font-size:1rem;opacity:0!important;transition:opacity .2s ease-in-out}[_nghost-%COMP%]     svg .tick line{opacity:0!important;stroke:#949495;transition:opacity .2s ease-in-out}[_nghost-%COMP%]     svg:hover .tick text, [_nghost-%COMP%]     svg:hover .tick line{opacity:1!important}[_nghost-%COMP%]     .always-show-ticks svg .tick text, [_nghost-%COMP%]     .always-show-ticks svg .tick line{opacity:1!important}  svg .item .circle{fill-opacity:.8;opacity:0;stroke:red}  .showoverlay .item circle{opacity:1}  #tooltip a{color:#fff}  #tooltip p{margin:0;padding:0}  #tooltip{background:#000;border:2px solid red;border-radius:5px;font-size:140%;margin:0;max-width:350px;opacity:0;padding:10px;pointer-events:none;position:absolute}
1[_nghost-%COMP%]     .domain{cursor:pointer;stroke:#eae9e6!important;stroke-width:30px}[_nghost-%COMP%]     .now-marker-line{opacity:.85;stroke:#d85030;stroke-width:2px}[_nghost-%COMP%]     .now-marker-cap{fill:#d85030;opacity:.85}[_nghost-%COMP%]     .line{cursor:pointer;opacity:.8;stroke-opacity:.5;stroke-width:10px}[_nghost-%COMP%]     .line-hover{stroke-opacity:.7}[_nghost-%COMP%]     .connectorline{stroke-opacity:.8;stroke-width:2px}  .item.active{fill-opacity:1!important}  .item.active .itemIcon{stroke-opacity:1;stroke-width:2px}[_nghost-%COMP%]     .active .item .line, [_nghost-%COMP%]     .active .line{stroke-opacity:.9}  .overlay{display:none}  .showoverlay .overlay{display:block}  .showoverlay .tick{display:block}[_nghost-%COMP%]     .tick{fill:#949495;font-weight:400}[_nghost-%COMP%]     .itemIcon .fa{color:#fff;display:inline!important}[_nghost-%COMP%]     .icon{color:#fff;line-height:1;text-align:center}[_nghost-%COMP%]     .cursor{fill:#fff;stroke:#4e4e4c;stroke-width:3px}[_nghost-%COMP%]     .cursorIndicator{stroke:#4e4e4c!important;stroke-opacity:1;stroke-width:2px}[_nghost-%COMP%]     .hovering{filter:url(#halo)}[_nghost-%COMP%]     .progress-bar{cursor:pointer;stroke-width:30px}[_nghost-%COMP%]     .timecode-tips-bar{cursor:pointer;stroke-width:30px}[_nghost-%COMP%]     .timecode-tips-item-highlight-bar{cursor:pointer;stroke-width:10px}[_nghost-%COMP%]     .playhead-indicator{cursor:pointer;stroke-width:40px}[_nghost-%COMP%]     .timecode-tips-bar-indicator{cursor:pointer;stroke-width:43px}[_nghost-%COMP%]     .timecode-tips-bar-indicator-inside-item{stroke-width:30px}[_nghost-%COMP%]     graph-icon-tool-tip{background-color:#fee;border-bottom-color:#e5e5e5;border-image:initial;border-right-color:#e5e5e5;border-style:solid;border-top-color:#e5e5e5;border-width:1px 1px 1px 3px;display:none;left:0;opacity:.9;overflow:hidden;padding:0 .5rem;position:absolute;text-align:center;top:0;z-index:600}[_nghost-%COMP%]     g.itemIcon{cursor:pointer}[_nghost-%COMP%]   hz-playhead[_ngcontent-%COMP%]{background-color:#616161;border-radius:.6rem;cursor:grab;display:block;font-size:1rem;height:1.8rem;left:-300px;line-height:1.8rem;overflow:hidden;padding:0 .7rem;position:absolute;text-align:center;top:-.7rem;white-space:nowrap;z-index:500}[_nghost-%COMP%]   hz-playhead[_ngcontent-%COMP%]:hover{background-color:#727272}[_nghost-%COMP%]   hz-playhead.dragging[_ngcontent-%COMP%]{cursor:grabbing}[_nghost-%COMP%]   .playhead-hover-on-place-item-mode[_ngcontent-%COMP%]{background-color:#1678c2!important}[_nghost-%COMP%]   .playhead-live-mode[_ngcontent-%COMP%]{background-color:#d85030!important}[_nghost-%COMP%]   hz-playhead.playhead-hover[_ngcontent-%COMP%]{background-color:#727272}[_nghost-%COMP%]     .playhead-indicator-hover{stroke:#727272!important}[_nghost-%COMP%]   hz-timecode-tips[_ngcontent-%COMP%]{background-color:#e4e4e4;border:.1rem solid #b6b6b6;border-radius:.6rem;display:block;font-size:1rem;height:auto;left:-300px;line-height:1.8rem;max-width:25rem;overflow:hidden;padding:.2rem .8rem;position:absolute;text-align:center;top:0;white-space:nowrap;width:auto;z-index:600}"],changeDetection:0}));let n=r;return n})();var Ph=["baseItem",""],bh=n=>({basic:n});function wh(n,r){if(n&1){let o=S();d(0,"div",2),_(1,"i",3),d(2,"hz-date-button",4),h(3,"async"),h(4,"formatDuration"),b("click",function(t){return C(o),v(t.stopPropagation())}),m()()}if(n&2){let o=u();l(2),c("canEdit",f(3,6,o.permission$).edit)("preventDestroyEmit",!0)("isLabelLink",!1)("itemOptions",o.itemOptions)("label",A(4,8,o.duration,!0))("item",o.baseItem)}}function Sh(n,r){if(n&1){let o=S();d(0,"button",5),b("click",function(){C(o);let t=u();return v(t.nowButtonClick.emit())}),y(1," NOW\n"),m()}if(n&2){let o=u();c("ngClass",N(1,bh,o.isNowMode()))}}var cc=(()=>{let r=class r{constructor(e,t,i){s(this,"timelineService");s(this,"itemsService");s(this,"store");s(this,"baseItem");s(this,"liveMode");s(this,"showLiveMode");s(this,"nowMode");s(this,"isSetDate");s(this,"itemOptions");s(this,"nowButtonClick",new E);this.timelineService=e,this.itemsService=t,this.store=i}get duration(){return this.timelineService.getDuration(this.baseItem)}isNowMode(){var e;return!((e=this.nowMode)!=null&&e.value)}durationChanged(e){this.baseItem&&(this.baseItem.endDate=e?e.getTime():0,this.itemsService.updateItemInfo(this.baseItem))}get permission$(){return this.store.select(Re(this.baseItem))}};s(r,"\u0275fac",function(t){return new(t||r)(x(Ze),x(ye),x(D))}
1),s(r,"\u0275cmp",k({type:r,selectors:[["hz-player-info","baseItem",""]],inputs:{baseItem:"baseItem",liveMode:"liveMode",showLiveMode:"showLiveMode",nowMode:"nowMode",isSetDate:"isSetDate",itemOptions:"itemOptions"},outputs:{nowButtonClick:"nowButtonClick"},standalone:!1,attrs:Ph,decls:2,vars:2,consts:[["class","duration",4,"ngIf"],["class","ui circular red button",3,"ngClass","click",4,"ngIf"],[1,"duration"],[1,"middle","middle","icon","clock","grey"],["position","pointing right bottom",3,"click","canEdit","preventDestroyEmit","isLabelLink","itemOptions","label","item"],[1,"ui","circular","red","button",3,"click","ngClass"]],template:function(t,i){t&1&&P(0,wh,5,11,"div",0)(1,Sh,2,3,"button",1),t&2&&(c("ngIf",!i.liveMode&&i.isSetDate||i.liveMode&&!!i.baseItem.duration),l(),c("ngIf",i.liveMode&&!i.baseItem.duration&&i.showLiveMode))},dependencies:[H,R,$a,W,pt],styles:["[_nghost-%COMP%]   .duration[_ngcontent-%COMP%]{margin-top:.7rem}"],changeDetection:0}));let n=r;return n})();var Oh=(n,r)=>({markOutput:n,markStart:r});function xh(n,r){if(n&1){let o=S();d(0,"hz-player-info",2),b("nowButtonClick",function(){C(o);let t=u();return v(t.onNowButtonClick())}),m()}if(n&2){let o=u();c("baseItem",o.baseItem)("liveMode",o.chartLiveMode)("showLiveMode",o.showLiveMode)("nowMode",o.chartNowMode)("itemOptions",o.chartItemOptions)("isSetDate",o.isSetDate)}}var mc=(()=>{let r=class r{constructor(e,t,i,a,p,g,I){s(this,"graphService");s(this,"queryService");s(this,"timelineService");s(this,"itemsService");s(this,"logger");s(this,"mainService");s(this,"element");s(this,"store",M(D));s(this,"chart");s(this,"graphConfig");s(this,"isSetDate",!0);s(this,"showPlayerControls",!0);s(this,"baseItem");s(this,"hidePast",!1);s(this,"itemsInput");s(this,"chartHeight");s(this,"chartMinHeight");s(this,"chartPaddingBottom");s(this,"position",new E);s(this,"sortOrder");s(this,"enableDebug",!1);s(this,"internalGraphConfig",{itemHoverEffectType:"ScaleBorderOnly",itemHoverEffectScale:"1.5",itemHoverEffectBorderWidth:"10",enableGraphScaleEffect:!0,graphItemScalePercentageAtNormalState:"70%",graphItemDurationLineScalePercentageAtNormalState:"40%",showEntireEventProgressBar:!0,progressBarColor:"#444",progressBarOpacity:"0.3",playheadColor:"#616161",timecodeTipsBarColor:"#444",timecodeTipsBarOpacity:"0.35",activeItemProgressRingBackgroundColor:"#DEDEDE",activeItemProgressRingStepColor:"#616161",activeItemProgressRingWidth:"10"});s(this,"currentItem$");s(this,"hoverOnPlaceItem$");s(this,"storeGraphItems",this.store.selectSignal(qr));s(this,"storeFilterParams",this.store.selectSignal(nn));s(this,"storePosition",this.store.selectSignal(gn));s(this,"storeLiveMode",this.store.selectSignal(lt));s(this,"storeNowMode",this.store.selectSignal(Wi));s(this,"storeHoverItem",this.store.selectSignal(Ga));s(this,"storeLiveClockTick",this.store.selectSignal(el));s(this,"storePlayerState",this.store.selectSignal(Zt));s(this,"storeMaxScore",this.store.selectSignal(ct));s(this,"storeTotalScore",this.store.selectSignal(Kr));s(this,"storePlayheadDragging",this.store.selectSignal(pi));s(this,"storePlayheadHovering",this.store.selectSignal(Fa));s(this,"storeItemOptions",this.store.selectSignal(Kt));s(this,"storeCountItemsLoad",this.store.selectSignal(Vi));s(this,"storeHoverOnPlaceItem$",this.store.select(Ha).pipe($e()).pipe(Oo(100)));s(this,"markOutput",()=>{this.chart.extendPrevItem()});s(this,"markStart",()=>{this.chart.setItemDate()});this.graphService=e,this.queryService=t,this.timelineService=i,this.itemsService=a,this.logger=p,this.mainService=g,this.element=I,this.hoverOnPlaceItem$=this.storeHoverOnPlaceItem$,this.currentItem$=new Te,this.updateDetachedModeStreams()}ngOnChanges(e){e.itemsInput&&this.updateDetachedModeStreams(),(0,dc.get)(e,"graphConfig")&&(this.internalGraphConfig=me(me({},this.internalGraphConfig),this.graphConfig))}ngOnDestroy(){this.currentItem$&&(this.currentItem$.complete(),this.currentItem$=null)}onMouseOver(){this.internalGraphConfig.enableGraphScaleEffect&&this.chart.updateGraphScale(!1)}onMouseLeave(){this.internalGraphConfig.enableGraphScaleEffect&&this.chart.updateGraphScale(!0)}onChartNowModeChanged(e){this.itemsService.updateNowMode(e)}onNowButtonClick(){this.itemsService.updateNowModeByUser(!0)}onChartCurrentPositionChanged(e){this.position.emit(e)}onChartCurrentItemChanged(e){this.currentItem$&&this.currentItem$.next(e)}get order(){return this.sortOrder===He.Oldest&&!this.baseItem.messengerMode?"date":"-date"}get showLiveMode(){var e;return(e=this.baseItem)==null?void 0:e.showLiveMode}get chartItems(){var t;if(this.isDetachedMode)return(t=this.itemsInput)!=null?t:[];let e=this.storeGraphItems();return e!=null?e:[]}get itemsSliceCount(){var t,i;if(this.isDetachedMode)return(i=(t=this.itemsInput)==null?void 0:t.length)!=null?i:0;let e=this.storeCountItemsLoad();return typeof e=="number"?e:0}get chartFilterParams(){return this.isDetachedMode?null:this.storeFilterParams()}get chartPosition(){return this.isDetachedMode?null:this.storePosition()}get chartHoverItem(){return this.isDetachedMode?null:this.storeHoverItem()}get chartLiveMode(){return this.isDetachedMode?!1:this.storeLiveMode()}get chartNowMode(){return this.isDetachedMode?null:this.storeNowMode()}get chartPlayerState(){return this.isDetachedMode?null:this.storePlayerState()}get chartMaxScore(){return this.isDetachedMode?0:this.storeMaxScore()}get chartTotalScore(){return this.isDetachedMode?0:this.storeTotalScore()}get chartLiveClockTick(){return this.isDetachedMode?0:this.storeLiveClockTick()}get chartPlayheadDragging(){return this.isDetachedMode?this.chart?this.chart.detachedPlayheadDragging:null:this.storePlayheadDragging()}get chartPlayheadHovering(){return this.isDetachedMode?this.chart?this.chart.detachedPlayheadHovering:!1:this.storePlayheadHovering()}get chartItemOptions(){return this.isDetachedMode?null:this.storeItemOptions()}get isDetachedMode(){return Array.isArray(this.itemsInput)}updateDetachedModeStreams(){this.hoverOnPlaceItem$=this.isDetachedMode?_i(!1):this.storeHoverOnPlaceItem$}};s(r,"\u0275fac",function(t){return new(t||r)(x(ut),x(Rt),x(Ze),x(ye),x(ve),x(Na),x(ge))}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-graph"]],viewQuery:function(t,i){if(t&1&&Lo(Tn,7),t&2){let a;Vo(a=Uo())&&(i.chart=a.first)}}
1,hostBindings:function(t,i){t&1&&b("mouseover",function(){return i.onMouseOver()})("mouseleave",function(){return i.onMouseLeave()})},inputs:{graphConfig:"graphConfig",isSetDate:"isSetDate",showPlayerControls:"showPlayerControls",baseItem:"baseItem",hidePast:"hidePast",itemsInput:"itemsInput",chartHeight:"chartHeight",chartMinHeight:"chartMinHeight",chartPaddingBottom:"chartPaddingBottom",sortOrder:"sortOrder"},outputs:{position:"position"},standalone:!1,features:[F],decls:8,vars:60,consts:[["hzHotkeys","",3,"graphNowModeChanged","graphCurrentItemChanged","graphCurrentPositionChanged","hotkeys","items","baseItem","position","hoverItem","liveMode","nowMode","playerState","currentItem","duration","maxScore","totalScore","liveClockTick","hoverOnPlaceItem","playheadDraggingInput","isPlayheadHovering","detached","itemHoverEffectType","itemHoverEffectScale","itemHoverEffectBorderWidth","enableGraphScaleEffect","graphItemScalePercentageAtNormalState","graphItemDurationLineScalePercentageAtNormalState","showEntireEventProgressBar","progressBarColor","progressBarOpacity","timecodeTipsBarColor","timecodeTipsBarOpacity","activeItemProgressRingBackgroundColor","activeItemProgressRingStepColor","activeItemProgressRingWidth","alwaysShowTicks","tickInterval","showNowMarker"],[3,"baseItem","liveMode","showLiveMode","nowMode","itemOptions","isSetDate","nowButtonClick",4,"ngIf"],[3,"nowButtonClick","baseItem","liveMode","showLiveMode","nowMode","itemOptions","isSetDate"]],template:function(t,i){t&1&&(d(0,"hz-chart",0),h(1,"filterPast"),h(2,"filterSearch"),h(3,"orderBy"),h(4,"sliceItems"),h(5,"async"),h(6,"async"),b("graphNowModeChanged",function(p){return i.onChartNowModeChanged(p)})("graphCurrentItemChanged",function(p){return i.onChartCurrentItemChanged(p)})("graphCurrentPositionChanged",function(p){return i.onChartCurrentPositionChanged(p)}),m(),P(7,xh,1,6,"hz-player-info",1)),t&2&&(Fo("height",i.chartHeight||null)("min-height",i.chartMinHeight||i.chartHeight||null)("padding-bottom",i.chartPaddingBottom||null),c("hotkeys",X(57,Oh,i.markOutput,i.markStart))("items",i.isDetachedMode?i.chartItems:A(4,50,A(3,47,A(2,44,A(1,41,i.chartItems,i.hidePast),i.chartFilterParams),i.order),i.itemsSliceCount))("baseItem",i.baseItem)("position",i.chartPosition)("hoverItem",i.chartHoverItem)("liveMode",i.chartLiveMode)("nowMode",i.chartNowMode)("playerState",i.chartPlayerState)("currentItem",f(5,53,i.currentItem$))("duration",i.baseItem.duration)("maxScore",i.chartMaxScore)("totalScore",i.chartTotalScore)("liveClockTick",i.chartLiveClockTick)("hoverOnPlaceItem",f(6,55,i.hoverOnPlaceItem$))("playheadDraggingInput",i.chartPlayheadDragging)("isPlayheadHovering",i.chartPlayheadHovering)("detached",i.isDetachedMode)("itemHoverEffectType",i.internalGraphConfig.itemHoverEffectType)("itemHoverEffectScale",i.internalGraphConfig.itemHoverEffectScale)("itemHoverEffectBorderWidth",i.internalGraphConfig.itemHoverEffectBorderWidth)("enableGraphScaleEffect",i.internalGraphConfig.enableGraphScaleEffect)("graphItemScalePercentageAtNormalState",i.internalGraphConfig.graphItemScalePercentageAtNormalState)("graphItemDurationLineScalePercentageAtNormalState",i.internalGraphConfig.graphItemDurationLineScalePercentageAtNormalState)("showEntireEventProgressBar",i.internalGraphConfig.showEntireEventProgressBar)("progressBarColor",i.internalGraphConfig.progressBarColor)("progressBarOpacity",i.internalGraphConfig.progressBarOpacity)("timecodeTipsBarColor",i.internalGraphConfig.timecodeTipsBarColor)("timecodeTipsBarOpacity",i.internalGraphConfig.timecodeTipsBarOpacity)("activeItemProgressRingBackgroundColor",i.internalGraphConfig.activeItemProgressRingBackgroundColor)("activeItemProgressRingStepColor",i.internalGraphConfig.activeItemProgressRingStepColor)("activeItemProgressRingWidth",i.internalGraphConfig.activeItemProgressRingWidth)("alwaysShowTicks",i.internalGraphConfig.alwaysShowTicks)("tickInterval",i.internalGraphConfig.tickInterval)("showNowMarker",i.internalGraphConfig.showNowMarker),l(7),c("ngIf",i.showPlayerControls))},dependencies:[R,qt,Tn,cc,W,Lt,Ft,Gt,$t],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]   hz-chart[_ngcontent-%COMP%]{flex:1 1 auto;display:block}
1[_nghost-%COMP%]   hz-player-info[_ngcontent-%COMP%]{align-self:center;display:block;text-align:left;width:7.5rem}[_nghost-%COMP%]   current-time-indicator[_ngcontent-%COMP%]{color:#444;left:0;position:absolute;text-align:center;top:-1.15rem;width:6rem;z-index:600}[_nghost-%COMP%]   .hide-current-time-indicator[_ngcontent-%COMP%]{left:-200px!important}@media only screen and (max-width:700px){[_nghost-%COMP%]   hz-player-info[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   hz-chart[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0}));let n=r;return n})();var zh=(n,r)=>({"spacing-left":n,"is-presentation":r});function Eh(n,r){if(n&1){let o=S();d(0,"hz-player-controls",5),b("onPlayClicked",function(){C(o);let t=u(2);return v(t.play())})("onPauseClicked",function(){C(o);let t=u(2);return v(t.pause())})("onEndNowClicked",function(){C(o);let t=u(2);return v(t.endNow())})("onReopenClicked",function(){C(o);let t=u(2);return v(t.reopen())})("onNextClicked",function(t){C(o);let i=u(2);return v(i.nextTrack(t))})("onActivateNextClicked",function(){C(o);let t=u(2);return v(t.activateNext())})("onGoToPosition",function(t){C(o);let i=u(2);return v(i.onGraphUpdated(t))})("onGoToNowMode",function(){C(o);let t=u(2);return v(t.goToNowMode())})("onPreviousClicked",function(t){C(o);let i=u(2);return v(i.previousTrack(t))}),m()}if(n&2){let o=u(2);c("hasVideo",o.baseItem.hasVideo)("showLiveMode",o.showLiveMode)("totalCount",o.getGraphItemsLength())("liveMode",o.getSafeBoolean(o.liveMode()))("canEdit",o.canEdit)("nowMode",o.getSafeBoolean(o.nowMode()))("unplacedCount",o.getSafeNumber(o.unplacedCount()))("currentIndex",o.getGraphLastItemPlayed())("isPlaying",o.getSafeBoolean(o.isPlaying()))("playerPosition",o.getPlayerCurrentPosition())("position",o.getGraphPosition())("hidePlayButton",o.isPresentationLayout)}}function kh(n,r){if(n&1){let o=S();d(0,"div",2),P(1,Eh,1,12,"hz-player-controls",3),d(2,"hz-graph",4),b("position",function(t){C(o);let i=u();return v(i.onGraphUpdated(t))}),m()()}if(n&2){let o=u();l(),c("ngIf",o.showPlayerControls()&&o.showLiveMode),l(),c("baseItem",o.baseItem)("hidePast",o.getSafeBoolean(o.hidePast()))("ngClass",X(8,zh,o.showPlayerControls()&&o.showLiveMode,o.isPresentationLayout))("graphConfig",o.graphConfig)("showPlayerControls",o.getSafeBoolean(o.showPlayerControls()))("sortOrder",o.getSafeSortOrder())("isSetDate",o.baseItem.isSetDate)}}function Dh(n,r){if(n&1&&(d(0,"div",6)(1,"p"),y(2),h(3,"amTimeAgo"),m()()),n&2){let o=u();l(2),U(f(3,1,o.getBaseItemStartDate()))}}var pc=(()=>{let r=class r{constructor(){s(this,"store",M(D));s(this,"itemsService",M(ye));s(this,"baseItem");s(this,"graphItemsLength",0);s(this,"canEdit",!1);s(this,"isSetDate",!1);s(this,"isPresentationLayout",!1);s(this,"position",new E);s(this,"itemOptions",this.store.selectSignal(Kt));s(this,"isLoadingItem",this.store.selectSignal(Br));s(this,"isLoadingTimeline",this.store.selectSignal(Et));s(this,"player",this.store.selectSignal(qa));s(this,"isPlaying",this.store.selectSignal(Ka));s(this,"graph",this.store.selectSignal(Aa));s(this,"graphItemsLengthSignal",this.store.selectSignal(fn));s(this,"unplacedCount",this.store.selectSignal(Xr));s(this,"liveMode",this.store.selectSignal(lt));s(this,"nowMode",this.store.selectSignal(Nr));s(this,"showPlayerControls",this.store.selectSignal(hr));s(this,"sortOrder",this.store.selectSignal(yt));s(this,"hidePast",this.store.selectSignal(Hi));s(this,"shouldShow",this.store.selectSignal(Fr));s(this,"graphConfig",{enableGraphScaleEffect:!1})}getGraphPosition(){var e;return((e=this.graph())==null?void 0:e.position)||new Date}getGraphItemsLength(){return this.graphItemsLengthSignal()||0}getGraphLastItemPlayed(){var e;return((e=this.graph())==null?void 0:e.lastItemPlayed)||0}getPlayerCurrentPosition(){var e;return((e=this.player())==null?void 0:e.currentPosition)||0}getSafeBoolean(e){return e||!1}getSafeSortOrder(){return this.sortOrder()||He.Newest}getSafeNumber(e){return e||0}getBaseItemStartDate(){return new Date(this.baseItem.start)}endNow(){let e=this.baseItem.clone();e.endDate=new Date().getTime(),this.itemsService.closeEvent(e)}reopen(){this.store.dispatch(Xs(this.baseItem))}activateNext(){this.store.dispatch(Zs())}goToNowMode(){this.itemsService.updateNowMode(!0)}play(){this.store.dispatch(Pt.startAction())}pause(){this.store.dispatch(Pt.pauseAction())}nextTrack(e){this.isPresentationLayout?this.store.dispatch(sa()):this.store.dispatch(jn(e))}previousTrack(e){this.isPresentationLayout?this.store.dispatch(aa()):this.store.dispatch(jn(e))}onGraphUpdated(e){this.store.dispatch(Ma(e))}get showLiveMode(){return this.baseItem.showLiveMode}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-bottom-bar"]],inputs:{baseItem:"baseItem",graphItemsLength:"graphItemsLength",canEdit:"canEdit",isSetDate:"isSetDate",isPresentationLayout:"isPresentationLayout"},outputs:{position:"position"},standalone:!1,decls:2,vars:2,consts:[["class","ui bottom fixed borderless menu grid",4,"ngIf"],["style","position: fixed; bottom: -100px",4,"ngIf"],[1,"ui","bottom","fixed","borderless","menu","grid"],["class","item hazu-left-column",3,"hasVideo","showLiveMode","totalCount","liveMode","canEdit","nowMode","unplacedCount","currentIndex","isPlaying","playerPosition","position","hidePlayButton","onPlayClicked","onPauseClicked","onEndNowClicked","onReopenClicked","onNextClicked","onActivateNextClicked","onGoToPosition","onGoToNowMode","onPreviousClicked",4,"ngIf"],[3,"position","baseItem","hidePast","ngClass","graphConfig","showPlayerControls","sortOrder","isSetDate"],[1,"item","hazu-left-column",3,"onPlayClicked","onPauseClicked","onEndNowClicked","onReopenClicked","onNextClicked","onActivateNextClicked","onGoToPosition","onGoToNowMode","onPreviousClicked","hasVideo","showLiveMode","totalCount","liveMode","canEdit","nowMode","unplacedCount","currentIndex","isPlaying","playerPosition","position","hidePlayButton"],[2,"position","fixed","bottom","-100px"]],template:function(t,i){t&1&&P(0,kh,3,11,"div",0)(1,Dh,4,3,"div",1),t&2&&(c("ngIf",i.shouldShow()&&i.isLoadingItem()===!1),l(),c("ngIf",i.baseItem&&i.baseItem.isFutureEvent))},dependencies:[H,R,qe,ec,mc,Ht],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}.bottombarmargin[_ngcontent-%COMP%]{padding-bottom:64px}.ui.bottom.fixed.menu[_ngcontent-%COMP%]{height:67px;z-index:250}.ui.bottom.fixed.menu[_ngcontent-%COMP%]   .hazu-left-column[_ngcontent-%COMP%]{position:absolute;text-align:center;width:140px!important}.ui.bottom.fixed.menu[_ngcontent-%COMP%]   .hazu-middle-column[_ngcontent-%COMP%]{margin-left:140px;padding-left:0;padding-right:0;padding-top:0}.ui.bottom.fixed.menu[_ngcontent-%COMP%]   .hazu-right-column[_ngcontent-%COMP%]{display:block;padding-left:0;padding-right:0;padding-top:2rem;position:absolute;right:0;text-align:center;width:6rem!important}.ui.bottom.fixed.menu[_ngcontent-%COMP%]   .hazu-right-column[_ngcontent-%COMP%]   .circular.button[_ngcontent-%COMP%]{margin-left:-15px}
1[_nghost-%COMP%]   hz-graph[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;height:100%;padding-left:0;padding-right:0;padding-top:0;position:relative;width:100%}[_nghost-%COMP%]   .spacing-left[_ngcontent-%COMP%]{margin-left:140px}[_nghost-%COMP%]   .spacing-left.is-presentation[_ngcontent-%COMP%]{margin-left:93.3333333333px}@media only screen and (max-width:700px){[_nghost-%COMP%]   hz-player-controls.item.hazu-left-column[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   hz-graph[_ngcontent-%COMP%]{margin-left:0}[_nghost-%COMP%]   .spacing-left[_ngcontent-%COMP%]{margin-left:0}}@media only screen and (max-width:992px)and (orientation:portrait){[_nghost-%COMP%]   .ui.bottom.fixed.borderless.menu.grid[_ngcontent-%COMP%]{width:100vw}}"],changeDetection:0}));let n=r;return n})();var Bh=["*"],Nh=(n,r,o,e,t,i)=>({"hazu-scroll":n,"hazu-text-container-sticky-mode-video-player-minimized":r,"hazu-text-container-sticky-mode":o,hasActivityIndicator:e,isInEditMode:t,"calendar-view-draggable":i}),Ah=n=>({"margin-top-15":n}),Lh=(n,r)=>({hide:n,"toolbar-offset":r});function Vh(n,r){if(n&1){let o=S();d(0,"hz-video-player",17),b("mouseenter",function(){C(o);let t=u();return v(t.videoHover.emit(!0))})("mouseleave",function(){C(o);let t=u();return v(t.videoHover.emit(!1))}),m()}if(n&2){let o=u();c("ngClass",X(1,Lh,!o.baseItem.showSidebar&&o.videoPlayerMinimized(),!o.sidebarVisible&&o.videoPlayerMinimized()))}}function Uh(n,r){if(n&1&&_(0,"hz-breadcrumb",18),n&2){let o=u();c("hiddenUrlSegments",o.hiddenUrlSegments())("baseItem",o.currentBaseItem())("parentItems",o.parentItems())("showLinkToCurrentHazu",o.isSharingShowed())("showCurrentHazu",o.searchbarInStickyMode())}}function Fh(n,r){if(n&1&&_(0,"hz-base-item",19),n&2){let o=u();c("baseItem",o.baseItem)("isSidebar",o.isSidebar)}}function Hh(n,r){if(n&1&&_(0,"hz-share-buttons",20),n&2){let o=u();c("item",o.baseItem)("isFuture",o.isFutureEvent)}}function Gh(n,r){if(n&1&&(d(0,"p")(1,"span",24),y(2,"FORM.EDIT_RESPONSE_MESSAGE"),m(),d(3,"a",25),y(4,"FORM.EDIT_RESPONSE_LINK"),m(),d(5,"span",24),y(6,"FORM.EDIT_RESPONSE_AFTER_LINK"),m(),y(7,". "),m()),n&2){let o=u(2).ngIf,e=u();l(3),c("href","/"+o+"?view=form&populateFrom="+e.baseItem.id,We)}}function $h(n,r){if(n&1&&(d(0,"div"),_(1,"p",23),P(2,Gh,8,1,"p",16),m()),n&2){let o=r.ngIf,e=u(2);l(),c("innerHTML",o,be),l(),c("ngIf",e.canEditFormResponse())}}function Wh(n,r){if(n&1&&(d(0,"p")(1,"span",24),y(2,"FORM.EDIT_RESPONSE_MESSAGE"),m(),d(3,"a",25),y(4,"FORM.EDIT_RESPONSE_LINK"),m(),d(5,"span",24),y(6,"FORM.EDIT_RESPONSE_AFTER_LINK"),m(),y(7,". "),m()),n&2){let o=u(2).ngIf,e=u();l(3),c("href","/"+o+"?view=form&populateFrom="+e.baseItem.id,We)}}function jh(n,r){if(n&1&&(d(0,"div")(1,"p")(2,"span",24),y(3,"FORM.SUBMITTED_SUCCESSFULLY"),m()(),P(4,Wh,8,1,"p",16),m()),n&2){let o=u(2);l(4),c("ngIf",o.canEditFormResponse())}}function Yh(n,r){if(n&1&&(d(0,"div",21),P(1,$h,3,2,"div",22)(2,jh,5,1,"ng-template",null,0,re),m()),n&2){let o=le(3),e=u();l(),c("ngIf",e.customResponseMessage())("ngIfElse",o)}}function Xh(n,r){if(n&1){let o=S();d(0,"hz-detail-item-list",26),b("itemActivated",function(t){C(o);let i=u();return v(i.activateItem(t))})("onPlayPauseIconClicked",function(t){C(o);let i=u();return v(i.onPlayPauseIconClicked(t))}),m()}if(n&2){let o=u();c("countItemsLoad",o.countItemsLoad())("filterParams",o.filterParams())("hidePast",o.hidePast())("baseItem",o.baseItem)("isSidebar",o.isSidebar)("sortOrder",o.sortOrder())("isAllowSyncFocusItemWhenScroll",!o.commentListVisible()||!o.voteListVisible())("hasYoutubeVideo",o.baseItem.videoId)("videoPlayerMinimized",o.baseItem.videoId&&o.videoPlayerMinimized())}}function qh(n,r){if(n&1&&(d(0,"div",27),_(1,"h4",28),d(2,"div",29)(3,"a",30),_(4,"img",31),m(),_(5,"br")(6,"i",32),y(7),h(8,"translate"),d(9,"a",30),y(10,"Hazu"),m()()()),n&2){let o=u();l(3),c("href",Ct(o.getPoweredByURL()),We),l(),c("src",Ct(o.getPoweredByLogoURL()),We),l(3),T("",f(8,7,"COMMON.POWERED_BY")," "),l(2),c("href",Ct(o.getPoweredByURL()),We)}}function Kh(n,r){if(n&1&&_(0,"hz-bottom-bar",34),n&2){let o,e=u(2);c("baseItem",e.baseItem)("isSetDate",e.isSetDate())("isPresentationLayout",e.isFullscreenLayout()
1)("graphItemsLength",e.graphItemsLength())("canEdit",e.permission()?(o=e.permission()())==null?null:o.edit:!1)}}function Zh(n,r){if(n&1&&(xi(0),P(1,Kh,1,5,"hz-bottom-bar",33),Ti()),n&2){let o=r.ngIf;l(),c("ngIf",o())}}var RI=(()=>{let r=class r{constructor(){s(this,"isSidebar",!1);s(this,"sidebarVisible",!0);s(this,"baseItem");s(this,"isInvited",!1);s(this,"isAnonymous",!0);s(this,"aclInvite");s(this,"authorId");s(this,"hide",new E);s(this,"videoHover",new E);s(this,"store",M(D));s(this,"layoutService",M(Ne));s(this,"aclService",M(he));s(this,"elRef",M(ge));s(this,"formCacheService",M(Ql));s(this,"injector",M(bi));s(this,"isTableLayout",O(this.store.select(Mr),{requireSync:!0}));s(this,"searchbarInStickyMode",O(this.store.select(fr),{requireSync:!0}));s(this,"videoPlayerMinimized",O(this.store.select(ur),{requireSync:!0}));s(this,"baseItemEditState",O(this.store.select(zt).pipe(ni(e=>!!e.item&&!!e.editStateByKey),te(e=>e.editStateByKey))));s(this,"bottomBarVisible",O(this.store.select(vr),{requireSync:!0}));s(this,"hasActivityIndicator",O(this.store.select(Pr),{requireSync:!0}));s(this,"isSetDate",O(this.store.select(Hr),{requireSync:!0}));s(this,"commentListVisible",O(this.store.select(_r),{requireSync:!0}));s(this,"voteListVisible",O(this.store.select(Cr),{requireSync:!0}));s(this,"isFullscreenLayout",O(this.store.select(Or),{requireSync:!0}));s(this,"isPageTitleVisible",O(this.store.select(br),{requireSync:!0}));s(this,"isMobile",O(this.store.select(at),{requireSync:!0}));s(this,"editStateByKey",O(this.store.select(Qr),{requireSync:!0}));s(this,"authentication",O(this.store.select(mt),{requireSync:!0}));s(this,"viewStateByKey",O(this.store.select(kt),{requireSync:!0}));s(this,"routerDefaults",O(this.store.select(kr),{requireSync:!0}));s(this,"sortOrder",O(this.store.select(yt),{requireSync:!0}));s(this,"filterParams",O(this.store.select(Ts),{requireSync:!0}));s(this,"countItemsLoad",O(this.store.select(Vi),{requireSync:!0}));s(this,"activeNodes",O(this.store.select($r),{requireSync:!0}));s(this,"activeNodesPermission",O(this.store.select(Wr),{requireSync:!0}));s(this,"clipboard",O(this.store.select(jr),{requireSync:!0}));s(this,"graphItemsLength",O(this.store.select(fn),{requireSync:!0}));s(this,"parentItems",O(this.store.select(ji),{requireSync:!0}));s(this,"urlSegments",O(this.store.select(xr),{requireSync:!0}));s(this,"sortBy",O(this.store.select(Dr)));s(this,"tabs",O(this.store.select(Gr),{requireSync:!0}));s(this,"isSharingShowed",O(this.store.select(gr),{requireSync:!0}));s(this,"hiddenUrlSegments",O(this.store.select(Tr),{requireSync:!0}));s(this,"hidePast",O(this.store.select(Hi),{requireSync:!0}));s(this,"isPoweredBy",O(this.store.select(Ur).pipe(ni(e=>!!e),$e(),te(e=>(e==null?void 0:e.whiteLabelling)===nr.PoweredBy),$e())));s(this,"currentBaseItem",O(this.store.select(ts),{requireSync:!0}));s(this,"formSubmitted",O(this.store.select(zr),{requireSync:!0}));s(this,"sourceFormId",O(this.store.select(Rn),{requireSync:!0}));s(this,"sourceFormItem$",this.store.select(Rn).pipe(Ii(e=>e?this.store.select(Xi(e)):_i(void 0))));s(this,"customResponseMessage",O(ii([this.store.select(Nn),this.sourceFormItem$.pipe(te(e=>{var t;return(t=e==null?void 0:e.formSettings)==null?void 0:t.customResponseMessage}))]).pipe(te(([e,t])=>{if(e){let i=this.formCacheService.loadPosthookMessage(e);if(i)return setTimeout(()=>{this.formCacheService.clearPosthookMessage(e)},1e3),i}return t}))));s(this,"canEditFormResponse",O(this.sourceFormItem$.pipe(te(e=>{var i;let t=(i=e==null?void 0:e.formSettings)==null?void 0:i.submitterRole;return!!t&&t!=="reader"})),{initialValue:!1}));s(this,"isInCalendarView",O(this.store.select(Er).pipe(te(e=>e==="calendar"),$e())));s(this,"loggedInUser",O(this.store.select(ls),{requireSync:!0}));s(this,"baseItemId",O(this.store.select(Nn)));s(this,"permission",Y(void 0));s(this,"showBottomBar",Y(void 0));s(this,"isLiveModeStarted",!1);s(this,"orderClass","");s(this,"isInEditMode",!1);s(this,"expandLevel",e=>{this.store.dispatch(js(this.baseItem,e))});s(this,"expand",e=>()=>{this.expandLevel(e)});s(this,"nextItem",()=>{this.store.dispatch(Un(1))});s(this,"prevItem",()=>{this.store.dispatch(Un(-1))});s(this,"selectItem",()=>{this.store.dispatch(Ys())});ie(()=>{let e=this.baseItemId();e&&!this.isSidebar&&this.store.dispatch(Fn(e))}),ie(()=>{let e=this.loggedInUser();this.aclInvite&&this.authorId&&e&&this.aclService.addUserToACLByToken(this.aclInvite.itemId,this.aclInvite.key)})}ngAfterViewChecked(){this.isInEditMode=this.elRef.nativeElement.innerHTML.includes("isEditMode")}ngOnChanges(e){var t,i;if(((0,zn.get)(e,"isInvited")||(0,zn.get)(e,"isAnonymous"))&&this.isInvited&&(this.isAnonymous?this.openRegister():this.aclInvite&&this.authorId&&this.aclService.addUserToACLByToken(this.aclInvite.itemId,this.aclInvite.key)),(0,zn.get)(e,"baseItem")){let a=e.baseItem.currentValue,p=e.baseItem.previousValue;this.orderClass=this.getOrderClass(),(t=this.baseItem)!=null&&t.isLiveEvent&&!this.isLiveModeStarted?(this.store.dispatch(qs(this.baseItem)),this.isLiveModeStarted=!0):(i=this.baseItem)!=null&&i.isLiveEvent||(this.isLiveModeStarted=!1),a.key!==(p==null?void 0:p.key)&&(this.permission.set(O(this.store.select(Re(this.baseItem)),{requireSync:!0,injector:this.injector})),this.showBottomBar.set(je(()=>{let g=this.bottomBarVisible();return this.baseItem&&g})),this.isSidebar&&(a!=null&&a.id)&&this.store.dispatch(Fn(a.id)))}}ngOnDestroy(){this.isSidebar&&this.store.dispatch(cr())}get isFutureEvent(){return this.baseItem?this.baseItem.isHazu&&this.baseItem.isFutureEvent:!1}activateItem(e){this.store.dispatch(Hn(ot,e))}onPlayPauseIconClicked(e){e.shouldPauseVideo?this.store.dispatch(Pt.pauseAction()):this.store.dispatch(Pt.startAction()),e.activeItem
1Changed&&(this.store.dispatch(Hn(ot,e.clickedItem)),this.store.dispatch(Pt.seekToAction(Qa(e.clickedItem.start,this.baseItem.startWithStreamOffset))))}getPoweredByURL(){return Ye.HOST}getPoweredByLogoURL(){return"".concat(Ye.HOST,"/assets/h-logo.png")}openRegister(){this.layoutService.showModal(Ke.AUTHENTICATION,{mode:"register",isInvited:this.isInvited})}getOrderClass(){return this.baseItem.autoDate?this.baseItem.timelinePosition?this.baseItem.sortOrder?"autodate-timeline-newest":"autodate-timeline-oldest":this.baseItem.sortOrder?"autodate-newest-timeline":"autodate-oldest-timeline":this.baseItem.timelinePosition?"timeline-unplaced":""}};s(r,"\u0275fac",function(t){return new(t||r)}),s(r,"\u0275cmp",k({type:r,selectors:[["hz-main-item-list"]],inputs:{isSidebar:"isSidebar",sidebarVisible:"sidebarVisible",baseItem:"baseItem",isInvited:"isInvited",isAnonymous:"isAnonymous",aclInvite:"aclInvite",authorId:"authorId"},outputs:{hide:"hide",videoHover:"videoHover"},standalone:!1,features:[F],ngContentSelectors:Bh,decls:17,vars:28,consts:[["defaultMessage",""],["class","ui basic segment","id","mediaplayer",3,"ngClass","mouseenter","mouseleave",4,"ngIf"],[1,"ui","container","hazu-text-container","hazu-content-container","hazu-sticky-context-container",3,"ngClass"],[1,"close-btn",3,"click"],[1,"large","grey","close","icon","link"],["hzMermaid","",1,"bottombarmargin","hz-main-content"],["class","ui basic segment",3,"hiddenUrlSegments","baseItem","parentItems","showLinkToCurrentHazu","showCurrentHazu",4,"ngIf"],[3,"baseItem","isSidebar",4,"ngIf"],[3,"item","isFuture",4,"ngIf"],["class","ui info message",4,"ngIf"],[1,"container-list",3,"ngClass"],[1,"ui","divider","divider-unplaced"],[1,"main","hz-item-list","unplaced",3,"baseItem","ngClass","tabs","isSidebar","routerDefaults"],[1,"newItemButtonsContainer",3,"baseItem","user","routerDefaults","editStateByKey"],["class","hz-item-list placed",3,"countItemsLoad","filterParams","hidePast","baseItem","isSidebar","sortOrder","isAllowSyncFocusItemWhenScroll","hasYoutubeVideo","videoPlayerMinimized","itemActivated","onPlayPauseIconClicked",4,"ngIf"],["class","poweredby",4,"ngIf"],[4,"ngIf"],["id","mediaplayer",1,"ui","basic","segment",3,"mouseenter","mouseleave","ngClass"],[1,"ui","basic","segment",3,"hiddenUrlSegments","baseItem","parentItems","showLinkToCurrentHazu","showCurrentHazu"],[3,"baseItem","isSidebar"],[3,"item","isFuture"],[1,"ui","info","message"],[4,"ngIf","ngIfElse"],[3,"innerHTML"],["translate",""],["translate","",1,"edit-response-link",3,"href"],[1,"hz-item-list","placed",3,"itemActivated","onPlayPauseIconClicked","countItemsLoad","filterParams","hidePast","baseItem","isSidebar","sortOrder","isAllowSyncFocusItemWhenScroll","hasYoutubeVideo","videoPlayerMinimized"],[1,"poweredby"],[1,"ui","divider"],[2,"text-align","center"],["target","_blank",3,"href"],[3,"src"],[1,"sort","content"],[3,"baseItem","isSetDate","isPresentationLayout","graphItemsLength","canEdit",4,"ngIf"],[3,"baseItem","isSetDate","isPresentationLayout","graphItemsLength","canEdit"]],template:function(t,i){if(t&1&&(zi(),P(0,Vh,1,4,"hz-video-player",1),d(1,"div",2)(2,"div",3),b("click",function(){return i.hide.emit()}),_(3,"i",4),m(),d(4,"div",5),P(5,Uh,1,5,"hz-breadcrumb",6)(6,Fh,1,2,"hz-base-item",7)(7,Hh,1,2,"hz-share-buttons",8)(8,Yh,4,2,"div",9),Ei(9),d(10,"div",10),_(11,"h4",11)(12,"hz-item-agenda",12)(13,"hz-new-item-buttons",13),P(14,Xh,1,9,"hz-detail-item-list",14)(15,qh,11,9,"div",15),m()()(),P(16,Zh,2,1,"ng-container",16)),t&2){let a;c("ngIf",i.baseItem==null?null:i.baseItem.hasVideo),l(),c("ngClass",$o(19,Nh,i.baseItem.videoId,i.searchbarInStickyMode(),i.baseItem.videoId&&i.searchbarInStickyMode()&&!i.videoPlayerMinimized(),i.hasActivityIndicator(),i.isInEditMode,i.isInCalendarView())),l(4),c("ngIf",i.isMobile()&&i.isPageTitleVisible()&&!i.isFullscreenLayout()&&((a=i.parentItems())==null?null:a.length)),l(),c("ngIf",!i.isSharingShowed()),l(),c("ngIf",(i.baseItem==null?null:i.baseItem.showShareButtons)&&!i.isSharingShowed()),l(),c("ngIf",i.formSubmitted()&&i.sourceFormId()),l(2),c("ngClass",i.orderClass),l(2),c("baseItem",i.baseItem)("ngClass",N(26,Ah,i.baseItem.timelinePosition))("tabs",i.tabs())("isSidebar",i.isSidebar)("routerDefaults",i.routerDefaults()),l(),c("baseItem",i.baseItem)("user",i.authentication())("routerDefaults",i.routerDefaults())("editStateByKey",i.editStateByKey()),l(),c("ngIf",!i.baseItem.messengerMode),l(),c("ngIf",i.isPoweredBy()),l(),c("ngIf",i.showBottomBar())}},dependencies:[H,R,_e,la,Ia,Jl,$l,Kl,Zl,Za,tl,pc,V],styles:[".isSidebarMode[_ngcontent-%COMP%]{container-name:sidebar;container-type:inline-size}[_nghost-%COMP%]     .ui.container.hazu-content-container{width:inherit}[_nghost-%COMP%]   .registerInvitedUser[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .map-view-sidebar[_ngcontent-%COMP%]   .hazu-content-container[_ngcontent-%COMP%]{border-left:1px solid silver;display:none!important;height:100vh;margin:0;position:absolute;right:0;top:0;width:30rem}[_nghost-%COMP%]   .map-view-sidebar[_ngcontent-%COMP%]   .hazu-content-container[_ngcontent-%COMP%]   .hz-sidebar[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .close-btn[_ngcontent-%COMP%]{cursor:pointer;position:absolute;right:1em;top:1.8em;z-index:500}@media screen{[_nghost-%COMP%]     .ui.ui.container.hazu-text-container{max-width:100%!important;padding-top:0;width:830px}}[_nghost-%COMP%]     .ui.container.hazu-table-container, [_nghost-%COMP%]     .ui.container.hazu-messenger-container{padding:0 10px;width:90%!important}[_nghost-%COMP%]     .hz-main-content   img, [_nghost-%COMP%]     .hz-main-content   table{margin-bottom:.5em;margin-top:.5em}[_nghost-%COMP%]     .hz-main-content   footer div, [_nghost-%COMP%]     .hz-main-content   footer div span, [_nghost-%COMP%]     .hz-main-content   p, [_nghost-%COMP%]     .hz-main-content   ul, [_nghost-%COMP%]     .hz-main-content   ol{font-size:1.1rem;letter-spacing:.01em;line-height:1.6em;margin-top:0}[_nghost-%COMP%]     .hz-main-content   table,   hz-container-editor   table{border-collapse:collapse;empty-cells:show;font-size:1.1rem;max-width:100%;overflow-x:auto;width:100%}[_nghost-%COMP%]     .hz-main-content   table caption,   hz-container-editor   table caption{color:#00000080;font-size:11px;padding:0;text-transform:uppercase}[_nghost-%COMP%]     .hz-main-content   table th, [_nghost-%COMP%]     .hz-main-content   table td,   hz-container-editor   table th,   hz-container-editor   table td{height:3em;line-height:1.5em;padding:.5rem!important}@container sidebar (max-width: 767px){[_nghost-%COMP%]     .hz-main-content   table th, [_nghost-%COMP%]     .hz-main-content   table td,   hz-container-editor   table th,   hz-container-editor   table td{height:inherit}}@media only screen and (max-width:767px){[_nghost-%COMP%]     .hz-main-content   table th, [_nghost-%COMP%]     .hz-main-content   table td,   hz-container-editor   table th,   hz-container-editor   table td{height:inherit}}[_nghost-%COMP%]     .hz-main-content   table th:empty, [_nghost-%COMP%]     .hz-main-content   table td:empty,   hz-container-editor   table th:empty,   hz-container-editor   table td:empty{line-height:.5em}[_nghost-%COMP%]     .hz-main-content   table tfoot th, [_nghost-%COMP%]     .hz-main-content   table tfoot td,   hz-container-editor   table tfoot th,   hz-container-editor   table tfoot td{color:#00000080}[_nghost-%COMP%]     .hz-sidebar   p{line-height:1.2em}[_nghost-%COMP%]     .hz-main-content   .large .title-segment   p{font-size:inherit}[_nghost-%COMP%]     .hz-main-content.table-content{position:relative}[_nghost-%COMP%]     .hazu-text-container-sticky-mode{margin-top:0!important}[_nghost-%COMP%]     .hazu-text-container-sticky-mode-video-player-minimized{margin-top:55px}[_nghost-%COMP%]     .ui.container.hazu.sidebar{-ms-overflow-style:-ms-autohiding-scrollbar;overflow-x:visible!important;padding-bottom:80px;padding-top:3px;width:30rem;z-index:200}@container sidebar (max-width: 767px){[_nghost-%COMP%]     .ui.container.hazu.sidebar{padding-bottom:3px}}@media only screen and (max-width:767px){[_nghost-%COMP%]     .ui.container.hazu.sidebar{padding-bottom:3px}}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){[_nghost-%COMP%]     .hazu.sidebar{transition:all .5s ease}  .opened .hazu.sidebar{transform:translate(360px)}}[_nghost-%COMP%]   .bottombarmargin[_ngcontent-%COMP%]{padding-bottom:80px}@media only screen and (max-width:992px){[_nghost-%COMP%]     .hazu.sidebar{margin-bottom:3em!important;position:relative;width:100%}[_nghost-%COMP%]     .hazu.sidebar .topbarmargin{margin-top:0}[_nghost-%COMP%]     .bottombarmargin{padding-bottom:0}[_nghost-%COMP%]     .sidebarmargin{margin-right:0}[_nghost-%COMP%]   .sidebarmargin[_ngcontent-%COMP%]   .hazu-sticky-bar[_ng
1content-%COMP%]{width:100%}}[_nghost-%COMP%]     .ui.list.hazu{padding-left:0}[_nghost-%COMP%]     hz-comment-list{display:flex;flex-flow:column nowrap;height:100%}@container sidebar (max-width: 767px){[_nghost-%COMP%]     hz-comment-list{width:100%}}@media only screen and (max-width:767px){[_nghost-%COMP%]     hz-comment-list{width:100%}}[_nghost-%COMP%]     .k-input.k-invalid+.k-invalid-msg{display:block!important}[_nghost-%COMP%]   hz-toolbar[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s}[_nghost-%COMP%]   hz-toolbar.hide[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .hazu-sticky-bar[_ngcontent-%COMP%]{position:absolute;width:100%}[_nghost-%COMP%]   .hazu-sticky-bar.hideToolbar[_ngcontent-%COMP%]   hz-video-player[_ngcontent-%COMP%], [_nghost-%COMP%]   .hazu-sticky-bar.hiddenToolbar[_ngcontent-%COMP%]   hz-video-player[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%]   .hazu-sticky-bar.hideToolbar[_ngcontent-%COMP%]   hz-toolbar[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .hazu-sticky-bar.hiddenToolbar[_ngcontent-%COMP%]   hz-toolbar[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%]   hz-video-player.toolbar-offset[_ngcontent-%COMP%]{margin-top:55px!important}[_nghost-%COMP%]   .close-btn[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%]   .hasActivityIndicator[_ngcontent-%COMP%]     hz-container-editor .ui.button{opacity:.45!important}.isSidebarMode[_nghost-%COMP%]{background-color:#fff;border-left:1px solid rgba(34,36,38,.15);box-shadow:0 1px 2px #22242626;height:calc(100vh - 57px);max-height:calc(100vh - 57px);overflow:hidden auto;position:absolute;right:0;top:57px}.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container{margin-top:0;min-height:calc(100% - 67px);padding:.5rem 1rem}@media only screen and (any-hover:hover)and (any-pointer:fine){@container sidebar (min-width: $large-breakpoint){.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container .regular:hover .accessories hz-item-icon-edit-button{display:block}}}@media only screen and (any-hover:hover)and (any-pointer:fine)and (min-width:992px){.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container .regular:hover .accessories hz-item-icon-edit-button{display:block}}@media only screen and (any-hover:hover)and (any-pointer:fine){.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container icon-info hz-item-icon-edit-button{visibility:hidden}}@container sidebar (max-width: $large-breakpoint){.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container icon-info hz-item-icon-edit-button{visibility:hidden}}@media only screen and (max-width:992px){.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container icon-info hz-item-icon-edit-button{visibility:hidden}}.isSidebarMode[_nghost-%COMP%]     .ui.container.hazu-content-container .accessories{padding-right:1rem}.isSidebarMode[_nghost-%COMP%]     hz-video-player{display:block;height:15vw;padding:0;position:-webkit-sticky;position:sticky;top:0;z-index:200}.isSidebarMode[_nghost-%COMP%]     hz-bottom-bar{bottom:0;max-width:inherit;position:-webkit-sticky;position:sticky;width:100%}.isSidebarMode[_nghost-%COMP%]     hz-bottom-bar .ui.bottom{bottom:initial;position:-webkit-sticky;position:sticky}.isSidebarMode[_nghost-%COMP%]     hz-bottom-bar .ui.bottom hz-chart{padding-bottom:0}.isSidebarMode[_nghost-%COMP%]     hz-bottom-bar .ui.bottom hz-chart .chart-view{height:63px;overflow:hidden}.isSidebarMode[_nghost-%COMP%]   .close-btn[_ngcontent-%COMP%]{display:block}@container sidebar (max-width: 767px){[_nghost-%COMP%]   .hazu-sticky-bar[_ngcontent-%COMP%]{position:unset}[_nghost-%COMP%]   .ui.container.hazu-content-container.hazu-scroll[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .hazu-text-container-sticky-mode[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   hz-video-player[_ngcontent-%COMP%]{position:relative;width:100%!important}[_nghost-%COMP%]   .ui.container.hazu-content-container[_ngcontent-%COMP%]{margin-top:calc(55px + .5em);width:auto!important}[_nghost-%COMP%]   .ui.container[_ngcontent-%COMP%]   .hz-sidebar[_ngcontent-%COMP%]{margin-bottom:1em!important}[_nghost-%COMP%]     .hazu-breadcrumb-item{display:none!important}[_nghost-%COMP%]     .section.active .lastitem{display:none}[_nghost-%COMP%]     .hz-main-content hz-item.large .item .itemContent{margin-bottom:1em}[_nghost-%COMP%]     .hz-main-content hz-item.large .item .footer{margin-bottom:1em}[_nghost-%COMP%]     .ui.horizontal.divider.header{margin:2em}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   .hazu.sidebar[_ngcontent-%COMP%]{padding-top:0}[_nghost-%COMP%]   .hz-main-content[_ngcontent-%COMP%]{margin-bottom:85px}[_nghost-%COMP%]     .container-list .poweredby{margin-bottom:2em;margin-top:2em!important}}@media only screen and (max-width:767px){[_nghost-%COMP%]   .hazu-sticky-bar[_ng
1content-%COMP%]{position:unset}[_nghost-%COMP%]   .ui.container.hazu-content-container.hazu-scroll[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .hazu-text-container-sticky-mode[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   hz-video-player[_ngcontent-%COMP%]{position:relative;width:100%!important}[_nghost-%COMP%]   .ui.container.hazu-content-container[_ngcontent-%COMP%]{margin-top:calc(55px + .5em);width:auto!important}[_nghost-%COMP%]   .ui.container[_ngcontent-%COMP%]   .hz-sidebar[_ngcontent-%COMP%]{margin-bottom:1em!important}[_nghost-%COMP%]     .hazu-breadcrumb-item{display:none!important}[_nghost-%COMP%]     .section.active .lastitem{display:none}[_nghost-%COMP%]     .hz-main-content hz-item.large .item .itemContent{margin-bottom:1em}[_nghost-%COMP%]     .hz-main-content hz-item.large .item .footer{margin-bottom:1em}[_nghost-%COMP%]     .ui.horizontal.divider.header{margin:2em}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   .hazu.sidebar[_ngcontent-%COMP%]{padding-top:0}[_nghost-%COMP%]   .hz-main-content[_ngcontent-%COMP%]{margin-bottom:85px}[_nghost-%COMP%]     .container-list .poweredby{margin-bottom:2em;margin-top:2em!important}}@container sidebar (max-width: 767px){[_nghost-%COMP%]   .ui.container.hazu-content-container[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:992px)and (orientation:portrait){[_nghost-%COMP%]   .ui.container.hazu-content-container.hazu-scroll[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .hazu-text-container-sticky-mode[_ngcontent-%COMP%]{margin-top:0!important}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   hz-video-player[_ngcontent-%COMP%]{position:relative!important}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   .ui.container.hazu-content-container[_ngcontent-%COMP%]{margin-top:0}[_nghost-%COMP%]   .video-player-minimized[_ngcontent-%COMP%]   .hazu.sidebar[_ngcontent-%COMP%]{padding-top:0}[_nghost-%COMP%]     .hz-main-content   table,   hz-container-editor   table{display:block}}.container-list[_ngcontent-%COMP%]{display:flex;flex-direction:column}.container-list[_ngcontent-%COMP%]   .divider.divider-unplaced[_ngcontent-%COMP%]{display:none}.container-list[_ngcontent-%COMP%]   .poweredby[_ngcontent-%COMP%]{margin-top:5em;order:4}.container-list[_ngcontent-%COMP%]   .poweredby[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{text-align:center}.container-list[_ngcontent-%COMP%]   .poweredby[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{min-width:initial;width:3em}.container-list[_ngcontent-%COMP%]   .poweredby[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{font-weight:700}.autodate-timeline-newest[_ngcontent-%COMP%]   .newItemButtonsContainer[_ngcontent-%COMP%]{order:1}.autodate-timeline-newest[_ngcontent-%COMP%]   .unplaced[_ngcontent-%COMP%]{order:3}.autodate-timeline-newest[_ngcontent-%COMP%]   .placed[_ngcontent-%COMP%]{order:2}.autodate-timeline-newest[_ngcontent-%COMP%]   .divider.divider-unplaced[_ngcontent-%COMP%]{display:inline;order:3}
1.autodate-timeline-oldest[_ngcontent-%COMP%]   .newItemButtonsContainer[_ngcontent-%COMP%]{order:2}.autodate-timeline-oldest[_ngcontent-%COMP%]   .unplaced[_ngcontent-%COMP%]{order:3}.autodate-timeline-oldest[_ngcontent-%COMP%]   .placed[_ngcontent-%COMP%]{order:1}.timeline-unplaced[_ngcontent-%COMP%]   .newItemButtonsContainer[_ngcontent-%COMP%]{order:3}.timeline-unplaced[_ngcontent-%COMP%]   .unplaced[_ngcontent-%COMP%]{order:2}.timeline-unplaced[_ngcontent-%COMP%]   .placed[_ngcontent-%COMP%]{order:1}.timeline-unplaced[_ngcontent-%COMP%]   .divider.divider-unplaced[_ngcontent-%COMP%]{display:inline;order:2}.autodate-oldest-timeline[_ngcontent-%COMP%]   .newItemButtonsContainer[_ngcontent-%COMP%]{order:3}.autodate-oldest-timeline[_ngcontent-%COMP%]   .unplaced[_ngcontent-%COMP%]{order:1}.autodate-oldest-timeline[_ngcontent-%COMP%]   .placed[_ngcontent-%COMP%], .autodate-newest-timeline[_ngcontent-%COMP%]   .newItemButtonsContainer[_ngcontent-%COMP%]{order:2}.autodate-newest-timeline[_ngcontent-%COMP%]   .unplaced[_ngcontent-%COMP%]{order:1}.autodate-newest-timeline[_ngcontent-%COMP%]   .placed[_ngcontent-%COMP%]{order:3}.margin-top-15[_ngcontent-%COMP%]{margin-top:15px}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) icon-info{cursor:grab}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) icon-info:hover{cursor:grab}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-icon, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-play-and-progress-icon, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-icon-by-state{cursor:grab}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-icon:hover, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-play-and-progress-icon:hover, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed:not(.has-date) hz-icon-by-state:hover{cursor:grab}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed.has-date icon-info{cursor:default}[_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed.has-date hz-icon, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed.has-date hz-play-and-progress-icon, [_nghost-%COMP%]   .calendar-view-draggable[_ngcontent-%COMP%]     hz-item-detailed.has-date hz-icon-by-state{cursor:default}[_nghost-%COMP%]     .edit-response-link{text-decoration:underline}"],changeDetection:0}));let n=r;return n})();export{yl as a,he as b,Xn as c,jd as d,Qf as e,Tl as f,i_ as g,k_ as h,H_ as i,Ql as j,Jl as k,wn as l,tc as m,Tn as n,mc as o,RI as p,ru as q,su as r,au as s};

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.