@veltdev/sdk-staging 4.5.2-beta.15 → 4.5.2-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/velt.js +2 -2
package/velt.js CHANGED
@@ -1,4 +1,4 @@
1
- var SNIPPYLY_VERSION = '4.5.2-beta.15';
1
+ var SNIPPYLY_VERSION = '4.5.2-beta.16';
2
2
  (function(m,w){"use strict";function rt(){var e=K.splice(0,K.length);for(ie=0;e.length;)e.shift().call(null,e.shift())}function me(e,t){for(var n=0,r=e.length;n<r;n++)Te(e[n],t)}function ot(e){for(var t,n=0,r=e.length;n<r;n++)t=e[n],U(t,q[pe(t)])}function fe(e){return function(t){Lt(t)&&(Te(t,e),L.length&&me(t.querySelectorAll(L),e))}}function pe(e){var t=le.call(e,"is"),n=e.nodeName.toUpperCase(),r=v.call(D,t?Y+t.toUpperCase():x+n);return t&&-1<r&&!De(n,t)?-1:r}function De(e,t){return-1<L.indexOf(e+'[is="'+t+'"]')}function Ie(e){var t=e.currentTarget,n=e.attrChange,r=e.attrName,o=e.target,l=e[W]||2,a=e[He]||3;!ce||o&&o!==t||!t[y]||r==="style"||e.prevValue===e.newValue&&(e.newValue!==""||n!==l&&n!==a)||t[y](r,n===l?null:e.prevValue,n===a?null:e.newValue)}function Fe(e){var t=fe(e);return function(n){K.push(t,n.target),ie&&clearTimeout(ie),ie=setTimeout(rt,1)}}function de(e){nt&&(nt=!1,e.currentTarget.removeEventListener(Ze,de)),L.length&&me((e.target||u).querySelectorAll(L),e.detail===E?E:b),R&&at()}function lt(e,t){var n=this;Ye.call(n,e,t),Me.call(n,{target:n})}function Se(e,t,n){var r=t.apply(e,n),o=pe(r);return-1<o&&U(r,q[o]),n.pop()&&L.length&&ot(r.querySelectorAll(L)),r}function he(e,t){Tt(e,t),$?$.observe(e,gt):(ue&&(e.setAttribute=lt,e[H]=Ee(e),e[g](st,Me)),e[g](N,Ie)),e[k]&&ce&&(e.created=!0,e[k](),e.created=!1)}function at(){for(var e,t=0,n=G.length;t<n;t++)e=G[t],V.contains(e)||(n--,G.splice(t--,1),Te(e,E))}function Ve(e){throw new Error("A "+e+" type is already registered")}function Te(e,t){var n,r,o=pe(e);-1<o&&!Mt.call(e,"TEMPLATE")&&(Q(e,q[o]),o=0,t!==b||e[b]?t!==E||e[E]||(e[b]=!1,e[E]=!0,r="disconnected",o=1):(e[E]=!1,e[b]=!0,r="connected",o=1,R&&v.call(G,e)<0&&G.push(e)),o&&(n=e[t+O]||e[r+O])&&n.call(e))}function z(){}function Pe(e,t,n){var r=n&&n[_]||"",o=t.prototype,l=Ce(o),a=t.observedAttributes||ye,s={prototype:l};oe(l,k,{value:function(){if(te)te=!1;else if(!this[B]){this[B]=!0,new t(this),o[k]&&o[k].call(this);var i=j[ne.get(t)];(!Z||i.create.length>1)&&_e(this)}}}),oe(l,y,{value:function(i){-1<v.call(a,i)&&o[y]&&o[y].apply(this,arguments)}}),o[qe]&&oe(l,ut,{value:o[qe]}),o[Be]&&oe(l,ct,{value:o[Be]}),r&&(s[_]=r),e=e.toUpperCase(),j[e]={constructor:t,create:r?[r,re(e)]:[e]},ne.set(t,e),u[S](e.toLowerCase(),s),Le(e),P[e].r()}function Re(e){var t=j[e.toUpperCase()];return t&&t.constructor}function Ue(e){return typeof e=="string"?e:e&&e.is||""}function _e(e){for(var t,n=e[y],r=n?e.attributes:ye,o=r.length;o--;)t=r[o],n.call(e,t.name||t.nodeName,null,t.value||t.nodeValue)}function Le(e){return e=e.toUpperCase(),e in P||(P[e]={},P[e].p=new Xe(function(t){P[e].r=t})),P[e].p}function ke(){C&&delete m.customElements,I(m,"customElements",{configurable:!0,value:new z}),I(m,"CustomElementRegistry",{configurable:!0,value:z});for(var e=it.get(/^HTML[A-Z]*[a-z]/),t=e.length;t--;function(n){var r=m[n];if(r){m[n]=function(o){var l,a;return o||(o=this),o[B]||(te=!0,l=j[ne.get(o.constructor)],a=Z&&l.create.length===1,o=a?Reflect.construct(r,ye,l.constructor):u.createElement.apply(u,l.create),o[B]=!0,te=!1,a||_e(o)),o},m[n].prototype=r.prototype;try{r.prototype.constructor=m[n]}catch{dt=!0,I(r,B,{value:m[n]})}}}(e[t]));u.createElement=function(n,r){var o=Ue(r);return o?Ae.call(this,n,re(o)):Ae.call(this,n)},et||(Oe=!0,u[S](""))}var u=m.document,T=m.Object,it=function(e){var t,n,r,o,l=/^[A-Z]+[a-z]/,a=function(p){var f,h=[];for(f in i)p.test(f)&&h.push(f);return h},s=function(p,f){(f=f.toLowerCase())in i||(i[p]=(i[p]||[]).concat(f),i[f]=i[f.toUpperCase()]=p)},i=(T.create||T)(null),c={};for(n in e)for(o in e[n])for(r=e[n][o],i[o]=r,t=0;t<r.length;t++)i[r[t].toLowerCase()]=i[r[t].toUpperCase()]=o;return c.get=function(p){return typeof p=="string"?i[p]||(l.test(p)?[]:""):a(p)},c.set=function(p,f){return l.test(p)?s(p,f):s(f,p),c},c}({collections:{HTMLAllCollection:["all"],HTMLCollection:["forms"],HTMLFormControlsCollection:["elements"],HTMLOptionsCollection:["options"]},elements:{Element:["element"],HTMLAnchorElement:["a"],HTMLAppletElement:["applet"],HTMLAreaElement:["area"],HTMLAttachmentElement:["attachment"],HTMLAudioElement:["audio"],HTMLBRElement:["br"],HTMLBaseElement:["base"],HTMLBodyElement:["body"],HTMLButtonElement:["button"],HTMLCanvasElement:["canvas"],HTMLContentElement:["content"],HTMLDListElement:["dl"],HTMLDataElement:["data"],HTMLDataListElement:["datalist"],HTMLDetailsElement:["details"],HTMLDialogElement:["dialog"],HTMLDirectoryElement:["dir"],HTMLDivElement:["div"],HTMLDocument:["document"],HTMLElement:["element","abbr","address","article","aside","b","bdi","bdo","cite","code","command","dd","dfn","dt","em","figcaption","figure","footer","header","i","kbd","mark","nav","noscript","rp","rt","ruby","s","samp","section","small","strong","sub","summary","sup","u","var","wbr"],HTMLEmbedElement:["embed"],HTMLFieldSetElement:["fieldset"],HTMLFontElement:["font"],HTMLFormElement:["form"],HTMLFrameElement:["frame"],HTMLFrameSetElement:["frameset"],HTMLHRElement:["hr"],HTMLHeadElement:["head"],HTMLHeadingElement:["h1","h2","h3","h4","h5","h6"],HTMLHtmlElement:["html"],HTMLIFrameElement:["iframe"],HTMLImageElement:["img"],HTMLInputElement:["input"],HTMLKeygenElement:["keygen"],HTMLLIElement:["li"],HTMLLabelElement:["label"],HTMLLegendElement:["legend"],HTMLLinkElement:["link"],HTMLMapElement:["map"],HTMLMarqueeElement:["marquee"],HTMLMediaElement:["media"],HTMLMenuElement:["menu"],HTMLMenuItemElement:["menuitem"],HTMLMetaElement:["meta"],HTMLMeterElement:["meter"],HTMLModElement:["del","ins"],HTMLOListElement:["ol"],HTMLObjectElement:["object"],HTMLOptGroupElement:["optgroup"],HTMLOptionElement:["option"],HTMLOutputElement:["output"],HTMLParagraphElement:["p"],HTMLParamElement:["param"],HTMLPictureElement:["picture"],HTMLPreElement:["pre"],HTMLProgressElement:["progress"],HTMLQuoteElement:["blockquote","q","quote"],HTMLScriptElement:["script"],HTMLSelectElement:["select"],HTMLShadowElement:["shadow"],HTMLSlotElement:["slot"],HTMLSourceElement:["source"],HTMLSpanElement:["span"],HTMLStyleElement:["style"],HTMLTableCaptionElement:["caption"],HTMLTableCellElement:["td","th"],HTMLTableColElement:["col","colgroup"],HTMLTableElement:["table"],HTMLTableRowElement:["tr"],HTMLTableSectionElement:["thead","tbody","tfoot"],HTMLTemplateElement:["template"],HTMLTextAreaElement:["textarea"],HTMLTimeElement:["time"],HTMLTitleElement:["title"],HTMLTrackElement:["track"],HTMLUListElement:["ul"],HTMLUnknownElement:["unknown","vhgroupv","vkeygen"],HTMLVideoElement:["video"]},nodes:{Attr:["node"],Audio:["audio"],CDATASection:["node"],CharacterData:["node"],Comment:["#comment"],Document:["#document"],DocumentFragment:["#document-fragment"],DocumentType:["node"],HTMLDocument:["#document"],Image:["img"],Option:["option"],ProcessingInstruction:["node"],ShadowRoot:["#shadow-root"],Text:["#text"],XMLDocument:["xml"]}});typeof w!="object"&&(w={type:w||"auto"});var K,Me,X,Ee,$,ve,Q,U,A,S="registerElement",xe=1e5*m.Math.random()>>0,H="__"+S+xe,g="addEventListener",b="attached",O="Callback",E="detached",_="extends",y="attributeChanged"+O,ut=b+O,qe="connected"+O,Be="disconnected"+O,k="created"+O,ct=E+O,W="ADDITION",He="REMOVAL",N="DOMAttrModified",Ze="DOMContentLoaded",st="DOMSubtreeModified",x="<",Y="=",mt=/^[A-Z][._A-Z0-9]*-[-._A-Z0-9]*$/,ft=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],D=[],q=[],L="",V=u.documentElement,v=D.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},ge=T.prototype,be=ge.hasOwnProperty,J=ge.isPrototypeOf,I=T.defineProperty,ye=[],ee=T.getOwnPropertyDescriptor,je=T.getOwnPropertyNames,pt=T.getPrototypeOf,Ge=T.setPrototypeOf,ze=!!T.__proto__,dt=!1,B="__dreCEv1",C=m.customElements,Z=!/^force/.test(w.type)&&!!(C&&C.define&&C.get&&C.whenDefined),Ke=T.create||T,ht=m.Map||function(){var e,t=[],n=[];return{get:function(r){return n[v.call(t,r)]},set:function(r,o){e=v.call(t,r),e<0?n[t.push(r)-1]=o:n[e]=o}}},Xe=m.Promise||function(e){function t(l){for(r=!0;n.length;)n.shift()(l)}var n=[],r=!1,o={catch:function(){return o},then:function(l){return n.push(l),r&&setTimeout(t,1),o}};return e(t),o},te=!1,j=Ke(null),P=Ke(null),ne=new ht,re=function(e){return e.toLowerCase()},Ce=T.create||function e(t){return t?(e.prototype=t,new e):this},Tt=Ge||(ze?function(e,t){return e.__proto__=t,e}:je&&ee?function(){function e(t,n){for(var r,o=je(n),l=0,a=o.length;l<a;l++)r=o[l],be.call(t,r)||I(t,r,ee(n,r))}return function(t,n){do e(t,n);while((n=pt(n))&&!J.call(n,t));return t}}():function(e,t){for(var n in t)e[n]=t[n];return e}),F=m.MutationObserver||m.WebKitMutationObserver,$e=m.HTMLAnchorElement,d=(m.HTMLElement||m.Element||m.Node).prototype,R=!J.call(d,V),oe=R?function(e,t,n){return e[t]=n.value,e}:I,Lt=R?function(e){return e.nodeType===1}:function(e){return J.call(d,e)},G=R&&[],Qe=d.attachShadow,We=d.cloneNode,Mt=d.closest||function(e){for(var t=this;t&&t.nodeName!==e;)t=t.parentNode;return t},we=d.dispatchEvent,le=d.getAttribute,Et=d.hasAttribute,vt=d.removeAttribute,Ye=d.setAttribute,ae=u.createElement,Ht=u.importNode,Ae=ae,gt=F&&{attributes:!0,characterData:!0,attributeOldValue:!0},Je=F||function(e){ue=!1,V.removeEventListener(N,Je)},ie=0,et=S in u&&!/^force-all/.test(w.type),tt=!0,Oe=!1,ue=!0,nt=!0,ce=!0;if(F&&(A=u.createElement("div"),A.innerHTML="<div><div></div></div>",new F(function(e,t){if(e[0]&&e[0].type=="childList"&&!e[0].removedNodes[0].childNodes.length){A=ee(d,"innerHTML");var n=A&&A.set;n&&I(d,"innerHTML",{set:function(r){for(;this.lastChild;)this.removeChild(this.lastChild);n.call(this,r)}})}t.disconnect(),A=null}).observe(A,{childList:!0,subtree:!0}),A.innerHTML=""),et||(Ge||ze?(Q=function(e,t){J.call(t,e)||he(e,t)},U=he):(Q=function(e,t){e[H]||(e[H]=T(!0),he(e,t))},U=Q),R?(ue=!1,function(){var e=ee(d,g),t=e.value,n=function(l){var a=new CustomEvent(N,{bubbles:!0});a.attrName=l,a.prevValue=le.call(this,l),a.newValue=null,a[He]=a.attrChange=2,vt.call(this,l),we.call(this,a)},r=function(l,a){var s=Et.call(this,l),i=s&&le.call(this,l),c=new CustomEvent(N,{bubbles:!0});Ye.call(this,l,a),c.attrName=l,c.prevValue=s?i:null,c.newValue=a,s?c.MODIFICATION=c.attrChange=1:c[W]=c.attrChange=0,we.call(this,c)},o=function(l){var a,s=l.currentTarget,i=s[H],c=l.propertyName;i.hasOwnProperty(c)&&(i=i[c],a=new CustomEvent(N,{bubbles:!0}),a.attrName=i.name,a.prevValue=i.value||null,a.newValue=i.value=s[c]||null,a.prevValue==null?a[W]=a.attrChange=0:a.MODIFICATION=a.attrChange=1,we.call(s,a))};e.value=function(l,a,s){l===N&&this[y]&&this.setAttribute!==r&&(this[H]={className:{name:"class",value:this.className}},this.setAttribute=r,this.removeAttribute=n,t.call(this,"propertychange",o)),t.call(this,l,a,s)},I(d,g,e)}()):F||(V[g](N,Je),V.setAttribute(H,1),V.removeAttribute(H),ue&&(Me=function(e){var t,n,r,o=this;if(o===e.target){t=o[H],o[H]=n=Ee(o);for(r in n){if(!(r in t))return X(0,o,r,t[r],n[r],W);if(n[r]!==t[r])return X(1,o,r,t[r],n[r],"MODIFICATION")}for(r in t)if(!(r in n))return X(2,o,r,t[r],n[r],He)}},X=function(e,t,n,r,o,l){var a={attrChange:e,currentTarget:t,attrName:n,prevValue:r,newValue:o};a[l]=e,Ie(a)},Ee=function(e){for(var t,n,r={},o=e.attributes,l=0,a=o.length;l<a;l++)t=o[l],(n=t.name)!=="setAttribute"&&(r[n]=t.value);return r})),u[S]=function(e,t){if(n=e.toUpperCase(),tt&&(tt=!1,F?($=function(i,c){function p(f,h){for(var M=0,se=f.length;M<se;h(f[M++]));}return new F(function(f){for(var h,M,se,Ne=0,bt=f.length;Ne<bt;Ne++)h=f[Ne],h.type==="childList"?(p(h.addedNodes,i),p(h.removedNodes,c)):(M=h.target,ce&&M[y]&&h.attributeName!=="style"&&(se=le.call(M,h.attributeName))!==h.oldValue&&M[y](h.attributeName,h.oldValue,se))})}(fe(b),fe(E)),ve=function(i){return $.observe(i,{childList:!0,subtree:!0}),i},ve(u),Qe&&(d.attachShadow=function(){return ve(Qe.apply(this,arguments))})):(K=[],u[g]("DOMNodeInserted",Fe(b)),u[g]("DOMNodeRemoved",Fe(E))),u[g](Ze,de),u[g]("readystatechange",de),u.importNode=function(i,c){switch(i.nodeType){case 1:return Se(u,Ht,[i,!!c]);case 11:for(var p=u.createDocumentFragment(),f=i.childNodes,h=f.length,M=0;M<h;M++)p.appendChild(u.importNode(f[M],!!c));return p;default:return We.call(i,!!c)}},d.cloneNode=function(i){return Se(this,We,[!!i])}),Oe)return Oe=!1;if(-2<v.call(D,Y+n)+v.call(D,x+n)&&Ve(e),!mt.test(n)||-1<v.call(ft,n))throw new Error("The type "+e+" is invalid");var n,r,o=function(){return a?u.createElement(s,n):u.createElement(s)},l=t||ge,a=be.call(l,_),s=a?t[_].toUpperCase():n;return a&&-1<v.call(D,x+s)&&Ve(s),r=D.push((a?Y:x)+n)-1,L=L.concat(L.length?",":"",a?s+'[is="'+e.toLowerCase()+'"]':s),o.prototype=q[r]=be.call(l,"prototype")?l.prototype:Ce(d),L.length&&me(u.querySelectorAll(L),b),o},u.createElement=Ae=function(e,t){var n=Ue(t),r=n?ae.call(u,e,re(n)):ae.call(u,e),o=""+e,l=v.call(D,(n?Y:x)+(n||o).toUpperCase()),a=-1<l;return n&&(r.setAttribute("is",n=n.toLowerCase()),a&&(a=De(o.toUpperCase(),n))),ce=!u.createElement.innerHTMLHelper,a&&U(r,q[l]),r}),addEventListener("beforeunload",function(){delete u.createElement,delete u.importNode,delete u[S]},!1),z.prototype={constructor:z,define:Z?function(e,t,n){if(n)Pe(e,t,n);else{var r=e.toUpperCase();j[r]={constructor:t,create:[r]},ne.set(t,r),C.define(e,t)}}:Pe,get:Z?function(e){return C.get(e)||Re(e)}:Re,whenDefined:Z?function(e){return Xe.race([C.whenDefined(e),Le(e)])}:Le},!C||/^force/.test(w.type))ke();else if(!w.noBuiltIn)try{(function(e,t,n){var r=new RegExp(`^<a\\s+is=('|")`+n+"\\1></a>$");if(t[_]="a",e.prototype=Ce($e.prototype),e.prototype.constructor=e,m.customElements.define(n,e,t),!r.test(u.createElement("a",{is:n}).outerHTML)||!r.test(new e().outerHTML))throw t})(function e(){return Reflect.construct($e,[],e)},{},"document-register-element-a"+xe)}catch{ke()}if(!w.noBuiltIn)try{if(ae.call(u,"a","a").outerHTML.indexOf("is")<0)throw{}}catch{re=function(t){return{is:t.toLowerCase()}}}})(window);
3
3
 
4
4
  var P_e=Object.create;var bO=Object.defineProperty,M_e=Object.defineProperties,k_e=Object.getOwnPropertyDescriptor,R_e=Object.getOwnPropertyDescriptors,N_e=Object.getOwnPropertyNames,SO=Object.getOwnPropertySymbols,OW=Object.getPrototypeOf,R7=Object.prototype.hasOwnProperty,AW=Object.prototype.propertyIsEnumerable,F_e=Reflect.get;var wW=(i,o,n)=>o in i?bO(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,I=(i,o)=>{for(var n in o||={})R7.call(o,n)&&wW(i,n,o[n]);if(SO)for(var n of SO(o))AW.call(o,n)&&wW(i,n,o[n]);return i},T=(i,o)=>M_e(i,R_e(o));var N7=(i,o)=>{var n={};for(var e in i)R7.call(i,e)&&o.indexOf(e)<0&&(n[e]=i[e]);if(i!=null&&SO)for(var e of SO(i))o.indexOf(e)<0&&AW.call(i,e)&&(n[e]=i[e]);return n};var L_e=(i,o)=>()=>(o||i((o={exports:{}}).exports,o),o.exports),IO=(i,o)=>{for(var n in o)bO(i,n,{get:o[n],enumerable:!0})},B_e=(i,o,n,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of N_e(o))!R7.call(i,t)&&t!==n&&bO(i,t,{get:()=>o[t],enumerable:!(e=k_e(o,t))||e.enumerable});return i};var PW=(i,o,n)=>(n=i!=null?P_e(OW(i)):{},B_e(o||!i||!i.__esModule?bO(n,"default",{value:i,enumerable:!0}):n,i));var Qm=(i,o,n)=>F_e(OW(i),n,o);var Q=(i,o,n)=>new Promise((e,t)=>{var r=c=>{try{s(n.next(c))}catch(p){t(p)}},a=c=>{try{s(n.throw(c))}catch(p){t(p)}},s=c=>c.done?e(c.value):Promise.resolve(c.value).then(r,a);s((n=n.apply(i,o)).next())});var qG=L_e((n0o,WG)=>{"use strict";var It={};It.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)};It.localCName=It.generateIdentifier();It.splitLines=function(i){return i.trim().split(`
@@ -509,7 +509,7 @@ This typically indicates that your device does not have a healthy Internet conne
509
509
  `,r=e.selectedAttachments?.length>0||e.attachmentsToDelete?.length>0,a=e.localRecordedData?.length>0||e.recorderInitConfig&&e.recorderInitConfig?.panelId===e.commentDialogUniqueId;return t||r||a}catch(e){return this.catchError("Error in CommentDialogComponent hasComposerContent: ",e),!1}}onPointerOutCommentDialog(e){try{this.componentConfigSignal().commentsContainer?.nativeElement?.contains(e?.relatedTarget)||this.pointerOutFromCommentDialog.next(e)}catch(t){this.catchError("Error in CommentDialogComponent onPointerOutCommentDialog: ",t)}}onPointerUp(){try{this.pointerUp.next()}catch(e){this.catchError("Error in CommentDialogComponent onPointerUp: ",e)}}onMoreRepliesClick(){try{this.analyticsService.trackEvent(Z.Events.Comments.COMMENT_MORE_REPLY_OPTION_CLICKED,{annotationId:this.componentConfigSignal().annotation?.annotationId,commentType:this.commentService.getCommentType(this.componentConfigSignal().annotation),uiLocation:this.componentConfigSignal().sidebarMode?"sidebar":"dialog",commentMode:this.commentService.getCommentMode()}),this.componentConfigSignal.update(e=>(e=T(I({},e),{showAllComments:!e.showAllComments}),e))}catch(e){this.catchError("Error in CommentDialogComponent onMoreRepliesClick: ",e)}}checkCommentDialogSelected(){try{let e=this.componentConfigSignal().commentPinSelected,t=this.componentConfigSignal().fullExpanded,r=e||t;r!==this.componentConfigSignal().commentDialogSelected&&this.componentConfigSignal.update(a=>(a=T(I({},a),{commentDialogSelected:r}),a))}catch(e){this.catchError("Error in CommentDialogComponent checkCommentDialogSelected: ",e)}}checkIsKnownUser(){try{this.componentConfigSignal().user&&!this.componentConfigSignal().user?.isReadOnly&&!this.componentConfigSignal().user?.isAnonymous?this.componentConfigSignal.update(e=>(e=T(I({},e),{isKnownUser:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{isKnownUser:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkIsKnownUser: ",e)}}checkDialogSelectedByKnownUser(){try{this.componentConfigSignal().user&&this.componentConfigSignal().isKnownUser?this.componentConfigSignal.update(e=>(e=T(I({},e),{dialogSelectedByKnownUser:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{dialogSelectedByKnownUser:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkDialogSelectedByKnownUser: ",e)}}checkCanResolveAnnotation(){try{this.componentConfigSignal().annotation&&!this.componentConfigSignal().disabled&&this.componentConfigSignal().enableResolve&&this.componentConfigSignal().dialogSelectedByKnownUser&&this.componentConfigSignal().annotation?.status?.type!=="terminal"&&!this.componentConfigSignal().isPlanExpired?this.componentConfigSignal.update(e=>(e=T(I({},e),{canResolveAnnotation:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{canResolveAnnotation:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkCanResolveAnnotation: ",e)}}checkCanUnresolveAnnotation(){try{this.componentConfigSignal().annotation&&!this.componentConfigSignal().disabled&&this.componentConfigSignal().enableResolve&&this.componentConfigSignal().dialogSelectedByKnownUser&&this.componentConfigSignal().annotation?.status?.type==="terminal"&&!this.componentConfigSignal().isPlanExpired?this.componentConfigSignal.update(e=>(e=T(I({},e),{canUnresolveAnnotation:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{canUnresolveAnnotation:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkCanUnresolveAnnotation: ",e)}}checkGetAnnotationDraftAttribute(){try{this.componentConfigSignal().newCommentTextArea?.nativeElement?.innerText&&this.componentConfigSignal().newCommentTextArea?.nativeElement?.innerText!==`
510
510
  `||this.componentConfigSignal().editCommentTextArea?.nativeElement?.innerText&&this.componentConfigSignal().editCommentTextArea?.nativeElement?.innerText!==`
511
511
  `||this.componentConfigSignal().selectedAttachments?.length||this.componentConfigSignal().attachmentsToDelete?.length||this.componentConfigSignal().recorderInitConfig&&this.componentConfigSignal().recorderInitConfig?.panelId===this.componentConfigSignal().commentDialogUniqueId||this.componentConfigSignal().localRecordedData?.length?this.componentConfigSignal.update(e=>(e=T(I({},e),{getAnnotationDraftAttribute:e.annotation?.annotationId}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{getAnnotationDraftAttribute:null}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkGetAnnotationDraftAttribute: ",e)}}checkShowGhostCommentMessage(){try{this.componentConfigSignal().ghostComment&&this.componentConfigSignal().enableGhostCommentsMessage&&![this.componentConfigSignal().commentAcceptedStatus?.id,this.componentConfigSignal().commentRejectedStatus?.id].includes(this.componentConfigSignal().annotation?.status?.id)?this.componentConfigSignal.update(e=>(e=T(I({},e),{showGhostCommentMessage:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{showGhostCommentMessage:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkShowGhostCommentMessage: ",e)}}checkShowSuggestionModeActions(){try{this.componentConfigSignal().suggestionMode&&this.componentConfigSignal().dialogSelectedByKnownUser&&this.componentConfigSignal().annotation?.status?.type!=="terminal"&&this.componentConfigSignal().annotation?.comments?.length?this.componentConfigSignal.update(e=>(e=T(I({},e),{showSuggestionModeActions:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{showSuggestionModeActions:!1}),e))}catch(e){this.catchError("Error in CommentDialogComponent checkShowSuggestionModeActions: ",e)}}ngOnDestroy(){super.ngOnDestroy(),this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.removeLinkClickListeners(),this.veltDynamicComponents.forEach(e=>{e.destroy()}),this.subscriptions.map(e=>{e.unsubscribe()}),this.domService.setRecordingInProgress(this.componentConfigSignal().annotation?.annotationId,!1),this.subscriptions=[],this.componentConfigSignal().recorderInitConfig?.panelId===this.componentConfigSignal().commentDialogUniqueId&&this.recorderService.clearRecording(),this.resizeObserver&&this.componentConfigSignal().commentsContainer?.nativeElement&&this.resizeObserver.unobserve(this.componentConfigSignal().commentsContainer?.nativeElement),clearTimeout(this.escapePressTimeout),this.componentConfigSignal().getAnnotationDraftAttribute&&this.commentService.getDraftMode()&&!this.componentConfigSignal().editComment&&this.componentConfigSignal().getAnnotationDraftAttribute&&this.addComment(void 0,!0)}catch(e){this.catchError("Error in CommentDialogComponent unsubscribe: ",e)}}closeDialog(){try{this.domService.resetSelectedAnnotationsMap()}catch(e){this.catchError("Error in CommentDialogComponent closeDialog: ",e)}}openDropdownIndex(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{openDropdownIndexValue:e}),t))}catch(t){this.catchError("Error in CommentDialogComponent openDropdownIndex: ",t)}}navigateToCommentEmit(){try{this.onCommentNavigationButtonClick.emit(this.componentConfigSignal().annotation)}catch(e){this.catchError("Error in CommentDialogComponent navigateToComment: ",e)}}moveCursorToEnd(e){try{if(!e?.isConnected)return;e.focus(),setTimeout(()=>{let t=document.createRange(),r=window.getSelection();t.selectNodeContents(e),t.collapse(!1),r?.removeAllRanges(),r?.addRange(t),setTimeout(()=>{this.autoScrollToBottom(e)},50)},0)}catch(t){this.catchError("Error in CommentDialogComponent moveCursorToEnd: ",t)}}focusOnComposerInput(){try{this.onComposerClick(),this.composerFocused.emit();let e=_ae();this.componentConfigSignal().newCommentTextArea?.nativeElement&&(this.componentConfigSignal().newCommentTextArea.nativeElement?.contains(e)||this.moveCursorToEnd(this.componentConfigSignal().newCommentTextArea.nativeElement)),this.componentConfigSignal().editCommentTextArea?.nativeElement&&(this.componentConfigSignal().editCommentTextArea.nativeElement?.contains(e)||this.moveCursorToEnd(this.componentConfigSignal().editCommentTextArea.nativeElement))}catch(e){this.catchError("Error in CommentDialogComponent focusOnComposerInput: ",e)}}onComposerClick(){try{this.composerFocused.emit(),this.commentActionsService?.onComposerClick({commentAnnotation:this.componentConfigSignal().annotation}),this.componentConfigSignal().commentPinSelected||(this.componentConfigSignal().sidebarMode?this.domService.toggleAnnotationSelection(this.componentConfigSignal().annotation,this.componentConfigSignal().containerComponentId,"sidebarShowReplies"):this.domService.toggleAnnotationSelection(this.componentConfigSignal().annotation,this.componentConfigSignal().containerComponentId))}catch(e){this.catchError("Error in CommentDialogComponent onComposerClick: ",e)}}getCurrentDialogView(){try{let e={};if(this.componentConfigSignal().annotation?.annotationId){let t=this.componentConfigSignal().commentViews?.[this.componentConfigSignal().annotation?.annotationId]?.comments;Object.keys(t||{}).forEach(r=>{let a=[],s=0;Object.keys(t[r]?.views||{}).forEach(c=>{let p={};p.user=this.componentConfigSignal().userContactsBySnippylyId?.[c],p.viewedAt=t[r]?.views?.[c]?.timestamp,p.user?.userId!==this.componentConfigSignal().user?.userId&&p.user?.userId!==this.componentConfigSignal().annotation?.from?.userId&&(a.push(p),(p.user?.email||p.user?.name)&&s++)}),e[r]={count:s,views:a}})}this.componentConfigSignal.update(t=>(t=T(I({},t),{currentDialogView:e}),t))}catch(e){this.catchError("Error in CommentDialogComponent getCurrentDialogView: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(we),h(di),h(h9),h(xi),h(Be),h(Sn),h(Ws),h(S_),h(y),h(Zo),h(fn),h(rr),h(cs),h(qe),h(R),h(Ji),h(ze),h(st),h(hn),h(Jt),h(Sc,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-dialog"]],viewQuery:function(t,r){if(t&1&&(nt(jYt,5),nt($Yt,5),nt(HYt,5),nt(_0e,7),nt(_0e,5,_i)),t&2){let a;Xe(a=Qe())&&(r.commentsContainer=a.first),Xe(a=Qe())&&(r.newCommentTextArea=a.first),Xe(a=Qe())&&(r.editCommentTextArea=a.first),Xe(a=Qe())&&(r.hostElement=a.first),Xe(a=Qe())&&(r.hostViewContainer=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{snippylyReadId:"snippylyReadId",screenshotDomain:"screenshotDomain",annotationIndex:"annotationIndex",userContacts:"userContacts",annotation:"annotation",multiThreadAnnotationId:"multiThreadAnnotationId",user:"user",dialogMode:"dialogMode",sidebarMode:"sidebarMode",fullExpanded:"fullExpanded",inboxMode:"inboxMode",multiThread:"multiThread",inlineCommentMode:"inlineCommentMode",inlineCommentSectionMode:"inlineCommentSectionMode",commentComposerMode:"commentComposerMode",isInsidePdfViewer:"isInsidePdfViewer",locationDisplayName:"locationDisplayName",locationVersion:"locationVersion",commentPinSelected:"commentPinSelected",variant:"variant",shadowDom:"shadowDom",commentPinType:"commentPinType",composerMode:"composerMode",containerComponentId:"containerComponentId",focusedThreadMode:"focusedThreadMode",isFocusedThreadEnabled:"isFocusedThreadEnabled",pageModeComposer:"pageModeComposer",composerPosition:"composerPosition",sortBy:"sortBy",sortOrder:"sortOrder",dialogTemplate:"dialogTemplate"},outputs:{deleteCommentThread:"deleteCommentThread",saveComment:"saveComment",addCommentEmitter:"addComment",afterViewInit:"afterViewInit",signInToAccessFeature:"signInToAccessFeature",pointerOutFromCommentDialog:"pointerOutFromCommentDialog",pointerUp:"pointerUp",updateOverlayPosition:"updateOverlayPosition",onCommentNavigationButtonClick:"onCommentNavigationButtonClick",composerFocused:"composerFocused"},standalone:!1,features:[B,Ze],decls:4,vars:66,consts:[["host","","commentsContainer",""],["defaultDialogRef",""],["commentsContainer",""],[1,"modal-div","velt-comment-dialog",3,"click","pointerout","pointerdown","pointerup"],[4,"ngIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["part","container","class","modal-div velt-comment-dialog",3,"dialog","velt-comment-dialog--dialog-mode","bottom-sheet","velt-comment-dialog--bottom-sheet","inbox","velt-comment-dialog--inbox-mode","readonly","velt-comment-dialog--readonly","no-comments","velt-comment-dialog--no-comments","selected","velt-comment-dialog--selected","screen-recording","velt-comment-dialog--screen-recording","s-ghost-comment-annotation","velt-comment-dialog--ghost-comment-annotation","inline-comment-mode","velt-comment-dialog--inline-comment-mode","velt-comment-dialog--multi-thread-mode","velt-comment-dialog--page-comment","velt-comment-dialog--inline-comment-section-mode","velt-comment-dialog--comment-composer-mode","velt-comment-dialog--focused-thread-mode","velt-comment-dialog--page-mode-composer","private-comment","velt-comment-dialog--private-comment","click","pointerout","pointerdown","pointerup",4,"ngIf"],["part","container","class","modal-div velt-comment-dialog",3,"dialog","velt-comment-dialog--dialog-mode","sidebar","velt-comment-dialog--sidebar-mode","bottom-sheet","velt-comment-dialog--bottom-sheet","readonly","velt-comment-dialog--readonly","no-comments","velt-comment-dialog--no-comments","selected","velt-comment-dialog--selected","screen-recording","velt-comment-dialog--screen-recording","s-ghost-comment-annotation","velt-comment-dialog--focused-thread-mode","velt-comment-dialog--ghost-comment-annotation","velt-comment-dialog--page-mode-composer","private-comment","velt-comment-dialog--private-comment","id","click","pointerout","pointerdown","pointerup",4,"ngIf"],["part","container","class","modal-div velt-comment-dialog",3,"dialog","velt-comment-dialog--dialog-mode","bottom-sheet","velt-comment-dialog--bottom-sheet","inbox","velt-comment-dialog--inbox-mode","readonly","velt-comment-dialog--readonly","no-comments","velt-comment-dialog--no-comments","selected","velt-comment-dialog--selected","screen-recording","velt-comment-dialog--screen-recording","s-ghost-comment-annotation","velt-comment-dialog--ghost-comment-annotation","inline-comment-mode","velt-comment-dialog--inline-comment-mode","velt-comment-dialog--multi-thread-mode","velt-comment-dialog--page-comment","velt-comment-dialog--focused-thread-mode","velt-comment-dialog--inline-comment-section-mode","velt-comment-dialog--comment-composer-mode","velt-comment-dialog--page-mode-composer","private-comment","velt-comment-dialog--private-comment","click","pointerout","pointerdown","pointerup",4,"ngIf"],["part","container",1,"modal-div","velt-comment-dialog",3,"click","pointerout","pointerdown","pointerup"],[3,"componentConfigSignal"],["class","line-div velt-comment-dialog--line-div",4,"ngIf"],["class","velt-action-bar velt-comment-dialog--action-bar",4,"ngIf"],[1,"line-div","velt-comment-dialog--line-div"],[1,"velt-action-bar","velt-comment-dialog--action-bar"],[3,"componentConfigSignal",4,"ngIf"],["class","velt-comment-dialog--action-bar-group",4,"ngIf"],[1,"velt-comment-dialog--action-bar-group"],["part","container",1,"modal-div","velt-comment-dialog",3,"click","pointerout","pointerdown","pointerup","id"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",3,0),G("click",function(){return N(a),F(r.onClick())})("pointerout",function(c){return N(a),r.onPointerOutCommentDialog(c),F(c.stopPropagation())})("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),r.onPointerUp(),F(c.stopPropagation())}),b(),g(3,uKt,4,1,"ng-container",4)}if(t&2){let a,s,c,p,u,C,E,D,L,z,W,J,ue,ye,Ie,Ve,Fe,Ee,Se,Oe,_e,fe,Ae,Ne,Ct,wn,yt,Rt,Bt,bn,Zt,Yt,Ai,Xt,Qn;ge("sidebar",(a=r.componentConfigSignal())==null?null:a.sidebarMode)("velt-comment-dialog--sidebar-mode",(s=r.componentConfigSignal())==null?null:s.sidebarMode)("dialog",(c=r.componentConfigSignal())==null?null:c.dialogMode)("velt-comment-dialog--dialog-mode",(p=r.componentConfigSignal())==null?null:p.dialogMode)("hide",(u=r.componentConfigSignal())==null?null:u.showDefault)("velt-comment-dialog--hide",(C=r.componentConfigSignal())==null?null:C.showDefault)("bottom-sheet",(E=r.componentConfigSignal())==null?null:E.bottomSheetMode)("velt-comment-dialog--bottom-sheet",(D=r.componentConfigSignal())==null?null:D.bottomSheetMode)("inbox",(L=r.componentConfigSignal())==null?null:L.inboxMode)("velt-comment-dialog--inbox-mode",(z=r.componentConfigSignal())==null?null:z.inboxMode)("readonly",((W=r.componentConfigSignal())==null||W.user==null?null:W.user.isReadOnly)||((W=r.componentConfigSignal())==null||W.user==null?null:W.user.isAnonymous))("velt-comment-dialog--readonly",((J=r.componentConfigSignal())==null||J.user==null?null:J.user.isReadOnly)||((J=r.componentConfigSignal())==null||J.user==null?null:J.user.isAnonymous))("no-comments",!(!((ue=r.componentConfigSignal())==null||ue.annotation==null||ue.annotation.comments==null)&&ue.annotation.comments.length))("velt-comment-dialog--no-comments",!(!((ye=r.componentConfigSignal())==null||ye.annotation==null||ye.annotation.comments==null)&&ye.annotation.comments.length))("selected",(Ie=r.componentConfigSignal())==null?null:Ie.commentDialogSelected)("velt-comment-dialog--selected",(Ve=r.componentConfigSignal())==null?null:Ve.commentDialogSelected)("screen-recording",((Fe=r.componentConfigSignal())==null||Fe.recorderInitConfig==null?null:Fe.recorderInitConfig.type)==="screen")("velt-comment-dialog--screen-recording",((Ee=r.componentConfigSignal())==null||Ee.recorderInitConfig==null?null:Ee.recorderInitConfig.type)==="screen")("s-ghost-comment-annotation",(Se=r.componentConfigSignal())==null?null:Se.showGhostCommentMessage)("velt-comment-dialog--ghost-comment-annotation",(Oe=r.componentConfigSignal())==null?null:Oe.showGhostCommentMessage)("velt-comment-dialog--focused-thread-mode",(_e=r.componentConfigSignal())==null?null:_e.focusedThreadMode)("inline-comment-mode",((fe=r.componentConfigSignal())==null?null:fe.inlineCommentMode)&&!((fe=r.componentConfigSignal())!=null&&fe.isInsidePdfViewer))("velt-comment-dialog--page-comment",(Ae=r.componentConfigSignal())==null||Ae.annotation==null?null:Ae.annotation.isPageAnnotation)("velt-comment-dialog--inline-comment-mode",((Ne=r.componentConfigSignal())==null?null:Ne.inlineCommentMode)&&!((Ne=r.componentConfigSignal())!=null&&Ne.isInsidePdfViewer))("velt-comment-dialog--multi-thread-mode",(Ct=r.componentConfigSignal())==null?null:Ct.multiThread)("velt-comment-dialog--comment-composer-mode",(wn=r.componentConfigSignal())==null?null:wn.commentComposerMode)("velt-comment-dialog--page-mode-composer",(yt=r.componentConfigSignal())==null?null:yt.pageModeComposer)("private-comment",(Rt=r.componentConfigSignal())==null?null:Rt.isPrivateComment)("velt-comment-dialog--private-comment",(Bt=r.componentConfigSignal())==null?null:Bt.isPrivateComment),x("data-velt-annotation-draft",(bn=r.componentConfigSignal())==null?null:bn.getAnnotationDraftAttribute)("data-velt-annotation-edit-comment",(Zt=r.componentConfigSignal())!=null&&Zt.editComment?!0:void 0)("data-velt-comment-dialog-comments-count",((Yt=r.componentConfigSignal())==null||Yt.annotation==null||Yt.annotation.comments==null?null:Yt.annotation.comments.length)||"0")("data-velt-comment-dialog-comments-status",(Ai=r.componentConfigSignal())==null||Ai.annotation==null||Ai.annotation.status==null?null:Ai.annotation.status.id)("data-velt-comment-dialog-comments-status-type",(Xt=r.componentConfigSignal())==null||Xt.annotation==null||Xt.annotation.status==null?null:Xt.annotation.status.type)("data-velt-comment-dialog-comments-priority",(Qn=r.componentConfigSignal())==null||Qn.annotation==null||Qn.annotation.priority==null?null:Qn.annotation.priority.id)("data-testid",r.componentId+"-root"),m(3),d("ngIf",r.componentConfigSignal())}},dependencies:[X,_t,X0,q0,Q0,W0,Z0,Sh,z0,eC,G0,iC,tC,gn,s_],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}[type=button][_ngcontent-%COMP%]:not(:disabled), [type=reset][_ngcontent-%COMP%]:not(:disabled), [type=submit][_ngcontent-%COMP%]:not(:disabled), button[_ngcontent-%COMP%]:not(:disabled){cursor:pointer}[_ngcontent-%COMP%]::-webkit-scrollbar{display:none;width:0;height:0}[_ngcontent-%COMP%]::-webkit-scrollbar{width:0;height:0}[_ngcontent-%COMP%]::-webkit-scrollbar-button{width:0;height:0} .velt-comment-dialog-thread-card-message--email-chip, .velt-autocomplete--contact-chip, .velt-autocomplete--group-chip{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);padding:var(--velt-spacing-xs);word-break:break-word;font-size:var(--velt-font-size-sm);font-style:normal;font-weight:400;line-height:120%} .velt-comment-dialog-thread-card-message--email-chip.velt-autocomplete--contact-chip-current-user, .velt-autocomplete--contact-chip.velt-autocomplete--contact-chip-current-user, .velt-autocomplete--group-chip.velt-autocomplete--contact-chip-current-user{background-color:color-mix(in srgb,var(--velt-warning) 12%,transparent);color:color-mix(in srgb,var(--velt-warning) 32%,var(--velt-text-0))} velt-autocomplete-chip velt-skeleton-loader-internal{width:50px;border-radius:var(--velt-border-radius-xs);margin-block:6px} .velt-comment-dialog--here-chip{color:var(--velt-accent-text);background:var(--velt-accent-transparent);border-radius:var(--velt-border-radius-xs);padding:var(--velt-spacing-xs);word-break:break-word}.velt-comment-dialog--comment-link[_ngcontent-%COMP%]{color:var(--velt-accent);word-break:break-all;display:unset}.velt-comment-dialog-shake[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_shake .82s cubic-bezier(.36,.07,.19,.97) both}@keyframes _ngcontent-%COMP%_shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.velt-comment-dialog[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;gap:var(--velt-spacing-lg);border-radius:var(--velt-border-radius-md);box-shadow:0 8px 16px -8px #0f0f0f1a;box-sizing:border-box;width:361px;text-align:left;font-size:var(--velt-font-size-sm);padding:var(--velt-spacing-lg);background-color:var(--velt-background-0);border:1px solid var(--velt-border-4);color:var(--velt-text-3)}.velt-comment-dialog[_ngcontent-%COMP%] .velt-comment-dialog--line-div[_ngcontent-%COMP%]{border-top:1px solid var(--velt-border-4);width:100%}.velt-comment-dialog.velt-comment-dialog--no-comments[_ngcontent-%COMP%]{padding:0;gap:0}.velt-comment-dialog.velt-comment-dialog--multi-thread-mode[_ngcontent-%COMP%]{box-shadow:none;border:0;background-color:transparent}.velt-comment-dialog.velt-comment-dialog--sidebar-mode[_ngcontent-%COMP%]{width:100%;min-width:100%;box-shadow:none;background:transparent;border-color:transparent}.velt-comment-dialog.velt-comment-dialog--sidebar-mode[_ngcontent-%COMP%]:hover, .velt-comment-dialog.velt-comment-dialog--sidebar-mode.velt-comment-dialog--selected[_ngcontent-%COMP%]{background-color:var(--velt-background-0);border-color:var(--velt-border-4)}.velt-comment-dialog.velt-comment-dialog--page-mode-composer[_ngcontent-%COMP%]{width:100%;padding-inline:var(--velt-spacing-lg);box-shadow:none;background:transparent;border-color:transparent}.velt-comment-dialog.velt-comment-dialog--inline-comment-mode[_ngcontent-%COMP%]{padding:0;box-shadow:none;border-color:transparent;background:transparent;width:100%}.velt-comment-dialog.velt-comment-dialog--inline-comment-section-mode[_ngcontent-%COMP%]{width:100%;box-shadow:none}.velt-comment-dialog.velt-comment-dialog--inline-comment-section-mode.no-comments[_ngcontent-%COMP%]{padding:var(--velt-spacing-md) var(--velt-spacing-sm) var(--velt-spacing-md) var(--velt-spacing-lg)}.velt-comment-dialog.velt-comment-dialog--bottom-sheet[_ngcontent-%COMP%]{width:100%;border-bottom-left-radius:0;border-bottom-right-radius:0} .snippyly-comment-rewriter-text{color:var(--velt-black);background-color:color-mix(in srgb,var(--velt-warning) 42%,var(--velt-white))}.velt-comment-dialog--hide[_ngcontent-%COMP%]{display:none}.velt-comment-dialog--action-bar[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-around;padding:var(--velt-spacing-lg);box-sizing:border-box;text-align:center;color:var(--velt-accent-text);gap:var(--velt-spacing-2xl)}.velt-comment-dialog--action-bar[_ngcontent-%COMP%]:empty{display:none}.velt-comment-dialog--action-bar[_ngcontent-%COMP%] .velt-comment-dialog--action-bar-group[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-around;width:100%;box-sizing:border-box}.velt-comment-dialog--focused-thread-mode[_ngcontent-%COMP%]{border:none;height:100%}.velt-comment-dialog--focused-thread-mode[_ngcontent-%COMP%] app-comment-dialog-body[_ngcontent-%COMP%]{display:flex;flex-grow:1;min-height:0;width:100%;overflow:scroll}"],changeDetection:0});let i=o;return i})();var t7=(()=>{let o=class o{constructor(e,t,r,a){this.bottomSheet=e,this.domService=t,this.loggingService=r,this.elementRef=a,this.user=new Ao,this.isInsidePdfViewer=!1,this.bottomSheetData$=new ve(null),this.saveComment=new Pe,this.veltElement=!0,this.subscriptions=[],this.componentId="velt-comment-bottom-sheet"}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","dialog"),e.setAttribute("aria-label","Comment bottom sheet")}catch(e){this.loggingService.catch("Error in CommentBottomSheetComponent setupA11yAttributes:",e)}}ngAfterViewInit(){this.openBottomSheet(),this.setBottomSheetData()}ngOnChanges(e){try{e?.annotation&&this.setBottomSheetData()}catch(t){this.catchError("Error in CommentBottomSheetComponent ngOnChanges: ",t)}}setBottomSheetData(){try{this.bottomSheetData$.next({annotation:this.annotation,user:this.user,commentPinSelected:!0,isInsidePdfViewer:this.isInsidePdfViewer,multiThreadAnnotationId:this.annotation?.type==="multiThread"?this.annotation.annotationId:null,saveComment:e=>{this.saveComment.emit(e)},dismiss:()=>{this.closeBottomSheet()}})}catch(e){this.catchError("Error in CommentBottomSheetComponent setBottomSheetData: ",e)}}openBottomSheet(){return Q(this,null,function*(){try{this.annotation.type==="multiThread"?(this.bottomSheetRef=this.bottomSheet.open(ms,{data:this.bottomSheetData$.asObservable(),panelClass:["snippyly-comment-bottom-sheet-container","velt-mat-bottom-sheet-container"]}),this.subscriptions.push(this.bottomSheetRef.backdropClick().subscribe(()=>{this.domService.resetSelectedAnnotationsMap()}))):(this.bottomSheetRef=this.bottomSheet.open(Xo,{data:this.bottomSheetData$.asObservable(),panelClass:["snippyly-comment-bottom-sheet-container","velt-mat-bottom-sheet-container"]}),this.subscriptions.push(this.bottomSheetRef.backdropClick().subscribe(()=>{this.domService.resetSelectedAnnotationsMap()})))}catch(e){this.catchError("Error in CommentBottomSheetComponent openBottomSheet: ",e)}})}closeBottomSheet(){try{this.bottomSheetRef&&this.bottomSheetRef.dismiss()}catch(e){this.catchError("Error in CommentBottomSheetComponent closeBottomSheet: ",e)}}ngOnDestroy(){this.closeBottomSheet(),this.subscriptions.forEach(e=>{e?.unsubscribe()})}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(bc),h(Be),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-bottom-sheet"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",user:"user",isInsidePdfViewer:"isInsidePdfViewer"},outputs:{saveComment:"saveComment"},standalone:!1,features:[Ze],decls:0,vars:0,template:function(t,r){},styles:[".velt-mat-bottom-sheet-container.snippyly-comment-bottom-sheet-container{padding:0!important} .velt-mat-bottom-sheet-container.snippyly-comment-bottom-sheet-container .mat-bottom-sheet-container{padding:0!important}"],changeDetection:0});let i=o;return i})();function fKt(i,o){if(i&1){let n=Y();_(0,"div",4),G("pointerup",function(t){return N(n),l(2).togglePinSelection(),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())})("cdkDragStarted",function(){N(n);let t=l(2);return F(t.onPinDragStart())}),_(1,"snippyly-comment-pin",5),G("saveComment",function(t){N(n);let r=l(2);return F(r.saveComment(t))})("commentTargetElementClicked",function(){N(n);let t=l(2);return F(t.togglePinSelection())})("togglePinSelection",function(t){N(n);let r=l(2);return F(r.togglePinSelection(t))}),b()()}if(i&2){let n=l().ngIf,e=l();it("top",(n.commentPinAnnotation==null||n.commentPinAnnotation.position==null?null:n.commentPinAnnotation.position.top)-0+n.offsetTop,"px")("left",(n.commentPinAnnotation==null||n.commentPinAnnotation.position==null?null:n.commentPinAnnotation.position.left)-10+n.offsetLeft,"px"),d("id","comment-pin-container-"+(n.commentPinAnnotation==null?null:n.commentPinAnnotation.annotationId)),x("data-testid",e.componentId+"-popover")("role","button")("aria-expanded",n.commentPinSelected),m(),d("annotation",n.commentPinAnnotation)("containerComponentId",n.componentId)("commentPinSelected",n.commentPinSelected&&!n.annotationDragging)("multipleCommentPinSelected",n.commentPinSelected&&e.objectKeys(n.selectedAnnotationsMap).length>1)("targetElement",n.targetElement)("user",n.user)}}function vKt(i,o){if(i&1){let n=Y();_(0,"div",7),G("pointerup",function(t){return N(n),l(3).togglePinSelection(),F(t.stopPropagation())})("touchend",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("mousedown",function(t){return N(n),F(t.stopPropagation())})("touchstart",function(t){return N(n),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())})("cdkDragStarted",function(){N(n);let t=l(3);return F(t.onPinDragStart())})("cdkDragMoved",function(t){N(n);let r=l(3);return F(r.onPinMove(t))})("cdkDragReleased",function(){N(n);let t=l(3);return F(t.onPinRelease())}),_(1,"snippyly-comment-pin",8,1),G("togglePinSelection",function(t){N(n);let r=l(3);return F(r.togglePinSelection(t))})("saveComment",function(t){N(n);let r=l(3);return F(r.saveComment(t))}),b()()}if(i&2){let n,e=de(2),t=l(2).ngIf,r=l();it("top",t.annotationDragging?(t.dragPosition==null?null:t.dragPosition.top)-((e==null?null:e.COMMENT_PIN_SIZE)||40):(t.commentPinAnnotation==null||t.commentPinAnnotation.position==null?null:t.commentPinAnnotation.position.top)-((e==null?null:e.COMMENT_PIN_SIZE)||40)+t.offsetTop,"px")("left",t.annotationDragging?t.dragPosition==null?null:t.dragPosition.left:(t.commentPinAnnotation==null||t.commentPinAnnotation.position==null?null:t.commentPinAnnotation.position.left)+t.offsetLeft,"px")("--velt-comment-pin-transform",t.annotationDragging?"none":(n=t.pinTransform)!==null&&n!==void 0?n:"none")("transform",!t.annotationDragging&&(!(t.commentPinAnnotation==null||t.commentPinAnnotation.position==null)&&t.commentPinAnnotation.position.parentScaleX)?"scale("+1/((t.commentPinAnnotation==null||t.commentPinAnnotation.position==null?null:t.commentPinAnnotation.position.parentScaleX)||1)+", "+1/((t.commentPinAnnotation==null||t.commentPinAnnotation.position==null?null:t.commentPinAnnotation.position.parentScaleY)||1)+")":""),ge("pin-dragging",t.annotationDragging),d("id","comment-pin-container-"+(t.commentPinAnnotation==null?null:t.commentPinAnnotation.annotationId))("cdkDragDisabled",(t.commentPinAnnotation==null||t.commentPinAnnotation.from==null?null:t.commentPinAnnotation.from.userId)!==(t.user==null?null:t.user.userId)),x("data-testid",r.componentId+"-default")("role","button")("aria-expanded",t.commentPinSelected)("aria-grabbed",t.annotationDragging)("data-transform-inside",t.transformContext?"true":"false"),m(),d("annotation",t.commentPinAnnotation)("annotationDragging",t.annotationDragging)("containerComponentId",t.componentId)("commentPinSelected",t.commentPinSelected&&!t.annotationDragging)("multipleCommentPinSelected",t.commentPinSelected&&r.objectKeys(t.selectedAnnotationsMap).length>1)("targetElement",t.targetElement)("user",t.user)}}function CKt(i,o){if(i&1&&g(0,vKt,3,24,"div",6),i&2){let n=l().ngIf;d("ngIf",n.commentPinAnnotation==null?null:n.commentPinAnnotation.position)}}function _Kt(i,o){if(i&1&&(f(0),g(1,fKt,2,14,"div",3)(2,CKt,1,1,"ng-template",null,0,Te),v()),i&2){let n=o.ngIf,e=de(3);m(),d("ngIf",n.popoverMode)("ngIfElse",e)}}var n7=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.analyticsService=e,this.authService=t,this.docService=r,this.domService=a,this.commentService=s,this.loggingService=c,this.elementRef=p,this.multipleCommentPinsSelected=!1,this.avatarErrorImage="",this.objectKeys=Object.keys,this.selectedAnnotationsLocationMap={},this.subscriptions=[],this.componentConfigSignal=De({popoverMode:!1,commentPinAnnotation:void 0,commentPinSelected:!1,offsetLeft:0,offsetTop:0,selectedAnnotationsMap:{},annotationDragging:!1,dragPosition:null,targetElement:void 0,user:void 0,componentId:`comment-pin-portal-${En()}`}),this.veltElement=!0,this.componentId="velt-comment-pin-portal",this.subscriptions.push(this.authService.getUser$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{user:u}),C))},u=>{this.catchError("Error in CommentPinPortalComponent getUser$ subscription: ",u)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{selectedAnnotationsMap:u}),C)),this.checkCommentPinSelected()},u=>{this.catchError("Error in CommentPinPortalComponent getSelectedAnnotationsMap$ subscription: ",u)})),this.subscriptions.push(this.domService.getSelectedAnnotationsLocationMap$().subscribe(u=>{this.selectedAnnotationsLocationMap=u||{},this.checkCommentPinSelected()},u=>{this.catchError("Error in CommentPinPortalComponent getSelectedAnnotationsLocationMap$ subscription: ",u)})),this.subscriptions.push(this.commentService.getPopoverMode$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{popoverMode:u}),C))},u=>{this.catchError("Error in CommentPinPortalComponent getPopoverMode subscription: ",u)}))}ngOnInit(){try{this.setupA11yAttributes(),this.subscriptions.push(this.commentService.getTransformContext$().subscribe(e=>{this.componentConfigSignal.update(t=>{if(t=T(I({},t),{transformContext:e}),e&&this.isElementInsideTransformContainer(this.elementRef?.nativeElement,e.containerSelector)){let r=e.transforms.scale?1/e.transforms.scale:1;t.pinTransform=`scale(${r})`}else t.pinTransform=void 0;return t})}))}catch(e){this.loggingService.catch("Error in CommentPinPortalComponent ngOnInit:",e)}}isElementInsideTransformContainer(e,t){try{return document.querySelector(t)?.contains(e)??!1}catch(r){return this.loggingService.catch("Error in CommentPinPortalComponent isElementInsideTransformContainer:",r),!1}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentPinPortalComponent setupA11yAttributes:",e)}}setCommentPinAnnotation(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinAnnotation:e}),t)),this.id=this.componentConfigSignal().commentPinAnnotation?.annotationId,this.checkCommentPinSelected()}catch(t){this.catchError("Error in CommentPinPortalComponent setCommentPinAnnotation: ",t)}}setSourceId(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{sourceId:e}),t)),this.checkCommentPinSelected()}catch(t){this.catchError("Error in CommentPinPortalComponent setSourceId: ",t)}}getMultiThreadCommentAnnotations(){}checkCommentPinSelected(){try{let e=this.componentConfigSignal().selectedAnnotationsMap,t=this.componentConfigSignal().commentPinAnnotation,r=this.componentConfigSignal().sourceId;if(t){let a=!!e[t.annotationId];if(a)if(t?.isDraft)t?.sourceId&&(a=t?.sourceId===r,a&&this.domService.setSelectedAnnotationLocation(t.annotationId,this.componentConfigSignal().componentId));else{let s=this.selectedAnnotationsLocationMap?.[t.annotationId];s&&(a=s===this.componentConfigSignal().componentId)}a!==this.componentConfigSignal().commentPinSelected&&this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinSelected:a}),s))}}catch(e){this.catchError("Error in CommentPinPortalComponent checkCommentPinSelected: ",e)}}setTargetElement(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{targetElement:e}),t))}catch(t){this.catchError("Error in CommentPinPortalComponent setTargetElement: ",t)}}setOffsetLeft(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{offsetLeft:e}),t))}catch(t){this.catchError("Error in CommentPinPortalComponent setOffsetLeft: ",t)}}setOffsetTop(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{offsetTop:e}),t))}catch(t){this.catchError("Error in CommentPinPortalComponent setOffsetTop: ",t)}}togglePinSelection(e){try{let t=e||this.componentConfigSignal().commentPinAnnotation;if(this.componentConfigSignal().selectedAnnotationsMap[t?.annotationId]&&this.selectedAnnotationsLocationMap?.[t?.annotationId]===this.componentConfigSignal().componentId)t?.ghostComment?.type!==tl.DIFFERENT_DEVICE&&document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${t?.annotationId}"]`)&&this.domService.resetSelectedAnnotationsMap(!0,"comments");else{let a=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(a||(a=(this.domService.getDraftCommentAnnotationDialogs()||[])[0]),a){let s=a.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(s){let c=document.getElementById(`comment-pin-container-${s}`)||document.querySelector(`[data-velt-id='${s}']`);c&&(c.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"comments"))}}else this.domService.resetSelectedAnnotationsMap(!0,"comments"),this.componentConfigSignal().targetElement&&this.domService.isElementVisibleOnScreen(this.componentConfigSignal().targetElement)&&(this.componentConfigSignal().annotationDragging||this.domService.toggleAnnotationSelection(t,this.componentConfigSignal().componentId,void 0,!0))}}catch(t){this.catchError("Error in CommentPinPortalComponent togglePinSelection: ",t)}}onPinDragStart(){try{this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().commentPinAnnotation.annotationId]&&this.componentConfigSignal().commentPinAnnotation?.ghostComment?.type!==tl.DIFFERENT_DEVICE&&this.domService.toggleAnnotationSelection(this.componentConfigSignal().commentPinAnnotation,this.componentConfigSignal().componentId);let e=document.getElementById(this.componentConfigSignal().commentPinAnnotation.annotationId);if(!e)return;this.parentElement=e.parentElement;let t=this.componentConfigSignal().commentPinAnnotation.position,r=this.componentConfigSignal().transformContext,a=this.parentElement.getBoundingClientRect(),s=a.left+t.left,c=a.top+t.top,p=r&&this.isElementInsideTransformContainer(e,r.containerSelector);this.componentConfigSignal.update(u=>(u=T(I({},u),{elementInTransformedContainer:p}),u)),e.style.width="20px",e.style.height="20px",e.style.margin="0",e.style.padding="0",e.style.display="block",e.style.visibility="visible",e.style.opacity="1",e.style.backgroundColor="var(--velt-comment-pin-background-color, #2d62ff)",e.style.borderRadius="50%",e.style.boxShadow="0 2px 4px rgba(0, 0, 0, 0.2)",e.style.pointerEvents="auto",e.offsetWidth,document.body.appendChild(e),e.style.position="fixed",e.style.top=`${c}px`,e.style.left=`${s}px`,e.style.zIndex="10000",e.style.transform="none",e.offsetWidth,this.componentConfigSignal.update(u=>(u=T(I({},u),{annotationDragging:!0}),u))}catch(e){this.catchError("Error in CommentPinPortalComponent onPinDragStart: ",e)}}onPinMove(e){try{this.updateCurrentPinPosition(e)}catch(t){this.catchError("Error in CommentPinPortalComponent onPinMove: ",t)}}updateCurrentPinPosition(e){try{this.domService.removeHighlightFromElement(this.componentConfigSignal().targetElement);let t=e.event,r=t?.touches?.length?t.touches[0]?.clientX:t.clientX,a=t?.touches?.length?t.touches[0]?.clientY:t.clientY,s=this.componentConfigSignal().transformContext,c=this.domService.getBackgroundElement(r,a);c&&this.commentService.isElementInsideAllowedElements(c)&&(this.componentConfigSignal.update(p=>(p=T(I({},p),{targetElement:c}),p)),this.domService.highlightElement(this.componentConfigSignal().targetElement),this.pointerMoveEvent=e.event,this.componentConfigSignal.update(p=>(p=T(I({},p),{dragPosition:{top:a,left:r}}),p)))}catch(t){this.catchError("Error in CommentPinPortalComponent updateCurrentPinPosition: ",t)}}onPinRelease(){try{let e=document.getElementById(this.componentConfigSignal().commentPinAnnotation.annotationId);if(!e||!this.parentElement)return;this.domService.removeHighlightFromElement(this.componentConfigSignal().targetElement);let t=this.domService.getElementFromXPath(this.componentConfigSignal().commentPinAnnotation.targetElement?.xpath),r=this.componentConfigSignal().commentPinAnnotation?.targetElement;if(this.pointerMoveEvent){let J=this.domService.getTargetElementForCursorPosition(this.pointerMoveEvent,!0,!0,!0,ue=>{if(this.commentService.getSvgAsImg()){let ye=ue?.closest(`[${j.ATTRIBUTES.VELT_COMMENT_CONTAINER}]`);ye&&ye instanceof HTMLElement&&(ue=ye)}return ue});J&&(r=J)}let a=this.domService.getElementFromXPath(r?.xpath),s=this.componentConfigSignal().commentPinAnnotation.targetElement?.xpath,c=r?.xpath,p=s===c;if(!a)return;let u=this.componentConfigSignal().dragPosition,C=a.getBoundingClientRect(),E=50,D=50;if(u){let J=u.left-C.left,ue=u.top-C.top;E=J/C.width*100,D=ue/C.height*100,E=Math.max(0,Math.min(100,E)),D=Math.max(0,Math.min(100,D))}let L=I({},this.componentConfigSignal().commentPinAnnotation);L.targetElement=I({},r),L.targetElement.leftPercentage=E,L.targetElement.topPercentage=D,this.commentService.calculateCommentAnnotationPosition(L),this.componentConfigSignal.update(J=>(J=T(I({},J),{commentPinAnnotation:L,targetElement:a}),J));let z=this.domService.isElementInsideAdditionalLocationContainer(t)||this.domService.isElementInsideAdditionalLocationContainer(a),W=this.docService.getAdditionalDocumentIdFromElement(a)||this.docService.getDocumentPaths()?.clientDocumentId;if(!this.componentConfigSignal().commentPinAnnotation?.metadata?.clientDocumentId||this.componentConfigSignal().commentPinAnnotation?.metadata?.clientDocumentId==W?(this.componentConfigSignal.update(J=>(J=T(I({},J),{commentPinAnnotation:T(I({},J.commentPinAnnotation),{targetElement:r})}),J)),this.commentService.updateComment(this.componentConfigSignal().commentPinAnnotation,z)):this.componentConfigSignal.update(J=>(J=T(I({},J),{targetElement:t}),J)),p){let J=this.componentConfigSignal().transformContext,ue=this.componentConfigSignal().elementInTransformedContainer,ye=J&&this.isElementInsideTransformContainer(a,J.containerSelector);this.componentConfigSignal.update(Ve=>(Ve=T(I({},Ve),{elementInTransformedContainer:ye}),Ve));let Ie=e.getBoundingClientRect();if(!ue&&ye){e.style.transition="none";let Ve=Ie.top,Fe=Ie.left;this.parentElement.appendChild(e),e.style.position="fixed",e.style.top=`${Ve}px`,e.style.left=`${Fe}px`,e.offsetWidth,requestAnimationFrame(()=>{e.style.position="absolute",ye&&L.position.transformContext?(e.style.top=`${L.position.top}px`,e.style.left=`${L.position.left}px`,L.position.transformContext.scale!==1&&(e.style.transform=`scale(${1/L.position.transformContext.scale})`)):(e.style.top=`${L.position.top}px`,e.style.left=`${L.position.left}px`)})}else e.style.transition="none",this.parentElement.appendChild(e),e.style.position="absolute",e.style.width="20px",e.style.height="20px",e.style.backgroundColor="var(--velt-comment-pin-background-color, #2d62ff)",e.style.borderRadius="50%",e.style.boxShadow="0 2px 4px rgba(0, 0, 0, 0.2)",e.style.visibility="visible",e.style.display="block",e.offsetWidth,ye&&L.position.transformContext?(e.style.top=`${L.position.top}px`,e.style.left=`${L.position.left}px`):(e.style.top=`${L.position.top}px`,e.style.left=`${L.position.left}px`);e.offsetWidth,this.componentConfigSignal.update(Ve=>(Ve=T(I({},Ve),{annotationDragging:!1,dragPosition:null}),Ve))}this.analyticsService.trackEvent(Z.Events.Comments.COMMENT_PIN_DRAGGED,{annotationId:this.componentConfigSignal().commentPinAnnotation.annotationId,commentMode:this.commentService.getCommentMode()})}catch(e){this.catchError("Error in CommentPinPortalComponent onPinRelease: ",e)}}saveComment(e){try{this.commentService.saveComment(this.componentConfigSignal().commentPinAnnotation,e)}catch(t){this.catchError("Error in CommentPinPortalComponent saveComment: ",t)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.catchError("Error in CommentPinPortalComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.catchError("Error in CommentPinPortalComponent unsubscribe: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(st),h(Be),h(we),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-pin-portal"]],hostVars:2,hostBindings:function(t,r){t&2&&(Aa("id",r.id),x("data-velt-element",r.veltElement))},inputs:{multipleCommentPinsSelected:"multipleCommentPinsSelected",avatarErrorImage:"avatarErrorImage"},standalone:!1,decls:1,vars:1,consts:[["defaultPinPortalRef",""],["commentPinRef",""],[4,"ngIf"],["class","comment-pin-portal",3,"id","top","left","pointerup","click","cdkDragStarted",4,"ngIf","ngIfElse"],[1,"comment-pin-portal",3,"pointerup","click","cdkDragStarted","id"],[3,"saveComment","commentTargetElementClicked","togglePinSelection","annotation","containerComponentId","commentPinSelected","multipleCommentPinSelected","targetElement","user"],["class","comment-pin-portal","cdkDrag","","cdkDragHandle","",3,"id","pin-dragging","top","left","--velt-comment-pin-transform","transform","cdkDragDisabled","pointerup","touchend","mousedown","touchstart","pointerdown","click","cdkDragStarted","cdkDragMoved","cdkDragReleased",4,"ngIf"],["cdkDrag","","cdkDragHandle","",1,"comment-pin-portal",3,"pointerup","touchend","mousedown","touchstart","pointerdown","click","cdkDragStarted","cdkDragMoved","cdkDragReleased","id","cdkDragDisabled"],[3,"togglePinSelection","saveComment","annotation","annotationDragging","containerComponentId","commentPinSelected","multipleCommentPinSelected","targetElement","user"]],template:function(t,r){t&1&&g(0,_Kt,4,2,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:absolute!important;top:0!important;left:0!important;box-sizing:border-box!important;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset!important;width:unset!important;text-align:left!important;z-index:var(--velt-comment-pin-z-index)!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));-webkit-text-fill-color:initial!important}*[_ngcontent-%COMP%]:empty{display:revert!important}.comment-pin-portal[_ngcontent-%COMP%]{position:absolute;transform:var(--velt-comment-pin-transform, none)!important;transform-origin:0 100%!important;transform-box:fill-box!important;top:0;left:0}.comment-pin-portal.pin-dragging[_ngcontent-%COMP%]{position:fixed;z-index:var(--velt-comment-pin-z-index)!important}"],changeDetection:0});let i=o;return i})();var i7=(()=>{let o=class o{constructor(e,t,r,a,s,c){this.commentService=e,this.domService=t,this.componentFactoryResolver=r,this.injector=a,this.appRef=s,this.loggingService=c,this.commentsPinById={},this.commentPinTemplate$=new ve(null),this.customPinEvents$=new tt}setCommentPin(e){try{if(!this.commentsPinById[e.annotationId])this.setPinPortal(e);else{let t=!1;if(e?.ghostComment?t=e?.ghostComment?.targetElement?.xpath!==this.commentsPinById[e.annotationId]?.[0]?.annotation?.ghostComment?.targetElement?.xpath:this.commentsPinById[e.annotationId]?.[0]?.annotation?.ghostComment?t=!0:t=e.targetElement?.xpath!==this.commentsPinById[e.annotationId]?.[0]?.annotation?.targetElement?.xpath,!t)this.commentsPinById[e.annotationId]?.forEach(r=>{let a=r.portalRef,s=r.userTargetElement,c=r.pinHostElement;if(document.body.contains(s)&&document.body.contains(c))a&&(a.instance.setCommentPinAnnotation(e),this.updateElementOffset(e));else{let p=r.pinHostDomPortalOutlet;p&&(this.removeCommentPinHostAttributes(e.annotationId,r.pinHostElement),this.removeCommentDisabledAttribute(c),p.detach(),delete this.commentsPinById[e.annotationId],e.ghostComment&&this.unselectCommentAnnotation(e),this.setPinPortal(e))}});else{let r=this.commentsPinById[e.annotationId]?.[0]?.pinHostDomPortalOutlet;r&&(this.removeCommentPinHostAttributes(e.annotationId,this.commentsPinById[e.annotationId]?.[0]?.pinHostElement),this.removeCommentDisabledAttribute(this.commentsPinById[e.annotationId]?.[0]?.pinHostElement),r.detach(),delete this.commentsPinById[e.annotationId],e.ghostComment&&this.unselectCommentAnnotation(e),this.setPinPortal(e))}}}catch(t){this.loggingService.catch("Error in CommentPinPortalService setCommentPin: ",t)}}unselectCommentAnnotation(e){try{this.loggingService.log("%c[WB] Calling CommentPinPortalService FUNCTION: unselectCommentAnnotation","color: green;"),this.domService.getSelectedAnnotationsMap()?.[e?.annotationId]&&this.domService.toggleAnnotationSelection(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService unselectCommentAnnotation: ",t)}}setPinPortal(e){try{let t=this.commentService.getElementFromComments(e);t.length>0&&(this.commentsPinById[e.annotationId]=[],t.forEach(r=>{if(r){let a=this.domService.getHostElement(r),s=new $o(n7),c=new Ho(a,this.componentFactoryResolver,this.appRef,this.injector),p=c.attach(s);p.instance.setCommentPinAnnotation(e),p.instance.setTargetElement(r);let u=r?.getAttribute(j.ATTRIBUTES.VELT_SOURCE_ID);u&&p.instance.setSourceId(u),this.commentsPinById[e.annotationId].push({pinHostDomPortalOutlet:c,pinPortal:s,portalRef:p,annotation:JSON.parse(JSON.stringify(e)),userTargetElement:r,pinHostElement:a}),this.setCommentPinHostAttributes(e.annotationId,a),this.setCommentDisabledAttribute(a),this.updateElementOffset(e)}}))}catch(t){this.loggingService.catch("Error in CommentPinPortalService setPinPortal: ",t)}}setCommentPinHostAttributes(e,t){try{let r=t.getAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST);if(r){let a=r.split(",");a.includes(e)||(a.push(e),t.setAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST,a.join(",")))}else t.setAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST,e);window.getComputedStyle(t).position==="static"&&(Pd(t)||t.setAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST_STATIC,"true"))}catch(r){this.loggingService.catch("Error in CommentPinPortalService setCommentPinHostAttributes: ",r)}}removeCommentPinHostAttributes(e,t){try{let r=t.getAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST);if(r){let a=r.split(","),s=a.indexOf(e);s>-1&&(a.splice(s,1),a.length>0?t.setAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST,a.join(",")):t.removeAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST))}t?.getAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST)||t.removeAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_HOST_STATIC)}catch(r){this.loggingService.catch("Error in CommentPinPortalService removeCommentPinHostAttributes: ",r)}}setCommentDisabledAttribute(e){try{this.commentService.getPopoverMode()&&e.setAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED,"auto")}catch(t){this.loggingService.catch("Error in CommentPinPortalService setCommentDisabledAttribute: ",t)}}removeCommentDisabledAttribute(e){try{e?.getAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED)==="auto"&&e.removeAttribute(j.ATTRIBUTES.VELT_COMMENT_DISABLED)}catch(t){this.loggingService.catch("Error in CommentPinPortalService removeCommentDisabledAttribute: ",t)}}updateElementOffset(e){try{for(let t of this.commentsPinById[e.annotationId]){let{portalRef:r,userTargetElement:a,pinHostElement:s}=t,c=this.domService.getElementOffset(a,s);r.instance.setOffsetLeft(c.offsetLeft),r.instance.setOffsetTop(c.offsetTop)}}catch(t){this.loggingService.catch("Error in CommentPinPortalService updateElementOffset: ",t)}}checkPinsToRemove(e){try{let t=e.map(r=>r.annotationId);Object.keys(this.commentsPinById).forEach(r=>{t.includes(r)||(this.commentService.customPinsById.has(r)&&this.commentService.customPinsById.delete(r),this.commentsPinById[r].forEach(s=>{s.pinHostDomPortalOutlet.detach(),this.removeCommentPinHostAttributes(r,s.pinHostElement),this.removeCommentDisabledAttribute(s.pinHostElement),this.domService.removeHighlightFromElement(s.pinHostElement),s.userTargetElement&&this.domService.removeHighlightFromElement(s.userTargetElement)}),delete this.commentsPinById[r])})}catch(t){this.loggingService.catch("Error in CommentPinPortalService checkPinsToRemove: ",t)}}setCommentPinOverrideTemplate(e){this.commentPinTemplate$.next(e)}getCommentPinTemplate$(){return this.commentPinTemplate$}emitCustomPinEvent(e){try{let{element:t,annotation:r}=e;r&&this.commentService.customPinsById.set(r.annotationId,t),this.customPinEvents$.next(e)}catch(t){this.loggingService.catch("Error in CommentPinPortalService emitCustomPinEvent",t)}}getCustomPinEvents$(){return this.customPinEvents$}};o.\u0275fac=function(t){return new(t||o)(ee(we),ee(Be),ee(Do),ee(Ot),ee(Ci),ee(y))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var ie=(()=>{let o=class o{set veltDynamicTemplate({template:e,context:t,id:r,cloneTemplate:a,componentName:s,variant:c,suffix:p,setIfCondition:u,componentElementRef:C,replaceTemplate:E=!0}){try{if(p&&(s+=`--${p}`),c&&(s+=`---${c}`),s){let D=this.wireframeService.getConditionElement(s);if(!D&&e&&(D=e),D){let L=D?.getAttribute("velt-if");L&&u&&u(L),Array.from(D.attributes).forEach(z=>{C?.nativeElement.setAttribute(z.name,z.value)}),t?.componentConfigSignal?this.dynamicDataService.applyConditionalClasses(C?.nativeElement,t):this.dynamicDataService.applyConditionalClasses(C?.nativeElement)}}if(s&&!e){let D=this.wireframeService.getWireframe(s);if(D){let L=document.createElement(D.tagName);L.innerHTML=D.innerHTML,this.template=L}}else this.template=e;this.data=t,this.id=r,this.cloneTemplate=!!a,this.cloneTemplate&&e&&(this.template=this.domService.deepCloneElement(e)),this.checkToUpdateTemplate(E)}catch(D){this.loggingService.warn("Error in DynamicTemplateDirective veltDynamicTemplate: ",D)}}constructor(e,t,r,a,s,c,p,u){this.elementRef=e,this.templateRef=t,this.viewContainer=r,this.dynamicComponentService=a,this.loggingService=s,this.domService=c,this.wireframeService=p,this.dynamicDataService=u,this.directiveId=Math.random().toString(36).substring(7),this.isCustomTemplateMode=!1,this.isDefaultTemplateMode=!1,this.cloneTemplate=!1,this.injectedElements=[],this.componentRefs=[];try{this.loggingService.log("%c[WB] Creating CLASS: DynamicTemplateDirective","color: blue;")}catch(C){this.loggingService.catch("Error in DynamicTemplateDirective constructor: ",C)}}checkDataValue(e,t){let r=e.querySelectorAll("[data-velt]");function a(s,c){return c.split(".").reduce((p,u)=>p&&p[u],s)}r.forEach(s=>{let c=s.getAttribute("data-velt");if(c&&t){let p=a(t,c);s instanceof HTMLElement&&(s.innerText=JSON.stringify(p,null,2))}})}checkToUpdateTemplate(e){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: checkToUpdateTemplate","color: green;"),this.template&&e)if(this.isDefaultTemplateMode=!1,this.isCustomTemplateMode)this.updateDataOnComponentRefs(this.data);else{this.isCustomTemplateMode=!0,this.cleanUp();let t=document.createElement(this.template.tagName);t.innerHTML=this.template.innerHTML,this.injectElementNextToSibling(this.elementRef.nativeElement,t)}else this.isCustomTemplateMode=!1,this.isDefaultTemplateMode||(this.cleanUp(),this.viewContainer.createEmbeddedView(this.templateRef),this.isDefaultTemplateMode=!0)}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective checkToUpdateTemplate: ",t)}}injectElementNextToSibling(e,t){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: injectElementNextToSibling","color: green;"),!t)return;this.cleanUp();let r=t;for(let s=0;s<r.children.length;s++){let c=r.children[s],p=this.dynamicComponentService.processAndReplaceVeltComponents(c,this.data,this.id?this.id:`from-directive-${this.directiveId}`,[],"from directive");p?.length&&this.componentRefs.push(...p)}r.setAttribute("data-velt-added-from-directive","true"),this.customTemplate=r;let a=Array.from(r.childNodes).reverse();e.nextSibling&&e.nextSibling&&e.nextSibling.getAttribute&&e.nextSibling.getAttribute("data-velt-added-from-directive")&&e.parentNode.removeChild(e.nextSibling),a.forEach(s=>{e.parentNode.insertBefore(s,e.nextSibling),s instanceof Element&&this.injectedElements.push(s)}),r.remove()}catch(r){this.loggingService.catch("Error in DynamicTemplateDirective injectElementNextToSibling: ",r)}}updateDataOnComponentRefs(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateDataOnComponentRefs","color: green;"),this.componentRefs.forEach(t=>{this.dynamicComponentService.setCommentRefData(e,t)})}catch(t){this.loggingService.catch("Error in DynamicTemplateDirective updateDataOnComponentRefs: ",t)}}ngOnDestroy(){try{this.cleanUp()}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective ngOnDestroy: ",e)}}cleanUp(){try{this.componentRefs.forEach(e=>{e.destroy()}),this.injectedElements.forEach(e=>{e.remove()}),this.injectedElements=[],this.viewContainer.clear()}catch(e){this.loggingService.catch("Error in DynamicTemplateDirective cleanUp: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(Eo),h(_i),h(S_),h(y),h(Be),h(ze),h(S))},o.\u0275dir=$t({type:o,selectors:[["","veltDynamicTemplate",""]],inputs:{veltDynamicTemplate:"veltDynamicTemplate"},standalone:!1});let i=o;return i})();function yKt(i,o){if(i&1&&w(0,"div",7),i&2){let n=l(2);x("data-testid",n.componentId+"-unread-indicator")("aria-hidden","true")}}function SKt(i,o){if(i&1&&(f(0),_(1,"div",1)(2,"div",2),le(),_(3,"svg",3),P(4,"translate"),w(5,"path",4),b(),g(6,yKt,1,2,"div",5),b(),ut(),_(7,"span",6),te(8),b()(),v()),i&2){let n=o.ngIf,e=l();m(),x("data-testid",e.componentId)("role","status"),m(),x("data-testid",e.componentId+"-unread-container")("aria-hidden",!(n!=null&&n.unreadAnnotationCount)),m(),x("role","img")("aria-label",M(4,11,"Comment icon"))("focusable","false"),m(3),d("ngIf",n==null?null:n.unreadAnnotationCount),m(),x("data-testid",e.componentId+"-count")("aria-hidden","true"),m(),Ge(n==null?null:n.count)}}var S0e=(()=>{let o=class o extends Je{constructor(e,t,r,a,s){super(s,a,void 0,e),this.commentService=e,this.loggingService=t,this.customFilterService=r,this.themeService=a,this.elementRef=s,this.componentConfigSignal=De({unreadCommentsMap:null,count:0}),this.subscription=[],this.componentId="velt-comment-pin-bubble";try{this.subscription.push(this.commentService.getUnreadCommentsMap$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=I({},p),p.unreadCommentsMap=c,p))}))}catch(c){this.catchError("Error in CommentPinBubbleComponent constructor: ",c)}}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentPinBubbleComponent ngOnInit:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentPinBubbleComponent setupA11yAttributes:",e)}}ngOnChanges(e){super.ngOnChanges(e);try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>{if(r=T(I({},r),{[t]:e[t].currentValue}),t==="annotation")if(r?.annotation?.type==="multiThread"){let a=Object.keys(r.unreadCommentsMap||{});r?.annotation?.commentAnnotationsMap&&(r.count=0,Object.values(r?.annotation?.commentAnnotationsMap||{}).forEach(s=>{s?.status?.id!==this.customFilterService.resolvedStatus?.id&&(r.count=(r?.count||0)+1),a.includes(s.annotationId)&&(r.unreadAnnotationCount=(r.unreadAnnotationCount||0)+1)}))}else r.count=r?.annotation?.comments?.length;return r})})}catch{}}ngOnDestroy(){super.ngOnDestroy();try{this.subscription.forEach(e=>e.unsubscribe())}catch(e){this.catchError("Error in CommentPinBubbleComponent ngOnDestroy: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(we),h(y),h(Zo),h(qe),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-pin-bubble-internal"]],inputs:{annotation:"annotation"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[1,"velt-comment-pin-bubble-container"],[1,"velt-comment-pin-bubble--unread-indicator-container"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.6666 1.33325H3.33325C2.80282 1.33325 2.29411 1.54397 1.91904 1.91904C1.54397 2.29411 1.33325 2.80282 1.33325 3.33325V9.99992C1.33325 10.5304 1.54397 11.0391 1.91904 11.4141C2.29411 11.7892 2.80282 11.9999 3.33325 11.9999H11.0599L13.5266 14.4733C13.5889 14.535 13.6628 14.5839 13.744 14.6171C13.8252 14.6503 13.9122 14.6671 13.9999 14.6666C14.0874 14.6688 14.1741 14.6506 14.2533 14.6133C14.375 14.5632 14.4792 14.4783 14.5528 14.3692C14.6263 14.26 14.6659 14.1315 14.6666 13.9999V3.33325C14.6666 2.80282 14.4559 2.29411 14.0808 1.91904C13.7057 1.54397 13.197 1.33325 12.6666 1.33325ZM13.3333 12.3933L11.8066 10.8599C11.7443 10.7981 11.6704 10.7492 11.5892 10.7161C11.508 10.6829 11.421 10.6661 11.3333 10.6666H3.33325C3.15644 10.6666 2.98687 10.5963 2.86185 10.4713C2.73682 10.3463 2.66659 10.1767 2.66659 9.99992V3.33325C2.66659 3.15644 2.73682 2.98687 2.86185 2.86185C2.98687 2.73682 3.15644 2.66659 3.33325 2.66659H12.6666C12.8434 2.66659 13.013 2.73682 13.138 2.86185C13.263 2.98687 13.3333 3.15644 13.3333 3.33325V12.3933Z","fill","currentColor"],["class","velt-comment-pin-bubble--unread-indicator",4,"ngIf"],[1,"velt-comment-pin-bubble--count"],[1,"velt-comment-pin-bubble--unread-indicator"]],template:function(t,r){t&1&&g(0,SKt,9,13,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);display:flex;cursor:pointer}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-comment-pin-bubble-container[_ngcontent-%COMP%]{display:flex;padding:var(--velt-spacing-xs);align-items:center;border-radius:var(--velt-border-radius-sm);box-shadow:0 0 1px #4551613d,0 2px 4px #45516124;color:var(--velt-accent-text);gap:var(--velt-spacing-xs);background-color:var(--velt-background-0);font-family:var(--velt-default-font-family)}.velt-comment-pin-bubble--unread-indicator-container[_ngcontent-%COMP%]{position:relative;display:flex}.velt-comment-pin-bubble--unread-indicator[_ngcontent-%COMP%]{position:absolute;top:-2px;right:-2px;display:block;width:8px;height:8px;margin-left:var(--velt-spacing-xs);border-radius:var(--velt-border-radius-full);background-color:var(--velt-error);color:var(--velt-error-foreground)}"],changeDetection:0});let i=o;return i})();var IKt=["commentDialogOverlay"],EKt=["commentPinBubbleOverlay"],xKt=["*"],TKt=()=>["snippyly-overlay-panel","velt-comment-pin-bubble-overlay-panel","velt-overlay-panel"],b0e=i=>({trigger:i}),DKt=()=>["snippyly-overlay-panel","velt-comment-dialog-overlay-panel","velt-overlay-panel"];function wKt(i,o){i&1&&je(0)}function OKt(i,o){if(i&1&&(f(0),g(1,wKt,1,0,"ng-container",13),v()),i&2){l();let n=de(1);l(2);let e=de(9);m(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,b0e,n))}}function AKt(i,o){if(i&1){let n=Y();_(0,"div",11,4),P(2,"translate"),G("click",function(t){return N(n),F(t.preventDefault())})("pointerenter",function(t){return N(n),l(3).onBubblePointerOver(t),F(t.stopPropagation())})("pointerleave",function(){N(n);let t=l(3);return F(t.onBubblePointerOut())})("pointerup",function(){N(n);let t=l(3);return F(t.onPointerUpOnBubble())}),_(3,"velt-comment-pin-bubble-internal",12),G("afterViewInit",function(){N(n);let t=l(3);return F(t.onBubbleAfterViewInit())})("onDestroy",function(){N(n);let t=l(3);return F(t.onBubbleOnDestroy())}),b()(),g(4,OKt,2,4,"ng-container",6)}if(i&2){let n=l(2).ngIf;x("role","button")("aria-expanded",n.commentBubbleHover)("aria-label",M(2,5,"Comment bubble")),m(3),d("annotation",n.annotation),m(),d("ngIf",n.isBubbleInitialized)}}function PKt(i,o){if(i&1){let n=Y();f(0),g(1,AKt,5,7,"ng-template",10,3,Te),G("positionChange",function(t){N(n);let r=l(2);return F(r.onCommentPinBubblePositionChange(t))}),v()}if(i&2){let n=l().ngIf,e=de(2);m(),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",!n.annotationDragging&&!!(n!=null&&n.user)&&(n.bubbleOnPinHover&&n.commentPinHover||n.commentBubbleHover||n.commentPinSelected))("cdkConnectedOverlayPanelClass",gt(10,TKt))("cdkConnectedOverlayOffsetY",n.popoverMode?0:n.commentPinBubbleOverlayOriginY==="top"?-8:2)("cdkConnectedOverlayOffsetX",n.popoverMode?n.commentPinBubbleOverlayOriginX==="end"?4:0:n.showCommentIndex&&n.commentPinBubbleOverlayOriginX==="end"?8:0)("cdkConnectedOverlayBackdropClass","velt-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayPositions",n.positions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)}}function MKt(i,o){i&1&&je(0)}function kKt(i,o){if(i&1&&g(0,MKt,1,0,"ng-container",13),i&2){l();let n=de(2),e=de(9);d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,b0e,n))}}function RKt(i,o){if(i&1){let n=Y();f(0),_(1,"velt-multi-thread-comment-dialog-internal",14),P(2,"translate"),G("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment.emit(t))})("updateOverlayPosition",function(){N(n);let t=l(4);return F(t.updateOverlayPosition())})("pointerOutFromCommentDialog",function(t){N(n);let r=l(4);return F(r.onPointerOutFromCommentDialog(t))})("pointerUp",function(t){N(n);let r=l(4);return F(r.onPointerUpOnDialog(t))}),b(),v()}if(i&2){let n=l(3).ngIf,e=l();m(),d("multiThreadAnnotationId",n.annotation==null?null:n.annotation.annotationId)("annotation",n.annotation)("user",n.user)("commentPinSelected",n.commentPinSelected)("containerComponentId",n.containerComponentId)("context",e.context)("commentPinType",n.commentPinType),x("role","dialog")("aria-label",M(2,9,"Multi-thread comment dialog"))}}function NKt(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-dialog",15),P(1,"translate"),G("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment.emit(t))})("updateOverlayPosition",function(){N(n);let t=l(4);return F(t.updateOverlayPosition())})("pointerOutFromCommentDialog",function(t){N(n);let r=l(4);return F(r.onPointerOutFromCommentDialog(t))})("addComment",function(t){N(n);let r=l(4);return F(r.addCommentEmitter.emit(t))})("pointerUp",function(){N(n);let t=l(4);return F(t.onPointerUpOnDialog())}),b()}if(i&2){let n=l(3).ngIf;d("annotation",n.annotation)("user",n.user)("commentPinSelected",n.commentPinSelected)("containerComponentId",n.containerComponentId)("commentPinType",n.commentPinType),x("role","dialog")("aria-label",M(1,7,"Comment dialog"))}}function FKt(i,o){if(i&1&&g(0,RKt,3,11,"ng-container",8)(1,NKt,2,9,"ng-template",null,2,Te),i&2){let n=de(2),e=l(2).ngIf;d("ngIf",(e==null||e.annotation==null?null:e.annotation.type)==="multiThread")("ngIfElse",n)}}function LKt(i,o){if(i&1){let n=Y();g(0,FKt,3,2,"ng-template",10,5,Te),G("positionChange",function(t){N(n);let r=l(2);return F(r.onCommentDialogPositionChange(t))})}if(i&2){let n=o.trigger,e=l().ngIf;d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",(!e.commentBubbleAvailable||e.commentPinType==="bubble")&&!!(e!=null&&e.user)&&!e.annotationDragging&&(!e.isPhone||!e.mobileMode)&&!e.dialogOpenedInSidebar&&!e.streamMode&&!e.inboxMode&&e.floatingCommentsEnabled&&(e.commentPinSelected||e.dialogOnHover&&(e.bubbleOnPin?e.commentBubbleHover:e.commentPinHover)||e.commentPinType==="bubble"&&e.commentBubbleTargetPinHover))("cdkConnectedOverlayPanelClass",gt(10,DKt))("cdkConnectedOverlayOffsetY",e.popoverMode?0:e.commentDialogOverlayOriginY==="top"?-8:2)("cdkConnectedOverlayOffsetX",e.popoverMode?e.commentDialogOverlayOriginX==="end"?4:0:e.showCommentIndex&&e.commentDialogOverlayOriginX==="end"?8:0)("cdkConnectedOverlayBackdropClass","velt-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayPositions",e.positions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0)}}function BKt(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-bottom-sheet",16),P(1,"translate"),G("saveComment",function(t){N(n);let r=l(2);return F(r.saveComment.emit(t))}),b()}if(i&2){let n=l().ngIf;d("annotation",n.annotation)("user",n.user),x("role","dialog")("aria-label",M(1,4,"Comment bottom sheet"))}}function VKt(i,o){if(i&1){let n=Y();f(0),_(1,"div",7,0),P(3,"translate"),G("click",function(t){return N(n),F(t.preventDefault())})("pointerenter",function(t){return N(n),l().onPointerOver(t),F(t.stopPropagation())})("pointerleave",function(){N(n);let t=l();return F(t.onPointerOut())}),Lt(4),b(),g(5,PKt,3,11,"ng-container",8)(6,kKt,1,4,"ng-template",null,1,Te)(8,LKt,2,11,"ng-template",null,2,Te)(10,BKt,2,6,"snippyly-comment-bottom-sheet",9),v()}if(i&2){let n=o.ngIf,e=de(7),t=l();m(),x("data-testid",t.componentId+"-trigger")("role","button")("aria-expanded",n.commentPinSelected)("aria-haspopup","dialog")("aria-label",M(3,8,"Comment pin")),m(4),d("ngIf",n.bubbleOnPin&&!n.commentBubbleAvailable&&!n.dialogOpenedInSidebar)("ngIfElse",e),m(5),d("ngIf",(n==null?null:n.user)&&n.mobileMode&&n.isPhone&&!n.sidebarVisible&&!n.dialogOpenedInSidebar&&!n.inboxMode&&!n.streamMode&&n.floatingCommentsEnabled&&n.commentPinSelected)}}var b_=(()=>{let o=class o{constructor(e,t,r,a,s){this.breakpointObserver=e,this.commentService=t,this.domService=r,this.loggingService=a,this.elementRef=s,this.commentPinSelected=!1,this.annotationDragging=!1,this.commentPinType="pin",this.commentBubbleTargetPinHover=!1,this.showBubbleOnHover=!1,this.bubbleOnPin=!1,this.bubbleOnPinHover=!1,this.saveComment=new Pe,this.togglePinSelection=new Pe,this.commentTargetElementClicked=new Pe,this.addCommentEmitter=new Pe,this.isDialogOnHoverEnabled=!1,this.isDialogOnTargetElementClickEnabled=!1,this.previouslySelectedAnnotations={},this.eventListenersSubscriptions=[],this.customScrollableParentEventsListenersSubscriptions=[],this.componentConfigSignal=De({bubbleOnPin:!1,bubbleOnPinHover:!1,dialogOnHover:!1,commentBubbleAvailable:!1,commentPinHover:!1,commentBubbleHover:!1,commentPinSelected:!1,popoverMode:!1,showCommentIndex:!1,commentBubbleTargetPinHover:!1,isBubbleInitialized:!1,annotationDragging:!1,commentPinBubbleOverlayOriginX:"start",commentPinBubbleOverlayOriginY:"top",positions:[],annotation:void 0,commentPinType:"pin",isPhone:!1,mobileMode:!1,streamMode:!1,inboxMode:!1,floatingCommentsEnabled:!1,sidebarVisible:!1,dialogOpenedInSidebar:!1,commentDialogOverlayOriginX:"start",commentDialogOverlayOriginY:"top",user:void 0}),this.subscriptions=[],this.componentId="velt-comment-dialog-portal";try{this.loggingService.log("%c[WB] Creating COMPONENT CommentDialogPortalComponent","color: blue;"),this.subscriptions.push(this.breakpointObserver.observe(Ni.XSmall).subscribe(c=>{c.matches?this.componentConfigSignal.update(p=>(p=T(I({},p),{isPhone:!0}),p)):this.componentConfigSignal.update(p=>(p=T(I({},p),{isPhone:!1}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent breakpointObserver subscription: ",c)})),this.subscriptions.push(this.commentService.getSidebarVisibility$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{sidebarVisible:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getSidebarVisibility$ subscription: ",c)})),this.subscriptions.push(this.commentService.getMobileMode$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{mobileMode:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getMobileMode$ subscription: ",c)})),this.subscriptions.push(this.commentService.getShowCommentIndex().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{showCommentIndex:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getShowCommentIndex subscription: ",c)})),this.subscriptions.push(this.commentService.getStreamMode$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{streamMode:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getStreamMode$ subscription: ",c)})),this.subscriptions.push(this.commentService.getInboxMode$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{inboxMode:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getInboxMode subscription: ",c)})),this.subscriptions.push(this.domService.getDialogOpenedInSidebar().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{dialogOpenedInSidebar:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent getDialogOpenedInSidebar subscription: ",c)})),this.subscriptions.push(this.commentService.getPopoverMode$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{popoverMode:c}),p)),this.componentConfigSignal().popoverMode?this.componentConfigSignal.update(p=>(p=T(I({},p),{positions:j.OVERLAY_POSITIONS_FOR_POPOVER_MODE.map(u=>new Ii({originX:u.originX,originY:u.originY},{overlayX:u.overlayX,overlayY:u.overlayY}))}),p)):this.componentConfigSignal.update(p=>(p=T(I({},p),{positions:j.OVERLAY_POSITIONS.map(u=>new Ii({originX:u.originX,originY:u.originY},{overlayX:u.overlayX,overlayY:u.overlayY}))}),p)),this.addEventListeners()},c=>{this.catchError("Error in CommentDialogPortalComponent getPopoverMode subscription: ",c)})),this.subscriptions.push(this.commentService.showFloatingComments$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{floatingCommentsEnabled:c}),p))},c=>{this.catchError("Error in CommentDialogPortalComponent showFloatingComments$ subscription: ",c)})),this.subscriptions.push(this.commentService.getEnableDialogOnHover$().subscribe(c=>{this.isDialogOnHoverEnabled=c,this.componentConfigSignal.update(p=>(p=T(I({},p),{dialogOnHover:c}),p)),this.addEventListeners()},c=>{this.catchError("Error in CommentDialogPortalComponent getEnableDialogOnHover subscription: ",c)})),this.subscriptions.push(this.commentService.getEnableDialogOnTargetElementClick$().subscribe(c=>{this.isDialogOnTargetElementClickEnabled=c,this.addEventListeners()},c=>{this.catchError("Error in CommentDialogPortalComponent getEnableDialogOnTargetElementClick subscription: ",c)})),this.subscriptions.push(this.commentService.getBubbleCommentAnnotationIds$().subscribe(c=>{if(c.includes(this.componentConfigSignal().annotation?.annotationId)){this.commentBubbleElement=this.commentService.getCommentBubbleElement(this.componentConfigSignal().annotation);let p=this.commentBubbleElement?.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_ID)||"";this.commentBubbleElementAnnotationId!==p&&(this.commentBubbleElementAnnotationId=p,this.componentConfigSignal.update(u=>(u=T(I({},u),{commentBubbleAvailable:!0}),u)))}else this.componentConfigSignal().commentBubbleAvailable&&(this.commentBubbleElement=null,this.commentBubbleElementAnnotationId="",this.componentConfigSignal.update(p=>(p=T(I({},p),{commentBubbleAvailable:!1}),p)))},c=>{this.catchError("Error in CommentDialogPortalComponent getBubbleCommentAnnotationIds$ subscription: ",c)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().pipe(Li()).subscribe(([c,p])=>{this.previouslySelectedAnnotations=c||{},p&&!p[this.componentConfigSignal().annotation?.annotationId]&&this.componentConfigSignal().commentPinHover&&this.setCommentPinHover(!1)},c=>{this.catchError("Error in CommentDialogPortalComponent getSelectedAnnotationsMap$ subscription: ",c)}))}catch(c){this.catchError("Error in CommentDialogPortalComponent constructor: ",c)}}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogPortalComponent ngOnInit:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogPortalComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{this.updateHighlightOnElement(),this.updateCommentActiveAttributeOnElement()}catch(e){this.catchError("Error in CommentDialogPortalComponent AfterViewInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e?.commentPinSelected&&(this.componentConfigSignal().commentPinSelected&&this.setCommentPinHover(!1),this.updateHighlightOnElement(),this.updateCommentActiveAttributeOnElement()),e?.targetElement&&(this.addEventListeners(),this.targetElement?this.setCustomScrollableParents($p(this.targetElement)):this.setCustomScrollableParents([]))}catch(t){this.catchError("Error in CommentDialogPortalComponent ngOnChanges: ",t)}}onBubbleAfterViewInit(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{isBubbleInitialized:!0}),e))}catch(e){this.catchError("Error in CommentDialogPortalComponent onBubbleAfterViewInit: ",e)}}onBubbleOnDestroy(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{isBubbleInitialized:!1}),e))}catch(e){this.catchError("Error in CommentDialogPortalComponent onBubbleOnDestroy: ",e)}}onCommentPinBubblePositionChange(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinBubbleOverlayOriginX:e.connectionPair.originX,commentPinBubbleOverlayOriginY:e.connectionPair.originY}),t))}catch(t){this.catchError("Error in CommentDialogPortalComponent onCommentPinBubblePositionChange: ",t)}}onCommentDialogPositionChange(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{commentDialogOverlayOriginX:e.connectionPair.originX,commentDialogOverlayOriginY:e.connectionPair.originY}),t))}catch(t){this.catchError("Error in CommentDialogPortalComponent onCommentDialogPositionChange: ",t)}}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().annotation?.annotationId),this.commentPinBubbleOverlay&&this.commentPinBubbleOverlay?.overlayRef?.updatePosition(),this.commentDialogOverlay&&this.commentDialogOverlay?.overlayRef?.updatePosition()}catch{}}onPointerOutFromCommentDialog(e){try{!this.targetElement?.contains(e?.relatedTarget)&&!this.componentConfigSignal().commentPinSelected&&this.onPointerOut()}catch(t){this.catchError("Error in CommentDialogPortalComponent onPointerOutFromCommentDialog: ",t)}}onPointerOut(){try{this.componentConfigSignal().bubbleOnPin?setTimeout(()=>{this.setCommentPinHover(!1)},500):this.setCommentPinHover(!1)}catch(e){this.catchError("Error in CommentDialogPortalComponent onPointerOut: ",e)}}setCommentPinHover(e){try{e&&this.targetElement&&!this.domService.isElementVisibleOnScreen(this.targetElement)&&(e=!1),this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinHover:e}),t)),this.updateHighlightOnElement(),this.updateCommentActiveAttributeOnElement(),this.commentBubbleElement&&(this.componentConfigSignal().commentPinHover?this.commentBubbleElement.setAttribute("comment-bubble-target-pin-hover","true"):this.commentBubbleElement.removeAttribute("comment-bubble-target-pin-hover"))}catch(t){this.catchError("Error in CommentDialogPortalComponent setCommentPinHover: ",t)}}addEventListeners(){try{this.removeEventListeners(),this.componentConfigSignal().popoverMode&&this.targetElement&&this.isDialogOnTargetElementClickEnabled&&this.componentConfigSignal().commentPinType!=="bubble"&&(this.isDialogOnHoverEnabled&&(this.eventListenersSubscriptions.push(pi(this.targetElement,"pointerover").subscribe(e=>{this.onPointerOver(e),e.stopPropagation()},e=>{this.catchError("Error in CommentDialogPortalComponent addEventListeners pointerover subscription: ",e)})),this.eventListenersSubscriptions.push(pi(this.targetElement,"pointerout").subscribe(e=>{!this.targetElement?.contains(e?.relatedTarget)&&!e?.relatedTarget?.closest(j.TAGS.SNIPPYLY_COMMENT_DIALOG)&&this.onPointerOut()},e=>{this.catchError("Error in CommentDialogPortalComponent addEventListeners pointerout subscription: ",e)}))),this.eventListenersSubscriptions.push(pi(this.targetElement,"click").subscribe(e=>{this.previouslySelectedAnnotations[this.componentConfigSignal().annotation?.annotationId]||(this.commentTargetElementClicked.emit(),e.stopPropagation())},e=>{this.catchError("Error in CommentDialogPortalComponent addEventListeners click subscription: ",e)})))}catch(e){this.catchError("Error in CommentDialogPortalComponent addEventListeners: ",e)}}removeEventListeners(){try{this.eventListenersSubscriptions.map(e=>{e.unsubscribe()}),this.eventListenersSubscriptions=[]}catch(e){this.catchError("Error in CommentDialogPortalComponent removeEventListeners: ",e)}}updateHighlightOnElement(){try{this.targetElement&&(this.componentConfigSignal().commentPinSelected||this.componentConfigSignal().commentPinHover?this.domService.highlightElement(this.targetElement):this.domService.removeHighlightFromElement(this.targetElement))}catch(e){this.catchError("Error in CommentDialogPortalComponent updateHighlightOnElement: ",e)}}updateCommentActiveAttributeOnElement(){try{this.loggingService.log("%c[WB] Calling FUNCTION: updateCommentActiveAttributeOnElement","color: green;"),this.componentConfigSignal().commentPinSelected||this.componentConfigSignal().commentPinHover?this.targetElement&&(this.targetElement?.hasAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_ACTIVE)||this.targetElement?.setAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_ACTIVE,"true")):this.targetElement&&this.targetElement?.hasAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_ACTIVE)&&this.targetElement?.removeAttribute(j.ATTRIBUTES.VELT_COMMENT_PIN_ACTIVE)}catch(e){this.catchError("Error in CommentDialogPortalComponent onCommentFocusChange: ",e)}}onPointerUpOnDialog(e){try{(!this.componentConfigSignal().commentPinSelected||e)&&this.togglePinSelection.emit(e)}catch(t){this.catchError("Error in CommentDialogPortalComponent onPointerUpOnDialog: ",t)}}onPointerOver(e){try{if(this.componentConfigSignal().commentPinHover)return;e.buttons?this.componentConfigSignal().commentPinHover&&this.setCommentPinHover(!1):!this.componentConfigSignal().commentPinHover&&(this.componentConfigSignal().bubbleOnPin?this.componentConfigSignal().bubbleOnPinHover:this.isDialogOnHoverEnabled)&&this.setCommentPinHover(!0)}catch(t){this.catchError("Error in CommentDialogPortalComponent onPointerOver: ",t)}}setCustomScrollableParents(e){try{this.customScrollableParents=e,this.addCustomScrollableParentsEventListeners()}catch(t){this.catchError("Error in CommentDialogPortalComponent setCustomScrollableParents: ",t)}}addCustomScrollableParentsEventListeners(){try{this.removeCustomScrollableParentsEventListeners(),this.customScrollableParents?.length&&this.customScrollableParents?.forEach(e=>{this.customScrollableParentEventsListenersSubscriptions.push(pi(e,"scroll",{passive:!0}).subscribe(t=>{this.updateOverlayPosition()},t=>{this.catchError("Error in CommentDialogPortalComponent addCustomScrollableParentsEventListeners scroll subscription: ",t)}))})}catch(e){this.catchError("Error in CommentDialogPortalComponent addCustomScrollableParentsEventListeners: ",e)}}removeCustomScrollableParentsEventListeners(){try{this.customScrollableParentEventsListenersSubscriptions.map(e=>{e.unsubscribe()}),this.customScrollableParentEventsListenersSubscriptions=[]}catch(e){this.catchError("Error in CommentDialogPortalComponent removeCustomScrollableParentsEventListeners: ",e)}}onBubblePointerOver(e){try{if(this.componentConfigSignal().commentBubbleHover)return;e.buttons||this.componentConfigSignal.update(t=>(t=T(I({},t),{commentBubbleHover:!0}),t))}catch(t){this.catchError("Error in CommentDialogPortalComponent onBubblePointerOver: ",t)}}onBubblePointerOut(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{commentBubbleHover:!1}),e))}catch(e){this.catchError("Error in CommentDialogPortalComponent onBubblePointerOut: ",e)}}onPointerUpOnBubble(){try{this.componentConfigSignal().commentPinSelected||this.togglePinSelection.emit()}catch(e){this.catchError("Error in CommentDialogPortalComponent onPointerUpOnBubble: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.catchError("Error in CommentDialogPortalComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.removeEventListeners(),this.removeCustomScrollableParentsEventListeners(),this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.catchError("Error in CommentDialogPortalComponent unsubscribe: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(fo),h(we),h(Be),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-dialog-portal-internal"]],viewQuery:function(t,r){if(t&1&&(nt(IKt,5),nt(EKt,5)),t&2){let a;Xe(a=Qe())&&(r.commentDialogOverlay=a.first),Xe(a=Qe())&&(r.commentPinBubbleOverlay=a.first)}},inputs:{annotation:"annotation",context:"context",commentPinSelected:"commentPinSelected",annotationDragging:"annotationDragging",commentPinType:"commentPinType",commentBubbleTargetPinHover:"commentBubbleTargetPinHover",user:"user",targetElement:"targetElement",showBubbleOnHover:"showBubbleOnHover",bubbleOnPin:"bubbleOnPin",bubbleOnPinHover:"bubbleOnPinHover",containerComponentId:"containerComponentId"},outputs:{saveComment:"saveComment",togglePinSelection:"togglePinSelection",commentTargetElementClicked:"commentTargetElementClicked",addCommentEmitter:"addComment"},standalone:!1,features:[Ze],ngContentSelectors:xKt,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["defaultDialogViewRef",""],["commentDialogRef",""],["commentPinBubbleOverlay","cdkConnectedOverlay"],["bubbleOnHoverTrigger","cdkOverlayOrigin"],["commentDialogOverlay","cdkConnectedOverlay"],[4,"ngIf"],["cdkOverlayOrigin","",3,"click","pointerenter","pointerleave"],[4,"ngIf","ngIfElse"],[3,"annotation","user","saveComment",4,"ngIf"],["cdkConnectedOverlay","",3,"positionChange","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOffsetY","cdkConnectedOverlayOffsetX","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],["cdkOverlayOrigin","",3,"click","pointerenter","pointerleave","pointerup"],["veltAfterViewInit","",3,"afterViewInit","onDestroy","annotation"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"saveComment","updateOverlayPosition","pointerOutFromCommentDialog","pointerUp","multiThreadAnnotationId","annotation","user","commentPinSelected","containerComponentId","context","commentPinType"],[3,"saveComment","updateOverlayPosition","pointerOutFromCommentDialog","addComment","pointerUp","annotation","user","commentPinSelected","containerComponentId","commentPinType"],[3,"saveComment","annotation","user"]],template:function(t,r){t&1&&(jt(),g(0,VKt,11,10,"ng-container",6)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,_t,on,en,Xo,t7,yg,S0e,ms,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var UKt=["pinRef"],jKt=["commentDialogPortalRef"],$Kt=["*"],x0e=i=>({componentConfigSignal:i}),HKt=(i,o)=>({condition:i,data:o}),E0e=()=>["bubble","chart"],zKt=(i,o,n,e,t)=>({template:i,context:o,componentName:"velt-comment-pin-wireframe",variant:n,setIfCondition:e,componentElementRef:t}),GKt=(i,o,n)=>({"velt-comment-pin--status-default":i,"velt-comment-pin--status-ongoing":o,"velt-comment-pin--status-terminal":n});function WKt(i,o){i&1&&je(0)}function qKt(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),g(1,WKt,1,0,"ng-container",11),b()),i&2){l();let n=de(3),e=l(2);x("data-testid",e.componentId+"-shadow-dom"),m(),d("ngTemplateOutlet",n)}}function YKt(i,o){if(i&1){let n=Y();f(0),_(1,"div",14),G("click",function(t){return N(n),F(t.preventDefault())}),Lt(2),b(),v()}i&2&&(m(),x("role","presentation"))}function KKt(i,o){if(i&1&&(f(0),w(1,"app-comment-pin-triangle",15),v()),i&2){let n=l(5);m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.triangleTemplate)}}function ZKt(i,o){i&1&&(le(),_(0,"svg",20),w(1,"path",21)(2,"path",22),b())}function XKt(i,o){i&1&&(le(),_(0,"svg",20),w(1,"path",23)(2,"path",24),b())}function QKt(i,o){i&1&&(le(),_(0,"svg",20),w(1,"path",25)(2,"path",26),b())}function JKt(i,o){i&1&&(le(),_(0,"svg",20),w(1,"path",27)(2,"path",28),b())}function eZt(i,o){if(i&1&&(f(0)(1,18),g(2,ZKt,3,0,"svg",19)(3,XKt,3,0,"svg",19)(4,QKt,3,0,"svg",19)(5,JKt,3,0,"svg",19),v()()),i&2){let n=l(6).ngIf;m(),d("ngSwitch",n.annotation==null||n.annotation.pageInfo==null||n.annotation.pageInfo.deviceInfo==null?null:n.annotation.pageInfo.deviceInfo.deviceType),m(),d("ngSwitchCase","Mobile"),m(),d("ngSwitchCase","Tablet"),m(),d("ngSwitchCase","Desktop"),m(),d("ngSwitchCase","Monitor")}}function tZt(i,o){if(i&1&&w(0,"snippyly-user-avatar",29),i&2){let n=l(6).ngIf;d("user",n.annotation==null?null:n.annotation.from)}}function nZt(i,o){if(i&1&&(f(0),w(1,"app-comment-pin-unread-comment-indicator",15),v()),i&2){let n=l(7);m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.unreadCommentIndicatorTemplate)}}function iZt(i,o){if(i&1&&w(0,"app-comment-pin-index",15)(1,"app-comment-pin-ghost-comment-indicator",15)(2,"app-comment-pin-private-comment-indicator",15),i&2){let n=l(7);d("componentConfigSignal",n.componentConfigSignal)("template",n.indexTemplate),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.ghostCommentIndicatorTemplate),m(),d("componentConfigSignal",n.componentConfigSignal)("template",n.privateCommentIndicatorTemplate)}}function oZt(i,o){if(i&1){let n=Y();f(0),_(1,"div",17,5),G("click",function(t){return N(n),F(t.preventDefault())}),g(3,eZt,6,5,"ng-container",10)(4,tZt,1,1,"ng-template",null,6,Te)(6,nZt,2,2,"ng-container",10)(7,iZt,3,6,"ng-template",null,7,Te),b(),v()}if(i&2){let n=de(5),e=de(8),t=l(5).ngIf,r=l();m(),it("--velt-internal-comment-pin-bg-color",(t.annotation==null||t.annotation.status==null?null:t.annotation.status.color)||null),ge("velt-comment-pin--marker-transparent",r.usingCustomCommentPin)("velt-comment-pin--marker-default",!r.usingCustomCommentPin),d("ngClass",$e(12,GKt,!t.customStatusesShown&&(t.annotation==null||t.annotation.status==null?null:t.annotation.status.type)==="default",!t.customStatusesShown&&(t.annotation==null||t.annotation.status==null?null:t.annotation.status.type)==="ongoing",!t.customStatusesShown&&(t.annotation==null||t.annotation.status==null?null:t.annotation.status.type)==="terminal")),x("role","presentation"),m(2),d("ngIf",t.isDeviceIndicatorOnCommentPinsEnabled&&t.isCommentAddedOnDifferentDeviceType)("ngIfElse",n),m(3),d("ngIf",!(t.user!=null&&t.user.isGuest)&&!(t.user!=null&&t.user.isAnonymous)&&(t==null||t.unreadCommentsMap==null?null:t.unreadCommentsMap[t.annotation==null?null:t.annotation.annotationId]))("ngIfElse",e)}}function rZt(i,o){if(i&1){let n=Y();_(0,"div",14),G("click",function(t){return N(n),F(t.preventDefault())}),g(1,oZt,9,16,"ng-container",16),b()}if(i&2){let n=l(4).ngIf,e=l();x("role","presentation"),m(),d("veltDynamicTemplate",$(4,zKt,e.template,A(2,x0e,e.componentConfigSignal),n==null?null:n.variant,e.setIfCondition.bind(e),e.elementRef))}}function aZt(i,o){if(i&1&&g(0,KKt,2,2,"ng-container",10)(1,rZt,2,10,"ng-template",null,4,Te),i&2){let n=de(2),e=l(3).ngIf;d("ngIf",e.popoverMode)("ngIfElse",n)}}function sZt(i,o){if(i&1){let n=Y();_(0,"velt-comment-dialog-portal-internal",12,1),G("saveComment",function(t){N(n);let r=l(3);return F(r.saveComment.emit(t))})("togglePinSelection",function(t){N(n);let r=l(3);return F(r.onPinBubblePointerUp(t))})("pointerUp",function(){N(n);let t=l(3);return F(t.onPointerUpOnDialog())}),_(2,"div",13,2),g(4,YKt,3,1,"ng-container",10)(5,aZt,3,2,"ng-template",null,3,Te),b()()}if(i&2){let n=de(6),e=l(2).ngIf,t=l();d("annotation",e.annotation)("user",e.user)("commentPinSelected",e.commentPinSelected)("annotationDragging",e.annotationDragging)("commentPinType",e.commentPinType)("targetElement",e.targetElement)("bubbleOnPin",e.bubbleOnPin)("bubbleOnPinHover",e.bubbleOnPinHover)("containerComponentId",e.containerComponentId),m(2),it("--velt-internal-comment-pin-max-width",t.pinMaxWidth),ge("velt-comment-pin--ghost",!!(e.annotation!=null&&e.annotation.ghostComment))("velt-comment-pin--different-device",e.isDeviceIndicatorOnCommentPinsEnabled&&e.isCommentAddedOnDifferentDeviceType)("velt-comment-pin--outside-viewport",!e.annotationDragging&&t.isOutsideViewport)("velt-comment-pin-open",e.commentPinSelected&&!e.annotationDragging)("velt-comment-pin-unread-comment",!(e.user!=null&&e.user.isGuest)&&!(e.user!=null&&e.user.isAnonymous)&&(e==null||e.unreadCommentsMap==null?null:e.unreadCommentsMap[e.annotation==null?null:e.annotation.annotationId]))("velt-display-none",e.commentPinType!=="bubble"&&e.commentBubbleElementAnnotationId&&e.commentBubbleElementAnnotationId!==(e.annotation==null?null:e.annotation.annotationId)),x("data-testid",t.componentId)("role","button")("aria-expanded",e.commentPinSelected),m(2),d("ngIf",e.commentPinType==="bubble"||e.commentPinType==="chart")("ngIfElse",n)}}function lZt(i,o){if(i&1&&(f(0),g(1,qKt,2,2,"velt-shadow-dom-internal",10)(2,sZt,7,28,"ng-template",null,0,Te),v()),i&2){let n=de(3),e=l().ngIf,t=l();m(),d("ngIf",!t.template&&t.pinShadowDOM&&!(gt(2,E0e)!=null&&gt(3,E0e).includes(e.commentPinType)))("ngIfElse",n)}}function cZt(i,o){if(i&1&&(f(0),g(1,lZt,4,4,"ng-container",9),v()),i&2){let n=l();m(),d("veltIf",k(3,HKt,n.conditionSignal(),A(1,x0e,n.componentConfigSignal)))}}var Eg=(()=>{let o=class o extends f9{constructor(e,t,r,a,s,c,p){super(c,p,r),this.commentService=e,this.domService=t,this.loggingService=r,this.commentPinPortalService=a,this.wireframeService=s,this.elementRef=c,this.dynamicDataService=p,this.commentPinSelected=!1,this.annotationDragging=!1,this.commentPinType="pin",this.usingCustomCommentPin=!1,this.multipleCommentPinsSelected=!1,this.avatarErrorImage="",this.saveComment=new Pe,this.pinShadowDOM=!1,this.subscriptions=[],this.commentTargetElementClicked=new Pe,this.togglePinSelection=new Pe,this.commentBubbleAvailable=!1,this.commentPinPosition={top:0,left:0},this.isOutsideViewport=!1,this.pinMaxWidth="",this.previouslySelectedAnnotations={},this.deviceInfo=new zn,this.COMMENT_PIN_SIZE=40,this.componentConfigSignal=De({isGhostComment:!1,isPrivateComment:!1,showCommentIndex:!1,bubbleOnPin:!1,bubbleOnPinHover:!1,commentPinSelected:!1,annotationDragging:!1,popoverMode:!1,isDeviceIndicatorOnCommentPinsEnabled:!1,isCommentAddedOnDifferentDeviceType:!1,annotation:this.annotation,user:this.user,unreadCommentsMap:null,popoverTriangleComponent:!1}),this.veltElement=!0,this.componentId="velt-comment-pin",this.loggingService.log("%c[WB] Creating COMPONENT CommentPinComponent","color: blue;"),this.subscriptions.push(this.domService.getDeviceInfo$().subscribe(u=>{this.deviceInfo=u,this.checkIfCommentAddedOnDifferentDeviceType()})),this.subscriptions.push(this.commentService.getShowCommentIndex().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{showCommentIndex:u}),C))},u=>{this.catchError("Error in CommentPinComponent getShowCommentIndex subscription: ",u)})),this.subscriptions.push(this.commentService.getBubbleOnPin$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{bubbleOnPin:u}),C))},u=>{this.catchError("Error in CommentPinComponent getBubbleOnPin subscription: ",u)})),this.subscriptions.push(this.commentService.getBubbleOnPinHover$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{bubbleOnPinHover:u}),C))},u=>{this.catchError("Error in CommentPinComponent getBubbleOnPinHover subscription: ",u)})),this.subscriptions.push(this.commentService.getPopoverTriangleComponent$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{popoverTriangleComponent:u}),C))},u=>{this.catchError("Error in CommentPinComponent getPopoverTriangleComponent$ subscription: ",u)})),this.subscriptions.push(this.commentService.getPinShadowDOM$().subscribe(u=>{this.pinShadowDOM=u},u=>{this.catchError("Error in CommentPinComponent getPinShadowDOM$ subscription: ",u)})),this.subscriptions.push(this.commentService.getPinDarkMode$().subscribe(u=>{u!==null&&(u?this.elementRef.nativeElement.setAttribute("dark",""):this.elementRef.nativeElement.removeAttribute("dark"))},u=>{this.catchError("Error in CommentPinComponent pinDarkMode$ subscription: ",u)})),this.subscriptions.push(this.commentService.getPopoverMode$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{popoverMode:u}),C))},u=>{this.catchError("Error in CommentPinComponent getPopoverMode subscription: ",u)})),this.subscriptions.push(this.commentService.getDeviceIndicatorOnCommentPins$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{isDeviceIndicatorOnCommentPinsEnabled:u}),C))},u=>{this.catchError("Error in CommentPinComponent getDeviceIndicatorOnCommentPins subscription: ",u)})),this.subscriptions.push(this.commentService.getUnreadCommentsMap$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{unreadCommentsMap:u}),C))})),this.subscriptions.push(this.commentService.getCustomStatusesShown$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{customStatusesShown:u}),C))}))}ngOnInit(){try{if(this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),super.ngOnInit(),this.setupA11yAttributes(),!this.template){let e="velt-comment-pin-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r,this.getChildTemplate()}}))}this.getChildTemplate()}catch(e){this.catchError("Error in CommentsToolComponent OnInit: ",e)}}getChildTemplate(){try{if(!this.ghostCommentIndicatorTemplate&&this.template){let e=this.template.querySelector("velt-comment-pin-ghost-comment-indicator-wireframe");Ke(e)||(this.ghostCommentIndicatorTemplate=e)}if(!this.indexTemplate&&this.template){let e=this.template.querySelector("velt-comment-pin-index-wireframe");Ke(e)||(this.indexTemplate=e)}if(!this.privateCommentIndicatorTemplate&&this.template){let e=this.template.querySelector("velt-comment-pin-private-comment-indicator-wireframe");Ke(e)||(this.privateCommentIndicatorTemplate=e)}if(!this.triangleTemplate&&this.template){let e=this.template.querySelector("velt-comment-pin-triangle-wireframe");Ke(e)||(this.triangleTemplate=e)}if(!this.unreadCommentIndicatorTemplate&&this.template){let e=this.template.querySelector("velt-comment-pin-unread-comment-indicator-wireframe");Ke(e)||(this.unreadCommentIndicatorTemplate=e)}}catch(e){this.loggingService.catch("Error in CommentPinComponent getChildTemplate: ",e)}}ngAfterViewInit(){try{this.subscriptions.push(this.commentPinPortalService.getCommentPinTemplate$().subscribe(e=>{if(e!==null){let t=e?.cloneNode(!0);if(t.setAttribute("slot","comment-pin"),this.pinRef!==void 0){this.pinRef.nativeElement.appendChild(t);let r=$0(this.componentConfigSignal().annotation);this.injectAttributeData(t,r),this.usingCustomCommentPin=!0,this.commentPinPortalService.emitCustomPinEvent({annotation:this.componentConfigSignal().annotation,element:t}),this.pinRef.nativeElement.childNodes.forEach(a=>{a?.tagName?.toLowerCase()===j.TAGS.SNIPPYLY_USER_AVATAR&&a.remove()})}}else this.usingCustomCommentPin=!1})),this.subscriptions.push(this.commentService.getBubbleCommentAnnotationIds$().subscribe(e=>{if(e.includes(this.componentConfigSignal().annotation?.annotationId)){this.commentBubbleElement=this.commentService.getCommentBubbleElement(this.componentConfigSignal().annotation);let t=this.commentBubbleElement?.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_ID)||"";this.componentConfigSignal().commentBubbleElementAnnotationId!==t&&(this.componentConfigSignal.update(r=>(r=T(I({},r),{commentBubbleElementAnnotationId:t}),r)),this.commentBubbleAvailable=!0)}else this.commentBubbleAvailable&&(this.commentBubbleElement=null,this.componentConfigSignal.update(t=>(t=T(I({},t),{commentBubbleElementAnnotationId:""}),t)),this.commentBubbleAvailable=!1)},e=>{this.catchError("Error in CommentPinComponent getBubbleCommentAnnotationIds$ subscription: ",e)}))}catch(e){this.catchError("Error in CommentPinComponent AfterViewInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentPinComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{if(e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e?.annotation){if(this.commentService.customPinsById.has(this.componentConfigSignal().annotation.annotationId)){let r=this.commentService.getCustomPinById(this.componentConfigSignal().annotation.annotationId);if(r!==void 0){let a=$0(this.componentConfigSignal().annotation);this.injectAttributeData(r,a)}}this.setUserInitial(),this.componentConfigSignal.update(r=>(r=T(I({},r),{isPrivateComment:this.componentConfigSignal().annotation?.iam?.accessMode===io.PRIVATE,isGhostComment:!!this.componentConfigSignal().annotation?.ghostComment}),r)),this.checkIfCommentAddedOnDifferentDeviceType();let t=JSON.parse(JSON.stringify(this.commentPinPosition||{}));this.commentPinPosition={top:this.componentConfigSignal().annotation?.position?.top||0,left:this.componentConfigSignal().annotation?.position?.left||0}}}catch(t){this.catchError("Error in CommentPinComponent ngOnChanges: ",t)}}detectCommentPinOutsideViewport(){try{this.loggingService.log("%c[WB] Calling FUNCTION: detectCommentPinOutsideViewport","color: green;");let e=this.pinRef?.nativeElement;if(e){let t=e?.getBoundingClientRect(),r=Math.max(document?.documentElement?.clientWidth||0,window?.innerWidth||0);if(t?.right>r){let a=r-t.left;a>0?(this.pinMaxWidth=`${a}px`,this.isOutsideViewport=!0):(this.isOutsideViewport=!1,this.pinMaxWidth="")}else this.isOutsideViewport=!1,this.pinMaxWidth=""}else this.isOutsideViewport=!1}catch(e){this.catchError("Error in CommentPinComponent detectCommentPinOutsideViewport: ",e)}}checkIfCommentAddedOnDifferentDeviceType(){try{this.componentConfigSignal().annotation?.pageInfo?.deviceInfo?.deviceType!==this.deviceInfo.deviceType?(this.componentConfigSignal.update(e=>(e=T(I({},e),{isCommentAddedOnDifferentDeviceType:!0}),e)),this.COMMENT_PIN_SIZE=34):(this.componentConfigSignal.update(e=>(e=T(I({},e),{isCommentAddedOnDifferentDeviceType:!1}),e)),this.COMMENT_PIN_SIZE=40)}catch(e){this.catchError("Error in CommentPinComponent checkIfCommentAddedOnDifferentDeviceType: ",e)}}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().annotation?.annotationId),this.commentDialogPortalRef?.updateOverlayPosition()}catch(e){this.catchError("Error in CommentPinComponent updateOverlayPosition: ",e)}}onPointerUpOnDialog(){try{this.componentConfigSignal().commentPinSelected||this.togglePinSelection.emit()}catch(e){this.catchError("Error in CommentPinComponent onPointerUpOnDialog: ",e)}}onPinBubblePointerUp(e){try{(!this.componentConfigSignal().commentPinSelected||e)&&this.togglePinSelection.emit(e)}catch(t){this.catchError("Error in CommentPinComponent onPointerUpOnDialog: ",t)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{super.ngOnDestroy(),this.unsubscribe()}catch(e){this.catchError("Error in CommentPinComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.catchError("Error in CommentPinComponent unsubscribe: ",e)}}setUserInitial(){try{this.userInitial=this.componentConfigSignal().annotation?.from?.initial||(this.componentConfigSignal().annotation?.from?.name?this.componentConfigSignal().annotation.from.name?.charAt(0).toUpperCase():this.componentConfigSignal().annotation?.from?.email?.charAt(0).toUpperCase()||"")}catch(e){this.catchError("Error in CommentPinComponent setUserInitial: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(we),h(Be),h(y),h(i7),h(ze),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-pin"]],viewQuery:function(t,r){if(t&1&&(nt(UKt,5),nt(jKt,5)),t&2){let a;Xe(a=Qe())&&(r.pinRef=a.first),Xe(a=Qe())&&(r.commentDialogPortalRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",commentPinSelected:"commentPinSelected",annotationDragging:"annotationDragging",commentPinType:"commentPinType",multipleCommentPinsSelected:"multipleCommentPinsSelected",avatarErrorImage:"avatarErrorImage",user:"user",variant:"variant",containerComponentId:"containerComponentId",targetElement:"targetElement"},outputs:{saveComment:"saveComment",commentTargetElementClicked:"commentTargetElementClicked",togglePinSelection:"togglePinSelection"},standalone:!1,features:[V([S]),B,Ze],ngContentSelectors:$Kt,decls:1,vars:1,consts:[["commentPinContainerRef",""],["commentDialogPortalRef",""],["trigger","cdkOverlayOrigin"],["normalPinRef",""],["defaultPinRef",""],["pinRef",""],["userAvatarRef",""],["readCommentIndicatorsRef",""],[4,"ngIf"],[4,"veltIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[3,"saveComment","togglePinSelection","pointerUp","annotation","user","commentPinSelected","annotationDragging","commentPinType","targetElement","bubbleOnPin","bubbleOnPinHover","containerComponentId"],["id","comment-pin-block","cdkOverlayOrigin","",1,"velt-comment-pin"],[3,"click"],[3,"componentConfigSignal","template"],[4,"veltDynamicTemplate"],[1,"velt-comment-pin--marker",3,"click","ngClass"],[3,"ngSwitch"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngSwitchCase"],["width","18","height","18","viewBox","0 0 18 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.0357 1.5H5.96429C5.29365 1.5 4.75 2.17157 4.75 3V15C4.75 15.8284 5.29365 16.5 5.96429 16.5H12.0357C12.7063 16.5 13.25 15.8284 13.25 15V3C13.25 2.17157 12.7063 1.5 12.0357 1.5Z","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M9 13.5H9.0075","stroke","white","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.75 1.5H5.25C4.83579 1.5 4.5 1.83579 4.5 2.25V15.75C4.5 16.1642 4.83579 16.5 5.25 16.5H12.75C13.1642 16.5 13.5 16.1642 13.5 15.75V2.25C13.5 1.83579 13.1642 1.5 12.75 1.5ZM5.25 0C4.00736 0 3 1.00736 3 2.25V15.75C3 16.9926 4.00736 18 5.25 18H12.75C13.9926 18 15 16.9926 15 15.75V2.25C15 1.00736 13.9926 0 12.75 0H5.25Z","fill","white"],["d","M9.75 14.25C9.75 14.6642 9.41421 15 9 15C8.58579 15 8.25 14.6642 8.25 14.25C8.25 13.8358 8.58579 13.5 9 13.5C9.41421 13.5 9.75 13.8358 9.75 14.25Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.75 4.5L3.75 11.25L14.25 11.25L14.25 4.5C14.25 4.08579 13.9142 3.75 13.5 3.75L4.5 3.75C4.08579 3.75 3.75 4.08579 3.75 4.5ZM2.25 12.75L15.75 12.75L15.75 4.5C15.75 3.25736 14.7426 2.25 13.5 2.25L4.5 2.25C3.25736 2.25 2.25 3.25736 2.25 4.5L2.25 12.75Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.25 12.75L2.25 13.5C2.25 13.9142 2.58579 14.25 3 14.25L15 14.25C15.4142 14.25 15.75 13.9142 15.75 13.5L15.75 12.75L2.25 12.75ZM0.75 13.5C0.75 14.7426 1.75736 15.75 3 15.75L15 15.75C16.2426 15.75 17.25 14.7426 17.25 13.5L17.25 12C17.25 11.5858 16.9142 11.25 16.5 11.25L1.5 11.25C1.08579 11.25 0.75 11.5858 0.75 12L0.75 13.5Z","fill","white"],["d","M6.75 13.5H8.25V15H9.75V13.5H11.25V15H12C12.4142 15 12.75 15.3358 12.75 15.75C12.75 16.1642 12.4142 16.5 12 16.5H6C5.58579 16.5 5.25 16.1642 5.25 15.75C5.25 15.3358 5.58579 15 6 15H6.75V13.5Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M3 4.5L3 10.5C3 11.3284 3.67157 12 4.5 12L13.5 12C14.3284 12 15 11.3284 15 10.5L15 4.5C15 3.67157 14.3284 3 13.5 3L4.5 3C3.67157 3 3 3.67157 3 4.5ZM1.5 10.5C1.5 12.1569 2.84315 13.5 4.5 13.5L13.5 13.5C15.1569 13.5 16.5 12.1569 16.5 10.5L16.5 4.5C16.5 2.84315 15.1569 1.5 13.5 1.5L4.5 1.5C2.84315 1.5 1.5 2.84315 1.5 4.5L1.5 10.5Z","fill","white"],[3,"user"]],template:function(t,r){t&1&&(jt(),g(0,cZt,2,6,"ng-container",8)),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[Ur,X,_t,Gi,to,en,Kn,ie,gC,mC,pC,hC,uC,gn,b_,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent);--velt-internal-comment-pin-bg-color: var(--velt-accent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--indicator-bubble{position:absolute;border-radius:100%;text-align:center;top:calc(var(--velt-spacing-sm) * -1);right:calc(var(--velt-spacing-sm) * -1);bottom:unset;left:unset;height:24px;width:24px;display:flex;align-items:center;justify-content:center;box-sizing:border-box}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--indicator-bubble.velt-comment-pin--private-indicator{height:28px;width:28px;top:calc(var(--velt-spacing-md) * -1);right:calc(var(--velt-spacing-md) * -1);left:unset;bottom:unset}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--indicator-bubble.velt-comment-pin--ghost-indicator{height:28px;width:28px;top:calc(var(--velt-spacing-md) * -1);right:calc(var(--velt-spacing-md) * -1);left:unset;bottom:unset}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--indicator-bubble.velt-comment-pin--unread-indicator{background-color:var(--velt-error);color:var(--velt-error-foreground);height:16px;width:16px;top:calc(var(--velt-spacing-xs) * -1);right:calc(var(--velt-spacing-xs) * -1);left:unset;bottom:unset}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--indicator-bubble.velt-comment-pin--index-3-digit{border-radius:100%;height:30px;width:30px;top:calc(var(--velt-spacing-md) * -1);right:calc(var(--velt-spacing-md) * -1);bottom:unset;left:unset}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--index{border:1px solid rgb(210,210,210);color:var(--velt-black);background:var(--velt-white)}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--index .comment-annotation-number{border-radius:100%;width:24px;height:24px;font-size:calc((.55rem + 0px) * var(--velt-base-rem-unit));display:inline-flex;justify-content:center;align-items:center;box-sizing:content-box;position:relative}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--index .comment-annotation-number:after{content:attr(data-comment-annotation-number);position:absolute;font-weight:400;letter-spacing:normal;word-spacing:normal}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--private-indicator{color:var(--velt-white);background:linear-gradient(0deg,#000000bf 0% 100%),var(--velt-accent);border-radius:100%;border:1px solid rgba(255,255,255,.24);padding:var(--velt-spacing-sm)}.velt-comment-pin[_ngcontent-%COMP%] .velt-comment-pin--ghost-indicator{color:var(--velt-error-foreground);background:var(--velt-error);border-radius:100%;border:1px solid rgba(255,255,255,.24);padding:var(--velt-spacing-sm)}.velt-comment-pin--different-device[_ngcontent-%COMP%] .velt-comment-pin--private-indicator[_ngcontent-%COMP%], .velt-comment-pin--different-device[_ngcontent-%COMP%] .velt-comment-pin--ghost-indicator[_ngcontent-%COMP%]{padding:calc(var(--velt-spacing-md) / 2);width:24px;height:24px;top:calc(var(--velt-spacing-sm) * -1);right:calc(var(--velt-spacing-sm) * -1)}.velt-comment-pin--marker[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:relative;width:calc((2.5rem + 0px) * var(--velt-base-rem-unit));height:calc((2.5rem + 0px) * var(--velt-base-rem-unit));border:2px solid var(--velt-border-3);border-radius:100% 100% 100% 2px;box-shadow:0 8px 16px -8px #0f0f0f1a;z-index:1;cursor:pointer;background:var(--velt-internal-comment-pin-bg-color);box-sizing:border-box}.velt-comment-pin--marker.velt-comment-pin--status-default[_ngcontent-%COMP%]{background:var(--velt-accent, var(--velt-internal-comment-pin-bg-color))}.velt-comment-pin--marker.velt-comment-pin--status-ongoing[_ngcontent-%COMP%]{background:var(--velt-warning, var(--velt-internal-comment-pin-bg-color))}.velt-comment-pin--marker.velt-comment-pin--status-terminal[_ngcontent-%COMP%]{background:var(--velt-success, var(--velt-internal-comment-pin-bg-color))}snippyly-user-avatar[_ngcontent-%COMP%]{--legacy-velt-user-avatar-size: 1.5rem;background-color:var(--velt-gray);background-size:cover;border-radius:100%;display:flex;align-items:center;justify-content:center;position:relative}.velt-comment-pin--popover[_ngcontent-%COMP%]{width:0;height:0;border-style:solid;border-width:0 10px 10px 0;border-color:transparent var(--velt-accent) transparent transparent}.velt-comment-pin.velt-comment-pin--different-device[_ngcontent-%COMP%], .velt-comment-pin.velt-comment-pin--different-device[_ngcontent-%COMP%] .velt-comment-pin--marker[_ngcontent-%COMP%]{width:calc((2.125rem + 0px) * var(--velt-base-rem-unit));height:calc((2.125rem + 0px) * var(--velt-base-rem-unit))}.velt-comment-pin.velt-comment-pin--ghost[_ngcontent-%COMP%] .velt-comment-pin--marker-default.velt-comment-pin--marker[_ngcontent-%COMP%]{background:var(--velt-gray)}.velt-comment-pin.velt-comment-pin--ghost[_ngcontent-%COMP%] .velt-comment-pin--popover[_ngcontent-%COMP%]{border-color:transparent var(--velt-gray) transparent transparent}.velt-comment-pin.velt-comment-pin--outside-viewport[_ngcontent-%COMP%]{max-width:var(--velt-internal-comment-pin-max-width);overflow:hidden} .velt-comment-dialog-overlay-panel{z-index:2147483567}.velt-comment-pin--marker-transparent[_ngcontent-%COMP%]{background:transparent;border:unset;border-radius:unset;box-shadow:unset}"],changeDetection:0});let i=o;return i})();function dZt(i,o){if(i&1){let n=Y();f(0),_(1,"velt-multi-thread-comment-dialog-internal",6),G("afterViewInit",function(){N(n);let t=l().last,r=l(2);return F(t?r.calculatePosition():null)})("saveComment",function(t){N(n);let r=l().$implicit,a=l(2);return F(a.saveComment(r==null?null:r.annotation,t))}),b(),v()}if(i&2){let n=l().$implicit,e=l().ngIf,t=l();m(),d("multiThreadAnnotationId",n==null||n.annotation==null?null:n.annotation.annotationId)("annotation",n==null?null:n.annotation)("user",e.user)("commentPinSelected",!!e.selectedAnnotationsMap[n==null||n.annotation==null?null:n.annotation.annotationId]),x("data-testid",t.componentId+"-multi-thread-"+(n==null||n.annotation==null?null:n.annotation.annotationId))}}function mZt(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-dialog",7),G("afterViewInit",function(){N(n);let t=l().last,r=l(2);return F(t?r.calculatePosition():null)})("saveComment",function(t){N(n);let r=l().$implicit,a=l(2);return F(a.saveComment(r==null?null:r.annotation,t))}),b()}if(i&2){let n=l().$implicit,e=l().ngIf,t=l();d("annotation",n==null?null:n.annotation)("user",e.user)("commentPinSelected",!!e.selectedAnnotationsMap[n==null||n.annotation==null?null:n.annotation.annotationId])("inlineCommentMode",e.inlineCommentMode)("isInsidePdfViewer",n==null?null:n.isInsidePdfViewer),x("data-testid",t.componentId+"-single-thread-"+(n==null||n.annotation==null?null:n.annotation.annotationId))}}function pZt(i,o){if(i&1){let n=Y();f(0),_(1,"div",4),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.togglePinSelection(t==null?null:t.annotation))}),g(2,dZt,2,5,"ng-container",5)(3,mZt,1,6,"ng-template",null,0,Te),b(),v()}if(i&2){let n=o.$implicit,e=de(4),t=l().ngIf,r=l();m(),it("top",n==null?null:n.top,"px"),ge("selected",t.selectedAnnotationsMap[n==null||n.annotation==null?null:n.annotation.annotationId]),d("id","snippyly-comments-on-right-block-"+(n==null||n.annotation==null?null:n.annotation.annotationId)),x("data-testid",r.componentId+"-block-"+(n==null||n.annotation==null?null:n.annotation.annotationId))("role","region")("tabindex",0),m(),d("ngIf",(n==null||n.annotation==null?null:n.annotation.type)==="multiThread")("ngIfElse",e)}}function gZt(i,o){if(i&1&&(f(0),_(1,"div",2),P(2,"translate"),g(3,pZt,5,10,"ng-container",3),b(),v()),i&2){let n=o.ngIf,e=l();m(),x("data-testid",e.componentId)("role","complementary")("aria-label",M(2,5,"Comments panel")),m(2),d("ngForOf",n.commentPinAnnotationsArray)("ngForTrackBy",e.trackById)}}var T0e=(()=>{let o=class o{constructor(e,t,r,a,s){this.authService=e,this.commentService=t,this.domService=r,this.elementRef=a,this.loggingService=s,this.commentPinAnnotations=[],this.subscriptions=[],this.positionChangeDetectionSubscriptions=[],this.componentConfigSignal=De({commentPinAnnotationsArray:[],selectedAnnotationsMap:{},user:void 0,inlineCommentMode:!1}),this.veltElement=!0,this.componentId="velt-comments-stream-view",this.subscriptions.push(this.authService.getUser$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{user:c}),p))},c=>{this.loggingService.catch("Error in CommentsStreamViewComponent getUser$ subscription: ",c)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{selectedAnnotationsMap:c}),p)),setTimeout(()=>{this.calculatePosition(),Object.keys(this.componentConfigSignal().selectedAnnotationsMap).length===1&&this.goToAnnotation(this.componentConfigSignal().selectedAnnotationsMap[Object.keys(this.componentConfigSignal().selectedAnnotationsMap)[0]])},100)},c=>{this.loggingService.catch("Error in CommentsStreamViewComponent getSelectedAnnotationsMap$ subscription: ",c)})),this.subscriptions.push(this.commentService.getInlineCommentMode$().subscribe(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{inlineCommentMode:c}),p))}))}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentsStreamViewComponent setupA11yAttributes:",e)}}ngAfterViewInit(){this.streamViewContainerId&&(this.scrollableParentElement=document.getElementById(this.streamViewContainerId)),this.scrollableParentElement||(this.scrollableParentElement=wv(this.elementRef.nativeElement)),this.scrollableParentElement||(this.scrollableParentElement=document.documentElement),this.calculateTargetElementPositions()}ngOnChanges(e){try{e.commentPinAnnotations&&this.calculateTargetElementPositions()}catch(t){this.loggingService.catch("Error in CommentsStreamViewComponent ngOnChanges: ",t)}}goToAnnotation(e){let t=null;e.targetElement||e.areaAnnotationId?t=document.getElementById(`comment-pin-container-${e.annotationId}`):t=document.querySelector(`[data-velt-id='${e.annotationId}']`),t&&t.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})}togglePinSelection(e){try{this.componentConfigSignal().selectedAnnotationsMap[e.annotationId]||(this.goToAnnotation(e),this.domService.toggleAnnotationSelection(e))}catch(t){this.loggingService.catch("Error in CommentsStreamViewComponent togglePinSelection: ",t)}}saveComment(e,t){try{this.commentService.saveComment(e,t)}catch(r){this.loggingService.catch("Error in CommentsStreamViewComponent saveComment: ",r)}}calculateTargetElementPositions(){try{this.positionChangeDetectionSubscriptions.forEach(t=>{t.unsubscribe()});let e=[];if(this.commentPinAnnotations.forEach(t=>{let r={},a=null;t.targetElement||t.areaAnnotationId?a=document.getElementById(`comment-pin-container-${t.annotationId}`):a=document.querySelector(`[data-velt-id='${t.annotationId}']`),a&&(r.annotation=t,r.targetElement=a,r.targetOffsetTop=Oj(a,this.scrollableParentElement)?.top||0,r.isInsidePdfViewer=Mv(a,j.ATTRIBUTES.VELT_PDF_VIEWER),e.push(r))}),e.sort((t,r)=>t.targetElement.getBoundingClientRect().top-r.targetElement.getBoundingClientRect().top),this.componentConfigSignal.update(t=>(t=T(I({},t),{commentPinAnnotationsArray:e}),t)),this.componentConfigSignal().commentPinAnnotationsArray?.length){let t=this.componentConfigSignal().commentPinAnnotationsArray[this.componentConfigSignal().commentPinAnnotationsArray.length-1]?.targetElement;this.detectPositionChange(t)}this.calculatePosition()}catch(e){this.loggingService.catch("Error in CommentsStreamViewComponent calculateTargetElementPositions: ",e)}}trackById(e,t){return t.annotation.annotationId}calculatePosition(){try{if(Object.keys(this.componentConfigSignal().selectedAnnotationsMap).length===1){let e=Object.keys(this.componentConfigSignal().selectedAnnotationsMap)[0],t=this.componentConfigSignal().commentPinAnnotationsArray.findIndex(s=>s.annotation.annotationId===e),r=this.componentConfigSignal().commentPinAnnotationsArray.slice(0,t+1).reverse(),a=this.componentConfigSignal().commentPinAnnotationsArray.slice(t);this.calculateDialogPosition(r,!0),this.calculateDialogPosition(a),r.shift(),this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinAnnotationsArray:[...r.reverse().slice(),...a.slice()]}),s))}else this.calculateDialogPosition(this.componentConfigSignal().commentPinAnnotationsArray)}catch(e){this.loggingService.catch("Error in CommentsStreamViewComponent calculatePosition: ",e)}}calculateDialogPosition(e,t=!1){try{e.forEach((r,a,s)=>{if(!r.dialogElement){let c=this.elementRef?.nativeElement?.querySelector(`[id="snippyly-comments-on-right-block-${r.annotation.annotationId}"]`);c&&(r.dialogElement=c,r.dialogOffsetTop=Oj(c,this.scrollableParentElement)?.top||0)}if(!a)r.top=r.targetOffsetTop;else if(t){let c=s[a-1];if(r.dialogElement){let p=c.top-r.dialogElement?.getBoundingClientRect()?.height-24,u=r.targetOffsetTop;p<r.top?r.top=p:u&&(u<=p?r.top=u:r.top=p)}}else{let c=s[a-1];if(c.dialogElement){let p=c.top+c.dialogElement?.getBoundingClientRect()?.height+24,u=r.targetOffsetTop;p>r.dialogOffsetTop&&p>u?r.top=p:u&&(u>=p?r.top=u:r.top=p)}}})}catch(r){this.loggingService.catch("Error in CommentsStreamViewComponent calculateDialogPosition: ",r)}}detectPositionChange(e){try{let t=Wg(0,dm).pipe(ce(()=>{let r=e.getBoundingClientRect();return{top:r.top,left:r.left}}),wt((r,a)=>r.top===a.top&&r.left===a.left),Li());this.positionChangeDetectionSubscriptions.push(t.subscribe(()=>{this.calculateTargetElementPositions()},r=>{}))}catch(t){this.loggingService.catch("Error in CommentsStreamViewComponent detectPositionChange: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ue),h(we),h(Be),h(R),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comments-stream-view"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{commentPinAnnotations:"commentPinAnnotations",streamViewContainerId:"streamViewContainerId"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentDialogRef",""],[4,"ngIf"],["velt-ignore-change-detection","true",1,"snippyly-comments-on-right-container"],[4,"ngFor","ngForOf","ngForTrackBy"],["velt-ignore-change-detection","true",1,"snippyly-comments-on-right-block",3,"click","id"],[4,"ngIf","ngIfElse"],[3,"afterViewInit","saveComment","multiThreadAnnotationId","annotation","user","commentPinSelected"],[3,"afterViewInit","saveComment","annotation","user","commentPinSelected","inlineCommentMode","isInsidePdfViewer"]],template:function(t,r){t&1&&g(0,gZt,4,7,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,Xo,ms,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.snippyly-comments-on-right-container[_ngcontent-%COMP%]{position:absolute;top:0;right:10vw;width:300px;background:#90ee90}.snippyly-comments-on-right-container[_ngcontent-%COMP%] .snippyly-comments-on-right-block[_ngcontent-%COMP%]{position:absolute;box-shadow:none;transition:top .5s ease,left .5s ease,box-shadow .5s ease;left:0}.snippyly-comments-on-right-container[_ngcontent-%COMP%] .snippyly-comments-on-right-block.selected[_ngcontent-%COMP%]{left:-36px;z-index:1}.snippyly-comments-on-right-container[_ngcontent-%COMP%] .snippyly-comments-on-right-block .comment-dialog-container{transition:box-shadow .5s ease;box-shadow:none!important}.snippyly-comments-on-right-container[_ngcontent-%COMP%] .snippyly-comments-on-right-block.selected .comment-dialog-container{box-shadow:0 calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((3rem + 0px) * var(--velt-base-rem-unit)) #0000002d!important}"],changeDetection:0});let i=o;return i})();var hZt=()=>["snippyly-inbox-panel","velt-overlay-panel"];function fZt(i,o){i&1&&je(0)}function vZt(i,o){if(i&1&&g(0,fZt,1,0,"ng-container",7),i&2){l();let n=de(6);d("ngTemplateOutlet",n)}}function CZt(i,o){if(i&1){let n=Y();_(0,"velt-multi-thread-comment-dialog-internal",11),P(1,"translate"),G("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("multiThreadAnnotationId",n.commentAnnotation==null?null:n.commentAnnotation.annotationId)("annotation",n.commentAnnotation)("user",n.user)("commentPinSelected",!0)("inboxMode",!0),x("data-testid",e.componentId+"-multi-thread-dialog")("role","dialog")("aria-label",M(1,8,"Multi-thread comment dialog"))}}function _Zt(i,o){if(i&1&&(f(0),g(1,CZt,2,10,"velt-multi-thread-comment-dialog-internal",10),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.commentAnnotation&&n.user)}}function yZt(i,o){if(i&1){let n=Y();_(0,"snippyly-comment-dialog",13),P(1,"translate"),G("saveComment",function(t){N(n);let r=l(4);return F(r.saveComment(t))}),b()}if(i&2){let n=l(3).ngIf,e=l();d("annotation",n.commentAnnotation)("user",n.user)("commentPinSelected",!0)("inboxMode",!0),x("data-testid",e.componentId+"-single-dialog")("role","dialog")("aria-label",M(1,7,"Single comment dialog"))}}function SZt(i,o){if(i&1&&g(0,yZt,2,9,"snippyly-comment-dialog",12),i&2){let n=l(2).ngIf;d("ngIf",n.commentAnnotation&&n.user)}}function bZt(i,o){if(i&1&&(_(0,"div",8),P(1,"translate"),g(2,_Zt,2,1,"ng-container",9)(3,SZt,1,1,"ng-template",null,3,Te),b()),i&2){let n=de(4),e=l().ngIf,t=l();ge("mobile",e.isPhone)("visible",!!e.commentAnnotation),x("data-testid",t.componentId)("role","region")("aria-label",M(1,10,"Comment inbox container"))("aria-expanded",!!e.commentAnnotation),m(2),d("ngIf",(e==null||e.commentAnnotation==null?null:e.commentAnnotation.type)==="multiThread")("ngIfElse",n)}}function IZt(i,o){if(i&1&&(f(0),w(1,"div",5,0),g(3,vZt,1,1,"ng-template",6,1,Te)(5,bZt,5,12,"ng-template",null,2,Te),v()),i&2){let n=de(2),e=l();m(),x("data-testid",e.componentId+"-trigger")("aria-hidden",!0),m(2),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",!0)("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",gt(6,hZt))}}var D0e=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c){super(s,c),this.authService=e,this.breakpointObserver=t,this.commentService=r,this.loggingService=a,this.elementRef=s,this.themeService=c,this.componentConfigSignal=De({isPhone:!1,sidebarVisible:!1}),this.subscriptions=[],this.componentId="velt-comment-inbox";try{this.subscriptions.push(this.breakpointObserver.observe(Ni.XSmall).subscribe(p=>{p.matches?this.componentConfigSignal.update(u=>(u=T(I({},u),{isPhone:!0}),u)):this.componentConfigSignal.update(u=>(u=T(I({},u),{isPhone:!1}),u))},p=>{this.catchError("Error in CommentInboxComponent breakpointObserver subscription: ",p)}))}catch{}}ngOnInit(){try{this.setupA11yAttributes(),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t))},e=>{this.catchError("Error in CommentInboxComponent getUser$ subscription: ",e)}))}catch(e){this.catchError("Error in CommentInboxComponent ngOnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentInboxComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e.commentAnnotation&&this.componentConfigSignal.update(t=>(t=T(I({},t),{commentAnnotation:e.commentAnnotation.currentValue}),t))}catch(t){this.catchError("Error in CommentInboxComponent ngOnChanges: ",t)}}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),super.ngOnDestroy()}saveComment(e){try{(this.commentAnnotation||e.annotation)&&this.commentService.saveComment(this.commentAnnotation||e.annotation,e)}catch(t){this.catchError("Error in CommentInboxComponent saveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.commentAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Ue),h(fo),h(we),h(y),h(R),h(qe))},o.\u0275cmp=O({type:o,selectors:[["snippyly-comment-inbox"]],inputs:{commentAnnotation:"commentAnnotation"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[["sidebarTrigger","cdkOverlayOrigin"],["sidebarOverlay","cdkConnectedOverlay"],["sidebarRef",""],["commentDialogRef",""],[4,"ngIf"],["cdkOverlayOrigin",""],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass"],[4,"ngTemplateOutlet"],["id","sCommentInboxContainer","data-velt-comment-disabled","true",1,"velt-comment-inbox--container","s-inbox-container"],[4,"ngIf","ngIfElse"],[3,"multiThreadAnnotationId","annotation","user","commentPinSelected","inboxMode","saveComment",4,"ngIf"],[3,"saveComment","multiThreadAnnotationId","annotation","user","commentPinSelected","inboxMode"],[3,"annotation","user","commentPinSelected","inboxMode","saveComment",4,"ngIf"],[3,"saveComment","annotation","user","commentPinSelected","inboxMode"]],template:function(t,r){t&1&&g(0,IZt,7,7,"ng-container",4),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,_t,on,en,Xo,ms,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}*[_ngcontent-%COMP%]{box-sizing:border-box} .snippyly-inbox-panel{top:0!important;left:0!important}.s-overflow-hidden[_ngcontent-%COMP%]{overflow:hidden!important} .velt-comment-inbox--container{height:100vh;width:calc((26rem + 0px) * var(--velt-base-rem-unit));position:fixed;top:0;right:-100%;padding:var(--velt-spacing-lg);box-sizing:border-box;z-index:999999997;transition:width .5s ease-in-out,right .5s ease-in-out} .velt-comment-inbox--container.mobile{width:100%;height:100%;box-sizing:border-box;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)} .velt-comment-inbox--container.visible{right:0}"],changeDetection:0});let i=o;return i})();function xZt(i,o){if(i&1){let n=Y();f(0),_(1,"div",3),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.scrollToAnnotation(t==null?null:t.key))}),_(2,"div",4),te(3),P(4,"translate"),b()(),v()}if(i&2){let n=o.$implicit,e=l().ngIf,t=l();m(),it("top",n.value.top,"%")("transform","translate(0, -"+n.value.top+"%)"),ge("v-unread-comment",!(e.user!=null&&e.user.isGuest)&&!(e.user!=null&&e.user.isAnonymous)&&(e.unreadCommentsMap==null?null:e.unreadCommentsMap[n==null||n.value==null||n.value.annotation==null?null:n.value.annotation.annotationId])),x("data-testid",t.componentId+"-pin-"+n.key)("role","button")("tabindex",0),m(),x("role","tooltip")("aria-hidden","true"),m(),Ce(" ",M(4,12,"Go to comments here.")," ")}}function TZt(i,o){if(i&1&&(f(0),_(1,"div",1),P(2,"translate"),g(3,xZt,5,14,"ng-container",2),P(4,"keyvalue"),b(),v()),i&2){let n=o.ngIf,e=l();m(),ge("velt-comments-minimap-container--target-scrollable-element",!!n.targetScrollableElementId)("velt-comments-minimap-position--left",n.position==="left"),x("data-testid",e.componentId)("role","navigation")("aria-label",M(2,9,"Comments minimap")),m(2),d("ngForOf",M(4,11,n.commentAnnotationPositionMap))("ngForTrackBy",e.trackByAnnotationId)}}var o7=(()=>{let o=class o{constructor(e,t,r){this.commentService=e,this.loggingService=t,this.elementRef=r,this.commentAnnotations=[],this.targetScrollableElementId=null,this.position="right",this.commentCountsByPosition={},this.minimapHeatmapGradient="",this.componentConfigSignal=De({targetScrollableElementId:null,position:"right",commentAnnotationPositionMap:{},user:null,unreadCommentsMap:null}),this.subscriptions=[],this.componentId="velt-comments-minimap",this.loggingService.log("%c[WB] Creating CLASS: CommentsMinimapComponent","color: blue;")}ngOnInit(){try{this.setupA11yAttributes(),this.subscriptions.push(this.commentService.getUnreadCommentsMap$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{unreadCommentsMap:e}),t))}))}catch(e){this.loggingService.catch("Error in CommentsMinimapComponent ngOnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentsMinimapComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e?.commentAnnotations&&setTimeout(()=>{this.setCommentAnnotationPositionMap()},200)}catch(t){this.loggingService.catch("Error in CommentsMinimapComponent ngOnChanges: ",t)}}trackByAnnotationId(e,t){return t?.annotation?.annotationId||e}setCommentAnnotationPositionMap(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{commentAnnotationPositionMap:{}}),e)),this.commentAnnotations.forEach(e=>{let t=null;if(e.targetElement||e.areaAnnotationId?t=document.getElementById(`comment-pin-container-${e.annotationId}`):t=document.querySelector(`[data-velt-id='${e.annotationId}']`),t){let r=this.getElementPosition(t)?.percentageOfTotalHeight;r!=null&&this.componentConfigSignal.update(a=>(a=T(I({},a),{commentAnnotationPositionMap:T(I({},a.commentAnnotationPositionMap),{[e.annotationId]:{annotation:e,top:r,element:t}})}),a))}})}catch(e){this.loggingService.catch("Error in CommentsMinimapComponent setCommentAnnotationPositionByCommentAnnotationIndex: ",e)}}scrollToAnnotation(e){try{let t=this.componentConfigSignal().commentAnnotationPositionMap[e];t&&t.element&&t.element.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})}catch(t){this.loggingService.catch("Error in CommentsMinimapComponent scrollToAnnotation: ",t)}}getElementPosition(e){try{let t=0,r=e,a=this.componentConfigSignal().targetScrollableElementId&&document.getElementById(this.componentConfigSignal().targetScrollableElementId);for(;r&&(t+=r.offsetTop||0,r=r.offsetParent,!(a&&r===a)););let s=0;if(a)s=a.scrollHeight;else{let p=document.body,u=document.documentElement;s=Math.max(p.scrollHeight,p.offsetHeight,u.clientHeight,u.scrollHeight,u.offsetHeight)}let c=t/s*100;return{pixelsFromTop:t,percentageOfTotalHeight:c}}catch(t){return this.loggingService.catch("Error in CommentsMinimapComponent getElementPosition: ",t),null}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in CommentsMinimapComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(we),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-comments-minimap"]],inputs:{commentAnnotations:"commentAnnotations",user:"user",targetScrollableElementId:"targetScrollableElementId",position:"position"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],[1,"v-comments-minimap-container"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"v-comment-minimap-pin",3,"click"],[1,"v-comment-count"]],template:function(t,r){t&1&&g(0,TZt,5,13,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,pd,pe],styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}.v-comments-minimap-container[_ngcontent-%COMP%]{display:block;position:fixed;height:100vh;top:0;right:0;background:#00000014;z-index:var(--velt-comments-minimap-z-index)}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%]{position:absolute;right:0;width:12px;height:4px;flex-shrink:0;border-radius:var(--velt-border-radius-2xs);border:1px solid rgba(255,255,255,.16);background:color-mix(in srgb,var(--velt-accent) 80%,transparent);cursor:pointer}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]{position:absolute;top:50%;right:20px;z-index:1000;min-width:max-content;background:color-mix(in srgb,var(--velt-accent) 80%,transparent);font-size:var(--velt-font-size-xs);padding:var(--velt-spacing-xs) var(--velt-spacing-sm);border-radius:var(--velt-border-radius-xs);transform:translateY(-50%);color:var(--velt-accent-foreground);display:none}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]:after{content:"";position:absolute;border-style:solid;border-width:4px 0 4px 4px;border-color:transparent color-mix(in srgb,var(--velt-accent) 80%,transparent);display:block;width:0;z-index:1;right:calc(var(--velt-spacing-xs) * -1);top:50%;transform:translateY(-50%)}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%]:hover .v-comment-count[_ngcontent-%COMP%]{display:block}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin.v-unread-comment[_ngcontent-%COMP%]{background-color:color-mix(in srgb,var(--velt-error) 80%,transparent)}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin.v-unread-comment[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--velt-error) 80%,transparent)}.v-comments-minimap-container[_ngcontent-%COMP%] .v-comment-minimap-pin.v-unread-comment[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]:after{border-color:transparent color-mix(in srgb,var(--velt-error) 80%,transparent)}.v-comments-minimap-container.velt-comments-minimap-container--target-scrollable-element[_ngcontent-%COMP%]{position:absolute;height:100%}.v-comments-minimap-container.velt-comments-minimap-position--left[_ngcontent-%COMP%], .v-comments-minimap-container.velt-comments-minimap-position--left[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%]{right:auto;left:0}.v-comments-minimap-container.velt-comments-minimap-position--left[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]{right:auto;left:20px}.v-comments-minimap-container.velt-comments-minimap-position--left[_ngcontent-%COMP%] .v-comment-minimap-pin[_ngcontent-%COMP%] .v-comment-count[_ngcontent-%COMP%]:after{right:auto;left:calc(var(--velt-spacing-xs) * -1);border-width:4px 4px 4px 0}'],changeDetection:0});let i=o;return i})();function DZt(i,o){i&1&&je(0)}function wZt(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),g(1,DZt,1,0,"ng-container",6),b()),i&2){l();let n=de(3);m(),d("ngTemplateOutlet",n)}}function OZt(i,o){if(i&1&&(w(0,"snippyly-comments-stream-view",10),P(1,"translate")),i&2){let n=l(3).ngIf,e=l();d("commentPinAnnotations",n.commentPinAnnotationsForStreamView)("streamViewContainerId",e.streamViewContainerId),x("data-testid",e.componentId+"-stream")("role","complementary")("aria-label",M(1,5,"Comments stream view"))}}function AZt(i,o){if(i&1&&(w(0,"snippyly-comment-inbox",11),P(1,"translate")),i&2){let n=l(3).ngIf,e=l();d("darkMode",n.darkMode)("commentAnnotation",n.selectedCommentAnnotation),x("data-testid",e.componentId+"-inbox")("role","complementary")("aria-label",M(1,5,"Comments inbox"))}}function PZt(i,o){if(i&1&&(w(0,"app-comments-minimap",12),P(1,"translate")),i&2){let n=l(3).ngIf,e=l();d("commentAnnotations",n.commentPinAnnotations)("user",n.user)("position",n.minimapPosition),x("data-testid",e.componentId+"-minimap")("role","complementary")("aria-label",M(1,6,"Comments location overview"))}}function MZt(i,o){if(i&1&&(w(0,"snippyly-comment-adder"),g(1,OZt,2,7,"snippyly-comments-stream-view",7)(2,AZt,2,7,"snippyly-comment-inbox",8)(3,PZt,2,8,"app-comments-minimap",9)),i&2){let n=l(2).ngIf,e=l();x("data-testid",e.componentId+"-adder"),m(),d("ngIf",n.streamMode&&n.commentsOnDom),m(),d("ngIf",n.inboxMode&&n.commentsOnDom),m(),d("ngIf",n.minimapEnabled&&n.commentsOnDom)}}function kZt(i,o){if(i&1&&(f(0),g(1,wZt,2,1,"velt-shadow-dom-internal",5)(2,MZt,4,4,"ng-template",null,0,Te),v()),i&2){let n=de(3),e=l().ngIf;m(),d("ngIf",e.shadowDOM)("ngIfElse",n)}}function RZt(i,o){if(i&1){let n=Y();f(0),g(1,kZt,4,2,"ng-container",1),_(2,"div",2)(3,"slot",3),G("slotchange",function(t){N(n);let r=l();return F(r.handleCommentPinSlotChanged(t))}),b()(),w(4,"app-persistent-comment-mode",4),v()}if(i&2){let n=o.ngIf,e=l();m(),d("ngIf",n.isFirstComponent),m(),x("aria-hidden","true")("data-testid",e.componentId+"-slot-container"),m(2),d("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-persistent-mode")}}var qz=(()=>{let o=class o{set textMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableTextComments():this.commentService.disableTextComments()}set popoverMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePopoverMode():this.commentService.disablePopoverMode()}set popoverTriangleComponent(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePopoverTriangleComponent():this.commentService.disablePopoverTriangleComponent()}set collapsedComments(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableCollapsedComments():this.commentService.disableCollapsedComments()}set shortUserName(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableShortUserName():this.commentService.disableShortUserName()}catch{}}set readOnly(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableReadOnly():this.commentService.disableReadOnly()}catch{}}set deleteThreadWithFirstComment(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDeleteThreadWithFirstComment():this.commentService.disableDeleteThreadWithFirstComment()}catch{}}set resolveStatusAccessAdminOnly(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableResolveStatusAccessAdminOnly():this.commentService.disableResolveStatusAccessAdminOnly()}set svgAsImg(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSvgAsImg():this.commentService.disableSvgAsImg()}catch{}}set commentToNearestAllowedElement(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableCommentToNearestAllowedElement():this.commentService.disableCommentToNearestAllowedElement()}catch{}}set floatingCommentDialog(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.disableFloatingComments(!t)}set moderatorMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setModeratorMode(t)}set _streamMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setStreamMode(t)}set atHereLabel(e){e&&this.contactService.setAtHereLabel(e)}set _atHereEnabled(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.contactService.enableAtHere():this.contactService.disableAtHere()}set _deleteReplyConfirmation(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDeleteReplyConfirmation():this.commentService.disableDeleteReplyConfirmation()}set _expandMentionGroups(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableExpandMentionGroups():this.commentService.disableExpandMentionGroups()}set _showMentionGroupsFirst(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableShowMentionGroupsFirst():this.commentService.disableShowMentionGroupsFirst()}set _linkCallback(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableLinkCallback():this.commentService.disableLinkCallback()}set _showMentionGroupsOnly(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableShowMentionGroupsOnly():this.commentService.disableShowMentionGroupsOnly()}set _fullExpanded(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableFullExpanded():this.commentService.disableFullExpanded()}catch{}}set _draftMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDraftMode():this.commentService.disableDraftMode()}catch{}}set atHereDescription(e){e&&this.contactService.setAtHereDescription(e)}set _persistentCommentMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePersistentCommentMode():this.commentService.disablePersistentCommentMode()}set _seenByUsers(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSeenByUsers():this.commentService.disableSeenByUsers()}set signInButton(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.enableSignInButton(t)}set upgradeButton(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.enableUpgradeButton(t)}set attachments(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.enableAttachment(t)}set recordings(e){let t=e;typeof e=="string"&&(t=e?.split(",")?.map(r=>r.trim()),this.commentService.setAllowedRecordings(t))}set reactions(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableReactions():this.commentService.disableReactions()}set deviceInfo(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.showScreenSizeInfo(t)}set commentIndex(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.showCommentIndex(t)}set dialogOnHover(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnableDialogOnHover(t)}set dialogOnTargetElementClick(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnableDialogOnTargetElementClick(t)}set priority(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnablePriority(t)}set status(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnableStatus(t)}set resolveButton(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnableResolve(t)}set _inboxMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableInboxMode():this.commentService.disableInboxMode()}set _suggestionMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setSuggestionMode(t)}set _mobileMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setMobileMode(t)}set _inlineCommentMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableInlineCommentMode():this.commentService.disableInlineCommentMode()}set _privateCommentMode(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePrivateCommentMode():this.commentService.disablePrivateCommentMode()}set _minimap(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableMinimap():this.commentService.disableMinimap()}set _minimapPosition(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{minimapPosition:e}),t)),this.commentService.setAnalyticsFeatureConfig({config:{minimapPosition:e}})}catch{}}set _ghostComments(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableGhostComments():this.commentService.disableGhostComments()}set _ghostCommentsIndicator(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableGhostCommentsMessage():this.commentService.disableGhostCommentsMessage()}set _commentsOnDom(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.showCommentsOnDom():this.commentService.hideCommentsOnDom()}set _resolvedCommentsOnDom(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.showResolvedCommentsOnDom():this.commentService.hideResolvedCommentsOnDom()}set _filterCommentsOnDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableFilterCommentsOnDom():this.commentService.disableFilterCommentsOnDom()}catch{}}set _bubbleOnPin(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableBubbleOnPin():this.commentService.disableBubbleOnPin()}catch{}}set _bubbleOnPinHover(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableBubbleOnPinHover():this.commentService.disableBubbleOnPinHover()}catch{}}set _multiThreadMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableMultiThread():this.commentService.disableMultiThread()}catch{}}set _multiThread(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableMultiThread():this.commentService.disableMultiThread()}catch{}}set _maxReplyAvatars(e){try{let t=e;typeof e=="string"&&(t=parseInt(e)),this.commentService.setMaxReplyAvatars(t)}catch{}}set _replyAvatars(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableReplyAvatars():this.commentService.disableReplyAvatars()}catch{}}set _groupMultipleMatch(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableGroupMatchedComments():this.commentService.disableGroupMatchedComments()}catch{}}set _groupMatchedComments(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableGroupMatchedComments():this.commentService.disableGroupMatchedComments()}catch{}}set _commentTool(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableCommentTool():this.commentService.disableCommentTool()}set _sidebarButtonOnCommentDialog(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSidebarButtonOnCommentDialog():this.commentService.disableSidebarButtonOnCommentDialog()}set _deviceIndicatorOnCommentPins(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDeviceIndicatorOnCommentPins():this.commentService.disableDeviceIndicatorOnCommentPins()}catch{}}set _scrollToComment(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableScrollToComment():this.commentService.disableScrollToComment()}set _userMentions(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableUserMentions():this.commentService.disableUserMentions()}set _deleteOnBackspace(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDeleteOnBackspace():this.commentService.disableDeleteOnBackspace()}catch{}}set _hotkey(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableHotkey():this.commentService.disableHotkey()}catch{}}set _recordingSummary(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableRecordingSummary():this.commentService.disableRecordingSummary()}catch{}}set _recordingTranscription(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderAnnotationService.enableRecordingTranscription():this.recorderAnnotationService.disableRecordingTranscription()}catch{}}set _recordingCountdown(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableRecordingCountdown():this.commentService.disableRecordingCountdown()}catch{}}set _unreadIndicatorMode(e){try{this.commentService.setUnreadIndicatorMode(e)}catch{}}set _enterKeyToSubmit(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableEnterKeyToSubmit():this.commentService.disableEnterKeyToSubmit()}catch{}}set _pinShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePinShadowDOM():this.commentService.disablePinShadowDOM()}catch{}}set _dialogShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableDialogShadowDOM():this.commentService.disableDialogShadowDOM()}catch{}}set _persistentCommentShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{persistentCommentShadowDOM:!!t}),r)),this.commentService.setAnalyticsFeatureConfig({config:{persistentCommentShadowDOM:!!t}})}catch{}}set _shadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{shadowDOM:!!t,persistentCommentShadowDOM:!!t}),r)),this.componentConfigSignal().shadowDOM?(this.commentService.enableDialogShadowDOM(),this.commentService.enablePinShadowDOM(),this.commentService.enableTextCommentToolShadowDOM(),this.commentService.enableTextCommentToolbarShadowDOM()):(this.commentService.disableDialogShadowDOM(),this.commentService.disablePinShadowDOM(),this.commentService.disableTextCommentToolShadowDOM(),this.commentService.disableTextCommentToolbarShadowDOM()),this.commentService.setAnalyticsFeatureConfig({config:{shadowDom:!!t}})}catch{}}set _textCommentToolShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableTextCommentToolShadowDOM():this.commentService.disableTextCommentToolShadowDOM()}catch{}}set _pinDarkMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enablePinDarkMode():this.commentService.disablePinDarkMode()}catch{}}set _textCommentToolDarkMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableTextCommentToolDarkMode():this.commentService.disableTextCommentToolDarkMode()}catch{}}set _textCommentToolbarDarkMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableTextCommentToolbarDarkMode():this.commentService.disableTextCommentToolbarDarkMode()}catch{}}set _textCommentToolbarShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableTextCommentToolbarShadowDOM():this.commentService.disableTextCommentToolbarShadowDOM()}catch{}}set _changeDetectionInCommentMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableChangeDetectionInCommentMode():this.commentService.disableChangeDetectionInCommentMode()}catch{}}set _areaComment(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableAreaComment():this.commentService.disableAreaComment()}catch{}}set _pinCursorImage(e){try{this.commentService.setPinCursorImage(e||"")}catch{}}set allowedElementIds(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setAllowedElementIds(t)}catch{}}set allowedElementClassNames(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setAllowedElementClassNames(t)}catch{}}set allowedElementQuerySelectors(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setAllowedElementQuerySelectors(t)}catch{}}set _commentPinHighlighter(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableCommentPinHighlighter():this.commentService.disableCommentPinHighlighter()}catch{}}set _customReactions(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setCustomReactions(t)}catch{}}set customStatus(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setCustomStatuses(t)}set customListDataOnAnnotation(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.createCustomListDataOnAnnotation(t)}set customListDataOnComment(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.autocompleteService.create(t)}set customPriority(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.customFilterService.setCustomPriorityFilters(t)}set _customAutocompleteSearch(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableCustomAutocompleteSearch():this.commentService.disableCustomAutocompleteSearch()}catch{}}set customCategory(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.customFilterService.setCustomCategories(t)}set composerMode(e){this.commentService.setComposerMode(e)}set autoCategorize(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.commentService.setEnableAutoCategorize(!!t)}catch(t){this.loggingService.catch("Error in CommentsContainerComponent set autoCategorize: ",t)}}set commentplaceholder(e){try{let t=e;this.commentService.setCommentplaceholder(t)}catch(t){this.loggingService.catch("Error in CommentsContainerComponent set autoCategorize: ",t)}}set replyplaceholder(e){try{let t=e;this.commentService.setReplyplaceholder(t)}catch(t){this.loggingService.catch("Error in CommentsContainerComponent set autoCategorize: ",t)}}set isDarkMode(e){this._darkAttribute=e,this.checkDarkMode(),this.commentService.setCommentContainerDarkMode(e===""||e==="true")}constructor(e,t,r,a,s,c,p,u,C,E,D,L){this.analyticsService=e,this.authService=t,this.domService=r,this.commentService=a,this.commentPinPortalService=s,this.commentTextPortalService=c,this.customFilterService=p,this.loggingService=u,this.elementRef=C,this.autocompleteService=E,this.contactService=D,this.recorderAnnotationService=L,this.onCommentAdd=new Pe,this.onSignIn=new Pe,this.onUpgrade=new Pe,this.onCustomPinInject=new Pe,this.onCommentUpdate=new Pe,this.onCommentAccept=new Pe,this.onCommentReject=new Pe,this.onSidebarButtonOnCommentDialogClick=new Pe,this.onCommentSelectionChange=new Pe,this.onCopyLink=new Pe,this.subscriptions=[],this.selectedAnnotationsMap={},this.commentAnnotationFocused=!1,this.enableGhostComments=!1,this.resolvedCommentsOnDom=!1,this.scrollToComment=!1,this.componentConfigSignal=De({addCommentMode:!1,commentPinAnnotations:[],multiThreadCommentPinAnnotations:[],commentPinAnnotationsForStreamView:[],commentsOnDom:!1,inboxMode:!1,isFirstComponent:!0,minimapEnabled:!1,minimapPosition:"right",persistentCommentMode:!1,persistentModeBanner:!1,privateCommentModeEnabled:!1,selectedCommentAnnotation:void 0,shadowDOM:!0,streamMode:!1,user:null,darkMode:!1,disableCommentMode:this.disableCommentMode.bind(this),persistentCommentShadowDOM:!0}),this.veltId=En(),this.veltElement=!0,this.componentId="velt-comments-container";try{this.loggingService.log("%c[WB] Creating CLASS: CommentsContainerComponent","color: blue;"),this._darkAttribute=this.elementRef.nativeElement.getAttribute("dark");let z=new URL(window.location.href);this.focusCommentAnnotationId=z.searchParams.get(j.URL_PARAMS.COMMENT_ID),this.commentService.setCommentAddedEmitter(this.onCommentAdd)}catch(z){this.loggingService.catch("Error in CommentsContainerComponent constructor: ",z)}}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentsContainerComponent ngOnInit:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentsContainerComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in SubtitlesComponent ngOnChanges: ",t)}}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_COMMENTS),t=document.querySelector(j.TAGS.VELT_COMMENTS);document.querySelector(`${j.TAGS.VELT_COMMENTS}[${j.ATTRIBUTES.VELT_IS_FIRST_COMPONENT}]`)||(t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(a=>(a=T(I({},a),{isFirstComponent:!0}),a)),t?.setAttribute(j.ATTRIBUTES.VELT_IS_FIRST_COMPONENT,"true"),this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(a=>(a=T(I({},a),{isFirstComponent:!0}),a)),e?.setAttribute(j.ATTRIBUTES.VELT_IS_FIRST_COMPONENT,"true"),this.initComponent()))}catch(e){this.loggingService.catch("Error in CommentsContainerComponent AfterViewInit: ",e)}}initComponent(){try{this.commentService.addAreaContainerTag(),this.subscriptions.push(this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t)),e&&this.setCommentInstalledInAnalytics()},e=>{this.loggingService.catch("Error in getUser: ",e)})),this.subscriptions.push(this.commentService.getStreamMode$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{streamMode:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent getStreamMode$ subscription: ",e)})),this.subscriptions.push(this.commentService.getInboxMode$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{inboxMode:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent getInboxMode$ subscription: ",e)})),this.subscriptions.push(this.commentService.getMinimap$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{minimapEnabled:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent getMinimap$ subscription: ",e)})),this.subscriptions.push(this.commentService.addCommentModeChange().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{addCommentMode:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent addCommentModeChange subscription: ",e)})),this.subscriptions.push(this.commentService.persistentCommentModeChange().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{persistentCommentMode:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent persistentCommentModeChange subscription: ",e)})),this.subscriptions.push(this.commentService.persistentModeBannerChange().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{persistentModeBanner:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent persistentModeBannerChange subscription: ",e)})),this.subscriptions.push(this.commentService.getPrivateCommentMode$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{privateCommentModeEnabled:e}),t))},e=>{this.loggingService.catch("Error in CommentsContainerComponent getPrivateCommentMode$ subscription: ",e)})),this.subscriptions.push(this.commentService.getScrollToComment$().subscribe(e=>{this.scrollToComment=e},e=>{this.loggingService.catch("Error in CommentsContainerComponent getScrollToComment$ subscription: ",e)})),this.subscriptions.push(this.commentService.getSignInButtonClick$().subscribe(()=>{this.onSignIn.emit()},e=>{this.loggingService.catch("Error in CommentsContainerComponent getSignInButtonClick$ subscription: ",e)})),this.subscriptions.push(this.commentService.getUpgradeButtonClick$().subscribe(()=>{this.onUpgrade.emit()},e=>{this.loggingService.catch("Error in CommentsContainerComponent getUpgradeButtonClick$ subscription: ",e)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(e=>{this.selectedAnnotationsMap=e},e=>{this.loggingService.catch("Error in CommentsContainerComponent getSidebarVisibility$ subscription: ",e)})),this.subscriptions.push(this.commentPinPortalService.getCustomPinEvents$().subscribe(e=>{this.onCustomPinInject.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent getCustomPinEvents$ subscription: ",e)})),this.subscriptions.push(this.commentService.commentUpdated$.subscribe(e=>{this.onCommentUpdate.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent commentUpdated$ subscription: ",e)})),this.subscriptions.push(this.commentService.commentAccepted$.subscribe(e=>{this.onCommentAccept.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent commentAccepted$ subscription: ",e)})),this.subscriptions.push(this.commentService.commentRejected$.subscribe(e=>{this.onCommentReject.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent commentRejected$ subscription: ",e)})),this.subscriptions.push(this.commentService.getSidebarButtonOnCommentDialogClick$().subscribe(e=>{this.onSidebarButtonOnCommentDialogClick.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent getSidebarButtonOnCommentDialogClick$ subscription: ",e)})),this.subscriptions.push(this.commentService.onCommentSelectionChange$().subscribe(e=>{this.onCommentSelectionChange.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent onCommentSelectionChange$ subscription: ",e)})),this.subscriptions.push(this.commentService.getCopyLink$().subscribe(e=>{this.onCopyLink.emit(e)},e=>{this.loggingService.catch("Error in CommentsContainerComponent getCopyLink$ subscription: ",e)})),this.getAllCommentsOnCurrentDocument()}catch(e){this.loggingService.catch("Error in CommentsContainerComponent initComponent: ",e)}}getAllCommentsOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getAllCommentsOnCurrentDocument","color: green;");try{this.subscriptions.push(this.commentService.getCommentsOnDom$().pipe(he(e=>(this.componentConfigSignal.update(t=>(t=T(I({},t),{commentsOnDom:e}),t)),this.componentConfigSignal().commentsOnDom?yn([this.commentService.getAllCommentAnnotations({detectGhostComments:!0,addFilterCommentsOnDomCheck:!0,analytics:{enabled:!0,properties:{source:"internal",sourceId:"commentsContainer"}}}),this.commentService.getAllMultiThreadCommentAnnotations(void 0,void 0,void 0,!0)]).pipe(ce(([t,r])=>[...t||[],...r||[]]),he(t=>this.commentService.getEnableGhostComments$().pipe(ce(r=>(this.enableGhostComments=r,t)))),he(t=>this.commentService.getCommentsOnDom$().pipe(ce(r=>(this.componentConfigSignal.update(a=>(a=T(I({},a),{commentsOnDom:r}),a)),t)))),he(t=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(r=>(this.resolvedCommentsOnDom=r,t)))),he(t=>this.domService.getSelectedAnnotationsMap$().pipe(ce(r=>({filteredAnnotations:t||[],selectedAnnotationsMap:r||{}}))))):se({filteredAnnotations:[],selectedAnnotationsMap:{}})))).subscribe(e=>{try{this.loggingService.log(e),this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinAnnotations:e?.filteredAnnotations}),s)),this.commentService.setCommentAnnotationsFromCommentsContainer(this.componentConfigSignal().commentPinAnnotations);let t;this.componentConfigSignal().commentPinAnnotations.forEach(s=>{this.selectedAnnotationsMap[s?.annotationId]&&(s?.multiThreadAnnotationId||(t=s))}),this.componentConfigSignal.update(s=>(s=T(I({},s),{selectedCommentAnnotation:t}),s));let r=this.componentConfigSignal().commentPinAnnotations.filter(s=>s.targetElement&&s?.position);r=r.filter(s=>{let c=!0;return s?.ghostComment?.type===tl.DIFFERENT_DEVICE&&!s?.ghostComment?.isSameGroup&&(e.selectedAnnotationsMap[s.annotationId]||(c=!1)),s?.ghostComment&&!this.enableGhostComments&&(c=!1),!this.resolvedCommentsOnDom&&!(this.commentService.getFilterCommentsOnDom()&&this.commentService.getCommentsFromSidebarMap())&&s.status!==void 0&&s.status.type==="terminal"&&(e.selectedAnnotationsMap[s.annotationId]||(c=!1)),c}),this.commentPinPortalService.checkPinsToRemove(r),r.forEach(s=>{this.commentPinPortalService.setCommentPin(s)});let a=this.componentConfigSignal().commentPinAnnotations.filter(s=>s.targetTextRange);a=a.filter(s=>!(!this.resolvedCommentsOnDom&&!(this.commentService.getFilterCommentsOnDom()&&this.commentService.getCommentsFromSidebarMap())&&s.status!==void 0&&s.status.type==="terminal"&&!e.selectedAnnotationsMap[s.annotationId])),this.commentTextPortalService.updateTextCommentAnnotations(a),this.componentConfigSignal.update(s=>(s=T(I({},s),{commentPinAnnotationsForStreamView:this.componentConfigSignal().commentPinAnnotations.slice()}),s)),this.focusCommentAnnotation()}catch(t){this.loggingService.catch("Error in CommentsContainerComponent getAllCommentsOnCurrentDocument inside subscription: ",t)}},e=>{this.loggingService.catch("Error in CommentsContainerComponent getAllCommentsOnCurrentDocument subscription: ",e)}))}catch(e){this.loggingService.catch("Error in CommentsContainerComponent getAllCommentsOnCurrentDocument: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe(),this.commentService.setContextProvider(null),this.commentService.setCommentAddedEmitter(null),this.componentConfigSignal().isFirstComponent&&this.commentService.setCommentAnnotationsFromCommentsContainer([])}catch(e){this.loggingService.catch("Error in CommentsContainerComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in CommentsContainerComponent unsubscribe: ",e)}}handleCommentPinSlotChanged(e){try{let t=e.target;if(t.assignedElements().length>0){let r=t.assignedElements()[0];this.commentPinPortalService.setCommentPinOverrideTemplate(r)}}catch(t){this.loggingService.catch("Error in CommentsContainerComponent handleCommentPinSlotChanged: ")}}focusCommentAnnotation(){if(this.focusCommentAnnotationId&&!this.commentAnnotationFocused){let e=this.componentConfigSignal().commentPinAnnotations.find(t=>t.annotationId===this.focusCommentAnnotationId);e&&(this.commentAnnotationFocused=!0,sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId),this.selectedAnnotationsMap[e.annotationId]||this.domService.toggleAnnotationSelection(e),setTimeout(()=>{let t=null;e.targetElement||e.areaAnnotationId?t=document.getElementById(`comment-pin-container-${e.annotationId}`):(t=document.querySelector(`[data-velt-id='${e.annotationId}']`),sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId)),t||(t=document.querySelector(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.ANNOTATION_ID}="${e.annotationId}"]`)),t&&this.scrollToComment&&t.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})},100))}}setCommentInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Re.COMMENT)}catch(e){this.loggingService.catch("Error in CommentsContainerComponent setCommentInstalledInAnalytics: ",e)}}disableCommentMode(){try{this.commentService.disableAddCommentMode()}catch(e){this.loggingService.catch("Error in CommentsContainerComponent disableCommentMode: ",e)}}checkDarkMode(){try{this._darkAttribute===""?this.componentConfigSignal.update(e=>(e=T(I({},e),{darkMode:!0}),e)):this.componentConfigSignal.update(e=>(e=T(I({},e),{darkMode:!1}),e))}catch(e){this.loggingService.catch("Error in CommentsContainerComponent checkDarkMode: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Be),h(we),h(i7),h(h9),h(Zo),h(y),h(R),h(ll),h(xi),h(Yi))},o.\u0275cmp=O({type:o,selectors:[["app-comments-container"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{textMode:"textMode",popoverMode:"popoverMode",popoverTriangleComponent:"popoverTriangleComponent",collapsedComments:"collapsedComments",shortUserName:"shortUserName",readOnly:"readOnly",deleteThreadWithFirstComment:"deleteThreadWithFirstComment",resolveStatusAccessAdminOnly:"resolveStatusAccessAdminOnly",svgAsImg:"svgAsImg",commentToNearestAllowedElement:"commentToNearestAllowedElement",floatingCommentDialog:"floatingCommentDialog",moderatorMode:"moderatorMode",_streamMode:[0,"streamMode","_streamMode"],atHereLabel:"atHereLabel",_atHereEnabled:[0,"atHereEnabled","_atHereEnabled"],_deleteReplyConfirmation:[0,"deleteReplyConfirmation","_deleteReplyConfirmation"],_expandMentionGroups:[0,"expandMentionGroups","_expandMentionGroups"],_showMentionGroupsFirst:[0,"showMentionGroupsFirst","_showMentionGroupsFirst"],_linkCallback:[0,"linkCallback","_linkCallback"],_showMentionGroupsOnly:[0,"showMentionGroupsOnly","_showMentionGroupsOnly"],_fullExpanded:[0,"fullExpanded","_fullExpanded"],_draftMode:[0,"draftMode","_draftMode"],atHereDescription:"atHereDescription",_persistentCommentMode:[0,"persistentCommentMode","_persistentCommentMode"],_seenByUsers:[0,"seenByUsers","_seenByUsers"],signInButton:"signInButton",upgradeButton:"upgradeButton",attachments:"attachments",recordings:"recordings",reactions:"reactions",deviceInfo:"deviceInfo",commentIndex:"commentIndex",dialogOnHover:"dialogOnHover",dialogOnTargetElementClick:"dialogOnTargetElementClick",priority:"priority",status:"status",resolveButton:"resolveButton",_inboxMode:[0,"inboxMode","_inboxMode"],_suggestionMode:[0,"suggestionMode","_suggestionMode"],_mobileMode:[0,"mobileMode","_mobileMode"],_inlineCommentMode:[0,"inlineCommentMode","_inlineCommentMode"],_privateCommentMode:[0,"privateCommentMode","_privateCommentMode"],_minimap:[0,"minimap","_minimap"],_minimapPosition:[0,"minimapPosition","_minimapPosition"],_ghostComments:[0,"ghostComments","_ghostComments"],_ghostCommentsIndicator:[0,"ghostCommentsIndicator","_ghostCommentsIndicator"],_commentsOnDom:[0,"commentsOnDom","_commentsOnDom"],_resolvedCommentsOnDom:[0,"resolvedCommentsOnDom","_resolvedCommentsOnDom"],_filterCommentsOnDom:[0,"filterCommentsOnDom","_filterCommentsOnDom"],_bubbleOnPin:[0,"bubbleOnPin","_bubbleOnPin"],_bubbleOnPinHover:[0,"bubbleOnPinHover","_bubbleOnPinHover"],_multiThreadMode:[0,"multiThreadMode","_multiThreadMode"],_multiThread:[0,"multiThread","_multiThread"],_maxReplyAvatars:[0,"maxReplyAvatars","_maxReplyAvatars"],_replyAvatars:[0,"replyAvatars","_replyAvatars"],_groupMultipleMatch:[0,"groupMultipleMatch","_groupMultipleMatch"],_groupMatchedComments:[0,"groupMatchedComments","_groupMatchedComments"],_commentTool:[0,"commentTool","_commentTool"],_sidebarButtonOnCommentDialog:[0,"sidebarButtonOnCommentDialog","_sidebarButtonOnCommentDialog"],_deviceIndicatorOnCommentPins:[0,"deviceIndicatorOnCommentPins","_deviceIndicatorOnCommentPins"],_scrollToComment:[0,"scrollToComment","_scrollToComment"],_userMentions:[0,"userMentions","_userMentions"],_deleteOnBackspace:[0,"deleteOnBackspace","_deleteOnBackspace"],_hotkey:[0,"hotkey","_hotkey"],_recordingSummary:[0,"recordingSummary","_recordingSummary"],_recordingTranscription:[0,"recordingTranscription","_recordingTranscription"],_recordingCountdown:[0,"recordingCountdown","_recordingCountdown"],_unreadIndicatorMode:[0,"unreadIndicatorMode","_unreadIndicatorMode"],_enterKeyToSubmit:[0,"enterKeyToSubmit","_enterKeyToSubmit"],_pinShadowDOM:[0,"pinShadowDom","_pinShadowDOM"],_dialogShadowDOM:[0,"dialogShadowDom","_dialogShadowDOM"],_persistentCommentShadowDOM:[0,"persistentCommentShadowDom","_persistentCommentShadowDOM"],_shadowDOM:[0,"shadowDom","_shadowDOM"],_textCommentToolShadowDOM:[0,"textCommentToolShadowDom","_textCommentToolShadowDOM"],_pinDarkMode:[0,"pinDarkMode","_pinDarkMode"],_textCommentToolDarkMode:[0,"textCommentToolDarkMode","_textCommentToolDarkMode"],_textCommentToolbarDarkMode:[0,"textCommentToolbarDarkMode","_textCommentToolbarDarkMode"],_textCommentToolbarShadowDOM:[0,"textCommentToolbarShadowDom","_textCommentToolbarShadowDOM"],_changeDetectionInCommentMode:[0,"changeDetectionInCommentMode","_changeDetectionInCommentMode"],_areaComment:[0,"areaComment","_areaComment"],_pinCursorImage:[0,"pinCursorImage","_pinCursorImage"],allowedElementIds:"allowedElementIds",allowedElementClassNames:"allowedElementClassNames",allowedElementQuerySelectors:"allowedElementQuerySelectors",_commentPinHighlighter:[0,"commentPinHighlighter","_commentPinHighlighter"],_customReactions:[0,"customReactions","_customReactions"],customStatus:"customStatus",customListDataOnAnnotation:"customListDataOnAnnotation",customListDataOnComment:"customListDataOnComment",customPriority:"customPriority",_customAutocompleteSearch:[0,"customAutocompleteSearch","_customAutocompleteSearch"],customCategory:"customCategory",streamViewContainerId:"streamViewContainerId",composerMode:"composerMode",autoCategorize:"autoCategorize",commentplaceholder:[0,"commentPlaceholder","commentplaceholder"],replyplaceholder:[0,"replyPlaceholder","replyplaceholder"],isDarkMode:[0,"darkMode","isDarkMode"]},outputs:{onCommentAdd:"onCommentAdd",onSignIn:"onSignIn",onUpgrade:"onUpgrade",onCustomPinInject:"onCustomPinInject",onCommentUpdate:"onCommentUpdate",onCommentAccept:"onCommentAccept",onCommentReject:"onCommentReject",onSidebarButtonOnCommentDialogClick:"onSidebarButtonOnCommentDialogClick",onCommentSelectionChange:"onCommentSelectionChange",onCopyLink:"onCopyLink"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["commentsDataRef",""],[4,"ngIf"],[2,"display","none"],["id","comment-pin-slot","name","comment-pin",3,"slotchange"],[3,"componentConfigSignal"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],[3,"commentPinAnnotations","streamViewContainerId",4,"ngIf"],[3,"darkMode","commentAnnotation",4,"ngIf"],[3,"commentAnnotations","user","position",4,"ngIf"],[3,"commentPinAnnotations","streamViewContainerId"],[3,"darkMode","commentAnnotation"],[3,"commentAnnotations","user","position"]],template:function(t,r){t&1&&g(0,RZt,5,5,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,_t,dde,T0e,D0e,o7,gn,e_,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var NZt=["sidebarRef"],FZt=i=>({componentConfigSignal:i}),LZt=(i,o)=>({condition:i,data:o}),BZt=(i,o)=>({componentConfigSignal:i,sidebarRef:o}),VZt=(i,o)=>({template:i,context:o});function UZt(i,o){if(i&1&&(_(0,"div",5,0),w(2,"app-comment-sidebar-skeleton",6)(3,"app-comment-sidebar-panel",7)(4,"app-comment-sidebar-focused-thread",8),b()),i&2){let n=de(1),e=l(3).ngIf,t=l();ge("s-overflow-hidden",e.moreFiltersVisible)("velt-sidebar--more-filters-visible",e.moreFiltersVisible),x("aria-expanded",e.sidebarVisible),m(2),d("componentConfigSignal",t.componentConfigSignal),m(),d("sidebarRef",n)("componentConfigSignal",t.componentConfigSignal),m(),d("componentConfigSignal",t.componentConfigSignal)("sidebarRef",n)}}function jZt(i,o){if(i&1){let n=Y();f(0),_(1,"div",3),P(2,"translate"),G("click",function(t){N(n);let r=l(3);return F(r.onClick(t))}),g(3,UZt,5,10,"div",4),b(),v()}if(i&2){let n=l(2).ngIf,e=l();m(),ge("mobile",n.isPhone)("visible",n.sidebarVisible||n.embedMode||n.floatingMode)("floating",n.floatingMode)("embed",n.embedMode)("page",n.pageMode),d("ngClass",n.position),x("data-testid",e.componentId)("aria-label",M(2,14,"Comments sidebar")),m(2),d("veltDynamicTemplate",k(19,VZt,e.template,k(16,BZt,e.componentConfigSignal,e.sidebarRef)))}}function $Zt(i,o){if(i&1&&(f(0),g(1,jZt,4,22,"ng-container",1),v()),i&2){let n=l().ngIf;m(),d("ngIf",n)}}function HZt(i,o){if(i&1&&(f(0),g(1,$Zt,2,1,"ng-container",2),v()),i&2){let n=l();m(),d("veltIf",k(3,LZt,n.conditionSignal(),A(1,FZt,n.componentConfigSignal)))}}var O0e=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(e,t,void 0,void 0,void 0,a,r),this.elementRef=e,this.themeService=t,this.loggingService=r,this.dynamicDataService=a,this.onWrapperClick=new Pe,this.componentId="velt-comments-sidebar-wrapper",super.initializeComponentConfigSignal(new Ye)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentsSidebarWrapperComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CommentsSidebarWrapperComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in setupA11yAttributes:",e)}}onClick(e){try{this.onWrapperClick.emit(e)}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(qe),h(y),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-comments-sidebar-wrapper-internal"]],viewQuery:function(t,r){if(t&1&&nt(NZt,7),t&2){let a;Xe(a=Qe())&&(r.sidebarRef=a.first)}},outputs:{onWrapperClick:"onWrapperClick"},standalone:!1,features:[V([S]),B],decls:1,vars:1,consts:[["sidebarRef",""],[4,"ngIf"],[4,"veltIf"],["data-velt-element","true","data-velt-comment-disabled","true","role","complementary",1,"velt-sidebar-container",3,"click","ngClass"],["class","velt-sidebar","role","region",3,"s-overflow-hidden","velt-sidebar--more-filters-visible",4,"veltDynamicTemplate"],["role","region",1,"velt-sidebar"],[3,"componentConfigSignal"],[3,"sidebarRef","componentConfigSignal"],[3,"componentConfigSignal","sidebarRef"]],template:function(t,r){t&1&&g(0,HZt,2,6,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[Ur,X,ie,Ih,bh,r_,ae,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-sidebar-container[_ngcontent-%COMP%]{height:100vh;width:calc((26rem + 0px) * var(--velt-base-rem-unit));position:fixed;top:0;padding:var(--velt-spacing-lg);box-sizing:border-box;z-index:999999997}.velt-sidebar-container.left[_ngcontent-%COMP%]{left:-100%;transition:width .5s ease-in-out,left .5s ease-in-out}.velt-sidebar-container.left.visible[_ngcontent-%COMP%]{left:0}.velt-sidebar-container.right[_ngcontent-%COMP%]{right:-100%;transition:width .5s ease-in-out,right .5s ease-in-out}.velt-sidebar-container.right.visible[_ngcontent-%COMP%]{right:0}.velt-sidebar-container.mobile[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.velt-sidebar-container.embed[_ngcontent-%COMP%]{width:100%;height:100%;position:unset;border:0}.velt-sidebar-container.floating[_ngcontent-%COMP%]{height:90vh;position:unset;border:0;padding:0;width:calc((22.5rem + 0px) * var(--velt-base-rem-unit))}.velt-sidebar-container.floating.embed[_ngcontent-%COMP%]{width:100%;height:100%}.velt-sidebar-container.page[_ngcontent-%COMP%] .velt-sidebar[_ngcontent-%COMP%]{padding-bottom:0}.velt-sidebar-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box}.velt-sidebar-container[_ngcontent-%COMP%] .velt-sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--velt-spacing-lg);font-weight:400;font-size:var(--velt-font-size-sm);line-height:21px;align-items:center;background:var(--velt-background-0);border-radius:var(--velt-border-radius-lg);width:100%;overflow-x:hidden;position:relative;height:100%;border:1px solid var(--velt-border-5)}.velt-sidebar-container[_ngcontent-%COMP%] .velt-sidebar[_ngcontent-%COMP%] app-comment-sidebar-filter[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-user-select:none;user-select:none;pointer-events:none}.velt-sidebar-container[_ngcontent-%COMP%] .velt-sidebar.velt-sidebar--more-filters-visible[_ngcontent-%COMP%] app-comment-sidebar-filter[_ngcontent-%COMP%]{pointer-events:initial;-webkit-user-select:initial;user-select:initial}.velt-sidebar-container[_ngcontent-%COMP%] .velt-sidebar[_ngcontent-%COMP%]::-webkit-scrollbar{display:none;width:0;height:0}.velt-sidebar-container[_ngcontent-%COMP%] .velt-sidebar[_ngcontent-%COMP%]:not(.s-overflow-hidden){overflow-y:auto}[_nghost-%COMP%] velt-comments-sidebar-wireframe{width:100%;height:100%;display:flex;flex-direction:column;gap:var(--velt-spacing-lg)}"],changeDetection:0});let i=o;return i})();var GZt=["sidebarOverlay"],WZt=["host"],qZt=i=>["snippyly-sidebar-panel","velt-overlay-panel",i];function YZt(i,o){i&1&&je(0)}function KZt(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),g(1,YZt,1,0,"ng-container",7),b()),i&2){l(3);let n=de(3);m(),d("ngTemplateOutlet",n)}}function ZZt(i,o){if(i&1&&(f(0),g(1,KZt,2,1,"velt-shadow-dom-internal",6),v()),i&2){l(2);let n=de(3),e=l();m(),d("ngIf",!e.template&&e.sidebarShadowDOM)("ngIfElse",n)}}function XZt(i,o){i&1&&je(0)}function QZt(i,o){if(i&1&&(_(0,"velt-shadow-dom-internal"),g(1,XZt,1,0,"ng-container",7),b()),i&2){l(5);let n=de(3);m(),d("ngTemplateOutlet",n)}}function JZt(i,o){if(i&1&&(_(0,"div",11),g(1,QZt,2,1,"velt-shadow-dom-internal",6),b()),i&2){let n=l(4).ngIf,e=de(3),t=l();ge("dark",n.darkMode),m(),d("ngIf",!t.template&&t.sidebarShadowDOM)("ngIfElse",e)}}function eXt(i,o){if(i&1&&g(0,JZt,2,4,"div",10),i&2){let n=l(3).ngIf;d("ngIf",n==null?null:n.sidebarVisible)}}function tXt(i,o){if(i&1&&(w(0,"div",8,2),g(2,eXt,1,1,"ng-template",9,3,Te)),i&2){let n=de(1),e=l(2).ngIf;m(2),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",!0)("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",A(4,qZt,e.darkMode?"dark":""))}}function nXt(i,o){if(i&1&&g(0,ZZt,2,2,"ng-container",6)(1,tXt,4,6,"ng-template",null,1,Te),i&2){let n=de(2),e=l().ngIf;d("ngIf",e.embedMode||e.floatingMode)("ngIfElse",n)}}function iXt(i,o){if(i&1){let n=Y();_(0,"velt-comments-sidebar-wrapper-internal",12),P(1,"translate"),G("onWrapperClick",function(t){N(n);let r=l(2);return F(r.onClick(t))}),b()}if(i&2){let n=l().ngIf,e=l();d("componentConfigSignal",e.componentConfigSignal)("template",e.template)("darkMode",n.darkMode),x("data-testid",e.componentId)("aria-label",M(1,6,"Comments sidebar"))("aria-modal",!0)}}function oXt(i,o){if(i&1&&(f(0),g(1,nXt,3,2,"ng-template",5)(2,iXt,2,8,"ng-template",null,0,Te),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.isFirstComponent||n.floatingMode)}}var r7=(()=>{let o=class o extends Je{set _pageMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{pageMode:t}),r))}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _pageMode: ",t)}}set _filterCount(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{filterCount:t}),r))}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _filterCount: ",t)}}set _customActions(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSidebarCustomActions():this.commentService.disableSidebarCustomActions()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _pageMode: ",t)}}set focusedThreadMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableFocusedThreadMode():this.commentService.disableFocusedThreadMode()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _pageMode: ",t)}}set _sortData(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{sortData:e}),t))}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _sortData: ",t)}}set enableUrlNavigation(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSidebarUrlNavigation():this.commentService.disableSidebarUrlNavigation()}set urlNavigation(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableSidebarUrlNavigation():this.commentService.disableSidebarUrlNavigation()}set _queryParamsComments(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableQueryParamsComments():this.commentService.disableQueryParamsComments()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent _queryParamsComments: ",t)}}set _currentLocationSuffix(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{currentLocationSuffix:!!t}),r))}catch{}}set _filterOptionLayout(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{filterOptionLayout:e}),t))}catch{}}set _filterConfig(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.updateFilterConfig(t)}catch{}}set _groupConfig(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.componentConfigSignal.update(r=>(r=T(I({},r),{groupConfig:t}),r.groupConfig?.enable||(r.groupBy=null),r))}catch{}}set _filters(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.commentService.setCommentSidebarFilters(t)}catch{}}set _systemFiltersOperator(e){try{e&&this.commentService.setCommentSidebarSystemFiltersOperator(e)}catch{}}set _excludeLocationIds(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t&&typeof t=="object"&&this.commentService.setExcludeLocationIdsFromSidebar(t)}catch{}}set _fullExpanded(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{fullExpanded:!!t}),r))}catch{}}set _sidebarButtonCountType(e){try{this.commentService.setSidebarButtonCountType(e)}catch{}}set _filterGhostCommentsInSidebar(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.commentService.enableFilterGhostCommentsInSidebar():this.commentService.disableFilterGhostCommentsInSidebar()}catch{}}set _sidebarShadowDOM(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{shadowDom:t}),r)),t?this.commentService.enableSidebarShadowDOM():this.commentService.disableSidebarShadowDOM()}catch{}}constructor(e,t,r,a,s,c,p,u,C,E,D,L,z,W,J,ue,ye){super(p,ye,void 0,r),this.analyticsService=e,this.authService=t,this.commentService=r,this.configService=a,this.domService=s,this.docService=c,this.elementRef=p,this.iamService=u,this.loggingService=C,this.breakpointObserver=E,this.customFilterService=D,this.translateService=L,this.cd=z,this.wireframeService=W,this.renderer=J,this.dynamicComponentService=ue,this.themeService=ye,this.embedMode=null,this.floatingMode=!1,this.dialogVariant="sidebar",this.focusedThreadDialogVariant="sidebar",this.filterPanelLayout="bottomSheet",this.pageModeComposerVariant="sidebar",this.searchPlaceholder="Search comments",this.openSidebar=new Pe,this.onSidebarOpen=new Pe,this.onSidebarCommentClick=new Pe,this.onSidebarCommentClickEvent=new Pe,this.onCommentClick=new Pe,this.onSidebarClose=new Pe,this.onCommentNavigationButtonClick=new Pe,this.subscriptions=[],this.locations={},this.commentAccessMode=io,this.commentReadAnalyticsCalled=!0,this.peopleTypes={all:"All",other:"Other"},this.pageTypes={all:"All",other:"Other"},this.unsetType={id:"unset",name:"Not set"},this.objectKeys=Object.keys,this.filteredGroupedCommentAnnotationsObj={},this.filteredGroupedCommentAnnotations=[],this.veltId=En(),this.veltElement=!0,this.defaultFilterConfig={location:{name:"Pages",enable:!0,multiSelection:!0,enableGrouping:!0,placeholder:"Search pages",type:"system"},document:{name:"Documents",enable:!1,multiSelection:!0,enableGrouping:!1,placeholder:"Search documents",type:"system"},people:{name:"Author",enable:!0,multiSelection:!0,enableGrouping:!0,placeholder:"Search authors",type:"system"},assigned:{name:"Assigned",enable:!0,multiSelection:!0,enableGrouping:!0,placeholder:"Search assigned",type:"system"},tagged:{name:"Tagged",enable:!0,multiSelection:!0,enableGrouping:!0,placeholder:"Search tagged",type:"system"},involved:{name:"Involved",enable:!0,multiSelection:!0,enableGrouping:!0,placeholder:"Search involved",type:"system"},priority:{name:"Priority",enable:!0,multiSelection:!0,enableGrouping:!1,placeholder:"Search priority",type:"system"},status:{name:"Status",enable:!1,multiSelection:!0,enableGrouping:!1,placeholder:"Search status",type:"system"},category:{name:"Category",enable:!0,multiSelection:!0,enableGrouping:!1,placeholder:"Search category",type:"system"},commentType:{name:"Comment Type",enable:!0,multiSelection:!0,enableGrouping:!1,placeholder:"Search comment type",type:"system"},version:{name:"Versions",enable:!0,multiSelection:!1,enableGrouping:!1,placeholder:"Search versions",type:"system"}},this.defaultGroupConfig={enable:!0,name:"Group By"},this.isUserGlobalContact=!1,this.resolvedCommentsOnDom=!1,this.position="right",this.commentRefId="",this.showDefault=!0,this.componentConfigSignal=De({embedMode:this.embedMode,floatingMode:this.floatingMode,pageMode:!1,currentLocationSuffix:!1,queryParamsComments:!1,variant:this.variant,dialogVariant:this.dialogVariant,focusedThreadDialogVariant:this.focusedThreadDialogVariant,pageModeComposerVariant:this.pageModeComposerVariant,fullExpanded:!1,systemFiltersOperator:xc.AND,annotations:[],filteredCommentPinAnnotations:[],filteredCommentAnnotationsCount:0,selectedAnnotationsMap:{},commentAnnotationsCountByFilters:{page:{},document:{},status:{},people:{},tagged:{},assigned:{},involved:{},version:{},priority:{},commentCategory:{},accessMode:{}},noCommentsFound:!1,noCommentsFoundForAppliedFilters:!1,pageCommentAnnotation:new Bo,commentCategoryMap:j.CommentCategoryMap,virtualScrollData:[],isFirstComponent:!1,searchPlaceholder:this.searchPlaceholder,enableAutoCategorize:!1,filterConfig:JSON.parse(JSON.stringify(this.defaultFilterConfig)),filters:{pages:[],documents:[],statuses:[],statusIds:[],people:[],assigned:[],tagged:[],involved:[],versions:[],versionIds:[],priorities:[],priorityIds:[],categories:[],categoryIds:[],accessModes:[],input:null},moreFiltersVisible:!1,groupByOptions:{},groupBy:null,peopleFilters:[],assignedFilters:[],taggedFilters:[],involvedFilters:[],enablePriority:!1,enableStatus:!0,appliedFiltersCount:0,priorities:[],statuses:[],accessModes:[{id:io.PUBLIC,name:"Public"},{id:io.PRIVATE,name:"Private"}],filterOptionLayout:"checkbox",filterCount:!0,sidebarVisible:!1,pages:{},documents:{},showAllPages:!1,showAllDocuments:!1,versions:[],groupConfig:JSON.parse(JSON.stringify(this.defaultGroupConfig)),user:null,currentPage:null,currentDocument:null,isUserAdmin:!1,isPhone:!1,darkMode:!1,skeletonLoading:!0,shadowDom:void 0,position:this.position,filterPanelLayout:this.filterPanelLayout,customActionsState:{},readOnly:!1,filterRecentlyClosed:!1,location:null,trackByCategoryId:this.trackByCategoryId.bind(this),trackByPriorityId:this.trackByPriorityId.bind(this),trackByCustomFilterId:this.trackByCustomFilterId.bind(this),trackByAccessModeId:this.trackByAccessModeId.bind(this),trackByPageKey:this.trackByPageKey.bind(this),trackByDocumentKey:this.trackByDocumentKey.bind(this),trackByPeople:this.trackByPeople.bind(this),trackByVersion:this.trackByVersion.bind(this),trackByGroupByOptionKey:this.trackByGroupByOptionKey.bind(this),onCommentAnnotationClick:this.onCommentAnnotationClick.bind(this),saveComment:this.saveComment.bind(this),trackCommentPinAnnotations:this.trackCommentPinAnnotations.bind(this),updateFilter:this.updateFilter.bind(this),toggleGroupedCommentAnnotations:this.toggleGroupedCommentAnnotations.bind(this),changeGroupBy:this.changeGroupBy.bind(this),closeSidebar:this.closeSidebar.bind(this),toggleMoreFilters:this.toggleMoreFilters.bind(this),openMoreFilters:this.openMoreFilters.bind(this),closeMoreFilters:this.closeMoreFilters.bind(this),savePageComment:this.savePageComment.bind(this),sortComments:this.sortComments.bind(this),goBackToAllComments:this.goBackToAllComments.bind(this),minimalFilterDropdownOpen:!1,minimalActionsDropdownOpen:!1,toggleMinimalFilterDropdown:this.toggleMinimalFilterDropdown.bind(this),unreadCommentsMap:null,minimalFilter:"all",filterCommentsByReadStatus:this.filterCommentsByReadStatus.bind(this),selectedMinimalFilterDropdownOption:{sorting:"date",filter:"all"},locationFilterDropdownOpen:!1,toggleLocationFilterDropdown:this.toggleLocationFilterDropdown.bind(this),documentFilterDropdownOpen:!1,toggleDocumentFilterDropdown:this.toggleDocumentFilterDropdown.bind(this),closeDocumentFilterDropdown:this.closeDocumentFilterDropdown.bind(this),markAllCommentAnnotationsAsRead:this.markAllCommentAnnotationsAsRead.bind(this),markAllCommentAnnotationsAsResolved:this.markAllCommentAnnotationsAsResolved.bind(this),toggleMinimalActionsDropdown:this.toggleMinimalActionsDropdown.bind(this),toggleCustomAction:this.toggleCustomAction.bind(this),focusedThreadMode:!1,focusedAnnotation:null,navigateToComment:this.navigateToComment.bind(this),resetFilters:this.resetFilters.bind(this),filterSearch:this.filterSearch.bind(this),customFilters:{},onDialogExpanded:this.onDialogExpanded.bind(this)}),this.sidebarShadowDOM=!1,this.dataAvailable=!1,this.componentId="velt-comments-sidebar";try{this.subscriptions.push(super.onDarkModeChange().subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{darkMode:Ve}),Fe))})),this.loggingService.log("%c[WB] Creating CLASS: CommentsSidebarComponent","color: blue;"),this.componentConfigSignal.update(Ve=>(Ve=T(I({},Ve),{groupBy:Ve.groupByOptions.page}),Ve.pageCommentAnnotation.isPageAnnotation=!0,Ve)),this.updateGroupByOptions(),this.subscriptions.push(this.commentService.getSidebarShadowDOM$().subscribe(Ve=>{this.sidebarShadowDOM=Ve})),this.subscriptions.push(this.commentService.getFocusedThreadMode$().subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{focusedThreadMode:Ve}),Fe))})),this.subscriptions.push(this.commentService.getReadOnly$().subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{readOnly:Ve}),Fe))})),this.subscriptions.push(this.commentService.getQueryParamsComments$().subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{queryParamsComments:Ve}),Fe)),this.setPages(),this.setDocuments()})),this.subscriptions.push(this.commentService.getUnreadCommentsMap$().subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{unreadCommentsMap:Ve}),Fe))})),this.subscriptions.push(this.breakpointObserver.observe(Ni.XSmall).subscribe(Ve=>{Ve.matches?this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{isPhone:!0}),Fe)):this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{isPhone:!1}),Fe))},Ve=>{this.loggingService.catch("Error in CommentsSidebarComponent breakpointObserver subscription: ",Ve)})),this.subscriptions.push(this.customFilterService.customStatusMap$.subscribe(Ve=>{this.statusMap=Ve,this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{statuses:Object.values(Ve)}),Fe)),this.pruneStaleStatuses()})),this.subscriptions.push(this.customFilterService.customPriorityMap$.subscribe(Ve=>{this.priorityMap=Ve,this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{priorities:[...Object.values(Ve),{id:"unset",name:"Not set",color:"#FFFFFF"}]}),Fe)),this.pruneStalePriorities()})),this.subscriptions.push(this.customFilterService.customCategoryMap$.subscribe(Ve=>{this.componentConfigSignal.update(Fe=>(Fe=T(I({},Fe),{commentCategoryMap:T(I({},Ve),{other:{id:"other",name:"Other",color:"#00C48C"}})}),Fe)),this.pruneStaleCategories()}));let Ie=sessionStorage.getItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE);Ie&&this.componentConfigSignal.update(Ve=>(Ve=T(I({},Ve),{customActionsState:JSON.parse(Ie)}),Ve))}catch(Ie){this.loggingService.catch("Error in CommentsSidebarComponent constructor: ",Ie)}}ngOnInit(){try{if(this.setupA11yAttributes(),sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS)){let e=JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS));delete e?.input,e?.people?.length&&e.people.find(t=>typeof t=="string")&&(e.people=[]),e?.pages?.length&&e.pages?.forEach(t=>{t?.id||(t.id=t.displayName)}),sessionStorage.getItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_FILTERS_RESET)||(e.pages=[],sessionStorage.setItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_FILTERS_RESET,"true")),this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:e}),t)),this.pruneStaleStatuses(),this.pruneStalePriorities(),this.pruneStaleCategories()}if(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_GROUP_BY)){let e=sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_GROUP_BY);e&&this.componentConfigSignal.update(t=>(t=I({},t),Object.keys(t.groupByOptions).forEach(r=>{t.groupByOptions[r]===e&&(t.groupBy=e)}),t))}this.subscriptions.push(this.commentService.onCommentAdd$().subscribe(e=>{e?.annotation&&setTimeout(()=>{this.goToAnnotationInSidebar(e.annotation)},200)}))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent OnInit: ",e)}try{let e="velt-comments-sidebar-wireframe";this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){this.commentRefId="comment-sidebar";let r=document.createElement(t.tagName);r.innerHTML=t.innerHTML,this.template=r}}))}catch(e){this.loggingService.catch("Error in CommentDialogComponent OnInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()}),this.getAllCommentAnnotationsSubscription&&this.getAllCommentAnnotationsSubscription.unsubscribe(),this.componentConfigSignal.update(e=>(e=T(I({},e),{minimalFilterDropdownOpen:!1}),e)),this.commentService.setCommentsFromSidebarMap({comments:null,sidebarVisible:!1})}catch{}}ngAfterViewInit(){try{if(this.floatingMode)this.initComponent();else{let e=document.querySelector(j.TAGS.SNIPPYLY_COMMENTS_SIDEBAR),t=document.querySelector(j.TAGS.VELT_COMMENTS_SIDEBAR);t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>(r=T(I({},r),{isFirstComponent:!0}),r)),setTimeout(()=>{this.sidebarOverlay?.overlayRef?.hostElement&&(this.sidebarOverlay.overlayRef.hostElement.style.zIndex="1001")},100),this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>(r=T(I({},r),{isFirstComponent:!0}),r)),setTimeout(()=>{this.sidebarOverlay?.overlayRef?.hostElement&&(this.sidebarOverlay.overlayRef.hostElement.style.zIndex="1001")},100),this.initComponent())}}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent AfterViewInit: ",e)}}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent ngOnChanges: ",t)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setupA11yAttributes:",e)}}onClick(e){try{this.loggingService.log("%c[WB] Calling FUNCTION: onClick","color: green;");let t=e?.target?.tagName?.toLowerCase();t!==j.TAGS.VELT_COMMENT_DIALOG&&t!==j.TAGS.SNIPPYLY_COMMENT_DIALOG&&!e?.target?.closest(j.TAGS.VELT_COMMENT_DIALOG)&&!e?.target?.closest(j.TAGS.SNIPPYLY_COMMENT_DIALOG)&&this.domService.resetSelectedAnnotationsMap()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent onClick: ",t)}}pruneStaleStatuses(){try{this.statusMap!==void 0&&this.componentConfigSignal.update(e=>(e=I({},e),e.filters.statuses=e.filters.statuses.filter(t=>t.id in this.statusMap),e.filters.statusIds=e.filters.statuses?.map(t=>t?.id),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent filterStaleStatuses: ",e)}}pruneStalePriorities(){try{this.priorityMap!==void 0&&this.componentConfigSignal.update(e=>(e=I({},e),e.filters.priorities=e.filters.priorities.filter(t=>t.id in this.priorityMap),e.filters.priorityIds=e.filters.priorities?.map(t=>t.id),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent filterStalePriorities: ",e)}}pruneStaleCategories(){try{this.componentConfigSignal().commentCategoryMap!==void 0&&this.componentConfigSignal.update(e=>(e=I({},e),e.filters.categories=e.filters.categories?.filter(t=>t.id in e.commentCategoryMap),e.filters.categoryIds=e.filters.categories?.map(t=>t.id),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent filterStaleCategories: ",e)}}trackByAnnotationGroup(e,t){return t?.displayName}trackByAnnotationId(e,t){return t?.annotationId}trackByCategoryId(e,t){return t?.value?.id||e}trackByPriorityId(e,t){return t?.id||e}trackByCustomFilterId(e,t){return t?.id||e}trackByAccessModeId(e,t){return t?.id||e}trackByPageKey(e,t){return t?.key||e}trackByDocumentKey(e,t){return t?.key||e}trackByPeople(e,t){return t?.id||e}trackByVersion(e,t){return t?.id||e}trackByGroupByOptionKey(e,t){return t?.key||e}initComponent(){try{this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t)),this.componentConfigSignal().user&&(this.setCommentSidebarInstalledInAnalytics(),this.setCommentSidebarEmbedModeInAnalytics(),this.setCommentSidebarFloatingModeInAnalytics())},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getUser$ subscription: ",e)})),this.subscriptions.push(this.docService.getDocumentPaths$().subscribe(e=>{this.documentPaths=e,this.getAllCommentsOnCurrentDocument()},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getDocumentPaths$ subscription: ",e)})),this.subscriptions.push(this.commentService.getSidebarCustomActionEventData().subscribe(e=>{e&&(this.componentConfigSignal.update(t=>(t=T(I({},t),{customActionsState:e.actions}),t)),sessionStorage.setItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE,JSON.stringify(e.actions)))})),this.subscriptions.push(this.docService.getLocation$().subscribe(e=>{this.location=e,this.componentConfigSignal.update(a=>(a=T(I({},a),{location:e}),a));let t=this.commentService.getCommentSidebarFilters(),r=t?I({},t):{version:[]};this.location?.location?.version?r.version=[{id:this.location.location.version?.id,name:this.location.location.version?.name}]:r?.version||(r.version=[]),this.commentService.setCommentSidebarFilters(r),this.setPages(),this.filteredGroupedCommentAnnotationsObj={}},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getLocation$ subscription: ",e)})),this.subscriptions.push(this.docService.getLocations$().subscribe(e=>{this.locations=e,this.filteredGroupedCommentAnnotationsObj={}})),this.subscriptions.push(this.commentService.getEnableStatus$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{enableStatus:e}),t))})),this.subscriptions.push(this.commentService.getEnablePriority$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{enablePriority:e}),t))},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getEnablePriority$ subscription: ",e)})),this.subscriptions.push(this.commentService.getEnableAutoCategorize$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{enableAutoCategorize:e}),t))})),this.subscriptions.push(this.commentService.getSidebarVisibility$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{sidebarVisible:e}),t)),this.componentConfigSignal().sidebarVisible&&(this.commentReadAnalyticsCalled=!1,setTimeout(()=>{Object.keys(this.componentConfigSignal().selectedAnnotationsMap).length&&this.goToAnnotationInSidebar(this.componentConfigSignal().selectedAnnotationsMap[Object.keys(this.componentConfigSignal().selectedAnnotationsMap)[0]])},500)),this.componentConfigSignal().sidebarVisible?(this.getAllCommentsOnCurrentDocument(),this.commentService.setCommentsFromSidebarMap({comments:this.componentConfigSignal().skeletonLoading?void 0:this.componentConfigSignal().filteredCommentPinAnnotations,sidebarVisible:!0})):(this.commentService.getSidebarButtonCountType()==="default"&&this.getAllCommentAnnotationsSubscription&&this.getAllCommentAnnotationsSubscription.unsubscribe(),this.commentService.setCommentsFromSidebarMap({comments:this.componentConfigSignal().skeletonLoading?void 0:this.componentConfigSignal().filteredCommentPinAnnotations,sidebarVisible:!1}))},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getSidebarVisibility$ subscription: ",e)})),this.subscriptions.push(this.commentService.getSidebarButtonCountType$().subscribe(e=>{e==="filter"&&this.getAllCommentsOnCurrentDocument()})),this.subscriptions.push(this.commentService.getCommentSidebarFilters$().subscribe(e=>{this.mergeClientFilters(e)})),this.subscriptions.push(this.commentService.getCommentSidebarSystemFiltersOperator$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{systemFiltersOperator:e}),t)),this.filterCommentAnnotations()})),this.subscriptions.push(this.commentService.getOpenSidebar$().subscribe(e=>{this.openSidebar.emit(e),this.onSidebarOpen.emit(e)},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getOpenSidebar$ subscription: ",e)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(e=>{let t=this.componentConfigSignal().selectedAnnotationsMap;this.componentConfigSignal.update(c=>(c=T(I({},c),{selectedAnnotationsMap:e}),c)),Object.keys(this.componentConfigSignal().selectedAnnotationsMap).length===1&&!this.commentService.showFloatingComments()&&this.commentService.setSidebarVisibility(!0);let r=Object.keys(e||{}),a=Object.keys(t||{}),s=r.find(c=>!a.includes(c));if(s){let c=this.componentConfigSignal().annotations.find(p=>p.annotationId===s);c&&setTimeout(()=>{this.goToAnnotationInSidebar(c)},100)}},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getSidebarVisibility$ subscription: ",e)})),this.subscriptions.push(this.domService.onDocumentClick$().subscribe(e=>{try{if(this.componentConfigSignal().sidebarVisible&&e&&!this.elementRef?.nativeElement?.contains(e?.target)){let t=document.querySelectorAll(".cdk-overlay-container");Array.from(t).some(a=>a?.contains(e?.target))||!this.embedMode&&!this.commentService.isSidebarOpenedByCustomTrigger()&&(e?.target?.hasAttribute(j.ATTRIBUTES.VELT_DOWNLOAD_BUTTON)||(this.closeSidebar(),e?.stopPropagation()))}}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent onDocumentClick: ",t)}},e=>{this.loggingService.catch("Error in CommentsSidebarComponent onDocumentClick$ subscription: ",e)})),this.subscriptions.push(this.iamService.isUserAdmin$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{isUserAdmin:e}),t))},e=>{this.loggingService.catch("Error in CommentsSidebarComponent isUserAdmin$ subscription: ",e)})),this.getAllCommentsOnCurrentDocument(),this.subscriptions.push(this.commentService.getSidebarCustomData().subscribe(e=>{this.updateVirtualScrollData(e)}))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent initComponent: ",e)}}updateVirtualScrollData(e){try{if(this.commentService.getSidebarCustomActionsValue()){let t=[];this.componentConfigSignal.update(s=>(s=I({},s),s.virtualScrollData=[],s)),e?.data?.forEach((s,c)=>{e?.options?.grouping!==!1&&this.componentConfigSignal.update(p=>(p=I({},p),p.virtualScrollData.push({type:"group",data:{displayName:s?.groupName,isExpanded:s?.isExpanded===void 0&&c===0||s?.isExpanded,annotations:s?.annotations}}),p)),(s?.isExpanded===void 0&&c===0||s?.isExpanded)&&s?.annotations?.forEach(p=>{this.componentConfigSignal.update(u=>(u=I({},u),u.virtualScrollData.push({type:"annotation",data:p}),u))}),t.push(...s?.annotations||[])}),this.componentConfigSignal.update(s=>(s=T(I({},s),{noCommentsFoundForAppliedFilters:!this.componentConfigSignal().virtualScrollData?.length}),s));let r=this.componentConfigSignal().embedMode||this.componentConfigSignal().sidebarVisible;this.commentService.setCommentsFromSidebarMap({comments:t,sidebarVisible:!!r}),this.componentConfigSignal.update(s=>(s=I({},s),s.filteredCommentAnnotationsCount=t?.length||0,s)),this.cd.markForCheck();let a=this.componentConfigSignal().virtualScrollViewportRef?.elementRef?.nativeElement;a&&(a.scrollTop=0)}}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent updateVirtualScrollData: ",t)}}updateVirtualScrollDataGroupToggle(e){try{if(this.commentService.getSidebarCustomActionsValue()){this.componentConfigSignal.update(r=>(r=I({},r),r.virtualScrollData=[],r)),e?.forEach(r=>{r.type==="group"&&(this.componentConfigSignal.update(a=>(a=I({},a),a.virtualScrollData.push(r),a)),r?.data?.isExpanded&&r?.data?.annotations.forEach(a=>{this.componentConfigSignal.update(s=>(s=I({},s),s.virtualScrollData.push({type:"annotation",data:a}),s))}))}),this.componentConfigSignal.update(r=>(r=T(I({},r),{noCommentsFoundForAppliedFilters:!this.componentConfigSignal().virtualScrollData?.length}),r)),this.cd.markForCheck();let t=this.componentConfigSignal().virtualScrollViewportRef?.elementRef?.nativeElement;t&&(t.scrollTop=0)}}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent updateVirtualScrollDataGroupToggle: ",t)}}getAllCommentsOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getAllCommentsOnCurrentDocument","color: green;");try{this.getAllCommentAnnotationsSubscription&&this.getAllCommentAnnotationsSubscription.unsubscribe(),this.componentConfigSignal.update(e=>(e=T(I({},e),{skeletonLoading:!0}),e)),this.getAllCommentAnnotationsSubscription=this.commentService.getAllCommentAnnotations({excludeDomChanges:!0,skipPositionCalculation:!0,fromCommentSidebar:!0,analytics:{enabled:!0,properties:{source:"internal",sourceId:"commentsSidebar"}}}).pipe(ce(e=>(e||this.componentConfigSignal.update(t=>(t=T(I({},t),{skeletonLoading:!0}),t)),e)),Le(e=>!!e),ce(e=>e?.filter(t=>t?.comments?.length)),he(e=>this.commentService.getFilterGhostCommentsInSidebar$().pipe(he(t=>t?this.commentService.getGhostCommentAnnotationMap$().pipe(ce(r=>r?e?.filter(a=>!r?.[a?.annotationId]):e)):se(e)))),he(e=>this.commentService.getExcludeLocationIdsFromSidebar$().pipe(ce(t=>t?.length&&e?.length?e.filter(r=>r?.location?.id?!t.includes(r.location.id):!0):e))),he(e=>this.commentService.getResolvedCommentsOnDom$().pipe(ce(t=>(this.resolvedCommentsOnDom!==t&&(this.resolvedCommentsOnDom=t,t&&this.setResolvedStatusInFilter()),e))))).subscribe(e=>{if(this.dataAvailable=!0,this.componentConfigSignal.update(t=>{if(t=T(I({},t),{skeletonLoading:!1}),t.annotations=e?.filter(r=>!r?.isPageAnnotation||r?.comments?.length)||[],t.sortData==="asc"?t.annotations=t.annotations?.sort((r,a)=>r.lastUpdated-a.lastUpdated):t.sortData==="none"?t.annotations=t.annotations?.sort((r,a)=>a.createdAt-r.createdAt):t.annotations=t.annotations?.sort((r,a)=>a.lastUpdated-r.lastUpdated),t?.focusedAnnotation?.annotationId){let r=e?.find(a=>a.annotationId===t?.focusedAnnotation?.annotationId);r&&(t.focusedAnnotation=r)}return t}),this.setPages(),this.setDocuments(),this.setVersions(),this.setPeople(),this.filterCommentAnnotations(),this.updateAnnotationCountsByFilter(),this.componentConfigSignal().annotations?.length){let t=sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_SELECTED_ANNOTATION_ID);if(t){sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_SELECTED_ANNOTATION_ID),this.commentService.setSidebarVisibility(!0);let r=this.componentConfigSignal().annotations.find(a=>a.annotationId===t);r&&this.goToAnnotation(r)}this.componentConfigSignal().sidebarVisible&&!this.commentReadAnalyticsCalled&&this.setCommentReadInAnalytics()}this.componentConfigSignal.update(t=>(t=T(I({},t),{noCommentsFound:!this.componentConfigSignal().annotations?.length}),t))},e=>{this.loggingService.catch("Error in CommentsSidebarComponent getAllCommentsOnCurrentDocument subscription: ",e),this.componentConfigSignal.update(t=>(t=T(I({},t),{skeletonLoading:!1}),t))})}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent getAllCommentsOnCurrentDocument: ",e)}}mergeClientFilters(e){try{if(Object.keys(e||{})?.length){if(e?.location&&(e?.location?.length?(this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{pages:[]})}),t)),e?.location?.forEach(t=>{if(t?.id&&(this.componentConfigSignal().filters?.pages||this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{pages:[]})}),a)),!this.componentConfigSignal().filters.pages.find(a=>a.id===t.id))){let a=this.docService.genarateLocationId(t);this.componentConfigSignal.update(s=>(s=T(I({},s),{filters:T(I({},s.filters),{pages:[...s.filters.pages,{id:t.id,displayName:t.displayName,locationIds:[a],selected:!0}]})}),s))}})):this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{pages:[]})}),t)),this.updatePageSelectedState()),e?.document&&(e?.document?.length?(this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{documents:[]})}),t)),e?.document?.forEach(t=>{(t?.id||t?.documentName)&&(this.componentConfigSignal().filters?.documents||this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{documents:[]})}),a)),this.componentConfigSignal().filters.documents.find(a=>a.id===t.id||a.documentName===t.documentName)||this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{documents:[...a.filters.documents,{id:t.id||t.documentName,documentName:t.documentName||t.id,selected:!0}]})}),a)))})):this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{documents:[]})}),t)),this.updateDocumentSelectedState()),e?.priority)if(e?.priority?.length){let t=e.priority;this.componentConfigSignal.update(r=>(r=T(I({},r),{filters:T(I({},r.filters),{priorities:r.priorities.filter(a=>t.includes(a.id)),priorityIds:t})}),r))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{priorities:[],priorityIds:[]})}),t));if(e?.category)if(e?.category?.length){if(this.componentConfigSignal().commentCategoryMap){let t=e.category;this.componentConfigSignal.update(r=>(r=T(I({},r),{filters:T(I({},r.filters),{categories:Object.values(r.commentCategoryMap).filter(a=>t.includes(a.id)),categoryIds:t})}),r))}}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{categories:[],categoryIds:[]})}),t));if(e?.status)if(e?.status?.length){let t=e.status;this.componentConfigSignal.update(r=>(r=T(I({},r),{filters:T(I({},r.filters),{statuses:r.statuses.filter(a=>t.includes(a.id)),statusIds:t})}),r))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{statuses:[],statusIds:[]})}),t));else sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS)||this.setDefaultStatuses();if(e?.people){if(e?.people?.length){let t=[],r=this.componentConfigSignal().user;r&&e.people.find(s=>s.userId&&s.userId===r?.userId||s.email&&s.email===r?.email)&&t.push({id:r.userId,name:r.name||r.email||r.userId||"",userId:r.userId,email:r.email}),e.people.forEach(a=>{if(a?.userId||a?.email){let s=this.componentConfigSignal().peopleFilters.find(c=>a.userId&&c?.user?.userId===a.userId||a.email&&c?.user?.email===a.email);if(s&&s?.user?.userId!==r?.userId)t.push({id:s?.user?.userId,name:s?.user?.name,userId:s?.user?.userId,email:s?.user?.email});else{let c=a.userId;c&&c!==r?.userId&&t.push({id:c,name:a.name||a.email||a.userId,userId:a.userId,email:a.email})}}}),this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{people:t})}),a))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{people:[]})}),t));this.setPeople(),this.updatePeopleSelectedState()}if(e?.assigned){if(e?.assigned?.length){let t=[],r=this.componentConfigSignal().user;r&&e.assigned.find(s=>s.userId&&s.userId===r?.userId||s.email&&s.email===r?.email)&&t.push({id:r.userId,name:r.name||r.email||r.userId||"",userId:r.userId,email:r.email}),e.assigned.forEach(a=>{if(a?.userId||a?.email){let s=this.componentConfigSignal().assignedFilters.find(c=>a.userId&&c?.user?.userId===a.userId||a.email&&c?.user?.email===a.email);if(s&&s?.user?.userId!==r?.userId)t.push({id:s?.user?.userId,name:s?.user?.name,userId:s?.user?.userId,email:s?.user?.email});else{let c=a.userId;c&&c!==r?.userId&&t.push({id:c,name:a.name||a.email||a.userId,userId:a.userId,email:a.email})}}}),this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{assigned:t})}),a))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{assigned:[]})}),t));this.setPeople(),this.updatePeopleSelectedState()}if(e?.tagged){if(e?.tagged?.length){let t=[],r=this.componentConfigSignal().user;r&&e.tagged.find(s=>s.userId&&s.userId===r?.userId||s.email&&s.email===r?.email)&&t.push({id:r.userId,name:r.name||r.email||r.userId||"",userId:r.userId,email:r.email}),e.tagged.forEach(a=>{if(a?.userId||a?.email){let s=this.componentConfigSignal().taggedFilters.find(c=>a.userId&&c?.user?.userId===a.userId||a.email&&c?.user?.email===a.email);if(s&&s?.user?.userId!==r?.userId)t.push({id:s?.user?.userId,name:s?.user?.name,userId:s?.user?.userId,email:s?.user?.email});else{let c=a.userId;c&&c!==r?.userId&&t.push({id:c,name:a.name||a.email||a.userId,userId:a.userId,email:a.email})}}}),this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{tagged:t})}),a))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{tagged:[]})}),t));this.setPeople(),this.updatePeopleSelectedState()}if(e?.involved){if(e?.involved?.length){let t=[],r=this.componentConfigSignal().user;r&&e.involved.find(s=>s.userId&&s.userId===r?.userId||s.email&&s.email===r?.email)&&t.push({id:r.userId,name:r.name||r.email||r.userId||"",userId:r.userId,email:r.email}),e.involved.forEach(a=>{if(a?.userId||a?.email){let s=this.componentConfigSignal().involvedFilters.find(c=>a.userId&&c?.user?.userId===a.userId||a.email&&c?.user?.email===a.email);if(s&&s?.user?.userId!==r?.userId)t.push({id:s?.user?.userId,name:s?.user?.name,userId:s?.user?.userId,email:s?.user?.email});else{let c=a.userId;c&&c!==r?.userId&&t.push({id:c,name:a.name||a.email||a.userId,userId:a.userId,email:a.email})}}}),this.componentConfigSignal.update(a=>(a=T(I({},a),{filters:T(I({},a.filters),{involved:t})}),a))}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{involved:[]})}),t));this.setPeople(),this.updatePeopleSelectedState()}e?.version&&(e?.version?.length?this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{versions:e.version?.map(r=>({id:r.id,name:r.name||r.id}))||[],versionIds:e.version?.map(r=>r.id)||[]})}),t)):this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{versions:[],versionIds:[]})}),t)),this.setVersions()),Object.keys(this.componentConfigSignal().filterConfig).forEach(t=>{this.componentConfigSignal().filterConfig[t]?.type==="custom"&&Object.keys(e).includes(t)&&e?.[t]&&(e?.[t]?.length?this.componentConfigSignal.update(r=>(r=T(I({},r),{filters:T(I({},r.filters),{[t]:e[t]?.map(a=>({id:a.id,name:a.name||a.id}))||[],[t+"Ids"]:e[t]?.map(a=>a.id)||[]})}),r)):this.componentConfigSignal.update(r=>(r=T(I({},r),{filters:T(I({},r.filters),{[t]:[],[t+"Ids"]:[]})}),r)))}),this.filterCommentAnnotations(),this.updateAnnotationCountsByFilter(),this.setFiltersToStorage()}}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent mergeClientFilters: ",t)}}onCommentAnnotationClick(e){try{let t=qn(e);this.componentConfigSignal().focusedThreadMode?this.componentConfigSignal.update(r=>(r=T(I({},r),{focusedAnnotation:e}),r)):this.navigateToComment(e,!1),this.emitOnSidebarCommentClick(t)}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent onCommentAnnotationClick: ",t)}}navigateToComment(e,t=!0){try{if(t){let r=qn(e);this.emitOnCommentNavigationButtonClick(r)}if(this.commentService.getSidebarUrlNavigation()&&t)if(e?.pageInfo?.url&&e.pageInfo?.url!==window.location.href){sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_SELECTED_ANNOTATION_ID,e.annotationId);let r=e.pageInfo.url;try{let a=window.location.origin,s=new URL(e.pageInfo.url).origin;a!==s&&(r=r.replace(s,a))}catch(a){this.loggingService.catch("Error in CommentsSidebarComponent onCommentAnnotationClick in comparing url domains: ",a)}window.location.href===r?this.goToAnnotation(e,t):window.location.href=r}else this.goToAnnotation(e,t);else this.goToAnnotation(e,t)}catch(r){this.loggingService.catch("Error in CommentsSidebarComponent navigateToComment: ",r)}}goToAnnotation(e,t=!0){try{this.componentConfigSignal().selectedAnnotationsMap[e.annotationId]||e?.targetTextRange&&sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e?.annotationId),t?this.domService.toggleAnnotationSelection(e,void 0,void 0,!0):this.domService.toggleAnnotationSelection(e,void 0,"sidebarShowReplies",!0),t&&setTimeout(()=>{let r=null;e.targetElement||e.areaAnnotationId?r=document.getElementById(`comment-pin-container-${e.annotationId}`):r=document.querySelector(`[data-velt-id='${e.annotationId}']`),r||(r=document.querySelector(`${j.TAGS.VELT_COMMENT_TEXT}[${j.ATTRIBUTES.ANNOTATION_ID}="${e.annotationId}"]`)),r&&r.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})},100)}catch(r){this.loggingService.catch("Error in CommentsSidebarComponent goToAnnotation: ",r)}}goToAnnotationInSidebar(e,t="smooth"){try{let s=document?.querySelector(".velt-comments-sidebar-container")?.querySelector("velt-shadow-dom-internal")?.shadowRoot?.getElementById(`sidebar-${e.annotationId}`);s||(s=document.getElementById(`sidebar-${e.annotationId}`)),s&&s.scrollIntoView({behavior:t,block:"center",inline:"center"})}catch(r){this.loggingService.catch("Error in CommentsSidebarComponent goToAnnotationInSidebar: ",r)}}saveComment(e,t){this.commentService.saveComment(e,t)}getDisplayNameFromPageInfo(e){try{return this.componentConfigSignal().queryParamsComments&&e&&e?.queryParams?`${e?.path||""}${e?.queryParams||""}`:e?.path||""}catch{return""}}setPages(){try{this.componentConfigSignal.update(a=>T(I({},a),{pages:{},currentPage:void 0}));let e=new Map,t={};this.componentConfigSignal().annotations.forEach(a=>{let s=a.locationId||a.documentParamsId;if(!s){t.other||(t.other={locationIds:[],displayName:"Others",id:"other"});return}let c=a?.location?.locationName||a?.documentParams?.locationName||this.getDisplayNameFromPageInfo(a?.pageInfo)||"",p=a?.location?.id||c;e.has(s)||(t[p]||(t[p]={locationIds:[],displayName:c,id:p}),e.set(s,p),t[p].locationIds.push(s))}),this.componentConfigSignal.update(a=>{let s=this.location?.locationId,c;if(s){let p=e.get(s);p&&(c=t[p].displayName)}else t.other&&(c="Others");return T(I({},a),{pages:t,currentPage:c})}),this.updateLocationInStorage(),this.componentConfigSignal().annotations?.length&&!sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS)&&(this.updateFilter({key:"pages",value:null},!0),this.setDefaultStatuses()),this.updatePageSelectedState()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setPages: ",e)}}setDocuments(){try{this.componentConfigSignal.update(a=>T(I({},a),{documents:{},currentDocument:void 0}));let e=new Map,t={};this.componentConfigSignal().annotations.forEach(a=>{let s=a?.metadata?.clientDocumentId?.toString(),c=a?.metadata?.documentId?.toString(),u=this.docService.getDocumentMetadata(c)?.documentName;if(!s){t.other||(t.other={id:"other",documentName:"Others"});return}if(e.has(s))return;let C=s;t[C]||(t[C]={id:s,documentName:u||s}),e.set(s,C)}),this.componentConfigSignal.update(a=>{let s=this.documentPaths?.clientDocumentId?.toString(),c;if(s){let p=e.get(s);p&&(c=t[p].id)}else t.other&&(c="other");return T(I({},a),{documents:t,currentDocument:c})}),this.componentConfigSignal().annotations?.length&&!sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS)&&this.updateFilter({key:"documents",value:null},!0),this.updateDocumentSelectedState()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setDocuments: ",e)}}setDefaultStatuses(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setDefaultStatuses","color: green;"),this.componentConfigSignal.update(e=>(e=T(I({},e),{filters:T(I({},e.filters),{statuses:[this.customFilterService.defaultStatus,...this.customFilterService.ongoingStatuses],statusIds:[this.customFilterService.defaultStatus?.id,...this.customFilterService.ongoingStatuses.map(t=>t?.id)]})}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setDefaultStatuses: ",e)}}setResolvedStatusInFilter(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setResolvedStatusInFilter","color: green;"),this.componentConfigSignal().filters.statuses?.length&&this.customFilterService.resolvedStatus&&(this.componentConfigSignal().filters.statuses.find(t=>t?.id===this.customFilterService.resolvedStatus.id)||this.componentConfigSignal.update(t=>(t=T(I({},t),{filters:T(I({},t.filters),{statuses:[...t.filters.statuses,this.customFilterService.resolvedStatus],statusIds:[...t.filters.statuses.map(r=>r?.id),this.customFilterService.resolvedStatus.id]})}),t)))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setResolvedStatusInFilter: ",e)}}trackCommentPinAnnotations(e,t){return t?.type==="group"?t?.data?.displayName:t?.type==="annotation"?t?.data?.annotationId:e}updateCurrentLocationIdInStorage(){try{this.location?.locationId&&this.componentConfigSignal().filters?.pages?.length&&this.componentConfigSignal.update(e=>(e=I({},e),e.filters.pages.forEach(t=>{t?.displayName===e.currentPage&&(t?.locationIds?.includes(this.location?.locationId)||t.locationIds.push(this.location?.locationId))}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updateCurrentLocationIdInStorage: ",e)}}updateLocationInStorage(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.filters.pages.forEach(t=>{e.pages[t.displayName]&&(t.locationIds=e.pages[t.displayName].locationIds?.slice())}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updateLocationInStorage: ",e)}}updatePageSelectedState(){try{this.componentConfigSignal.update(e=>(e=I({},e),Object.values(e.pages).forEach(t=>{let r=e.filters?.pages?.find(a=>a.id===t?.id);r?(t.selected=!0,r.displayName||(r.displayName=t.displayName)):t.selected=!1}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updatePageSelectedState: ",e)}}setVersions(){try{let e=[];this.componentConfigSignal().annotations&&this.componentConfigSignal.update(t=>(t=I({},t),t.annotations.forEach(r=>{r?.location?.version&&(e.find(a=>a.id===r?.location?.version?.id)||e.push(r?.location?.version))}),t)),this.componentConfigSignal().filters?.versions?.length&&this.componentConfigSignal.update(t=>(t=I({},t),t.filters.versions.forEach(r=>{e.find(a=>a.id===r?.id)||r?.id!=="unset"&&e.push(r)}),t)),this.componentConfigSignal.update(t=>(t=I({},t),t.versions=e?.sort((r,a)=>r?.id?.localeCompare(a?.id)),t.versions.push({id:"unset",name:"Not set"}),t)),this.componentConfigSignal().annotations?.length&&!this.componentConfigSignal().versions?.length&&this.updateFilter({key:"versions",value:null},!0)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setVersions: ",e)}}setPeople(){try{let e=[],t=[],r=[],a=[],s=this.componentConfigSignal().user;s?.userId&&(e.push({id:s.userId,name:s.name||s.email||s.userId||"",user:s}),t.push({id:s.userId,name:s.name||s.email||s.userId||"",user:s}),r.push({id:s.userId,name:s.name||s.email||s.userId||"",user:s}),a.push({id:s.userId,name:s.name||s.email||s.userId||"",user:s})),this.componentConfigSignal().annotations&&this.componentConfigSignal.update(c=>(c=I({},c),c.annotations.forEach(p=>{p?.from?.userId&&c.user?.userId!==p?.from?.userId&&!e.find(u=>u.id===p?.from?.userId)&&e.push({id:p?.from?.userId,name:`${p?.from?.name||p?.from?.email}`,user:p?.from}),p?.assignedTo?.userId&&c.user?.userId!==p?.assignedTo?.userId&&!t.find(u=>u.id===p?.assignedTo?.userId)&&t.push({id:p?.assignedTo?.userId,name:`${p?.assignedTo?.name||p?.assignedTo?.email}`,user:p?.assignedTo}),p?.comments?.forEach(u=>{u?.taggedUserContacts?.forEach(C=>{C?.contact?.userId&&c.user?.userId!==C?.contact?.userId&&!r.find(E=>E.id===C?.contact?.userId)&&r.push({id:C?.contact?.userId,name:`${C?.contact?.name||C?.contact?.email}`,user:C?.contact})})}),p?.from?.userId&&c.user?.userId!==p?.from?.userId&&!a.find(u=>u.id===p?.from?.userId)&&a.push({id:p?.from?.userId,name:`${p?.from?.name||p?.from?.email}`,user:p?.from}),p?.assignedTo?.userId&&c.user?.userId!==p?.assignedTo?.userId&&!a.find(u=>u.id===p?.assignedTo?.userId)&&a.push({id:p?.assignedTo?.userId,name:`${p?.assignedTo?.name||p?.assignedTo?.email}`,user:p?.assignedTo}),p?.comments?.forEach(u=>{u?.taggedUserContacts?.forEach(C=>{C?.contact?.userId&&c.user?.userId!==C?.contact?.userId&&!a.find(E=>E.id===C?.contact?.userId)&&a.push({id:C?.contact?.userId,name:`${C?.contact?.name||C?.contact?.email}`,user:C?.contact})})})}),c)),this.componentConfigSignal().filters?.people?.length&&this.componentConfigSignal.update(c=>(c=I({},c),c.filters.people.forEach(p=>{e.find(u=>u.id===p?.id)||p?.id!=="other"&&e.push(p)}),c.filters.assigned.forEach(p=>{t.find(u=>u.id===p?.id)||p?.id!=="other"&&t.push(p)}),c.filters.tagged.forEach(p=>{r.find(u=>u.id===p?.id)||p?.id!=="other"&&r.push(p)}),c.filters.involved.forEach(p=>{a.find(u=>u.id===p?.id)||p?.id!=="other"&&a.push(p)}),c)),this.componentConfigSignal.update(c=>(c=T(I({},c),{peopleFilters:e,assignedFilters:t,taggedFilters:r,involvedFilters:a}),c)),this.componentConfigSignal().annotations?.length&&(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS)||(this.updateFilter({key:"people",value:null},!0),this.updateFilter({key:"assigned",value:null},!0),this.updateFilter({key:"tagged",value:null},!0),this.updateFilter({key:"involved",value:null},!0))),this.updatePeopleSelectedState()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setPeople: ",e)}}updatePeopleSelectedState(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.peopleFilters.forEach(t=>{let r=e.filters?.people?.find(a=>a.id===t?.id||a?.userId&&a?.userId===t?.user?.userId||a?.email&&a?.email===t?.user?.email);r?(t.selected=!0,r?.id||(r.id=t?.user?.userId)):t.selected=!1}),e.assignedFilters.forEach(t=>{let r=e.filters?.assigned?.find(a=>a.id===t?.id||a?.userId&&a?.userId===t?.user?.userId||a?.email&&a?.email===t?.user?.email);r?(t.selected=!0,r?.id||(r.id=t?.user?.userId)):t.selected=!1}),e.taggedFilters.forEach(t=>{let r=e.filters?.tagged?.find(a=>a.id===t?.id||a?.userId&&a?.userId===t?.user?.userId||a?.email&&a?.email===t?.user?.email);r?(t.selected=!0,r?.id||(r.id=t?.user?.userId)):t.selected=!1}),e.involvedFilters.forEach(t=>{let r=e.filters?.involved?.find(a=>a.id===t?.id||a?.userId&&a?.userId===t?.user?.userId||a?.email&&a?.email===t?.user?.email);r?(t.selected=!0,r?.id||(r.id=t?.user?.userId)):t.selected=!1}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updatePeopleSelectedState: ",e)}}updateFilterConfig(e){try{if(e){let t=this.componentConfigSignal().filters,r=JSON.parse(sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS));r||(r={}),Object.keys(e).forEach(a=>{e[a]?.type==="custom"&&(r[a]?(t[a]=r[a],t[a+"Ids"]=r[a+"Ids"]):(t[a]=[],t[a+"Ids"]=[]))}),this.componentConfigSignal.update(a=>{let s=I(I({},this.defaultFilterConfig),e);return a=T(I({},a),{filterConfig:s,filters:t}),a}),this.setFiltersToStorage()}else this.componentConfigSignal.update(t=>(t=T(I({},t),{filterConfig:JSON.parse(JSON.stringify(this.defaultFilterConfig))}),t));this.updateGroupByOptions(),this.filterCommentAnnotations()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent updateFilterConfig: ",t)}}updateGroupByOptions(){try{let e={};this.componentConfigSignal.update(r=>(r=I({},r),Object.keys(r.filterConfig).forEach(a=>{let s=r.filterConfig[a];s.enableGrouping&&(e[a]=s.name)}),r.groupByOptions=JSON.parse(JSON.stringify(e)),r));let t=!1;this.componentConfigSignal().groupBy&&Object.keys(this.componentConfigSignal().groupByOptions).forEach(r=>{this.componentConfigSignal().groupByOptions[r]===this.componentConfigSignal().groupBy&&(t=!0)}),(!this.componentConfigSignal().groupBy||!t)&&this.componentConfigSignal.update(r=>(r=T(I({},r),{groupBy:Object.values(r.groupByOptions)[0]}),r))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updateGroupByOptions: ",e)}}updateFilter(e,t=!1){let{key:r,value:a}=e;try{if(r)switch(r){case"statuses":if(t)this.componentConfigSignal.update(u=>(u=T(I({},u),{filters:T(I({},u.filters),{statuses:[],statusIds:[]})}),u)),this.resolvedCommentsOnDom=!0;else{let u=this.componentConfigSignal().filters?.statuses||[];u.find(C=>C.id===a.id)?this.componentConfigSignal.update(C=>(C=I({},C),C.filters.statuses=u.filter(E=>E.id!==a.id),C)):this.componentConfigSignal.update(C=>(C=I({},C),C.filters.statuses=[...u,a],C)),this.componentConfigSignal.update(C=>(C=T(I({},C),{filters:T(I({},C.filters),{statusIds:C.filters.statuses.map(E=>E?.id)})}),C))}break;case"pages":let s=this.componentConfigSignal().filters.pages||[];if(t)this.componentConfigSignal.update(u=>(u=T(I({},u),{filters:T(I({},u.filters),{pages:[]})}),u));else{let u=a?.id||a?.displayName;s.find(C=>C?.id===u||C?.displayName===u)?this.componentConfigSignal.update(C=>(C=I({},C),C.filters.pages=s.filter(E=>E?.id!==u&&E?.displayName!==u),C)):this.componentConfigSignal().filterConfig?.location?.multiSelection?this.componentConfigSignal.update(C=>(C=I({},C),C.filters.pages=[...s,a],C)):this.componentConfigSignal.update(C=>(C=I({},C),C.filters.pages=[a],C))}this.sortPageFilters(),this.updatePageSelectedState();break;case"documents":let c=this.componentConfigSignal().filters.documents||[];if(t)this.componentConfigSignal.update(u=>(u=T(I({},u),{filters:T(I({},u.filters),{documents:[]})}),u));else{let u=a?.id;c.find(C=>C?.id===u)?this.componentConfigSignal.update(C=>(C=I({},C),C.filters.documents=c.filter(E=>E?.id!==u),C)):this.componentConfigSignal.update(C=>(C=I({},C),C.filterConfig?.document?.multiSelection?C.filters.documents=[...c,a]:C.filters.documents=[a],C))}this.updateDocumentSelectedState();break;case"people":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.people||[];return t?u.filters.people=[]:C.find(E=>E?.id===a?.id)?u.filters.people=C.filter(E=>E?.id!==a?.id):u.filterConfig?.people?.multiSelection?u.filters.people=[...C,a]:u.filters.people=[a],u}),this.updatePeopleSelectedState();break;case"tagged":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.tagged||[];return t?u.filters.tagged=[]:C.find(E=>E?.id===a?.id)?u.filters.tagged=C.filter(E=>E?.id!==a?.id):u.filterConfig?.tagged?.multiSelection?u.filters.tagged=[...C,a]:u.filters.tagged=[a],u}),this.updatePeopleSelectedState();break;case"assigned":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.assigned||[];return t?u.filters.assigned=[]:C.find(E=>E?.id===a?.id)?u.filters.assigned=C.filter(E=>E?.id!==a?.id):u.filterConfig?.assigned?.multiSelection?u.filters.assigned=[...C,a]:u.filters.assigned=[a],u}),this.updatePeopleSelectedState();break;case"involved":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.involved||[];return t?u.filters.involved=[]:C.find(E=>E?.id===a?.id)?u.filters.involved=C.filter(E=>E?.id!==a?.id):u.filterConfig?.involved?.multiSelection?u.filters.involved=[...C,a]:u.filters.involved=[a],u}),this.updatePeopleSelectedState();break;case"categories":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.categories||[];return t?u.filters.categories=[]:C.find(E=>E.id===a.id)?u.filters.categories=C.filter(E=>E!==a):u.filterConfig?.category?.multiSelection?u.filters.categories=[...C,a]:u.filters.categories=[a],u.filters.categoryIds=u.filters.categories?.map(E=>E.id),u});break;case"priorities":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.priorities||[];return t?u.filters.priorities=[]:C.find(E=>E.id===a.id)?u.filters.priorities=C.filter(E=>E.id!==a.id):u.filterConfig?.priority?.multiSelection?u.filters.priorities=[...C,a]:u.filters.priorities=[a],u.filters.priorityIds=u.filters.priorities?.map(E=>E.id),u});break;case"accessModes":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.accessModes||[];return t?u.filters.accessModes=[]:C.find(E=>E===a.id)?u.filters.accessModes=C.filter(E=>E!==a.id):u.filterConfig?.commentType?.multiSelection?u.filters.accessModes=[...C,a.id]:u.filters.accessModes=[a.id],u});break;case"versions":this.componentConfigSignal.update(u=>{u=I({},u);let C=u.filters.versions||[];return t?u.filters.versions=[]:C.find(E=>E.id===a.id)?u.filters.versions=C.filter(E=>E.id!==a.id):u.filterConfig?.version?.multiSelection?u.filters.versions=[...C,a]:u.filters.versions=[a],u.filters.versionIds=u.filters.versions?.map(E=>E?.id),u});break;default:let p=r+"Ids";if(this.componentConfigSignal().filterConfig[r]?.type==="custom")if(t)this.componentConfigSignal.update(u=>(u=T(I({},u),{filters:T(I({},u.filters),{[r]:[],[p]:[]})}),u)),this.resolvedCommentsOnDom=!0;else{let u=this.componentConfigSignal().filters?.[r]||[];this.componentConfigSignal().filterConfig[r]?.multiSelection?u.find(C=>C.id===a.id)?this.componentConfigSignal.update(C=>(C=I({},C),C.filters[r]=u.filter(E=>E.id!==a.id),C)):this.componentConfigSignal.update(C=>(C=I({},C),C.filters[r]=[...u,a],C)):this.componentConfigSignal.update(C=>(C=I({},C),C.filters[r]=[a],C)),this.componentConfigSignal.update(C=>(C=T(I({},C),{filters:T(I({},C.filters),{[p]:C.filters[r].map(E=>E?.id)})}),C))}else this.componentConfigSignal.update(u=>(u=T(I({},u),{filters:T(I({},u.filters),{[r]:a})}),u));break}this.filterCommentAnnotations(),this.setFiltersToStorage()}catch(s){this.loggingService.catch("Error in CommentsSidebarComponent updateFilter: ",s)}}sortPageFilters(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.filters?.pages?.sort((t,r)=>t?.id===e.location?.location?.id?-1:r?.id===e.location?.location?.id?1:t?.displayName?.localeCompare(r?.displayName)),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent sortPageFilters: ",e)}}updateAnnotationCountsByFilter(){try{if(!this.componentConfigSignal().filterCount)return;this.setAnnotationsCountPerPage(),this.setAnnotationsCountPerDocument(),this.setAnnotationsCountPerStatus(),this.setAnnotationsCountPerPeople(),this.setAnnotationsCountPerVersion(),this.setAnnotationsCountPerPriority(),this.setAnnotationsCountPerCommentCategory(),this.setAnnotationsCountPerAccessMode()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updateAnnotationCountsByFilter: ",e)}}setAnnotationsCountPerPage(){try{this.componentConfigSignal().pages&&this.componentConfigSignal.update(e=>(e=I({},e),Object.values(e.pages).forEach(t=>{e.commentAnnotationsCountByFilters.page[t.id]=this.filterAnnotationsByPage(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerPage: ",e)}}setAnnotationsCountPerDocument(){try{this.componentConfigSignal().documents&&this.componentConfigSignal.update(e=>(e=I({},e),Object.values(e.documents).forEach(t=>{e.commentAnnotationsCountByFilters.document[t.id]=this.filterAnnotationsByDocument(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerDocument: ",e)}}setAnnotationsCountPerStatus(){try{let e=this.componentConfigSignal();[this.customFilterService.defaultStatus,...this.customFilterService.ongoingStatuses,this.customFilterService.resolvedStatus].forEach(t=>{e.commentAnnotationsCountByFilters.status[t.id]=this.filterAnnotationsByStatus(t,e.annotations)?.length}),this.componentConfigSignal.update(t=>(t=T(I({},t),{commentAnnotationsCountByFilters:I({},t.commentAnnotationsCountByFilters)}),t))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerStatus: ",e)}}setAnnotationsCountPerPeople(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.peopleFilters?.forEach(t=>{e.commentAnnotationsCountByFilters.people[t.id]=this.filterAnnotationsByPeople(t,e.annotations)?.length}),e.taggedFilters?.forEach(t=>{e.commentAnnotationsCountByFilters.tagged[t.id]=this.filterAnnotationsByTagged(t,e.annotations)?.length}),e.assignedFilters?.forEach(t=>{e.commentAnnotationsCountByFilters.assigned[t.id]=this.filterAnnotationsByAssigned(t,e.annotations)?.length}),e.involvedFilters?.forEach(t=>{e.commentAnnotationsCountByFilters.involved[t.id]=this.filterAnnotationsByInvolved(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerPerson: ",e)}}setAnnotationsCountPerPriority(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.priorities.forEach(t=>{e.commentAnnotationsCountByFilters.priority[t.id]=this.filterAnnotationsByPriority(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerPriority: ",e)}}setAnnotationsCountPerCommentCategory(){try{this.componentConfigSignal.update(e=>(e=I({},e),Object.values(e.commentCategoryMap).forEach(t=>{e.commentAnnotationsCountByFilters.commentCategory[t.id]=this.filterAnnotationsByCommentCategory(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerCommentCategory: ",e)}}setAnnotationsCountPerAccessMode(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.accessModes.forEach(t=>{e.commentAnnotationsCountByFilters.accessMode[t.id]=this.filterAnnotationsByAccessMode(t.id,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerAccessMode: ",e)}}setAnnotationsCountPerVersion(){try{this.componentConfigSignal.update(e=>(e=I({},e),e.versions.forEach(t=>{e.commentAnnotationsCountByFilters.version[t.id]=this.filterAnnotationsByVersion(t,e.annotations)?.length}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setAnnotationsCountPerVersion: ",e)}}filterCommentAnnotations(){try{let e=this.componentConfigSignal(),t=!1,r=e.annotations.slice(),a=[],s=e.systemFiltersOperator;s===xc.AND?a=e.annotations.slice():a=[],e.appliedFiltersCount=0;let c=!1,p=new Set,u=C=>{try{s===xc.AND?a=a.filter(E=>C.some(D=>D.annotationId===E.annotationId)):C.forEach(E=>{p.add(E.annotationId)}),c=!0}catch{}};if(e.enablePriority&&e.filterConfig?.priority?.enable&&e.filters.priorities?.length){let C=[];e.filters.priorities?.forEach(E=>{C=[...C,...this.filterAnnotationsByPriority(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.location?.enable&&e.filters.pages?.length){let C=[];e.filters.pages?.forEach(E=>{C=[...C,...this.filterAnnotationsByPage(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filters.documents?.length){let C=[];e.filters.documents?.forEach(E=>{C=[...C,...this.filterAnnotationsByDocument(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.people?.enable&&e.filters.people?.length){let C=[];e.filters.people?.forEach(E=>{C=[...C,...this.filterAnnotationsByPeople(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.tagged?.enable&&e.filters.tagged?.length){let C=[];e.filters.tagged?.forEach(E=>{C=[...C,...this.filterAnnotationsByTagged(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.assigned?.enable&&e.filters.assigned?.length){let C=[];e.filters.assigned?.forEach(E=>{C=[...C,...this.filterAnnotationsByAssigned(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.involved?.enable&&e.filters.involved?.length){let C=[];e.filters.involved?.forEach(E=>{C=[...C,...this.filterAnnotationsByInvolved(E,r)]}),u(C),e.appliedFiltersCount++}if(e.enableAutoCategorize&&e.filterConfig?.category?.enable&&e.filters.categories?.length){let C=[];e.filters.categories?.forEach(E=>{C=[...C,...this.filterAnnotationsByCommentCategory(E,r)]}),u(C),e.appliedFiltersCount++}if(e.isUserAdmin&&e.filterConfig?.commentType?.enable&&e.filters.accessModes?.length){let C=[];e.filters.accessModes?.forEach(E=>{C=[...C,...this.filterAnnotationsByAccessMode(E,r)]}),u(C),e.appliedFiltersCount++}if(e.filterConfig?.version?.enable&&e.filters.versions?.length){let C=[];e.filters.versions?.forEach(E=>{C=[...C,...this.filterAnnotationsByVersion(E,r)]}),u(C),e.appliedFiltersCount++}if(e.enableStatus&&e.filters.statuses?.length){let C=[];e.filters.statuses?.forEach(E=>{E.id===this.customFilterService.resolvedStatus.id&&(t=!0),C=[...C,...this.filterAnnotationsByStatus(E,r)]}),u(C),e?.filterConfig?.status?.enable&&e.appliedFiltersCount++}if(s!==xc.AND&&(c?a=r.filter(C=>p.has(C.annotationId)):a=r),e.filters.input&&(a=this.filterAnnotationsByInput(e.filters.input,a)),e.minimalFilter&&(!t&&e.minimalFilter==="resolved"&&(a=e.annotations.slice()),a=a.filter(C=>{switch(e.minimalFilter){case"all":return!t&&!this.resolvedCommentsOnDom?C.status?.id!==this.customFilterService.resolvedStatus.id:!0;case"read":return!this.componentConfigSignal().unreadCommentsMap?.[C.annotationId]&&C.status?.id!==this.customFilterService.resolvedStatus.id;case"unread":return!!this.componentConfigSignal().unreadCommentsMap?.[C.annotationId]&&C.status?.id!==this.customFilterService.resolvedStatus.id||!!this.componentConfigSignal().selectedAnnotationsMap[C.annotationId];case"resolved":return C.status?.id===this.customFilterService.resolvedStatus.id;default:return!0}})),this.componentConfigSignal.update(C=>(C=T(I(I({},C),e),{filteredCommentPinAnnotations:a}),C)),!this.commentService.getSidebarCustomActionsValue()){let C=this.componentConfigSignal().embedMode||this.componentConfigSignal().sidebarVisible;this.commentService.setCommentsFromSidebarMap({comments:this.componentConfigSignal().skeletonLoading?void 0:a,sidebarVisible:!!C}),this.componentConfigSignal.update(E=>(E=I({},E),E.filteredCommentAnnotationsCount=a?.length||0,E))}this.groupFilteredCommentAnnotations(),this.componentConfigSignal().sortData||this.sortComments(this.componentConfigSignal().selectedMinimalFilterDropdownOption.sorting)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent filterCommentAnnotations: ",e)}}toggleGroupedCommentAnnotations(e){try{e.isExpanded=!e.isExpanded,this.commentService.getSidebarCustomActionsValue()?(this.componentConfigSignal.update(t=>(t=I({},t),t)),this.updateVirtualScrollDataGroupToggle(this.componentConfigSignal().virtualScrollData)):this.setSidebarGroupedAnnotationsData()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent toggleGroupedCommentAnnotations: ",t)}}changeGroupBy(e){try{this.componentConfigSignal.update(t=>(t=I({},t),e?e===t.groupBy?t.groupBy=null:t.groupBy=e:t.groupBy=null,t)),sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_GROUP_BY,this.componentConfigSignal().groupBy||""),this.groupFilteredCommentAnnotations()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent changeGroupBy: ",t)}}groupFilteredCommentAnnotations(){try{let e=this.filteredGroupedCommentAnnotationsObj,t=this.componentConfigSignal(),r=t.systemFiltersOperator===xc.AND;switch(t.groupBy){case t.groupByOptions.people:let a=t.filters.people?.length&&r?t.filters.people:t.peopleFilters;this.filteredGroupedCommentAnnotationsObj={},a.forEach(W=>{let J=this.filterAnnotationsByPeople(W,this.componentConfigSignal().filteredCommentPinAnnotations),ue=t.user?.userId===W.id;J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:ue?"Me":W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],t.peopleFilters.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])});break;case t.groupByOptions.assigned:let s=t.filters.assigned?.length&&r?t.filters.assigned:t.assignedFilters;this.filteredGroupedCommentAnnotationsObj={},s.forEach(W=>{let J=this.filterAnnotationsByAssigned(W,this.componentConfigSignal().filteredCommentPinAnnotations),ue=t.user?.userId===W.id;J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:ue?"Me":W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],t.assignedFilters.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])});break;case t.groupByOptions.tagged:let c=t.filters.tagged?.length&&r?t.filters.tagged:t.taggedFilters;this.filteredGroupedCommentAnnotationsObj={},c.forEach(W=>{let J=this.filterAnnotationsByTagged(W,this.componentConfigSignal().filteredCommentPinAnnotations),ue=t.user?.userId===W.id;J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:ue?"Me":W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],t.taggedFilters.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])});break;case t.groupByOptions.involved:let p=t.filters.involved?.length&&r?t.filters.involved:t.involvedFilters;this.filteredGroupedCommentAnnotationsObj={},p.forEach(W=>{let J=this.filterAnnotationsByInvolved(W,this.componentConfigSignal().filteredCommentPinAnnotations),ue=t.user?.userId===W.id;J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:ue?"Me":W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],t.involvedFilters.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])});break;case t.groupByOptions.page:case t.groupByOptions.location:t=this.componentConfigSignal();let u=t.filters.pages?.length&&r?t.filters.pages:Object.values(t.pages||{});u?.sort((W,J)=>W?.id===t.location?.location?.id||!t.location?.location?.id&&W?.id==="other"?-1:J?.id===t.location?.location?.id||!t.location?.location?.id&&J?.id==="other"?1:0),this.filteredGroupedCommentAnnotationsObj={},u.forEach(W=>{let J=W?.id===t?.location?.location?.id||W?.id==="other"&&!t?.location?.location?.id;this.locations&&Object.keys(this.locations||{}).forEach(ye=>{let Ie=this.locations[ye]?.location;Ie?.id&&Ie?.id===W?.id&&(J=!0)});let ue=this.filterAnnotationsByPage(W,this.componentConfigSignal().filteredCommentPinAnnotations);if((W.id||W?.displayName)&&ue?.length){let ye=W.id||W?.displayName||"";this.filteredGroupedCommentAnnotationsObj[ye]={displayName:W.displayName,annotations:ue,isExpanded:e[ye]?e[ye]?.isExpanded:!!J}}}),this.filteredGroupedCommentAnnotations=[];let C=t?.filterConfig?.location?.order||[];if(C?.length){let W=J=>{let ue=C.indexOf(J?.id);return ue===-1?1/0:ue};u.sort((J,ue)=>{let ye=W(J),Ie=W(ue);return ye!==Ie?ye-Ie:u.indexOf(J)-u.indexOf(ue)})}u.forEach(W=>{let J=W.id||W?.displayName||"";J&&this.filteredGroupedCommentAnnotationsObj[J]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[J])}),this.componentConfigSignal.update(W=>(W=I(I({},W),t),W));break;case t.groupByOptions.priority:let E=t.filters.priorities?.length&&r?t.filters.priorities:t.priorities;this.filteredGroupedCommentAnnotationsObj={},E.forEach(W=>{let J=this.filterAnnotationsByPriority(W,this.componentConfigSignal().filteredCommentPinAnnotations);J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],t.priorities.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])}),this.componentConfigSignal.update(W=>(W=I(I({},W),t),W));break;case t.groupByOptions.category:let D=t.filters.categories?.length&&r?t.filters.categories:Object.values(t.commentCategoryMap||{});this.filteredGroupedCommentAnnotationsObj={},D.forEach(W=>{let J=this.filterAnnotationsByCommentCategory(W,this.componentConfigSignal().filteredCommentPinAnnotations);J?.length&&(this.filteredGroupedCommentAnnotationsObj[W.id]={displayName:W.name,annotations:J,isExpanded:e[W.id]?e[W.id]?.isExpanded:!0})}),this.filteredGroupedCommentAnnotations=[],D.forEach(W=>{this.filteredGroupedCommentAnnotationsObj[W.id]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[W.id])}),this.componentConfigSignal.update(W=>(W=I(I({},W),t),W));break;case t.groupByOptions.document:t=this.componentConfigSignal();let L=t.filters.documents?.length&&r?t.filters.documents:Object.values(t.documents||{});L?.sort((W,J)=>W?.id===t.currentDocument?-1:J?.id===t.currentDocument?1:0),this.filteredGroupedCommentAnnotationsObj={},L.forEach(W=>{let J=W?.id===t?.currentDocument,ue=this.filterAnnotationsByDocument(W,this.componentConfigSignal().filteredCommentPinAnnotations);if(W.id&&ue?.length){let ye=W.id||"";this.filteredGroupedCommentAnnotationsObj[ye]={displayName:W.documentName||W.id||"",annotations:ue,isExpanded:e[ye]?e[ye]?.isExpanded:!!J}}}),this.filteredGroupedCommentAnnotations=[];let z=t?.filterConfig?.document?.order||[];if(z?.length){let W=J=>{let ue=z.indexOf(J?.id);return ue===-1?1/0:ue};L.sort((J,ue)=>{let ye=W(J),Ie=W(ue);return ye!==Ie?ye-Ie:L.indexOf(J)-L.indexOf(ue)})}L.forEach(W=>{let J=W.id;J&&this.filteredGroupedCommentAnnotationsObj[J]&&this.filteredGroupedCommentAnnotations.push(this.filteredGroupedCommentAnnotationsObj[J])}),this.componentConfigSignal.update(W=>(W=I(I({},W),t),W));break;default:this.filteredGroupedCommentAnnotationsObj={},this.filteredGroupedCommentAnnotationsObj={[this.pageTypes.all]:{displayName:this.pageTypes.all,annotations:this.componentConfigSignal().filteredCommentPinAnnotations,isExpanded:e[this.pageTypes.all]?e[this.pageTypes.all]?.isExpanded:!0}},this.filteredGroupedCommentAnnotations=[this.filteredGroupedCommentAnnotationsObj[this.pageTypes.all]];break}this.setSidebarGroupedAnnotationsData()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent groupFilteredCommentAnnotations: ",e)}}setSidebarGroupedAnnotationsData(){try{if(this.commentService.getSidebarCustomActionsValue()){if(this.commentService.getSidebarCustomActionsValue()&&this.dataAvailable){let e={};Object.keys(this.componentConfigSignal().filterConfig||{}).forEach(t=>{this.componentConfigSignal().filterConfig[t]?.type==="custom"&&(e[t]=this.componentConfigSignal().filterConfig[t]?.options?.map(r=>({id:r.id,name:r.name,selected:this.componentConfigSignal().filters[t+"Ids"]?.includes(r.id)})))}),this.componentConfigSignal.update(t=>(t=T(I({},t),{customFilters:e}),t)),this.commentService.getSidebarCustomActionEventDataOnInitValue()?this.commentService.setSidebarCustomActionEventDataAllChanges(this.componentConfigSignal().customActionsState,this.componentConfigSignal().annotations,this.componentConfigSignal().unreadCommentsMap,this.componentConfigSignal().filteredCommentPinAnnotations,e):this.commentService.setSidebarCustomActionEventDataOnInit(this.componentConfigSignal().customActionsState,this.componentConfigSignal().annotations,this.componentConfigSignal().unreadCommentsMap,this.componentConfigSignal().filteredCommentPinAnnotations,e)}}else{let e=this.filteredGroupedCommentAnnotations.length===1&&this.filteredGroupedCommentAnnotations[0].displayName==="Others";this.componentConfigSignal.update(r=>(r=I({},r),r.virtualScrollData=[],r)),this.filteredGroupedCommentAnnotations.forEach(r=>{!e&&r.annotations?.length&&this.componentConfigSignal.update(a=>(a=I({},a),a.virtualScrollData.push({type:"group",data:r}),a)),(r.isExpanded||e)&&r.annotations.forEach(a=>{this.componentConfigSignal.update(s=>(s=I({},s),s.virtualScrollData.push({type:"annotation",data:a}),s))})}),this.componentConfigSignal.update(r=>(r=T(I({},r),{noCommentsFoundForAppliedFilters:!this.componentConfigSignal().virtualScrollData?.length}),r)),this.cd.markForCheck();let t=this.componentConfigSignal().virtualScrollViewportRef?.elementRef?.nativeElement;t&&(t.scrollTop=0)}}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setSidebarGroupedAnnotationsData: ",e)}}filterAnnotationsByPage(e,t){try{return t?.filter(r=>e?.locationIds?.length?r?.locationId?r?.location?.id===e?.id||e?.locationIds?.includes(r?.locationId):r?.documentParams?.id===e?.id||e?.locationIds?.includes(r?.documentParamsId):!r?.locationId&&!r?.documentParamsId)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByPage: ",r),[]}}filterAnnotationsByStatus(e,t){try{return t.filter(r=>r?.status?.id===e.id)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByStatus: ",r),[]}}filterAnnotationsByPeople(e,t){try{return e.id?t.filter(r=>r?.from?.userId===e?.id||r?.from?.email===e?.id):t}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByPeople: ",r),[]}}filterAnnotationsByTagged(e,t){try{return e.id===this.componentConfigSignal().user?.userId?t.filter(r=>{let a=!1;return r.comments.forEach(s=>{s.taggedUserContacts?.forEach(c=>{c?.contact?.userId===this.componentConfigSignal().user?.userId&&(a=!0)})}),a}):t.filter(r=>r?.comments?.some(a=>a?.taggedUserContacts?.some(s=>s?.contact?.userId===e?.id)))}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByTagged: ",r),[]}}filterAnnotationsByAssigned(e,t){try{return e.id===this.componentConfigSignal().user?.userId?t.filter(r=>r?.assignedTo?.userId===this.componentConfigSignal().user?.userId):t.filter(r=>r?.assignedTo?.userId===e?.id)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByAssigned: ",r),[]}}filterAnnotationsByInvolved(e,t){try{return t.filter(r=>{let a=r?.from?.userId===e?.id||r?.from?.email===e?.id,s=r?.assignedTo?.userId===e?.id,c=r?.comments?.some(p=>p?.taggedUserContacts?.some(u=>u?.contact?.userId===e?.id));return a||s||c})}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByInvolved: ",r),[]}}filterAnnotationsByPriority(e,t){try{return e.id==="unset"?t.filter(r=>!r?.priority):t.filter(r=>r?.priority?.id===e.id)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByPriority: ",r),[]}}filterAnnotationsByCommentCategory(e,t){try{switch(e?.id){case"other":return t?.filter(r=>!r?.commentCategories?.length||r?.commentCategories?.find(a=>a?.id===e?.id))}return t?.filter(r=>(r?.commentCategories||[])?.find(a=>a?.id===e?.id))}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByCommentCategory: ",r),[]}}filterAnnotationsByAccessMode(e,t){try{return e===io.PRIVATE?t.filter(r=>r?.iam?.accessMode===io.PRIVATE):t.filter(r=>!r?.iam?.accessMode||r?.iam?.accessMode===io.PUBLIC)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByAccessMode: ",r),[]}}filterAnnotationsByVersion(e,t){try{return e.id==="unset"?t.filter(r=>!r?.location?.version):t.filter(r=>r?.location?.version?.id===e.id)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByVersion: ",r),[]}}filterAnnotationsByInput(e,t){try{return t.filter(r=>{let a=!1;for(let s=0;s<r?.comments?.length;s++){let c=r?.comments[s];if(c?.commentText?.toLowerCase().includes(e.toLowerCase())){a=!0;break}else if(c?.from?.name?.toLowerCase().includes(e.toLowerCase())){a=!0;break}}return a})}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByInput: ",r),[]}}closeSidebar(){try{this.commentService.setSidebarVisibility(!1,!1,!0),this.onSidebarClose.emit()}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent closeSidebar: ",e)}}emitOnSidebarCommentClick(e){try{let t=this.documentPaths?.clientDocumentId,r=e?.location;r||(r=e?.documentParams);let a={};e.context&&(a=e.context),this.onSidebarCommentClick.emit({documentId:t,location:r,targetElementId:e?.targetElementId,context:a,annotation:e}),this.onSidebarCommentClickEvent.emit({documentId:t,location:r,targetElementId:e?.targetElementId,context:a,annotation:e}),this.onCommentClick.emit({documentId:t,location:r,targetElementId:e?.targetElementId,context:a,annotation:e}),this.commentService.onSidebarCommentClick({documentId:t,location:r,targetElementId:e?.targetElementId,context:a,annotation:e})}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent onSidebarCommentClick: ",t)}}emitOnCommentNavigationButtonClick(e){try{let t=this.documentPaths?.clientDocumentId,r=e?.location;r||(r=e?.documentParams);let a={};e.context&&(a=e.context),this.onCommentNavigationButtonClick.emit({documentId:t,location:r,targetElementId:e?.targetElementId,context:a,annotation:e})}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent emitOnCommentNavigationButtonClick: ",t)}}setFiltersToStorage(){try{let e=JSON.parse(JSON.stringify(this.componentConfigSignal().filters));delete e?.input;let t=JSON.stringify(e);sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_SIDEBAR_FILTERS,t)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setFiltersToStorage: ",e)}}setCommentSidebarInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Xu.COMMENT_SIDEBAR)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setCommentSidebarInstalledInAnalytics: ",e)}}setCommentSidebarEmbedModeInAnalytics(){try{this.componentConfigSignal().embedMode&&this.analyticsService.trackEvent(Z.Events.Comments.COMMENT_SIDEBAR_EMBED_MODE_ENABLED,{commentMode:this.commentService.getCommentMode()})}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setCommentSidebarEmbedModeInAnalytics: ",e)}}setCommentSidebarFloatingModeInAnalytics(){try{this.componentConfigSignal().floatingMode&&this.analyticsService.trackEvent(Z.Events.Comments.COMMENT_SIDEBAR_FLOATING_MODE_ENABLED,{commentMode:this.commentService.getCommentMode()})}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setCommentSidebarFloatingModeInAnalytics: ",e)}}setCommentReadInAnalytics(){try{this.loggingService.log("%c[WB] Calling FUNCTION: setCommentReadInAnalytics","color: green;"),this.commentReadAnalyticsCalled||(this.commentReadAnalyticsCalled=!0,this.analyticsService.trackEvent(Z.Events.Comments.COMMENT_READ,{uiLocation:"sidebar",commentMode:this.commentService.getCommentMode(),readType:"hover"}))}catch(e){this.loggingService.catch("Error in CommentDialogComponent setCommentReadInAnalytics: ",e)}}toggleMoreFilters(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{moreFiltersVisible:!t.moreFiltersVisible}),t)),e&&e?.scrollTo({top:0})}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent toggleMoreFilters: ",t)}}closeMoreFilters(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{moreFiltersVisible:!1,filterRecentlyClosed:!0}),t)),e&&e?.scrollTo({top:0}),setTimeout(()=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{filterRecentlyClosed:!1}),t))},100)}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent closeMoreFilters: ",t)}}openMoreFilters(e){try{if(this.componentConfigSignal().filterRecentlyClosed)return;this.componentConfigSignal.update(t=>(t=T(I({},t),{moreFiltersVisible:!0}),t)),e&&e?.scrollTo({top:0})}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent openMoreFilters: ",t)}}savePageComment(e){try{let t=e?.updatedComment;t&&this.commentService.addComment(void 0,void 0,void 0,void 0,!0,[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,e?.annotation?.assignedTo),this.componentConfigSignal.update(r=>(r=I({},r),r.pageCommentAnnotation=new Bo,r.pageCommentAnnotation.isPageAnnotation=!0,r))}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent savePageComment: ",t)}}sortComments(e){try{this.componentConfigSignal.update(t=>{let r=[...t.virtualScrollData];return r.sort((a,s)=>{if(a.type==="annotation"&&s.type==="annotation"){if(e==="date"){let c=new Date(a.data.lastUpdated).getTime();return new Date(s.data.lastUpdated).getTime()-c}else if(e==="unread"){let c=t.unreadCommentsMap?.[a.data.annotationId]||0,p=t.unreadCommentsMap?.[s.data.annotationId]||0;if(c>0&&p===0)return-1;if(c===0&&p>0)return 1;let u=new Date(a.data.lastUpdated).getTime();return new Date(s.data.lastUpdated).getTime()-u}}return 0}),t=T(I({},t),{virtualScrollData:r}),t}),this.componentConfigSignal.update(t=>(t=T(I({},t),{selectedMinimalFilterDropdownOption:T(I({},t.selectedMinimalFilterDropdownOption),{sorting:e})}),t))}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent sortComments: ",t)}}toggleMinimalFilterDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{minimalFilterDropdownOpen:!e.minimalFilterDropdownOpen}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent toggleMinimalFilterDropdown: ",e)}}filterCommentsByReadStatus(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{minimalFilter:e,selectedMinimalFilterDropdownOption:T(I({},t.selectedMinimalFilterDropdownOption),{filter:e})}),t)),this.filterCommentAnnotations()}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent filterCommentsByReadStatus: ",t)}}resetFilters(){try{this.componentConfigSignal.update(e=>{let t=e.filters;return Object.keys(t).forEach(r=>{t[r]?.length&&(t[r]=[])}),e=T(I({},e),{minimalFilter:"all",customActionsState:{all:!0},filters:T(I({},t),{input:""}),selectedMinimalFilterDropdownOption:T(I({},e.selectedMinimalFilterDropdownOption),{filter:"all"})}),e}),this.resolvedCommentsOnDom=!1,this.filterCommentsByReadStatus("all"),this.updateFilter({key:"pages",value:null},!0),this.updateFilter({key:"documents",value:null},!0),this.updateFilter({key:"people",value:null},!0),this.updateFilter({key:"assigned",value:null},!0),this.updateFilter({key:"tagged",value:null},!0),this.updateFilter({key:"statuses",value:null},!0),this.updateFilter({key:"priorities",value:null},!0),this.updateFilter({key:"categories",value:null},!0),this.updateFilter({key:"versions",value:null},!0),sessionStorage.removeItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent resetFilters: ",e)}}toggleLocationFilterDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{locationFilterDropdownOpen:!e.locationFilterDropdownOpen}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent toggleLocationFilterDropdown: ",e)}}toggleDocumentFilterDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{documentFilterDropdownOpen:!e.documentFilterDropdownOpen}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent toggleDocumentFilterDropdown: ",e)}}closeDocumentFilterDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{documentFilterDropdownOpen:!1}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent closeDocumentFilterDropdown: ",e)}}toggleMinimalActionsDropdown(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{minimalActionsDropdownOpen:!e.minimalActionsDropdownOpen}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent toggleMinimalActionsDropdown: ",e)}}markAllCommentAnnotationsAsRead(){try{this.commentService.setCommentAnnotationsAsRead(this.componentConfigSignal().filteredCommentPinAnnotations)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent setCommentAnnotationsAsRead: ",e)}}markAllCommentAnnotationsAsResolved(){try{this.commentService.setCommentAnnotationsAsResolved(this.componentConfigSignal().filteredCommentPinAnnotations)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent markAllCommentAnnotationsAsResolved: ",e)}}toggleCustomAction(e,t){try{t==="toggle"?(this.componentConfigSignal.update(r=>(r=T(I({},r),{customActionsState:{[e]:!r.customActionsState[e]}}),r)),sessionStorage.setItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE,JSON.stringify(this.componentConfigSignal().customActionsState)),this.commentService.setSidebarCustomActionEventData(this.componentConfigSignal().customActionsState,this.componentConfigSignal().annotations,this.componentConfigSignal().unreadCommentsMap,this.componentConfigSignal().filteredCommentPinAnnotations,this.componentConfigSignal().customFilters)):(this.commentService.setSidebarCustomActionEventData({[e]:!0},this.componentConfigSignal().annotations,this.componentConfigSignal().unreadCommentsMap,this.componentConfigSignal().filteredCommentPinAnnotations,this.componentConfigSignal().customFilters),sessionStorage.setItem(j.SESSION_STORAGE.VELT_COMMENT_SIDEBAR_CUSTOM_ACTIONS_STATE,JSON.stringify({[e]:!0})))}catch(r){this.loggingService.catch("Error in CommentsSidebarComponent toggleCustomAction: ",r)}}goBackToAllComments(){try{let e=this.componentConfigSignal().focusedAnnotation;this.componentConfigSignal.update(t=>(t=T(I({},t),{focusedAnnotation:null}),t)),e&&setTimeout(()=>{this.goToAnnotationInSidebar(e,"instant")},100)}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent goBackToAllComments: ",e)}}filterSearch(e,t){try{let r=this.componentConfigSignal();if(!r?.peopleFilters)return;let a,s;switch(t){case"people":a=r.peopleFilters,!e||e===""?s=a:s=a.filter(c=>c?.name?.toLowerCase().includes(e.toLowerCase()));break;case"assigned":a=r.assignedFilters,!e||e===""?s=a:s=a.filter(c=>c?.name?.toLowerCase().includes(e.toLowerCase()));break;case"tagged":a=r.taggedFilters,!e||e===""?s=a:s=a.filter(c=>c?.name?.toLowerCase().includes(e.toLowerCase()));break;case"involved":a=r.involvedFilters,!e||e===""?s=a:s=a.filter(c=>c?.name?.toLowerCase().includes(e.toLowerCase()));break;case"pages":a=r.pages,!e||e===""?s=r.pages:(s={},Object.keys(a).filter(p=>p.toLowerCase().includes(e.toLowerCase())).forEach(p=>{s[p]=a[p]}));break;case"documents":a=r.documents,!e||e===""?s=r.documents:(s={},Object.keys(a).filter(p=>a[p]?.documentName?.toLowerCase().includes(e.toLowerCase())).forEach(p=>{s[p]=a[p]}));break;case"statuses":a=r.statuses,!e||e===""?s=a:s=a.filter(c=>c.name.toLowerCase().includes(e.toLowerCase()));break;case"priorities":a=r.priorities,!e||e===""?s=a:s=a.filter(c=>c.name.toLowerCase().includes(e.toLowerCase()));break;case"categories":a=r.commentCategoryMap,!e||e===""?s=r.commentCategoryMap:(s={},Object.keys(a).filter(p=>p.toLowerCase().includes(e.toLowerCase())).forEach(p=>{s[p]=a[p]}));break;case"versions":a=r.versions,!e||e===""?s=r.versions:s=a.filter(c=>c.name.toLowerCase().includes(e.toLowerCase()));break;default:a=r.filterConfig[t]?.options,!e||e===""?s=r.filterConfig[t]?.options:s=a?.filter(c=>c.name.toLowerCase().includes(e.toLowerCase()));break}return s}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterPeople: ",r),[]}}updateDocumentSelectedState(){try{this.componentConfigSignal.update(e=>(e=I({},e),Object.values(e.documents).forEach(t=>{let r=e.filters?.documents?.find(a=>a.id===t?.id);r?(t.selected=!0,r.documentName||(r.documentName=t.documentName)):t.selected=!1}),e))}catch(e){this.loggingService.catch("Error in CommentsSidebarComponent updateDocumentSelectedState: ",e)}}filterAnnotationsByDocument(e,t){try{return t?.filter(r=>e?.id&&e.id!=="other"?r?.metadata?.clientDocumentId?.toString()===e.id:!r?.metadata?.clientDocumentId)}catch(r){return this.loggingService.catch("Error in CommentsSidebarComponent filterAnnotationsByDocument: ",r),[]}}onDialogExpanded(e){try{setTimeout(()=>{let t=this.componentConfigSignal().annotations.find(r=>r.annotationId===e);t&&this.goToAnnotationInSidebar(t)},200)}catch(t){this.loggingService.catch("Error in CommentsSidebarComponent onDialogExpanded: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(we),h(Ft),h(Be),h(st),h(R),h(fn),h(y),h(fo),h(Zo),h(dl),h(Jt),h(ze),h(Ji),h(S_),h(qe))},o.\u0275cmp=O({type:o,selectors:[["app-comments-sidebar"]],viewQuery:function(t,r){if(t&1&&(nt(GZt,5),nt(WZt,7)),t&2){let a;Xe(a=Qe())&&(r.sidebarOverlay=a.first),Xe(a=Qe())&&(r.hostElement=a.first)}},hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{embedMode:"embedMode",floatingMode:"floatingMode",_pageMode:[0,"pageMode","_pageMode"],_filterCount:[0,"filterCount","_filterCount"],_customActions:[0,"customActions","_customActions"],focusedThreadMode:"focusedThreadMode",_sortData:[0,"sortData","_sortData"],enableUrlNavigation:"enableUrlNavigation",urlNavigation:"urlNavigation",_queryParamsComments:[0,"queryParamsComments","_queryParamsComments"],_currentLocationSuffix:[0,"currentLocationSuffix","_currentLocationSuffix"],_filterOptionLayout:[0,"filterOptionLayout","_filterOptionLayout"],_filterConfig:[0,"filterConfig","_filterConfig"],_groupConfig:[0,"groupConfig","_groupConfig"],_filters:[0,"filters","_filters"],_systemFiltersOperator:[0,"systemFiltersOperator","_systemFiltersOperator"],_excludeLocationIds:[0,"excludeLocationIds","_excludeLocationIds"],_fullExpanded:[0,"fullExpanded","_fullExpanded"],_sidebarButtonCountType:[0,"sidebarButtonCountType","_sidebarButtonCountType"],_filterGhostCommentsInSidebar:[0,"filterGhostCommentsInSidebar","_filterGhostCommentsInSidebar"],dialogVariant:"dialogVariant",focusedThreadDialogVariant:"focusedThreadDialogVariant",filterPanelLayout:"filterPanelLayout",pageModeComposerVariant:"pageModeComposerVariant",searchPlaceholder:"searchPlaceholder",_sidebarShadowDOM:[0,"shadowDom","_sidebarShadowDOM"],variant:"variant",position:"position"},outputs:{openSidebar:"openSidebar",onSidebarOpen:"onSidebarOpen",onSidebarCommentClick:"sidebarCommentClick",onSidebarCommentClickEvent:"onSidebarCommentClick",onCommentClick:"onCommentClick",onSidebarClose:"onSidebarClose",onCommentNavigationButtonClick:"onCommentNavigationButtonClick"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[["sidebarRef",""],["defaultSidebarMode",""],["sidebarTrigger","cdkOverlayOrigin"],["sidebarOverlay","cdkConnectedOverlay"],[4,"ngIf"],[3,"ngIf"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["cdkOverlayOrigin",""],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass"],["class","velt-comments-sidebar-container",3,"dark",4,"ngIf"],[1,"velt-comments-sidebar-container"],["role","dialog",3,"onWrapperClick","componentConfigSignal","template","darkMode"]],template:function(t,r){t&1&&g(0,oXt,4,1,"ng-container",4),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,_t,on,en,gn,O0e,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%} .snippyly-sidebar-panel .viewport .cdk-virtual-scroll-content-wrapper{max-width:100%}.s-overflow-hidden[_ngcontent-%COMP%]{overflow:hidden}"],changeDetection:0});let i=o;return i})();function rXt(i,o){if(i&1&&(_(0,"snippyly-cursor-pointer",5)(1,"slot",6),le(),_(2,"svg",7)(3,"g",8),w(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),w(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),i&2){let n=l().$implicit,e=l(2).ngIf,t=l();d("cursorUser",n)("avatarMode",t.avatarMode)("huddleState",e.huddleOnCursorModeByAttendeeId[n==null?null:n.userSnippylyId]?e.attendeesByUserId[n==null?null:n.userSnippylyId]==null?null:e.attendeesByUserId[n==null?null:n.userSnippylyId].state:void 0)("stream",e.huddleOnCursorModeByAttendeeId[n==null?null:n.userSnippylyId]?e.remoteStreamsByUserId[n==null?null:n.userSnippylyId]==null?null:e.remoteStreamsByUserId[n==null?null:n.userSnippylyId].webcam:void 0),m(4),x("fill",n.color),m(),x("fill",n.color)}}function aXt(i,o){if(i&1&&(f(0),g(1,rXt,15,6,"snippyly-cursor-pointer",4),v()),i&2){let n=o.$implicit;m(),d("ngIf",n==null?null:n.position)}}function sXt(i,o){if(i&1&&(_(0,"snippyly-cursor-pointer",19)(1,"slot",6),le(),_(2,"svg",7)(3,"g",8),w(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),w(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),i&2){let n=l(2).ngIf,e=l();d("cursorUser",n.currentCursorUser)("selfCursorPointer",!0)("avatarMode",e.avatarMode)("huddleState",n.huddleOnCursorMode?n.attendeesByUserId[n.currentCursorUser==null?null:n.currentCursorUser.userSnippylyId]==null?null:n.attendeesByUserId[n.currentCursorUser==null?null:n.currentCursorUser.userSnippylyId].state:void 0)("stream",n.localStream),m(4),x("fill",n.currentCursorUser.color),m(),x("fill",n.currentCursorUser.color)}}function lXt(i,o){if(i&1&&g(0,aXt,2,1,"ng-container",2)(1,sXt,15,7,"snippyly-cursor-pointer",3),i&2){let n=l().ngIf,e=l();d("ngForOf",n.cursorUsers)("ngForTrackBy",e.trackById),m(),d("ngIf",n.huddleJoined&&n.huddleOnCursorMode&&n.currentCursorUser)}}function cXt(i,o){if(i&1&&(f(0),g(1,lXt,2,3,"ng-template",1),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.isFirstComponent&&!(n.user!=null&&n.user.isAnonymous))}}var Yz=(()=>{let o=class o{get inactivityTime(){return this._inactivityTime}set inactivityTime(e){try{isNaN(e)?this.loggingService.catch("Error in Cursor set inactivityTime: ","inactivity-time value is not a number."):(this._inactivityTime=e,this.cursorService.setInactivityTime(this._inactivityTime))}catch(t){this.loggingService.catch("Error in Cursor set inactivityTime: ",t)}}get allowedElementIds(){return this._allowedElementIds}set allowedElementIds(e){try{this._allowedElementIds=typeof e=="string"?JSON.parse(e):e,this.cursorService.setAllowedElementIds(this._allowedElementIds)}catch(t){this.loggingService.catch("Error in Cursor set allowedElementIds: ",t)}}constructor(e,t,r,a,s,c){this.analyticsService=e,this.authService=t,this.cursorService=r,this.domService=a,this.huddleService=s,this.loggingService=c,this.avatarMode=!1,this.onCursorUsersChanged=new Pe,this.onCursorUserChange=new Pe,this.subscriptions=[],this.constants=j,this.showInitials={},this.componentConfigSignal=De({isFirstComponent:!1,user:void 0,cursorUsers:[],huddleOnCursorModeByAttendeeId:{},attendeesByUserId:{},remoteStreamsByUserId:{},huddleOnCursorMode:!1,huddleJoined:!1,currentCursorUser:new d0,localStream:void 0}),this.veltId=En(),this.veltElement=!0,this._inactivityTime=5,this._allowedElementIds=[],this.loggingService.log("%c[WB] Creating CLASS: CursorComponent","color: blue;")}ngOnInit(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;")}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_CURSOR),t=document.querySelector(j.TAGS.VELT_CURSOR);t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>(r=T(I({},r),{isFirstComponent:!0}),r)),this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>(r=T(I({},r),{isFirstComponent:!0}),r)),this.initComponent())}catch(e){this.loggingService.catch("Error in CursorComponent AfterViewInit: ",e)}}initComponent(){try{this.cursorService.checkCursorTagAvailable(),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{user:e}),t)),this.componentConfigSignal().user&&this.setCursorInstalledInAnalytics()},e=>{this.loggingService.catch("Error in CursorComponent getUser$ subscription: ",e)})),this.subscriptions.push(this.huddleService.getHuddleJoined$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleJoined:e}),t))})),this.subscriptions.push(this.huddleService.getHuddleOnCursorMode$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleOnCursorMode:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleOnCursorMode$ subscription: ",e)})),this.subscriptions.push(this.huddleService.localStream$.subscribe(e=>{e?this.componentConfigSignal.update(t=>(t=T(I({},t),{localStream:e}),t)):this.componentConfigSignal.update(t=>(t=T(I({},t),{localStream:void 0}),t))})),this.subscriptions.push(this.huddleService.getRemoteStreamsByUserId$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{remoteStreamsByUserId:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getRemoteStreamsByUserId$ subscription: ",e)})),this.subscriptions.push(this.huddleService.getHuddleAttendees$().subscribe(e=>{let t={};e?t=e.reduce((r,a)=>(r[a.userSnippylyId]=a,r),{}):t={},this.componentConfigSignal.update(r=>(r=T(I({},r),{attendeesByUserId:t}),r))},e=>{this.loggingService.catch("Error in CursorComponent getAttendees$ subscription: ",e)})),this.subscriptions.push(this.huddleService.getHuddleOnCursorModeByAttendeeId$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleOnCursorModeByAttendeeId:e}),t))})),this.subscriptions.push(this.domService.onWindowPointerMove$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{currentCursorUser:T(I({},t.currentCursorUser),{position:{left:(e?.clientX||0)-2,top:(e?.clientY||0)-2}})}),t))},e=>{this.loggingService.catch("Error in CursorComponent onWindowPointerMove$ subscription: ",e)})),this.getCurrentCursorUser(),this.getLiveCursorsOnCurrentDocument()}catch(e){this.loggingService.catch("Error in CursorComponent initComponent: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in CursorComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in CursorComponent unsubscribe: ",e)}}getLiveCursorsOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getLiveCursorsOnCurrentDocument","color: green;");try{this.subscriptions.push(this.cursorService.getLiveCursorsOnCurrentDocument().pipe(Le(e=>!!e)).subscribe(e=>{this.loggingService.log(e),e&&(this.componentConfigSignal.update(t=>(t=T(I({},t),{cursorUsers:e}),t)),this.onCursorUsersChanged.emit(e),this.onCursorUserChange.emit(e))},e=>{this.loggingService.catch("Error in CursorComponent getLiveCursorsOnCurrentDocument subscription: ",e)}))}catch(e){this.loggingService.catch("Error in CursorComponent getLiveCursorsOnCurrentDocument: ",e)}}getCurrentCursorUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getCurrentCursorUser","color: green;");try{this.subscriptions.push(this.cursorService.getCursorUser().pipe(Le(e=>!!e)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{currentCursorUser:T(I({},e),{position:t.currentCursorUser?.position})}),t))},e=>{this.loggingService.catch("Error in CursorComponent getCurrentCursorUser subscription: ",e)}))}catch(e){this.loggingService.catch("Error in CursorComponent getCurrentCursorUser: ",e)}}trackById(e,t){return t?.userId}onImageLoadError(e){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.showInitials[e.userId]=!0}catch(t){this.loggingService.catch("Error in CursorComponent onImageLoadError: ",t)}}setCursorInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Re.CURSOR)}catch(e){this.loggingService.catch("Error in CursorComponent setCursorInstalledInAnalytics: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(b0),h(Be),h(fr),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-cursor"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{avatarMode:"avatarMode",inactivityTime:"inactivityTime",allowedElementIds:"allowedElementIds"},outputs:{onCursorUsersChanged:"cursorUsersChanged",onCursorUserChange:"onCursorUserChange"},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],[3,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"cursorUser","selfCursorPointer","avatarMode","huddleState","stream",4,"ngIf"],[3,"cursorUser","avatarMode","huddleState","stream",4,"ngIf"],[3,"cursorUser","avatarMode","huddleState","stream"],["name","cursor"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"cursor-icon"],["filter","url(#filter0_d_6047_31299)"],["d","M7.68749 16.5142L5.42791 5.15177C5.26065 4.31067 6.16027 3.66301 6.90484 4.08848L16.8788 9.78786C17.6558 10.2319 17.503 11.3948 16.6376 11.623L12.3849 12.7447C12.1377 12.8098 11.9249 12.9672 11.7902 13.1844L9.51802 16.8464C9.03968 17.6174 7.86445 17.4041 7.68749 16.5142Z","fill","#625DF5"],["d","M4.93751 5.24929L7.19709 16.6118C7.46253 17.9466 9.22538 18.2664 9.94288 17.11L12.215 13.448C12.2824 13.3394 12.3888 13.2607 12.5124 13.2281L16.7651 12.1065C18.0632 11.7642 18.2924 10.0198 17.1268 9.35374L7.15291 3.65436C6.03605 3.01615 4.68662 3.98765 4.93751 5.24929Z","stroke","white","stroke-linecap","square"],["id","filter0_d_6047_31299","x","0.588557","y","0.405717","width","21.6129","height","23.0055","filterUnits","userSpaceOnUse","color-interpolation-filters","sRGB"],["flood-opacity","0","result","BackgroundImageFix"],["in","SourceAlpha","type","matrix","values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0","result","hardAlpha"],["dy","1.1"],["stdDeviation","1.2"],["type","matrix","values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.17 0"],["mode","normal","in2","BackgroundImageFix","result","effect1_dropShadow_6047_31299"],["mode","normal","in","SourceGraphic","in2","effect1_dropShadow_6047_31299","result","shape"],[3,"cursorUser","selfCursorPointer","avatarMode","huddleState","stream"]],template:function(t,r){t&1&&g(0,cXt,2,1,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,y_],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));pointer-events:none!important}*:empty{display:revert}.cursor-icon path{stroke:#fff;stroke-width:1px;stroke-linejoin:round}
512
- `],encapsulation:3,changeDetection:0});let i=o;return i})();function dXt(i,o){if(i&1&&(_(0,"span",7),te(1),P(2,"translate"),b()),i&2){let n=l(2).ngIf;m(),Ce(" ",n.user!=null&&n.user.name?n.user==null||n.user.name==null?null:n.user.name.charAt(0):M(2,1,n.user==null||n.user.email==null?null:n.user.email.charAt(0)),"")}}function mXt(i,o){if(i&1){let n=Y();_(0,"img",8),G("error",function(){N(n);let t=l(3);return F(t.onImageLoadError())}),b()}if(i&2){let n=l(2).ngIf;d("src",n.user.photoUrl,un)}}function pXt(i,o){if(i&1&&(_(0,"div",3)(1,"span",4),P(2,"translate"),g(3,dXt,3,3,"span",5)(4,mXt,1,1,"ng-template",null,0,Te),b(),w(6,"audio",6),b()),i&2){let n=de(5),e=l().ngIf;m(),it("color",e.user.color+" !important")("background-color",e.user.color+" !important"),d("title",M(2,8,(e.user==null?null:e.user.name)||(e.user==null?null:e.user.email))),m(2),d("ngIf",e.showInitial)("ngIfElse",n),m(3),d("srcObject",e.remoteAudioStream)}}function gXt(i,o){if(i&1&&(f(0),g(1,pXt,7,10,"div",2),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.user)}}var A0e=(()=>{let o=class o{constructor(e){this.loggingService=e,this.veltElement=!0,this.componentConfigSignal=De({user:this.user,showInitial:!1,remoteAudioStream:this.remoteAudioStream})}ngOnInit(){}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling AudioHuddleUserComponent FUNCTION: ngOnChanges","color: green;"),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in AudioHuddleUserComponent ngOnChanges: ",t)}}onImageLoadError(){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showInitial:!0}),e))}catch(e){this.loggingService.catch("Error in AudioHuddleUserComponent onImageLoadError: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-audio-huddle-user"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{user:"user",remoteAudioStream:"remoteAudioStream"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["showAvatarImgRef",""],[4,"ngIf"],["class","audio-huddle-user photo-container",4,"ngIf"],[1,"audio-huddle-user","photo-container"],["velt-ignore-change-detection","true",1,"audio-huddle-user",3,"title"],["class","audio-huddle-user-initial",4,"ngIf","ngIfElse"],["autoplay","true",3,"srcObject"],[1,"audio-huddle-user-initial"],["referrerpolicy","no-referrer","loading","lazy",1,"audio-huddle-user-image",3,"error","src"]],template:function(t,r){t&1&&g(0,gXt,2,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.audio-huddle-user[_ngcontent-%COMP%]{display:none!important}.photo-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;box-sizing:border-box;background-clip:padding-box;border-radius:50%;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;transition:top .12s ease-in-out,width .12s ease-in-out,height .12s ease-in-out}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;object-fit:cover}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.s-presence-container[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row-reverse;align-items:center}.audio-huddle-user[_ngcontent-%COMP%]{position:relative;box-shadow:0 0 0 3px;border-radius:50%;overflow:hidden;width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));min-width:calc((2rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2rem + 0px) * var(--velt-base-rem-unit));display:flex;align-items:center;justify-content:center}.audio-huddle-user.more-users[_ngcontent-%COMP%]{background:#4578a7;box-shadow:0 0 0 3px #4578a7}.audio-huddle-user[_ngcontent-%COMP%]:not(:last-child):not(.more-users){margin-left:calc((-.5rem + 0px) * var(--velt-base-rem-unit))!important}.audio-huddle-user-image[_ngcontent-%COMP%]{width:100%;height:100%;display:block;object-fit:cover}.audio-huddle-user-image-small[_ngcontent-%COMP%]{width:calc((1.6rem + 0px) * var(--velt-base-rem-unit));height:100%;display:block;object-fit:cover}.audio-huddle-user-initial[_ngcontent-%COMP%]{color:#fff}.away[_ngcontent-%COMP%]{filter:grayscale(1)}"],changeDetection:0});let i=o;return i})();function hXt(i,o){if(i&1){let n=Y();_(0,"div",18),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectAudioDevice(t))}),te(1),P(2,"translate"),b()}if(i&2){let n=o.$implicit,e=l(2);ge("selected",n.deviceId===(e.selectedAudioDevice==null?null:e.selectedAudioDevice.deviceId)),m(),Ce(" ",M(2,3,n.label)," ")}}function fXt(i,o){if(i&1&&(_(0,"div",12)(1,"div",13),te(2),P(3,"translate"),b(),te(4),P(5,"translate"),_(6,"div",14)(7,"div",15),g(8,hXt,3,5,"div",16),b(),te(9),P(10,"translate"),le(),_(11,"svg",4),w(12,"path",17),b()()()),i&2){let n=l();m(2),Ge(M(3,4,"Audio")),m(2),Ce(" ",M(5,6,"Microphone")," "),m(4),d("ngForOf",n.audioDevices),m(),Ce(" ",M(10,8,n.selectedAudioDevice==null?null:n.selectedAudioDevice.label)," ")}}function vXt(i,o){if(i&1){let n=Y();_(0,"div",18),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectVideoDevice(t))}),te(1),P(2,"translate"),b()}if(i&2){let n=o.$implicit,e=l(2);ge("selected",n.deviceId===(e.selectedVideoDevice==null?null:e.selectedVideoDevice.deviceId)),m(),Ce(" ",M(2,3,n.label)," ")}}function CXt(i,o){if(i&1&&(_(0,"div",12)(1,"div",13),te(2),P(3,"translate"),b(),te(4),P(5,"translate"),_(6,"div",14)(7,"div",15),g(8,vXt,3,5,"div",16),b(),te(9),P(10,"translate"),le(),_(11,"svg",4),w(12,"path",17),b()()()),i&2){let n=l();m(2),Ge(M(3,4,"Video")),m(2),Ce(" ",M(5,6,"Camera")," "),m(4),d("ngForOf",n.videoDevices),m(),Ce(" ",M(10,8,n.selectedVideoDevice==null?null:n.selectedVideoDevice.label)," ")}}var P0e=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.dialogRef=t,this.devices=[],this.audioDevices=[],this.videoDevices=[],this.settingsVisible={audio:!0,video:!0},this.defaultMediaSourceOptions=wc(),this.veltElement=!0;try{r&&(this.selectedAudioDevice=r.selectedAudioDevice,this.selectedVideoDevice=r.selectedVideoDevice,r.settingsVisible&&(this.settingsVisible=r.settingsVisible)),this.getDevices()}catch(a){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent constructor: ",a)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-media-source-options-dialog")}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnInit: ",e)}}getDevices(){return Q(this,null,function*(){try{let e=new zn;if(e.getBrowserName()?.toLowerCase()==="safari"||e.getBrowserName()?.toLowerCase()==="firefox")try{let t=yield navigator.mediaDevices.getUserMedia({audio:!0,video:!0});t&&t.getTracks().forEach(r=>r.stop())}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices getUserMedia catch: ",t)}navigator.mediaDevices.enumerateDevices().then(t=>{if(this.devices=t.filter(r=>r.kind==="audioinput"||r.kind==="videoinput"),this.audioDevices=this.devices.filter(r=>r.kind==="audioinput"),this.videoDevices=this.devices.filter(r=>r.kind==="videoinput"),this.audioDevices.length>0&&!this.selectedAudioDevice){if(this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId){let r=this.audioDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId);r&&(this.selectedAudioDevice=r)}this.selectedAudioDevice||(this.selectedAudioDevice=this.audioDevices[0])}if(this.videoDevices.length>0&&!this.selectedVideoDevice){if(this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId){let r=this.videoDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId);r&&(this.selectedVideoDevice=r)}this.selectedVideoDevice||(this.selectedVideoDevice=this.videoDevices[0])}}).catch(t=>{this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices enumerateDevices catch: ",t)})}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices: ",e)}})}selectAudioDevice(e){try{this.selectedAudioDevice=e}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectAudioDevice: ",t)}}selectVideoDevice(e){try{this.selectedVideoDevice=e}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectVideoDevice: ",t)}}saveChanges(){try{let e={};this.settingsVisible.audio&&(e.selectedAudioDevice=this.selectedAudioDevice),this.settingsVisible.video&&(e.selectedVideoDevice=this.selectedVideoDevice),localStorage.setItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS,JSON.stringify(e||{})),this.closeDialog(e)}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent saveChanges: ",e)}}closeDialog(e){try{this.dialogRef.close(e)}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent closeDialog: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(nr),h(Ol,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-media-source-options-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:17,vars:10,consts:[["mediaSourceOptionsDialogRef",""],[1,"s-video-settings-modal",3,"pointerdown","pointerup","click","snippylyOverlay","snippylyOverlayZIndex"],[1,"s-video-header"],[1,"s-video-header-name"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.5 12C19.5 11.77 19.49 11.55 19.47 11.32L21.33 9.91C21.73 9.61 21.84 9.05 21.59 8.61L19.72 5.38C19.47 4.94 18.93 4.76 18.47 4.96L16.32 5.87C15.95 5.61 15.56 5.38 15.15 5.19L14.86 2.88C14.8 2.38 14.37 2 13.87 2H10.14C9.63 2 9.2 2.38 9.14 2.88L8.85 5.19C8.44 5.38 8.05 5.61 7.68 5.87L5.53 4.96C5.07 4.76 4.53 4.94 4.28 5.38L2.41 8.62C2.16 9.06 2.27 9.61 2.67 9.92L4.53 11.33C4.51 11.55 4.5 11.77 4.5 12C4.5 12.23 4.51 12.45 4.53 12.68L2.67 14.09C2.27 14.39 2.16 14.95 2.41 15.39L4.28 18.62C4.53 19.06 5.07 19.24 5.53 19.04L7.68 18.13C8.05 18.39 8.44 18.62 8.85 18.81L9.14 21.12C9.2 21.62 9.63 22 10.13 22H13.86C14.36 22 14.79 21.62 14.85 21.12L15.14 18.81C15.55 18.62 15.94 18.39 16.31 18.13L18.46 19.04C18.92 19.24 19.46 19.06 19.71 18.62L21.58 15.39C21.83 14.95 21.72 14.4 21.32 14.09L19.46 12.68C19.49 12.45 19.5 12.23 19.5 12ZM12.04 15.5C10.11 15.5 8.54 13.93 8.54 12C8.54 10.07 10.11 8.5 12.04 8.5C13.97 8.5 15.54 10.07 15.54 12C15.54 13.93 13.97 15.5 12.04 15.5Z","fill","white"],[1,"s-icon-button",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","white"],["class","s-video-settings-modal-item",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary","s-save-button",3,"click"],[1,"s-video-settings-modal-item"],[1,"s-heading"],[1,"s-input","dropdown"],[1,"dropdown-content"],["class","dropdown-item",3,"selected","click",4,"ngFor","ngForOf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#80808A"],[1,"dropdown-item",3,"click"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",1,0),G("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),F(c.stopPropagation())})("click",function(c){return N(a),F(c.stopPropagation())}),_(2,"div",2)(3,"div",3),le(),_(4,"svg",4),w(5,"path",5),b(),te(6),P(7,"translate"),b(),ut(),_(8,"div",6),G("click",function(){return N(a),F(r.closeDialog())}),le(),_(9,"svg",7),w(10,"path",8),b()()(),g(11,fXt,13,10,"div",9)(12,CXt,13,10,"div",9),ut(),w(13,"div",10),_(14,"div",11),G("click",function(){return N(a),F(r.saveChanges())}),te(15),P(16,"translate"),b()()}if(t&2){let a=de(1);d("snippylyOverlay",a)("snippylyOverlayZIndex",3e3),m(6),Ce(" ",M(7,6,"Settings")," "),m(5),d("ngIf",r.settingsVisible==null?null:r.settingsVisible.audio),m(),d("ngIf",r.settingsVisible==null?null:r.settingsVisible.video),m(3),Ge(M(16,8,"Save changes"))}},dependencies:[vt,X,mi,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%]{display:flex!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#91919c!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;background:#141416!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:calc((40rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important;align-items:center!important}.s-video-header-name[_ngcontent-%COMP%]{gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;font-size:calc((1.2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:hover{background:#4f4bbf!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) 0!important}.s-input[_ngcontent-%COMP%]{position:relative!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#91919c!important;width:100%!important;justify-content:space-between!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:0!important;right:0!important;z-index:1!important}.dropdown-content[_ngcontent-%COMP%]{width:100%!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important;color:#91919c!important;background:#141416!important;cursor:pointer!important;visibility:hidden!important;opacity:0!important;transition:all .1s ease!important}.dropdown[_ngcontent-%COMP%]:hover .dropdown-content[_ngcontent-%COMP%]{visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:calc((1.2rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;transition:all .1s ease!important;color:#91919c!important}.dropdown-item.selected[_ngcontent-%COMP%]{color:#fff!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-icon-button[_ngcontent-%COMP%]{padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:100px!important;cursor:pointer!important}.s-icon-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#777e91!important}.s-icon-button[_ngcontent-%COMP%]:hover{background:#222226!important}.s-icon-button[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog{max-width:unset} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}@media screen and (max-width: 768px){.s-video-settings-modal[_ngcontent-%COMP%]{width:calc(.8 * var(--legacy-velt-viewport-width))!important}}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-media-source-options-dialog{width:calc(1 * var(--legacy-velt-viewport-width))!important;max-width:calc(1 * var(--legacy-velt-viewport-width))!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{width:calc(1 * var(--legacy-velt-viewport-width))!important;height:calc(1 * var(--legacy-velt-viewport-height))!important;border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .s-video-settings-modal{width:calc(1 * var(--legacy-velt-viewport-width))!important;height:calc(1 * var(--legacy-velt-viewport-height))!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .s-save-button{width:100%!important}}"],changeDetection:0});let i=o;return i})();var M0e=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u){this.authService=e,this.configService=t,this.contactService=r,this.docService=a,this.commonDbService=s,this.databaseService=c,this.loggingService=p,this.notificationService=u,this.documentUsers$=new ve([]);try{this.databaseService.getDb().pipe(Le(C=>!!C),at(1)).subscribe(C=>{C&&this.subscribeUsersFromDocument()}),this.authService.getUser$().subscribe(C=>{if(C?.email){this.subscribeUsersFromDocument();let E=bt(C.email);C?.organizationId&&(E=bt(C.userId)),this.getDocumentUserByIdFromDb(E).then(D=>{D&&(D.user.name=C.name,D.user.photoUrl=C.photoUrl,this.updateDocumentUser(D))}).catch(D=>{this.loggingService.catch("Error in DocumentUserAccessService getDocumentUserByIdFromDb:",D)})}},C=>{this.loggingService.catch("Error in DocumentUserAccessService getUser$:",C)})}catch(C){this.loggingService.catch("Error in DocService constructor:",C)}}getDocumentUserByIdFromDb(e){return Q(this,null,function*(){try{let t=this.docService.getDocumentPaths();return t?(yield this.commonDbService.dbListener({feature:"documentUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!1,id:e}}).pipe(at(1)).toPromise())?.data:void 0}catch(t){this.loggingService.catch("Error in DocService getDocumentUserById:",t);return}})}subscribeUsersFromDocument(){try{this.documentUsersSubscription&&this.documentUsersSubscription.unsubscribe(),this.documentUsersSubscription=this.authService.getUser$().pipe(he(e=>e?this.docService.getDocumentPaths$().pipe(Le(t=>!!t),he(t=>this.commonDbService.dbListener({feature:"allDocumentUsers",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!0}}).pipe(ce(r=>r?.data?Object.values(r?.data):[])))):se([]))).subscribe(e=>{this.documentUsers$.next(e)},e=>{this.loggingService.catch("Error in DocService subscribeUsersFromDocument subscription:",e)})}catch(e){this.loggingService.catch("Error in DocService subscribeUsersFromDocument:",e)}}getDocumentUsers$(){return this.documentUsers$.asObservable()}addDocumentUser(e){try{let t=this.authService.getUser();if(t){if(this.configService.getSF()){if(e?.role?.name===vo.ADMIN)this.contactService.addGlobalContact(e.user);else if(e?.role?.name===vo.COMMENTER){let a=t.groupId;if(a){let s=JSON.parse(JSON.stringify(e.user));s.visibility="group",this.contactService.setLoggedInUserGroupContacts(a,[s])}}}e.id=bt(e?.user?.email),e.invitedBy=t,e.invitedDate=this.timestamp;let r=this.docService.getDocumentPaths();r&&this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:r?.documentId??"",organizationId:r?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}else this.loggingService.error("Error in DocService addDocumentUser: User not found")}catch(t){this.loggingService.catch("Error in DocService addDocumentUser:",t)}}updateDocumentUser(e,t={}){try{let r=this.authService.getUser();if(r){e.updatedBy=r,e.updatedDate=this.timestamp;let a=this.docService.getDocumentPaths();this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:a?.documentId??"",organizationId:a?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}}catch(r){this.loggingService.catch("Error in DocumentUserAccessService updateDocumentUser:",r)}}removeDocumentUser(e){try{let t=this.docService.getDocumentPaths();this.commonDbService.deleteData({feature:"documentUserAccess",properties:{id:e.id,documentId:t?.documentId??"",organizationId:t?.organizationId??""}})}catch(t){this.loggingService.catch("Error in DocumentUserAccessService removeDocumentUser:",t)}}updateNotificationsDatabase(e={}){try{let t=I({notificationSource:"user"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in DocumentUserAccessService updateNotificationsDatabase: ",t)}}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(ee(Ue),ee(Ft),ee(xi),ee(st),ee(hn),ee(Tn),ee(y),ee(mn))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var yXt=["triggerTemplate"],SXt=["tooltipTemplate"],bXt=["trigger"],IXt=["overlay"],EXt=()=>["snippyly-overlay-panel","snippyly-reaction-dialog-overlay-panel","velt-overlay-panel"];function xXt(i,o){i&1&&je(0)}function TXt(i,o){i&1&&je(0)}function DXt(i,o){if(i&1){let n=Y();_(0,"div",6,2),G("pointerenter",function(){N(n);let t=l();return F(t.showTooltip())})("pointerleave",function(){N(n);let t=l();return F(t.hideTooltip())}),g(2,TXt,1,0,"ng-container",4),b()}if(i&2){let n=de(1),e=l();d("snippylyOverlay",n)("snippylyOverlayZIndex",2e3),x("data-velt-element",!0),m(2),d("ngTemplateOutlet",e.tooltipTemplate)}}var Zd=(()=>{let o=class o{constructor(e){this.loggingService=e,this.positions=[],this.disableClose=!0,this.disabled=!1,this.componentConfigSignal=De({disabled:!1,tooltipVisible:!1,overlayPositions:[]}),this.veltElement=!0}ngOnInit(){}ngOnChanges(e){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnChanges","color: green;");try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e.positions&&this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPositions:this.positions.map(r=>new Ii({originX:r.originX,originY:r.originY},{overlayX:r.overlayX,overlayY:r.overlayY}))}),t))}catch(t){this.loggingService.catch("Error in OverlayTooltipComponent ngOnChanges: ",t)}}showTooltip(){this.loggingService.log("%c[WB] Calling FUNCTION: showTooltip","color: green;");try{this.hideTooltipTimeout&&clearTimeout(this.hideTooltipTimeout),this.componentConfigSignal.update(e=>(e=T(I({},e),{tooltipVisible:!0}),e))}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent showTooltip: ",e)}}hideTooltip(){this.loggingService.log("%c[WB] Calling FUNCTION: hideTooltip","color: green;");try{this.hideTooltipTimeout&&clearTimeout(this.hideTooltipTimeout),this.hideTooltipTimeout=setTimeout(()=>{this.componentConfigSignal.update(e=>(e=T(I({},e),{tooltipVisible:!1}),e))},200)}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent hideTooltip: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.hideTooltip()}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["app-overlay-tooltip"]],contentQueries:function(t,r,a){if(t&1&&(Hs(a,yXt,7),Hs(a,SXt,7)),t&2){let s;Xe(s=Qe())&&(r.triggerTemplate=s.first),Xe(s=Qe())&&(r.tooltipTemplate=s.first)}},viewQuery:function(t,r){if(t&1&&(nt(bXt,5),nt(IXt,5)),t&2){let a;Xe(a=Qe())&&(r.trigger=a.first),Xe(a=Qe())&&(r.overlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{positions:"positions",disableClose:"disableClose",disabled:"disabled"},standalone:!1,features:[Ze],decls:5,vars:8,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],["overlayContent",""],["cdkOverlayOrigin","",3,"pointerenter","pointerleave"],[4,"ngTemplateOutlet"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],["data-velt-comment-disabled","true",3,"pointerenter","pointerleave","snippylyOverlay","snippylyOverlayZIndex"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",3,0),G("pointerenter",function(){return N(a),F(r.showTooltip())})("pointerleave",function(){return N(a),F(r.hideTooltip())}),g(2,xXt,1,0,"ng-container",4),b(),g(3,DXt,3,4,"ng-template",5,1,Te)}if(t&2){let a=de(1);m(2),d("ngTemplateOutlet",r.triggerTemplate),m(),d("cdkConnectedOverlayOrigin",a)("cdkConnectedOverlayPanelClass",gt(7,EXt))("cdkConnectedOverlayOpen",!r.componentConfigSignal().disabled&&r.componentConfigSignal().tooltipVisible)("cdkConnectedOverlayPositions",r.componentConfigSignal().overlayPositions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",r.disableClose)}},dependencies:[_t,on,en,mi],encapsulation:2,changeDetection:0});let i=o;return i})();var wXt=["matAutocomplete"],OXt=["matAutocompleteTrigger"],AXt=["autocompletePanelInput"],PXt=["viewport"],MXt=i=>({componentConfigSignal:i}),kXt=(i,o)=>({condition:i,data:o}),k0e=i=>({$implicit:i}),R0e=(i,o)=>({$implicit:i,isNewContact:o});function RXt(i,o){if(i&1){let n=Y();_(0,"input",9,2),G("keyup",function(t){return N(n),F(t.stopPropagation())})("keydown",function(t){return N(n),F(t.stopPropagation())})("keyup.escape",function(t){return N(n),l().closePanel(),F(t.stopPropagation())})("input",function(t){return N(n),l().handleInput(t),F(t.stopPropagation())}),b()}if(i&2){let n=l(),e=de(4);d("placeholder",n.placeholder||"")("matAutocomplete",e)("matAutocompleteDisabled",!n.enableOnFocus)("matAutocompletePosition",n.position),x("aria-label",n.placeholder||"Search")("aria-autocomplete","list")("aria-controls",n.componentId+"-input")("data-testid",n.componentId+"-input")}}function NXt(i,o){if(i&1&&(f(0),w(1,"velt-autocomplete-group-option-internal",17),v()),i&2){let n=l().$implicit,e=l(3);m(),d("componentConfigSignal",e.componentConfigSignal)("group",n.group)("groupName",n.groupName)}}function FXt(i,o){i&1&&je(0)}function LXt(i,o){if(i&1&&(f(0),_(1,"div",18),g(2,FXt,1,0,"ng-container",19),b(),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(2),d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,k0e,n.originalItem))}}function BXt(i,o){i&1&&je(0)}function VXt(i,o){if(i&1&&(f(0),g(1,BXt,1,0,"ng-container",19),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",k(2,R0e,n.originalItem,n.isNewContact))}}function UXt(i,o){if(i&1){let n=Y();_(0,"mat-option",15),G("pointerdown",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("pointerup",function(t){let r=N(n).$implicit,a=l(3);return t.stopPropagation(),r.isGroupHeader?t.preventDefault():a.onOptionClick(r.originalItem),F(t.preventDefault())}),g(1,NXt,2,3,"ng-container",16)(2,LXt,3,4,"ng-container",16)(3,VXt,2,5,"ng-container",16),b()}if(i&2){let n=o.$implicit;ge("velt-group-option",n.isGroupHeader)("velt-group-member-option",n.isGroupMember),d("disabled",n==null?null:n.disabled)("value",n.originalItem),x("id",n.id)("aria-disabled",n==null?null:n.disabled)("data-testid",n.testId),m(),d("ngIf",n.isGroupHeader),m(),d("ngIf",n.isGroupMember),m(),d("ngIf",!n.isGroupHeader&&!n.isGroupMember)}}function jXt(i,o){if(i&1&&(_(0,"cdk-virtual-scroll-viewport",13,3),g(2,UXt,4,12,"mat-option",14),P(3,"async"),b()),i&2){let n=l(2);m(2),d("cdkVirtualForOf",M(3,2,n.componentConfigSignal().flattenedItems$))("cdkVirtualForTrackBy",n.trackByFlattenedItem)}}function $Xt(i,o){if(i&1&&(f(0),w(1,"velt-autocomplete-group-option-internal",17),v()),i&2){let n=l().$implicit,e=l(3);m(),d("componentConfigSignal",e.componentConfigSignal)("group",n.group)("groupName",n.groupName)}}function HXt(i,o){i&1&&je(0)}function zXt(i,o){if(i&1&&(f(0),_(1,"div",18),g(2,HXt,1,0,"ng-container",19),b(),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(2),d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,k0e,n.originalItem))}}function GXt(i,o){i&1&&je(0)}function WXt(i,o){if(i&1&&(f(0),g(1,GXt,1,0,"ng-container",19),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",k(2,R0e,n.originalItem,n.isNewContact))}}function qXt(i,o){if(i&1){let n=Y();_(0,"mat-option",15),G("pointerdown",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("pointerup",function(t){let r=N(n).$implicit,a=l(3);return t.stopPropagation(),r.isGroupHeader?t.preventDefault():a.onOptionClick(r.originalItem),F(t.preventDefault())}),g(1,$Xt,2,3,"ng-container",16)(2,zXt,3,4,"ng-container",16)(3,WXt,2,5,"ng-container",16),b()}if(i&2){let n=o.$implicit;ge("velt-group-option",n.isGroupHeader)("velt-group-member-option",n.isGroupMember),d("disabled",n==null?null:n.disabled)("value",n.originalItem),x("id",n.id)("aria-disabled",n==null?null:n.disabled)("data-testid",n.testId),m(),d("ngIf",n.isGroupHeader),m(),d("ngIf",n.isGroupMember),m(),d("ngIf",!n.isGroupHeader&&!n.isGroupMember)}}function YXt(i,o){if(i&1&&(_(0,"div",20),g(1,qXt,4,12,"mat-option",21),P(2,"async"),b()),i&2){let n=l(2);m(),d("ngForOf",M(2,2,n.componentConfigSignal().flattenedItems$))("ngForTrackBy",n.trackByFlattenedItem)}}function KXt(i,o){if(i&1&&(_(0,"div",10),g(1,jXt,4,4,"cdk-virtual-scroll-viewport",11),P(2,"async"),g(3,YXt,3,4,"div",12),P(4,"async"),b()),i&2){let n,e,t=l();ge("s-comment-autocomplete-panel-dark",t.darkMode),x("data-testid",t.componentId+"-options-container"),m(),d("ngIf",(((n=M(2,5,t.componentConfigSignal().flattenedItems$))==null?null:n.length)||0)>6),m(2),d("ngIf",(((e=M(4,7,t.componentConfigSignal().flattenedItems$))==null?null:e.length)||0)<=6)}}function ZXt(i,o){if(i&1&&w(0,"velt-autocomplete-option-internal",22),i&2){let n=o.$implicit,e=o.isNewContact,t=l();d("componentConfigSignal",t.componentConfigSignal)("selectorItem",n)("isNewContact",e)}}var xg=(()=>{let o=class o extends Je{get trigger(){return this._trigger}set trigger(e){this._trigger=e,this.setTriggerToMatAutocomplete(),this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus,this.trigger._handleInput=this.handleInput.bind(this))}get triggerElement(){return this._triggerElement}set triggerElement(e){if(this._triggerElement=e,this.triggerElement){let t=new R(this.triggerElement);this.trigger=new Nb(t,this.overlay,this.viewContainerRef,{run:r=>r(),runOutsideAngular:r=>r()},this.cd,null,this.directionality,null,document,this.viewportRuler)}}get enableOnFocus(){return this._enableOnFocus}set enableOnFocus(e){this._enableOnFocus=e,this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus)}get excludeContacts(){return this._excludeContacts}set excludeContacts(e){this._excludeContacts=e,this.filterOptions()}constructor(e,t,r,a,s,c,p,u,C,E,D,L,z,W,J){super(s,D,void 0,void 0,void 0,L,a),this.authService=e,this.autocompleteService=t,this.contactService=r,this.loggingService=a,this.elementRef=s,this.overlay=c,this.viewContainerRef=p,this.cd=u,this.directionality=C,this.viewportRuler=E,this.themeService=D,this.dynamicDataService=L,this.commentActionsService=z,this.commentService=W,this.metadataService=J,this.type="contact",this._enableOnFocus=!1,this.position="auto",this._excludeContacts=[],this.showAtHere=!1,this.optionSelected=new Pe,this.atHereSelected=new Pe,this.userContactOptionSelected=new Pe,this.customOptionSelected=new Pe,this.groupOptionSelected=new Pe,this.enterPressed=new Pe,this.autocompleteStateChanged=new Pe,this.userContacts=[],this.user=null,this.inputFilterFormControl=new qie,this.oldText="",this.newText="",this.wordIndex=-1,this.deviceInfo=new zn,this.userDocumentContacts=[],this.organizationGroups=[],this.subscriptions=[],this.autocompleteDisabledPositions=new Set,this.veltId=En(),this.veltElement=!0,this.componentConfigSignal=De({flattenedItems$:se([]),trackByFlattenedItem:this.trackByFlattenedItem.bind(this),onOptionClick:this.onOptionClick.bind(this),newUserContactError:void 0,newUserContact:void 0,customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1}),this.hereUserContact={name:"here",email:"",userId:"here",visibility:"here"},this.atHereDescription=null,this.dataList=[],this.autocompleteDataMap={},this.atHereEnabled=!1,this.componentId="velt-autocomplete-panel",this.MAX_VISIBLE_ITEMS=10,this.ITEM_SIZE=55;try{this.subscriptions.push(this.commentService.getCustomAutocompleteSearch$().subscribe(ue=>{this.componentConfigSignal.update(ye=>(ye=T(I({},ye),{customAutocompleteSearch:ue}),ye))})),this.subscriptions.push(this.authService.getUser$().subscribe(ue=>{this.user=ue,this.filterOptions()})),this.subscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(ue=>{this.autocompleteDataMap=ue,this.filterOptions()})),this.subscriptions.push(this.inputFilterFormControl.valueChanges.pipe(lr(150),wt()).subscribe(()=>{this.filterOptions()}))}catch(ue){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit:",ue)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.type==="contact"?this.selectedAutocompleteData={hotkey:"",type:"contact",data:[]}:this.selectedAutocompleteData=void 0,this.subscriptions.push(this.contactService.getAtHereLabel().subscribe(e=>{this.hereUserContact.name=e})),this.subscriptions.push(this.contactService.getAtHereDescription().subscribe(e=>{this.atHereDescription=e})),this.subscriptions.push(this.contactService.getUserContacts$(this.metadata).subscribe(e=>{this.userContacts=e?.slice(),this.atHereEnabled&&(this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact)),this.filterOptions()})),this.subscriptions.push(this.contactService.getAtHereEnabled$().subscribe(e=>{this.atHereEnabled=e,e?this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact):this.userContacts=this.userContacts.filter(t=>t?.visibility!=="here"),this.filterOptions()})),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{this.organizationGroups=e,this.filterOptions()})),this.subscriptions.push(this.commentService.getExpandMentionGroups$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{expandMentionGroups:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsFirst$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{showMentionGroupsFirst:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsOnly$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{showMentionGroupsOnly:e}),t))})),this.subscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(e=>{this.userDocumentContacts=e,this.filterOptions()}))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","listbox"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{this.setTriggerToMatAutocomplete(),requestAnimationFrame(()=>{if(this.autocompletePanelInput?.nativeElement){this.autocompletePanelInput.nativeElement.focus();let e=this.getViewport();if(e){let t=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;e.style.height=`${t}px`,e.style.maxHeight=`${t}px`}this.openPanelOptimized()}this.triggerElement?this.subscriptions.push(pi(this.triggerElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())})):this.autocompletePanelInput&&this.subscriptions.push(pi(this.autocompletePanelInput.nativeElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())}))})}catch(e){this.loggingService.catch("Error in ngAfterViewInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnDestroy:",e)}}filterOptions(){try{if(this.selectedAutocompleteData)if(this.selectedAutocompleteData.type==="contact"){let e=this.inputFilterFormControl.value,t=new ng,r=e?.toLowerCase()?.trim();t.email=r;let a=new RegExp(j.REGEX_EMAIL).test("@"+t?.email),s=this.userContacts.slice();this.componentConfigSignal().customAutocompleteSearch||(e?s=this._filter(t):s=this.userContacts.slice()),this.atHereEnabled&&this.hereUserContact?.name?.includes(r)&&!s?.find(D=>D?.userId=="here")&&(s=[this.hereUserContact,...s]),s=s.filter(D=>!this.excludeContacts?.find(L=>L?.email===D?.email));let c=e?this._filterGroup(e):this.organizationGroups,p=s.map(D=>{let L=!1;return D.visibility==="here"&&(this.atHereDescription?(D.email=`${this.atHereDescription}`,D.description=this.atHereDescription):this.user?.organizationId&&(D.email=`${this.userDocumentContacts?.length||0} members`,D.description=`${this.userDocumentContacts?.length||0} members`)),{type:"contact",contact:D,disabled:L}}),u=c.map(D=>({type:"group",group:D})),C=[...p,...u];if(this.componentConfigSignal().expandMentionGroups){let D=[],L={},z=new Map;C.forEach(Ie=>{if(Ie.contact?.userId){let Ve=bt(Ie.contact?.userId);z.set(Ve,Ie),L[Ie.contact?.userId]=!1}});let W=new Map;this.organizationGroups.forEach(Ie=>{W.set(Ie.metadata.clientGroupId,{id:Ie.metadata.clientGroupId,name:Ie.metadata.groupName,members:[],userIds:Object.keys(Ie.users||{})})}),W.forEach(Ie=>{Ie.userIds.forEach(Ve=>{let Fe=z.get(Ve);Fe&&(Ie.members.push(Fe),Fe.contact?.userId&&(L[Fe.contact.userId]=!0))})}),C.forEach(Ie=>{Ie.type==="contact"&&Ie.contact?.userId&&!L[Ie.contact?.userId]&&D.push(Ie)});let J=Array.from(W.values()),ue=C.length?void 0:{type:"contact",contact:t},ye=this.createFlattenedItems({allItems:C,contactsWithoutGroup:D,groups:J,newUserContact:ue,isExpandedGroups:!0,isCustomGroups:!1});this.componentConfigSignal.update(Ie=>T(I({},Ie),{flattenedItems$:se(ye),newUserContactError:a?void 0:"Invalid email",newUserContact:ue,contactsWithoutGroup:D,groups:J}))}else{let D=C.length?void 0:{type:"contact",contact:t},L=this.createFlattenedItems({allItems:C,newUserContact:D,isExpandedGroups:!1,isCustomGroups:!1});this.componentConfigSignal.update(z=>T(I({},z),{flattenedItems$:se(L),newUserContactError:a?void 0:"Invalid email",newUserContact:D}))}let E=this.getViewport();if(E){let D=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;E.style.height=`${D}px`,E.style.maxHeight=`${D}px`}this.openPanelOptimized(),this.cd.markForCheck()}else{let e=this.inputFilterFormControl.value,t=this.autocompleteDataMap?.[this.selectedAutocompleteData?.hotkey],r=t?.data?.slice()||[];if(this.componentConfigSignal().customAutocompleteSearch||(e?r=this._filterCustom(e):r=this.selectedAutocompleteData?.data?.slice()||[]),t?.groups&&t.groups.length>0){let c=[],p=new Map;t.groups?.forEach(E=>{p.set(E.id,{id:E.id,name:E.name,members:[]})}),r.forEach(E=>{let D={type:"custom",custom:E};E.groupId&&p.has(E.groupId)?p.get(E.groupId)?.members.push(D):c.push(D)});let u=Array.from(p.values()).filter(E=>E.members.length>0),C=this.createFlattenedItems({allItems:[],contactsWithoutGroup:c,groups:u,isExpandedGroups:!1,isCustomGroups:!0});this.componentConfigSignal.update(E=>T(I({},E),{customGroupsEnabled:!0,flattenedItems$:se(C),contactsWithoutGroup:c,groups:u}))}else{let c=r.map(u=>({type:"custom",custom:u})),p=this.createFlattenedItems({allItems:c,isExpandedGroups:!1,isCustomGroups:!1});this.componentConfigSignal.update(u=>T(I({},u),{customGroupsEnabled:!1,flattenedItems$:se(p)}))}let s=this.getViewport();if(s){let c=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;s.style.height=`${c}px`,s.style.maxHeight=`${c}px`}this.openPanelOptimized(),this.cd.markForCheck()}}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent filterOptions: ",e)}}displayFn(e){try{return e?.name||e?.email||""}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent displayFn: ",t),""}}trackByFlattenedItem(e,t){try{return t.id||e.toString()}catch(r){return this.loggingService.catch("Error in AutocompletePanelComponent trackByFlattenedItem: ",r),e.toString()}}createFlattenedItems(e){try{let{allItems:t,contactsWithoutGroup:r,groups:a,newUserContact:s,isExpandedGroups:c=!1,isCustomGroups:p=!1}=e,u=[];if(c||p){if(!this.componentConfigSignal().showMentionGroupsOnly&&!this.componentConfigSignal().showMentionGroupsFirst&&r?.forEach((C,E)=>{let D=new Wd;D.originalItem=C,D.disabled=!!C.disabled,D.id=p?`velt-option-custom-ungrouped-${E}`:`velt-option-user-${E}`,D.testId=p?`${this.componentId}-custom-ungrouped-${E}`:`${this.componentId}-user-${E}`,u.push(D)}),a?.forEach((C,E)=>{if(C?.members?.length){let D=new Wd;D.originalItem={type:"group",group:C},D.isGroupHeader=!0,D.disabled=!0,D.group=C,D.id=p?`velt-option-custom-group-${E}`:`velt-option-group-${E}`,D.testId=p?`${this.componentId}-custom-group-${E}`:`${this.componentId}-group-${E}`,u.push(D),C.members.forEach((L,z)=>{let W=new Wd;W.originalItem=L,W.isGroupMember=!0,W.disabled=L.disabled||!1,W.id=p?`velt-option-custom-group-${E}-member-${z}`:`velt-option-group-${E}-member-${z}`,W.testId=p?`${this.componentId}-custom-group-${E}-member-${z}`:`${this.componentId}-group-${E}-member-${z}`,u.push(W)})}}),!this.componentConfigSignal().showMentionGroupsOnly&&this.componentConfigSignal().showMentionGroupsFirst&&r?.length){let C=new Wd;C.originalItem={type:"group"},C.isGroupHeader=!0,C.disabled=!0,C.groupName="Ungrouped",C.id="velt-option-ungrouped",C.testId=`${this.componentId}-ungrouped`,u.push(C),r.forEach((E,D)=>{let L=new Wd;L.originalItem=E,L.isGroupMember=!0,L.disabled=E.disabled||!1,L.id=`velt-option-user-${D}`,L.testId=`${this.componentId}-user-${D}`,u.push(L)})}}else t.forEach((C,E)=>{let D=new Wd;D.originalItem=C,D.disabled=C.disabled||!1,D.id=`velt-option-${E}`,D.testId=`${this.componentId}-${E}`,u.push(D)});if(s?.contact?.email){let C=new Wd;C.originalItem=s,C.isNewContact=!0,C.id="velt-new-contact-option",C.testId=`${this.componentId}-new-contact`,u.push(C)}return u}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent createFlattenedItems: ",t),[]}}setTriggerToMatAutocomplete(){try{this.matAutocomplete&&this.trigger&&(this.trigger.autocomplete=this.matAutocomplete)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setTriggerToMatAutocomplete: ",e)}}handleInput(e){try{if(e?.target?.hasAttribute("contenteditable")){let t="",r=this.autocompleteDataMap?Object.keys(this.autocompleteDataMap):["@"];if(e?.data===" "&&(t=Av(e?.target,r),t&&r.includes(t.trim()))){this.closePanel();return}if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase())?(!this.trigger?.panelOpen&&!this.autocompleteDataMap[e?.data||""]&&(this.oldText=e.target.innerText),this.newText=e.target.innerText,t=this.getWordAtCursorForSafari()):t=Av(e?.target,r),e?.target?.innerHTML.length===1&&(this.selectedAutocompleteData=void 0),t){let a=t.charAt(0),s=window.getSelection(),c=!1;if(s&&s.rangeCount>0){let p=s.getRangeAt(0),u=p.startOffset,C=p.commonAncestorContainer?.textContent||"";c=this.isAutocompleteDisabledAtPosition(C,u,r)}if(!c&&(!this.selectedAutocompleteData||this.autocompleteDataMap[a])&&(this.selectedAutocompleteData=this.autocompleteDataMap[a]),!c&&this.selectedAutocompleteData){this.trigger?.panelOpen||(this.openPanelOptimized(),this.filterOptions());let p=t.substring(1);this.inputFilterFormControl.setValue(p);let u=!1;if(this.componentConfigSignal().customAutocompleteSearch&&(this.trigger?.panelOpen?a===this.selectedAutocompleteData.hotkey&&(u=!0):u=!0,u)){let C={event:e,searchText:p,type:this.selectedAutocompleteData?.type};this.commentActionsService.autocompleteSearch(C)}}else this.inputFilterFormControl.setValue(t),c&&this.trigger?.panelOpen&&(this.trigger.closePanel(),this.selectedAutocompleteData=void 0)}else this.inputFilterFormControl.setValue(""),this.trigger?.panelOpen&&(this.trigger.closePanel(),this.selectedAutocompleteData=void 0)}else{let t=e?.target?.value;if(this.inputFilterFormControl.setValue(t),!this.matAutocompleteTrigger?.panelOpen&&(this.openPanelOptimized(),this.componentConfigSignal().customAutocompleteSearch)){let r={event:e,searchText:t,type:this.selectedAutocompleteData?.type};this.commentActionsService.autocompleteSearch(r)}}e.stopPropagation()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent handleInput: ",t)}}getWordAtCursorForSafari(){try{let e=this.oldText?.split(/\s+/)?.filter(a=>a),t=this.newText?.split(/\s+/)?.filter(a=>a);this.wordIndex=-1;let r="";return t?.forEach((a,s)=>{e[s]!==a&&(r=a,this.wordIndex=s)}),r}catch(e){return this.loggingService.catch("Error in AutocompletePanelComponent getWordAtCursorForSafari: ",e),""}}onOptionSelected(e){try{if(this.enterPressed.emit(),this.selectedAutocompleteData)if(e.option.value?.type==="group"){let t=e.option.value.group;this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t?.metadata?.groupName);a&&this.groupOptionSelected.emit({text:a,groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId})}else if(this.selectedAutocompleteData.type==="contact"){let t=e.option.value.contact;if(t?.visibility=="here"){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null;this.replaceWordAtCursor(r,t?.name),this.atHereSelected.emit(t)}else if(!t?.email||new RegExp(j.REGEX_EMAIL).test("@"+t?.email)){this.addContact(),this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let a=this.trigger?this.trigger._element?.nativeElement:null,s=t?.name||t?.email,c=this.replaceWordAtCursor(a,s);this.optionSelected.emit(t),this.userContactOptionSelected.emit({text:c,userId:t.userId,contact:t}),this.callbackOnOptionSelected(t)}}else{let t=e.option.value.custom;this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t.name);a&&this.customOptionSelected.emit({text:a,custom:t})}this.closePanel()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionSelected: ",t)}}onOptionClick(e){try{if(this.selectedAutocompleteData)if(this.selectedAutocompleteData.type==="custom"){let t=e.custom;if(t){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t.name);a&&this.customOptionSelected.emit({text:a,custom:t}),this.closePanel()}}else if(e?.type==="group"){let t=e.group;if(t){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t?.metadata?.groupName);a&&this.groupOptionSelected.emit({text:a,groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId}),this.closePanel()}}else{let t=e.contact;if(t)if(t?.visibility==="here"){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null;this.replaceWordAtCursor(r,t.name),this.atHereSelected.emit(t),this.closePanel()}else{if(!t?.email||new RegExp(j.REGEX_EMAIL).test("@"+t?.email)){this.addContact(),this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let a=this.trigger?this.trigger._element?.nativeElement:null,s=t?.name||t?.email,c=this.replaceWordAtCursor(a,s);this.optionSelected.emit(t),this.userContactOptionSelected.emit({text:c,userId:t.userId,contact:t}),this.callbackOnOptionSelected(t)}this.closePanel()}}}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionClick: ",t)}}addContact(){try{this.componentConfigSignal().newUserContact?.contact&&(this.contactService.addUserContact(this.componentConfigSignal().newUserContact?.contact),this.componentConfigSignal.update(e=>(e=T(I({},e),{newUserContact:void 0}),e)))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent addContact: ",e)}}replaceWordAtCursor(e,t){try{let r="";if(e){let a=s=>{let c=s.charAt(0);return this.selectedAutocompleteData?.hotkey===c?c:""};if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase())){let s=this.newText?.split(/\s+/)?.filter(C=>C),c=s[this.wordIndex];r=(a(c||"")||"")+t,s[this.wordIndex]=r;let u=s.join(" ");e.innerText=u}else{let s=this.autocompleteDataMap?Object.keys(this.autocompleteDataMap):["@"],c=Av(e,s);r=(a(c||"")||"")+t,aae(e,r,s)}}return r}catch(r){return this.loggingService.catch("Error in AutocompletePanelComponent replaceWordAtCursor: ",r),""}}_filter(e){try{let t=e.email?.toLowerCase();return this.userContacts?.filter(r=>r?.email?.includes(t)||r?.name?.toLowerCase()?.includes(t)||r?.organizationName?.toLowerCase()?.includes(t))}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filter: ",t),[]}}_filterCustom(e){try{return this.selectedAutocompleteData?.data?.filter(t=>t.name?.toLowerCase()?.includes(e?.toLowerCase()))||[]}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filterCustom: ",t),[]}}_filterGroup(e){try{return this.organizationGroups?.filter(t=>t?.metadata?.groupName?.toLowerCase()?.includes(e?.toLowerCase()))}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filterGroup: ",t),[]}}setAutocompletePosition(){try{this.matAutocompleteTrigger&&(this.matAutocompleteTrigger.position=this.position)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setAutocompletePosition: ",e)}}callbackOnOptionSelected(e){try{this.contactService.onContactSelected(e)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent callbackOnOptionSelected: ",t)}}getViewport(){try{return this.matAutocompleteTrigger?._overlayRef?.overlayElement?.querySelector("cdk-virtual-scroll-viewport")||null}catch(e){return this.loggingService.catch("Error in AutocompletePanelComponent getViewport: ",e),null}}openPanelOptimized(){try{this.trigger?requestAnimationFrame(()=>{this.trigger?.openPanel(),this.trigger?.updatePosition(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10)}):this.matAutocompleteTrigger&&(this.matAutocompleteTrigger?.panelOpen||requestAnimationFrame(()=>{this.matAutocompleteTrigger?.openPanel(),this.matAutocompleteTrigger?.updatePosition(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10)})),setTimeout(()=>{this.viewport?.scrollToIndex(1),this.viewport?.scrollToIndex(0)},50)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent openPanelOptimized: ",e)}}closePanel(){try{this.trigger?(this.trigger.closePanel(),this.inputFilterFormControl.setValue("")):this.matAutocompleteTrigger&&this.matAutocompleteTrigger.closePanel(),this.type!=="contact"&&(this.selectedAutocompleteData=void 0),setTimeout(()=>{this.autocompleteStateChanged.emit(!1)},300)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent closePanel: ",e)}}disableAutocompleteAtPosition(e){try{this.autocompleteDisabledPositions.add(e),setTimeout(()=>{this.autocompleteDisabledPositions.delete(e)},3e4)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent disableAutocompleteAtPosition: ",t)}}isAutocompleteDisabledAtPosition(e,t,r){try{let a=-1;for(let s of r){let c=e.lastIndexOf(s,t);c>a&&(a=c)}return a!==-1&&this.autocompleteDisabledPositions.has(a)}catch(a){return this.loggingService.catch("Error in AutocompletePanelComponent isAutocompleteDisabledAtPosition: ",a),!1}}};o.\u0275fac=function(t){return new(t||o)(h(Ue),h(ll),h(xi),h(y),h(R),h(Mi),h(_i),h(Jt),h(jr),h(qs),h(qe),h(S),h(di),h(we),h($d))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-panel-internal"]],viewQuery:function(t,r){if(t&1&&(nt(wXt,5),nt(OXt,5),nt(AXt,5),nt(PXt,5)),t&2){let a;Xe(a=Qe())&&(r.matAutocomplete=a.first),Xe(a=Qe())&&(r.matAutocompleteTrigger=a.first),Xe(a=Qe())&&(r.autocompletePanelInput=a.first),Xe(a=Qe())&&(r.viewport=a.first)}},hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{type:"type",trigger:[0,"autocompletePanelTrigger","trigger"],triggerElement:[0,"autocompletePanelTriggerElement","triggerElement"],hideInput:"hideInput",placeholder:"placeholder",metadata:"metadata",enableOnFocus:"enableOnFocus",position:[0,"autocompletePanelPosition","position"],excludeContacts:"excludeContacts",showAtHere:"showAtHere"},outputs:{optionSelected:"optionSelected",atHereSelected:"atHereSelected",userContactOptionSelected:"userContactOptionSelected",customOptionSelected:"customOptionSelected",groupOptionSelected:"groupOptionSelected",enterPressed:"enterPressed",autocompleteStateChanged:"autocompleteStateChanged"},standalone:!1,features:[V([S]),B],decls:8,vars:17,consts:[["matAutocomplete","matAutocomplete"],["userContactRef",""],["autocompletePanelInput","","matAutocompleteTrigger","matAutocompleteTrigger"],["viewport",""],["role","combobox",1,"velt-autocomplete-panel"],[1,"velt-autocomplete-panel--input"],["type","text","autofocus","","autofocus","",3,"placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition","keyup","keydown","keyup.escape","input",4,"ngIf"],["role","listbox",1,"velt-autocomplete-panel--autocomplete",3,"optionSelected","autoActiveFirstOption","hideSingleSelectionIndicator","snippylyOverlay","snippylyOverlayZIndex","displayWith"],["class","velt-autocomplete-panel--container",3,"s-comment-autocomplete-panel-dark",4,"veltIf"],["type","text","autofocus","","autofocus","",3,"keyup","keydown","keyup.escape","input","placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition"],[1,"velt-autocomplete-panel--container"],["itemSize","55","minBufferPx","350","maxBufferPx","600","templateCacheSize","350","class","velt-autocomplete-panel--viewport",4,"ngIf"],["class","velt-autocomplete-panel--normal-viewport",4,"ngIf"],["itemSize","55","minBufferPx","350","maxBufferPx","600","templateCacheSize","350",1,"velt-autocomplete-panel--viewport"],[3,"disabled","value","velt-group-option","velt-group-member-option","pointerdown","pointerup",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"pointerdown","pointerup","disabled","value"],[4,"ngIf"],[3,"componentConfigSignal","group","groupName"],[1,"velt-group-member"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"velt-autocomplete-panel--normal-viewport"],[3,"disabled","value","velt-group-option","velt-group-member-option","pointerdown","pointerup",4,"ngFor","ngForOf","ngForTrackBy"],[3,"componentConfigSignal","selectorItem","isNewContact"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",4)(1,"div",5),g(2,RXt,3,8,"input",6),b()(),_(3,"mat-autocomplete",7,0),G("optionSelected",function(c){return N(a),F(r.onOptionSelected(c))}),g(5,KXt,5,9,"div",8),b(),g(6,ZXt,1,3,"ng-template",null,1,Te)}if(t&2){let a=de(4);x("data-testid",r.componentId)("aria-expanded",r.trigger==null?null:r.trigger.panelOpen)("aria-haspopup",!0)("aria-controls",r.componentId),m(),x("data-testid",r.componentId+"-input-container"),m(),d("ngIf",!r.hideInput),m(),d("autoActiveFirstOption",!0)("hideSingleSelectionIndicator",!0)("snippylyOverlay",a)("snippylyOverlayZIndex",2147483627)("displayWith",r.displayFn),m(2),d("veltIf",k(14,kXt,r.conditionSignal(),A(12,MXt,r.componentConfigSignal)))}},dependencies:[vt,X,_t,_F,ny,Tf,xS,mP,TS,mi,w0,l_,ae,XN],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%], .velt-autocomplete-panel--autocomplete{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%], .velt-autocomplete-panel--autocomplete:has(>.s-comment-autocomplete-panel-dark){--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}[_nghost-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;line-height:1.5;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));font-family:var(--velt-default-font-family)}[_nghost-%COMP%] *[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert}.velt-autocomplete-panel[_ngcontent-%COMP%]{position:relative;width:100%}.velt-autocomplete-panel--input[_ngcontent-%COMP%]{width:100%}.velt-autocomplete-panel--input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;padding:8px;border-radius:var(--velt-border-radius-sm);background:var(--velt-background-0);color:var(--velt-text-1);font-size:14px;line-height:1.5;outline:none}.velt-autocomplete-panel--input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:var(--velt-border-4)} .velt-autocomplete-panel--autocomplete{background:var(--velt-background-0);border:1px solid var(--velt-border-2);border-radius:var(--velt-border-radius-sm);box-shadow:0 2px 4px #0000001a;max-height:256px;overflow:auto} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar{display:none;width:0;height:0} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar{width:0;height:0} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar-button{width:0;height:0} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel{padding:0} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item{font-size:14px;line-height:1.5;height:auto;padding:8px 16px;background:var(--velt-background-0)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item:hover:not(.mdc-list-item--disabled){background:var(--velt-background-2)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item.mat-mdc-option-active{background:var(--velt-background-3)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item .mdc-list-item__primary-text{color:var(--velt-text-1);width:100%} .velt-autocomplete-panel--autocomplete .cdk-virtual-scroll-viewport{height:100%;width:100%;max-height:256px;background:var(--velt-background-0)} .velt-autocomplete-panel--autocomplete .cdk-virtual-scroll-viewport .cdk-virtual-scroll-content-wrapper{max-width:100%;width:100%;box-sizing:border-box} .velt-autocomplete-panel--autocomplete .velt-autocomplete-panel--container{background:var(--velt-background-0)} .cdk-overlay-pane{z-index:1000!important} .cdk-overlay-container .cdk-overlay-connected-position-bounding-box .cdk-overlay-pane .mat-mdc-autocomplete-panel.velt-autocomplete-panel--autocomplete{background:var(--velt-background-0);border:1px solid var(--velt-border-2);border-radius:var(--velt-border-radius-sm);box-shadow:0 2px 4px #0000001a}.velt-autocomplete-panel--viewport[_ngcontent-%COMP%]{height:256px;width:100%;background:var(--velt-background-0);scrollbar-width:none}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%]{max-height:256px;width:100%;overflow-y:auto;background:var(--velt-background-0);scrollbar-width:none}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-option[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-6, #666);text-overflow:ellipsis;font-size:12px;font-style:normal;font-weight:400;line-height:normal;text-transform:uppercase;padding:4px 12px;border-top:1px solid var(--velt-border-2);margin-top:12px}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-option[_ngcontent-%COMP%]:first-child{border-top:none;margin-top:0}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-toggle[_ngcontent-%COMP%]{font-size:10px;color:var(--velt-text-2)}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-member-option[_ngcontent-%COMP%]{padding-left:28px;background-color:var(--velt-background-0)}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-member[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});let i=o;return i})();function XXt(i,o){if(i&1){let n=Y();f(0),_(1,"div",23)(2,"div",24),te(3),b(),_(4,"div",25),G("click",function(){let t=N(n).$implicit,r=l();return F(r.removeSelectedUserToInvite(t))}),le(),_(5,"svg",26),w(6,"path",7),b()()(),v()}if(i&2){let n=o.$implicit;m(3),Ge((n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email))}}function QXt(i,o){if(i&1){let n=Y();f(0),_(1,"div",31),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectRole(t))}),le(),_(2,"svg",32),w(3,"path",33),b(),ut(),_(4,"div")(5,"h4"),te(6),P(7,"translate"),b(),_(8,"p"),te(9),P(10,"translate"),b()()(),v()}if(i&2){let n=o.$implicit,e=o.first,t=l(2);m(),ge("border-top",!e),m(),it("visibility",(t.selectedUserRole==null?null:t.selectedUserRole.id)===(n==null?null:n.id)?"visible":"hidden"),m(4),Ge(M(7,6,n==null?null:n.name)),m(3),Ge(M(10,8,n==null?null:n.description))}}function JXt(i,o){if(i&1&&(_(0,"div",27)(1,"div",28),g(2,QXt,11,10,"ng-container",12),b(),te(3),P(4,"translate"),le(),_(5,"svg",29),w(6,"path",30),b()()),i&2){let n=l();ge("disabled",!n.isUserAdmin),m(2),d("ngForOf",n.userRoles),m(),Ce(" ",M(4,4,n.selectedUserRole==null?null:n.selectedUserRole.name)," ")}}function eQt(i,o){i&1&&(le(),_(0,"svg",32),w(1,"path",44),b())}function tQt(i,o){if(i&1&&(_(0,"div",41),te(1),P(2,"translate"),g(3,eQt,2,0,"svg",43),b()),i&2){let n=l().$implicit,e=l(2);m(),Ce(" ",M(2,2,n==null||n.role==null?null:n.role.name)," "),m(2),d("ngIf",e.isUserAdmin&&(n==null||n.user==null?null:n.user.email)!==(e.user==null?null:e.user.email))}}function nQt(i,o){if(i&1){let n=Y();_(0,"div",28)(1,"div",45),G("click",function(){N(n);let t=l().$implicit,r=l(2);return F(r.removeUser(t))}),te(2),P(3,"translate"),b()()}i&2&&(m(2),Ce(" ",M(3,1,"Remove")," "))}function iQt(i,o){if(i&1&&(f(0),_(1,"div",38)(2,"div",39),w(3,"snippyly-user-avatar",40),te(4),b(),_(5,"div",41)(6,"app-overlay-tooltip",42),g(7,tQt,4,4,"ng-template",null,1,Te)(9,nQt,4,3,"ng-template",null,2,Te),b()()(),v()),i&2){let n=o.$implicit,e=l(2);m(3),d("user",n==null?null:n.user)("background","#625DF5"),m(),Ce(" ",(n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email)," "),m(2),d("disabled",!(e.isUserAdmin&&(n==null||n.user==null?null:n.user.email)!==(e.user==null?null:e.user.email)))}}function oQt(i,o){i&1&&(f(0),_(1,"div"),te(2),P(3,"translate"),b(),v()),i&2&&(m(2),Ge(M(3,1,"No users are added.")))}function rQt(i,o){if(i&1&&(_(0,"div",34)(1,"div",35),te(2),P(3,"translate"),b(),g(4,iQt,11,4,"ng-container",36)(5,oQt,4,3,"ng-container",37),b()),i&2){let n=l();m(2),Ge(M(3,4,"People on this project")),m(2),d("ngForOf",n.documentUsers)("ngForTrackBy",n.trackByDocumentUserId),m(),d("ngIf",!(n.documentUsers!=null&&n.documentUsers.length))}}function aQt(i,o){if(i&1&&(f(0),_(1,"div",38)(2,"div",39),w(3,"snippyly-user-avatar",40),te(4),P(5,"translate"),b()(),v()),i&2){let n=o.$implicit;m(3),d("user",n)("background","#625DF5"),m(),Ce(" ",M(5,3,(n==null?null:n.name)||(n==null?null:n.email))," ")}}function sQt(i,o){if(i&1&&(_(0,"div",38)(1,"div",39),w(2,"snippyly-user-avatar",40),te(3),P(4,"translate"),b(),_(5,"div",27),te(6),P(7,"translate"),b()()),i&2){let n=l().$implicit;m(2),d("user",n)("background","#625DF5"),m(),Ce(" ",M(4,4,(n==null?null:n.name)||(n==null?null:n.email))," "),m(3),Ce(" ",M(7,6,"Invited")," ")}}function lQt(i,o){if(i&1&&(f(0),g(1,sQt,8,8,"div",46),v()),i&2){let n=o.$implicit,e=l(2);m(),d("ngIf",!e.huddleUsersByEmailMap[n==null?null:n.email])}}function cQt(i,o){if(i&1&&(_(0,"div",34)(1,"div",35),te(2),P(3,"translate"),b(),g(4,aQt,6,5,"ng-container",36)(5,lQt,2,1,"ng-container",36),b()),i&2){let n=l();m(2),Ge(M(3,5,"People on this huddle")),m(2),d("ngForOf",n.huddleUsers)("ngForTrackBy",n.trackByHuddleUserId),m(),d("ngForOf",n.huddleInvitees)("ngForTrackBy",n.trackByHuddleInviteeId)}}function dQt(i,o){if(i&1){let n=Y();_(0,"div",47)(1,"div",48),te(2),P(3,"translate"),b(),_(4,"div",49)(5,"div",28)(6,"div",31),G("click",function(){N(n);let t=l();return F(t.changeDocumentAccessType(t.DocumentAccessTypes.PUBLIC))}),le(),_(7,"svg",32),w(8,"path",33),b(),ut(),_(9,"div")(10,"h3"),te(11),P(12,"translate"),P(13,"titlecase"),b(),_(14,"p"),te(15),P(16,"translate"),b()()(),_(17,"div",45),G("click",function(){N(n);let t=l();return F(t.changeDocumentAccessType(t.DocumentAccessTypes.RESTRICTED))}),le(),_(18,"svg",32),w(19,"path",33),b(),ut(),_(20,"div")(21,"h3"),te(22),P(23,"translate"),P(24,"titlecase"),b(),_(25,"p"),te(26),P(27,"translate"),b()()()(),le(),_(28,"svg",32),w(29,"path",50)(30,"path",51)(31,"path",52),b(),ut(),_(32,"div",53)(33,"h3"),te(34),P(35,"translate"),P(36,"titlecase"),b(),_(37,"p"),te(38),P(39,"translate"),b()()()()}if(i&2){let n=l();m(2),Ge(M(3,11,"General access")),m(5),it("visibility",!n.documentAccessType||n.documentAccessType===n.DocumentAccessTypes.PUBLIC?"visible":"hidden"),m(4),Ge(M(13,15,M(12,13,n.DocumentAccessTypes.PUBLIC))),m(4),Ge(M(16,17,n.documentAccessTypeMap[n.DocumentAccessTypes.PUBLIC]==null?null:n.documentAccessTypeMap[n.DocumentAccessTypes.PUBLIC].description)),m(3),it("visibility",n.documentAccessType===n.DocumentAccessTypes.RESTRICTED?"visible":"hidden"),m(4),Ge(M(24,21,M(23,19,n.DocumentAccessTypes.RESTRICTED))),m(4),Ge(M(27,23,n.documentAccessTypeMap[n.DocumentAccessTypes.RESTRICTED]==null?null:n.documentAccessTypeMap[n.DocumentAccessTypes.RESTRICTED].description)),m(8),Ge(M(36,27,M(35,25,n.documentAccessType||n.DocumentAccessTypes.PUBLIC))),m(4),Ce("",M(39,29,n.documentAccessTypeMap[n.documentAccessType?n.documentAccessType:n.DocumentAccessTypes.PUBLIC]==null?null:n.documentAccessTypeMap[n.documentAccessType?n.documentAccessType:n.DocumentAccessTypes.PUBLIC].description)," ")}}function mQt(i,o){i&1&&(le(),_(0,"svg",54),w(1,"path",55),b())}function pQt(i,o){i&1&&(le(),_(0,"svg",56),w(1,"path",57),b())}var F0e=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u,C,E,D){this.analyticsService=e,this.authService=t,this.configService=r,this.docService=a,this.documentUserAccessService=s,this.huddleService=c,this.loggingService=p,this.iamService=u,this.toastService=C,this.dialogRef=E,this.usersToInvite=[],this.documentUsers=[],this.huddleInvitees=[],this.huddleUsers=[],this.huddleUsersByEmailMap={},this.userRoles=[],this.excludeContacts=[],this.linkCopied=!1,this.hideAccessControlDropdown=!1,this.subscriptions=[],this.title="Share project",this.placeholder="Add email address",this.documentAccessType="",this.DocumentAccessTypes=yi,this.isUserAdmin=!1,this.documentAccessTypeMap=j.DocumentAccessTypeMap,this.documentUserAccessList=!0,this.veltElement=!0;try{D&&(this.hideAccessControlDropdown=!!D.hideAccessControlDropdown,this.type=D.type,this.source=D.source,D.title&&(this.title=D.title),D.placeholder&&(this.placeholder=D.placeholder),this.documentUserAccessList=!!D.documentUserAccessList,this.inviteUrl=D.inviteUrl),this.subscriptions.push(this.authService.getUser$().subscribe(L=>{this.user=L})),this.subscriptions.push(this.iamService.isUserAdmin$().subscribe(L=>{this.isUserAdmin=L})),this.subscriptions.push(this.configService.getSF$().subscribe(L=>{L?this.documentAccessTypeMap=j.DocumentAccessTypeMapSF:this.documentAccessTypeMap=j.DocumentAccessTypeMap})),this.type!=="invite"&&this.subscriptions.push(this.documentUserAccessService.getDocumentUsers$().subscribe(L=>{this.documentUsers=L,this.updateExcludeContacts()})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getRoles$().subscribe(L=>{this.userRoles=L,this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(z=>z.name===vo.COMMENTER))})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getDocumentIAM$().subscribe(L=>{this.documentAccessType=this.docService.getDocumentAccessType(L)})),this.type==="invite"&&(this.subscriptions.push(this.huddleService.getHuddleAttendees$().subscribe(L=>{this.huddleUsers=L,this.huddleUsersByEmailMap={},L.forEach(z=>{z.email&&(this.huddleUsersByEmailMap[z.email]=z)})})),this.subscriptions.push(this.huddleService.getHuddleInvitees$().subscribe(L=>{this.huddleInvitees=L})))}catch(L){this.loggingService.catch("Error in UserInviteDialogComponent constructor: ",L)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-user-invite-dialog"),this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(e=>e.name===vo.COMMENTER))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnInit: ",e)}}updateExcludeContacts(){try{this.excludeContacts=[],this.excludeContacts.push(...this.documentUsers.map(e=>e.user)),this.excludeContacts.push(...this.usersToInvite.map(e=>e.user))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent updateExcludeContacts: ",e)}}trackByDocumentUserId(e,t){return t.id}trackByHuddleUserId(e,t){return t.userSnippylyId||t.userId}trackByHuddleInviteeId(e,t){return t.userId||t.email}selectRole(e){try{this.selectedUserRole=e}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent selectRole: ",t)}}onUserSelected(e){try{let t=new pk;t.id=e.email?bt(e.email):bt(e.userId),t.user=e,this.usersToInvite.find(r=>r.id===t.id)||this.usersToInvite.push(t),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent onUserSelected: ",t)}}inviteSelectedUsers(){try{if(this.usersToInvite?.length)if(this.type==="invite"){let e=this.usersToInvite.map(t=>t.user);this.analyticsService.trackEvent(Z.Events.InviteDialog.USER_INVITED,{source:this.source}),this.huddleService.inviteUsers(e),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}else{this.usersToInvite.forEach(a=>{this.selectedUserRole&&(a.role=this.selectedUserRole)});let e=this.usersToInvite.filter(a=>a.role?.name===vo.ADMIN).map(a=>a.user.email),t=this.usersToInvite.filter(a=>a.role?.name===vo.COMMENTER).map(a=>a.user.email),r={actionType:bj.INVITE,userInvite:{admin:e?.length?{emails:e,emailProperties:{url:this.getInviteUrl()}}:void 0,commenter:t?.length?{emails:t,clientDocumentId:this.docService.getDocumentPaths()?.clientDocumentId,documentId:this.docService.getDocumentPaths()?.documentId,clientOrganizationId:this.user?.clientOrganizationId,organizationId:this.user?.organizationId,emailProperties:{url:this.getInviteUrl()}}:void 0}};this.documentUserAccessService.updateNotificationsDatabase(r),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}this.usersToInvite=[]}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent inviteSelectedUsers: ",e)}}removeSelectedUserToInvite(e){try{this.usersToInvite=this.usersToInvite.filter(t=>t.id!==e.id),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeSelectedUserToInvite: ",t)}}updateUserRole(e,t){try{let r=e?.role?.name,a=t?.name;e.role=t,this.documentUserAccessService.updateDocumentUser(e,{oldAccess:r,newAccess:a})}catch(r){this.loggingService.catch("Error in UserInviteDialogComponent updateUserRole: ",r)}}removeUser(e){try{this.analyticsService.trackEvent(Z.Events.ShareDialog.DOCUMENT_USER_ACCESS_REMOVED,{targetUserId:e?.user?.userId,targetUserEmail:e?.user?.email,roleType:e?.role?.name}),this.documentUserAccessService.removeDocumentUser(e),this.toastService.setToast({message:"User removed!",type:"success",duration:2e3})}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeUser: ",t)}}getInviteUrl(){try{return this.inviteUrl||window.location.href}catch(e){return this.loggingService.catch("Error in UserInviteDialogComponent getInviteUrl: ",e),""}}copyLink(){try{let e=this.getInviteUrl();this.linkCopied=!0,Os(e),setTimeout(()=>{this.linkCopied=!1},2e3),this.type==="invite"?this.analyticsService.trackEvent(Z.Events.InviteDialog.INVITE_LINK_COPIED,{source:this.source}):this.type==="share"&&this.analyticsService.trackEvent(Z.Events.ShareDialog.SHARE_LINK_COPIED)}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent copyLink: ",e)}}changeDocumentAccessType(e){try{this.documentAccessType!==e&&(this.analyticsService.trackEvent(Z.Events.ShareDialog.DOCUMENT_ACCESS_CHANGED,{oldAccessType:this.documentAccessType,newAccessType:e}),this.docService.changeDocumentAccessType(e),this.toastService.setToast({message:"Access changed to '"+e+"'.",type:"success",duration:2e3}))}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent changeDocumentAccessType: ",t)}}closeDialog(){try{this.dialogRef.close()}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Ft),h(st),h(M0e),h(fr),h(y),h(fn),h(zd),h(nr),h(Ol,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-invite-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:32,vars:27,consts:[["userSelectorRef",""],["triggerTemplate",""],["tooltipTemplate",""],[1,"s-video-settings-modal",3,"click","pointerdown","pointerup"],[1,"s-video-header"],[1,"s-video-header-name"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-cursor-pointer",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","#80808A"],[1,"s-video-settings-modal-item"],[1,"s-input"],[1,"s-input-chip-list-container"],[1,"s-chip-list"],[4,"ngFor","ngForOf"],[1,"s-input-user-selector",3,"optionSelected","placeholder","enableOnFocus"],["class","s-role dropdown",3,"disabled",4,"ngIf"],["class","s-video-settings-modal-item s-people-list-container",4,"ngIf"],["class","s-general-access-container",4,"ngIf"],[1,"s-buttons-wrap"],[1,"s-button","s-secondary",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary",3,"click"],[1,"s-chip"],[1,"s-chip-user"],[1,"s-chip-remove",3,"click"],["width","14","height","14","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],[1,"s-role","dropdown"],[1,"dropdown-content"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"dropdown-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.79289 9.79289C8.18342 9.40237 8.81658 9.40237 9.20711 9.79289L12 12.5858L14.7929 9.79289C15.1834 9.40237 15.8166 9.40237 16.2071 9.79289C16.5976 10.1834 16.5976 10.8166 16.2071 11.2071L12.7071 14.7071C12.3166 15.0976 11.6834 15.0976 11.2929 14.7071L7.79289 11.2071C7.40237 10.8166 7.40237 10.1834 7.79289 9.79289Z","fill","#D4D6DF"],[1,"dropdown-item",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#80808A"],[1,"s-video-settings-modal-item","s-people-list-container"],[1,"s-people-list-title"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"s-user"],[1,"s-user-info"],[1,"s-flex",3,"user","background"],[1,"s-role"],[3,"disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#404044"],[1,"dropdown-item","border-top",3,"click"],["class","s-user",4,"ngIf"],[1,"s-general-access-container"],[1,"s-general-access-title"],[1,"s-button","s-secondary","s-document-access-btn","dropdown"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 11C10.2274 11 8.64844 11.0646 7.35838 11.1466C6.13471 11.2243 5.19379 12.158 5.10597 13.373C5.0435 14.2373 5 15.1481 5 16C5 16.8519 5.0435 17.7627 5.10597 18.627C5.19379 19.842 6.13471 20.7757 7.35838 20.8534C8.64844 20.9354 10.2274 21 12 21C13.7726 21 15.3516 20.9354 16.6416 20.8534C17.8653 20.7757 18.8062 19.842 18.894 18.627C18.9565 17.7627 19 16.8519 19 16C19 15.1481 18.9565 14.2373 18.894 13.373C18.8062 12.158 17.8653 11.2243 16.6416 11.1466C15.3516 11.0646 13.7726 11 12 11ZM7.2315 9.15059C5.01376 9.29156 3.27137 11.0124 3.11117 13.2288C3.04652 14.1234 3 15.085 3 16C3 16.915 3.04652 17.8766 3.11118 18.7712C3.27137 20.9876 5.01376 22.7084 7.23151 22.8494C8.55778 22.9337 10.1795 23 12 23C13.8205 23 15.4422 22.9337 16.7685 22.8494C18.9862 22.7084 20.7286 20.9876 20.8888 18.7712C20.9535 17.8766 21 16.915 21 16C21 15.085 20.9535 14.1234 20.8888 13.2288C20.7286 11.0124 18.9862 9.29156 16.7685 9.15059C15.4422 9.06629 13.8205 9 12 9C10.1795 9 8.55778 9.06629 7.2315 9.15059Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M13 16.7324C13.5978 16.3866 14 15.7403 14 15C14 13.8954 13.1046 13 12 13C10.8954 13 10 13.8954 10 15C10 15.7403 10.4022 16.3866 11 16.7324V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V16.7324Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 6C7 3.23858 9.23858 1 12 1C14.7614 1 17 3.23858 17 6V10C17 10.5523 16.5523 11 16 11C15.4477 11 15 10.5523 15 10V6C15 4.34315 13.6569 3 12 3C10.3431 3 9 4.34315 9 6V10C9 10.5523 8.55228 11 8 11C7.44772 11 7 10.5523 7 10V6Z","fill","#777E91"],[1,"s-document-access-btn-content"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.49027 2.50491C6.46607 2.50996 6.34731 2.53007 6.22635 2.54966C5.17052 2.72053 4.19457 3.45245 3.69214 4.45019C3.56689 4.69886 3.43711 5.08311 3.37864 5.3784C3.31829 5.68302 3.31829 14.3108 3.37864 14.6154C3.52088 15.3336 3.85013 15.9526 4.36233 16.4647C4.76978 16.8722 5.22723 17.1555 5.75266 17.3256C6.23219 17.4809 6.32453 17.4891 7.59205 17.4891H8.76711L8.88599 17.4104C9.06906 17.2893 9.14407 17.146 9.14407 16.9173C9.14407 16.6887 9.06909 16.5453 8.88611 16.4242L8.76728 16.3455L7.6068 16.3286C6.3852 16.3109 6.35854 16.3081 5.96566 16.1588C5.43291 15.9564 4.86723 15.3934 4.67143 14.8707C4.49992 14.4129 4.51091 14.747 4.51091 9.9969C4.51091 5.24677 4.49992 5.58091 4.67143 5.12308C4.88025 4.56564 5.45367 4.01728 6.0476 3.80712C6.46364 3.65989 6.4966 3.65865 9.67189 3.66895C12.8862 3.67939 12.6707 3.6688 13.1239 3.83838C13.3521 3.92374 13.6919 4.15074 13.8939 4.35272C14.0958 4.5547 14.3228 4.89447 14.4082 5.12264C14.5641 5.53916 14.5639 5.53763 14.5816 6.87392L14.5983 8.13484L14.6679 8.24677C14.7061 8.30835 14.791 8.39412 14.8563 8.43737C14.9554 8.50291 15.0078 8.51605 15.1701 8.51605C15.3324 8.51605 15.3848 8.50291 15.4839 8.43737C15.5492 8.39412 15.6341 8.30835 15.6723 8.24677L15.7419 8.13484V6.85925C15.7419 5.89002 15.7321 5.53438 15.7012 5.3784C15.4231 3.97403 14.4078 2.9182 13.0001 2.56948C12.7554 2.50887 12.6941 2.50764 9.64257 2.50177C7.93299 2.49849 6.51446 2.4999 6.49027 2.50491ZM10.1326 4.86732C10.0008 4.90764 9.81429 5.10144 9.77661 5.23721C9.75922 5.29976 9.74547 5.6244 9.74538 5.97344C9.74517 6.73161 9.7789 6.93488 9.97026 7.32843C10.0835 7.56132 10.1471 7.64839 10.358 7.85928C10.5687 8.06997 10.6561 8.13387 10.8888 8.24715C11.3004 8.44752 11.4993 8.4781 12.3174 8.46675L12.9899 8.4574L13.1087 8.37872C13.2923 8.25712 13.3667 8.11437 13.3667 7.88344C13.3667 7.72342 13.3533 7.6705 13.288 7.57182C13.2448 7.50646 13.159 7.42162 13.0974 7.38336C12.9898 7.31647 12.9581 7.31319 12.2817 7.29876C11.6484 7.28524 11.5646 7.27759 11.4445 7.22234C11.2497 7.13276 11.1074 6.99491 11.0146 6.80594C10.9336 6.64091 10.9327 6.63267 10.9182 5.93556C10.904 5.25876 10.9008 5.2275 10.8339 5.11986C10.6956 4.89741 10.3918 4.788 10.1326 4.86732ZM15.7049 9.14973C15.3168 9.21439 14.8688 9.42637 14.5091 9.71547C14.1903 9.97168 12.9551 11.227 12.785 11.4677C12.6151 11.708 12.4379 12.0846 12.3662 12.3575C12.2934 12.6347 12.2934 13.2178 12.3662 13.4864C12.4763 13.8923 12.7739 14.3816 12.9941 14.5185C13.1571 14.6198 13.4451 14.6146 13.6071 14.5074C13.7916 14.3853 13.8652 14.2433 13.8652 14.0094C13.8652 13.8346 13.8552 13.8007 13.7698 13.6869C13.7174 13.6169 13.6316 13.474 13.5792 13.3691C13.4922 13.1949 13.4842 13.1559 13.4861 12.9146C13.4901 12.4126 13.6018 12.2459 14.588 11.2695C15.3768 10.4885 15.479 10.4117 15.8541 10.3176C16.4471 10.1688 17.0959 10.642 17.1542 11.2659C17.1867 11.6138 17.0539 11.95 16.7418 12.3102C16.554 12.527 16.5067 12.6446 16.5261 12.8468C16.5522 13.1185 16.7716 13.3292 17.0627 13.362C17.163 13.3733 17.2272 13.3595 17.3476 13.3006C17.6751 13.1404 18.1188 12.4832 18.2617 11.9469C18.4137 11.3768 18.3213 10.7383 18.0102 10.209C17.8837 9.99361 17.4606 9.57059 17.2452 9.444C16.7724 9.16618 16.2292 9.06241 15.7049 9.14973ZM14.7568 12.1471C14.6858 12.1846 14.588 12.2715 14.5396 12.3402C14.4628 12.4494 14.4517 12.4903 14.4517 12.6643C14.4517 12.846 14.4612 12.8773 14.5601 13.021C14.869 13.4698 14.893 13.8775 14.6373 14.3344C14.5091 14.5636 13.051 16.0217 12.8218 16.15C12.3282 16.4261 11.818 16.3718 11.4502 16.0041C11.1691 15.723 11.0679 15.3616 11.1645 14.9843C11.2245 14.75 11.3364 14.5523 11.5457 14.3107C11.7336 14.0939 11.7808 13.9764 11.7614 13.7742C11.7353 13.5024 11.5159 13.2917 11.2249 13.259C11.1245 13.2476 11.0603 13.2615 10.9399 13.3204C10.6125 13.4806 10.1687 14.1377 10.0258 14.674C9.87388 15.2442 9.96627 15.8826 10.2773 16.4119C10.4039 16.6273 10.8269 17.0504 11.0423 17.177C11.5716 17.488 12.2101 17.5804 12.7802 17.4284C13.0265 17.3628 13.41 17.1783 13.6407 17.0145C13.8608 16.858 14.9432 15.8056 15.2867 15.4139C15.9653 14.64 16.1624 13.7239 15.8293 12.8919C15.562 12.2242 15.1512 11.9389 14.7568 12.1471Z","fill","#80808A"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#ABABB5"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",3),G("click",function(c){return N(a),F(c.stopPropagation())})("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),F(c.stopPropagation())}),_(1,"div",4)(2,"div",5),te(3),P(4,"translate"),b(),le(),_(5,"svg",6),G("click",function(){return N(a),F(r.closeDialog())}),w(6,"path",7),b()(),ut(),_(7,"div",8),te(8),P(9,"translate"),_(10,"div",9)(11,"div",10)(12,"div",11),g(13,XXt,7,1,"ng-container",12),b(),_(14,"velt-autocomplete-panel-internal",13,0),P(16,"translate"),G("optionSelected",function(c){return N(a),F(r.onUserSelected(c))}),b()(),g(17,JXt,7,6,"div",14),b()(),g(18,rQt,6,6,"div",15)(19,cQt,6,7,"div",15)(20,dQt,40,31,"div",16),_(21,"div",17)(22,"div",18),G("click",function(){return N(a),F(r.copyLink())}),g(23,mQt,2,0,"svg",19)(24,pQt,2,0,"svg",20),te(25),P(26,"translate"),P(27,"translate"),b(),w(28,"div",21),_(29,"div",22),G("click",function(){return N(a),F(r.inviteSelectedUsers())}),te(30),P(31,"translate"),b()()()}t&2&&(m(3),Ce(" ",M(4,15,r.title)," "),m(5),Ce(" ",M(9,17,"Invite users")," "),m(5),d("ngForOf",r.usersToInvite),m(),d("placeholder",M(16,19,r.placeholder))("enableOnFocus",!1),m(3),d("ngIf",!r.hideAccessControlDropdown),m(),d("ngIf",r.documentUserAccessList&&(r.documentUsers==null?null:r.documentUsers.length)),m(),d("ngIf",(r.huddleInvitees==null?null:r.huddleInvitees.length)||(r.huddleUsers==null?null:r.huddleUsers.length)),m(),d("ngIf",r.isUserAdmin&&!r.hideAccessControlDropdown),m(3),d("ngIf",!r.linkCopied),m(),d("ngIf",r.linkCopied),m(),Ce(" ",r.linkCopied?M(26,21,"Link Copied!"):M(27,23,"Copy Link")," "),m(4),ge("s-disabled",!(r.usersToInvite!=null&&r.usersToInvite.length)),m(),Ge(M(31,25,"Send invite")))},dependencies:[vt,X,Kn,Zd,xg,QN,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#dcdde0!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}*[_ngcontent-%COMP%]{box-sizing:border-box}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%], .s-buttons-wrap[_ngcontent-%COMP%], .s-role[_ngcontent-%COMP%], .s-user[_ngcontent-%COMP%], .s-user-info[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#ababb5!important;font-size:.8rem!important;gap:1rem!important}.s-people-list-container[_ngcontent-%COMP%]{overflow:auto!important}.s-people-list-container[_ngcontent-%COMP%] .s-people-list-title[_ngcontent-%COMP%]{position:sticky!important;top:0!important;background:#141416!important;width:100%!important;z-index:1!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:2rem!important;gap:2rem!important;background:#141416!important;border-radius:1rem!important;max-width:42rem!important;width:80vw!important;border:2px solid #303034!important;overflow:auto!important;max-height:80vh!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important}.s-video-header-name[_ngcontent-%COMP%]{gap:.5rem!important;font-weight:600!important;font-size:1.2rem!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-secondary[_ngcontent-%COMP%]{border:2px solid #303034!important;border-radius:.5rem!important;color:#ababb5!important;gap:.5rem!important}.s-secondary[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:1rem!important;color:#fff!important;padding:.5rem 0!important}.s-input[_ngcontent-%COMP%]{padding:1rem!important;color:#ababb5!important;width:100%!important;justify-content:space-between!important;border-radius:1rem!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.s-buttons-wrap[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important;align-items:stretch!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-user[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important}.s-user-info[_ngcontent-%COMP%]{color:#ababb5!important;gap:.75rem!important}.s-user[_ngcontent-%COMP%] .s-role[_ngcontent-%COMP%]{color:#404044!important}.s-role[_ngcontent-%COMP%]{position:relative!important;cursor:pointer!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:100%!important;right:0!important;z-index:10!important}.dropdown[_ngcontent-%COMP%] .dropdown-content.top[_ngcontent-%COMP%]{top:auto!important;bottom:2rem!important}.dropdown-content[_ngcontent-%COMP%]{min-width:max-content!important;overflow:hidden!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:.5rem!important;border:1px solid #303034!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#ababb5!important;background:#141416!important;cursor:pointer!important;transition:.2s ease!important}.dropdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#ababb5!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{display:none!important;visibility:hidden!important;opacity:0!important}.dropdown[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{width:24px!important;min-width:24px!important}.dropdown.disabled[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{display:none!important}.dropdown[_ngcontent-%COMP%]:not(.disabled):hover .dropdown-content[_ngcontent-%COMP%]{display:flex!important;visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:1em 2rem 1rem 1rem!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:1em!important;line-height:1rem!important;border-radius:0!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown-item[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff!important;margin:0!important}.dropdown-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.border-top[_ngcontent-%COMP%]{outline:solid 1px #303034!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important}.s-input-chip-list-container[_ngcontent-%COMP%]{display:flex;width:100%!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%]{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%]{padding:8px 16px!important;background:#222226!important;color:#dcdde0!important;border-radius:100px!important;display:flex!important;align-items:center!important;gap:8px!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%] .s-chip-remove[_ngcontent-%COMP%]{display:flex!important;cursor:pointer!important}.s-input-chip-list-container[_ngcontent-%COMP%] velt-autocomplete-panel-internal.s-input-user-selector[_ngcontent-%COMP%]{flex-basis:250px!important}.s-general-access-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;width:100%!important;gap:8px!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%]{position:relative!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%]{position:relative!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;justify-content:flex-start!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{left:0!important;top:auto!important;bottom:100%!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#ababb5!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector{flex-grow:1!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector input{background:transparent!important;border:0!important;outline:0!important;color:#fff!important}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-user-invite-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-video-settings-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-chip-user{word-break:break-all!important}}"],changeDetection:0});let i=o;return i})();function gQt(i,o){i&1&&(_(0,"div",4),le(),_(1,"svg",5)(2,"g"),w(3,"path",6)(4,"path",7)(5,"path",8),b()()())}function uQt(i,o){if(i&1){let n=Y();_(0,"div")(1,"slot",9),G("slotchange",function(){N(n);let t=l();return F(t.onButtonSlotChange())}),_(2,"div",10),le(),_(3,"svg",11),w(4,"path",12),b()()()()}}var Zw=(()=>{let o=class o extends Je{set _disabled(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.disabled=t}set _documentUserAccessList(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.documentUserAccessList=t}constructor(e,t,r,a,s,c){super(s,r,void 0,void 0,void 0,c,t),this.analyticsService=e,this.loggingService=t,this.themeService=r,this.dialog=a,this.elementRef=s,this.dynamicDataService=c,this.type="share",this.disabled=!1,this.documentUserAccessList=!0,this.hideAccessControlDropdown=!1,this.accessControlDropdown=!0,this.veltElement=!0,this.customButtonAdded=!1}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}onButtonSlotChange(){this.customButtonAdded=!0}openInviteDialog(){try{this.disabled||(this.type==="share"&&this.analyticsService.trackEvent(Z.Events.ShareDialog.SHARE_BUTTON_CLICKED),this.dialog.open(F0e,{panelClass:"velt-mat-dialog-container",backdropClass:"s-background-blur-1",data:{title:this.title,placeholder:this.placeholder,hideAccessControlDropdown:this.hideAccessControlDropdown||!this.accessControlDropdown,type:this.type,source:this.source,documentUserAccessList:this.documentUserAccessList,inviteUrl:this.inviteUrl}}))}catch(e){this.loggingService.catch("Error in UserInviteToolComponent openInviteDialog: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(y),h(qe),h(no),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-invite-tool-internal"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{type:"type",source:"source",title:"title",placeholder:"placeholder",inviteUrl:"inviteUrl",_disabled:[0,"disabled","_disabled"],_documentUserAccessList:[0,"documentUserAccessList","_documentUserAccessList"],hideAccessControlDropdown:"hideAccessControlDropdown",accessControlDropdown:"accessControlDropdown"},standalone:!1,features:[V([S]),B],decls:4,vars:3,consts:[["part","container",1,"s-user-invite-tool-container","s-cursor-pointer",3,"click"],[1,"s-user-invite-tool-default",3,"ngSwitch"],["class","s-user-invite-tool-button",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"s-user-invite-tool-button"],["width","32","height","32","viewBox","0 0 32 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.3589 13.3008C17.3965 13.3008 15.6521 14.2519 14.5622 15.7174C14.1206 15.6247 13.6692 15.5768 13.2136 15.5768C9.6054 15.5768 6.66992 18.5123 6.66992 22.1205C6.66992 22.5918 7.05207 22.974 7.52344 22.974H14.67C15.7651 24.3594 17.4599 25.25 19.3589 25.25C22.6533 25.25 25.3335 22.5698 25.3335 19.2754C25.3335 15.981 22.6533 13.3008 19.3589 13.3008ZM8.45235 21.2669C8.85669 19.0058 10.8378 17.2839 13.2136 17.2839C13.3823 17.2839 13.5501 17.2933 13.7166 17.3104C13.5016 17.9261 13.3843 18.5873 13.3843 19.2754C13.3843 19.9735 13.505 20.6437 13.726 21.2669H8.45235ZM19.3589 23.543C17.0057 23.543 15.0913 21.6286 15.0913 19.2754C15.0913 16.9223 17.0057 15.0078 19.3589 15.0078C21.712 15.0078 23.6265 16.9223 23.6265 19.2754C23.6265 21.6286 21.712 23.543 19.3589 23.543Z","fill","white"],["d","M13.2132 13.8716C15.182 13.8716 16.7837 12.2699 16.7837 10.3011C16.7837 8.33224 15.182 6.73047 13.2132 6.73047C11.2443 6.73047 9.64258 8.33224 9.64258 10.3011C9.64258 12.2699 11.2443 13.8716 13.2132 13.8716ZM13.2132 8.4375C14.2408 8.4375 15.0767 9.2735 15.0767 10.3011C15.0767 11.3286 14.2408 12.1645 13.2132 12.1645C12.1856 12.1645 11.3496 11.3286 11.3496 10.3011C11.3496 9.2735 12.1856 8.4375 13.2132 8.4375Z","fill","white"],["d","M21.0664 18.4219H20.2129V17.5684C20.2129 17.097 19.8308 16.7148 19.3594 16.7148C18.888 16.7148 18.5059 17.097 18.5059 17.5684V18.4219H17.6523C17.181 18.4219 16.7988 18.804 16.7988 19.2754C16.7988 19.7468 17.181 20.1289 17.6523 20.1289H18.5059V20.9824C18.5059 21.4538 18.888 21.836 19.3594 21.836C19.8308 21.836 20.2129 21.4538 20.2129 20.9824V20.1289H21.0664C21.5378 20.1289 21.9199 19.7468 21.9199 19.2754C21.9199 18.804 21.5378 18.4219 21.0664 18.4219Z","fill","white"],["name","button",3,"slotchange"],["part","button-container",1,"action-btn"],["part","button-icon","width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M8.57143 9.42858H7.71429C7.25963 9.42858 6.82359 9.60919 6.5021 9.93068C6.18061 10.2522 6 10.6882 6 11.1429V18C6 18.4547 6.18061 18.8907 6.5021 19.2122C6.82359 19.5337 7.25963 19.7143 7.71429 19.7143H16.2857C16.7404 19.7143 17.1764 19.5337 17.4979 19.2122C17.8194 18.8907 18 18.4547 18 18V11.1429C18 10.6882 17.8194 10.2522 17.4979 9.93068C17.1764 9.60919 16.7404 9.42858 16.2857 9.42858H15.4286M12 13.7143V4.28572M12 4.28572L9.42857 6.85715M12 4.28572L14.5714 6.85715","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&(_(0,"div",0),G("click",function(){return r.openInviteDialog()}),_(1,"div",1),g(2,gQt,6,0,"div",2)(3,uQt,5,0,"div",3),b()()),t&2&&(m(),d("ngSwitch",r.type),m(),d("ngSwitchCase","invite"),m(),d("ngSwitchCase","share"))},dependencies:[Gi,to],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}:host{display:inline-flex!important}.s-user-invite-tool-container{display:inline-block!important}.s-user-invite-tool-button{display:flex!important}.action-btn{display:inline-flex;justify-content:center;align-items:center;padding:6px!important;border-radius:var(--legacy-velt-tool-border-radius);border:var(--legacy-velt-tool-border);background-color:var(--legacy-velt-tool-bg-color);color:var(--legacy-velt-tool-icon-color);cursor:pointer}.action-btn .action-btn-label{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:4px!important;font-weight:700!important;color:currentColor!important}.action-btn .action-btn-icon{width:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));color:currentColor}.action-btn .toolbar-icon-dropdown-arrow{width:16px;height:16px;color:currentColor}.action-btn:focus{border-radius:var(--legacy-velt-tool-focus-border-radius);border:var(--legacy-velt-tool-focus-border);background-color:var(--legacy-velt-tool-focus-bg-color);color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:focus .action-btn-icon{width:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:focus .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:hover{border-radius:var(--legacy-velt-tool-hover-border-radius);border:var(--legacy-velt-tool-hover-border);background-color:var(--legacy-velt-tool-hover-bg-color);color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:hover .action-btn-icon{width:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:hover .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:active,.action-btn.active{border-radius:var(--legacy-velt-tool-active-border-radius);border:var(--legacy-velt-tool-active-border);background-color:var(--legacy-velt-tool-active-bg-color);color:var(--legacy-velt-tool-active-icon-color)}.action-btn:active .action-btn-icon,.action-btn.active .action-btn-icon{width:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:active .toolbar-icon-dropdown-arrow,.action-btn.active .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-active-icon-color)}
512
+ `],encapsulation:3,changeDetection:0});let i=o;return i})();function dXt(i,o){if(i&1&&(_(0,"span",7),te(1),P(2,"translate"),b()),i&2){let n=l(2).ngIf;m(),Ce(" ",n.user!=null&&n.user.name?n.user==null||n.user.name==null?null:n.user.name.charAt(0):M(2,1,n.user==null||n.user.email==null?null:n.user.email.charAt(0)),"")}}function mXt(i,o){if(i&1){let n=Y();_(0,"img",8),G("error",function(){N(n);let t=l(3);return F(t.onImageLoadError())}),b()}if(i&2){let n=l(2).ngIf;d("src",n.user.photoUrl,un)}}function pXt(i,o){if(i&1&&(_(0,"div",3)(1,"span",4),P(2,"translate"),g(3,dXt,3,3,"span",5)(4,mXt,1,1,"ng-template",null,0,Te),b(),w(6,"audio",6),b()),i&2){let n=de(5),e=l().ngIf;m(),it("color",e.user.color+" !important")("background-color",e.user.color+" !important"),d("title",M(2,8,(e.user==null?null:e.user.name)||(e.user==null?null:e.user.email))),m(2),d("ngIf",e.showInitial)("ngIfElse",n),m(3),d("srcObject",e.remoteAudioStream)}}function gXt(i,o){if(i&1&&(f(0),g(1,pXt,7,10,"div",2),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.user)}}var A0e=(()=>{let o=class o{constructor(e){this.loggingService=e,this.veltElement=!0,this.componentConfigSignal=De({user:this.user,showInitial:!1,remoteAudioStream:this.remoteAudioStream})}ngOnInit(){}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling AudioHuddleUserComponent FUNCTION: ngOnChanges","color: green;"),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in AudioHuddleUserComponent ngOnChanges: ",t)}}onImageLoadError(){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showInitial:!0}),e))}catch(e){this.loggingService.catch("Error in AudioHuddleUserComponent onImageLoadError: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-audio-huddle-user"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{user:"user",remoteAudioStream:"remoteAudioStream"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["showAvatarImgRef",""],[4,"ngIf"],["class","audio-huddle-user photo-container",4,"ngIf"],[1,"audio-huddle-user","photo-container"],["velt-ignore-change-detection","true",1,"audio-huddle-user",3,"title"],["class","audio-huddle-user-initial",4,"ngIf","ngIfElse"],["autoplay","true",3,"srcObject"],[1,"audio-huddle-user-initial"],["referrerpolicy","no-referrer","loading","lazy",1,"audio-huddle-user-image",3,"error","src"]],template:function(t,r){t&1&&g(0,gXt,2,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.audio-huddle-user[_ngcontent-%COMP%]{display:none!important}.photo-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:40px;height:40px;box-sizing:border-box;background-clip:padding-box;border-radius:50%;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;transition:top .12s ease-in-out,width .12s ease-in-out,height .12s ease-in-out}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;object-fit:cover}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.s-presence-container[_ngcontent-%COMP%]{display:inline-flex;flex-direction:row-reverse;align-items:center}.audio-huddle-user[_ngcontent-%COMP%]{position:relative;box-shadow:0 0 0 3px;border-radius:50%;overflow:hidden;width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));min-width:calc((2rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2rem + 0px) * var(--velt-base-rem-unit));display:flex;align-items:center;justify-content:center}.audio-huddle-user.more-users[_ngcontent-%COMP%]{background:#4578a7;box-shadow:0 0 0 3px #4578a7}.audio-huddle-user[_ngcontent-%COMP%]:not(:last-child):not(.more-users){margin-left:calc((-.5rem + 0px) * var(--velt-base-rem-unit))!important}.audio-huddle-user-image[_ngcontent-%COMP%]{width:100%;height:100%;display:block;object-fit:cover}.audio-huddle-user-image-small[_ngcontent-%COMP%]{width:calc((1.6rem + 0px) * var(--velt-base-rem-unit));height:100%;display:block;object-fit:cover}.audio-huddle-user-initial[_ngcontent-%COMP%]{color:#fff}.away[_ngcontent-%COMP%]{filter:grayscale(1)}"],changeDetection:0});let i=o;return i})();function hXt(i,o){if(i&1){let n=Y();_(0,"div",18),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectAudioDevice(t))}),te(1),P(2,"translate"),b()}if(i&2){let n=o.$implicit,e=l(2);ge("selected",n.deviceId===(e.selectedAudioDevice==null?null:e.selectedAudioDevice.deviceId)),m(),Ce(" ",M(2,3,n.label)," ")}}function fXt(i,o){if(i&1&&(_(0,"div",12)(1,"div",13),te(2),P(3,"translate"),b(),te(4),P(5,"translate"),_(6,"div",14)(7,"div",15),g(8,hXt,3,5,"div",16),b(),te(9),P(10,"translate"),le(),_(11,"svg",4),w(12,"path",17),b()()()),i&2){let n=l();m(2),Ge(M(3,4,"Audio")),m(2),Ce(" ",M(5,6,"Microphone")," "),m(4),d("ngForOf",n.audioDevices),m(),Ce(" ",M(10,8,n.selectedAudioDevice==null?null:n.selectedAudioDevice.label)," ")}}function vXt(i,o){if(i&1){let n=Y();_(0,"div",18),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectVideoDevice(t))}),te(1),P(2,"translate"),b()}if(i&2){let n=o.$implicit,e=l(2);ge("selected",n.deviceId===(e.selectedVideoDevice==null?null:e.selectedVideoDevice.deviceId)),m(),Ce(" ",M(2,3,n.label)," ")}}function CXt(i,o){if(i&1&&(_(0,"div",12)(1,"div",13),te(2),P(3,"translate"),b(),te(4),P(5,"translate"),_(6,"div",14)(7,"div",15),g(8,vXt,3,5,"div",16),b(),te(9),P(10,"translate"),le(),_(11,"svg",4),w(12,"path",17),b()()()),i&2){let n=l();m(2),Ge(M(3,4,"Video")),m(2),Ce(" ",M(5,6,"Camera")," "),m(4),d("ngForOf",n.videoDevices),m(),Ce(" ",M(10,8,n.selectedVideoDevice==null?null:n.selectedVideoDevice.label)," ")}}var P0e=(()=>{let o=class o{constructor(e,t,r){this.loggingService=e,this.dialogRef=t,this.devices=[],this.audioDevices=[],this.videoDevices=[],this.settingsVisible={audio:!0,video:!0},this.defaultMediaSourceOptions=wc(),this.veltElement=!0;try{r&&(this.selectedAudioDevice=r.selectedAudioDevice,this.selectedVideoDevice=r.selectedVideoDevice,r.settingsVisible&&(this.settingsVisible=r.settingsVisible)),this.getDevices()}catch(a){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent constructor: ",a)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-media-source-options-dialog")}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent ngOnInit: ",e)}}getDevices(){return Q(this,null,function*(){try{let e=new zn;if(e.getBrowserName()?.toLowerCase()==="safari"||e.getBrowserName()?.toLowerCase()==="firefox")try{let t=yield navigator.mediaDevices.getUserMedia({audio:!0,video:!0});t&&t.getTracks().forEach(r=>r.stop())}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices getUserMedia catch: ",t)}navigator.mediaDevices.enumerateDevices().then(t=>{if(this.devices=t.filter(r=>r.kind==="audioinput"||r.kind==="videoinput"),this.audioDevices=this.devices.filter(r=>r.kind==="audioinput"),this.videoDevices=this.devices.filter(r=>r.kind==="videoinput"),this.audioDevices.length>0&&!this.selectedAudioDevice){if(this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId){let r=this.audioDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedAudioDevice?.deviceId);r&&(this.selectedAudioDevice=r)}this.selectedAudioDevice||(this.selectedAudioDevice=this.audioDevices[0])}if(this.videoDevices.length>0&&!this.selectedVideoDevice){if(this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId){let r=this.videoDevices.find(a=>a.deviceId===this.defaultMediaSourceOptions?.selectedVideoDevice?.deviceId);r&&(this.selectedVideoDevice=r)}this.selectedVideoDevice||(this.selectedVideoDevice=this.videoDevices[0])}}).catch(t=>{this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices enumerateDevices catch: ",t)})}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent getDevices: ",e)}})}selectAudioDevice(e){try{this.selectedAudioDevice=e}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectAudioDevice: ",t)}}selectVideoDevice(e){try{this.selectedVideoDevice=e}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent selectVideoDevice: ",t)}}saveChanges(){try{let e={};this.settingsVisible.audio&&(e.selectedAudioDevice=this.selectedAudioDevice),this.settingsVisible.video&&(e.selectedVideoDevice=this.selectedVideoDevice),localStorage.setItem(j.LOCAL_STORAGE.SNIPPYLY_DEFAULT_MEDIA_SOURCE_OPTIONS,JSON.stringify(e||{})),this.closeDialog(e)}catch(e){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent saveChanges: ",e)}}closeDialog(e){try{this.dialogRef.close(e)}catch(t){this.loggingService.catch("Error in MediaSourceOptionsDialogComponent closeDialog: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(nr),h(Ol,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-media-source-options-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:17,vars:10,consts:[["mediaSourceOptionsDialogRef",""],[1,"s-video-settings-modal",3,"pointerdown","pointerup","click","snippylyOverlay","snippylyOverlayZIndex"],[1,"s-video-header"],[1,"s-video-header-name"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.5 12C19.5 11.77 19.49 11.55 19.47 11.32L21.33 9.91C21.73 9.61 21.84 9.05 21.59 8.61L19.72 5.38C19.47 4.94 18.93 4.76 18.47 4.96L16.32 5.87C15.95 5.61 15.56 5.38 15.15 5.19L14.86 2.88C14.8 2.38 14.37 2 13.87 2H10.14C9.63 2 9.2 2.38 9.14 2.88L8.85 5.19C8.44 5.38 8.05 5.61 7.68 5.87L5.53 4.96C5.07 4.76 4.53 4.94 4.28 5.38L2.41 8.62C2.16 9.06 2.27 9.61 2.67 9.92L4.53 11.33C4.51 11.55 4.5 11.77 4.5 12C4.5 12.23 4.51 12.45 4.53 12.68L2.67 14.09C2.27 14.39 2.16 14.95 2.41 15.39L4.28 18.62C4.53 19.06 5.07 19.24 5.53 19.04L7.68 18.13C8.05 18.39 8.44 18.62 8.85 18.81L9.14 21.12C9.2 21.62 9.63 22 10.13 22H13.86C14.36 22 14.79 21.62 14.85 21.12L15.14 18.81C15.55 18.62 15.94 18.39 16.31 18.13L18.46 19.04C18.92 19.24 19.46 19.06 19.71 18.62L21.58 15.39C21.83 14.95 21.72 14.4 21.32 14.09L19.46 12.68C19.49 12.45 19.5 12.23 19.5 12ZM12.04 15.5C10.11 15.5 8.54 13.93 8.54 12C8.54 10.07 10.11 8.5 12.04 8.5C13.97 8.5 15.54 10.07 15.54 12C15.54 13.93 13.97 15.5 12.04 15.5Z","fill","white"],[1,"s-icon-button",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","white"],["class","s-video-settings-modal-item",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary","s-save-button",3,"click"],[1,"s-video-settings-modal-item"],[1,"s-heading"],[1,"s-input","dropdown"],[1,"dropdown-content"],["class","dropdown-item",3,"selected","click",4,"ngFor","ngForOf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#80808A"],[1,"dropdown-item",3,"click"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",1,0),G("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),F(c.stopPropagation())})("click",function(c){return N(a),F(c.stopPropagation())}),_(2,"div",2)(3,"div",3),le(),_(4,"svg",4),w(5,"path",5),b(),te(6),P(7,"translate"),b(),ut(),_(8,"div",6),G("click",function(){return N(a),F(r.closeDialog())}),le(),_(9,"svg",7),w(10,"path",8),b()()(),g(11,fXt,13,10,"div",9)(12,CXt,13,10,"div",9),ut(),w(13,"div",10),_(14,"div",11),G("click",function(){return N(a),F(r.saveChanges())}),te(15),P(16,"translate"),b()()}if(t&2){let a=de(1);d("snippylyOverlay",a)("snippylyOverlayZIndex",3e3),m(6),Ce(" ",M(7,6,"Settings")," "),m(5),d("ngIf",r.settingsVisible==null?null:r.settingsVisible.audio),m(),d("ngIf",r.settingsVisible==null?null:r.settingsVisible.video),m(3),Ge(M(16,8,"Save changes"))}},dependencies:[vt,X,mi,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%]{display:flex!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#91919c!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;background:#141416!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:calc((40rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important;align-items:center!important}.s-video-header-name[_ngcontent-%COMP%]{gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;font-size:calc((1.2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:hover{background:#4f4bbf!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) 0!important}.s-input[_ngcontent-%COMP%]{position:relative!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#91919c!important;width:100%!important;justify-content:space-between!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:0!important;right:0!important;z-index:1!important}.dropdown-content[_ngcontent-%COMP%]{width:100%!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034!important;color:#91919c!important;background:#141416!important;cursor:pointer!important;visibility:hidden!important;opacity:0!important;transition:all .1s ease!important}.dropdown[_ngcontent-%COMP%]:hover .dropdown-content[_ngcontent-%COMP%]{visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:calc((1.2rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;transition:all .1s ease!important;color:#91919c!important}.dropdown-item.selected[_ngcontent-%COMP%]{color:#fff!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-icon-button[_ngcontent-%COMP%]{padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:100px!important;cursor:pointer!important}.s-icon-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#777e91!important}.s-icon-button[_ngcontent-%COMP%]:hover{background:#222226!important}.s-icon-button[_ngcontent-%COMP%]:hover svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog{max-width:unset} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}@media screen and (max-width: 768px){.s-video-settings-modal[_ngcontent-%COMP%]{width:calc(.8 * var(--legacy-velt-viewport-width))!important}}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-media-source-options-dialog{width:calc(1 * var(--legacy-velt-viewport-width))!important;max-width:calc(1 * var(--legacy-velt-viewport-width))!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{width:calc(1 * var(--legacy-velt-viewport-width))!important;height:calc(1 * var(--legacy-velt-viewport-height))!important;border-radius:calc((0rem + 0px) * var(--velt-base-rem-unit))!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .s-video-settings-modal{width:calc(1 * var(--legacy-velt-viewport-width))!important;height:calc(1 * var(--legacy-velt-viewport-height))!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-media-source-options-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface .s-save-button{width:100%!important}}"],changeDetection:0});let i=o;return i})();var M0e=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u){this.authService=e,this.configService=t,this.contactService=r,this.docService=a,this.commonDbService=s,this.databaseService=c,this.loggingService=p,this.notificationService=u,this.documentUsers$=new ve([]);try{this.databaseService.getDb().pipe(Le(C=>!!C),at(1)).subscribe(C=>{C&&this.subscribeUsersFromDocument()}),this.authService.getUser$().subscribe(C=>{if(C?.email){this.subscribeUsersFromDocument();let E=bt(C.email);C?.organizationId&&(E=bt(C.userId)),this.getDocumentUserByIdFromDb(E).then(D=>{D&&(D.user.name=C.name,D.user.photoUrl=C.photoUrl,this.updateDocumentUser(D))}).catch(D=>{this.loggingService.catch("Error in DocumentUserAccessService getDocumentUserByIdFromDb:",D)})}},C=>{this.loggingService.catch("Error in DocumentUserAccessService getUser$:",C)})}catch(C){this.loggingService.catch("Error in DocService constructor:",C)}}getDocumentUserByIdFromDb(e){return Q(this,null,function*(){try{let t=this.docService.getDocumentPaths();return t?(yield this.commonDbService.dbListener({feature:"documentUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!1,id:e}}).pipe(at(1)).toPromise())?.data:void 0}catch(t){this.loggingService.catch("Error in DocService getDocumentUserById:",t);return}})}subscribeUsersFromDocument(){try{this.documentUsersSubscription&&this.documentUsersSubscription.unsubscribe(),this.documentUsersSubscription=this.authService.getUser$().pipe(he(e=>e?this.docService.getDocumentPaths$().pipe(Le(t=>!!t),he(t=>this.commonDbService.dbListener({feature:"allDocumentUsers",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!0}}).pipe(ce(r=>r?.data?Object.values(r?.data):[])))):se([]))).subscribe(e=>{this.documentUsers$.next(e)},e=>{this.loggingService.catch("Error in DocService subscribeUsersFromDocument subscription:",e)})}catch(e){this.loggingService.catch("Error in DocService subscribeUsersFromDocument:",e)}}getDocumentUsers$(){return this.documentUsers$.asObservable()}addDocumentUser(e){try{let t=this.authService.getUser();if(t){if(this.configService.getSF()){if(e?.role?.name===vo.ADMIN)this.contactService.addGlobalContact(e.user);else if(e?.role?.name===vo.COMMENTER){let a=t.groupId;if(a){let s=JSON.parse(JSON.stringify(e.user));s.visibility="group",this.contactService.setLoggedInUserGroupContacts(a,[s])}}}e.id=bt(e?.user?.email),e.invitedBy=t,e.invitedDate=this.timestamp;let r=this.docService.getDocumentPaths();r&&this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:r?.documentId??"",organizationId:r?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}else this.loggingService.error("Error in DocService addDocumentUser: User not found")}catch(t){this.loggingService.catch("Error in DocService addDocumentUser:",t)}}updateDocumentUser(e,t={}){try{let r=this.authService.getUser();if(r){e.updatedBy=r,e.updatedDate=this.timestamp;let a=this.docService.getDocumentPaths();this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:a?.documentId??"",organizationId:a?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}}catch(r){this.loggingService.catch("Error in DocumentUserAccessService updateDocumentUser:",r)}}removeDocumentUser(e){try{let t=this.docService.getDocumentPaths();this.commonDbService.deleteData({feature:"documentUserAccess",properties:{id:e.id,documentId:t?.documentId??"",organizationId:t?.organizationId??""}})}catch(t){this.loggingService.catch("Error in DocumentUserAccessService removeDocumentUser:",t)}}updateNotificationsDatabase(e={}){try{let t=I({notificationSource:"user"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in DocumentUserAccessService updateNotificationsDatabase: ",t)}}get timestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(ee(Ue),ee(Ft),ee(xi),ee(st),ee(hn),ee(Tn),ee(y),ee(mn))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var yXt=["triggerTemplate"],SXt=["tooltipTemplate"],bXt=["trigger"],IXt=["overlay"],EXt=()=>["snippyly-overlay-panel","snippyly-reaction-dialog-overlay-panel","velt-overlay-panel"];function xXt(i,o){i&1&&je(0)}function TXt(i,o){i&1&&je(0)}function DXt(i,o){if(i&1){let n=Y();_(0,"div",6,2),G("pointerenter",function(){N(n);let t=l();return F(t.showTooltip())})("pointerleave",function(){N(n);let t=l();return F(t.hideTooltip())}),g(2,TXt,1,0,"ng-container",4),b()}if(i&2){let n=de(1),e=l();d("snippylyOverlay",n)("snippylyOverlayZIndex",2e3),x("data-velt-element",!0),m(2),d("ngTemplateOutlet",e.tooltipTemplate)}}var Zd=(()=>{let o=class o{constructor(e){this.loggingService=e,this.positions=[],this.disableClose=!0,this.disabled=!1,this.componentConfigSignal=De({disabled:!1,tooltipVisible:!1,overlayPositions:[]}),this.veltElement=!0}ngOnInit(){}ngOnChanges(e){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnChanges","color: green;");try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e.positions&&this.componentConfigSignal.update(t=>(t=T(I({},t),{overlayPositions:this.positions.map(r=>new Ii({originX:r.originX,originY:r.originY},{overlayX:r.overlayX,overlayY:r.overlayY}))}),t))}catch(t){this.loggingService.catch("Error in OverlayTooltipComponent ngOnChanges: ",t)}}showTooltip(){this.loggingService.log("%c[WB] Calling FUNCTION: showTooltip","color: green;");try{this.hideTooltipTimeout&&clearTimeout(this.hideTooltipTimeout),this.componentConfigSignal.update(e=>(e=T(I({},e),{tooltipVisible:!0}),e))}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent showTooltip: ",e)}}hideTooltip(){this.loggingService.log("%c[WB] Calling FUNCTION: hideTooltip","color: green;");try{this.hideTooltipTimeout&&clearTimeout(this.hideTooltipTimeout),this.hideTooltipTimeout=setTimeout(()=>{this.componentConfigSignal.update(e=>(e=T(I({},e),{tooltipVisible:!1}),e))},200)}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent hideTooltip: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.hideTooltip()}catch(e){this.loggingService.catch("Error in OverlayTooltipComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["app-overlay-tooltip"]],contentQueries:function(t,r,a){if(t&1&&(Hs(a,yXt,7),Hs(a,SXt,7)),t&2){let s;Xe(s=Qe())&&(r.triggerTemplate=s.first),Xe(s=Qe())&&(r.tooltipTemplate=s.first)}},viewQuery:function(t,r){if(t&1&&(nt(bXt,5),nt(IXt,5)),t&2){let a;Xe(a=Qe())&&(r.trigger=a.first),Xe(a=Qe())&&(r.overlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{positions:"positions",disableClose:"disableClose",disabled:"disabled"},standalone:!1,features:[Ze],decls:5,vars:8,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],["overlayContent",""],["cdkOverlayOrigin","",3,"pointerenter","pointerleave"],[4,"ngTemplateOutlet"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],["data-velt-comment-disabled","true",3,"pointerenter","pointerleave","snippylyOverlay","snippylyOverlayZIndex"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",3,0),G("pointerenter",function(){return N(a),F(r.showTooltip())})("pointerleave",function(){return N(a),F(r.hideTooltip())}),g(2,xXt,1,0,"ng-container",4),b(),g(3,DXt,3,4,"ng-template",5,1,Te)}if(t&2){let a=de(1);m(2),d("ngTemplateOutlet",r.triggerTemplate),m(),d("cdkConnectedOverlayOrigin",a)("cdkConnectedOverlayPanelClass",gt(7,EXt))("cdkConnectedOverlayOpen",!r.componentConfigSignal().disabled&&r.componentConfigSignal().tooltipVisible)("cdkConnectedOverlayPositions",r.componentConfigSignal().overlayPositions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",r.disableClose)}},dependencies:[_t,on,en,mi],encapsulation:2,changeDetection:0});let i=o;return i})();var wXt=["matAutocomplete"],OXt=["matAutocompleteTrigger"],AXt=["autocompletePanelInput"],PXt=["viewport"],MXt=i=>({componentConfigSignal:i}),kXt=(i,o)=>({condition:i,data:o}),k0e=i=>({$implicit:i}),R0e=(i,o)=>({$implicit:i,isNewContact:o});function RXt(i,o){if(i&1){let n=Y();_(0,"input",9,2),G("keyup",function(t){return N(n),F(t.stopPropagation())})("keydown",function(t){return N(n),F(t.stopPropagation())})("keyup.escape",function(t){return N(n),l().closePanel(),F(t.stopPropagation())})("input",function(t){return N(n),l().handleInput(t),F(t.stopPropagation())}),b()}if(i&2){let n=l(),e=de(4);d("placeholder",n.placeholder||"")("matAutocomplete",e)("matAutocompleteDisabled",!n.enableOnFocus)("matAutocompletePosition",n.position),x("aria-label",n.placeholder||"Search")("aria-autocomplete","list")("aria-controls",n.componentId+"-input")("data-testid",n.componentId+"-input")}}function NXt(i,o){if(i&1&&(f(0),w(1,"velt-autocomplete-group-option-internal",17),v()),i&2){let n=l().$implicit,e=l(3);m(),d("componentConfigSignal",e.componentConfigSignal)("group",n.group)("groupName",n.groupName)}}function FXt(i,o){i&1&&je(0)}function LXt(i,o){if(i&1&&(f(0),_(1,"div",18),g(2,FXt,1,0,"ng-container",19),b(),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(2),d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,k0e,n.originalItem))}}function BXt(i,o){i&1&&je(0)}function VXt(i,o){if(i&1&&(f(0),g(1,BXt,1,0,"ng-container",19),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",k(2,R0e,n.originalItem,n.isNewContact))}}function UXt(i,o){if(i&1){let n=Y();_(0,"mat-option",15),G("pointerdown",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("pointerup",function(t){let r=N(n).$implicit,a=l(3);return t.stopPropagation(),r.isGroupHeader?t.preventDefault():a.onOptionClick(r.originalItem),F(t.preventDefault())}),g(1,NXt,2,3,"ng-container",16)(2,LXt,3,4,"ng-container",16)(3,VXt,2,5,"ng-container",16),b()}if(i&2){let n=o.$implicit;ge("velt-group-option",n.isGroupHeader)("velt-group-member-option",n.isGroupMember),d("disabled",n==null?null:n.disabled)("value",n.originalItem),x("id",n.id)("aria-disabled",n==null?null:n.disabled)("data-testid",n.testId),m(),d("ngIf",n.isGroupHeader),m(),d("ngIf",n.isGroupMember),m(),d("ngIf",!n.isGroupHeader&&!n.isGroupMember)}}function jXt(i,o){if(i&1&&(_(0,"cdk-virtual-scroll-viewport",13,3),g(2,UXt,4,12,"mat-option",14),P(3,"async"),b()),i&2){let n=l(2);m(2),d("cdkVirtualForOf",M(3,2,n.componentConfigSignal().flattenedItems$))("cdkVirtualForTrackBy",n.trackByFlattenedItem)}}function $Xt(i,o){if(i&1&&(f(0),w(1,"velt-autocomplete-group-option-internal",17),v()),i&2){let n=l().$implicit,e=l(3);m(),d("componentConfigSignal",e.componentConfigSignal)("group",n.group)("groupName",n.groupName)}}function HXt(i,o){i&1&&je(0)}function zXt(i,o){if(i&1&&(f(0),_(1,"div",18),g(2,HXt,1,0,"ng-container",19),b(),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(2),d("ngTemplateOutlet",e)("ngTemplateOutletContext",A(2,k0e,n.originalItem))}}function GXt(i,o){i&1&&je(0)}function WXt(i,o){if(i&1&&(f(0),g(1,GXt,1,0,"ng-container",19),v()),i&2){let n=l().$implicit;l(3);let e=de(7);m(),d("ngTemplateOutlet",e)("ngTemplateOutletContext",k(2,R0e,n.originalItem,n.isNewContact))}}function qXt(i,o){if(i&1){let n=Y();_(0,"mat-option",15),G("pointerdown",function(t){return N(n),t.stopPropagation(),F(t.preventDefault())})("pointerup",function(t){let r=N(n).$implicit,a=l(3);return t.stopPropagation(),r.isGroupHeader?t.preventDefault():a.onOptionClick(r.originalItem),F(t.preventDefault())}),g(1,$Xt,2,3,"ng-container",16)(2,zXt,3,4,"ng-container",16)(3,WXt,2,5,"ng-container",16),b()}if(i&2){let n=o.$implicit;ge("velt-group-option",n.isGroupHeader)("velt-group-member-option",n.isGroupMember),d("disabled",n==null?null:n.disabled)("value",n.originalItem),x("id",n.id)("aria-disabled",n==null?null:n.disabled)("data-testid",n.testId),m(),d("ngIf",n.isGroupHeader),m(),d("ngIf",n.isGroupMember),m(),d("ngIf",!n.isGroupHeader&&!n.isGroupMember)}}function YXt(i,o){if(i&1&&(_(0,"div",20),g(1,qXt,4,12,"mat-option",21),P(2,"async"),b()),i&2){let n=l(2);m(),d("ngForOf",M(2,2,n.componentConfigSignal().flattenedItems$))("ngForTrackBy",n.trackByFlattenedItem)}}function KXt(i,o){if(i&1&&(_(0,"div",10),g(1,jXt,4,4,"cdk-virtual-scroll-viewport",11),P(2,"async"),g(3,YXt,3,4,"div",12),P(4,"async"),b()),i&2){let n,e,t=l();ge("s-comment-autocomplete-panel-dark",t.darkMode),x("data-testid",t.componentId+"-options-container"),m(),d("ngIf",(((n=M(2,5,t.componentConfigSignal().flattenedItems$))==null?null:n.length)||0)>6),m(2),d("ngIf",(((e=M(4,7,t.componentConfigSignal().flattenedItems$))==null?null:e.length)||0)<=6)}}function ZXt(i,o){if(i&1&&w(0,"velt-autocomplete-option-internal",22),i&2){let n=o.$implicit,e=o.isNewContact,t=l();d("componentConfigSignal",t.componentConfigSignal)("selectorItem",n)("isNewContact",e)}}var xg=(()=>{let o=class o extends Je{get trigger(){return this._trigger}set trigger(e){this._trigger=e,this.setTriggerToMatAutocomplete(),this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus,this.trigger._handleInput=this.handleInput.bind(this))}get triggerElement(){return this._triggerElement}set triggerElement(e){if(this._triggerElement=e,this.triggerElement){let t=new R(this.triggerElement);this.trigger=new Nb(t,this.overlay,this.viewContainerRef,{run:r=>r(),runOutsideAngular:r=>r()},this.cd,null,this.directionality,null,document,this.viewportRuler)}}get enableOnFocus(){return this._enableOnFocus}set enableOnFocus(e){this._enableOnFocus=e,this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus)}get excludeContacts(){return this._excludeContacts}set excludeContacts(e){this._excludeContacts=e,this.filterOptions()}constructor(e,t,r,a,s,c,p,u,C,E,D,L,z,W,J){super(s,D,void 0,void 0,void 0,L,a),this.authService=e,this.autocompleteService=t,this.contactService=r,this.loggingService=a,this.elementRef=s,this.overlay=c,this.viewContainerRef=p,this.cd=u,this.directionality=C,this.viewportRuler=E,this.themeService=D,this.dynamicDataService=L,this.commentActionsService=z,this.commentService=W,this.metadataService=J,this.type="contact",this._enableOnFocus=!1,this.position="auto",this._excludeContacts=[],this.showAtHere=!1,this.optionSelected=new Pe,this.atHereSelected=new Pe,this.userContactOptionSelected=new Pe,this.customOptionSelected=new Pe,this.groupOptionSelected=new Pe,this.enterPressed=new Pe,this.autocompleteStateChanged=new Pe,this.userContacts=[],this.user=null,this.inputFilterFormControl=new qie,this.oldText="",this.newText="",this.wordIndex=-1,this.deviceInfo=new zn,this.userDocumentContacts=[],this.organizationGroups=[],this.subscriptions=[],this.autocompleteDisabledPositions=new Set,this.veltId=En(),this.veltElement=!0,this.componentConfigSignal=De({flattenedItems$:se([]),trackByFlattenedItem:this.trackByFlattenedItem.bind(this),onOptionClick:this.onOptionClick.bind(this),newUserContactError:void 0,newUserContact:void 0,customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1}),this.hereUserContact={name:"here",email:"",userId:"here",visibility:"here"},this.atHereDescription=null,this.dataList=[],this.autocompleteDataMap={},this.atHereEnabled=!1,this.componentId="velt-autocomplete-panel",this.MAX_VISIBLE_ITEMS=10,this.ITEM_SIZE=55;try{this.subscriptions.push(this.commentService.getCustomAutocompleteSearch$().subscribe(ue=>{this.componentConfigSignal.update(ye=>(ye=T(I({},ye),{customAutocompleteSearch:ue}),ye))})),this.subscriptions.push(this.authService.getUser$().subscribe(ue=>{this.user=ue,this.filterOptions()})),this.subscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(ue=>{this.autocompleteDataMap=ue,this.filterOptions()})),this.subscriptions.push(this.inputFilterFormControl.valueChanges.pipe(lr(150),wt()).subscribe(()=>{this.filterOptions()}))}catch(ue){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit:",ue)}}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.type==="contact"?this.selectedAutocompleteData={hotkey:"",type:"contact",data:[]}:this.selectedAutocompleteData=void 0,this.subscriptions.push(this.contactService.getAtHereLabel().subscribe(e=>{this.hereUserContact.name=e})),this.subscriptions.push(this.contactService.getAtHereDescription().subscribe(e=>{this.atHereDescription=e})),this.subscriptions.push(this.contactService.getUserContacts$(this.metadata).subscribe(e=>{this.userContacts=e?.slice(),this.atHereEnabled&&(this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact)),this.filterOptions()})),this.subscriptions.push(this.contactService.getAtHereEnabled$().subscribe(e=>{this.atHereEnabled=e,e?this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact):this.userContacts=this.userContacts.filter(t=>t?.visibility!=="here"),this.filterOptions()})),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{this.organizationGroups=e,this.filterOptions()})),this.subscriptions.push(this.commentService.getExpandMentionGroups$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{expandMentionGroups:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsFirst$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{showMentionGroupsFirst:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsOnly$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{showMentionGroupsOnly:e}),t))})),this.subscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(e=>{this.userDocumentContacts=e,this.filterOptions()}))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","listbox"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{this.setTriggerToMatAutocomplete(),requestAnimationFrame(()=>{if(this.autocompletePanelInput?.nativeElement){this.autocompletePanelInput.nativeElement.focus();let e=this.getViewport();if(e){let t=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;e.style.height=`${t}px`,e.style.maxHeight=`${t}px`}this.openPanelOptimized()}this.triggerElement?this.subscriptions.push(pi(this.triggerElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())})):this.autocompletePanelInput&&this.subscriptions.push(pi(this.autocompletePanelInput.nativeElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())}))})}catch(e){this.loggingService.catch("Error in ngAfterViewInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnDestroy:",e)}}filterOptions(){try{if(this.selectedAutocompleteData)if(this.selectedAutocompleteData.type==="contact"){let e=this.inputFilterFormControl.value,t=new ng,r=e?.toLowerCase()?.trim();t.email=r;let a=new RegExp(j.REGEX_EMAIL).test("@"+t?.email),s=this.userContacts.slice();this.componentConfigSignal().customAutocompleteSearch||(e?s=this._filter(t):s=this.userContacts.slice()),this.atHereEnabled&&this.hereUserContact?.name?.includes(r)&&!s?.find(D=>D?.userId=="here")&&(s=[this.hereUserContact,...s]),s=s.filter(D=>!this.excludeContacts?.find(L=>L?.email===D?.email));let c=e?this._filterGroup(e):this.organizationGroups,p=s.map(D=>{let L=!1;return D.visibility==="here"&&(this.atHereDescription?(D.email=`${this.atHereDescription}`,D.description=this.atHereDescription):this.user?.organizationId&&(D.email=`${this.userDocumentContacts?.length||0} members`,D.description=`${this.userDocumentContacts?.length||0} members`)),{type:"contact",contact:D,disabled:L}}),u=c.map(D=>({type:"group",group:D})),C=[...p,...u];if(this.componentConfigSignal().expandMentionGroups){let D=[],L={},z=new Map;C.forEach(Ie=>{if(Ie.contact?.userId){let Ve=bt(Ie.contact?.userId);z.set(Ve,Ie),L[Ie.contact?.userId]=!1}});let W=new Map;this.organizationGroups.forEach(Ie=>{W.set(Ie.metadata.clientGroupId,{id:Ie.metadata.clientGroupId,name:Ie.metadata.groupName,members:[],userIds:Object.keys(Ie.users||{})})}),W.forEach(Ie=>{Ie.userIds.forEach(Ve=>{let Fe=z.get(Ve);Fe&&(Ie.members.push(Fe),Fe.contact?.userId&&(L[Fe.contact.userId]=!0))})}),C.forEach(Ie=>{Ie.type==="contact"&&Ie.contact?.userId&&!L[Ie.contact?.userId]&&D.push(Ie)});let J=Array.from(W.values()),ue=C.length?void 0:{type:"contact",contact:t},ye=this.createFlattenedItems({allItems:C,contactsWithoutGroup:D,groups:J,newUserContact:ue,isExpandedGroups:!0,isCustomGroups:!1});this.componentConfigSignal.update(Ie=>T(I({},Ie),{flattenedItems$:se(ye),newUserContactError:a?void 0:"Invalid email",newUserContact:ue,contactsWithoutGroup:D,groups:J}))}else{let D=C.length?void 0:{type:"contact",contact:t},L=this.createFlattenedItems({allItems:C,newUserContact:D,isExpandedGroups:!1,isCustomGroups:!1});this.componentConfigSignal.update(z=>T(I({},z),{flattenedItems$:se(L),newUserContactError:a?void 0:"Invalid email",newUserContact:D}))}let E=this.getViewport();if(E){let D=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;E.style.height=`${D}px`,E.style.maxHeight=`${D}px`}this.openPanelOptimized(),this.cd.markForCheck()}else{let e=this.inputFilterFormControl.value,t=this.autocompleteDataMap?.[this.selectedAutocompleteData?.hotkey],r=t?.data?.slice()||[];if(this.componentConfigSignal().customAutocompleteSearch||(e?r=this._filterCustom(e):r=this.selectedAutocompleteData?.data?.slice()||[]),t?.groups&&t.groups.length>0){let c=[],p=new Map;t.groups?.forEach(E=>{p.set(E.id,{id:E.id,name:E.name,members:[]})}),r.forEach(E=>{let D={type:"custom",custom:E};E.groupId&&p.has(E.groupId)?p.get(E.groupId)?.members.push(D):c.push(D)});let u=Array.from(p.values()).filter(E=>E.members.length>0),C=this.createFlattenedItems({allItems:[],contactsWithoutGroup:c,groups:u,isExpandedGroups:!1,isCustomGroups:!0});this.componentConfigSignal.update(E=>T(I({},E),{customGroupsEnabled:!0,flattenedItems$:se(C),contactsWithoutGroup:c,groups:u}))}else{let c=r.map(u=>({type:"custom",custom:u})),p=this.createFlattenedItems({allItems:c,isExpandedGroups:!1,isCustomGroups:!1});this.componentConfigSignal.update(u=>T(I({},u),{customGroupsEnabled:!1,flattenedItems$:se(p)}))}let s=this.getViewport();if(s){let c=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;s.style.height=`${c}px`,s.style.maxHeight=`${c}px`}this.openPanelOptimized(),this.cd.markForCheck()}}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent filterOptions: ",e)}}displayFn(e){try{return e?.name||e?.email||""}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent displayFn: ",t),""}}trackByFlattenedItem(e,t){try{return t.id||e.toString()}catch(r){return this.loggingService.catch("Error in AutocompletePanelComponent trackByFlattenedItem: ",r),e.toString()}}createFlattenedItems(e){try{let{allItems:t,contactsWithoutGroup:r,groups:a,newUserContact:s,isExpandedGroups:c=!1,isCustomGroups:p=!1}=e,u=[];if(c||p){if(!this.componentConfigSignal().showMentionGroupsOnly&&!this.componentConfigSignal().showMentionGroupsFirst&&r?.forEach((C,E)=>{let D=new Wd;D.originalItem=C,D.disabled=!!C.disabled,D.id=p?`velt-option-custom-ungrouped-${E}`:`velt-option-user-${E}`,D.testId=p?`${this.componentId}-custom-ungrouped-${E}`:`${this.componentId}-user-${E}`,u.push(D)}),a?.forEach((C,E)=>{if(C?.members?.length){let D=new Wd;D.originalItem={type:"group",group:C},D.isGroupHeader=!0,D.disabled=!0,D.group=C,D.id=p?`velt-option-custom-group-${E}`:`velt-option-group-${E}`,D.testId=p?`${this.componentId}-custom-group-${E}`:`${this.componentId}-group-${E}`,u.push(D),C.members.forEach((L,z)=>{let W=new Wd;W.originalItem=L,W.isGroupMember=!0,W.disabled=L.disabled||!1,W.id=p?`velt-option-custom-group-${E}-member-${z}`:`velt-option-group-${E}-member-${z}`,W.testId=p?`${this.componentId}-custom-group-${E}-member-${z}`:`${this.componentId}-group-${E}-member-${z}`,u.push(W)})}}),!this.componentConfigSignal().showMentionGroupsOnly&&this.componentConfigSignal().showMentionGroupsFirst&&r?.length){let C=new Wd;C.originalItem={type:"group"},C.isGroupHeader=!0,C.disabled=!0,C.groupName="Ungrouped",C.id="velt-option-ungrouped",C.testId=`${this.componentId}-ungrouped`,u.push(C),r.forEach((E,D)=>{let L=new Wd;L.originalItem=E,L.isGroupMember=!0,L.disabled=E.disabled||!1,L.id=`velt-option-user-${D}`,L.testId=`${this.componentId}-user-${D}`,u.push(L)})}}else t.forEach((C,E)=>{let D=new Wd;D.originalItem=C,D.disabled=C.disabled||!1,D.id=`velt-option-${E}`,D.testId=`${this.componentId}-${E}`,u.push(D)});if(s?.contact?.email){let C=new Wd;C.originalItem=s,C.isNewContact=!0,C.id="velt-new-contact-option",C.testId=`${this.componentId}-new-contact`,u.push(C)}return u}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent createFlattenedItems: ",t),[]}}setTriggerToMatAutocomplete(){try{this.matAutocomplete&&this.trigger&&(this.trigger.autocomplete=this.matAutocomplete)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setTriggerToMatAutocomplete: ",e)}}handleInput(e){try{if(e?.target?.hasAttribute("contenteditable")){let t="",r=this.autocompleteDataMap?Object.keys(this.autocompleteDataMap):["@"];if(e?.data===" "&&(t=Av(e?.target,r),t&&r.includes(t.trim()))){this.closePanel();return}if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase())?(!this.trigger?.panelOpen&&!this.autocompleteDataMap[e?.data||""]&&(this.oldText=e.target.innerText),this.newText=e.target.innerText,t=this.getWordAtCursorForSafari()):t=Av(e?.target,r),e?.target?.innerHTML.length===1&&(this.selectedAutocompleteData=void 0),t){let a=t.charAt(0),s=window.getSelection(),c=!1;if(s&&s.rangeCount>0){let p=s.getRangeAt(0),u=p.startOffset,C=p.commonAncestorContainer?.textContent||"";c=this.isAutocompleteDisabledAtPosition(C,u,r)}if(!c&&(!this.selectedAutocompleteData||this.autocompleteDataMap[a])&&(this.selectedAutocompleteData=this.autocompleteDataMap[a]),!c&&this.selectedAutocompleteData){this.trigger?.panelOpen||(this.openPanelOptimized(),this.filterOptions());let p=t.substring(1);this.inputFilterFormControl.setValue(p);let u=!1;if(this.componentConfigSignal().customAutocompleteSearch&&(this.trigger?.panelOpen?a===this.selectedAutocompleteData.hotkey&&(u=!0):u=!0,u)){let C={event:e,searchText:p,type:this.selectedAutocompleteData?.type};this.commentActionsService.autocompleteSearch(C)}}else this.inputFilterFormControl.setValue(t),c&&this.trigger?.panelOpen&&(this.trigger.closePanel(),this.selectedAutocompleteData=void 0)}else this.inputFilterFormControl.setValue(""),this.trigger?.panelOpen&&(this.trigger.closePanel(),this.selectedAutocompleteData=void 0)}else{let t=e?.target?.value;if(this.inputFilterFormControl.setValue(t),!this.matAutocompleteTrigger?.panelOpen&&(this.openPanelOptimized(),this.componentConfigSignal().customAutocompleteSearch)){let r={event:e,searchText:t,type:this.selectedAutocompleteData?.type};this.commentActionsService.autocompleteSearch(r)}}e.stopPropagation()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent handleInput: ",t)}}getWordAtCursorForSafari(){try{let e=this.oldText?.split(/\s+/)?.filter(a=>a),t=this.newText?.split(/\s+/)?.filter(a=>a);this.wordIndex=-1;let r="";return t?.forEach((a,s)=>{e[s]!==a&&(r=a,this.wordIndex=s)}),r}catch(e){return this.loggingService.catch("Error in AutocompletePanelComponent getWordAtCursorForSafari: ",e),""}}onOptionSelected(e){try{if(this.enterPressed.emit(),this.selectedAutocompleteData)if(e.option.value?.type==="group"){let t=e.option.value.group;this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t?.metadata?.groupName);a&&this.groupOptionSelected.emit({text:a,groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId})}else if(this.selectedAutocompleteData.type==="contact"){let t=e.option.value.contact;if(t?.visibility=="here"){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null;this.replaceWordAtCursor(r,t?.name),this.atHereSelected.emit(t)}else if(!t?.email||new RegExp(j.REGEX_EMAIL).test("@"+t?.email)){this.addContact(),this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let a=this.trigger?this.trigger._element?.nativeElement:null,s=t?.name||t?.email,c=this.replaceWordAtCursor(a,s);this.optionSelected.emit(t),this.userContactOptionSelected.emit({text:c,userId:t.userId,contact:t}),this.callbackOnOptionSelected(t)}}else{let t=e.option.value.custom;this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t.name);a&&this.customOptionSelected.emit({text:a,custom:t})}this.closePanel()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionSelected: ",t)}}onOptionClick(e){try{if(this.selectedAutocompleteData)if(this.selectedAutocompleteData.type==="custom"){let t=e.custom;if(t){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t.name);a&&this.customOptionSelected.emit({text:a,custom:t}),this.closePanel()}}else if(e?.type==="group"){let t=e.group;if(t){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null,a=this.replaceWordAtCursor(r,t?.metadata?.groupName);a&&this.groupOptionSelected.emit({text:a,groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId}),this.closePanel()}}else{let t=e.contact;if(t)if(t?.visibility==="here"){this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let r=this.trigger?this.trigger._element?.nativeElement:null;this.replaceWordAtCursor(r,t.name),this.atHereSelected.emit(t),this.closePanel()}else{if(!t?.email||new RegExp(j.REGEX_EMAIL).test("@"+t?.email)){this.addContact(),this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null);let a=this.trigger?this.trigger._element?.nativeElement:null,s=t?.name||t?.email,c=this.replaceWordAtCursor(a,s);this.optionSelected.emit(t),this.userContactOptionSelected.emit({text:c,userId:t.userId,contact:t}),this.callbackOnOptionSelected(t)}this.closePanel()}}}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionClick: ",t)}}addContact(){try{this.componentConfigSignal().newUserContact?.contact&&(this.contactService.addUserContact(this.componentConfigSignal().newUserContact?.contact),this.componentConfigSignal.update(e=>(e=T(I({},e),{newUserContact:void 0}),e)))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent addContact: ",e)}}replaceWordAtCursor(e,t){try{let r="";if(e){let a=s=>{let c=s.charAt(0);return this.selectedAutocompleteData?.hotkey===c?c:""};if(["safari","firefox"].includes(this.deviceInfo?.browserName?.toLowerCase())){let s=this.newText?.split(/\s+/)?.filter(C=>C),c=s[this.wordIndex];r=(a(c||"")||"")+t,s[this.wordIndex]=r;let u=s.join(" ");e.innerText=u}else{let s=this.autocompleteDataMap?Object.keys(this.autocompleteDataMap):["@"],c=Av(e,s);r=(a(c||"")||"")+t,aae(e,r,s)}}return r}catch(r){return this.loggingService.catch("Error in AutocompletePanelComponent replaceWordAtCursor: ",r),""}}_filter(e){try{let t=e.email?.toLowerCase();return this.userContacts?.filter(r=>r?.email?.includes(t)||r?.name?.toLowerCase()?.includes(t)||r?.organizationName?.toLowerCase()?.includes(t))}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filter: ",t),[]}}_filterCustom(e){try{return this.selectedAutocompleteData?.data?.filter(t=>t.name?.toLowerCase()?.includes(e?.toLowerCase()))||[]}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filterCustom: ",t),[]}}_filterGroup(e){try{return this.organizationGroups?.filter(t=>t?.metadata?.groupName?.toLowerCase()?.includes(e?.toLowerCase()))}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent _filterGroup: ",t),[]}}setAutocompletePosition(){try{this.matAutocompleteTrigger&&(this.matAutocompleteTrigger.position=this.position)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setAutocompletePosition: ",e)}}callbackOnOptionSelected(e){try{this.contactService.onContactSelected(e)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent callbackOnOptionSelected: ",t)}}getViewport(){try{return this.matAutocompleteTrigger?._overlayRef?.overlayElement?.querySelector("cdk-virtual-scroll-viewport")||null}catch(e){return this.loggingService.catch("Error in AutocompletePanelComponent getViewport: ",e),null}}openPanelOptimized(){try{this.trigger?requestAnimationFrame(()=>{this.trigger?.openPanel(),this.trigger?.updatePosition(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10)}):this.matAutocompleteTrigger&&(this.matAutocompleteTrigger?.panelOpen||requestAnimationFrame(()=>{this.matAutocompleteTrigger?.openPanel(),this.matAutocompleteTrigger?.updatePosition(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10)})),setTimeout(()=>{this.viewport?.scrollToIndex(1),this.viewport?.scrollToIndex(0)},50)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent openPanelOptimized: ",e)}}closePanel(){try{this.trigger?(this.trigger.closePanel(),this.inputFilterFormControl.setValue("")):this.matAutocompleteTrigger&&this.matAutocompleteTrigger.closePanel(),this.type!=="contact"&&(this.selectedAutocompleteData=void 0),setTimeout(()=>{this.autocompleteStateChanged.emit(!1)},300)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent closePanel: ",e)}}disableAutocompleteAtPosition(e){try{this.autocompleteDisabledPositions.add(e),setTimeout(()=>{this.autocompleteDisabledPositions.delete(e)},3e4)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent disableAutocompleteAtPosition: ",t)}}isAutocompleteDisabledAtPosition(e,t,r){try{let a=-1;for(let s of r){let c=e.lastIndexOf(s,t);c>a&&(a=c)}return a!==-1&&this.autocompleteDisabledPositions.has(a)}catch(a){return this.loggingService.catch("Error in AutocompletePanelComponent isAutocompleteDisabledAtPosition: ",a),!1}}};o.\u0275fac=function(t){return new(t||o)(h(Ue),h(ll),h(xi),h(y),h(R),h(Mi),h(_i),h(Jt),h(jr),h(qs),h(qe),h(S),h(di),h(we),h($d))},o.\u0275cmp=O({type:o,selectors:[["velt-autocomplete-panel-internal"]],viewQuery:function(t,r){if(t&1&&(nt(wXt,5),nt(OXt,5),nt(AXt,5),nt(PXt,5)),t&2){let a;Xe(a=Qe())&&(r.matAutocomplete=a.first),Xe(a=Qe())&&(r.matAutocompleteTrigger=a.first),Xe(a=Qe())&&(r.autocompletePanelInput=a.first),Xe(a=Qe())&&(r.viewport=a.first)}},hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{type:"type",trigger:[0,"autocompletePanelTrigger","trigger"],triggerElement:[0,"autocompletePanelTriggerElement","triggerElement"],hideInput:"hideInput",placeholder:"placeholder",metadata:"metadata",enableOnFocus:"enableOnFocus",position:[0,"autocompletePanelPosition","position"],excludeContacts:"excludeContacts",showAtHere:"showAtHere"},outputs:{optionSelected:"optionSelected",atHereSelected:"atHereSelected",userContactOptionSelected:"userContactOptionSelected",customOptionSelected:"customOptionSelected",groupOptionSelected:"groupOptionSelected",enterPressed:"enterPressed",autocompleteStateChanged:"autocompleteStateChanged"},standalone:!1,features:[V([S]),B],decls:8,vars:17,consts:[["matAutocomplete","matAutocomplete"],["userContactRef",""],["autocompletePanelInput","","matAutocompleteTrigger","matAutocompleteTrigger"],["viewport",""],["role","combobox",1,"velt-autocomplete-panel"],[1,"velt-autocomplete-panel--input"],["type","text","autofocus","","autofocus","",3,"placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition","keyup","keydown","keyup.escape","input",4,"ngIf"],["role","listbox",1,"velt-autocomplete-panel--autocomplete",3,"optionSelected","autoActiveFirstOption","hideSingleSelectionIndicator","snippylyOverlay","snippylyOverlayZIndex","displayWith"],["class","velt-autocomplete-panel--container",3,"s-comment-autocomplete-panel-dark",4,"veltIf"],["type","text","autofocus","","autofocus","",3,"keyup","keydown","keyup.escape","input","placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition"],[1,"velt-autocomplete-panel--container"],["itemSize","55","minBufferPx","350","maxBufferPx","600","templateCacheSize","350","class","velt-autocomplete-panel--viewport",4,"ngIf"],["class","velt-autocomplete-panel--normal-viewport",4,"ngIf"],["itemSize","55","minBufferPx","350","maxBufferPx","600","templateCacheSize","350",1,"velt-autocomplete-panel--viewport"],[3,"disabled","value","velt-group-option","velt-group-member-option","pointerdown","pointerup",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"pointerdown","pointerup","disabled","value"],[4,"ngIf"],[3,"componentConfigSignal","group","groupName"],[1,"velt-group-member"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"velt-autocomplete-panel--normal-viewport"],[3,"disabled","value","velt-group-option","velt-group-member-option","pointerdown","pointerup",4,"ngFor","ngForOf","ngForTrackBy"],[3,"componentConfigSignal","selectorItem","isNewContact"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",4)(1,"div",5),g(2,RXt,3,8,"input",6),b()(),_(3,"mat-autocomplete",7,0),G("optionSelected",function(c){return N(a),F(r.onOptionSelected(c))}),g(5,KXt,5,9,"div",8),b(),g(6,ZXt,1,3,"ng-template",null,1,Te)}if(t&2){let a=de(4);x("data-testid",r.componentId)("aria-expanded",r.trigger==null?null:r.trigger.panelOpen)("aria-haspopup",!0)("aria-controls",r.componentId),m(),x("data-testid",r.componentId+"-input-container"),m(),d("ngIf",!r.hideInput),m(),d("autoActiveFirstOption",!0)("hideSingleSelectionIndicator",!0)("snippylyOverlay",a)("snippylyOverlayZIndex",2147483627)("displayWith",r.displayFn),m(2),d("veltIf",k(14,kXt,r.conditionSignal(),A(12,MXt,r.componentConfigSignal)))}},dependencies:[vt,X,_t,_F,ny,Tf,xS,mP,TS,mi,w0,l_,ae,XN],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%], .velt-autocomplete-panel--autocomplete{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%], .velt-autocomplete-panel--autocomplete:has(>.s-comment-autocomplete-panel-dark){--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}[_nghost-%COMP%] *[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;line-height:1.5;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit));font-family:var(--velt-default-font-family)}[_nghost-%COMP%] *[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert}.velt-autocomplete-panel[_ngcontent-%COMP%]{position:relative;width:100%}.velt-autocomplete-panel--input[_ngcontent-%COMP%]{width:100%}.velt-autocomplete-panel--input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;padding:8px;border-radius:var(--velt-border-radius-sm);background:var(--velt-background-0);color:var(--velt-text-1);font-size:14px;line-height:1.5;outline:none}.velt-autocomplete-panel--input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:var(--velt-border-4)} .velt-autocomplete-panel--autocomplete{background:var(--velt-background-0);border:1px solid var(--velt-border-2);box-shadow:0 2px 4px #0000001a;max-height:256px;overflow:auto} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar{display:none;width:0;height:0} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar{width:0;height:0} .velt-autocomplete-panel--autocomplete::-webkit-scrollbar-button{width:0;height:0} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel{padding:0;border-radius:var(--velt-border-radius-md)!important} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item{font-size:14px;line-height:1.5;height:auto;padding:8px 16px;background:var(--velt-background-0)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item:hover:not(.mdc-list-item--disabled){background:var(--velt-background-2)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item.mat-mdc-option-active{background:var(--velt-background-3)} .velt-autocomplete-panel--autocomplete.mat-mdc-autocomplete-panel .mat-mdc-option.mdc-list-item .mdc-list-item__primary-text{color:var(--velt-text-1);width:100%} .velt-autocomplete-panel--autocomplete .cdk-virtual-scroll-viewport{height:100%;width:100%;max-height:256px;background:var(--velt-background-0)} .velt-autocomplete-panel--autocomplete .cdk-virtual-scroll-viewport .cdk-virtual-scroll-content-wrapper{max-width:100%;width:100%;box-sizing:border-box} .velt-autocomplete-panel--autocomplete .velt-autocomplete-panel--container{background:var(--velt-background-0)}.velt-autocomplete-panel--viewport[_ngcontent-%COMP%]{height:256px;width:100%;background:var(--velt-background-0);scrollbar-width:none}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%]{max-height:256px;width:100%;overflow-y:auto;background:var(--velt-background-0);scrollbar-width:none}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-option[_ngcontent-%COMP%]{overflow:hidden;color:var(--velt-text-6, #666);text-overflow:ellipsis;font-size:12px;font-style:normal;font-weight:400;line-height:normal;text-transform:uppercase;padding:4px 12px;border-top:1px solid var(--velt-border-2);margin-top:12px}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-option[_ngcontent-%COMP%]:first-child{border-top:none;margin-top:0}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-toggle[_ngcontent-%COMP%]{font-size:10px;color:var(--velt-text-2)}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-member-option[_ngcontent-%COMP%]{padding-left:28px;background-color:var(--velt-background-0)}.velt-autocomplete-panel--expanded-groups[_ngcontent-%COMP%] .velt-group-member[_ngcontent-%COMP%]{width:100%}"],changeDetection:0});let i=o;return i})();function XXt(i,o){if(i&1){let n=Y();f(0),_(1,"div",23)(2,"div",24),te(3),b(),_(4,"div",25),G("click",function(){let t=N(n).$implicit,r=l();return F(r.removeSelectedUserToInvite(t))}),le(),_(5,"svg",26),w(6,"path",7),b()()(),v()}if(i&2){let n=o.$implicit;m(3),Ge((n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email))}}function QXt(i,o){if(i&1){let n=Y();f(0),_(1,"div",31),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.selectRole(t))}),le(),_(2,"svg",32),w(3,"path",33),b(),ut(),_(4,"div")(5,"h4"),te(6),P(7,"translate"),b(),_(8,"p"),te(9),P(10,"translate"),b()()(),v()}if(i&2){let n=o.$implicit,e=o.first,t=l(2);m(),ge("border-top",!e),m(),it("visibility",(t.selectedUserRole==null?null:t.selectedUserRole.id)===(n==null?null:n.id)?"visible":"hidden"),m(4),Ge(M(7,6,n==null?null:n.name)),m(3),Ge(M(10,8,n==null?null:n.description))}}function JXt(i,o){if(i&1&&(_(0,"div",27)(1,"div",28),g(2,QXt,11,10,"ng-container",12),b(),te(3),P(4,"translate"),le(),_(5,"svg",29),w(6,"path",30),b()()),i&2){let n=l();ge("disabled",!n.isUserAdmin),m(2),d("ngForOf",n.userRoles),m(),Ce(" ",M(4,4,n.selectedUserRole==null?null:n.selectedUserRole.name)," ")}}function eQt(i,o){i&1&&(le(),_(0,"svg",32),w(1,"path",44),b())}function tQt(i,o){if(i&1&&(_(0,"div",41),te(1),P(2,"translate"),g(3,eQt,2,0,"svg",43),b()),i&2){let n=l().$implicit,e=l(2);m(),Ce(" ",M(2,2,n==null||n.role==null?null:n.role.name)," "),m(2),d("ngIf",e.isUserAdmin&&(n==null||n.user==null?null:n.user.email)!==(e.user==null?null:e.user.email))}}function nQt(i,o){if(i&1){let n=Y();_(0,"div",28)(1,"div",45),G("click",function(){N(n);let t=l().$implicit,r=l(2);return F(r.removeUser(t))}),te(2),P(3,"translate"),b()()}i&2&&(m(2),Ce(" ",M(3,1,"Remove")," "))}function iQt(i,o){if(i&1&&(f(0),_(1,"div",38)(2,"div",39),w(3,"snippyly-user-avatar",40),te(4),b(),_(5,"div",41)(6,"app-overlay-tooltip",42),g(7,tQt,4,4,"ng-template",null,1,Te)(9,nQt,4,3,"ng-template",null,2,Te),b()()(),v()),i&2){let n=o.$implicit,e=l(2);m(3),d("user",n==null?null:n.user)("background","#625DF5"),m(),Ce(" ",(n==null||n.user==null?null:n.user.name)||(n==null||n.user==null?null:n.user.email)," "),m(2),d("disabled",!(e.isUserAdmin&&(n==null||n.user==null?null:n.user.email)!==(e.user==null?null:e.user.email)))}}function oQt(i,o){i&1&&(f(0),_(1,"div"),te(2),P(3,"translate"),b(),v()),i&2&&(m(2),Ge(M(3,1,"No users are added.")))}function rQt(i,o){if(i&1&&(_(0,"div",34)(1,"div",35),te(2),P(3,"translate"),b(),g(4,iQt,11,4,"ng-container",36)(5,oQt,4,3,"ng-container",37),b()),i&2){let n=l();m(2),Ge(M(3,4,"People on this project")),m(2),d("ngForOf",n.documentUsers)("ngForTrackBy",n.trackByDocumentUserId),m(),d("ngIf",!(n.documentUsers!=null&&n.documentUsers.length))}}function aQt(i,o){if(i&1&&(f(0),_(1,"div",38)(2,"div",39),w(3,"snippyly-user-avatar",40),te(4),P(5,"translate"),b()(),v()),i&2){let n=o.$implicit;m(3),d("user",n)("background","#625DF5"),m(),Ce(" ",M(5,3,(n==null?null:n.name)||(n==null?null:n.email))," ")}}function sQt(i,o){if(i&1&&(_(0,"div",38)(1,"div",39),w(2,"snippyly-user-avatar",40),te(3),P(4,"translate"),b(),_(5,"div",27),te(6),P(7,"translate"),b()()),i&2){let n=l().$implicit;m(2),d("user",n)("background","#625DF5"),m(),Ce(" ",M(4,4,(n==null?null:n.name)||(n==null?null:n.email))," "),m(3),Ce(" ",M(7,6,"Invited")," ")}}function lQt(i,o){if(i&1&&(f(0),g(1,sQt,8,8,"div",46),v()),i&2){let n=o.$implicit,e=l(2);m(),d("ngIf",!e.huddleUsersByEmailMap[n==null?null:n.email])}}function cQt(i,o){if(i&1&&(_(0,"div",34)(1,"div",35),te(2),P(3,"translate"),b(),g(4,aQt,6,5,"ng-container",36)(5,lQt,2,1,"ng-container",36),b()),i&2){let n=l();m(2),Ge(M(3,5,"People on this huddle")),m(2),d("ngForOf",n.huddleUsers)("ngForTrackBy",n.trackByHuddleUserId),m(),d("ngForOf",n.huddleInvitees)("ngForTrackBy",n.trackByHuddleInviteeId)}}function dQt(i,o){if(i&1){let n=Y();_(0,"div",47)(1,"div",48),te(2),P(3,"translate"),b(),_(4,"div",49)(5,"div",28)(6,"div",31),G("click",function(){N(n);let t=l();return F(t.changeDocumentAccessType(t.DocumentAccessTypes.PUBLIC))}),le(),_(7,"svg",32),w(8,"path",33),b(),ut(),_(9,"div")(10,"h3"),te(11),P(12,"translate"),P(13,"titlecase"),b(),_(14,"p"),te(15),P(16,"translate"),b()()(),_(17,"div",45),G("click",function(){N(n);let t=l();return F(t.changeDocumentAccessType(t.DocumentAccessTypes.RESTRICTED))}),le(),_(18,"svg",32),w(19,"path",33),b(),ut(),_(20,"div")(21,"h3"),te(22),P(23,"translate"),P(24,"titlecase"),b(),_(25,"p"),te(26),P(27,"translate"),b()()()(),le(),_(28,"svg",32),w(29,"path",50)(30,"path",51)(31,"path",52),b(),ut(),_(32,"div",53)(33,"h3"),te(34),P(35,"translate"),P(36,"titlecase"),b(),_(37,"p"),te(38),P(39,"translate"),b()()()()}if(i&2){let n=l();m(2),Ge(M(3,11,"General access")),m(5),it("visibility",!n.documentAccessType||n.documentAccessType===n.DocumentAccessTypes.PUBLIC?"visible":"hidden"),m(4),Ge(M(13,15,M(12,13,n.DocumentAccessTypes.PUBLIC))),m(4),Ge(M(16,17,n.documentAccessTypeMap[n.DocumentAccessTypes.PUBLIC]==null?null:n.documentAccessTypeMap[n.DocumentAccessTypes.PUBLIC].description)),m(3),it("visibility",n.documentAccessType===n.DocumentAccessTypes.RESTRICTED?"visible":"hidden"),m(4),Ge(M(24,21,M(23,19,n.DocumentAccessTypes.RESTRICTED))),m(4),Ge(M(27,23,n.documentAccessTypeMap[n.DocumentAccessTypes.RESTRICTED]==null?null:n.documentAccessTypeMap[n.DocumentAccessTypes.RESTRICTED].description)),m(8),Ge(M(36,27,M(35,25,n.documentAccessType||n.DocumentAccessTypes.PUBLIC))),m(4),Ce("",M(39,29,n.documentAccessTypeMap[n.documentAccessType?n.documentAccessType:n.DocumentAccessTypes.PUBLIC]==null?null:n.documentAccessTypeMap[n.documentAccessType?n.documentAccessType:n.DocumentAccessTypes.PUBLIC].description)," ")}}function mQt(i,o){i&1&&(le(),_(0,"svg",54),w(1,"path",55),b())}function pQt(i,o){i&1&&(le(),_(0,"svg",56),w(1,"path",57),b())}var F0e=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u,C,E,D){this.analyticsService=e,this.authService=t,this.configService=r,this.docService=a,this.documentUserAccessService=s,this.huddleService=c,this.loggingService=p,this.iamService=u,this.toastService=C,this.dialogRef=E,this.usersToInvite=[],this.documentUsers=[],this.huddleInvitees=[],this.huddleUsers=[],this.huddleUsersByEmailMap={},this.userRoles=[],this.excludeContacts=[],this.linkCopied=!1,this.hideAccessControlDropdown=!1,this.subscriptions=[],this.title="Share project",this.placeholder="Add email address",this.documentAccessType="",this.DocumentAccessTypes=yi,this.isUserAdmin=!1,this.documentAccessTypeMap=j.DocumentAccessTypeMap,this.documentUserAccessList=!0,this.veltElement=!0;try{D&&(this.hideAccessControlDropdown=!!D.hideAccessControlDropdown,this.type=D.type,this.source=D.source,D.title&&(this.title=D.title),D.placeholder&&(this.placeholder=D.placeholder),this.documentUserAccessList=!!D.documentUserAccessList,this.inviteUrl=D.inviteUrl),this.subscriptions.push(this.authService.getUser$().subscribe(L=>{this.user=L})),this.subscriptions.push(this.iamService.isUserAdmin$().subscribe(L=>{this.isUserAdmin=L})),this.subscriptions.push(this.configService.getSF$().subscribe(L=>{L?this.documentAccessTypeMap=j.DocumentAccessTypeMapSF:this.documentAccessTypeMap=j.DocumentAccessTypeMap})),this.type!=="invite"&&this.subscriptions.push(this.documentUserAccessService.getDocumentUsers$().subscribe(L=>{this.documentUsers=L,this.updateExcludeContacts()})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getRoles$().subscribe(L=>{this.userRoles=L,this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(z=>z.name===vo.COMMENTER))})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getDocumentIAM$().subscribe(L=>{this.documentAccessType=this.docService.getDocumentAccessType(L)})),this.type==="invite"&&(this.subscriptions.push(this.huddleService.getHuddleAttendees$().subscribe(L=>{this.huddleUsers=L,this.huddleUsersByEmailMap={},L.forEach(z=>{z.email&&(this.huddleUsersByEmailMap[z.email]=z)})})),this.subscriptions.push(this.huddleService.getHuddleInvitees$().subscribe(L=>{this.huddleInvitees=L})))}catch(L){this.loggingService.catch("Error in UserInviteDialogComponent constructor: ",L)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-user-invite-dialog"),this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(e=>e.name===vo.COMMENTER))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnInit: ",e)}}updateExcludeContacts(){try{this.excludeContacts=[],this.excludeContacts.push(...this.documentUsers.map(e=>e.user)),this.excludeContacts.push(...this.usersToInvite.map(e=>e.user))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent updateExcludeContacts: ",e)}}trackByDocumentUserId(e,t){return t.id}trackByHuddleUserId(e,t){return t.userSnippylyId||t.userId}trackByHuddleInviteeId(e,t){return t.userId||t.email}selectRole(e){try{this.selectedUserRole=e}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent selectRole: ",t)}}onUserSelected(e){try{let t=new pk;t.id=e.email?bt(e.email):bt(e.userId),t.user=e,this.usersToInvite.find(r=>r.id===t.id)||this.usersToInvite.push(t),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent onUserSelected: ",t)}}inviteSelectedUsers(){try{if(this.usersToInvite?.length)if(this.type==="invite"){let e=this.usersToInvite.map(t=>t.user);this.analyticsService.trackEvent(Z.Events.InviteDialog.USER_INVITED,{source:this.source}),this.huddleService.inviteUsers(e),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}else{this.usersToInvite.forEach(a=>{this.selectedUserRole&&(a.role=this.selectedUserRole)});let e=this.usersToInvite.filter(a=>a.role?.name===vo.ADMIN).map(a=>a.user.email),t=this.usersToInvite.filter(a=>a.role?.name===vo.COMMENTER).map(a=>a.user.email),r={actionType:bj.INVITE,userInvite:{admin:e?.length?{emails:e,emailProperties:{url:this.getInviteUrl()}}:void 0,commenter:t?.length?{emails:t,clientDocumentId:this.docService.getDocumentPaths()?.clientDocumentId,documentId:this.docService.getDocumentPaths()?.documentId,clientOrganizationId:this.user?.clientOrganizationId,organizationId:this.user?.organizationId,emailProperties:{url:this.getInviteUrl()}}:void 0}};this.documentUserAccessService.updateNotificationsDatabase(r),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}this.usersToInvite=[]}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent inviteSelectedUsers: ",e)}}removeSelectedUserToInvite(e){try{this.usersToInvite=this.usersToInvite.filter(t=>t.id!==e.id),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeSelectedUserToInvite: ",t)}}updateUserRole(e,t){try{let r=e?.role?.name,a=t?.name;e.role=t,this.documentUserAccessService.updateDocumentUser(e,{oldAccess:r,newAccess:a})}catch(r){this.loggingService.catch("Error in UserInviteDialogComponent updateUserRole: ",r)}}removeUser(e){try{this.analyticsService.trackEvent(Z.Events.ShareDialog.DOCUMENT_USER_ACCESS_REMOVED,{targetUserId:e?.user?.userId,targetUserEmail:e?.user?.email,roleType:e?.role?.name}),this.documentUserAccessService.removeDocumentUser(e),this.toastService.setToast({message:"User removed!",type:"success",duration:2e3})}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeUser: ",t)}}getInviteUrl(){try{return this.inviteUrl||window.location.href}catch(e){return this.loggingService.catch("Error in UserInviteDialogComponent getInviteUrl: ",e),""}}copyLink(){try{let e=this.getInviteUrl();this.linkCopied=!0,Os(e),setTimeout(()=>{this.linkCopied=!1},2e3),this.type==="invite"?this.analyticsService.trackEvent(Z.Events.InviteDialog.INVITE_LINK_COPIED,{source:this.source}):this.type==="share"&&this.analyticsService.trackEvent(Z.Events.ShareDialog.SHARE_LINK_COPIED)}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent copyLink: ",e)}}changeDocumentAccessType(e){try{this.documentAccessType!==e&&(this.analyticsService.trackEvent(Z.Events.ShareDialog.DOCUMENT_ACCESS_CHANGED,{oldAccessType:this.documentAccessType,newAccessType:e}),this.docService.changeDocumentAccessType(e),this.toastService.setToast({message:"Access changed to '"+e+"'.",type:"success",duration:2e3}))}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent changeDocumentAccessType: ",t)}}closeDialog(){try{this.dialogRef.close()}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Ft),h(st),h(M0e),h(fr),h(y),h(fn),h(zd),h(nr),h(Ol,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-invite-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:32,vars:27,consts:[["userSelectorRef",""],["triggerTemplate",""],["tooltipTemplate",""],[1,"s-video-settings-modal",3,"click","pointerdown","pointerup"],[1,"s-video-header"],[1,"s-video-header-name"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-cursor-pointer",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","#80808A"],[1,"s-video-settings-modal-item"],[1,"s-input"],[1,"s-input-chip-list-container"],[1,"s-chip-list"],[4,"ngFor","ngForOf"],[1,"s-input-user-selector",3,"optionSelected","placeholder","enableOnFocus"],["class","s-role dropdown",3,"disabled",4,"ngIf"],["class","s-video-settings-modal-item s-people-list-container",4,"ngIf"],["class","s-general-access-container",4,"ngIf"],[1,"s-buttons-wrap"],[1,"s-button","s-secondary",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary",3,"click"],[1,"s-chip"],[1,"s-chip-user"],[1,"s-chip-remove",3,"click"],["width","14","height","14","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],[1,"s-role","dropdown"],[1,"dropdown-content"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"dropdown-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.79289 9.79289C8.18342 9.40237 8.81658 9.40237 9.20711 9.79289L12 12.5858L14.7929 9.79289C15.1834 9.40237 15.8166 9.40237 16.2071 9.79289C16.5976 10.1834 16.5976 10.8166 16.2071 11.2071L12.7071 14.7071C12.3166 15.0976 11.6834 15.0976 11.2929 14.7071L7.79289 11.2071C7.40237 10.8166 7.40237 10.1834 7.79289 9.79289Z","fill","#D4D6DF"],[1,"dropdown-item",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#80808A"],[1,"s-video-settings-modal-item","s-people-list-container"],[1,"s-people-list-title"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"s-user"],[1,"s-user-info"],[1,"s-flex",3,"user","background"],[1,"s-role"],[3,"disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#404044"],[1,"dropdown-item","border-top",3,"click"],["class","s-user",4,"ngIf"],[1,"s-general-access-container"],[1,"s-general-access-title"],[1,"s-button","s-secondary","s-document-access-btn","dropdown"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 11C10.2274 11 8.64844 11.0646 7.35838 11.1466C6.13471 11.2243 5.19379 12.158 5.10597 13.373C5.0435 14.2373 5 15.1481 5 16C5 16.8519 5.0435 17.7627 5.10597 18.627C5.19379 19.842 6.13471 20.7757 7.35838 20.8534C8.64844 20.9354 10.2274 21 12 21C13.7726 21 15.3516 20.9354 16.6416 20.8534C17.8653 20.7757 18.8062 19.842 18.894 18.627C18.9565 17.7627 19 16.8519 19 16C19 15.1481 18.9565 14.2373 18.894 13.373C18.8062 12.158 17.8653 11.2243 16.6416 11.1466C15.3516 11.0646 13.7726 11 12 11ZM7.2315 9.15059C5.01376 9.29156 3.27137 11.0124 3.11117 13.2288C3.04652 14.1234 3 15.085 3 16C3 16.915 3.04652 17.8766 3.11118 18.7712C3.27137 20.9876 5.01376 22.7084 7.23151 22.8494C8.55778 22.9337 10.1795 23 12 23C13.8205 23 15.4422 22.9337 16.7685 22.8494C18.9862 22.7084 20.7286 20.9876 20.8888 18.7712C20.9535 17.8766 21 16.915 21 16C21 15.085 20.9535 14.1234 20.8888 13.2288C20.7286 11.0124 18.9862 9.29156 16.7685 9.15059C15.4422 9.06629 13.8205 9 12 9C10.1795 9 8.55778 9.06629 7.2315 9.15059Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M13 16.7324C13.5978 16.3866 14 15.7403 14 15C14 13.8954 13.1046 13 12 13C10.8954 13 10 13.8954 10 15C10 15.7403 10.4022 16.3866 11 16.7324V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V16.7324Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 6C7 3.23858 9.23858 1 12 1C14.7614 1 17 3.23858 17 6V10C17 10.5523 16.5523 11 16 11C15.4477 11 15 10.5523 15 10V6C15 4.34315 13.6569 3 12 3C10.3431 3 9 4.34315 9 6V10C9 10.5523 8.55228 11 8 11C7.44772 11 7 10.5523 7 10V6Z","fill","#777E91"],[1,"s-document-access-btn-content"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.49027 2.50491C6.46607 2.50996 6.34731 2.53007 6.22635 2.54966C5.17052 2.72053 4.19457 3.45245 3.69214 4.45019C3.56689 4.69886 3.43711 5.08311 3.37864 5.3784C3.31829 5.68302 3.31829 14.3108 3.37864 14.6154C3.52088 15.3336 3.85013 15.9526 4.36233 16.4647C4.76978 16.8722 5.22723 17.1555 5.75266 17.3256C6.23219 17.4809 6.32453 17.4891 7.59205 17.4891H8.76711L8.88599 17.4104C9.06906 17.2893 9.14407 17.146 9.14407 16.9173C9.14407 16.6887 9.06909 16.5453 8.88611 16.4242L8.76728 16.3455L7.6068 16.3286C6.3852 16.3109 6.35854 16.3081 5.96566 16.1588C5.43291 15.9564 4.86723 15.3934 4.67143 14.8707C4.49992 14.4129 4.51091 14.747 4.51091 9.9969C4.51091 5.24677 4.49992 5.58091 4.67143 5.12308C4.88025 4.56564 5.45367 4.01728 6.0476 3.80712C6.46364 3.65989 6.4966 3.65865 9.67189 3.66895C12.8862 3.67939 12.6707 3.6688 13.1239 3.83838C13.3521 3.92374 13.6919 4.15074 13.8939 4.35272C14.0958 4.5547 14.3228 4.89447 14.4082 5.12264C14.5641 5.53916 14.5639 5.53763 14.5816 6.87392L14.5983 8.13484L14.6679 8.24677C14.7061 8.30835 14.791 8.39412 14.8563 8.43737C14.9554 8.50291 15.0078 8.51605 15.1701 8.51605C15.3324 8.51605 15.3848 8.50291 15.4839 8.43737C15.5492 8.39412 15.6341 8.30835 15.6723 8.24677L15.7419 8.13484V6.85925C15.7419 5.89002 15.7321 5.53438 15.7012 5.3784C15.4231 3.97403 14.4078 2.9182 13.0001 2.56948C12.7554 2.50887 12.6941 2.50764 9.64257 2.50177C7.93299 2.49849 6.51446 2.4999 6.49027 2.50491ZM10.1326 4.86732C10.0008 4.90764 9.81429 5.10144 9.77661 5.23721C9.75922 5.29976 9.74547 5.6244 9.74538 5.97344C9.74517 6.73161 9.7789 6.93488 9.97026 7.32843C10.0835 7.56132 10.1471 7.64839 10.358 7.85928C10.5687 8.06997 10.6561 8.13387 10.8888 8.24715C11.3004 8.44752 11.4993 8.4781 12.3174 8.46675L12.9899 8.4574L13.1087 8.37872C13.2923 8.25712 13.3667 8.11437 13.3667 7.88344C13.3667 7.72342 13.3533 7.6705 13.288 7.57182C13.2448 7.50646 13.159 7.42162 13.0974 7.38336C12.9898 7.31647 12.9581 7.31319 12.2817 7.29876C11.6484 7.28524 11.5646 7.27759 11.4445 7.22234C11.2497 7.13276 11.1074 6.99491 11.0146 6.80594C10.9336 6.64091 10.9327 6.63267 10.9182 5.93556C10.904 5.25876 10.9008 5.2275 10.8339 5.11986C10.6956 4.89741 10.3918 4.788 10.1326 4.86732ZM15.7049 9.14973C15.3168 9.21439 14.8688 9.42637 14.5091 9.71547C14.1903 9.97168 12.9551 11.227 12.785 11.4677C12.6151 11.708 12.4379 12.0846 12.3662 12.3575C12.2934 12.6347 12.2934 13.2178 12.3662 13.4864C12.4763 13.8923 12.7739 14.3816 12.9941 14.5185C13.1571 14.6198 13.4451 14.6146 13.6071 14.5074C13.7916 14.3853 13.8652 14.2433 13.8652 14.0094C13.8652 13.8346 13.8552 13.8007 13.7698 13.6869C13.7174 13.6169 13.6316 13.474 13.5792 13.3691C13.4922 13.1949 13.4842 13.1559 13.4861 12.9146C13.4901 12.4126 13.6018 12.2459 14.588 11.2695C15.3768 10.4885 15.479 10.4117 15.8541 10.3176C16.4471 10.1688 17.0959 10.642 17.1542 11.2659C17.1867 11.6138 17.0539 11.95 16.7418 12.3102C16.554 12.527 16.5067 12.6446 16.5261 12.8468C16.5522 13.1185 16.7716 13.3292 17.0627 13.362C17.163 13.3733 17.2272 13.3595 17.3476 13.3006C17.6751 13.1404 18.1188 12.4832 18.2617 11.9469C18.4137 11.3768 18.3213 10.7383 18.0102 10.209C17.8837 9.99361 17.4606 9.57059 17.2452 9.444C16.7724 9.16618 16.2292 9.06241 15.7049 9.14973ZM14.7568 12.1471C14.6858 12.1846 14.588 12.2715 14.5396 12.3402C14.4628 12.4494 14.4517 12.4903 14.4517 12.6643C14.4517 12.846 14.4612 12.8773 14.5601 13.021C14.869 13.4698 14.893 13.8775 14.6373 14.3344C14.5091 14.5636 13.051 16.0217 12.8218 16.15C12.3282 16.4261 11.818 16.3718 11.4502 16.0041C11.1691 15.723 11.0679 15.3616 11.1645 14.9843C11.2245 14.75 11.3364 14.5523 11.5457 14.3107C11.7336 14.0939 11.7808 13.9764 11.7614 13.7742C11.7353 13.5024 11.5159 13.2917 11.2249 13.259C11.1245 13.2476 11.0603 13.2615 10.9399 13.3204C10.6125 13.4806 10.1687 14.1377 10.0258 14.674C9.87388 15.2442 9.96627 15.8826 10.2773 16.4119C10.4039 16.6273 10.8269 17.0504 11.0423 17.177C11.5716 17.488 12.2101 17.5804 12.7802 17.4284C13.0265 17.3628 13.41 17.1783 13.6407 17.0145C13.8608 16.858 14.9432 15.8056 15.2867 15.4139C15.9653 14.64 16.1624 13.7239 15.8293 12.8919C15.562 12.2242 15.1512 11.9389 14.7568 12.1471Z","fill","#80808A"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#ABABB5"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",3),G("click",function(c){return N(a),F(c.stopPropagation())})("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),F(c.stopPropagation())}),_(1,"div",4)(2,"div",5),te(3),P(4,"translate"),b(),le(),_(5,"svg",6),G("click",function(){return N(a),F(r.closeDialog())}),w(6,"path",7),b()(),ut(),_(7,"div",8),te(8),P(9,"translate"),_(10,"div",9)(11,"div",10)(12,"div",11),g(13,XXt,7,1,"ng-container",12),b(),_(14,"velt-autocomplete-panel-internal",13,0),P(16,"translate"),G("optionSelected",function(c){return N(a),F(r.onUserSelected(c))}),b()(),g(17,JXt,7,6,"div",14),b()(),g(18,rQt,6,6,"div",15)(19,cQt,6,7,"div",15)(20,dQt,40,31,"div",16),_(21,"div",17)(22,"div",18),G("click",function(){return N(a),F(r.copyLink())}),g(23,mQt,2,0,"svg",19)(24,pQt,2,0,"svg",20),te(25),P(26,"translate"),P(27,"translate"),b(),w(28,"div",21),_(29,"div",22),G("click",function(){return N(a),F(r.inviteSelectedUsers())}),te(30),P(31,"translate"),b()()()}t&2&&(m(3),Ce(" ",M(4,15,r.title)," "),m(5),Ce(" ",M(9,17,"Invite users")," "),m(5),d("ngForOf",r.usersToInvite),m(),d("placeholder",M(16,19,r.placeholder))("enableOnFocus",!1),m(3),d("ngIf",!r.hideAccessControlDropdown),m(),d("ngIf",r.documentUserAccessList&&(r.documentUsers==null?null:r.documentUsers.length)),m(),d("ngIf",(r.huddleInvitees==null?null:r.huddleInvitees.length)||(r.huddleUsers==null?null:r.huddleUsers.length)),m(),d("ngIf",r.isUserAdmin&&!r.hideAccessControlDropdown),m(3),d("ngIf",!r.linkCopied),m(),d("ngIf",r.linkCopied),m(),Ce(" ",r.linkCopied?M(26,21,"Link Copied!"):M(27,23,"Copy Link")," "),m(4),ge("s-disabled",!(r.usersToInvite!=null&&r.usersToInvite.length)),m(),Ge(M(31,25,"Send invite")))},dependencies:[vt,X,Kn,Zd,xg,QN,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#dcdde0!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}*[_ngcontent-%COMP%]{box-sizing:border-box}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%], .s-buttons-wrap[_ngcontent-%COMP%], .s-role[_ngcontent-%COMP%], .s-user[_ngcontent-%COMP%], .s-user-info[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#ababb5!important;font-size:.8rem!important;gap:1rem!important}.s-people-list-container[_ngcontent-%COMP%]{overflow:auto!important}.s-people-list-container[_ngcontent-%COMP%] .s-people-list-title[_ngcontent-%COMP%]{position:sticky!important;top:0!important;background:#141416!important;width:100%!important;z-index:1!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:2rem!important;gap:2rem!important;background:#141416!important;border-radius:1rem!important;max-width:42rem!important;width:80vw!important;border:2px solid #303034!important;overflow:auto!important;max-height:80vh!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important}.s-video-header-name[_ngcontent-%COMP%]{gap:.5rem!important;font-weight:600!important;font-size:1.2rem!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-secondary[_ngcontent-%COMP%]{border:2px solid #303034!important;border-radius:.5rem!important;color:#ababb5!important;gap:.5rem!important}.s-secondary[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:1rem!important;color:#fff!important;padding:.5rem 0!important}.s-input[_ngcontent-%COMP%]{padding:1rem!important;color:#ababb5!important;width:100%!important;justify-content:space-between!important;border-radius:1rem!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.s-buttons-wrap[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important;align-items:stretch!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-user[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important}.s-user-info[_ngcontent-%COMP%]{color:#ababb5!important;gap:.75rem!important}.s-user[_ngcontent-%COMP%] .s-role[_ngcontent-%COMP%]{color:#404044!important}.s-role[_ngcontent-%COMP%]{position:relative!important;cursor:pointer!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:100%!important;right:0!important;z-index:10!important}.dropdown[_ngcontent-%COMP%] .dropdown-content.top[_ngcontent-%COMP%]{top:auto!important;bottom:2rem!important}.dropdown-content[_ngcontent-%COMP%]{min-width:max-content!important;overflow:hidden!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:.5rem!important;border:1px solid #303034!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#ababb5!important;background:#141416!important;cursor:pointer!important;transition:.2s ease!important}.dropdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#ababb5!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{display:none!important;visibility:hidden!important;opacity:0!important}.dropdown[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{width:24px!important;min-width:24px!important}.dropdown.disabled[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{display:none!important}.dropdown[_ngcontent-%COMP%]:not(.disabled):hover .dropdown-content[_ngcontent-%COMP%]{display:flex!important;visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:1em 2rem 1rem 1rem!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:1em!important;line-height:1rem!important;border-radius:0!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown-item[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff!important;margin:0!important}.dropdown-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.border-top[_ngcontent-%COMP%]{outline:solid 1px #303034!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important}.s-input-chip-list-container[_ngcontent-%COMP%]{display:flex;width:100%!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%]{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%]{padding:8px 16px!important;background:#222226!important;color:#dcdde0!important;border-radius:100px!important;display:flex!important;align-items:center!important;gap:8px!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%] .s-chip-remove[_ngcontent-%COMP%]{display:flex!important;cursor:pointer!important}.s-input-chip-list-container[_ngcontent-%COMP%] velt-autocomplete-panel-internal.s-input-user-selector[_ngcontent-%COMP%]{flex-basis:250px!important}.s-general-access-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;width:100%!important;gap:8px!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%]{position:relative!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%]{position:relative!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;justify-content:flex-start!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{left:0!important;top:auto!important;bottom:100%!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#ababb5!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector{flex-grow:1!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector input{background:transparent!important;border:0!important;outline:0!important;color:#fff!important}@media screen and (max-width: 425px){ .velt-mat-dialog-container.snippyly-user-invite-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-video-settings-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-chip-user{word-break:break-all!important}}"],changeDetection:0});let i=o;return i})();function gQt(i,o){i&1&&(_(0,"div",4),le(),_(1,"svg",5)(2,"g"),w(3,"path",6)(4,"path",7)(5,"path",8),b()()())}function uQt(i,o){if(i&1){let n=Y();_(0,"div")(1,"slot",9),G("slotchange",function(){N(n);let t=l();return F(t.onButtonSlotChange())}),_(2,"div",10),le(),_(3,"svg",11),w(4,"path",12),b()()()()}}var Zw=(()=>{let o=class o extends Je{set _disabled(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.disabled=t}set _documentUserAccessList(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.documentUserAccessList=t}constructor(e,t,r,a,s,c){super(s,r,void 0,void 0,void 0,c,t),this.analyticsService=e,this.loggingService=t,this.themeService=r,this.dialog=a,this.elementRef=s,this.dynamicDataService=c,this.type="share",this.disabled=!1,this.documentUserAccessList=!0,this.hideAccessControlDropdown=!1,this.accessControlDropdown=!0,this.veltElement=!0,this.customButtonAdded=!1}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}onButtonSlotChange(){this.customButtonAdded=!0}openInviteDialog(){try{this.disabled||(this.type==="share"&&this.analyticsService.trackEvent(Z.Events.ShareDialog.SHARE_BUTTON_CLICKED),this.dialog.open(F0e,{panelClass:"velt-mat-dialog-container",backdropClass:"s-background-blur-1",data:{title:this.title,placeholder:this.placeholder,hideAccessControlDropdown:this.hideAccessControlDropdown||!this.accessControlDropdown,type:this.type,source:this.source,documentUserAccessList:this.documentUserAccessList,inviteUrl:this.inviteUrl}}))}catch(e){this.loggingService.catch("Error in UserInviteToolComponent openInviteDialog: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(y),h(qe),h(no),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-invite-tool-internal"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{type:"type",source:"source",title:"title",placeholder:"placeholder",inviteUrl:"inviteUrl",_disabled:[0,"disabled","_disabled"],_documentUserAccessList:[0,"documentUserAccessList","_documentUserAccessList"],hideAccessControlDropdown:"hideAccessControlDropdown",accessControlDropdown:"accessControlDropdown"},standalone:!1,features:[V([S]),B],decls:4,vars:3,consts:[["part","container",1,"s-user-invite-tool-container","s-cursor-pointer",3,"click"],[1,"s-user-invite-tool-default",3,"ngSwitch"],["class","s-user-invite-tool-button",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"s-user-invite-tool-button"],["width","32","height","32","viewBox","0 0 32 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.3589 13.3008C17.3965 13.3008 15.6521 14.2519 14.5622 15.7174C14.1206 15.6247 13.6692 15.5768 13.2136 15.5768C9.6054 15.5768 6.66992 18.5123 6.66992 22.1205C6.66992 22.5918 7.05207 22.974 7.52344 22.974H14.67C15.7651 24.3594 17.4599 25.25 19.3589 25.25C22.6533 25.25 25.3335 22.5698 25.3335 19.2754C25.3335 15.981 22.6533 13.3008 19.3589 13.3008ZM8.45235 21.2669C8.85669 19.0058 10.8378 17.2839 13.2136 17.2839C13.3823 17.2839 13.5501 17.2933 13.7166 17.3104C13.5016 17.9261 13.3843 18.5873 13.3843 19.2754C13.3843 19.9735 13.505 20.6437 13.726 21.2669H8.45235ZM19.3589 23.543C17.0057 23.543 15.0913 21.6286 15.0913 19.2754C15.0913 16.9223 17.0057 15.0078 19.3589 15.0078C21.712 15.0078 23.6265 16.9223 23.6265 19.2754C23.6265 21.6286 21.712 23.543 19.3589 23.543Z","fill","white"],["d","M13.2132 13.8716C15.182 13.8716 16.7837 12.2699 16.7837 10.3011C16.7837 8.33224 15.182 6.73047 13.2132 6.73047C11.2443 6.73047 9.64258 8.33224 9.64258 10.3011C9.64258 12.2699 11.2443 13.8716 13.2132 13.8716ZM13.2132 8.4375C14.2408 8.4375 15.0767 9.2735 15.0767 10.3011C15.0767 11.3286 14.2408 12.1645 13.2132 12.1645C12.1856 12.1645 11.3496 11.3286 11.3496 10.3011C11.3496 9.2735 12.1856 8.4375 13.2132 8.4375Z","fill","white"],["d","M21.0664 18.4219H20.2129V17.5684C20.2129 17.097 19.8308 16.7148 19.3594 16.7148C18.888 16.7148 18.5059 17.097 18.5059 17.5684V18.4219H17.6523C17.181 18.4219 16.7988 18.804 16.7988 19.2754C16.7988 19.7468 17.181 20.1289 17.6523 20.1289H18.5059V20.9824C18.5059 21.4538 18.888 21.836 19.3594 21.836C19.8308 21.836 20.2129 21.4538 20.2129 20.9824V20.1289H21.0664C21.5378 20.1289 21.9199 19.7468 21.9199 19.2754C21.9199 18.804 21.5378 18.4219 21.0664 18.4219Z","fill","white"],["name","button",3,"slotchange"],["part","button-container",1,"action-btn"],["part","button-icon","width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M8.57143 9.42858H7.71429C7.25963 9.42858 6.82359 9.60919 6.5021 9.93068C6.18061 10.2522 6 10.6882 6 11.1429V18C6 18.4547 6.18061 18.8907 6.5021 19.2122C6.82359 19.5337 7.25963 19.7143 7.71429 19.7143H16.2857C16.7404 19.7143 17.1764 19.5337 17.4979 19.2122C17.8194 18.8907 18 18.4547 18 18V11.1429C18 10.6882 17.8194 10.2522 17.4979 9.93068C17.1764 9.60919 16.7404 9.42858 16.2857 9.42858H15.4286M12 13.7143V4.28572M12 4.28572L9.42857 6.85715M12 4.28572L14.5714 6.85715","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&(_(0,"div",0),G("click",function(){return r.openInviteDialog()}),_(1,"div",1),g(2,gQt,6,0,"div",2)(3,uQt,5,0,"div",3),b()()),t&2&&(m(),d("ngSwitch",r.type),m(),d("ngSwitchCase","invite"),m(),d("ngSwitchCase","share"))},dependencies:[Gi,to],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}:host{display:inline-flex!important}.s-user-invite-tool-container{display:inline-block!important}.s-user-invite-tool-button{display:flex!important}.action-btn{display:inline-flex;justify-content:center;align-items:center;padding:6px!important;border-radius:var(--legacy-velt-tool-border-radius);border:var(--legacy-velt-tool-border);background-color:var(--legacy-velt-tool-bg-color);color:var(--legacy-velt-tool-icon-color);cursor:pointer}.action-btn .action-btn-label{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:4px!important;font-weight:700!important;color:currentColor!important}.action-btn .action-btn-icon{width:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));color:currentColor}.action-btn .toolbar-icon-dropdown-arrow{width:16px;height:16px;color:currentColor}.action-btn:focus{border-radius:var(--legacy-velt-tool-focus-border-radius);border:var(--legacy-velt-tool-focus-border);background-color:var(--legacy-velt-tool-focus-bg-color);color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:focus .action-btn-icon{width:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:focus .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:hover{border-radius:var(--legacy-velt-tool-hover-border-radius);border:var(--legacy-velt-tool-hover-border);background-color:var(--legacy-velt-tool-hover-bg-color);color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:hover .action-btn-icon{width:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:hover .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:active,.action-btn.active{border-radius:var(--legacy-velt-tool-active-border-radius);border:var(--legacy-velt-tool-active-border);background-color:var(--legacy-velt-tool-active-bg-color);color:var(--legacy-velt-tool-active-icon-color)}.action-btn:active .action-btn-icon,.action-btn.active .action-btn-icon{width:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:active .toolbar-icon-dropdown-arrow,.action-btn.active .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-active-icon-color)}
513
513
  `],encapsulation:3,changeDetection:0});let i=o;return i})();var fQt=["*"];function vQt(i,o){if(i&1&&(f(0),le(),_(1,"svg",7),w(2,"path",8)(3,"path",9),b(),v()),i&2){let n=l(2);m(),x("data-testid",n.componentId+"-video-icon")}}function CQt(i,o){if(i&1&&(f(0),le(),_(1,"svg",7),w(2,"path",10)(3,"path",9),b(),v()),i&2){let n=l(2);m(),x("data-testid",n.componentId+"-audio-icon")}}function _Qt(i,o){if(i&1){let n=Y();f(0),_(1,"div",3),G("click",function(){N(n);let t=l();return F(t.openPermissionDeniedDialog())}),le(),_(2,"svg",4),w(3,"rect",5)(4,"path",6),b(),ut(),f(5,0),g(6,vQt,4,1,"ng-container",1)(7,CQt,4,1,"ng-container",1),v(),b(),v()}if(i&2){let n=l();m(),ge("thread-mode",n.mode==="thread"),x("aria-expanded",!1)("data-testid",n.componentId+"-denied"),m(),x("data-testid",n.componentId+"-info-icon"),m(3),d("ngSwitch",n.type),m(),d("ngSwitchCase","video"),m(),d("ngSwitchCase","audio")}}function yQt(i,o){i&1&&(f(0),Lt(1),v())}var I_=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(a,r),this.devicePermissionService=e,this.loggingService=t,this.themeService=r,this.elementRef=a,this.type="audio",this.state=null,this.mode=null,this.veltElement=!0,this.subscriptions=[],this.componentId="velt-device-permission-button",this.loggingService.log("%c[WB] Creating CLASS: DevicePermissionButtonComponent","color: blue;")}ngOnInit(){try{this.loggingService.log("%c[WB] Calling DevicePermissionButtonComponent FUNCTION: ngOnInit","color: green;"),this.subscriptions.push(this.devicePermissionService.getPermissionState$(this.type).subscribe(e=>{this.state=e})),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in DevicePermissionButtonComponent onInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","button"),e.setAttribute("aria-label",`Device permission button for ${this.type}`)}catch(e){this.loggingService.catch("Error in DevicePermissionButtonComponent setupA11yAttributes:",e)}}openPermissionDeniedDialog(){try{this.loggingService.log("%c[WB] Calling DevicePermissionButtonComponent FUNCTION: openPermissionDeniedDialog","color: green;"),this.devicePermissionService.openDevicePermissionDeniedDialog(this.type,{darkMode:this.darkMode})}catch(e){this.loggingService.catch("Error in DevicePermissionButtonComponent openPermissionDeniedDialog: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(jd),h(y),h(qe),h(R))},o.\u0275cmp=O({type:o,selectors:[["app-device-permission-button"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{type:"type",state:"state",mode:"mode"},standalone:!1,features:[B],ngContentSelectors:fQt,decls:3,vars:2,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["role","button","tabindex","0","aria-label","Camera or microphone access is blocked. Click to learn how to enable it",1,"velt-device-permission-button--denied",3,"click"],["width","12","height","12","viewBox","0 0 12 12","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img",1,"velt-device-permission-button--info-icon"],["width","12","height","12","rx","6","fill","currentColor"],["d","M6 9.495V9.5M6 7V2.5","stroke","white","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["width","28","height","28","viewBox","0 0 28 28","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["d","M20.9375 17.6068C21.1017 17.5503 21.2442 17.444 21.345 17.3027C21.4459 17.1614 21.5 16.9921 21.5 16.8184V11.1818C21.4999 11.0398 21.4636 10.9002 21.3944 10.7762C21.3252 10.6522 21.2255 10.5479 21.1047 10.4733C20.9839 10.3986 20.846 10.3561 20.7042 10.3497C20.5623 10.3433 20.4212 10.3733 20.2942 10.4368L16.5 12.3334V13.1668V10.6667C16.5 10.2246 16.3244 9.80072 16.0118 9.48816C15.6993 9.17559 15.2754 9 14.8333 9H12.3333M16.5 16.5V17.3333C16.5 17.7754 16.3244 18.1993 16.0118 18.5118C15.6993 18.8244 15.2754 19 14.8333 19H8.16667C7.72464 19 7.30072 18.8244 6.98816 18.5118C6.67559 18.1993 6.5 17.7754 6.5 17.3333V10.6667C6.5 10.2246 6.67559 9.80072 6.98816 9.48816C7.30072 9.17559 7.72464 9 8.16667 9H9","stroke","currentColor","stroke-opacity","0.52","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M6.5 6.5L21.5 21.5","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M11.5013 8.1665C11.5013 7.50346 11.7647 6.86758 12.2335 6.39874C12.7024 5.9299 13.3383 5.6665 14.0013 5.6665C14.6643 5.6665 15.3002 5.9299 15.7691 6.39874C16.2379 6.86758 16.5013 7.50346 16.5013 8.1665V12.3332C16.5013 12.58 16.4648 12.8254 16.393 13.0615M14.7263 14.7282C14.3527 14.8414 13.9578 14.8655 13.5732 14.7987C13.1885 14.7318 12.8249 14.5758 12.5114 14.3432C12.198 14.1105 11.9433 13.8077 11.7679 13.459C11.5925 13.1102 11.5012 12.7252 11.5013 12.3348V11.5015M8.16797 12.3332C8.16779 13.386 8.45252 14.4192 8.99198 15.3232C9.53144 16.2273 10.3055 16.9685 11.2321 17.4683C12.1587 17.9681 13.2033 18.2078 14.2551 18.162C15.3069 18.1162 16.3267 17.7866 17.2063 17.2082M18.873 15.5415C19.5012 14.5896 19.835 13.4737 19.833 12.3332M10.668 21.4998H17.3346M14.0013 18.1665V21.4998","stroke","currentColor","stroke-opacity","0.52","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,r){t&1&&(jt(),f(0,0),g(1,_Qt,8,8,"ng-container",1)(2,yQt,2,0,"ng-container",2),v()),t&2&&(d("ngSwitch",r.state),m(),d("ngSwitchCase","denied"))},dependencies:[Gi,to,bm],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-device-permission-button--denied[_ngcontent-%COMP%]{padding:var(--velt-spacing-md);display:flex;align-items:center;justify-content:center;border-radius:var(--velt-border-radius-full);cursor:pointer;background:var(--velt-error-transparent);position:relative;color:var(--velt-error)}.velt-device-permission-button--denied.thread-mode[_ngcontent-%COMP%]{background:none;padding:var(--velt-spacing-2xs)}.velt-device-permission-button--info-icon[_ngcontent-%COMP%]{position:absolute;top:1px;right:1px}"],changeDetection:0});let i=o;return i})();function bQt(i,o){if(i&1){let n=Y();_(0,"div",22),G("click",function(){N(n);let t=l().$implicit,r=l(2);return F(r.followUser(t))}),w(1,"snippyly-user-avatar",23),b()}if(i&2){let n=l().$implicit,e=l().ngIf;ge("s-current-user",(e.user==null?null:e.user.userSnippylyId)===(n==null?null:n.userSnippylyId)),m(),d("user",n)}}function IQt(i,o){if(i&1&&(f(0),g(1,bQt,2,3,"div",21),v()),i&2){let n=o.index,e=l().ngIf;m(),d("ngIf",n<e.maxAttendees)}}function EQt(i,o){if(i&1&&(_(0,"button"),te(1),b()),i&2){let n=l().ngIf;m(),Ge("+"+((n.attendees==null?null:n.attendees.length)-n.maxAttendees))}}function xQt(i,o){i&1&&(le(),_(0,"svg",24),w(1,"path",25),b())}function TQt(i,o){i&1&&(le(),_(0,"svg",26),w(1,"path",27)(2,"path",28),b())}function DQt(i,o){i&1&&(le(),_(0,"svg",29),w(1,"path",30),b())}function wQt(i,o){i&1&&(le(),_(0,"svg",26)(1,"g"),w(2,"path",31)(3,"path",28),b(),_(4,"defs")(5,"clipPath",32),w(6,"rect",33),b()()())}function OQt(i,o){i&1&&(f(0),le(),_(1,"svg",26)(2,"g"),w(3,"path",35)(4,"path",36)(5,"path",37)(6,"path",38)(7,"path",28),b(),_(8,"defs")(9,"clipPath",39),w(10,"rect",33),b()()(),v())}function AQt(i,o){i&1&&(le(),_(0,"svg",26)(1,"g"),w(2,"path",40)(3,"path",41)(4,"path",37)(5,"path",38)(6,"path",28),b(),_(7,"defs")(8,"clipPath",42),w(9,"rect",33),b()()())}function PQt(i,o){i&1&&(le(),_(0,"svg",26),w(1,"path",43)(2,"path",44)(3,"path",45)(4,"path",46),b())}function MQt(i,o){if(i&1&&g(0,AQt,10,0,"svg",11)(1,PQt,5,0,"svg",11),i&2){let n=l(2).ngIf;d("ngIf",!n.screenSharingState),m(),d("ngIf",n.screenSharingState)}}function kQt(i,o){if(i&1){let n=Y();_(0,"button",8),G("click",function(){N(n);let t=l(2);return F(t.onToggleScreenSharingClick())}),_(1,"div",9),te(2),P(3,"translate"),P(4,"translate"),b(),g(5,OQt,11,0,"ng-container",34)(6,MQt,2,2,"ng-template",null,0,Te),b()}if(i&2){let n=de(7),e=l().ngIf;m(2),Ce("",e.screenSharingState?M(3,3,"Stop sharing"):M(4,5,"Share screen")," "),m(3),d("ngIf",e.screenSharingDisabled)("ngIfElse",n)}}function RQt(i,o){i&1&&(le(),_(0,"svg",26),w(1,"path",47),b())}function NQt(i,o){i&1&&(le(),_(0,"svg",26),w(1,"path",48),b())}function FQt(i,o){if(i&1){let n=Y();_(0,"button",8),G("click",function(){N(n);let t=l(2);return F(t.onToggleHuddleCursorModeClick())}),g(1,RQt,2,0,"svg",11)(2,NQt,2,0,"svg",11),b()}if(i&2){let n=l().ngIf;m(),d("ngIf",!n.huddleOnCursorMode),m(),d("ngIf",n.huddleOnCursorMode)}}function LQt(i,o){if(i&1){let n=Y();_(0,"button",8),G("click",function(){N(n);let t=l(2);return F(t.toggleMessagesPanel())}),_(1,"div",9),te(2),P(3,"translate"),b(),le(),_(4,"svg",17),w(5,"path",49),b()()}i&2&&(m(2),Ge(M(3,1,"Chat with everyone")))}function BQt(i,o){if(i&1){let n=Y();f(0),_(1,"div",2)(2,"div",3)(3,"div",4),g(4,IQt,2,1,"ng-container",5)(5,EQt,2,1,"button",1),b(),_(6,"div",6)(7,"app-device-permission-button",7)(8,"button",8),G("click",function(){N(n);let t=l();return F(t.onToggleAudioClick())}),_(9,"div",9),te(10),P(11,"translate"),P(12,"translate"),b(),g(13,xQt,2,0,"svg",10)(14,TQt,3,0,"svg",11),b()(),_(15,"app-device-permission-button",12)(16,"button",8),G("click",function(){N(n);let t=l();return F(t.onToggleVideoClick())}),_(17,"div",9),te(18),P(19,"translate"),P(20,"translate"),b(),g(21,DQt,2,0,"svg",13)(22,wQt,7,0,"svg",11),b()(),g(23,kQt,8,7,"button",14)(24,FQt,3,2,"button",14),w(25,"snippyly-user-invite-tool-internal",15),P(26,"translate"),P(27,"translate"),g(28,LQt,6,3,"button",14),_(29,"button",16),G("click",function(){N(n);let t=l();return F(t.openMediaSourceOptionsDialog())}),_(30,"div",9),te(31),P(32,"translate"),P(33,"translate"),b(),le(),_(34,"svg",17),w(35,"path",18),b()()(),ut(),_(36,"div",19)(37,"button",20),G("click",function(){N(n);let t=l();return F(t.onLeaveClick())}),te(38),P(39,"translate"),b()()()(),v()}if(i&2){let n=o.ngIf,e=l();m(4),d("ngForOf",n.attendees)("ngForTrackBy",e.trackByAttendeeId),m(),d("ngIf",(n.attendees==null?null:n.attendees.length)>n.maxAttendees),m(2),d("darkMode",!0),m(3),Ce("",n.audioState?M(11,20,"Click to mute"):M(12,22,"Click to unmute")," "),m(3),d("ngIf",n.audioState),m(),d("ngIf",!n.audioState),m(),d("darkMode",!0),m(3),Ce("",n.videoState?M(19,24,"Turn off video"):M(20,26,"Turn on video")," "),m(3),d("ngIf",n.videoState),m(),d("ngIf",!n.videoState),m(),d("ngIf",n.screenSharingSupported),m(),d("ngIf",!n.hideHuddleOnCursor),m(),d("title",M(26,28,"Invite users to join this huddle"))("placeholder",M(27,30,"Please select a contact to invite"))("hideAccessControlDropdown",!0),m(3),d("ngIf",n.chatEnabled),m(),d("disabled",!n.audioState&&!n.videoState),m(2),Ge(!n.audioState&&!n.videoState?M(32,32,"Enable audio or video to change the settings"):M(33,34,"Change audio/video settings")),m(7),Ge(M(39,36,"Leave"))}}var L0e=(()=>{let o=class o{constructor(e,t,r,a,s,c){this.analyticsService=e,this.configService=t,this.flockService=r,this.huddleService=a,this.loggingService=s,this.dialog=c,this.attendees=[],this.toggleAudio=new Pe,this.toggleVideo=new Pe,this.toggleScreenSharing=new Pe,this.leave=new Pe,this.subscriptions=[],this.veltElement=!0,this.componentConfigSignal=De({attendees:this.attendees,maxAttendees:4,audioState:this.audioState,videoState:this.videoState,chatEnabled:!1,huddleOnCursorMode:!1,hideHuddleOnCursor:!1,screenSharingState:this.screenSharingState,screenSharingDisabled:this.screenSharingDisabled,screenSharingSupported:!!navigator?.mediaDevices?.getDisplayMedia,user:this.user})}ngOnInit(){try{this.subscriptions.push(this.configService.getConfig$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{hideHuddleOnCursor:!e?.featureAllowList?.find(r=>r===Re.CURSOR)}),t))},e=>{this.loggingService.catch("Error in HuddleMenuPanelComponent getConfig$: ",e)})),this.subscriptions.push(this.huddleService.getHuddleOnCursorMode$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleOnCursorMode:e}),t))},e=>{this.loggingService.catch("Error in HuddleMenuPanelComponent getHuddleOnCursorMode$: ",e)})),this.subscriptions.push(this.huddleService.getChatEnabled$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{chatEnabled:e}),t))},e=>{this.loggingService.catch("Error in HuddleMenuPanelComponent getChatEnabled$: ",e)}))}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent ngOnInit: ",e)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling HuddleMenuPanelComponent FUNCTION: ngOnChanges","color: green;"),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in HuddleMenuPanelComponent ngOnChanges: ",t)}}trackByAttendeeId(e,t){return t?.userId}onToggleAudioClick(){try{this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_AUDIO_BUTTON_CLICKED,{huddleType:this.huddleService.getInitialHuddleType(),totalUsers:this.huddleService.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.huddleService.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userId)}),this.toggleAudio.emit()}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent onToggleAudioClick: ",e)}}onToggleVideoClick(){try{this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_VIDEO_BUTTON_CLICKED,{huddleType:this.huddleService.getInitialHuddleType(),totalUsers:this.huddleService.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.huddleService.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userId)}),this.toggleVideo.emit()}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent onToggleVideoClick: ",e)}}onToggleScreenSharingClick(){try{this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_SCREENSHARING_BUTTON_CLICKED,{huddleType:this.huddleService.getInitialHuddleType(),totalUsers:this.huddleService.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.huddleService.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userId)}),this.toggleScreenSharing.emit()}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent onToggleScreenSharingClick: ",e)}}onToggleHuddleCursorModeClick(){try{this.componentConfigSignal().huddleOnCursorMode?this.huddleService.disableHuddleOnCursorMode():this.huddleService.enableHuddleOnCursorMode()}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent onToggleHuddleCursorModeClick: ",e)}}openMediaSourceOptionsDialog(){try{this.subscriptions.push(this.dialog.open(P0e,{panelClass:"velt-mat-dialog-container",data:{settingsVisible:{audio:this.componentConfigSignal().audioState,video:this.componentConfigSignal().videoState}}}).afterClosed().pipe(at(1)).subscribe(e=>{e&&(this.componentConfigSignal().audioState&&this.huddleService.toggleLocalStreamAudio(!0),this.componentConfigSignal().videoState&&this.huddleService.toggleLocalStreamVideo(!0))}))}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent mediaSourceOptionsDialog: ",e)}}onLeaveClick(){this.leave.emit()}toggleMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: toggleMessagesPanel","color: green;"),this.huddleService.toggleMessagesPanel()}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent toggleMessagesPanel: ",e)}}followUser(e){try{this.huddleService.getFlockModeOnAvatarClick()&&this.flockService.getFlockMode()&&this.componentConfigSignal().user?.userSnippylyId!==e.userSnippylyId&&this.flockService.setFlockLeader(e.userSnippylyId,e.name)}catch(t){this.loggingService.catch("Error in HuddleMenuPanelComponent followUser: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>e?.unsubscribe())}catch(e){this.loggingService.catch("Error in HuddleMenuPanelComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ft),h(Uc),h(fr),h(y),h(no))},o.\u0275cmp=O({type:o,selectors:[["snippyly-huddle-menu-panel"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{stream:"stream",selected:"selected",isRemoteStream:"isRemoteStream",user:"user",audioState:"audioState",videoState:"videoState",screenSharingState:"screenSharingState",screenSharingDisabled:"screenSharingDisabled",attendees:"attendees"},outputs:{toggleAudio:"toggleAudio",toggleVideo:"toggleVideo",toggleScreenSharing:"toggleScreenSharing",leave:"leave"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["screenSharingToggleBtnRef",""],[4,"ngIf"],[1,"reply-div","input-text-wrap"],[1,"action-menu"],[1,"pins-wrap"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"actions-wrap"],["type","audio",3,"darkMode"],[1,"action__button","tooltip",3,"click"],[1,"tooltiptext"],["width","20","height","20","viewBox","0 0 13 19","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["type","video",3,"darkMode"],["width","20","height","20","viewBox","0 0 19 11","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["class","action__button tooltip",3,"click",4,"ngIf"],["type","invite","source","Huddle",3,"title","placeholder","hideAccessControlDropdown"],[1,"action__button","tooltip",3,"click","disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.5 12C19.5 11.77 19.49 11.55 19.47 11.32L21.33 9.91C21.73 9.61 21.84 9.05 21.59 8.61L19.72 5.38C19.47 4.94 18.93 4.76 18.47 4.96L16.32 5.87C15.95 5.61 15.56 5.38 15.15 5.19L14.86 2.88C14.8 2.38 14.37 2 13.87 2H10.14C9.63003 2 9.20003 2.38 9.14003 2.88L8.85003 5.19C8.44003 5.38 8.05003 5.61 7.68003 5.87L5.53003 4.96C5.07003 4.76 4.53003 4.94 4.28003 5.38L2.41003 8.62C2.16003 9.06 2.27003 9.61 2.67003 9.92L4.53003 11.33C4.51003 11.55 4.50003 11.77 4.50003 12C4.50003 12.23 4.51003 12.45 4.53003 12.68L2.67003 14.09C2.27003 14.39 2.16003 14.95 2.41003 15.39L4.28003 18.62C4.53003 19.06 5.07003 19.24 5.53003 19.04L7.68003 18.13C8.05003 18.39 8.44003 18.62 8.85003 18.81L9.14003 21.12C9.20003 21.62 9.63003 22 10.13 22H13.86C14.36 22 14.79 21.62 14.85 21.12L15.14 18.81C15.55 18.62 15.94 18.39 16.31 18.13L18.46 19.04C18.92 19.24 19.46 19.06 19.71 18.62L21.58 15.39C21.83 14.95 21.72 14.4 21.32 14.09L19.46 12.68C19.49 12.45 19.5 12.23 19.5 12ZM12.04 15.5C10.11 15.5 8.54003 13.93 8.54003 12C8.54003 10.07 10.11 8.5 12.04 8.5C13.97 8.5 15.54 10.07 15.54 12C15.54 13.93 13.97 15.5 12.04 15.5Z","fill","#fff"],[1,"buttons-wrap"],[1,"secondary",3,"click"],["class","pin2",3,"s-current-user","click",4,"ngIf"],[1,"pin2",3,"click"],[1,"huddle-menu-panel-user-avatar",3,"user"],["width","20","height","20","viewBox","0 0 13 19","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.77526 0.888917C4.98766 1.03653 4.34477 1.39041 3.76525 1.99544C3.26289 2.51988 2.94255 3.10884 2.75974 3.84431C2.69679 4.09753 2.6908 4.39635 2.6908 7.29276C2.6908 10.7979 2.68044 10.6352 2.94799 11.327C3.299 12.2346 4.07584 13.0561 4.94368 13.4374C5.82412 13.8243 6.82444 13.8531 7.71552 13.5173C8.69181 13.1494 9.53872 12.2934 9.92297 11.2862C10.1713 10.6354 10.1631 10.7714 10.1631 7.29276C10.1631 3.78764 10.1735 3.95032 9.90592 3.25855C9.62932 2.54335 9.02923 1.81042 8.38767 1.40419C7.61998 0.918084 6.64549 0.725873 5.77526 0.888917ZM6.9551 2.18212C7.80033 2.36379 8.55484 3.08137 8.82443 3.95997C8.91085 4.24162 8.9112 4.25479 8.9112 7.29276C8.9112 10.3307 8.91085 10.3439 8.82443 10.6256C8.578 11.4287 7.92854 12.0994 7.15071 12.3538C6.92897 12.4264 6.7875 12.4431 6.40739 12.4415C6.00213 12.4398 5.89869 12.425 5.65097 12.3333C5.00401 12.0936 4.49038 11.6376 4.2051 11.0497C3.92221 10.4667 3.92452 10.4977 3.92452 7.29276C3.92452 4.09736 3.92315 4.11587 4.19825 3.55135C4.71228 2.49645 5.83136 1.94067 6.9551 2.18212ZM0.537139 8.64006C0.373453 8.71677 0.215048 8.92183 0.182929 9.09861C0.133831 9.36895 0.199086 10.6794 0.283042 11.1082C0.737953 13.4317 2.32631 15.2803 4.50075 16.017C4.75328 16.1025 5.14915 16.2055 5.38044 16.2458L5.801 16.3192V16.9744V17.6296L5.06042 17.6421C4.38416 17.6536 4.31046 17.6619 4.21195 17.738C4.00671 17.8964 3.94271 18.0255 3.94271 18.2809C3.94271 18.5363 4.00679 18.6655 4.21206 18.8237C4.31804 18.9055 4.36006 18.907 6.42696 18.907C8.49385 18.907 8.53586 18.9055 8.64185 18.8237C8.84712 18.6655 8.9112 18.5363 8.9112 18.2809C8.9112 18.0255 8.8472 17.8964 8.64196 17.738C8.54346 17.6619 8.46975 17.6536 7.79349 17.6421L7.05291 17.6296V16.9744V16.3192L7.47347 16.2469C9.74567 15.8564 11.6474 14.1569 12.3699 11.8711C12.6066 11.1222 12.6648 10.7131 12.6659 9.79054C12.6668 9.05017 12.6614 8.98828 12.5862 8.8841C12.4332 8.67197 12.3081 8.60568 12.0605 8.60568C11.8131 8.60568 11.6881 8.67181 11.5348 8.88378C11.4622 8.9842 11.4515 9.07453 11.4282 9.79025C11.4001 10.6516 11.3449 11.0079 11.1515 11.5749C10.8931 12.3325 10.527 12.9264 9.95298 13.5192C9.22696 14.2689 8.41181 14.7274 7.405 14.9524C6.91168 15.0626 5.87256 15.0542 5.38588 14.936C4.37192 14.6897 3.6185 14.2601 2.90093 13.5192C2.32689 12.9264 1.96079 12.3325 1.70239 11.5749C1.50901 11.0079 1.45377 10.6516 1.42568 9.79025C1.39755 8.92635 1.3871 8.88689 1.13621 8.69342C1.00672 8.5936 0.695505 8.56589 0.537139 8.64006Z","fill","#FF7162"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M9.77526 0.888917C8.98766 1.03653 8.34477 1.39041 7.76525 1.99544C7.26289 2.51988 6.94255 3.10884 6.75974 3.84431C6.69679 4.09753 6.6908 4.39635 6.6908 7.29276C6.6908 10.7979 6.68044 10.6352 6.94799 11.327C7.299 12.2346 8.07584 13.0561 8.94368 13.4374C9.82412 13.8243 10.8244 13.8531 11.7155 13.5173C12.6918 13.1494 13.5387 12.2934 13.923 11.2862C14.1713 10.6354 14.1631 10.7714 14.1631 7.29276C14.1631 3.78764 14.1735 3.95032 13.9059 3.25855C13.6293 2.54335 13.0292 1.81042 12.3877 1.40419C11.62 0.918084 10.6455 0.725873 9.77526 0.888917ZM10.9551 2.18212C11.8003 2.36379 12.5548 3.08137 12.8244 3.95997C12.9108 4.24162 12.9112 4.25479 12.9112 7.29276C12.9112 10.3307 12.9108 10.3439 12.8244 10.6256C12.578 11.4287 11.9285 12.0994 11.1507 12.3538C10.929 12.4264 10.7875 12.4431 10.4074 12.4415C10.0021 12.4398 9.89869 12.425 9.65097 12.3333C9.00401 12.0936 8.49038 11.6376 8.2051 11.0497C7.92221 10.4667 7.92452 10.4977 7.92452 7.29276C7.92452 4.09736 7.92315 4.11587 8.19825 3.55135C8.71228 2.49645 9.83136 1.94067 10.9551 2.18212ZM4.53714 8.64006C4.37345 8.71677 4.21505 8.92183 4.18293 9.09861C4.13383 9.36895 4.19909 10.6794 4.28304 11.1082C4.73795 13.4317 6.32631 15.2803 8.50075 16.017C8.75328 16.1025 9.14915 16.2055 9.38044 16.2458L9.801 16.3192V16.9744V17.6296L9.06042 17.6421C8.38416 17.6536 8.31046 17.6619 8.21195 17.738C8.00671 17.8964 7.94271 18.0255 7.94271 18.2809C7.94271 18.5363 8.00679 18.6655 8.21206 18.8237C8.31804 18.9055 8.36006 18.907 10.427 18.907C12.4938 18.907 12.5359 18.9055 12.6418 18.8237C12.8471 18.6655 12.9112 18.5363 12.9112 18.2809C12.9112 18.0255 12.8472 17.8964 12.642 17.738C12.5435 17.6619 12.4697 17.6536 11.7935 17.6421L11.0529 17.6296V16.9744V16.3192L11.4735 16.2469C13.7457 15.8564 15.6474 14.1569 16.3699 11.8711C16.6066 11.1222 16.6648 10.7131 16.6659 9.79054C16.6668 9.05017 16.6614 8.98828 16.5862 8.8841C16.4332 8.67197 16.3081 8.60568 16.0605 8.60568C15.8131 8.60568 15.6881 8.67181 15.5348 8.88378C15.4622 8.9842 15.4515 9.07453 15.4282 9.79025C15.4001 10.6516 15.3449 11.0079 15.1515 11.5749C14.8931 12.3325 14.527 12.9264 13.953 13.5192C13.227 14.2689 12.4118 14.7274 11.405 14.9524C10.9117 15.0626 9.87256 15.0542 9.38588 14.936C8.37192 14.6897 7.6185 14.2601 6.90093 13.5192C6.32689 12.9264 5.96079 12.3325 5.70239 11.5749C5.50901 11.0079 5.45377 10.6516 5.42568 9.79025C5.39755 8.92636 5.3871 8.88689 5.13621 8.69342C5.00672 8.5936 4.69551 8.56589 4.53714 8.64006Z","fill","white"],["d","M19 1L1 19","stroke","#FF7162","stroke-width","1.4","stroke-linecap","round"],["width","20","height","20","viewBox","0 0 19 11","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.55139 0.23203C1.68754 0.455725 1.06855 1.0239 0.766641 1.87017L0.666016 2.15221V5.58961V9.027L0.766892 9.30905C1.0535 10.1102 1.64038 10.6751 2.43987 10.9192L2.70863 11.0013H7.1343H11.56L11.8467 10.9053C12.6234 10.645 13.2099 10.0654 13.47 9.30122C13.56 9.03659 13.5637 8.9921 13.5769 8.03104C13.5844 7.48324 13.6004 7.03508 13.6125 7.03508C13.661 7.03508 15.0857 7.85713 15.8518 8.32715C16.7188 8.85908 16.9126 8.93887 17.338 8.93887C18.0692 8.93887 18.7509 8.40866 18.947 7.6873C19.0174 7.42849 19.0165 3.7478 18.946 3.48726C18.7883 2.90449 18.278 2.40845 17.7016 2.27772C17.4483 2.22025 17.0895 2.2339 16.8373 2.31054C16.6848 2.35687 16.3699 2.52617 15.9107 2.80867C15.3288 3.16675 13.6405 4.14414 13.6039 4.14414C13.5979 4.14414 13.5847 3.71184 13.5747 3.18343C13.5543 2.10543 13.5363 1.99899 13.2916 1.50796C13.0166 0.956034 12.475 0.494788 11.8467 0.277192L11.56 0.177913L7.18806 0.170686C2.95948 0.163705 2.80747 0.165715 2.55139 0.23203ZM11.3211 1.83643C11.5404 1.90052 11.7306 2.05381 11.8398 2.25463L11.9183 2.399V5.57293V8.74683L11.8268 8.92184C11.7122 9.14091 11.4929 9.30852 11.2552 9.35869C11.0123 9.40995 3.20786 9.41115 2.98224 9.35999C2.74243 9.30559 2.53297 9.14483 2.42553 8.93266L2.33236 8.74873V5.58961V2.43048L2.42553 2.24656C2.52985 2.04059 2.7435 1.87225 2.96604 1.82078C3.04208 1.80318 4.88581 1.78753 7.11882 1.78556C10.641 1.78245 11.1578 1.78873 11.3211 1.83643ZM17.3116 5.59366V7.28997L17.2309 7.23801C16.8358 6.98339 15.6936 6.30427 15.1359 5.99233C14.7573 5.78052 14.4468 5.5987 14.4461 5.5883C14.4453 5.57787 14.7874 5.37536 15.2062 5.13827C15.6251 4.90114 16.258 4.52634 16.6128 4.30536C16.9675 4.08438 17.2699 3.90215 17.2847 3.90045C17.2995 3.89876 17.3116 4.6607 17.3116 5.59366Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.55139 4.23203C2.68754 4.45573 2.06855 5.0239 1.76664 5.87017L1.66602 6.15221V9.58961V13.027L1.76689 13.309C2.0535 14.1102 2.64038 14.6751 3.43987 14.9192L3.70863 15.0013H8.1343H12.56L12.8467 14.9053C13.6234 14.645 14.2099 14.0654 14.47 13.3012C14.56 13.0366 14.5637 12.9921 14.5769 12.031C14.5844 11.4832 14.6004 11.0351 14.6125 11.0351C14.661 11.0351 16.0857 11.8571 16.8518 12.3271C17.7188 12.8591 17.9126 12.9389 18.338 12.9389C19.0692 12.9389 19.7509 12.4087 19.947 11.6873C20.0174 11.4285 20.0165 7.7478 19.946 7.48726C19.7883 6.90449 19.278 6.40845 18.7016 6.27772C18.4483 6.22025 18.0895 6.2339 17.8373 6.31054C17.6848 6.35687 17.3699 6.52617 16.9107 6.80867C16.3288 7.16675 14.6405 8.14414 14.6039 8.14414C14.5979 8.14414 14.5847 7.71184 14.5747 7.18343C14.5543 6.10543 14.5363 5.99899 14.2916 5.50796C14.0166 4.95603 13.475 4.49479 12.8467 4.27719L12.56 4.17791L8.18806 4.17069C3.95948 4.16371 3.80747 4.16571 3.55139 4.23203ZM12.3211 5.83643C12.5404 5.90052 12.7306 6.05381 12.8398 6.25463L12.9183 6.399V9.57293V12.7468L12.8268 12.9218C12.7122 13.1409 12.4929 13.3085 12.2552 13.3587C12.0123 13.4099 4.20786 13.4111 3.98224 13.36C3.74243 13.3056 3.53297 13.1448 3.42553 12.9327L3.33236 12.7487V9.58961V6.43048L3.42553 6.24656C3.52985 6.04059 3.7435 5.87225 3.96604 5.82078C4.04208 5.80318 5.88581 5.78753 8.11882 5.78556C11.641 5.78245 12.1578 5.78873 12.3211 5.83643ZM18.3116 9.59366V11.29L18.2309 11.238C17.8358 10.9834 16.6936 10.3043 16.1359 9.99233C15.7573 9.78052 15.4468 9.5987 15.4461 9.5883C15.4453 9.57787 15.7874 9.37536 16.2062 9.13827C16.6251 8.90114 17.258 8.52634 17.6128 8.30536C17.9675 8.08438 18.2699 7.90215 18.2847 7.90045C18.2995 7.89876 18.3116 8.6607 18.3116 9.59366Z","fill","white"],["id","clip0_2334_10689"],["width","20","height","20","fill","white"],[4,"ngIf","ngIfElse"],["d","M7.50016 15H9.16683V16.6667H10.8335V15H12.5002V16.6667H13.3335C13.7937 16.6667 14.1668 17.0398 14.1668 17.5C14.1668 17.9602 13.7937 18.3333 13.3335 18.3333H6.66683C6.20659 18.3333 5.8335 17.9602 5.8335 17.5C5.8335 17.0398 6.20659 16.6667 6.66683 16.6667H7.50016V15Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.33317 5L3.33317 11.6667C3.33317 12.5871 4.07936 13.3333 4.99984 13.3333L14.9998 13.3333C15.9203 13.3333 16.6665 12.5871 16.6665 11.6667L16.6665 5C16.6665 4.07953 15.9203 3.33333 14.9998 3.33333L4.99984 3.33333C4.07936 3.33333 3.33317 4.07953 3.33317 5ZM1.6665 11.6667C1.6665 13.5076 3.15889 15 4.99984 15L14.9998 15C16.8408 15 18.3332 13.5076 18.3332 11.6667L18.3332 5C18.3332 3.15905 16.8408 1.66667 14.9998 1.66667L4.99984 1.66667C3.15889 1.66667 1.6665 3.15905 1.6665 5L1.6665 11.6667Z","fill","white"],["d","M5.83333 5C5.3731 5 5 5.3731 5 5.83333C5 6.29357 5.3731 6.66667 5.83333 6.66667H11.6667C12.1269 6.66667 12.5 6.29357 12.5 5.83333C12.5 5.3731 12.1269 5 11.6667 5H5.83333Z","fill","white"],["d","M5.83333 8.33333C5.3731 8.33333 5 8.70643 5 9.16667C5 9.6269 5.3731 10 5.83333 10H7.5C7.96024 10 8.33333 9.6269 8.33333 9.16667C8.33333 8.70643 7.96024 8.33333 7.5 8.33333H5.83333Z","fill","white"],["id","clip0_2260_32847"],["d","M7.50065 15H9.16732V16.6667H10.834V15H12.5007V16.6667H13.334C13.7942 16.6667 14.1673 17.0398 14.1673 17.5C14.1673 17.9602 13.7942 18.3333 13.334 18.3333H6.66732C6.20708 18.3333 5.83398 17.9602 5.83398 17.5C5.83398 17.0398 6.20708 16.6667 6.66732 16.6667H7.50065V15Z","fill","white"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.33268 5L3.33268 11.6667C3.33268 12.5871 4.07887 13.3333 4.99935 13.3333L14.9993 13.3333C15.9198 13.3333 16.666 12.5871 16.666 11.6667L16.666 5C16.666 4.07953 15.9198 3.33333 14.9993 3.33333L4.99935 3.33333C4.07887 3.33333 3.33268 4.07953 3.33268 5ZM1.66602 11.6667C1.66602 13.5076 3.1584 15 4.99935 15L14.9993 15C16.8403 15 18.3327 13.5076 18.3327 11.6667L18.3327 5C18.3327 3.15905 16.8403 1.66667 14.9993 1.66667L4.99935 1.66667C3.1584 1.66667 1.66602 3.15905 1.66602 5L1.66602 11.6667Z","fill","white"],["id","clip0_2305_6167"],["d","M7.50016 15H9.16683V16.6667H10.8335V15H12.5002V16.6667H13.3335C13.7937 16.6667 14.1668 17.0398 14.1668 17.5C14.1668 17.9602 13.7937 18.3333 13.3335 18.3333H6.66683C6.20659 18.3333 5.8335 17.9602 5.8335 17.5C5.8335 17.0398 6.20659 16.6667 6.66683 16.6667H7.50016V15Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.33317 5L3.33317 11.6667C3.33317 12.5871 4.07936 13.3333 4.99984 13.3333L14.9998 13.3333C15.9203 13.3333 16.6665 12.5871 16.6665 11.6667L16.6665 5C16.6665 4.07953 15.9203 3.33333 14.9998 3.33333L4.99984 3.33333C4.07936 3.33333 3.33317 4.07953 3.33317 5ZM1.6665 11.6667C1.6665 13.5076 3.15889 15 4.99984 15L14.9998 15C16.8408 15 18.3332 13.5076 18.3332 11.6667L18.3332 5C18.3332 3.15905 16.8408 1.66667 14.9998 1.66667L4.99984 1.66667C3.15889 1.66667 1.6665 3.15905 1.6665 5L1.6665 11.6667Z","fill","#FF7162"],["d","M5.83333 5C5.3731 5 5 5.3731 5 5.83333C5 6.29357 5.3731 6.66667 5.83333 6.66667H11.6667C12.1269 6.66667 12.5 6.29357 12.5 5.83333C12.5 5.3731 12.1269 5 11.6667 5H5.83333Z","fill","#FF7162"],["d","M5.83333 8.33333C5.3731 8.33333 5 8.70643 5 9.16667C5 9.6269 5.3731 10 5.83333 10H7.5C7.96024 10 8.33333 9.6269 8.33333 9.16667C8.33333 8.70643 7.96024 8.33333 7.5 8.33333H5.83333Z","fill","#FF7162"],["d","M4.69231 5.29805L6.9519 16.6605C7.26158 18.2178 9.31823 18.591 10.1553 17.2418L12.4275 13.5798C12.4611 13.5255 12.5143 13.4861 12.5761 13.4699L16.8289 12.3482C18.3433 11.9488 18.6107 9.91372 17.2509 9.13668L7.27695 3.4373C5.97394 2.69272 4.3996 3.82614 4.69231 5.29805Z","stroke","#E5E5E9","stroke-width","1.5","stroke-linecap","square"],["d","M4.69231 5.29805L6.9519 16.6605C7.26158 18.2178 9.31823 18.591 10.1553 17.2418L12.4275 13.5798C12.4611 13.5255 12.5143 13.4861 12.5761 13.4699L16.8289 12.3482C18.3433 11.9488 18.6107 9.91372 17.2509 9.13668L7.27695 3.4373C5.97394 2.69272 4.3996 3.82614 4.69231 5.29805Z","stroke","#FF7162","stroke-width","1.5","stroke-linecap","square"],["fill-rule","evenodd","clip-rule","evenodd","d","M13.8325 2.04946C17.7809 2.65969 20.8233 5.37592 21.8636 9.21997C22.1983 10.457 22.1983 12.6637 21.8636 13.9007C20.922 17.3797 18.4001 19.9016 14.921 20.8432C14.2284 21.0307 13.7495 21.0787 12.5807 21.0777C10.9937 21.0764 10.2354 20.9338 8.89576 20.3847L8.17885 20.0909L5.96793 20.6411C3.89884 21.156 3.73807 21.1807 3.46234 21.0259C2.91579 20.7191 2.9196 20.4879 3.50969 18.1292L4.05124 15.965L3.75679 15.2466C3.20719 13.9056 3.06459 13.1477 3.06328 11.5603C3.06231 10.3914 3.11031 9.9126 3.29775 9.21997C4.23324 5.76343 6.77214 3.21049 10.1836 2.29591C10.9867 2.08059 13.1072 1.93745 13.8325 2.04946ZM10.2766 4.07773C8.99188 4.49235 8.06085 5.06677 7.07399 6.05364C5.60817 7.51946 4.87896 9.14649 4.77653 11.1793C4.71394 12.4216 4.88419 13.4239 5.34355 14.5187C5.50236 14.8972 5.68807 15.3419 5.7561 15.5069C5.85962 15.7577 5.81488 16.0697 5.48277 17.4105C5.26419 18.2927 5.09471 19.0236 5.10603 19.035C5.11735 19.0463 5.8483 18.8768 6.73045 18.6582C8.0713 18.3261 8.38328 18.2814 8.63408 18.3849C8.7991 18.4529 9.24377 18.6386 9.62225 18.7974C10.7171 19.2568 11.7194 19.427 12.9617 19.3645C14.9945 19.262 16.6215 18.5328 18.0873 17.067C19.0668 16.0875 19.6379 15.1663 20.0725 13.8644C20.3166 13.1336 20.3512 12.8471 20.3512 11.5603C20.3512 10.2736 20.3166 9.98706 20.0725 9.25621C19.6379 7.95433 19.0668 7.0331 18.0873 6.05364C16.4266 4.39297 14.6419 3.68684 12.3085 3.76717C11.4187 3.79787 10.8968 3.87755 10.2766 4.07773Z","fill","#fff"]],template:function(t,r){t&1&&g(0,BQt,40,38,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,Kn,Zw,I_,pe],styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}*[_ngcontent-%COMP%]:not(svg *){height:unset;width:unset}.s-presence-avatar-initial[_ngcontent-%COMP%]{color:#fff!important}.pin2[_ngcontent-%COMP%]{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;width:2.25em!important;height:2.25em!important;background:linear-gradient(145deg,#6941ff,#ff5f7a,#ffa113)!important;border-radius:2em!important;overflow:hidden!important;margin-left:-.5em!important;transition:transform .2s ease}.pin2[_ngcontent-%COMP%]:not(.s-current-user){cursor:pointer!important}.pin2[_ngcontent-%COMP%]:hover{z-index:2!important;transform:scale(1.1)!important}.modal-author__image[_ngcontent-%COMP%]{width:2em!important;height:2em!important;background-size:cover!important;border-radius:50%!important;border:1px solid!important}.pins-wrap[_ngcontent-%COMP%]{position:relative!important;display:flex!important;width:max-content!important;justify-content:center!important;align-items:center!important;margin-left:.5em!important}button[_ngcontent-%COMP%]{background:#e6e8ec00!important;transition:.5s!important;font-style:normal!important;font-weight:600!important;font-size:14px!important;line-height:1em!important;outline:0!important;border:0!important;color:#fff!important}button[_ngcontent-%COMP%]:hover{background:#23262f!important;cursor:pointer!important}.action-menu[_ngcontent-%COMP%]{position:relative!important;display:flex!important;width:max-content!important;justify-content:center!important;gap:1em!important}.buttons-wrap[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:.25em!important}.primary[_ngcontent-%COMP%]{color:#fff!important;padding:.5em .75em!important;background:#625df580!important;border-radius:5.6em!important}.secondary[_ngcontent-%COMP%]:hover{background:#625df5!important;border:2px solid rgb(98,93,245)!important}.secondary[_ngcontent-%COMP%]:focus{background:#625df5!important;outline:0!important}.secondary[_ngcontent-%COMP%]:active{background:#3b3893!important}.secondary[_ngcontent-%COMP%]{padding:.5em .75em!important;border-radius:5.6em!important;border:2px solid #E6E8EC!important}.line-div[_ngcontent-%COMP%]{border-top:1px solid #e6e8ec!important;width:100%!important}.reply-div[_ngcontent-%COMP%], .single-comment-disable-div[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important}.value-div[_ngcontent-%COMP%]{gap:.25em!important}.modal-div[_ngcontent-%COMP%]{position:relative!important;display:flex!important;flex-direction:column!important;gap:1em!important;border-radius:.75em!important;background-color:#fff!important;box-sizing:border-box!important;width:max-content!important;text-align:left!important;font-size:14px!important;color:#141416!important}.modal-header[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important;gap:.75em!important}.modal-header__button[_ngcontent-%COMP%]{border:0!important;border-radius:50%!important;width:2em!important;height:2em!important;flex-shrink:0!important;display:flex!important;align-items:center!important;justify-content:center!important}.modal-messages[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:1em!important}.modal-author[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:.25em!important}.modal-author__image[_ngcontent-%COMP%]{width:2em!important;height:2em!important;background-color:#d3d3d3!important;background-size:cover!important;border-radius:50%!important}.modal-author__name[_ngcontent-%COMP%]{flex-grow:1!important;font-style:normal!important;font-weight:600!important;font-size:16px!important;line-height:1.5!important;color:#141416!important}.modal-author__last-message[_ngcontent-%COMP%]{font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:1.5!important;display:flex!important;align-items:center!important;text-align:right!important;color:#777e91!important}.modal-author__text[_ngcontent-%COMP%]{flex-grow:1!important;padding-left:2.6em!important}.action__button[_ngcontent-%COMP%]{border:0!important;border-radius:50%!important;width:2.4em!important;height:2.4em!important;flex-shrink:0!important;display:flex!important;align-items:center!important;justify-content:center!important}.action__button[_ngcontent-%COMP%]:disabled{cursor:not-allowed!important}.action__button[_ngcontent-%COMP%]:disabled svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#777e91!important}.actions-wrap[_ngcontent-%COMP%]{position:relative!important;height:2.4em!important;display:flex!important;flex-direction:line!important;align-items:center!important;justify-content:flex-start!important;gap:.25em!important}.input-text-wrap[_ngcontent-%COMP%]{width:max-content!important;height:100%!important;border-radius:.5em!important;background-color:#141416!important;border:0!important;box-sizing:border-box!important;position:relative!important;box-shadow:0 0 24px -2px #ffffff61;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((25rem + 0px) * var(--velt-base-rem-unit))!important}.input-text[_ngcontent-%COMP%]{font-style:normal!important;font-weight:400!important;font-size:14px!important;line-height:1.5em!important;padding:.25em!important;width:100%!important;height:100%!important;background-color:#fcfcfd!important;box-sizing:border-box!important;outline:0!important;overflow:hidden!important}.tooltip[_ngcontent-%COMP%]{position:relative!important;display:flex!important;flex-direction:column!important}.tooltip-link[_ngcontent-%COMP%]{font-style:normal!important;font-weight:400!important;font-size:12px!important;line-height:1.5em!important}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden!important;block-size:auto!important;width:max-content!important;top:135%!important;background-color:#000!important;color:#fff!important;text-align:left!important;padding:6px 12px!important;border-radius:6px!important;font-style:normal!important;font-weight:400!important;font-size:14px!important;line-height:2em!important;position:absolute!important;z-index:1!important;opacity:0!important;transition:opacity .5s!important}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible!important;opacity:1!important}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:" "!important;position:absolute!important;top:0!important;left:50%!important;width:12px!important;height:12px!important;background-color:#000!important;border-radius:4px!important;transform:translate(-50%,-41%) rotate(45deg)!important;transform-origin:center!important} snippyly-user-avatar.huddle-menu-panel-user-avatar{display:flex} snippyly-user-avatar.huddle-menu-panel-user-avatar .s-user-avatar-initial{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important} snippyly-user-avatar.huddle-menu-panel-user-avatar .s-user-avatar-image{border:1px solid black!important;border-radius:50%!important}'],changeDetection:0});let i=o;return i})();var B0e=(()=>{let o=class o{constructor(e,t){this.loggingService=e,this.dragDrop=t,this.currentX=0,this.currentY=0,this.destroy$=new tt,this.subscriptions=[],this.loggingService.log("%c[WB] Creating CLASS: DraggableOverlayDirective","color: blue;")}ngOnInit(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnInit","color: green;"),this.setupDraggableOverlay()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnInit: ",e)}}setupDraggableOverlay(){try{if(this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: setupDraggableOverlay","color: green;"),this.connectedOverlay&&this.connectedOverlay.overlayRef){let e=this.connectedOverlay.overlayRef.overlayElement;this.dragRef=this.dragDrop.createDrag(e),this.subscriptions.push(this.dragRef.moved.pipe(mo(this.destroy$)).subscribe(t=>{let r=this.connectedOverlay?.overlayRef.getConfig().positionStrategy;this.updatePosition(r,t.distance.x,t.distance.y)},t=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.moved subscription: ",t)})),this.dragRef.ended.pipe(mo(this.destroy$)).subscribe(t=>{this.currentX+=t.distance.x,this.currentY+=t.distance.y},t=>{this.loggingService.catch("Error in DraggableOverlayDirective dragRef.ended subscription: ",t)})}}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective setupDraggableOverlay: ",e)}}updatePosition(e,t,r){try{if(e){let a=this.currentX+t,s=this.currentY+r;e.withDefaultOffsetX(a).withDefaultOffsetY(s),this.connectedOverlay?.overlayRef?.updatePosition()}}catch{}}cleanupDraggableOverlay(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: cleanupDraggableOverlay","color: green;"),this.dragRef&&this.dragRef.dispose()}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective cleanupDraggableOverlay: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling DraggableOverlayDirective FUNCTION: ngOnDestroy","color: green;"),this.cleanupDraggableOverlay(),this.destroy$.next(),this.destroy$.complete(),this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in DraggableOverlayDirective ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(r5))},o.\u0275dir=$t({type:o,selectors:[["","veltDraggableOverlay",""]],inputs:{connectedOverlay:[0,"veltDraggableOverlay","connectedOverlay"]},standalone:!1});let i=o;return i})();var jQt=()=>["snippyly-overlay-panel","snippyly-huddle-menu-panel-overlay-panel","velt-overlay-panel"],$Qt=()=>["snippyly-overlay-panel","snippyly-huddle-banner-panel","velt-overlay-panel"];function HQt(i,o){if(i&1){let n=Y();_(0,"div",20),G("click",function(){N(n);let t=l(2);return F(t.onHuddleToolClick("audio"))}),_(1,"slot",21),G("slotchange",function(){N(n);let t=l(2);return F(t.onButtonSlotChange())}),_(2,"div",22),le(),_(3,"svg",23),w(4,"path",24),b()()()()}}function zQt(i,o){if(i&1){let n=Y();_(0,"div",20),G("click",function(){N(n);let t=l(2);return F(t.onHuddleToolClick("video"))}),_(1,"slot",21),G("slotchange",function(){N(n);let t=l(2);return F(t.onButtonSlotChange())}),_(2,"div",22),le(),_(3,"svg",25),w(4,"path",26)(5,"path",27),b()()()()}}function GQt(i,o){if(i&1){let n=Y();_(0,"div",20),G("click",function(){N(n);let t=l(3);return F(t.onHuddleToolClick("presentation"))}),_(1,"slot",21),G("slotchange",function(){N(n);let t=l(3);return F(t.onButtonSlotChange())}),_(2,"div",22),le(),_(3,"svg",23),w(4,"path",28),b()()()()}}function WQt(i,o){i&1&&g(0,GQt,5,0,"div",7),i&2&&d("ngSwitchCase","presentation")}function qQt(i,o){if(i&1){let n=Y();_(0,"div",29,4)(2,"slot",21),G("slotchange",function(){N(n);let t=l(2);return F(t.onButtonSlotChange())}),_(3,"div",30),le(),_(4,"svg",31),w(5,"path",24),b(),_(6,"svg",32),w(7,"path",33),b()()()()}if(i&2){let n=de(1);l();let e=de(8);d("matMenuTriggerFor",e),m(3),ge("active",n==null?null:n.menuOpen)}}function YQt(i,o){if(i&1){let n=Y();_(0,"div",11),G("click",function(){N(n);let t=l(2);return F(t.onHuddleToolClick("presentation"))}),le(),_(1,"svg",12),w(2,"path",34),b(),ut(),_(3,"span"),te(4),P(5,"translate"),b()()}if(i&2){let n=l().ngIf;d("disabled",n.disabled),m(4),Ge(M(5,2,"Screen Huddle"))}}function KQt(i,o){if(i&1){let n=Y();_(0,"snippyly-huddle-menu-panel",36),G("toggleAudio",function(){N(n);let t=l(3);return F(t.toggleAudio())})("toggleVideo",function(){N(n);let t=l(3);return F(t.toggleVideo())})("toggleScreenSharing",function(){N(n);let t=l(3);return F(t.toggleScreenSharing())})("leave",function(){N(n);let t=l(3);return F(t.dropCall())}),b()}if(i&2){let n=l(2).ngIf,e=de(24);d("veltDraggableOverlay",e)("attendees",n.huddleAttendees)("user",n.user)("audioState",n.localStreamState==null?null:n.localStreamState.audioState)("videoState",n.localStreamState==null?null:n.localStreamState.videoState)("screenSharingState",n.localStreamState==null?null:n.localStreamState.screenSharingState)}}function ZQt(i,o){if(i&1&&g(0,KQt,1,6,"snippyly-huddle-menu-panel",35),i&2){let n=l().ngIf;d("ngIf",n.meetingJoined)}}function XQt(i,o){if(i&1){let n=Y();_(0,"div",38)(1,"div")(2,"div"),le(),_(3,"svg",39),w(4,"path",40),b()(),ut(),_(5,"div")(6,"h3",41),te(7),P(8,"translate"),P(9,"translate"),P(10,"translate"),b(),_(11,"p",42),te(12),P(13,"translate"),b(),_(14,"div",43)(15,"button",44),G("click",function(){N(n);let t=l(3);return F(t.onJoinButtonClick())}),te(16,"Join"),b(),_(17,"button",45),G("click",function(){N(n);let t=l(3);return F(t.removeBanner())}),te(18,"Cancel"),b()()(),_(19,"div"),le(),_(20,"svg",46),G("click",function(){N(n);let t=l(3);return F(t.removeBanner())}),w(21,"path",47),b()()()()}if(i&2){let n=l(2).ngIf;m(7),vr("",(n.huddleAttendees==null?null:n.huddleAttendees.length)===1?M(8,3,"1 person is"):(n.huddleAttendees==null?null:n.huddleAttendees.length)+" "+M(9,5,"people are")," ",M(10,7,"on a call now"),""),m(5),Ge(M(13,9,"You can join the call"))}}function QQt(i,o){if(i&1&&g(0,XQt,22,11,"div",37),i&2){let n=l().ngIf;d("ngIf",n.isFirstComponent&&!n.meetingJoined&&!n.bannerRemoved&&(n.huddleAttendees==null?null:n.huddleAttendees.length))}}function JQt(i,o){if(i&1){let n=Y();f(0),_(1,"div",6,0),g(3,HQt,5,0,"div",7)(4,zQt,6,0,"div",7)(5,WQt,1,1,"ng-template",8)(6,qQt,8,3,"div",9),b(),_(7,"mat-menu",10,1)(9,"div",11),G("click",function(){N(n);let t=l();return F(t.onHuddleToolClick("audio"))}),le(),_(10,"svg",12),w(11,"path",13),b(),ut(),_(12,"span"),te(13),P(14,"translate"),b()(),_(15,"div",11),G("click",function(){N(n);let t=l();return F(t.onHuddleToolClick("video"))}),le(),_(16,"svg",12),w(17,"path",14)(18,"path",15),b(),ut(),_(19,"span"),te(20),P(21,"translate"),b()(),g(22,YQt,6,4,"div",16),b(),g(23,ZQt,1,1,"ng-template",17,2,Te),w(25,"div",18,3),g(27,QQt,1,1,"ng-template",19,2,Te),v()}if(i&2){let n=o.ngIf,e=de(2),t=de(26),r=l();m(),d("ngSwitch",n.type),m(2),d("ngSwitchCase","audio"),m(),d("ngSwitchCase","video"),m(),d("ngIf",n.screenSharingSupported),m(),d("ngSwitchCase","all"),m(3),d("disabled",n.disabled),m(4),Ge(M(14,21,"Audio Huddle")),m(2),d("disabled",n.disabled),m(5),Ge(M(21,23,"Video Huddle")),m(2),d("ngIf",n.screenSharingSupported),m(),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",n.meetingJoined&&n.joinedHuddleToolComponentId===r.veltId)("cdkConnectedOverlayPanelClass",gt(25,jQt))("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayPositions",n.positions)("cdkConnectedOverlayDisableClose",!0),m(4),d("cdkConnectedOverlayOrigin",t)("cdkConnectedOverlayOpen",n.isFirstComponent&&!n.meetingJoined&&!n.bannerRemoved&&!!(n.huddleAttendees!=null&&n.huddleAttendees.length))("cdkConnectedOverlayPanelClass",gt(26,$Qt))("cdkConnectedOverlayPositions",n.positions)}}var Kz=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p){super(p,c),this.analyticsService=e,this.authService=t,this.huddleService=r,this.iamService=a,this.loggingService=s,this.themeService=c,this.elementRef=p,this.type="audio",this.remoteStreams=[],this.huddleStarted=!1,this.initialHuddleType="audio",this.customButtonAdded=!1,this.subscriptions=[],this.veltId=En(),this.veltElement=!0,this.componentConfigSignal=De({type:this.type,screenSharingSupported:!!navigator?.mediaDevices?.getDisplayMedia,disabled:!1,meetingJoined:!1,joinedHuddleToolComponentId:null,positions:j.OVERLAY_POSITIONS.map(u=>new Ii({originX:u.originX,originY:u.originY},{overlayX:u.overlayX,overlayY:u.overlayY})),user:null,localStreamState:{},huddleAttendees:[],isFirstComponent:!1,bannerRemoved:!1}),this.subscriptions.push(this.authService.getUser$().pipe(Le(u=>!!u)).subscribe(u=>{u&&(this.componentConfigSignal.update(C=>T(I({},C),{user:u})),this.checkToAutoJoinHuddle())},u=>{this.loggingService.catch("Error in getUser: ",u)})),this.subscriptions.push(this.huddleService.getRemoteStream().subscribe(u=>{try{u||(this.remoteStreams=[])}catch(C){this.loggingService.catch("Error in HuddleToolComponent getRemoteStream:",C)}},u=>{this.loggingService.catch("Error in getRemoteStream: ",u)})),this.subscriptions.push(this.huddleService.getLocalStreamState().subscribe(u=>{this.componentConfigSignal.update(C=>T(I({},C),{localStreamState:u}))},u=>{this.loggingService.catch("Error in getLocalStreamState: ",u)})),this.subscriptions.push(this.huddleService.getHuddleToolComponentId().subscribe(u=>{this.componentConfigSignal.update(C=>T(I({},C),{joinedHuddleToolComponentId:u}))},u=>{this.loggingService.catch("Error in getHuddleToolComponentId: ",u)})),this.subscriptions.push(this.iamService.getFeaturesAccessLevel$().subscribe(u=>{this.componentConfigSignal.update(C=>T(I({},C),{disabled:!!u?.all?.disabled}))})),this.getHuddleAttendees()}ngOnInit(){}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in HuddleToolComponent ngOnChanges: ",t)}}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_HUDDLE_TOOL),t=document.querySelector(j.TAGS.VELT_HUDDLE_TOOL);t||e?t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>T(I({},r),{isFirstComponent:!0})),this.checkToAutoJoinHuddle()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(r=>T(I({},r),{isFirstComponent:!0})),this.checkToAutoJoinHuddle()):(document.querySelector(j.TAGS.SNIPPYLY_PLUGIN)||document.querySelector(j.TAGS.SUPERFLOW_TOOLBAR))&&(this.componentConfigSignal.update(r=>T(I({},r),{isFirstComponent:!0})),this.checkToAutoJoinHuddle())}catch(e){this.loggingService.catch("Error in HuddleToolComponent AfterViewInit: ",e)}}onButtonSlotChange(){this.customButtonAdded=!0}checkToAutoJoinHuddle(){try{if(this.componentConfigSignal().user&&this.componentConfigSignal().isFirstComponent){let e=sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_HUDDLE_DATA);if(e&&!this.huddleStarted){let t=JSON.parse(e).type;this.joinHuddle(t)}}}catch(e){this.loggingService.catch("Error in checkToAutoJoinHuddle: ",e)}}getHuddleAttendees(){this.subscriptions.push(this.huddleService.getHuddleAttendees$().subscribe(e=>{try{e?(this.componentConfigSignal.update(t=>T(I({},t),{huddleAttendees:e.slice()})),this.huddleStarted=!!e?.length,(this.componentConfigSignal().meetingJoined||!this.componentConfigSignal().huddleAttendees?.length)&&this.componentConfigSignal.update(t=>T(I({},t),{bannerRemoved:!1})),this.componentConfigSignal.update(t=>T(I({},t),{meetingJoined:!!e.find(r=>r?.userSnippylyId===this.componentConfigSignal().user?.userSnippylyId)})),this.componentConfigSignal().huddleAttendees?.length&&(this.initialHuddleType=this.componentConfigSignal().huddleAttendees[0].initialHuddleType)):(this.huddleStarted=!1,this.componentConfigSignal.update(t=>T(I({},t),{meetingJoined:!1})),this.componentConfigSignal.update(t=>T(I({},t),{bannerRemoved:!1})),this.componentConfigSignal.update(t=>T(I({},t),{huddleAttendees:[]})),this.initialHuddleType="audio")}catch(t){this.loggingService.catch("Error in HuddleToolComponent getHuddleAttendees:",t)}}))}onHuddleToolClick(e){try{if(this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_TOOL_CLICKED,{huddleType:e,toolType:this.customButtonAdded?`custom - ${this.componentConfigSignal().type}`:`default - ${this.componentConfigSignal().type}`}),this.componentConfigSignal().disabled){this.loggingService.catch("Huddle feature is disabled.");return}this.joinHuddle(e)}catch(t){this.loggingService.catch("Error in HuddleToolComponent onHuddleToolClick:",t)}}onJoinButtonClick(){try{this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_JOIN_BUTTON_CLICKED,{huddleType:this.initialHuddleType,huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(e=>e?.userId)}),this.joinHuddle(void 0)}catch(e){this.loggingService.catch("Error in HuddleToolComponent onJoinButtonClick:",e)}}joinHuddle(e){return Q(this,null,function*(){try{e?this.huddleStarted||(this.initialHuddleType=e||"audio"):e=this.initialHuddleType||"audio";let t=this.huddleService.getHuddleSessionData();if(this.componentConfigSignal().meetingJoined&&(yield this.dropCall(),yield Ad(1e3)),!this.componentConfigSignal().meetingJoined)if(this.componentConfigSignal().user&&!this.componentConfigSignal().meetingJoined){this.huddleService.setHuddleToolComponentId(this.veltId);let r=j.HUDDLE_TYPE_CONFIGS[e],a=JSON.parse(JSON.stringify(r));r&&(a.audio=t?!!t.audio:r.audio,a.video=t?!!t.video:r.video,a.presentation=t?!!t.presentation:r.presentation,yield this.huddleService.setLocalStream(I({},a)),(t?t?.presentation:r.presentation)&&!this.huddleStarted?yield this.huddleService.setScreenSharingStream():a.presentation=!1,this.huddleService.updateHuddleSessionData("","",I({type:e},a)),this.componentConfigSignal.update(s=>T(I({},s),{meetingJoined:!0})),this.huddleService.joinHuddle(this.initialHuddleType),this.componentConfigSignal().huddleAttendees?.length?(this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_JOINED,{huddleType:this.initialHuddleType,totalUsers:this.huddleService.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.huddleService.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(s=>s?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(s=>s?.userId)}),this.huddleService.updateNotificationsDatabase({actionType:LP.JOINED})):(this.huddleService.clearHuddleInvitees(),this.analyticsService.trackEvent(Z.Events.Huddle.HUDDLE_CREATED,{huddleType:this.initialHuddleType,totalUsers:this.huddleService.getHuddleAttendees()?.length||0,totalUserHuddleDuration:this.huddleService.getTotalUserHuddleDuration(),huddleSnippylyUserIds:this.huddleService.getHuddleAttendees()?.map(s=>s?.userSnippylyId),huddleClientUserIds:this.huddleService.getHuddleAttendees()?.map(s=>s?.userId)}),this.huddleService.updateNotificationsDatabase({actionType:LP.CREATED})))}else this.componentConfigSignal().user||this.loggingService.catch("Velt sdk not authenticated.")}catch(t){this.loggingService.catch("Error in HuddleToolComponent joinHuddle:",t)}})}toggleAudio(){try{this.huddleService.updateHuddleSessionData("audio",!this.componentConfigSignal().localStreamState?.audioState),this.huddleService.toggleLocalStreamAudio()}catch(e){this.loggingService.catch("Error in HuddleToolComponent toggleAudio:",e)}}toggleVideo(){try{this.huddleService.updateHuddleSessionData("video",!this.componentConfigSignal().localStreamState?.videoState),this.huddleService.toggleLocalStreamVideo()}catch(e){this.loggingService.catch("Error in HuddleToolComponent toggleVideo:",e)}}toggleScreenSharing(){return Q(this,null,function*(){try{this.huddleService.updateHuddleSessionData("presentation",!this.componentConfigSignal().localStreamState?.screenSharingState),yield this.huddleService.toggleLocalScreenSharing()}catch(e){this.loggingService.catch("Error in HuddleToolComponent toggleScreenSharing:",e)}})}dropCall(){return Q(this,null,function*(){try{this.componentConfigSignal.update(e=>T(I({},e),{huddleAttendees:[]})),yield this.huddleService.dropCall(),yield this.huddleService.removeLocalStream(),yield this.huddleService.removeAttendee()}catch(e){this.loggingService.catch("Error in HuddleToolComponent dropCall:",e)}})}copyUrl(){Os(window.location.href)}removeBanner(){try{this.componentConfigSignal.update(e=>T(I({},e),{bannerRemoved:!0}))}catch(e){this.loggingService.catch("Error in HuddleToolComponent removeBanner:",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{super.ngOnDestroy(),this.unsubscribe()}catch(e){this.loggingService.catch("Error in HuddleToolComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in HuddleToolComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(fr),h(fn),h(y),h(qe),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-huddle-tool"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{type:"type"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["allMenu","matMenu"],["overlay","cdkConnectedOverlay"],["huddleBannerTrigger","cdkOverlayOrigin"],["allMenuTrigger","matMenuTrigger"],[4,"ngIf"],["part","container","cdkOverlayOrigin","",1,"huddle-tool-container",3,"ngSwitch"],[3,"click",4,"ngSwitchCase"],[3,"ngIf"],[3,"matMenuTriggerFor",4,"ngSwitchCase"],[1,"velt-menu","huddle-all-menu-panel"],["mat-menu-item","",3,"click","disabled"],["width","25","height","24","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M5.5 14.625C5.5 14.1609 5.68437 13.7158 6.01256 13.3876C6.34075 13.0594 6.78587 12.875 7.25 12.875H8.125C8.58913 12.875 9.03425 13.0594 9.36244 13.3876C9.69063 13.7158 9.875 14.1609 9.875 14.625V17.25C9.875 17.7141 9.69063 18.1592 9.36244 18.4874C9.03425 18.8156 8.58913 19 8.125 19H7.25C6.78587 19 6.34075 18.8156 6.01256 18.4874C5.68437 18.1592 5.5 17.7141 5.5 17.25V14.625ZM5.5 14.625V12C5.5 10.1435 6.2375 8.36301 7.55025 7.05025C8.86301 5.7375 10.6435 5 12.5 5C14.3565 5 16.137 5.7375 17.4497 7.05025C18.7625 8.36301 19.5 10.1435 19.5 12V14.625M19.5 14.625C19.5 14.1609 19.3156 13.7158 18.9874 13.3876C18.6592 13.0594 18.2141 12.875 17.75 12.875H16.875C16.4109 12.875 15.9658 13.0594 15.6376 13.3876C15.3094 13.7158 15.125 14.1609 15.125 14.625V17.25C15.125 17.7141 15.3094 18.1592 15.6376 18.4874C15.9658 18.8156 16.4109 19 16.875 19H17.75C18.2141 19 18.6592 18.8156 18.9874 18.4874C19.3156 18.1592 19.5 17.7141 19.5 17.25V14.625Z","stroke","#8F95B2","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M15.1667 10.2228L19.2138 8.19966C19.3493 8.13195 19.4998 8.09999 19.6511 8.10681C19.8024 8.11362 19.9495 8.15899 20.0783 8.23859C20.2072 8.3182 20.3135 8.42941 20.3873 8.56167C20.4611 8.69394 20.4999 8.84286 20.5 8.99432V15.0068C20.4999 15.1582 20.4611 15.3072 20.3873 15.4394C20.3135 15.5717 20.2072 15.6829 20.0783 15.7625C19.9495 15.8421 19.8024 15.8875 19.6511 15.8943C19.4998 15.9011 19.3493 15.8691 19.2138 15.8014L15.1667 13.7783V10.2228Z","stroke","#8F95B2","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M4.5 8.44445C4.5 7.97295 4.6873 7.52077 5.0207 7.18737C5.3541 6.85397 5.80628 6.66667 6.27778 6.66667H13.3889C13.8604 6.66667 14.3126 6.85397 14.646 7.18737C14.9794 7.52077 15.1667 7.97295 15.1667 8.44445V15.5556C15.1667 16.0271 14.9794 16.4792 14.646 16.8126C14.3126 17.146 13.8604 17.3333 13.3889 17.3333H6.27778C5.80628 17.3333 5.3541 17.146 5.0207 16.8126C4.6873 16.4792 4.5 16.0271 4.5 15.5556V8.44445Z","stroke","#8F95B2","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["mat-menu-item","",3,"disabled","click",4,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayDisableClose"],["cdkOverlayOrigin",""],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayPositions"],[3,"click"],["name","button",3,"slotchange"],["part","button-container",1,"action-btn"],["part","button-icon","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M5.5 14.625C5.5 14.1609 5.68437 13.7158 6.01256 13.3876C6.34075 13.0594 6.78587 12.875 7.25 12.875H8.125C8.58913 12.875 9.03425 13.0594 9.36244 13.3876C9.69063 13.7158 9.875 14.1609 9.875 14.625V17.25C9.875 17.7141 9.69063 18.1592 9.36244 18.4874C9.03425 18.8156 8.58913 19 8.125 19H7.25C6.78587 19 6.34075 18.8156 6.01256 18.4874C5.68437 18.1592 5.5 17.7141 5.5 17.25V14.625ZM5.5 14.625V12C5.5 10.1435 6.2375 8.36301 7.55025 7.05025C8.86301 5.7375 10.6435 5 12.5 5C14.3565 5 16.137 5.7375 17.4497 7.05025C18.7625 8.36301 19.5 10.1435 19.5 12V14.625M19.5 14.625C19.5 14.1609 19.3156 13.7158 18.9874 13.3876C18.6592 13.0594 18.2141 12.875 17.75 12.875H16.875C16.4109 12.875 15.9658 13.0594 15.6376 13.3876C15.3094 13.7158 15.125 14.1609 15.125 14.625V17.25C15.125 17.7141 15.3094 18.1592 15.6376 18.4874C15.9658 18.8156 16.4109 19 16.875 19H17.75C18.2141 19 18.6592 18.8156 18.9874 18.4874C19.3156 18.1592 19.5 17.7141 19.5 17.25V14.625Z","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["part","button-icon","width","25","height","24","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M15.1667 10.2228L19.2138 8.19966C19.3493 8.13195 19.4998 8.09999 19.6511 8.10681C19.8024 8.11362 19.9495 8.15899 20.0783 8.23859C20.2072 8.3182 20.3135 8.42941 20.3873 8.56167C20.4611 8.69394 20.4999 8.84286 20.5 8.99432V15.0068C20.4999 15.1582 20.4611 15.3072 20.3873 15.4394C20.3135 15.5717 20.2072 15.6829 20.0783 15.7625C19.9495 15.8421 19.8024 15.8875 19.6511 15.8943C19.4998 15.9011 19.3493 15.8691 19.2138 15.8014L15.1667 13.7783V10.2228Z","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M4.5 8.44445C4.5 7.97295 4.6873 7.52077 5.0207 7.18737C5.3541 6.85397 5.80628 6.66667 6.27778 6.66667H13.3889C13.8604 6.66667 14.3126 6.85397 14.646 7.18737C14.9794 7.52077 15.1667 7.97295 15.1667 8.44445V15.5556C15.1667 16.0271 14.9794 16.4792 14.646 16.8126C14.3126 17.146 13.8604 17.3333 13.3889 17.3333H6.27778C5.80628 17.3333 5.3541 17.146 5.0207 16.8126C4.6873 16.4792 4.5 16.0271 4.5 15.5556V8.44445Z","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],["d","M19 12V14.1667C19 14.3582 18.9239 14.5419 18.7885 14.6773C18.653 14.8128 18.4693 14.8889 18.2778 14.8889H6.72222C6.53068 14.8889 6.34698 14.8128 6.21153 14.6773C6.07609 14.5419 6 14.3582 6 14.1667V6.94444C6 6.75289 6.07609 6.56919 6.21153 6.43375C6.34698 6.2983 6.53068 6.22221 6.72222 6.22221H13.2222M8.88889 17.7778H16.1111M10.3333 14.8889V17.7778M14.6667 14.8889V17.7778M16.1111 6.22221H19M19 6.22221V9.1111M19 6.22221L15.3889 9.83333","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],[3,"matMenuTriggerFor"],["part","button-container",1,"action-btn","action-dropdown"],["part","button-icon","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon","action-dropdown-icon"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",1,"toolbar-icon-dropdown-arrow"],["fill-rule","evenodd","clip-rule","evenodd","d","M12.2071 5.79289C11.8166 5.40237 11.1834 5.40237 10.7929 5.79289L8 8.58579L5.20711 5.79289C4.81658 5.40237 4.18342 5.40237 3.79289 5.79289C3.40237 6.18342 3.40237 6.81658 3.79289 7.20711L7.29289 10.7071C7.68342 11.0976 8.31658 11.0976 8.70711 10.7071L12.2071 7.20711C12.5976 6.81658 12.5976 6.18342 12.2071 5.79289Z","fill","currentColor"],["d","M19 12V14.1667C19 14.3582 18.9239 14.5419 18.7885 14.6773C18.653 14.8128 18.4693 14.8889 18.2778 14.8889H6.72222C6.53068 14.8889 6.34698 14.8128 6.21153 14.6773C6.07609 14.5419 6 14.3582 6 14.1667V6.94444C6 6.75289 6.07609 6.56919 6.21153 6.43375C6.34698 6.2983 6.53068 6.22221 6.72222 6.22221H13.2222M8.88889 17.7778H16.1111M10.3333 14.8889V17.7778M14.6667 14.8889V17.7778M16.1111 6.22221H19M19 6.22221V9.1111M19 6.22221L15.3889 9.83333","stroke","#8F95B2","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"],[3,"veltDraggableOverlay","attendees","user","audioState","videoState","screenSharingState","toggleAudio","toggleVideo","toggleScreenSharing","leave",4,"ngIf"],[3,"toggleAudio","toggleVideo","toggleScreenSharing","leave","veltDraggableOverlay","attendees","user","audioState","videoState","screenSharingState"],["class","huddle-banner",4,"ngIf"],[1,"huddle-banner"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 17C11.45 17 11 16.55 11 16V12C11 11.45 11.45 11 12 11C12.55 11 13 11.45 13 12V16C13 16.55 12.55 17 12 17ZM13 9H11V7H13V9Z","fill","#625DF5"],[1,"title"],[1,"subtitle"],[1,"action-btn-container"],[1,"join-btn",3,"click"],[1,"cancel-btn",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"close-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z","fill","#777E91"]],template:function(t,r){t&1&&g(0,JQt,29,27,"ng-container",5),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Gi,to,on,en,Al,el,Vp,L0e,B0e,pe],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}*{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;text-align:left!important;line-height:1.5!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*:empty{display:revert!important}.huddle-tool-container{width:max-content}.icon-btn{border:1px solid #2d2d2d;border-radius:100%;width:40px!important;height:40px!important;display:flex;align-items:center;justify-content:center;color:#2d2d2d!important;fill:#2d2d2d!important;cursor:pointer}.icon-btn:hover{background:#fff5}.icon-btn.background-red{background:red!important;border-color:red!important;color:#fff!important;fill:#fff!important}.icon-btn.background-royalblue{background:#4169e1!important;border-color:#4169e1!important}.icon-btn:before{content:""}.drop-call-btn{transform:rotate(135deg)!important}.action-btn{display:inline-flex;justify-content:center;align-items:center;padding:6px!important;border-radius:var(--legacy-velt-tool-border-radius);border:var(--legacy-velt-tool-border);background-color:var(--legacy-velt-tool-bg-color);color:var(--legacy-velt-tool-icon-color);cursor:pointer}.action-btn .action-btn-label{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:4px!important;font-weight:700!important;color:currentColor!important}.action-btn .action-btn-icon{width:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));color:currentColor}.action-btn .toolbar-icon-dropdown-arrow{width:16px;height:16px;color:currentColor}.action-btn:focus{border-radius:var(--legacy-velt-tool-focus-border-radius);border:var(--legacy-velt-tool-focus-border);background-color:var(--legacy-velt-tool-focus-bg-color);color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:focus .action-btn-icon{width:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:focus .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:hover{border-radius:var(--legacy-velt-tool-hover-border-radius);border:var(--legacy-velt-tool-hover-border);background-color:var(--legacy-velt-tool-hover-bg-color);color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:hover .action-btn-icon{width:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:hover .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:active,.action-btn.active{border-radius:var(--legacy-velt-tool-active-border-radius);border:var(--legacy-velt-tool-active-border);background-color:var(--legacy-velt-tool-active-bg-color);color:var(--legacy-velt-tool-active-icon-color)}.action-btn:active .action-btn-icon,.action-btn.active .action-btn-icon{width:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:active .toolbar-icon-dropdown-arrow,.action-btn.active .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-active-icon-color)}
514
514
  `],encapsulation:3,changeDetection:0});let i=o;return i})();function eJt(i,o){if(i&1&&(_(0,"span",11),te(1),P(2,"translate"),b()),i&2){let n=l(2).ngIf;m(),Ce(" ",n.user!=null&&n.user.name?n.user==null||n.user.name==null?null:n.user.name.charAt(0):M(2,1,n.user==null||n.user.email==null?null:n.user.email.charAt(0)),"")}}function tJt(i,o){if(i&1){let n=Y();_(0,"img",12),G("error",function(){N(n);let t=l(3);return F(t.onImageLoadError())}),b()}if(i&2){let n=l(2).ngIf;d("src",n.user==null?null:n.user.photoUrl,un)}}function nJt(i,o){if(i&1&&(_(0,"span"),te(1),P(2,"translate"),b()),i&2){let n=l(2).ngIf;m(),Ge(n.isRemoteStream?n.user==null||n.user.name==null?null:n.user.name.split(" ")[0]:M(2,1,"You"))}}function iJt(i,o){i&1&&(le(),_(0,"svg",15),w(1,"path",16),b())}function oJt(i,o){i&1&&(le(),_(0,"svg",17),w(1,"path",18)(2,"path",19),b())}function rJt(i,o){if(i&1&&(f(0),g(1,iJt,2,0,"svg",13)(2,oJt,3,0,"svg",14),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.audioState),m(),d("ngIf",!n.audioState)}}function aJt(i,o){i&1&&(le(),_(0,"svg",15),w(1,"path",16),b())}function sJt(i,o){i&1&&(le(),_(0,"svg",17),w(1,"path",18)(2,"path",19),b())}function lJt(i,o){i&1&&(le(),_(0,"svg",23),w(1,"path",24),b())}function cJt(i,o){i&1&&(le(),_(0,"svg",17)(1,"g"),w(2,"path",25)(3,"path",19),b()())}function dJt(i,o){if(i&1){let n=Y();_(0,"div",20),G("click",function(t){return N(n),F(t.stopPropagation())}),_(1,"div",21),G("click",function(){N(n);let t=l(3);return F(t.onToggleAudioClick())}),g(2,aJt,2,0,"svg",13)(3,sJt,3,0,"svg",14),b(),_(4,"div",21),G("click",function(){N(n);let t=l(3);return F(t.onToggleVideoClick())}),g(5,lJt,2,0,"svg",22)(6,cJt,4,0,"svg",14),b()()}if(i&2){let n=l(2).ngIf;m(2),d("ngIf",n.audioState),m(),d("ngIf",!n.audioState),m(2),d("ngIf",n.videoState),m(),d("ngIf",!n.videoState)}}function mJt(i,o){if(i&1){let n=Y();_(0,"div",20),G("click",function(t){return N(n),F(t.stopPropagation())}),_(1,"div",21),G("click",function(){N(n);let t=l(3);return F(t.onToggleHuddleOnCursor())}),le(),_(2,"svg",17),w(3,"path",26),b()()()}}function pJt(i,o){if(i&1){let n=Y();_(0,"div",3),G("click",function(){N(n);let t=l(2);return F(t.toggleSelection())}),_(1,"div",4),w(2,"video",5),_(3,"div",6)(4,"span",7),P(5,"translate"),g(6,eJt,3,3,"span",8)(7,tJt,1,1,"ng-template",null,0,Te),b()(),_(9,"div",9),g(10,nJt,3,3,"span",1)(11,rJt,3,2,"ng-container",1),b()(),g(12,dJt,7,4,"div",10)(13,mJt,4,0,"div",10),b()}if(i&2){let n=de(8),e=l().ngIf,t=l();ge("local-stream",!e.isRemoteStream)("video-off",!e.videoState)("speaking",e.audioState)("selected",t.selected),m(2),ge("flip",!e.isRemoteStream),d("srcObject",e.isRemoteStream?e.remoteVideoStream:e.stream)("muted",e.isRemoteStream?null:"muted")("volume",e.isRemoteStream?1:0),m(2),it("color",(e.user==null?null:e.user.color)+" !important")("background-color",(e.user==null?null:e.user.color)+" !important"),d("title",M(5,24,(e.user==null?null:e.user.name)||(e.user==null?null:e.user.email))),m(2),d("ngIf",e.showInitials)("ngIfElse",n),m(4),d("ngIf",e.user==null?null:e.user.name),m(),d("ngIf",e.isRemoteStream),m(),d("ngIf",!e.isRemoteStream),m(),d("ngIf",e.isRemoteStream)}}function gJt(i,o){if(i&1&&(f(0),g(1,pJt,14,26,"div",2),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.isRemoteStream?n.remoteVideoStream:n.stream)}}var V0e=(()=>{let o=class o{get remoteStream(){return this._remoteStream}set remoteStream(e){this._remoteStream=e}constructor(e){this.loggingService=e,this.toggleAudio=new Pe,this.toggleVideo=new Pe,this.toggleHuddleOnCursor=new Pe,this.veltElement=!0,this.componentConfigSignal=De({isRemoteStream:this.isRemoteStream,remoteVideoStream:this.remoteVideoStream,stream:this.stream,videoState:this.videoState,audioState:this.audioState,user:this.user,selected:this.selected,showInitials:!1})}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling VideoHuddleUserComponent FUNCTION: ngOnChanges","color: green;"),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in VideoHuddleUserComponent ngOnChanges: ",t)}}onToggleAudioClick(){this.toggleAudio.emit()}onToggleVideoClick(){this.toggleVideo.emit()}toggleSelection(){this.componentConfigSignal.update(e=>(e.selected=!e.selected,e))}onImageLoadError(){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showInitials:!0}),e))}catch(e){this.loggingService.catch("Error in VideoHuddleUserComponent onImageLoadError: ",e)}}onToggleHuddleOnCursor(){this.loggingService.log("%c[WB] Calling FUNCTION: onToggleHuddleOnCursor","color: green;");try{this.toggleHuddleOnCursor.emit()}catch(e){this.loggingService.catch("Error in VideoHuddleUserComponent onToggleHuddleOnCursor: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-video-huddle-user"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{stream:"stream",selected:"selected",isRemoteStream:"isRemoteStream",user:"user",audioState:"audioState",videoState:"videoState",remoteStream:"remoteStream",remoteVideoStream:"remoteVideoStream"},outputs:{toggleAudio:"toggleAudio",toggleVideo:"toggleVideo",toggleHuddleOnCursor:"toggleHuddleOnCursor"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[["showAvatarImgRef",""],[4,"ngIf"],["class","video-huddle-block",3,"local-stream","video-off","speaking","selected","click",4,"ngIf"],[1,"video-huddle-block",3,"click"],[1,"video-player-container"],["playsinline","","autoplay","true",3,"srcObject","muted","volume"],[1,"user-profile-container"],["velt-ignore-change-detection","true",1,"s-presence-avatar",3,"title"],["class","s-presence-avatar-initial",4,"ngIf","ngIfElse"],[1,"video-player-overlay"],["class","video-huddle-actions-panel",3,"click",4,"ngIf"],[1,"s-presence-avatar-initial"],["referrerpolicy","no-referrer","loading","lazy",1,"s-presence-avatar-image",3,"error","src"],["width","13","height","19","viewBox","0 0 13 19","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","13","height","19","viewBox","0 0 13 19","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.77526 0.888917C4.98766 1.03653 4.34477 1.39041 3.76525 1.99544C3.26289 2.51988 2.94255 3.10884 2.75974 3.84431C2.69679 4.09753 2.6908 4.39635 2.6908 7.29276C2.6908 10.7979 2.68044 10.6352 2.94799 11.327C3.299 12.2346 4.07584 13.0561 4.94368 13.4374C5.82412 13.8243 6.82444 13.8531 7.71552 13.5173C8.69181 13.1494 9.53872 12.2934 9.92297 11.2862C10.1713 10.6354 10.1631 10.7714 10.1631 7.29276C10.1631 3.78764 10.1735 3.95032 9.90592 3.25855C9.62932 2.54335 9.02923 1.81042 8.38767 1.40419C7.61998 0.918084 6.64549 0.725873 5.77526 0.888917ZM6.9551 2.18212C7.80033 2.36379 8.55484 3.08137 8.82443 3.95997C8.91085 4.24162 8.9112 4.25479 8.9112 7.29276C8.9112 10.3307 8.91085 10.3439 8.82443 10.6256C8.578 11.4287 7.92854 12.0994 7.15071 12.3538C6.92897 12.4264 6.7875 12.4431 6.40739 12.4415C6.00213 12.4398 5.89869 12.425 5.65097 12.3333C5.00401 12.0936 4.49038 11.6376 4.2051 11.0497C3.92221 10.4667 3.92452 10.4977 3.92452 7.29276C3.92452 4.09736 3.92315 4.11587 4.19825 3.55135C4.71228 2.49645 5.83136 1.94067 6.9551 2.18212ZM0.537139 8.64006C0.373453 8.71677 0.215048 8.92183 0.182929 9.09861C0.133831 9.36895 0.199086 10.6794 0.283042 11.1082C0.737953 13.4317 2.32631 15.2803 4.50075 16.017C4.75328 16.1025 5.14915 16.2055 5.38044 16.2458L5.801 16.3192V16.9744V17.6296L5.06042 17.6421C4.38416 17.6536 4.31046 17.6619 4.21195 17.738C4.00671 17.8964 3.94271 18.0255 3.94271 18.2809C3.94271 18.5363 4.00679 18.6655 4.21206 18.8237C4.31804 18.9055 4.36006 18.907 6.42696 18.907C8.49385 18.907 8.53586 18.9055 8.64185 18.8237C8.84712 18.6655 8.9112 18.5363 8.9112 18.2809C8.9112 18.0255 8.8472 17.8964 8.64196 17.738C8.54346 17.6619 8.46975 17.6536 7.79349 17.6421L7.05291 17.6296V16.9744V16.3192L7.47347 16.2469C9.74567 15.8564 11.6474 14.1569 12.3699 11.8711C12.6066 11.1222 12.6648 10.7131 12.6659 9.79054C12.6668 9.05017 12.6614 8.98828 12.5862 8.8841C12.4332 8.67197 12.3081 8.60568 12.0605 8.60568C11.8131 8.60568 11.6881 8.67181 11.5348 8.88378C11.4622 8.9842 11.4515 9.07453 11.4282 9.79025C11.4001 10.6516 11.3449 11.0079 11.1515 11.5749C10.8931 12.3325 10.527 12.9264 9.95298 13.5192C9.22696 14.2689 8.41181 14.7274 7.405 14.9524C6.91168 15.0626 5.87256 15.0542 5.38588 14.936C4.37192 14.6897 3.6185 14.2601 2.90093 13.5192C2.32689 12.9264 1.96079 12.3325 1.70239 11.5749C1.50901 11.0079 1.45377 10.6516 1.42568 9.79025C1.39755 8.92635 1.3871 8.88689 1.13621 8.69342C1.00672 8.5936 0.695505 8.56589 0.537139 8.64006Z","fill","#FF7162"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M9.77526 0.888917C8.98766 1.03653 8.34477 1.39041 7.76525 1.99544C7.26289 2.51988 6.94255 3.10884 6.75974 3.84431C6.69679 4.09753 6.6908 4.39635 6.6908 7.29276C6.6908 10.7979 6.68044 10.6352 6.94799 11.327C7.299 12.2346 8.07584 13.0561 8.94368 13.4374C9.82412 13.8243 10.8244 13.8531 11.7155 13.5173C12.6918 13.1494 13.5387 12.2934 13.923 11.2862C14.1713 10.6354 14.1631 10.7714 14.1631 7.29276C14.1631 3.78764 14.1735 3.95032 13.9059 3.25855C13.6293 2.54335 13.0292 1.81042 12.3877 1.40419C11.62 0.918084 10.6455 0.725873 9.77526 0.888917ZM10.9551 2.18212C11.8003 2.36379 12.5548 3.08137 12.8244 3.95997C12.9108 4.24162 12.9112 4.25479 12.9112 7.29276C12.9112 10.3307 12.9108 10.3439 12.8244 10.6256C12.578 11.4287 11.9285 12.0994 11.1507 12.3538C10.929 12.4264 10.7875 12.4431 10.4074 12.4415C10.0021 12.4398 9.89869 12.425 9.65097 12.3333C9.00401 12.0936 8.49038 11.6376 8.2051 11.0497C7.92221 10.4667 7.92452 10.4977 7.92452 7.29276C7.92452 4.09736 7.92315 4.11587 8.19825 3.55135C8.71228 2.49645 9.83136 1.94067 10.9551 2.18212ZM4.53714 8.64006C4.37345 8.71677 4.21505 8.92183 4.18293 9.09861C4.13383 9.36895 4.19909 10.6794 4.28304 11.1082C4.73795 13.4317 6.32631 15.2803 8.50075 16.017C8.75328 16.1025 9.14915 16.2055 9.38044 16.2458L9.801 16.3192V16.9744V17.6296L9.06042 17.6421C8.38416 17.6536 8.31046 17.6619 8.21195 17.738C8.00671 17.8964 7.94271 18.0255 7.94271 18.2809C7.94271 18.5363 8.00679 18.6655 8.21206 18.8237C8.31804 18.9055 8.36006 18.907 10.427 18.907C12.4938 18.907 12.5359 18.9055 12.6418 18.8237C12.8471 18.6655 12.9112 18.5363 12.9112 18.2809C12.9112 18.0255 12.8472 17.8964 12.642 17.738C12.5435 17.6619 12.4697 17.6536 11.7935 17.6421L11.0529 17.6296V16.9744V16.3192L11.4735 16.2469C13.7457 15.8564 15.6474 14.1569 16.3699 11.8711C16.6066 11.1222 16.6648 10.7131 16.6659 9.79054C16.6668 9.05017 16.6614 8.98828 16.5862 8.8841C16.4332 8.67197 16.3081 8.60568 16.0605 8.60568C15.8131 8.60568 15.6881 8.67181 15.5348 8.88378C15.4622 8.9842 15.4515 9.07453 15.4282 9.79025C15.4001 10.6516 15.3449 11.0079 15.1515 11.5749C14.8931 12.3325 14.527 12.9264 13.953 13.5192C13.227 14.2689 12.4118 14.7274 11.405 14.9524C10.9117 15.0626 9.87256 15.0542 9.38588 14.936C8.37192 14.6897 7.6185 14.2601 6.90093 13.5192C6.32689 12.9264 5.96079 12.3325 5.70239 11.5749C5.50901 11.0079 5.45377 10.6516 5.42568 9.79025C5.39755 8.92636 5.3871 8.88689 5.13621 8.69342C5.00672 8.5936 4.69551 8.56589 4.53714 8.64006Z","fill","white"],["d","M19 1L1 19","stroke","#FF7162","stroke-width","1.4","stroke-linecap","round"],[1,"video-huddle-actions-panel",3,"click"],[1,"video-huddle-action-button",3,"click"],["width","19","height","11","viewBox","0 0 19 11","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","19","height","11","viewBox","0 0 19 11","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.55139 0.23203C1.68754 0.455725 1.06855 1.0239 0.766641 1.87017L0.666016 2.15221V5.58961V9.027L0.766892 9.30905C1.0535 10.1102 1.64038 10.6751 2.43987 10.9192L2.70863 11.0013H7.1343H11.56L11.8467 10.9053C12.6234 10.645 13.2099 10.0654 13.47 9.30122C13.56 9.03659 13.5637 8.9921 13.5769 8.03104C13.5844 7.48324 13.6004 7.03508 13.6125 7.03508C13.661 7.03508 15.0857 7.85713 15.8518 8.32715C16.7188 8.85908 16.9126 8.93887 17.338 8.93887C18.0692 8.93887 18.7509 8.40866 18.947 7.6873C19.0174 7.42849 19.0165 3.7478 18.946 3.48726C18.7883 2.90449 18.278 2.40845 17.7016 2.27772C17.4483 2.22025 17.0895 2.2339 16.8373 2.31054C16.6848 2.35687 16.3699 2.52617 15.9107 2.80867C15.3288 3.16675 13.6405 4.14414 13.6039 4.14414C13.5979 4.14414 13.5847 3.71184 13.5747 3.18343C13.5543 2.10543 13.5363 1.99899 13.2916 1.50796C13.0166 0.956034 12.475 0.494788 11.8467 0.277192L11.56 0.177913L7.18806 0.170686C2.95948 0.163705 2.80747 0.165715 2.55139 0.23203ZM11.3211 1.83643C11.5404 1.90052 11.7306 2.05381 11.8398 2.25463L11.9183 2.399V5.57293V8.74683L11.8268 8.92184C11.7122 9.14091 11.4929 9.30852 11.2552 9.35869C11.0123 9.40995 3.20786 9.41115 2.98224 9.35999C2.74243 9.30559 2.53297 9.14483 2.42553 8.93266L2.33236 8.74873V5.58961V2.43048L2.42553 2.24656C2.52985 2.04059 2.7435 1.87225 2.96604 1.82078C3.04208 1.80318 4.88581 1.78753 7.11882 1.78556C10.641 1.78245 11.1578 1.78873 11.3211 1.83643ZM17.3116 5.59366V7.28997L17.2309 7.23801C16.8358 6.98339 15.6936 6.30427 15.1359 5.99233C14.7573 5.78052 14.4468 5.5987 14.4461 5.5883C14.4453 5.57787 14.7874 5.37536 15.2062 5.13827C15.6251 4.90114 16.258 4.52634 16.6128 4.30536C16.9675 4.08438 17.2699 3.90215 17.2847 3.90045C17.2995 3.89876 17.3116 4.6607 17.3116 5.59366Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M3.55139 4.23203C2.68754 4.45573 2.06855 5.0239 1.76664 5.87017L1.66602 6.15221V9.58961V13.027L1.76689 13.309C2.0535 14.1102 2.64038 14.6751 3.43987 14.9192L3.70863 15.0013H8.1343H12.56L12.8467 14.9053C13.6234 14.645 14.2099 14.0654 14.47 13.3012C14.56 13.0366 14.5637 12.9921 14.5769 12.031C14.5844 11.4832 14.6004 11.0351 14.6125 11.0351C14.661 11.0351 16.0857 11.8571 16.8518 12.3271C17.7188 12.8591 17.9126 12.9389 18.338 12.9389C19.0692 12.9389 19.7509 12.4087 19.947 11.6873C20.0174 11.4285 20.0165 7.7478 19.946 7.48726C19.7883 6.90449 19.278 6.40845 18.7016 6.27772C18.4483 6.22025 18.0895 6.2339 17.8373 6.31054C17.6848 6.35687 17.3699 6.52617 16.9107 6.80867C16.3288 7.16675 14.6405 8.14414 14.6039 8.14414C14.5979 8.14414 14.5847 7.71184 14.5747 7.18343C14.5543 6.10543 14.5363 5.99899 14.2916 5.50796C14.0166 4.95603 13.475 4.49479 12.8467 4.27719L12.56 4.17791L8.18806 4.17069C3.95948 4.16371 3.80747 4.16571 3.55139 4.23203ZM12.3211 5.83643C12.5404 5.90052 12.7306 6.05381 12.8398 6.25463L12.9183 6.399V9.57293V12.7468L12.8268 12.9218C12.7122 13.1409 12.4929 13.3085 12.2552 13.3587C12.0123 13.4099 4.20786 13.4111 3.98224 13.36C3.74243 13.3056 3.53297 13.1448 3.42553 12.9327L3.33236 12.7487V9.58961V6.43048L3.42553 6.24656C3.52985 6.04059 3.7435 5.87225 3.96604 5.82078C4.04208 5.80318 5.88581 5.78753 8.11882 5.78556C11.641 5.78245 12.1578 5.78873 12.3211 5.83643ZM18.3116 9.59366V11.29L18.2309 11.238C17.8358 10.9834 16.6936 10.3043 16.1359 9.99233C15.7573 9.78052 15.4468 9.5987 15.4461 9.5883C15.4453 9.57787 15.7874 9.37536 16.2062 9.13827C16.6251 8.90114 17.258 8.52634 17.6128 8.30536C17.9675 8.08438 18.2699 7.90215 18.2847 7.90045C18.2995 7.89876 18.3116 8.6607 18.3116 9.59366Z","fill","white"],["d","M4.69231 5.29805L6.9519 16.6605C7.26158 18.2178 9.31823 18.591 10.1553 17.2418L12.4275 13.5798C12.4611 13.5255 12.5143 13.4861 12.5761 13.4699L16.8289 12.3482C18.3433 11.9488 18.6107 9.91372 17.2509 9.13668L7.27695 3.4373C5.97394 2.69272 4.3996 3.82614 4.69231 5.29805Z","stroke","#E5E5E9","stroke-width","1.5","stroke-linecap","square"]],template:function(t,r){t&1&&g(0,gJt,2,1,"ng-container",1),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}*[_ngcontent-%COMP%]:not(svg *){height:unset;width:unset}.video-huddle-block[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%!important;height:100%!important;pointer-events:none!important}.video-huddle-block[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:20px!important;height:20px!important}.video-huddle-block[_ngcontent-%COMP%] .video-player-container[_ngcontent-%COMP%]{position:relative!important}.video-huddle-block[_ngcontent-%COMP%] .video-player-container[_ngcontent-%COMP%] .video-player-overlay[_ngcontent-%COMP%]{width:100%!important;height:100%!important;position:absolute!important;top:0!important;background:#56565670!important;border-radius:100%!important;display:none!important;flex-direction:column;justify-content:center;align-items:center}.video-huddle-block[_ngcontent-%COMP%] .video-player-container[_ngcontent-%COMP%] .video-player-overlay[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.video-huddle-block[_ngcontent-%COMP%] .video-player-container[_ngcontent-%COMP%]:hover .video-player-overlay[_ngcontent-%COMP%], .video-huddle-block.video-off[_ngcontent-%COMP%] .user-profile-container[_ngcontent-%COMP%]{display:flex!important}.video-huddle-block.video-off[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{display:none!important}.video-huddle-block[_ngcontent-%COMP%] .user-profile-container[_ngcontent-%COMP%]{width:100%!important;height:100%!important;display:none!important;align-items:center!important;justify-content:center!important;background:#232323!important;border-radius:50%!important}.s-presence-avatar[_ngcontent-%COMP%]{position:relative!important;box-shadow:0 0 0 3px!important;border-radius:50%!important;overflow:hidden!important;width:100%!important;height:100%!important;min-width:100%!important;min-height:100%!important;display:flex!important;align-items:center!important;justify-content:center!important}.s-presence-avatar.more-users[_ngcontent-%COMP%]{background:#4578a7!important;box-shadow:0 0 0 3px #4578a7!important}.attendees-container[_ngcontent-%COMP%]{display:inline-flex!important;flex-direction:row-reverse!important;align-items:center!important;margin:0 16px 0 8px!important}.s-presence-avatar[_ngcontent-%COMP%]:not(:last-child):not(.more-users){margin-left:calc((-.5rem + 0px) * var(--velt-base-rem-unit))!important}.s-presence-avatar-image[_ngcontent-%COMP%]{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important}.s-presence-avatar-image-small[_ngcontent-%COMP%]{width:calc((1.6rem + 0px) * var(--velt-base-rem-unit))!important;height:100%!important;display:block!important;object-fit:cover!important}.s-presence-avatar-initial[_ngcontent-%COMP%]{color:#fff!important;font-size:calc((3rem + 0px) * var(--velt-base-rem-unit))!important}"],changeDetection:0});let i=o;return i})();var hJt=(i,o,n)=>({large:i,medium:o,small:n});function fJt(i,o){if(i&1){let n=Y();_(0,"div",3),w(1,"video",4),_(2,"div",5)(3,"div",6),G("click",function(){N(n);let t=l(2);return F(t.onToggleScreenSharing())}),te(4),P(5,"translate"),b()()()}if(i&2){let n=l().ngIf;m(),d("srcObject",n.stream)("volume",0),m(3),Ge(M(5,3,"Stop Sharing"))}}function vJt(i,o){if(i&1){let n=Y();_(0,"div",7),w(1,"video",4),_(2,"div",5)(3,"div"),te(4),P(5,"translate"),b(),_(6,"div",8),le(),_(7,"svg",9),G("click",function(){N(n);let t=l(2);return F(t.changeViewportSize("large"))}),w(8,"path",10)(9,"path",11),b(),_(10,"svg",12),G("click",function(){N(n);let t=l(2);return F(t.changeViewportSize("medium"))}),w(11,"path",13)(12,"path",14),b(),_(13,"svg",15),G("click",function(){N(n);let t=l(2);return F(t.changeViewportSize("small"))}),w(14,"path",16)(15,"path",17),b()()()()}if(i&2){let n=l().ngIf;d("ngClass",$e(13,hJt,n.viewportSize==="large",n.viewportSize==="medium",n.viewportSize==="small")),m(),d("srcObject",n.stream)("volume",0),m(3),vr("",(n.user==null?null:n.user.name)||(n.user==null?null:n.user.email)," ",M(5,11,"is sharing now."),""),m(3),ge("selected",n.viewportSize==="large"),m(3),ge("selected",n.viewportSize==="medium"),m(3),ge("selected",n.viewportSize==="small")}}function CJt(i,o){if(i&1&&(f(0),g(1,fJt,6,5,"div",1)(2,vJt,16,17,"div",2),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.stream&&!n.isRemoteStream),m(),d("ngIf",n.stream&&n.isRemoteStream)}}var U0e=(()=>{let o=class o{constructor(e){this.loggingService=e,this.isRemoteStream=!1,this.toggleScreenSharing=new Pe,this.viewportSizeChange=new Pe,this.veltElement=!0,this.componentConfigSignal=De({stream:this.stream,isRemoteStream:this.isRemoteStream,viewportSize:"small",user:this.user})}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling ScreenSharingHuddleComponent FUNCTION: ngOnChanges","color: green;"),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in ScreenSharingHuddleComponent ngOnChanges: ",t)}}changeViewportSize(e){this.componentConfigSignal.update(t=>T(I({},t),{viewportSize:e})),this.viewportSizeChange.emit(this.componentConfigSignal().viewportSize)}onToggleScreenSharing(){this.toggleScreenSharing.emit()}};o.\u0275fac=function(t){return new(t||o)(h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-screen-sharing-huddle"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{user:"user",stream:"stream",isRemoteStream:"isRemoteStream"},outputs:{toggleScreenSharing:"toggleScreenSharing",viewportSizeChange:"viewportSizeChange"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],["class","screen-sharing-container local-screen-sharing-container",4,"ngIf"],["class","screen-sharing-container remote-screen-sharing-container",3,"ngClass",4,"ngIf"],[1,"screen-sharing-container","local-screen-sharing-container"],["autoplay","","muted","true","playsinline","",3,"srcObject","volume"],[1,"screen-sharing-overlay"],[1,"stop-sharing-btn",3,"click"],[1,"screen-sharing-container","remote-screen-sharing-container",3,"ngClass"],[1,"screen-sharing-resize-container"],["width","21","height","20","viewBox","0 0 21 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M18.0006 2.5H3.00065C2.08018 2.5 1.33398 3.24619 1.33398 4.16667V13.3333C1.33398 14.2538 2.08018 15 3.00065 15H5.06885C5.33962 15 5.59351 14.8684 5.74966 14.6472L8.45823 10.8101C9.45427 9.39904 11.547 9.39904 12.5431 10.8101L15.2516 14.6472C15.4078 14.8684 15.6617 15 15.9324 15H18.0006C18.9211 15 19.6673 14.2538 19.6673 13.3333V4.16667C19.6673 3.24619 18.9211 2.5 18.0006 2.5Z"],["d","M6.50021 16.1684L9.83354 11.724C10.1669 11.2795 10.8335 11.2795 11.1669 11.724L14.5002 16.1684C14.9122 16.7178 14.5202 17.5017 13.8335 17.5017H7.16688C6.48017 17.5017 6.08819 16.7178 6.50021 16.1684Z"],["width","15","height","12","viewBox","0 0 15 12","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M13.6364 0.167969H1.36364C0.610521 0.167969 0 0.748339 0 1.46426V8.59387C0 9.3098 0.610521 9.89017 1.36364 9.89017H3.0558C3.27734 9.89017 3.48507 9.78785 3.61283 9.61579L5.82893 6.63136C6.64387 5.53387 8.35613 5.53387 9.17107 6.63136L11.3872 9.61579C11.5149 9.78785 11.7227 9.89017 11.9442 9.89017H13.6364C14.3895 9.89017 15 9.3098 15 8.59387V1.46426C15 0.748339 14.3895 0.167969 13.6364 0.167969Z"],["d","M4.22745 10.7981L6.95472 7.34129C7.22745 6.99561 7.7729 6.99561 8.04563 7.34129L10.7729 10.7981C11.11 11.2254 10.7893 11.8351 10.2274 11.8351H4.7729C4.21105 11.8351 3.89034 11.2254 4.22745 10.7981Z"],["width","11","height","10","viewBox","0 0 11 10","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M9.59091 0.832031H1.40909C0.907014 0.832031 0.5 1.24658 0.5 1.75795V6.85053C0.5 7.36191 0.907014 7.77646 1.40909 7.77646H2.5372C2.68489 7.77646 2.82338 7.70337 2.90855 7.58048L4.38595 5.44874C4.92925 4.66482 6.07075 4.66482 6.61405 5.44874L8.09145 7.58048C8.17662 7.70337 8.31511 7.77646 8.4628 7.77646H9.59091C10.093 7.77646 10.5 7.36191 10.5 6.85053V1.75795C10.5 1.24658 10.093 0.832031 9.59091 0.832031Z"],["d","M3.3183 8.42384L5.13648 5.95472C5.3183 5.7078 5.68193 5.7078 5.86375 5.95472L7.68193 8.42384C7.90667 8.72905 7.69286 9.16458 7.3183 9.16458H3.68193C3.30737 9.16458 3.09356 8.72905 3.3183 8.42384Z"]],template:function(t,r){t&1&&g(0,CJt,3,2,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[Ur,X,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}*[_ngcontent-%COMP%]:not(svg *){height:unset;width:unset}[_nghost-%COMP%]{position:fixed;bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;right:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;z-index:2147483607!important}.screen-sharing-container.local-screen-sharing-container[_ngcontent-%COMP%]{width:326px!important;height:216px!important;padding:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;background:#fff!important;box-shadow:0 1px 4px #00000029!important;border-radius:20px!important;position:relative!important;overflow:hidden!important}.screen-sharing-container.local-screen-sharing-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#fff!important}.screen-sharing-container.local-screen-sharing-container[_ngcontent-%COMP%] .screen-sharing-overlay[_ngcontent-%COMP%]{position:absolute!important;width:100%!important;height:100%!important;top:0!important;background:#fff!important;display:none!important;align-items:center;justify-content:center;color:#fff!important;background:#000000b3!important;left:0!important;font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important}.screen-sharing-container.local-screen-sharing-container[_ngcontent-%COMP%]:hover .screen-sharing-overlay[_ngcontent-%COMP%]{display:flex!important}.screen-sharing-container.local-screen-sharing-container[_ngcontent-%COMP%] .stop-sharing-btn[_ngcontent-%COMP%]{cursor:pointer!important}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%]{width:30vw!important;height:20vh!important;padding:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;background:#fff!important;box-shadow:0 1px 4px #00000029!important;border-radius:20px!important;position:relative!important;overflow:hidden!important;transition:width .2s ease-in-out,height .2s ease-in-out}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#fff!important;text-align:center!important}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%] .screen-sharing-overlay[_ngcontent-%COMP%]{position:absolute!important;width:100%!important;height:100%!important;top:0!important;background:#fff!important;display:none!important;align-items:center;justify-content:center;color:#fff!important;background:#000000b3!important;left:0!important;font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;flex-direction:column}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%] .screen-sharing-overlay[_ngcontent-%COMP%] .screen-sharing-resize-container[_ngcontent-%COMP%]{margin-top:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;background:#000;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center;justify-content:center}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%] .screen-sharing-overlay[_ngcontent-%COMP%] .screen-sharing-resize-container[_ngcontent-%COMP%] > svg[_ngcontent-%COMP%]{margin:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;cursor:pointer!important;fill:#b1b5c4!important}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%] .screen-sharing-overlay[_ngcontent-%COMP%] .screen-sharing-resize-container[_ngcontent-%COMP%] > svg.selected[_ngcontent-%COMP%]{fill:#fff!important}.screen-sharing-container.remote-screen-sharing-container[_ngcontent-%COMP%]:hover .screen-sharing-overlay[_ngcontent-%COMP%]{display:flex!important}.screen-sharing-container.remote-screen-sharing-container.medium[_ngcontent-%COMP%]{width:60vw!important;height:60vh!important}.screen-sharing-container.remote-screen-sharing-container.large[_ngcontent-%COMP%]{width:calc(100vw - 5rem)!important;height:calc(100vh - 5rem)!important}video[_ngcontent-%COMP%]{width:100%!important;height:100%!important;border-radius:8px!important}"],changeDetection:0});let i=o;return i})();var Tg=(()=>{let o=class o{constructor(e){this.translateService=e}transform(e,...t){try{let a=(new Date().getTime()-new Date(e).getTime())/1e3;if(a<1)return this.translateService.translate("now");let s={y:31536e3,mo:2592e3,w:604800,d:86400,h:3600,m:60,s:1};for(let c in s){let p=Math.floor(a/s[c]);if(p>0)return`${p}${this.translateService.translate(c)}`}return e}catch{return e}}};o.\u0275fac=function(t){return new(t||o)(h(dl,16))},o.\u0275pipe=Bi({name:"timeAgo",type:o,pure:!0,standalone:!1});let i=o;return i})();var Dg=(()=>{let o=class o{constructor(e,t){this.domService=e,this.sanitizer=t}transform(e,t=!0){try{let r=t?this.domService.sanitizeHtml(e):e;return this.sanitizer.bypassSecurityTrustHtml(r)}catch{return e}}};o.\u0275fac=function(t){return new(t||o)(h(Be,16),h(Ws,16))},o.\u0275pipe=Bi({name:"safeHtml",type:o,pure:!0,standalone:!1});let i=o;return i})();function yJt(i,o){if(i&1&&(_(0,"div",21),te(1),P(2,"translate"),P(3,"translate"),b()),i&2){let n=l().$implicit,e=l().ngIf;m(),Ce(" ",(n==null||n.from==null?null:n.from.userId)===(e.user==null?null:e.user.userId)?M(2,1,"Me"):M(3,3,(n==null||n.from==null?null:n.from.name)||(n==null||n.from==null?null:n.from.email))," ")}}function SJt(i,o){i&1&&w(0,"velt-skeleton-loader-internal",22)}function bJt(i,o){if(i&1&&(f(0),_(1,"div",15),w(2,"snippyly-user-avatar",16),_(3,"div",17),g(4,yJt,4,5,"div",18)(5,SJt,1,0,"ng-template",null,1,Te),_(7,"div",19),te(8),P(9,"timeAgo"),b(),w(10,"div",20),P(11,"translate"),P(12,"safeHtml"),b()(),v()),i&2){let n=o.$implicit,e=de(6),t=l().ngIf;m(2),d("user",n==null?null:n.from),m(2),d("ngIf",(n==null||n.from==null?null:n.from.userId)===(t.user==null?null:t.user.userId)||(n==null||n.from==null?null:n.from.name)||(n==null||n.from==null?null:n.from.email))("ngIfElse",e),m(4),Ge(M(9,5,n==null?null:n.timestamp)),m(2),d("innerHTML",M(12,9,M(11,7,(n==null?null:n.message)||"")),Qi)}}function IJt(i,o){if(i&1){let n=Y();f(0),_(1,"div",3)(2,"div",4,0)(4,"div",5)(5,"div"),te(6),P(7,"translate"),b(),_(8,"div"),le(),_(9,"svg",6),G("click",function(){N(n);let t=l();return F(t.toggleMessagesPanel())}),w(10,"path",7),b()()(),ut(),_(11,"div",8),g(12,bJt,13,11,"ng-container",9),b(),_(13,"div",10)(14,"textarea",11),P(15,"translate"),Vr("ngModelChange",function(t){let r=N(n).ngIf;return qr(r.message,t)||(r.message=t),F(t)}),G("keydown.enter",function(t){N(n);let r=l();return t.preventDefault(),F(r.sendMessage())}),b(),_(16,"button",12),G("click",function(){N(n);let t=l();return F(t.sendMessage())}),le(),_(17,"svg",13),w(18,"path",14),b()()()()(),v()}if(i&2){let n=o.ngIf,e=l();m(),ge("visible",n.messagesPanelVisible)("mobile",n.isPhone),m(5),Ge(M(7,10,"In-call messages")),m(6),d("ngForOf",n.messages)("ngForTrackBy",e.trackByMessageId),m(2),k1("placeholder",M(15,12,"Type here...")),Br("ngModel",n.message),m(2),d("disabled",!(n.message!=null&&n.message.trim()))}}var H0e=(()=>{let o=class o{constructor(e,t,r,a){this.authService=e,this.huddleService=t,this.loggingService=r,this.breakpointObserver=a,this.subscriptions=[],this.componentConfigSignal=De({isPhone:!1,user:null,messages:[],message:"",messagesPanelVisible:!1});try{this.loggingService.log("%c[WB] Creating CLASS: HuddleMessagesPanelComponent","color: blue;"),this.subscriptions.push(this.huddleService.getMessages$().subscribe(s=>{s.sort((c,p)=>c?.timestamp-p?.timestamp),this.componentConfigSignal.update(c=>T(I({},c),{messages:s}))})),this.subscriptions.push(this.huddleService.getMessagesPanelVisible$().subscribe(s=>{this.componentConfigSignal.update(c=>T(I({},c),{messagesPanelVisible:s}))})),this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.componentConfigSignal.update(c=>T(I({},c),{user:s}))})),this.subscriptions.push(this.breakpointObserver.observe(Ni.XSmall).subscribe(s=>{s.matches?this.componentConfigSignal.update(c=>T(I({},c),{isPhone:!0})):this.componentConfigSignal.update(c=>T(I({},c),{isPhone:!1}))},s=>{this.loggingService.catch("Error in HuddleMessagesPanelComponent breakpointObserver subscription: ",s)}))}catch(s){this.loggingService.catch("Error in HuddleMessagesPanelComponent constructor: ",s)}}ngOnInit(){}trackByMessageId(e,t){return t.id||e}highlightLinks(e){this.loggingService.log("%c[WB] Calling FUNCTION: highlightLinks","color: green;");try{return e&&(e=e?.replaceAll("&amp;","&")),e.replaceAll(j.REGEX_URL,r=>new RegExp(j.REGEX_EMAIL).test("@"+r)?r:`<a class="message-link" href="${r}" target="_blank">${r}</a>`)}catch(t){return this.loggingService.catch("Error in HuddleMessagesPanelComponent highlightLinks: ",t),""}}sendMessage(){this.loggingService.log("%c[WB] Calling FUNCTION: sendMessage","color: green;");try{let e=this.componentConfigSignal().message?.trim();if(!e)return;e=this.highlightLinks(e),this.huddleService.sendMessage(e),this.componentConfigSignal.update(t=>T(I({},t),{message:""}))}catch(e){this.loggingService.catch("Error in HuddleMessagesPanelComponent sendMessage: ",e)}}toggleMessagesPanel(){try{this.loggingService.log("%c[WB] Calling FUNCTION: toggleMessagesPanel","color: green;"),this.huddleService.toggleMessagesPanel()}catch(e){this.loggingService.catch("Error in HuddleMessagesPanelComponent toggleMessagesPanel: ",e)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling FUNCTION: onDestroy","color: green;"),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in HuddleMessagesPanelComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Ue),h(fr),h(y),h(fo))},o.\u0275cmp=O({type:o,selectors:[["velt-huddle-messages-panel-internal"]],standalone:!1,decls:1,vars:1,consts:[["sidebarRef",""],["loadingTemplateRef",""],[4,"ngIf"],["part","container","data-velt-element","true","data-velt-comment-disabled","true",1,"s-sidebar-container"],[1,"s-sidebar"],[1,"v-huddle-messages-header"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"v-huddle-message-panel-close-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.29289 5.29289C5.68342 4.90237 6.31658 4.90237 6.70711 5.29289L12 10.5858L17.2929 5.29289C17.6834 4.90237 18.3166 4.90237 18.7071 5.29289C19.0976 5.68342 19.0976 6.31658 18.7071 6.70711L13.4142 12L18.7071 17.2929C19.0976 17.6834 19.0976 18.3166 18.7071 18.7071C18.3166 19.0976 17.6834 19.0976 17.2929 18.7071L12 13.4142L6.70711 18.7071C6.31658 19.0976 5.68342 19.0976 5.29289 18.7071C4.90237 18.3166 4.90237 17.6834 5.29289 17.2929L10.5858 12L5.29289 6.70711C4.90237 6.31658 4.90237 5.68342 5.29289 5.29289Z","fill","#777E91"],[1,"v-huddle-messages-container"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"v-huddle-message-box-container"],["name","message","rows","1",1,"v-huddle-message-box-input",3,"ngModelChange","keydown.enter","placeholder","ngModel"],[1,"v-huddle-message-box-send-btn",3,"click","disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M20.8089 10.1394L4.6724 3.15546C3.9926 2.8612 3.22459 2.99065 2.66814 3.49311C2.1117 3.99565 1.87896 4.76995 2.06084 5.51382L3.49713 11.3888H10.5294C10.853 11.3888 11.1154 11.6625 11.1154 12C11.1154 12.3375 10.853 12.6112 10.5294 12.6112H3.49713L2.06084 18.4862C1.87896 19.2301 2.11166 20.0044 2.66814 20.5069C3.22572 21.0104 3.99381 21.1382 4.67244 20.8445L20.8089 13.8606C21.5436 13.5426 22 12.8297 22 12C22 11.1703 21.5436 10.4574 20.8089 10.1394Z","fill","#777E90"],[1,"v-huddle-message-block"],[3,"user"],[1,"v-huddle-message-block-right"],["class","v-huddle-message-block-user",4,"ngIf","ngIfElse"],[1,"v-huddle-message-block-time"],[1,"v-huddle-message-block-message",3,"innerHTML"],[1,"v-huddle-message-block-user"],["height","20px","width","80px","borderRadius","20px"]],template:function(t,r){t&1&&g(0,IJt,19,14,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,ha,es,ka,Kn,Uo,Tg,Dg,pe],styles:[`html{--velt-base-rem-unit: 1}*[data-snippyly-element=true],*[data-velt-element=true]{font-family:var(--velt-default-font-family)}velt-wireframe{display:none!important}:host{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}:host[dark]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.s-sidebar-container{height:100vh;width:calc((22rem + 0px) * var(--velt-base-rem-unit));position:fixed;top:0;right:-100%;padding:calc((1rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;z-index:999999997;transition:width .5s ease-in-out,right .5s ease-in-out}.s-sidebar-container.mobile{width:100%!important;height:100%!important;box-sizing:border-box!important;-webkit-backdrop-filter:blur(2px)!important;backdrop-filter:blur(2px)!important}.s-sidebar-container.visible{right:0}.s-sidebar-container .s-sidebar{background:var(--velt-background-0);padding:calc((1rem + 0px) * var(--velt-base-rem-unit));border-radius:var(--velt-border-radius-lg);width:100%;overflow-x:hidden;box-sizing:border-box;position:relative;height:100%;border:1px solid var(--velt-border-5);display:flex;flex-direction:column;justify-content:space-between;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))}.s-sidebar-container .s-sidebar::-webkit-scrollbar{display:none;width:0;height:0}.s-sidebar-container .s-sidebar:not(.s-overflow-hidden){overflow-y:auto}.s-sidebar-container .v-huddle-message-panel-close-btn{cursor:pointer}.s-sidebar-container .v-huddle-messages-header{display:flex;justify-content:space-between}.s-sidebar-container .v-huddle-messages-container{overflow:auto;flex-grow:1}.s-sidebar-container .v-huddle-messages-container::-webkit-scrollbar{display:none;width:0;height:0}.s-sidebar-container .v-huddle-message-block{display:flex;gap:calc((1rem + 0px) * var(--velt-base-rem-unit));margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))}.s-sidebar-container .v-huddle-message-block .v-huddle-message-block-time{font-size:calc((.5rem + 0px) * var(--velt-base-rem-unit));color:gray;margin-bottom:calc((.25rem + 0px) * var(--velt-base-rem-unit))}.s-sidebar-container .v-huddle-message-block .v-huddle-message-block-message{font-size:calc((.75rem + 0px) * var(--velt-base-rem-unit));word-break:break-word;white-space:pre-wrap}.s-sidebar-container .v-huddle-message-box-container{display:flex;gap:calc((1rem + 0px) * var(--velt-base-rem-unit));align-items:center}.s-sidebar-container .v-huddle-message-box-container .v-huddle-message-box-input{padding:calc((.75rem + 0px) * var(--velt-base-rem-unit));border-radius:8px;border:0;outline:0;background:#f7f7f7;flex-grow:1;font-family:var(--velt-default-font-family);resize:none}.s-sidebar-container .v-huddle-message-box-container .v-huddle-message-box-send-btn{background:transparent;border:0;outline:0;border-radius:100%;width:32px;height:32px;display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;opacity:1}.s-sidebar-container .v-huddle-message-box-container .v-huddle-message-box-send-btn[disabled]{opacity:.5;cursor:not-allowed}
515
515
  `],encapsulation:3,changeDetection:0});let i=o;return i})();var xJt=["remoteScreenSharingHuddleDrag"],TJt=()=>["snippyly-sidebar-panel","velt-overlay-panel"];function DJt(i,o){if(i&1){let n=Y();_(0,"snippyly-video-huddle-user",8),G("toggleAudio",function(){N(n);let t=l(4);return F(t.toggleAudio())})("toggleVideo",function(){N(n);let t=l(4);return F(t.toggleVideo())})("cdkDragStarted",function(t){N(n);let r=l(4);return F(r.onDragStarted(t))})("cdkDragMoved",function(t){N(n);let r=l(4);return F(r.onDragMoved(t))})("cdkDragEnded",function(t){N(n);let r=l(4);return F(r.onDragEnded(t))}),b()}if(i&2){let n=l(3).ngIf;d("user",n.user)("stream",n.localStream)("audioState",n.localStreamState==null?null:n.localStreamState.audioState)("videoState",n.localStreamState==null?null:n.localStreamState.videoState)}}function wJt(i,o){if(i&1&&(f(0),g(1,DJt,1,4,"snippyly-video-huddle-user",7),v()),i&2){let n=l(2).ngIf;m(),d("ngIf",n.localStream&&n.meetingJoined&&((n.localStreamState==null?null:n.localStreamState.videoState)||n.videoStateEnabledInPastByUserId[n.user==null?null:n.user.userSnippylyId]))}}function OJt(i,o){if(i&1){let n=Y();_(0,"snippyly-video-huddle-user",12),G("toggleAudio",function(){N(n);let t=l(6);return F(t.toggleAudio())})("toggleVideo",function(){N(n);let t=l(6);return F(t.toggleVideo())})("toggleHuddleOnCursor",function(){N(n);let t=l(2).$implicit,r=l(4);return F(r.toggleHuddleOnCursor(t))})("cdkDragStarted",function(t){N(n);let r=l(6);return F(r.onDragStarted(t))})("cdkDragMoved",function(t){N(n);let r=l(6);return F(r.onDragMoved(t))})("cdkDragEnded",function(t){N(n);let r=l(6);return F(r.onDragEnded(t))}),b()}if(i&2){let n=l(2).$implicit,e=l(3).ngIf;d("user",n)("remoteVideoStream",e.remoteStreamsByUserId[n==null?null:n.userSnippylyId]==null?null:e.remoteStreamsByUserId[n==null?null:n.userSnippylyId].webcam)("audioState",n==null||n.state==null?null:n.state.audioState)("videoState",n==null||n.state==null?null:n.state.videoState)("isRemoteStream",!0)}}function AJt(i,o){if(i&1&&w(0,"snippyly-audio-huddle-user",13),i&2){let n=l(2).$implicit,e=l(3).ngIf;d("user",n)("remoteAudioStream",e.remoteStreamsByUserId[n==null?null:n.userSnippylyId]==null?null:e.remoteStreamsByUserId[n==null?null:n.userSnippylyId].webcam)}}function PJt(i,o){if(i&1&&(f(0),g(1,OJt,1,5,"snippyly-video-huddle-user",10)(2,AJt,1,2,"snippyly-audio-huddle-user",11),v()),i&2){let n=l().$implicit,e=l(3).ngIf;m(),d("ngIf",(n==null?null:n.userSnippylyId)!==(e.user==null?null:e.user.userSnippylyId)&&((n==null||n.state==null?null:n.state.videoState)||e.videoStateEnabledInPastByUserId[n==null?null:n.userSnippylyId])&&e.peerConnectionStateMapByUserId[n==null?null:n.userSnippylyId]==="connected"),m(),d("ngIf",(n==null?null:n.userSnippylyId)!==(e.user==null?null:e.user.userSnippylyId)&&!(!(n==null||n.state==null)&&n.state.videoState||e.videoStateEnabledInPastByUserId[n==null?null:n.userSnippylyId])&&(n==null||n.state==null?null:n.state.audioState))}}function MJt(i,o){if(i&1&&g(0,PJt,3,2,"ng-container",4),i&2){let n=o.$implicit,e=l(3).ngIf;d("ngIf",!e.huddleCursorAvailableByAttendeeId[n==null?null:n.userSnippylyId])}}function kJt(i,o){if(i&1&&(f(0),g(1,MJt,1,1,"ng-template",9),v()),i&2){let n=l(2).ngIf,e=l();m(),d("ngForOf",n.huddleAttendees)("ngForTrackBy",e.trackById)}}function RJt(i,o){if(i&1&&(_(0,"div",6),g(1,wJt,2,1,"ng-container",4)(2,kJt,2,2,"ng-container",4),b()),i&2){let n=l().ngIf;HZ("--legacy-velt-user-color: ",n.user==null?null:n.user.color,""),x("highlight",n.isDragging||null),m(),d("ngIf",!n.huddleCursorAvailableByAttendeeId[n.user==null?null:n.user.userSnippylyId]),m(),d("ngIf",n.meetingJoined)}}function NJt(i,o){if(i&1){let n=Y();f(0),_(1,"snippyly-screen-sharing-huddle",15),G("toggleScreenSharing",function(){N(n);let t=l(3);return F(t.toggleScreenSharing())}),b(),v()}if(i&2){let n=l(2).ngIf;m(),d("stream",n.localScreenSharingStream)}}function FJt(i,o){if(i&1){let n=Y();_(0,"snippyly-screen-sharing-huddle",17,1),G("viewportSizeChange",function(){N(n);let t=l(4);return F(t.onViewportSizeChange())}),b()}if(i&2){let n=l(3).ngIf;d("stream",n.screenSharing==null?null:n.screenSharing.stream)("user",n.screenSharing==null?null:n.screenSharing.attendee)("isRemoteStream",(n.screenSharing==null||n.screenSharing.attendee==null?null:n.screenSharing.attendee.userSnippylyId)!==(n.user==null?null:n.user.userSnippylyId))}}function LJt(i,o){if(i&1&&g(0,FJt,2,3,"snippyly-screen-sharing-huddle",16),i&2){let n=l(2).ngIf;d("ngIf",n.screenSharing&&n.peerConnectionStateMapByUserId[n.screenSharing==null||n.screenSharing.attendee==null?null:n.screenSharing.attendee.userSnippylyId]==="connected")}}function BJt(i,o){if(i&1&&(f(0),g(1,NJt,2,1,"ng-container",14)(2,LJt,1,1,"ng-template",null,0,Te),v()),i&2){let n=de(3),e=l().ngIf;m(),d("ngIf",e.localScreenSharingStream&&(e.localStreamState==null?null:e.localStreamState.screenSharingState))("ngIfElse",n)}}function VJt(i,o){i&1&&w(0,"velt-huddle-messages-panel-internal")}function UJt(i,o){if(i&1&&(f(0),w(1,"div",18,2),g(3,VJt,1,0,"ng-template",19,3,Te),v()),i&2){let n=de(2),e=l().ngIf;m(3),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",e.meetingJoined)("cdkConnectedOverlayDisableClose",!0)("cdkConnectedOverlayPanelClass",gt(4,TJt))}}function jJt(i,o){if(i&1&&(f(0),g(1,RJt,3,6,"div",5)(2,BJt,4,2,"ng-container",4)(3,UJt,5,5,"ng-container",4),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.meetingJoined),m(),d("ngIf",n.meetingJoined),m(),d("ngIf",n.meetingJoined)}}var Zz=(()=>{let o=class o{set _chat(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.huddleService.enableChat():this.huddleService.disableChat()}catch{}}set _flockModeOnAvatarClick(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.huddleService.enableFlockModeOnAvatarClick():this.huddleService.disableFlockModeOnAvatarClick()}catch{}}set _serverFallback(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.huddleService.enableServerFallback():this.huddleService.disableServerFallback()}catch{}}constructor(e,t,r,a){this.analyticsService=e,this.authService=t,this.huddleService=r,this.loggingService=a,this.droppedInsideContainer=!1,this.remoteStreams=[],this.remoteStreamsMap={},this.huddleStarted=!1,this.peerConnectionStateMap={},this.huddleOnCursorMode=!1,this.subscriptions=[],this.veltElement=!0,this.componentConfigSignal=De({isDragging:!1,user:null,meetingJoined:!1,huddleCursorAvailableByAttendeeId:{},localStreamState:{},localStream:null,videoStateEnabledInPastByUserId:{},huddleAttendees:[],remoteStreamsByUserId:{},localScreenSharingStream:null,screenSharing:null,peerConnectionStateMapByUserId:{}}),this.subscriptions.push(this.authService.getUser$().pipe(Le(s=>!!s)).subscribe(s=>{s&&(this.componentConfigSignal.update(c=>(c=T(I({},c),{user:s}),c)),this.setHuddleInstalledInAnalytics())},s=>{this.loggingService.catch("Error in getUser: ",s)})),this.subscriptions.push(this.huddleService.localStream$.subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{localStream:s}),c))},s=>{this.loggingService.catch("Error in localStream: ",s)})),this.subscriptions.push(this.huddleService.getScreenSharingStream().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{localScreenSharingStream:s}),c))},s=>{this.loggingService.catch("Error in localStream: ",s)})),this.subscriptions.push(this.huddleService.getPeerConnectionStateMap().subscribe(s=>{this.peerConnectionStateMap=s,this.updatePeerConnectionStateMapByUserId()},s=>{this.loggingService.catch("Error in getPeerConnectionStateMap: ",s)})),this.subscriptions.push(this.huddleService.getHuddleOnCursorMode$().subscribe(s=>{this.huddleOnCursorMode=s})),this.subscriptions.push(this.huddleService.getHuddleCursorAvailableByAttendeeId$().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{huddleCursorAvailableByAttendeeId:s}),c))},s=>{this.loggingService.catch("Error in getHuddleCursorAvailableByAttendeeId: ",s)})),this.subscriptions.push(this.huddleService.getRemoteStream().subscribe(s=>{try{s?(this.remoteStreamsMap=s,this.remoteStreams=Object.values(s)):this.remoteStreams=[],this.updateRemoteStreamsByUserId()}catch(c){this.loggingService.catch("Error in HuddleComponent getRemoteStream:",c)}},s=>{this.loggingService.catch("Error in getRemoteStream: ",s)})),this.subscriptions.push(this.huddleService.getLocalStreamState().subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{localStreamState:s}),c))},s=>{this.loggingService.catch("Error in getLocalStreamState: ",s)})),this.getHuddleAttendees()}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}trackById(e,t){return t?.userSnippylyId}getHuddleAttendees(){this.subscriptions.push(this.huddleService.getHuddleAttendees$().subscribe(e=>{try{e?(this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleAttendees:e.slice()}),t)),this.huddleStarted=!!e?.length,this.componentConfigSignal.update(t=>(t=T(I({},t),{meetingJoined:!!e.find(r=>r?.userSnippylyId===t.user?.userSnippylyId)}),t)),this.updateRemoteStreamsByUserId()):(this.huddleStarted=!1,this.componentConfigSignal.update(t=>(t=T(I({},t),{meetingJoined:!1}),t)),this.componentConfigSignal.update(t=>(t=T(I({},t),{huddleAttendees:[]}),t)),this.componentConfigSignal.update(t=>(t=T(I({},t),{remoteStreamsByUserId:{}}),t))),this.componentConfigSignal().meetingJoined?this.componentConfigSignal().huddleAttendees.forEach(t=>{t.userSnippylyId&&!this.componentConfigSignal().videoStateEnabledInPastByUserId[t.userSnippylyId]&&t?.state?.videoState&&this.componentConfigSignal.update(r=>(r=T(I({},r),{videoStateEnabledInPastByUserId:T(I({},r.videoStateEnabledInPastByUserId),{[t.userSnippylyId]:!0})}),r))}):this.componentConfigSignal.update(t=>(t=T(I({},t),{videoStateEnabledInPastByUserId:{}}),t))}catch(t){this.loggingService.catch("Error in HuddleComponent getHuddleAttendees:",t)}}))}updateRemoteStreamsByUserId(){try{if(this.componentConfigSignal().huddleAttendees&&this.componentConfigSignal().user?.userSnippylyId){let e=this.componentConfigSignal().huddleAttendees.map(t=>t.userSnippylyId);Object.keys(this.componentConfigSignal().remoteStreamsByUserId).forEach(t=>{e.includes(t)&&this.componentConfigSignal.update(r=>{let a=I({},r.remoteStreamsByUserId);return delete a[t],T(I({},r),{remoteStreamsByUserId:a})})}),this.componentConfigSignal().huddleAttendees.forEach(t=>{let r=this.huddleService.getCombinedId(this.componentConfigSignal().user?.userSnippylyId,t.userSnippylyId);this.componentConfigSignal().remoteStreamsByUserId[t?.userSnippylyId]||this.componentConfigSignal.update(a=>(a=T(I({},a),{remoteStreamsByUserId:T(I({},a.remoteStreamsByUserId),{[t?.userSnippylyId]:this.remoteStreamsMap[r]})}),a)),t?.state?.screenSharingState&&this.remoteStreamsMap[r]&&Object.values(this.remoteStreamsMap[r]).forEach(a=>{!a?.getAudioTracks()?.length&&a?.getVideoTracks()?.length&&this.componentConfigSignal.update(s=>(s=T(I({},s),{screenSharing:{attendee:t,stream:a}}),s))}),this.componentConfigSignal().huddleAttendees.filter(a=>a?.state?.screenSharingState)?.length||this.componentConfigSignal.update(a=>(a=T(I({},a),{screenSharing:null}),a))})}else this.componentConfigSignal.update(e=>(e=T(I({},e),{remoteStreamsByUserId:{}}),e));this.huddleService.setRemoteStreamsByUserId(this.componentConfigSignal().remoteStreamsByUserId)}catch(e){this.loggingService.catch("Error in HuddleComponent updateRemoteStreamsByUserId:",e)}}updatePeerConnectionStateMapByUserId(){try{this.componentConfigSignal().huddleAttendees.forEach(e=>{let t=this.huddleService.getCombinedId(this.componentConfigSignal().user?.userSnippylyId,e.userSnippylyId);this.componentConfigSignal.update(r=>(r=T(I({},r),{peerConnectionStateMapByUserId:T(I({},r.peerConnectionStateMapByUserId),{[e.userSnippylyId]:this.peerConnectionStateMap[t]})}),r))})}catch(e){this.loggingService.catch("Error in HuddleComponent updatePeerConnectionStateMapByUserId:",e)}}toggleAudio(){try{this.huddleService.toggleLocalStreamAudio()}catch(e){this.loggingService.catch("Error in HuddleComponent toggleAudio:",e)}}toggleVideo(){try{this.huddleService.toggleLocalStreamVideo()}catch(e){this.loggingService.catch("Error in HuddleComponent toggleVideo:",e)}}toggleScreenSharing(){return Q(this,null,function*(){try{yield this.huddleService.toggleLocalScreenSharing()}catch(e){this.loggingService.catch("Error in HuddleComponent toggleScreenSharing:",e)}})}toggleHuddleOnCursor(e){try{this.huddleService.toggleHuddleOnCursorModeByAttendeeId(e?.userSnippylyId)}catch(t){this.loggingService.catch("Error in HuddleComponent toggleHuddleOnCursor:",t)}}dropCall(){try{this.huddleService.dropCall(),this.huddleService.removeLocalStream(),this.componentConfigSignal.update(e=>(e=T(I({},e),{huddleAttendees:[]}),e))}catch(e){this.loggingService.catch("Error in HuddleComponent dropCall:",e)}}copyUrl(){Os(window.location.href)}onDragStarted(e){try{let t=e.source.element.nativeElement;t&&(t.hasAttribute("fixed")||t.setAttribute("fixed","true"))}catch(t){this.loggingService.catch("Error in HuddleComponent onDragStarted:",t)}}onDragMoved(e){try{this.componentConfigSignal.update(p=>(p=T(I({},p),{isDragging:!0}),p));let t=e.source.element.nativeElement,r=e.event,a=r?.touches?.length?r.touches[0]?.clientX:r.clientX,s=r?.touches?.length?r.touches[0]?.clientY:r.clientY,c=document.elementsFromPoint(a,s);this.droppedInsideContainer=!1;for(let p=0;p<c.length;p++)if(c[p].id==="videoHuddleContainer"){this.droppedInsideContainer=!0;break}if(t){let p=t.getBoundingClientRect();t.style.setProperty("left",a-p?.width/2+"px","important"),t.style.setProperty("top",s-p?.height/2+"px","important")}}catch(t){this.loggingService.catch("Error in CommentPinPortalComponent onDragMoved: ",t)}}onDragEnded(e){try{this.componentConfigSignal.update(r=>(r=T(I({},r),{isDragging:!1}),r));let t=e.source.element.nativeElement;t&&this.droppedInsideContainer&&(t.removeAttribute("fixed"),t.style.removeProperty("transform"),this.droppedInsideContainer=!1)}catch(t){this.loggingService.catch("Error in HuddleComponent onDragEnded:",t)}}onViewportSizeChange(){try{this.remoteScreenSharingHuddleDrag&&this.remoteScreenSharingHuddleDrag.reset()}catch(e){this.loggingService.catch("Error in HuddleComponent onViewportSizeChange:",e)}}setHuddleInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Re.HUDDLE)}catch(e){this.loggingService.catch("Error in HuddleComponent setHuddleInstalledInAnalytics: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(fr),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-huddle"]],viewQuery:function(t,r){if(t&1&&nt(xJt,5),t&2){let a;Xe(a=Qe())&&(r.remoteScreenSharingHuddleDrag=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{_chat:[0,"chat","_chat"],_flockModeOnAvatarClick:[0,"flockModeOnAvatarClick","_flockModeOnAvatarClick"],_serverFallback:[0,"serverFallback","_serverFallback"]},standalone:!1,decls:1,vars:1,consts:[["remoteScreenSharingHuddleRef",""],["remoteScreenSharingHuddleDrag","cdkDrag"],["messagePanelTrigger","cdkOverlayOrigin"],["sidebarOverlay","cdkConnectedOverlay"],[4,"ngIf"],["id","videoHuddleContainer","class","video-huddle-container",3,"style",4,"ngIf"],["id","videoHuddleContainer",1,"video-huddle-container"],["cdkDrag","",3,"user","stream","audioState","videoState","toggleAudio","toggleVideo","cdkDragStarted","cdkDragMoved","cdkDragEnded",4,"ngIf"],["cdkDrag","",3,"toggleAudio","toggleVideo","cdkDragStarted","cdkDragMoved","cdkDragEnded","user","stream","audioState","videoState"],["ngFor","",3,"ngForOf","ngForTrackBy"],["cdkDrag","",3,"user","remoteVideoStream","audioState","videoState","isRemoteStream","toggleAudio","toggleVideo","toggleHuddleOnCursor","cdkDragStarted","cdkDragMoved","cdkDragEnded",4,"ngIf"],[3,"user","remoteAudioStream",4,"ngIf"],["cdkDrag","",3,"toggleAudio","toggleVideo","toggleHuddleOnCursor","cdkDragStarted","cdkDragMoved","cdkDragEnded","user","remoteVideoStream","audioState","videoState","isRemoteStream"],[3,"user","remoteAudioStream"],[4,"ngIf","ngIfElse"],["cdkDrag","",3,"toggleScreenSharing","stream"],["cdkDrag","",3,"stream","user","isRemoteStream","viewportSizeChange",4,"ngIf"],["cdkDrag","",3,"viewportSizeChange","stream","user","isRemoteStream"],["cdkOverlayOrigin",""],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayDisableClose","cdkConnectedOverlayPanelClass"]],template:function(t,r){t&1&&g(0,jJt,4,3,"ng-container",4),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,on,en,da,A0e,V0e,U0e,H0e],styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.icon-btn[_ngcontent-%COMP%]{border:1px solid #2d2d2d;border-radius:100%;width:calc((2.5rem + 0px) * var(--velt-base-rem-unit))!important;height:calc((2.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;align-items:center;justify-content:center;color:#2d2d2d;fill:#2d2d2d;cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover{background:#fff5}.icon-btn.background-red[_ngcontent-%COMP%]{background:red!important;border-color:red!important;color:#fff!important;fill:#fff!important}.icon-btn.background-royalblue[_ngcontent-%COMP%]{background:#4169e1!important;border-color:#4169e1!important}.icon-btn[_ngcontent-%COMP%]:before{content:""}.drop-call-btn[_ngcontent-%COMP%]{transform:rotate(135deg)!important} .video-huddle-container{position:fixed!important;z-index:2147483637!important;top:0!important;left:0!important;display:flex!important;flex-direction:column!important;max-height:100vh!important;overflow:auto;box-sizing:border-box;background-color:transparent;transition:background-color .2s} .video-huddle-container[highlight]{background-color:#a0a0a047;height:100vh!important;min-width:132px!important} .video-huddle-container:not(:empty){padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important} .video-huddle-container snippyly-video-huddle-user[fixed]{position:fixed!important;top:0!important;left:0!important;transform:none!important;z-index:1!important} .video-huddle-container .video-huddle-block{height:100%!important;width:100%!important;position:relative!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important} .video-huddle-container .video-huddle-block .video-player-container{height:100px!important;width:100px!important;transition:all .5s ease-in-out;border-radius:50%!important} .video-huddle-container .video-huddle-block video{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important} .video-huddle-container .video-huddle-block.speaking .video-player-container{transition:all .7s ease} .video-huddle-container .video-huddle-block .video-huddle-actions-panel{background:#000!important;color:#fff!important;padding:calc((.25rem + 0px) * var(--velt-base-rem-unit)) calc((.25rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;position:absolute!important;bottom:0!important;left:50%!important;transform:translate(-50%,50%)!important;display:none!important} .video-huddle-container .video-huddle-block.selected{margin-bottom:36px!important} .video-huddle-container .video-huddle-block.selected .video-player-container{width:180px!important;height:180px!important} .video-huddle-container .video-huddle-block.selected .video-huddle-actions-panel{display:flex!important;justify-content:space-between!important;align-items:center!important} .video-huddle-container .video-huddle-block.selected .video-huddle-actions-panel .video-huddle-action-button{margin:0 calc((.2rem + 0px) * var(--velt-base-rem-unit))!important;width:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:50%!important;cursor:pointer!important;box-sizing:content-box!important} .video-huddle-container .video-huddle-block.selected .video-huddle-actions-panel .video-huddle-action-button:first-child{margin-left:calc((.1rem + 0px) * var(--velt-base-rem-unit))!important} .video-huddle-container .video-huddle-block.selected .video-huddle-actions-panel .video-huddle-action-button:last-child{margin-right:calc((.1rem + 0px) * var(--velt-base-rem-unit))!important} .video-huddle-container .video-huddle-block.selected .video-huddle-actions-panel .video-huddle-action-button:hover{background-color:#353945!important} .video-huddle-container::-webkit-scrollbar{display:none!important;width:0!important;height:0!important} .video-huddle-container::-webkit-scrollbar{width:0!important;height:0!important} .video-huddle-container::-webkit-scrollbar-button{width:0!important;height:0!important}@keyframes _ngcontent-%COMP%_ripple{0%{box-shadow:0 0 #0000ff4d,0 0 0 1px #0000ff4d,0 0 0 3px #0000ff4d,0 0 0 5px #0000ff4d}to{box-shadow:0 0 #0000ff4d,0 0 0 4px #0000ff4d,0 0 0 20px #00f0,0 0 0 30px #00f0}}'],changeDetection:0});let i=o;return i})();var $Jt=i=>({componentConfigSignal:i}),HJt=(i,o)=>({condition:i,data:o});function zJt(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(){N(n);let t=l(3).ngIf,r=l();return F(r.initRecording(t.recorderModes.AUDIO))}),w(1,"app-recorder-audio-tool",8),b()}if(i&2){let n=l(4);x("data-testid",n.componentId+"-audio"),m(),d("componentConfigSignal",n.componentConfigSignal)("variant",n.variant)}}function GJt(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(){N(n);let t=l(3).ngIf,r=l();return F(r.initRecording(t.recorderModes.VIDEO))}),w(1,"app-recorder-video-tool",8),b()}if(i&2){let n=l(4);x("data-testid",n.componentId+"-video"),m(),d("componentConfigSignal",n.componentConfigSignal)("variant",n.variant)}}function WJt(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(){N(n);let t=l(5);return F(t.initRecording("screen"))}),w(1,"app-recorder-screen-tool",8),b()}if(i&2){let n=l(5);x("data-testid",n.componentId+"-screen"),m(),d("componentConfigSignal",n.componentConfigSignal)("variant",n.variant)}}function qJt(i,o){if(i&1&&g(0,WJt,2,3,"div",4),i&2){let n=l(3).ngIf;d("ngSwitchCase",n.recorderModes.SCREEN)}}function YJt(i,o){if(i&1&&(_(0,"div",9),w(1,"app-recorder-all-tool",8),b()),i&2){let n=l(4);x("data-testid",n.componentId+"-all"),m(),d("componentConfigSignal",n.componentConfigSignal)("variant",n.variant)}}function KJt(i,o){if(i&1&&(_(0,"div",3),g(1,zJt,2,3,"div",4)(2,GJt,2,3,"div",4)(3,qJt,1,1,"ng-template",5)(4,YJt,2,3,"div",6),b()),i&2){let n=l(2).ngIf,e=l();d("ngSwitch",e.type),x("data-testid",e.componentId),m(),d("ngSwitchCase",n.recorderModes.AUDIO),m(),d("ngSwitchCase",n.recorderModes.VIDEO),m(),d("ngIf",n.screenSharingSupported),m(),d("ngSwitchCase",n.recorderModes.ALL)}}function ZJt(i,o){if(i&1&&(f(0),g(1,KJt,5,6,"div",2),v()),i&2){let n=l().ngIf,e=l();m(),d("ngIf",e.user&&n)}}function XJt(i,o){if(i&1&&(f(0),g(1,ZJt,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,HJt,n.conditionSignal(),A(1,$Jt,n.componentConfigSignal)))}}var Xz=(()=>{let o=class o extends Je{set _type(e){e==="all"?(this.componentConfigSignal.update(t=>(t=T(I({},t),{types:["audio","video","screen"]}),t)),this.type=e):e?.split(",").length>1?(this.componentConfigSignal.update(t=>(t=T(I({},t),{types:e.split(",")?.map(r=>r?.trim())}),t)),this.type="all"):this.type=e}set _shadowDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{shadowDom:t}),r))}catch{}}set _recordingCountdown(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.componentConfigSignal.update(r=>(r=T(I({},r),{recordingCountdown:t}),r))}catch{}}set _retakeOnVideoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableRetakeOnVideoEditor():this.recorderService.disableRetakeOnVideoEditor()}catch{}}set _pictureInPicture(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.pipService.enablePictureInPicture():this.pipService.disablePictureInPicture()}catch{}}set _maxLength(e){try{let t;typeof e=="string"?t=parseInt(e,10):t=e,t&&t>0&&this.recorderService.setMaxRecordingLength(t)}catch{}}constructor(e,t,r,a,s,c,p,u,C,E){super(C,u,void 0,void 0,void 0,E,p),this.analyticsService=e,this.authService=t,this.docService=r,this.iamService=a,this.recorderService=s,this.pipService=c,this.loggingService=p,this.themeService=u,this.elementRef=C,this.dynamicDataService=E,this.type="video",this.customButtonAdded=!1,this.subscriptions=[],this.veltElement=!0,this.componentConfigSignal=De({buttonLabel:this.buttonLabel,recordingInProgress:!1,types:[],recorderModes:j.RecorderModes,initRecording:this.initRecording.bind(this),disabled:!1,screenSharingSupported:!!navigator?.mediaDevices?.getDisplayMedia,shadowDom:!0,darkMode:this.darkMode}),this.componentId="velt-recorder-button";try{this.loggingService.log("%c[WB] Creating COMPONENT RecorderButtonComponent","color: blue;"),this.subscriptions.push(super.onDarkModeChange().subscribe(D=>{this.componentConfigSignal.update(L=>(L=T(I({},L),{darkMode:D}),L))})),this.subscriptions.push(this.authService.getUser$().subscribe(D=>{this.user=D},D=>{this.loggingService.catch("Error in RecorderButtonComponent getUser$ subscription: ",D)})),this.subscriptions.push(this.recorderService.getRecorderStatus$().subscribe(D=>{this.componentConfigSignal.update(L=>(L=T(I({},L),{recordingInProgress:!!D}),L))},D=>{this.loggingService.catch("Error in RecorderButtonComponent getRecorderStatus$ subscription: ",D)})),this.subscriptions.push(this.iamService.getFeaturesAccessLevel$().subscribe(D=>{this.componentConfigSignal.update(L=>(L=T(I({},L),{disabled:!!D?.all?.disabled}),L))}))}catch(D){this.loggingService.catch("Error in RecorderButtonComponent constructor: ",D)}}ngOnInit(){this.setupA11yAttributes(),super.ngOnInit()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderButtonComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{this.loggingService.log("%c[WB] Calling RecorderButtonComponent FUNCTION: ngOnChanges","color: green;"),e&&(super.ngOnChanges(e),Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}))}catch(t){this.loggingService.catch("Error in RecorderButtonComponent ngOnChanges: ",t)}}initRecording(e){try{if(this.loggingService.log("%c[WB] Calling RecorderButtonComponent FUNCTION: initRecording","color: green;"),this.componentConfigSignal().disabled){this.loggingService.catch("Recording feature is disabled.");return}this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_TOOL_CLICKED,{toolType:this.customButtonAdded?`custom - ${this.type}`:`default - ${this.type}`,recorderType:e});let t=this.docService.getAdditionalDocumentIdFromElement(this.elementRef.nativeElement)??void 0;this.recorderService.initRecording(e,this.panelId||void 0,void 0,this.componentConfigSignal().darkMode,this.componentConfigSignal().shadowDom,void 0,t,this.componentConfigSignal().recordingCountdown)}catch(t){this.loggingService.catch("Error in RecorderButtonComponent initRecording: ",t)}}ngOnDestroy(){try{this.loggingService.log("%c[WB] Calling RecorderButtonComponent FUNCTION: ngOnDestroy","color: green;"),super.ngOnDestroy(),this.unsubscribe()}catch(e){this.loggingService.catch("Error in RecorderButtonComponent ondestroy: ",e)}}unsubscribe(){try{this.loggingService.log("%c[WB] Calling RecorderButtonComponent FUNCTION: unsubscribe","color: green;"),this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in RecorderButtonComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(st),h(fn),h(Sn),h(Ua),h(y),h(qe),h(R),h(S))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-button"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{_type:[0,"type","_type"],panelId:"panelId",buttonLabel:"buttonLabel",variant:"variant",_shadowDom:[0,"shadowDom","_shadowDom"],_recordingCountdown:[0,"recordingCountdown","_recordingCountdown"],_retakeOnVideoEditor:[0,"retakeOnVideoEditor","_retakeOnVideoEditor"],_pictureInPicture:[0,"pictureInPicture","_pictureInPicture"],_maxLength:[0,"maxLength","_maxLength"]},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-recorder-tool","role","toolbar","aria-label","Recording options",3,"ngSwitch",4,"ngIf"],["role","toolbar","aria-label","Recording options",1,"velt-recorder-tool",3,"ngSwitch"],["role","presentation",3,"click",4,"ngSwitchCase"],[3,"ngIf"],["role","presentation",4,"ngSwitchCase"],["role","presentation",3,"click"],[3,"componentConfigSignal","variant"],["role","presentation"]],template:function(t,r){t&1&&g(0,XJt,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Gi,to,AC,MC,PC,OC,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{display:inline-flex;--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[_nghost-%COMP%]:empty{display:none}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}"],changeDetection:0});let i=o;return i})();var QJt=["videoRef"];function JJt(i,o){if(i&1&&w(0,"source",10),i&2){let n=l();d("src",!(n.annotation==null||n.annotation.attachment==null)&&n.annotation.attachment.thumbnail?n.annotation==null||n.annotation.attachment==null?null:n.annotation.attachment.url:(n.annotation==null||n.annotation.attachment==null?null:n.annotation.attachment.url)+"#t=0.001",un)}}function een(i,o){if(i&1&&w(0,"source",12),i&2){let n=o.$implicit;d("src",n==null?null:n.url,un)("type",(n==null?null:n.mimeType)||"video/mp4")}}function ten(i,o){if(i&1&&(g(0,een,1,2,"source",11),P(1,"rearrangeMediaSource")),i&2){let n=l();d("ngForOf",M(1,2,n.annotation==null?null:n.annotation.attachments))("ngForTrackBy",n.trackByAttachmentId)}}function nen(i,o){if(i&1){let n=Y();_(0,"div",13)(1,"div",14)(2,"snippyly-subtitles",15,1),G("subtitlesButtonClick",function(){N(n);let t=l();return F(t.onSubtitlesButtonClick())}),b()()()}if(i&2){let n,e=de(3),t=l(),r=de(3);ge("hide",(e==null||(n=e.componentConfigSignal())==null?null:n.highlightedTextIndex)<0),m(2),d("transcription",t.annotation==null?null:t.annotation.transcription)("timeToRead",(r==null?null:r.currentTime)||0)("mode","embed")}}function ien(i,o){if(i&1){let n=Y();_(0,"input",28),G("input",function(t){N(n);let r=l(2);return F(r.onDurationChange(t))}),b()}if(i&2){let n=l(2),e=de(3);d("value",(e==null?null:e.currentTime)*1e3/((n.annotation==null||n.annotation.recordedTime==null?null:n.annotation.recordedTime.duration)||0))}}function oen(i,o){if(i&1){let n=Y();le(),_(0,"svg",29),G("click",function(){N(n);let t=l(2);return F(t.toggleVideo())}),w(1,"path",30),b()}}function ren(i,o){if(i&1){let n=Y();le(),_(0,"svg",31),G("click",function(){N(n);let t=l(2);return F(t.toggleVideo())}),w(1,"path",32)(2,"path",33),b()}}function aen(i,o){i&1&&(_(0,"span",38),te(1),P(2,"translate"),b()),i&2&&(m(),Ce(" ",M(2,1,"Subtitles not available")," "))}function sen(i,o){if(i&1){let n=Y();_(0,"div",34),g(1,aen,3,3,"span",35),le(),_(2,"svg",36),G("click",function(){N(n);let t=l(2);return F(!(t.annotation==null||t.annotation.transcription==null)&&t.annotation.transcription.transcriptedText?t.onSubtitlesButtonClick(!0):null)}),w(3,"path",37),b()()}if(i&2){let n=l(2);ge("disabled",!(!(n.annotation==null||n.annotation.transcription==null)&&n.annotation.transcription.transcriptedText)),m(),d("ngIf",!(!(n.annotation==null||n.annotation.transcription==null)&&n.annotation.transcription.transcriptedText))}}function len(i,o){i&1&&(_(0,"span",38),te(1),P(2,"translate"),b()),i&2&&(m(),Ce(" ",M(2,1,"Transcription not available"),""))}function cen(i,o){if(i&1){let n=Y();_(0,"div",39),G("click",function(){N(n);let t=l(2);return F(!(t.annotation==null||t.annotation.transcription==null)&&t.annotation.transcription.transcriptedText?t.onTranscriptionButtonClick(!0):null)}),g(1,len,3,3,"span",35),le(),_(2,"svg",40),w(3,"path",41),b()()}if(i&2){let n=l(2);ge("disabled",!(!(n.annotation==null||n.annotation.transcription==null)&&n.annotation.transcription.transcriptedText)),m(),d("ngIf",!(!(n.annotation==null||n.annotation.transcription==null)&&n.annotation.transcription.transcriptedText))}}function den(i,o){if(i&1){let n=Y();_(0,"snippyly-transcription",42),G("transcriptionButtonClick",function(){N(n);let t=l(2);return F(t.onTranscriptionButtonClick())})("transcriptionSummaryCopy",function(){N(n);let t=l(2);return F(t.onTranscriptionSummaryCopy())})("seekTo",function(t){N(n);let r=l(2),a=de(3);return F(r.onSeekToVideo(t,a))})("transcriptionPanelDragged",function(){N(n);let t=l(2);return F(t.onTranscriptionPanelDragged())}),b()}if(i&2){let n=l(2),e=de(3);d("transcription",n.annotation==null?null:n.annotation.transcription)("timeToRead",(e==null?null:e.currentTime)||0)}}function men(i,o){if(i&1){let n=Y();le(),_(0,"svg",43),G("click",function(){N(n);let t=l(2);return F(t.onDelete())}),w(1,"path",44)(2,"path",45)(3,"path",46)(4,"path",47),b()}}function pen(i,o){if(i&1&&(_(0,"div",16)(1,"div",17),g(2,ien,1,1,"input",18),b(),_(3,"div",19)(4,"div",20),g(5,oen,2,0,"svg",21)(6,ren,3,0,"svg",22),_(7,"span"),te(8),b()(),_(9,"div",23),g(10,sen,4,3,"div",24)(11,cen,4,3,"div",25)(12,den,1,2,"snippyly-transcription",26)(13,men,5,0,"svg",27),b()()()),i&2){let n=l();m(2),d("ngIf",n.annotation==null||n.annotation.recordedTime==null?null:n.annotation.recordedTime.duration),m(3),d("ngIf",!n.playing),m(),d("ngIf",n.playing),m(2),Ge(n.currentTime||(n.annotation==null||n.annotation.recordedTime==null?null:n.annotation.recordedTime.display)||"00:00"),m(2),d("ngIf",(n.annotation==null?null:n.annotation.transcription)&&n.showSubtitlesButton),m(),d("ngIf",(n.annotation==null?null:n.annotation.transcription)&&n.transcriptionMode==="embed"),m(),d("ngIf",(n.annotation==null?null:n.annotation.transcription)&&n.transcriptionMode==="floating"&&n.showTranscriptionButton),m(),d("ngIf",n.showDeleteButton)}}function gen(i,o){if(i&1){let n=Y();_(0,"snippyly-transcription",50),G("seekTo",function(t){N(n);let r=l(2),a=de(3);return F(r.onSeekToVideo(t,a))})("close",function(){N(n);let t=l(2);return F(t.toggleTranscription())})("transcriptionSummaryCopy",function(){N(n);let t=l(2);return F(t.onTranscriptionSummaryCopy())})("transcriptionPanelDragged",function(){N(n);let t=l(2);return F(t.onTranscriptionPanelDragged())}),b()}if(i&2){let n=l(2),e=de(3);d("transcription",n.annotation==null?null:n.annotation.transcription)("timeToRead",(e==null?null:e.currentTime)||0)("mode",n.transcriptionMode)("visible",!0)}}function uen(i,o){if(i&1){let n=Y();_(0,"div",48),G("click",function(t){return N(n),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){return N(n),F(t.stopPropagation())}),g(1,gen,1,4,"snippyly-transcription",49),b()}if(i&2){let n=l();m(),d("ngIf",(n.annotation==null?null:n.annotation.transcription)&&n.showTranscriptionButton)}}var z0e=(()=>{let o=class o{constructor(e,t){this.analyticsService=e,this.loggingService=t,this.showControls=!0,this.showSubtitlesButton=!0,this.showTranscriptionButton=!0,this.transcriptionMode="floating",this.play=new Pe,this.pause=new Pe,this.delete=new Pe,this.transcriptionButtonClick=new Pe,this.transcriptionSummaryCopy=new Pe,this.subtitlesButtonClick=new Pe,this.transcriptionTimestampClick=new Pe,this.transcriptionPanelDragged=new Pe,this.playing=!1,this.currentTime="",this.showSubtitles=!1,this.transcriptionVisible=!1,this.veltElement=!0}ngOnInit(){}trackByAttachmentId(e,t){return t?.attachmentId}toggleVideo(){try{if(this.videoRef?.nativeElement){let e=this.videoRef?.nativeElement;e&&(e.duration>0&&!e.paused?(e.pause(),this.playing=!1,this.pause.emit()):(e.play(),this.playing=!0,this.play.emit()))}}catch(e){this.loggingService.catch("Error in VideoPlayerComponent toggleVideo: ",e)}}toggleSubtitles(){try{this.showSubtitles=!this.showSubtitles}catch(e){this.loggingService.catch("Error in VideoPlayerComponent toggleSubtitles: ",e)}}toggleTranscription(){try{this.transcriptionVisible=!this.transcriptionVisible}catch(e){this.loggingService.catch("Error in VideoPlayerComponent toggleTranscription: ",e)}}onTranscriptionButtonClick(e){try{this.transcriptionButtonClick.emit(),e&&this.toggleTranscription()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionButtonClick: ",t)}}onTranscriptionSummaryCopy(){try{this.transcriptionSummaryCopy.emit()}catch(e){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionSummaryCopy: ",e)}}onSubtitlesButtonClick(e){try{this.subtitlesButtonClick.emit(),e&&this.toggleSubtitles()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onSubtitlesButtonClick: ",t)}}onDurationChange(e){try{e?.target?.value>=0&&this.videoRef&&(this.videoRef.nativeElement.currentTime=e.target.value*(this.annotation?.recordedTime?.duration||0)/1e3),this.playing||this.toggleVideo()}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onDurationChange: ",t)}}timeUpdate(e){try{this.currentTime=this.formatSecondsAsTime(e)}catch(t){this.loggingService.catch("Error in VideoPlayerComponent timeUpdate: ",t)}}formatSecondsAsTime(e){try{let t=Math.floor(e/3600),r=Math.floor((e-t*3600)/60),a=Math.floor(e-t*3600-r*60);return t&&t<10&&(t="0"+t),r<10&&(r="0"+r),a<10&&(a="0"+a),(t?t+":":"")+r+":"+a}catch(t){return this.loggingService.catch("Error in VideoPlayerComponent formatSecondsAsTime: ",t),""}}onSeekToVideo(e,t){try{t&&(t.currentTime=e),this.playing||this.toggleVideo(),this.onTranscriptionTimestampClick(e)}catch(r){this.loggingService.catch("Error in VideoPlayerComponent onSeekToVideo: ",r)}}onTranscriptionTimestampClick(e){try{this.transcriptionTimestampClick.emit(e)}catch(t){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionTimestampClick: ",t)}}onTranscriptionPanelDragged(){try{this.transcriptionPanelDragged.emit()}catch(e){this.loggingService.catch("Error in VideoPlayerComponent onTranscriptionPanelDragged: ",e)}}onDelete(){try{this.delete?.emit()}catch(e){this.loggingService.catch("Error in VideoPlayerComponent onDelete: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-video-player"]],viewQuery:function(t,r){if(t&1&&nt(QJt,5),t&2){let a;Xe(a=Qe())&&(r.videoRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",showControls:"showControls",showSubtitlesButton:"showSubtitlesButton",showTranscriptionButton:"showTranscriptionButton",showDeleteButton:"showDeleteButton",transcriptionMode:"transcriptionMode"},outputs:{play:"play",pause:"pause",delete:"delete",transcriptionButtonClick:"transcriptionButtonClick",transcriptionSummaryCopy:"transcriptionSummaryCopy",subtitlesButtonClick:"subtitlesButtonClick",transcriptionTimestampClick:"transcriptionTimestampClick",transcriptionPanelDragged:"transcriptionPanelDragged"},standalone:!1,decls:9,vars:8,consts:[["videoRef",""],["subtitlesRef",""],[1,"s-video-player-container"],[1,"s-video-player",3,"click","pointerdown","pointerup"],["playsinline","",3,"timeupdate","pointerdown","poster"],["type","video/mp4",3,"src",4,"ngIf"],[3,"ngIf"],["class","s-video-subtitles-wrap",3,"hide",4,"ngIf"],["class","s-video-controls-wrap",4,"ngIf"],["class","s-video-transcription",3,"click","pointerdown","pointerup",4,"ngIf"],["type","video/mp4",3,"src"],[3,"src","type",4,"ngFor","ngForOf","ngForTrackBy"],[3,"src","type"],[1,"s-video-subtitles-wrap"],[1,"subtitles"],[3,"subtitlesButtonClick","transcription","timeToRead","mode"],[1,"s-video-controls-wrap"],[1,"s-video-progress-bar"],["type","range","min","0","max","1","step","0.01",3,"value","input",4,"ngIf"],[1,"s-video-controls"],[1,"s-video-controls-left"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],[1,"s-video-controls-right"],["class","s-video-subtitles-btn s-tooltip",3,"disabled",4,"ngIf"],["class","s-video-transcription-btn s-tooltip",3,"disabled","click",4,"ngIf"],[3,"transcription","timeToRead","transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged",4,"ngIf"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg","class","delete-btn",3,"click",4,"ngIf"],["type","range","min","0","max","1","step","0.01",3,"input","value"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M3.08337 3.65485C3.08337 1.69607 5.23378 0.498172 6.89926 1.52918L17.1496 7.87464C18.7284 8.852 18.7284 11.1486 17.1496 12.126L6.89926 18.4714C5.23378 19.5024 3.08337 18.3045 3.08337 16.3458V3.65485Z","fill","white"],["width","20","height","20","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M1.33203 2.66536C1.33203 1.92899 1.92898 1.33203 2.66536 1.33203H5.33203C6.06841 1.33203 6.66536 1.92898 6.66536 2.66536V13.332C6.66536 14.0684 6.06841 14.6654 5.33203 14.6654H2.66536C1.92898 14.6654 1.33203 14.0684 1.33203 13.332V2.66536Z","fill","white"],["d","M9.33203 2.66536C9.33203 1.92899 9.92899 1.33203 10.6654 1.33203H13.332C14.0684 1.33203 14.6654 1.92898 14.6654 2.66536V13.332C14.6654 14.0684 14.0684 14.6654 13.332 14.6654H10.6654C9.92899 14.6654 9.33203 14.0684 9.33203 13.332V2.66536Z","fill","white"],[1,"s-video-subtitles-btn","s-tooltip"],["class","s-tooltiptext top",4,"ngIf"],["width","20","height","21","viewBox","0 0 20 21","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M11.47 7.62875C11.893 7.41764 12.3718 7.34543 12.8382 7.42242C13.3046 7.49941 13.7348 7.72166 14.0675 8.0575C14.1849 8.17486 14.2508 8.33403 14.2508 8.5C14.2508 8.66597 14.1849 8.82514 14.0675 8.9425C13.9501 9.05986 13.791 9.12579 13.625 9.12579C13.459 9.12579 13.2999 9.05986 13.1825 8.9425C13.0358 8.79219 12.8452 8.69223 12.6382 8.65697C12.4311 8.62171 12.2182 8.65297 12.03 8.74625C11.6712 8.92625 11.25 9.41875 11.25 10.5C11.25 11.5813 11.6712 12.075 12.03 12.2537C12.2182 12.347 12.4311 12.3783 12.6382 12.343C12.8452 12.3078 13.0358 12.2078 13.1825 12.0575C13.2999 11.9401 13.459 11.8742 13.625 11.8742C13.791 11.8742 13.9501 11.9401 14.0675 12.0575C14.1849 12.1749 14.2508 12.334 14.2508 12.5C14.2508 12.666 14.1849 12.8251 14.0675 12.9425C13.38 13.63 12.34 13.8062 11.47 13.3713C10.5787 12.9262 10 11.9187 10 10.5C10 9.08125 10.5787 8.075 11.47 7.62875ZM9.0675 8.0575C8.73492 7.72149 8.3047 7.49913 7.83824 7.42213C7.37178 7.34514 6.89292 7.41745 6.47 7.62875C5.57875 8.07375 5 9.08125 5 10.5C5 11.9187 5.57875 12.925 6.47 13.3713C6.89292 13.5826 7.37178 13.6549 7.83824 13.5779C8.3047 13.5009 8.73492 13.2785 9.0675 12.9425C9.12561 12.8844 9.1717 12.8154 9.20315 12.7395C9.2346 12.6636 9.25079 12.5822 9.25079 12.5C9.25079 12.4178 9.2346 12.3364 9.20315 12.2605C9.1717 12.1846 9.12561 12.1156 9.0675 12.0575C9.00939 11.9994 8.9404 11.9533 8.86448 11.9218C8.78855 11.8904 8.70718 11.8742 8.625 11.8742C8.54282 11.8742 8.46144 11.8904 8.38552 11.9218C8.3096 11.9533 8.24061 11.9994 8.1825 12.0575C8.03568 12.2076 7.84513 12.3075 7.63811 12.3427C7.4311 12.378 7.21823 12.3468 7.03 12.2537C6.67125 12.0738 6.25 11.5813 6.25 10.5C6.25 9.41875 6.67125 8.925 7.03 8.74625C7.21823 8.65316 7.4311 8.62201 7.63811 8.65726C7.84513 8.69251 8.03568 8.79236 8.1825 8.9425C8.29986 9.05986 8.45903 9.12579 8.625 9.12579C8.79097 9.12579 8.95014 9.05986 9.0675 8.9425C9.18486 8.82514 9.25079 8.66597 9.25079 8.5C9.25079 8.33403 9.18486 8.17486 9.0675 8.0575ZM1.25 7.375C1.25 6.5462 1.57924 5.75134 2.16529 5.16529C2.75134 4.57924 3.5462 4.25 4.375 4.25H15.625C16.4538 4.25 17.2487 4.57924 17.8347 5.16529C18.4208 5.75134 18.75 6.5462 18.75 7.375V13.625C18.75 14.4538 18.4208 15.2487 17.8347 15.8347C17.2487 16.4208 16.4538 16.75 15.625 16.75H4.375C3.5462 16.75 2.75134 16.4208 2.16529 15.8347C1.57924 15.2487 1.25 14.4538 1.25 13.625V7.375ZM4.375 5.5C3.87772 5.5 3.40081 5.69754 3.04917 6.04917C2.69754 6.40081 2.5 6.87772 2.5 7.375V13.625C2.5 14.1223 2.69754 14.5992 3.04917 14.9508C3.40081 15.3025 3.87772 15.5 4.375 15.5H15.625C16.1223 15.5 16.5992 15.3025 16.9508 14.9508C17.3025 14.5992 17.5 14.1223 17.5 13.625V7.375C17.5 6.87772 17.3025 6.40081 16.9508 6.04917C16.5992 5.69754 16.1223 5.5 15.625 5.5H4.375Z","fill","white"],[1,"s-tooltiptext","top"],[1,"s-video-transcription-btn","s-tooltip",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M7.49997 10.8332C9.34164 10.8332 10.8333 9.3415 10.8333 7.49984C10.8333 5.65817 9.34164 4.1665 7.49997 4.1665C5.65831 4.1665 4.16664 5.65817 4.16664 7.49984C4.16664 9.3415 5.65831 10.8332 7.49997 10.8332ZM7.49997 5.83317C8.41664 5.83317 9.16664 6.58317 9.16664 7.49984C9.16664 8.4165 8.41664 9.1665 7.49997 9.1665C6.58331 9.1665 5.83331 8.4165 5.83331 7.49984C5.83331 6.58317 6.58331 5.83317 7.49997 5.83317ZM12.825 12.9665C11.425 12.2498 9.60831 11.6665 7.49997 11.6665C5.39164 11.6665 3.57497 12.2498 2.17497 12.9665C1.76835 13.1759 1.42772 13.4939 1.19089 13.8852C0.954055 14.2765 0.830281 14.7258 0.833306 15.1832V17.4998H14.1666V15.1832C14.1666 14.2498 13.6583 13.3915 12.825 12.9665ZM12.5 15.8332H2.49997V15.1832C2.49997 14.8665 2.66664 14.5832 2.93331 14.4498C3.92497 13.9415 5.52497 13.3332 7.49997 13.3332C9.47497 13.3332 11.075 13.9415 12.0666 14.4498C12.3333 14.5832 12.5 14.8665 12.5 15.1832V15.8332ZM14.9416 13.3332L16.3 11.9748C13.9916 9.45817 13.9916 5.67484 16.3 3.02484L14.9416 1.6665C11.6916 4.90817 11.6833 9.95817 14.9416 13.3332ZM19.1 9.12484C18.7587 8.65332 18.5749 8.08609 18.5749 7.504C18.5749 6.92192 18.7587 6.35469 19.1 5.88317L17.7 4.47484C16.0166 6.15817 16.0166 8.69984 17.7 10.5332L19.1 9.12484Z","fill","white"],[3,"transcriptionButtonClick","transcriptionSummaryCopy","seekTo","transcriptionPanelDragged","transcription","timeToRead"],["width","20","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",1,"delete-btn",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.28702 4.66602V12.2851C4.28702 13.1266 5.01189 13.8089 5.90606 13.8089H10.7632C11.6574 13.8089 12.3823 13.1266 12.3823 12.2851V4.66602H14.0013V12.2851C14.0013 13.9682 12.5516 15.3327 10.7632 15.3327H5.90606C4.11771 15.3327 2.66797 13.9682 2.66797 12.2851V4.66602H4.28702Z","fill","#FF7162"],["d","M6.77778 6.66602C6.34822 6.66602 6 7.06398 6 7.5549V11.1105C6 11.6014 6.34822 11.9993 6.77778 11.9993C7.20733 11.9993 7.55556 11.6014 7.55556 11.1105V7.5549C7.55556 7.06398 7.20733 6.66602 6.77778 6.66602Z","fill","#FF7162"],["d","M9.88889 6.66602C9.45933 6.66602 9.11111 7.06398 9.11111 7.5549V11.1105C9.11111 11.6014 9.45933 11.9993 9.88889 11.9993C10.3184 11.9993 10.6667 11.6014 10.6667 11.1105V7.5549C10.6667 7.06398 10.3184 6.66602 9.88889 6.66602Z","fill","#FF7162"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.16667 3.11111V2.33333C5.16667 1.04467 6.22999 0 7.54167 0H9.125C10.4367 0 11.5 1.04467 11.5 2.33333V3.11111H13.875C14.3122 3.11111 14.6667 3.45933 14.6667 3.88889C14.6667 4.31844 14.3122 4.66667 13.875 4.66667H2.79167C2.35444 4.66667 2 4.31844 2 3.88889C2 3.45933 2.35444 3.11111 2.79167 3.11111H5.16667ZM6.75 2.33333C6.75 1.90378 7.10444 1.55556 7.54167 1.55556H9.125C9.56223 1.55556 9.91667 1.90378 9.91667 2.33333V3.11111H6.75V2.33333Z","fill","#FF7162"],[1,"s-video-transcription",3,"click","pointerdown","pointerup"],[3,"transcription","timeToRead","mode","visible","seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged",4,"ngIf"],[3,"seekTo","close","transcriptionSummaryCopy","transcriptionPanelDragged","transcription","timeToRead","mode","visible"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",2)(1,"div",3),G("click",function(c){return N(a),F(c.stopPropagation())})("pointerdown",function(c){return N(a),F(c.stopPropagation())})("pointerup",function(c){return N(a),F(c.stopPropagation())}),_(2,"video",4,0),G("timeupdate",function(){N(a);let c=de(3);return F(r.timeUpdate(c==null?null:c.currentTime))})("pointerdown",function(){return N(a),F(r.toggleVideo())}),g(4,JJt,1,1,"source",5)(5,ten,2,4,"ng-template",6),b(),g(6,nen,4,5,"div",7)(7,pen,14,8,"div",8),b(),g(8,uen,2,1,"div",9),b()}t&2&&(m(2),ge("flip",(r.annotation==null?null:r.annotation.recordingType)==="video"),d("poster",(r.annotation==null||r.annotation.attachment==null?null:r.annotation.attachment.thumbnail)||(!(r.annotation==null||r.annotation.attachments==null)&&r.annotation.attachments.length?r.annotation==null||r.annotation.attachments[0]==null?null:r.annotation.attachments[0].thumbnail:""),un),m(2),d("ngIf",!(!(r.annotation==null||r.annotation.attachments==null)&&r.annotation.attachments.length)&&(r.annotation==null?null:r.annotation.attachment)),m(),d("ngIf",r.annotation==null||r.annotation.attachments==null?null:r.annotation.attachments.length),m(),d("ngIf",r.showSubtitles),m(),d("ngIf",r.showControls),m(),d("ngIf",r.transcriptionVisible))},dependencies:[vt,X,d_,Th,Sg,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#fff!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-video-player[_ngcontent-%COMP%]{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;background-color:#d3d3d3!important}.s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;width:100%!important;height:100%!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important}.controls-wrap[_ngcontent-%COMP%]{position:absolute!important;bottom:0!important;display:flex!important;justify-content:space-between!important;align-items:center!important;width:80%!important;padding:1em!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#fff!important}.controls[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.line[_ngcontent-%COMP%]{position:absolute!important;bottom:100%!important;width:90%!important;display:flex!important;align-items:center!important}.line[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important}.s-video-subtitles-wrap[_ngcontent-%COMP%]{position:absolute;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;max-width:90%!important;bottom:10%!important;left:50%!important;transform:translate(-50%)!important;transition:bottom .3s!important}.s-video-subtitles-wrap[_ngcontent-%COMP%] .subtitles[_ngcontent-%COMP%]{background:#141416!important;border-radius:calc((.6rem + 0px) * var(--velt-base-rem-unit))!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;text-align:center!important}.s-video-subtitles-wrap.hide[_ngcontent-%COMP%]{display:none!important}svg[_ngcontent-%COMP%]{cursor:pointer!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-subtitles-wrap[_ngcontent-%COMP%]{bottom:calc(10% + 80px)!important}.s-video-player[_ngcontent-%COMP%]:hover .s-video-controls-wrap[_ngcontent-%COMP%]{opacity:1!important}.s-video-controls-wrap[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;position:absolute!important;z-index:10!important;bottom:0!important;width:100%!important;border-bottom-left-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-bottom-right-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;overflow:hidden!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;opacity:0!important;transition:opacity .3s!important;background:#141416!important;background:linear-gradient(0deg,#141416,#37373700)!important;padding-top:calc((5rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-progress-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important;accent-color:#625DF5!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-left[_ngcontent-%COMP%]{display:flex!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;align-items:center!important}.s-video-controls-wrap[_ngcontent-%COMP%] .s-video-controls[_ngcontent-%COMP%] .s-video-controls-right[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-video-player-container[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box!important;display:flex!important;gap:2rem!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%]{flex:1 1 100%!important;height:100%!important;background-color:#141416!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-player[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%!important}.s-video-player-container[_ngcontent-%COMP%] .s-video-transcription[_ngcontent-%COMP%]{flex:0 0 auto!important;width:calc((25rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;height:100%!important;overflow:hidden!important}.s-video-subtitles-btn[_ngcontent-%COMP%], .s-video-transcription-btn[_ngcontent-%COMP%]{display:flex!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{cursor:not-allowed!important}.s-video-subtitles-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%], .s-video-transcription-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#80808a!important}"],changeDetection:0});let i=o;return i})();var hen=["videoOverlay"],fen=["editorOverlay"],G0e=()=>["snippyly-overlay-panel","snippyly-video-overlay-panel","velt-overlay-panel"];function ven(i,o){if(i&1&&(_(0,"div",7),w(1,"app-recorder-player-video-container",8)(2,"app-recorder-player-audio-container",9),b()),i&2){let n=l(2);x("data-testid",n.componentId),m(),d("componentConfigSignal",n.componentConfigSignal),m(),d("componentConfigSignal",n.componentConfigSignal)}}function Cen(i,o){if(i&1){let n=Y();_(0,"div",10),P(1,"translate"),G("click",function(t){N(n);let r=l().ngIf;return r.showVideoInFullScreen=!1,F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())}),_(2,"velt-recorder-player-expanded",11),P(3,"translate"),G("play",function(){N(n);let t=l(2);return F(t.onPlay())})("pause",function(){N(n);let t=l(2);return F(t.onPause())})("transcriptionButtonClick",function(){N(n);let t=l(2);return F(t.onTranscriptionButtonClick())})("subtitlesButtonClick",function(){N(n);let t=l(2);return F(t.onSubtitlesButtonClick())})("transcriptionSummaryCopy",function(){N(n);let t=l(2);return F(t.onTranscriptionSummaryCopy())})("transcriptionTimestampClick",function(){N(n);let t=l(2);return F(t.onTranscriptionTimestampClick())})("onMinimize",function(){N(n);let t=l(2);return F(t.onMinimize())})("copyLink",function(){N(n);let t=l(2);return F(t.copyLink())}),b()()}if(i&2){let n=l().ngIf,e=l();x("aria-label",M(1,9,"Fullscreen video player"))("aria-modal",!0)("data-testid",e.componentId+"-overlay-container"),m(2),d("annotation",n.annotation)("transcriptionMode","embed")("playVideoInFullScreen",n.playVideoInFullScreen)("recordingTranscriptionEnabled",n.recordingTranscriptionEnabled)("darkMode",e.darkMode),x("aria-label",M(3,11,"Expanded video player"))}}function _en(i,o){if(i&1){let n=Y();_(0,"div",12),G("click",function(t){return N(n),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())}),_(1,"velt-video-editor-player-internal",13),G("applyEdit",function(t){N(n);let r=l(2);return F(r.onApplyEdit(t))})("closeEdit",function(){N(n);let t=l(2);return F(t.onCloseEdit())}),b()()}if(i&2){let n=l().ngIf,e=l();x("aria-modal",!0)("data-testid",e.componentId+"-overlay-container"),m(),d("annotation",n.annotation)("darkMode",e.darkMode)("isLoading",n.isLoading)("recordingType",n.recordingType)("recorderModes",n.recorderModes)}}function yen(i,o){if(i&1&&(f(0),g(1,ven,3,3,"div",4),w(2,"div",5,0),g(4,Cen,4,13,"ng-template",6,1,Te)(6,_en,2,7,"ng-template",6,2,Te),v()),i&2){let n=o.ngIf,e=de(3),t=de(5),r=de(7),a=l();m(),d("ngIf",n.annotation==null?null:n.annotation.attachments),m(),x("data-testid",a.componentId+"-overlay-trigger"),m(2),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",n.showVideoInFullScreen)("cdkConnectedOverlayPanelClass",gt(16,G0e))("cdkConnectedOverlayDisableClose",!0)("snippylyOverlay",t)("snippylyOverlayZIndex",2147483627)("cdkConnectedOverlayScrollStrategy",a.scrollBlockStrategy),m(2),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",n.showVideoEditor)("cdkConnectedOverlayPanelClass",gt(17,G0e))("cdkConnectedOverlayDisableClose",!0)("snippylyOverlay",r)("snippylyOverlayZIndex",2147483627)("cdkConnectedOverlayScrollStrategy",a.scrollBlockStrategy)}}var Ym=(()=>{let o=class o extends Je{set _videoEditor(e){try{e!==void 0&&this.componentConfigSignal.update(t=>(t=T(I({},t),{videoEditorEnabled:e}),t))}catch{}}setVideoContainerHovered(e){this.componentConfigSignal.update(t=>(t=T(I({},t),{videoContainerHovered:e}),t))}onSliderGrab(e){e.stopPropagation();let t=this.componentConfigSignal().videoRef;if(t?.nativeElement){let r=t.nativeElement,a=!r.paused;this.componentConfigSignal.update(s=>(s=T(I({},s),{wasPlayingBeforeDrag:a}),s)),r.pause()}}onSliderRelease(e){e.stopPropagation();let t=this.componentConfigSignal().videoRef;if(t?.nativeElement){let r=t.nativeElement;this.componentConfigSignal().wasPlayingBeforeDrag&&r.play(),this.componentConfigSignal.update(s=>(s=T(I({},s),{wasPlayingBeforeDrag:void 0}),s))}}onSliderDrag(e){e.stopPropagation();let t=e.target;requestAnimationFrame(()=>{this.componentConfigSignal.update(r=>{if(r=T(I({},r),{currentTimeValue:Number(t.value)}),r.videoRef?.nativeElement){let a=r.videoRef.nativeElement;a.currentTime=r.currentTimeValue,Math.abs(a.duration-r.currentTimeValue)<.1&&(r.currentTimeValue=a.duration)}return r})})}constructor(e,t,r,a,s,c,p,u,C,E,D){super(p,c),this.analyticsService=e,this.authService=t,this.recorderAnnotationService=r,this.loggingService=a,this.dialog=s,this.themeService=c,this.elementRef=p,this.domService=u,this.recorderService=C,this.overlayService=E,this.actionsService=D,this.mode="floating",this.recordingType="audio",this.variant="default",this.numberOfBars=void 0,this.loading=!1,this.dragging=!1,this.onDelete=new Pe,this.recorderPinSelected=!1,this.showSummary=!0,this.collapseMode=!1,this.recordingStopped=!1,this.shadowDom=!0,this.isEditMode=!1,this.playVideoInFullScreen=void 0,this.copyLinkTooltip="Copy Link",this.subscriptions=[],this.veltElement=!0,this.componentConfigSignal=De({recordingTranscriptionEnabled:!0,annotation:this.annotation,recordingType:this.recordingType,recorderInitData:this.recorderInitData,attachment:this.attachment,user:this.user,dragging:this.dragging,recorderPinSelected:this.recorderPinSelected,sourceFeature:this.sourceFeature,mode:this.mode,numberOfBars:this.numberOfBars,videoPosterDefaultImage:j.VIDEO_POSTER_DEFAULT_IMAGE,timeUpdate:this.timeUpdate.bind(this),trackByAttachmentId:this.trackByAttachmentId.bind(this),toggleVideo:this.toggleVideo.bind(this),totalTimeValue:0,currentTimeValue:0,showSubtitles:!1,manuallyMinimized:!1,onSliderGrab:this.onSliderGrab.bind(this),onSliderRelease:this.onSliderRelease.bind(this),onSliderDrag:this.onSliderDrag.bind(this),onSubtitlesButtonClick:this.onSubtitlesButtonClick.bind(this),onSubtitlesPanelDragged:this.onSubtitlesPanelDragged.bind(this),onSeekToVideo:this.onSeekToVideo.bind(this),onSeekToAudio:this.onSeekToAudio.bind(this),onTranscriptionButtonClick:this.onTranscriptionButtonClick.bind(this),onTranscriptionSummaryCopy:this.onTranscriptionSummaryCopy.bind(this),onTranscriptionPanelDragged:this.onTranscriptionPanelDragged.bind(this),copyLink:this.copyLink.bind(this),deleteRecorderAnnotation:this.deleteRecorderAnnotation.bind(this),toggleAnnotation:this.toggleAnnotation.bind(this),onTranscriptionTimestampClick:this.onTranscriptionTimestampClick.bind(this),videoRef:void 0,audioRef:void 0,videoContainerHovered:!1,setVideoContainerHovered:this.setVideoContainerHovered.bind(this),loading:this.loading,playing:!1,recorderModes:j.RecorderModes,currentTime:"",copyLinkTooltip:"Copy Link",loggedInUser:void 0,showVideoInFullScreen:!1,recorderUrl:void 0,toggleAudio:this.toggleAudio.bind(this),onPause:this.onPause.bind(this),onPlay:this.onPlay.bind(this),collapsedMode:!1,toggleCollapsedMode:this.toggleCollapsedMode.bind(this),variant:this.variant,shadowDom:this.shadowDom,isEditMode:this.isEditMode,darkMode:!1,showSummary:this.showSummary,editVideo:this.editVideo.bind(this),openVideoEditor:this.openVideoEditor.bind(this),showVideoEditor:!1,videoEditingSupported:!0,isLoading:!1,showTimeline:!1,showOverlay:!0,pauseVideo:this.pauseVideo.bind(this),playVideo:this.playVideo.bind(this),openFullScreen:this.openFullScreen.bind(this),playVideoInFullScreen:this.playVideoInFullScreen}),this.componentId="velt-recorder-player-internal",this.scrollBlockStrategy=this.overlayService.scrollStrategies.block();try{this.subscriptions.push(super.onDarkModeChange().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{darkMode:L}),z))})),this.subscriptions.push(this.authService.getUser$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{loggedInUser:L}),z))},L=>{this.catchError("Error in RecorderPlayerInternalComponent getUser$ subscription: ",L)})),this.subscriptions.push(this.recorderService.getDarkMode$().subscribe(L=>{L&&super.setComponentDarkMode(L)})),this.subscriptions.push(this.recorderService.getPlayVideoInFullScreen$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{playVideoInFullScreen:this.playVideoInFullScreen===void 0?L:this.playVideoInFullScreen}),z))})),this.subscriptions.push(this.recorderService.getShadowDom$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{shadowDom:L!==!1}),z))})),this.subscriptions.push(this.recorderAnnotationService.getRecordingTranscriptionEnabled$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{recordingTranscriptionEnabled:L}),z))},L=>{this.catchError("Error in RecorderPlayerInternalComponent getRecordingTranscriptionEnabled$ subscription: ",L)})),this.subscriptions.push(this.recorderService.getVideoEditor$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{videoEditorEnabled:z.videoEditorEnabled===void 0?L:z.videoEditorEnabled}),z))}))}catch(L){this.catchError("Error in RecorderPlayerInternalComponent constructor: ",L)}}ngOnInit(){this.setupA11yAttributes(),this.subscriptions.push(this.recorderAnnotationService.getVideoEditorAutoOpen$().subscribe(e=>{this.triggerAutoOpenVideoEditor()}))}triggerAutoOpenVideoEditor(){try{if(this.componentConfigSignal().annotation?.annotationId){let e=this.recorderService.getAutoOpenVideoEditor(),t=this.componentConfigSignal().annotation?.annotationId,r=this.recorderAnnotationService.getVideoEditorAutoOpen(),a=this.componentConfigSignal().annotation?.recordingType;r?.[t]&&e&&!this.componentConfigSignal().showVideoEditor&&a!="audio"&&this.openVideoEditor()}}catch(e){this.catchError("Error in RecorderPlayerInternalComponent triggerAutoOpenVideoEditor: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderPlayerInternalComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>{e.unsubscribe()}),this.clearTimeout&&clearTimeout(this.clearTimeout)}catch(e){this.catchError("Error in RecorderPlayerInternalComponent ngOnDestroy: ",e)}}ngOnChanges(e){try{if(super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e.recorderId){let t=e.recorderId.previousValue,r=e.recorderId.currentValue;!e.recorderId.firstChange&&t!==r&&this.getRecorderAnnotationById()}e.annotation&&this.updateLatestEditedVersion()}catch(t){this.catchError("Error in RecorderPlayerInternalComponent ngOnChanges: ",t)}}updateLatestEditedVersion(){try{let e=this.componentConfigSignal().annotation;e&&(e?.latestVersion?this.componentConfigSignal.update(t=>(t=T(I({},t),{latestEditedVersion:e?.recordingEditVersions?.[e.latestVersion||1]}),t)):this.componentConfigSignal.update(t=>(t=T(I({},t),{latestEditedVersion:{from:e?.from,attachment:e?.attachment,attachments:e?.attachments,recordedTime:e?.recordedTime,transcription:e?.transcription,waveformData:e?.waveformData,displayName:e?.displayName,boundedTrimRanges:[{start:0,end:e?.recordedTime?.duration||0}]}}),t)))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent updateLatestEditedVersion: ",e)}}ngAfterViewInit(){this.componentConfigSignal().annotation&&this.componentConfigSignal.update(e=>(e=T(I({},e),{recorderUrl:this.recorderAnnotationService.getRecorderUrl(e.annotation)}),e)),this.getRecorderAnnotationById(),this.videoOverlay&&(this.videoOverlay.scrollStrategy=this.scrollBlockStrategy),this.editorOverlay&&(this.editorOverlay.scrollStrategy=this.scrollBlockStrategy)}toggleCollapsedMode(){this.componentConfigSignal.update(e=>(e=T(I({},e),{collapsedMode:!e.collapsedMode}),e))}trackByAttachmentId(e,t){return t?.attachmentId}toggleAnnotation(){try{this.componentConfigSignal().annotation&&this.componentConfigSignal().mode!=="thread"&&this.domService.toggleAnnotationSelection(this.componentConfigSignal().annotation)}catch(e){this.catchError("Error in RecorderAudioFloatingComponent toggleAnnotation: ",e)}}getRecorderAnnotationById(){try{this.recorderId&&(this.componentConfigSignal.update(e=>(e=T(I({},e),{mode:"thread"}),e)),this.subscriptions.push(this.recorderAnnotationService.getRecorderAnnotationById(this.recorderId,this.parentMetadata).subscribe(e=>{e?.attachments?.length||e?.attachment?(this.recorderAnnotation=e,this.componentConfigSignal.update(t=>(t=I({},t),t.annotation=this.recorderAnnotation,t.attachment=e?.attachments?.length?e?.attachments[0]:e.attachment,t.user=e.from,t.recordingType=this.recorderAnnotation?.recordingType,t.recorderUrl=this.recorderAnnotationService.getRecorderUrl(this.recorderAnnotation),t))):(this.recorderAnnotation=void 0,this.componentConfigSignal.update(t=>(t=I({},t),t.annotation=void 0,t.attachment=void 0,t.user=void 0,t))),this.updateLatestEditedVersion(),this.triggerAutoOpenVideoEditor()})))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent getRecorderAnnotationById: ",e)}}playOrPauseVideo(e){try{e&&(e.duration>0&&!e.paused?(e.pause(),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PAUSED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})):e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>e.HAVE_CURRENT_DATA||(e.play(),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PLAYED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})))}catch(t){this.catchError("Error in RecorderPlayerInternalComponent playOrPauseVideo: ",t)}}playOrPauseAudio(e){try{e&&(e.duration>0&&!e.paused?(e.pause(),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PAUSED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})):(e.play(),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PLAYED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})))}catch(t){this.catchError("Error in RecorderPlayerInternalComponent toggleAudio: ",t)}}toggleAudio(){try{if(this.componentConfigSignal().audioRef?.nativeElement){let e=this.componentConfigSignal().audioRef?.nativeElement;if(e)if(e.duration>0&&!e.paused)e.pause(),this.componentConfigSignal.update(t=>(t=T(I({},t),{playing:!1}),t)),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PAUSED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()});else{if(e.ended){e.currentTime=0,e.load();let t=0,r=3,a=()=>{if(e.readyState>=3){let s=e.play();s!==void 0&&s.then(()=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{playing:!0}),c))}).catch(c=>{this.componentConfigSignal.update(p=>(p=T(I({},p),{playing:!1}),p))})}else{if(t>=r){let p=e.play();p!==void 0&&p.then(()=>{this.componentConfigSignal.update(u=>(u=T(I({},u),{playing:!0}),u))}).catch(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{playing:!1}),C))});return}t++;let s=setTimeout(()=>{e.removeEventListener("canplay",c);let p=e.play();p!==void 0&&p.then(()=>{this.componentConfigSignal.update(u=>(u=T(I({},u),{playing:!0}),u))}).catch(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{playing:!1}),C))})},3e3),c=()=>{clearTimeout(s),a()};e.addEventListener("canplay",c,{once:!0})}};a()}else{let t=e.play();t!==void 0&&t.then(()=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{playing:!0}),r))}).catch(r=>{this.componentConfigSignal.update(a=>(a=T(I({},a),{playing:!1}),a))})}this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PLAYED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}}}catch(e){this.catchError("Error in RecorderPlayerInternalComponent toggleAudio: ",e)}}toggleVideo(){try{if(!this.componentConfigSignal().recorderInitData?.stream&&this.componentConfigSignal().videoRef?.nativeElement){let e=this.componentConfigSignal().videoRef?.nativeElement;e&&(e.duration>0&&!e.paused?this.pauseVideo():this.componentConfigSignal().playVideoInFullScreen&&!this.componentConfigSignal().manuallyMinimized?this.openFullScreen():this.playVideo())}}catch(e){this.catchError("Error in RecorderPlayerInternalComponent toggleVideo: ",e)}}pauseVideo(){try{let e=this.componentConfigSignal().videoRef?.nativeElement;e&&e.duration>0&&!e.paused&&(e.pause(),this.componentConfigSignal.update(t=>(t=T(I({},t),{playing:!1,showOverlay:!1,showTimeline:!0}),t)),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PAUSED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()}))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent pauseVideo: ",e)}}playVideo(){try{let e=this.componentConfigSignal().videoRef?.nativeElement;e&&e.paused&&(e.play(),this.componentConfigSignal.update(t=>(t=T(I({},t),{playing:!0,showOverlay:!1,showTimeline:!0}),t)),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PLAYED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()}))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent playVideo: ",e)}}openFullScreen(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showVideoInFullScreen:!0}),e)),this.pauseVideo()}catch(e){this.catchError("Error in RecorderPlayerInternalComponent openFullScreen: ",e)}}onPlay(){this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PLAYED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}onPause(){this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PAUSED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderTime:this.componentConfigSignal().annotation?.recordedTime?.duration,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}toggleSubtitles(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showSubtitles:!e.showSubtitles}),e))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent toggleSubtitles: ",e)}}deleteRecorderAnnotation(){return Q(this,null,function*(){try{if(this.componentConfigSignal().annotation){let e=this.componentConfigSignal().annotation?JSON.parse(JSON.stringify(this.componentConfigSignal().annotation)):void 0;e&&(this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_DELETE_TRIGGERED,{annotationId:e?.annotationId,sourceFeature:this.getSourceFeature()}),this.subscriptions.push(this.dialog.open(ya,{panelClass:"velt-mat-dialog-container",data:{title:"Delete recording?",message:"This selected recording will be deleted.",yesButton:"Delete",noButton:"Cancel",darkMode:this.darkMode,variant:"recorder"}}).afterClosed().pipe(at(1)).subscribe(t=>Q(this,null,function*(){t&&(yield this.recorderAnnotationService.deleteRecorderPinAnnotation(this.componentConfigSignal().annotation,this.getSourceFeature()),this.onDelete.emit(e),this.getRecorderAnnotationById())}))))}}catch(e){this.catchError("Error in RecorderPlayerInternalComponent deleteRecorderAnnotation: ",e)}})}timeUpdate(e){try{requestAnimationFrame(()=>{this.componentConfigSignal.update(t=>{if(t=I({},t),t.currentTime=this.formatSecondsAsTime(e),t.currentTimeValue=e,t.videoRef?.nativeElement){let a=t.videoRef.nativeElement.duration;a&&(t.totalTimeValue=a,a-e<.1&&(t.currentTimeValue=a))}return t})})}catch(t){this.catchError("Error in RecorderPlayerInternalComponent timeUpdate: ",t)}}formatSecondsAsTime(e){try{let t=Math.floor(e/3600),r=Math.floor((e-t*3600)/60),a=Math.floor(e-t*3600-r*60);return t&&t<10&&(t="0"+t),r<10&&(r="0"+r),a<10&&(a="0"+a),(t?t+":":"")+r+":"+a}catch(t){return this.catchError("Error in RecorderPlayerInternalComponent formatSecondsAsTime: ",t),""}}getSourceFeature(){try{return this.componentConfigSignal().sourceFeature||"recording"}catch(e){return this.catchError("Error in RecorderPlayerInternalComponent getSourceFeature: ",e),"recording"}}onSeekToVideo(e,t){try{t?.nativeElement&&(t.nativeElement.currentTime=e),this.componentConfigSignal().playing||this.toggleVideo(),this.onTranscriptionTimestampClick()}catch(r){this.catchError("Error in RecorderPlayerInternalComponent onSeekToVideo: ",r)}}onSeekToAudio(e,t){try{t&&(t.currentTime=e),this.componentConfigSignal().playing||this.toggleAudio(),this.onTranscriptionTimestampClick()}catch(r){this.catchError("Error in RecorderPlayerInternalComponent onSeekToAudio: ",r)}}copyLink(){try{let e=this.copyLinkTooltip;this.copyLinkTooltip="Link Copied!",setTimeout(()=>{this.copyLinkTooltip=e},2e3),this.componentConfigSignal().recorderUrl&&Os(this.componentConfigSignal().recorderUrl)}catch(e){this.catchError("Error in RecorderPlayerInternalComponent copyLink: ",e)}}onPlayRecording(e){try{this.componentConfigSignal().recordingType==="screen"?(e?.toggleVideo(),this.componentConfigSignal.update(t=>(t=T(I({},t),{showVideoInFullScreen:!0}),t))):this.onPlay()}catch(t){this.catchError("Error in RecorderPlayerInternalComponent onPlayRecording: ",t)}}onMinimize(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showVideoInFullScreen:!1,manuallyMinimized:!0}),e)),this.pauseVideo()}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onMinimize: ",e)}}toggleFullScreen(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showVideoInFullScreen:!e.showVideoInFullScreen}),e))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent toggleFullScreen: ",e)}}onPausedRecording(){try{this.componentConfigSignal().recordingType!=="screen"&&this.onPause()}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onPausedRecording: ",e)}}onTranscriptionButtonClick(){try{this.analyticsService.trackEvent(Z.Events.Recording.TRANSCRIPTION_CLICKED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onTranscriptionButtonClick: ",e)}}onSubtitlesButtonClick(e){try{this.analyticsService.trackEvent(Z.Events.Recording.SUBTITLES_CLICKED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()}),e&&this.toggleSubtitles()}catch(t){this.catchError("Error in RecorderPlayerInternalComponent onTranscriptionButtonClick: ",t)}}onViewTranscriptionSummaryClick(){try{this.analyticsService.trackEvent(Z.Events.Recording.VIEW_TRANSCRIPTION_SUMMARY_CLICKED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onViewTranscriptionSummaryClick: ",e)}}onTranscriptionSummaryCopy(){try{this.analyticsService.trackEvent(Z.Events.Recording.TRANSCRIPTION_SUMMARY_COPIED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onTranscriptionSummaryCopy: ",e)}}onTranscriptionTimestampClick(){try{this.analyticsService.trackEvent(Z.Events.Recording.TRANSCRIPTION_TIMESTAMP_CLICKED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onTranscriptionTimestampClick: ",e)}}onTranscriptionPanelDragged(){try{this.analyticsService.trackEvent(Z.Events.Recording.TRANSCRIPTION_PANEL_DRAGGED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onTranscriptionPanelDragged: ",e)}}onSubtitlesPanelDragged(){try{this.analyticsService.trackEvent(Z.Events.Recording.SUBTITLES_PANEL_DRAGGED,{recordingType:this.componentConfigSignal().annotation?.recordingType||this.componentConfigSignal().recordingType,recorderMode:this.componentConfigSignal().annotation?.mode,annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,recorderSize:this.componentConfigSignal().annotation?.attachments?.length&&this.componentConfigSignal().annotation?.attachments[0]?.size||this.componentConfigSignal().annotation?.attachment?.size||this.componentConfigSignal().attachment?.size,sourceFeature:this.getSourceFeature()})}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onSubtitlesPanelDragged: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}getVideoDurationMilliseconds(e){return Q(this,null,function*(){return new Promise((t,r)=>{try{let a=document.createElement("video");a.preload="metadata",a.onloadedmetadata=function(){let s=a.duration*1e3;URL.revokeObjectURL(a.src),t(s)},a.onerror=function(s){URL.revokeObjectURL(a.src)},a.src=URL.createObjectURL(e)}catch(a){r(a)}})})}openVideoEditor(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showVideoEditor:!0,showSubtitles:!1}),e)),this.pauseVideo()}catch(e){this.catchError("Error in RecorderPlayerInternalComponent openVideoEditor:",e)}}onApplyEdit(e){try{let{trimRanges:t,scaleRanges:r}=e;this.componentConfigSignal.update(a=>(a=T(I({},a),{isLoading:!0}),a)),this.editVideo(t,r)}catch(t){this.catchError("Error in RecorderPlayerInternalComponent onApplyEdit:",t)}}onCloseEdit(){try{this.componentConfigSignal.update(e=>(e=T(I({},e),{showVideoEditor:!1}),e))}catch(e){this.catchError("Error in RecorderPlayerInternalComponent onCloseEdit:",e)}}editVideo(e,t){return Q(this,null,function*(){try{let r=this.componentConfigSignal().attachment?.url,a=e.map(C=>({start:C.start,end:C.end})),s=t.map(C=>({startTime:C.start?C.start:0,zoomInDuration:.5,holdDuration:C.end?C.end-(C.start?C.start:0):0,zoomOutDuration:.5,zoomFactor:C.zoomFactor,centerX:C.centerX,centerY:C.centerY,topLeftX:C.topLeftX,topLeftY:C.topLeftY})),c=this.componentConfigSignal().annotation,p=null;try{this.actionsService.onRecordingSaveInitiated({annotationId:this.componentConfigSignal().annotation?.annotationId||this.recorderId,message:"Recording save initiated",type:"edit"}),p=yield this.recorderAnnotationService.editVideoRecording(r,a,c,s,void 0,void 0)}catch(C){this.componentConfigSignal.update(E=>(E=T(I({},E),{isLoading:!1,showVideoEditor:!1}),E)),C?.details?.type==="edit"&&this.actionsService.onError({type:"editFailed",message:"Edit failed",recorderId:this.componentConfigSignal().annotation?.annotationId||this.recorderId}),C?.details?.type==="transcription"&&this.actionsService.onError({type:"transcriptionFailed",message:"Transcription failed",recorderId:this.componentConfigSignal().annotation?.annotationId||this.recorderId}),this.loggingService.log("Video trimmed failed")}let u=yield this.recorderAnnotationService.createRecorderData(this.componentConfigSignal().annotation,!0);u&&this.actionsService?.onRecordingEditDone(u),p&&c&&this.componentConfigSignal.update(C=>(C=T(I({},C),{isLoading:!1,showVideoEditor:!1}),C))}catch(r){this.catchError("Error in RecorderPlayerInternalComponent editVideo:",r)}})}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Yi),h(y),h(no),h(qe),h(R),h(Be),h(Sn),h(Mi),h(cg))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-player-internal"]],viewQuery:function(t,r){if(t&1&&(nt(z0e,5),nt(hen,5),nt(fen,5)),t&2){let a;Xe(a=Qe())&&(r.videoPlayerRef=a.first),Xe(a=Qe())&&(r.videoOverlay=a.first),Xe(a=Qe())&&(r.editorOverlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",attachment:"attachment",mode:"mode",recordingType:"recordingType",variant:"variant",_videoEditor:[0,"videoEditor","_videoEditor"],numberOfBars:"numberOfBars",user:"user",recorderInitData:"recorderInitData",recorderId:"recorderId",loading:"loading",dragging:"dragging",sourceFeature:"sourceFeature",recorderPinSelected:"recorderPinSelected",showSummary:"showSummary",collapseMode:"collapseMode",recordingStopped:"recordingStopped",shadowDom:"shadowDom",isEditMode:"isEditMode",parentMetadata:"parentMetadata",playVideoInFullScreen:"playVideoInFullScreen"},outputs:{onDelete:"onDelete"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["videoOverlay","cdkConnectedOverlay"],["editorOverlay","cdkConnectedOverlay"],[4,"ngIf"],["role","region","aria-label","Media player",4,"ngIf"],["cdkOverlayOrigin","","role","presentation"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayDisableClose","snippylyOverlay","snippylyOverlayZIndex","cdkConnectedOverlayScrollStrategy"],["role","region","aria-label","Media player"],["role","application","aria-label","Video player",3,"componentConfigSignal"],["role","application","aria-label","Audio player",3,"componentConfigSignal"],["role","dialog",1,"snippyly-video-overlay-container",3,"click","pointerdown"],["role","application",3,"play","pause","transcriptionButtonClick","subtitlesButtonClick","transcriptionSummaryCopy","transcriptionTimestampClick","onMinimize","copyLink","annotation","transcriptionMode","playVideoInFullScreen","recordingTranscriptionEnabled","darkMode"],["role","dialog","aria-label","Fullscreen video player",1,"snippyly-video-overlay-container",3,"click","pointerdown"],[3,"applyEdit","closeEdit","annotation","darkMode","isLoading","recordingType","recorderModes"]],template:function(t,r){t&1&&g(0,yen,8,18,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,on,en,mi,m_,qC,BC,_g,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)} .snippyly-video-overlay-panel{inset:0!important} .snippyly-video-overlay-panel .snippyly-video-overlay-container{width:100vw!important;height:100vh!important;display:flex!important;align-items:center!important;justify-content:center!important;background:color-mix(in srgb,var(--velt-background-0) 60%,transparent)!important;-webkit-backdrop-filter:blur(2px)!important;backdrop-filter:blur(2px)!important;z-index:1000!important} .snippyly-video-overlay-panel .snippyly-video-overlay-container velt-recorder-player-expanded{width:90vw!important;height:90vh!important;display:flex!important}@media screen and (max-width: 768px){ .snippyly-video-overlay-panel velt-recorder-player-expanded .s-video-transcription-btn{display:none!important}}"],changeDetection:0});let i=o;return i})();var Sen=(i,o,n,e,t)=>({"recorder-pin-selected":i,"mutiple-pins-selected":o,audio:n,video:e,screen:t});function ben(i,o){if(i&1){let n=Y();f(0),_(1,"div",1),P(2,"translate"),P(3,"translate"),G("click",function(t){return N(n),F(t.preventDefault())}),_(4,"div",2),P(5,"translate"),P(6,"translate"),G("pointerover",function(t){return N(n),l().onPointerOver(t),F(t.stopPropagation())})("pointerout",function(){N(n);let t=l();return F(t.onPointerOut())}),w(7,"snippyly-recorder-player-internal",3),b()(),v()}if(i&2){let n=o.ngIf,e=l();m(),d("ngClass",$(23,Sen,n.recorderPinSelected,n.multipleRecorderPinsSelected,(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)===e.recorderModes.AUDIO,(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)===e.recorderModes.VIDEO,(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)===e.recorderModes.SCREEN)),x("aria-label",(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)+" "+M(2,15,"recording pin"))("aria-selected",n.recorderPinSelected)("aria-description",M(3,17,"Created by")+" "+(n.recorderPinAnnotation==null||n.recorderPinAnnotation.from==null?null:n.recorderPinAnnotation.from.name))("data-testid",e.componentId),m(3),x("aria-label",M(5,19,"Play")+" "+(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)+" "+M(6,21,"recording"))("aria-pressed",n.recorderPinSelected)("data-testid",e.componentId+"-player-container"),m(3),d("annotation",n.recorderPinAnnotation)("recorderPinSelected",n.recorderPinSelected)("dragging",n.dragging)("attachment",!(n.recorderPinAnnotation==null||n.recorderPinAnnotation.attachments==null)&&n.recorderPinAnnotation.attachments.length?n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.attachments[0]:n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.attachment)("recordingType",n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.recordingType)("user",n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.from),x("data-testid",e.componentId+"-player")}}var W0e=(()=>{let o=class o{get recorderPinHover(){return this._recorderPinHover}set recorderPinHover(e){this._recorderPinHover=e,this.updateHighlightOnElement()}constructor(e,t,r){this.domService=e,this.loggingService=t,this.elementRef=r,this.recorderPinSelected=!1,this.multipleRecorderPinsSelected=!1,this.avatarErrorImage="",this.dragging=!1,this.recorderModes=j.RecorderModes,this._recorderPinHover=!1,this.componentConfigSignal=De({recorderPinSelected:!1,multipleRecorderPinsSelected:!1,recorderPinAnnotation:void 0,dragging:!1}),this.veltElement=!0,this.componentId="velt-recorder-pin",this.loggingService.log("%c[WB] Creating COMPONENT RecorderPinComponent","color: blue;")}ngOnInit(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderPinComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e&&(Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),e.recorderPinSelected&&this.updateHighlightOnElement())}catch(t){this.catchError("Error in RecorderPinComponent ngOnChanges: ",t)}}ngAfterViewInit(){try{this.updateHighlightOnElement()}catch(e){this.catchError("Error in RecorderPinComponent AfterViewInit: ",e)}}updateHighlightOnElement(){try{this.targetElement&&(this.componentConfigSignal().recorderPinSelected||this.recorderPinHover?this.domService.highlightElement(this.targetElement):this.domService.removeHighlightFromElement(this.targetElement))}catch(e){this.catchError("Error in RecorderPinComponent updateHighlightOnElement: ",e)}}onPointerOver(e){try{e.buttons?this.recorderPinHover&&(this.recorderPinHover=!1):this.recorderPinHover||(this.recorderPinHover=!0)}catch(t){this.catchError("Error in RecorderPinComponent onPointerOver: ",t)}}onPointerOut(){this.recorderPinHover=!1}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.recorderPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-pin"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{recorderPinAnnotation:"recorderPinAnnotation",recorderPinSelected:"recorderPinSelected",multipleRecorderPinsSelected:"multipleRecorderPinsSelected",avatarErrorImage:"avatarErrorImage",user:"user",dragging:"dragging",targetElement:"targetElement"},standalone:!1,features:[Ze],decls:1,vars:1,consts:[[4,"ngIf"],["role","region",1,"recorder-pin-container",3,"click","ngClass"],["role","button","tabindex","0",1,"recorder-pin-player-container",3,"pointerover","pointerout"],["aria-live","polite",3,"annotation","recorderPinSelected","dragging","attachment","recordingType","user"]],template:function(t,r){t&1&&g(0,ben,8,29,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[Ur,X,Ym,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;line-height:1.5;color:var(--velt-black);font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert}.recorder-pin-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;text-align:center;color:var(--velt-white);font-size:var(--velt-font-size-sm);font-weight:500;cursor:pointer;position:relative}.recorder-pin-container[_ngcontent-%COMP%]:hover, .recorder-pin-selected[_ngcontent-%COMP%]{filter:brightness(110%) saturate(110%)}.recorder-pin-selected[_ngcontent-%COMP%] .audio-container[_ngcontent-%COMP%], .recorder-pin-selected[_ngcontent-%COMP%] .video-container[_ngcontent-%COMP%], .recorder-pin-selected[_ngcontent-%COMP%] .screen-video-container[_ngcontent-%COMP%]{border:3px solid var(--velt-accent)}.mutiple-pins-selected[_ngcontent-%COMP%]{border-color:var(--velt-magenta)}.recorder-pin-player-container[_ngcontent-%COMP%]{position:absolute}"],changeDetection:0});let i=o;return i})();function Een(i,o){if(i&1){let n=Y();_(0,"div",2),P(1,"translate"),G("pointerup",function(t){return N(n),l(2).togglePinSelection(),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())})("cdkDragStarted",function(){N(n);let t=l(2);return F(t.onPinDragStart())})("cdkDragEnded",function(){N(n);let t=l(2);return F(t.onPinDragEnd())})("cdkDragMoved",function(t){N(n);let r=l(2);return F(r.onPinMove(t))})("cdkDragReleased",function(){N(n);let t=l(2);return F(t.onPinRelease())}),_(2,"snippyly-recorder-pin",3),G("saveRecorder",function(t){N(n);let r=l(2);return F(r.saveRecorder(t))}),b()()}if(i&2){let n=l().ngIf,e=l();it("opacity",n.annotationDragging&&!n.dragPosition?0:1)("top",n.annotationDragging?n.dragPosition==null?null:n.dragPosition.top:(n.recorderPinAnnotation==null||n.recorderPinAnnotation.position==null?null:n.recorderPinAnnotation.position.top)+n.offsetTop,"px")("left",n.annotationDragging?n.dragPosition==null?null:n.dragPosition.left:(n.recorderPinAnnotation==null||n.recorderPinAnnotation.position==null?null:n.recorderPinAnnotation.position.left)+n.offsetLeft,"px"),ge("pin-dragging",n.annotationDragging),d("id","recorder-pin-contianer-"+(n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.annotationId))("cdkDragDisabled",(n.recorderPinAnnotation==null||n.recorderPinAnnotation.from==null?null:n.recorderPinAnnotation.from.userId)!==(n.user==null?null:n.user.userId)),x("aria-label",M(1,22,"Draggable recording pin by")+" "+(n.recorderPinAnnotation==null||n.recorderPinAnnotation.from==null?null:n.recorderPinAnnotation.from.name))("aria-grabbed",n.annotationDragging)("aria-disabled",(n.recorderPinAnnotation==null||n.recorderPinAnnotation.from==null?null:n.recorderPinAnnotation.from.userId)!==(n.user==null?null:n.user.userId))("aria-selected",!!n.selectedAnnotationsMap[n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.annotationId])("data-testid",e.componentId),m(2),d("recorderPinAnnotation",n.recorderPinAnnotation)("dragging",n.annotationDragging)("recorderPinSelected",n.selectedAnnotationsMap[n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.annotationId]&&!n.annotationDragging&&e.objectKeys(n.selectedAnnotationsMap).length===1)("multipleRecorderPinSelected",n.selectedAnnotationsMap[n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.annotationId]&&e.objectKeys(n.selectedAnnotationsMap).length>1)("targetElement",n.targetElement)("user",n.user),x("data-testid",e.componentId)}}function xen(i,o){if(i&1&&(f(0),g(1,Een,3,24,"div",1),v()),i&2){let n=o.ngIf;m(),d("ngIf",n.recorderPinAnnotation==null?null:n.recorderPinAnnotation.position)}}var q0e=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.analyticsService=e,this.authService=t,this.docService=r,this.domService=a,this.recorderAnnotationService=s,this.loggingService=c,this.elementRef=p,this.multipleRecorderPinsSelected=!1,this.avatarErrorImage="",this.objectKeys=Object.keys,this.subscriptions=[],this.componentConfigSignal=De({recorderPinAnnotation:void 0,annotationDragging:!1,dragPosition:null,offsetTop:0,offsetLeft:0,user:void 0,selectedAnnotationsMap:{},targetElement:void 0}),this.veltElement=!0,this.componentId="velt-recorder-pin-portal",this.subscriptions.push(this.authService.getUser$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{user:u}),C))},u=>{this.catchError("Error in RecorderPinPortalComponent getUser$ subscription: ",u)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(u=>{this.componentConfigSignal.update(C=>(C=T(I({},C),{selectedAnnotationsMap:u}),C))},u=>{this.catchError("Error in RecorderPinPortalComponent getSelectedAnnotationsMap$ subscription: ",u)}))}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderPinPortalComponent setupA11yAttributes:",e)}}setRecorderPinAnnotation(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{recorderPinAnnotation:e}),t)),this.id=this.componentConfigSignal().recorderPinAnnotation?.annotationId}catch(t){this.catchError("Error in RecorderPinPortalComponent setRecorderPinAnnotation: ",t)}}setTargetElement(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{targetElement:e}),t))}catch(t){this.catchError("Error in RecorderPinPortalComponent setTargetElement: ",t)}}setOffsetTop(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{offsetTop:e}),t))}catch(t){this.catchError("Error in RecorderPinPortalComponent setOffsetTop: ",t)}}setOffsetLeft(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{offsetLeft:e}),t))}catch(t){this.catchError("Error in RecorderPinPortalComponent setOffsetLeft: ",t)}}togglePinSelection(){try{this.domService.toggleAnnotationSelection(this.componentConfigSignal().recorderPinAnnotation)}catch(e){this.catchError("Error in RecorderPinPortalComponent togglePinSelection: ",e)}}onPinDragStart(){try{this.componentConfigSignal().selectedAnnotationsMap[this.componentConfigSignal().recorderPinAnnotation.annotationId]&&this.domService.toggleAnnotationSelection(this.componentConfigSignal().recorderPinAnnotation),document.body.classList.add("dragging"),this.componentConfigSignal.update(t=>(t=T(I({},t),{annotationDragging:!0}),t));let e=document.getElementById(this.componentConfigSignal().recorderPinAnnotation.annotationId);e&&(this.parentElement=e.parentElement,document.body.appendChild(e))}catch(e){this.catchError("Error in RecorderPinPortalComponent onPinDragStart: ",e)}}onPinMove(e){try{this.updateCurrentPinPosition(e)}catch(t){this.catchError("Error in RecorderPinPortalComponent onPinMove: ",t)}}onPinDragEnd(){try{document.body.classList.remove("dragging"),this.componentConfigSignal.update(e=>(e=T(I({},e),{annotationDragging:!1}),e))}catch(e){this.catchError("Error in RecorderPinPortalComponent onPinDragEnd: ",e)}}updateCurrentPinPosition(e){try{this.domService.removeHighlightFromElement(this.componentConfigSignal().targetElement);let t=e.event,r=t?.touches?.length?t.touches[0]?.clientX:t.clientX,a=t?.touches?.length?t.touches[0]?.clientY:t.clientY,s=this.domService.getBackgroundElement(r,a);s&&(this.componentConfigSignal.update(c=>(c=T(I({},c),{targetElement:s}),c)),this.domService.highlightElement(this.componentConfigSignal().targetElement),this.pointerMoveEvent=e.event,this.componentConfigSignal.update(c=>(c=T(I({},c),{dragPosition:{top:a,left:r}}),c)))}catch(t){this.catchError("Error in RecorderPinPortalComponent updateCurrentPinPosition: ",t)}}onPinRelease(){try{this.domService.removeHighlightFromElement(this.componentConfigSignal().targetElement);let e=document.getElementById(this.componentConfigSignal().recorderPinAnnotation.annotationId);e&&this.parentElement&&this.parentElement.appendChild(e);let t=100,r=this.domService.getElementFromXPath(this.componentConfigSignal().recorderPinAnnotation.targetElement?.xpath),a=this.componentConfigSignal().recorderPinAnnotation?.targetElement;this.pointerMoveEvent&&(a=this.domService.getTargetElementForCursorPosition(this.pointerMoveEvent));let s=this.domService.getElementFromXPath(a?.xpath),c=this.domService.isElementInsideAdditionalLocationContainer(r)||this.domService.isElementInsideAdditionalLocationContainer(s),p=this.docService.getAdditionalDocumentIdFromElement(s)||this.docService.getDocumentPaths()?.clientDocumentId;!this.componentConfigSignal().recorderPinAnnotation?.metadata?.clientDocumentId||this.componentConfigSignal().recorderPinAnnotation?.metadata?.clientDocumentId==p?(this.componentConfigSignal.update(u=>(u=T(I({},u),{recorderPinAnnotation:T(I({},u.recorderPinAnnotation),{targetElement:a})}),u)),this.recorderAnnotationService.updateRecorder(this.componentConfigSignal().recorderPinAnnotation,!1,c),t=400):(this.componentConfigSignal.update(u=>(u=T(I({},u),{targetElement:r}),u)),t=10),setTimeout(()=>{this.componentConfigSignal.update(u=>(u=T(I({},u),{annotationDragging:!1,dragPosition:null}),u)),this.domService.removeHighlightFromElement(this.componentConfigSignal().targetElement)},t),this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_DRAGGED,{annotationId:this.componentConfigSignal().recorderPinAnnotation.annotationId,recorderSize:this.componentConfigSignal().recorderPinAnnotation?.attachments?.length?this.componentConfigSignal().recorderPinAnnotation?.attachments[0]?.size:this.componentConfigSignal().recorderPinAnnotation?.attachment?.size})}catch(e){this.catchError("Error in RecorderPinPortalComponent onPinRelease: ",e)}}saveRecorder(e){}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.catchError("Error in RecorderPinPortalComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.catchError("Error in RecorderPinPortalComponent unsubscribe: ",e)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.recorderPinAnnotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(st),h(Be),h(Yi),h(y),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-pin-portal"]],hostVars:2,hostBindings:function(t,r){t&2&&(Aa("id",r.id),x("data-velt-element",r.veltElement))},inputs:{multipleRecorderPinsSelected:"multipleRecorderPinsSelected",avatarErrorImage:"avatarErrorImage"},standalone:!1,decls:1,vars:1,consts:[[4,"ngIf"],["class","recorder-pin-portal","cdkDrag","","cdkDragHandle","","role","application","tabindex","0",3,"id","pin-dragging","opacity","top","left","cdkDragDisabled","pointerup","pointerdown","click","cdkDragStarted","cdkDragEnded","cdkDragMoved","cdkDragReleased",4,"ngIf"],["cdkDrag","","cdkDragHandle","","role","application","tabindex","0",1,"recorder-pin-portal",3,"pointerup","pointerdown","click","cdkDragStarted","cdkDragEnded","cdkDragMoved","cdkDragReleased","id","cdkDragDisabled"],["aria-live","polite",3,"saveRecorder","recorderPinAnnotation","dragging","recorderPinSelected","multipleRecorderPinSelected","targetElement","user"]],template:function(t,r){t&1&&g(0,xen,2,1,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,da,gp,W0e,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:absolute;top:0;left:0;box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0);outline:none;margin:0;padding:0;height:unset;width:unset;text-align:left;line-height:1.5;color:#000;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert}.recorder-pin-portal[_ngcontent-%COMP%]{position:absolute;transform:none;top:0;left:0}.recorder-pin-portal.pin-dragging[_ngcontent-%COMP%]{position:fixed;z-index:var(--velt-recorder-player-z-index)}.cdk-drag-preview[_ngcontent-%COMP%], .cdk-drag[_ngcontent-%COMP%], .cdk-drag-placeholder[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}body.dragging[_nghost-%COMP%] *[_ngcontent-%COMP%], body.dragging [_nghost-%COMP%] *[_ngcontent-%COMP%]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}"],changeDetection:0});let i=o;return i})();var Y0e=(()=>{let o=class o{constructor(e,t,r,a,s){this.domService=e,this.componentFactoryResolver=t,this.injector=r,this.appRef=a,this.loggingService=s,this.recordersPinById={}}setRecorderPin(e){try{if(!this.recordersPinById[e.annotationId])this.setPinPortal(e);else if(e.targetElement?.xpath===this.recordersPinById[e.annotationId]?.annotation?.targetElement?.xpath){let t=this.recordersPinById[e.annotationId].portalRef,r=this.recordersPinById[e.annotationId].userTargetElement,a=this.recordersPinById[e.annotationId].pinHostElement;if(document.body.contains(r)&&document.body.contains(a))t&&(t.instance.setRecorderPinAnnotation(JSON.parse(JSON.stringify(e))),this.updateElementOffset(e));else{let s=this.recordersPinById[e.annotationId].pinHostDomPortalOutlet;s&&(this.recordersPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST),this.recordersPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST_STATIC),s.detach(),delete this.recordersPinById[e.annotationId],this.setPinPortal(e))}}else{let t=this.recordersPinById[e.annotationId].pinHostDomPortalOutlet;t&&(this.recordersPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST),this.recordersPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST_STATIC),t.detach(),delete this.recordersPinById[e.annotationId],this.setPinPortal(e))}}catch(t){this.loggingService.catch("Error in RecorderPinPortalService setRecorderPin: ",t)}}setPinPortal(e){try{let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r){let a=this.domService.getHostElement(r),s=new $o(q0e),c=new Ho(a,this.componentFactoryResolver,this.appRef,this.injector),p=c.attach(s);p.instance.setRecorderPinAnnotation(JSON.parse(JSON.stringify(e))),p.instance.setTargetElement(r),this.recordersPinById[e.annotationId]={pinHostDomPortalOutlet:c,pinPortal:s,portalRef:p,annotation:JSON.parse(JSON.stringify(e)),userTargetElement:r,pinHostElement:a},a.setAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST,e.annotationId),window.getComputedStyle(a).position==="static"&&(Pd(a)||a.setAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST_STATIC,"true")),this.updateElementOffset(e)}}}catch(t){this.loggingService.catch("Error in RecorderPinPortalService setPinPortal: ",t)}}updateElementOffset(e){try{let{portalRef:t,userTargetElement:r,pinHostElement:a}=this.recordersPinById[e.annotationId],s=this.domService.getElementOffset(r,a);t.instance.setOffsetLeft(s.offsetLeft),t.instance.setOffsetTop(s.offsetTop)}catch(t){this.loggingService.catch("Error in RecorderPinPortalService updateElementOffset: ",t)}}checkPinsToRemove(e){try{let t=e.map(r=>r.annotationId);Object.keys(this.recordersPinById).forEach(r=>{if(!t.includes(r)){let a=this.recordersPinById[r];a.pinHostDomPortalOutlet.detach(),a.pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST),a.pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_RECORDER_PIN_HOST_STATIC),this.domService.removeHighlightFromElement(a.pinHostElement),delete this.recordersPinById[r]}})}catch(t){this.loggingService.catch("Error in RecorderPinPortalService checkPinsToRemove: ",t)}}};o.\u0275fac=function(t){return new(t||o)(ee(Be),ee(Do),ee(Ot),ee(Ci),ee(y))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var Jz=(()=>{let o=class o{get pinHighlighterClass(){return this._pinHighlighterClass}set pinHighlighterClass(e){this._pinHighlighterClass=e,this.domService.setPinHighlighterClass(e)}set darkMode(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableDarkMode():this.recorderService.disableDarkMode()}catch{}}set shadowDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableShadowDom():this.recorderService.disableShadowDom()}catch{}}set videoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableVideoEditor():this.recorderService.disableVideoEditor()}catch{}}set _recordingTranscription(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderAnnotationService.enableRecordingTranscription():this.recorderAnnotationService.disableRecordingTranscription()}catch{}}set _playVideoInFullScreen(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enablePlayVideoInFullScreen():this.recorderService.disablePlayVideoInFullScreen()}catch{}}set _recordingCountdown(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableRecordingCountdown():this.recorderService.disableRecordingCountdown()}catch{}}constructor(e,t,r,a,s,c,p,u){this.analyticsService=e,this.authService=t,this.domService=r,this.recorderAnnotationService=a,this.recorderPinPortalService=s,this.loggingService=c,this.recorderService=p,this.elementRef=u,this._pinHighlighterClass=null,this.recorderPinAnnotations=[],this.subscriptions=[],this.isFirstComponent=!0,this.selectedAnnotationsMap={},this.recorderAnnotationFocused=!1,this.veltId=En(),this.veltElement=!0,this.componentId="velt-recorder-container";try{this.loggingService.log("%c[WB] Creating CLASS: RecorderContainerComponent","color: blue;"),this.recorderAnnotationService.setRecorderNotesFound(!0);let C=new URL(window.location.href);this.focusRecorderAnnotationId=C.searchParams.get(j.URL_PARAMS.RECORDER_ID)}catch(C){this.loggingService.catch("Error in RecorderContainerComponent constructor: ",C)}}ngOnInit(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderContainerComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_RECORDER_NOTES),t=document.querySelector(j.TAGS.VELT_RECORDER_NOTES);t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent())}catch(e){this.loggingService.catch("Error in RecorderContainerComponent AfterViewInit: ",e)}}initComponent(){try{this.subscriptions.push(this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&this.setRecordingInstalledInAnalytics()},e=>{this.loggingService.catch("Error in getUser: ",e)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(e=>{this.selectedAnnotationsMap=e},e=>{this.loggingService.catch("Error in RecorderContainerComponent getSidebarVisibility$ subscription: ",e)})),this.getAllRecordersOnCurrentDocument()}catch(e){this.loggingService.catch("Error in RecorderContainerComponent initComponent: ",e)}}getAllRecordersOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getAllRecordersOnCurrentDocument","color: green;");try{this.subscriptions.push(this.recorderAnnotationService.getAllRecorderAnnotations().pipe(Le(e=>!!e),he(e=>this.domService.getSelectedAnnotationsMap$().pipe(ce(t=>({annotations:e?.filter(r=>r.mode!=="thread"),selectedAnnotationsMap:t||{}}))))).subscribe(e=>{try{this.loggingService.log(e),this.recorderPinAnnotations=e?.annotations;let t=this.recorderPinAnnotations.filter(r=>r.targetElement);this.recorderPinPortalService.checkPinsToRemove(t),t.forEach(r=>{this.recorderPinPortalService.setRecorderPin(r)}),this.focusRecorderAnnotation()}catch(t){this.loggingService.catch("Error in RecorderContainerComponent getAllRecordersOnCurrentDocument inside subscription: ",t)}},e=>{this.loggingService.catch("Error in RecorderContainerComponent getAllRecordersOnCurrentDocument subscription: ",e)}))}catch(e){this.loggingService.catch("Error in RecorderContainerComponent getAllRecordersOnCurrentDocument: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in RecorderContainerComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in RecorderContainerComponent unsubscribe: ",e)}}focusRecorderAnnotation(){if(this.focusRecorderAnnotationId&&!this.recorderAnnotationFocused){let e=this.recorderPinAnnotations.find(t=>t.annotationId===this.focusRecorderAnnotationId);e&&(this.recorderAnnotationFocused=!0,sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId),this.selectedAnnotationsMap[e.annotationId]||this.domService.toggleAnnotationSelection(e),setTimeout(()=>{let t=null;e.targetElement?t=document.getElementById(`recorder-pin-contianer-${e.annotationId}`):(t=document.querySelector(`[data-velt-id='${e.annotationId}']`),sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID,e.annotationId)),t&&t.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})},100))}}setRecordingInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Re.RECORDER)}catch(e){this.loggingService.catch("Error in RecorderContainerComponent setRecordingInstalledInAnalytics: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Be),h(Yi),h(Y0e),h(y),h(Sn),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-container"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{pinHighlighterClass:"pinHighlighterClass",darkMode:"darkMode",shadowDom:"shadowDom",videoEditor:"videoEditor",_recordingTranscription:[0,"recordingTranscription","_recordingTranscription"],_playVideoInFullScreen:[0,"playVideoInFullScreen","_playVideoInFullScreen"],_recordingCountdown:[0,"recordingCountdown","_recordingCountdown"]},standalone:!1,decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Den=["localAudioRef"],wen=()=>["snippyly-overlay-panel","snippyly-recorder-panel","velt-overlay-panel"],Oen=(i,o,n)=>({audio:i,video:o,screen:n});function Aen(i,o){if(i&1&&(f(0),w(1,"app-recorder-control-panel-floating-mode",5),v()),i&2){let n=l(3);m(),d("componentConfigSignal",n.componentConfigSignal)}}function Pen(i,o){if(i&1&&(f(0),w(1,"app-recorder-control-panel-thread-mode",5),v()),i&2){let n=l(3);m(),d("componentConfigSignal",n.componentConfigSignal)}}function Men(i,o){if(i&1&&(f(0),g(1,Aen,2,1,"ng-container",3)(2,Pen,2,1,"ng-container",3),v()),i&2){let n=l().ngIf;m(),d("ngIf",n.mode==="floating"),m(),d("ngIf",n.mode==="thread")}}function ken(i,o){if(i&1){let n=Y();_(0,"div",8),P(1,"translate"),G("pointerdown",function(t){return N(n),F(t.stopPropagation())}),_(2,"div",9,2),P(4,"translate"),P(5,"translate"),G("cdkDragStarted",function(){N(n);let t=l().$implicit,r=l(2).ngIf;return F(r.onPinDragStart(t))})("cdkDragMoved",function(t){N(n);let r=l(3).ngIf;return F(r.onPinMove(t))})("cdkDragReleased",function(){N(n);let t=l().$implicit,r=l(2).ngIf;return F(r.onPinRelease(t))}),w(6,"snippyly-recorder-player-internal",10),b()()}if(i&2){let n=de(3),e=l().$implicit,t=l(2).ngIf,r=l();d("ngClass",$e(26,Oen,(e==null?null:e.recordingType)==="audio",(e==null?null:e.recordingType)==="video",(e==null?null:e.recordingType)==="screen")),x("aria-label",(e==null?null:e.recordingType)+" "+M(1,20,"recording player"))("data-testid",r.componentId+"-recorder-panel"),m(2),it("opacity",t.annotationDraging&&(t.dragAnnotation==null?null:t.dragAnnotation.annotationId)===(e==null?null:e.annotationId)&&!t.dragPosition?0:1)("top",t.annotationDraging&&(t.dragAnnotation==null?null:t.dragAnnotation.annotationId)===(e==null?null:e.annotationId)?(t.dragPosition==null?null:t.dragPosition.top)-((n==null?null:n.clientHeight)||0)/2:0,"px")("left",t.annotationDraging&&(t.dragAnnotation==null?null:t.dragAnnotation.annotationId)===(e==null?null:e.annotationId)?(t.dragPosition==null?null:t.dragPosition.left)-((n==null?null:n.clientWidth)||0)/2:0,"px"),ge("pin-dragging",t.annotationDraging&&(t.dragAnnotation==null?null:t.dragAnnotation.annotationId)===(e==null?null:e.annotationId)),x("aria-label",M(4,22,"Draggable")+" "+(e==null?null:e.recordingType)+" "+M(5,24,"player"))("aria-grabbed",t.annotationDraging&&(t.dragAnnotation==null?null:t.dragAnnotation.annotationId)===(e==null?null:e.annotationId))("data-testid",r.componentId+"-recorder-bubble-container"),m(4),d("sourceFeature",t.sourceFeature)("annotation",e)("shadowDom",(t==null?null:t.shadowDom)!==!1)("attachment",!(e==null||e.attachments==null)&&e.attachments.length?e==null?null:e.attachments[0]:e==null?null:e.attachment)("recordingType",e==null?null:e.recordingType)("user",e==null?null:e.from)}}function Ren(i,o){if(i&1&&(f(0),g(1,ken,7,30,"ng-template",7,1,Te),v()),i&2){l(2);let n=de(3);m(),d("cdkConnectedOverlayOrigin",n)("cdkConnectedOverlayOpen",!0)("cdkConnectedOverlayPanelClass",gt(3,wen))}}function Nen(i,o){if(i&1&&(f(0),g(1,Ren,3,4,"ng-container",6),v()),i&2){let n=l().ngIf,e=l();m(),d("ngForOf",n.draftRecordings)("ngForTrackBy",e.trackById)}}function Fen(i,o){if(i&1&&(f(0),g(1,Men,3,2,"ng-container",3),w(2,"div",4,0),g(4,Nen,2,2,"ng-container",3),v()),i&2){let n=o.ngIf,e=l();m(),d("ngIf",n.recorderPanelId==n.panelId),m(),x("data-testid",e.componentId+"-trigger"),m(2),d("ngIf",n.isFirstComponent&&(n.draftRecordings==null?null:n.draftRecordings.length)&&n.recorderNotesFound)}}var s7=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p,u,C,E,D){super(C,u),this.analyticsService=e,this.authService=t,this.docService=r,this.domService=a,this.recorderService=s,this.recorderAnnotationService=c,this.loggingService=p,this.themeService=u,this.elementRef=C,this.actionsService=E,this.pipService=D,this.mode="floating",this.recordedRawDataOutput=new Pe,this.onRecordedData=new Pe,this.recordingInProgress=!1,this.maxLengthCheckInterval=null,this.annotation=new eg,this.recorderModes=j.RecorderModes,this.audioTrackEnabled=!1,this.videoEnabled=!1,this.enabledAudioInScreenRecording=!1,this.videoPosterDefaultImage=j.VIDEO_POSTER_DEFAULT_IMAGE,this.isRecording=!1,this.snippylyId=En(),this.subscriptions=[],this.recorderSubscriptions=[],this.threadMode=!0,this.veltElement=!0,this.componentConfigSignal=De({mode:this.mode,panelId:this.panelId,loading:!1,recorderInitData:null,recordingStatus:null,recordedTime:null,collapsedMode:!1,audioEnabled:!1,recordingStopped:!1,recorderPanelId:void 0,commentAnnotationId:void 0,localVideoStream:null,screenRecordingRequested:!1,annotationDraging:!1,dragPosition:null,isRecording:!1,shadowDom:!0,darkMode:!1,draftRecordings:[],isFirstComponent:!0,dragAnnotation:null,sourceFeature:this.sourceFeature,user:null,recorderNotesFound:!1,variant:this.variant,pauseRecording:this.pauseRecording.bind(this),resumeRecording:this.resumeRecording.bind(this),clearRecording:this.clearRecording.bind(this),stopRecording:this.stopRecording.bind(this),onPinDragStart:this.onPinDragStart.bind(this),onPinMove:this.onPinMove.bind(this),onPinRelease:this.onPinRelease.bind(this),toggleCollapsedMode:this.toggleCollapsedMode.bind(this)}),this.componentId="velt-recorder-control-panel-internal",this.subscriptions.push(super.onDarkModeChange().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{darkMode:L}),z))})),this.subscriptions.push(this.recorderService.getDarkMode$().subscribe(L=>{L&&super.setComponentDarkMode(L)})),this.subscriptions.push(this.authService.getUser$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{user:L}),z))},L=>{this.loggingService.catch("Error in RecorderControlPanelInternalComponent getUser$ subscription: ",L)})),this.subscriptions.push(this.recorderService.getAutoOpenVideoEditor$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{videoEditorAutoOpen:L}),z))})),this.subscriptions.push(this.recorderService.getRecorderInitData().pipe(Le(()=>this.isElementAvailableOnDOM())).subscribe(L=>{this.componentConfigSignal().recorderPanelId==this.componentConfigSignal().panelId&&(this.componentConfigSignal.update(z=>(z=T(I({},z),{recorderInitData:L}),z)),this.onRecorderInitData())},L=>{this.loggingService.catch("Error in RecorderControlPanelInternalComponent getRecorderInitData subscription: ",L)})),this.subscriptions.push(this.recorderAnnotationService.getRecorderNotesFound$().subscribe(L=>{this.componentConfigSignal.update(z=>(z=T(I({},z),{recorderNotesFound:L}),z))}))}toggleCollapsedMode(){this.componentConfigSignal.update(e=>(e=T(I({},e),{collapsedMode:!e.collapsedMode}),e))}ngOnInit(){this.setupA11yAttributes(),this.setupPipStopRecordingListener(),this.setupPipClearRecordingListener()}setupPipClearRecordingListener(){try{this.pipService.getPipClearRecordingTriggered$().subscribe(e=>{e&&(this.clearRecording(!0,"cancelled"),this.pipService.resetPipClearRecordingTriggered())})}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent setupPipClearRecordingListener:",e)}}setupPipStopRecordingListener(){try{this.pipService.getPipStopRecordingTriggered$().subscribe(e=>{e&&(this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_SAVE_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.stopMaxLengthTimer(),this.componentConfigSignal.update(t=>(t=T(I({},t),{recordingStopped:!0}),t)),this.actionsService.onRecordingSaveInitiated({message:"Recording save initiated",type:"record"}),this.pipService.resetPipStopRecordingTriggered())})}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent setupPipStopRecordingListener:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_RECORDER_CONTROL_PANEL_INTERNAL);this.snippylyId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)?(this.componentConfigSignal.update(t=>(t=T(I({},t),{isFirstComponent:!0}),t)),this.initComponent()):(document.querySelector(j.TAGS.SNIPPYLY_PLUGIN)||document.querySelector(j.TAGS.SUPERFLOW_TOOLBAR))&&(this.componentConfigSignal.update(t=>(t=T(I({},t),{isFirstComponent:!0}),t)),this.initComponent()),this.subscriptions.push(this.recorderService.onInitRecording().pipe(Le(()=>this.isElementAvailableOnDOM())).subscribe(t=>{if(this.componentConfigSignal.update(a=>(a=T(I({},a),{recorderPanelId:t?.panelId,commentAnnotationId:t?.commentAnnotationId}),a)),this.annotation){this.annotation.commentAnnotationId=t?.commentAnnotationId;let a=this.docService.getBaseMetadata("recorder",{commentAnnotationId:this.annotation.commentAnnotationId,clientDocumentId:t?.clientDocumentId});this.annotation.metadata=I(I({},this.annotation.metadata||{}),a)}let r=t?.mediaConfig||{};if(t?.panelId==this.componentConfigSignal().panelId){if(t?.type)switch(t?.type){case"audio":this.startRecording(t?.type,r);break;case"video":this.startRecording(t?.type,r);break;case"screen":this.startRecording(t?.type,r);break;default:break}super.setComponentDarkMode(t?.darkMode),this.componentConfigSignal.update(a=>(a=T(I({},a),{shadowDom:t?.shadowDom!==!1}),a))}},t=>{this.loggingService.catch("Error in RecorderControlPanelInternalComponent onInitRecording subscription: ",t)}))}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent AfterViewInit: ",e)}}ngOnChanges(e){try{e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))})}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent ngOnChanges: ",t)}}initComponent(){try{this.subscriptions.push(this.recorderAnnotationService.getDraftRecordings$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{draftRecordings:e}),t)),this.componentConfigSignal().draftRecordings&&this.componentConfigSignal.update(t=>(t=T(I({},t),{draftRecordings:t.draftRecordings?.filter(r=>r.mode!=="thread")}),t))}))}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent initComponent: ",e)}}trackById(e,t){return t.annotationId}onStartRecordingButtonClick(e){try{this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_START_BUTTON_CLICKED,{recorderType:e,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()})}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onStartRecordingButtonClick: ",t)}}startRecording(e,t){return Q(this,null,function*(){try{if(this.recordingInProgress)return;let r={type:{}},s=new zn().getBrowserName();switch(e){case this.recorderModes.AUDIO:r.type.audio=!0,r.recorderOptions={mimeType:"audio/mp4"},this.componentConfigSignal.update(p=>(p=T(I({},p),{isRecording:!0}),p));break;case this.recorderModes.VIDEO:r.type.audio=!!t?.audio?.enabled,r.type.video=!0,r.recorderOptions={mimeType:"video/mp4"};break;case this.recorderModes.SCREEN:r.type.audio=!!t?.audio?.enabled,t?.video?.enabled&&this.toggleLocalVideoStream(t),r.type.screen=!0,r.recorderOptions={mimeType:"video/mp4"};break;default:break}let c=yield this.recorderService.startRecording(r,t);this.componentConfigSignal.update(p=>(p=T(I({},p),{screenStream:e===this.recorderModes.SCREEN?c:null}),p))}catch(r){this.loggingService.catch("Error in RecorderControlPanelInternalComponent startRecording: ",r)}})}onRecorderInitData(){try{this.componentConfigSignal().recorderInitData&&(this.componentConfigSignal.update(e=>(e=T(I({},e),{screenRecordingRequested:!1}),e)),this.recordingInProgress=!0,this.audioTrackEnabled=!!this.componentConfigSignal().recorderInitData?.stream?.getAudioTracks()?.length,this.startMaxLengthTimer(),this.audioTrackEnabled&&this.componentConfigSignal.update(e=>(e=T(I({},e),{audioEnabled:!!e.recorderInitData?.stream?.getAudioTracks().find(t=>t.enabled)}),e)),this.componentConfigSignal.update(e=>(e=T(I({},e),{screenRecordingRequested:!1}),e)),this.componentConfigSignal().recorderInitData?.status?.subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{recordingStatus:e}),t))}),this.componentConfigSignal().recorderInitData?.recordedTime&&this.recorderSubscriptions.push(this.componentConfigSignal().recorderInitData.recordedTime.subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{recordedTime:e}),t))})),this.componentConfigSignal().recorderInitData?.recordedRawData$&&this.recorderSubscriptions.push(this.componentConfigSignal().recorderInitData.recordedRawData$.subscribe(e=>{this.componentConfigSignal().localVideoStream&&this.toggleLocalVideoStream(),this.recordingInProgress=!1,this.onStopRecording(e)})))}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onRecorderInitData: ",e)}}pauseRecording(){try{this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_PAUSE_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.recorderService.pauseRecording()}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent pauseRecording: ",e)}}resumeRecording(){try{this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_RESUME_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.recorderService.resumeRecording()}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent resumeRecording: ",e)}}stopRecording(){try{this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_SAVE_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.stopMaxLengthTimer(),this.recorderService.stopRecording(),this.componentConfigSignal.update(e=>(e=T(I({},e),{recordingStopped:!0}),e)),this.actionsService.onRecordingSaveInitiated({message:"Recording save initiated",type:"record"})}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent stopRecording: ",e)}}onStopRecording(e){try{this.recordedRawData=e,this.recordedRawDataOutput.emit(e),this.isRecording=!1,e.blob&&(this.localRecordingUrl=URL.createObjectURL(e.blob)),this.componentConfigSignal.update(t=>(t=T(I({},t),{recordingStopped:!0,recordingStatus:"stopped"}),t)),this.uploadFile(e)}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onStopRecording: ",t)}}makeNameReadable(e){try{if(!e)return"";let t=e.trim().split(/\s+/);return t.length===0?"":t[0].charAt(0).toUpperCase()+t[0].slice(1).toLowerCase()+"'s"}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent makeNameReadable: ",t)}}uploadFile(e){return Q(this,null,function*(){try{this.componentConfigSignal.update(E=>(E=T(I({},E),{loading:!0}),E)),this.annotation||(this.annotation=new eg);let r=new zn().getBrowserName(),a="",s="";["video","screen"].includes(e?.type)?(a="video/mp4",s=`recording_${new Date().getTime()}.mp4`):(a="audio/mp4",s=`recording_${new Date().getTime()}.mp4`);let c=new c0;c.url=this.localRecordingUrl,c.mimeType=a,c.name=s,c.type=a.split("/")[0],c.size=e.blob.size,this.annotation.mode=this.componentConfigSignal().mode,this.annotation.attachments=[c],this.annotation.recordingType=e.type,this.annotation.recordedTime=e.recordedTime,this.annotation.waveformData=this.recorderService.getRecordedDataStream()||[];let p="mp4",u="";this.annotation.recordingType?.length?u=`${this.annotation.recordingType.charAt(0).toUpperCase()+this.annotation.recordingType.slice(1)} Recording ${new Date().getTime()}.${p}`:u=`Recording ${new Date().getTime()}.${p}`,this.annotation.displayName=u;let C=e.thumbnail;if(C){let E=Mj(C,"image/png");if(E){let D=new File([E],`thumbnail_${new Date().getTime()}.png`,{type:"image/png"}),L=yield this.recorderAnnotationService.uploadFile(D,this.annotation);c.thumbnail=L.url}}if(C){let E="";try{E=yield iae(C,e?.recordedTime?.display)}catch(D){this.loggingService.catch("Error in RecorderControlPanelInternalComponent uploadFile get imageWithPlayIcon: ",D)}if(E){let D=Mj(E,"image/png");if(D){let L=new File([D],`thumbnail_with_play_icon_${new Date().getTime()}.png`,{type:"image/png"}),z=yield this.recorderAnnotationService.uploadFile(L,this.annotation);c.thumbnailWithPlayIconUrl=z.url}}}yield this.recorderService.waitForChunksUpload(),this.componentConfigSignal().videoEditorAutoOpen?(this.componentConfigSignal.update(E=>(E=T(I({},E),{keepOpen:!0}),E)),setTimeout(()=>{this.componentConfigSignal.update(E=>(E=T(I({},E),{keepOpen:!1,loading:!1}),E))},2e3)):this.componentConfigSignal.update(E=>(E=T(I({},E),{loading:!1}),E)),this.recorderService.getChunkUrls()&&(this.annotation.chunkUrls=this.recorderService.getChunkUrls()),this.addRecorderAnnotation()}catch(t){this.componentConfigSignal.update(r=>(r=T(I({},r),{loading:!1}),r)),this.loggingService.catch("Error in RecorderControlPanelInternalComponent uploadFile: ",t)}})}addRecorderAnnotation(e,t){try{e?(this.recorderAnnotationService.updateRecorder(e,!1,t),this.clearRecording(!1)):this.annotation.attachments?.length&&this.annotation.attachments[0]?.url&&(this.annotation?.metadata||(this.annotation.metadata={}),this.annotation.commentAnnotationId=this.componentConfigSignal().commentAnnotationId,this.recorderAnnotationService.addRecorder(null,this.annotation,this.getSourceFeature()).pipe(at(1)).subscribe(()=>{this.setRecordedData(),this.clearRecording(!1)}))}catch(r){this.loggingService.catch("Error in RecorderControlPanelInternalComponent addRecorderAnnotation: ",r)}}setRecordedData(){try{let e=new Ck;e.id=this.annotation.annotationId,e.type=this.annotation.recordingType,this.localRecordingUrl&&this.annotation.metadata?.useLocalPreview?(["video","screen"].includes(this.annotation.recordingType)?e.videoUrl=this.localRecordingUrl:e.audioUrl=this.localRecordingUrl,this.annotation.attachments[0]&&(e.thumbnailUrl=this.annotation.attachments[0].thumbnail,e.thumbnailWithPlayIconUrl=this.annotation.attachments[0].thumbnailWithPlayIconUrl)):this.annotation.attachments[0]&&(["video","screen"].includes(this.annotation.recordingType)?e.videoUrl=this.annotation.attachments[0].url:e.audioUrl=this.annotation.attachments[0].url,e.thumbnailUrl=this.annotation.attachments[0].thumbnail,e.thumbnailWithPlayIconUrl=this.annotation.attachments[0].thumbnailWithPlayIconUrl),e.tag=`<${j.TAGS.VELT_RECORDER_PLAYER} recorder-id="${this.annotation.annotationId}"></${j.TAGS.VELT_RECORDER_PLAYER}>`;let t=JSON.stringify(e);t=btoa(t),t=encodeURIComponent(t),e.videoPlayerUrl=`https://player.velt.dev/recorder/${this.annotation.annotationId}?q=${t}`,this.onRecordedData.emit(e),this.recorderService.setRecordedData(e)}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent setRecordedData: ",e)}}toggleLocalVideoStream(e){return Q(this,null,function*(){try{if(this.componentConfigSignal().localVideoStream)this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_VIDEO_OFF_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.componentConfigSignal().localVideoStream?.getTracks().forEach(t=>{t.stop()}),this.componentConfigSignal.update(t=>(t=T(I({},t),{localVideoStream:null}),t));else{this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_VIDEO_ON_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()});let t=null;if(e?.video?.stream?t=e.video.stream:t=yield navigator.mediaDevices.getUserMedia({video:!0}),t){let r=new MediaStream(t.getVideoTracks());this.componentConfigSignal.update(a=>(a=T(I({},a),{localVideoStream:r}),a))}}this.componentConfigSignal().recorderInitData||(this.videoEnabled=!!this.componentConfigSignal().localVideoStream,this.videoEnabled&&(this.enabledAudioInScreenRecording=this.videoEnabled))}catch(t){this.loggingService.catch("Error in RecorderPinComponent toggleLocalVideoStream: ",t)}})}clearRecording(e=!0,t){try{e&&this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_CANCEL_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.recorderService.clearRecording({triggerEvent:t}),this.stopMaxLengthTimer(),this.recorderSubscriptions.forEach(r=>{r.unsubscribe()}),this.componentConfigSignal().recorderInitData=null,this.recordingInProgress=!1,this.annotation=new eg,this.audioTrackEnabled=!1,this.enabledAudioInScreenRecording=!1,this.videoEnabled=!1,this.componentConfigSignal().localVideoStream&&this.componentConfigSignal().localVideoStream?.getTracks().forEach(r=>{r.stop()}),this.domService.removeHighlightFromElement(this.targetElement),this.componentConfigSignal.update(r=>(r=I({},r),r.recordedTime=null,r.recordingStatus=null,r.loading=!1,r.annotationDraging=!1,r.dragPosition=null,r.audioEnabled=!1,r.screenRecordingRequested=!1,r.collapsedMode=!1,r.localVideoStream=null,r.recordingStopped=!1,r))}catch(r){this.loggingService.catch("Error in RecorderControlPanelInternalComponent clearRecording: ",r)}}toggleAudio(){try{if(this.componentConfigSignal().audioEnabled?this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_AUDIO_OFF_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}):this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_PANEL_AUDIO_ON_BUTTON_CLICKED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,sourceFeature:this.getSourceFeature()}),this.componentConfigSignal().recorderInitData?.stream){let e=this.componentConfigSignal().recorderInitData?.stream?.getAudioTracks()||[];e.length&&(e.forEach(t=>{t.enabled=!t.enabled}),this.componentConfigSignal.update(t=>(t=T(I({},t),{audioEnabled:!t.audioEnabled}),t)))}}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent toggleAudio: ",e)}}onPinDragStart(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{dragPosition:null,annotationDraging:!0}),t)),this.componentConfigSignal.update(t=>(t=T(I({},t),{dragAnnotation:e||null}),t))}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onPinDragStart: ",t)}}onPinMove(e){try{this.updateCurrentPinPosition(e)}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onPinMove: ",t)}}updateCurrentPinPosition(e){try{this.domService.removeHighlightFromElement(this.targetElement);let t=e.event,r=t?.touches?.length?t.touches[0]?.clientX:t.clientX,a=t?.touches?.length?t.touches[0]?.clientY:t.clientY,s=this.domService.getBackgroundElement(r,a);s&&(this.targetElement=s,this.domService.highlightElement(this.targetElement),this.pointerMoveEvent=e.event,this.componentConfigSignal.update(c=>(c=T(I({},c),{dragPosition:{top:a,left:r}}),c)))}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent updateCurrentPinPosition: ",t)}}onPinRelease(e){try{let t=!1;if(this.pointerMoveEvent){this.componentConfigSignal.update(a=>(a=T(I({},a),{draftRecordings:a.draftRecordings?.filter(s=>s.annotationId!==e?.annotationId)}),a));let r=this.pointerMoveEvent.target;if(e){let a=this.docService.getAdditionalDocumentIdFromElement(r)||this.docService.getDocumentPaths()?.clientDocumentId;(!e?.metadata?.clientDocumentId||e?.metadata?.clientDocumentId==a)&&(e.targetElement=this.domService.getTargetElementForCursorPosition(this.pointerMoveEvent),t=!0,this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_DRAFT_DRAGGED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,annotationId:e.annotationId,recorderSize:e?.attachments?.length?e?.attachments[0]?.size:e?.attachment?.size,sourceFeature:this.getSourceFeature()}))}else{let a=this.docService.getAdditionalDocumentIdFromElement(r)||this.docService.getDocumentPaths()?.clientDocumentId;(!this.annotation?.metadata?.clientDocumentId||this.annotation?.metadata?.clientDocumentId==a)&&(this.annotation.targetElement=this.domService.getTargetElementForCursorPosition(this.pointerMoveEvent),t=!0,this.analyticsService.trackEvent(Z.Events.Recording.RECORDING_DRAFT_DRAGGED,{recorderType:this.componentConfigSignal().recorderInitData?.type,recorderMode:this.componentConfigSignal().mode,annotationId:this.annotation.annotationId,recorderSize:this.annotation?.attachments?.length?this.annotation?.attachments[0]?.size:this.annotation?.attachment?.size,sourceFeature:this.getSourceFeature()}))}}t&&this.addRecorderAnnotation(e,!0)}catch(t){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onPinRelease: ",t)}}getSourceFeature(){try{return this.componentConfigSignal().sourceFeature||"recording"}catch(e){return this.loggingService.catch("Error in RecorderControlPanelInternalComponent getSourceFeature: ",e),"recording"}}isElementAvailableOnDOM(){try{return!!this.elementRef?.nativeElement?.isConnected}catch(e){return this.loggingService.catch("Error in RecorderControlPanelInternalComponent isElementAvailableOnDOM: ",e),!1}}ngOnDestroy(){try{super.ngOnDestroy(),this.stopMaxLengthTimer(),this.subscriptions.forEach(e=>{e.unsubscribe()}),this.recorderSubscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent onDestroy: ",e)}}startMaxLengthTimer(){try{this.recorderService.getMaxRecordingLength()&&(this.stopMaxLengthTimer(),this.maxLengthCheckInterval=setInterval(()=>{this.recorderService.checkMaxLength()&&this.stopRecording()},100))}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent startMaxLengthTimer: ",e)}}stopMaxLengthTimer(){try{this.maxLengthCheckInterval&&(clearInterval(this.maxLengthCheckInterval),this.maxLengthCheckInterval=null)}catch(e){this.loggingService.catch("Error in RecorderControlPanelInternalComponent stopMaxLengthTimer: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(st),h(Be),h(Sn),h(Yi),h(y),h(qe),h(R),h(cg),h(Ua))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-control-panel-internal"]],viewQuery:function(t,r){if(t&1&&nt(Den,5),t&2){let a;Xe(a=Qe())&&(r.localAudioRef=a.first)}},hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.snippylyId)("data-velt-element",r.veltElement)},inputs:{mode:"mode",panelId:"panelId",sourceFeature:"sourceFeature",variant:"variant"},outputs:{recordedRawDataOutput:"recordedRawData",onRecordedData:"onRecordedData"},standalone:!1,features:[B,Ze],decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],["recorderBubbleContainer",""],[4,"ngIf"],["cdkOverlayOrigin",""],[3,"componentConfigSignal"],[4,"ngFor","ngForOf","ngForTrackBy"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass"],["role","dialog",1,"recorder-panel",3,"pointerdown","ngClass"],["role","application",1,"recorder-bubble-container",3,"cdkDragStarted","cdkDragMoved","cdkDragReleased"],["mode","floating",3,"sourceFeature","annotation","shadowDom","attachment","recordingType","user"]],template:function(t,r){t&1&&g(0,Fen,5,3,"ng-container",3),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[Ur,vt,X,on,en,Ym,LC,NC,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.recorder-panel[_ngcontent-%COMP%]{position:fixed;bottom:calc((1rem + 0px) * var(--velt-base-rem-unit));left:calc((1rem + 0px) * var(--velt-base-rem-unit));z-index:2147483560;display:flex;align-items:flex-end;gap:var(--velt-spacing-lg)}.recorder-bubble-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;transform:none}.recorder-bubble-container.pin-dragging[_ngcontent-%COMP%]{position:fixed;z-index:999999998}"],changeDetection:0});let i=o;return i})();var eG=(()=>{let o=class o{set _recordingTranscription(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderAnnotationService.enableRecordingTranscription():this.recorderAnnotationService.disableRecordingTranscription()}catch{}}set _recordingCountdown(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableRecordingCountdown():this.recorderService.disableRecordingCountdown()}catch{}}set _settingsEmbedded(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableSettingsEmbedded():this.recorderService.disableSettingsEmbedded()}catch{}}set _autoOpenVideoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableAutoOpenVideoEditor():this.recorderService.disableAutoOpenVideoEditor()}catch{}}set _playVideoInFullScreen(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enablePlayVideoInFullScreen():this.recorderService.disablePlayVideoInFullScreen()}catch{}}set videoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableVideoEditor():this.recorderService.disableVideoEditor()}catch{}}set _retakeOnVideoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableRetakeOnVideoEditor():this.recorderService.disableRetakeOnVideoEditor()}catch{}}set _pictureInPicture(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.pipService.enablePictureInPicture():this.pipService.disablePictureInPicture()}catch{}}set _maxLength(e){try{let t;typeof e=="string"?t=parseInt(e,10):t=e,t&&t>0&&this.recorderService.setMaxRecordingLength(t)}catch{}}constructor(e,t,r,a,s){this.elementRef=e,this.loggingService=t,this.recorderAnnotationService=r,this.recorderService=a,this.pipService=s,this.mode="floating",this.onRecordedData=new Pe,this.veltElement=!0,this.componentId="velt-recorder-control-panel"}ngOnInit(){this.setupA11yAttributes()}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderControlPanelComponent setupA11yAttributes:",e)}}emitRecordedData(e){this.onRecordedData.emit(e)}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y),h(Yi),h(Sn),h(Ua))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-control-panel"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{mode:"mode",panelId:"panelId",_recordingTranscription:[0,"recordingTranscription","_recordingTranscription"],_recordingCountdown:[0,"recordingCountdown","_recordingCountdown"],_settingsEmbedded:[0,"settingsEmbedded","_settingsEmbedded"],_autoOpenVideoEditor:[0,"autoOpenVideoEditor","_autoOpenVideoEditor"],_playVideoInFullScreen:[0,"playVideoInFullScreen","_playVideoInFullScreen"],videoEditor:"videoEditor",_retakeOnVideoEditor:[0,"retakeOnVideoEditor","_retakeOnVideoEditor"],_pictureInPicture:[0,"pictureInPicture","_pictureInPicture"],_maxLength:[0,"maxLength","_maxLength"]},outputs:{onRecordedData:"onRecordedData"},standalone:!1,decls:3,vars:9,consts:[["role","region",3,"onRecordedData","mode","panelId"]],template:function(t,r){t&1&&(_(0,"snippyly-recorder-control-panel-internal",0),P(1,"translate"),P(2,"translate"),G("onRecordedData",function(s){return r.emitRecordedData(s)}),b()),t&2&&(d("mode",r.mode)("panelId",r.panelId),x("aria-label",M(1,5,"Recording controls for")+" "+r.mode+" "+M(2,7,"recording"))("aria-describedby",r.panelId+"-description")("data-testid",r.componentId))},dependencies:[s7,pe],encapsulation:2,changeDetection:0});let i=o;return i})();function Ben(i,o){if(i&1){let n=Y();_(0,"snippyly-recorder-player-internal",1),P(1,"translate"),G("onDelete",function(t){N(n);let r=l();return F(r.onDeleteRecorderAnnotation(t))}),b()}if(i&2){let n=l();d("recorderId",n.recorderId)("variant",n.variant)("numberOfBars",n.waveformNumberOfBars)("shadowDom",n.shadowDom)("videoEditor",n.videoEditorEnabled())("playVideoInFullScreen",n.playVideoInFullScreen())("showSummary",(n.showSummary==null?null:n.showSummary.toLowerCase())==="true"&&(n.summary==null?null:n.summary.toLowerCase())==="true"),x("aria-label",M(1,10,"Recording player")+" "+n.recorderId)("aria-expanded",(n.showSummary==null?null:n.showSummary.toLowerCase())==="true"&&(n.summary==null?null:n.summary.toLowerCase())==="true")("data-testid",n.componentId)}}var tG=(()=>{let o=class o extends Je{set _numberOfBars(e){try{let t=e;typeof e=="string"&&(t=Number(e)),this.waveformNumberOfBars=t}catch{}}set _retakeOnVideoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),t?this.recorderService.enableRetakeOnVideoEditor():this.recorderService.disableRetakeOnVideoEditor()}catch{}}set _shadowDom(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.shadowDom=t}catch{}}set _videoEditor(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.videoEditorEnabled.set(t)}catch{}}set _playVideoInFullScreen(e){try{let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.playVideoInFullScreen.set(t)}catch{}}constructor(e,t,r,a){super(r,t),this.loggingService=e,this.themeService=t,this.elementRef=r,this.recorderService=a,this.showSummary="true",this.summary="true",this.variant="default",this.waveformNumberOfBars=void 0,this.shadowDom=!0,this.videoEditorEnabled=De(void 0),this.playVideoInFullScreen=De(void 0),this.onDelete=new Pe,this.veltElement=!0,this.componentId="velt-recorder-player"}ngOnInit(){try{this.setupA11yAttributes(),this.recorderId||this.catchError("recorderId is required in Velt Recorder Player.")}catch(e){this.catchError("Error in RecorderPlayerComponent ngOnInit: ",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in RecorderPlayerComponent setupA11yAttributes:",e)}}onDeleteRecorderAnnotation(e){try{this.onDelete.emit({id:e?.annotationId})}catch(t){this.catchError("Error in RecorderPlayerComponent onDeleteRecorderAnnotation: ",t)}}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.recorderId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(qe),h(R),h(Sn))},o.\u0275cmp=O({type:o,selectors:[["snippyly-recorder-player"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{recorderId:"recorderId",showSummary:"showSummary",summary:"summary",variant:"variant",_numberOfBars:[0,"numberOfBars","_numberOfBars"],_retakeOnVideoEditor:[0,"retakeOnVideoEditor","_retakeOnVideoEditor"],_shadowDom:[0,"shadowDom","_shadowDom"],_videoEditor:[0,"videoEditor","_videoEditor"],_playVideoInFullScreen:[0,"playVideoInFullScreen","_playVideoInFullScreen"]},outputs:{onDelete:"onDelete"},standalone:!1,features:[B],decls:1,vars:1,consts:[["mode","thread","role","region","aria-live","polite",3,"recorderId","variant","numberOfBars","shadowDom","videoEditor","playVideoInFullScreen","showSummary","onDelete",4,"ngIf"],["mode","thread","role","region","aria-live","polite",3,"onDelete","recorderId","variant","numberOfBars","shadowDom","videoEditor","playVideoInFullScreen","showSummary"]],template:function(t,r){t&1&&g(0,Ben,2,12,"snippyly-recorder-player-internal",0),t&2&&d("ngIf",r.recorderId)},dependencies:[X,Ym,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var Xn=(()=>{let o=class o{constructor(e,t){this.domService=e,this.elementRef=t,this.clickOutside=new Pe}ngOnInit(){}ngAfterViewInit(){setTimeout(()=>{this.subscription=this.domService.onDocumentClickSubject$().subscribe(e=>{let t=this.checkInsideClick(e,this.elementRef.nativeElement);!t&&this.clickOutsideHandler&&typeof this.clickOutsideHandler=="function"&&(t=this.clickOutsideHandler(e.target,this.elementRef.nativeElement)),t||this.clickOutside.emit()})},500)}ngOnDestroy(){this.subscription?.unsubscribe()}checkInsideClick(e,t){return e.composedPath().includes(t)}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(R))},o.\u0275dir=$t({type:o,selectors:[["","snippylyClickOutside",""]],inputs:{clickOutsideHandler:"clickOutsideHandler"},outputs:{clickOutside:"clickOutside"},standalone:!1});let i=o;return i})();var Ven=["copywriterContainer"],Uen=["searchInput"];function jen(i,o){}function $en(i,o){i&1&&(le(),_(0,"svg",33),w(1,"rect",34)(2,"rect",35)(3,"rect",36),b())}function Hen(i,o){i&1&&(le(),_(0,"svg",33),w(1,"rect",34)(2,"rect",36),b())}function zen(i,o){if(i&1){let n=Y();f(0),_(1,"div",30),G("click",function(t){let r=N(n).index,a=l(3).ngIf,s=l();return a.selectedOptionIndex===r?t.stopPropagation():s.onSelectOption(r),F(t.stopPropagation())}),g(2,$en,4,0,"svg",31)(3,Hen,3,0,"ng-template",null,3,Te),_(5,"span",32),te(6),b()(),v()}if(i&2){let n=o.$implicit,e=o.index,t=de(4),r=l(3).ngIf;m(),ge("s-selected",r.selectedOptionIndex===e),m(),d("ngIf",r.selectedOptionIndex===e)("ngIfElse",t),m(4),Ge(n==null?null:n.content)}}function Gen(i,o){i&1&&(_(0,"div",37),le(),_(1,"svg",38)(2,"circle",39),w(3,"animate",40),b(),_(4,"circle",41),w(5,"animate",42),b(),_(6,"circle",43),w(7,"animate",44),b(),_(8,"circle",45),w(9,"animate",46),b()()())}function Wen(i,o){if(i&1){let n=Y();_(0,"span",47),G("click",function(){N(n);let t=l(4);return F(t.onShowOriginalTextClick())}),te(1),P(2,"translate"),b()}i&2&&(m(),Ge(M(2,1,"Show original text")))}function qen(i,o){i&1&&(_(0,"div",16),te(1),P(2,"translate"),b()),i&2&&(m(),Ce(" ",M(2,1,"Select a rewritten text to create a task"),""))}function Yen(i,o){if(i&1){let n=Y();_(0,"button",48),G("click",function(t){N(n);let r=l(3).ngIf,a=l();return r.selectedOptionIndex<0||a.createTask(),F(t.stopPropagation())}),g(1,qen,3,3,"div",49),te(2),P(3,"translate"),b()}if(i&2){let n=l(3).ngIf;ge("disabled",n.selectedOptionIndex<0),m(),d("ngIf",n.selectedOptionIndex<0),m(),Ce(" ",M(3,4,"Create Task")," ")}}function Ken(i,o){if(i&1){let n=Y();_(0,"div",9),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())}),_(1,"div",10)(2,"div",11),le(),_(3,"svg",12)(4,"g"),w(5,"path",13),b()(),te(6),P(7,"translate"),b(),ut(),_(8,"div",14)(9,"div",15),G("click",function(){N(n);let t=l(2).ngIf,r=l();return F(!t.loading&&t.searchCount<3?r.onRefresh():null)}),_(10,"div",16),te(11),P(12,"translate"),P(13,"translate"),P(14,"translate"),P(15,"translate"),P(16,"translate"),b(),le(),_(17,"svg",17),w(18,"path",18),b()(),ut(),_(19,"div",19),G("click",function(t){return N(n),l(3).onCloseDialog(),F(t.stopPropagation())}),le(),_(20,"svg",17),w(21,"path",20),b()()()(),ut(),_(22,"div",21),g(23,zen,7,5,"ng-container",22)(24,Gen,10,0,"div",23),b(),_(25,"div",24),g(26,Wen,3,3,"span",25),w(27,"div"),g(28,Yen,4,6,"button",26),b(),le(),_(29,"svg",27),w(30,"path",28)(31,"path",29),b()()}if(i&2){let n=l(2).ngIf;ge("bottom-sheet",n.bottomSheetMode),m(6),Ce(" ",M(7,10,"Rewrite")," "),m(3),ge("disabled",n.loading||n.searchCount>=3),m(2),Ce("",n.loading?M(12,12,"Getting data ..."):n.searchCount===0?M(13,14,"Get more options"):n.searchCount<3?M(14,16,"Get more options")+" ("+(3-n.searchCount)+" "+M(15,18,"left")+")":M(16,20,"Max 3 rewrites allowed")," "),m(12),d("ngForOf",n.options),m(),d("ngIf",n.loading),m(2),d("ngIf",n.selectedOptionIndex>=0),m(2),d("ngIf",n.options==null?null:n.options.length)}}function Zen(i,o){if(i&1&&g(0,Ken,32,22,"div",8),i&2){let n=l(2);d("ngIf",n.type==="copywriter")}}function Xen(i,o){if(i&1){let n=Y();_(0,"div",55),G("click",function(){N(n);let t=l(4);return F(t.getRewriterOptions(!0))}),le(),_(1,"svg",56),w(2,"path",57),b()()}if(i&2){let n=l(4);ge("disabled",!(n.prompt!=null&&n.prompt.length))}}function Qen(i,o){if(i&1){let n=Y();_(0,"div",9),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())}),_(1,"div",50)(2,"div",10)(3,"div",11),le(),_(4,"svg",51),w(5,"path",52),b(),ut(),_(6,"input",53,4),P(8,"translate"),Vr("ngModelChange",function(t){N(n);let r=l(3);return qr(r.prompt,t)||(r.prompt=t),F(t)}),G("keyup.enter",function(){N(n);let t=l(3);return F(t.getRewriterOptions(!0))}),b()(),g(9,Xen,3,2,"div",54),b()()()}if(i&2){let n=l(2).ngIf,e=l();ge("bottom-sheet",n.bottomSheetMode),m(6),d("placeholder",M(8,6,"How would you like to change this copy?")),Br("ngModel",e.prompt),d("disabled",n.loading||n.searchCount>=e.MAX_SEARCH_COUNT),m(3),d("ngIf",!n.loading)}}function Jen(i,o){i&1&&(le(),_(0,"svg",33),w(1,"rect",34)(2,"rect",35)(3,"rect",36),b())}function etn(i,o){i&1&&(le(),_(0,"svg",33),w(1,"rect",34)(2,"rect",36),b())}function ttn(i,o){if(i&1){let n=Y();f(0),_(1,"div",30),G("click",function(t){let r=N(n).index,a=l(3).ngIf,s=l();return a.selectedOptionIndex===r?t.stopPropagation():s.onSelectOption(r),F(t.stopPropagation())}),g(2,Jen,4,0,"svg",31)(3,etn,3,0,"ng-template",null,3,Te),_(5,"span",32),te(6),P(7,"translate"),b()(),v()}if(i&2){let n=o.$implicit,e=o.index,t=de(4),r=l(3).ngIf;m(),ge("s-selected",r.selectedOptionIndex===e),m(),d("ngIf",r.selectedOptionIndex===e)("ngIfElse",t),m(4),Ge(M(7,5,n==null?null:n.content))}}function ntn(i,o){i&1&&(_(0,"div",37),le(),_(1,"svg",38)(2,"circle",39),w(3,"animate",40),b(),_(4,"circle",41),w(5,"animate",42),b(),_(6,"circle",43),w(7,"animate",44),b(),_(8,"circle",45),w(9,"animate",46),b()()())}function itn(i,o){if(i&1){let n=Y();_(0,"span",47),G("click",function(){N(n);let t=l(4);return F(t.onShowOriginalTextClick())}),te(1),P(2,"translate"),b()}i&2&&(m(),Ge(M(2,1,"Show original text")))}function otn(i,o){i&1&&(_(0,"div",16),te(1),P(2,"translate"),b()),i&2&&(m(),Ce(" ",M(2,1,"Select a rewritten text to create a task"),""))}function rtn(i,o){if(i&1){let n=Y();_(0,"button",48),G("click",function(t){N(n);let r=l(3).ngIf,a=l();return r.selectedOptionIndex<0||a.createTask(),F(t.stopPropagation())}),g(1,otn,3,3,"div",49),te(2),P(3,"translate"),b()}if(i&2){let n=l(3).ngIf;ge("disabled",n.selectedOptionIndex<0),m(),d("ngIf",n.selectedOptionIndex<0),m(),Ce(" ",M(3,4,"Create Task")," ")}}function atn(i,o){if(i&1){let n=Y();_(0,"div",9),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())}),_(1,"div",50)(2,"div",10)(3,"div",11),le(),_(4,"svg",51),w(5,"path",52),b(),ut(),_(6,"input",53,4),P(8,"translate"),Vr("ngModelChange",function(t){N(n);let r=l(3);return qr(r.prompt,t)||(r.prompt=t),F(t)}),G("keyup.enter",function(){N(n);let t=l(3);return F(t.getRewriterOptions(!0))}),b()(),_(9,"div",58),G("click",function(){N(n);let t=l(2).ngIf,r=l();return F(t.loading?null:r.getRewriterOptions(!0))}),_(10,"div",16),te(11),P(12,"translate"),P(13,"translate"),P(14,"translate"),P(15,"translate"),P(16,"translate"),b(),le(),_(17,"svg",56),w(18,"path",59),b()()(),ut(),w(19,"hr",60),b(),_(20,"div",10)(21,"div",11),te(22),P(23,"translate"),b(),_(24,"div",14)(25,"div",15),G("click",function(){N(n);let t=l(2).ngIf,r=l();return F(!t.loading&&t.searchCount<3?r.onRefresh():null)}),_(26,"div",16),te(27),P(28,"translate"),P(29,"translate"),P(30,"translate"),P(31,"translate"),P(32,"translate"),b(),le(),_(33,"svg",17),w(34,"path",18),b()(),ut(),_(35,"div",19),G("click",function(t){return N(n),l(3).onCloseDialog(),F(t.stopPropagation())}),le(),_(36,"svg",17),w(37,"path",20),b()()()(),ut(),_(38,"div",21),g(39,ttn,8,7,"ng-container",22),b(),g(40,ntn,10,0,"div",23),_(41,"div",24),g(42,itn,3,3,"span",25),w(43,"div"),g(44,rtn,4,6,"button",26),b(),le(),_(45,"svg",27),w(46,"path",28)(47,"path",29),b()()}if(i&2){let n=l(2).ngIf,e=l();ge("bottom-sheet",n.bottomSheetMode),m(6),d("placeholder",M(8,16,"How would you like to change this copy?")),Br("ngModel",e.prompt),d("disabled",n.loading||n.searchCount>=e.MAX_SEARCH_COUNT),m(3),ge("disabled",n.loading||n.searchCount>=3),m(2),Ce("",n.loading?M(12,18,"Getting data ..."):n.searchCount===0?M(13,20,"Get more options"):n.searchCount<3?M(14,22,"Get more options")+" ("+(3-n.searchCount)+" "+M(15,24,"left")+")":M(16,26,"Max 3 rewrites allowed")," "),m(11),Ce(" ",M(23,28,"Suggestions")," "),m(3),ge("disabled",n.loading||n.searchCount>=3),m(2),Ce("",n.loading?M(28,30,"Getting data ..."):n.searchCount===0?M(29,32,"Get more options"):n.searchCount<3?M(30,34,"Get more options")+" ("+(3-n.searchCount)+" "+M(31,36,"left")+")":M(32,38,"Max 3 rewrites allowed")," "),m(12),d("ngForOf",n.options),m(),d("ngIf",n.loading),m(2),d("ngIf",n.selectedOptionIndex>=0),m(2),d("ngIf",n.options==null?null:n.options.length)}}function stn(i,o){if(i&1&&g(0,Qen,10,8,"div",8)(1,atn,48,40,"div",8),i&2){let n=l().ngIf;d("ngIf",!n.apiCalled),m(),d("ngIf",n.apiCalled)}}function ltn(i,o){if(i&1){let n=Y();f(0),_(1,"div",6,0),G("clickOutside",function(){N(n);let t=l();return F(t.onClickOutside())}),g(3,jen,0,0,"ng-template",7),b(),g(4,Zen,1,1,"ng-template",null,1,Te)(6,stn,2,2,"ng-template",null,2,Te),v()}if(i&2){let n=de(5),e=de(7),t=l();m(3),d("ngIf",t.type==="copywriter")("ngIfThen",n)("ngIfElse",e)}}var l7=(()=>{let o=class o{onClick(e){this.onClickOutside()}constructor(e,t,r,a,s,c){this.analyticsService=e,this.commentService=t,this.domService=r,this.loggingService=a,this.rewriterService=s,this.bottomSheetData=c,this.type="copywriter",this.selectOption=new Pe,this.hideDialog=!1,this.subscriptions=[],this.prompt="",this.MAX_SEARCH_COUNT=3,this.componentConfigSignal=De({searchCount:0,loading:!1,bottomSheetMode:!1,apiCalled:!1,options:[],selectedOptionIndex:-1}),this.veltElement=!0,c&&this.subscriptions.push(c.subscribe(p=>{p&&(this.bottomSheetContainerData=p,this.annotation=p.annotation,this.type=this.annotation?.rewriterType||"copywriter",this.componentConfigSignal.update(u=>(u=T(I({},u),{bottomSheetMode:!0}),u)),this.getRewriterOptions())}))}ngOnInit(){}ngAfterViewInit(){try{this.bottomSheetData||(this.type=this.annotation?.rewriterType||"copywriter",this.getRewriterOptions()),setTimeout(()=>{this.searchInput?.nativeElement&&this.searchInput?.nativeElement?.focus()},1e3)}catch(e){this.loggingService.catch("Error in RewriterDialogComponent ngAfterViewInit:",e)}}getRewriterOptions(e){try{if(this.type==="copywriter"||this.prompt){this.componentConfigSignal.update(s=>(s=T(I({},s),{loading:!0}),s));let t=XP(this.annotation?.targetTextRange?.text?.trim()||""),r=t.join(" ");this.type==="copywriter"&&(r=`This is the original copy: "${r}". Limit your response to < ${t?.length} words.`),this.componentConfigSignal.update(s=>(s=T(I({},s),{searchCount:s.searchCount+1,apiCalled:!0}),s));let a=[];this.type!=="copywriter"&&a.push({role:"system",content:this.prompt}),a.push({role:"user",content:r}),this.componentConfigSignal().options?.length&&(a.push(...this.componentConfigSignal().options),a.push({role:"user",content:"Provide one more option"})),this.subscriptions.push(this.rewriterService.getRewriterOptions("copywriter",a,e).subscribe(s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{options:[...c.options,...s],loading:!1}),c))},s=>{this.componentConfigSignal.update(c=>(c=T(I({},c),{loading:!1}),c))}))}}catch(t){this.loggingService.catch("Error in RewriterDialogComponent getRewriterOptions:",t)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}onRefresh(){try{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_REFRESH_BUTTON_CLICKED,{isMobileDevice:this.domService.isMobileDevice()}),this.getRewriterOptions(!0)}catch(e){this.loggingService.catch("Error in RewriterDialogComponent onRefresh:",e)}}onSelectOption(e){try{this.componentConfigSignal().selectedOptionIndex===e?this.componentConfigSignal.update(t=>(t=T(I({},t),{selectedOptionIndex:-1}),t)):(this.componentConfigSignal.update(t=>(t=T(I({},t),{selectedOptionIndex:e}),t)),this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_OPTION_SELECTED,{optionIndexSelected:e,isMobileDevice:this.domService.isMobileDevice()})),this.selectedOption=this.componentConfigSignal().options[this.componentConfigSignal().selectedOptionIndex],this.annotation&&(this.annotation.selectedRewriterOption=this.selectedOption?.content,this.selectOption.emit(this.annotation),this.bottomSheetContainerData?.selectOption&&this.bottomSheetContainerData.selectOption(this.annotation))}catch(t){this.loggingService.catch("Error in RewriterDialogComponent onSelectOption:",t)}}createTask(){try{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_TASK_CREATED,{isMobileDevice:this.domService.isMobileDevice()});let e=JSON.parse(JSON.stringify(this.annotation?.targetTextRange)),t=`Change text to <span class="snippyly-comment-rewriter-text">${this.annotation?.selectedRewriterOption}</span>`;sessionStorage.setItem(j.SESSION_STORAGE.SNIPPYLY_COMMENT_DIALOG_AUTO_POPULATE_TEXT,t),this.rewriterService.removeRewriter(this.annotation),setTimeout(()=>{this.commentService.addComment(void 0,e)},500)}catch(e){this.loggingService.catch("Error in RewriterDialogComponent createTask:",e)}}onShowOriginalTextClick(){try{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_SHOW_ORIGINAL_TEXT_CLICKED,{isMobileDevice:this.domService.isMobileDevice()}),this.onSelectOption(this.componentConfigSignal().selectedOptionIndex)}catch(e){this.loggingService.catch("Error in RewriterDialogComponent onShowOriginalTextClick:",e)}}onClickOutside(){try{this.type!=="copywriter"&&(this.prompt?.length?this.copywriterContainer?.nativeElement&&(this.domService.addClassToElement(this.copywriterContainer.nativeElement,"s-shake"),setTimeout(()=>{this.domService.removeClassFromElement(this.copywriterContainer?.nativeElement,"s-shake")},500)):this.onCloseDialog())}catch(e){this.loggingService.catch("Error in RewriterDialogComponent onClickOutside:",e)}}onCloseDialog(){try{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_CLOSE_BUTTON_CLICKED,{isMobileDevice:this.domService.isMobileDevice()}),this.rewriterService.resetRewriter()}catch(e){this.loggingService.catch("Error in RewriterDialogComponent onCloseDialog:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(we),h(Be),h(y),h(jc),h(Sc,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-rewriter-dialog"]],viewQuery:function(t,r){if(t&1&&(nt(Ven,5),nt(Uen,5)),t&2){let a;Xe(a=Qe())&&(r.copywriterContainer=a.first),Xe(a=Qe())&&(r.searchInput=a.first)}},hostVars:1,hostBindings:function(t,r){t&1&&G("keyup.escape",function(s){return r.onClick(s.target)},!1,aA),t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",type:"type"},outputs:{selectOption:"selectOption"},standalone:!1,decls:1,vars:1,consts:[["copywriterContainer",""],["copywriterModeRef",""],["genericModeRef",""],["uncheckedRadioButtonRef",""],["searchInput",""],[4,"ngIf"],["snippylyClickOutside","",1,"s-copywriter-container",3,"clickOutside"],[3,"ngIf","ngIfThen","ngIfElse"],["class","s-copywriter","data-snippyly-rewriter-disabled","true",3,"bottom-sheet","pointerdown","click",4,"ngIf"],["data-snippyly-rewriter-disabled","true",1,"s-copywriter",3,"pointerdown","click"],[1,"s-copywriter-header"],[1,"s-copywriter-name"],["width","16","height","16","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M6.49994 15.9999C6.34193 16.0007 6.18743 15.9533 6.05709 15.8639C5.92676 15.7746 5.8268 15.6476 5.77057 15.4999L4.52557 12.2624C4.50035 12.1972 4.46178 12.1379 4.41232 12.0885C4.36286 12.039 4.30362 12.0004 4.23838 11.9752L0.999941 10.7293C0.852423 10.6727 0.725541 10.5727 0.63604 10.4424C0.546538 10.3122 0.498626 10.1579 0.498626 9.99991C0.498626 9.8419 0.546538 9.68761 0.63604 9.55739C0.725541 9.42717 0.852423 9.32716 0.999941 9.27054L4.23744 8.02554C4.30268 8.00032 4.36193 7.96175 4.41138 7.91229C4.46084 7.86284 4.49941 7.80359 4.52463 7.73835L5.77057 4.49991C5.82718 4.3524 5.9272 4.22551 6.05742 4.13601C6.18764 4.04651 6.34193 3.9986 6.49994 3.9986C6.65795 3.9986 6.81225 4.04651 6.94246 4.13601C7.07268 4.22551 7.1727 4.3524 7.22932 4.49991L8.47432 7.73741C8.49953 7.80265 8.5381 7.8619 8.58756 7.91136C8.63702 7.96081 8.69627 7.99939 8.7615 8.0246L11.9803 9.26304C12.1338 9.31994 12.266 9.42278 12.359 9.55754C12.452 9.6923 12.5012 9.85244 12.4999 10.0162C12.4976 10.1714 12.4486 10.3224 12.3595 10.4495C12.2703 10.5767 12.1451 10.6741 11.9999 10.7293L8.76244 11.9743C8.6972 11.9995 8.63795 12.0381 8.5885 12.0875C8.53904 12.137 8.50047 12.1962 8.47525 12.2615L7.22932 15.4999C7.17308 15.6476 7.07312 15.7746 6.94279 15.8639C6.81245 15.9533 6.65796 16.0007 6.49994 15.9999ZM2.74994 5.49991C2.6573 5.49991 2.56684 5.47184 2.49047 5.4194C2.4141 5.36696 2.35541 5.29262 2.32213 5.20616L1.79525 3.83616C1.78383 3.8062 1.76621 3.77899 1.74354 3.75632C1.72086 3.73364 1.69365 3.71602 1.66369 3.7046L0.293691 3.17773C0.207247 3.14444 0.132915 3.08574 0.0804885 3.00937C0.0280618 2.933 0 2.84255 0 2.74991C0 2.65728 0.0280618 2.56682 0.0804885 2.49045C0.132915 2.41408 0.207247 2.35539 0.293691 2.3221L1.66369 1.79523C1.69362 1.78375 1.72081 1.76611 1.74347 1.74345C1.76614 1.72078 1.78378 1.6936 1.79525 1.66366L2.31744 0.305851C2.34689 0.225914 2.39757 0.155514 2.46402 0.102216C2.53048 0.0489189 2.6102 0.0147393 2.69463 0.00335107C2.79599 -0.00897073 2.89856 0.0128976 2.98608 0.0654883C3.0736 0.118079 3.14105 0.198382 3.17775 0.293664L3.70463 1.66366C3.7161 1.6936 3.73374 1.72078 3.75641 1.74345C3.77908 1.76611 3.80626 1.78375 3.83619 1.79523L5.20619 2.3221C5.29263 2.35539 5.36697 2.41408 5.41939 2.49045C5.47182 2.56682 5.49988 2.65728 5.49988 2.74991C5.49988 2.84255 5.47182 2.933 5.41939 3.00937C5.36697 3.08574 5.29263 3.14444 5.20619 3.17773L3.83619 3.7046C3.80623 3.71602 3.77902 3.73364 3.75635 3.75632C3.73367 3.77899 3.71605 3.8062 3.70463 3.83616L3.17775 5.20616C3.14447 5.29262 3.08578 5.36696 3.00941 5.4194C2.93304 5.47184 2.84258 5.49991 2.74994 5.49991ZM12.4999 7.99991C12.3989 7.99988 12.3002 7.96923 12.2169 7.91199C12.1336 7.85475 12.0696 7.77362 12.0334 7.67929L11.3196 5.82398C11.3071 5.79128 11.2878 5.76159 11.263 5.73683C11.2383 5.71207 11.2086 5.69278 11.1759 5.68023L9.32057 4.96648C9.22631 4.93016 9.14526 4.86614 9.0881 4.78286C9.03094 4.69957 9.00034 4.60093 9.00034 4.49991C9.00034 4.3989 9.03094 4.30026 9.0881 4.21697C9.14526 4.13369 9.22631 4.06967 9.32057 4.03335L11.1759 3.3196C11.2086 3.30705 11.2383 3.28776 11.263 3.263C11.2878 3.23823 11.3071 3.20854 11.3196 3.17585L12.0281 1.33366C12.0604 1.24655 12.1158 1.16983 12.1882 1.11167C12.2607 1.0535 12.3476 1.01607 12.4396 1.00335C12.5502 0.989962 12.6621 1.0139 12.7576 1.07136C12.8531 1.12883 12.9266 1.21652 12.9665 1.32054L13.6803 3.17585C13.6928 3.20854 13.7121 3.23823 13.7369 3.263C13.7616 3.28776 13.7913 3.30705 13.824 3.3196L15.6793 4.03335C15.7736 4.06967 15.8546 4.13369 15.9118 4.21697C15.9689 4.30026 15.9995 4.3989 15.9995 4.49991C15.9995 4.60093 15.9689 4.69957 15.9118 4.78286C15.8546 4.86614 15.7736 4.93016 15.6793 4.96648L13.824 5.68023C13.7913 5.69278 13.7616 5.71207 13.7369 5.73683C13.7121 5.76159 13.6928 5.79128 13.6803 5.82398L12.9665 7.67929C12.9302 7.77362 12.8663 7.85475 12.783 7.91199C12.6997 7.96923 12.601 7.99988 12.4999 7.99991Z","fill","white"],[1,"s-copywriter-header-actions"],[1,"s-copywriter-refresh","s-tooltip","s-tooltip-light",3,"click"],[1,"s-tooltiptext"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M12.793 2.29303C12.9805 2.10556 13.2348 2.00024 13.5 2.00024C13.7652 2.00024 14.0195 2.10556 14.207 2.29303L17.207 5.29303C17.3945 5.48056 17.4998 5.73487 17.4998 6.00003C17.4998 6.26519 17.3945 6.5195 17.207 6.70703L14.207 9.70703C14.0184 9.88919 13.7658 9.98998 13.5036 9.9877C13.2414 9.98543 12.9906 9.88026 12.8052 9.69485C12.6198 9.50944 12.5146 9.25863 12.5123 8.99643C12.51 8.73423 12.6108 8.48163 12.793 8.29303L14.086 7.00003H12.5C8.952 7.00003 6 9.95203 6 13.5C6 17.048 8.952 20 12.5 20C16.048 20 19 17.048 19 13.5C19 13.2348 19.1054 12.9805 19.2929 12.7929C19.4804 12.6054 19.7348 12.5 20 12.5C20.2652 12.5 20.5196 12.6054 20.7071 12.7929C20.8946 12.9805 21 13.2348 21 13.5C21 18.152 17.152 22 12.5 22C7.848 22 4 18.152 4 13.5C4 8.84803 7.848 5.00003 12.5 5.00003H14.086L12.793 3.70703C12.6055 3.5195 12.5002 3.26519 12.5002 3.00003C12.5002 2.73487 12.6055 2.48056 12.793 2.29303Z","fill","white"],[1,"s-copywriter-close-btn",3,"click"],["d","M18.364 5.63604L12 12.0001L5.63604 5.63604L4.22204 7.05004L10.586 13.4141L4.22204 19.7781L5.63604 21.1921L12 14.8281L18.364 21.1921L19.778 19.7781L13.414 13.4141L19.778 7.05004L18.364 5.63604Z","fill","white"],[1,"s-copywriter-content"],[4,"ngFor","ngForOf"],["class","s-copywriter-loading",4,"ngIf"],[1,"s-copywriter-footer"],["class","s-copywriter-show-original-text-btn",3,"click",4,"ngIf"],["class","s-copywriter-create-task-btn s-tooltip s-tooltip-light",3,"disabled","click",4,"ngIf"],["width","177","height","22","viewBox","0 0 177 22","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-copywriter-chatgpt-credits"],["d","M19.1863 9.55926C19.413 8.88583 19.4914 8.17243 19.4163 7.46672C19.3411 6.76101 19.1142 6.07924 18.7507 5.46694C17.6447 3.56801 15.4219 2.59123 13.251 3.05022C12.65 2.3907 11.8835 1.8988 11.0287 1.62391C10.174 1.34903 9.26089 1.30085 8.38125 1.4842C7.5016 1.66755 6.68635 2.07598 6.01737 2.66848C5.34839 3.26098 4.84923 4.01667 4.57002 4.85968C3.86515 5.00225 3.19925 5.29159 2.61683 5.70836C2.0344 6.12512 1.54887 6.65971 1.19267 7.2764C0.074703 9.17233 0.328531 11.5638 1.82025 13.1903C1.59271 13.8634 1.5135 14.5767 1.58794 15.2824C1.66238 15.9881 1.88875 16.67 2.25189 17.2825C3.35924 19.1821 5.58346 20.1589 7.75549 19.6992C8.23304 20.2297 8.81981 20.6535 9.47664 20.9425C10.1335 21.2315 10.8452 21.3789 11.5644 21.3749C13.7895 21.3768 15.7608 19.96 16.4405 17.87C17.1453 17.7272 17.811 17.4377 18.3934 17.021C18.9758 16.6042 19.4614 16.0698 19.8178 15.4533C20.9222 13.5607 20.6674 11.1822 19.1863 9.55926ZM11.5644 20.066C10.6762 20.0674 9.81593 19.7603 9.13432 19.1986L9.25424 19.1316L13.291 16.8332C13.3914 16.775 13.4749 16.6921 13.533 16.5926C13.5912 16.4931 13.6221 16.3803 13.6228 16.2654V10.6513L15.3294 11.6251C15.3464 11.6337 15.3583 11.6498 15.3614 11.6685V16.3206C15.357 18.3873 13.6596 20.0617 11.5644 20.066ZM3.40299 16.6282C2.95757 15.8695 2.79765 14.9802 2.95135 14.1167L3.07119 14.1877L7.11197 16.4862C7.21195 16.5441 7.32578 16.5746 7.4417 16.5746C7.55762 16.5746 7.67145 16.5441 7.77143 16.4862L12.7074 13.6792V15.6228C12.707 15.6329 12.7042 15.6427 12.6994 15.6516C12.6945 15.6604 12.6877 15.6681 12.6795 15.674L8.5908 18.0001C6.77385 19.0326 4.45252 18.4187 3.40299 16.6282ZM2.33978 7.95456C2.78829 7.19103 3.49621 6.60866 4.33822 6.31056V11.0415C4.3367 11.1558 4.36631 11.2684 4.42396 11.3676C4.4816 11.4668 4.56518 11.5489 4.66596 11.6053L9.57799 14.4006L7.87135 15.3743C7.86212 15.3792 7.85183 15.3817 7.84139 15.3817C7.83094 15.3817 7.82066 15.3792 7.81143 15.3743L3.73072 13.0523C1.91736 12.0155 1.29549 9.72749 2.33978 7.93491V7.95456ZM16.3606 11.1677L11.4324 8.34489L13.1352 7.37504C13.1444 7.37021 13.1547 7.36768 13.1652 7.36768C13.1756 7.36768 13.1859 7.37021 13.1952 7.37504L17.2759 9.70114C17.8998 10.0563 18.4085 10.5791 18.7425 11.2087C19.0764 11.8383 19.2219 12.5486 19.162 13.2567C19.1021 13.9648 18.8392 14.6415 18.404 15.2078C17.9688 15.774 17.3793 16.2065 16.7043 16.4546V11.7236C16.7008 11.6095 16.6672 11.4983 16.607 11.4008C16.5467 11.3034 16.4618 11.2231 16.3606 11.1677ZM18.0592 8.64852L17.9392 8.57747L13.9065 6.25931C13.8059 6.2011 13.6914 6.1704 13.5748 6.1704C13.4582 6.1704 13.3437 6.2011 13.2431 6.25931L8.31096 9.06644V7.12281C8.30991 7.11293 8.31158 7.10296 8.3158 7.09394C8.32003 7.08492 8.32664 7.07719 8.33494 7.07157L12.4156 4.7494C13.0411 4.39401 13.7561 4.22161 14.4772 4.25238C15.1983 4.28315 15.8957 4.51581 16.4876 4.92315C17.0796 5.33049 17.5418 5.89568 17.82 6.5526C18.0983 7.20952 18.1812 7.93103 18.0591 8.63273V8.64852H18.0592ZM7.37979 12.0942L5.67314 11.1244C5.66461 11.1193 5.65732 11.1124 5.65179 11.1042C5.64625 11.096 5.64261 11.0868 5.64111 11.077V6.43679C5.64206 5.72494 5.84842 5.02807 6.23608 4.42765C6.62374 3.82723 7.17667 3.34807 7.83022 3.04621C8.48377 2.74434 9.21094 2.63224 9.9267 2.723C10.6425 2.81377 11.3172 3.10365 11.8721 3.55877L11.7522 3.62581L7.71549 5.92424C7.61503 5.98237 7.53163 6.06527 7.47347 6.16481C7.41531 6.26434 7.3844 6.37709 7.38377 6.49197L7.37979 12.0943V12.0942ZM8.30697 10.1229L10.5053 8.87317L12.7074 10.123V12.6225L10.5132 13.8723L8.31104 12.6225L8.30697 10.1229Z","fill","#59595F"],["d","M36.354 9.043C36.354 9.53767 36.2373 10.0043 36.004 10.443C35.7707 10.8817 35.3973 11.241 34.884 11.521C34.3707 11.7917 33.7127 11.927 32.91 11.927H31.146V15.875H29.55V6.145H32.91C33.6567 6.145 34.2867 6.27567 34.8 6.537C35.3227 6.789 35.71 7.13433 35.962 7.573C36.2233 8.01167 36.354 8.50167 36.354 9.043ZM32.91 10.625C33.5167 10.625 33.9693 10.4897 34.268 10.219C34.5667 9.939 34.716 9.547 34.716 9.043C34.716 7.979 34.114 7.447 32.91 7.447H31.146V10.625H32.91ZM41.2222 16.001C40.4942 16.001 39.8362 15.8377 39.2482 15.511C38.6602 15.175 38.1982 14.7083 37.8622 14.111C37.5262 13.5043 37.3582 12.8043 37.3582 12.011C37.3582 11.227 37.5308 10.5317 37.8762 9.925C38.2215 9.31833 38.6928 8.85167 39.2902 8.525C39.8875 8.19833 40.5548 8.035 41.2922 8.035C42.0295 8.035 42.6968 8.19833 43.2942 8.525C43.8915 8.85167 44.3628 9.31833 44.7082 9.925C45.0535 10.5317 45.2262 11.227 45.2262 12.011C45.2262 12.795 45.0488 13.4903 44.6942 14.097C44.3395 14.7037 43.8542 15.175 43.2382 15.511C42.6315 15.8377 41.9595 16.001 41.2222 16.001ZM41.2222 14.615C41.6328 14.615 42.0155 14.517 42.3702 14.321C42.7342 14.125 43.0282 13.831 43.2522 13.439C43.4762 13.047 43.5882 12.571 43.5882 12.011C43.5882 11.451 43.4808 10.9797 43.2662 10.597C43.0515 10.205 42.7668 9.911 42.4122 9.715C42.0575 9.519 41.6748 9.421 41.2642 9.421C40.8535 9.421 40.4708 9.519 40.1162 9.715C39.7708 9.911 39.4955 10.205 39.2902 10.597C39.0848 10.9797 38.9822 11.451 38.9822 12.011C38.9822 12.8417 39.1922 13.4857 39.6122 13.943C40.0415 14.391 40.5782 14.615 41.2222 14.615ZM57.1639 8.161L54.7699 15.875H53.0899L51.5359 10.177L49.9819 15.875H48.3019L45.8939 8.161H47.5179L49.1279 14.363L50.7659 8.161H52.4319L53.9999 14.335L55.5959 8.161H57.1639ZM65.4266 11.829C65.4266 12.1183 65.408 12.3797 65.3706 12.613H59.4766C59.5233 13.229 59.752 13.7237 60.1626 14.097C60.5733 14.4703 61.0773 14.657 61.6746 14.657C62.5333 14.657 63.14 14.2977 63.4946 13.579H65.2166C64.9833 14.2883 64.5586 14.8717 63.9426 15.329C63.336 15.777 62.58 16.001 61.6746 16.001C60.9373 16.001 60.2746 15.8377 59.6866 15.511C59.108 15.175 58.6506 14.7083 58.3146 14.111C57.988 13.5043 57.8246 12.8043 57.8246 12.011C57.8246 11.2177 57.9833 10.5223 58.3006 9.925C58.6273 9.31833 59.08 8.85167 59.6586 8.525C60.2466 8.19833 60.9186 8.035 61.6746 8.035C62.4026 8.035 63.0513 8.19367 63.6206 8.511C64.19 8.82833 64.6333 9.27633 64.9506 9.855C65.268 10.4243 65.4266 11.0823 65.4266 11.829ZM63.7606 11.325C63.7513 10.737 63.5413 10.2657 63.1306 9.911C62.72 9.55633 62.2113 9.379 61.6046 9.379C61.054 9.379 60.5826 9.55633 60.1906 9.911C59.7986 10.2563 59.5653 10.7277 59.4906 11.325H63.7606ZM68.5933 9.281C68.8266 8.889 69.1346 8.58567 69.5173 8.371C69.9093 8.147 70.3713 8.035 70.9033 8.035V9.687H70.4973C69.8719 9.687 69.3959 9.84567 69.0693 10.163C68.7519 10.4803 68.5933 11.031 68.5933 11.815V15.875H66.9973V8.161H68.5933V9.281ZM79.4403 11.829C79.4403 12.1183 79.4216 12.3797 79.3843 12.613H73.4903C73.537 13.229 73.7656 13.7237 74.1763 14.097C74.587 14.4703 75.091 14.657 75.6883 14.657C76.547 14.657 77.1536 14.2977 77.5083 13.579H79.2303C78.997 14.2883 78.5723 14.8717 77.9563 15.329C77.3496 15.777 76.5936 16.001 75.6883 16.001C74.951 16.001 74.2883 15.8377 73.7003 15.511C73.1216 15.175 72.6643 14.7083 72.3283 14.111C72.0016 13.5043 71.8383 12.8043 71.8383 12.011C71.8383 11.2177 71.997 10.5223 72.3143 9.925C72.641 9.31833 73.0936 8.85167 73.6723 8.525C74.2603 8.19833 74.9323 8.035 75.6883 8.035C76.4163 8.035 77.065 8.19367 77.6343 8.511C78.2036 8.82833 78.647 9.27633 78.9643 9.855C79.2816 10.4243 79.4403 11.0823 79.4403 11.829ZM77.7743 11.325C77.765 10.737 77.555 10.2657 77.1443 9.911C76.7336 9.55633 76.225 9.379 75.6183 9.379C75.0676 9.379 74.5963 9.55633 74.2043 9.911C73.8123 10.2563 73.579 10.7277 73.5043 11.325H77.7743ZM80.4789 11.983C80.4789 11.2083 80.6376 10.5223 80.9549 9.925C81.2816 9.32767 81.7203 8.86567 82.2709 8.539C82.8309 8.203 83.4516 8.035 84.1329 8.035C84.6369 8.035 85.1316 8.147 85.6169 8.371C86.1116 8.58567 86.5036 8.875 86.7929 9.239V5.515H88.4029V15.875H86.7929V14.713C86.5316 15.0863 86.1676 15.3943 85.7009 15.637C85.2436 15.8797 84.7163 16.001 84.1189 16.001C83.4469 16.001 82.8309 15.833 82.2709 15.497C81.7203 15.1517 81.2816 14.6757 80.9549 14.069C80.6376 13.453 80.4789 12.7577 80.4789 11.983ZM86.7929 12.011C86.7929 11.479 86.6809 11.017 86.4569 10.625C86.2423 10.233 85.9576 9.93433 85.6029 9.729C85.2483 9.52367 84.8656 9.421 84.4549 9.421C84.0443 9.421 83.6616 9.52367 83.3069 9.729C82.9523 9.925 82.6629 10.219 82.4389 10.611C82.2243 10.9937 82.1169 11.451 82.1169 11.983C82.1169 12.515 82.2243 12.9817 82.4389 13.383C82.6629 13.7843 82.9523 14.0923 83.3069 14.307C83.6709 14.5123 84.0536 14.615 84.4549 14.615C84.8656 14.615 85.2483 14.5123 85.6029 14.307C85.9576 14.1017 86.2423 13.803 86.4569 13.411C86.6809 13.0097 86.7929 12.543 86.7929 12.011ZM95.7319 9.309C96.0026 8.93567 96.3713 8.63233 96.8379 8.399C97.3139 8.15633 97.8413 8.035 98.4199 8.035C99.1013 8.035 99.7173 8.19833 100.268 8.525C100.819 8.85167 101.253 9.31833 101.57 9.925C101.887 10.5223 102.046 11.2083 102.046 11.983C102.046 12.7577 101.887 13.453 101.57 14.069C101.253 14.6757 100.814 15.1517 100.254 15.497C99.7033 15.833 99.0919 16.001 98.4199 16.001C97.8226 16.001 97.2906 15.8843 96.8239 15.651C96.3666 15.4177 96.0026 15.119 95.7319 14.755V15.875H94.1359V5.515H95.7319V9.309ZM100.422 11.983C100.422 11.451 100.31 10.9937 100.086 10.611C99.8713 10.219 99.5819 9.925 99.2179 9.729C98.8633 9.52367 98.4806 9.421 98.0699 9.421C97.6686 9.421 97.2859 9.52367 96.9219 9.729C96.5673 9.93433 96.2779 10.233 96.0539 10.625C95.8393 11.017 95.7319 11.479 95.7319 12.011C95.7319 12.543 95.8393 13.0097 96.0539 13.411C96.2779 13.803 96.5673 14.1017 96.9219 14.307C97.2859 14.5123 97.6686 14.615 98.0699 14.615C98.4806 14.615 98.8633 14.5123 99.2179 14.307C99.5819 14.0923 99.8713 13.7843 100.086 13.383C100.31 12.9817 100.422 12.515 100.422 11.983ZM110.568 8.161L105.836 19.501H104.184L105.752 15.749L102.714 8.161H104.492L106.662 14.041L108.916 8.161H110.568ZM114.877 10.989C114.877 10.037 115.097 9.183 115.535 8.427C115.983 7.671 116.585 7.083 117.341 6.663C118.107 6.23367 118.942 6.019 119.847 6.019C120.883 6.019 121.803 6.27567 122.605 6.789C123.417 7.293 124.005 8.01167 124.369 8.945H122.451C122.199 8.43167 121.849 8.049 121.401 7.797C120.953 7.545 120.435 7.419 119.847 7.419C119.203 7.419 118.629 7.56367 118.125 7.853C117.621 8.14233 117.225 8.55767 116.935 9.099C116.655 9.64033 116.515 10.2703 116.515 10.989C116.515 11.7077 116.655 12.3377 116.935 12.879C117.225 13.4203 117.621 13.8403 118.125 14.139C118.629 14.4283 119.203 14.573 119.847 14.573C120.435 14.573 120.953 14.447 121.401 14.195C121.849 13.943 122.199 13.5603 122.451 13.047H124.369C124.005 13.9803 123.417 14.699 122.605 15.203C121.803 15.707 120.883 15.959 119.847 15.959C118.933 15.959 118.097 15.749 117.341 15.329C116.585 14.8997 115.983 14.307 115.535 13.551C115.097 12.795 114.877 11.941 114.877 10.989ZM130.228 8.035C130.816 8.035 131.338 8.161 131.796 8.413C132.262 8.665 132.626 9.03833 132.888 9.533C133.158 10.0277 133.294 10.625 133.294 11.325V15.875H131.712V11.563C131.712 10.8723 131.539 10.345 131.194 9.981C130.848 9.60767 130.377 9.421 129.78 9.421C129.182 9.421 128.706 9.60767 128.352 9.981C128.006 10.345 127.834 10.8723 127.834 11.563V15.875H126.238V5.515H127.834V9.057C128.104 8.73033 128.445 8.47833 128.856 8.301C129.276 8.12367 129.733 8.035 130.228 8.035ZM134.797 11.983C134.797 11.2083 134.956 10.5223 135.273 9.925C135.6 9.32767 136.039 8.86567 136.589 8.539C137.149 8.203 137.765 8.035 138.437 8.035C139.044 8.035 139.571 8.15633 140.019 8.399C140.477 8.63233 140.841 8.92633 141.111 9.281V8.161H142.721V15.875H141.111V14.727C140.841 15.091 140.472 15.3943 140.005 15.637C139.539 15.8797 139.007 16.001 138.409 16.001C137.747 16.001 137.14 15.833 136.589 15.497C136.039 15.1517 135.6 14.6757 135.273 14.069C134.956 13.453 134.797 12.7577 134.797 11.983ZM141.111 12.011C141.111 11.479 140.999 11.017 140.775 10.625C140.561 10.233 140.276 9.93433 139.921 9.729C139.567 9.52367 139.184 9.421 138.773 9.421C138.363 9.421 137.98 9.52367 137.625 9.729C137.271 9.925 136.981 10.219 136.757 10.611C136.543 10.9937 136.435 11.451 136.435 11.983C136.435 12.515 136.543 12.9817 136.757 13.383C136.981 13.7843 137.271 14.0923 137.625 14.307C137.989 14.5123 138.372 14.615 138.773 14.615C139.184 14.615 139.567 14.5123 139.921 14.307C140.276 14.1017 140.561 13.803 140.775 13.411C140.999 13.0097 141.111 12.543 141.111 12.011ZM146.68 9.463V13.733C146.68 14.0223 146.745 14.2323 146.876 14.363C147.016 14.4843 147.249 14.545 147.576 14.545H148.556V15.875H147.296C146.577 15.875 146.026 15.707 145.644 15.371C145.261 15.035 145.07 14.489 145.07 13.733V9.463H144.16V8.161H145.07V6.243H146.68V8.161H148.556V9.463H146.68ZM157.069 8.945C156.817 8.45967 156.467 8.09567 156.019 7.853C155.571 7.601 155.053 7.475 154.465 7.475C153.821 7.475 153.247 7.61967 152.743 7.909C152.239 8.19833 151.842 8.609 151.553 9.141C151.273 9.673 151.133 10.289 151.133 10.989C151.133 11.689 151.273 12.3097 151.553 12.851C151.842 13.383 152.239 13.7937 152.743 14.083C153.247 14.3723 153.821 14.517 154.465 14.517C155.333 14.517 156.037 14.2743 156.579 13.789C157.12 13.3037 157.451 12.6457 157.573 11.815H153.919V10.541H159.281V11.787C159.178 12.543 158.907 13.2383 158.469 13.873C158.039 14.5077 157.475 15.0163 156.775 15.399C156.084 15.7723 155.314 15.959 154.465 15.959C153.55 15.959 152.715 15.749 151.959 15.329C151.203 14.8997 150.601 14.307 150.153 13.551C149.714 12.795 149.495 11.941 149.495 10.989C149.495 10.037 149.714 9.183 150.153 8.427C150.601 7.671 151.203 7.083 151.959 6.663C152.724 6.23367 153.559 6.019 154.465 6.019C155.501 6.019 156.42 6.27567 157.223 6.789C158.035 7.293 158.623 8.01167 158.987 8.945H157.069ZM167.659 9.043C167.659 9.53767 167.542 10.0043 167.309 10.443C167.075 10.8817 166.702 11.241 166.189 11.521C165.675 11.7917 165.017 11.927 164.215 11.927H162.451V15.875H160.855V6.145H164.215C164.961 6.145 165.591 6.27567 166.105 6.537C166.627 6.789 167.015 7.13433 167.267 7.573C167.528 8.01167 167.659 8.50167 167.659 9.043ZM164.215 10.625C164.821 10.625 165.274 10.4897 165.573 10.219C165.871 9.939 166.021 9.547 166.021 9.043C166.021 7.979 165.419 7.447 164.215 7.447H162.451V10.625H164.215ZM175.467 6.145V7.447H172.877V15.875H171.281V7.447H168.677V6.145H175.467Z","fill","#59595F"],[1,"s-copywriter-content-item",3,"click"],["class","s-bullet","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf","ngIfElse"],[1,"s-copywriter-content-item-text"],["viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-bullet"],["x","1","y","1","width","22","height","22","rx","11","fill","#141416"],["x","6","y","6","width","12","height","12","rx","6","fill","#625DF5"],["x","1","y","1","width","22","height","22","rx","11","stroke","#777E91","stroke-width","2"],[1,"s-copywriter-loading"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","xlink","http://www.w3.org/1999/xlink","width","50px","height","50px","viewBox","0 0 100 100","preserveAspectRatio","xMidYMid"],["cx","27.5","cy","57.5","r","5","fill","#ffcb00"],["attributeName","cy","calcMode","spline","keySplines","0 0.5 0.5 1;0.5 0 1 0.5;0.5 0.5 0.5 0.5","repeatCount","indefinite","values","57.5;42.5;57.5;57.5","keyTimes","0;0.3;0.6;1","dur","1s","begin","-0.6s"],["cx","42.5","cy","57.5","r","5","fill","#ff7162"],["attributeName","cy","calcMode","spline","keySplines","0 0.5 0.5 1;0.5 0 1 0.5;0.5 0.5 0.5 0.5","repeatCount","indefinite","values","57.5;42.5;57.5;57.5","keyTimes","0;0.3;0.6;1","dur","1s","begin","-0.44999999999999996s"],["cx","57.5","cy","57.5","r","5","fill","#0dcf82"],["attributeName","cy","calcMode","spline","keySplines","0 0.5 0.5 1;0.5 0 1 0.5;0.5 0.5 0.5 0.5","repeatCount","indefinite","values","57.5;42.5;57.5;57.5","keyTimes","0;0.3;0.6;1","dur","1s","begin","-0.3s"],["cx","72.5","cy","57.5","r","5","fill","#a259fe"],["attributeName","cy","calcMode","spline","keySplines","0 0.5 0.5 1;0.5 0 1 0.5;0.5 0.5 0.5 0.5","repeatCount","indefinite","values","57.5;42.5;57.5;57.5","keyTimes","0;0.3;0.6;1","dur","1s","begin","-0.15s"],[1,"s-copywriter-show-original-text-btn",3,"click"],[1,"s-copywriter-create-task-btn","s-tooltip","s-tooltip-light",3,"click"],["class","s-tooltiptext",4,"ngIf"],[1,"s-input"],["width","21","height","21","viewBox","0 0 21 21","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.5613 9.05926C19.788 8.38583 19.8664 7.67243 19.7913 6.96672C19.7161 6.26101 19.4892 5.57924 19.1257 4.96694C18.0197 3.06801 15.7969 2.09123 13.626 2.55022C13.025 1.8907 12.2585 1.3988 11.4037 1.12391C10.549 0.849032 9.63589 0.800846 8.75625 0.984198C7.8766 1.16755 7.06135 1.57598 6.39237 2.16848C5.72339 2.76098 5.22423 3.51667 4.94502 4.35968C4.24015 4.50225 3.57425 4.79159 2.99183 5.20836C2.4094 5.62512 1.92387 6.15971 1.56767 6.7764C0.449703 8.67233 0.703531 11.0638 2.19525 12.6903C1.96771 13.3634 1.8885 14.0767 1.96294 14.7824C2.03738 15.4881 2.26375 16.17 2.62689 16.7825C3.73424 18.6821 5.95846 19.6589 8.13049 19.1992C8.60804 19.7297 9.19481 20.1535 9.85164 20.4425C10.5085 20.7315 11.2202 20.8789 11.9394 20.8749C14.1645 20.8768 16.1358 19.46 16.8155 17.37C17.5203 17.2272 18.186 16.9377 18.7684 16.521C19.3508 16.1042 19.8364 15.5698 20.1928 14.9533C21.2972 13.0607 21.0424 10.6822 19.5613 9.05926ZM11.9394 19.566C11.0512 19.5674 10.1909 19.2603 9.50932 18.6986L9.62924 18.6316L13.666 16.3332C13.7664 16.275 13.8499 16.1921 13.908 16.0926C13.9662 15.9931 13.9971 15.8803 13.9978 15.7654V10.1513L15.7044 11.1251C15.7214 11.1337 15.7333 11.1498 15.7364 11.1685V15.8206C15.732 17.8873 14.0346 19.5617 11.9394 19.566ZM3.77799 16.1282C3.33257 15.3695 3.17265 14.4802 3.32635 13.6167L3.44619 13.6877L7.48697 15.9862C7.58695 16.0441 7.70078 16.0746 7.8167 16.0746C7.93262 16.0746 8.04645 16.0441 8.14643 15.9862L13.0824 13.1792V15.1228C13.082 15.1329 13.0792 15.1427 13.0744 15.1516C13.0695 15.1604 13.0627 15.1681 13.0545 15.174L8.9658 17.5001C7.14885 18.5326 4.82752 17.9187 3.77799 16.1282ZM2.71478 7.45456C3.16329 6.69103 3.87121 6.10866 4.71322 5.81056V10.5415C4.7117 10.6558 4.74131 10.7684 4.79896 10.8676C4.8566 10.9668 4.94018 11.0489 5.04096 11.1053L9.95299 13.9006L8.24635 14.8743C8.23712 14.8792 8.22683 14.8817 8.21639 14.8817C8.20594 14.8817 8.19566 14.8792 8.18643 14.8743L4.10572 12.5523C2.29236 11.5155 1.67049 9.22749 2.71478 7.43491V7.45456ZM16.7356 10.6677L11.8074 7.84489L13.5102 6.87504C13.5194 6.87021 13.5297 6.86768 13.5402 6.86768C13.5506 6.86768 13.5609 6.87021 13.5702 6.87504L17.6509 9.20114C18.2748 9.55626 18.7835 10.0791 19.1175 10.7087C19.4514 11.3383 19.5969 12.0486 19.537 12.7567C19.4771 13.4648 19.2142 14.1415 18.779 14.7078C18.3438 15.274 17.7543 15.7065 17.0793 15.9546V11.2236C17.0758 11.1095 17.0422 10.9983 16.982 10.9008C16.9217 10.8034 16.8368 10.7231 16.7356 10.6677ZM18.4342 8.14852L18.3142 8.07747L14.2815 5.75931C14.1809 5.7011 14.0664 5.6704 13.9498 5.6704C13.8332 5.6704 13.7187 5.7011 13.6181 5.75931L8.68596 8.56644V6.62281C8.68491 6.61293 8.68658 6.60296 8.6908 6.59394C8.69503 6.58492 8.70164 6.57719 8.70994 6.57157L12.7906 4.2494C13.4161 3.89401 14.1311 3.72161 14.8522 3.75238C15.5733 3.78315 16.2707 4.01581 16.8626 4.42315C17.4546 4.83049 17.9168 5.39568 18.195 6.0526C18.4733 6.70952 18.5562 7.43103 18.4341 8.13273V8.14852H18.4342ZM7.75479 11.5942L6.04814 10.6244C6.03961 10.6193 6.03232 10.6124 6.02679 10.6042C6.02125 10.596 6.01761 10.5868 6.01611 10.577V5.93679C6.01706 5.22494 6.22342 4.52807 6.61108 3.92765C6.99874 3.32723 7.55167 2.84807 8.20522 2.54621C8.85877 2.24434 9.58594 2.13224 10.3017 2.223C11.0175 2.31377 11.6922 2.60365 12.2471 3.05877L12.1272 3.12581L8.09049 5.42424C7.99003 5.48237 7.90663 5.56527 7.84847 5.66481C7.79031 5.76434 7.7594 5.87709 7.75877 5.99197L7.75479 11.5943V11.5942ZM8.68197 9.62291L10.8803 8.37317L13.0824 9.62299V12.1225L10.8882 13.3723L8.68604 12.1225L8.68197 9.62291Z","fill","#59595F"],[1,"s-copywriter-input",3,"ngModelChange","keyup.enter","placeholder","ngModel","disabled"],["class","s-copywriter-submit-btn",3,"disabled","click",4,"ngIf"],[1,"s-copywriter-submit-btn",3,"click"],["width","25","height","24","viewBox","0 0 25 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M4.65 19.4253C4.31667 19.5586 4 19.5293 3.7 19.3373C3.4 19.146 3.25 18.867 3.25 18.5003V14.7753C3.25 14.542 3.31667 14.3336 3.45 14.1503C3.58333 13.967 3.76667 13.8503 4 13.8003L11.25 12.0003L4 10.2003C3.76667 10.1503 3.58333 10.0336 3.45 9.8503C3.31667 9.66697 3.25 9.45863 3.25 9.2253V5.5003C3.25 5.13363 3.4 4.8543 3.7 4.6623C4 4.47097 4.31667 4.44197 4.65 4.5753L20.05 11.0753C20.4667 11.2586 20.675 11.567 20.675 12.0003C20.675 12.4336 20.4667 12.742 20.05 12.9253L4.65 19.4253Z","fill","#DCDDE0"],[1,"s-copywriter-submit-btn","s-tooltip","s-tooltip-light",3,"click"],["d","M4.65 19.4253C4.31667 19.5586 4 19.5293 3.7 19.3373C3.4 19.146 3.25 18.867 3.25 18.5003V14.7753C3.25 14.542 3.31667 14.3336 3.45 14.1503C3.58333 13.967 3.76667 13.8503 4 13.8003L11.25 12.0003L4 10.2003C3.76667 10.1503 3.58333 10.0336 3.45 9.8503C3.31667 9.66697 3.25 9.45863 3.25 9.2253V5.5003C3.25 5.13363 3.4 4.8543 3.7 4.6623C4 4.47097 4.31667 4.44197 4.65 4.5753L20.05 11.0753C20.4667 11.2586 20.675 11.567 20.675 12.0003C20.675 12.4336 20.4667 12.742 20.05 12.9253L4.65 19.4253Z","fill","#303034"],[1,"s-copywriter-divider"]],template:function(t,r){t&1&&g(0,ltn,8,3,"ng-container",5),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[vt,X,ha,es,ka,Xn,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;text-align:left!important;line-height:1.5!important;color:#000!important}.s-bullet[_ngcontent-%COMP%]{flex:0 0 20px}.s-copywriter[_ngcontent-%COMP%], .s-copywriter-header[_ngcontent-%COMP%], .s-copywriter-name[_ngcontent-%COMP%], .s-copywriter-refresh[_ngcontent-%COMP%], .s-copywriter-footer[_ngcontent-%COMP%], .s-copywriter-content-item[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;width:max-content!important}.s-copywriter-refresh[_ngcontent-%COMP%]{cursor:pointer!important}.s-copywriter-refresh.disabled[_ngcontent-%COMP%]{cursor:not-allowed!important}.s-copywriter-refresh.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#939393!important}.s-copywriter-header-actions[_ngcontent-%COMP%]{display:flex!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-copywriter-header-actions[_ngcontent-%COMP%] .s-copywriter-close-btn[_ngcontent-%COMP%]{cursor:pointer!important}.s-copywriter[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;background:#141416!important;border:2px solid #262829!important;border-radius:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important;width:calc((28rem + 0px) * var(--velt-base-rem-unit))!important;align-items:center!important;gap:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;min-width:calc((23rem + 0px) * var(--velt-base-rem-unit))!important;border:1px solid #222226!important;padding:calc((1.2rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-copywriter.bottom-sheet[_ngcontent-%COMP%]{margin:0!important;width:100%!important;max-width:unset!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important;box-sizing:border-box!important;max-height:80vh!important}.s-copywriter.bottom-sheet[_ngcontent-%COMP%] .s-copywriter-chatgpt-credits[_ngcontent-%COMP%]{min-width:177px!important}.s-copywriter-name[_ngcontent-%COMP%]{flex-direction:row!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-copywriter-header[_ngcontent-%COMP%]{flex-direction:row!important;width:100%!important;align-items:center!important;justify-content:space-between!important}.s-copywriter-divider[_ngcontent-%COMP%]{margin-top:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border:1px solid #222226!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((.7rem + 0px) * var(--velt-base-rem-unit))!important;transition:calc((.1rem + 0px) * var(--velt-base-rem-unit)) ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:hover{background:#4f4bbf!important}.s-primary.disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-primary[_ngcontent-%COMP%]:not(.disabled):hover{background:#4f4bbf!important}.s-copywriter-content[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;max-height:300px!important;overflow-y:auto!important}.s-copywriter-content-item[_ngcontent-%COMP%]{flex-direction:row!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;align-items:flex-start!important;font-weight:300!important;font-style:normal!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#e6e8eca3!important;width:100%!important;cursor:pointer!important}.s-copywriter-content-item[_ngcontent-%COMP%] .s-copywriter-content-item-text[_ngcontent-%COMP%]{color:#e6e8eca3!important}.s-copywriter-content-item.s-selected[_ngcontent-%COMP%] .s-copywriter-content-item-text[_ngcontent-%COMP%], .s-selected[_ngcontent-%COMP%]{color:#fff!important}.s-copywriter-loading[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important;align-items:center!important}.s-copywriter-show-original-text-btn[_ngcontent-%COMP%]{font-size:14px!important;font-weight:500!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#e6e8ec!important;opacity:.75!important;text-decoration:underline!important;cursor:pointer!important;align-self:center!important}.s-copywriter-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important;align-items:center!important;margin-top:16px!important;flex-direction:row!important;width:100%!important}.s-copywriter-footer[_ngcontent-%COMP%] .s-copywriter-show-original-text-btn[_ngcontent-%COMP%]{font-size:14px!important;font-weight:500!important;line-height:24px!important;color:#e6e8ec!important;opacity:.75!important;text-decoration:underline!important;cursor:pointer!important}.s-copywriter-create-task-btn[_ngcontent-%COMP%]{padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;background:#625df5!important;border-radius:8px!important;border:0!important;color:#fff!important;font-weight:700!important;transition:.2s!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important;line-height:1.5!important;cursor:pointer!important}.s-copywriter-create-task-btn[_ngcontent-%COMP%]:hover{background:#4742dc!important}.s-copywriter-create-task-btn.disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-input[_ngcontent-%COMP%]{width:100%!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-copywriter-name[_ngcontent-%COMP%]{flex-direction:row!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;flex-grow:1!important}.s-copywriter-header[_ngcontent-%COMP%]{flex-direction:row!important;width:100%!important;align-items:center!important;justify-content:space-between!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important}.s-copywriter-input[_ngcontent-%COMP%]{width:100%!important;background:transparent!important;border:0!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;display:flex!important;color:#fff!important}.s-copywriter-input[_ngcontent-%COMP%]:disabled{color:#e6e8eca3!important}.s-copywriter-submit-btn[_ngcontent-%COMP%]{display:flex!important}.s-copywriter-submit-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#fff!important;cursor:pointer!important}.s-copywriter-submit-btn.disabled[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#303034!important;cursor:not-allowed!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;align-self:flex-end!important;padding:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((.7rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:500!important;transition:.1s ease!important;cursor:pointer!important}"],changeDetection:0});let i=o;return i})();var K0e=(()=>{let o=class o{get annotation(){return this._annotation}set annotation(e){this._annotation=e,this.setBottomSheetData()}constructor(e,t){this.bottomSheet=e,this.loggingService=t,this.bottomSheetData$=new ve(null),this.selectOption=new Pe,this.veltElement=!0}ngOnInit(){}ngAfterViewInit(){this.setBottomSheetData(),this.openBottomSheet()}setBottomSheetData(){try{this.bottomSheetData$.next({annotation:this.annotation,rewriterPinSelected:!0,selectOption:e=>{this.selectOption.emit(e)},dismiss:()=>{this.closeBottomSheet()}})}catch(e){this.loggingService.catch("Error in RewriterBottomSheetComponent setBottomSheetData: ",e)}}openBottomSheet(){try{this.closeBottomSheet(),this.bottomSheetRef=this.bottomSheet.open(l7,{data:this.bottomSheetData$.asObservable(),panelClass:["snippyly-rewriter-bottom-sheet-container","velt-mat-bottom-sheet-container"],disableClose:!0})}catch(e){this.loggingService.catch("Error in RewriterBottomSheetComponent openBottomSheet: ",e)}}closeBottomSheet(){try{this.bottomSheetRef&&this.bottomSheetRef.dismiss()}catch(e){this.loggingService.catch("Error in RewriterBottomSheetComponent closeBottomSheet: ",e)}}ngOnDestroy(){this.closeBottomSheet()}};o.\u0275fac=function(t){return new(t||o)(h(bc),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-rewriter-bottom-sheet"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation"},outputs:{selectOption:"selectOption"},standalone:!1,decls:0,vars:0,template:function(t,r){},styles:[".velt-mat-bottom-sheet-container.snippyly-rewriter-bottom-sheet-container{padding:0!important} .velt-mat-bottom-sheet-container.snippyly-rewriter-bottom-sheet-container .mat-bottom-sheet-container{padding:0!important}"],changeDetection:0});let i=o;return i})();var mtn=["overlay"],ptn=()=>["snippyly-overlay-panel","velt-overlay-panel"];function gtn(i,o){if(i&1){let n=Y();_(0,"snippyly-rewriter-dialog",6),G("selectOption",function(){N(n);let t=l(2);return F(t.onSelectOption())})("cdkDragReleased",function(){N(n);let t=l(2);return F(t.onDragReleased())}),b()}if(i&2){let n=l().ngIf;d("annotation",n.rewriterPinAnnotation)}}function utn(i,o){if(i&1){let n=Y();_(0,"snippyly-rewriter-bottom-sheet",7),G("selectOption",function(){N(n);let t=l(2);return F(t.onSelectOption())}),b()}if(i&2){let n=l().ngIf;d("annotation",n.rewriterPinAnnotation)}}function htn(i,o){if(i&1){let n=Y();f(0),_(1,"span",3,0),G("pointerover",function(t){return N(n),l().onPointerOver(t),F(t.stopPropagation())})("pointerout",function(){N(n);let t=l();return F(t.onPointerOut())})("pointerdown",function(t){return N(n),l().togglePinSelection(),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())}),b(),g(3,gtn,1,1,"ng-template",4,1,Te)(5,utn,1,1,"snippyly-rewriter-bottom-sheet",5),v()}if(i&2){let n=o.ngIf,e=de(2),t=l();m(3),d("cdkConnectedOverlayOrigin",e)("cdkConnectedOverlayOpen",n.last&&!n.isPhone)("cdkConnectedOverlayPanelClass",gt(9,ptn))("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayPositions",t.positions)("cdkConnectedOverlayGrowAfterOpen",!0)("cdkConnectedOverlayDisableClose",!0),m(2),d("ngIf",n.last&&n.isPhone)}}var Z0e=(()=>{let o=class o{get element(){return this._element}set element(e){this._element=e,this.element?this.customScrollableParents=$p(this.element):this.customScrollableParents=[]}get customScrollableParents(){return this._customScrollableParents}set customScrollableParents(e){this._customScrollableParents=e,this.addCustomScrollableParentsEventListeners()}constructor(e,t,r,a,s){this.analyticsService=e,this.authService=t,this.breakpointObserver=r,this.domService=a,this.loggingService=s,this.subscriptions=[],this.rewriterPinHover=!1,this.rewriterPinSelected=!1,this.textClicked=!1,this.selectedAnnotationsMap={},this.customScrollableParentEventsListenersSubscriptions=[],this.overlayOriginX="start",this.overlayOriginY="top",this.floatingRewritersEnabled=!0,this.streamMode=!1,this.sidebarVisible=!1,this.showRewriterIndex=!1,this.isInternalRewriterAnnotation=!1,this.positions=j.OVERLAY_POSITIONS.map(c=>new Ii({originX:c.originX,originY:c.originY},{overlayX:c.overlayX,overlayY:c.overlayY})),this.componentConfigSignal=De({first:!1,last:!1,isPhone:!1,rewriterPinAnnotation:void 0}),this.veltElement=!0,this.subscriptions.push(this.authService.getUser$().subscribe(c=>{this.user=c},c=>{this.loggingService.catch("Error in RewriterTextPortalComponent getUser$ subscription: ",c)})),this.subscriptions.push(this.breakpointObserver.observe(Ni.XSmall).subscribe(c=>{c.matches?this.componentConfigSignal.update(p=>(p=T(I({},p),{isPhone:!0}),p)):this.componentConfigSignal.update(p=>(p=T(I({},p),{isPhone:!1}),p))},c=>{this.loggingService.catch("Error in RewriterTextPortalComponent breakpointObserver subscription: ",c)}))}ngOnInit(){}ngAfterViewInit(){try{let e=this.element.childNodes[0];this.element.childNodes[1].childNodes[0].appendChild(e),this.subscriptions.push(this.overlay.positionChange.subscribe(r=>{this.overlayOriginX=r.connectionPair.originX,this.overlayOriginY=r.connectionPair.originY},r=>{this.loggingService.catch("Error in RewriterTextPortalComponent positionChange subscription: ",r)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(r=>{this.selectedAnnotationsMap=r,this.checkPinSelection()},r=>{this.loggingService.catch("Error in RewriterTextPortalComponent getSelectedAnnotationsMap$ subscription: ",r)}))}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent AfterViewInit: ",e)}}setRewriterPinAnnotation(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{rewriterPinAnnotation:e}),t))}catch(t){this.loggingService.catch("Error in RewriterTextPortalComponent setRewriterPinAnnotation: ",t)}}setFirst(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{first:e}),t))}catch(t){this.loggingService.catch("Error in RewriterTextPortalComponent setFirst: ",t)}}setLast(e){try{this.componentConfigSignal.update(t=>(t=T(I({},t),{last:e}),t))}catch(t){this.loggingService.catch("Error in RewriterTextPortalComponent setLast: ",t)}}checkPinSelection(){try{this.selectedAnnotationsMap[this.componentConfigSignal().rewriterPinAnnotation?.annotationId]&&Object.keys(this.selectedAnnotationsMap).length===1?this.rewriterPinSelected=!0:(this.rewriterPinSelected=!1,this.textClicked=!1),sessionStorage.getItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID)===this.componentConfigSignal().rewriterPinAnnotation.annotationId&&this.componentConfigSignal().last&&(this.textClicked=!0,sessionStorage.removeItem(j.SESSION_STORAGE.SNIPPYLY_AUTO_SELECT_ANNOTATION_ID))}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent checkPinSelection: ",e)}}onSelectOption(){try{this.componentConfigSignal().rewriterPinAnnotation?.selectedRewriterOption?this.updateRewriterTargetText():this.resetRewriterTargetText()}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent onSelectOption: ",e)}}updateRewriterTargetText(){try{document.querySelectorAll(`snippyly-text-highlight[data-velt-id="${this.componentConfigSignal().rewriterPinAnnotation?.annotationId}"]`).forEach((t,r,a)=>{if(r===a.length-1){let s=this.element.querySelector("snippyly-rewriter-text-portal > span");s&&(s.getAttribute("data-snippyly-original-text")||s.setAttribute("data-snippyly-original-text",s.textContent||""),s.setAttribute("data-snippyly-skip-check","true"),s.innerHTML=this.domService.sanitizeHtml(this.componentConfigSignal().rewriterPinAnnotation?.selectedRewriterOption||""))}else this.domService.addClassToElement(t,"s-display-none")})}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent updateRewriterTargetText: ",e)}}resetRewriterTargetText(){try{document.querySelectorAll(`snippyly-text-highlight[data-velt-id="${this.componentConfigSignal().rewriterPinAnnotation?.annotationId}"]`).forEach((t,r,a)=>{if(r===a.length-1){let s=this.element.querySelector("snippyly-rewriter-text-portal > span");s&&(s.innerHTML=this.domService.sanitizeHtml(s.getAttribute("data-snippyly-original-text")||""),s.removeAttribute("data-snippyly-original-text"))}else this.domService.removeClassFromElement(t,"s-display-none")})}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent resetRewriterTargetText: ",e)}}onPointerOver(e){try{e.buttons?this.rewriterPinHover&&(this.rewriterPinHover=!1):this.rewriterPinHover||(this.rewriterPinHover=!0)}catch(t){this.loggingService.catch("Error in RewriterTextPortalComponent onPointerOver: ",t)}}onPointerOut(){this.rewriterPinHover=!1}togglePinSelection(){try{if(this.selectedAnnotationsMap[this.componentConfigSignal().rewriterPinAnnotation.annotationId])document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}="${this.componentConfigSignal().rewriterPinAnnotation?.annotationId}"]`)?this.domService.resetSelectedAnnotationsMap(!0,"rewriters"):(this.textClicked=!0,this.domService.toggleAnnotationSelection(this.componentConfigSignal().rewriterPinAnnotation));else{let e=document.querySelector(`[${j.ATTRIBUTES.VELT_ANNOTATION_DRAFT}]`);if(e){let t=e.getAttribute(j.ATTRIBUTES.VELT_ANNOTATION_DRAFT);if(t){let r=document.getElementById(`rewriter-pin-contianer-${t}`)||document.querySelector(`[data-velt-id='${t}']`);r&&(r.scrollIntoView({behavior:"auto",block:"center",inline:"center"}),this.domService.resetSelectedAnnotationsMap(!0,"rewriters"))}}else this.textClicked=!0,this.domService.toggleAnnotationSelection(this.componentConfigSignal().rewriterPinAnnotation)}}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent togglePinSelection: ",e)}}updateOverlayPosition(){try{this.loggingService.log("updateOverlayPosition",this.componentConfigSignal().rewriterPinAnnotation?.annotationId),this.overlay&&this.overlay?.overlayRef?.updatePosition()}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent updateOverlayPosition: ",e)}}addCustomScrollableParentsEventListeners(){try{this.removeCustomScrollableParentsEventListeners(),this.customScrollableParents?.length&&this.customScrollableParents?.forEach(e=>{this.customScrollableParentEventsListenersSubscriptions.push(pi(e,"scroll").subscribe(t=>{this.updateOverlayPosition()},t=>{this.loggingService.catch("Error in RewriterTextPortalComponent addCustomScrollableParentsEventListeners scroll subscription: ",t)}))})}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent addCustomScrollableParentsEventListeners: ",e)}}removeCustomScrollableParentsEventListeners(){try{this.customScrollableParentEventsListenersSubscriptions.map(e=>{e.unsubscribe()}),this.customScrollableParentEventsListenersSubscriptions=[]}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent removeCustomScrollableParentsEventListeners: ",e)}}onDragReleased(){try{this.analyticsService.trackEvent(Z.Events.Rewriter.REWRITE_DIALOG_DRAGGED,{isMobileDevice:this.domService.isMobileDevice()})}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent onDragReleased: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.removeCustomScrollableParentsEventListeners(),this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in RewriterTextPortalComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(fo),h(Be),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-rewriter-text-portal"]],viewQuery:function(t,r){if(t&1&&nt(mtn,5),t&2){let a;Xe(a=Qe())&&(r.overlay=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:1,vars:1,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],[4,"ngIf"],["cdkOverlayOrigin","","data-snippyly-rewriter-disabled","true",1,"rewriter-text-highlight","selected",3,"pointerover","pointerout","pointerdown","click"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen","cdkConnectedOverlayDisableClose"],[3,"annotation","selectOption",4,"ngIf"],["cdkDrag","",3,"selectOption","cdkDragReleased","annotation"],[3,"selectOption","annotation"]],template:function(t,r){t&1&&g(0,htn,6,10,"ng-container",2),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,on,en,da,l7,K0e],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;margin:0!important;padding:0!important;height:inherit!important;width:inherit!important;text-align:inherit!important;line-height:inherit!important;font-size:inherit!important;text-transform:inherit!important;float:inherit!important;-webkit-text-fill-color:initial!important}*[_ngcontent-%COMP%]:empty{display:revert!important}.rewriter-text-highlight[_ngcontent-%COMP%]{cursor:pointer!important} snippyly-text-highlight.snippyly-text-highlight{color:#000!important} snippyly-text-highlight.snippyly-text-highlight .rewriter-text-highlight{color:#000!important;background-color:#fee9ae!important} snippyly-text-highlight.snippyly-text-highlight .rewriter-text-highlight.selected{background-color:#fcc934!important} snippyly-text-highlight.snippyly-text-highlight .rewriter-text-highlight[data-snippyly-original-text]{color:unset!important;background-color:unset!important} snippyly-text-highlight.snippyly-text-highlight:has([data-snippyly-original-text]){color:unset!important;background-color:unset!important}.rewriter-annotation-number[_ngcontent-%COMP%]{border-radius:50%!important;border:1px solid #bdbdbd!important;width:20px!important;height:20px!important;font-size:calc((.7rem + 0px) * var(--velt-base-rem-unit))!important;display:inline-flex!important;justify-content:center!important;align-items:center!important;box-sizing:content-box!important;background:#fff!important;color:#000!important;position:relative!important}.rewriter-annotation-number[_ngcontent-%COMP%]:after{content:attr(data-rewriter-annotation-number);position:absolute!important}"],changeDetection:0});let i=o;return i})();var X0e=(()=>{let o=class o{constructor(e,t,r,a,s,c){this.domService=e,this.rewriterService=t,this.componentFactoryResolver=r,this.injector=a,this.appRef=s,this.loggingService=c,this.rewritersTextById={},this.commonAncestorElementObservers=new Map}updateTextRewriterAnnotations(e){try{this.checkToRemoveTextRewriterAnnotations(e),e.forEach(t=>{this.updateTextRewriterAnnotation(t)})}catch(t){this.loggingService.catch("Error in RewriterPinPortalService updateTextRewriterAnnotations: ",t)}}updateTextRewriterAnnotation(e){let t=this.rewritersTextById[e.annotationId];if(t)if(wi(t?.annotation?.targetTextRange,e?.targetTextRange)){let r=!1;t?.texts?.length?t.texts.forEach(a=>{!document.body.contains(a?.textNode)&&!a?.element?.querySelector("[data-snippyly-skip-check]")&&(r=!0)}):r=!0,r?(this.removeTextRewriterAnnotation(e),this.getCommonAncestorContainer(e)):t.texts.forEach(a=>{a.portalRef&&a.portalRef.instance.setRewriterPinAnnotation(e)})}else this.removeTextRewriterAnnotation(e),this.getCommonAncestorContainer(e);else this.getCommonAncestorContainer(e)}getCommonAncestorContainer(e){try{let t=this.domService.getElementFromXPath(e?.targetTextRange?.commonAncestorContainer);if(t){let r=t?.nodeType===Node.ELEMENT_NODE?t:t?.parentElement;this.rewritersTextById[e.annotationId]={texts:[],annotation:e,commonAncestorContainer:t,commonAncestorElement:r,commonAncestorText:r?.textContent},this.setTextRewriterPortal(e),this.observeCommonAncestorElementChanges(e)}}catch(t){this.loggingService.catch("Error in RewriterPinPortalService getCommonAncestorContainer: ",t)}}setTextRewriterPortal(e){try{let t=this.rewritersTextById[e.annotationId];if(t){let r=Dv(e.targetTextRange?.text,this.domService.getXPath(e.targetTextRange?.commonAncestorContainer).iterateNext(),e.targetTextRange?.occurrence),a=new Range;try{a.setStart(r[0].textNode,r[0].startOffset||0),a.setEnd(r[r.length-1].textNode,r[r.length-1].endOffset||0)}catch{}if(a.toString()===e.targetTextRange?.text){let s=E0(a),c=[];if(s&&s.length){let p=-1,u=-1;s.forEach((C,E)=>{if(C?.textContent?.trim()){this.textHighlighterClass?this.domService.addClassToElement(C,this.textHighlighterClass):this.domService.addClassToElement(C,C.tagName?.toLowerCase()),C.setAttribute(j.ATTRIBUTES.VELT_ID,e.annotationId);let D=C.childNodes[0],L=new $o(Z0e),z=new Ho(C,this.componentFactoryResolver,this.appRef,this.injector),W=z.attach(L);W.instance.setRewriterPinAnnotation(e),W.instance.element=C,p<0&&(p=E),u=E,c.push({host:z,portal:L,portalRef:W,element:C,textNode:D})}else c.push({textNode:C})}),p>=0&&c[p]?.portalRef&&c[p].portalRef.instance.setFirst(!0),u>=0&&c[u]?.portalRef&&c[u].portalRef.instance.setLast(!0),t.texts=c}}}}catch(t){this.loggingService.catch("Error in RewriterPinPortalService setTextRewriterPortal: ",t)}}checkToRemoveTextRewriterAnnotations(e){try{let t=e.map(a=>a.annotationId),r=!1;if(Object.keys(this.rewritersTextById).forEach(a=>{t.includes(a)||(this.rewritersTextById[a]?.annotation?.targetTextRange&&(r=!0),this.removeTextRewriterAnnotation(this.rewritersTextById[a].annotation))}),r){let a=[];Object.keys(this.rewritersTextById).forEach(s=>{this.rewritersTextById[s]?.annotation?.targetTextRange&&(a.push(this.rewritersTextById[s]?.annotation),this.removeTextRewriterAnnotation(this.rewritersTextById[s]?.annotation))}),a?.length&&a.forEach(s=>{this.updateTextRewriterAnnotation(s)})}}catch(t){this.loggingService.catch("Error in RewriterPinPortalService checkToRemoveTextRewriterAnnotations: ",t)}}removeTextRewriterAnnotation(e){try{this.rewritersTextById[e.annotationId].texts.forEach(r=>{r?.host&&r.host.detach(),r?.element&&r?.textNode&&r.element.replaceWith(r.textNode),r.textNode&&r.textNode.parentNode?.normalize()}),this.checkToUnsubscribeCommonAncestorElementChanges(e),delete this.rewritersTextById[e.annotationId]}catch(t){this.loggingService.catch("Error in RewriterPinPortalService removeTextRewriterAnnotation: ",t)}}observeCommonAncestorElementChanges(e){try{let t=this.rewritersTextById[e.annotationId];if(t.commonAncestorElement){let r=this.commonAncestorElementObservers.get(t.commonAncestorElement);if(r)r.annotations.find(a=>a.annotationId===e.annotationId)||r.annotations.push(e);else{let a=new MutationObserver(s=>{let c="";ZP(t?.commonAncestorElement).forEach(u=>{u?.parentElement?.closest(".rewriter-annotation-number")||(c+=u.textContent)}),t?.commonAncestorText!==c&&s.filter(u=>[Node.ELEMENT_NODE,Node.TEXT_NODE].includes(u.target.nodeType)).length&&this.commonAncestorElementObservers.get(t.commonAncestorElement)?.annotations?.forEach(C=>{this.onCommonAncestorElementChange(C)})});a.observe(t.commonAncestorElement,{characterData:!0,subtree:!0}),r={observer:a,annotations:[e]}}this.commonAncestorElementObservers.set(t.commonAncestorElement,r)}}catch(t){this.loggingService.catch("Error in RewriterPinPortalService observeCommonAncestorElementChanges: ",t)}}onCommonAncestorElementChange(e){try{let t=this.rewritersTextById[e.annotationId];if(t.texts?.length){let r="";t.texts.forEach(p=>r+=p.textNode?.textContent);let a=t.texts[0].textNode,s=eh(t.commonAncestorContainer,0,a,0,r)+1,c={};c.commonAncestorContainer=e.targetTextRange?.commonAncestorContainer,c.text=r,c.occurrence=s,wi(e.targetTextRange,c)||(t.annotation.targetTextRange=c,this.updateAnnotationToFirebase(t.annotation))}else this.setTextRewriterPortal(t.annotation)}catch(t){this.loggingService.catch("Error in RewriterPinPortalService onCommonAncestorElementChange: ",t)}}updateAnnotationToFirebase(e){}checkToUnsubscribeCommonAncestorElementChanges(e){try{let t=this.rewritersTextById[e.annotationId];if(t.commonAncestorElement){let r=this.commonAncestorElementObservers.get(t.commonAncestorElement);r&&(r.annotations=r?.annotations.filter(a=>a.annotationId!==e.annotationId),r.annotations.length||this.unsubscribeCommonAncestorElementChanges(e))}}catch(t){this.loggingService.catch("Error in RewriterPinPortalService checkToUnsubscribeCommonAncestorElementChanges: ",t)}}unsubscribeCommonAncestorElementChanges(e){try{let t=this.rewritersTextById[e.annotationId];this.commonAncestorElementObservers.delete(t.commonAncestorElement)}catch(t){this.loggingService.catch("Error in RewriterPinPortalService unsubscribeCommonAncestorElementChanges: ",t)}}};o.\u0275fac=function(t){return new(t||o)(ee(Be),ee(jc),ee(Do),ee(Ot),ee(Ci),ee(y))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var nG=(()=>{let o=class o{constructor(e,t,r,a){this.domService=e,this.loggingService=t,this.rewriterService=r,this.rewriterTextPortalService=a,this.isFirstComponent=!1,this.rewriterPinAnnotations=[],this.subscriptions=[],this.veltId=En(),this.veltElement=!0}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch{}}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_REWRITER),t=document.querySelector(j.TAGS.VELT_REWRITER);t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent())}catch(e){this.loggingService.catch("Error in RewritersContainerComponent AfterViewInit: ",e)}}initComponent(){try{this.getAllRewritersOnCurrentDocument()}catch(e){this.loggingService.catch("Error in RewritersContainerComponent initComponent: ",e)}}getAllRewritersOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getAllRewritersOnCurrentDocument","color: green;");try{this.subscriptions.push(this.rewriterService.getRewriterAnnotations$().pipe(Le(e=>!!e),he(e=>this.domService.getSelectedAnnotationsMap$().pipe(ce(t=>({filteredAnnotations:e,selectedAnnotationsMap:t||{}}))))).subscribe(e=>{try{this.rewriterPinAnnotations=e?.filteredAnnotations;let t=this.rewriterPinAnnotations.filter(r=>r.targetTextRange);this.rewriterTextPortalService.updateTextRewriterAnnotations(t)}catch(t){this.loggingService.catch("Error in RewritersContainerComponent getAllRewritersOnCurrentDocument inside subscription: ",t)}},e=>{this.loggingService.catch("Error in RewritersContainerComponent getAllRewritersOnCurrentDocument subscription: ",e)}))}catch(e){this.loggingService.catch("Error in RewritersContainerComponent getAllRewritersOnCurrentDocument: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Be),h(y),h(jc),h(X0e))},o.\u0275cmp=O({type:o,selectors:[["snippyly-rewriters-container"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},standalone:!1,decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();function vtn(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(t){return N(n),l(2).copyLink(),F(t.stopPropagation())}),te(1),P(2,"translate"),b()}if(i&2){let n=l(2);m(),Ce(" ",M(2,1,n.copyLinkText),"")}}function Ctn(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(t){N(n);let r=l(2);return r.editMode=!0,F(t.stopPropagation())}),te(1),P(2,"translate"),b()}i&2&&(m(),Ge(M(2,1,"Reassign")))}function _tn(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(t){N(n);let r=l(2);return r.editMode=!0,r.resolveTag(),F(t.stopPropagation())}),te(1),P(2,"translate"),b()}i&2&&(m(),Ge(M(2,1,"Resolve")))}function ytn(i,o){if(i&1){let n=Y();_(0,"div",7),G("click",function(t){return N(n),l(2).removeTag(),F(t.stopPropagation())}),te(1),P(2,"translate"),b()}i&2&&(m(),Ce(" ",M(2,1,"Remove"),""))}function Stn(i,o){if(i&1&&(_(0,"div",4)(1,"div",5),te(2),P(3,"translate"),P(4,"translate"),b(),g(5,vtn,3,3,"div",6)(6,Ctn,3,3,"div",6)(7,_tn,3,3,"div",6)(8,ytn,3,3,"div",6),b()),i&2){let n=l();m(2),vr("",M(3,6,"Assigned to:")," ",!(n.annotation==null||n.annotation.to[0]==null)&&n.annotation.to[0].name?n.annotation==null||n.annotation.to[0]==null?null:n.annotation.to[0].name:M(4,8,n.annotation==null||n.annotation.to[0]==null?null:n.annotation.to[0].email),""),m(3),d("ngIf",n.tagPinSelected),m(),d("ngIf",n.tagPinSelected&&(n.allowedActions==null?null:n.allowedActions.update)),m(),d("ngIf",n.tagPinSelected&&(n.allowedActions==null?null:n.allowedActions.resolve)),m(),d("ngIf",n.tagPinSelected&&(n.allowedActions==null?null:n.allowedActions.remove))}}function btn(i,o){if(i&1){let n=Y();le(),_(0,"svg",11),G("click",function(){N(n);let t=l(2);return F(!(t.annotation==null||t.annotation.to==null)&&t.annotation.to.length?t.editMode=!1:t.removeTag())}),w(1,"path",12)(2,"path",13),b()}}function Itn(i,o){if(i&1){let n=Y();f(0),_(1,"div",8)(2,"velt-autocomplete-panel-internal",9,0),P(4,"translate"),G("optionSelected",function(t){N(n);let r=l();return F(r.saveTag(t))}),b(),g(5,btn,3,0,"svg",10),b(),v()}if(i&2){let n=de(3),e=l();m(2),d("placeholder",M(4,3,"Please select a contact to assign"))("enableOnFocus",!0),m(3),d("ngIf",(e.annotation==null||e.annotation.to==null?null:e.annotation.to.length)||!(!(n==null||n.userContacts==null)&&n.userContacts.length))}}var Q0e=(()=>{let o=class o{get user(){return this._user}set user(e){this._user=e,this.checkToShowActions()}get tagPinSelected(){return this._tagPinSelected}set tagPinSelected(e){this._tagPinSelected=e,this.tagPinSelected&&this.setTagReadInAnalytics()}constructor(e,t,r){this.analyticsService=e,this.tagService=t,this.loggingService=r,this.subscriptions=[],this.editMode=!1,this.copyLinkText="Copy Link",this._user=new Ao,this.allowedActions=null,this._tagPinSelected=!1,this.veltElement=!0}ngOnInit(){try{this.checkToShowActions(),this.annotation?.to?.length||(this.editMode=!0)}catch(e){this.loggingService.catch("Error in TagDialogComponent OnInit: ",e)}}ngAfterViewInit(){try{this.setTagReadInAnalytics()}catch(e){this.loggingService.catch("Error in TagDialogComponent view init: ",e)}}trackByUserContact(e,t){return t?.email||e}setTagReadInAnalytics(){try{this.annotation&&this.analyticsService.trackEvent(Z.Events.Tag.TAG_READ,{annotationId:this.annotation.annotationId,readType:this.tagPinSelected?"open":"hover"})}catch(e){this.loggingService.catch("Error in CommentDialogComponent setCommentReadInAnalytics: ",e)}}saveTag(e){try{this.analyticsService.trackEvent(Z.Events.Tag.TAG_ADDED,{annotationId:this.annotation.annotationId}),this.annotation.to=[e],this.tagService.updateTag(this.annotation,!0),this.editMode=!1}catch(t){this.loggingService.catch("Error in TagDialogComponent saveTag: ",t)}}checkToShowActions(){try{this.user&&this.annotation?this.annotation.from?.userId===this.user.userId?(this.allowedActions||(this.allowedActions={}),this.allowedActions.update=!0,this.allowedActions.remove=!0):!this.annotation?.resolved&&this.annotation?.to?.find(e=>e?.email===this.user?.email)&&(this.allowedActions||(this.allowedActions={}),this.allowedActions.resolve=!0):this.allowedActions=null}catch(e){this.loggingService.catch("Error in TagDialogComponent checkToShowActions: ",e)}}resolveTag(){try{this.tagService.resolveTag(this.annotation),this.editMode=!1}catch(e){this.loggingService.catch("Error in TagDialogComponent resolveTag: ",e)}}removeTag(){try{this.tagService.deleteTagPinAnnotations("deleteOption")}catch(e){this.loggingService.catch("Error in TagDialogComponent removeTag: ",e)}}copyLink(){try{let e=this.copyLinkText;this.copyLinkText="Link Copied!",setTimeout(()=>{this.copyLinkText=e},2e3);let t=this.tagService.getTagUrl(this.annotation);t&&Os(t),this.analyticsService.trackEvent(Z.Events.Tag.TAG_LINK_COPIED,{annotationId:this.annotation.annotationId})}catch(e){this.loggingService.catch("Error in TagDialogComponent copyLink: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(ja),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-tag-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{annotation:"annotation",user:"user",tagPinSelected:"tagPinSelected"},standalone:!1,decls:3,vars:5,consts:[["userSelectorRef",""],[1,"tag-dialog-container",3,"pointerdown","pointerup"],["velt-ignore-change-detection","true",4,"ngIf"],[4,"ngIf"],["velt-ignore-change-detection","true"],[1,"tag-user-details"],["class","tag-action-button",3,"click",4,"ngIf"],[1,"tag-action-button",3,"click"],[1,"tag-input-container"],[3,"optionSelected","placeholder","enableOnFocus"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","class","bi bi-x-circle","viewBox","0 0 16 16",3,"click",4,"ngIf"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-x-circle",3,"click"],["d","M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"],["d","M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"]],template:function(t,r){t&1&&(_(0,"div",1),G("pointerdown",function(s){return s.stopPropagation()})("pointerup",function(s){return s.stopPropagation()}),g(1,Stn,9,10,"div",2)(2,Itn,6,5,"ng-container",3),b()),t&2&&(ge("edit-mode",r.editMode),x("data-velt-annotation-draft",r.editMode?r.annotation==null?null:r.annotation.annotationId:null),m(),d("ngIf",(r.annotation==null||r.annotation.to==null?null:r.annotation.to.length)&&!r.editMode),m(),d("ngIf",r.editMode))},dependencies:[X,xg,pe],styles:['html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.tag-dialog-container[_ngcontent-%COMP%]{background-color:#fff;padding-top:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;padding-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%;padding-right:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;padding-left:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;margin-right:auto!important;margin-left:auto!important;font-size:calc((.875rem + 0px) * var(--velt-base-rem-unit));border-radius:10px!important;box-shadow:0 calc((1rem + 0px) * var(--velt-base-rem-unit)) calc((3rem + 0px) * var(--velt-base-rem-unit)) #0000002d!important;border:1px solid #dee2e6!important;max-height:fit-content!important;max-width:300px;min-width:300px}.tag-dialog-container[_ngcontent-%COMP%]:not(.edit-mode){background-color:#141416!important;padding-left:0!important;padding-right:0!important;max-width:250px;min-width:250px;border:none!important}.tag-dialog-container[_ngcontent-%COMP%]:not(.edit-mode) *[_ngcontent-%COMP%]{color:#fff!important}.tag-dialog-container[_ngcontent-%COMP%]:not(.edit-mode) .tag-user-details[_ngcontent-%COMP%]{margin-bottom:calc((.25rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;padding-left:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;word-break:break-word}.tag-dialog-container[_ngcontent-%COMP%]:not(.edit-mode) .tag-action-button[_ngcontent-%COMP%]{padding:calc((.25rem + 0px) * var(--velt-base-rem-unit)) calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;cursor:pointer}.tag-dialog-container[_ngcontent-%COMP%]:not(.edit-mode) .tag-action-button[_ngcontent-%COMP%]:hover{background-color:#353537}.tag-dialog-container[_ngcontent-%COMP%] .tag-input-container[_ngcontent-%COMP%]{display:flex}.tag-dialog-container[_ngcontent-%COMP%] .tag-input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%!important;border:0!important} .snippyly-tag-autocomplete-panel{box-shadow:0 calc((.3rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit)) #0000002e!important} .snippyly-tag-autocomplete-panel::-webkit-scrollbar{display:none!important;width:0!important;height:0!important} .snippyly-tag-autocomplete-panel::-webkit-scrollbar{width:0;height:0} .snippyly-tag-autocomplete-panel::-webkit-scrollbar-button{width:0;height:0} .snippyly-tag-autocomplete-panel .user-selection-container{background:#fff;border-radius:8px;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) 0!important} .snippyly-tag-autocomplete-panel .user-selection-container .mat-mdc-option{padding:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-tag-autocomplete-panel .user-selection-container .mat-mdc-option.mat-mdc-option-active{background-color:#f2f2f2!important}.contact-container[_ngcontent-%COMP%]{display:flex;align-items:center}.photo-container[_ngcontent-%COMP%]{min-width:calc((2.5rem + 0px) * var(--velt-base-rem-unit));width:calc((2.5rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2.5rem + 0px) * var(--velt-base-rem-unit));height:calc((2.5rem + 0px) * var(--velt-base-rem-unit));box-sizing:border-box;background-clip:padding-box;border:solid 2px transparent;display:flex;align-items:center;justify-content:center;position:relative;margin-right:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.photo-container-small[_ngcontent-%COMP%]{width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));min-width:calc((2rem + 0px) * var(--velt-base-rem-unit));min-height:calc((2rem + 0px) * var(--velt-base-rem-unit));margin-right:calc((.8rem + 0px) * var(--velt-base-rem-unit))!important}.photo-container[_ngcontent-%COMP%]:before{content:"";position:absolute;inset:0;z-index:1;border-radius:inherit;background:inherit}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;z-index:2;object-fit:cover}.contact-details[_ngcontent-%COMP%]{overflow:hidden}.contact-details[_ngcontent-%COMP%] .contact-name[_ngcontent-%COMP%], .contact-details[_ngcontent-%COMP%] .contact-email[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;line-height:calc((1rem + 0px) * var(--velt-base-rem-unit));font-size:calc((.875rem + 0px) * var(--velt-base-rem-unit))!important}.contact-details[_ngcontent-%COMP%] .contact-email[_ngcontent-%COMP%]{color:#6c757d!important}.photo-placeholder[_ngcontent-%COMP%]{z-index:2;opacity:.8}.tag-buttons-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding-top:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;background:#fff}.tag-button[_ngcontent-%COMP%]{background-color:#625df5;color:#fff!important;border:0;border-radius:4px;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;margin-right:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;cursor:pointer!important}.tag-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff!important}.tag-button.green[_ngcontent-%COMP%]{background-color:#0dcf82!important}.tag-button[_ngcontent-%COMP%]:hover{background-color:#44aeff!important;color:#fff!important}.tag-button[_ngcontent-%COMP%]:hover.green{background-color:#10b372!important}.tag-button[disabled][_ngcontent-%COMP%], .tag-button[disabled][_ngcontent-%COMP%]:hover{background-color:#0000001a!important;color:#0006!important}.cancel-button[_ngcontent-%COMP%]{border:0;border-radius:4px;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;margin-right:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;cursor:pointer!important}.cancel-button[_ngcontent-%COMP%]:hover{color:#e91e63}.no-contacts-message[_ngcontent-%COMP%]{text-align:center!important} .tag-input-container velt-autocomplete-panel-internal{width:100%!important} .tag-input-container velt-autocomplete-panel-internal input{width:100%!important;border:0!important}'],changeDetection:0});let i=o;return i})();var xtn=["overlay"],Ttn=["pin"],Dtn=(i,o)=>({"tag-pin-selected":i,"mutiple-pins-selected":o}),wtn=()=>["snippyly-overlay-panel","snippyly-tag-dialog-overlay-panel","velt-overlay-panel"];function Otn(i,o){i&1&&(le(),w(0,"path",8))}function Atn(i,o){if(i&1){let n=Y();_(0,"snippyly-user-avatar",9),G("pointerover",function(t){return N(n),l().onPointerOver(t),F(t.stopPropagation())})("pointerout",function(){N(n);let t=l();return F(t.onPointerOut())}),b()}if(i&2){let n=l();d("user",n.tagPinAnnotation==null?null:n.tagPinAnnotation.to[0])("background","rgb(162, 89, 254) !important")("size",26)}}function Ptn(i,o){if(i&1){let n=Y();_(0,"snippyly-tag-dialog",10),G("saveTag",function(t){N(n);let r=l();return F(r.saveTag.emit(t))}),b()}if(i&2){let n=l();d("annotation",n.tagPinAnnotation)("user",n.user)("tagPinSelected",n.tagPinSelected)}}var J0e=(()=>{let o=class o{get tagPinAnnotation(){return this._tagPinAnnotation}set tagPinAnnotation(e){this._tagPinAnnotation=e}get tagPinSelected(){return this._tagPinSelected}set tagPinSelected(e){this._tagPinSelected=e,this.updateHighlightOnElement()}get tagPinHover(){return this._tagPinHover}set tagPinHover(e){this._tagPinHover=e,this.updateHighlightOnElement()}constructor(e,t,r){this.tagService=e,this.domService=t,this.loggingService=r,this._tagPinSelected=!1,this.multipleTagPinsSelected=!1,this.avatarErrorImage="",this.deleteTagThread=new Pe,this.saveTag=new Pe,this.signInToAccessFeature=new Pe,this.overlayOriginX="start",this.overlayOriginY="top",this._tagPinHover=!1,this.subscriptions=[],this.positions=j.OVERLAY_POSITIONS.map(a=>new Ii({originX:a.originX,originY:a.originY},{overlayX:a.overlayX,overlayY:a.overlayY})),this.veltElement=!0,this.loggingService.log("%c[WB] Creating COMPONENT TagPinComponent","color: blue;")}ngOnInit(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;")}ngAfterViewInit(){try{this.updateHighlightOnElement(),this.subscriptions.push(this.overlay.positionChange.subscribe(e=>{this.overlayOriginX=e.connectionPair.originX,this.overlayOriginY=e.connectionPair.originY},e=>{this.loggingService.catch("Error in TagPinComponent positionChange subscription: ",e)}))}catch(e){this.loggingService.catch("Error in TagPinComponent AfterViewInit: ",e)}}updateHighlightOnElement(){try{this.targetElement&&(this.tagPinSelected||this.tagPinHover?this.domService.highlightElement(this.targetElement):this.domService.removeHighlightFromElement(this.targetElement))}catch(e){this.loggingService.catch("Error in TagPinComponent updateHighlightOnElement: ",e)}}onPointerOver(e){try{e.buttons?this.tagPinHover&&(this.tagPinHover=!1):this.tagPinHover||(this.tagPinHover=!0)}catch(t){this.loggingService.catch("Error in TagPinComponent onPointerOver: ",t)}}onPointerOut(){this.tagPinHover=!1}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in TagPinComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in TagPinComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(ja),h(Be),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-tag-pin"]],viewQuery:function(t,r){if(t&1&&(nt(xtn,5),nt(Ttn,5)),t&2){let a;Xe(a=Qe())&&(r.overlay=a.first),Xe(a=Qe())&&(r.pin=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{tagPinAnnotation:"tagPinAnnotation",tagPinSelected:"tagPinSelected",multipleTagPinsSelected:"multipleTagPinsSelected",avatarErrorImage:"avatarErrorImage",user:"user",targetElement:"targetElement"},outputs:{deleteTagThread:"deleteTagThread",saveTag:"saveTag",signInToAccessFeature:"signInToAccessFeature"},standalone:!1,decls:8,vars:15,consts:[["trigger","cdkOverlayOrigin"],["overlay","cdkConnectedOverlay"],["cdkOverlayOrigin","",1,"tag-pin-container",3,"click","ngClass"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 100 100",1,"tag-pin"],["cx","50","cy","50","rx","50","ry","50",2,"stroke","rgb(0, 0, 0)","fill","rgb(162, 89, 254)","paint-order","fill","stroke-width","0px"],["d","M 24.999 77 C 24.999 77 20 77 20 72.001 C 20 66.999 24.999 51.999 50 51.999 C 75.001 51.999 80 66.999 80 72.001 C 80 77 75.001 77 75.001 77 L 24.999 77 Z M 50 47 C 61.548 47 68.764 34.5 62.991 24.499 C 60.312 19.857 55.359 17 50 17 C 38.452 17 31.236 29.5 37.009 39.499 C 39.688 44.14 44.641 47 50 47 Z","style","fill: rgb(255, 255, 255);",4,"ngIf"],["class","photo-container tag-user-avatar",3,"user","background","size","pointerover","pointerout",4,"ngIf"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPanelClass","cdkConnectedOverlayOffsetY","cdkConnectedOverlayBackdropClass","cdkConnectedOverlayLockPosition","cdkConnectedOverlayPositions","cdkConnectedOverlayGrowAfterOpen"],["d","M 24.999 77 C 24.999 77 20 77 20 72.001 C 20 66.999 24.999 51.999 50 51.999 C 75.001 51.999 80 66.999 80 72.001 C 80 77 75.001 77 75.001 77 L 24.999 77 Z M 50 47 C 61.548 47 68.764 34.5 62.991 24.499 C 60.312 19.857 55.359 17 50 17 C 38.452 17 31.236 29.5 37.009 39.499 C 39.688 44.14 44.641 47 50 47 Z",2,"fill","rgb(255, 255, 255)"],[1,"photo-container","tag-user-avatar",3,"pointerover","pointerout","user","background","size"],[3,"saveTag","annotation","user","tagPinSelected"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",2,0),G("click",function(c){return N(a),F(c.preventDefault())}),le(),_(2,"svg",3),w(3,"ellipse",4),g(4,Otn,1,0,"path",5),b(),g(5,Atn,1,3,"snippyly-user-avatar",6),b(),g(6,Ptn,1,3,"ng-template",7,1,Te)}if(t&2){let a=de(1);d("ngClass",k(11,Dtn,r.tagPinSelected,r.multipleTagPinsSelected)),m(4),d("ngIf",!(!(r.tagPinAnnotation==null||r.tagPinAnnotation.to==null)&&r.tagPinAnnotation.to.length&&(!(r.tagPinAnnotation==null||r.tagPinAnnotation.to[0]==null)&&r.tagPinAnnotation.to[0].photoUrl))),m(),d("ngIf",r.tagPinAnnotation==null||r.tagPinAnnotation.to==null?null:r.tagPinAnnotation.to.length),m(),d("cdkConnectedOverlayOrigin",a)("cdkConnectedOverlayOpen",r.tagPinSelected||r.tagPinHover)("cdkConnectedOverlayPanelClass",gt(14,wtn))("cdkConnectedOverlayOffsetY",r.overlayOriginY==="top"?-8:2)("cdkConnectedOverlayBackdropClass","snippyly-overlay-backdrop")("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayPositions",r.positions)("cdkConnectedOverlayGrowAfterOpen",!0)}},dependencies:[Ur,X,on,en,Q0e,Kn],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.tag-pin-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;text-align:center;color:#fff;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit));font-weight:500;cursor:pointer}.tag-pin[_ngcontent-%COMP%]{position:absolute;left:0;top:0;width:32px;height:32px;transition:left .12s ease-in-out,top .12s ease-in-out,width .12s ease-in-out,height .12s ease-in-out,transform .12s ease-in-out}.tag-pin-container[_ngcontent-%COMP%]:hover{filter:brightness(110%) saturate(110%)}.tag-pin-container[_ngcontent-%COMP%]:hover .tag-pin[_ngcontent-%COMP%], .tag-pin-selected[_ngcontent-%COMP%] .tag-pin[_ngcontent-%COMP%], .tag-pin-container[_ngcontent-%COMP%]:hover .photo-container[_ngcontent-%COMP%], .tag-pin-selected[_ngcontent-%COMP%] .photo-container[_ngcontent-%COMP%]{transform:scale(1.2) translateY(-4px);transition:left .12s ease-in-out,top .12s ease-in-out,width .12s ease-in-out,height .12s ease-in-out,transform .12s ease-in-out}.tag-index[_ngcontent-%COMP%]{position:absolute;border-radius:50%;border:1px solid #fff;width:20px;height:20px;text-align:center;top:-8px;right:-8px;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit));color:#000;background:#fff}.tag-pin-selected[_ngcontent-%COMP%]{filter:brightness(110%) saturate(110%)}.tag-resolved[_ngcontent-%COMP%]{background-color:#0dcf82!important}.bi-check-lg[_ngcontent-%COMP%]{color:#fff}.mutiple-pins-selected[_ngcontent-%COMP%]{border-color:#9746ff!important}.photo-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;position:absolute;width:32px;height:32px;box-sizing:border-box;background-clip:padding-box;border-radius:50%;padding:calc((.2rem + 0px) * var(--velt-base-rem-unit))!important;transition:top .12s ease-in-out,width .12s ease-in-out,height .12s ease-in-out,transform .12s ease-in-out;text-transform:capitalize}.photo-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:50%;object-fit:cover}.photo-placeholder[_ngcontent-%COMP%]{z-index:2;opacity:.8} snippyly-user-avatar.tag-user-avatar{background-color:#a259fe!important} snippyly-user-avatar.tag-user-avatar .s-user-avatar-initial{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important} .snippyly-tag-dialog-overlay-panel{z-index:2147483567!important}"],changeDetection:0});let i=o;return i})();function ktn(i,o){if(i&1){let n=Y();_(0,"div",1),G("pointerup",function(t){return N(n),l().togglePinSelection(),F(t.stopPropagation())})("pointerdown",function(t){return N(n),F(t.stopPropagation())})("click",function(t){return N(n),F(t.stopPropagation())})("cdkDragStarted",function(){N(n);let t=l();return F(t.onPinDragStart())})("cdkDragMoved",function(t){N(n);let r=l();return F(r.onPinMove(t))})("cdkDragReleased",function(){N(n);let t=l();return F(t.onPinRelease())}),_(1,"snippyly-tag-pin",2),G("saveTag",function(t){N(n);let r=l();return F(r.saveTag(t))}),b()()}if(i&2){let n=l();it("top",n.annotationDraging?(n.dragPosition==null?null:n.dragPosition.top)-16:(n.tagPinAnnotation==null||n.tagPinAnnotation.position==null?null:n.tagPinAnnotation.position.top)-16+n.offsetTop,"px")("left",n.annotationDraging?(n.dragPosition==null?null:n.dragPosition.left)-16:(n.tagPinAnnotation==null||n.tagPinAnnotation.position==null?null:n.tagPinAnnotation.position.left)-16+n.offsetLeft,"px"),ge("pin-dragging",n.annotationDraging),d("id","tag-pin-contianer-"+(n.tagPinAnnotation==null?null:n.tagPinAnnotation.annotationId))("cdkDragDisabled",(n.tagPinAnnotation==null||n.tagPinAnnotation.from==null?null:n.tagPinAnnotation.from.userId)!==(n.user==null?null:n.user.userId)),m(),d("tagPinAnnotation",n.tagPinAnnotation)("tagPinSelected",n.selectedAnnotationsMap[n.tagPinAnnotation==null?null:n.tagPinAnnotation.annotationId]&&!n.annotationDraging&&n.objectKeys(n.selectedAnnotationsMap).length===1)("multipleTagPinSelected",n.selectedAnnotationsMap[n.tagPinAnnotation==null?null:n.tagPinAnnotation.annotationId]&&n.objectKeys(n.selectedAnnotationsMap).length>1)("targetElement",n.targetElement)("user",n.user)}}var eCe=(()=>{let o=class o{get tagPinAnnotation(){return this._tagPinAnnotation}set tagPinAnnotation(e){this._tagPinAnnotation=e,this.id=e.annotationId}constructor(e,t,r,a,s){this.analyticsService=e,this.authService=t,this.domService=r,this.tagService=a,this.loggingService=s,this.multipleTagPinsSelected=!1,this.avatarErrorImage="",this.offsetLeft=0,this.offsetTop=0,this.objectKeys=Object.keys,this.selectedAnnotationsMap={},this.subscriptions=[],this.annotationDraging=!1,this.dragPosition=null,this.veltElement=!0,this.subscriptions.push(this.authService.getUser$().subscribe(c=>{this.user=c},c=>{this.loggingService.catch("Error in TagPinPortalComponent getUser$ subscription: ",c)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(c=>{this.selectedAnnotationsMap=c},c=>{this.loggingService.catch("Error in TagPinPortalComponent getSelectedAnnotationsMap$ subscription: ",c)}))}ngOnInit(){}togglePinSelection(){try{this.domService.toggleAnnotationSelection(this.tagPinAnnotation)}catch(e){this.loggingService.catch("Error in TagPinPortalComponent togglePinSelection: ",e)}}onPinDragStart(){this.selectedAnnotationsMap[this.tagPinAnnotation.annotationId]&&this.domService.toggleAnnotationSelection(this.tagPinAnnotation);let e=document.getElementById(this.tagPinAnnotation.annotationId);e&&(this.parentElement=e.parentElement,document.body.appendChild(e)),this.annotationDraging=!0}onPinMove(e){try{this.updateCurrentPinPosition(e)}catch(t){this.loggingService.catch("Error in TagPinPortalComponent onPinMove: ",t)}}updateCurrentPinPosition(e){try{this.domService.removeHighlightFromElement(this.targetElement);let t=e.event,r=t?.touches?.length?t.touches[0]?.clientX:t.clientX,a=t?.touches?.length?t.touches[0]?.clientY:t.clientY,s=this.domService.getBackgroundElement(r,a);s&&(this.targetElement=s,this.domService.highlightElement(this.targetElement),this.pointerMoveEvent=e.event,this.dragPosition={top:a,left:r})}catch(t){this.loggingService.catch("Error in TagPinPortalComponent updateCurrentPinPosition: ",t)}}onPinRelease(){try{let e=document.getElementById(this.tagPinAnnotation.annotationId);e&&this.parentElement&&this.parentElement.appendChild(e);let t=this.domService.getElementFromXPath(this.tagPinAnnotation.targetElement?.xpath);this.pointerMoveEvent&&(this.tagPinAnnotation.targetElement=this.domService.getTargetElementForCursorPosition(this.pointerMoveEvent));let r=this.domService.getElementFromXPath(this.tagPinAnnotation.targetElement?.xpath),a=this.domService.isElementInsideAdditionalLocationContainer(t)||this.domService.isElementInsideAdditionalLocationContainer(r);this.tagService.updateTag(this.tagPinAnnotation,!1,a),setTimeout(()=>{this.annotationDraging=!1,this.dragPosition=null,this.domService.removeHighlightFromElement(this.targetElement)},100),this.analyticsService.trackEvent(Z.Events.Tag.TAG_DRAGGED,{annotationId:this.tagPinAnnotation.annotationId})}catch(e){this.loggingService.catch("Error in TagPinPortalComponent onPinRelease: ",e)}}saveTag(e){}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in TagPinPortalComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in TagPinPortalComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Be),h(ja),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-tag-pin-portal"]],hostVars:2,hostBindings:function(t,r){t&2&&(Aa("id",r.id),x("data-velt-element",r.veltElement))},inputs:{tagPinAnnotation:"tagPinAnnotation",multipleTagPinsSelected:"multipleTagPinsSelected",avatarErrorImage:"avatarErrorImage",user:"user",offsetLeft:"offsetLeft",offsetTop:"offsetTop",targetElement:"targetElement"},standalone:!1,decls:1,vars:1,consts:[["class","tag-pin-portal","cdkDrag","","cdkDragHandle","",3,"id","pin-dragging","top","left","cdkDragDisabled","pointerup","pointerdown","click","cdkDragStarted","cdkDragMoved","cdkDragReleased",4,"ngIf"],["cdkDrag","","cdkDragHandle","",1,"tag-pin-portal",3,"pointerup","pointerdown","click","cdkDragStarted","cdkDragMoved","cdkDragReleased","id","cdkDragDisabled"],[3,"saveTag","tagPinAnnotation","tagPinSelected","multipleTagPinSelected","targetElement","user"]],template:function(t,r){t&1&&g(0,ktn,2,13,"div",0),t&2&&d("ngIf",r.tagPinAnnotation==null?null:r.tagPinAnnotation.position)},dependencies:[X,da,gp,J0e],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{position:absolute!important;top:0!important;left:0!important;box-sizing:border-box!important;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset!important;width:unset!important;text-align:left!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.tag-pin-portal[_ngcontent-%COMP%]{position:absolute;transform:none!important;transform-origin:0 0!important;transform-box:fill-box!important;top:0;left:0}.tag-pin-portal.pin-dragging[_ngcontent-%COMP%]{position:fixed;z-index:2147483557!important}"],changeDetection:0});let i=o;return i})();var tCe=(()=>{let o=class o{constructor(e,t,r,a,s){this.domService=e,this.componentFactoryResolver=t,this.injector=r,this.appRef=a,this.loggingService=s,this.tagsPinById={}}setTagPin(e){try{if(!this.tagsPinById[e.annotationId])this.setPinPortal(e);else if(e.targetElement?.xpath===this.tagsPinById[e.annotationId]?.annotation?.targetElement?.xpath){let t=this.tagsPinById[e.annotationId].portalRef,r=this.tagsPinById[e.annotationId].userTargetElement,a=this.tagsPinById[e.annotationId].pinHostElement;if(document.body.contains(r)&&document.body.contains(a))t&&(t.instance.tagPinAnnotation=JSON.parse(JSON.stringify(e)),this.updateElementOffset(e));else{let s=this.tagsPinById[e.annotationId].pinHostDomPortalOutlet;s&&(this.tagsPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST),this.tagsPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST_STATIC),s.detach(),delete this.tagsPinById[e.annotationId],this.setPinPortal(e))}}else{let t=this.tagsPinById[e.annotationId].pinHostDomPortalOutlet;t&&(this.tagsPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST),this.tagsPinById[e.annotationId].pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST_STATIC),t.detach(),delete this.tagsPinById[e.annotationId],this.setPinPortal(e))}}catch(t){this.loggingService.catch("Error in TagPinPortalService setTagPin: ",t)}}setPinPortal(e){try{let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let r=t.iterateNext();if(r){let a=this.domService.getHostElement(r),s=new $o(eCe),c=new Ho(a,this.componentFactoryResolver,this.appRef,this.injector),p=c.attach(s);p.instance.tagPinAnnotation=JSON.parse(JSON.stringify(e)),p.instance.targetElement=r,this.tagsPinById[e.annotationId]={pinHostDomPortalOutlet:c,pinPortal:s,portalRef:p,annotation:JSON.parse(JSON.stringify(e)),userTargetElement:r,pinHostElement:a},a.setAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST,e.annotationId),window.getComputedStyle(a).position==="static"&&(Pd(a)||a.setAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST_STATIC,"true")),this.updateElementOffset(e)}}}catch(t){this.loggingService.catch("Error in TagPinPortalService setPinPortal: ",t)}}updateElementOffset(e){try{let{portalRef:t,userTargetElement:r,pinHostElement:a}=this.tagsPinById[e.annotationId],s=this.domService.getElementOffset(r,a);t.instance.offsetLeft=s.offsetLeft,t.instance.offsetTop=s.offsetTop}catch(t){this.loggingService.catch("Error in TagPinPortalService updateElementOffset: ",t)}}checkPinsToRemove(e){try{let t=e.map(r=>r.annotationId);Object.keys(this.tagsPinById).forEach(r=>{if(!t.includes(r)){let a=this.tagsPinById[r];a.pinHostDomPortalOutlet.detach(),a.pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST),a.pinHostElement?.removeAttribute(j.ATTRIBUTES.VELT_TAG_PIN_HOST_STATIC),this.domService.removeHighlightFromElement(a.pinHostElement),delete this.tagsPinById[r]}})}catch(t){this.loggingService.catch("Error in TagPinPortalService checkPinsToRemove: ",t)}}};o.\u0275fac=function(t){return new(t||o)(ee(Be),ee(Do),ee(Ot),ee(Ci),ee(y))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();var iG=(()=>{let o=class o{get pinHighlighterClass(){return this._pinHighlighterClass}set pinHighlighterClass(e){this._pinHighlighterClass=e,this.domService.setPinHighlighterClass(e)}constructor(e,t,r,a,s,c){this.analyticsService=e,this.authService=t,this.domService=r,this.tagService=a,this.tagPinPortalService=s,this.loggingService=c,this._pinHighlighterClass=null,this.tagPinAnnotations=[],this.subscriptions=[],this.isFirstComponent=!0,this.selectedAnnotationsMap={},this.tagAnnotationFocused=!1,this.veltId=En(),this.veltElement=!0;try{this.loggingService.log("%c[WB] Creating CLASS: TagsContainerComponent","color: blue;");let p=new URL(window.location.href);this.focusTagAnnotationId=p.searchParams.get(j.URL_PARAMS.TAG_ID)}catch(p){this.loggingService.catch("Error in TagsContainerComponent constructor: ",p)}}ngOnInit(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;")}ngAfterViewInit(){try{let e=document.querySelector(j.TAGS.SNIPPYLY_TAGS),t=document.querySelector(j.TAGS.VELT_TAGS);t?this.veltId===t?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent()):this.veltId===e?.getAttribute(j.ATTRIBUTES.VELT_ID)&&(this.isFirstComponent=!0,this.initComponent())}catch(e){this.loggingService.catch("Error in TagsContainerComponent AfterViewInit: ",e)}}initComponent(){try{this.subscriptions.push(this.authService.getUser$().pipe(Le(e=>!!e)).subscribe(e=>{e&&this.setTagInstalledInAnalytics()},e=>{this.loggingService.catch("Error in getUser: ",e)})),this.subscriptions.push(this.domService.getSelectedAnnotationsMap$().subscribe(e=>{this.selectedAnnotationsMap=e},e=>{this.loggingService.catch("Error in TagsContainerComponent getSidebarVisibility$ subscription: ",e)})),this.getAllTagsOnCurrentDocument()}catch(e){this.loggingService.catch("Error in TagsContainerComponent initComponent: ",e)}}getAllTagsOnCurrentDocument(){this.loggingService.log("%c[WB] Calling FUNCTION: getAllTagsOnCurrentDocument","color: green;");try{this.subscriptions.push(this.tagService.getAllTagAnnotations().pipe(Le(e=>!!e),he(e=>this.domService.getSelectedAnnotationsMap$().pipe(ce(t=>({annotations:e,selectedAnnotationsMap:t||{}}))))).subscribe(e=>{try{this.loggingService.log(e),this.tagPinAnnotations=e?.annotations;let t=this.tagPinAnnotations.filter(r=>r.targetElement);t=t.filter(r=>!(r.resolved&&!e.selectedAnnotationsMap[r.annotationId])),this.tagPinPortalService.checkPinsToRemove(t),t.forEach(r=>{this.tagPinPortalService.setTagPin(r)}),this.focusTagAnnotation()}catch(t){this.loggingService.catch("Error in TagsContainerComponent getAllTagsOnCurrentDocument inside subscription: ",t)}},e=>{this.loggingService.catch("Error in TagsContainerComponent getAllTagsOnCurrentDocument subscription: ",e)}))}catch(e){this.loggingService.catch("Error in TagsContainerComponent getAllTagsOnCurrentDocument: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in TagsContainerComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in TagsContainerComponent unsubscribe: ",e)}}focusTagAnnotation(){if(this.focusTagAnnotationId&&!this.tagAnnotationFocused){let e=this.tagPinAnnotations.find(t=>t.annotationId===this.focusTagAnnotationId);e&&(this.tagAnnotationFocused=!0,this.selectedAnnotationsMap[e.annotationId]||this.domService.toggleAnnotationSelection(e),setTimeout(()=>{let t=null;e.targetElement?t=document.getElementById(`tag-pin-contianer-${e.annotationId}`):t=document.querySelector(`[data-velt-id='${e.annotationId}']`),t&&t.scrollIntoView({behavior:"auto",block:"center",inline:"nearest"})},100))}}setTagInstalledInAnalytics(){try{this.analyticsService.setInstalledFeature(Re.TAG)}catch(e){this.loggingService.catch("Error in TagsContainerComponent setTagInstalledInAnalytics: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(Be),h(ja),h(tCe),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-tags-container"]],hostVars:2,hostBindings:function(t,r){t&2&&x("data-velt-id",r.veltId)("data-velt-element",r.veltElement)},inputs:{pinHighlighterClass:"pinHighlighterClass"},standalone:!1,decls:0,vars:0,template:function(t,r){},encapsulation:2,changeDetection:0});let i=o;return i})();var Ntn=["customBtnRef"],Ftn=["*"];function Ltn(i,o){i&1&&je(0)}function Btn(i,o){if(i&1&&g(0,Ltn,1,0,"ng-container",5),i&2){l();let n=de(5);d("ngTemplateOutlet",n)}}function Vtn(i,o){i&1&&(_(0,"div",8),le(),_(1,"svg",9),w(2,"circle",10)(3,"path",11),b()())}function Utn(i,o){i&1&&je(0)}function jtn(i,o){if(i&1&&(g(0,Vtn,4,0,"div",6),_(1,"div",7,2),g(3,Utn,1,0,"ng-container",5),b()),i&2){let n=l(),e=de(5);d("ngIf",n.showDefaultBtn),m(3),d("ngTemplateOutlet",e)}}function $tn(i,o){i&1&&Lt(0)}var oG=(()=>{let o=class o{constructor(e,t,r,a){this.analyticsService=e,this.authService=t,this.tagService=r,this.loggingService=a,this.showDefaultBtn=!1,this.subscriptions=[],this.veltElement=!0,this.subscriptions.push(this.authService.getUser$().subscribe(s=>{this.user=s},s=>{this.loggingService.catch("Error in TagsToolComponent getUser$ subscription: ",s)}))}ngOnInit(){}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||(this.showDefaultBtn=!0)}catch(e){this.loggingService.catch("Error in TagsToolComponent AfterViewInit: ",e)}}addTag(){this.loggingService.log("%c[WB] Calling FUNCTION: addTag","color: green;");try{this.analyticsService.trackEvent(Z.Events.Tag.TAG_TOOL_CLICKED,{toolType:this.customBtnRef?.nativeElement?.children?.length?"custom":"default"}),this.user&&(this.user.isReadOnly||this.user.isAnonymous?this.loggingService.catch("Anonymous/Readonly users cannot add tags."):this.targetTagElementId?this.tagService.attachTag(this.targetTagElementId,["id","data-id"]):this.tagService.enableAddTagMode())}catch(e){this.loggingService.catch("Error in TagsToolComponent addTag: ",e)}}ngOnDestroy(){this.loggingService.log("%c[WB] Calling FUNCTION: ngOnDestroy","color: green;");try{this.unsubscribe()}catch(e){this.loggingService.catch("Error in TagsToolComponent ondestroy: ",e)}}unsubscribe(){this.loggingService.log("%c[WB] Calling FUNCTION: unsubscribe","color: green;");try{this.subscriptions.map(e=>{e.unsubscribe()}),this.subscriptions=[]}catch(e){this.loggingService.catch("Error in TagsToolComponent unsubscribe: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(ja),h(y))},o.\u0275cmp=O({type:o,selectors:[["snippyly-tags-tool"]],viewQuery:function(t,r){if(t&1&&nt(Ntn,5),t&2){let a;Xe(a=Qe())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{targetTagElementId:"targetTagElementId"},standalone:!1,ngContentSelectors:Ftn,decls:6,vars:2,consts:[["tagToolBtn",""],["content",""],["customBtnRef",""],[1,"snippyly-tag-btn-container",3,"click"],[3,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["class","action-btn",4,"ngIf"],[1,"custom-btn-container"],[1,"action-btn"],["xmlns","http://www.w3.org/2000/svg",0,"xmlns","bx","https://boxy-svg.com","viewBox","0 0 32 32","width","32","height","32","fill","none",1,"action-btn-icon"],["cx","16","cy","10.751","r","3.751",0,"bx","origin","0.5 1.19976","has-stroke","",2,"stroke-width","2px"],["d","M 10 24.964 L 10 24.251 C 10 20.936 12.687 18.251 16 18.251 C 19.313 18.251 22 20.936 22 24.251 L 22 25","stroke-linecap","round",0,"bx","origin","0.5 -0.333481","has-stroke","",2,"stroke-width","2px"]],template:function(t,r){if(t&1){let a=Y();jt(),_(0,"div",3),G("click",function(c){return N(a),r.addTag(),F(c.stopPropagation())}),g(1,Btn,1,1,"ng-template",4)(2,jtn,4,2,"ng-template",null,0,Te),b(),g(4,$tn,1,0,"ng-template",null,1,Te)}if(t&2){let a=de(3);m(),d("ngIf",r.targetTagElementId)("ngIfElse",a)}},dependencies:[X,_t],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;height:unset;width:unset;text-align:left!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:empty{display:revert!important}.snippyly-tag-btn-container[_ngcontent-%COMP%]{display:inline-block}.action-btn[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.action-btn-icon[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:50px;cursor:pointer;transition:.5s!important}.action-btn-icon[_ngcontent-%COMP%] *[has-stroke][_ngcontent-%COMP%]{stroke:#8f95b2!important}.action-btn-icon[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:not([has-stroke]){fill:#8f95b2!important}.action-btn-icon[_ngcontent-%COMP%]:hover{background:#eae8f9}.action-btn-icon[_ngcontent-%COMP%]:active, .action-btn-icon.active[_ngcontent-%COMP%]{background:#625df5}.action-btn-icon[_ngcontent-%COMP%]:active *[has-stroke][_ngcontent-%COMP%], .action-btn-icon.active[_ngcontent-%COMP%] *[has-stroke][_ngcontent-%COMP%]{stroke:#fff!important}.action-btn-icon[_ngcontent-%COMP%]:active *[_ngcontent-%COMP%]:not([has-stroke]), .action-btn-icon.active[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:not([has-stroke]){fill:#fff!important}"],changeDetection:0});let i=o;return i})();var nCe=(()=>{let o=class o{constructor(e,t){this.injector=e,this.configService=t,this.suppressAll=!1,this.permissionDeniedErrorCount=0;try{this.configService.getDisableLogsConfig$().subscribe(r=>{this.suppressAll=r?.suppressAll??!1}),window.addEventListener("error",r=>{try{r?.filename?.includes("velt.js")&&(this.handleError(r.error),r.preventDefault())}catch{}}),window.addEventListener("unhandledrejection",r=>{try{(r?.reason?.stack||String(r?.reason||"")).includes("velt.js")&&this.suppressAll&&(this.handleError(r.reason),r.preventDefault())}catch{}})}catch{}}handleError(e){try{if(e?.message?.includes("ExpressionChangedAfterItHasBeenCheckedError"))return;let t=e?.message||"",r=e?.code||"",a=!1;if(typeof r=="string"&&r?.toLowerCase()?.includes("permission_denied")?(a=!0,this.permissionDeniedErrorCount++):typeof t=="string"&&t?.toLowerCase()?.includes("permission_denied")&&(a=!0,this.permissionDeniedErrorCount++),a&&this.permissionDeniedErrorCount>2)return;let s=this.injector.get(et);s&&s.trackEvent(Z.Events.Core.SDK_UNCAUGHT_ERROR,{message:e?.message?e?.message:e,clientUserId:s?.user?.userId,snippylyUserId:s?.user?.userSnippylyId,source:"sdk"})}catch{}}};o.\u0275fac=function(t){return new(t||o)(ee(Ot),ee(Ft))},o.\u0275prov=Me({token:o,factory:o.\u0275fac});let i=o;return i})();var iCe=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u){this.analyticsService=e,this.authService=t,this.configService=r,this.docService=a,this.databaseService=s,this.loggingService=c,this.notificationService=p,this.commonDbService=u}sendFeedback(e){try{let t=this.authService.getUser(),r=this.docService.getDocumentPaths();if(t&&r&&this.databaseService.getDbValue()){e.from=t?.isAnonymous?null:t,e.lastUpdated=this.serverTimestamp,e.apiKey=this.configService.getApiKey(),e.metadata=this.docService.getDocumentMetadata(),e.pageInfo=Oi(),e.id=this.commonDbService.generateDocumentId();let a=JSON.parse(JSON.stringify(e));this.commonDbService.setData({feature:"userFeedback",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",skipFirestore:!0},data:a}),this.updateNotificationsDatabase(a)}}catch(t){this.loggingService.catch("Error in UserFeedbackService sendFeedback: ",t)}}updateNotificationsDatabase(e){try{let t={notificationSource:"userFeedback",userFeedback:e};this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in UserFeedbackService updateNotificationsDatabase: ",t)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(ee(et),ee(Ue),ee(Ft),ee(st),ee(Tn),ee(y),ee(mn),ee(hn))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function ztn(i,o){if(i&1){let n=Y();_(0,"input",14),P(1,"translate"),Vr("ngModelChange",function(t){N(n);let r=l();return qr(r.feedbackForm.emailId,t)||(r.feedbackForm.emailId=t),F(t)}),b()}if(i&2){let n=l();d("placeholder",M(1,2,"Your email address")),Br("ngModel",n.feedbackForm.emailId)}}var rG=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.analyticsService=e,this.authService=t,this.loggingService=r,this.toastService=a,this.userFeedbackService=s,this.matDialogRef=c,this.matBottomSheetRef=p,this.subscriptions=[],this.feedbackForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(u=>{u?.email&&!u?.isAnonymous?this.user=u:this.user=null}))}catch(u){this.loggingService.catch("Error in FeedbackDialogComponent constructor: ",u)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(e){this.loggingService.catch("Error in FeedbackDialogComponent ngOnInit: ",e)}}submitFeedback(){try{this.user&&(this.feedbackForm.emailId=this.user.email),this.feedbackForm.emailId&&this.feedbackForm.message&&(this.userFeedbackService.sendFeedback({emailId:this.feedbackForm.emailId,message:this.feedbackForm.message}),this.analyticsService.trackEvent(Z.Events.Feedback.FEEDBACK_SUBMITTED),this.toastService.setToast({message:"Thank you for your feedback!",type:"success",duration:2e3}),this.closeDialog())}catch(e){this.loggingService.catch("Error in FeedbackDialogComponent submitFeedback: ",e)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(e){this.loggingService.catch("Error in FeedbackDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in FeedbackDialogComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(y),h(zd),h(iCe),h(nr,8),h(Ed,8))},o.\u0275cmp=O({type:o,selectors:[["app-feedback-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:22,vars:16,consts:[["feedbackFormRef","ngForm"],[1,"s-feedback-modal"],[1,"s-feedback-header"],[1,"s-feedback-header-title"],[1,"s-feedback-header-description"],[1,"s-feedback-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-feedback-body"],[1,"s-feedback-form"],["class","s-feedback-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-feedback-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),te(4),P(5,"translate"),b(),_(6,"div",4),te(7),P(8,"translate"),b()(),_(9,"div",5),G("click",function(){return N(a),F(r.closeDialog())}),le(),_(10,"svg",6),w(11,"path",7),b()()(),ut(),_(12,"div",8)(13,"form",9,0),g(15,ztn,2,4,"input",10),_(16,"textarea",11),P(17,"translate"),Vr("ngModelChange",function(c){return N(a),qr(r.feedbackForm.message,c)||(r.feedbackForm.message=c),F(c)}),b()()(),_(18,"div",12)(19,"div",13),G("click",function(){N(a);let c=de(14);return F(c!=null&&c.valid?r.submitFeedback():null)}),te(20),P(21,"translate"),b()()()}if(t&2){let a=de(14);m(4),Ce(" ",M(5,8,"Feedback")," "),m(3),Ce(" ",M(8,10,"Provide feedback on your Superflow experience.")," "),m(8),d("ngIf",!r.user),m(),d("placeholder",M(17,12,"Tell us the details...")),Br("ngModel",r.feedbackForm.message),m(3),ge("s-disabled",!(a!=null&&a.valid)),m(),Ce(" ",M(21,14,"Send")," ")}},dependencies:[X,gv,ha,es,pv,ju,$u,ka,Uu,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-feedback-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%], .s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-feedback-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal .s-button{flex-grow:1!important}@media screen and (max-width: 425px){ .snippyly-feedback-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-feedback-dialog .s-feedback-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-feedback-dialog .s-feedback-modal .s-feedback-body{flex-grow:1!important} .snippyly-feedback-dialog .s-feedback-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let i=o;return i})();var oCe=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u){this.analyticsService=e,this.authService=t,this.configService=r,this.docService=a,this.databaseService=s,this.loggingService=c,this.notificationService=p,this.commonDbService=u}sendContactUsData(e){try{let t=this.authService.getUser(),r=this.docService.getDocumentPaths();if(t&&r&&this.databaseService.getDbValue()){e.from=t?.isAnonymous?null:t,e.lastUpdated=this.serverTimestamp,e.apiKey=this.configService.getApiKey(),e.metadata=this.docService.getDocumentMetadata(),e.pageInfo=Oi(),e.id=this.commonDbService.generateDocumentId();let a=JSON.parse(JSON.stringify(e));this.commonDbService.setData({feature:"userContactUs",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",skipFirestore:!0},data:a}),this.updateNotificationsDatabase(a)}}catch(t){this.loggingService.catch("Error in UserContactUsService sendContactUsData: ",t)}}updateNotificationsDatabase(e){try{let t={notificationSource:"userContactUs",userContactUs:e};this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in UserContactUsService updateNotificationsDatabase: ",t)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(ee(et),ee(Ue),ee(Ft),ee(st),ee(Tn),ee(y),ee(mn),ee(hn))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function Wtn(i,o){if(i&1){let n=Y();_(0,"input",14),P(1,"translate"),Vr("ngModelChange",function(t){N(n);let r=l();return qr(r.contactUsForm.emailId,t)||(r.contactUsForm.emailId=t),F(t)}),b()}if(i&2){let n=l();d("placeholder",M(1,2,"Your email address")),Br("ngModel",n.contactUsForm.emailId)}}var aG=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.analyticsService=e,this.authService=t,this.loggingService=r,this.toastService=a,this.userContactUsService=s,this.matDialogRef=c,this.matBottomSheetRef=p,this.subscriptions=[],this.contactUsForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(u=>{u?.email&&!u?.isAnonymous?this.user=u:this.user=null}))}catch(u){this.loggingService.catch("Error in ContactUsDialogComponent constructor: ",u)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-contact-us-dialog")}catch(e){this.loggingService.catch("Error in ContactUsDialogComponent ngOnInit: ",e)}}submitForm(){try{this.user&&(this.contactUsForm.emailId=this.user.email),this.contactUsForm.emailId&&this.contactUsForm.message&&(this.userContactUsService.sendContactUsData({emailId:this.contactUsForm.emailId,message:this.contactUsForm.message}),this.analyticsService.trackEvent(Z.Events.ContactUs.CONTACT_SUBMITTED),this.toastService.setToast({message:"Thank you! We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(e){this.loggingService.catch("Error in ContactUsDialogComponent submitForm: ",e)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(e){this.loggingService.catch("Error in ContactUsDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in ContactUsDialogComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(y),h(zd),h(oCe),h(nr,8),h(Ed,8))},o.\u0275cmp=O({type:o,selectors:[["app-contact-us-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:22,vars:16,consts:[["contactUsFormRef","ngForm"],[1,"s-contact-us-modal"],[1,"s-contact-us-header"],[1,"s-contact-us-header-title"],[1,"s-contact-us-header-description"],[1,"s-contact-us-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-contact-us-body"],[1,"s-contact-us-form"],["class","s-contact-us-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-contact-us-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),te(4),P(5,"translate"),b(),_(6,"div",4),te(7),P(8,"translate"),b()(),_(9,"div",5),G("click",function(){return N(a),F(r.closeDialog())}),le(),_(10,"svg",6),w(11,"path",7),b()()(),ut(),_(12,"div",8)(13,"form",9,0),g(15,Wtn,2,4,"input",10),_(16,"textarea",11),P(17,"translate"),Vr("ngModelChange",function(c){return N(a),qr(r.contactUsForm.message,c)||(r.contactUsForm.message=c),F(c)}),b()()(),_(18,"div",12)(19,"div",13),G("click",function(){N(a);let c=de(14);return F(c!=null&&c.valid?r.submitForm():null)}),te(20),P(21,"translate"),b()()()}if(t&2){let a=de(14);m(4),Ce(" ",M(5,8,"Contact us")," "),m(3),Ce(" ",M(8,10,"Let us know how can we help you!")," "),m(8),d("ngIf",!r.user),m(),d("placeholder",M(17,12,"How can we help?")),Br("ngModel",r.contactUsForm.message),m(3),ge("s-disabled",!(a!=null&&a.valid)),m(),Ce(" ",M(21,14,"Send")," ")}},dependencies:[X,gv,ha,es,pv,ju,$u,ka,Uu,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-contact-us-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%], .s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-contact-us-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal .s-button{flex-grow:1!important}@media screen and (max-width: 425px){ .snippyly-contact-us-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-contact-us-dialog .s-contact-us-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-contact-us-body{flex-grow:1!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let i=o;return i})();var rCe=(()=>{let o=class o{constructor(e,t,r,a,s,c,p,u){this.analyticsService=e,this.authService=t,this.configService=r,this.docService=a,this.databaseService=s,this.loggingService=c,this.notificationService=p,this.commonDbService=u}submitIssue(e){try{let t=this.authService.getUser(),r=this.docService.getDocumentPaths();if(t&&r&&this.databaseService.getDbValue()){e.from=t?.isAnonymous?null:t,e.lastUpdated=this.serverTimestamp,e.apiKey=this.configService.getApiKey(),e.metadata=this.docService.getDocumentMetadata(),e.pageInfo=Oi(),e.id=this.commonDbService.generateDocumentId();let a=JSON.parse(JSON.stringify(e));this.commonDbService.setData({feature:"userReportBug",properties:{documentId:r?.documentId??"",organizationId:r?.organizationId??"",skipFirestore:!0},data:a}),this.updateNotificationsDatabase(a)}}catch(t){this.loggingService.catch("Error in UserReportBugService submitIssue: ",t)}}updateNotificationsDatabase(e){try{let t={notificationSource:"userReportBug",userReportBug:e};this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in UserReportBugService updateNotificationsDatabase: ",t)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};o.\u0275fac=function(t){return new(t||o)(ee(et),ee(Ue),ee(Ft),ee(st),ee(Tn),ee(y),ee(mn),ee(hn))},o.\u0275prov=Me({token:o,factory:o.\u0275fac,providedIn:"root"});let i=o;return i})();function Ytn(i,o){if(i&1){let n=Y();_(0,"input",14),P(1,"translate"),Vr("ngModelChange",function(t){N(n);let r=l();return qr(r.issueForm.emailId,t)||(r.issueForm.emailId=t),F(t)}),b()}if(i&2){let n=l();d("placeholder",M(1,2,"Your email address")),Br("ngModel",n.issueForm.emailId)}}var sG=(()=>{let o=class o{constructor(e,t,r,a,s,c,p){this.analyticsService=e,this.authService=t,this.loggingService=r,this.toastService=a,this.userReportBugService=s,this.matDialogRef=c,this.matBottomSheetRef=p,this.subscriptions=[],this.issueForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(u=>{u?.email&&!u?.isAnonymous?this.user=u:this.user=null}))}catch(u){this.loggingService.catch("Error in ReportBugDialogComponent constructor: ",u)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(e){this.loggingService.catch("Error in ReportBugDialogComponent ngOnInit: ",e)}}submitIssue(){try{this.user&&(this.issueForm.emailId=this.user.email),this.issueForm.emailId&&this.issueForm.message&&(this.userReportBugService.submitIssue({emailId:this.issueForm.emailId,message:this.issueForm.message}),this.analyticsService.trackEvent(Z.Events.Bug.BUG_SUBMITTED),this.toastService.setToast({message:"Thanks for reporting the bug. We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(e){this.loggingService.catch("Error in ReportBugDialogComponent submitFeedback: ",e)}}closeDialog(){this.matBottomSheetRef&&this.matBottomSheetRef.dismiss(),this.matDialogRef&&this.matDialogRef.close()}ngOnDestroy(){try{this.subscriptions.forEach(e=>{e.unsubscribe()})}catch(e){this.loggingService.catch("Error in ReportBugDialogComponent ngOnDestroy: ",e)}}};o.\u0275fac=function(t){return new(t||o)(h(et),h(Ue),h(y),h(zd),h(rCe),h(nr,8),h(Ed,8))},o.\u0275cmp=O({type:o,selectors:[["snippyly-report-bug-dialog"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},standalone:!1,decls:22,vars:16,consts:[["issueFormRef","ngForm"],[1,"s-report-bug-modal"],[1,"s-report-bug-header"],[1,"s-report-bug-header-title"],[1,"s-report-bug-header-description"],[1,"s-report-bug-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-report-bug-body"],[1,"s-report-bug-form"],["class","s-report-bug-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-report-bug-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"]],template:function(t,r){if(t&1){let a=Y();_(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),te(4),P(5,"translate"),b(),_(6,"div",4),te(7),P(8,"translate"),b()(),_(9,"div",5),G("click",function(){return N(a),F(r.closeDialog())}),le(),_(10,"svg",6),w(11,"path",7),b()()(),ut(),_(12,"div",8)(13,"form",9,0),g(15,Ytn,2,4,"input",10),_(16,"textarea",11),P(17,"translate"),Vr("ngModelChange",function(c){return N(a),qr(r.issueForm.message,c)||(r.issueForm.message=c),F(c)}),b()()(),_(18,"div",12)(19,"div",13),G("click",function(){N(a);let c=de(14);return F(c!=null&&c.valid?r.submitIssue():null)}),te(20),P(21,"translate"),b()()()}if(t&2){let a=de(14);m(4),Ce(" ",M(5,8,"Report bugs")," "),m(3),Ce(" ",M(8,10,"Let us know about any bugs so we can fix them ASAP!")," "),m(8),d("ngIf",!r.user),m(),d("placeholder",M(17,12,"Tell us the details...")),Br("ngModel",r.issueForm.message),m(3),ge("s-disabled",!(a!=null&&a.valid)),m(),Ce(" ",M(21,14,"Send")," ")}},dependencies:[X,gv,ha,es,pv,ju,$u,ka,Uu,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-report-bug-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%], .s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-report-bug-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal .s-button{flex-grow:1!important}@media screen and (max-width: 425px){ .snippyly-report-bug-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-report-bug-dialog .s-report-bug-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-report-bug-body{flex-grow:1!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let i=o;return i})();var Ktn=["customBtnRef"],Ztn=["*"];function Xtn(i,o){i&1&&(_(0,"div",7),le(),_(1,"svg",8),w(2,"path",9),b(),ut(),_(3,"span",10),te(4),P(5,"translate"),b()()),i&2&&(m(4),Ge(M(5,1,"Give feedback")))}function Qtn(i,o){i&1&&(_(0,"div",7),le(),_(1,"svg",11),w(2,"path",12),b(),ut(),_(3,"span",10),te(4),P(5,"translate"),b()()),i&2&&(m(4),Ge(M(5,1,"Report bugs")))}function Jtn(i,o){i&1&&(_(0,"div",7),le(),_(1,"svg",13),w(2,"path",14)(3,"path",15),b(),ut(),_(4,"span",10),te(5),P(6,"translate"),b()()),i&2&&(m(5),Ge(M(6,1,"Contact us")))}function enn(i,o){if(i&1&&(_(0,"div",5),g(1,Xtn,6,3,"div",6)(2,Qtn,6,3,"div",6)(3,Jtn,7,3,"div",6),b()),i&2){let n=l();d("ngSwitch",n.type),m(),d("ngSwitchCase","feedback"),m(),d("ngSwitchCase","reportBug"),m(),d("ngSwitchCase","contactUs")}}function tnn(i,o){i&1&&je(0)}function nnn(i,o){if(i&1&&(_(0,"div",16,1),g(2,tnn,1,0,"ng-container",17),b()),i&2){l();let n=de(4);m(2),d("ngTemplateOutlet",n)}}function inn(i,o){i&1&&Lt(0)}var lG=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p){super(p,r),this.analyticsService=e,this.loggingService=t,this.themeService=r,this.dialog=a,this.bottomSheet=s,this.breakpointObserver=c,this.elementRef=p,this.type="feedback",this.showDefaultBtn=!1,this.veltElement=!0}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}ngAfterViewInit(){try{this.customBtnRef?.nativeElement?.children?.length||(this.showDefaultBtn=!0)}catch(e){this.loggingService.catch("Error in UserRequestToolComponent view inti: ",e)}}openDialog(){try{switch(this.type){case"feedback":this.openFeedbackDialog();break;case"reportBug":this.openReportBugDialog();break;case"contactUs":this.openContactUsDialog();break;default:break}}catch(e){this.loggingService.catch("Error in UserRequestToolComponent openDialog: ",e)}}openFeedbackDialog(){try{this.analyticsService.trackEvent(Z.Events.Feedback.FEEDBACK_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(rG,{panelClass:["snippyly-feedback-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(rG,{panelClass:["snippyly-feedback-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(e){this.loggingService.catch("Error in UserRequestToolComponent openFeedbackDialog: ",e)}}openReportBugDialog(){try{this.analyticsService.trackEvent(Z.Events.Bug.BUG_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(sG,{panelClass:["snippyly-report-bug-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(sG,{panelClass:["snippyly-report-bug-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(e){this.loggingService.catch("Error in UserRequestToolComponent openReportBugDialog: ",e)}}openContactUsDialog(){try{this.analyticsService.trackEvent(Z.Events.ContactUs.CONTACT_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(aG,{panelClass:["snippyly-contact-us-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(aG,{panelClass:["snippyly-contact-us-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(e){this.loggingService.catch("Error in UserRequestToolComponent openContactUsDialog: ",e)}}isMobile(){return this.breakpointObserver.isMatched("(max-width: 599px)")}};o.\u0275fac=function(t){return new(t||o)(h(et),h(y),h(qe),h(no),h(bc),h(fo),h(R))},o.\u0275cmp=O({type:o,selectors:[["snippyly-user-request-tool"]],viewQuery:function(t,r){if(t&1&&nt(Ktn,5),t&2){let a;Xe(a=Qe())&&(r.customBtnRef=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{type:"type"},standalone:!1,features:[B],ngContentSelectors:Ztn,decls:5,vars:2,consts:[["content",""],["customBtnRef",""],[1,"user-request-tool-container",3,"click"],[3,"ngSwitch",4,"ngIf"],["class","snippyly-custom-button-container",4,"ngIf"],[3,"ngSwitch"],["class","s-user-request-tool-button",4,"ngSwitchCase"],[1,"s-user-request-tool-button"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-user-request-tool-button-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M10.5757 5.76422C10.2533 6.07365 9.74414 6.07365 9.4217 5.76422L8.8447 5.2105C8.16934 4.56239 7.25698 4.16667 6.2487 4.16667C4.17763 4.16667 2.4987 5.8456 2.4987 7.91667C2.4987 9.90219 3.57352 11.5417 5.12516 12.8888C6.67813 14.237 8.53486 15.1312 9.64424 15.5876C9.87619 15.683 10.1212 15.683 10.3532 15.5876C11.4625 15.1312 13.3193 14.237 14.8722 12.8888C16.4239 11.5417 17.4987 9.90218 17.4987 7.91667C17.4987 5.8456 15.8198 4.16667 13.7487 4.16667C12.7404 4.16667 11.8281 4.56239 11.1527 5.2105L10.5757 5.76422ZM9.9987 4.00798C9.02545 3.074 7.70411 2.5 6.2487 2.5C3.25716 2.5 0.832031 4.92512 0.832031 7.91667C0.832031 13.2235 6.64065 16.1542 9.01019 17.1289C9.64834 17.3914 10.3491 17.3914 10.9872 17.1289C13.3567 16.1542 19.1654 13.2235 19.1654 7.91667C19.1654 4.92512 16.7402 2.5 13.7487 2.5C12.2933 2.5 10.9719 3.074 9.9987 4.00798Z","fill","#4C5366"],[1,"s-user-request-tool-button-text"],["width","16","height","20","viewBox","0 0 16 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 17.9996C6.91667 17.9996 5.91267 17.733 4.988 17.1996C4.06267 16.6663 3.33333 15.933 2.8 14.9996H0.975C0.691667 14.9996 0.458333 14.9036 0.275 14.7116C0.0916668 14.5203 0 14.283 0 13.9996C0 13.7163 0.0956668 13.479 0.287 13.2876C0.479 13.0956 0.716667 12.9996 1 12.9996H2.1C2.05 12.6663 2.021 12.333 2.013 11.9996C2.00433 11.6663 2 11.333 2 10.9996H0.975C0.691667 10.9996 0.458333 10.9036 0.275 10.7116C0.0916668 10.5203 0 10.283 0 9.99963C0 9.7163 0.0956668 9.47863 0.287 9.28663C0.479 9.0953 0.716667 8.99963 1 8.99963H2C2 8.6663 2.00433 8.33297 2.013 7.99963C2.021 7.6663 2.05 7.33297 2.1 6.99963H0.975C0.691667 6.99963 0.458333 6.90363 0.275 6.71163C0.0916668 6.5203 0 6.28297 0 5.99963C0 5.7163 0.0956668 5.47863 0.287 5.28663C0.479 5.0953 0.716667 4.99963 1 4.99963H2.8C3.03333 4.6163 3.296 4.25797 3.588 3.92463C3.87933 3.5913 4.21667 3.29963 4.6 3.04963L3.675 2.09963C3.49167 1.89963 3.40433 1.66197 3.413 1.38663C3.421 1.11197 3.51667 0.882968 3.7 0.699635C3.88333 0.516301 4.11667 0.424635 4.4 0.424635C4.68333 0.424635 4.91667 0.516301 5.1 0.699635L6.55 2.14963C7.01667 1.99963 7.49167 1.92463 7.975 1.92463C8.45833 1.92463 8.93333 1.99963 9.4 2.14963L10.9 0.674635C11.1 0.491301 11.3377 0.403635 11.613 0.411635C11.8877 0.420301 12.1167 0.516301 12.3 0.699635C12.4833 0.882968 12.575 1.1163 12.575 1.39963C12.575 1.68297 12.4833 1.9163 12.3 2.09963L11.35 3.04963C11.7333 3.29963 12.0793 3.58697 12.388 3.91163C12.696 4.23697 12.9667 4.59963 13.2 4.99963H15.025C15.3083 4.99963 15.5417 5.0953 15.725 5.28663C15.9083 5.47863 16 5.7163 16 5.99963C16 6.28297 15.904 6.5203 15.712 6.71163C15.5207 6.90363 15.2833 6.99963 15 6.99963H13.9C13.95 7.33297 13.9793 7.6663 13.988 7.99963C13.996 8.33297 14 8.6663 14 8.99963H15.025C15.3083 8.99963 15.5417 9.0953 15.725 9.28663C15.9083 9.47863 16 9.7163 16 9.99963C16 10.283 15.904 10.5203 15.712 10.7116C15.5207 10.9036 15.2833 10.9996 15 10.9996H14C14 11.333 13.996 11.6663 13.988 11.9996C13.9793 12.333 13.95 12.6663 13.9 12.9996H15.025C15.3083 12.9996 15.5417 13.0956 15.725 13.2876C15.9083 13.479 16 13.7163 16 13.9996C16 14.283 15.904 14.5203 15.712 14.7116C15.5207 14.9036 15.2833 14.9996 15 14.9996H13.2C12.6667 15.933 11.9377 16.6663 11.013 17.1996C10.0877 17.733 9.08333 17.9996 8 17.9996ZM8 15.9996C9.1 15.9996 10.0417 15.608 10.825 14.8246C11.6083 14.0413 12 13.0996 12 11.9996V7.99963C12 6.89963 11.6083 5.95797 10.825 5.17463C10.0417 4.3913 9.1 3.99963 8 3.99963C6.9 3.99963 5.95833 4.3913 5.175 5.17463C4.39167 5.95797 4 6.89963 4 7.99963V11.9996C4 13.0996 4.39167 14.0413 5.175 14.8246C5.95833 15.608 6.9 15.9996 8 15.9996ZM7 12.9996H9.025C9.30833 12.9996 9.54167 12.9036 9.725 12.7116C9.90833 12.5203 10 12.283 10 11.9996C10 11.7163 9.90433 11.4786 9.713 11.2866C9.521 11.0953 9.28333 10.9996 9 10.9996H6.975C6.69167 10.9996 6.45833 11.0953 6.275 11.2866C6.09167 11.4786 6 11.7163 6 11.9996C6 12.283 6.096 12.5203 6.288 12.7116C6.47933 12.9036 6.71667 12.9996 7 12.9996ZM7 8.99963H9.025C9.30833 8.99963 9.54167 8.90364 9.725 8.71163C9.90833 8.5203 10 8.28297 10 7.99963C10 7.7163 9.90433 7.47863 9.713 7.28663C9.521 7.0953 9.28333 6.99963 9 6.99963H6.975C6.69167 6.99963 6.45833 7.0953 6.275 7.28663C6.09167 7.47863 6 7.7163 6 7.99963C6 8.28297 6.096 8.5203 6.288 8.71163C6.47933 8.90364 6.71667 8.99963 7 8.99963Z","fill","#4C5366"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44772 20.5523 5 20 5ZM4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.2318 7.35984C5.58537 6.93556 6.21593 6.87824 6.64021 7.2318L11.3598 11.1648C11.7307 11.4739 12.2694 11.4739 12.6402 11.1648L17.3598 7.2318C17.7841 6.87824 18.4147 6.93556 18.7682 7.35984C19.1218 7.78412 19.0645 8.41468 18.6402 8.76825L13.9206 12.7013C12.808 13.6284 11.192 13.6284 10.0795 12.7013L5.35984 8.76825C4.93556 8.41468 4.87824 7.78412 5.2318 7.35984Z","fill","#777E91"],[1,"snippyly-custom-button-container"],[4,"ngTemplateOutlet"]],template:function(t,r){if(t&1){let a=Y();jt(),_(0,"div",2),G("click",function(){return N(a),F(r.openDialog())}),g(1,enn,4,4,"div",3)(2,nnn,3,1,"div",4),b(),g(3,inn,1,0,"ng-template",null,0,Te)}t&2&&(m(),d("ngIf",r.showDefaultBtn),m(),d("ngIf",!r.showDefaultBtn))},dependencies:[X,_t,Gi,to,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.user-request-tool-container[_ngcontent-%COMP%]{display:inline-block!important;cursor:pointer!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:100px!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]:hover{background:#ededed!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%] .s-user-request-tool-button-text[_ngcontent-%COMP%]{font-size:14px!important;color:#4c5366!important;font-weight:400!important}"],changeDetection:0});let i=o;return i})();var Bs=(()=>{let o=class o{constructor(e){this.elementRef=e,this.lastPosition=null,this.positionChange=new Pe,this.disabled=!1,this.timeSpentInMs=0,this.MAX_TIME_SPENT_IN_MS=6e4}ngAfterViewInit(){try{this.toggleTrackingPosition()}catch{}}toggleTrackingPosition(){try{this.disabled?this.stopTracking():this.startTrackingPosition()}catch{}}startTrackingPosition(){try{if(this.intervalId)return;this.intervalId=setInterval(()=>{if(this.timeSpentInMs+=10,this.timeSpentInMs>this.MAX_TIME_SPENT_IN_MS){this.stopTracking();return}let e=this.elementRef.nativeElement.getBoundingClientRect();(!this.lastPosition||!this.arePositionsEqual(this.lastPosition,e))&&(this.lastPosition=e,this.positionChange.emit(e))},10)}catch{}}stopTracking(){try{this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null,this.timeSpentInMs=0)}catch{}}arePositionsEqual(e,t){try{return e.top===t.top&&e.left===t.left&&e.bottom===t.bottom&&e.right===t.right&&e.width===t.width&&e.height===t.height}catch{return!0}}ngOnChanges(){try{this.toggleTrackingPosition()}catch{}}ngOnDestroy(){try{this.stopTracking()}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R))},o.\u0275dir=$t({type:o,selectors:[["","veltPositionObserver",""]],inputs:{disabled:[0,"veltPositionObserverDisabled","disabled"]},outputs:{positionChange:"positionChange"},standalone:!1,features:[Ze]});let i=o;return i})();var rnn=[[["","trigger",""]],[["","content",""]]],ann=["[trigger]","[content]"],snn=i=>({width:i}),lnn=(i,o,n,e,t,r,a)=>({"velt-dropdown-open":i,"velt-assign-dropdown-open":o,"velt-custom-dropdown-open":n,"velt-options-dropdown-open":e,"velt-priority-dropdown-open":t,"velt-status-dropdown-open":r,"velt-seen-dropdown-open":a});function cnn(i,o){if(i&1){let n=Y();_(0,"div",7,2),P(2,"translate"),G("pointerdown",function(t){return N(n),F(t.stopPropagation())})("pointerup",function(t){N(n);let r=l(),a=de(2);return r.closeMenu(a,!0),F(t.stopPropagation())}),Lt(3,1),b()}if(i&2){let n=o.width,e=de(1),t=l();it("width",t.calculateWidth?n:"100%"),ge("s-dark-child-override",t.darkMode),d("snippylyOverlay",e)("snippylyOverlayZIndex",1e4)("id","velt-dropdown-content-"+t.dropdownType),x("aria-label",M(2,9,t.dropdownType!==""?t.dropdownType+" menu items":"menu items"))("data-testid",t.componentId+"-content")}}var Wl=(()=>{let o=class o{constructor(e,t){this.elementRef=e,this.loggingService=t,this.veltElement=!0,this.calculateWidth=!0,this.dropdownClass="",this.dropdownType="",this.triggerClass="",this.triggerColor="",this.triggerBgColor="",this.triggerOnHover=!1,this.disabled=!1,this.openChange=new Pe,this.darkMode=!1,this.isTouchDevice=!1,this.isOpen=!1,this.componentId="velt-dropdown"}ngOnInit(){this.isTouchDevice=uae(!0),this.setupA11yAttributes()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container"),this.disabled?e.setAttribute("aria-disabled","true"):e.removeAttribute("aria-disabled")}catch(e){this.loggingService.catch("Error in DropdownComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{e.darkMode&&(e.darkMode.currentValue?this.elementRef.nativeElement.setAttribute("dark",""):this.elementRef.nativeElement.removeAttribute("dark")),e.disabled&&this.setupA11yAttributes()}catch{}}onClick(e){try{this.timedOutCloser&&clearTimeout(this.timedOutCloser),this.isOpen?this.isOpen=!1:(this.isOpen=!0,e.openMenu()),this.openChange.emit(this.isOpen)}catch{}}mouseEnter(e){try{this.timedOutCloser&&clearTimeout(this.timedOutCloser),this.openChange.emit(!0),this.isOpen=!0,e.openMenu()}catch{}}mouseLeave(e){try{this.timedOutCloser=setTimeout(()=>{this.openChange.emit(!1),this.isOpen=!1,e.closeMenu()},50)}catch{}}closeMenu(e,t=!1){try{if(this.isTouchDevice&&t)return;this.openChange.emit(!1),this.isOpen=!1,e.closeMenu()}catch{}}onPositionChange(e){try{e&&e?.updatePosition()}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-dropdown"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{calculateWidth:"calculateWidth",dropdownClass:"dropdownClass",dropdownType:"dropdownType",triggerClass:"triggerClass",triggerColor:"triggerColor",triggerBgColor:"triggerBgColor",triggerOnHover:"triggerOnHover",disabled:"disabled",darkMode:"darkMode"},outputs:{openChange:"openChange"},standalone:!1,features:[Ze],ngContentSelectors:ann,decls:10,vars:46,consts:[["menuTrigger","matMenuTrigger","triggerContainer",""],["menu","matMenu"],["menuContainerRef",""],["snippylyClickOutside","",1,"velt-dropdown-container",3,"clickOutside"],["veltPositionObserver","","role","button","tabindex","0",3,"click","mouseenter","positionChange","matMenuTriggerFor","matMenuTriggerData","ngClass","veltPositionObserverDisabled","id"],[1,"velt-menu","snippyly-menu",3,"hasBackdrop","id","aria-label"],["matMenuContent",""],["role","menu",3,"pointerdown","pointerup","snippylyOverlay","snippylyOverlayZIndex","id"]],template:function(t,r){if(t&1){let a=Y();jt(rnn),_(0,"div",3),G("clickOutside",function(){N(a);let c=de(2);return F(r.closeMenu(c,!1))}),_(1,"div",4,0),P(4,"translate"),G("click",function(c){N(a);let p=de(2);return r.onClick(p),F(c.stopPropagation())})("mouseenter",function(){N(a);let c=de(2);return F(r.triggerOnHover?r.mouseEnter(c):null)})("positionChange",function(){N(a);let c=de(2);return F(r.onPositionChange(c))}),Lt(5),b(),_(6,"mat-menu",5,1),P(8,"translate"),g(9,cnn,4,11,"ng-template",6),b()()}if(t&2){let a=de(2),s=de(3),c=de(7);x("data-testid",r.componentId),m(),tr(r.triggerClass),it("background-color",r.triggerBgColor?r.triggerBgColor:void 0)("--legacy-velt-dropdown-trigger-color",r.triggerBgColor||"")("color",r.triggerColor?r.triggerColor:void 0),ge("s-menu-disabled",r.disabled)("velt-dropdown-assign-trigger",r.dropdownType==="assign")("v-dropdown-menu-trigger",!0),d("matMenuTriggerFor",c)("matMenuTriggerData",A(36,snn,r.calculateWidth?(s==null?null:s.clientWidth)+"px":"100%"))("ngClass",GZ(38,lnn,r.dropdownType===""&&a.menuOpen,r.dropdownType==="assign"&&a.menuOpen,r.dropdownType==="custom"&&a.menuOpen,r.dropdownType==="options"&&a.menuOpen,r.dropdownType==="priority"&&a.menuOpen,r.dropdownType==="status"&&a.menuOpen,r.dropdownType==="seen"&&a.menuOpen))("veltPositionObserverDisabled",!(a!=null&&a.menuOpen))("id","velt-dropdown-trigger-"+r.dropdownType),x("aria-expanded",a.menuOpen)("aria-haspopup",!0)("aria-controls","velt-dropdown-menu-"+r.dropdownType)("aria-label",M(4,32,r.dropdownType!==""?r.dropdownType+" dropdown":"dropdown"))("aria-disabled",r.disabled)("data-testid",r.componentId+"-trigger"),m(5),tr(r.dropdownClass),d("hasBackdrop",!1)("id","velt-dropdown-menu-"+r.dropdownType)("aria-label",M(8,34,r.dropdownType!==""?r.dropdownType+" menu":"menu")),x("data-testid",r.componentId+"-menu")}},dependencies:[Ur,Al,joe,Vp,mi,Xn,Bs,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-dropdown-background: var(--velt-light-mode-background-0);--velt-dropdown-border: var(--velt-light-mode-border-4);--velt-dropdown-hover: var(--velt-light-mode-background-3);--velt-dropdown-accent-transparent: var(--velt-light-mode-accent-transparent)}[dark][_nghost-%COMP%]{--velt-dropdown-background: var(--velt-dark-mode-background-0);--velt-dropdown-border: var(--velt-dark-mode-border-4);--velt-dropdown-hover: var(--velt-dark-mode-background-3);--velt-dropdown-accent-transparent: var(--velt-dark-mode-accent-transparent)}.trigger-container[_ngcontent-%COMP%]{cursor:pointer}.s-menu-disabled[_ngcontent-%COMP%]{pointer-events:none!important} .velt-dropdown-assign-trigger{display:flex;width:100%;gap:var(--velt-spacing-md);padding:var(--velt-spacing-xs) var(--velt-spacing-md);align-items:center;justify-content:center;border-radius:var(--velt-border-radius-sm);background:var(--velt-dropdown-accent-transparent)} .v-dropdown-menu-trigger{border-radius:var(--velt-border-radius-xl);box-sizing:border-box} .v-dropdown-menu-trigger:hover{opacity:.8} .snippyly-menu{max-width:unset;border-radius:var(--velt-border-radius-md)} .snippyly-menu .mat-mdc-menu-content:has(>div){--velt-dropdown-background: var(--velt-light-mode-background-0);--velt-dropdown-border: var(--velt-light-mode-border-4);--velt-dropdown-hover: var(--velt-light-mode-background-3);--velt-dropdown-accent-transparent: var(--velt-light-mode-accent-transparent)} .snippyly-menu .mat-mdc-menu-content:has(>div>.s-dark-child-override){--velt-dropdown-background: var(--velt-dark-mode-background-0);--velt-dropdown-border: var(--velt-dark-mode-border-4);--velt-dropdown-hover: var(--velt-dark-mode-background-3);--velt-dropdown-accent-transparent: var(--velt-dark-mode-accent-transparent)} .snippyly-menu .mat-mdc-menu-content{font-family:var(--velt-default-font-family);background-color:var(--velt-dropdown-background);border-radius:var(--velt-border-radius-md);border:1px solid var(--velt-dropdown-border);padding:0;overflow:hidden} .snippyly-menu .mat-mdc-menu-content .mat-mdc-menu-item{background:transparent;padding-left:var(--velt-spacing-lg);padding-right:var(--velt-spacing-lg)} .snippyly-menu .mat-mdc-menu-content .mat-mdc-menu-item:hover{background-color:var(--velt-dropdown-hover)}"],changeDetection:0});let i=o;return i})();var dnn=i=>({componentConfigSignal:i}),mnn=(i,o)=>({condition:i,data:o});function pnn(i,o){if(i&1){let n=Y();f(0),_(1,"app-dropdown",2),G("click",function(t){return N(n),F(t.stopPropagation())}),f(2,3),w(3,"app-comment-dialog-status-dropdown-trigger",4),v(),f(4,5),w(5,"app-comment-dialog-status-dropdown-content",6),v(),b(),v()}if(i&2){let n=o.ngIf,e=l(3);m(),d("calculateWidth",!1)("triggerBgColor",e.backgroundColor)("darkMode",e.darkMode)("disabled",(n.user==null?null:n.user.isReadOnly)||(n.user==null?null:n.user.isAnonymous)||n.disabled),x("aria-controls",e.componentId+"-listbox")("data-testid",e.componentId),m(2),d("componentConfigSignal",e.componentConfigSignal)("commentDialogStatusDropdownConfigSignal",e.commentDialogStatusDropdownConfigSignal)("variant",n.variant)("template",n.triggerTemplate)("darkMode",n.darkMode),m(2),d("componentConfigSignal",e.componentConfigSignal)("commentDialogStatusDropdownConfigSignal",e.commentDialogStatusDropdownConfigSignal)("darkMode",n.darkMode)("shadowDom",e.shadowDom)("variant",n.variant)("template",n.contentTemplate),x("id",e.componentId+"-listbox")}}function gnn(i,o){if(i&1&&(f(0),g(1,pnn,6,18,"ng-container",0),v()),i&2){let n=l(2);m(),d("ngIf",n.commentDialogStatusDropdownConfigSignal())}}function unn(i,o){if(i&1&&(f(0),g(1,gnn,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,mnn,n.conditionSignal(),A(1,dnn,n.componentConfigSignal)))}}var aCe=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p,u){super(c,e,r,void 0,void 0,u,a),this.themeService=e,this.customFilterService=t,this.changeDetector=r,this.loggingService=a,this.sanitizer=s,this.elementRef=c,this.commentService=p,this.dynamicDataService=u,this.veltElement=!0,this.user=new Ao,this.isUserAdmin=!1,this.resolveStatusAccessAdminOnly=!1,this.disabled=!1,this.shadowDom=!0,this.changeStatus=new Pe,this.subscriptions=[],this.commentDialogStatusDropdownConfigSignal=De({annotation:this.annotation,disabled:!1,user:this.user,customStatusesShown:!1,isUserAdmin:this.isUserAdmin,resolveStatusAccessAdminOnly:this.resolveStatusAccessAdminOnly,statusOptions:[],trackByStatusId:this.trackByStatusId.bind(this),onStatusChange:this.onStatusChange.bind(this),darkMode:this.darkMode,variant:this.variant,contentTemplate:this.contentTemplate,triggerTemplate:this.triggerTemplate}),this.componentId="velt-comment-dialog-status-dropdown",super.initializeComponentConfigSignal(new ke),this.subscriptions.push(this.customFilterService.customStatusMap$.subscribe(C=>{this.commentDialogStatusDropdownConfigSignal.update(E=>(E=T(I({},E),{statusOptions:Object.values(C)}),E))})),this.subscriptions.push(this.commentService.getCustomStatusesShown$().subscribe(C=>{this.commentDialogStatusDropdownConfigSignal.update(E=>(E=T(I({},E),{customStatusesShown:C}),E))}))}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CommentDialogStatusDropdownComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","listbox"),this.disabled&&e.setAttribute("aria-disabled","true");let t=this.annotation?.status?.name||"No status";e.setAttribute("aria-label",`Thread status: ${t}.`),e.setAttribute("aria-controls",`${this.componentId}-listbox`),e.setAttribute("aria-owns",`${this.componentId}-listbox`),this.disabled||e.setAttribute("tabindex","0")}catch(e){this.loggingService.catch("Error in CommentDialogStatusDropdownComponent setupA11yAttributes:",e)}}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.commentDialogStatusDropdownConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),this.commentDialogStatusDropdownConfigSignal.update(t=>(t=T(I({},t),{darkMode:this.darkMode}),t)),this.setBackgroundColor()}catch(t){this.catchError("Error in CommentDialogStatusDropdownComponent ngOnChanges: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.catchError("Error in CommentDialogStatusDropdownComponent ngOnDestroy: ",e)}}trackByStatusId(e,t){return t?.id||e}setBackgroundColor(){try{this.darkMode?(this.backgroundColor=this.commentDialogStatusDropdownConfigSignal().annotation?.status?.color,this.commentDialogStatusDropdownConfigSignal().customStatusesShown||(this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="default"?this.backgroundColor=`var(--velt-accent, ${this.backgroundColor})`:this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="ongoing"?this.backgroundColor=`var(--velt-warning, ${this.backgroundColor})`:this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="terminal"&&(this.backgroundColor=`var(--velt-success, ${this.backgroundColor})`))):(this.backgroundColor=this.commentDialogStatusDropdownConfigSignal().annotation?.status?.lightColor||"white",this.commentDialogStatusDropdownConfigSignal().customStatusesShown||(this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="default"?this.backgroundColor=`var(--velt-accent-light, ${this.backgroundColor})`:this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="ongoing"?this.backgroundColor=`var(--velt-warning-light, ${this.backgroundColor})`:this.commentDialogStatusDropdownConfigSignal().annotation?.status?.type==="terminal"&&(this.backgroundColor=`var(--velt-success-light, ${this.backgroundColor})`)))}catch(e){this.catchError("Error in CommentDialogStatusDropdownComponent setBackgroundColor: ",e)}}onStatusChange(e){this.changeStatus.emit(e)}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.commentDialogStatusDropdownConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(qe),h(Zo),h(Jt),h(y),h(Ws),h(R),h(we),h(S))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-status-dropdown"]],hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{user:"user",annotation:"annotation",isUserAdmin:"isUserAdmin",resolveStatusAccessAdminOnly:"resolveStatusAccessAdminOnly",disabled:"disabled",shadowDom:"shadowDom",variant:"variant",contentTemplate:"contentTemplate",triggerTemplate:"triggerTemplate"},outputs:{changeStatus:"changeStatus"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["dropdownClass","v-content-container velt-comment-status-dropdown-container","dropdownType","status",1,"velt-status-dropdown",3,"click","calculateWidth","triggerBgColor","darkMode","disabled"],["trigger",""],[3,"componentConfigSignal","commentDialogStatusDropdownConfigSignal","variant","template","darkMode"],["content",""],[3,"componentConfigSignal","commentDialogStatusDropdownConfigSignal","darkMode","shadowDom","variant","template"]],template:function(t,r){t&1&&g(0,unn,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Wl,dC,v9,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-status-dropdown[_ngcontent-%COMP%]{width:fit-content;cursor:pointer;border-radius:var(--velt-border-radius-3xl)} .v-content-container{width:11rem}"],changeDetection:0});let i=o;return i})();function hnn(i,o){if(i&1){let n=Y();f(0,12),_(1,"div",13),G("click",function(){let t=N(n).$implicit,r=l(2);return F(r.assignContact(t))}),_(2,"div",14),w(3,"snippyly-user-avatar",15),_(4,"span",16),te(5),P(6,"translate"),b()()(),v()}if(i&2){let n=o.$implicit,e=o.index,t=l(2);m(),x("aria-selected",n.userId===(t.assignTo==null?null:t.assignTo.userId))("aria-label","Assign to "+((n==null?null:n.name)||(n==null?null:n.email)))("data-testid",t.componentId+"-option-"+e),m(),ge("s-dark",t.darkMode)("velt-assign-dropdown--item-dark",t.darkMode),m(),d("size",24)("user",n),x("data-testid",t.componentId+"-option-avatar-"+e),m(),x("data-testid",t.componentId+"-option-label-"+e),m(),Ge(M(6,12,(n==null?null:n.name)||(n==null?null:n.email)))}}function fnn(i,o){if(i&1&&(_(0,"app-dropdown",1),f(1,2),le(),_(2,"svg",3)(3,"g"),w(4,"path",4)(5,"path",5)(6,"path",6),b()(),ut(),_(7,"div",7),te(8),P(9,"translate"),b(),_(10,"div",8),te(11),P(12,"translate"),b(),le(),_(13,"svg",9),w(14,"path",10),b(),v(),g(15,hnn,7,14,"ng-container",11),b()),i&2){let n=l();d("darkMode",n.darkMode),x("data-testid",n.componentId),m(2),x("data-testid",n.componentId+"-icon"),m(5),x("data-testid",n.componentId+"-label"),m(),Ge(M(9,11,"Assign To")),m(2),x("aria-labelledby","velt-assign-label")("data-testid",n.componentId+"-selected"),m(),Ce(" ",M(12,13,(n.assignTo==null?null:n.assignTo.name)||(n.assignTo==null?null:n.assignTo.email))," "),m(2),x("data-testid",n.componentId+"-arrow"),m(2),d("ngForOf",n.selectedUserContacts)("ngForTrackBy",n.trackByUserContact)}}var sCe=(()=>{let o=class o extends Je{constructor(e,t,r){super(t,r),this.loggingService=e,this.elementRef=t,this.themeService=r,this.setAssignTo=new Pe,this.componentId="velt-assign-dropdown"}ngOnInit(){this.setupA11yAttributes()}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){let e=this.elementRef.nativeElement;e.setAttribute("role","combobox"),e.setAttribute("aria-label","Assign user dropdown"),e.setAttribute("data-testid",this.componentId+"-container")}trackByUserContact(e,t){return t?.userId||t?.email||e}assignContact(e){try{this.setAssignTo.emit({assignTo:e})}catch(t){this.loggingService.catch("Error in AssignDropdownComponent assignContact err: ",t)}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(R),h(qe))},o.\u0275cmp=O({type:o,selectors:[["app-assign-dropdown"]],inputs:{assignTo:"assignTo",selectedUserContacts:"selectedUserContacts"},outputs:{setAssignTo:"setAssignTo"},standalone:!1,features:[B],decls:1,vars:1,consts:[["class","velt-assign-dropdown s-assign-to-container","dropdownClass","velt-assign-dropdown-container","dropdownType","assign",3,"darkMode",4,"ngIf"],["dropdownClass","velt-assign-dropdown-container","dropdownType","assign",1,"velt-assign-dropdown","s-assign-to-container",3,"darkMode"],["trigger",""],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false"],["d","M13.3589 7.30469C11.3965 7.30469 9.65206 8.25585 8.56223 9.72128C8.12056 9.62865 7.66922 9.58074 7.21356 9.58074C3.6054 9.58074 0.669922 12.5162 0.669922 16.1244C0.669922 16.5957 1.05207 16.9779 1.52344 16.9779H8.67C9.76512 18.3633 11.4599 19.2539 13.3589 19.2539C16.6533 19.2539 19.3335 16.5737 19.3335 13.2793C19.3335 9.9849 16.6533 7.30469 13.3589 7.30469ZM2.45235 15.2709C2.85669 13.0097 4.83782 11.2878 7.21356 11.2878C7.38233 11.2878 7.55007 11.2972 7.71662 11.3143C7.50159 11.93 7.38426 12.5912 7.38426 13.2793C7.38426 13.9774 7.50501 14.6476 7.72601 15.2709H2.45235ZM13.3589 17.5469C11.0057 17.5469 9.0913 15.6325 9.0913 13.2793C9.0913 10.9262 11.0057 9.01172 13.3589 9.01172C15.712 9.01172 17.6265 10.9262 17.6265 13.2793C17.6265 15.6325 15.712 17.5469 13.3589 17.5469Z","fill","currentColor"],["d","M7.21319 7.87352C9.18202 7.87352 10.7837 6.27181 10.7837 4.30303C10.7837 2.33419 9.18202 0.732422 7.21319 0.732422C5.24435 0.732422 3.64258 2.33419 3.64258 4.30303C3.64258 6.27181 5.24435 7.87352 7.21319 7.87352ZM7.21319 2.43946C8.24076 2.43946 9.0767 3.27545 9.0767 4.30303C9.0767 5.33055 8.24076 6.16649 7.21319 6.16649C6.18561 6.16649 5.34961 5.33055 5.34961 4.30303C5.34961 3.27545 6.18561 2.43946 7.21319 2.43946Z","fill","currentColor"],["d","M15.0664 12.4258H14.2129V11.5723C14.2129 11.1009 13.8308 10.7188 13.3594 10.7188C12.888 10.7188 12.5059 11.1009 12.5059 11.5723V12.4258H11.6523C11.181 12.4258 10.7988 12.8079 10.7988 13.2793C10.7988 13.7507 11.181 14.1328 11.6523 14.1328H12.5059V14.9863C12.5059 15.4577 12.888 15.8399 13.3594 15.8399C13.8308 15.8399 14.2129 15.4577 14.2129 14.9863V14.1328H15.0664C15.5378 14.1328 15.9199 13.7507 15.9199 13.2793C15.9199 12.8079 15.5378 12.4258 15.0664 12.4258Z","fill","currentColor"],[1,"velt-assign-dropdown--input-label","input__label"],[1,"velt-assign-dropdown--contact","s-assigned-contact"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","focusable","false",1,"velt-assign-dropdown--arrow"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","currentColor"],["content","",4,"ngFor","ngForOf","ngForTrackBy"],["content",""],["mat-menu-item","","tabindex","0",3,"click"],[1,"velt-assign-dropdown--item","s-assign-to-menu-item"],["aria-hidden","true",3,"size","user"],[1,"velt-assign-dropdown--item-label","s-contact-label"]],template:function(t,r){t&1&&g(0,fnn,16,15,"app-dropdown",0),t&2&&d("ngIf",r.selectedUserContacts==null?null:r.selectedUserContacts.length)},dependencies:[vt,X,el,Kn,Wl,pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{width:100%}.velt-assign-dropdown[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;height:unset;border-radius:var(--velt-border-radius-md);cursor:pointer;margin-bottom:var(--velt-spacing-sm);color:var(--velt-accent-text)} .velt-assign-dropdown>div{width:100%;display:flex;align-items:center;gap:var(--velt-spacing-sm);padding:var(--velt-spacing-md) var(--velt-spacing-lg);box-sizing:border-box}.velt-assign-dropdown[_ngcontent-%COMP%] .velt-assign-dropdown--contact[_ngcontent-%COMP%]{flex-grow:1;flex-basis:0%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.velt-assign-dropdown[_ngcontent-%COMP%] .velt-assign-dropdown--arrow[_ngcontent-%COMP%]{color:var(--velt-text-10)}.velt-assign-dropdown--item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--velt-spacing-sm);justify-content:flex-start;color:var(--velt-light-mode-text-1);text-decoration:none;font-size:var(--velt-font-size-sm)}.velt-assign-dropdown--item.velt-assign-dropdown--item-dark[_ngcontent-%COMP%]{color:var(--velt-dark-mode-text-1)}.velt-assign-dropdown--item[_ngcontent-%COMP%] snippyly-user-avatar[_ngcontent-%COMP%]{display:flex}"],changeDetection:0});let i=o;return i})();var vnn=i=>({componentConfigSignal:i}),Cnn=(i,o)=>({condition:i,data:o});function _nn(i,o){if(i&1&&(f(0,7),w(1,"velt-comment-dialog-priority-dropdown-content-internal",8),v()),i&2){let n=l(3).ngIf,e=l();m(),d("componentConfigSignal",e.componentConfigSignal)("variant",n.variant)("template",n.contentTemplate)("darkMode",n.darkMode)("shadowDom",e.shadowDom)}}function ynn(i,o){if(i&1&&(_(0,"app-dropdown",3),f(1,4),w(2,"velt-comment-dialog-priority-dropdown-trigger-internal",5),v(),g(3,_nn,2,5,"ng-container",6),b()),i&2){let n=l(2).ngIf,e=l();tr(n.darkMode?"dark":""),d("darkMode",n.darkMode)("calculateWidth",!1)("triggerBgColor",n.darkMode?(n.annotation==null||n.annotation.priority==null?null:n.annotation.priority.color)||"#222226":n.annotation==null||n.annotation.priority==null?null:n.annotation.priority.lightColor)("disabled",(n.user==null?null:n.user.isReadOnly)||(n.user==null?null:n.user.isAnonymous)||n.disabled),m(2),d("componentConfigSignal",e.componentConfigSignal)("variant",n.variant)("template",n.triggerTemplate),m(),d("ngIf",n.user)}}function Snn(i,o){if(i&1&&(f(0),g(1,ynn,4,10,"app-dropdown",2),v()),i&2){let n=l(2);m(),d("ngIf",n.enablePriority)}}function bnn(i,o){if(i&1&&(f(0),g(1,Snn,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,Cnn,n.conditionSignal(),A(1,vnn,n.componentConfigSignal)))}}var lCe=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p){super(a,r,t,c,void 0,p,s),this.customFilterService=e,this.changeDetector=t,this.themeService=r,this.elementRef=a,this.loggingService=s,this.commentService=c,this.dynamicDataService=p,this.enablePriority=!1,this.disabled=!1,this.shadowDom=!0,this.changePriority=new Pe,this.subscriptions=[],this.componentId="velt-comment-dialog-priority-dropdown",this.componentConfigSignal=De({darkMode:this.darkMode,annotation:this.annotation,user:this.user,disabled:this.disabled,trackByPriorityId:this.trackByPriorityId.bind(this),priorityOptions:[],onChangePriority:this.onChangePriority.bind(this),variant:this.variant,contentTemplate:this.contentTemplate,triggerTemplate:this.triggerTemplate})}ngOnInit(){super.ngOnInit(),this.setupA11yAttributes(),this.subscriptions.push(this.customFilterService.customPriorityMap$.subscribe(e=>{this.componentConfigSignal.update(t=>(t=T(I({},t),{priorityOptions:Object.values(e)}),t))}))}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","combobox"),e.setAttribute("aria-label","Priority dropdown")}catch(e){this.loggingService.catch("Error setting up accessibility attributes in PriorityDropdownComponent: ",e)}}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),this.componentConfigSignal.update(t=>(t=T(I({},t),{darkMode:this.darkMode}),t))}catch(t){this.catchError("Error in CommentDialogPriorityDropdownComponent ngOnChanges: ",t)}}trackByPriorityId(e,t){return t?.id||e}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe()),super.ngOnDestroy()}onChangePriority(e){this.changePriority.emit(e)}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(Zo),h(Jt),h(qe),h(R),h(y),h(we),h(S))},o.\u0275cmp=O({type:o,selectors:[["velt-comment-dialog-priority-dropdown-internal"]],inputs:{enablePriority:"enablePriority",annotation:"annotation",user:"user",disabled:"disabled",shadowDom:"shadowDom",variant:"variant",contentTemplate:"contentTemplate",triggerTemplate:"triggerTemplate"},outputs:{changePriority:"changePriority"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-priority-dropdown","dropdownClass","v-content-container velt-comment-priority-dropdown-container","dropdownType","priority",3,"darkMode","class","calculateWidth","triggerBgColor","disabled",4,"ngIf"],["dropdownClass","v-content-container velt-comment-priority-dropdown-container","dropdownType","priority",1,"velt-priority-dropdown",3,"darkMode","calculateWidth","triggerBgColor","disabled"],["trigger",""],[3,"componentConfigSignal","variant","template"],["content","",4,"ngIf"],["content",""],[3,"componentConfigSignal","variant","template","darkMode","shadowDom"]],template:function(t,r){t&1&&g(0,bnn,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Wl,lC,sC,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}.velt-priority-dropdown[_ngcontent-%COMP%]{width:fit-content;cursor:pointer;border-radius:var(--velt-border-radius-3xl)} .v-content-container{width:11rem}"],changeDetection:0});let i=o;return i})();function Inn(i,o){if(i&1&&(_(0,"div",2),le(),_(1,"svg",3)(2,"g"),w(3,"path",4),b(),w(4,"path",5),b()()),i&2){let n=l();x("data-testid",n.componentId+"-mobile")}}function Enn(i,o){if(i&1&&(_(0,"div",2),le(),_(1,"svg",6)(2,"g"),w(3,"path",4)(4,"path",7),b(),w(5,"path",8),b()()),i&2){let n=l();x("data-testid",n.componentId+"-tablet")}}function xnn(i,o){if(i&1&&(_(0,"div",2),le(),_(1,"svg",9),w(2,"path",10)(3,"path",11)(4,"path",12),b()()),i&2){let n=l();x("data-testid",n.componentId+"-desktop")}}function Tnn(i,o){if(i&1&&(_(0,"div",2),le(),_(1,"svg",13),w(2,"path",14)(3,"path",15)(4,"path",16),b()()),i&2){let n=l();x("data-testid",n.componentId+"-monitor")}}var cCe=(()=>{let o=class o{constructor(e,t){this.elementRef=e,this.loggingService=t,this.deviceType="",this.componentId="velt-device-type-icons"}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in DeviceTypeIconsComponent ngOnInit:",e)}}setupA11yAttributes(){try{this.elementRef.nativeElement.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in DeviceTypeIconsComponent setupA11yAttributes:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(R),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-device-type-icons"]],inputs:{deviceType:"deviceType"},standalone:!1,decls:5,vars:7,consts:[["role","status",1,"devide-type-container","velt-device-type-icons",3,"ngSwitch"],["class","s-flex velt-device-type-icons--flex",4,"ngSwitchCase"],[1,"s-flex","velt-device-type-icons--flex"],["width","53","height","17","viewBox","0 0 53 17","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img",1,"skip-reset"],["fill-rule","evenodd","clip-rule","evenodd","d","M8.5 3.5H3.5C3.22386 3.5 3 3.72386 3 4V13C3 13.2761 3.22386 13.5 3.5 13.5H8.5C8.77614 13.5 9 13.2761 9 13V4C9 3.72386 8.77614 3.5 8.5 3.5ZM3.5 2.5C2.67157 2.5 2 3.17157 2 4V13C2 13.8284 2.67157 14.5 3.5 14.5H8.5C9.32843 14.5 10 13.8284 10 13V4C10 3.17157 9.32843 2.5 8.5 2.5H3.5Z","fill","currentColor"],["d","M24.624 4.388V12H23.623V6.324L21.093 12H20.389L17.848 6.313V12H16.847V4.388H17.925L20.741 10.68L23.557 4.388H24.624ZM29.0606 12.099C28.4959 12.099 27.9826 11.9707 27.5206 11.714C27.0659 11.4573 26.7066 11.0943 26.4426 10.625C26.1859 10.1483 26.0576 9.59833 26.0576 8.975C26.0576 8.359 26.1896 7.81633 26.4536 7.347C26.7249 6.87033 27.0916 6.50733 27.5536 6.258C28.0156 6.00133 28.5326 5.873 29.1046 5.873C29.6766 5.873 30.1936 6.00133 30.6556 6.258C31.1176 6.50733 31.4806 6.86667 31.7446 7.336C32.0159 7.80533 32.1516 8.35167 32.1516 8.975C32.1516 9.59833 32.0123 10.1483 31.7336 10.625C31.4623 11.0943 31.0919 11.4573 30.6226 11.714C30.1533 11.9707 29.6326 12.099 29.0606 12.099ZM29.0606 11.219C29.4199 11.219 29.7573 11.1347 30.0726 10.966C30.3879 10.7973 30.6409 10.5443 30.8316 10.207C31.0296 9.86967 31.1286 9.459 31.1286 8.975C31.1286 8.491 31.0333 8.08033 30.8426 7.743C30.6519 7.40567 30.4026 7.15633 30.0946 6.995C29.7866 6.82633 29.4529 6.742 29.0936 6.742C28.7269 6.742 28.3896 6.82633 28.0816 6.995C27.7809 7.15633 27.5389 7.40567 27.3556 7.743C27.1723 8.08033 27.0806 8.491 27.0806 8.975C27.0806 9.46633 27.1686 9.88067 27.3446 10.218C27.5279 10.5553 27.7699 10.8083 28.0706 10.977C28.3713 11.1383 28.7013 11.219 29.0606 11.219ZM34.5787 7.094C34.7841 6.73467 35.0847 6.44133 35.4807 6.214C35.8767 5.98667 36.3277 5.873 36.8337 5.873C37.3764 5.873 37.8641 6.00133 38.2967 6.258C38.7294 6.51467 39.0704 6.87767 39.3197 7.347C39.5691 7.809 39.6937 8.348 39.6937 8.964C39.6937 9.57267 39.5691 10.1153 39.3197 10.592C39.0704 11.0687 38.7257 11.439 38.2857 11.703C37.8531 11.967 37.3691 12.099 36.8337 12.099C36.3131 12.099 35.8547 11.9853 35.4587 11.758C35.0701 11.5307 34.7767 11.241 34.5787 10.889V12H33.5777V3.86H34.5787V7.094ZM38.6707 8.964C38.6707 8.50933 38.5791 8.11333 38.3957 7.776C38.2124 7.43867 37.9631 7.182 37.6477 7.006C37.3397 6.83 36.9987 6.742 36.6247 6.742C36.2581 6.742 35.9171 6.83367 35.6017 7.017C35.2937 7.193 35.0444 7.45333 34.8537 7.798C34.6704 8.13533 34.5787 8.52767 34.5787 8.975C34.5787 9.42967 34.6704 9.82933 34.8537 10.174C35.0444 10.5113 35.2937 10.7717 35.6017 10.955C35.9171 11.131 36.2581 11.219 36.6247 11.219C36.9987 11.219 37.3397 11.131 37.6477 10.955C37.9631 10.7717 38.2124 10.5113 38.3957 10.174C38.5791 9.82933 38.6707 9.426 38.6707 8.964ZM41.6383 4.993C41.4477 4.993 41.2863 4.927 41.1543 4.795C41.0223 4.663 40.9563 4.50167 40.9563 4.311C40.9563 4.12033 41.0223 3.959 41.1543 3.827C41.2863 3.695 41.4477 3.629 41.6383 3.629C41.8217 3.629 41.9757 3.695 42.1003 3.827C42.2323 3.959 42.2983 4.12033 42.2983 4.311C42.2983 4.50167 42.2323 4.663 42.1003 4.795C41.9757 4.927 41.8217 4.993 41.6383 4.993ZM42.1223 5.972V12H41.1213V5.972H42.1223ZM44.9394 3.86V12H43.9384V3.86H44.9394ZM52.2554 8.755C52.2554 8.94567 52.2444 9.14733 52.2224 9.36H47.4044C47.4411 9.954 47.6427 10.4197 48.0094 10.757C48.3834 11.087 48.8344 11.252 49.3624 11.252C49.7951 11.252 50.1544 11.153 50.4404 10.955C50.7337 10.7497 50.9391 10.4783 51.0564 10.141H52.1344C51.9731 10.7203 51.6504 11.1933 51.1664 11.56C50.6824 11.9193 50.0811 12.099 49.3624 12.099C48.7904 12.099 48.2771 11.9707 47.8224 11.714C47.3751 11.4573 47.0231 11.0943 46.7664 10.625C46.5097 10.1483 46.3814 9.59833 46.3814 8.975C46.3814 8.35167 46.5061 7.80533 46.7554 7.336C47.0047 6.86667 47.3531 6.50733 47.8004 6.258C48.2551 6.00133 48.7757 5.873 49.3624 5.873C49.9344 5.873 50.4404 5.99767 50.8804 6.247C51.3204 6.49633 51.6577 6.841 51.8924 7.281C52.1344 7.71367 52.2554 8.205 52.2554 8.755ZM51.2214 8.546C51.2214 8.16467 51.1371 7.83833 50.9684 7.567C50.7997 7.28833 50.5687 7.07933 50.2754 6.94C49.9894 6.79333 49.6704 6.72 49.3184 6.72C48.8124 6.72 48.3797 6.88133 48.0204 7.204C47.6684 7.52667 47.4667 7.974 47.4154 8.546H51.2214Z","fill","currentColor"],["width","51","height","17","viewBox","0 0 51 17","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["d","M6.5 12C6.5 12.2761 6.27614 12.5 6 12.5C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5C6.27614 11.5 6.5 11.7239 6.5 12Z","fill","currentColor"],["d","M21.566 4.333V5.147H19.476V12H18.475V5.147H16.374V4.333H21.566ZM22.5342 8.964C22.5342 8.348 22.6588 7.809 22.9082 7.347C23.1575 6.87767 23.4985 6.51467 23.9312 6.258C24.3712 6.00133 24.8588 5.873 25.3942 5.873C25.9222 5.873 26.3805 5.98667 26.7692 6.214C27.1578 6.44133 27.4475 6.72733 27.6382 7.072V5.972H28.6502V12H27.6382V10.878C27.4402 11.23 27.1432 11.5233 26.7472 11.758C26.3585 11.9853 25.9038 12.099 25.3832 12.099C24.8478 12.099 24.3638 11.967 23.9312 11.703C23.4985 11.439 23.1575 11.0687 22.9082 10.592C22.6588 10.1153 22.5342 9.57267 22.5342 8.964ZM27.6382 8.975C27.6382 8.52033 27.5465 8.12433 27.3632 7.787C27.1798 7.44967 26.9305 7.193 26.6152 7.017C26.3072 6.83367 25.9662 6.742 25.5922 6.742C25.2182 6.742 24.8772 6.83 24.5692 7.006C24.2612 7.182 24.0155 7.43867 23.8322 7.776C23.6488 8.11333 23.5572 8.50933 23.5572 8.964C23.5572 9.426 23.6488 9.82933 23.8322 10.174C24.0155 10.5113 24.2612 10.7717 24.5692 10.955C24.8772 11.131 25.2182 11.219 25.5922 11.219C25.9662 11.219 26.3072 11.131 26.6152 10.955C26.9305 10.7717 27.1798 10.5113 27.3632 10.174C27.5465 9.82933 27.6382 9.42967 27.6382 8.975ZM31.4528 7.094C31.6581 6.73467 31.9588 6.44133 32.3548 6.214C32.7508 5.98667 33.2018 5.873 33.7078 5.873C34.2504 5.873 34.7381 6.00133 35.1708 6.258C35.6034 6.51467 35.9444 6.87767 36.1938 7.347C36.4431 7.809 36.5678 8.348 36.5678 8.964C36.5678 9.57267 36.4431 10.1153 36.1938 10.592C35.9444 11.0687 35.5998 11.439 35.1598 11.703C34.7271 11.967 34.2431 12.099 33.7078 12.099C33.1871 12.099 32.7288 11.9853 32.3328 11.758C31.9441 11.5307 31.6508 11.241 31.4528 10.889V12H30.4518V3.86H31.4528V7.094ZM35.5448 8.964C35.5448 8.50933 35.4531 8.11333 35.2698 7.776C35.0864 7.43867 34.8371 7.182 34.5218 7.006C34.2138 6.83 33.8728 6.742 33.4988 6.742C33.1321 6.742 32.7911 6.83367 32.4758 7.017C32.1678 7.193 31.9184 7.45333 31.7278 7.798C31.5444 8.13533 31.4528 8.52767 31.4528 8.975C31.4528 9.42967 31.5444 9.82933 31.7278 10.174C31.9184 10.5113 32.1678 10.7717 32.4758 10.955C32.7911 11.131 33.1321 11.219 33.4988 11.219C33.8728 11.219 34.2138 11.131 34.5218 10.955C34.8371 10.7717 35.0864 10.5113 35.2698 10.174C35.4531 9.82933 35.5448 9.426 35.5448 8.964ZM38.9964 3.86V12H37.9954V3.86H38.9964ZM46.3124 8.755C46.3124 8.94567 46.3014 9.14733 46.2794 9.36H41.4614C41.4981 9.954 41.6997 10.4197 42.0664 10.757C42.4404 11.087 42.8914 11.252 43.4194 11.252C43.8521 11.252 44.2114 11.153 44.4974 10.955C44.7907 10.7497 44.9961 10.4783 45.1134 10.141H46.1914C46.0301 10.7203 45.7074 11.1933 45.2234 11.56C44.7394 11.9193 44.1381 12.099 43.4194 12.099C42.8474 12.099 42.3341 11.9707 41.8794 11.714C41.4321 11.4573 41.0801 11.0943 40.8234 10.625C40.5667 10.1483 40.4384 9.59833 40.4384 8.975C40.4384 8.35167 40.5631 7.80533 40.8124 7.336C41.0617 6.86667 41.4101 6.50733 41.8574 6.258C42.3121 6.00133 42.8327 5.873 43.4194 5.873C43.9914 5.873 44.4974 5.99767 44.9374 6.247C45.3774 6.49633 45.7147 6.841 45.9494 7.281C46.1914 7.71367 46.3124 8.205 46.3124 8.755ZM45.2784 8.546C45.2784 8.16467 45.1941 7.83833 45.0254 7.567C44.8567 7.28833 44.6257 7.07933 44.3324 6.94C44.0464 6.79333 43.7274 6.72 43.3754 6.72C42.8694 6.72 42.4367 6.88133 42.0774 7.204C41.7254 7.52667 41.5237 7.974 41.4724 8.546H45.2784ZM48.9647 6.797V10.35C48.9647 10.6433 49.027 10.8523 49.1517 10.977C49.2763 11.0943 49.4927 11.153 49.8007 11.153H50.5377V12H49.6357C49.0783 12 48.6603 11.8717 48.3817 11.615C48.103 11.3583 47.9637 10.9367 47.9637 10.35V6.797H47.1827V5.972H47.9637V4.454H48.9647V5.972H50.5377V6.797H48.9647Z","fill","currentColor"],["width","62","height","17","viewBox","0 0 62 17","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["fill-rule","evenodd","clip-rule","evenodd","d","M2.5 5.5L2.5 10L9.5 10L9.5 5.5C9.5 5.22386 9.27614 5 9 5L3 5C2.72386 5 2.5 5.22386 2.5 5.5ZM1.5 11L10.5 11L10.5 5.5C10.5 4.67157 9.82843 4 9 4L3 4C2.17157 4 1.5 4.67157 1.5 5.5L1.5 11Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M1.5 11L1.5 11.5C1.5 11.7761 1.72386 12 2 12L10 12C10.2761 12 10.5 11.7761 10.5 11.5L10.5 11L1.5 11ZM0.5 11.5C0.5 12.3284 1.17157 13 2 13L10 13C10.8284 13 11.5 12.3284 11.5 11.5L11.5 10.5C11.5 10.2239 11.2761 10 11 10L1 10C0.723858 10 0.5 10.2239 0.5 10.5L0.5 11.5Z","fill","currentColor"],["d","M19.234 4.333C20.07 4.333 20.7923 4.49067 21.401 4.806C22.017 5.114 22.4863 5.55767 22.809 6.137C23.139 6.71633 23.304 7.39833 23.304 8.183C23.304 8.96767 23.139 9.64967 22.809 10.229C22.4863 10.801 22.017 11.241 21.401 11.549C20.7923 11.8497 20.07 12 19.234 12H16.847V4.333H19.234ZM19.234 11.175C20.224 11.175 20.9793 10.9147 21.5 10.394C22.0207 9.866 22.281 9.129 22.281 8.183C22.281 7.22967 22.017 6.48533 21.489 5.95C20.9683 5.41467 20.2167 5.147 19.234 5.147H17.848V11.175H19.234ZM30.2343 8.755C30.2343 8.94567 30.2233 9.14733 30.2013 9.36H25.3833C25.42 9.954 25.6217 10.4197 25.9883 10.757C26.3623 11.087 26.8133 11.252 27.3413 11.252C27.774 11.252 28.1333 11.153 28.4193 10.955C28.7127 10.7497 28.918 10.4783 29.0353 10.141H30.1133C29.952 10.7203 29.6293 11.1933 29.1453 11.56C28.6613 11.9193 28.06 12.099 27.3413 12.099C26.7693 12.099 26.256 11.9707 25.8013 11.714C25.354 11.4573 25.002 11.0943 24.7453 10.625C24.4887 10.1483 24.3603 9.59833 24.3603 8.975C24.3603 8.35167 24.485 7.80533 24.7343 7.336C24.9837 6.86667 25.332 6.50733 25.7793 6.258C26.234 6.00133 26.7547 5.873 27.3413 5.873C27.9133 5.873 28.4193 5.99767 28.8593 6.247C29.2993 6.49633 29.6367 6.841 29.8713 7.281C30.1133 7.71367 30.2343 8.205 30.2343 8.755ZM29.2003 8.546C29.2003 8.16467 29.116 7.83833 28.9473 7.567C28.7787 7.28833 28.5477 7.07933 28.2543 6.94C27.9683 6.79333 27.6493 6.72 27.2973 6.72C26.7913 6.72 26.3587 6.88133 25.9993 7.204C25.6473 7.52667 25.4457 7.974 25.3943 8.546H29.2003ZM33.7996 12.099C33.3376 12.099 32.9233 12.022 32.5566 11.868C32.19 11.7067 31.9003 11.4867 31.6876 11.208C31.475 10.922 31.3576 10.5957 31.3356 10.229H32.3696C32.399 10.5297 32.5383 10.7753 32.7876 10.966C33.0443 11.1567 33.378 11.252 33.7886 11.252C34.17 11.252 34.4706 11.1677 34.6906 10.999C34.9106 10.8303 35.0206 10.6177 35.0206 10.361C35.0206 10.097 34.9033 9.90267 34.6686 9.778C34.434 9.646 34.071 9.51767 33.5796 9.393C33.1323 9.27567 32.7656 9.15833 32.4796 9.041C32.201 8.91633 31.959 8.73667 31.7536 8.502C31.5556 8.26 31.4566 7.94467 31.4566 7.556C31.4566 7.248 31.5483 6.96567 31.7316 6.709C31.915 6.45233 32.1753 6.25067 32.5126 6.104C32.85 5.95 33.235 5.873 33.6676 5.873C34.335 5.873 34.874 6.04167 35.2846 6.379C35.6953 6.71633 35.9153 7.17833 35.9446 7.765H34.9436C34.9216 7.44967 34.7933 7.19667 34.5586 7.006C34.3313 6.81533 34.0233 6.72 33.6346 6.72C33.2753 6.72 32.9893 6.797 32.7766 6.951C32.564 7.105 32.4576 7.30667 32.4576 7.556C32.4576 7.754 32.52 7.919 32.6446 8.051C32.7766 8.17567 32.938 8.27833 33.1286 8.359C33.3266 8.43233 33.598 8.51667 33.9426 8.612C34.3753 8.72933 34.7273 8.84667 34.9986 8.964C35.27 9.074 35.501 9.24267 35.6916 9.47C35.8896 9.69733 35.9923 9.99433 35.9996 10.361C35.9996 10.691 35.908 10.988 35.7246 11.252C35.5413 11.516 35.281 11.725 34.9436 11.879C34.6136 12.0257 34.2323 12.099 33.7996 12.099ZM40.8887 12L38.5237 9.338V12H37.5227V3.86H38.5237V8.645L40.8447 5.972H42.2417L39.4037 8.975L42.2527 12H40.8887ZM44.5148 6.797V10.35C44.5148 10.6433 44.5772 10.8523 44.7018 10.977C44.8265 11.0943 45.0428 11.153 45.3508 11.153H46.0878V12H45.1858C44.6285 12 44.2105 11.8717 43.9318 11.615C43.6532 11.3583 43.5138 10.9367 43.5138 10.35V6.797H42.7328V5.972H43.5138V4.454H44.5148V5.972H46.0878V6.797H44.5148ZM50.0397 12.099C49.475 12.099 48.9617 11.9707 48.4997 11.714C48.045 11.4573 47.6857 11.0943 47.4217 10.625C47.165 10.1483 47.0367 9.59833 47.0367 8.975C47.0367 8.359 47.1687 7.81633 47.4327 7.347C47.704 6.87033 48.0707 6.50733 48.5327 6.258C48.9947 6.00133 49.5117 5.873 50.0837 5.873C50.6557 5.873 51.1727 6.00133 51.6347 6.258C52.0967 6.50733 52.4597 6.86667 52.7237 7.336C52.995 7.80533 53.1307 8.35167 53.1307 8.975C53.1307 9.59833 52.9913 10.1483 52.7127 10.625C52.4413 11.0943 52.071 11.4573 51.6017 11.714C51.1323 11.9707 50.6117 12.099 50.0397 12.099ZM50.0397 11.219C50.399 11.219 50.7363 11.1347 51.0517 10.966C51.367 10.7973 51.62 10.5443 51.8107 10.207C52.0087 9.86967 52.1077 9.459 52.1077 8.975C52.1077 8.491 52.0123 8.08033 51.8217 7.743C51.631 7.40567 51.3817 7.15633 51.0737 6.995C50.7657 6.82633 50.432 6.742 50.0727 6.742C49.706 6.742 49.3687 6.82633 49.0607 6.995C48.76 7.15633 48.518 7.40567 48.3347 7.743C48.1513 8.08033 48.0597 8.491 48.0597 8.975C48.0597 9.46633 48.1477 9.88067 48.3237 10.218C48.507 10.5553 48.749 10.8083 49.0497 10.977C49.3503 11.1383 49.6803 11.219 50.0397 11.219ZM55.5578 7.083C55.7558 6.73833 56.0491 6.45233 56.4378 6.225C56.8338 5.99033 57.2921 5.873 57.8128 5.873C58.3481 5.873 58.8321 6.00133 59.2648 6.258C59.7048 6.51467 60.0495 6.87767 60.2988 7.347C60.5481 7.809 60.6728 8.348 60.6728 8.964C60.6728 9.57267 60.5481 10.1153 60.2988 10.592C60.0495 11.0687 59.7048 11.439 59.2648 11.703C58.8321 11.967 58.3481 12.099 57.8128 12.099C57.2995 12.099 56.8448 11.9853 56.4488 11.758C56.0601 11.5233 55.7631 11.2337 55.5578 10.889V14.86H54.5568V5.972H55.5578V7.083ZM59.6498 8.964C59.6498 8.50933 59.5581 8.11333 59.3748 7.776C59.1915 7.43867 58.9421 7.182 58.6268 7.006C58.3188 6.83 57.9778 6.742 57.6038 6.742C57.2371 6.742 56.8961 6.83367 56.5808 7.017C56.2728 7.193 56.0235 7.45333 55.8328 7.798C55.6495 8.13533 55.5578 8.52767 55.5578 8.975C55.5578 9.42967 55.6495 9.82933 55.8328 10.174C56.0235 10.5113 56.2728 10.7717 56.5808 10.955C56.8961 11.131 57.2371 11.219 57.6038 11.219C57.9778 11.219 58.3188 11.131 58.6268 10.955C58.9421 10.7717 59.1915 10.5113 59.3748 10.174C59.5581 9.82933 59.6498 9.426 59.6498 8.964Z","fill","currentColor"],["width","59","height","17","viewBox","0 0 59 17","fill","none","xmlns","http://www.w3.org/2000/svg","aria-hidden","true","role","img"],["d","M4.5 11.5H5.5V12.5H6.5V11.5H7.5V12.5H8C8.27614 12.5 8.5 12.7239 8.5 13C8.5 13.2761 8.27614 13.5 8 13.5H4C3.72386 13.5 3.5 13.2761 3.5 13C3.5 12.7239 3.72386 12.5 4 12.5H4.5V11.5Z","fill","currentColor"],["fill-rule","evenodd","clip-rule","evenodd","d","M2 5.5L2 9.5C2 10.0523 2.44772 10.5 3 10.5L9 10.5C9.55229 10.5 10 10.0523 10 9.5L10 5.5C10 4.94772 9.55228 4.5 9 4.5L3 4.5C2.44771 4.5 2 4.94772 2 5.5ZM1 9.5C1 10.6046 1.89543 11.5 3 11.5L9 11.5C10.1046 11.5 11 10.6046 11 9.5L11 5.5C11 4.39543 10.1046 3.5 9 3.5L3 3.5C1.89543 3.5 1 4.39543 1 5.5L1 9.5Z","fill","currentColor"],["d","M24.624 4.388V12H23.623V6.324L21.093 12H20.389L17.848 6.313V12H16.847V4.388H17.925L20.741 10.68L23.557 4.388H24.624ZM29.0606 12.099C28.4959 12.099 27.9826 11.9707 27.5206 11.714C27.0659 11.4573 26.7066 11.0943 26.4426 10.625C26.1859 10.1483 26.0576 9.59833 26.0576 8.975C26.0576 8.359 26.1896 7.81633 26.4536 7.347C26.7249 6.87033 27.0916 6.50733 27.5536 6.258C28.0156 6.00133 28.5326 5.873 29.1046 5.873C29.6766 5.873 30.1936 6.00133 30.6556 6.258C31.1176 6.50733 31.4806 6.86667 31.7446 7.336C32.0159 7.80533 32.1516 8.35167 32.1516 8.975C32.1516 9.59833 32.0123 10.1483 31.7336 10.625C31.4623 11.0943 31.0919 11.4573 30.6226 11.714C30.1533 11.9707 29.6326 12.099 29.0606 12.099ZM29.0606 11.219C29.4199 11.219 29.7573 11.1347 30.0726 10.966C30.3879 10.7973 30.6409 10.5443 30.8316 10.207C31.0296 9.86967 31.1286 9.459 31.1286 8.975C31.1286 8.491 31.0333 8.08033 30.8426 7.743C30.6519 7.40567 30.4026 7.15633 30.0946 6.995C29.7866 6.82633 29.4529 6.742 29.0936 6.742C28.7269 6.742 28.3896 6.82633 28.0816 6.995C27.7809 7.15633 27.5389 7.40567 27.3556 7.743C27.1723 8.08033 27.0806 8.491 27.0806 8.975C27.0806 9.46633 27.1686 9.88067 27.3446 10.218C27.5279 10.5553 27.7699 10.8083 28.0706 10.977C28.3713 11.1383 28.7013 11.219 29.0606 11.219ZM36.5147 5.862C37.2481 5.862 37.8421 6.08567 38.2967 6.533C38.7514 6.973 38.9787 7.611 38.9787 8.447V12H37.9887V8.59C37.9887 7.98867 37.8384 7.53033 37.5377 7.215C37.2371 6.89233 36.8264 6.731 36.3057 6.731C35.7777 6.731 35.3561 6.896 35.0407 7.226C34.7327 7.556 34.5787 8.03633 34.5787 8.667V12H33.5777V5.972H34.5787V6.83C34.7767 6.522 35.0444 6.28367 35.3817 6.115C35.7264 5.94633 36.1041 5.862 36.5147 5.862ZM41.2409 4.993C41.0502 4.993 40.8889 4.927 40.7569 4.795C40.6249 4.663 40.5589 4.50167 40.5589 4.311C40.5589 4.12033 40.6249 3.959 40.7569 3.827C40.8889 3.695 41.0502 3.629 41.2409 3.629C41.4242 3.629 41.5782 3.695 41.7029 3.827C41.8349 3.959 41.9009 4.12033 41.9009 4.311C41.9009 4.50167 41.8349 4.663 41.7029 4.795C41.5782 4.927 41.4242 4.993 41.2409 4.993ZM41.7249 5.972V12H40.7239V5.972H41.7249ZM44.7619 6.797V10.35C44.7619 10.6433 44.8242 10.8523 44.9489 10.977C45.0736 11.0943 45.2899 11.153 45.5979 11.153H46.3349V12H45.4329C44.8756 12 44.4576 11.8717 44.1789 11.615C43.9002 11.3583 43.7609 10.9367 43.7609 10.35V6.797H42.9799V5.972H43.7609V4.454H44.7619V5.972H46.3349V6.797H44.7619ZM50.2867 12.099C49.7221 12.099 49.2087 11.9707 48.7467 11.714C48.2921 11.4573 47.9327 11.0943 47.6687 10.625C47.4121 10.1483 47.2837 9.59833 47.2837 8.975C47.2837 8.359 47.4157 7.81633 47.6797 7.347C47.9511 6.87033 48.3177 6.50733 48.7797 6.258C49.2417 6.00133 49.7587 5.873 50.3307 5.873C50.9027 5.873 51.4197 6.00133 51.8817 6.258C52.3437 6.50733 52.7067 6.86667 52.9707 7.336C53.2421 7.80533 53.3777 8.35167 53.3777 8.975C53.3777 9.59833 53.2384 10.1483 52.9597 10.625C52.6884 11.0943 52.3181 11.4573 51.8487 11.714C51.3794 11.9707 50.8587 12.099 50.2867 12.099ZM50.2867 11.219C50.6461 11.219 50.9834 11.1347 51.2987 10.966C51.6141 10.7973 51.8671 10.5443 52.0577 10.207C52.2557 9.86967 52.3547 9.459 52.3547 8.975C52.3547 8.491 52.2594 8.08033 52.0687 7.743C51.8781 7.40567 51.6287 7.15633 51.3207 6.995C51.0127 6.82633 50.6791 6.742 50.3197 6.742C49.9531 6.742 49.6157 6.82633 49.3077 6.995C49.0071 7.15633 48.7651 7.40567 48.5817 7.743C48.3984 8.08033 48.3067 8.491 48.3067 8.975C48.3067 9.46633 48.3947 9.88067 48.5707 10.218C48.7541 10.5553 48.9961 10.8083 49.2967 10.977C49.5974 11.1383 49.9274 11.219 50.2867 11.219ZM55.8049 6.951C55.9809 6.60633 56.2302 6.33867 56.5529 6.148C56.8829 5.95733 57.2825 5.862 57.7519 5.862V6.896H57.4879C56.3659 6.896 55.8049 7.50467 55.8049 8.722V12H54.8039V5.972H55.8049V6.951Z","fill","currentColor"]],template:function(t,r){t&1&&(_(0,"div",0),g(1,Inn,5,1,"div",1)(2,Enn,6,1,"div",1)(3,xnn,5,1,"div",1)(4,Tnn,5,1,"div",1),b()),t&2&&(d("ngSwitch",r.deviceType),x("data-testid",r.componentId)("aria-label","Viewing on"+r.deviceType),m(),d("ngSwitchCase","Mobile"),m(),d("ngSwitchCase","Tablet"),m(),d("ngSwitchCase","Desktop"),m(),d("ngSwitchCase","Monitor"))},dependencies:[Gi,to],styles:[".velt-device-type-icons--flex[_ngcontent-%COMP%]{display:flex;cursor:pointer;color:var(--velt-text-4)}"],changeDetection:0});let i=o;return i})();var Dnn=i=>({componentConfigSignal:i}),wnn=(i,o)=>({condition:i,data:o});function Onn(i,o){if(i&1){let n=Y();_(0,"app-dropdown",3),G("openChange",function(t){N(n);let r=l(4);return F(r.onOpenChange(t))})("click",function(t){return N(n),F(t.stopPropagation())}),f(1,4),w(2,"app-comment-dialog-options-dropdown-trigger",5),v(),f(3,6),w(4,"app-comment-dialog-options-dropdown-content",7),v(),b()}if(i&2){let n=l().ngIf,e=l(3);d("calculateWidth",!1)("darkMode",e.darkMode),x("data-testid",e.componentId),m(2),d("commentDialogOptionsDropdownConfigSignal",e.commentDialogOptionsDropdownConfigSignal)("variant",n.variant)("template",n.triggerTemplate)("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-trigger"),m(2),d("commentDialogOptionsDropdownConfigSignal",e.commentDialogOptionsDropdownConfigSignal)("variant",n.variant)("shadowDom",e.shadowDom)("template",n.contentTemplate)("darkMode",n.darkMode)("componentConfigSignal",e.componentConfigSignal),x("data-testid",e.componentId+"-content")}}function Ann(i,o){if(i&1&&(f(0),g(1,Onn,5,15,"app-dropdown",2),v()),i&2){let n=o.ngIf,e=l(3);m(),d("ngIf",e.allowChangeCommentAccessMode||e.allowAssignment||e.allowToggleNotification||(n.annotation==null||n.annotation.from==null?null:n.annotation.from.userId)===(e.user==null?null:e.user.userId)||(e.commentObj==null||e.commentObj.from==null?null:e.commentObj.from.userId)===(e.user==null?null:e.user.userId)||(n==null?null:n.isUserAdmin)||e.allowEdit&&((n.annotation==null||n.annotation.from==null?null:n.annotation.from.userId)===(e.user==null?null:e.user.userId)||(e.commentObj==null||e.commentObj.from==null?null:e.commentObj.from.userId)===(e.user==null?null:e.user.userId)))}}function Pnn(i,o){if(i&1&&(f(0),g(1,Ann,2,1,"ng-container",0),v()),i&2){let n=l(2);m(),d("ngIf",n.commentDialogOptionsDropdownConfigSignal())}}function Mnn(i,o){if(i&1&&(f(0),g(1,Pnn,2,1,"ng-container",1),v()),i&2){let n=l();m(),d("veltIf",k(3,wnn,n.conditionSignal(),A(1,Dnn,n.componentConfigSignal)))}}var cG=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c){super(a,r,t,void 0,void 0,s,e),this.loggingService=e,this.changeDetector=t,this.themeService=r,this.elementRef=a,this.dynamicDataService=s,this.commentService=c,this.notificationEnabled=!1,this.allowEdit=!1,this.shadowDom=!0,this.allowAssignment=!0,this.allowToggleNotification=!0,this.isUserAdmin=!1,this.allowChangeCommentAccessMode=!1,this.deleteComment=new Pe,this.toggleNotificationSubscription=new Pe,this.openAssignToMenu=new Pe,this.editCommentClick=new Pe,this.componentConfigSignal=De(new ke),this.changeCommentAccessMode=new Pe,this.openDropdownIndex=new Pe,this.commentDialogOptionsDropdownConfigSignal=De({allowChangeCommentAccessMode:!1,darkMode:this.darkMode,onChangeCommentAccessMode:this.onChangeCommentAccessMode.bind(this),annotation:this.annotation,commentAccessMode:io,allowAssignment:this.allowAssignment,allowToggleNotification:this.allowToggleNotification,notificationEnabled:this.notificationEnabled,onOpenAssignToMenu:this.onOpenAssignToMenu.bind(this),allowEdit:this.allowEdit,onEditCommentClick:this.onEditCommentClick.bind(this),onToggleNotificationSubscription:this.onToggleNotificationSubscription.bind(this),user:this.user,commentObj:this.commentObj,onDeleteComment:this.onDeleteComment.bind(this),variant:this.variant,contentTemplate:this.contentTemplate,triggerTemplate:this.triggerTemplate,isUserAdmin:this.isUserAdmin,mainCommentId:this.mainCommentId,deleteThreadWithFirstComment:!0}),this.subscriptions=[],this.componentId="velt-comment-dialog-options-dropdown",super.initializeComponentConfigSignal(new ke)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes(),this.subscriptions.push(this.commentService.getDeleteThreadWithFirstComment$().subscribe(e=>{this.commentDialogOptionsDropdownConfigSignal.update(t=>(t=T(I({},t),{deleteThreadWithFirstComment:e}),t))}))}catch(e){this.catchError("Error in CommentDialogOptionsDropdownComponent ngOnInit: ",e)}}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.commentDialogOptionsDropdownConfigSignal.update(r=>(r=T(I({},r),{[t]:e[t].currentValue}),r))}),this.commentDialogOptionsDropdownConfigSignal.update(t=>(t.darkMode=this.darkMode,t))}catch(t){this.catchError("Error in CommentDialogOptionsDropdownComponent ngOnChanges: ",t)}}ngOnDestroy(){try{super.ngOnDestroy(),this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.catchError("Error in CommentDialogOptionsDropdownComponent ngOnDestroy: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","menu"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in CommentDialogOptionsDropdownComponent setupA11yAttributes: ",e)}}onChangeCommentAccessMode(e){this.changeCommentAccessMode.emit(e)}onOpenAssignToMenu(){this.openAssignToMenu.emit(),this.openDropdownIndex.emit(this.commentIndex)}onEditCommentClick(){this.editCommentClick.emit()}onDeleteComment(e){this.deleteComment.emit(e)}onToggleNotificationSubscription(){this.toggleNotificationSubscription.emit()}onOpenChange(e){e?this.openDropdownIndex.emit(this.commentIndex):this.openDropdownIndex.emit(-1)}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.componentConfigSignal()?.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(Jt),h(qe),h(R),h(S),h(we))},o.\u0275cmp=O({type:o,selectors:[["app-comment-dialog-options-dropdown"]],inputs:{annotation:"annotation",commentObj:"commentObj",commentIndex:"commentIndex",notificationEnabled:"notificationEnabled",user:"user",allowEdit:"allowEdit",shadowDom:"shadowDom",allowAssignment:"allowAssignment",allowToggleNotification:"allowToggleNotification",isUserAdmin:"isUserAdmin",allowChangeCommentAccessMode:"allowChangeCommentAccessMode",variant:"variant",contentTemplate:"contentTemplate",triggerTemplate:"triggerTemplate",componentConfigSignal:"componentConfigSignal",mainCommentId:"mainCommentId"},outputs:{deleteComment:"deleteComment",toggleNotificationSubscription:"toggleNotificationSubscription",openAssignToMenu:"openAssignToMenu",editCommentClick:"editCommentClick",changeCommentAccessMode:"changeCommentAccessMode",openDropdownIndex:"openDropdownIndex"},standalone:!1,features:[V([S]),B,Ze],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["dropdownType","options","dropdownClass","velt-comment-dialog-options-dropdown-container","triggerClass","options-trigger-container velt-comment-dialog-options-dropdown",3,"calculateWidth","darkMode","openChange","click",4,"ngIf"],["dropdownType","options","dropdownClass","velt-comment-dialog-options-dropdown-container","triggerClass","options-trigger-container velt-comment-dialog-options-dropdown",3,"openChange","click","calculateWidth","darkMode"],["trigger",""],[3,"commentDialogOptionsDropdownConfigSignal","variant","template","componentConfigSignal"],["content",""],[3,"commentDialogOptionsDropdownConfigSignal","variant","shadowDom","template","darkMode","componentConfigSignal"]],template:function(t,r){t&1&&g(0,Mnn,2,6,"ng-container",0),t&2&&d("ngIf",r.componentConfigSignal())},dependencies:[X,Wl,aC,rC,ae],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}"],changeDetection:0});let i=o;return i})();var knn=["tooltipTemplate"],Rnn=["customTooltipTemplate"],Nnn=["*",[["","tooltipContent",""]]],Fnn=["*","[tooltipContent]"];function Lnn(i,o){if(i&1&&(_(0,"div",4),te(1),b()),i&2){let n=l();ge("velt-tooltip-content--dark",n.darkMode),x("data-testid",n.componentId+"-text"),m(),Ce(" ",n.tooltip," ")}}function Bnn(i,o){if(i&1&&(_(0,"div",4),Lt(1,1),b()),i&2){let n=l();tr(n.tooltipContentClass),ge("velt-tooltip-content--dark",n.darkMode),x("data-testid",n.componentId+"-custom")}}var Xd=(()=>{let o=class o extends Je{constructor(e,t,r,a,s,c,p){super(r,t,e),this.changeDetector=e,this.themeService=t,this.elementRef=r,this.loggingService=a,this.overlay=s,this.overlayPositionBuilder=c,this.viewContainerRef=p,this.veltElement=!0,this.clicked=new Pe,this.tooltip="",this.tooltipContentClass="",this.colorMode=!1,this.type="",this.unstyled=!1,this.componentId="velt-tooltip-button",this.overlayRef=null,this.isTooltipVisible=!1,this.buttonElement=null,this.boundShowTooltip=this.showTooltip.bind(this),this.boundScheduleHideTooltip=this.scheduleHideTooltip.bind(this),this.boundOverlayMouseEnter=this.onOverlayMouseEnter.bind(this),this.boundOverlayMouseLeave=this.onOverlayMouseLeave.bind(this)}ngOnInit(){try{this.setupA11yAttributes(),this.setupTooltipListeners()}catch(e){this.loggingService.catch("Error in TooltipButtonComponent ngOnInit:",e)}}ngOnDestroy(){try{this.hideTooltip(),this.hideTooltipTimer&&(clearTimeout(this.hideTooltipTimer),this.hideTooltipTimer=null),this.removeTooltipListeners(),this.clicked.complete(),super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in TooltipButtonComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in TooltipButtonComponent setupA11yAttributes:",e)}}setupTooltipListeners(){try{this.buttonElement=this.elementRef.nativeElement.querySelector("button"),this.buttonElement&&(this.buttonElement.addEventListener("mouseenter",this.boundShowTooltip),this.buttonElement.addEventListener("mouseleave",this.boundScheduleHideTooltip),this.buttonElement.addEventListener("focus",this.boundShowTooltip),this.buttonElement.addEventListener("blur",this.boundScheduleHideTooltip))}catch(e){this.loggingService.catch("Error in TooltipButtonComponent setupTooltipListeners:",e)}}showTooltip(){try{if(!this.tooltip&&!this.hasCustomTooltipContent()||(this.hideTooltipTimer&&(clearTimeout(this.hideTooltipTimer),this.hideTooltipTimer=null),this.isTooltipVisible))return;this.createOverlay(),this.isTooltipVisible=!0}catch(e){this.loggingService.catch("Error in TooltipButtonComponent showTooltip:",e)}}scheduleHideTooltip(){try{this.hideTooltipTimer=setTimeout(()=>{this.hideTooltip()},100)}catch(e){this.loggingService.catch("Error in TooltipButtonComponent scheduleHideTooltip:",e)}}hideTooltip(){try{this.overlayRef&&(this.overlayRef.overlayElement.removeEventListener("mouseenter",this.boundOverlayMouseEnter),this.overlayRef.overlayElement.removeEventListener("mouseleave",this.boundOverlayMouseLeave),this.overlayRef.dispose(),this.overlayRef=null),this.isTooltipVisible=!1}catch(e){this.loggingService.catch("Error in TooltipButtonComponent hideTooltip:",e)}}createOverlay(){try{let e=this.elementRef.nativeElement.querySelector("button");if(!e)return;let t=this.overlayPositionBuilder.flexibleConnectedTo(e).withPositions([{originX:"center",originY:"bottom",overlayX:"center",overlayY:"top",offsetY:8},{originX:"center",originY:"top",overlayX:"center",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:8},{originX:"start",originY:"center",overlayX:"end",overlayY:"center",offsetX:-8}]).withPush(!0).withFlexibleDimensions(!1).withViewportMargin(8);this.overlayRef=this.overlay.create({positionStrategy:t,scrollStrategy:this.overlay.scrollStrategies.reposition(),hasBackdrop:!1,panelClass:["velt-tooltip-overlay","velt-overlay-panel"]});let r=this.tooltip?this.tooltipTemplate:this.customTooltipTemplate,a=new ma(r,this.viewContainerRef);this.overlayRef.attach(a);let s=this.overlayRef.overlayElement.closest(".cdk-overlay-connected-position-bounding-box");s&&s instanceof HTMLElement&&this.zIndex&&(s.style.zIndex=this.zIndex.toString()),this.overlayRef.overlayElement.addEventListener("mouseenter",this.boundOverlayMouseEnter),this.overlayRef.overlayElement.addEventListener("mouseleave",this.boundOverlayMouseLeave)}catch(e){this.loggingService.catch("Error in TooltipButtonComponent createOverlay:",e)}}hasCustomTooltipContent(){try{let t=this.elementRef.nativeElement.querySelector("[tooltipContent]");return t&&t.children.length>0}catch(e){return this.loggingService.catch("Error in TooltipButtonComponent hasCustomTooltipContent:",e),!1}}onOverlayMouseEnter(){this.hideTooltipTimer&&(clearTimeout(this.hideTooltipTimer),this.hideTooltipTimer=null)}onOverlayMouseLeave(){this.scheduleHideTooltip()}removeTooltipListeners(){try{this.buttonElement&&(this.buttonElement.removeEventListener("mouseenter",this.boundShowTooltip),this.buttonElement.removeEventListener("mouseleave",this.boundScheduleHideTooltip),this.buttonElement.removeEventListener("focus",this.boundShowTooltip),this.buttonElement.removeEventListener("blur",this.boundScheduleHideTooltip),this.buttonElement=null)}catch(e){this.loggingService.catch("Error in TooltipButtonComponent removeTooltipListeners:",e)}}onButtonClick(e){try{this.hideTooltip(),this.clicked.emit(),e.stopPropagation()}catch(t){this.loggingService.catch("Error in TooltipButtonComponent onButtonClick:",t)}}};o.\u0275fac=function(t){return new(t||o)(h(Jt),h(qe),h(R),h(y),h(Mi),h(Af),h(_i))},o.\u0275cmp=O({type:o,selectors:[["app-tooltip-button"]],viewQuery:function(t,r){if(t&1&&(nt(knn,7),nt(Rnn,7)),t&2){let a;Xe(a=Qe())&&(r.tooltipTemplate=a.first),Xe(a=Qe())&&(r.customTooltipTemplate=a.first)}},hostVars:1,hostBindings:function(t,r){t&2&&x("data-velt-element",r.veltElement)},inputs:{tooltip:"tooltip",tooltipContentClass:"tooltipContentClass",colorMode:"colorMode",type:"type",zIndex:"zIndex",unstyled:"unstyled"},outputs:{clicked:"clicked"},standalone:!1,features:[B],ngContentSelectors:Fnn,decls:7,vars:13,consts:[["tooltipTemplate",""],["customTooltipTemplate",""],["role","presentation",1,"s-tooltip"],[1,"__button","s-tooltip","velt-tooltip-button",3,"click"],[1,"velt-tooltip-content","s-tooltiptext"]],template:function(t,r){if(t&1){let a=Y();jt(Nnn),_(0,"div",2)(1,"button",3),G("click",function(c){return N(a),F(r.onButtonClick(c))}),g(2,Lnn,2,4,"ng-template",null,0,Te)(4,Bnn,2,5,"ng-template",null,1,Te),Lt(6),b()()}t&2&&(x("data-testid",r.componentId+"-tooltip"),m(),ge("unresolve",r.type==="unresolve")("colorMode",r.colorMode)("velt-tooltip-button--unresolve",r.type==="unresolve")("unstyled",r.unstyled)("velt-tooltip-button--colorMode",r.colorMode),x("aria-label",r.tooltip||"")("data-testid",r.componentId))},styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}[_nghost-%COMP%]{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%]{--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--velt-border-transparent: var(--velt-dark-mode-border-transparent);--velt-animation-transparent: var(--velt-dark-mode-animation-transparent)}.velt-tooltip-button[_ngcontent-%COMP%]{border:0;border-radius:var(--velt-border-radius-full);width:28px;height:28px;flex-shrink:0;display:flex;align-items:center;justify-content:center;cursor:pointer;background:transparent;transition:.5s;color:var(--velt-text-4)}.velt-tooltip-button.unstyled[_ngcontent-%COMP%]{background-color:initial;border-radius:initial;height:initial;width:initial;padding:initial;border:initial;color:initial;transition:initial}.velt-tooltip-button.velt-tooltip-button--colorMode[_ngcontent-%COMP%]{color:var(--velt-white)}.velt-tooltip-button.velt-tooltip-button--colorMode.velt-tooltip-button--unresolve[_ngcontent-%COMP%]{background:var(--velt-success);color:var(--velt-success-foreground)}.velt-tooltip-button.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{border:1px solid var(--velt-border-2);box-shadow:none;border-radius:var(--velt-border-radius-md);top:95%}.velt-tooltip-button[_ngcontent-%COMP%]:hover{background-color:var(--velt-background-3);cursor:pointer}.velt-tooltip-button[_ngcontent-%COMP%]:hover.unstyled{background-color:transparent}.velt-tooltip-button[_ngcontent-%COMP%]:hover.velt-tooltip-button--colorMode:hover{background:color-mix(in srgb,var(--velt-background-2) 20%,transparent)}.velt-tooltip-button[_ngcontent-%COMP%]:hover.velt-tooltip-button--colorMode:hover.velt-tooltip-button--unresolve{background:var(--velt-success-hover)}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}} .velt-tooltip-overlay{z-index:1000} .velt-tooltip-overlay .velt-tooltip-content{font-family:var(--velt-default-font-family);background:var(--velt-light-mode-background-1);color:var(--velt-light-mode-text-1);border:1px solid var(--velt-light-mode-border-2);border-radius:var(--velt-border-radius-sm);padding:8px 12px;font-size:12px;line-height:1.4;max-width:200px;word-wrap:break-word;box-shadow:0 4px 12px #00000026;position:relative;animation:_ngcontent-%COMP%_tooltipFadeIn .2s ease-out forwards}@keyframes _ngcontent-%COMP%_tooltipFadeIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}} .velt-tooltip-overlay .velt-tooltip-content--dark{background:var(--velt-dark-mode-background-1);color:var(--velt-dark-mode-text-1);border-color:var(--velt-dark-mode-border-2);box-shadow:0 4px 12px #0000004d}"],changeDetection:0});let i=o;return i})();var Vnn=["*"],c7=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(r,a),this.loggingService=e,this.customFilterService=t,this.elementRef=r,this.themeService=a,this.headingMode=!1,this.changeStatus=new Pe,this.componentId="velt-resolve-button"}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in ResolveButtonComponent ngOnInit:",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in ResolveButtonComponent setupA11yAttributes:",e)}}resolveComment(e){this.loggingService.log("%c[WB] Calling FUNCTION: resolveComment","color: green;");try{if(!this.annotation)return;this.changeStatus.emit({status:this.customFilterService.resolvedStatus,statusOptionType:e})}catch(t){this.catchError("Error in CommentDialogComponent resolveComment: ",t)}}catchError(e,t,r){try{this.loggingService.catch(e,t,T(I({},r||{}),{annotationId:this.annotation?.annotationId}))}catch{}}};o.\u0275fac=function(t){return new(t||o)(h(y),h(Zo),h(R),h(qe))},o.\u0275cmp=O({type:o,selectors:[["app-resolve-button"]],inputs:{annotation:"annotation",sidebarMode:"sidebarMode",headingMode:"headingMode"},outputs:{changeStatus:"changeStatus"},standalone:!1,features:[B],ngContentSelectors:Vnn,decls:3,vars:8,consts:[[3,"clicked","tooltip","darkMode","colorMode"]],template:function(t,r){t&1&&(jt(),_(0,"app-tooltip-button",0),P(1,"translate"),G("clicked",function(){return r.resolveComment("button")}),Lt(2),b()),t&2&&(it("color",(r.annotation==null||r.annotation.status==null?null:r.annotation.status.color)+" !important"),d("tooltip",M(1,6,"Resolve"))("darkMode",r.darkMode)("colorMode",r.headingMode),x("data-testid",r.componentId))},dependencies:[Xd,pe],encapsulation:2,changeDetection:0});let i=o;return i})();var Unn=[[["","icon",""]],[["","extra",""]]],jnn=["[icon]","[extra]"],d7=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(r,t,e),this.changeDetector=e,this.themeService=t,this.elementRef=r,this.loggingService=a,this.clicked=new Pe,this.componentId="velt-action-button"}ngOnInit(){try{this.loggingService.log("%c[WB] Calling FUNCTION: ngOnInit","color: green;"),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in ActionButtonComponent ngOnInit:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","presentation")}catch(e){this.loggingService.catch("Error in ActionButtonComponent setupA11yAttributes:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in ActionButtonComponent ngOnDestroy:",e)}}};o.\u0275fac=function(t){return new(t||o)(h(Jt),h(qe),h(R),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-action-button"]],inputs:{title:"title",disabled:"disabled"},outputs:{clicked:"clicked"},standalone:!1,features:[B],ngContentSelectors:jnn,decls:5,vars:11,consts:[["tabindex","0",1,"velt-action-button","action__button",3,"click","title","disabled"]],template:function(t,r){t&1&&(jt(Unn),_(0,"button",0),P(1,"translate"),P(2,"translate"),G("click",function(){return r.clicked.emit()}),Lt(3),b(),Lt(4,1)),t&2&&(ge("velt-action-button--disabled",r.disabled),d("title",M(1,7,r.title||""))("disabled",r.disabled),x("aria-label",M(2,9,r.title||"Action button"))("aria-disabled",r.disabled)("data-testid",r.componentId))},dependencies:[pe],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}button.action__button.velt-action-button[_ngcontent-%COMP%]{border:0;width:calc((2rem + 0px) * var(--velt-base-rem-unit));height:calc((2rem + 0px) * var(--velt-base-rem-unit));flex-shrink:0;display:flex;align-items:center;justify-content:center;background:transparent;transition:.5s;border-radius:var(--velt-border-radius-full);color:var(--velt-text-10)}button.action__button.velt-action-button[_ngcontent-%COMP%]:hover{background:var(--velt-background-3);cursor:pointer}@media (max-width: 768px){button[_ngcontent-%COMP%]{padding:0}}"],changeDetection:0});let i=o;return i})();var Hnn=(i,o,n,e,t,r)=>({template:i,componentName:o,variant:n,suffix:e,setIfCondition:t,componentElementRef:r});function znn(i,o){i&1&&(f(0),le(),_(1,"svg",5),w(2,"path",6),b(),v())}var dCe=(()=>{let o=class o extends Je{constructor(e,t,r,a){super(t,r,e),this.changeDetector=e,this.elementRef=t,this.themeService=r,this.loggingService=a,this.clicked=new Pe,this.selectFiles=new Pe,this.setIfConditionEvent=new Pe,this.componentId="velt-attachment-button"}ngOnInit(){try{this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in AttachmentButtonComponent ngOnInit:",e)}}ngOnDestroy(){super.ngOnDestroy()}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("role","presentation"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AttachmentButtonComponent setupA11yAttributes:",e)}}setIfConditionEventCalled(e){try{this.setIfConditionEvent.emit(e)}catch(t){this.loggingService.catch("Error in AttachmentButtonComponent setIfConditionEventCalled:",t)}}};o.\u0275fac=function(t){return new(t||o)(h(Jt),h(R),h(qe),h(y))},o.\u0275cmp=O({type:o,selectors:[["app-attachment-button"]],inputs:{template:"template",componentMeta:"componentMeta"},outputs:{clicked:"clicked",selectFiles:"selectFiles",setIfConditionEvent:"setIfConditionEvent"},standalone:!1,features:[B],decls:8,vars:21,consts:[["fileInputRef",""],[3,"clicked","darkMode","title","ariaLabel"],["icon","","aria-hidden","true",1,"velt-attachment-button--icon"],[4,"veltDynamicTemplate"],["extra","","type","file","multiple","","accept",`image/png, image/gif, image/jpeg, image/svg+xml, image/webp, application/pdf, video/*, text/csv,