@veltdev/sdk-staging 6.0.0-beta.9 → 6.0.0
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.
- package/app/client/snippyly.model.d.ts +10 -0
- package/app/models/data/comment-events.data.model.d.ts +10 -0
- package/app/models/data/config.data.model.d.ts +154 -0
- package/app/models/data/notification.model.d.ts +14 -0
- package/app/models/data/suggestion.data.model.d.ts +52 -2
- package/app/utils/constants.d.ts +1 -0
- package/app/utils/enums.d.ts +2 -1
- package/{chunk-JSZMRBOR.js → chunk-3CWPPM3P.js} +1 -1
- package/{chunk-G56O673H.js → chunk-42DJQDO6.js} +1 -1
- package/{chunk-GUGGWPZ7.js → chunk-4MGSKBFZ.js} +1 -1
- package/chunk-5YVVMUVJ.js +1 -0
- package/{chunk-MJDGHV4Y.js → chunk-62665UII.js} +1 -1
- package/{chunk-ENIVQSM6.js → chunk-6SB63H3W.js} +1 -1
- package/chunk-ADSEZJIT.js +1 -0
- package/{chunk-ZMXXM7C4.js → chunk-AE6AKOBL.js} +1 -1
- package/{chunk-3OIAZGVH.js → chunk-AVNXQEE2.js} +1 -1
- package/{chunk-MX66OK5A.js → chunk-BPPXBXFT.js} +1 -1
- package/{chunk-2YJ3NBTO.js → chunk-CI2JGL4P.js} +1 -1
- package/{chunk-J3FNQGWW.js → chunk-CVMNWHT4.js} +2 -2
- package/{chunk-XAJ4ABBW.js → chunk-EIIBHBQX.js} +1 -1
- package/{chunk-AMBQ736A.js → chunk-EPT5TVX4.js} +1 -1
- package/chunk-FXK7BWOQ.js +167 -0
- package/{chunk-4QPJMZ5V.js → chunk-IE3AYTRD.js} +1 -1
- package/chunk-OPJU6Y6N.js +13 -0
- package/{chunk-MNGERQRW.js → chunk-OZMOWJWG.js} +1 -1
- package/{chunk-NR3CZ6OR.js → chunk-POBWY53V.js} +1 -1
- package/chunk-PRGWBNVO.js +1 -0
- package/{chunk-SQTBBRA3.js → chunk-PVOJRXAC.js} +1 -1
- package/{chunk-57VK6E6U.js → chunk-QD4B4F67.js} +1 -1
- package/{chunk-XJWB3IUW.js → chunk-QX6IGTVL.js} +1 -1
- package/{chunk-LAUYCNER.js → chunk-RSPIT2S4.js} +1 -1
- package/{chunk-QDQ2XJUX.js → chunk-S3KLTU2O.js} +1 -1
- package/{chunk-5W33SILU.js → chunk-SKH4QRW2.js} +1 -1
- package/chunk-SYUQPGKV.js +1 -0
- package/{chunk-3OILJMAX.js → chunk-UCTOPWFQ.js} +1 -1
- package/{chunk-G2POMKRC.js → chunk-UGCJET7Y.js} +1 -1
- package/{chunk-W4BGGBK5.js → chunk-UVG3AHTE.js} +1 -1
- package/{chunk-DP4GMASO.js → chunk-WOT7KXUQ.js} +1 -1
- package/chunk-YFYJFOMT.js +2 -0
- package/chunk-ZOLCVAWT.js +93 -0
- package/package.json +1 -1
- package/velt-activity-log.js +1 -1
- package/velt-area.js +1 -1
- package/velt-arrow.js +2 -2
- package/velt-comment.js +8 -8
- package/velt-crdt.js +1 -1
- package/velt-cursor.js +2 -2
- package/velt-huddle.js +3 -3
- package/velt-live-state-sync.js +2 -2
- package/velt-notification.js +1 -1
- package/velt-presence.js +1 -1
- package/velt-reaction.js +1 -1
- package/velt-recorder.js +1 -1
- package/velt-rewriter.js +2 -2
- package/velt-selection.js +1 -1
- package/velt-tag.js +1 -1
- package/velt-user-invite.js +1 -1
- package/velt-user-request.js +1 -1
- package/velt-video-player.js +1 -1
- package/velt-views.js +3 -3
- package/velt.js +264 -20
- package/chunk-52EPUXSU.js +0 -13
- package/chunk-5SSUFLRQ.js +0 -1
- package/chunk-6TORUSYX.js +0 -93
- package/chunk-EWNXINED.js +0 -1
- package/chunk-HDABOQPS.js +0 -1
- package/chunk-RMV5EWSF.js +0 -1
- package/chunk-TY3WZ4Q4.js +0 -167
- package/chunk-YSZQAETY.js +0 -1
package/velt-user-invite.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as We}from"./chunk-SQTBBRA3.js";import{b as Ye}from"./chunk-RMV5EWSF.js";import{b as $e,j as Ge,t as Je}from"./chunk-JSZMRBOR.js";import"./chunk-2YJ3NBTO.js";import{l as Ue}from"./chunk-LAUYCNER.js";import"./chunk-YSZQAETY.js";import"./chunk-4QPJMZ5V.js";import"./chunk-G2POMKRC.js";import"./chunk-NR3CZ6OR.js";import"./chunk-MX66OK5A.js";import{b as He,d as Ze}from"./chunk-XJWB3IUW.js";import{a as Ke}from"./chunk-GUGGWPZ7.js";import{a as De}from"./chunk-ZMXXM7C4.js";import{I as xe,W as Me,X as Ee,Y as Te,ba as Oe,ca as Ne,da as Q,ea as Fe,ga as ze}from"./chunk-J3FNQGWW.js";import{$ as me,Ci as Re,E as ie,Eg as Be,Fa as s,Fc as _e,Gc as ye,Hc as be,Hi as q,Ic as Se,Ie as P,J as ne,Jb as G,Je as Ae,Kb as Z,Mc as Ie,Nb as m,Ob as D,Pa as g,Pb as M,Pc as we,Qf as V,Qi as je,Sh as J,T as R,Ta as ge,Te as L,Ua as H,Va as he,Ya as Ce,_a as U,_b as fe,a as ae,aa as ue,ca as E,db as $,g as ce,ha as b,ia as S,ja as w,je as O,ka as j,kc as p,l as le,lb as u,lc as d,mb as a,mf as ke,nb as c,ni as Le,ob as C,oi as K,p as te,pc as oe,pi as A,qi as Y,r as pe,sb as k,tb as B,ui as Ve,v as de,vb as T,vi as W,wa as ve,we as Pe,xb as x,zb as h}from"./chunk-TY3WZ4Q4.js";var Qe=(()=>{let r=class r{constructor(e,t,o,l,_,I,N,ee){this.authService=e,this.configService=t,this.contactService=o,this.docService=l,this.commonDbService=_,this.databaseService=I,this.loggingService=N,this.notificationService=ee,this.documentUsers$=new le([]);try{this.databaseService.getDb().pipe(ie(y=>!!y),ne(1)).subscribe(y=>{y&&this.subscribeUsersFromDocument()}),this.authService.getUser$().subscribe(y=>{if(y?.email){this.subscribeUsersFromDocument();let z=V(y.email);y?.organizationId&&(z=V(y.userId)),this.getDocumentUserByIdFromDb(z).then(f=>{f&&(f.user.name=y.name,f.user.photoUrl=y.photoUrl,this.updateDocumentUser(f))}).catch(f=>{this.loggingService.catch("Error in DocumentUserAccessService getDocumentUserByIdFromDb:",f)})}},y=>{this.loggingService.catch("Error in DocumentUserAccessService getUser$:",y)})}catch(y){this.loggingService.catch("Error in DocService constructor:",y)}}getDocumentUserByIdFromDb(e){return ce(this,null,function*(){try{let t=this.docService.getDocumentPaths();return t?(yield this.commonDbService.dbListener({feature:"documentUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!1,id:e}}).pipe(ne(1)).toPromise())?.data:void 0}catch(t){this.loggingService.catch("Error in DocService getDocumentUserById:",t);return}})}subscribeUsersFromDocument(){try{this.documentUsersSubscription&&this.documentUsersSubscription.unsubscribe(),this.documentUsersSubscription=this.authService.getUser$().pipe(R(e=>e?this.docService.getDocumentPaths$().pipe(ie(t=>!!t),R(t=>this.commonDbService.dbListener({feature:"allDocumentUsers",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!0}}).pipe(de(o=>o?.data?Object.values(o?.data):[])))):pe([]))).subscribe(e=>{this.documentUsers$.next(e)},e=>{this.loggingService.catch("Error in DocService subscribeUsersFromDocument subscription:",e)})}catch(e){this.loggingService.catch("Error in DocService subscribeUsersFromDocument:",e)}}getDocumentUsers$(){return this.documentUsers$.asObservable()}addDocumentUser(e){try{let t=this.authService.getUser();if(t){if(this.configService.getSF()){if(e?.role?.name===P.ADMIN)this.contactService.addGlobalContact(e.user);else if(e?.role?.name===P.COMMENTER){let l=t.groupId;if(l){let _=JSON.parse(JSON.stringify(e.user));_.visibility="group",this.contactService.setLoggedInUserGroupContacts(l,[_])}}}e.id=V(e?.user?.email),e.invitedBy=t,e.invitedDate=this.timestamp;let o=this.docService.getDocumentPaths();o&&this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:o?.documentId??"",organizationId:o?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}else this.loggingService.error("Error in DocService addDocumentUser: User not found")}catch(t){this.loggingService.catch("Error in DocService addDocumentUser:",t)}}updateDocumentUser(e,t={}){try{let o=this.authService.getUser();if(o){e.updatedBy=o,e.updatedDate=this.timestamp;let l=this.docService.getDocumentPaths();this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:l?.documentId??"",organizationId:l?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}}catch(o){this.loggingService.catch("Error in DocumentUserAccessService updateDocumentUser:",o)}}removeDocumentUser(e){try{let t=this.docService.getDocumentPaths();this.commonDbService.deleteData({feature:"documentUserAccess",properties:{id:e.id,documentId:t?.documentId??"",organizationId:t?.organizationId??""}})}catch(t){this.loggingService.catch("Error in DocumentUserAccessService removeDocumentUser:",t)}}updateNotificationsDatabase(e={}){try{let t=ae({notificationSource:"user"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in DocumentUserAccessService updateNotificationsDatabase: ",t)}}get timestamp(){return this.commonDbService.getServerTimestamp()}};r.\u0275fac=function(t){return new(t||r)(E(W),E(Y),E(Ne),E(q),E(je),E(Re),E(A),E(Ye))},r.\u0275prov=me({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();function ct(n,r){if(n&1){let i=T();k(0),a(1,"div",23)(2,"div",24),m(3),c(),a(4,"div",25),x("click",function(){let t=b(i).$implicit,o=h();return S(o.removeSelectedUserToInvite(t))}),w(),a(5,"svg",26),C(6,"path",7),c()()(),B()}if(n&2){let i=r.$implicit;s(3),D((i==null||i.user==null?null:i.user.name)||(i==null||i.user==null?null:i.user.email))}}function lt(n,r){if(n&1){let i=T();k(0),a(1,"div",31),x("click",function(){let t=b(i).$implicit,o=h(2);return S(o.selectRole(t))}),w(),a(2,"svg",32),C(3,"path",33),c(),j(),a(4,"div")(5,"h4"),m(6),p(7,"translate"),c(),a(8,"p"),m(9),p(10,"translate"),c()()(),B()}if(n&2){let i=r.$implicit,e=r.first,t=h(2);s(),Z("border-top",!e),s(),G("visibility",(t.selectedUserRole==null?null:t.selectedUserRole.id)===(i==null?null:i.id)?"visible":"hidden"),s(4),D(d(7,6,i==null?null:i.name)),s(3),D(d(10,8,i==null?null:i.description))}}function pt(n,r){if(n&1&&(a(0,"div",27)(1,"div",28),U(2,lt,11,10,"ng-container",12),c(),m(3),p(4,"translate"),w(),a(5,"svg",29),C(6,"path",30),c()()),n&2){let i=h();Z("disabled",!i.isUserAdmin),s(2),u("ngForOf",i.userRoles),s(),M(" ",d(4,4,i.selectedUserRole==null?null:i.selectedUserRole.name)," ")}}function dt(n,r){n&1&&(w(),a(0,"svg",32),C(1,"path",44),c())}function mt(n,r){if(n&1&&(a(0,"div",41),m(1),p(2,"translate"),U(3,dt,2,0,"svg",43),c()),n&2){let i=h().$implicit,e=h(2);s(),M(" ",d(2,2,i==null||i.role==null?null:i.role.name)," "),s(2),u("ngIf",e.isUserAdmin&&(i==null||i.user==null?null:i.user.email)!==(e.user==null?null:e.user.email))}}function ut(n,r){if(n&1){let i=T();a(0,"div",28)(1,"div",45),x("click",function(){b(i);let t=h().$implicit,o=h(2);return S(o.removeUser(t))}),m(2),p(3,"translate"),c()()}n&2&&(s(2),M(" ",d(3,1,"Remove")," "))}function vt(n,r){if(n&1&&(k(0),a(1,"div",38)(2,"div",39),C(3,"snippyly-user-avatar",40),m(4),c(),a(5,"div",41)(6,"app-overlay-tooltip",42),U(7,mt,4,4,"ng-template",null,1,oe)(9,ut,4,3,"ng-template",null,2,oe),c()()(),B()),n&2){let i=r.$implicit,e=h(2);s(3),u("user",i==null?null:i.user)("background","#625DF5"),s(),M(" ",(i==null||i.user==null?null:i.user.name)||(i==null||i.user==null?null:i.user.email)," "),s(2),u("disabled",!(e.isUserAdmin&&(i==null||i.user==null?null:i.user.email)!==(e.user==null?null:e.user.email)))}}function gt(n,r){n&1&&(k(0),a(1,"div"),m(2),p(3,"translate"),c(),B()),n&2&&(s(2),D(d(3,1,"No users are added.")))}function ht(n,r){if(n&1&&(a(0,"div",34)(1,"div",35),m(2),p(3,"translate"),c(),U(4,vt,11,4,"ng-container",36)(5,gt,4,3,"ng-container",37),c()),n&2){let i=h();s(2),D(d(3,4,"People on this project")),s(2),u("ngForOf",i.documentUsers)("ngForTrackBy",i.trackByDocumentUserId),s(),u("ngIf",!(i.documentUsers!=null&&i.documentUsers.length))}}function Ct(n,r){if(n&1&&(k(0),a(1,"div",38)(2,"div",39),C(3,"snippyly-user-avatar",40),m(4),p(5,"translate"),c()(),B()),n&2){let i=r.$implicit;s(3),u("user",i)("background","#625DF5"),s(),M(" ",d(5,3,(i==null?null:i.name)||(i==null?null:i.email))," ")}}function ft(n,r){if(n&1&&(a(0,"div",38)(1,"div",39),C(2,"snippyly-user-avatar",40),m(3),p(4,"translate"),c(),a(5,"div",27),m(6),p(7,"translate"),c()()),n&2){let i=h().$implicit;s(2),u("user",i)("background","#625DF5"),s(),M(" ",d(4,4,(i==null?null:i.name)||(i==null?null:i.email))," "),s(3),M(" ",d(7,6,"Invited")," ")}}function _t(n,r){if(n&1&&(k(0),U(1,ft,8,8,"div",46),B()),n&2){let i=r.$implicit,e=h(2);s(),u("ngIf",!e.huddleUsersByEmailMap[i==null?null:i.email])}}function yt(n,r){if(n&1&&(a(0,"div",34)(1,"div",35),m(2),p(3,"translate"),c(),U(4,Ct,6,5,"ng-container",36)(5,_t,2,1,"ng-container",36),c()),n&2){let i=h();s(2),D(d(3,5,"People on this huddle")),s(2),u("ngForOf",i.huddleUsers)("ngForTrackBy",i.trackByHuddleUserId),s(),u("ngForOf",i.huddleInvitees)("ngForTrackBy",i.trackByHuddleInviteeId)}}function bt(n,r){if(n&1){let i=T();a(0,"div",47)(1,"div",48),m(2),p(3,"translate"),c(),a(4,"div",49)(5,"div",28)(6,"div",31),x("click",function(){b(i);let t=h();return S(t.changeDocumentAccessType(t.DocumentAccessTypes.PUBLIC))}),w(),a(7,"svg",32),C(8,"path",33),c(),j(),a(9,"div")(10,"h3"),m(11),p(12,"translate"),p(13,"titlecase"),c(),a(14,"p"),m(15),p(16,"translate"),c()()(),a(17,"div",45),x("click",function(){b(i);let t=h();return S(t.changeDocumentAccessType(t.DocumentAccessTypes.RESTRICTED))}),w(),a(18,"svg",32),C(19,"path",33),c(),j(),a(20,"div")(21,"h3"),m(22),p(23,"translate"),p(24,"titlecase"),c(),a(25,"p"),m(26),p(27,"translate"),c()()()(),w(),a(28,"svg",32),C(29,"path",50)(30,"path",51)(31,"path",52),c(),j(),a(32,"div",53)(33,"h3"),m(34),p(35,"translate"),p(36,"titlecase"),c(),a(37,"p"),m(38),p(39,"translate"),c()()()()}if(n&2){let i=h();s(2),D(d(3,11,"General access")),s(5),G("visibility",!i.documentAccessType||i.documentAccessType===i.DocumentAccessTypes.PUBLIC?"visible":"hidden"),s(4),D(d(13,15,d(12,13,i.DocumentAccessTypes.PUBLIC))),s(4),D(d(16,17,i.documentAccessTypeMap[i.DocumentAccessTypes.PUBLIC]==null?null:i.documentAccessTypeMap[i.DocumentAccessTypes.PUBLIC].description)),s(3),G("visibility",i.documentAccessType===i.DocumentAccessTypes.RESTRICTED?"visible":"hidden"),s(4),D(d(24,21,d(23,19,i.DocumentAccessTypes.RESTRICTED))),s(4),D(d(27,23,i.documentAccessTypeMap[i.DocumentAccessTypes.RESTRICTED]==null?null:i.documentAccessTypeMap[i.DocumentAccessTypes.RESTRICTED].description)),s(8),D(d(36,27,d(35,25,i.documentAccessType||i.DocumentAccessTypes.PUBLIC))),s(4),M("",d(39,29,i.documentAccessTypeMap[i.documentAccessType?i.documentAccessType:i.DocumentAccessTypes.PUBLIC]==null?null:i.documentAccessTypeMap[i.documentAccessType?i.documentAccessType:i.DocumentAccessTypes.PUBLIC].description)," ")}}function St(n,r){n&1&&(w(),a(0,"svg",54),C(1,"path",55),c())}function It(n,r){n&1&&(w(),a(0,"svg",56),C(1,"path",57),c())}var se=(()=>{let r=class r{constructor(e,t,o,l,_,I,N,ee,y,z,f){this.analyticsService=e,this.authService=t,this.configService=o,this.docService=l,this.documentUserAccessService=_,this.serviceBook=I,this.loggingService=N,this.iamService=ee,this.toastService=y,this.dialogRef=z,this.usersToInvite=[],this.documentUsers=[],this.huddleInvitees=[],this.huddleUsers=[],this.huddleUsersByEmailMap={},this.userRoles=[],this.excludeContacts=[],this.linkCopied=!1,this.hideAccessControlDropdown=!1,this.subscriptions=[],this.title="Share project",this.placeholder="Add email address",this.documentAccessType="",this.DocumentAccessTypes=Ae,this.isUserAdmin=!1,this.documentAccessTypeMap=L.DocumentAccessTypeMap,this.documentUserAccessList=!0,this.veltElement=!0;try{f&&(this.hideAccessControlDropdown=!!f.hideAccessControlDropdown,this.type=f.type,this.source=f.source,f.title&&(this.title=f.title),f.placeholder&&(this.placeholder=f.placeholder),this.documentUserAccessList=!!f.documentUserAccessList,this.inviteUrl=f.inviteUrl),this.subscriptions.push(this.authService.getUser$().subscribe(v=>{this.user=v})),this.subscriptions.push(this.iamService.isUserAdmin$().subscribe(v=>{this.isUserAdmin=v})),this.subscriptions.push(this.configService.getSF$().subscribe(v=>{v?this.documentAccessTypeMap=L.DocumentAccessTypeMapSF:this.documentAccessTypeMap=L.DocumentAccessTypeMap})),this.type!=="invite"&&this.subscriptions.push(this.documentUserAccessService.getDocumentUsers$().subscribe(v=>{this.documentUsers=v,this.updateExcludeContacts()})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getRoles$().subscribe(v=>{this.userRoles=v,this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(F=>F.name===P.COMMENTER))})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getDocumentIAM$().subscribe(v=>{this.documentAccessType=this.docService.getDocumentAccessType(v)})),this.type==="invite"&&(this.subscriptions.push(this.serviceBook.observe(J).pipe(R(v=>v?.getHuddleAttendees$()??te)).subscribe(v=>{this.huddleUsers=v,this.huddleUsersByEmailMap={},v.forEach(F=>{F.email&&(this.huddleUsersByEmailMap[F.email]=F)})})),this.subscriptions.push(this.serviceBook.observe(J).pipe(R(v=>v?.getHuddleInvitees$()??te)).subscribe(v=>{this.huddleInvitees=v})))}catch(v){this.loggingService.catch("Error in UserInviteDialogComponent constructor: ",v)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-user-invite-dialog"),this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(e=>e.name===P.COMMENTER))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnInit: ",e)}}updateExcludeContacts(){try{this.excludeContacts=[],this.excludeContacts.push(...this.documentUsers.map(e=>e.user)),this.excludeContacts.push(...this.usersToInvite.map(e=>e.user))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent updateExcludeContacts: ",e)}}trackByDocumentUserId(e,t){return t.id}trackByHuddleUserId(e,t){return t.userSnippylyId||t.userId}trackByHuddleInviteeId(e,t){return t.userId||t.email}selectRole(e){try{this.selectedUserRole=e}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent selectRole: ",t)}}onUserSelected(e){try{let t=new ke;t.id=e.email?V(e.email):V(e.userId),t.user=e,this.usersToInvite.find(o=>o.id===t.id)||this.usersToInvite.push(t),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent onUserSelected: ",t)}}inviteSelectedUsers(){try{if(this.usersToInvite?.length)if(this.type==="invite"){let e=this.usersToInvite.map(t=>t.user);this.analyticsService.trackEvent(O.Events.InviteDialog.USER_INVITED,{source:this.source}),this.serviceBook.get(J)?.inviteUsers(e),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}else{this.usersToInvite.forEach(l=>{this.selectedUserRole&&(l.role=this.selectedUserRole)});let e=this.usersToInvite.filter(l=>l.role?.name===P.ADMIN).map(l=>l.user.email),t=this.usersToInvite.filter(l=>l.role?.name===P.COMMENTER).map(l=>l.user.email),o={actionType:Pe.INVITE,userInvite:{admin:e?.length?{emails:e,emailProperties:{url:this.getInviteUrl()}}:void 0,commenter:t?.length?{emails:t,clientDocumentId:this.docService.getDocumentPaths()?.clientDocumentId,documentId:this.docService.getDocumentPaths()?.documentId,clientOrganizationId:this.user?.clientOrganizationId,organizationId:this.user?.organizationId,emailProperties:{url:this.getInviteUrl()}}:void 0}};this.documentUserAccessService.updateNotificationsDatabase(o),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}this.usersToInvite=[]}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent inviteSelectedUsers: ",e)}}removeSelectedUserToInvite(e){try{this.usersToInvite=this.usersToInvite.filter(t=>t.id!==e.id),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeSelectedUserToInvite: ",t)}}updateUserRole(e,t){try{let o=e?.role?.name,l=t?.name;e.role=t,this.documentUserAccessService.updateDocumentUser(e,{oldAccess:o,newAccess:l})}catch(o){this.loggingService.catch("Error in UserInviteDialogComponent updateUserRole: ",o)}}removeUser(e){try{this.analyticsService.trackEvent(O.Events.ShareDialog.DOCUMENT_USER_ACCESS_REMOVED,{targetUserId:e?.user?.userId,targetUserEmail:e?.user?.email,roleType:e?.role?.name}),this.documentUserAccessService.removeDocumentUser(e),this.toastService.setToast({message:"User removed!",type:"success",duration:2e3})}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeUser: ",t)}}getInviteUrl(){try{return this.inviteUrl||window.location.href}catch(e){return this.loggingService.catch("Error in UserInviteDialogComponent getInviteUrl: ",e),""}}copyLink(){try{let e=this.getInviteUrl();this.linkCopied=!0,Be(e),setTimeout(()=>{this.linkCopied=!1},2e3),this.type==="invite"?this.analyticsService.trackEvent(O.Events.InviteDialog.INVITE_LINK_COPIED,{source:this.source}):this.type==="share"&&this.analyticsService.trackEvent(O.Events.ShareDialog.SHARE_LINK_COPIED)}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent copyLink: ",e)}}changeDocumentAccessType(e){try{this.documentAccessType!==e&&(this.analyticsService.trackEvent(O.Events.ShareDialog.DOCUMENT_ACCESS_CHANGED,{oldAccessType:this.documentAccessType,newAccessType:e}),this.docService.changeDocumentAccessType(e),this.toastService.setToast({message:"Access changed to '"+e+"'.",type:"success",duration:2e3}))}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent changeDocumentAccessType: ",t)}}closeDialog(){try{this.dialogRef.close()}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnDestroy: ",e)}}};r.\u0275fac=function(t){return new(t||r)(g(K),g(W),g(Y),g(q),g(Qe),g(Le),g(A),g(Ke),g(We),g(Me),g(Ee,8))},r.\u0275cmp=H({type:r,selectors:[["snippyly-user-invite-dialog"]],hostVars:1,hostBindings:function(t,o){t&2&&$("data-velt-element",o.veltElement)},standalone:!1,decls:32,vars:27,consts:[["userSelectorRef",""],["triggerTemplate",""],["tooltipTemplate",""],[1,"s-video-settings-modal",3,"click","pointerdown","pointerup"],[1,"s-video-header"],[1,"s-video-header-name"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-cursor-pointer",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","#80808A"],[1,"s-video-settings-modal-item"],[1,"s-input"],[1,"s-input-chip-list-container"],[1,"s-chip-list"],[4,"ngFor","ngForOf"],[1,"s-input-user-selector",3,"optionSelected","placeholder","enableOnFocus"],["class","s-role dropdown",3,"disabled",4,"ngIf"],["class","s-video-settings-modal-item s-people-list-container",4,"ngIf"],["class","s-general-access-container",4,"ngIf"],[1,"s-buttons-wrap"],[1,"s-button","s-secondary",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary",3,"click"],[1,"s-chip"],[1,"s-chip-user"],[1,"s-chip-remove",3,"click"],["width","14","height","14","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],[1,"s-role","dropdown"],[1,"dropdown-content"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"dropdown-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.79289 9.79289C8.18342 9.40237 8.81658 9.40237 9.20711 9.79289L12 12.5858L14.7929 9.79289C15.1834 9.40237 15.8166 9.40237 16.2071 9.79289C16.5976 10.1834 16.5976 10.8166 16.2071 11.2071L12.7071 14.7071C12.3166 15.0976 11.6834 15.0976 11.2929 14.7071L7.79289 11.2071C7.40237 10.8166 7.40237 10.1834 7.79289 9.79289Z","fill","#D4D6DF"],[1,"dropdown-item",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#80808A"],[1,"s-video-settings-modal-item","s-people-list-container"],[1,"s-people-list-title"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"s-user"],[1,"s-user-info"],[1,"s-flex",3,"user","background"],[1,"s-role"],[3,"disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#404044"],[1,"dropdown-item","border-top",3,"click"],["class","s-user",4,"ngIf"],[1,"s-general-access-container"],[1,"s-general-access-title"],[1,"s-button","s-secondary","s-document-access-btn","dropdown"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 11C10.2274 11 8.64844 11.0646 7.35838 11.1466C6.13471 11.2243 5.19379 12.158 5.10597 13.373C5.0435 14.2373 5 15.1481 5 16C5 16.8519 5.0435 17.7627 5.10597 18.627C5.19379 19.842 6.13471 20.7757 7.35838 20.8534C8.64844 20.9354 10.2274 21 12 21C13.7726 21 15.3516 20.9354 16.6416 20.8534C17.8653 20.7757 18.8062 19.842 18.894 18.627C18.9565 17.7627 19 16.8519 19 16C19 15.1481 18.9565 14.2373 18.894 13.373C18.8062 12.158 17.8653 11.2243 16.6416 11.1466C15.3516 11.0646 13.7726 11 12 11ZM7.2315 9.15059C5.01376 9.29156 3.27137 11.0124 3.11117 13.2288C3.04652 14.1234 3 15.085 3 16C3 16.915 3.04652 17.8766 3.11118 18.7712C3.27137 20.9876 5.01376 22.7084 7.23151 22.8494C8.55778 22.9337 10.1795 23 12 23C13.8205 23 15.4422 22.9337 16.7685 22.8494C18.9862 22.7084 20.7286 20.9876 20.8888 18.7712C20.9535 17.8766 21 16.915 21 16C21 15.085 20.9535 14.1234 20.8888 13.2288C20.7286 11.0124 18.9862 9.29156 16.7685 9.15059C15.4422 9.06629 13.8205 9 12 9C10.1795 9 8.55778 9.06629 7.2315 9.15059Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M13 16.7324C13.5978 16.3866 14 15.7403 14 15C14 13.8954 13.1046 13 12 13C10.8954 13 10 13.8954 10 15C10 15.7403 10.4022 16.3866 11 16.7324V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V16.7324Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 6C7 3.23858 9.23858 1 12 1C14.7614 1 17 3.23858 17 6V10C17 10.5523 16.5523 11 16 11C15.4477 11 15 10.5523 15 10V6C15 4.34315 13.6569 3 12 3C10.3431 3 9 4.34315 9 6V10C9 10.5523 8.55228 11 8 11C7.44772 11 7 10.5523 7 10V6Z","fill","#777E91"],[1,"s-document-access-btn-content"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.49027 2.50491C6.46607 2.50996 6.34731 2.53007 6.22635 2.54966C5.17052 2.72053 4.19457 3.45245 3.69214 4.45019C3.56689 4.69886 3.43711 5.08311 3.37864 5.3784C3.31829 5.68302 3.31829 14.3108 3.37864 14.6154C3.52088 15.3336 3.85013 15.9526 4.36233 16.4647C4.76978 16.8722 5.22723 17.1555 5.75266 17.3256C6.23219 17.4809 6.32453 17.4891 7.59205 17.4891H8.76711L8.88599 17.4104C9.06906 17.2893 9.14407 17.146 9.14407 16.9173C9.14407 16.6887 9.06909 16.5453 8.88611 16.4242L8.76728 16.3455L7.6068 16.3286C6.3852 16.3109 6.35854 16.3081 5.96566 16.1588C5.43291 15.9564 4.86723 15.3934 4.67143 14.8707C4.49992 14.4129 4.51091 14.747 4.51091 9.9969C4.51091 5.24677 4.49992 5.58091 4.67143 5.12308C4.88025 4.56564 5.45367 4.01728 6.0476 3.80712C6.46364 3.65989 6.4966 3.65865 9.67189 3.66895C12.8862 3.67939 12.6707 3.6688 13.1239 3.83838C13.3521 3.92374 13.6919 4.15074 13.8939 4.35272C14.0958 4.5547 14.3228 4.89447 14.4082 5.12264C14.5641 5.53916 14.5639 5.53763 14.5816 6.87392L14.5983 8.13484L14.6679 8.24677C14.7061 8.30835 14.791 8.39412 14.8563 8.43737C14.9554 8.50291 15.0078 8.51605 15.1701 8.51605C15.3324 8.51605 15.3848 8.50291 15.4839 8.43737C15.5492 8.39412 15.6341 8.30835 15.6723 8.24677L15.7419 8.13484V6.85925C15.7419 5.89002 15.7321 5.53438 15.7012 5.3784C15.4231 3.97403 14.4078 2.9182 13.0001 2.56948C12.7554 2.50887 12.6941 2.50764 9.64257 2.50177C7.93299 2.49849 6.51446 2.4999 6.49027 2.50491ZM10.1326 4.86732C10.0008 4.90764 9.81429 5.10144 9.77661 5.23721C9.75922 5.29976 9.74547 5.6244 9.74538 5.97344C9.74517 6.73161 9.7789 6.93488 9.97026 7.32843C10.0835 7.56132 10.1471 7.64839 10.358 7.85928C10.5687 8.06997 10.6561 8.13387 10.8888 8.24715C11.3004 8.44752 11.4993 8.4781 12.3174 8.46675L12.9899 8.4574L13.1087 8.37872C13.2923 8.25712 13.3667 8.11437 13.3667 7.88344C13.3667 7.72342 13.3533 7.6705 13.288 7.57182C13.2448 7.50646 13.159 7.42162 13.0974 7.38336C12.9898 7.31647 12.9581 7.31319 12.2817 7.29876C11.6484 7.28524 11.5646 7.27759 11.4445 7.22234C11.2497 7.13276 11.1074 6.99491 11.0146 6.80594C10.9336 6.64091 10.9327 6.63267 10.9182 5.93556C10.904 5.25876 10.9008 5.2275 10.8339 5.11986C10.6956 4.89741 10.3918 4.788 10.1326 4.86732ZM15.7049 9.14973C15.3168 9.21439 14.8688 9.42637 14.5091 9.71547C14.1903 9.97168 12.9551 11.227 12.785 11.4677C12.6151 11.708 12.4379 12.0846 12.3662 12.3575C12.2934 12.6347 12.2934 13.2178 12.3662 13.4864C12.4763 13.8923 12.7739 14.3816 12.9941 14.5185C13.1571 14.6198 13.4451 14.6146 13.6071 14.5074C13.7916 14.3853 13.8652 14.2433 13.8652 14.0094C13.8652 13.8346 13.8552 13.8007 13.7698 13.6869C13.7174 13.6169 13.6316 13.474 13.5792 13.3691C13.4922 13.1949 13.4842 13.1559 13.4861 12.9146C13.4901 12.4126 13.6018 12.2459 14.588 11.2695C15.3768 10.4885 15.479 10.4117 15.8541 10.3176C16.4471 10.1688 17.0959 10.642 17.1542 11.2659C17.1867 11.6138 17.0539 11.95 16.7418 12.3102C16.554 12.527 16.5067 12.6446 16.5261 12.8468C16.5522 13.1185 16.7716 13.3292 17.0627 13.362C17.163 13.3733 17.2272 13.3595 17.3476 13.3006C17.6751 13.1404 18.1188 12.4832 18.2617 11.9469C18.4137 11.3768 18.3213 10.7383 18.0102 10.209C17.8837 9.99361 17.4606 9.57059 17.2452 9.444C16.7724 9.16618 16.2292 9.06241 15.7049 9.14973ZM14.7568 12.1471C14.6858 12.1846 14.588 12.2715 14.5396 12.3402C14.4628 12.4494 14.4517 12.4903 14.4517 12.6643C14.4517 12.846 14.4612 12.8773 14.5601 13.021C14.869 13.4698 14.893 13.8775 14.6373 14.3344C14.5091 14.5636 13.051 16.0217 12.8218 16.15C12.3282 16.4261 11.818 16.3718 11.4502 16.0041C11.1691 15.723 11.0679 15.3616 11.1645 14.9843C11.2245 14.75 11.3364 14.5523 11.5457 14.3107C11.7336 14.0939 11.7808 13.9764 11.7614 13.7742C11.7353 13.5024 11.5159 13.2917 11.2249 13.259C11.1245 13.2476 11.0603 13.2615 10.9399 13.3204C10.6125 13.4806 10.1687 14.1377 10.0258 14.674C9.87388 15.2442 9.96627 15.8826 10.2773 16.4119C10.4039 16.6273 10.8269 17.0504 11.0423 17.177C11.5716 17.488 12.2101 17.5804 12.7802 17.4284C13.0265 17.3628 13.41 17.1783 13.6407 17.0145C13.8608 16.858 14.9432 15.8056 15.2867 15.4139C15.9653 14.64 16.1624 13.7239 15.8293 12.8919C15.562 12.2242 15.1512 11.9389 14.7568 12.1471Z","fill","#80808A"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#ABABB5"]],template:function(t,o){if(t&1){let l=T();a(0,"div",3),x("click",function(I){return b(l),S(I.stopPropagation())})("pointerdown",function(I){return b(l),S(I.stopPropagation())})("pointerup",function(I){return b(l),S(I.stopPropagation())}),a(1,"div",4)(2,"div",5),m(3),p(4,"translate"),c(),w(),a(5,"svg",6),x("click",function(){return b(l),S(o.closeDialog())}),C(6,"path",7),c()(),j(),a(7,"div",8),m(8),p(9,"translate"),a(10,"div",9)(11,"div",10)(12,"div",11),U(13,ct,7,1,"ng-container",12),c(),a(14,"velt-autocomplete-panel-internal",13,0),p(16,"translate"),x("optionSelected",function(I){return b(l),S(o.onUserSelected(I))}),c()(),U(17,pt,7,6,"div",14),c()(),U(18,ht,6,6,"div",15)(19,yt,6,7,"div",15)(20,bt,40,31,"div",16),a(21,"div",17)(22,"div",18),x("click",function(){return b(l),S(o.copyLink())}),U(23,St,2,0,"svg",19)(24,It,2,0,"svg",20),m(25),p(26,"translate"),p(27,"translate"),c(),C(28,"div",21),a(29,"div",22),x("click",function(){return b(l),S(o.inviteSelectedUsers())}),m(30),p(31,"translate"),c()()()}t&2&&(s(3),M(" ",d(4,15,o.title)," "),s(5),M(" ",d(9,17,"Invite users")," "),s(5),u("ngForOf",o.usersToInvite),s(),u("placeholder",d(16,19,o.placeholder))("enableOnFocus",!1),s(3),u("ngIf",!o.hideAccessControlDropdown),s(),u("ngIf",o.documentUserAccessList&&(o.documentUsers==null?null:o.documentUsers.length)),s(),u("ngIf",(o.huddleInvitees==null?null:o.huddleInvitees.length)||(o.huddleUsers==null?null:o.huddleUsers.length)),s(),u("ngIf",o.isUserAdmin&&!o.hideAccessControlDropdown),s(3),u("ngIf",!o.linkCopied),s(),u("ngIf",o.linkCopied),s(),M(" ",o.linkCopied?d(26,21,"Link Copied!"):d(27,23,"Copy Link")," "),s(4),Z("s-disabled",!(o.usersToInvite!=null&&o.usersToInvite.length)),s(),D(d(31,25,"Send invite")))},dependencies:[_e,ye,Ge,Ze,$e,Ie,He],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#dcdde0!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}*[_ngcontent-%COMP%]{box-sizing:border-box}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%], .s-buttons-wrap[_ngcontent-%COMP%], .s-role[_ngcontent-%COMP%], .s-user[_ngcontent-%COMP%], .s-user-info[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#ababb5!important;font-size:.8rem!important;gap:1rem!important}.s-people-list-container[_ngcontent-%COMP%]{overflow:auto!important}.s-people-list-container[_ngcontent-%COMP%] .s-people-list-title[_ngcontent-%COMP%]{position:sticky!important;top:0!important;background:#141416!important;width:100%!important;z-index:1!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:2rem!important;gap:2rem!important;background:#141416!important;border-radius:1rem!important;max-width:42rem!important;width:80vw!important;border:2px solid #303034!important;overflow:auto!important;max-height:80vh!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important}.s-video-header-name[_ngcontent-%COMP%]{gap:.5rem!important;font-weight:600!important;font-size:1.2rem!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-secondary[_ngcontent-%COMP%]{border:2px solid #303034!important;border-radius:.5rem!important;color:#ababb5!important;gap:.5rem!important}.s-secondary[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:1rem!important;color:#fff!important;padding:.5rem 0!important}.s-input[_ngcontent-%COMP%]{padding:1rem!important;color:#ababb5!important;width:100%!important;justify-content:space-between!important;border-radius:1rem!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.s-buttons-wrap[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important;align-items:stretch!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-user[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important}.s-user-info[_ngcontent-%COMP%]{color:#ababb5!important;gap:.75rem!important}.s-user[_ngcontent-%COMP%] .s-role[_ngcontent-%COMP%]{color:#404044!important}.s-role[_ngcontent-%COMP%]{position:relative!important;cursor:pointer!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:100%!important;right:0!important;z-index:10!important}.dropdown[_ngcontent-%COMP%] .dropdown-content.top[_ngcontent-%COMP%]{top:auto!important;bottom:2rem!important}.dropdown-content[_ngcontent-%COMP%]{min-width:max-content!important;overflow:hidden!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:.5rem!important;border:1px solid #303034!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#ababb5!important;background:#141416!important;cursor:pointer!important;transition:.2s ease!important}.dropdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#ababb5!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{display:none!important;visibility:hidden!important;opacity:0!important}.dropdown[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{width:24px!important;min-width:24px!important}.dropdown.disabled[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{display:none!important}.dropdown[_ngcontent-%COMP%]:not(.disabled):hover .dropdown-content[_ngcontent-%COMP%]{display:flex!important;visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:1em 2rem 1rem 1rem!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:1em!important;line-height:1rem!important;border-radius:0!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown-item[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff!important;margin:0!important}.dropdown-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.border-top[_ngcontent-%COMP%]{outline:solid 1px #303034!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important}.s-input-chip-list-container[_ngcontent-%COMP%]{display:flex;width:100%!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%]{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%]{padding:8px 16px!important;background:#222226!important;color:#dcdde0!important;border-radius:100px!important;display:flex!important;align-items:center!important;gap:8px!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%] .s-chip-remove[_ngcontent-%COMP%]{display:flex!important;cursor:pointer!important}.s-input-chip-list-container[_ngcontent-%COMP%] velt-autocomplete-panel-internal.s-input-user-selector[_ngcontent-%COMP%]{flex-basis:250px!important}.s-general-access-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;width:100%!important;gap:8px!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%]{position:relative!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%]{position:relative!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;justify-content:flex-start!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{left:0!important;top:auto!important;bottom:100%!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#ababb5!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector{flex-grow:1!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector input{background:transparent!important;border:0!important;outline:0!important;color:#fff!important}@media screen and (max-width:425px){ .velt-mat-dialog-container.snippyly-user-invite-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-video-settings-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-chip-user{word-break:break-all!important}}"],changeDetection:0});let n=r;return n})();function wt(n,r){n&1&&(a(0,"div",4),w(),a(1,"svg",5)(2,"g"),C(3,"path",6)(4,"path",7)(5,"path",8),c()()())}function xt(n,r){if(n&1){let i=T();a(0,"div")(1,"slot",9),x("slotchange",function(){b(i);let t=h();return S(t.onButtonSlotChange())}),a(2,"div",10),w(),a(3,"svg",11),C(4,"path",12),c()()()()}}var X=(()=>{let r=class r extends ze{set _disabled(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.disabled=t}set _documentUserAccessList(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.documentUserAccessList=t}constructor(e,t,o,l,_,I,N){super(_,o,void 0,void 0,void 0,I,t),this.analyticsService=e,this.loggingService=t,this.themeService=o,this.dialog=l,this.elementRef=_,this.dynamicDataService=I,this.domService=N,this.type="share",this.disabled=!1,this.documentUserAccessList=!0,this.hideAccessControlDropdown=!1,this.accessControlDropdown=!0,this.veltElement=!0,this.customButtonAdded=!1}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(e){this.loggingService.catch("Error in UserInviteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.customCssSubscription?.unsubscribe()}catch(e){this.loggingService.catch("Error in UserInviteToolComponent ngOnDestroy: ",e)}}onButtonSlotChange(){this.customButtonAdded=!0}openInviteDialog(){try{this.disabled||(this.type==="share"&&this.analyticsService.trackEvent(O.Events.ShareDialog.SHARE_BUTTON_CLICKED),this.dialog.open(se,{panelClass:"velt-mat-dialog-container",backdropClass:"s-background-blur-1",data:{title:this.title,placeholder:this.placeholder,hideAccessControlDropdown:this.hideAccessControlDropdown||!this.accessControlDropdown,type:this.type,source:this.source,documentUserAccessList:this.documentUserAccessList,inviteUrl:this.inviteUrl}}))}catch(e){this.loggingService.catch("Error in UserInviteToolComponent openInviteDialog: ",e)}}};r.\u0275fac=function(t){return new(t||r)(g(K),g(A),g(Fe),g(Te),g(ve),g(Q),g(Ve))},r.\u0275cmp=H({type:r,selectors:[["snippyly-user-invite-tool-internal"]],hostVars:1,hostBindings:function(t,o){t&2&&$("data-velt-element",o.veltElement)},inputs:{type:"type",source:"source",title:"title",placeholder:"placeholder",inviteUrl:"inviteUrl",_disabled:[0,"disabled","_disabled"],_documentUserAccessList:[0,"documentUserAccessList","_documentUserAccessList"],hideAccessControlDropdown:"hideAccessControlDropdown",accessControlDropdown:"accessControlDropdown"},standalone:!1,features:[fe([Q]),Ce],decls:4,vars:3,consts:[["part","container",1,"s-user-invite-tool-container","s-cursor-pointer",3,"click"],[1,"s-user-invite-tool-default",3,"ngSwitch"],["class","s-user-invite-tool-button",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"s-user-invite-tool-button"],["width","32","height","32","viewBox","0 0 32 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.3589 13.3008C17.3965 13.3008 15.6521 14.2519 14.5622 15.7174C14.1206 15.6247 13.6692 15.5768 13.2136 15.5768C9.6054 15.5768 6.66992 18.5123 6.66992 22.1205C6.66992 22.5918 7.05207 22.974 7.52344 22.974H14.67C15.7651 24.3594 17.4599 25.25 19.3589 25.25C22.6533 25.25 25.3335 22.5698 25.3335 19.2754C25.3335 15.981 22.6533 13.3008 19.3589 13.3008ZM8.45235 21.2669C8.85669 19.0058 10.8378 17.2839 13.2136 17.2839C13.3823 17.2839 13.5501 17.2933 13.7166 17.3104C13.5016 17.9261 13.3843 18.5873 13.3843 19.2754C13.3843 19.9735 13.505 20.6437 13.726 21.2669H8.45235ZM19.3589 23.543C17.0057 23.543 15.0913 21.6286 15.0913 19.2754C15.0913 16.9223 17.0057 15.0078 19.3589 15.0078C21.712 15.0078 23.6265 16.9223 23.6265 19.2754C23.6265 21.6286 21.712 23.543 19.3589 23.543Z","fill","white"],["d","M13.2132 13.8716C15.182 13.8716 16.7837 12.2699 16.7837 10.3011C16.7837 8.33224 15.182 6.73047 13.2132 6.73047C11.2443 6.73047 9.64258 8.33224 9.64258 10.3011C9.64258 12.2699 11.2443 13.8716 13.2132 13.8716ZM13.2132 8.4375C14.2408 8.4375 15.0767 9.2735 15.0767 10.3011C15.0767 11.3286 14.2408 12.1645 13.2132 12.1645C12.1856 12.1645 11.3496 11.3286 11.3496 10.3011C11.3496 9.2735 12.1856 8.4375 13.2132 8.4375Z","fill","white"],["d","M21.0664 18.4219H20.2129V17.5684C20.2129 17.097 19.8308 16.7148 19.3594 16.7148C18.888 16.7148 18.5059 17.097 18.5059 17.5684V18.4219H17.6523C17.181 18.4219 16.7988 18.804 16.7988 19.2754C16.7988 19.7468 17.181 20.1289 17.6523 20.1289H18.5059V20.9824C18.5059 21.4538 18.888 21.836 19.3594 21.836C19.8308 21.836 20.2129 21.4538 20.2129 20.9824V20.1289H21.0664C21.5378 20.1289 21.9199 19.7468 21.9199 19.2754C21.9199 18.804 21.5378 18.4219 21.0664 18.4219Z","fill","white"],["name","button",3,"slotchange"],["part","button-container",1,"action-btn"],["part","button-icon","width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M8.57143 9.42858H7.71429C7.25963 9.42858 6.82359 9.60919 6.5021 9.93068C6.18061 10.2522 6 10.6882 6 11.1429V18C6 18.4547 6.18061 18.8907 6.5021 19.2122C6.82359 19.5337 7.25963 19.7143 7.71429 19.7143H16.2857C16.7404 19.7143 17.1764 19.5337 17.4979 19.2122C17.8194 18.8907 18 18.4547 18 18V11.1429C18 10.6882 17.8194 10.2522 17.4979 9.93068C17.1764 9.60919 16.7404 9.42858 16.2857 9.42858H15.4286M12 13.7143V4.28572M12 4.28572L9.42857 6.85715M12 4.28572L14.5714 6.85715","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,o){t&1&&(a(0,"div",0),x("click",function(){return o.openInviteDialog()}),a(1,"div",1),U(2,wt,6,0,"div",2)(3,xt,5,0,"div",3),c()()),t&2&&(s(),u("ngSwitch",o.type),s(),u("ngSwitchCase","invite"),s(),u("ngSwitchCase","share"))},dependencies:[be,Se],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}:host{display:inline-flex!important}.s-user-invite-tool-container{display:inline-block!important}.s-user-invite-tool-button{display:flex!important}.action-btn{display:inline-flex;justify-content:center;align-items:center;padding:6px!important;border-radius:var(--legacy-velt-tool-border-radius);border:var(--legacy-velt-tool-border);background-color:var(--legacy-velt-tool-bg-color);color:var(--legacy-velt-tool-icon-color);cursor:pointer}.action-btn .action-btn-label{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:4px!important;font-weight:700!important;color:currentColor!important}.action-btn .action-btn-icon{width:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));color:currentColor}.action-btn .toolbar-icon-dropdown-arrow{width:16px;height:16px;color:currentColor}.action-btn:focus{border-radius:var(--legacy-velt-tool-focus-border-radius);border:var(--legacy-velt-tool-focus-border);background-color:var(--legacy-velt-tool-focus-bg-color);color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:focus .action-btn-icon{width:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:focus .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:hover{border-radius:var(--legacy-velt-tool-hover-border-radius);border:var(--legacy-velt-tool-hover-border);background-color:var(--legacy-velt-tool-hover-bg-color);color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:hover .action-btn-icon{width:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:hover .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:active,.action-btn.active{border-radius:var(--legacy-velt-tool-active-border-radius);border:var(--legacy-velt-tool-active-border);background-color:var(--legacy-velt-tool-active-bg-color);color:var(--legacy-velt-tool-active-icon-color)}.action-btn:active .action-btn-icon,.action-btn.active .action-btn-icon{width:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:active .toolbar-icon-dropdown-arrow,.action-btn.active .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-active-icon-color)}
|
|
1
|
+
import{a as We}from"./chunk-PVOJRXAC.js";import{b as Ye}from"./chunk-ADSEZJIT.js";import{b as $e,j as Ge,t as Je}from"./chunk-3CWPPM3P.js";import"./chunk-CI2JGL4P.js";import{l as Ue}from"./chunk-RSPIT2S4.js";import"./chunk-PRGWBNVO.js";import"./chunk-IE3AYTRD.js";import"./chunk-UGCJET7Y.js";import"./chunk-POBWY53V.js";import"./chunk-BPPXBXFT.js";import{b as He,d as Ze}from"./chunk-QX6IGTVL.js";import{a as Ke}from"./chunk-4MGSKBFZ.js";import{a as De}from"./chunk-AE6AKOBL.js";import{I as xe,W as Me,X as Ee,Y as Te,ba as Oe,ca as Ne,da as Q,ea as Fe,ga as ze}from"./chunk-CVMNWHT4.js";import{$ as me,Ai as Re,Cf as V,Ch as P,E as ie,Ee as L,Fa as s,Fc as _e,Fi as q,Gc as ye,Hc as be,Ic as Se,J as ne,Jb as G,Kb as Z,Mc as Ie,Nb as m,Nh as J,Ob as D,Pa as g,Pb as M,Pc as we,Pi as je,T as R,Ta as ge,Ua as H,Va as he,Ya as Ce,Ye as ke,_a as U,_b as fe,a as ae,aa as ue,ca as E,db as $,g as ce,ha as b,he as Pe,ia as S,ii as Le,ja as w,ji as K,ka as j,kc as p,ki as A,l as le,lb as u,lc as d,li as Y,mb as a,nb as c,ob as C,p as te,pc as oe,r as pe,sb as k,si as Ve,tb as B,te as O,ti as W,ue as Ae,v as de,vb as T,wa as ve,xb as x,xg as Be,zb as h}from"./chunk-FXK7BWOQ.js";var Qe=(()=>{let r=class r{constructor(e,t,o,l,_,I,N,ee){this.authService=e,this.configService=t,this.contactService=o,this.docService=l,this.commonDbService=_,this.databaseService=I,this.loggingService=N,this.notificationService=ee,this.documentUsers$=new le([]);try{this.databaseService.getDb().pipe(ie(y=>!!y),ne(1)).subscribe(y=>{y&&this.subscribeUsersFromDocument()}),this.authService.getUser$().subscribe(y=>{if(y?.email){this.subscribeUsersFromDocument();let z=V(y.email);y?.organizationId&&(z=V(y.userId)),this.getDocumentUserByIdFromDb(z).then(f=>{f&&(f.user.name=y.name,f.user.photoUrl=y.photoUrl,this.updateDocumentUser(f))}).catch(f=>{this.loggingService.catch("Error in DocumentUserAccessService getDocumentUserByIdFromDb:",f)})}},y=>{this.loggingService.catch("Error in DocumentUserAccessService getUser$:",y)})}catch(y){this.loggingService.catch("Error in DocService constructor:",y)}}getDocumentUserByIdFromDb(e){return ce(this,null,function*(){try{let t=this.docService.getDocumentPaths();return t?(yield this.commonDbService.dbListener({feature:"documentUser",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!1,id:e}}).pipe(ne(1)).toPromise())?.data:void 0}catch(t){this.loggingService.catch("Error in DocService getDocumentUserById:",t);return}})}subscribeUsersFromDocument(){try{this.documentUsersSubscription&&this.documentUsersSubscription.unsubscribe(),this.documentUsersSubscription=this.authService.getUser$().pipe(R(e=>e?this.docService.getDocumentPaths$().pipe(ie(t=>!!t),R(t=>this.commonDbService.dbListener({feature:"allDocumentUsers",properties:{documentId:t?.documentId,organizationId:t?.organizationId,isCollection:!0}}).pipe(de(o=>o?.data?Object.values(o?.data):[])))):pe([]))).subscribe(e=>{this.documentUsers$.next(e)},e=>{this.loggingService.catch("Error in DocService subscribeUsersFromDocument subscription:",e)})}catch(e){this.loggingService.catch("Error in DocService subscribeUsersFromDocument:",e)}}getDocumentUsers$(){return this.documentUsers$.asObservable()}addDocumentUser(e){try{let t=this.authService.getUser();if(t){if(this.configService.getSF()){if(e?.role?.name===O.ADMIN)this.contactService.addGlobalContact(e.user);else if(e?.role?.name===O.COMMENTER){let l=t.groupId;if(l){let _=JSON.parse(JSON.stringify(e.user));_.visibility="group",this.contactService.setLoggedInUserGroupContacts(l,[_])}}}e.id=V(e?.user?.email),e.invitedBy=t,e.invitedDate=this.timestamp;let o=this.docService.getDocumentPaths();o&&this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:o?.documentId??"",organizationId:o?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}else this.loggingService.error("Error in DocService addDocumentUser: User not found")}catch(t){this.loggingService.catch("Error in DocService addDocumentUser:",t)}}updateDocumentUser(e,t={}){try{let o=this.authService.getUser();if(o){e.updatedBy=o,e.updatedDate=this.timestamp;let l=this.docService.getDocumentPaths();this.commonDbService.updateData({feature:"documentUserAccess",properties:{id:e.id,documentId:l?.documentId??"",organizationId:l?.organizationId??""},data:JSON.parse(JSON.stringify(e))}),this.updateNotificationsDatabase(e)}}catch(o){this.loggingService.catch("Error in DocumentUserAccessService updateDocumentUser:",o)}}removeDocumentUser(e){try{let t=this.docService.getDocumentPaths();this.commonDbService.deleteData({feature:"documentUserAccess",properties:{id:e.id,documentId:t?.documentId??"",organizationId:t?.organizationId??""}})}catch(t){this.loggingService.catch("Error in DocumentUserAccessService removeDocumentUser:",t)}}updateNotificationsDatabase(e={}){try{let t=ae({notificationSource:"user"},e);this.notificationService.updateNotificationDatabase(t)}catch(t){this.loggingService.catch("Error in DocumentUserAccessService updateNotificationsDatabase: ",t)}}get timestamp(){return this.commonDbService.getServerTimestamp()}};r.\u0275fac=function(t){return new(t||r)(E(W),E(Y),E(Ne),E(q),E(je),E(Re),E(A),E(Ye))},r.\u0275prov=me({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();function ct(n,r){if(n&1){let i=T();k(0),a(1,"div",23)(2,"div",24),m(3),c(),a(4,"div",25),x("click",function(){let t=b(i).$implicit,o=h();return S(o.removeSelectedUserToInvite(t))}),w(),a(5,"svg",26),C(6,"path",7),c()()(),B()}if(n&2){let i=r.$implicit;s(3),D((i==null||i.user==null?null:i.user.name)||(i==null||i.user==null?null:i.user.email))}}function lt(n,r){if(n&1){let i=T();k(0),a(1,"div",31),x("click",function(){let t=b(i).$implicit,o=h(2);return S(o.selectRole(t))}),w(),a(2,"svg",32),C(3,"path",33),c(),j(),a(4,"div")(5,"h4"),m(6),p(7,"translate"),c(),a(8,"p"),m(9),p(10,"translate"),c()()(),B()}if(n&2){let i=r.$implicit,e=r.first,t=h(2);s(),Z("border-top",!e),s(),G("visibility",(t.selectedUserRole==null?null:t.selectedUserRole.id)===(i==null?null:i.id)?"visible":"hidden"),s(4),D(d(7,6,i==null?null:i.name)),s(3),D(d(10,8,i==null?null:i.description))}}function pt(n,r){if(n&1&&(a(0,"div",27)(1,"div",28),U(2,lt,11,10,"ng-container",12),c(),m(3),p(4,"translate"),w(),a(5,"svg",29),C(6,"path",30),c()()),n&2){let i=h();Z("disabled",!i.isUserAdmin),s(2),u("ngForOf",i.userRoles),s(),M(" ",d(4,4,i.selectedUserRole==null?null:i.selectedUserRole.name)," ")}}function dt(n,r){n&1&&(w(),a(0,"svg",32),C(1,"path",44),c())}function mt(n,r){if(n&1&&(a(0,"div",41),m(1),p(2,"translate"),U(3,dt,2,0,"svg",43),c()),n&2){let i=h().$implicit,e=h(2);s(),M(" ",d(2,2,i==null||i.role==null?null:i.role.name)," "),s(2),u("ngIf",e.isUserAdmin&&(i==null||i.user==null?null:i.user.email)!==(e.user==null?null:e.user.email))}}function ut(n,r){if(n&1){let i=T();a(0,"div",28)(1,"div",45),x("click",function(){b(i);let t=h().$implicit,o=h(2);return S(o.removeUser(t))}),m(2),p(3,"translate"),c()()}n&2&&(s(2),M(" ",d(3,1,"Remove")," "))}function vt(n,r){if(n&1&&(k(0),a(1,"div",38)(2,"div",39),C(3,"snippyly-user-avatar",40),m(4),c(),a(5,"div",41)(6,"app-overlay-tooltip",42),U(7,mt,4,4,"ng-template",null,1,oe)(9,ut,4,3,"ng-template",null,2,oe),c()()(),B()),n&2){let i=r.$implicit,e=h(2);s(3),u("user",i==null?null:i.user)("background","#625DF5"),s(),M(" ",(i==null||i.user==null?null:i.user.name)||(i==null||i.user==null?null:i.user.email)," "),s(2),u("disabled",!(e.isUserAdmin&&(i==null||i.user==null?null:i.user.email)!==(e.user==null?null:e.user.email)))}}function gt(n,r){n&1&&(k(0),a(1,"div"),m(2),p(3,"translate"),c(),B()),n&2&&(s(2),D(d(3,1,"No users are added.")))}function ht(n,r){if(n&1&&(a(0,"div",34)(1,"div",35),m(2),p(3,"translate"),c(),U(4,vt,11,4,"ng-container",36)(5,gt,4,3,"ng-container",37),c()),n&2){let i=h();s(2),D(d(3,4,"People on this project")),s(2),u("ngForOf",i.documentUsers)("ngForTrackBy",i.trackByDocumentUserId),s(),u("ngIf",!(i.documentUsers!=null&&i.documentUsers.length))}}function Ct(n,r){if(n&1&&(k(0),a(1,"div",38)(2,"div",39),C(3,"snippyly-user-avatar",40),m(4),p(5,"translate"),c()(),B()),n&2){let i=r.$implicit;s(3),u("user",i)("background","#625DF5"),s(),M(" ",d(5,3,(i==null?null:i.name)||(i==null?null:i.email))," ")}}function ft(n,r){if(n&1&&(a(0,"div",38)(1,"div",39),C(2,"snippyly-user-avatar",40),m(3),p(4,"translate"),c(),a(5,"div",27),m(6),p(7,"translate"),c()()),n&2){let i=h().$implicit;s(2),u("user",i)("background","#625DF5"),s(),M(" ",d(4,4,(i==null?null:i.name)||(i==null?null:i.email))," "),s(3),M(" ",d(7,6,"Invited")," ")}}function _t(n,r){if(n&1&&(k(0),U(1,ft,8,8,"div",46),B()),n&2){let i=r.$implicit,e=h(2);s(),u("ngIf",!e.huddleUsersByEmailMap[i==null?null:i.email])}}function yt(n,r){if(n&1&&(a(0,"div",34)(1,"div",35),m(2),p(3,"translate"),c(),U(4,Ct,6,5,"ng-container",36)(5,_t,2,1,"ng-container",36),c()),n&2){let i=h();s(2),D(d(3,5,"People on this huddle")),s(2),u("ngForOf",i.huddleUsers)("ngForTrackBy",i.trackByHuddleUserId),s(),u("ngForOf",i.huddleInvitees)("ngForTrackBy",i.trackByHuddleInviteeId)}}function bt(n,r){if(n&1){let i=T();a(0,"div",47)(1,"div",48),m(2),p(3,"translate"),c(),a(4,"div",49)(5,"div",28)(6,"div",31),x("click",function(){b(i);let t=h();return S(t.changeDocumentAccessType(t.DocumentAccessTypes.PUBLIC))}),w(),a(7,"svg",32),C(8,"path",33),c(),j(),a(9,"div")(10,"h3"),m(11),p(12,"translate"),p(13,"titlecase"),c(),a(14,"p"),m(15),p(16,"translate"),c()()(),a(17,"div",45),x("click",function(){b(i);let t=h();return S(t.changeDocumentAccessType(t.DocumentAccessTypes.RESTRICTED))}),w(),a(18,"svg",32),C(19,"path",33),c(),j(),a(20,"div")(21,"h3"),m(22),p(23,"translate"),p(24,"titlecase"),c(),a(25,"p"),m(26),p(27,"translate"),c()()()(),w(),a(28,"svg",32),C(29,"path",50)(30,"path",51)(31,"path",52),c(),j(),a(32,"div",53)(33,"h3"),m(34),p(35,"translate"),p(36,"titlecase"),c(),a(37,"p"),m(38),p(39,"translate"),c()()()()}if(n&2){let i=h();s(2),D(d(3,11,"General access")),s(5),G("visibility",!i.documentAccessType||i.documentAccessType===i.DocumentAccessTypes.PUBLIC?"visible":"hidden"),s(4),D(d(13,15,d(12,13,i.DocumentAccessTypes.PUBLIC))),s(4),D(d(16,17,i.documentAccessTypeMap[i.DocumentAccessTypes.PUBLIC]==null?null:i.documentAccessTypeMap[i.DocumentAccessTypes.PUBLIC].description)),s(3),G("visibility",i.documentAccessType===i.DocumentAccessTypes.RESTRICTED?"visible":"hidden"),s(4),D(d(24,21,d(23,19,i.DocumentAccessTypes.RESTRICTED))),s(4),D(d(27,23,i.documentAccessTypeMap[i.DocumentAccessTypes.RESTRICTED]==null?null:i.documentAccessTypeMap[i.DocumentAccessTypes.RESTRICTED].description)),s(8),D(d(36,27,d(35,25,i.documentAccessType||i.DocumentAccessTypes.PUBLIC))),s(4),M("",d(39,29,i.documentAccessTypeMap[i.documentAccessType?i.documentAccessType:i.DocumentAccessTypes.PUBLIC]==null?null:i.documentAccessTypeMap[i.documentAccessType?i.documentAccessType:i.DocumentAccessTypes.PUBLIC].description)," ")}}function St(n,r){n&1&&(w(),a(0,"svg",54),C(1,"path",55),c())}function It(n,r){n&1&&(w(),a(0,"svg",56),C(1,"path",57),c())}var se=(()=>{let r=class r{constructor(e,t,o,l,_,I,N,ee,y,z,f){this.analyticsService=e,this.authService=t,this.configService=o,this.docService=l,this.documentUserAccessService=_,this.serviceBook=I,this.loggingService=N,this.iamService=ee,this.toastService=y,this.dialogRef=z,this.usersToInvite=[],this.documentUsers=[],this.huddleInvitees=[],this.huddleUsers=[],this.huddleUsersByEmailMap={},this.userRoles=[],this.excludeContacts=[],this.linkCopied=!1,this.hideAccessControlDropdown=!1,this.subscriptions=[],this.title="Share project",this.placeholder="Add email address",this.documentAccessType="",this.DocumentAccessTypes=Ae,this.isUserAdmin=!1,this.documentAccessTypeMap=L.DocumentAccessTypeMap,this.documentUserAccessList=!0,this.veltElement=!0;try{f&&(this.hideAccessControlDropdown=!!f.hideAccessControlDropdown,this.type=f.type,this.source=f.source,f.title&&(this.title=f.title),f.placeholder&&(this.placeholder=f.placeholder),this.documentUserAccessList=!!f.documentUserAccessList,this.inviteUrl=f.inviteUrl),this.subscriptions.push(this.authService.getUser$().subscribe(v=>{this.user=v})),this.subscriptions.push(this.iamService.isUserAdmin$().subscribe(v=>{this.isUserAdmin=v})),this.subscriptions.push(this.configService.getSF$().subscribe(v=>{v?this.documentAccessTypeMap=L.DocumentAccessTypeMapSF:this.documentAccessTypeMap=L.DocumentAccessTypeMap})),this.type!=="invite"&&this.subscriptions.push(this.documentUserAccessService.getDocumentUsers$().subscribe(v=>{this.documentUsers=v,this.updateExcludeContacts()})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getRoles$().subscribe(v=>{this.userRoles=v,this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(F=>F.name===O.COMMENTER))})),this.type!=="invite"&&this.subscriptions.push(this.iamService.getDocumentIAM$().subscribe(v=>{this.documentAccessType=this.docService.getDocumentAccessType(v)})),this.type==="invite"&&(this.subscriptions.push(this.serviceBook.observe(J).pipe(R(v=>v?.getHuddleAttendees$()??te)).subscribe(v=>{this.huddleUsers=v,this.huddleUsersByEmailMap={},v.forEach(F=>{F.email&&(this.huddleUsersByEmailMap[F.email]=F)})})),this.subscriptions.push(this.serviceBook.observe(J).pipe(R(v=>v?.getHuddleInvitees$()??te)).subscribe(v=>{this.huddleInvitees=v})))}catch(v){this.loggingService.catch("Error in UserInviteDialogComponent constructor: ",v)}}ngOnInit(){try{this.dialogRef.addPanelClass("snippyly-user-invite-dialog"),this.userRoles?.length&&(this.selectedUserRole=this.userRoles?.find(e=>e.name===O.COMMENTER))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnInit: ",e)}}updateExcludeContacts(){try{this.excludeContacts=[],this.excludeContacts.push(...this.documentUsers.map(e=>e.user)),this.excludeContacts.push(...this.usersToInvite.map(e=>e.user))}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent updateExcludeContacts: ",e)}}trackByDocumentUserId(e,t){return t.id}trackByHuddleUserId(e,t){return t.userSnippylyId||t.userId}trackByHuddleInviteeId(e,t){return t.userId||t.email}selectRole(e){try{this.selectedUserRole=e}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent selectRole: ",t)}}onUserSelected(e){try{let t=new ke;t.id=e.email?V(e.email):V(e.userId),t.user=e,this.usersToInvite.find(o=>o.id===t.id)||this.usersToInvite.push(t),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent onUserSelected: ",t)}}inviteSelectedUsers(){try{if(this.usersToInvite?.length)if(this.type==="invite"){let e=this.usersToInvite.map(t=>t.user);this.analyticsService.trackEvent(P.Events.InviteDialog.USER_INVITED,{source:this.source}),this.serviceBook.get(J)?.inviteUsers(e),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}else{this.usersToInvite.forEach(l=>{this.selectedUserRole&&(l.role=this.selectedUserRole)});let e=this.usersToInvite.filter(l=>l.role?.name===O.ADMIN).map(l=>l.user.email),t=this.usersToInvite.filter(l=>l.role?.name===O.COMMENTER).map(l=>l.user.email),o={actionType:Pe.INVITE,userInvite:{admin:e?.length?{emails:e,emailProperties:{url:this.getInviteUrl()}}:void 0,commenter:t?.length?{emails:t,clientDocumentId:this.docService.getDocumentPaths()?.clientDocumentId,documentId:this.docService.getDocumentPaths()?.documentId,clientOrganizationId:this.user?.clientOrganizationId,organizationId:this.user?.organizationId,emailProperties:{url:this.getInviteUrl()}}:void 0}};this.documentUserAccessService.updateNotificationsDatabase(o),this.toastService.setToast({message:"Invitation sent!",type:"success",duration:2e3})}this.usersToInvite=[]}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent inviteSelectedUsers: ",e)}}removeSelectedUserToInvite(e){try{this.usersToInvite=this.usersToInvite.filter(t=>t.id!==e.id),this.updateExcludeContacts()}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeSelectedUserToInvite: ",t)}}updateUserRole(e,t){try{let o=e?.role?.name,l=t?.name;e.role=t,this.documentUserAccessService.updateDocumentUser(e,{oldAccess:o,newAccess:l})}catch(o){this.loggingService.catch("Error in UserInviteDialogComponent updateUserRole: ",o)}}removeUser(e){try{this.analyticsService.trackEvent(P.Events.ShareDialog.DOCUMENT_USER_ACCESS_REMOVED,{targetUserId:e?.user?.userId,targetUserEmail:e?.user?.email,roleType:e?.role?.name}),this.documentUserAccessService.removeDocumentUser(e),this.toastService.setToast({message:"User removed!",type:"success",duration:2e3})}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent removeUser: ",t)}}getInviteUrl(){try{return this.inviteUrl||window.location.href}catch(e){return this.loggingService.catch("Error in UserInviteDialogComponent getInviteUrl: ",e),""}}copyLink(){try{let e=this.getInviteUrl();this.linkCopied=!0,Be(e),setTimeout(()=>{this.linkCopied=!1},2e3),this.type==="invite"?this.analyticsService.trackEvent(P.Events.InviteDialog.INVITE_LINK_COPIED,{source:this.source}):this.type==="share"&&this.analyticsService.trackEvent(P.Events.ShareDialog.SHARE_LINK_COPIED)}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent copyLink: ",e)}}changeDocumentAccessType(e){try{this.documentAccessType!==e&&(this.analyticsService.trackEvent(P.Events.ShareDialog.DOCUMENT_ACCESS_CHANGED,{oldAccessType:this.documentAccessType,newAccessType:e}),this.docService.changeDocumentAccessType(e),this.toastService.setToast({message:"Access changed to '"+e+"'.",type:"success",duration:2e3}))}catch(t){this.loggingService.catch("Error in UserInviteDialogComponent changeDocumentAccessType: ",t)}}closeDialog(){try{this.dialogRef.close()}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent closeDialog: ",e)}}ngOnDestroy(){try{this.subscriptions.forEach(e=>e.unsubscribe())}catch(e){this.loggingService.catch("Error in UserInviteDialogComponent ngOnDestroy: ",e)}}};r.\u0275fac=function(t){return new(t||r)(g(K),g(W),g(Y),g(q),g(Qe),g(Le),g(A),g(Ke),g(We),g(Me),g(Ee,8))},r.\u0275cmp=H({type:r,selectors:[["snippyly-user-invite-dialog"]],hostVars:1,hostBindings:function(t,o){t&2&&$("data-velt-element",o.veltElement)},standalone:!1,decls:32,vars:27,consts:[["userSelectorRef",""],["triggerTemplate",""],["tooltipTemplate",""],[1,"s-video-settings-modal",3,"click","pointerdown","pointerup"],[1,"s-video-header"],[1,"s-video-header-name"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-cursor-pointer",3,"click"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41076 4.41058C4.7362 4.08514 5.26384 4.08514 5.58928 4.41058L10 8.82133L14.4108 4.41058C14.7362 4.08514 15.2638 4.08514 15.5893 4.41058C15.9147 4.73602 15.9147 5.26366 15.5893 5.58909L11.1785 9.99984L15.5893 14.4106C15.9147 14.736 15.9147 15.2637 15.5893 15.5891C15.2638 15.9145 14.7362 15.9145 14.4108 15.5891L10 11.1783L5.58928 15.5891C5.26384 15.9145 4.7362 15.9145 4.41076 15.5891C4.08533 15.2637 4.08533 14.736 4.41076 14.4106L8.82151 9.99984L4.41076 5.58909C4.08533 5.26366 4.08533 4.73602 4.41076 4.41058Z","fill","#80808A"],[1,"s-video-settings-modal-item"],[1,"s-input"],[1,"s-input-chip-list-container"],[1,"s-chip-list"],[4,"ngFor","ngForOf"],[1,"s-input-user-selector",3,"optionSelected","placeholder","enableOnFocus"],["class","s-role dropdown",3,"disabled",4,"ngIf"],["class","s-video-settings-modal-item s-people-list-container",4,"ngIf"],["class","s-general-access-container",4,"ngIf"],[1,"s-buttons-wrap"],[1,"s-button","s-secondary",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],[1,"s-flex-fill"],[1,"s-button","s-primary",3,"click"],[1,"s-chip"],[1,"s-chip-user"],[1,"s-chip-remove",3,"click"],["width","14","height","14","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],[1,"s-role","dropdown"],[1,"dropdown-content"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"dropdown-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M7.79289 9.79289C8.18342 9.40237 8.81658 9.40237 9.20711 9.79289L12 12.5858L14.7929 9.79289C15.1834 9.40237 15.8166 9.40237 16.2071 9.79289C16.5976 10.1834 16.5976 10.8166 16.2071 11.2071L12.7071 14.7071C12.3166 15.0976 11.6834 15.0976 11.2929 14.7071L7.79289 11.2071C7.40237 10.8166 7.40237 10.1834 7.79289 9.79289Z","fill","#D4D6DF"],[1,"dropdown-item",3,"click"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#80808A"],[1,"s-video-settings-modal-item","s-people-list-container"],[1,"s-people-list-title"],[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"s-user"],[1,"s-user-info"],[1,"s-flex",3,"user","background"],[1,"s-role"],[3,"disabled"],["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",4,"ngIf"],["fill-rule","evenodd","clip-rule","evenodd","d","M16.2071 9.79289C15.8166 9.40237 15.1834 9.40237 14.7929 9.79289L12 12.5858L9.20711 9.79289C8.81658 9.40237 8.18342 9.40237 7.79289 9.79289C7.40237 10.1834 7.40237 10.8166 7.79289 11.2071L11.2929 14.7071C11.6834 15.0976 12.3166 15.0976 12.7071 14.7071L16.2071 11.2071C16.5976 10.8166 16.5976 10.1834 16.2071 9.79289Z","fill","#404044"],[1,"dropdown-item","border-top",3,"click"],["class","s-user",4,"ngIf"],[1,"s-general-access-container"],[1,"s-general-access-title"],[1,"s-button","s-secondary","s-document-access-btn","dropdown"],["fill-rule","evenodd","clip-rule","evenodd","d","M12 11C10.2274 11 8.64844 11.0646 7.35838 11.1466C6.13471 11.2243 5.19379 12.158 5.10597 13.373C5.0435 14.2373 5 15.1481 5 16C5 16.8519 5.0435 17.7627 5.10597 18.627C5.19379 19.842 6.13471 20.7757 7.35838 20.8534C8.64844 20.9354 10.2274 21 12 21C13.7726 21 15.3516 20.9354 16.6416 20.8534C17.8653 20.7757 18.8062 19.842 18.894 18.627C18.9565 17.7627 19 16.8519 19 16C19 15.1481 18.9565 14.2373 18.894 13.373C18.8062 12.158 17.8653 11.2243 16.6416 11.1466C15.3516 11.0646 13.7726 11 12 11ZM7.2315 9.15059C5.01376 9.29156 3.27137 11.0124 3.11117 13.2288C3.04652 14.1234 3 15.085 3 16C3 16.915 3.04652 17.8766 3.11118 18.7712C3.27137 20.9876 5.01376 22.7084 7.23151 22.8494C8.55778 22.9337 10.1795 23 12 23C13.8205 23 15.4422 22.9337 16.7685 22.8494C18.9862 22.7084 20.7286 20.9876 20.8888 18.7712C20.9535 17.8766 21 16.915 21 16C21 15.085 20.9535 14.1234 20.8888 13.2288C20.7286 11.0124 18.9862 9.29156 16.7685 9.15059C15.4422 9.06629 13.8205 9 12 9C10.1795 9 8.55778 9.06629 7.2315 9.15059Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M13 16.7324C13.5978 16.3866 14 15.7403 14 15C14 13.8954 13.1046 13 12 13C10.8954 13 10 13.8954 10 15C10 15.7403 10.4022 16.3866 11 16.7324V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V16.7324Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M7 6C7 3.23858 9.23858 1 12 1C14.7614 1 17 3.23858 17 6V10C17 10.5523 16.5523 11 16 11C15.4477 11 15 10.5523 15 10V6C15 4.34315 13.6569 3 12 3C10.3431 3 9 4.34315 9 6V10C9 10.5523 8.55228 11 8 11C7.44772 11 7 10.5523 7 10V6Z","fill","#777E91"],[1,"s-document-access-btn-content"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M6.49027 2.50491C6.46607 2.50996 6.34731 2.53007 6.22635 2.54966C5.17052 2.72053 4.19457 3.45245 3.69214 4.45019C3.56689 4.69886 3.43711 5.08311 3.37864 5.3784C3.31829 5.68302 3.31829 14.3108 3.37864 14.6154C3.52088 15.3336 3.85013 15.9526 4.36233 16.4647C4.76978 16.8722 5.22723 17.1555 5.75266 17.3256C6.23219 17.4809 6.32453 17.4891 7.59205 17.4891H8.76711L8.88599 17.4104C9.06906 17.2893 9.14407 17.146 9.14407 16.9173C9.14407 16.6887 9.06909 16.5453 8.88611 16.4242L8.76728 16.3455L7.6068 16.3286C6.3852 16.3109 6.35854 16.3081 5.96566 16.1588C5.43291 15.9564 4.86723 15.3934 4.67143 14.8707C4.49992 14.4129 4.51091 14.747 4.51091 9.9969C4.51091 5.24677 4.49992 5.58091 4.67143 5.12308C4.88025 4.56564 5.45367 4.01728 6.0476 3.80712C6.46364 3.65989 6.4966 3.65865 9.67189 3.66895C12.8862 3.67939 12.6707 3.6688 13.1239 3.83838C13.3521 3.92374 13.6919 4.15074 13.8939 4.35272C14.0958 4.5547 14.3228 4.89447 14.4082 5.12264C14.5641 5.53916 14.5639 5.53763 14.5816 6.87392L14.5983 8.13484L14.6679 8.24677C14.7061 8.30835 14.791 8.39412 14.8563 8.43737C14.9554 8.50291 15.0078 8.51605 15.1701 8.51605C15.3324 8.51605 15.3848 8.50291 15.4839 8.43737C15.5492 8.39412 15.6341 8.30835 15.6723 8.24677L15.7419 8.13484V6.85925C15.7419 5.89002 15.7321 5.53438 15.7012 5.3784C15.4231 3.97403 14.4078 2.9182 13.0001 2.56948C12.7554 2.50887 12.6941 2.50764 9.64257 2.50177C7.93299 2.49849 6.51446 2.4999 6.49027 2.50491ZM10.1326 4.86732C10.0008 4.90764 9.81429 5.10144 9.77661 5.23721C9.75922 5.29976 9.74547 5.6244 9.74538 5.97344C9.74517 6.73161 9.7789 6.93488 9.97026 7.32843C10.0835 7.56132 10.1471 7.64839 10.358 7.85928C10.5687 8.06997 10.6561 8.13387 10.8888 8.24715C11.3004 8.44752 11.4993 8.4781 12.3174 8.46675L12.9899 8.4574L13.1087 8.37872C13.2923 8.25712 13.3667 8.11437 13.3667 7.88344C13.3667 7.72342 13.3533 7.6705 13.288 7.57182C13.2448 7.50646 13.159 7.42162 13.0974 7.38336C12.9898 7.31647 12.9581 7.31319 12.2817 7.29876C11.6484 7.28524 11.5646 7.27759 11.4445 7.22234C11.2497 7.13276 11.1074 6.99491 11.0146 6.80594C10.9336 6.64091 10.9327 6.63267 10.9182 5.93556C10.904 5.25876 10.9008 5.2275 10.8339 5.11986C10.6956 4.89741 10.3918 4.788 10.1326 4.86732ZM15.7049 9.14973C15.3168 9.21439 14.8688 9.42637 14.5091 9.71547C14.1903 9.97168 12.9551 11.227 12.785 11.4677C12.6151 11.708 12.4379 12.0846 12.3662 12.3575C12.2934 12.6347 12.2934 13.2178 12.3662 13.4864C12.4763 13.8923 12.7739 14.3816 12.9941 14.5185C13.1571 14.6198 13.4451 14.6146 13.6071 14.5074C13.7916 14.3853 13.8652 14.2433 13.8652 14.0094C13.8652 13.8346 13.8552 13.8007 13.7698 13.6869C13.7174 13.6169 13.6316 13.474 13.5792 13.3691C13.4922 13.1949 13.4842 13.1559 13.4861 12.9146C13.4901 12.4126 13.6018 12.2459 14.588 11.2695C15.3768 10.4885 15.479 10.4117 15.8541 10.3176C16.4471 10.1688 17.0959 10.642 17.1542 11.2659C17.1867 11.6138 17.0539 11.95 16.7418 12.3102C16.554 12.527 16.5067 12.6446 16.5261 12.8468C16.5522 13.1185 16.7716 13.3292 17.0627 13.362C17.163 13.3733 17.2272 13.3595 17.3476 13.3006C17.6751 13.1404 18.1188 12.4832 18.2617 11.9469C18.4137 11.3768 18.3213 10.7383 18.0102 10.209C17.8837 9.99361 17.4606 9.57059 17.2452 9.444C16.7724 9.16618 16.2292 9.06241 15.7049 9.14973ZM14.7568 12.1471C14.6858 12.1846 14.588 12.2715 14.5396 12.3402C14.4628 12.4494 14.4517 12.4903 14.4517 12.6643C14.4517 12.846 14.4612 12.8773 14.5601 13.021C14.869 13.4698 14.893 13.8775 14.6373 14.3344C14.5091 14.5636 13.051 16.0217 12.8218 16.15C12.3282 16.4261 11.818 16.3718 11.4502 16.0041C11.1691 15.723 11.0679 15.3616 11.1645 14.9843C11.2245 14.75 11.3364 14.5523 11.5457 14.3107C11.7336 14.0939 11.7808 13.9764 11.7614 13.7742C11.7353 13.5024 11.5159 13.2917 11.2249 13.259C11.1245 13.2476 11.0603 13.2615 10.9399 13.3204C10.6125 13.4806 10.1687 14.1377 10.0258 14.674C9.87388 15.2442 9.96627 15.8826 10.2773 16.4119C10.4039 16.6273 10.8269 17.0504 11.0423 17.177C11.5716 17.488 12.2101 17.5804 12.7802 17.4284C13.0265 17.3628 13.41 17.1783 13.6407 17.0145C13.8608 16.858 14.9432 15.8056 15.2867 15.4139C15.9653 14.64 16.1624 13.7239 15.8293 12.8919C15.562 12.2242 15.1512 11.9389 14.7568 12.1471Z","fill","#80808A"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M18.7071 7.29289C19.0976 7.68342 19.0976 8.31658 18.7071 8.70711L10.7071 16.7071C10.3166 17.0976 9.68342 17.0976 9.29289 16.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L10 14.5858L17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289Z","fill","#ABABB5"]],template:function(t,o){if(t&1){let l=T();a(0,"div",3),x("click",function(I){return b(l),S(I.stopPropagation())})("pointerdown",function(I){return b(l),S(I.stopPropagation())})("pointerup",function(I){return b(l),S(I.stopPropagation())}),a(1,"div",4)(2,"div",5),m(3),p(4,"translate"),c(),w(),a(5,"svg",6),x("click",function(){return b(l),S(o.closeDialog())}),C(6,"path",7),c()(),j(),a(7,"div",8),m(8),p(9,"translate"),a(10,"div",9)(11,"div",10)(12,"div",11),U(13,ct,7,1,"ng-container",12),c(),a(14,"velt-autocomplete-panel-internal",13,0),p(16,"translate"),x("optionSelected",function(I){return b(l),S(o.onUserSelected(I))}),c()(),U(17,pt,7,6,"div",14),c()(),U(18,ht,6,6,"div",15)(19,yt,6,7,"div",15)(20,bt,40,31,"div",16),a(21,"div",17)(22,"div",18),x("click",function(){return b(l),S(o.copyLink())}),U(23,St,2,0,"svg",19)(24,It,2,0,"svg",20),m(25),p(26,"translate"),p(27,"translate"),c(),C(28,"div",21),a(29,"div",22),x("click",function(){return b(l),S(o.inviteSelectedUsers())}),m(30),p(31,"translate"),c()()()}t&2&&(s(3),M(" ",d(4,15,o.title)," "),s(5),M(" ",d(9,17,"Invite users")," "),s(5),u("ngForOf",o.usersToInvite),s(),u("placeholder",d(16,19,o.placeholder))("enableOnFocus",!1),s(3),u("ngIf",!o.hideAccessControlDropdown),s(),u("ngIf",o.documentUserAccessList&&(o.documentUsers==null?null:o.documentUsers.length)),s(),u("ngIf",(o.huddleInvitees==null?null:o.huddleInvitees.length)||(o.huddleUsers==null?null:o.huddleUsers.length)),s(),u("ngIf",o.isUserAdmin&&!o.hideAccessControlDropdown),s(3),u("ngIf",!o.linkCopied),s(),u("ngIf",o.linkCopied),s(),M(" ",o.linkCopied?d(26,21,"Link Copied!"):d(27,23,"Copy Link")," "),s(4),Z("s-disabled",!(o.usersToInvite!=null&&o.usersToInvite.length)),s(),D(d(31,25,"Send invite")))},dependencies:[_e,ye,Ge,Ze,$e,Ie,He],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#dcdde0!important;font-size:calc((.8rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}*[_ngcontent-%COMP%]{box-sizing:border-box}.s-video-settings-modal[_ngcontent-%COMP%], .s-video-header[_ngcontent-%COMP%], .s-video-header-name[_ngcontent-%COMP%], .s-video-settings-modal-item[_ngcontent-%COMP%], .s-input[_ngcontent-%COMP%], .s-buttons-wrap[_ngcontent-%COMP%], .s-role[_ngcontent-%COMP%], .s-user[_ngcontent-%COMP%], .s-user-info[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;color:#ababb5!important;font-size:.8rem!important;gap:1rem!important}.s-people-list-container[_ngcontent-%COMP%]{overflow:auto!important}.s-people-list-container[_ngcontent-%COMP%] .s-people-list-title[_ngcontent-%COMP%]{position:sticky!important;top:0!important;background:#141416!important;width:100%!important;z-index:1!important}.s-video-settings-modal[_ngcontent-%COMP%]{flex-direction:column!important;align-items:flex-end!important;padding:2rem!important;gap:2rem!important;background:#141416!important;border-radius:1rem!important;max-width:42rem!important;width:80vw!important;border:2px solid #303034!important;overflow:auto!important;max-height:80vh!important}.s-video-header[_ngcontent-%COMP%]{justify-content:space-between!important;width:100%!important}.s-video-header-name[_ngcontent-%COMP%]{gap:.5rem!important;font-weight:600!important;font-size:1.2rem!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((2rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important}.s-secondary[_ngcontent-%COMP%]{border:2px solid #303034!important;border-radius:.5rem!important;color:#ababb5!important;gap:.5rem!important}.s-secondary[_ngcontent-%COMP%]:hover{background:#303034!important;color:#fff!important}.s-video-settings-modal-item[_ngcontent-%COMP%] .s-heading[_ngcontent-%COMP%]{font-size:1rem!important;color:#fff!important;padding:.5rem 0!important}.s-input[_ngcontent-%COMP%]{padding:1rem!important;color:#ababb5!important;width:100%!important;justify-content:space-between!important;border-radius:1rem!important;border:2px solid #303034!important;align-items:center!important;cursor:pointer!important;transition:.2s ease!important}.s-input[_ngcontent-%COMP%]:hover{background:#303034!important}.s-buttons-wrap[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important;align-items:stretch!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-user[_ngcontent-%COMP%]{width:100%!important;justify-content:space-between!important}.s-user-info[_ngcontent-%COMP%]{color:#ababb5!important;gap:.75rem!important}.s-user[_ngcontent-%COMP%] .s-role[_ngcontent-%COMP%]{color:#404044!important}.s-role[_ngcontent-%COMP%]{position:relative!important;cursor:pointer!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{position:absolute!important;top:100%!important;right:0!important;z-index:10!important}.dropdown[_ngcontent-%COMP%] .dropdown-content.top[_ngcontent-%COMP%]{top:auto!important;bottom:2rem!important}.dropdown-content[_ngcontent-%COMP%]{min-width:max-content!important;overflow:hidden!important;flex-direction:column!important;justify-content:flex-start!important;align-items:flex-start!important;border-radius:.5rem!important;border:1px solid #303034!important;font-style:normal!important;font-weight:400!important;font-size:1em!important;line-height:1em!important;color:#ababb5!important;background:#141416!important;cursor:pointer!important;transition:.2s ease!important}.dropdown-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#ababb5!important}.dropdown[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{display:none!important;visibility:hidden!important;opacity:0!important}.dropdown[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{width:24px!important;min-width:24px!important}.dropdown.disabled[_ngcontent-%COMP%] .dropdown-icon[_ngcontent-%COMP%]{display:none!important}.dropdown[_ngcontent-%COMP%]:not(.disabled):hover .dropdown-content[_ngcontent-%COMP%]{display:flex!important;visibility:visible!important;opacity:1!important}.dropdown-item[_ngcontent-%COMP%]{padding:1em 2rem 1rem 1rem!important;width:100%!important;display:flex!important;justify-content:flex-start!important;align-items:center!important;gap:1em!important;line-height:1rem!important;border-radius:0!important}.dropdown-item[_ngcontent-%COMP%]:hover{background:#303034!important}.dropdown-item[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff!important;margin:0!important}.dropdown-item[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0!important}.border-top[_ngcontent-%COMP%]{outline:solid 1px #303034!important}.s-flex-fill[_ngcontent-%COMP%]{flex-grow:1!important}.s-input-chip-list-container[_ngcontent-%COMP%]{display:flex;width:100%!important;gap:8px!important;flex-wrap:wrap!important;align-items:center!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%]{display:flex!important;gap:8px!important;flex-wrap:wrap!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%]{padding:8px 16px!important;background:#222226!important;color:#dcdde0!important;border-radius:100px!important;display:flex!important;align-items:center!important;gap:8px!important}.s-input-chip-list-container[_ngcontent-%COMP%] .s-chip-list[_ngcontent-%COMP%] .s-chip[_ngcontent-%COMP%] .s-chip-remove[_ngcontent-%COMP%]{display:flex!important;cursor:pointer!important}.s-input-chip-list-container[_ngcontent-%COMP%] velt-autocomplete-panel-internal.s-input-user-selector[_ngcontent-%COMP%]{flex-basis:250px!important}.s-general-access-container[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;width:100%!important;gap:8px!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%]{position:relative!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn-content[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%]{position:relative!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;width:100%!important;justify-content:flex-start!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] .dropdown-content[_ngcontent-%COMP%]{left:0!important;top:auto!important;bottom:100%!important}.s-general-access-container[_ngcontent-%COMP%] .s-document-access-btn[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{color:#ababb5!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector{flex-grow:1!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container velt-autocomplete-panel-internal.s-input-user-selector input{background:transparent!important;border:0!important;outline:0!important;color:#fff!important}@media screen and (max-width:425px){ .velt-mat-dialog-container.snippyly-user-invite-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .velt-mat-dialog-container.snippyly-user-invite-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-video-settings-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .velt-mat-dialog-container.snippyly-user-invite-dialog .s-chip-user{word-break:break-all!important}}"],changeDetection:0});let n=r;return n})();function wt(n,r){n&1&&(a(0,"div",4),w(),a(1,"svg",5)(2,"g"),C(3,"path",6)(4,"path",7)(5,"path",8),c()()())}function xt(n,r){if(n&1){let i=T();a(0,"div")(1,"slot",9),x("slotchange",function(){b(i);let t=h();return S(t.onButtonSlotChange())}),a(2,"div",10),w(),a(3,"svg",11),C(4,"path",12),c()()()()}}var X=(()=>{let r=class r extends ze{set _disabled(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.disabled=t}set _documentUserAccessList(e){let t=e;typeof e=="string"&&(t=JSON.parse(e)),this.documentUserAccessList=t}constructor(e,t,o,l,_,I,N){super(_,o,void 0,void 0,void 0,I,t),this.analyticsService=e,this.loggingService=t,this.themeService=o,this.dialog=l,this.elementRef=_,this.dynamicDataService=I,this.domService=N,this.type="share",this.disabled=!1,this.documentUserAccessList=!0,this.hideAccessControlDropdown=!1,this.accessControlDropdown=!0,this.veltElement=!0,this.customButtonAdded=!1}ngAfterViewInit(){try{this.customCssSubscription=this.domService.subscribeInjectCustomCss(this.elementRef)}catch(e){this.loggingService.catch("Error in UserInviteToolComponent ngAfterViewInit: ",e)}}ngOnDestroy(){try{super.ngOnDestroy(),this.customCssSubscription?.unsubscribe()}catch(e){this.loggingService.catch("Error in UserInviteToolComponent ngOnDestroy: ",e)}}onButtonSlotChange(){this.customButtonAdded=!0}openInviteDialog(){try{this.disabled||(this.type==="share"&&this.analyticsService.trackEvent(P.Events.ShareDialog.SHARE_BUTTON_CLICKED),this.dialog.open(se,{panelClass:"velt-mat-dialog-container",backdropClass:"s-background-blur-1",data:{title:this.title,placeholder:this.placeholder,hideAccessControlDropdown:this.hideAccessControlDropdown||!this.accessControlDropdown,type:this.type,source:this.source,documentUserAccessList:this.documentUserAccessList,inviteUrl:this.inviteUrl}}))}catch(e){this.loggingService.catch("Error in UserInviteToolComponent openInviteDialog: ",e)}}};r.\u0275fac=function(t){return new(t||r)(g(K),g(A),g(Fe),g(Te),g(ve),g(Q),g(Ve))},r.\u0275cmp=H({type:r,selectors:[["snippyly-user-invite-tool-internal"]],hostVars:1,hostBindings:function(t,o){t&2&&$("data-velt-element",o.veltElement)},inputs:{type:"type",source:"source",title:"title",placeholder:"placeholder",inviteUrl:"inviteUrl",_disabled:[0,"disabled","_disabled"],_documentUserAccessList:[0,"documentUserAccessList","_documentUserAccessList"],hideAccessControlDropdown:"hideAccessControlDropdown",accessControlDropdown:"accessControlDropdown"},standalone:!1,features:[fe([Q]),Ce],decls:4,vars:3,consts:[["part","container",1,"s-user-invite-tool-container","s-cursor-pointer",3,"click"],[1,"s-user-invite-tool-default",3,"ngSwitch"],["class","s-user-invite-tool-button",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"s-user-invite-tool-button"],["width","32","height","32","viewBox","0 0 32 32","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M19.3589 13.3008C17.3965 13.3008 15.6521 14.2519 14.5622 15.7174C14.1206 15.6247 13.6692 15.5768 13.2136 15.5768C9.6054 15.5768 6.66992 18.5123 6.66992 22.1205C6.66992 22.5918 7.05207 22.974 7.52344 22.974H14.67C15.7651 24.3594 17.4599 25.25 19.3589 25.25C22.6533 25.25 25.3335 22.5698 25.3335 19.2754C25.3335 15.981 22.6533 13.3008 19.3589 13.3008ZM8.45235 21.2669C8.85669 19.0058 10.8378 17.2839 13.2136 17.2839C13.3823 17.2839 13.5501 17.2933 13.7166 17.3104C13.5016 17.9261 13.3843 18.5873 13.3843 19.2754C13.3843 19.9735 13.505 20.6437 13.726 21.2669H8.45235ZM19.3589 23.543C17.0057 23.543 15.0913 21.6286 15.0913 19.2754C15.0913 16.9223 17.0057 15.0078 19.3589 15.0078C21.712 15.0078 23.6265 16.9223 23.6265 19.2754C23.6265 21.6286 21.712 23.543 19.3589 23.543Z","fill","white"],["d","M13.2132 13.8716C15.182 13.8716 16.7837 12.2699 16.7837 10.3011C16.7837 8.33224 15.182 6.73047 13.2132 6.73047C11.2443 6.73047 9.64258 8.33224 9.64258 10.3011C9.64258 12.2699 11.2443 13.8716 13.2132 13.8716ZM13.2132 8.4375C14.2408 8.4375 15.0767 9.2735 15.0767 10.3011C15.0767 11.3286 14.2408 12.1645 13.2132 12.1645C12.1856 12.1645 11.3496 11.3286 11.3496 10.3011C11.3496 9.2735 12.1856 8.4375 13.2132 8.4375Z","fill","white"],["d","M21.0664 18.4219H20.2129V17.5684C20.2129 17.097 19.8308 16.7148 19.3594 16.7148C18.888 16.7148 18.5059 17.097 18.5059 17.5684V18.4219H17.6523C17.181 18.4219 16.7988 18.804 16.7988 19.2754C16.7988 19.7468 17.181 20.1289 17.6523 20.1289H18.5059V20.9824C18.5059 21.4538 18.888 21.836 19.3594 21.836C19.8308 21.836 20.2129 21.4538 20.2129 20.9824V20.1289H21.0664C21.5378 20.1289 21.9199 19.7468 21.9199 19.2754C21.9199 18.804 21.5378 18.4219 21.0664 18.4219Z","fill","white"],["name","button",3,"slotchange"],["part","button-container",1,"action-btn"],["part","button-icon","width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg",1,"action-btn-icon"],["d","M8.57143 9.42858H7.71429C7.25963 9.42858 6.82359 9.60919 6.5021 9.93068C6.18061 10.2522 6 10.6882 6 11.1429V18C6 18.4547 6.18061 18.8907 6.5021 19.2122C6.82359 19.5337 7.25963 19.7143 7.71429 19.7143H16.2857C16.7404 19.7143 17.1764 19.5337 17.4979 19.2122C17.8194 18.8907 18 18.4547 18 18V11.1429C18 10.6882 17.8194 10.2522 17.4979 9.93068C17.1764 9.60919 16.7404 9.42858 16.2857 9.42858H15.4286M12 13.7143V4.28572M12 4.28572L9.42857 6.85715M12 4.28572L14.5714 6.85715","stroke","currentColor","stroke-width","1.25","stroke-linecap","round","stroke-linejoin","round"]],template:function(t,o){t&1&&(a(0,"div",0),x("click",function(){return o.openInviteDialog()}),a(1,"div",1),U(2,wt,6,0,"div",2)(3,xt,5,0,"div",3),c()()),t&2&&(s(),u("ngSwitch",o.type),s(),u("ngSwitchCase","invite"),s(),u("ngSwitchCase","share"))},dependencies:[be,Se],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}:host{display:inline-flex!important}.s-user-invite-tool-container{display:inline-block!important}.s-user-invite-tool-button{display:flex!important}.action-btn{display:inline-flex;justify-content:center;align-items:center;padding:6px!important;border-radius:var(--legacy-velt-tool-border-radius);border:var(--legacy-velt-tool-border);background-color:var(--legacy-velt-tool-bg-color);color:var(--legacy-velt-tool-icon-color);cursor:pointer}.action-btn .action-btn-label{font-size:calc((.9rem + 0px) * var(--velt-base-rem-unit))!important;padding-right:4px!important;font-weight:700!important;color:currentColor!important}.action-btn .action-btn-icon{width:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-icon-size) + 0px) * var(--velt-base-rem-unit));color:currentColor}.action-btn .toolbar-icon-dropdown-arrow{width:16px;height:16px;color:currentColor}.action-btn:focus{border-radius:var(--legacy-velt-tool-focus-border-radius);border:var(--legacy-velt-tool-focus-border);background-color:var(--legacy-velt-tool-focus-bg-color);color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:focus .action-btn-icon{width:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-focus-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:focus .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-focus-icon-color)}.action-btn:hover{border-radius:var(--legacy-velt-tool-hover-border-radius);border:var(--legacy-velt-tool-hover-border);background-color:var(--legacy-velt-tool-hover-bg-color);color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:hover .action-btn-icon{width:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-hover-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:hover .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-hover-icon-color)}.action-btn:active,.action-btn.active{border-radius:var(--legacy-velt-tool-active-border-radius);border:var(--legacy-velt-tool-active-border);background-color:var(--legacy-velt-tool-active-bg-color);color:var(--legacy-velt-tool-active-icon-color)}.action-btn:active .action-btn-icon,.action-btn.active .action-btn-icon{width:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit));height:calc((var(--legacy-velt-tool-active-icon-size) + 0px) * var(--velt-base-rem-unit))}.action-btn:active .toolbar-icon-dropdown-arrow,.action-btn.active .toolbar-icon-dropdown-arrow{color:var(--legacy-velt-tool-active-icon-color)}
|
|
2
2
|
`],encapsulation:3,changeDetection:0});let n=r;return n})();var Xe=(()=>{let r=class r{};r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=he({type:r}),r.\u0275inj=ue({imports:[we,Ue,xe,Oe,Je]});let n=r;return n})();function Dt(n){n.get(A).log("%c[WB] Loading user-invite feature chunk","color: blue;");let e=ge(Xe,n).injector;et(e,L.TAGS.VELT_USER_INVITE_TOOL,X),et(e,L.TAGS.SNIPPYLY_USER_INVITE_TOOL,X)}function et(n,r,i){if(customElements.get(r))return;let e=De(i,{injector:n});customElements.define(r,e)}export{Dt as default};
|
package/velt-user-request.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as lt}from"./chunk-SQTBBRA3.js";import{b as et,c as Nt,d as Lt}from"./chunk-3OILJMAX.js";import{t as Wt}from"./chunk-JSZMRBOR.js";import"./chunk-2YJ3NBTO.js";import{b as K,c as Z,d as J,e as Y,g as Q,h as X,j as $,k as tt,l as Ut}from"./chunk-LAUYCNER.js";import"./chunk-4QPJMZ5V.js";import"./chunk-G2POMKRC.js";import"./chunk-NR3CZ6OR.js";import"./chunk-MX66OK5A.js";import{b as H}from"./chunk-XJWB3IUW.js";import{a as Rt}from"./chunk-ZMXXM7C4.js";import{I as Bt,W as it,Y as Vt,ba as At,da as qt,ea as Ht,ga as zt}from"./chunk-J3FNQGWW.js";import{$ as W,Ab as Pt,Bb as It,Ci as st,Fa as l,Gc as q,Hc as Et,Hi as ct,Ib as B,Ic as Tt,Kb as G,Kh as ot,Nb as b,Ob as ut,Pa as c,Pb as x,Pc as Ft,Qi as mt,Sb as R,Ta as wt,Tb as U,Te as Ct,Ua as V,Ub as j,Va as Dt,Ya as Ot,_a as T,aa as xt,ca as p,db as A,ge as jt,ha as S,ia as _,ja as O,je as E,ka as P,kc as u,lb as f,lc as h,mb as a,nb as m,ni as rt,ob as I,oi as M,pi as C,qa as L,qi as at,vb as F,vi as k,wa as kt,xb as w,xg as nt,zb as D}from"./chunk-TY3WZ4Q4.js";var Qt=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}sendContactUsData(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userContactUs",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserContactUsService sendContactUsData: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userContactUs",userContactUs:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserContactUsService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function re(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.contactUsForm.emailId,e)||(n.contactUsForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.contactUsForm.emailId)}}var ht=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userContactUsService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.contactUsForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in ContactUsDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-contact-us-dialog")}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent ngOnInit: ",t)}}submitForm(){try{let t=this.user();t&&(this.contactUsForm.emailId=t.email),this.contactUsForm.emailId&&this.contactUsForm.message&&(this.userContactUsService.sendContactUsData({emailId:this.contactUsForm.emailId,message:this.contactUsForm.message}),this.analyticsService.trackEvent(E.Events.ContactUs.CONTACT_SUBMITTED),this.toastService.setToast({message:"Thank you! We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent submitForm: ",t)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent closeDialog: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(Qt),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["app-contact-us-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["contactUsFormRef","ngForm"],[1,"s-contact-us-modal"],[1,"s-contact-us-header"],[1,"s-contact-us-header-title"],[1,"s-contact-us-header-description"],[1,"s-contact-us-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-contact-us-body"],[1,"s-contact-us-form"],["class","s-contact-us-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-contact-us-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,re,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.contactUsForm.message,s)||(n.contactUsForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitForm():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Contact us")," "),l(3),x(" ",h(8,10,"Let us know how can we help you!")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"How can we help?")),R("ngModel",n.contactUsForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-contact-us-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%], .s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-contact-us-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-contact-us-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-contact-us-dialog .s-contact-us-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-contact-us-body{flex-grow:1!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var te=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}sendFeedback(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userFeedback",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserFeedbackService sendFeedback: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userFeedback",userFeedback:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserFeedbackService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function se(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.feedbackForm.emailId,e)||(n.feedbackForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.feedbackForm.emailId)}}var ft=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userFeedbackService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.feedbackForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in FeedbackDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent ngOnInit: ",t)}}submitFeedback(){try{let t=this.user();t&&(this.feedbackForm.emailId=t.email),this.feedbackForm.emailId&&this.feedbackForm.message&&(this.userFeedbackService.sendFeedback({emailId:this.feedbackForm.emailId,message:this.feedbackForm.message}),this.analyticsService.trackEvent(E.Events.Feedback.FEEDBACK_SUBMITTED),this.toastService.setToast({message:"Thank you for your feedback!",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent submitFeedback: ",t)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent closeDialog: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(te),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["app-feedback-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["feedbackFormRef","ngForm"],[1,"s-feedback-modal"],[1,"s-feedback-header"],[1,"s-feedback-header-title"],[1,"s-feedback-header-description"],[1,"s-feedback-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-feedback-body"],[1,"s-feedback-form"],["class","s-feedback-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-feedback-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,se,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.feedbackForm.message,s)||(n.feedbackForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitFeedback():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Feedback")," "),l(3),x(" ",h(8,10,"Provide feedback on your Superflow experience.")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"Tell us the details...")),R("ngModel",n.feedbackForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-feedback-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%], .s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-feedback-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-feedback-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-feedback-dialog .s-feedback-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-feedback-dialog .s-feedback-modal .s-feedback-body{flex-grow:1!important} .snippyly-feedback-dialog .s-feedback-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var ee=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}submitIssue(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userReportBug",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserReportBugService submitIssue: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userReportBug",userReportBug:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserReportBugService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function me(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.issueForm.emailId,e)||(n.issueForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.issueForm.emailId)}}var vt=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userReportBugService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.issueForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in ReportBugDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent ngOnInit: ",t)}}submitIssue(){try{let t=this.user();t&&(this.issueForm.emailId=t.email),this.issueForm.emailId&&this.issueForm.message&&(this.userReportBugService.submitIssue({emailId:this.issueForm.emailId,message:this.issueForm.message}),this.analyticsService.trackEvent(E.Events.Bug.BUG_SUBMITTED),this.toastService.setToast({message:"Thanks for reporting the bug. We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent submitFeedback: ",t)}}closeDialog(){this.matBottomSheetRef&&this.matBottomSheetRef.dismiss(),this.matDialogRef&&this.matDialogRef.close()}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(ee),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["snippyly-report-bug-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["issueFormRef","ngForm"],[1,"s-report-bug-modal"],[1,"s-report-bug-header"],[1,"s-report-bug-header-title"],[1,"s-report-bug-header-description"],[1,"s-report-bug-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-report-bug-body"],[1,"s-report-bug-form"],["class","s-report-bug-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-report-bug-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,me,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.issueForm.message,s)||(n.issueForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitIssue():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Report bugs")," "),l(3),x(" ",h(8,10,"Let us know about any bugs so we can fix them ASAP!")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"Tell us the details...")),R("ngModel",n.issueForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-report-bug-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%], .s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-report-bug-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-report-bug-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-report-bug-dialog .s-report-bug-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-report-bug-body{flex-grow:1!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var le=["*"];function pe(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",6),I(2,"path",7),m(),P(),a(3,"span",8),b(4),u(5,"translate"),m()()),o&2&&(l(4),ut(h(5,1,"Give feedback")))}function de(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",9),I(2,"path",10),m(),P(),a(3,"span",8),b(4),u(5,"translate"),m()()),o&2&&(l(4),ut(h(5,1,"Report bugs")))}function ge(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",11),I(2,"path",12)(3,"path",13),m(),P(),a(4,"span",8),b(5),u(6,"translate"),m()()),o&2&&(l(5),ut(h(6,1,"Contact us")))}function ue(o,i){if(o&1&&(a(0,"div",3),T(1,pe,6,3,"div",4)(2,de,6,3,"div",4)(3,ge,7,3,"div",4),m()),o&2){let v=D();f("ngSwitch",v.type),l(),f("ngSwitchCase","feedback"),l(),f("ngSwitchCase","reportBug"),l(),f("ngSwitchCase","contactUs")}}function he(o,i){o&1&&(a(0,"div",14),It(1),m())}var bt=(()=>{let i=class i extends zt{constructor(t,e,n,r,g,s,y,d){super(y,n,void 0,void 0,void 0,d,e),this.analyticsService=t,this.loggingService=e,this.themeService=n,this.dialog=r,this.bottomSheet=g,this.breakpointObserver=s,this.elementRef=y,this.dynamicDataService=d,this.type="feedback",this.showDefaultBtn=L(!0),this.veltElement=!0;try{(y?.nativeElement?.children?.length??0)>0&&this.showDefaultBtn.set(!1)}catch(N){this.loggingService?.catch?.("Error in UserRequestToolComponent constructor child-detect: ",N)}}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}openDialog(){try{switch(this.type){case"feedback":this.openFeedbackDialog();break;case"reportBug":this.openReportBugDialog();break;case"contactUs":this.openContactUsDialog();break;default:break}}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openDialog: ",t)}}openFeedbackDialog(){try{this.analyticsService.trackEvent(E.Events.Feedback.FEEDBACK_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(ft,{panelClass:["snippyly-feedback-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(ft,{panelClass:["snippyly-feedback-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openFeedbackDialog: ",t)}}openReportBugDialog(){try{this.analyticsService.trackEvent(E.Events.Bug.BUG_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(vt,{panelClass:["snippyly-report-bug-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(vt,{panelClass:["snippyly-report-bug-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openReportBugDialog: ",t)}}openContactUsDialog(){try{this.analyticsService.trackEvent(E.Events.ContactUs.CONTACT_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(ht,{panelClass:["snippyly-contact-us-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(ht,{panelClass:["snippyly-contact-us-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openContactUsDialog: ",t)}}isMobile(){return this.breakpointObserver.isMatched("(max-width: 599px)")}};i.\u0275fac=function(e){return new(e||i)(c(M),c(C),c(Ht),c(Vt),c(Nt),c(jt),c(kt),c(qt))},i.\u0275cmp=V({type:i,selectors:[["snippyly-user-request-tool"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},inputs:{type:"type"},standalone:!1,features:[Ot],ngContentSelectors:le,decls:3,vars:2,consts:[[1,"user-request-tool-container",3,"click"],[3,"ngSwitch",4,"ngIf"],["class","snippyly-custom-button-container",4,"ngIf"],[3,"ngSwitch"],["class","s-user-request-tool-button",4,"ngSwitchCase"],[1,"s-user-request-tool-button"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-user-request-tool-button-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M10.5757 5.76422C10.2533 6.07365 9.74414 6.07365 9.4217 5.76422L8.8447 5.2105C8.16934 4.56239 7.25698 4.16667 6.2487 4.16667C4.17763 4.16667 2.4987 5.8456 2.4987 7.91667C2.4987 9.90219 3.57352 11.5417 5.12516 12.8888C6.67813 14.237 8.53486 15.1312 9.64424 15.5876C9.87619 15.683 10.1212 15.683 10.3532 15.5876C11.4625 15.1312 13.3193 14.237 14.8722 12.8888C16.4239 11.5417 17.4987 9.90218 17.4987 7.91667C17.4987 5.8456 15.8198 4.16667 13.7487 4.16667C12.7404 4.16667 11.8281 4.56239 11.1527 5.2105L10.5757 5.76422ZM9.9987 4.00798C9.02545 3.074 7.70411 2.5 6.2487 2.5C3.25716 2.5 0.832031 4.92512 0.832031 7.91667C0.832031 13.2235 6.64065 16.1542 9.01019 17.1289C9.64834 17.3914 10.3491 17.3914 10.9872 17.1289C13.3567 16.1542 19.1654 13.2235 19.1654 7.91667C19.1654 4.92512 16.7402 2.5 13.7487 2.5C12.2933 2.5 10.9719 3.074 9.9987 4.00798Z","fill","#4C5366"],[1,"s-user-request-tool-button-text"],["width","16","height","20","viewBox","0 0 16 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 17.9996C6.91667 17.9996 5.91267 17.733 4.988 17.1996C4.06267 16.6663 3.33333 15.933 2.8 14.9996H0.975C0.691667 14.9996 0.458333 14.9036 0.275 14.7116C0.0916668 14.5203 0 14.283 0 13.9996C0 13.7163 0.0956668 13.479 0.287 13.2876C0.479 13.0956 0.716667 12.9996 1 12.9996H2.1C2.05 12.6663 2.021 12.333 2.013 11.9996C2.00433 11.6663 2 11.333 2 10.9996H0.975C0.691667 10.9996 0.458333 10.9036 0.275 10.7116C0.0916668 10.5203 0 10.283 0 9.99963C0 9.7163 0.0956668 9.47863 0.287 9.28663C0.479 9.0953 0.716667 8.99963 1 8.99963H2C2 8.6663 2.00433 8.33297 2.013 7.99963C2.021 7.6663 2.05 7.33297 2.1 6.99963H0.975C0.691667 6.99963 0.458333 6.90363 0.275 6.71163C0.0916668 6.5203 0 6.28297 0 5.99963C0 5.7163 0.0956668 5.47863 0.287 5.28663C0.479 5.0953 0.716667 4.99963 1 4.99963H2.8C3.03333 4.6163 3.296 4.25797 3.588 3.92463C3.87933 3.5913 4.21667 3.29963 4.6 3.04963L3.675 2.09963C3.49167 1.89963 3.40433 1.66197 3.413 1.38663C3.421 1.11197 3.51667 0.882968 3.7 0.699635C3.88333 0.516301 4.11667 0.424635 4.4 0.424635C4.68333 0.424635 4.91667 0.516301 5.1 0.699635L6.55 2.14963C7.01667 1.99963 7.49167 1.92463 7.975 1.92463C8.45833 1.92463 8.93333 1.99963 9.4 2.14963L10.9 0.674635C11.1 0.491301 11.3377 0.403635 11.613 0.411635C11.8877 0.420301 12.1167 0.516301 12.3 0.699635C12.4833 0.882968 12.575 1.1163 12.575 1.39963C12.575 1.68297 12.4833 1.9163 12.3 2.09963L11.35 3.04963C11.7333 3.29963 12.0793 3.58697 12.388 3.91163C12.696 4.23697 12.9667 4.59963 13.2 4.99963H15.025C15.3083 4.99963 15.5417 5.0953 15.725 5.28663C15.9083 5.47863 16 5.7163 16 5.99963C16 6.28297 15.904 6.5203 15.712 6.71163C15.5207 6.90363 15.2833 6.99963 15 6.99963H13.9C13.95 7.33297 13.9793 7.6663 13.988 7.99963C13.996 8.33297 14 8.6663 14 8.99963H15.025C15.3083 8.99963 15.5417 9.0953 15.725 9.28663C15.9083 9.47863 16 9.7163 16 9.99963C16 10.283 15.904 10.5203 15.712 10.7116C15.5207 10.9036 15.2833 10.9996 15 10.9996H14C14 11.333 13.996 11.6663 13.988 11.9996C13.9793 12.333 13.95 12.6663 13.9 12.9996H15.025C15.3083 12.9996 15.5417 13.0956 15.725 13.2876C15.9083 13.479 16 13.7163 16 13.9996C16 14.283 15.904 14.5203 15.712 14.7116C15.5207 14.9036 15.2833 14.9996 15 14.9996H13.2C12.6667 15.933 11.9377 16.6663 11.013 17.1996C10.0877 17.733 9.08333 17.9996 8 17.9996ZM8 15.9996C9.1 15.9996 10.0417 15.608 10.825 14.8246C11.6083 14.0413 12 13.0996 12 11.9996V7.99963C12 6.89963 11.6083 5.95797 10.825 5.17463C10.0417 4.3913 9.1 3.99963 8 3.99963C6.9 3.99963 5.95833 4.3913 5.175 5.17463C4.39167 5.95797 4 6.89963 4 7.99963V11.9996C4 13.0996 4.39167 14.0413 5.175 14.8246C5.95833 15.608 6.9 15.9996 8 15.9996ZM7 12.9996H9.025C9.30833 12.9996 9.54167 12.9036 9.725 12.7116C9.90833 12.5203 10 12.283 10 11.9996C10 11.7163 9.90433 11.4786 9.713 11.2866C9.521 11.0953 9.28333 10.9996 9 10.9996H6.975C6.69167 10.9996 6.45833 11.0953 6.275 11.2866C6.09167 11.4786 6 11.7163 6 11.9996C6 12.283 6.096 12.5203 6.288 12.7116C6.47933 12.9036 6.71667 12.9996 7 12.9996ZM7 8.99963H9.025C9.30833 8.99963 9.54167 8.90364 9.725 8.71163C9.90833 8.5203 10 8.28297 10 7.99963C10 7.7163 9.90433 7.47863 9.713 7.28663C9.521 7.0953 9.28333 6.99963 9 6.99963H6.975C6.69167 6.99963 6.45833 7.0953 6.275 7.28663C6.09167 7.47863 6 7.7163 6 7.99963C6 8.28297 6.096 8.5203 6.288 8.71163C6.47933 8.90364 6.71667 8.99963 7 8.99963Z","fill","#4C5366"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44772 20.5523 5 20 5ZM4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.2318 7.35984C5.58537 6.93556 6.21593 6.87824 6.64021 7.2318L11.3598 11.1648C11.7307 11.4739 12.2694 11.4739 12.6402 11.1648L17.3598 7.2318C17.7841 6.87824 18.4147 6.93556 18.7682 7.35984C19.1218 7.78412 19.0645 8.41468 18.6402 8.76825L13.9206 12.7013C12.808 13.6284 11.192 13.6284 10.0795 12.7013L5.35984 8.76825C4.93556 8.41468 4.87824 7.78412 5.2318 7.35984Z","fill","#777E91"],[1,"snippyly-custom-button-container"]],template:function(e,n){e&1&&(Pt(),a(0,"div",0),w("click",function(){return n.openDialog()}),T(1,ue,4,4,"div",1)(2,he,2,0,"div",2),m()),e&2&&(l(),f("ngIf",n.showDefaultBtn()),l(),f("ngIf",!n.showDefaultBtn()))},dependencies:[q,Et,Tt,H],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}.user-request-tool-container[_ngcontent-%COMP%]{display:inline-block!important;cursor:pointer!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:100px!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]:hover{background:#ededed!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%] .s-user-request-tool-button-text[_ngcontent-%COMP%]{font-size:14px!important;color:#4c5366!important;font-weight:400!important}"],changeDetection:0});let o=i;return o})();var ie=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Dt({type:i}),i.\u0275inj=xt({imports:[Ft,Ut,Bt,At,Lt,Wt]});let o=i;return o})();function fe(o){o.get(C).log("%c[WB] Loading user-request feature chunk","color: blue;");let t=wt(ie,o).injector;ne(t,Ct.TAGS.VELT_USER_REQUEST_TOOL,bt),ne(t,Ct.TAGS.SNIPPYLY_USER_REQUEST_TOOL,bt)}function ne(o,i,v){if(customElements.get(i))return;let t=Rt(v,{injector:o});customElements.define(i,t)}export{fe as default};
|
|
1
|
+
import{a as lt}from"./chunk-PVOJRXAC.js";import{b as et,c as Nt,d as Lt}from"./chunk-UCTOPWFQ.js";import{t as Wt}from"./chunk-3CWPPM3P.js";import"./chunk-CI2JGL4P.js";import{b as K,c as Z,d as J,e as Y,g as Q,h as X,j as $,k as tt,l as Ut}from"./chunk-RSPIT2S4.js";import"./chunk-IE3AYTRD.js";import"./chunk-UGCJET7Y.js";import"./chunk-POBWY53V.js";import"./chunk-BPPXBXFT.js";import{b as H}from"./chunk-QX6IGTVL.js";import{a as Rt}from"./chunk-AE6AKOBL.js";import{I as Bt,W as it,Y as Vt,ba as At,da as qt,ea as Ht,ga as zt}from"./chunk-CVMNWHT4.js";import{$ as W,Ab as Pt,Ai as st,Bb as It,Ch as E,Ee as Ct,Fa as l,Fh as ot,Fi as ct,Gc as q,Hc as Et,Ib as B,Ic as Tt,Kb as G,Nb as b,Ob as ut,Pa as c,Pb as x,Pc as Ft,Pi as mt,Sb as R,Ta as wt,Tb as U,Td as jt,Ua as V,Ub as j,Va as Dt,Ya as Ot,_a as T,aa as xt,ca as p,db as A,ha as S,ia as _,ii as rt,ja as O,ji as M,ka as P,kc as u,ki as C,lb as f,lc as h,li as at,mb as a,nb as m,ob as I,qa as L,qg as nt,ti as k,vb as F,wa as kt,xb as w,zb as D}from"./chunk-FXK7BWOQ.js";var Qt=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}sendContactUsData(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userContactUs",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserContactUsService sendContactUsData: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userContactUs",userContactUs:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserContactUsService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function re(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.contactUsForm.emailId,e)||(n.contactUsForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.contactUsForm.emailId)}}var ht=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userContactUsService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.contactUsForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in ContactUsDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-contact-us-dialog")}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent ngOnInit: ",t)}}submitForm(){try{let t=this.user();t&&(this.contactUsForm.emailId=t.email),this.contactUsForm.emailId&&this.contactUsForm.message&&(this.userContactUsService.sendContactUsData({emailId:this.contactUsForm.emailId,message:this.contactUsForm.message}),this.analyticsService.trackEvent(E.Events.ContactUs.CONTACT_SUBMITTED),this.toastService.setToast({message:"Thank you! We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent submitForm: ",t)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent closeDialog: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ContactUsDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(Qt),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["app-contact-us-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["contactUsFormRef","ngForm"],[1,"s-contact-us-modal"],[1,"s-contact-us-header"],[1,"s-contact-us-header-title"],[1,"s-contact-us-header-description"],[1,"s-contact-us-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-contact-us-body"],[1,"s-contact-us-form"],["class","s-contact-us-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-contact-us-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-contact-us-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,re,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.contactUsForm.message,s)||(n.contactUsForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitForm():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Contact us")," "),l(3),x(" ",h(8,10,"Let us know how can we help you!")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"How can we help?")),R("ngModel",n.contactUsForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-contact-us-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-header[_ngcontent-%COMP%] .s-contact-us-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%], .s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-body[_ngcontent-%COMP%] .s-contact-us-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-contact-us-modal[_ngcontent-%COMP%] .s-contact-us-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-contact-us-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-contact-us-bottom-sheet .mat-bottom-sheet-container .s-contact-us-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-contact-us-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-contact-us-dialog .s-contact-us-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-contact-us-body{flex-grow:1!important} .snippyly-contact-us-dialog .s-contact-us-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var te=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}sendFeedback(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userFeedback",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserFeedbackService sendFeedback: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userFeedback",userFeedback:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserFeedbackService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function se(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.feedbackForm.emailId,e)||(n.feedbackForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.feedbackForm.emailId)}}var ft=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userFeedbackService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.feedbackForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in FeedbackDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent ngOnInit: ",t)}}submitFeedback(){try{let t=this.user();t&&(this.feedbackForm.emailId=t.email),this.feedbackForm.emailId&&this.feedbackForm.message&&(this.userFeedbackService.sendFeedback({emailId:this.feedbackForm.emailId,message:this.feedbackForm.message}),this.analyticsService.trackEvent(E.Events.Feedback.FEEDBACK_SUBMITTED),this.toastService.setToast({message:"Thank you for your feedback!",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent submitFeedback: ",t)}}closeDialog(){try{this.matBottomSheetRef&&this.matBottomSheetRef?.dismiss(),this.matDialogRef&&this.matDialogRef?.close()}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent closeDialog: ",t)}}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in FeedbackDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(te),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["app-feedback-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["feedbackFormRef","ngForm"],[1,"s-feedback-modal"],[1,"s-feedback-header"],[1,"s-feedback-header-title"],[1,"s-feedback-header-description"],[1,"s-feedback-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-feedback-body"],[1,"s-feedback-form"],["class","s-feedback-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-feedback-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-feedback-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,se,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.feedbackForm.message,s)||(n.feedbackForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitFeedback():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Feedback")," "),l(3),x(" ",h(8,10,"Provide feedback on your Superflow experience.")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"Tell us the details...")),R("ngModel",n.feedbackForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-feedback-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-header[_ngcontent-%COMP%] .s-feedback-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%], .s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-body[_ngcontent-%COMP%] .s-feedback-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-feedback-modal[_ngcontent-%COMP%] .s-feedback-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-feedback-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-feedback-bottom-sheet .mat-bottom-sheet-container .s-feedback-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-feedback-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-feedback-dialog .s-feedback-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-feedback-dialog .s-feedback-modal .s-feedback-body{flex-grow:1!important} .snippyly-feedback-dialog .s-feedback-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var ee=(()=>{let i=class i{constructor(t,e,n,r,g,s,y,d){this.analyticsService=t,this.authService=e,this.configService=n,this.docService=r,this.databaseService=g,this.loggingService=s,this.commonDbService=y,this.serviceBook=d,this.notificationService=null,this.serviceBook.observe(ot).subscribe(N=>{this.notificationService=N})}submitIssue(t){try{let e=this.authService.getUser(),n=this.docService.getDocumentPaths();if(e&&n&&this.databaseService.getDbValue()){t.from=e?.isAnonymous?null:e,t.lastUpdated=this.serverTimestamp,t.apiKey=this.configService.getApiKey(),t.metadata=this.docService.getDocumentMetadata(),t.pageInfo=nt(),t.id=this.commonDbService.generateDocumentId();let r=JSON.parse(JSON.stringify(t));this.commonDbService.setData({feature:"userReportBug",properties:{documentId:n?.documentId??"",organizationId:n?.organizationId??"",skipFirestore:!0},data:r}),this.updateNotificationsDatabase(r)}}catch(e){this.loggingService.catch("Error in UserReportBugService submitIssue: ",e)}}updateNotificationsDatabase(t){try{let e={notificationSource:"userReportBug",userReportBug:t};this.notificationService?.updateNotificationDatabase(e)}catch(e){this.loggingService.catch("Error in UserReportBugService updateNotificationsDatabase: ",e)}}get serverTimestamp(){return this.commonDbService.getServerTimestamp()}};i.\u0275fac=function(e){return new(e||i)(p(M),p(k),p(at),p(ct),p(st),p(C),p(mt),p(rt))},i.\u0275prov=W({token:i,factory:i.\u0275fac,providedIn:"root"});let o=i;return o})();function me(o,i){if(o&1){let v=F();a(0,"input",14),u(1,"translate"),j("ngModelChange",function(e){S(v);let n=D();return U(n.issueForm.emailId,e)||(n.issueForm.emailId=e),_(e)}),m()}if(o&2){let v=D();f("placeholder",h(1,2,"Your email address")),R("ngModel",v.issueForm.emailId)}}var vt=(()=>{let i=class i{constructor(t,e,n,r,g,s,y){this.analyticsService=t,this.authService=e,this.loggingService=n,this.toastService=r,this.userReportBugService=g,this.matDialogRef=s,this.matBottomSheetRef=y,this.user=L(void 0),this.subscriptions=[],this.issueForm={},this.veltElement=!0;try{this.subscriptions.push(this.authService.getUser$().subscribe(d=>{d?.email&&!d?.isAnonymous?this.user.set(d):this.user.set(null)}))}catch(d){this.loggingService.catch("Error in ReportBugDialogComponent constructor: ",d)}}ngOnInit(){try{this.matDialogRef&&this.matDialogRef?.addPanelClass("snippyly-feedback-dialog")}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent ngOnInit: ",t)}}submitIssue(){try{let t=this.user();t&&(this.issueForm.emailId=t.email),this.issueForm.emailId&&this.issueForm.message&&(this.userReportBugService.submitIssue({emailId:this.issueForm.emailId,message:this.issueForm.message}),this.analyticsService.trackEvent(E.Events.Bug.BUG_SUBMITTED),this.toastService.setToast({message:"Thanks for reporting the bug. We will get back to you soon.",type:"success",duration:2e3}),this.closeDialog())}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent submitFeedback: ",t)}}closeDialog(){this.matBottomSheetRef&&this.matBottomSheetRef.dismiss(),this.matDialogRef&&this.matDialogRef.close()}ngOnDestroy(){try{this.subscriptions.forEach(t=>{t.unsubscribe()})}catch(t){this.loggingService.catch("Error in ReportBugDialogComponent ngOnDestroy: ",t)}}};i.\u0275fac=function(e){return new(e||i)(c(M),c(k),c(C),c(lt),c(ee),c(it,8),c(et,8))},i.\u0275cmp=V({type:i,selectors:[["snippyly-report-bug-dialog"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},standalone:!1,decls:22,vars:16,consts:[["issueFormRef","ngForm"],[1,"s-report-bug-modal"],[1,"s-report-bug-header"],[1,"s-report-bug-header-title"],[1,"s-report-bug-header-description"],[1,"s-report-bug-modal-close",3,"click"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M4.41009 4.41107C4.73553 4.08563 5.26317 4.08563 5.5886 4.41107L9.99935 8.82181L14.4101 4.41107C14.7355 4.08563 15.2632 4.08563 15.5886 4.41107C15.914 4.73651 15.914 5.26414 15.5886 5.58958L11.1779 10.0003L15.5886 14.4111C15.914 14.7365 15.914 15.2641 15.5886 15.5896C15.2632 15.915 14.7355 15.915 14.4101 15.5896L9.99935 11.1788L5.5886 15.5896C5.26317 15.915 4.73553 15.915 4.41009 15.5896C4.08466 15.2641 4.08466 14.7365 4.41009 14.4111L8.82084 10.0003L4.41009 5.58958C4.08466 5.26414 4.08466 4.73651 4.41009 4.41107Z","fill","#80808A"],[1,"s-report-bug-body"],[1,"s-report-bug-form"],["class","s-report-bug-input","name","emailId","required","","email","",3,"placeholder","ngModel","ngModelChange",4,"ngIf"],["rows","5","name","message","required","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"],[1,"s-report-bug-footer"],[1,"s-button","s-primary",3,"click"],["name","emailId","required","","email","",1,"s-report-bug-input",3,"ngModelChange","placeholder","ngModel"]],template:function(e,n){if(e&1){let r=F();a(0,"div",1)(1,"div",2)(2,"div")(3,"div",3),b(4),u(5,"translate"),m(),a(6,"div",4),b(7),u(8,"translate"),m()(),a(9,"div",5),w("click",function(){return S(r),_(n.closeDialog())}),O(),a(10,"svg",6),I(11,"path",7),m()()(),P(),a(12,"div",8)(13,"form",9,0),T(15,me,2,4,"input",10),a(16,"textarea",11),u(17,"translate"),j("ngModelChange",function(s){return S(r),U(n.issueForm.message,s)||(n.issueForm.message=s),_(s)}),m()()(),a(18,"div",12)(19,"div",13),w("click",function(){S(r);let s=B(14);return _(s!=null&&s.valid?n.submitIssue():null)}),b(20),u(21,"translate"),m()()()}if(e&2){let r=B(14);l(4),x(" ",h(5,8,"Report bugs")," "),l(3),x(" ",h(8,10,"Let us know about any bugs so we can fix them ASAP!")," "),l(8),f("ngIf",!n.user()),l(),f("placeholder",h(17,12,"Tell us the details...")),R("ngModel",n.issueForm.message),l(3),G("s-disabled",!(r!=null&&r.valid)),l(),x(" ",h(21,14,"Send")," ")}},dependencies:[q,X,K,Z,J,$,tt,Q,Y,H],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}*[_ngcontent-%COMP%]{box-sizing:border-box;-webkit-tap-highlight-color:rgba(255,255,255,0)!important;outline:none!important;margin:0!important;padding:0!important;line-height:1.5!important;color:#000!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))}*[_ngcontent-%COMP%]:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){height:unset;width:unset}*[_ngcontent-%COMP%]:empty:not(svg,rect,circle,ellipse,line,polyline,polygon,path,text,g,use,image,defs,hr){display:revert!important}.s-report-bug-modal[_ngcontent-%COMP%]{width:500px!important;background:#141416!important;padding:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;display:flex;flex-direction:column;border-radius:20px!important;box-shadow:0 calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((4rem + 0px) * var(--velt-base-rem-unit)) calc((-3rem + 0px) * var(--velt-base-rem-unit)) #1f2f461f}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%]{display:flex!important;justify-content:space-between!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-title[_ngcontent-%COMP%]{font-size:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:600!important;line-height:calc((2rem + 0px) * var(--velt-base-rem-unit))!important;color:#f4f5f6!important;margin-bottom:calc((1rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-header-description[_ngcontent-%COMP%]{font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;font-weight:400!important;line-height:calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;color:#80808a!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-header[_ngcontent-%COMP%] .s-report-bug-modal-close[_ngcontent-%COMP%]{cursor:pointer!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%], .s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;gap:calc((2rem + 0px) * var(--velt-base-rem-unit))!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{resize:none!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-body[_ngcontent-%COMP%] .s-report-bug-input[_ngcontent-%COMP%]{border-radius:calc((.75rem + 0px) * var(--velt-base-rem-unit))!important;border:2px solid #303034;background:transparent;font-family:inherit;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;color:#fff!important}.s-report-bug-modal[_ngcontent-%COMP%] .s-report-bug-footer[_ngcontent-%COMP%]{display:flex!important;justify-content:flex-end!important}.s-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;justify-content:center!important;padding:calc((.75rem + 0px) * var(--velt-base-rem-unit)) calc((1.5rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:calc((4rem + 0px) * var(--velt-base-rem-unit))!important;font-size:calc((1rem + 0px) * var(--velt-base-rem-unit))!important;transition:.1s ease!important;cursor:pointer!important}.s-primary[_ngcontent-%COMP%]{background:#625df5!important;color:#fff!important}.s-primary[_ngcontent-%COMP%]:not(.s-disabled):hover{background:#4f4bbf!important}.s-disabled[_ngcontent-%COMP%]{background:#939393!important;cursor:not-allowed!important} .velt-mat-dialog-container.snippyly-report-bug-dialog mat-dialog-container .mat-mdc-dialog-surface.mdc-dialog__surface{background-color:transparent!important;padding:0!important;margin:0!important;border-radius:20px!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container{background-color:transparent!important;padding:0!important;margin:0!important;box-shadow:none!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal{width:100%!important;border-bottom-left-radius:0!important;border-bottom-right-radius:0!important} .velt-mat-bottom-sheet-container.snippyly-report-bug-bottom-sheet .mat-bottom-sheet-container .s-report-bug-modal .s-button{flex-grow:1!important}@media screen and (max-width:425px){ .snippyly-report-bug-dialog{width:100vw!important;max-width:100vw!important;height:100vh!important} .snippyly-report-bug-dialog .s-report-bug-modal{width:100vw!important;height:100vh!important;max-width:100vw!important;max-height:100vh!important;border-radius:0!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-report-bug-body{flex-grow:1!important} .snippyly-report-bug-dialog .s-report-bug-modal .s-button{flex-grow:1!important}}"],changeDetection:0});let o=i;return o})();var le=["*"];function pe(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",6),I(2,"path",7),m(),P(),a(3,"span",8),b(4),u(5,"translate"),m()()),o&2&&(l(4),ut(h(5,1,"Give feedback")))}function de(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",9),I(2,"path",10),m(),P(),a(3,"span",8),b(4),u(5,"translate"),m()()),o&2&&(l(4),ut(h(5,1,"Report bugs")))}function ge(o,i){o&1&&(a(0,"div",5),O(),a(1,"svg",11),I(2,"path",12)(3,"path",13),m(),P(),a(4,"span",8),b(5),u(6,"translate"),m()()),o&2&&(l(5),ut(h(6,1,"Contact us")))}function ue(o,i){if(o&1&&(a(0,"div",3),T(1,pe,6,3,"div",4)(2,de,6,3,"div",4)(3,ge,7,3,"div",4),m()),o&2){let v=D();f("ngSwitch",v.type),l(),f("ngSwitchCase","feedback"),l(),f("ngSwitchCase","reportBug"),l(),f("ngSwitchCase","contactUs")}}function he(o,i){o&1&&(a(0,"div",14),It(1),m())}var bt=(()=>{let i=class i extends zt{constructor(t,e,n,r,g,s,y,d){super(y,n,void 0,void 0,void 0,d,e),this.analyticsService=t,this.loggingService=e,this.themeService=n,this.dialog=r,this.bottomSheet=g,this.breakpointObserver=s,this.elementRef=y,this.dynamicDataService=d,this.type="feedback",this.showDefaultBtn=L(!0),this.veltElement=!0;try{(y?.nativeElement?.children?.length??0)>0&&this.showDefaultBtn.set(!1)}catch(N){this.loggingService?.catch?.("Error in UserRequestToolComponent constructor child-detect: ",N)}}ngOnDestroy(){try{super.ngOnDestroy()}catch{}}openDialog(){try{switch(this.type){case"feedback":this.openFeedbackDialog();break;case"reportBug":this.openReportBugDialog();break;case"contactUs":this.openContactUsDialog();break;default:break}}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openDialog: ",t)}}openFeedbackDialog(){try{this.analyticsService.trackEvent(E.Events.Feedback.FEEDBACK_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(ft,{panelClass:["snippyly-feedback-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(ft,{panelClass:["snippyly-feedback-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openFeedbackDialog: ",t)}}openReportBugDialog(){try{this.analyticsService.trackEvent(E.Events.Bug.BUG_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(vt,{panelClass:["snippyly-report-bug-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(vt,{panelClass:["snippyly-report-bug-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openReportBugDialog: ",t)}}openContactUsDialog(){try{this.analyticsService.trackEvent(E.Events.ContactUs.CONTACT_BUTTON_CLICKED),this.isMobile()?this.bottomSheet.open(ht,{panelClass:["snippyly-contact-us-bottom-sheet","velt-mat-bottom-sheet-container"],backdropClass:"s-background-blur-1"}):this.dialog.open(ht,{panelClass:["snippyly-contact-us-dialog","velt-mat-dialog-container"],backdropClass:"s-background-blur-1"})}catch(t){this.loggingService.catch("Error in UserRequestToolComponent openContactUsDialog: ",t)}}isMobile(){return this.breakpointObserver.isMatched("(max-width: 599px)")}};i.\u0275fac=function(e){return new(e||i)(c(M),c(C),c(Ht),c(Vt),c(Nt),c(jt),c(kt),c(qt))},i.\u0275cmp=V({type:i,selectors:[["snippyly-user-request-tool"]],hostVars:1,hostBindings:function(e,n){e&2&&A("data-velt-element",n.veltElement)},inputs:{type:"type"},standalone:!1,features:[Ot],ngContentSelectors:le,decls:3,vars:2,consts:[[1,"user-request-tool-container",3,"click"],[3,"ngSwitch",4,"ngIf"],["class","snippyly-custom-button-container",4,"ngIf"],[3,"ngSwitch"],["class","s-user-request-tool-button",4,"ngSwitchCase"],[1,"s-user-request-tool-button"],["width","20","height","20","viewBox","0 0 20 20","fill","none","xmlns","http://www.w3.org/2000/svg",1,"s-user-request-tool-button-icon"],["fill-rule","evenodd","clip-rule","evenodd","d","M10.5757 5.76422C10.2533 6.07365 9.74414 6.07365 9.4217 5.76422L8.8447 5.2105C8.16934 4.56239 7.25698 4.16667 6.2487 4.16667C4.17763 4.16667 2.4987 5.8456 2.4987 7.91667C2.4987 9.90219 3.57352 11.5417 5.12516 12.8888C6.67813 14.237 8.53486 15.1312 9.64424 15.5876C9.87619 15.683 10.1212 15.683 10.3532 15.5876C11.4625 15.1312 13.3193 14.237 14.8722 12.8888C16.4239 11.5417 17.4987 9.90218 17.4987 7.91667C17.4987 5.8456 15.8198 4.16667 13.7487 4.16667C12.7404 4.16667 11.8281 4.56239 11.1527 5.2105L10.5757 5.76422ZM9.9987 4.00798C9.02545 3.074 7.70411 2.5 6.2487 2.5C3.25716 2.5 0.832031 4.92512 0.832031 7.91667C0.832031 13.2235 6.64065 16.1542 9.01019 17.1289C9.64834 17.3914 10.3491 17.3914 10.9872 17.1289C13.3567 16.1542 19.1654 13.2235 19.1654 7.91667C19.1654 4.92512 16.7402 2.5 13.7487 2.5C12.2933 2.5 10.9719 3.074 9.9987 4.00798Z","fill","#4C5366"],[1,"s-user-request-tool-button-text"],["width","16","height","20","viewBox","0 0 16 18","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M8 17.9996C6.91667 17.9996 5.91267 17.733 4.988 17.1996C4.06267 16.6663 3.33333 15.933 2.8 14.9996H0.975C0.691667 14.9996 0.458333 14.9036 0.275 14.7116C0.0916668 14.5203 0 14.283 0 13.9996C0 13.7163 0.0956668 13.479 0.287 13.2876C0.479 13.0956 0.716667 12.9996 1 12.9996H2.1C2.05 12.6663 2.021 12.333 2.013 11.9996C2.00433 11.6663 2 11.333 2 10.9996H0.975C0.691667 10.9996 0.458333 10.9036 0.275 10.7116C0.0916668 10.5203 0 10.283 0 9.99963C0 9.7163 0.0956668 9.47863 0.287 9.28663C0.479 9.0953 0.716667 8.99963 1 8.99963H2C2 8.6663 2.00433 8.33297 2.013 7.99963C2.021 7.6663 2.05 7.33297 2.1 6.99963H0.975C0.691667 6.99963 0.458333 6.90363 0.275 6.71163C0.0916668 6.5203 0 6.28297 0 5.99963C0 5.7163 0.0956668 5.47863 0.287 5.28663C0.479 5.0953 0.716667 4.99963 1 4.99963H2.8C3.03333 4.6163 3.296 4.25797 3.588 3.92463C3.87933 3.5913 4.21667 3.29963 4.6 3.04963L3.675 2.09963C3.49167 1.89963 3.40433 1.66197 3.413 1.38663C3.421 1.11197 3.51667 0.882968 3.7 0.699635C3.88333 0.516301 4.11667 0.424635 4.4 0.424635C4.68333 0.424635 4.91667 0.516301 5.1 0.699635L6.55 2.14963C7.01667 1.99963 7.49167 1.92463 7.975 1.92463C8.45833 1.92463 8.93333 1.99963 9.4 2.14963L10.9 0.674635C11.1 0.491301 11.3377 0.403635 11.613 0.411635C11.8877 0.420301 12.1167 0.516301 12.3 0.699635C12.4833 0.882968 12.575 1.1163 12.575 1.39963C12.575 1.68297 12.4833 1.9163 12.3 2.09963L11.35 3.04963C11.7333 3.29963 12.0793 3.58697 12.388 3.91163C12.696 4.23697 12.9667 4.59963 13.2 4.99963H15.025C15.3083 4.99963 15.5417 5.0953 15.725 5.28663C15.9083 5.47863 16 5.7163 16 5.99963C16 6.28297 15.904 6.5203 15.712 6.71163C15.5207 6.90363 15.2833 6.99963 15 6.99963H13.9C13.95 7.33297 13.9793 7.6663 13.988 7.99963C13.996 8.33297 14 8.6663 14 8.99963H15.025C15.3083 8.99963 15.5417 9.0953 15.725 9.28663C15.9083 9.47863 16 9.7163 16 9.99963C16 10.283 15.904 10.5203 15.712 10.7116C15.5207 10.9036 15.2833 10.9996 15 10.9996H14C14 11.333 13.996 11.6663 13.988 11.9996C13.9793 12.333 13.95 12.6663 13.9 12.9996H15.025C15.3083 12.9996 15.5417 13.0956 15.725 13.2876C15.9083 13.479 16 13.7163 16 13.9996C16 14.283 15.904 14.5203 15.712 14.7116C15.5207 14.9036 15.2833 14.9996 15 14.9996H13.2C12.6667 15.933 11.9377 16.6663 11.013 17.1996C10.0877 17.733 9.08333 17.9996 8 17.9996ZM8 15.9996C9.1 15.9996 10.0417 15.608 10.825 14.8246C11.6083 14.0413 12 13.0996 12 11.9996V7.99963C12 6.89963 11.6083 5.95797 10.825 5.17463C10.0417 4.3913 9.1 3.99963 8 3.99963C6.9 3.99963 5.95833 4.3913 5.175 5.17463C4.39167 5.95797 4 6.89963 4 7.99963V11.9996C4 13.0996 4.39167 14.0413 5.175 14.8246C5.95833 15.608 6.9 15.9996 8 15.9996ZM7 12.9996H9.025C9.30833 12.9996 9.54167 12.9036 9.725 12.7116C9.90833 12.5203 10 12.283 10 11.9996C10 11.7163 9.90433 11.4786 9.713 11.2866C9.521 11.0953 9.28333 10.9996 9 10.9996H6.975C6.69167 10.9996 6.45833 11.0953 6.275 11.2866C6.09167 11.4786 6 11.7163 6 11.9996C6 12.283 6.096 12.5203 6.288 12.7116C6.47933 12.9036 6.71667 12.9996 7 12.9996ZM7 8.99963H9.025C9.30833 8.99963 9.54167 8.90364 9.725 8.71163C9.90833 8.5203 10 8.28297 10 7.99963C10 7.7163 9.90433 7.47863 9.713 7.28663C9.521 7.0953 9.28333 6.99963 9 6.99963H6.975C6.69167 6.99963 6.45833 7.0953 6.275 7.28663C6.09167 7.47863 6 7.7163 6 7.99963C6 8.28297 6.096 8.5203 6.288 8.71163C6.47933 8.90364 6.71667 8.99963 7 8.99963Z","fill","#4C5366"],["width","20","height","20","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["fill-rule","evenodd","clip-rule","evenodd","d","M20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44772 20.5523 5 20 5ZM4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4Z","fill","#777E91"],["fill-rule","evenodd","clip-rule","evenodd","d","M5.2318 7.35984C5.58537 6.93556 6.21593 6.87824 6.64021 7.2318L11.3598 11.1648C11.7307 11.4739 12.2694 11.4739 12.6402 11.1648L17.3598 7.2318C17.7841 6.87824 18.4147 6.93556 18.7682 7.35984C19.1218 7.78412 19.0645 8.41468 18.6402 8.76825L13.9206 12.7013C12.808 13.6284 11.192 13.6284 10.0795 12.7013L5.35984 8.76825C4.93556 8.41468 4.87824 7.78412 5.2318 7.35984Z","fill","#777E91"],[1,"snippyly-custom-button-container"]],template:function(e,n){e&1&&(Pt(),a(0,"div",0),w("click",function(){return n.openDialog()}),T(1,ue,4,4,"div",1)(2,he,2,0,"div",2),m()),e&2&&(l(),f("ngIf",n.showDefaultBtn()),l(),f("ngIf",!n.showDefaultBtn()))},dependencies:[q,Et,Tt,H],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}.user-request-tool-container[_ngcontent-%COMP%]{display:inline-block!important;cursor:pointer!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]{display:flex!important;align-items:center!important;gap:calc((.5rem + 0px) * var(--velt-base-rem-unit))!important;padding:calc((.5rem + 0px) * var(--velt-base-rem-unit)) calc((1rem + 0px) * var(--velt-base-rem-unit))!important;border-radius:100px!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%]:hover{background:#ededed!important}.user-request-tool-container[_ngcontent-%COMP%] .s-user-request-tool-button[_ngcontent-%COMP%] .s-user-request-tool-button-text[_ngcontent-%COMP%]{font-size:14px!important;color:#4c5366!important;font-weight:400!important}"],changeDetection:0});let o=i;return o})();var ie=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Dt({type:i}),i.\u0275inj=xt({imports:[Ft,Ut,Bt,At,Lt,Wt]});let o=i;return o})();function fe(o){o.get(C).log("%c[WB] Loading user-request feature chunk","color: blue;");let t=wt(ie,o).injector;ne(t,Ct.TAGS.VELT_USER_REQUEST_TOOL,bt),ne(t,Ct.TAGS.SNIPPYLY_USER_REQUEST_TOOL,bt)}function ne(o,i,v){if(customElements.get(i))return;let t=Rt(v,{injector:o});customElements.define(i,t)}export{fe as default};
|