@veltdev/sdk-dev 6.0.8-beta.2 → 6.0.8-beta.3

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 (45) hide show
  1. package/{chunk-T4CM6UKZ.js → chunk-AVALXKWQ.js} +1 -1
  2. package/{chunk-N4APL3ZG.js → chunk-E4HJ7YKV.js} +1 -1
  3. package/chunk-F46FHE6O.js +1 -0
  4. package/{chunk-QC3HLRNI.js → chunk-FIFNF23O.js} +1 -1
  5. package/{chunk-MRNSRINQ.js → chunk-FSDMNA2X.js} +1 -1
  6. package/chunk-FXBACOQJ.js +1 -0
  7. package/{chunk-LS3GLCPX.js → chunk-HG6W5JZA.js} +1 -1
  8. package/{chunk-I3U6YUMT.js → chunk-JGICU6Z4.js} +1 -1
  9. package/{chunk-D2BOLY5Q.js → chunk-JPCBTXDG.js} +1 -1
  10. package/{chunk-OTEHXO3L.js → chunk-NUVYBRLN.js} +1 -1
  11. package/{chunk-WNOKX7ML.js → chunk-NVHVXSVC.js} +1 -1
  12. package/{chunk-ANVOXADQ.js → chunk-OSXZUDM4.js} +1 -1
  13. package/{chunk-7DVALKQ7.js → chunk-QGHDOJHE.js} +1 -1
  14. package/{chunk-KES24H7E.js → chunk-QNQ45SC7.js} +1 -1
  15. package/{chunk-MIANWP6R.js → chunk-QU2E3FYA.js} +1 -1
  16. package/{chunk-NCVN3JXT.js → chunk-SF2KIWKT.js} +6 -6
  17. package/{chunk-23NZV3J5.js → chunk-U4GFMH6I.js} +1 -1
  18. package/chunk-VGZY4BCZ.js +1 -0
  19. package/{chunk-KMCCIFJ3.js → chunk-XA3PEI3J.js} +1 -1
  20. package/chunk-XXJBBXBG.js +193 -0
  21. package/package.json +1 -1
  22. package/velt-activity-log.js +1 -1
  23. package/velt-area.js +1 -1
  24. package/velt-arrow.js +1 -1
  25. package/velt-comment.js +7 -7
  26. package/velt-cursor.js +1 -1
  27. package/velt-huddle.js +1 -1
  28. package/velt-live-state-sync.js +1 -1
  29. package/velt-notification.js +1 -1
  30. package/velt-presence.js +1 -1
  31. package/velt-reaction.js +1 -1
  32. package/velt-recorder.js +1 -1
  33. package/velt-rewriter.js +1 -1
  34. package/velt-selection.js +1 -1
  35. package/velt-tag.js +1 -1
  36. package/velt-user-invite.js +1 -1
  37. package/velt-user-request.js +1 -1
  38. package/velt-video-player.js +1 -1
  39. package/velt-views.js +1 -1
  40. package/velt.js +2 -2
  41. package/chunk-7LUSUNI3.js +0 -1
  42. package/chunk-BARZUD2Z.js +0 -1
  43. package/chunk-G4MWCI3H.js +0 -193
  44. package/chunk-QVPRXGEH.js +0 -1
  45. /package/{chunk-JOD7T5HO.js → chunk-HCZGU3VQ.js} +0 -0
package/velt-cursor.js CHANGED
@@ -1,2 +1,2 @@
1
- import{D as Pt,F as U,G as T}from"./chunk-7LUSUNI3.js";import{a as xt}from"./chunk-D2BOLY5Q.js";import{b as Me,c as ke,d as Ne}from"./chunk-5YU74OX2.js";import{a as Dt}from"./chunk-24U4LEAT.js";import{a as At}from"./chunk-OTEHXO3L.js";import{a as st}from"./chunk-BARZUD2Z.js";import{Ba as h,Ca as Et,Da as R,Ea as Ot}from"./chunk-NCVN3JXT.js";import{$ as Se,$g as ft,Ab as ye,Ai as _t,Bb as be,Ca as Qe,Ch as oe,E as H,Ed as ct,Ee as y,Fa as l,Fc as ot,Fi as yt,G as je,Ga as Ve,Gc as A,Gi as bt,Ib as nt,Ih as Ae,J as He,Jb as $,Jh as De,Kb as Z,Kh as Ct,L as Ge,Le as mt,M as ze,Md as lt,Nb as Ie,Nd as ut,Nh as K,Pa as m,Pb as xe,Pc as at,Pi as It,T as I,Ta as Ze,Ua as O,Uf as dt,Va as et,Vf as pt,W as ce,We as Pe,Wf as gt,X as Je,Ya as D,Zg as vt,_a as u,_b as N,_g as ht,a as g,aa as Ye,b as f,bc as C,ca as L,cc as x,db as P,ec as F,g as ae,ha as qe,ia as Ke,ii as G,ja as $e,ji as Ue,kc as Ee,ki as v,l as se,lb as a,lc as Oe,li as St,mb as _,nb as b,ob as k,oe as q,p as ie,pc as it,qa as _e,r as B,sb as d,si as Te,tb as p,ti as we,ua as Xe,v as j,vb as tt,wa as E,xb as rt,zb as c}from"./chunk-CRZGZZVQ.js";var ee=(()=>{let i=class i{constructor(e,t,o,s,S,M,re,ne,Le,$t,Vt){this.analyticsService=e,this.configService=t,this.docService=o,this.afAuth=s,this.iamService=S,this.domService=M,this.databaseService=re,this.authService=ne,this.loggingService=Le,this.commonDbService=$t,this.serviceBook=Vt,this.cursorUser$=new se(new Pe),this.documentPaths=null,this.inactivityTime=120*1e3,this.allowedElementIds$=new se([]),this.cursorTagAvailable$=new se(!1),this.cursorTagAvailable=!1,this.cursorUsers$=new se([]),this.loggingService.log("%c[WB] Creating CLASS: CursorService","color: blue;");try{this.serviceBook.set(Ae,this),this.checkCursorTagAvailable(),this.databaseService.getDb().pipe(H(W=>!!W),I(W=>this.cursorTagAvailable$.pipe(H(Y=>!!Y),He(1),j(()=>W))),He(1)).subscribe(W=>{W&&this.cursorTagAvailable&&(this.getPresenceUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnDatabaseDisconnect().subscribe(()=>{},Y=>{this.loggingService.catch("Error in CursorService constructor updateOnDatabaseDisconnect: ",Y)}),this.addMouseMoveListener(),this.addScreenSizeChangeListener(),this.updateOnAllowedFeatureListChange())},W=>{this.loggingService.catch("Error in CursorService constructor getDb: ",W)}),this.cursorUsers$.pipe(ze()).subscribe(([W,Y])=>{sessionStorage.getItem(y.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED)||Y?.length>1&&W.length!==Y.length&&(this.analyticsService.trackEvent(oe.Events.Cursor.CURSOR_MULTIPLE_USERS_DETECTED,{totalUsers:Y.length,cursorSnippylyUserIds:Y.map(Be=>Be.userSnippylyId),cursorClientUserIds:Y.map(Be=>Be.userId)}),sessionStorage.setItem(y.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED,"true"))}),this.authService.addPreSignOutFuction("cursor-signout",this.signOutUser.bind(this))}catch(W){this.loggingService.catch("Error in CursorService constructor: ",W)}}checkCursorTagAvailable(){this.loggingService.log("%c[WB] Calling FUNCTION: checkCursorTagAvailable","color: green;");try{this.cursorTagAvailable=!!document.querySelector(y.TAGS.VELT_CURSOR)||!!document.querySelector(y.TAGS.SNIPPYLY_CURSOR),this.cursorTagAvailable$.next(this.cursorTagAvailable)}catch(e){this.loggingService.catch("Error in CursorService checkCursorTagAvailable: ",e)}}addScreenSizeChangeListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addScreenSizeChangeListener","color: green;");try{this.docService.getDocumentPaths$().pipe(H(e=>!!e),I(e=>this.domService.getCurrentWindowSize$("CursorService addScreenSizeChangeListener").pipe(H(t=>!!t)))).subscribe(e=>{this.setCurrentCursorUserScreenSize(e)},e=>{this.loggingService.catch("Error in addScreenSizeChangeListener getCurrentWindowSize: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addScreenSizeChangeListener: ",e)}}addMouseMoveListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addMouseMoveListener","color: green;");try{this.domService.onWindowPointerMove$().pipe(Je(50)).subscribe(e=>{e&&this.setCurrentCursorUserPosition(e.pageX,e.pageY,this.domService.getTargetElementForCursorPosition(e,!0,!1,!1,void 0,!1))},e=>{this.loggingService.catch("Error in addMouseMoveListener getCurrentMousePosition: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addMouseMoveListener: ",e)}}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;");try{this.docService.getDocumentPaths$().pipe(ce(e=>{this.documentPaths=e}),ze(),ce(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(y.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(y.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getDocumentPaths: ",e)}}getLocation(){try{this.docService.getLocation$().pipe(ce(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getLocation: ",e)}}getCursorUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getCursorUser","color: green;"),this.cursorUser$.asObservable()}getPresenceUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.serviceBook.observe(Ct).pipe(H(e=>!!e),I(e=>e.getPresenceUser()),H(e=>!!e),je(e=>B(e.code))).subscribe(e=>{this.setCursorUser(e)},e=>{this.loggingService.catch("Error in getPresenceUser: ",e)})}getLiveCursorsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveCursorsOnCurrentDocument","color: green;"),this.authService.getAuthState$().pipe(H(e=>!!e),I(e=>this.isFeatureAllowed({firebaseUser:e,users:[],filteredUsers:[]})),I(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(j(t=>(e.featureAllowed=t,e))):B(e)),I(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(j(t=>(e.featureAllowed=!t,e))):B(e)),I(e=>!e.featureAllowed||e?.user?.isAnonymous?B([]):B(e).pipe(I(t=>this.docService.getDocumentPaths$().pipe(j(o=>(this.documentPaths=o,t.documentPaths=o,t)))),I(t=>this.getDataFromDocumentId().pipe(j(o=>(t.users=o||[],g({},t))))),j(t=>(t.filteredUsers=this.filterOnlineUsers(t.users,t.firebaseUser),t)),I(t=>t?.filteredUsers?.length?this.domService.getCurrentWindowSize$("CursorService getLiveCursorsOnCurrentDocument").pipe(j(()=>t)):B(t)),j(t=>(t?.filteredUsers?.forEach(o=>{this.calculateCursorUserPosition(o)}),t)),I(t=>t?.filteredUsers?B(t?.filteredUsers||[]):B([])))))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(H(t=>!!t),j(t=>f(g({},e),{config:t})),I(t=>this.authService.getUser$().pipe(j(o=>f(g({},t),{user:o})))),I(t=>dt(t.config,t.user,q.CURSOR)?B(f(g({},t),{featureAllowed:!0})):(this.loggingService.warn("Cursor feature is not allowed."),B(f(g({},t),{featureAllowed:!1})))),Ge((t,o)=>t?.featureAllowed===o?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(H(t=>!!t),I(t=>{if(this.configService?.getApiKey()&&this.documentPaths?.cursor){let o=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allCursors",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[lt("timestamp"),ut(o)]}}).pipe(je(s=>(this.loggingService.catch("Error in CursorService getDataFromDocumentId: ",s),B(null))),j(s=>s?.data),j(s=>{let S=[];return s&&(S=Object.values(s).filter(M=>typeof M=="object")),S}))}else return B([])}))}calculateCursorUserPosition(e){try{if(e?.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let o=t.iterateNext();if(o&&this.isElementInsideAllowedElements(o)){let s=o.getBoundingClientRect();s&&s.width&&s.height&&(e.position={top:s.top+s.height*e.targetElement.topPercentage/100,left:s.left+s.width*e.targetElement.leftPercentage/100})}}}}catch(t){this.loggingService.catch("Error in calculateCursorUserPosition:",t)}}filterOnlineUsers(e,t){try{let s=e.slice().filter(M=>{let re=gt(M.timestamp);return M.userSnippylyId&&M.onlineStatus===y.PRESENCE_STATUS_ONLINE&&re<this.inactivityTime});this.cursorUsers$.next(s),s=s.filter(M=>M?.userSnippylyId!==t?.uid);let S=this.docService.getLocation();return S&&S.locationId?s=s.filter(M=>M.locationId===S.locationId):s=s.filter(M=>!M.locationId),s}catch(o){return this.loggingService.catch("Error in filterOnlineUsers:",o),[]}}setCursorUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorUser","color: green;");try{let t=this.cursorUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.comment="",this.authService.isFeatureAllowed(q.PRESENCE)&&(t.onlineStatus=e?.onlineStatus),t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let o=this.domService.getCurrentWindowSizeValue();t.screenWidth=o?.screenWidth,t.screenHeight=o?.screenHeight,t.screenScrollHeight=o?.screenScrollHeight,this.updateCurrentCursorUser(t)}catch(t){this.loggingService.catch("Error in setCursorUser:",t)}}setCurrentCursorUserPosition(e,t,o){try{let s=this.cursorUser$.value;s?.onlineStatus===y.PRESENCE_STATUS_ONLINE&&(s.positionX=e,s.positionY=t,o?s.targetElement=o:s.targetElement=null,this.updateCurrentCursorUser(s))}catch(s){this.loggingService.catch("Error in setCurrentCursorUserPosition:",s)}}setCurrentCursorUserScreenSize(e){try{if(e.screenWidth!==0&&e.screenHeight!==0){let t=this.cursorUser$.value;t?.onlineStatus===y.PRESENCE_STATUS_ONLINE&&(t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.screenScrollHeight=e.screenScrollHeight,this.updateCurrentCursorUser(t))}}catch(t){this.loggingService.catch("Error in setCurrentCursorUserScreenSize:",t)}}updateCurrentCursorUser(e){return ae(this,null,function*(){try{if(this.documentPaths&&e&&e.userId&&this.authService.isFeatureAllowed(q.CURSOR)){if(!e.isAnonymous){e.pageInfo=new mt;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},t),{timestamp:this.timestamp})))})}this.cursorUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentCursorUser:",t)}})}updateUserStatusOnDocumentChange(e,t){return ae(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let o=this.cursorUser$.value;if(o.onlineStatus=e,t&&o&&o.userId&&!o.isAnonymous&&this.authService.isFeatureAllowed(q.CURSOR)){let s=JSON.parse(JSON.stringify(o));this.commonDbService.updateData({feature:"cursor",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:o.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},s),{timestamp:this.timestamp})))})}}catch(o){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",o)}})}updateUserOnLocationChange(e){return ae(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.cursorUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(q.CURSOR)){let o=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},o),{timestamp:this.timestamp})))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.cursorUser$.value,o=!1;if(e.featureAllowList.includes(q.CURSOR)?t?.onlineStatus!==y.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=y.PRESENCE_STATUS_ONLINE,o=!0):t?.onlineStatus!==y.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=y.PRESENCE_STATUS_OFFLINE,o=!0),o&&this.documentPaths&&t&&t.userId&&!t.isAnonymous){let s=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},s),{timestamp:this.timestamp})))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),this.authService.getAuthState$().pipe(H(e=>!!e),I(e=>this.docService.getDocumentPaths$().pipe(j(t=>e))),ce(e=>ae(this,null,function*(){try{if(this.documentPaths&&e){let t=yield this.authService.getIdTokenResultForUser(e,!0).catch(s=>null);if(!t)return;let{user:o}=t.claims;if(!o?.isAnonymous&&this.documentPaths?.cursor){let s=`${this.documentPaths.cursor}/${e.uid}`;this.commonDbService.setupOnDisconnect(s,{onlineStatus:y.PRESENCE_STATUS_OFFLINE,comment:"",timestamp:this.timestamp}).catch(S=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",S)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}signOutUser(e){return new Promise((t,o)=>{try{this.documentPaths&&e?this.commonDbService.getData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e.uid,skipFirestore:!0}}).then(s=>{s&&this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.uid,skipFirestore:!0},callback:()=>{t(null)},data:JSON.parse(JSON.stringify(f(g({},s?.data??{}),{timestamp:this.timestamp,onlineStatus:y.PRESENCE_STATUS_OFFLINE})))}),t(null)}).catch(s=>{this.loggingService.catch("Error in signOutUser subscription: ",s),o(s)}):t(null)}catch(s){this.loggingService.catch("Error in signOutUser:",s),o(s)}})}setInactivityTime(e){this.inactivityTime=e,this.analyticsService.trackEvent(oe.Events.Cursor.CURSOR_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime})}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in CursorService isElementInsideAllowedElements: ",t),!1}}get timestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(t){return new(t||i)(L(Ue),L(St),L(yt),L(ct),L(At),L(Te),L(_t),L(we),L(v),L(It),L(G))},i.\u0275prov=Se({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var w=class{constructor(){this.showDefault=!1,this.showAvatar=!1,this.showAudio=!1,this.showVideo=!1,this.selfCursorPointer=!1,this.onImageLoadError=()=>{},this.getGainAnimationBorderStyle=()=>{},this.getTextColor=()=>{}}};var qt=["*"],Ut=r=>({componentConfigSignal:r}),Kt=(r,i)=>({condition:r,data:i}),Xt=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-arrow-wireframe",setIfCondition:n,componentElementRef:e});function Qt(r,i){r&1&&(d(0),be(1),p())}function Zt(r,i){if(r&1&&(d(0),u(1,Qt,2,0,"ng-container",2),p()),r&2){let n=c(2);l(),a("veltDynamicTemplate",F(3,Xt,n.template,C(1,Ut,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function er(r,i){if(r&1&&(d(0),u(1,Zt,2,8,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Kt,n.conditionSignal(),C(1,Ut,n.componentConfigSignal)))}}var le=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-arrow",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Directional cursor arrow"),e.setAttribute("aria-describedby","Cursor pointer with directional arrow indicator")}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-arrow-internal"]],standalone:!1,features:[N([h]),D],ngContentSelectors:qt,decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&(ye(),u(0,er,2,6,"ng-container",0)),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var Tt=r=>({componentConfigSignal:r}),rr=(r,i)=>({condition:r,data:i}),nr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-audio-wireframe",setIfCondition:n,componentElementRef:e});function ir(r,i){if(r&1&&(d(0),k(1,"audio",3),p()),r&2){let n=c(2).ngIf;l(),a("srcObject",n.stream)("volume",n.selfCursorPointer?0:1)}}function or(r,i){if(r&1&&(d(0),u(1,ir,2,2,"ng-container",2),p()),r&2){let n=c(2);l(),a("veltDynamicTemplate",F(3,nr,n.template,C(1,Tt,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function ar(r,i){if(r&1&&(d(0),u(1,or,2,8,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,rr,n.conditionSignal(),C(1,Tt,n.componentConfigSignal)))}}var ue=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle-audio",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio huddle cursor pointer"),e.setAttribute("aria-describedby","User cursor with audio huddle controls"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-audio-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["playsinline","","autoplay","true",3,"srcObject","volume"]],template:function(t,o){t&1&&u(0,ar,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var wt=(r,i)=>({componentConfigSignal:r,user:i}),cr=(r,i)=>({condition:r,data:i}),lr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-avatar-wireframe",setIfCondition:n,componentElementRef:e});function ur(r,i){if(r&1&&(d(0),k(1,"snippyly-user-avatar",3),p()),r&2){let n=c(2).ngIf;l(),a("user",n.cursorUser)}}function mr(r,i){if(r&1&&(d(0),u(1,ur,2,1,"ng-container",2),p()),r&2){let n=c().ngIf,e=c();l(),a("veltDynamicTemplate",F(4,lr,e.template,x(1,wt,e.componentConfigSignal,n.cursorUser),e.setIfCondition.bind(e),e.elementRef))}}function dr(r,i){if(r&1&&(d(0),u(1,mr,2,9,"ng-container",1),p()),r&2){let n=i.ngIf,e=c();l(),a("veltIf",x(4,cr,e.conditionSignal(),x(1,wt,e.componentConfigSignal,n.cursorUser)))}}var me=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle-avatar",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio huddle avatar cursor pointer"),e.setAttribute("aria-describedby","User avatar in audio huddle at cursor location"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-avatar-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"user"]],template:function(t,o){t&1&&u(0,dr,2,7,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Ne],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}snippyly-user-avatar[_ngcontent-%COMP%]{position:absolute;--legacy-velt-avatar-size: var(--legacy-velt-cursor-video-size)}snippyly-user-avatar[_ngcontent-%COMP%] .s-user-avatar-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));border-radius:0;max-width:100%;max-height:100%}snippyly-user-avatar[_ngcontent-%COMP%] .s-user-avatar-container[_ngcontent-%COMP%] .s-user-avatar-initial[_ngcontent-%COMP%]:after{font-size:var(--velt-font-size-2xl)}"],changeDetection:0});let r=i;return r})();var Mt=r=>({componentConfigSignal:r}),gr=(r,i)=>({condition:r,data:i}),vr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-wireframe",setIfCondition:n,componentElementRef:e});function hr(r,i){if(r&1&&(d(0),_(1,"div",6),k(2,"velt-cursor-pointer-audio-huddle-avatar-internal",7)(3,"velt-cursor-pointer-audio-huddle-audio-internal",7),b(),p()),r&2){let n=c(4);l(2),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function fr(r,i){if(r&1&&(_(0,"div",3)(1,"div",4),u(2,hr,4,2,"ng-container",5),b()()),r&2){let n=c(2).ngIf,e=c();P("data-testid",e.componentId+"-spacing"),l(),$("background",n.cursorUser==null?null:n.cursorUser.color)("border",n.gainVolume&&n.lightenedColor?n.getGainAnimationBorderStyle():""),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(9,vr,e.template,C(7,Mt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Cr(r,i){if(r&1&&(d(0),u(1,fr,3,14,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showAudio)}}function Sr(r,i){if(r&1&&(d(0),u(1,Cr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,gr,n.conditionSignal(),C(1,Mt,n.componentConfigSignal)))}}var de=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio call cursor pointer"),e.setAttribute("aria-describedby","User cursor with audio call indicator"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-audio-huddle-spacing","s-cursor-video-spacing"],[1,"velt-cursor-pointer-audio-huddle-container","s-cursor-video-container"],[4,"veltDynamicTemplate"],[1,"velt-cursor-pointer-audio-huddle-block","s-cursor-video-block"],[3,"componentConfigSignal"]],template:function(t,o){t&1&&u(0,Sr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,ue,me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-audio-huddle-spacing[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));display:flex;justify-content:center;align-items:center;position:absolute;top:calc((.4rem + 0px) * var(--velt-base-rem-unit));left:calc((.4rem + 0px) * var(--velt-base-rem-unit));background:transparent}.velt-cursor-pointer-audio-huddle-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));box-sizing:content-box;padding:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-full);box-shadow:0 1px 4px #10101036}.velt-cursor-pointer-audio-huddle-container[_ngcontent-%COMP%] .velt-cursor-pointer-audio-huddle-block[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"],changeDetection:0});let r=i;return r})();var kt=r=>({componentConfigSignal:r}),yr=(r,i)=>({condition:r,data:i}),br=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-avatar-wireframe",setIfCondition:n,componentElementRef:e});function Ir(r,i){if(r&1){let n=tt();d(0),_(1,"img",5),rt("error",function(){qe(n);let t=c(3).ngIf;return Ke(t.onImageLoadError())}),b(),p()}if(r&2){let n=c(3).ngIf;l(),a("src",n.cursorUser==null?null:n.cursorUser.photoUrl,Qe)}}function xr(r,i){if(r&1&&(_(0,"div",3),u(1,Ir,2,1,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("background-color",n.cursorUser==null?null:n.cursorUser.color),Z("user-presence-text-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment)("velt-cursor-pointer-avatar-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(10,br,e.template,C(8,kt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Er(r,i){if(r&1&&(d(0),u(1,xr,2,15,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showAvatar)}}function Or(r,i){if(r&1&&(d(0),u(1,Er,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,yr,n.conditionSignal(),C(1,kt,n.componentConfigSignal)))}}var pe=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-avatar",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","User avatar cursor pointer"),e.setAttribute("aria-describedby","Shows user profile picture at cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-avatar-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-avatar-container","user-avatar-container"],[4,"veltDynamicTemplate"],[3,"error","src"]],template:function(t,o){t&1&&u(0,Or,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-avatar-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-avatar-size) + 0px) * var(--velt-base-rem-unit));box-shadow:0 1px 4px #10101036;transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)));padding:calc((.08rem + 0px) * var(--velt-base-rem-unit));border-radius:var(--velt-border-radius-full)}.velt-cursor-pointer-avatar-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:100%}.velt-cursor-pointer-avatar-container-comment-border[_ngcontent-%COMP%]{border-bottom-left-radius:var(--velt-border-radius-xl);border-bottom-right-radius:var(--velt-border-radius-xl);border-top-right-radius:var(--velt-border-radius-xl);margin-top:calc(var(--velt-spacing-sm) * -1)}"],changeDetection:0});let r=i;return r})();var Nt=r=>({componentConfigSignal:r}),Dr=(r,i)=>({condition:r,data:i}),Ur=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-comment-wireframe",setIfCondition:n,componentElementRef:e});function Tr(r,i){if(r&1&&(d(0),Ie(1),Ee(2,"translate"),p()),r&2){let n=c(3).ngIf;l(),xe(" ",Oe(2,1,n.cursorUser==null?null:n.cursorUser.comment)," ")}}function wr(r,i){if(r&1&&(_(0,"p",3),u(1,Tr,3,3,"ng-container",4),b()),r&2){let n=c(3);P("data-testid",n.componentId),l(),a("veltDynamicTemplate",F(4,Ur,n.template,C(2,Nt,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function Mr(r,i){if(r&1&&(d(0),u(1,wr,2,9,"p",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.cursorUser==null?null:n.cursorUser.comment)}}function kr(r,i){if(r&1&&(d(0),u(1,Mr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Dr,n.conditionSignal(),C(1,Nt,n.componentConfigSignal)))}}var ge=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default-comment",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Cursor pointer with comment indicator"),e.setAttribute("aria-describedby","Shows comment activity at cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-comment-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-default-comment-container user-presence-comment",4,"ngIf"],[1,"velt-cursor-pointer-default-comment-container","user-presence-comment"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&u(0,kr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var Ft=r=>({componentConfigSignal:r}),Fr=(r,i)=>({condition:r,data:i}),Rr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-name-wireframe",setIfCondition:n,componentElementRef:e});function Lr(r,i){if(r&1&&(d(0),Ie(1),Ee(2,"translate"),p()),r&2){let n,e=c(3).ngIf;l(),xe(" ",Oe(2,1,(e.cursorUser==null?null:e.cursorUser.name)||(!(e.cursorUser==null||e.cursorUser.email==null||(n=e.cursorUser.email.split("@"))==null)&&n.length?e.cursorUser==null||e.cursorUser.email==null?null:e.cursorUser.email.split("@")[0]:e.cursorUser==null?null:e.cursorUser.email))," ")}}function Br(r,i){if(r&1&&(_(0,"p",3),u(1,Lr,3,3,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("color",n.getTextColor(n.cursorUser==null?null:n.cursorUser.color)),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(6,Rr,e.template,C(4,Ft,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function jr(r,i){if(r&1&&(d(0),u(1,Br,2,11,"p",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",(n.cursorUser==null?null:n.cursorUser.name)||(n.cursorUser==null?null:n.cursorUser.email))}}function Hr(r,i){if(r&1&&(d(0),u(1,jr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Fr,n.conditionSignal(),C(1,Ft,n.componentConfigSignal)))}}var ve=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default-name",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Cursor pointer with user name"),e.setAttribute("aria-describedby","Shows user name next to cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-name-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-default-name-container user-presence-name",3,"color",4,"ngIf"],[1,"velt-cursor-pointer-default-name-container","user-presence-name"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&u(0,Hr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-default-name-container[_ngcontent-%COMP%]{margin:0;font-size:var(--velt-font-size-xs);color:#fff}"],changeDetection:0});let r=i;return r})();var Rt=r=>({componentConfigSignal:r}),$r=(r,i)=>({condition:r,data:i}),Vr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-wireframe",setIfCondition:n,componentElementRef:e});function Wr(r,i){if(r&1&&(d(0),k(1,"velt-cursor-pointer-default-name-internal",7)(2,"velt-cursor-pointer-default-comment-internal",7),p()),r&2){let n=c(5);l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function Gr(r,i){if(r&1&&(_(0,"div",5),u(1,Wr,3,2,"ng-container",6),b()),r&2){let n=c(3).ngIf,e=c();$("background-color",n.cursorUser==null?null:n.cursorUser.color),Z("user-presence-text-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment)("velt-cursor-pointer-default-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(10,Vr,e.template,C(8,Rt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Jr(r,i){r&1&&(_(0,"div",8),k(1,"velt-skeleton-loader-internal",9),b())}function Yr(r,i){if(r&1&&u(0,Gr,2,15,"div",4)(1,Jr,2,0,"ng-template",null,0,it),r&2){let n=nt(2),e=c(2).ngIf;a("ngIf",(e.cursorUser==null?null:e.cursorUser.name)||(e.cursorUser==null?null:e.cursorUser.email)||(e.cursorUser==null?null:e.cursorUser.comment))("ngIfElse",n)}}function qr(r,i){if(r&1&&(d(0),u(1,Yr,3,2,"ng-template",3),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showDefault)}}function Kr(r,i){if(r&1&&(d(0),u(1,qr,2,1,"ng-container",2),p()),r&2){let n=c();l(),a("veltIf",x(3,$r,n.conditionSignal(),C(1,Rt,n.componentConfigSignal)))}}var he=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Default cursor pointer"),e.setAttribute("aria-describedby","User cursor location indicator")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[["loadingTemplateRef",""],[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],["class","velt-cursor-pointer-default-container user-presence-text-container",3,"backgroundColor","user-presence-text-container-comment-border","velt-cursor-pointer-default-container-comment-border",4,"ngIf","ngIfElse"],[1,"velt-cursor-pointer-default-container","user-presence-text-container"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"],[1,"velt-cursor-pointer-default-container-loading","user-presence-text-container-loading"],["height","24px","width","80px","borderRadius","24px"]],template:function(t,o){t&1&&u(0,Kr,2,6,"ng-container",1),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,ke,ge,ve],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex;transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)))}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-default-container[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm);box-shadow:0 1px 4px #10101036;border-radius:var(--velt-border-radius-md);filter:brightness(110%) saturate(110%)}.velt-cursor-pointer-default-container-comment-border[_ngcontent-%COMP%]{border-bottom-left-radius:var(--velt-border-radius-xl);border-bottom-right-radius:var(--velt-border-radius-xl);border-top-right-radius:var(--velt-border-radius-xl);margin-top:calc(var(--velt-spacing-sm) * -1)}.velt-cursor-pointer-default-container-loading[_ngcontent-%COMP%]{transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)))}"],changeDetection:0});let r=i;return r})();var Lt=r=>({componentConfigSignal:r}),Qr=(r,i)=>({condition:r,data:i}),Zr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-video-huddle-wireframe",setIfCondition:n,componentElementRef:e});function en(r,i){if(r&1&&(d(0),_(1,"div",6),k(2,"video",7),b(),p()),r&2){let n=c(3).ngIf;l(2),Z("flip",n.selfCursorPointer),a("srcObject",n.stream)("volume",n.selfCursorPointer?0:1)}}function tn(r,i){if(r&1&&(_(0,"div",3)(1,"div",4),u(2,en,3,4,"ng-container",5),b()()),r&2){let n=c(2).ngIf,e=c();P("data-testid",e.componentId+"-spacing"),l(),$("background",n.cursorUser==null?null:n.cursorUser.color)("border",n.gainVolume&&n.lightenedColor?n.getGainAnimationBorderStyle():""),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(9,Zr,e.template,C(7,Lt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function rn(r,i){if(r&1&&(d(0),u(1,tn,3,14,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showVideo)}}function nn(r,i){if(r&1&&(d(0),u(1,rn,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Qr,n.conditionSignal(),C(1,Lt,n.componentConfigSignal)))}}var fe=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-video-huddle",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Video call cursor pointer"),e.setAttribute("aria-describedby","User cursor with video call indicator"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-video-huddle-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-video-huddle-spacing","s-cursor-video-spacing"],[1,"velt-cursor-pointer-video-huddle-container","s-cursor-video-container"],[4,"veltDynamicTemplate"],[1,"velt-cursor-pointer-video-huddle-block","s-cursor-video-block"],["playsinline","","autoplay","true",3,"srcObject","volume"]],template:function(t,o){t&1&&u(0,nn,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-video-huddle-spacing[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));display:flex;justify-content:center;align-items:center;position:absolute;top:calc((.4rem + 0px) * var(--velt-base-rem-unit));left:calc((.4rem + 0px) * var(--velt-base-rem-unit));background:transparent}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));box-sizing:content-box;padding:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-full);box-shadow:0 1px 4px #10101036}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%] .velt-cursor-pointer-video-huddle-block[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:var(--velt-border-radius-full);object-fit:cover}"],changeDetection:0});let r=i;return r})();var an=["*"],Bt=r=>({componentConfigSignal:r}),sn=(r,i)=>({condition:r,data:i}),cn=(r,i)=>({template:r,context:i,componentName:"velt-cursor-pointer-wireframe"});function ln(r,i){if(r&1&&(d(0),_(1,"velt-cursor-pointer-arrow-internal",5),be(2),b(),k(3,"velt-cursor-pointer-default-internal",5)(4,"velt-cursor-pointer-avatar-internal",5)(5,"velt-cursor-pointer-audio-huddle-internal",5)(6,"velt-cursor-pointer-video-huddle-internal",5),p()),r&2){let n=c(4);l(),a("componentConfigSignal",n.componentConfigSignal),l(2),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function un(r,i){if(r&1&&(_(0,"div",3),u(1,ln,7,5,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("top",n.cursorUser==null||n.cursorUser.position==null?null:n.cursorUser.position.top,"px")("left",n.cursorUser==null||n.cursorUser.position==null?null:n.cursorUser.position.left,"px"),Z("no-transition",n.selfCursorPointer),l(),a("veltDynamicTemplate",x(9,cn,n.template,C(7,Bt,e.componentConfigSignal)))}}function mn(r,i){if(r&1&&(d(0),u(1,un,2,12,"div",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.cursorUser==null?null:n.cursorUser.position)}}function dn(r,i){if(r&1&&(d(0),u(1,mn,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,sn,n.conditionSignal(),C(1,Bt,n.componentConfigSignal)))}}var Ce=(()=>{let i=class i extends Ot{set cursorUser(e){this.componentConfigSignal.update(t=>(t=f(g({},t),{cursorUser:e}),t)),e?.color&&this.componentConfigSignal.update(t=>(t=f(g({},t),{lightenedColor:ht(e?.color,80)}),t))}get stream(){return this._stream}set stream(e){this._stream=e,e&&this.startGainAnimation(e),this.serviceBook.get(K)?.updateHuddleCursorAvailableByAttendeeId(this.componentConfigSignal().cursorUser?.userSnippylyId,!!this.stream),this.updatePointerStates()}constructor(e,t,o,s,S){super(o,s),this.serviceBook=e,this.loggingService=t,this.elementRef=o,this.themeService=s,this.wireframeService=S,this.selfCursorPointer=!1,this.avatarMode=!1,this.showInitial=!1,this.veltElement=!0,this.componentConfigSignal=_e({template:this.template,variant:this.variant,selfCursorPointer:this.selfCursorPointer||!1,showDefault:!1,showAvatar:!1,showAudio:!1,showVideo:!1,gainVolume:void 0,lightenedColor:void 0,onImageLoadError:this.onImageLoadError.bind(this),getGainAnimationBorderStyle:this.getGainAnimationBorderStyle.bind(this),getTextColor:this.getTextColor.bind(this)}),this.subscriptions=[],this.componentId="velt-cursor-pointer"}ngOnInit(){try{let e="velt-cursor-pointer-wireframe";this.setupA11yAttributes(),this.updatePointerStates(),this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let o=document.createElement(t.tagName);o.innerHTML=t.innerHTML,this.componentConfigSignal.update(s=>f(g({},s),{template:o}))}}))}catch(e){this.loggingService.catch("Error in CursorPointerComponent ngOnInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Live cursor pointer indicator"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true")}catch(e){this.loggingService.catch("Error in CursorPointerComponent setupA11yAttributes:",e)}}ngAfterViewInit(){}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(o=>(o=f(g({},o),{[t]:e[t].currentValue}),o))}),(e.avatarMode||e.huddleState)&&this.updatePointerStates()}catch(t){this.loggingService.catch("Error in CursorPointerComponent ngOnChanges: ",t)}}startGainAnimation(e){try{let t=new AudioContext,o=t.createMediaStreamSource(e),s=t.createAnalyser();o.connect(s);let S=new Uint8Array(s.frequencyBinCount),M=()=>{s.getByteFrequencyData(S);let re=S.reduce((ne,Le)=>ne+Le,0)/S.length;this.componentConfigSignal.update(ne=>(ne=f(g({},ne),{gainVolume:re}),ne)),this.gainAnimationId=requestAnimationFrame(M)};this.gainAnimationId=requestAnimationFrame(M)}catch(t){this.loggingService.catch("Error in CursorPointerComponent startGainAnimation: ",t)}}stopGainAnimation(){try{this.gainAnimationId!==void 0&&cancelAnimationFrame(this.gainAnimationId),this.componentConfigSignal.update(e=>(e=f(g({},e),{gainVolume:void 0}),e))}catch(e){this.loggingService.catch("Error in CursorPointerComponent stopGainAnimation: ",e)}}getOutlineSizeByGainAmount(){try{if(this.componentConfigSignal().gainVolume!==void 0)return vt(0,5,Math.min(1,this.componentConfigSignal().gainVolume/15))}catch(e){this.loggingService.catch("Error in CursorPointerComponent getOutlineSizeByGainAmount: ",e)}return 0}getGainAnimationBorderStyle(){return this.getOutlineSizeByGainAmount()+"px solid "+(this.componentConfigSignal().lightenedColor||"white")+" !important"}onImageLoadError(){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.showInitial=!0,this.updatePointerStates()}catch(e){this.loggingService.catch("Error in CursorPointerComponent onImageLoadError: ",e)}}getTextColor(e){try{return e?ft(e):"#141416"}catch(t){this.loggingService.catch("Error in CursorPointerComponent getTextColor: ",t)}return"#141416"}ngOnDestroy(){try{this.stopGainAnimation(),this.stream=void 0,super.ngOnDestroy(),this.subscriptions.forEach(e=>{e?.unsubscribe()})}catch(e){this.loggingService.catch("Error in CursorPointerComponent ngOnDestroy: ",e)}}updatePointerStates(){try{let e=!!this.stream&&!!this.huddleState?.audioState&&!this.huddleState?.videoState,t=!!this.stream&&!!this.huddleState?.videoState,o=!e&&!t&&!!this.avatarMode&&!this.showInitial,s=!e&&!t&&(!this.avatarMode||!!this.avatarMode&&this.showInitial);(s!==this.componentConfigSignal().showDefault||o!==this.componentConfigSignal().showAvatar||e!==this.componentConfigSignal().showAudio||t!==this.componentConfigSignal().showVideo)&&this.componentConfigSignal.update(S=>(S=g({},S),S.showDefault=s,S.showAvatar=o,S.showAudio=e,S.showVideo=t,S))}catch(e){this.loggingService.catch("Error in CursorPointerComponent updatePointerStates: ",e)}}};i.\u0275fac=function(t){return new(t||i)(m(G),m(v),m(E),m(Et),m(xt))},i.\u0275cmp=O({type:i,selectors:[["snippyly-cursor-pointer"]],hostVars:1,hostBindings:function(t,o){t&2&&P("data-velt-element",o.veltElement)},inputs:{cursorUser:"cursorUser",selfCursorPointer:"selfCursorPointer",avatarMode:"avatarMode",huddleState:"huddleState",variant:"variant",template:"template",stream:"stream"},standalone:!1,features:[D,Xe],ngContentSelectors:an,decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-container user-presence-pointer",3,"no-transition","top","left",4,"ngIf"],[1,"velt-cursor-pointer-container","user-presence-pointer"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"]],template:function(t,o){t&1&&(ye(),u(0,dn,2,6,"ng-container",0)),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,le,de,pe,he,fe],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events: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-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--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-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--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;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}*[_ngcontent-%COMP%]:empty{display:revert}.velt-cursor-pointer-container[_ngcontent-%COMP%]{position:fixed;z-index:var(--velt-cursor-z-index);-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;filter:brightness(110%) saturate(110%);transition:top linear 75ms,left linear 75ms}.velt-cursor-pointer-container.no-transition[_ngcontent-%COMP%]{transition:none}"],changeDetection:0});let r=i;return r})();function gn(r,i){if(r&1&&(_(0,"snippyly-cursor-pointer",5)(1,"slot",6),$e(),_(2,"svg",7)(3,"g",8),k(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),k(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),r&2){let n=c().$implicit,e=c(2).ngIf,t=c();a("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),l(4),P("fill",n.color),l(),P("fill",n.color)}}function vn(r,i){if(r&1&&(d(0),u(1,gn,15,6,"snippyly-cursor-pointer",4),p()),r&2){let n=i.$implicit;l(),a("ngIf",n==null?null:n.position)}}function hn(r,i){if(r&1&&(_(0,"snippyly-cursor-pointer",19)(1,"slot",6),$e(),_(2,"svg",7)(3,"g",8),k(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),k(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),r&2){let n=c(2).ngIf,e=c();a("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),l(4),P("fill",n.currentCursorUser.color),l(),P("fill",n.currentCursorUser.color)}}function fn(r,i){if(r&1&&u(0,vn,2,1,"ng-container",2)(1,hn,15,7,"snippyly-cursor-pointer",3),r&2){let n=c().ngIf,e=c();a("ngForOf",n.cursorUsers)("ngForTrackBy",e.trackById),l(),a("ngIf",n.huddleJoined&&n.huddleOnCursorMode&&n.currentCursorUser)}}function Cn(r,i){if(r&1&&(d(0),u(1,fn,2,3,"ng-template",1),p()),r&2){let n=i.ngIf;l(),a("ngIf",n.isFirstComponent&&!(n.user!=null&&n.user.isAnonymous))}}var Fe=(()=>{let i=class i{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,o,s,S,M,re){this.analyticsService=e,this.authService=t,this.cursorService=o,this.domService=s,this.elementRef=S,this.serviceBook=M,this.loggingService=re,this.avatarMode=!1,this.onCursorUsersChanged=new Ve,this.onCursorUserChange=new Ve,this.subscriptions=[],this.constants=y,this.showInitials={},this.componentConfigSignal=_e({isFirstComponent:!1,user:void 0,cursorUsers:[],huddleOnCursorModeByAttendeeId:{},attendeesByUserId:{},remoteStreamsByUserId:{},huddleOnCursorMode:!1,huddleJoined:!1,currentCursorUser:new Pe,localStream:void 0}),this.veltId=pt(),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{this.subscriptions.push(this.domService.subscribeInjectCustomCss(this.elementRef));let e=document.querySelector(y.TAGS.SNIPPYLY_CURSOR),t=document.querySelector(y.TAGS.VELT_CURSOR);t?this.veltId===t?.getAttribute(y.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(o=>(o=f(g({},o),{isFirstComponent:!0}),o)),this.initComponent()):this.veltId===e?.getAttribute(y.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(o=>(o=f(g({},o),{isFirstComponent:!0}),o)),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=f(g({},t),{user:e}),t)),this.componentConfigSignal().user&&this.setCursorInstalledInAnalytics()},e=>{this.loggingService.catch("Error in CursorComponent getUser$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleJoined$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleJoined:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleJoined$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleOnCursorMode$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleOnCursorMode:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleOnCursorMode$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.localStream$??ie)).subscribe(e=>{e?this.componentConfigSignal.update(t=>(t=f(g({},t),{localStream:e}),t)):this.componentConfigSignal.update(t=>(t=f(g({},t),{localStream:void 0}),t))},e=>{this.loggingService.catch("Error in CursorComponent localStream$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getRemoteStreamsByUserId$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{remoteStreamsByUserId:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getRemoteStreamsByUserId$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleAttendees$()??ie)).subscribe(e=>{let t={};e?t=e.reduce((o,s)=>(o[s.userSnippylyId]=s,o),{}):t={},this.componentConfigSignal.update(o=>(o=f(g({},o),{attendeesByUserId:t}),o))},e=>{this.loggingService.catch("Error in CursorComponent getAttendees$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleOnCursorModeByAttendeeId$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleOnCursorModeByAttendeeId:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleOnCursorModeByAttendeeId$ subscription: ",e)})),this.subscriptions.push(this.domService.onWindowPointerMove$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{currentCursorUser:f(g({},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(H(e=>!!e)).subscribe(e=>{this.loggingService.log(e),e&&(this.componentConfigSignal.update(t=>(t=f(g({},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(H(e=>!!e)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{currentCursorUser:f(g({},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(q.CURSOR)}catch(e){this.loggingService.catch("Error in CursorComponent setCursorInstalledInAnalytics: ",e)}}};i.\u0275fac=function(t){return new(t||i)(m(Ue),m(we),m(ee),m(Te),m(E),m(G),m(v))},i.\u0275cmp=O({type:i,selectors:[["app-cursor"]],hostVars:2,hostBindings:function(t,o){t&2&&P("data-velt-id",o.veltId)("data-velt-element",o.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,o){t&1&&u(0,Cn,2,1,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[ot,A,Ce],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}body.velt-pin-dragging iframe{pointer-events: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}
1
+ import{D as Pt,F as U,G as T}from"./chunk-FXBACOQJ.js";import{a as xt}from"./chunk-JPCBTXDG.js";import{b as Me,c as ke,d as Ne}from"./chunk-5YU74OX2.js";import{a as Dt}from"./chunk-24U4LEAT.js";import{a as At}from"./chunk-NUVYBRLN.js";import{a as st}from"./chunk-F46FHE6O.js";import{Fa as h,Ga as Et,Ha as R,Ia as Ot}from"./chunk-SF2KIWKT.js";import{$ as Se,$g as ft,Ab as ye,Ai as _t,Bb as be,Ca as Qe,Ch as oe,E as H,Ed as ct,Ee as y,Fa as l,Fc as ot,Fi as yt,G as je,Ga as Ve,Gc as A,Gi as bt,Ib as nt,Ih as Ae,J as He,Jb as $,Jh as De,Kb as Z,Kh as Ct,L as Ge,Le as mt,M as ze,Md as lt,Nb as Ie,Nd as ut,Nh as K,Pa as m,Pb as xe,Pc as at,Pi as It,T as I,Ta as Ze,Ua as O,Uf as dt,Va as et,Vf as pt,W as ce,We as Pe,Wf as gt,X as Je,Ya as D,Zg as vt,_a as u,_b as N,_g as ht,a as g,aa as Ye,b as f,bc as C,ca as L,cc as x,db as P,ec as F,g as ae,ha as qe,ia as Ke,ii as G,ja as $e,ji as Ue,kc as Ee,ki as v,l as se,lb as a,lc as Oe,li as St,mb as _,nb as b,ob as k,oe as q,p as ie,pc as it,qa as _e,r as B,sb as d,si as Te,tb as p,ti as we,ua as Xe,v as j,vb as tt,wa as E,xb as rt,zb as c}from"./chunk-CRZGZZVQ.js";var ee=(()=>{let i=class i{constructor(e,t,o,s,S,M,re,ne,Le,$t,Vt){this.analyticsService=e,this.configService=t,this.docService=o,this.afAuth=s,this.iamService=S,this.domService=M,this.databaseService=re,this.authService=ne,this.loggingService=Le,this.commonDbService=$t,this.serviceBook=Vt,this.cursorUser$=new se(new Pe),this.documentPaths=null,this.inactivityTime=120*1e3,this.allowedElementIds$=new se([]),this.cursorTagAvailable$=new se(!1),this.cursorTagAvailable=!1,this.cursorUsers$=new se([]),this.loggingService.log("%c[WB] Creating CLASS: CursorService","color: blue;");try{this.serviceBook.set(Ae,this),this.checkCursorTagAvailable(),this.databaseService.getDb().pipe(H(W=>!!W),I(W=>this.cursorTagAvailable$.pipe(H(Y=>!!Y),He(1),j(()=>W))),He(1)).subscribe(W=>{W&&this.cursorTagAvailable&&(this.getPresenceUser(),this.getDocumentPaths(),this.getLocation(),this.updateOnDatabaseDisconnect().subscribe(()=>{},Y=>{this.loggingService.catch("Error in CursorService constructor updateOnDatabaseDisconnect: ",Y)}),this.addMouseMoveListener(),this.addScreenSizeChangeListener(),this.updateOnAllowedFeatureListChange())},W=>{this.loggingService.catch("Error in CursorService constructor getDb: ",W)}),this.cursorUsers$.pipe(ze()).subscribe(([W,Y])=>{sessionStorage.getItem(y.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED)||Y?.length>1&&W.length!==Y.length&&(this.analyticsService.trackEvent(oe.Events.Cursor.CURSOR_MULTIPLE_USERS_DETECTED,{totalUsers:Y.length,cursorSnippylyUserIds:Y.map(Be=>Be.userSnippylyId),cursorClientUserIds:Y.map(Be=>Be.userId)}),sessionStorage.setItem(y.SESSION_STORAGE.VELT_CURSOR_MULTIPLE_USERS_DETECTED,"true"))}),this.authService.addPreSignOutFuction("cursor-signout",this.signOutUser.bind(this))}catch(W){this.loggingService.catch("Error in CursorService constructor: ",W)}}checkCursorTagAvailable(){this.loggingService.log("%c[WB] Calling FUNCTION: checkCursorTagAvailable","color: green;");try{this.cursorTagAvailable=!!document.querySelector(y.TAGS.VELT_CURSOR)||!!document.querySelector(y.TAGS.SNIPPYLY_CURSOR),this.cursorTagAvailable$.next(this.cursorTagAvailable)}catch(e){this.loggingService.catch("Error in CursorService checkCursorTagAvailable: ",e)}}addScreenSizeChangeListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addScreenSizeChangeListener","color: green;");try{this.docService.getDocumentPaths$().pipe(H(e=>!!e),I(e=>this.domService.getCurrentWindowSize$("CursorService addScreenSizeChangeListener").pipe(H(t=>!!t)))).subscribe(e=>{this.setCurrentCursorUserScreenSize(e)},e=>{this.loggingService.catch("Error in addScreenSizeChangeListener getCurrentWindowSize: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addScreenSizeChangeListener: ",e)}}addMouseMoveListener(){this.loggingService.log("%c[WB] Calling FUNCTION: addMouseMoveListener","color: green;");try{this.domService.onWindowPointerMove$().pipe(Je(50)).subscribe(e=>{e&&this.setCurrentCursorUserPosition(e.pageX,e.pageY,this.domService.getTargetElementForCursorPosition(e,!0,!1,!1,void 0,!1))},e=>{this.loggingService.catch("Error in addMouseMoveListener getCurrentMousePosition: ",e)})}catch(e){this.loggingService.catch("Error in CursorService addMouseMoveListener: ",e)}}getDocumentPaths(){this.loggingService.log("%c[WB] Calling FUNCTION: getDocumentPaths","color: green;");try{this.docService.getDocumentPaths$().pipe(ce(e=>{this.documentPaths=e}),ze(),ce(([e,t])=>{e&&this.updateUserStatusOnDocumentChange(y.PRESENCE_STATUS_OFFLINE,e),t&&this.updateUserStatusOnDocumentChange(y.PRESENCE_STATUS_ONLINE,t)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getDocumentPaths subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getDocumentPaths: ",e)}}getLocation(){try{this.docService.getLocation$().pipe(ce(e=>{this.updateUserOnLocationChange(e)})).subscribe(()=>{},e=>{this.loggingService.catch("Error in getLocation subscription: ",e)})}catch(e){this.loggingService.catch("Error in CursorService getLocation: ",e)}}getCursorUser(){return this.loggingService.log("%c[WB] Calling FUNCTION: getCursorUser","color: green;"),this.cursorUser$.asObservable()}getPresenceUser(){this.loggingService.log("%c[WB] Calling FUNCTION: getPresenceUser","color: green;"),this.serviceBook.observe(Ct).pipe(H(e=>!!e),I(e=>e.getPresenceUser()),H(e=>!!e),je(e=>B(e.code))).subscribe(e=>{this.setCursorUser(e)},e=>{this.loggingService.catch("Error in getPresenceUser: ",e)})}getLiveCursorsOnCurrentDocument(){return this.loggingService.log("%c[WB] Calling FUNCTION: getLiveCursorsOnCurrentDocument","color: green;"),this.authService.getAuthState$().pipe(H(e=>!!e),I(e=>this.isFeatureAllowed({firebaseUser:e,users:[],filteredUsers:[]})),I(e=>e.featureAllowed?this.iamService.isUserAllowed$().pipe(j(t=>(e.featureAllowed=t,e))):B(e)),I(e=>e.featureAllowed?this.authService.isPlanExpired$().pipe(j(t=>(e.featureAllowed=!t,e))):B(e)),I(e=>!e.featureAllowed||e?.user?.isAnonymous?B([]):B(e).pipe(I(t=>this.docService.getDocumentPaths$().pipe(j(o=>(this.documentPaths=o,t.documentPaths=o,t)))),I(t=>this.getDataFromDocumentId().pipe(j(o=>(t.users=o||[],g({},t))))),j(t=>(t.filteredUsers=this.filterOnlineUsers(t.users,t.firebaseUser),t)),I(t=>t?.filteredUsers?.length?this.domService.getCurrentWindowSize$("CursorService getLiveCursorsOnCurrentDocument").pipe(j(()=>t)):B(t)),j(t=>(t?.filteredUsers?.forEach(o=>{this.calculateCursorUserPosition(o)}),t)),I(t=>t?.filteredUsers?B(t?.filteredUsers||[]):B([])))))}isFeatureAllowed(e){return this.configService.getConfig$().pipe(H(t=>!!t),j(t=>f(g({},e),{config:t})),I(t=>this.authService.getUser$().pipe(j(o=>f(g({},t),{user:o})))),I(t=>dt(t.config,t.user,q.CURSOR)?B(f(g({},t),{featureAllowed:!0})):(this.loggingService.warn("Cursor feature is not allowed."),B(f(g({},t),{featureAllowed:!1})))),Ge((t,o)=>t?.featureAllowed===o?.featureAllowed))}getDataFromDocumentId(e){return this.databaseService.getDb().pipe(H(t=>!!t),I(t=>{if(this.configService?.getApiKey()&&this.documentPaths?.cursor){let o=new Date(Date.now()-864e5).getTime();return this.commonDbService.dbListener({feature:"allCursors",properties:{documentId:e??this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,skipFirestore:!0,useQuery:!0,rtdbQuery:[lt("timestamp"),ut(o)]}}).pipe(je(s=>(this.loggingService.catch("Error in CursorService getDataFromDocumentId: ",s),B(null))),j(s=>s?.data),j(s=>{let S=[];return s&&(S=Object.values(s).filter(M=>typeof M=="object")),S}))}else return B([])}))}calculateCursorUserPosition(e){try{if(e?.targetElement){let t=this.domService.getXPath(e.targetElement?.xpath);if(t){let o=t.iterateNext();if(o&&this.isElementInsideAllowedElements(o)){let s=o.getBoundingClientRect();s&&s.width&&s.height&&(e.position={top:s.top+s.height*e.targetElement.topPercentage/100,left:s.left+s.width*e.targetElement.leftPercentage/100})}}}}catch(t){this.loggingService.catch("Error in calculateCursorUserPosition:",t)}}filterOnlineUsers(e,t){try{let s=e.slice().filter(M=>{let re=gt(M.timestamp);return M.userSnippylyId&&M.onlineStatus===y.PRESENCE_STATUS_ONLINE&&re<this.inactivityTime});this.cursorUsers$.next(s),s=s.filter(M=>M?.userSnippylyId!==t?.uid);let S=this.docService.getLocation();return S&&S.locationId?s=s.filter(M=>M.locationId===S.locationId):s=s.filter(M=>!M.locationId),s}catch(o){return this.loggingService.catch("Error in filterOnlineUsers:",o),[]}}setCursorUser(e){this.loggingService.log("%c[WB] Calling FUNCTION: setCursorUser","color: green;");try{let t=this.cursorUser$.value;t.userId=e?.userId,t.name=e?.name,t.email=e?.email,t.photoUrl=e?.photoUrl,t.comment="",this.authService.isFeatureAllowed(q.PRESENCE)&&(t.onlineStatus=e?.onlineStatus),t.userSnippylyId=e?.userSnippylyId,t.color=e?.color,t.textColor=e?.textColor,t.initial=e?.initial,t.timestamp=this.timestamp,t.type=e?.type,t.isReadOnly=e?.isReadOnly,t.isAnonymous=e?.isAnonymous;let o=this.domService.getCurrentWindowSizeValue();t.screenWidth=o?.screenWidth,t.screenHeight=o?.screenHeight,t.screenScrollHeight=o?.screenScrollHeight,this.updateCurrentCursorUser(t)}catch(t){this.loggingService.catch("Error in setCursorUser:",t)}}setCurrentCursorUserPosition(e,t,o){try{let s=this.cursorUser$.value;s?.onlineStatus===y.PRESENCE_STATUS_ONLINE&&(s.positionX=e,s.positionY=t,o?s.targetElement=o:s.targetElement=null,this.updateCurrentCursorUser(s))}catch(s){this.loggingService.catch("Error in setCurrentCursorUserPosition:",s)}}setCurrentCursorUserScreenSize(e){try{if(e.screenWidth!==0&&e.screenHeight!==0){let t=this.cursorUser$.value;t?.onlineStatus===y.PRESENCE_STATUS_ONLINE&&(t.screenWidth=e.screenWidth,t.screenHeight=e.screenHeight,t.screenScrollHeight=e.screenScrollHeight,this.updateCurrentCursorUser(t))}}catch(t){this.loggingService.catch("Error in setCurrentCursorUserScreenSize:",t)}}updateCurrentCursorUser(e){return ae(this,null,function*(){try{if(this.documentPaths&&e&&e.userId&&this.authService.isFeatureAllowed(q.CURSOR)){if(!e.isAnonymous){e.pageInfo=new mt;let t=JSON.parse(JSON.stringify(e));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},t),{timestamp:this.timestamp})))})}this.cursorUser$.next(e)}}catch(t){this.loggingService.catch("Error in updateCurrentCursorUser:",t)}})}updateUserStatusOnDocumentChange(e,t){return ae(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserStatusOnDocumentChange","color: green;");try{let o=this.cursorUser$.value;if(o.onlineStatus=e,t&&o&&o.userId&&!o.isAnonymous&&this.authService.isFeatureAllowed(q.CURSOR)){let s=JSON.parse(JSON.stringify(o));this.commonDbService.updateData({feature:"cursor",properties:{documentId:t?.documentId??"",organizationId:t?.organizationId??"",id:o.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},s),{timestamp:this.timestamp})))})}}catch(o){this.loggingService.catch("Error in updateUserStatusOnDocumentChange:",o)}})}updateUserOnLocationChange(e){return ae(this,null,function*(){this.loggingService.log("%c[WB] Calling FUNCTION: updateUserOnLocationChange","color: green;");try{let t=this.cursorUser$.value;if(t.location=e?e.location:null,t.locationId=e?e?.locationId:null,this.documentPaths&&t&&t.userId&&!t.isAnonymous&&this.authService.isFeatureAllowed(q.CURSOR)){let o=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},o),{timestamp:this.timestamp})))})}}catch(t){this.loggingService.catch("Error in updateUserOnLocationChange:",t)}})}updateOnAllowedFeatureListChange(){try{this.configService.getConfig$().subscribe(e=>{if(e&&e.featureAllowList?.length){let t=this.cursorUser$.value,o=!1;if(e.featureAllowList.includes(q.CURSOR)?t?.onlineStatus!==y.PRESENCE_STATUS_ONLINE&&(t.onlineStatus=y.PRESENCE_STATUS_ONLINE,o=!0):t?.onlineStatus!==y.PRESENCE_STATUS_OFFLINE&&(t.onlineStatus=y.PRESENCE_STATUS_OFFLINE,o=!0),o&&this.documentPaths&&t&&t.userId&&!t.isAnonymous){let s=JSON.parse(JSON.stringify(t));this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:t.userSnippylyId,skipFirestore:!0},data:JSON.parse(JSON.stringify(f(g({},s),{timestamp:this.timestamp})))})}}})}catch(e){this.loggingService.catch("Error in updateOnAllowedFeatureListChange:",e)}}updateOnDatabaseDisconnect(){return this.loggingService.log("%c[WB] Calling FUNCTION: updateOnDatabaseDisconnect","color: green;"),this.authService.getAuthState$().pipe(H(e=>!!e),I(e=>this.docService.getDocumentPaths$().pipe(j(t=>e))),ce(e=>ae(this,null,function*(){try{if(this.documentPaths&&e){let t=yield this.authService.getIdTokenResultForUser(e,!0).catch(s=>null);if(!t)return;let{user:o}=t.claims;if(!o?.isAnonymous&&this.documentPaths?.cursor){let s=`${this.documentPaths.cursor}/${e.uid}`;this.commonDbService.setupOnDisconnect(s,{onlineStatus:y.PRESENCE_STATUS_OFFLINE,comment:"",timestamp:this.timestamp}).catch(S=>{this.loggingService.catch("Error in updateOnDatabaseDisconnect:",S)})}}}catch(t){this.loggingService.catch("Error in updateOnDatabaseDisconnect:",t)}})))}signOutUser(e){return new Promise((t,o)=>{try{this.documentPaths&&e?this.commonDbService.getData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId,organizationId:this.documentPaths?.organizationId,id:e.uid,skipFirestore:!0}}).then(s=>{s&&this.commonDbService.updateData({feature:"cursor",properties:{documentId:this.documentPaths?.documentId??"",organizationId:this.documentPaths?.organizationId??"",id:e.uid,skipFirestore:!0},callback:()=>{t(null)},data:JSON.parse(JSON.stringify(f(g({},s?.data??{}),{timestamp:this.timestamp,onlineStatus:y.PRESENCE_STATUS_OFFLINE})))}),t(null)}).catch(s=>{this.loggingService.catch("Error in signOutUser subscription: ",s),o(s)}):t(null)}catch(s){this.loggingService.catch("Error in signOutUser:",s),o(s)}})}setInactivityTime(e){this.inactivityTime=e,this.analyticsService.trackEvent(oe.Events.Cursor.CURSOR_SET_CUSTOM_INACTIVITY_TIMER,{inactivityTime:this.inactivityTime})}setAllowedElementIds(e){this.allowedElementIds$.next(e||[])}getAllowedElementIds(){return this.allowedElementIds$.asObservable()}isElementInsideAllowedElements(e){try{return this.domService.isElementInsideListedElementIds(e,this.allowedElementIds$.value)}catch(t){return this.loggingService.catch("Error in CursorService isElementInsideAllowedElements: ",t),!1}}get timestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(t){return new(t||i)(L(Ue),L(St),L(yt),L(ct),L(At),L(Te),L(_t),L(we),L(v),L(It),L(G))},i.\u0275prov=Se({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var w=class{constructor(){this.showDefault=!1,this.showAvatar=!1,this.showAudio=!1,this.showVideo=!1,this.selfCursorPointer=!1,this.onImageLoadError=()=>{},this.getGainAnimationBorderStyle=()=>{},this.getTextColor=()=>{}}};var qt=["*"],Ut=r=>({componentConfigSignal:r}),Kt=(r,i)=>({condition:r,data:i}),Xt=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-arrow-wireframe",setIfCondition:n,componentElementRef:e});function Qt(r,i){r&1&&(d(0),be(1),p())}function Zt(r,i){if(r&1&&(d(0),u(1,Qt,2,0,"ng-container",2),p()),r&2){let n=c(2);l(),a("veltDynamicTemplate",F(3,Xt,n.template,C(1,Ut,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function er(r,i){if(r&1&&(d(0),u(1,Zt,2,8,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Kt,n.conditionSignal(),C(1,Ut,n.componentConfigSignal)))}}var le=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-arrow",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Directional cursor arrow"),e.setAttribute("aria-describedby","Cursor pointer with directional arrow indicator")}catch(e){this.loggingService.catch("Error in CursorPointerArrowComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-arrow-internal"]],standalone:!1,features:[N([h]),D],ngContentSelectors:qt,decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&(ye(),u(0,er,2,6,"ng-container",0)),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var Tt=r=>({componentConfigSignal:r}),rr=(r,i)=>({condition:r,data:i}),nr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-audio-wireframe",setIfCondition:n,componentElementRef:e});function ir(r,i){if(r&1&&(d(0),k(1,"audio",3),p()),r&2){let n=c(2).ngIf;l(),a("srcObject",n.stream)("volume",n.selfCursorPointer?0:1)}}function or(r,i){if(r&1&&(d(0),u(1,ir,2,2,"ng-container",2),p()),r&2){let n=c(2);l(),a("veltDynamicTemplate",F(3,nr,n.template,C(1,Tt,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function ar(r,i){if(r&1&&(d(0),u(1,or,2,8,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,rr,n.conditionSignal(),C(1,Tt,n.componentConfigSignal)))}}var ue=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle-audio",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio huddle cursor pointer"),e.setAttribute("aria-describedby","User cursor with audio huddle controls"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAudioComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-audio-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],["playsinline","","autoplay","true",3,"srcObject","volume"]],template:function(t,o){t&1&&u(0,ar,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var wt=(r,i)=>({componentConfigSignal:r,user:i}),cr=(r,i)=>({condition:r,data:i}),lr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-avatar-wireframe",setIfCondition:n,componentElementRef:e});function ur(r,i){if(r&1&&(d(0),k(1,"snippyly-user-avatar",3),p()),r&2){let n=c(2).ngIf;l(),a("user",n.cursorUser)}}function mr(r,i){if(r&1&&(d(0),u(1,ur,2,1,"ng-container",2),p()),r&2){let n=c().ngIf,e=c();l(),a("veltDynamicTemplate",F(4,lr,e.template,x(1,wt,e.componentConfigSignal,n.cursorUser),e.setIfCondition.bind(e),e.elementRef))}}function dr(r,i){if(r&1&&(d(0),u(1,mr,2,9,"ng-container",1),p()),r&2){let n=i.ngIf,e=c();l(),a("veltIf",x(4,cr,e.conditionSignal(),x(1,wt,e.componentConfigSignal,n.cursorUser)))}}var me=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle-avatar",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio huddle avatar cursor pointer"),e.setAttribute("aria-describedby","User avatar in audio huddle at cursor location"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleAvatarComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-avatar-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[4,"veltDynamicTemplate"],[3,"user"]],template:function(t,o){t&1&&u(0,dr,2,7,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Ne],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}snippyly-user-avatar[_ngcontent-%COMP%]{position:absolute;--legacy-velt-avatar-size: var(--legacy-velt-cursor-video-size)}snippyly-user-avatar[_ngcontent-%COMP%] .s-user-avatar-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));border-radius:0;max-width:100%;max-height:100%}snippyly-user-avatar[_ngcontent-%COMP%] .s-user-avatar-container[_ngcontent-%COMP%] .s-user-avatar-initial[_ngcontent-%COMP%]:after{font-size:var(--velt-font-size-2xl)}"],changeDetection:0});let r=i;return r})();var Mt=r=>({componentConfigSignal:r}),gr=(r,i)=>({condition:r,data:i}),vr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-audio-huddle-wireframe",setIfCondition:n,componentElementRef:e});function hr(r,i){if(r&1&&(d(0),_(1,"div",6),k(2,"velt-cursor-pointer-audio-huddle-avatar-internal",7)(3,"velt-cursor-pointer-audio-huddle-audio-internal",7),b(),p()),r&2){let n=c(4);l(2),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function fr(r,i){if(r&1&&(_(0,"div",3)(1,"div",4),u(2,hr,4,2,"ng-container",5),b()()),r&2){let n=c(2).ngIf,e=c();P("data-testid",e.componentId+"-spacing"),l(),$("background",n.cursorUser==null?null:n.cursorUser.color)("border",n.gainVolume&&n.lightenedColor?n.getGainAnimationBorderStyle():""),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(9,vr,e.template,C(7,Mt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Cr(r,i){if(r&1&&(d(0),u(1,fr,3,14,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showAudio)}}function Sr(r,i){if(r&1&&(d(0),u(1,Cr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,gr,n.conditionSignal(),C(1,Mt,n.componentConfigSignal)))}}var de=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-audio-huddle",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Audio call cursor pointer"),e.setAttribute("aria-describedby","User cursor with audio call indicator"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerAudioHuddleComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-audio-huddle-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-audio-huddle-spacing","s-cursor-video-spacing"],[1,"velt-cursor-pointer-audio-huddle-container","s-cursor-video-container"],[4,"veltDynamicTemplate"],[1,"velt-cursor-pointer-audio-huddle-block","s-cursor-video-block"],[3,"componentConfigSignal"]],template:function(t,o){t&1&&u(0,Sr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,ue,me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-audio-huddle-spacing[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));display:flex;justify-content:center;align-items:center;position:absolute;top:calc((.4rem + 0px) * var(--velt-base-rem-unit));left:calc((.4rem + 0px) * var(--velt-base-rem-unit));background:transparent}.velt-cursor-pointer-audio-huddle-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));box-sizing:content-box;padding:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-full);box-shadow:0 1px 4px #10101036}.velt-cursor-pointer-audio-huddle-container[_ngcontent-%COMP%] .velt-cursor-pointer-audio-huddle-block[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}"],changeDetection:0});let r=i;return r})();var kt=r=>({componentConfigSignal:r}),yr=(r,i)=>({condition:r,data:i}),br=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-avatar-wireframe",setIfCondition:n,componentElementRef:e});function Ir(r,i){if(r&1){let n=tt();d(0),_(1,"img",5),rt("error",function(){qe(n);let t=c(3).ngIf;return Ke(t.onImageLoadError())}),b(),p()}if(r&2){let n=c(3).ngIf;l(),a("src",n.cursorUser==null?null:n.cursorUser.photoUrl,Qe)}}function xr(r,i){if(r&1&&(_(0,"div",3),u(1,Ir,2,1,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("background-color",n.cursorUser==null?null:n.cursorUser.color),Z("user-presence-text-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment)("velt-cursor-pointer-avatar-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(10,br,e.template,C(8,kt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Er(r,i){if(r&1&&(d(0),u(1,xr,2,15,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showAvatar)}}function Or(r,i){if(r&1&&(d(0),u(1,Er,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,yr,n.conditionSignal(),C(1,kt,n.componentConfigSignal)))}}var pe=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-avatar",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","User avatar cursor pointer"),e.setAttribute("aria-describedby","Shows user profile picture at cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerAvatarComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-avatar-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-avatar-container","user-avatar-container"],[4,"veltDynamicTemplate"],[3,"error","src"]],template:function(t,o){t&1&&u(0,Or,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-avatar-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-avatar-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-avatar-size) + 0px) * var(--velt-base-rem-unit));box-shadow:0 1px 4px #10101036;transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)));padding:calc((.08rem + 0px) * var(--velt-base-rem-unit));border-radius:var(--velt-border-radius-full)}.velt-cursor-pointer-avatar-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:100%}.velt-cursor-pointer-avatar-container-comment-border[_ngcontent-%COMP%]{border-bottom-left-radius:var(--velt-border-radius-xl);border-bottom-right-radius:var(--velt-border-radius-xl);border-top-right-radius:var(--velt-border-radius-xl);margin-top:calc(var(--velt-spacing-sm) * -1)}"],changeDetection:0});let r=i;return r})();var Nt=r=>({componentConfigSignal:r}),Dr=(r,i)=>({condition:r,data:i}),Ur=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-comment-wireframe",setIfCondition:n,componentElementRef:e});function Tr(r,i){if(r&1&&(d(0),Ie(1),Ee(2,"translate"),p()),r&2){let n=c(3).ngIf;l(),xe(" ",Oe(2,1,n.cursorUser==null?null:n.cursorUser.comment)," ")}}function wr(r,i){if(r&1&&(_(0,"p",3),u(1,Tr,3,3,"ng-container",4),b()),r&2){let n=c(3);P("data-testid",n.componentId),l(),a("veltDynamicTemplate",F(4,Ur,n.template,C(2,Nt,n.componentConfigSignal),n.setIfCondition.bind(n),n.elementRef))}}function Mr(r,i){if(r&1&&(d(0),u(1,wr,2,9,"p",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.cursorUser==null?null:n.cursorUser.comment)}}function kr(r,i){if(r&1&&(d(0),u(1,Mr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Dr,n.conditionSignal(),C(1,Nt,n.componentConfigSignal)))}}var ge=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default-comment",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Cursor pointer with comment indicator"),e.setAttribute("aria-describedby","Shows comment activity at cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultCommentComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-comment-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-default-comment-container user-presence-comment",4,"ngIf"],[1,"velt-cursor-pointer-default-comment-container","user-presence-comment"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&u(0,kr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}"],changeDetection:0});let r=i;return r})();var Ft=r=>({componentConfigSignal:r}),Fr=(r,i)=>({condition:r,data:i}),Rr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-name-wireframe",setIfCondition:n,componentElementRef:e});function Lr(r,i){if(r&1&&(d(0),Ie(1),Ee(2,"translate"),p()),r&2){let n,e=c(3).ngIf;l(),xe(" ",Oe(2,1,(e.cursorUser==null?null:e.cursorUser.name)||(!(e.cursorUser==null||e.cursorUser.email==null||(n=e.cursorUser.email.split("@"))==null)&&n.length?e.cursorUser==null||e.cursorUser.email==null?null:e.cursorUser.email.split("@")[0]:e.cursorUser==null?null:e.cursorUser.email))," ")}}function Br(r,i){if(r&1&&(_(0,"p",3),u(1,Lr,3,3,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("color",n.getTextColor(n.cursorUser==null?null:n.cursorUser.color)),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(6,Rr,e.template,C(4,Ft,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function jr(r,i){if(r&1&&(d(0),u(1,Br,2,11,"p",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",(n.cursorUser==null?null:n.cursorUser.name)||(n.cursorUser==null?null:n.cursorUser.email))}}function Hr(r,i){if(r&1&&(d(0),u(1,jr,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Fr,n.conditionSignal(),C(1,Ft,n.componentConfigSignal)))}}var ve=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default-name",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Cursor pointer with user name"),e.setAttribute("aria-describedby","Shows user name next to cursor location")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultNameComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-name-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-default-name-container user-presence-name",3,"color",4,"ngIf"],[1,"velt-cursor-pointer-default-name-container","user-presence-name"],[4,"veltDynamicTemplate"]],template:function(t,o){t&1&&u(0,Hr,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,Me],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-default-name-container[_ngcontent-%COMP%]{margin:0;font-size:var(--velt-font-size-xs);color:#fff}"],changeDetection:0});let r=i;return r})();var Rt=r=>({componentConfigSignal:r}),$r=(r,i)=>({condition:r,data:i}),Vr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-default-wireframe",setIfCondition:n,componentElementRef:e});function Wr(r,i){if(r&1&&(d(0),k(1,"velt-cursor-pointer-default-name-internal",7)(2,"velt-cursor-pointer-default-comment-internal",7),p()),r&2){let n=c(5);l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function Gr(r,i){if(r&1&&(_(0,"div",5),u(1,Wr,3,2,"ng-container",6),b()),r&2){let n=c(3).ngIf,e=c();$("background-color",n.cursorUser==null?null:n.cursorUser.color),Z("user-presence-text-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment)("velt-cursor-pointer-default-container-comment-border",n.cursorUser==null?null:n.cursorUser.comment),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(10,Vr,e.template,C(8,Rt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function Jr(r,i){r&1&&(_(0,"div",8),k(1,"velt-skeleton-loader-internal",9),b())}function Yr(r,i){if(r&1&&u(0,Gr,2,15,"div",4)(1,Jr,2,0,"ng-template",null,0,it),r&2){let n=nt(2),e=c(2).ngIf;a("ngIf",(e.cursorUser==null?null:e.cursorUser.name)||(e.cursorUser==null?null:e.cursorUser.email)||(e.cursorUser==null?null:e.cursorUser.comment))("ngIfElse",n)}}function qr(r,i){if(r&1&&(d(0),u(1,Yr,3,2,"ng-template",3),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showDefault)}}function Kr(r,i){if(r&1&&(d(0),u(1,qr,2,1,"ng-container",2),p()),r&2){let n=c();l(),a("veltIf",x(3,$r,n.conditionSignal(),C(1,Rt,n.componentConfigSignal)))}}var he=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-default",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Default cursor pointer"),e.setAttribute("aria-describedby","User cursor location indicator")}catch(e){this.loggingService.catch("Error in CursorPointerDefaultComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-default-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[["loadingTemplateRef",""],[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],["class","velt-cursor-pointer-default-container user-presence-text-container",3,"backgroundColor","user-presence-text-container-comment-border","velt-cursor-pointer-default-container-comment-border",4,"ngIf","ngIfElse"],[1,"velt-cursor-pointer-default-container","user-presence-text-container"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"],[1,"velt-cursor-pointer-default-container-loading","user-presence-text-container-loading"],["height","24px","width","80px","borderRadius","24px"]],template:function(t,o){t&1&&u(0,Kr,2,6,"ng-container",1),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,ke,ge,ve],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex;transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)))}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-default-container[_ngcontent-%COMP%]{padding:var(--velt-spacing-sm);box-shadow:0 1px 4px #10101036;border-radius:var(--velt-border-radius-md);filter:brightness(110%) saturate(110%)}.velt-cursor-pointer-default-container-comment-border[_ngcontent-%COMP%]{border-bottom-left-radius:var(--velt-border-radius-xl);border-bottom-right-radius:var(--velt-border-radius-xl);border-top-right-radius:var(--velt-border-radius-xl);margin-top:calc(var(--velt-spacing-sm) * -1)}.velt-cursor-pointer-default-container-loading[_ngcontent-%COMP%]{transform:translate(calc((1.2rem + 0px) * var(--velt-base-rem-unit))) translateY(calc((-.7rem + 0px) * var(--velt-base-rem-unit)))}"],changeDetection:0});let r=i;return r})();var Lt=r=>({componentConfigSignal:r}),Qr=(r,i)=>({condition:r,data:i}),Zr=(r,i,n,e)=>({template:r,context:i,componentName:"velt-cursor-pointer-video-huddle-wireframe",setIfCondition:n,componentElementRef:e});function en(r,i){if(r&1&&(d(0),_(1,"div",6),k(2,"video",7),b(),p()),r&2){let n=c(3).ngIf;l(2),Z("flip",n.selfCursorPointer),a("srcObject",n.stream)("volume",n.selfCursorPointer?0:1)}}function tn(r,i){if(r&1&&(_(0,"div",3)(1,"div",4),u(2,en,3,4,"ng-container",5),b()()),r&2){let n=c(2).ngIf,e=c();P("data-testid",e.componentId+"-spacing"),l(),$("background",n.cursorUser==null?null:n.cursorUser.color)("border",n.gainVolume&&n.lightenedColor?n.getGainAnimationBorderStyle():""),P("data-testid",e.componentId),l(),a("veltDynamicTemplate",F(9,Zr,e.template,C(7,Lt,e.componentConfigSignal),e.setIfCondition.bind(e),e.elementRef))}}function rn(r,i){if(r&1&&(d(0),u(1,tn,3,14,"ng-template",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.showVideo)}}function nn(r,i){if(r&1&&(d(0),u(1,rn,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,Qr,n.conditionSignal(),C(1,Lt,n.componentConfigSignal)))}}var fe=(()=>{let i=class i extends R{constructor(e,t,o){super(t,o,e),this.loggingService=e,this.elementRef=t,this.dynamicDataService=o,this.componentId="velt-cursor-pointer-video-huddle",super.initializeComponentConfigSignal(new w)}ngOnInit(){try{super.ngOnInit(),this.setupA11yAttributes()}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent ngOnInit:",e)}}ngOnDestroy(){try{super.ngOnDestroy()}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent ngOnDestroy:",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Video call cursor pointer"),e.setAttribute("aria-describedby","User cursor with video call indicator"),e.setAttribute("aria-live","polite")}catch(e){this.loggingService.catch("Error in CursorPointerVideoHuddleComponent setupA11yAttributes:",e)}}};i.\u0275fac=function(t){return new(t||i)(m(v),m(E),m(h))},i.\u0275cmp=O({type:i,selectors:[["velt-cursor-pointer-video-huddle-internal"]],standalone:!1,features:[N([h]),D],decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],[3,"ngIf"],[1,"velt-cursor-pointer-video-huddle-spacing","s-cursor-video-spacing"],[1,"velt-cursor-pointer-video-huddle-container","s-cursor-video-container"],[4,"veltDynamicTemplate"],[1,"velt-cursor-pointer-video-huddle-block","s-cursor-video-block"],["playsinline","","autoplay","true",3,"srcObject","volume"]],template:function(t,o){t&1&&u(0,nn,2,6,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%]:empty{display:none}.velt-cursor-pointer-video-huddle-spacing[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 16px) * var(--velt-base-rem-unit));display:flex;justify-content:center;align-items:center;position:absolute;top:calc((.4rem + 0px) * var(--velt-base-rem-unit));left:calc((.4rem + 0px) * var(--velt-base-rem-unit));background:transparent}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%]{width:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-cursor-video-size) + 0px) * var(--velt-base-rem-unit));box-sizing:content-box;padding:var(--velt-spacing-2xs);border-radius:var(--velt-border-radius-full);box-shadow:0 1px 4px #10101036}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%] .velt-cursor-pointer-video-huddle-block[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.velt-cursor-pointer-video-huddle-container[_ngcontent-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;border-radius:var(--velt-border-radius-full);object-fit:cover}"],changeDetection:0});let r=i;return r})();var an=["*"],Bt=r=>({componentConfigSignal:r}),sn=(r,i)=>({condition:r,data:i}),cn=(r,i)=>({template:r,context:i,componentName:"velt-cursor-pointer-wireframe"});function ln(r,i){if(r&1&&(d(0),_(1,"velt-cursor-pointer-arrow-internal",5),be(2),b(),k(3,"velt-cursor-pointer-default-internal",5)(4,"velt-cursor-pointer-avatar-internal",5)(5,"velt-cursor-pointer-audio-huddle-internal",5)(6,"velt-cursor-pointer-video-huddle-internal",5),p()),r&2){let n=c(4);l(),a("componentConfigSignal",n.componentConfigSignal),l(2),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal),l(),a("componentConfigSignal",n.componentConfigSignal)}}function un(r,i){if(r&1&&(_(0,"div",3),u(1,ln,7,5,"ng-container",4),b()),r&2){let n=c(2).ngIf,e=c();$("top",n.cursorUser==null||n.cursorUser.position==null?null:n.cursorUser.position.top,"px")("left",n.cursorUser==null||n.cursorUser.position==null?null:n.cursorUser.position.left,"px"),Z("no-transition",n.selfCursorPointer),l(),a("veltDynamicTemplate",x(9,cn,n.template,C(7,Bt,e.componentConfigSignal)))}}function mn(r,i){if(r&1&&(d(0),u(1,un,2,12,"div",2),p()),r&2){let n=c().ngIf;l(),a("ngIf",n.cursorUser==null?null:n.cursorUser.position)}}function dn(r,i){if(r&1&&(d(0),u(1,mn,2,1,"ng-container",1),p()),r&2){let n=c();l(),a("veltIf",x(3,sn,n.conditionSignal(),C(1,Bt,n.componentConfigSignal)))}}var Ce=(()=>{let i=class i extends Ot{set cursorUser(e){this.componentConfigSignal.update(t=>(t=f(g({},t),{cursorUser:e}),t)),e?.color&&this.componentConfigSignal.update(t=>(t=f(g({},t),{lightenedColor:ht(e?.color,80)}),t))}get stream(){return this._stream}set stream(e){this._stream=e,e&&this.startGainAnimation(e),this.serviceBook.get(K)?.updateHuddleCursorAvailableByAttendeeId(this.componentConfigSignal().cursorUser?.userSnippylyId,!!this.stream),this.updatePointerStates()}constructor(e,t,o,s,S){super(o,s),this.serviceBook=e,this.loggingService=t,this.elementRef=o,this.themeService=s,this.wireframeService=S,this.selfCursorPointer=!1,this.avatarMode=!1,this.showInitial=!1,this.veltElement=!0,this.componentConfigSignal=_e({template:this.template,variant:this.variant,selfCursorPointer:this.selfCursorPointer||!1,showDefault:!1,showAvatar:!1,showAudio:!1,showVideo:!1,gainVolume:void 0,lightenedColor:void 0,onImageLoadError:this.onImageLoadError.bind(this),getGainAnimationBorderStyle:this.getGainAnimationBorderStyle.bind(this),getTextColor:this.getTextColor.bind(this)}),this.subscriptions=[],this.componentId="velt-cursor-pointer"}ngOnInit(){try{let e="velt-cursor-pointer-wireframe";this.setupA11yAttributes(),this.updatePointerStates(),this.variant&&(e+=`---${this.variant}`),this.subscriptions.push(this.wireframeService.getWireframe$(e).subscribe(t=>{if(t){let o=document.createElement(t.tagName);o.innerHTML=t.innerHTML,this.componentConfigSignal.update(s=>f(g({},s),{template:o}))}}))}catch(e){this.loggingService.catch("Error in CursorPointerComponent ngOnInit: ",e)}}setupA11yAttributes(){try{let e=this.elementRef.nativeElement;e.setAttribute("data-testid",this.componentId+"-container"),e.setAttribute("role","img"),e.setAttribute("aria-label","Live cursor pointer indicator"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true")}catch(e){this.loggingService.catch("Error in CursorPointerComponent setupA11yAttributes:",e)}}ngAfterViewInit(){}ngOnChanges(e){try{super.ngOnChanges(e),e&&Object.keys(e).forEach(t=>{this.componentConfigSignal.update(o=>(o=f(g({},o),{[t]:e[t].currentValue}),o))}),(e.avatarMode||e.huddleState)&&this.updatePointerStates()}catch(t){this.loggingService.catch("Error in CursorPointerComponent ngOnChanges: ",t)}}startGainAnimation(e){try{let t=new AudioContext,o=t.createMediaStreamSource(e),s=t.createAnalyser();o.connect(s);let S=new Uint8Array(s.frequencyBinCount),M=()=>{s.getByteFrequencyData(S);let re=S.reduce((ne,Le)=>ne+Le,0)/S.length;this.componentConfigSignal.update(ne=>(ne=f(g({},ne),{gainVolume:re}),ne)),this.gainAnimationId=requestAnimationFrame(M)};this.gainAnimationId=requestAnimationFrame(M)}catch(t){this.loggingService.catch("Error in CursorPointerComponent startGainAnimation: ",t)}}stopGainAnimation(){try{this.gainAnimationId!==void 0&&cancelAnimationFrame(this.gainAnimationId),this.componentConfigSignal.update(e=>(e=f(g({},e),{gainVolume:void 0}),e))}catch(e){this.loggingService.catch("Error in CursorPointerComponent stopGainAnimation: ",e)}}getOutlineSizeByGainAmount(){try{if(this.componentConfigSignal().gainVolume!==void 0)return vt(0,5,Math.min(1,this.componentConfigSignal().gainVolume/15))}catch(e){this.loggingService.catch("Error in CursorPointerComponent getOutlineSizeByGainAmount: ",e)}return 0}getGainAnimationBorderStyle(){return this.getOutlineSizeByGainAmount()+"px solid "+(this.componentConfigSignal().lightenedColor||"white")+" !important"}onImageLoadError(){this.loggingService.log("%c[WB] Calling FUNCTION: onImageLoadError","color: green;");try{this.showInitial=!0,this.updatePointerStates()}catch(e){this.loggingService.catch("Error in CursorPointerComponent onImageLoadError: ",e)}}getTextColor(e){try{return e?ft(e):"#141416"}catch(t){this.loggingService.catch("Error in CursorPointerComponent getTextColor: ",t)}return"#141416"}ngOnDestroy(){try{this.stopGainAnimation(),this.stream=void 0,super.ngOnDestroy(),this.subscriptions.forEach(e=>{e?.unsubscribe()})}catch(e){this.loggingService.catch("Error in CursorPointerComponent ngOnDestroy: ",e)}}updatePointerStates(){try{let e=!!this.stream&&!!this.huddleState?.audioState&&!this.huddleState?.videoState,t=!!this.stream&&!!this.huddleState?.videoState,o=!e&&!t&&!!this.avatarMode&&!this.showInitial,s=!e&&!t&&(!this.avatarMode||!!this.avatarMode&&this.showInitial);(s!==this.componentConfigSignal().showDefault||o!==this.componentConfigSignal().showAvatar||e!==this.componentConfigSignal().showAudio||t!==this.componentConfigSignal().showVideo)&&this.componentConfigSignal.update(S=>(S=g({},S),S.showDefault=s,S.showAvatar=o,S.showAudio=e,S.showVideo=t,S))}catch(e){this.loggingService.catch("Error in CursorPointerComponent updatePointerStates: ",e)}}};i.\u0275fac=function(t){return new(t||i)(m(G),m(v),m(E),m(Et),m(xt))},i.\u0275cmp=O({type:i,selectors:[["snippyly-cursor-pointer"]],hostVars:1,hostBindings:function(t,o){t&2&&P("data-velt-element",o.veltElement)},inputs:{cursorUser:"cursorUser",selfCursorPointer:"selfCursorPointer",avatarMode:"avatarMode",huddleState:"huddleState",variant:"variant",template:"template",stream:"stream"},standalone:!1,features:[D,Xe],ngContentSelectors:an,decls:1,vars:1,consts:[[4,"ngIf"],[4,"veltIf"],["class","velt-cursor-pointer-container user-presence-pointer",3,"no-transition","top","left",4,"ngIf"],[1,"velt-cursor-pointer-container","user-presence-pointer"],[4,"veltDynamicTemplate"],[3,"componentConfigSignal"]],template:function(t,o){t&1&&(ye(),u(0,dn,2,6,"ng-container",0)),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[A,T,U,le,de,pe,he,fe],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}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events: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-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--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-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--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;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}*[_ngcontent-%COMP%]:empty{display:revert}.velt-cursor-pointer-container[_ngcontent-%COMP%]{position:fixed;z-index:var(--velt-cursor-z-index);-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;filter:brightness(110%) saturate(110%);transition:top linear 75ms,left linear 75ms}.velt-cursor-pointer-container.no-transition[_ngcontent-%COMP%]{transition:none}"],changeDetection:0});let r=i;return r})();function gn(r,i){if(r&1&&(_(0,"snippyly-cursor-pointer",5)(1,"slot",6),$e(),_(2,"svg",7)(3,"g",8),k(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),k(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),r&2){let n=c().$implicit,e=c(2).ngIf,t=c();a("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),l(4),P("fill",n.color),l(),P("fill",n.color)}}function vn(r,i){if(r&1&&(d(0),u(1,gn,15,6,"snippyly-cursor-pointer",4),p()),r&2){let n=i.$implicit;l(),a("ngIf",n==null?null:n.position)}}function hn(r,i){if(r&1&&(_(0,"snippyly-cursor-pointer",19)(1,"slot",6),$e(),_(2,"svg",7)(3,"g",8),k(4,"path",9)(5,"path",10),b(),_(6,"defs")(7,"filter",11),k(8,"feFlood",12)(9,"feColorMatrix",13)(10,"feOffset",14)(11,"feGaussianBlur",15)(12,"feColorMatrix",16)(13,"feBlend",17)(14,"feBlend",18),b()()()()()),r&2){let n=c(2).ngIf,e=c();a("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),l(4),P("fill",n.currentCursorUser.color),l(),P("fill",n.currentCursorUser.color)}}function fn(r,i){if(r&1&&u(0,vn,2,1,"ng-container",2)(1,hn,15,7,"snippyly-cursor-pointer",3),r&2){let n=c().ngIf,e=c();a("ngForOf",n.cursorUsers)("ngForTrackBy",e.trackById),l(),a("ngIf",n.huddleJoined&&n.huddleOnCursorMode&&n.currentCursorUser)}}function Cn(r,i){if(r&1&&(d(0),u(1,fn,2,3,"ng-template",1),p()),r&2){let n=i.ngIf;l(),a("ngIf",n.isFirstComponent&&!(n.user!=null&&n.user.isAnonymous))}}var Fe=(()=>{let i=class i{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,o,s,S,M,re){this.analyticsService=e,this.authService=t,this.cursorService=o,this.domService=s,this.elementRef=S,this.serviceBook=M,this.loggingService=re,this.avatarMode=!1,this.onCursorUsersChanged=new Ve,this.onCursorUserChange=new Ve,this.subscriptions=[],this.constants=y,this.showInitials={},this.componentConfigSignal=_e({isFirstComponent:!1,user:void 0,cursorUsers:[],huddleOnCursorModeByAttendeeId:{},attendeesByUserId:{},remoteStreamsByUserId:{},huddleOnCursorMode:!1,huddleJoined:!1,currentCursorUser:new Pe,localStream:void 0}),this.veltId=pt(),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{this.subscriptions.push(this.domService.subscribeInjectCustomCss(this.elementRef));let e=document.querySelector(y.TAGS.SNIPPYLY_CURSOR),t=document.querySelector(y.TAGS.VELT_CURSOR);t?this.veltId===t?.getAttribute(y.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(o=>(o=f(g({},o),{isFirstComponent:!0}),o)),this.initComponent()):this.veltId===e?.getAttribute(y.ATTRIBUTES.VELT_ID)&&(this.componentConfigSignal.update(o=>(o=f(g({},o),{isFirstComponent:!0}),o)),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=f(g({},t),{user:e}),t)),this.componentConfigSignal().user&&this.setCursorInstalledInAnalytics()},e=>{this.loggingService.catch("Error in CursorComponent getUser$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleJoined$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleJoined:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleJoined$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleOnCursorMode$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleOnCursorMode:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleOnCursorMode$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.localStream$??ie)).subscribe(e=>{e?this.componentConfigSignal.update(t=>(t=f(g({},t),{localStream:e}),t)):this.componentConfigSignal.update(t=>(t=f(g({},t),{localStream:void 0}),t))},e=>{this.loggingService.catch("Error in CursorComponent localStream$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getRemoteStreamsByUserId$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{remoteStreamsByUserId:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getRemoteStreamsByUserId$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleAttendees$()??ie)).subscribe(e=>{let t={};e?t=e.reduce((o,s)=>(o[s.userSnippylyId]=s,o),{}):t={},this.componentConfigSignal.update(o=>(o=f(g({},o),{attendeesByUserId:t}),o))},e=>{this.loggingService.catch("Error in CursorComponent getAttendees$ subscription: ",e)})),this.subscriptions.push(this.serviceBook.observe(K).pipe(I(e=>e?.getHuddleOnCursorModeByAttendeeId$()??ie)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{huddleOnCursorModeByAttendeeId:e}),t))},e=>{this.loggingService.catch("Error in CursorComponent getHuddleOnCursorModeByAttendeeId$ subscription: ",e)})),this.subscriptions.push(this.domService.onWindowPointerMove$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{currentCursorUser:f(g({},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(H(e=>!!e)).subscribe(e=>{this.loggingService.log(e),e&&(this.componentConfigSignal.update(t=>(t=f(g({},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(H(e=>!!e)).subscribe(e=>{this.componentConfigSignal.update(t=>(t=f(g({},t),{currentCursorUser:f(g({},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(q.CURSOR)}catch(e){this.loggingService.catch("Error in CursorComponent setCursorInstalledInAnalytics: ",e)}}};i.\u0275fac=function(t){return new(t||i)(m(Ue),m(we),m(ee),m(Te),m(E),m(G),m(v))},i.\u0275cmp=O({type:i,selectors:[["app-cursor"]],hostVars:2,hostBindings:function(t,o){t&2&&P("data-velt-id",o.veltId)("data-velt-element",o.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,o){t&1&&u(0,Cn,2,1,"ng-container",0),t&2&&a("ngIf",o.componentConfigSignal())},dependencies:[ot,A,Ce],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}body.velt-pin-dragging iframe{pointer-events: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}
2
2
  `],encapsulation:3,changeDetection:0});let r=i;return r})();var Re=class extends Dt{constructor(i){super(i),this.getService(v).log("%c[WB] Creating CLASS: CursorElement","color: blue;"),this.getLiveCursorsOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.getOnlineUsersOnCurrentDocument=this._getOnlineUsersOnCurrentDocument,this.setInactivityTime=this._setInactivityTime,this.allowedElementIds=this._allowedElementIds}_getOnlineUsersOnCurrentDocument(){this.getService(v).log("%c[WB] Calling FUNCTION: getOnlineUsersOnCurrentDocument","color: green;");try{return this.trackEvent(oe.Events.Cursor.GET_LIVE_CURSORS_ON_CURRENT_DOCUMENT_TRIGGERED),this.getService(ee).getLiveCursorsOnCurrentDocument()}catch(i){return this.getService(v).catch("Error in _getOnlineUsersOnCurrentDocument: ",i),B(null)}}_setInactivityTime(i){this.getService(v).log("%c[WB] Calling FUNCTION: _setInactivityTime","color: green;");try{this.trackEvent(oe.Events.Cursor.SET_INACTIVITY_TIME_TRIGGERED,{payload:{time:i}}),isNaN(i)?this.getService(v).catch("Error in setInactivityTime: ","Provided value is not a number."):this.getService(ee).setInactivityTime(i)}catch(n){this.getService(v).catch("Error in setInactivityTime: ",n)}}_allowedElementIds(i){this.getService(v).log("%c[WB] Calling FUNCTION: allowedElementIds","color: green;");try{this.trackEvent(oe.Events.Cursor.ALLOWED_ELEMENT_IDS_TRIGGERED,{payload:{elementIds:i}}),this.getService(ee).setAllowedElementIds(i)}catch(n){this.getService(v).catch("Error in allowedElementIds: ",n)}}};var jt=(()=>{let i=class i{};i.\u0275fac=function(t){return new(t||i)},i.\u0275mod=et({type:i}),i.\u0275inj=Ye({imports:[at,Ne,ke]});let r=i;return r})();var Ht=(()=>{let i=class i{constructor(e,t,o){this.loggingService=e,this.usersService=t,this.serviceBook=o,this.serviceBook.set(De,this)}getUserIdsToResolveFromCursorUsers(e){try{this.loggingService.log("%c[WB] Calling CursorUtilsService FUNCTION: getUserIdsToResolveFromCursorUsers","color: green;");let t=new Set;for(let o of e)o?.userId&&t.add(o?.userId);return Array.from(t)}catch(t){return this.loggingService.catch("Error in CursorUtilsService getUserIdsToResolveFromCursorUsers:",t),[]}}mergeCursorUserWithUser(e){try{if(this.loggingService.log("%c[WB] Calling CursorUtilsService FUNCTION: mergeCursorUserWithUser","color: green;"),this.usersService.userDataProviderAvailable()&&e?.userId){let t=this.usersService.getUserById(e?.userId);t&&(e=g(g({},e),t))}return e}catch(t){return this.loggingService.catch("Error in CursorUtilsService mergeCursorUserWithUser:",t),e}}formatCursorUserData(e){try{if(this.loggingService.log("%c[WB] Calling CursorUtilsService FUNCTION: formatCursorUserData","color: green;"),this.usersService.userDataProviderAvailable()){let t=["userId","comment","positionX","positionY","screenWidth","screenHeight","screenScrollHeight","onlineStatus","userSnippylyId","color","textColor","timestamp","type","selections","documentParamsId","documentParams","locationId","location","targetElement","position","isReadOnly","isAnonymous","pageInfo"];Object.keys(e).forEach(o=>{t.includes(o)||(e[o]=null)})}return e}catch(t){return this.loggingService.catch("Error in CursorUtilsService formatCursorUserData:",t),e}}};i.\u0275fac=function(t){return new(t||i)(L(v),L(bt),L(G))},i.\u0275prov=Se({token:i,factory:i.\u0275fac,providedIn:"root"});let r=i;return r})();var Sn={"velt-cursor-pointer-wireframe":Ce,"velt-cursor-pointer-arrow-wireframe":le,"velt-cursor-pointer-audio-huddle-wireframe":de,"velt-cursor-pointer-audio-huddle-avatar-wireframe":me,"velt-cursor-pointer-audio-huddle-audio-wireframe":ue,"velt-cursor-pointer-avatar-wireframe":pe,"velt-cursor-pointer-default-wireframe":he,"velt-cursor-pointer-default-name-wireframe":ve,"velt-cursor-pointer-default-comment-wireframe":ge,"velt-cursor-pointer-video-huddle-wireframe":fe};Object.assign(Pt,Sn);function _n(r){r.get(v).log("%c[WB] Loading cursor feature chunk","color: blue;");let n=r.get(G);n.set(Ae,r.get(ee)),n.set(De,r.get(Ht));let t=Ze(jt,r).injector;return zt(t,y.TAGS.VELT_CURSOR,Fe),zt(t,y.TAGS.SNIPPYLY_CURSOR,Fe),new Re(r)}function zt(r,i,n){if(customElements.get(i))return;let e=st(n,r);customElements.define(i,e)}export{_n as default};