UNPKG

@veltdev/sdk

Version:

Velt is an SDK to add collaborative features to your product within minutes. Example: Comments like Figma, Frame.io, Google docs or sheets, Recording like Loom, Huddles like Slack and much more.

1 lines 192 kB
import{a as yo}from"./chunk-JFNRCHYR.js";import{a as zt,f as $t,n as Wt,p as qt,q as Le,r as Qt,t as to,u as oo,v as no,w as io,x as pe}from"./chunk-U4YN7DB7.js";import{a as _o,b as bo}from"./chunk-JDLRIKAZ.js";import{A as G,B as j,a as go,b as ho,e as Ge,j as et,k as tt,l as ot,m as nt,n as je,p as it,q as rt,r as at,s as lt,w as Ne}from"./chunk-3J52NZMN.js";import{a as Co,b as fo}from"./chunk-4ACOV475.js";import{b as X,c as Ze,d as Ue}from"./chunk-WTYACTR5.js";import{$ as Jt,A as Nt,D as Zt,F as Fe,G as De,H as Ve,I as Ut,Z as Xt,_ as Yt,aa as Kt,ba as eo,ca as uo,da as Re,ea as Ce,ga as fe,i as Vt,k as Lt,l as Bt,m as Ht,n as Rt,p as Gt,s as jt}from"./chunk-KU45CEXD.js";import{$ as ft,$b as te,Ab as ee,Ba as be,Bb as N,Ca as kt,Cb as Ye,Cf as lo,Db as Y,Eb as Z,Ec as Pe,Ee as Be,F as ut,Fa as c,Fb as U,Ga as P,Gc as de,Hc as Pt,I as gt,Ib as S,Ic as At,Jb as Je,Jc as Ft,Kb as V,Ke as ro,L as ht,Lc as ie,Mb as ye,Nb as ke,Of as Ke,Oh as po,Pa as k,Pb as Me,Pc as Dt,Ra as Te,Rg as co,Ua as H,Va as xt,Vb as wt,Wa as Ie,Wb as Ot,Xa as $,Xb as Tt,Xc as Ae,Ya as K,_ as Ct,_a as y,_b as ge,a as w,aa as _t,ac as Ee,b as I,bc as ae,bi as mo,ca as Oe,cb as St,cc as le,da as oe,db as m,dc as It,dg as xe,di as R,fb as F,g as vt,gb as D,gg as so,ha as C,hc as Mt,ia as f,ic as Et,ja as B,jb as Qe,ka as bt,kb as Xe,kc as se,lb as v,lc as ce,li as He,mb as u,mi as vo,nb as g,ob as O,pc as J,qa as ne,rf as ao,sb as W,tb as q,ua as ue,ub as Q,va as yt,vb as M,wa as z,xb as T,xc as he,z as we,zb as l}from"./chunk-GR3NESUB.js";var Mo={provide:zt,useExisting:Ct(()=>st),multi:!0},st=(()=>{let r=class r extends Le{};r.\u0275fac=(()=>{let e;return function(o){return(e||(e=yt(r)))(o||r)}})(),r.\u0275dir=Ie({type:r,selectors:[["","contenteditable","","veltAutocomplete",""]],inputs:{veltAutocomplete:"veltAutocomplete"},exportAs:["snippylyUserSelectorTrigger"],standalone:!1,features:[ge([Mo]),K]});let n=r;return n})();var Eo=["matAutocomplete"],Po=["matAutocompleteTrigger"],Ao=["autocompletePanelInput"],Fo=["viewport"],Do=(n,r)=>({componentConfigSignal:n,parentLocalUIState:r}),Vo=(n,r)=>({condition:n,data:r}),Lo=n=>({componentConfigSignal:n}),Bo=(n,r,i)=>({template:null,context:n,componentName:"velt-autocomplete-panel-search-icon-wireframe",setIfCondition:r,componentElementRef:i}),$e=n=>({$implicit:n}),We=(n,r)=>({$implicit:n,isNewContact:r}),Ho=(n,r)=>r.id+"-"+n,Ro=(n,r)=>r.id;function Go(n,r){if(n&1){let i=M();u(0,"input",11,2),T("keyup",function(t){return C(i),f(t.stopPropagation())})("keydown",function(t){return C(i),f(t.stopPropagation())})("keyup.escape",function(t){return C(i),l(3).closePanel(),f(t.stopPropagation())})("input",function(t){return C(i),l(3).handleInternalInput(t),f(t.stopPropagation())}),g()}if(n&2){let i=l(3),e=S(2);v("placeholder",i.placeholder||"")("matAutocomplete",e)("matAutocompleteDisabled",!i.enableOnFocus)("matAutocompletePosition",i.position),m("aria-label",i.placeholder||"Search")("aria-autocomplete","list")("aria-controls",i.componentId+"-input")("data-testid",i.componentId+"-input")}}function jo(n,r){if(n&1&&(u(0,"div",7)(1,"div",9),F(2,Go,3,8,"input",10),g()()),n&2){let i=l(2);m("data-testid",i.componentId)("aria-expanded",i.trigger==null?null:i.trigger.panelOpen)("aria-haspopup",!0)("aria-controls",i.componentId),c(),m("data-testid",i.componentId+"-input-container"),c(),D(!i.hideInput&&!i.readOnly?2:-1)}}function No(n,r){n&1&&(B(),u(0,"svg",17),O(1,"path",18)(2,"path",19),g())}function Zo(n,r){if(n&1){let i=M();u(0,"div",9),y(1,No,3,0,"svg",15),u(2,"input",16,3),T("keyup",function(t){return C(i),f(t.stopPropagation())})("keydown",function(t){return C(i),f(t.stopPropagation())})("keyup.escape",function(t){return C(i),f(t.stopPropagation())})("input",function(t){return C(i),l(3).handleInternalInput(t),f(t.stopPropagation())}),g()()}if(n&2){let i=l(3);m("style",i.searchContainerWireframeStyle,be)("data-testid",i.componentId+"-input-container"),c(),v("veltDynamicTemplate",It(8,Bo,ae(6,Lo,i.componentConfigSignal),i.setIfCondition.bind(i),i.hostElementRef)),c(),v("placeholder",i.placeholder||""),m("aria-label",i.placeholder||"Search")("data-testid",i.componentId+"-input")}}function Uo(n,r){if(n&1){let i=M();u(0,"div",20)(1,"span",21),ke(2),g(),u(3,"span",22),T("click",function(t){return C(i),l(4).clearMultiSelection(),f(t.stopPropagation())}),ke(4,"UNSELECT ALL"),g()()}if(n&2){l();let i=Tt(0),e=l(3);m("style",e.headerWireframeStyle,be),c(),m("style",e.selectedCountWireframeStyle,be),c(),Me("",i," SELECTED"),c(),m("style",e.unselectAllWireframeStyle,be)}}function zo(n,r){if(n&1&&(wt(0),F(1,Uo,5,4,"div",20)),n&2){let i=Ot(l(3).getSelectedCount());c(),D(i>0?1:-1)}}function $o(n,r){if(n&1&&O(0,"velt-autocomplete-group-option-internal",25),n&2){let i=l().$implicit,e=l(4);v("componentConfigSignal",e.componentConfigSignal)("group",i.group)("groupName",i.groupName)}}function Wo(n,r){n&1&&Q(0)}function qo(n,r){if(n&1&&(u(0,"div",26),y(1,Wo,1,0,"ng-container",27),g()),n&2){let i=l().$implicit;l(4);let e=S(5);c(),v("ngTemplateOutlet",e)("ngTemplateOutletContext",ae(2,$e,i.originalItem))}}function Qo(n,r){n&1&&Q(0)}function Xo(n,r){if(n&1&&y(0,Qo,1,0,"ng-container",27),n&2){let i=l().$implicit;l(4);let e=S(5);v("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,We,i.originalItem,i.isNewContact))}}function Yo(n,r){if(n&1){let i=M();u(0,"div",24),T("click",function(t){let o=C(i).$implicit,a=l(4);return t.stopPropagation(),f(o.isGroupHeader?null:a.onOptionClick(o.originalItem))}),F(1,$o,1,3,"velt-autocomplete-group-option-internal",25)(2,qo,2,4,"div",26)(3,Xo,1,5,"ng-container"),g()}if(n&2){let i=r.$implicit;V("velt-group-option",i.isGroupHeader)("velt-group-member-option",i.isGroupMember)("velt-autocomplete-inline-option--disabled",i==null?null:i.disabled),m("id",i.id)("aria-disabled",i==null?null:i.disabled)("data-testid",i.testId),c(),D(i.isGroupHeader?1:i.isGroupMember?2:3)}}function Jo(n,r){if(n&1&&(u(0,"cdk-virtual-scroll-viewport",13,4),y(2,Yo,4,10,"div",23),g()),n&2){let i=l(3);v("itemSize",i.componentConfigSignal().autoCompleteScrollConfig.itemSize||55)("minBufferPx",i.componentConfigSignal().autoCompleteScrollConfig.minBufferPx||350)("maxBufferPx",i.componentConfigSignal().autoCompleteScrollConfig.maxBufferPx||600)("templateCacheSize",i.componentConfigSignal().autoCompleteScrollConfig.templateCacheSize||350),c(2),v("cdkVirtualForOf",i.componentConfigSignal().flattenedItems)("cdkVirtualForTrackBy",i.trackByInlineItem)}}function Ko(n,r){if(n&1&&O(0,"velt-autocomplete-group-option-internal",25),n&2){let i=l().$implicit,e=l(4);v("componentConfigSignal",e.componentConfigSignal)("group",i.group)("groupName",i.groupName)}}function en(n,r){n&1&&Q(0)}function tn(n,r){if(n&1&&(u(0,"div",26),y(1,en,1,0,"ng-container",27),g()),n&2){let i=l().$implicit;l(4);let e=S(5);c(),v("ngTemplateOutlet",e)("ngTemplateOutletContext",ae(2,$e,i.originalItem))}}function on(n,r){n&1&&Q(0)}function nn(n,r){if(n&1&&y(0,on,1,0,"ng-container",27),n&2){let i=l().$implicit;l(4);let e=S(5);v("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,We,i.originalItem,i.isNewContact))}}function rn(n,r){if(n&1){let i=M();u(0,"div",24),T("click",function(t){let o=C(i).$implicit,a=l(4);return t.stopPropagation(),f(o.isGroupHeader?null:a.onOptionClick(o.originalItem))}),F(1,Ko,1,3,"velt-autocomplete-group-option-internal",25)(2,tn,2,4,"div",26)(3,nn,1,5,"ng-container"),g()}if(n&2){let i=r.$implicit;V("velt-group-option",i.isGroupHeader)("velt-group-member-option",i.isGroupMember)("velt-autocomplete-inline-option--disabled",i==null?null:i.disabled),m("id",i.id)("aria-disabled",i==null?null:i.disabled)("data-testid",i.testId),c(),D(i.isGroupHeader?1:i.isGroupMember?2:3)}}function an(n,r){if(n&1&&(u(0,"div",14),Qe(1,rn,4,10,"div",28,Ho),g()),n&2){let i=l(3);c(),Xe(i.componentConfigSignal().flattenedItems)}}function ln(n,r){if(n&1&&(u(0,"div",8),F(1,Zo,4,12,"div",9),F(2,zo,2,2),u(3,"div",12),F(4,Jo,3,6,"cdk-virtual-scroll-viewport",13),F(5,an,3,0,"div",14),g()()),n&2){let i=l(2);m("data-testid",i.componentId)("aria-label",i.placeholder||"Search"),c(),D(!i.hideInput&&!i.readOnly?1:-1),c(),D(i.multiSelect&&!i.readOnly?2:-1),c(),V("s-comment-autocomplete-panel-dark",i.darkMode),m("data-testid",i.componentId+"-options-container"),c(),D(i.componentConfigSignal().flattenedItems.length>6?4:-1),c(),D(i.componentConfigSignal().flattenedItems.length<=6?5:-1)}}function sn(n,r){if(n&1&&(F(0,jo,3,6,"div",7),F(1,ln,6,9,"div",8)),n&2){let i=l();D(i.inline?-1:0),c(),D(i.inline?1:-1)}}function cn(n,r){if(n&1&&O(0,"velt-autocomplete-group-option-internal",25),n&2){let i=l().$implicit,e=l(3);v("componentConfigSignal",e.componentConfigSignal)("group",i.group)("groupName",i.groupName)}}function dn(n,r){n&1&&Q(0)}function pn(n,r){if(n&1&&(u(0,"div",26),y(1,dn,1,0,"ng-container",27),g()),n&2){let i=l().$implicit;l(3);let e=S(5);c(),v("ngTemplateOutlet",e)("ngTemplateOutletContext",ae(2,$e,i.originalItem))}}function mn(n,r){n&1&&Q(0)}function vn(n,r){if(n&1&&y(0,mn,1,0,"ng-container",27),n&2){let i=l().$implicit;l(3);let e=S(5);v("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,We,i.originalItem,i.isNewContact))}}function un(n,r){if(n&1){let i=M();u(0,"mat-option",31),T("pointerdown",function(t){return C(i),t.stopPropagation(),f(t.preventDefault())})("pointerup",function(t){let o=C(i).$implicit,a=l(3);return t.stopPropagation(),o.isGroupHeader?t.preventDefault():a.onOptionClick(o.originalItem),f(t.preventDefault())})("click",function(t){return C(i),f(t.stopPropagation())}),F(1,cn,1,3,"velt-autocomplete-group-option-internal",25)(2,pn,2,4,"div",26)(3,vn,1,5,"ng-container"),g()}if(n&2){let i=r.$implicit;V("velt-group-option",i.isGroupHeader)("velt-group-member-option",i.isGroupMember),v("disabled",i==null?null:i.disabled)("value",i.originalItem),m("id",i.id)("aria-disabled",i==null?null:i.disabled)("data-testid",i.testId),c(),D(i.isGroupHeader?1:i.isGroupMember?2:3)}}function gn(n,r){if(n&1&&(u(0,"cdk-virtual-scroll-viewport",13,4),y(2,un,4,10,"mat-option",30),g()),n&2){let i=l(2);v("itemSize",i.componentConfigSignal().autoCompleteScrollConfig.itemSize||55)("minBufferPx",i.componentConfigSignal().autoCompleteScrollConfig.minBufferPx||350)("maxBufferPx",i.componentConfigSignal().autoCompleteScrollConfig.maxBufferPx||600)("templateCacheSize",i.componentConfigSignal().autoCompleteScrollConfig.templateCacheSize||350),c(2),v("cdkVirtualForOf",i.componentConfigSignal().flattenedItems)("cdkVirtualForTrackBy",i.trackByFlattenedItem)}}function hn(n,r){if(n&1&&O(0,"velt-autocomplete-group-option-internal",25),n&2){let i=l().$implicit,e=l(3);v("componentConfigSignal",e.componentConfigSignal)("group",i.group)("groupName",i.groupName)}}function Cn(n,r){n&1&&Q(0)}function fn(n,r){if(n&1&&(u(0,"div",26),y(1,Cn,1,0,"ng-container",27),g()),n&2){let i=l().$implicit;l(3);let e=S(5);c(),v("ngTemplateOutlet",e)("ngTemplateOutletContext",ae(2,$e,i.originalItem))}}function _n(n,r){n&1&&Q(0)}function bn(n,r){if(n&1&&y(0,_n,1,0,"ng-container",27),n&2){let i=l().$implicit;l(3);let e=S(5);v("ngTemplateOutlet",e)("ngTemplateOutletContext",le(2,We,i.originalItem,i.isNewContact))}}function yn(n,r){if(n&1){let i=M();u(0,"mat-option",31),T("pointerdown",function(t){return C(i),t.stopPropagation(),f(t.preventDefault())})("pointerup",function(t){let o=C(i).$implicit,a=l(3);return t.stopPropagation(),o.isGroupHeader?t.preventDefault():a.onOptionClick(o.originalItem),f(t.preventDefault())})("click",function(t){return C(i),f(t.stopPropagation())}),F(1,hn,1,3,"velt-autocomplete-group-option-internal",25)(2,fn,2,4,"div",26)(3,bn,1,5,"ng-container"),g()}if(n&2){let i=r.$implicit;V("velt-group-option",i.isGroupHeader)("velt-group-member-option",i.isGroupMember),v("disabled",i==null?null:i.disabled)("value",i.originalItem),m("id",i.id)("aria-disabled",i==null?null:i.disabled)("data-testid",i.testId),c(),D(i.isGroupHeader?1:i.isGroupMember?2:3)}}function kn(n,r){if(n&1&&(u(0,"div",14),Qe(1,yn,4,10,"mat-option",32,Ro),g()),n&2){let i=l(2);c(),Xe(i.componentConfigSignal().flattenedItems)}}function xn(n,r){if(n&1&&(u(0,"div",29),F(1,gn,3,6,"cdk-virtual-scroll-viewport",13),F(2,kn,3,0,"div",14),g()),n&2){let i=l();V("s-comment-autocomplete-panel-dark",i.darkMode),m("data-testid",i.componentId+"-options-container"),c(),D(i.componentConfigSignal().flattenedItems.length>6?1:-1),c(),D(i.componentConfigSignal().flattenedItems.length<=6?2:-1)}}function Sn(n,r){if(n&1&&O(0,"velt-autocomplete-option-internal",33),n&2){let i=r.$implicit,e=r.isNewContact,t=l();v("componentConfigSignal",t.componentConfigSignal)("selectorItem",i)("isNewContact",e)("multiSelect",t.multiSelect)("isSelected",t.isItemSelected(i))("readOnly",t.readOnly)}}var lr=(()=>{let r=class r extends Ge{get trigger(){return this._trigger}set trigger(e){this._trigger=e,this.setTriggerToMatAutocomplete(),this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus)}get triggerElement(){return this._triggerElement}set triggerElement(e){if(this._triggerElement=e,this.triggerElement){let t=new z(this.triggerElement);this.trigger=new st(t,this.overlay,this.viewContainerRef,{run:o=>o(),runOutsideAngular:o=>o()},this.cd,null,this.directionality,null,document,this.viewportRuler)}}get enableOnFocus(){return this._enableOnFocus}set enableOnFocus(e){this._enableOnFocus=e,this.trigger&&(this.trigger.autocompleteDisabled=!this.enableOnFocus)}get excludeContacts(){return this._excludeContacts}set excludeContacts(e){this._excludeContacts=e,this.filterOptions()}set initialSelection(e){if(e){if(this.setMultiSelectItems([...e]),this.selectedFirstOrdering){let t=this.componentConfigSignal().flattenedItems;if(t?.length){let o=this.applySelectedFirstOrdering(t);this.componentConfigSignal.update(a=>I(w({},a),{flattenedItems:o}))}}this.flushPanelChangeDetection()}}set contacts(e){e&&(this._externalContacts=!0,this.userContacts=e,!this.selectedAutocompleteData&&this.type==="contact"&&(this.selectedAutocompleteData={hotkey:"",type:"contact",data:[]}),this.filterOptions())}get isInlineHost(){return this.inline}get multiSelectItems(){return this.multiSelectItemsSig()}setMultiSelectItems(e){this.multiSelectItemsSig.set(e)}constructor(){super(),this.type="contact",this._enableOnFocus=!1,this.position="auto",this._excludeContacts=[],this.showAtHere=!1,this.multiSelect=!1,this.selectedFirstOrdering=!1,this.readOnly=!1,this.inline=!1,this._externalContacts=!1,this.optionSelected=new P,this.atHereSelected=new P,this.userContactOptionSelected=new P,this.customOptionSelected=new P,this.groupOptionSelected=new P,this.enterPressed=new P,this.autocompleteStateChanged=new P,this.selectionChanged=new P,this.selectionConfirmed=new P,this.userContacts=[],this.paginatedContactList=!1,this.filterGeneration=0,this.user=null,this.inputFilterFormControl=new $t,this.userDocumentContacts=[],this.organizationGroups=[],this.subscriptions=[],this.scrollParentSubscriptions=[],this.isDestroyed=!1,this.autocompleteDisabledPositions=new Set,this.veltId=Ke(),this.veltElement=!0,this.componentConfigSignal=ne({flattenedItems:[],trackByFlattenedItem:this.trackByFlattenedItem.bind(this),onOptionClick:this.onOptionClick.bind(this),newUserContactError:void 0,newUserContact:void 0,customAutocompleteSearch:!1,expandMentionGroups:!1,showMentionGroupsFirst:!1,showMentionGroupsOnly:!1,customGroupsEnabled:!1,autoCompleteScrollConfig:{itemSize:55,minBufferPx:350,maxBufferPx:600,templateCacheSize:350}}),this.hereUserContact={name:"here",email:"",userId:"here",visibility:"here"},this.atHereDescription=null,this.dataList=[],this.autocompleteDataMap={},this.atHereEnabled=!1,this.componentId="velt-autocomplete-panel",this.multiSelectItemsSig=ne([]),this.MAX_VISIBLE_ITEMS=10,this.ITEM_SIZE=55,this.authService=oe(vo),this.autocompleteService=oe(go),this.contactService=oe(uo),this.overlay=oe(Fe),this.viewContainerRef=oe(Te),this.directionality=oe(Vt),this.viewportRuler=oe(Bt),this.commentActionsService=null,this.serviceBook=oe(mo),this.metadataService=oe(ho),this.wireframeService=oe(Co),this.searchContainerWireframeStyle=null,this.searchIconWireframeStyle=null,this.headerWireframeStyle=null,this.selectedCountWireframeStyle=null,this.unselectAllWireframeStyle=null,this.subscriptions.push(this.serviceBook.observe(po).subscribe(e=>this.commentActionsService=e));try{this.subscriptions.push(this.commentService.getCustomAutocompleteSearch$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=I(w({},t),{customAutocompleteSearch:e}),t))})),this.subscriptions.push(this.authService.getUser$().subscribe(e=>{this.user=e,this.filterOptions()})),this.subscriptions.push(this.autocompleteService.getAutocompleteDataMap$().subscribe(e=>{this.autocompleteDataMap=e,this.filterOptions()})),this.subscriptions.push(this.inputFilterFormControl.valueChanges.pipe(gt(150),ht()).subscribe(()=>{this.filterOptions()})),this.subscriptions.push(this.commentService.getAutoCompleteScrollConfig$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=I(w({},t),{autoCompleteScrollConfig:e}),t))}))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit:",e)}}ngOnInit(){try{super.ngOnInit(),this.type==="contact"?this.selectedAutocompleteData={hotkey:"",type:"contact",data:[]}:this.selectedAutocompleteData=void 0,this.subscriptions.push(this.contactService.getAtHereLabel().subscribe(e=>{this.hereUserContact.name=e})),this.subscriptions.push(this.contactService.getAtHereDescription().subscribe(e=>{this.atHereDescription=e})),this._externalContacts||this.subscriptions.push(this.contactService.getUserContacts$(this.metadata).subscribe(e=>{this.userContacts=e?.slice(),this.atHereEnabled&&(this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact)),this.filterOptions()})),this.subscriptions.push(this.contactService.getAtHereEnabled$().subscribe(e=>{this.atHereEnabled=e,e?this.userContacts?.find(t=>t?.visibility=="here")||this.userContacts.unshift(this.hereUserContact):this.userContacts=this.userContacts.filter(t=>t?.visibility!=="here"),this.filterOptions()})),this.subscriptions.push(this.contactService.getOrganizationGroups$().subscribe(e=>{this.organizationGroups=e,this.filterOptions()})),this.subscriptions.push(this.commentService.getExpandMentionGroups$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=I(w({},t),{expandMentionGroups:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsFirst$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=I(w({},t),{showMentionGroupsFirst:e}),t))})),this.subscriptions.push(this.commentService.getShowMentionGroupsOnly$().subscribe(e=>{this.componentConfigSignal.update(t=>(t=I(w({},t),{showMentionGroupsOnly:e}),t))})),this.subscriptions.push(this.commentService.getPaginatedContactList$().subscribe(e=>{this.paginatedContactList=e})),this.subscriptions.push(this.contactService.getUserDocumentContacts$().subscribe(e=>{this.userDocumentContacts=e,this.filterOptions()})),this._v2AutocompleteId=this.veltId||Ke(),this.coreService.getOrCreateContextConfig(this._v2AutocompleteId),this.loadInlineWireframeStyles()}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnInit: ",e)}}loadInlineWireframeStyles(){try{let e=this.wireframeService.getConditionElement("velt-autocomplete-panel-search-wireframe");e&&(this.searchContainerWireframeStyle=e.getAttribute("style"));let t=this.wireframeService.getConditionElement("velt-autocomplete-panel-header-wireframe");t&&(this.headerWireframeStyle=t.getAttribute("style"));let o=this.wireframeService.getConditionElement("velt-autocomplete-panel-selected-count-wireframe");o&&(this.selectedCountWireframeStyle=o.getAttribute("style"));let a=this.wireframeService.getConditionElement("velt-autocomplete-panel-unselect-all-wireframe");a&&(this.unselectAllWireframeStyle=a.getAttribute("style"))}catch(e){this.loggingService.catch("Error loading inline wireframe styles:",e)}}setupA11yAttributes(){try{let e=this.hostElementRef.nativeElement;e.setAttribute("role","listbox"),e.setAttribute("data-testid",this.componentId+"-container")}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setupA11yAttributes:",e)}}ngAfterViewInit(){try{if(this.inline){requestAnimationFrame(()=>{this.autocompletePanelInput?.nativeElement&&this.autocompletePanelInput.nativeElement.focus()});return}this.setTriggerToMatAutocomplete(),requestAnimationFrame(()=>{if(this.autocompletePanelInput?.nativeElement){this.autocompletePanelInput.nativeElement.focus();let e=this.getViewport();if(e){let t=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;e.style.height=`${t}px`,e.style.maxHeight=`${t}px`}this.openPanelOptimized()}this.triggerElement?this.subscriptions.push(we(this.triggerElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())})):this.autocompletePanelInput&&this.subscriptions.push(we(this.autocompletePanelInput.nativeElement,"blur").subscribe(()=>{requestAnimationFrame(()=>this.closePanel())}))})}catch(e){this.loggingService.catch("Error in ngAfterViewInit:",e)}}ngOnDestroy(){try{this.isDestroyed=!0,super.ngOnDestroy(),this.isDestroyed=!0,this.subscriptions.forEach(e=>e.unsubscribe()),this.removeScrollParentListeners(),this._v2AutocompleteId&&this.coreService.clearContextConfig(this._v2AutocompleteId)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent ngOnDestroy:",e)}}filterOptions(){return vt(this,null,function*(){try{let e=++this.filterGeneration;if(this.selectedAutocompleteData)if(this.selectedAutocompleteData.type==="contact"){let t=this.inputFilterFormControl.value,o=new ao,a=t?.toLowerCase()?.trim();o.email=a;let s=new RegExp(Be.REGEX_EMAIL).test("@"+o?.email),d=this.userContacts.slice();if(!this.componentConfigSignal().customAutocompleteSearch)if(t){if(d=this.actionService.filterContacts(this.userContacts,o),this.paginatedContactList&&d.length<3){if(yield this.actionService.fetchFilteredUsersFromDb(t),e!==this.filterGeneration)return;d=this.userContacts.slice(),d=this.actionService.filterContacts(this.userContacts,o)}}else d=this.userContacts.slice();this.atHereEnabled&&this.hereUserContact?.name?.includes(a)&&!d?.find(p=>p?.userId=="here")&&(d=[this.hereUserContact,...d]),d=d.filter(p=>!this.excludeContacts?.find(x=>x?.email===p?.email));let _=t?this.actionService.filterGroups(this.organizationGroups,t):this.organizationGroups,E=d.map(p=>{let x=!1;return p.visibility==="here"&&(this.atHereDescription?(p.email=`${this.atHereDescription}`,p.description=this.atHereDescription):this.user?.organizationId&&(p.email=`${this.userDocumentContacts?.length||0} members`,p.description=`${this.userDocumentContacts?.length||0} members`)),{type:"contact",contact:p,disabled:x}}),b=_.map(p=>({type:"group",group:p})),h=[...E,...b];if(this.componentConfigSignal().expandMentionGroups){let p=[],x={},re=new Map;h.forEach(A=>{if(A.contact?.userId){let qe=lo(A.contact?.userId);re.set(qe,A),x[A.contact?.userId]=!1}});let _e=new Map;this.organizationGroups.forEach(A=>{_e.set(A.metadata.clientGroupId,{id:A.metadata.clientGroupId,name:A.metadata.groupName,members:[],userIds:Object.keys(A.users||{})})}),_e.forEach(A=>{A.userIds.forEach(qe=>{let Se=re.get(qe);Se&&(A.members.push(Se),Se.contact?.userId&&(x[Se.contact.userId]=!0))})}),h.forEach(A=>{A.type==="contact"&&A.contact?.userId&&!x[A.contact?.userId]&&p.push(A)});let pt=Array.from(_e.values()),mt=h.length?void 0:{type:"contact",contact:o},To=this.actionService.createFlattenedItems({allItems:h,contactsWithoutGroup:p,groups:pt,newUserContact:mt,isExpandedGroups:!0,isCustomGroups:!1,showMentionGroupsOnly:this.componentConfigSignal().showMentionGroupsOnly,showMentionGroupsFirst:this.componentConfigSignal().showMentionGroupsFirst}),Io=this.applySelectedFirstOrdering(To);this.componentConfigSignal.update(A=>I(w({},A),{flattenedItems:Io,newUserContactError:s?void 0:"Invalid email",newUserContact:mt,contactsWithoutGroup:p,groups:pt}))}else{let p=h.length?void 0:{type:"contact",contact:o},x=this.actionService.createFlattenedItems({allItems:h,newUserContact:p,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:this.componentConfigSignal().showMentionGroupsOnly,showMentionGroupsFirst:this.componentConfigSignal().showMentionGroupsFirst}),re=this.applySelectedFirstOrdering(x);this.componentConfigSignal.update(_e=>I(w({},_e),{flattenedItems:re,newUserContactError:s?void 0:"Invalid email",newUserContact:p}))}if(this.inline)setTimeout(()=>{let p=this.getViewport();if(p){let x=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;p.style.height=`${x}px`,p.style.maxHeight=`${x}px`}this.viewport?.checkViewportSize(),this.viewport?.scrollToIndex(0)},0);else{let p=this.getViewport();if(p){let x=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;p.style.height=`${x}px`,p.style.maxHeight=`${x}px`}}this.openPanelOptimized(),this.cd.markForCheck()}else{let t=this.inputFilterFormControl.value,o=this.autocompleteDataMap?.[this.selectedAutocompleteData?.hotkey],a=o?.data?.slice()||[];if(this.componentConfigSignal().customAutocompleteSearch||(t?a=this.actionService.filterCustomItems(this.selectedAutocompleteData?.data?.slice()||[],t):a=this.selectedAutocompleteData?.data?.slice()||[]),o?.groups&&o.groups.length>0){let d=[],_=new Map;o.groups?.forEach(p=>{_.set(p.id,{id:p.id,name:p.name,members:[]})}),a.forEach(p=>{let x={type:"custom",custom:p};p.groupId&&_.has(p.groupId)?_.get(p.groupId)?.members.push(x):d.push(x)});let E=Array.from(_.values()).filter(p=>p.members.length>0),b=this.actionService.createFlattenedItems({allItems:[],contactsWithoutGroup:d,groups:E,isExpandedGroups:!1,isCustomGroups:!0,showMentionGroupsOnly:this.componentConfigSignal().showMentionGroupsOnly,showMentionGroupsFirst:this.componentConfigSignal().showMentionGroupsFirst}),h=this.applySelectedFirstOrdering(b);this.componentConfigSignal.update(p=>I(w({},p),{customGroupsEnabled:!0,flattenedItems:h,contactsWithoutGroup:d,groups:E}))}else{let d=a.map(b=>({type:"custom",custom:b})),_=this.actionService.createFlattenedItems({allItems:d,isExpandedGroups:!1,isCustomGroups:!1,showMentionGroupsOnly:this.componentConfigSignal().showMentionGroupsOnly,showMentionGroupsFirst:this.componentConfigSignal().showMentionGroupsFirst}),E=this.applySelectedFirstOrdering(_);this.componentConfigSignal.update(b=>I(w({},b),{customGroupsEnabled:!1,flattenedItems:E}))}if(this.inline)setTimeout(()=>{let d=this.getViewport();if(d){let _=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;d.style.height=`${_}px`,d.style.maxHeight=`${_}px`}this.viewport?.checkViewportSize(),this.viewport?.scrollToIndex(0)},0);else{let d=this.getViewport();if(d){let _=this.ITEM_SIZE*this.MAX_VISIBLE_ITEMS;d.style.height=`${_}px`,d.style.maxHeight=`${_}px`}}this.openPanelOptimized(),this.cd.markForCheck()}}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent filterOptions: ",e)}})}displayFn(e){try{return e?.name||e?.email||""}catch(t){return this.loggingService.catch("Error in AutocompletePanelComponent displayFn: ",t),""}}trackByFlattenedItem(e,t){try{return t.id||e.toString()}catch(o){return this.loggingService.catch("Error in AutocompletePanelComponent trackByFlattenedItem: ",o),e.toString()}}trackByInlineItem(e,t){try{return(t.id||e.toString())+"-"+e}catch(o){return this.loggingService.catch("Error in AutocompletePanelComponent trackByInlineItem: ",o),e.toString()}}setTriggerToMatAutocomplete(){try{this.matAutocomplete&&this.trigger&&(this.trigger.autocomplete=this.matAutocomplete)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setTriggerToMatAutocomplete: ",e)}}handleInternalInput(e){try{let t=e?.target?.value;if(this.inputFilterFormControl.setValue(t),this.componentConfigSignal().customAutocompleteSearch){let o={event:e,searchText:t,type:this.selectedAutocompleteData?.type};this.commentActionsService?.autocompleteSearch(o)}!this.inline&&!this.matAutocompleteTrigger?.panelOpen&&this.openPanelOptimized(),e.stopPropagation()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent handleInternalInput: ",t)}}onOptionSelected(e){try{if(this.readOnly)return;if(this.multiSelect){this.confirmMultiSelection();return}if(this.enterPressed.emit(),this.selectedAutocompleteData)if(this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null),e.option.value?.type==="group"){let t=e.option.value.group;this.groupOptionSelected.emit({groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId,group:t})}else if(this.selectedAutocompleteData.type==="contact"){let t=e.option.value.contact;if(t?.visibility=="here")this.atHereSelected.emit(t);else{let o=!t?.email||new RegExp(Be.REGEX_EMAIL).test("@"+t?.email);o&&(this.addContact(),this.optionSelected.emit(t),this.callbackOnOptionSelected(t)),this.userContactOptionSelected.emit({userId:t.userId,contact:t,isEmailValid:o})}}else{let t=e.option.value.custom;this.customOptionSelected.emit({custom:t})}this.closePanel()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionSelected: ",t)}}onOptionClick(e){try{if(this.readOnly)return;if(this.multiSelect){this.toggleMultiSelectItem(e);return}if(this.selectedAutocompleteData){if(this.autocompletePanelInput?.nativeElement&&(this.autocompletePanelInput.nativeElement.value=""),this.inputFilterFormControl.setValue(null),this.selectedAutocompleteData.type==="custom"){let t=e.custom;t&&this.customOptionSelected.emit({custom:t})}else if(e?.type==="group"){let t=e.group;t&&this.groupOptionSelected.emit({groupId:t?.metadata?.groupId,clientGroupId:t?.metadata?.clientGroupId,group:t})}else{let t=e.contact;if(t)if(t?.visibility==="here")this.atHereSelected.emit(t);else{let o=!t?.email||new RegExp(Be.REGEX_EMAIL).test("@"+t?.email);o&&(this.addContact(),this.optionSelected.emit(t),this.callbackOnOptionSelected(t)),this.userContactOptionSelected.emit({userId:t.userId,contact:t,isEmailValid:o})}}this.closePanel()}}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent onOptionClick: ",t)}}toggleMultiSelectItem(e){try{let t=this.multiSelectItems,o=t.findIndex(s=>this.isSameItem(s,e)),a=o>=0?t.filter((s,d)=>d!==o):[...t,e];if(this.setMultiSelectItems(a),this.selectionChanged.emit([...a]),this.selectedFirstOrdering){let s=this.componentConfigSignal().flattenedItems,d=this.applySelectedFirstOrdering(s);this.componentConfigSignal.update(_=>I(w({},_),{flattenedItems:d}))}this.flushPanelChangeDetection()}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent toggleMultiSelectItem: ",t)}}flushPanelChangeDetection(){try{this.cd.detectChanges()}catch{try{this.cd.markForCheck()}catch{}}}confirmMultiSelection(){try{this.selectionConfirmed.emit([...this.multiSelectItems]),this.setMultiSelectItems([]),this.closePanel()}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent confirmMultiSelection: ",e)}}isItemSelected(e){try{return this.multiSelectItems.some(t=>this.isSameItem(t,e))}catch{return!1}}isSameItem(e,t){try{return e.type!==t.type?!1:e.type==="contact"&&t.type==="contact"?e.contact?.userId&&t.contact?.userId?e.contact.userId===t.contact.userId:e.contact?.email&&t.contact?.email?e.contact.email===t.contact.email:!1:e.type==="custom"&&t.type==="custom"?e.custom?.id&&t.custom?.id?e.custom.id===t.custom.id:!1:e.type==="group"&&t.type==="group"&&e.group?.metadata?.groupId&&t.group?.metadata?.groupId?e.group.metadata.groupId===t.group.metadata.groupId:!1}catch{return!1}}applySelectedFirstOrdering(e){try{if(!this.multiSelect||!this.selectedFirstOrdering||!e?.length)return e;let t=[],o=[];for(let a of e)a.isGroupHeader||a.isGroupMember?o.push(a):this.isItemSelected(a.originalItem)?t.push(a):o.push(a);return[...t,...o]}catch(t){return this.loggingService.catch("Error in applySelectedFirstOrdering:",t),e}}clearMultiSelection(){try{this.setMultiSelectItems([]),this.selectionChanged.emit([]),this.filterOptions(),this.flushPanelChangeDetection()}catch(e){this.loggingService.catch("Error in clearMultiSelection:",e)}}getSelectedCount(){return this.multiSelectItems.length}getSelectedItems(){return[...this.multiSelectItems]}addContact(){try{this.componentConfigSignal().newUserContact?.contact&&(this.contactService.addUserContact(this.componentConfigSignal().newUserContact?.contact),this.componentConfigSignal.update(e=>(e=I(w({},e),{newUserContact:void 0}),e)))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent addContact: ",e)}}setAutocompletePosition(){try{this.matAutocompleteTrigger&&(this.matAutocompleteTrigger.position=this.position)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent setAutocompletePosition: ",e)}}callbackOnOptionSelected(e){try{this.contactService.onContactSelected(e)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent callbackOnOptionSelected: ",t)}}getViewport(){try{return this.inline?this.hostElementRef?.nativeElement?.querySelector("cdk-virtual-scroll-viewport")||null:this.matAutocompleteTrigger?._overlayRef?.overlayElement?.querySelector("cdk-virtual-scroll-viewport")||null}catch(e){return this.loggingService.catch("Error in AutocompletePanelComponent getViewport: ",e),null}}openPanelOptimized(){try{if(this.inline)return;this.trigger?requestAnimationFrame(()=>{this.isDestroyed||(this.trigger?.openPanel(),this.trigger?.updatePosition(),this.addScrollParentListeners(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10))}):this.matAutocompleteTrigger&&(this.matAutocompleteTrigger?.panelOpen||requestAnimationFrame(()=>{this.isDestroyed||(this.matAutocompleteTrigger?.openPanel(),this.matAutocompleteTrigger?.updatePosition(),this.addScrollParentListeners(),setTimeout(()=>{this.autocompleteStateChanged.emit(!0)},10))})),setTimeout(()=>{this.viewport?.scrollToIndex(1),this.viewport?.scrollToIndex(0)},50)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent openPanelOptimized: ",e)}}closePanel(){try{if(this.inline)return;this.removeScrollParentListeners(),this.trigger?(this.trigger.closePanel(),this.inputFilterFormControl.setValue("")):this.matAutocompleteTrigger&&this.matAutocompleteTrigger.closePanel(),this.type!=="contact"&&(this.selectedAutocompleteData=void 0),this.multiSelect&&this.multiSelectItems.length>0&&this.selectionChanged.emit([]),this.setMultiSelectItems([]),this.blockGhostClick(),setTimeout(()=>{this.autocompleteStateChanged.emit(!1)},300)}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent closePanel: ",e)}}blockGhostClick(){try{let e=t=>{t.stopPropagation(),t.preventDefault()};document.addEventListener("click",e,{capture:!0,once:!0}),setTimeout(()=>{document.removeEventListener("click",e,{capture:!0})},400)}catch{}}addScrollParentListeners(){try{if(this.removeScrollParentListeners(),this.isDestroyed)return;let e=this.triggerElement??this.autocompletePanelInput?.nativeElement??this.hostElementRef?.nativeElement;if(!e)return;let t=so(e);for(let o of t)this.scrollParentSubscriptions.push(we(o,"scroll",{passive:!0}).pipe(ut(16)).subscribe(()=>{this.trigger?.panelOpen?this.trigger.updatePosition():this.matAutocompleteTrigger?.panelOpen&&this.matAutocompleteTrigger.updatePosition()}))}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent addScrollParentListeners:",e)}}removeScrollParentListeners(){try{this.scrollParentSubscriptions.forEach(e=>e.unsubscribe()),this.scrollParentSubscriptions=[]}catch(e){this.loggingService.catch("Error in AutocompletePanelComponent removeScrollParentListeners:",e)}}disableAutocompleteAtPosition(e){try{this.autocompleteDisabledPositions.add(e),setTimeout(()=>{this.autocompleteDisabledPositions.delete(e)},3e4)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent disableAutocompleteAtPosition: ",t)}}isDisabledAtPosition(e,t){try{let o=this.getRegisteredHotkeys(),a=-1;for(let s of o){let d=e.lastIndexOf(s,t);d>a&&(a=d)}return a!==-1&&this.autocompleteDisabledPositions.has(a)}catch(o){return this.loggingService.catch("Error in AutocompletePanelComponent isDisabledAtPosition: ",o),!1}}getRegisteredHotkeys(){try{return this.autocompleteDataMap?Object.keys(this.autocompleteDataMap):["@"]}catch{return["@"]}}getAutocompleteDataForHotkey(e){try{return this.autocompleteDataMap?.[e]}catch{return}}openWithHotkey(e){try{let t=this.autocompleteDataMap?.[e];t&&((!this.selectedAutocompleteData||this.autocompleteDataMap[e])&&(this.selectedAutocompleteData=t),this.isPanelOpen()||(this.openPanelOptimized(),this.filterOptions()))}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent openWithHotkey: ",t)}}setFilterText(e){try{this.inputFilterFormControl.setValue(e)}catch(t){this.loggingService.catch("Error in AutocompletePanelComponent setFilterText: ",t)}}isPanelOpen(){try{return!!(this.trigger?.panelOpen||this.matAutocompleteTrigger?.panelOpen)}catch{return!1}}getActiveHotkey(){try{return this.selectedAutocompleteData?.hotkey||"@"}catch{return"@"}}isCustomAutocompleteSearchEnabled(){try{return!!this.componentConfigSignal().customAutocompleteSearch}catch{return!1}}resetAutocompleteData(){try{this.selectedAutocompleteData=void 0}catch{}}hasNoValidMatches(){try{return(this.componentConfigSignal().flattenedItems||[]).filter(a=>!a.isNewContact).length===0}catch{return!1}}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=H({type:r,selectors:[["velt-autocomplete-panel-internal"]],viewQuery:function(t,o){if(t&1&&(Y(Eo,5),Y(Po,5),Y(Ao,5),Y(Fo,5)),t&2){let a;Z(a=U())&&(o.matAutocomplete=a.first),Z(a=U())&&(o.matAutocompleteTrigger=a.first),Z(a=U())&&(o.autocompletePanelInput=a.first),Z(a=U())&&(o.viewport=a.first)}},hostVars:4,hostBindings:function(t,o){t&2&&(m("data-velt-id",o.veltId)("data-velt-element",o.veltElement),V("velt-autocomplete-panel--inline-host",o.isInlineHost))},inputs:{type:"type",trigger:[0,"autocompletePanelTrigger","trigger"],triggerElement:[0,"autocompletePanelTriggerElement","triggerElement"],hideInput:"hideInput",placeholder:"placeholder",metadata:"metadata",enableOnFocus:"enableOnFocus",position:[0,"autocompletePanelPosition","position"],excludeContacts:"excludeContacts",showAtHere:"showAtHere",multiSelect:"multiSelect",selectedFirstOrdering:"selectedFirstOrdering",readOnly:"readOnly",initialSelection:"initialSelection",inline:"inline",contacts:"contacts"},outputs:{optionSelected:"optionSelected",atHereSelected:"atHereSelected",userContactOptionSelected:"userContactOptionSelected",customOptionSelected:"customOptionSelected",groupOptionSelected:"groupOptionSelected",enterPressed:"enterPressed",autocompleteStateChanged:"autocompleteStateChanged",selectionChanged:"selectionChanged",selectionConfirmed:"selectionConfirmed"},standalone:!1,features:[ge([Re]),K],decls:6,vars:13,consts:[["matAutocomplete","matAutocomplete"],["userContactRef",""],["autocompletePanelInput","","matAutocompleteTrigger","matAutocompleteTrigger"],["autocompletePanelInput",""],["viewport",""],["role","listbox",1,"velt-autocomplete-panel--autocomplete",3,"optionSelected","autoActiveFirstOption","hideSingleSelectionIndicator","snippylyOverlay","snippylyOverlayZIndex","displayWith"],["class","velt-autocomplete-panel--container",3,"s-comment-autocomplete-panel-dark",4,"veltIf"],["role","combobox",1,"velt-autocomplete-panel"],["role","listbox",1,"velt-autocomplete-panel","velt-autocomplete-panel--inline"],[1,"velt-autocomplete-panel--input"],["type","text","autofocus","","autofocus","",3,"placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition"],["type","text","autofocus","","autofocus","",3,"keyup","keydown","keyup.escape","input","placeholder","matAutocomplete","matAutocompleteDisabled","matAutocompletePosition"],[1,"velt-autocomplete-panel--container","velt-autocomplete-panel--inline-container"],[1,"velt-autocomplete-panel--viewport",3,"itemSize","minBufferPx","maxBufferPx","templateCacheSize"],[1,"velt-autocomplete-panel--normal-viewport"],["class","velt-autocomplete-panel--search-icon","width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg",4,"veltDynamicTemplate"],["type","text","autofocus","",3,"keyup","keydown","keyup.escape","input","placeholder"],["width","14","height","14","viewBox","0 0 14 14","fill","none","xmlns","http://www.w3.org/2000/svg",1,"velt-autocomplete-panel--search-icon"],["d","M6.41667 11.0833C8.994 11.0833 11.0833 8.994 11.0833 6.41667C11.0833 3.83934 8.994 1.75 6.41667 1.75C3.83934 1.75 1.75 3.83934 1.75 6.41667C1.75 8.994 3.83934 11.0833 6.41667 11.0833Z","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],["d","M12.25 12.25L9.71252 9.7125","stroke","currentColor","stroke-width","1.5","stroke-linecap","round","stroke-linejoin","round"],[1,"velt-autocomplete-panel--multi-select-header"],[1,"velt-autocomplete-panel--selected-count"],[1,"velt-autocomplete-panel--unselect-all",3,"click"],["class","velt-autocomplete-inline-option",3,"velt-group-option","velt-group-member-option","velt-autocomplete-inline-option--disabled","click",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[1,"velt-autocomplete-inline-option",3,"click"],[3,"componentConfigSignal","group","groupName"],[1,"velt-group-member"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"velt-autocomplete-inline-option",3,"velt-group-option","velt-group-member-option","velt-autocomplete-inline-option--disabled"],[1,"velt-autocomplete-panel--container"],[3,"disabled","value","velt-group-option","velt-group-member-option","pointerdown","pointerup","click",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[3,"pointerdown","pointerup","click","disabled","value"],[3,"disabled","value","velt-group-option","velt-group-member-option"],[3,"componentConfigSignal","selectorItem","isNewContact","multiSelect","isSelected","readOnly"]],template:function(t,o){if(t&1){let a=M();F(0,sn,2,2),u(1,"mat-autocomplete",5,0),T("optionSelected",function(d){return C(a),f(o.onOptionSelected(d))}),y(3,xn,3,5,"div",6),g(),y(4,Sn,1,6,"ng-template",null,1,J)}if(t&2){let a,s=S(2);D((a=o.componentConfigSignal())?0:-1,a),c(),v("autoActiveFirstOption",!0)("hideSingleSelectionIndicator",!0)("snippylyOverlay",s)("snippylyOverlayZIndex",2147483627)("displayWith",o.displayFn),c(2),v("veltIf",le(10,Vo,o.conditionSignal(),le(7,Do,o.componentConfigSignal,o.localUIStateSignal)))}},dependencies:[ie,Lt,Rt,Ht,qt,Wt,Le,G,j,pe,je,Ne],styles:["html[_ngcontent-%COMP%]{--velt-base-rem-unit: 1}*[data-snippyly-element=true][_ngcontent-%COMP%], *[data-velt-element=true][_ngcontent-%COMP%]{font-family:var(--velt-default-font-family)}velt-wireframe[_ngcontent-%COMP%]{display:none!important}body.velt-pin-dragging[_ngcontent-%COMP%] iframe[_ngcontent-%COMP%]{pointer-events:none!important}[_nghost-%COMP%], .velt-autocomplete-panel--autocomplete{--velt-green: var(--velt-light-mode-green);--velt-magenta: var(--velt-light-mode-magenta);--velt-amber: var(--velt-light-mode-amber);--velt-purple: var(--velt-light-mode-purple);--velt-cyan: var(--velt-light-mode-cyan);--velt-orange: var(--velt-light-mode-orange);--velt-black: var(--velt-light-mode-black);--velt-white: var(--velt-light-mode-white);--velt-gray: var(--velt-light-mode-gray);--velt-error: var(--velt-light-mode-error);--velt-error-hover: var(--velt-light-mode-error-hover);--velt-error-foreground: var(--velt-light-mode-error-foreground);--velt-error-light: var(--velt-light-mode-error-light);--velt-error-transparent: var(--velt-light-mode-error-transparent);--velt-warning: var(--velt-light-mode-warning);--velt-warning-hover: var(--velt-light-mode-warning-hover);--velt-warning-foreground: var(--velt-light-mode-warning-foreground);--velt-warning-light: var(--velt-light-mode-warning-light);--velt-warning-transparent: var(--velt-light-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-light-mode-success);--velt-success-hover: var(--velt-light-mode-success-hover);--velt-success-foreground: var(--velt-light-mode-success-foreground);--velt-success-light: var(--velt-light-mode-success-light);--velt-success-transparent: var(--velt-light-mode-success-transparent);--velt-accent: var(--velt-light-mode-accent);--velt-accent-text: var(--velt-light-mode-accent-text);--velt-accent-hover: var(--velt-light-mode-accent-hover);--velt-accent-foreground: var(--velt-light-mode-accent-foreground);--velt-accent-light: var(--velt-light-mode-accent-light);--velt-accent-transparent: var(--velt-light-mode-accent-transparent);--velt-text-0: var(--velt-light-mode-text-0);--velt-text-1: var(--velt-light-mode-text-1);--velt-text-2: var(--velt-light-mode-text-2);--velt-text-3: var(--velt-light-mode-text-3);--velt-text-4: var(--velt-light-mode-text-4);--velt-text-5: var(--velt-light-mode-text-5);--velt-text-6: var(--velt-light-mode-text-6);--velt-text-7: var(--velt-light-mode-text-7);--velt-text-8: var(--velt-light-mode-text-8);--velt-text-9: var(--velt-light-mode-text-9);--velt-text-10: var(--velt-light-mode-text-10);--velt-text-11: var(--velt-light-mode-text-11);--velt-text-12: var(--velt-light-mode-text-12);--velt-background-0: var(--velt-light-mode-background-0);--velt-background-1: var(--velt-light-mode-background-1);--velt-background-2: var(--velt-light-mode-background-2);--velt-background-3: var(--velt-light-mode-background-3);--velt-background-4: var(--velt-light-mode-background-4);--velt-background-5: var(--velt-light-mode-background-5);--velt-background-6: var(--velt-light-mode-background-6);--velt-background-7: var(--velt-light-mode-background-7);--velt-background-8: var(--velt-light-mode-background-8);--velt-background-9: var(--velt-light-mode-background-9);--velt-background-10: var(--velt-light-mode-background-10);--velt-border-0: var(--velt-light-mode-border-0);--velt-border-1: var(--velt-light-mode-border-1);--velt-border-2: var(--velt-light-mode-border-2);--velt-border-3: var(--velt-light-mode-border-3);--velt-border-4: var(--velt-light-mode-border-4);--velt-border-5: var(--velt-light-mode-border-5);--velt-border-6: var(--velt-light-mode-border-6);--velt-border-7: var(--velt-light-mode-border-7);--velt-border-8: var(--velt-light-mode-border-8);--velt-border-9: var(--velt-light-mode-border-9);--velt-border-10: var(--velt-light-mode-border-10);--velt-background-transparent: var(--velt-light-mode-background-transparent);--velt-border-transparent: var(--velt-light-mode-border-transparent);--velt-animation-transparent: var(--velt-light-mode-animation-transparent)}[dark][_nghost-%COMP%], .velt-autocomplete-panel--autocomplete:has(>.s-comment-autocomplete-panel-dark){--velt-green: var(--velt-dark-mode-green);--velt-magenta: var(--velt-dark-mode-magenta);--velt-amber: var(--velt-dark-mode-amber);--velt-purple: var(--velt-dark-mode-purple);--velt-cyan: var(--velt-dark-mode-cyan);--velt-orange: var(--velt-dark-mode-orange);--velt-black: var(--velt-dark-mode-black);--velt-white: var(--velt-dark-mode-white);--velt-gray: var(--velt-dark-mode-gray);--velt-error: var(--velt-dark-mode-error);--velt-error-hover: var(--velt-dark-mode-error-hover);--velt-error-foreground: var(--velt-dark-mode-error-foreground);--velt-error-light: var(--velt-dark-mode-error-light);--velt-error-transparent: var(--velt-dark-mode-error-transparent);--velt-warning: var(--velt-dark-mode-warning);--velt-warning-hover: var(--velt-dark-mode-warning-hover);--velt-warning-foreground: var(--velt-dark-mode-warning-foreground);--velt-warning-light: var(--velt-dark-mode-warning-light);--velt-warning-transparent: var(--velt-dark-mode-warning-transparent);--velt-agent-accent: #4495ff;--velt-agent-accent-transparent: rgba(68, 149, 255, .2);--velt-success: var(--velt-dark-mode-success);--velt-success-hover: var(--velt-dark-mode-success-hover);--velt-success-foreground: var(--velt-dark-mode-success-foreground);--velt-success-light: var(--velt-dark-mode-success-light);--velt-success-transparent: var(--velt-dark-mode-success-transparent);--velt-accent: var(--velt-dark-mode-accent);--velt-accent-text: var(--velt-dark-mode-accent-text);--velt-accent-hover: var(--velt-dark-mode-accent-hover);--velt-accent-foreground: var(--velt-dark-mode-accent-foreground);--velt-accent-light: var(--velt-dark-mode-accent-light);--velt-accent-transparent: var(--velt-dark-mode-accent-transparent);--velt-text-0: var(--velt-dark-mode-text-0);--velt-text-1: var(--velt-dark-mode-text-1);--velt-text-2: var(--velt-dark-mode-text-2);--velt-text-3: var(--velt-dark-mode-text-3);--velt-text-4: var(--velt-dark-mode-text-4);--velt-text-5: var(--velt-dark-mode-text-5);--velt-text-6: var(--velt-dark-mode-text-6);--velt-text-7: var(--velt-dark-mode-text-7);--velt-text-8: var(--velt-dark-mode-text-8);--velt-text-9: var(--velt-dark-mode-text-9);--velt-text-10: var(--velt-dark-mode-text-10);--velt-text-11: var(--velt-dark-mode-text-11);--velt-text-12: var(--velt-dark-mode-text-12);--velt-background-0: var(--velt-dark-mode-background-0);--velt-background-1: var(--velt-dark-mode-background-1);--velt-background-2: var(--velt-dark-mode-background-2);--velt-background-3: var(--velt-dark-mode-background-3);--velt-background-4: var(--velt-dark-mode-background-4);--velt-background-5: var(--velt-dark-mode-background-5);--velt-background-6: var(--velt-dark-mode-background-6);--velt-background-7: var(--velt-dark-mode-background-7);--velt-background-8: var(--velt-dark-mode-background-8);--velt-background-9: var(--velt-dark-mode-background-9);--velt-background-10: var(--velt-dark-mode-background-10);--velt-border-0: var(--velt-dark-mode-border-0);--velt-border-1: var(--velt-dark-mode-border-1);--velt-border-2: var(--velt-dark-mode-border-2);--velt-border-3: var(--velt-dark-mode-border-3);--velt-border-4: var(--velt-dark-mode-border-4);--velt-border-5: var(--velt-dark-mode-border-5);--velt-border-6: var(--velt-dark-mode-border-6);--velt-border-7: var(--velt-dark-mode-border-7);--velt-border-8: var(--velt-dark-mode-border-8);--velt-border-9: var(--velt-dark-mode-border-9);--velt-border-10: var(--velt-dark-mode-border-10);--velt-background-transparent: var(--velt-dark-mode-background-transparent);--