From e4ee62e059db8f23bd98865cc783c6a788655ec8 Mon Sep 17 00:00:00 2001 From: Jonathan ASSAMAGAN <80401029+kuro-jojo@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:00:16 +0000 Subject: [PATCH] Auto-generated commit --- 404.html | 2 +- index.html | 2 +- main-D452R3FI.js => main-KYM7PQVS.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename main-D452R3FI.js => main-KYM7PQVS.js (98%) diff --git a/404.html b/404.html index 23e3ff6..33a9bd1 100644 --- a/404.html +++ b/404.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/index.html b/index.html index 23e3ff6..33a9bd1 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/main-D452R3FI.js b/main-KYM7PQVS.js similarity index 98% rename from main-D452R3FI.js rename to main-KYM7PQVS.js index 97a8258..1d87165 100644 --- a/main-D452R3FI.js +++ b/main-KYM7PQVS.js @@ -51,6 +51,6 @@ provideFirebaseApp) or you're calling an AngularFire method outside of an NgModu } } `;this.styleElement.innerHTML=e}}close(e){this.confirmation?.rejectEvent&&this.confirmation.rejectEvent.emit(Ks.CANCEL),this.hide(Ks.CANCEL),e.preventDefault()}hide(e){this.onHide.emit(e),this.visible=!1,this.confirmation=null,this.confirmationOptions=null}moveOnTop(){this.autoZIndex&&(It.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}getMaskClass(){let e={"p-dialog-mask p-component-overlay":!0,"p-dialog-mask-scrollblocker":this.blockScroll};return e[this.getPositionClass().toString()]=!0,e}getPositionClass(){let i=["left","right","top","top-left","top-right","bottom","bottom-left","bottom-right"].find(r=>r===this.position);return i?`p-dialog-${i}`:""}bindGlobalListeners(){if(this.option("closeOnEscape")&&this.closable||this.focusTrap&&!this.documentEscapeListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentEscapeListener=this.renderer.listen(e,"keydown",i=>{if(i.which==27&&this.option("closeOnEscape")&&this.closable&&parseInt(this.container.style.zIndex)===It.get(this.container)&&this.visible&&this.close(i),i.which===9&&this.focusTrap){i.preventDefault();let r=S.getFocusableElements(this.container);if(r&&r.length>0)if(!r[0].ownerDocument.activeElement)r[0].focus();else{let s=r.indexOf(r[0].ownerDocument.activeElement);i.shiftKey?s==-1||s===0?r[r.length-1].focus():r[s-1].focus():s==-1||s===r.length-1?r[0].focus():r[s+1].focus()}}})}}unbindGlobalListeners(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}onOverlayHide(){this.container&&this.autoZIndex&&It.clear(this.container),this.disableModality(),this.unbindGlobalListeners(),this.container=null}destroyStyle(){this.styleElement&&(this.document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.restoreAppend(),this.onOverlayHide(),this.subscription.unsubscribe(),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.destroyStyle()}accept(){this.confirmation&&this.confirmation.acceptEvent&&this.confirmation.acceptEvent.emit(),this.hide(Ks.ACCEPT)}reject(){this.confirmation&&this.confirmation.rejectEvent&&this.confirmation.rejectEvent.emit(Ks.REJECT),this.hide(Ks.REJECT)}get acceptButtonLabel(){return this.option("acceptLabel")||this.config.getTranslation(Pt.ACCEPT)}get rejectButtonLabel(){return this.option("rejectLabel")||this.config.getTranslation(Pt.REJECT)}static \u0275fac=function(i){return new(i||n)(v(De),v(et),v(aa),v(se),v(ke),v(ut),v(Se))};static \u0275cmp=M({type:n,selectors:[["p-confirmDialog"]],contentQueries:function(i,r,s){if(i&1&&(We(s,Rh,5),We(s,Ve,4)),i&2){let o;W(o=q())&&(r.footer=o.first),W(o=q())&&(r.templates=o)}},viewQuery:function(i,r){if(i&1&&fe(RH,5),i&2){let s;W(s=q())&&(r.contentViewChild=s.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",icon:"icon",message:"message",style:"style",styleClass:"styleClass",maskStyleClass:"maskStyleClass",acceptIcon:"acceptIcon",acceptLabel:"acceptLabel",closeAriaLabel:"closeAriaLabel",acceptAriaLabel:"acceptAriaLabel",acceptVisible:[I.HasDecoratorInputTransform,"acceptVisible","acceptVisible",A],rejectIcon:"rejectIcon",rejectLabel:"rejectLabel",rejectAriaLabel:"rejectAriaLabel",rejectVisible:[I.HasDecoratorInputTransform,"rejectVisible","rejectVisible",A],acceptButtonStyleClass:"acceptButtonStyleClass",rejectButtonStyleClass:"rejectButtonStyleClass",closeOnEscape:[I.HasDecoratorInputTransform,"closeOnEscape","closeOnEscape",A],dismissableMask:[I.HasDecoratorInputTransform,"dismissableMask","dismissableMask",A],blockScroll:[I.HasDecoratorInputTransform,"blockScroll","blockScroll",A],rtl:[I.HasDecoratorInputTransform,"rtl","rtl",A],closable:[I.HasDecoratorInputTransform,"closable","closable",A],appendTo:"appendTo",key:"key",autoZIndex:[I.HasDecoratorInputTransform,"autoZIndex","autoZIndex",A],baseZIndex:[I.HasDecoratorInputTransform,"baseZIndex","baseZIndex",pe],transitionOptions:"transitionOptions",focusTrap:[I.HasDecoratorInputTransform,"focusTrap","focusTrap",A],defaultFocus:"defaultFocus",breakpoints:"breakpoints",visible:"visible",position:"position"},outputs:{onHide:"onHide"},features:[Ie],ngContentSelectors:BH,decls:1,vars:1,consts:[["notHeadless",""],["content",""],[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["role","alertdialog",3,"ngClass","ngStyle","class",4,"ngIf"],["role","alertdialog",3,"ngClass","ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-dialog-header",4,"ngIf"],[1,"p-dialog-content"],[3,"ngClass","class",4,"ngIf"],[4,"ngIf"],["class","p-confirm-dialog-message",3,"innerHTML",4,"ngIf"],["class","p-dialog-footer",4,"ngIf"],[1,"p-dialog-header"],[4,"ngTemplateOutlet"],["class","p-dialog-title",3,"id",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","role","button",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title",3,"id"],["type","button","role","button",3,"click","keydown.enter","ngClass"],[1,"p-confirm-dialog-message",3,"innerHTML"],[1,"p-dialog-footer"],["type","button","pRipple","","pButton","",3,"label","ngClass","class","click",4,"ngIf"],["type","button","pRipple","","pButton","",3,"click","label","ngClass"],["class","p-button-icon-left",4,"ngIf"],[3,"class",4,"ngIf"],[3,"styleClass",4,"ngIf"],[3,"styleClass"],[1,"p-button-icon-left"]],template:function(i,r){i&1&&(_t(LH),F(0,Cz,2,4,"div",2)),i&2&&u("ngIf",r.maskVisible)},dependencies:()=>[_e,ye,Ye,Pe,la,cn,wt,ri],styles:[`@layer primeng{.p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{-webkit-transition:none;transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}} -`],encapsulation:2,data:{animation:[Rn("animation",[Ut("void => visible",[ta(Ez)]),Ut("visible => void",[ta(Dz)])])]},changeDetection:0})}return n})(),n3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Q({type:n});static \u0275inj=K({imports:[ce,Wi,un,wt,ri,Wi,Me]})}return n})();var ns={online:"ONLINE",offline:"OFFLINE",busy:"BUSY"};var Ei={production:!1,firebaseConfig:{apiKey:"",authDomain:"",projectId:"",storageBucket:"",messagingSenderId:"",appId:"",measurementId:""},apiUrl:"",usersEndpoint:"",chatEndpoint:"",chatWebsocketEndpoint:""};var is=(()=>{let t=class t{constructor(i){this.http=i,this.discussionApiEndpoint=Ei.apiUrl+Ei.chatEndpoint+"/discussions",this.currentDiscussionSubject$=new dt(void 0),this.currentDiscussion$=this.currentDiscussionSubject$.asObservable()}setCurrentDiscussion(i){this.currentDiscussionSubject$.next(i)}getCurrentDiscussion(){return this.currentDiscussion$}getDiscussionByContact(i){return this.http.get(`${this.discussionApiEndpoint}/contacts/${i}`)}startDiscussion(i){return this.http.post(`${this.discussionApiEndpoint}`,i)}updateMessageStatus(i,r){return this.http.patch(`${this.discussionApiEndpoint}/${i}/messages`,r)}getDiscussionHistory(){}};t.\u0275fac=function(r){return new(r||t)(z(As))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Bt=(()=>{let t=class t{constructor(i){this.http=i,this.usersApiBaseUrl=Ei.apiUrl+Ei.usersEndpoint,this.userInfoSubject$=new dt({}),this.userInfo$=this.userInfoSubject$.asObservable()}setCurrentUser(i){this.userInfoSubject$.next(i)}getCurrentUser(){return this.userInfo$}updateUserStatus(i){return this.http.patch(`${this.usersApiBaseUrl}/status`,{status:i})}getCurrentUserDetails(){return this.http.get(`${this.usersApiBaseUrl}/details`)}getUserDetails(i){return this.http.get(`${this.usersApiBaseUrl}/details/${i}`)}addContact(i){return this.http.patch(`${this.usersApiBaseUrl}/contacts/${i}`,{})}registerUserWithEmailOrPhoneNumber(i){let r=new FormData;return i.profilePicture&&r.append("picture",i.profilePicture),i.profilePicture="",r.append("user",new Blob([JSON.stringify(i)],{type:"application/json"})),this.http.post(`${this.usersApiBaseUrl}/register/basic`,r)}registerUserWithOauth(){return this.http.post(`${this.usersApiBaseUrl}/register/oauth`,{})}updateUser(i){return this.http.put(`${this.usersApiBaseUrl}`,i)}updateUserProfilePicture(i){let r=new FormData;return r.append("picture",i),this.http.put(`${this.usersApiBaseUrl}/picture`,r)}updateUserName(i){return this.http.put(`${this.usersApiBaseUrl}/name`,{name:i})}removeContact(i){return this.http.delete(`${this.usersApiBaseUrl}/contacts/${i}`)}findByName(i){return this.findBy("name",i)}findByEmail(i){return this.findBy("email",i)}findBy(i,r){return this.http.get(`${this.usersApiBaseUrl}?t=${i}&q=${r}`)}};t.\u0275fac=function(r){return new(r||t)(z(As))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var kz=n=>({active:n}),Sz=(n,t)=>({" text-success":n," text-danger":t});function Tz(n,t){n&1&&(m(0,"div",8)(1,"p"),V(2,"No contacts found"),g()())}function Nz(n,t){if(n&1){let e=U();m(0,"div")(1,"div",12),k("click",function(){let r=E(e).$implicit,s=p(2);return D(s.loadDiscussion(r))}),b(2,"img",13),m(3,"div",14)(4,"div",15)(5,"span",16),V(6),g(),m(7,"div")(8,"span",17),V(9),g(),m(10,"span",18),V(11,"12m"),g()()(),m(12,"span",19),V(13,"Last message"),g()()()()}if(n&2){let e=t.$implicit,i=p(2);h(),u("ngClass",ee(6,kz,i.activeContact===e.id)),h(),u("src",e.profilePicture,Fn)("alt",e.name),h(4),Ce(e.name),h(2),u("ngClass",Ze(8,Sz,e.status==i.userStatuses.online,e.status==i.userStatuses.offline)),h(),Ot(" ",e.status,"")}}function xz(n,t){if(n&1&&(m(0,"p-scrollPanel",9)(1,"div",10),F(2,Nz,14,11,"div",11),g()()),n&2){let e=p();h(2),u("ngForOf",e.contacts)}}var CF=(()=>{let t=class t{constructor(i,r){this.discussionService=i,this.userService=r,this.contacts=[],this.subscriptions=[],this.userStatuses=ns}ngOnInit(){this.initializeCurrentUser()}initializeCurrentUser(){this.subscriptions.push(this.userService.getCurrentUser().pipe(de(i=>i),He(i=>(this.currentUser=i,this.getListOfContacts(i)))).subscribe({next:i=>{this.contacts.push(i)},error:i=>{console.error(i)}}))}getListOfContacts(i){return i.contacts?Xe(i.contacts).pipe(zn(r=>this.userService.getUserDetails(r)),Nt(r=>le(r))):le()}loadDiscussion(i){this.subscriptions.push(this.discussionService.getDiscussionByContact(i.id).subscribe({next:r=>{this.activeContact=i.id,this.discussionService.setCurrentDiscussion(r)},error:r=>{console.error(r)}}))}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(is),v(Bt))},t.\u0275cmp=M({type:t,selectors:[["app-contacts"]],decls:12,vars:2,consts:[[1,"content"],[1,"header"],[1,"title"],["severity","success",3,"value"],[1,"search-bar"],["iconPosition","left"],["styleClass","pi pi-search"],["type","text","pInputText","","placeholder","Search in my contacts"],[1,"empty-contacts"],[1,"contacts-panel"],[1,"contacts"],[4,"ngFor","ngForOf"],[1,"contact",3,"click","ngClass"],[1,"contact-profile",3,"src","alt"],[1,"contact-info"],[1,"data"],[1,"name"],[1,"status",3,"ngClass"],[1,"status"],[1,"last-message"]],template:function(r,s){r&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),V(4,"Messages "),b(5,"p-badge",3),g()()(),m(6,"div",4)(7,"p-iconField",5),b(8,"p-inputIcon",6)(9,"input",7),g()(),F(10,Tz,3,0,"div",8)(11,xz,3,1),g()),r&2&&(h(5),u("value",12),h(5),Lr(10,s.contacts.length==0?10:11))},dependencies:[_e,yt,_D,Lh,Bh,dn,ua],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;position:relative;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px;gap:16px;width:100%;height:100px;background:#fff;box-shadow:0 1px #00000014}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:0 24px}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:24px;line-height:150%;color:#000}.search-bar[_ngcontent-%COMP%]{width:100%;padding:12px 24px}.search-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#f3f3f3;width:100%}.contacts-panel[_ngcontent-%COMP%]{width:100%}.contacts[_ngcontent-%COMP%]{height:100vh;margin-top:1rem}.empty-contacts[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;color:var(--text-secondary);font-size:1.5rem;font-weight:600;margin:auto}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:16px;box-shadow:0 1px #00000014;padding:10px}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]:hover{background-color:#f3f3f3;cursor:pointer;border-radius:4px}.contacts[_ngcontent-%COMP%] .contact.active[_ngcontent-%COMP%]{background-color:#f3f3f3}.contact-profile[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%}.contact-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0;gap:8px;height:69px;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#000}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:14px;line-height:150%;padding:10px;color:#000;opacity:.5}.contact-info[_ngcontent-%COMP%] .last-message[_ngcontent-%COMP%]{width:229px;height:18px;font-family:Inter;font-style:normal;font-weight:600;font-size:12px;line-height:150%;color:#00000080}"]});let n=t;return n})();var Az=["fileUploader"],Mz=()=>({width:"20rem",height:"20rem",borderRadius:"50%",alignSelf:"center"});function Oz(n,t){if(n&1){let e=U();m(0,"span",15),k("click",function(){E(e);let r=p();return D(r.editProfile())}),V(1," Edit"),g()}}function Pz(n,t){if(n&1){let e=U();m(0,"span",16),k("click",function(){E(e);let r=p();return D(r.cancelProfileEdit())}),V(1," Cancel"),g()}}function Rz(n,t){if(n&1){let e=U();m(0,"span",17),k("click",function(){E(e);let r=p();return D(r.saveProfile())}),V(1," Save"),g()}}function Lz(n,t){n&1&&b(0,"i",18)}function Bz(n,t){n&1&&b(0,"i",18)}function Vz(n,t){if(n&1){let e=U();m(0,"i",19),k("click",function(){E(e);let r=p();return D(r.editName())}),g()}}function jz(n,t){if(n&1){let e=U();m(0,"i",20),k("click",function(){E(e);let r=p();return D(r.editName())}),g()}}var i3=(()=>{let t=class t{constructor(i,r){this.userService=i,this.messageService=r,this.tempProfile="",this.editLoading=!1,this.isEditingName=!1,this.isEditingProfile=!1}ngOnInit(){this.items=[{label:"Options",items:[{label:"Refresh",icon:"pi pi-refresh"},{label:"Export",icon:"pi pi-upload"}]}],this.currentUserSubscription=this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error(i)}})}editName(){this.isEditingName?(this.editLoading=!0,vn(1e3).subscribe(()=>{this.userService.updateUserName(this.currentUser.name).subscribe({next:()=>{this.editLoading=!1,this.isEditingName=!1,this.messageService.add({severity:"success",summary:"Success",detail:"Name updated successfully"})},error:i=>{console.error(i),this.messageService.add({severity:"error",summary:"Error",detail:"Failed to update name"})}})})):this.isEditingName=!0}editProfile(){let i=this.fileUpload.nativeElement.files;if(console.log("temp",this.tempProfile),i&&i.length>0){var r=new FileReader;r.readAsDataURL(i[0]),r.onload=s=>{s.target&&(this.tempProfile=s.target.result,this.isEditingProfile=!0)}}else console.log("No file selected"),this.fileUpload.nativeElement.click()}cancelProfileEdit(){this.tempProfile="",this.isSavingProfile=!1,this.isEditingProfile=!1,this.fileUpload.nativeElement.value=""}saveProfile(){if(this.isSavingProfile=!0,!this.tempProfile){this.isSavingProfile=!1,this.messageService.add({severity:"error",summary:"Error",detail:"No profile picture selected"});return}vn(1e3).subscribe(()=>{console.log("Saving profile"),this.userService.updateUserProfilePicture(this.fileUpload.nativeElement.files[0]).subscribe({next:()=>{this.currentUser.profilePicture=this.tempProfile,this.cancelProfileEdit(),this.messageService.add({severity:"success",summary:"Success",detail:"Profile picture updated successfully"})},error:i=>{console.error(i),this.cancelProfileEdit(),this.messageService.add({severity:"error",summary:"Error",detail:"Failed to update profile picture"})}})})}ngOnDestroy(){this.currentUserSubscription.unsubscribe()}};t.\u0275fac=function(r){return new(r||t)(v(Bt),v(ln))},t.\u0275cmp=M({type:t,selectors:[["app-profile"]],viewQuery:function(r,s){if(r&1&&fe(Az,5),r&2){let o;W(o=q())&&(s.fileUpload=o.first)}},decls:26,vars:14,consts:[["fileUploader",""],[1,"content"],[1,"picture"],["alt","user profile picture",3,"imageStyle","src","preview"],[1,"editor"],["class","edit-profile",3,"click",4,"ngIf"],["class","edit-profile text-danger",3,"click",4,"ngIf"],["class","edit-profile text-success",3,"click",4,"ngIf"],["class","pi-edit pi pi-spin pi-spinner",4,"ngIf"],["type","file","name","pic","accept","image/*",2,"display","none",3,"change"],[1,"info"],[1,"editable"],["id","disabled-input","type","text","pInputText","",3,"ngModelChange","disabled","ngModel"],["class","pi-edit pi pi-pencil",3,"click",4,"ngIf"],["class","pi-edit pi pi-check",3,"click",4,"ngIf"],[1,"edit-profile",3,"click"],[1,"edit-profile","text-danger",3,"click"],[1,"edit-profile","text-success",3,"click"],[1,"pi-edit","pi","pi-spin","pi-spinner"],[1,"pi-edit","pi","pi-pencil",3,"click"],[1,"pi-edit","pi","pi-check",3,"click"]],template:function(r,s){if(r&1){let o=U();b(0,"p-toast"),m(1,"div",1)(2,"h1"),V(3,"Profile"),g(),m(4,"div",2),b(5,"p-image",3),m(6,"div",4),F(7,Oz,2,0,"span",5)(8,Pz,2,0,"span",6)(9,Rz,2,0,"span",7)(10,Lz,1,0,"i",8),m(11,"input",9,0),k("change",function(){return E(o),D(s.editProfile())}),g()()(),m(13,"div",10)(14,"span"),V(15,"Your name"),g(),m(16,"div",11)(17,"h2")(18,"input",12),Mn("ngModelChange",function(l){return E(o),Yn(s.currentUser.name,l)||(s.currentUser.name=l),D(l)}),g()(),F(19,Bz,1,0,"i",8)(20,Vz,1,0,"i",13)(21,jz,1,0,"i",14),g(),m(22,"span"),V(23,"Your email"),g(),m(24,"h2"),V(25),g()()()}r&2&&(h(5),u("imageStyle",Et(13,Mz))("src",s.tempProfile!=""?s.tempProfile:s.currentUser==null?null:s.currentUser.profilePicture)("preview",!0),h(2),u("ngIf",!s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isSavingProfile),h(8),u("disabled",!s.isEditingName),An("ngModel",s.currentUser.name),h(),u("ngIf",s.editLoading),h(),u("ngIf",!s.isEditingName),h(),u("ngIf",s.isEditingName&&!s.editLoading),h(4),Ce(s.currentUser==null?null:s.currentUser.email))},dependencies:[ye,In,kn,Vn,dn,ts,JD],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1.5rem;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}h1[_ngcontent-%COMP%]{margin:1rem 0 1.5rem}.profile[_ngcontent-%COMP%]{width:20rem;height:20rem;border-radius:50%;align-self:center}.picture[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:1rem}.picture[_ngcontent-%COMP%] .editor[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.picture[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--text-secondary);cursor:pointer}.info[_ngcontent-%COMP%]{margin-top:2rem}h2[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.5rem}span[_ngcontent-%COMP%]{display:inline-block;font-size:.8rem;color:var(--primary-color);margin-bottom:1rem}.pi-edit[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--primary-color);margin:0 0 1rem 1rem;cursor:pointer}.editable[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}"]});let n=t;return n})();function Uz(n,t){if(n&1){let e=U();m(0,"div")(1,"div",12),k("click",function(r){let s=E(e).$implicit,o=p(2);return D(o.addNewContact(r,s))}),b(2,"img",13),m(3,"div",14)(4,"div",15)(5,"span",16),V(6),g(),m(7,"span",17),V(8),g()()()()()}if(n&2){let e=t.$implicit;h(2),u("src",e.profilePicture,Fn)("alt",e.name),h(4),Ce(e.name),h(2),Ce(e.email?e.email:e.phoneNumber)}}function Hz(n,t){if(n&1&&(m(0,"div"),F(1,Uz,9,4,"div",11),g()),n&2){let e=p();h(),u("ngForOf",e.contacts)}}function zz(n,t){n&1&&(m(0,"div",18),b(1,"i",19),g())}var r3=(()=>{let t=class t{constructor(i,r,s,o){this.userService=i,this.confirmationService=r,this.discussionService=s,this.messageService=o,this.searchQuery="",this.isSearching=!1,this.subscriptions=[],this.userService.findByName(this.searchQuery).subscribe({next:a=>{this.contacts=a,this.isSearching=!1},error:a=>{this.isSearching=!1,console.error(a)}})}ngOnInit(){this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error(i)}})}searchUsers(){if(!this.searchQuery){this.contacts=[];return}this.isSearching=!0,this.subscriptions.push(this.userService.findByName(this.searchQuery).subscribe({next:i=>{this.contacts=i,console.log(i),this.isSearching=!1},error:i=>{this.isSearching=!1,console.error(i)}}))}addNewContact(i,r){this.confirmationService.confirm({target:i.target,message:`Do you want to start a new discussion with ${r.name}?`,header:"Add new contact",icon:"pi pi-address-book",acceptIcon:"none",rejectIcon:"none",rejectButtonStyleClass:"p-button-text",accept:()=>{let s={ownerId:this.currentUser?.id,contactId:r.id};this.subscriptions.push(this.discussionService.startDiscussion(s).pipe(He(o=>this.userService.addContact(r.id).pipe(de(()=>o)))).subscribe({next:o=>{this.messageService.add({severity:"success",summary:"Success",detail:"New discussion started and contact added"}),this.discussionService.setCurrentDiscussion(o),this.updateCurrentUser()},error:o=>{o&&o.status===409?this.messageService.add({severity:"error",summary:"Error",detail:"A discussion already exists with this contact"}):this.messageService.add({severity:"error",summary:"Error",detail:"An error occurred while starting a new discussion or adding contact"}),console.error(o)}}))}})}updateCurrentUser(){this.subscriptions.push(this.userService.getCurrentUserDetails().subscribe({next:i=>{this.userService.setCurrentUser(i),console.log("New user",i)},error:i=>{console.error(i),this.messageService.add({severity:"error",summary:"Error",detail:"An error occurred while loading user details"})}}))}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(Bt),v(aa),v(is),v(ln))},t.\u0275cmp=M({type:t,selectors:[["app-contacts"]],decls:14,vars:3,consts:[[1,"content"],[1,"header"],[1,"title"],[1,"search-bar"],["type","text","pInputText","","placeholder","Search contacts by name","autofocus","",3,"ngModelChange","keydown.enter","ngModel"],[1,"pi","pi-search",3,"click"],[1,"contacts-panel"],[1,"contacts"],[3,"value"],["pTemplate","list"],["class","spinner",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"contact",3,"click"],[1,"contact-profile",3,"src","alt"],[1,"contact-info"],[1,"data"],[1,"name"],[1,"email"],[1,"spinner"],[1,"pi","pi-spin","pi-spinner"]],template:function(r,s){r&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),V(4,"Find new contacts "),g()()(),m(5,"div",3)(6,"input",4),Mn("ngModelChange",function(a){return Yn(s.searchQuery,a)||(s.searchQuery=a),a}),k("keydown.enter",function(){return s.searchUsers()}),g(),m(7,"i",5),k("click",function(){return s.searchUsers()}),g(),b(8,"p-confirmDialog"),g(),m(9,"p-scrollPanel",6)(10,"div",7)(11,"p-dataView",8),F(12,Hz,2,1,"ng-template",9),g(),F(13,zz,2,0,"div",10),g()()()),r&2&&(h(6),An("ngModel",s.searchQuery),h(5),u("value",s.contacts),h(2),u("ngIf",s.isSearching))},dependencies:[yt,ye,In,kn,Vn,Ve,dn,ua,LD,t3],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;position:relative;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px;gap:16px;width:100%;height:100px;background:#fff;box-shadow:0 1px #00000014}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:0 24px}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:24px;line-height:150%;color:#000}.search-bar[_ngcontent-%COMP%]{width:100%;padding:12px 24px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1rem}.pi[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--primary-color);cursor:pointer}.search-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#f3f3f3;width:100%}.contacts-panel[_ngcontent-%COMP%]{width:100%}.contacts-panel[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{text-align:center}.contacts[_ngcontent-%COMP%]{height:100vh}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:16px;box-shadow:0 1px #00000014;padding:10px;align-items:center;height:80px}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]:hover{background-color:#f3f3f3;cursor:pointer;border-radius:2px}.contact-profile[_ngcontent-%COMP%]{width:auto;height:100%;border-radius:12px}.contact-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#000}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:14px;line-height:150%;padding:10px;color:#000;opacity:.5}.contact-info[_ngcontent-%COMP%] .last-message[_ngcontent-%COMP%]{width:229px;height:18px;font-family:Inter;font-style:normal;font-weight:600;font-size:12px;line-height:150%;color:#00000080}"]});let n=t;return n})();function s3(n,t,e){let i=n?t.url:e;t.navigateByUrl("/",{skipLocationChange:!0}).then(()=>{t.navigate([i])})}var Ys={LF:` +`],encapsulation:2,data:{animation:[Rn("animation",[Ut("void => visible",[ta(Ez)]),Ut("visible => void",[ta(Dz)])])]},changeDetection:0})}return n})(),n3=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Q({type:n});static \u0275inj=K({imports:[ce,Wi,un,wt,ri,Wi,Me]})}return n})();var ns={online:"ONLINE",offline:"OFFLINE",busy:"BUSY"};var Ei={production:!1,firebaseConfig:{apiKey:"AIzaSyAjEiKmcaTcZW2yscyWqICf1UQzCNexvsg",authDomain:"kuroline-5ca05.firebaseapp.com",projectId:"kuroline-5ca05",storageBucket:"kuroline-5ca05.appspot.com",messagingSenderId:"283404876573",appId:"1:283404876573:web:470994df5aed73004a7ff4",measurementId:"G-LQMNNNCKBN"},apiUrl:"http://localhost:8090",usersEndpoint:"/api/v1/users",chatEndpoint:"/api/v1/chat",chatWebsocketEndpoint:"/ws/v1/chat"};var is=(()=>{let t=class t{constructor(i){this.http=i,this.discussionApiEndpoint=Ei.apiUrl+Ei.chatEndpoint+"/discussions",this.currentDiscussionSubject$=new dt(void 0),this.currentDiscussion$=this.currentDiscussionSubject$.asObservable()}setCurrentDiscussion(i){this.currentDiscussionSubject$.next(i)}getCurrentDiscussion(){return this.currentDiscussion$}getDiscussionByContact(i){return this.http.get(`${this.discussionApiEndpoint}/contacts/${i}`)}startDiscussion(i){return this.http.post(`${this.discussionApiEndpoint}`,i)}updateMessageStatus(i,r){return this.http.patch(`${this.discussionApiEndpoint}/${i}/messages`,r)}getDiscussionHistory(){}};t.\u0275fac=function(r){return new(r||t)(z(As))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var Bt=(()=>{let t=class t{constructor(i){this.http=i,this.usersApiBaseUrl=Ei.apiUrl+Ei.usersEndpoint,this.userInfoSubject$=new dt({}),this.userInfo$=this.userInfoSubject$.asObservable()}setCurrentUser(i){this.userInfoSubject$.next(i)}getCurrentUser(){return this.userInfo$}updateUserStatus(i){return this.http.patch(`${this.usersApiBaseUrl}/status`,{status:i})}getCurrentUserDetails(){return this.http.get(`${this.usersApiBaseUrl}/details`)}getUserDetails(i){return this.http.get(`${this.usersApiBaseUrl}/details/${i}`)}addContact(i){return this.http.patch(`${this.usersApiBaseUrl}/contacts/${i}`,{})}registerUserWithEmailOrPhoneNumber(i){let r=new FormData;return i.profilePicture&&r.append("picture",i.profilePicture),i.profilePicture="",r.append("user",new Blob([JSON.stringify(i)],{type:"application/json"})),this.http.post(`${this.usersApiBaseUrl}/register/basic`,r)}registerUserWithOauth(){return this.http.post(`${this.usersApiBaseUrl}/register/oauth`,{})}updateUser(i){return this.http.put(`${this.usersApiBaseUrl}`,i)}updateUserProfilePicture(i){let r=new FormData;return r.append("picture",i),this.http.put(`${this.usersApiBaseUrl}/picture`,r)}updateUserName(i){return this.http.put(`${this.usersApiBaseUrl}/name`,{name:i})}removeContact(i){return this.http.delete(`${this.usersApiBaseUrl}/contacts/${i}`)}findByName(i){return this.findBy("name",i)}findByEmail(i){return this.findBy("email",i)}findBy(i,r){return this.http.get(`${this.usersApiBaseUrl}?t=${i}&q=${r}`)}};t.\u0275fac=function(r){return new(r||t)(z(As))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var kz=n=>({active:n}),Sz=(n,t)=>({" text-success":n," text-danger":t});function Tz(n,t){n&1&&(m(0,"div",8)(1,"p"),V(2,"No contacts found"),g()())}function Nz(n,t){if(n&1){let e=U();m(0,"div")(1,"div",12),k("click",function(){let r=E(e).$implicit,s=p(2);return D(s.loadDiscussion(r))}),b(2,"img",13),m(3,"div",14)(4,"div",15)(5,"span",16),V(6),g(),m(7,"div")(8,"span",17),V(9),g(),m(10,"span",18),V(11,"12m"),g()()(),m(12,"span",19),V(13,"Last message"),g()()()()}if(n&2){let e=t.$implicit,i=p(2);h(),u("ngClass",ee(6,kz,i.activeContact===e.id)),h(),u("src",e.profilePicture,Fn)("alt",e.name),h(4),Ce(e.name),h(2),u("ngClass",Ze(8,Sz,e.status==i.userStatuses.online,e.status==i.userStatuses.offline)),h(),Ot(" ",e.status,"")}}function xz(n,t){if(n&1&&(m(0,"p-scrollPanel",9)(1,"div",10),F(2,Nz,14,11,"div",11),g()()),n&2){let e=p();h(2),u("ngForOf",e.contacts)}}var CF=(()=>{let t=class t{constructor(i,r){this.discussionService=i,this.userService=r,this.contacts=[],this.subscriptions=[],this.userStatuses=ns}ngOnInit(){this.initializeCurrentUser()}initializeCurrentUser(){this.subscriptions.push(this.userService.getCurrentUser().pipe(de(i=>i),He(i=>(this.currentUser=i,this.getListOfContacts(i)))).subscribe({next:i=>{this.contacts.push(i)},error:i=>{console.error(i)}}))}getListOfContacts(i){return i.contacts?Xe(i.contacts).pipe(zn(r=>this.userService.getUserDetails(r)),Nt(r=>le(r))):le()}loadDiscussion(i){this.subscriptions.push(this.discussionService.getDiscussionByContact(i.id).subscribe({next:r=>{this.activeContact=i.id,this.discussionService.setCurrentDiscussion(r)},error:r=>{console.error(r)}}))}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(is),v(Bt))},t.\u0275cmp=M({type:t,selectors:[["app-contacts"]],decls:12,vars:2,consts:[[1,"content"],[1,"header"],[1,"title"],["severity","success",3,"value"],[1,"search-bar"],["iconPosition","left"],["styleClass","pi pi-search"],["type","text","pInputText","","placeholder","Search in my contacts"],[1,"empty-contacts"],[1,"contacts-panel"],[1,"contacts"],[4,"ngFor","ngForOf"],[1,"contact",3,"click","ngClass"],[1,"contact-profile",3,"src","alt"],[1,"contact-info"],[1,"data"],[1,"name"],[1,"status",3,"ngClass"],[1,"status"],[1,"last-message"]],template:function(r,s){r&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),V(4,"Messages "),b(5,"p-badge",3),g()()(),m(6,"div",4)(7,"p-iconField",5),b(8,"p-inputIcon",6)(9,"input",7),g()(),F(10,Tz,3,0,"div",8)(11,xz,3,1),g()),r&2&&(h(5),u("value",12),h(5),Lr(10,s.contacts.length==0?10:11))},dependencies:[_e,yt,_D,Lh,Bh,dn,ua],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;position:relative;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px;gap:16px;width:100%;height:100px;background:#fff;box-shadow:0 1px #00000014}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:0 24px}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:24px;line-height:150%;color:#000}.search-bar[_ngcontent-%COMP%]{width:100%;padding:12px 24px}.search-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#f3f3f3;width:100%}.contacts-panel[_ngcontent-%COMP%]{width:100%}.contacts[_ngcontent-%COMP%]{height:100vh;margin-top:1rem}.empty-contacts[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:100%;color:var(--text-secondary);font-size:1.5rem;font-weight:600;margin:auto}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:16px;box-shadow:0 1px #00000014;padding:10px}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]:hover{background-color:#f3f3f3;cursor:pointer;border-radius:4px}.contacts[_ngcontent-%COMP%] .contact.active[_ngcontent-%COMP%]{background-color:#f3f3f3}.contact-profile[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%}.contact-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0;gap:8px;height:69px;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#000}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:14px;line-height:150%;padding:10px;color:#000;opacity:.5}.contact-info[_ngcontent-%COMP%] .last-message[_ngcontent-%COMP%]{width:229px;height:18px;font-family:Inter;font-style:normal;font-weight:600;font-size:12px;line-height:150%;color:#00000080}"]});let n=t;return n})();var Az=["fileUploader"],Mz=()=>({width:"20rem",height:"20rem",borderRadius:"50%",alignSelf:"center"});function Oz(n,t){if(n&1){let e=U();m(0,"span",15),k("click",function(){E(e);let r=p();return D(r.editProfile())}),V(1," Edit"),g()}}function Pz(n,t){if(n&1){let e=U();m(0,"span",16),k("click",function(){E(e);let r=p();return D(r.cancelProfileEdit())}),V(1," Cancel"),g()}}function Rz(n,t){if(n&1){let e=U();m(0,"span",17),k("click",function(){E(e);let r=p();return D(r.saveProfile())}),V(1," Save"),g()}}function Lz(n,t){n&1&&b(0,"i",18)}function Bz(n,t){n&1&&b(0,"i",18)}function Vz(n,t){if(n&1){let e=U();m(0,"i",19),k("click",function(){E(e);let r=p();return D(r.editName())}),g()}}function jz(n,t){if(n&1){let e=U();m(0,"i",20),k("click",function(){E(e);let r=p();return D(r.editName())}),g()}}var i3=(()=>{let t=class t{constructor(i,r){this.userService=i,this.messageService=r,this.tempProfile="",this.editLoading=!1,this.isEditingName=!1,this.isEditingProfile=!1}ngOnInit(){this.items=[{label:"Options",items:[{label:"Refresh",icon:"pi pi-refresh"},{label:"Export",icon:"pi pi-upload"}]}],this.currentUserSubscription=this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error(i)}})}editName(){this.isEditingName?(this.editLoading=!0,vn(1e3).subscribe(()=>{this.userService.updateUserName(this.currentUser.name).subscribe({next:()=>{this.editLoading=!1,this.isEditingName=!1,this.messageService.add({severity:"success",summary:"Success",detail:"Name updated successfully"})},error:i=>{console.error(i),this.messageService.add({severity:"error",summary:"Error",detail:"Failed to update name"})}})})):this.isEditingName=!0}editProfile(){let i=this.fileUpload.nativeElement.files;if(console.log("temp",this.tempProfile),i&&i.length>0){var r=new FileReader;r.readAsDataURL(i[0]),r.onload=s=>{s.target&&(this.tempProfile=s.target.result,this.isEditingProfile=!0)}}else console.log("No file selected"),this.fileUpload.nativeElement.click()}cancelProfileEdit(){this.tempProfile="",this.isSavingProfile=!1,this.isEditingProfile=!1,this.fileUpload.nativeElement.value=""}saveProfile(){if(this.isSavingProfile=!0,!this.tempProfile){this.isSavingProfile=!1,this.messageService.add({severity:"error",summary:"Error",detail:"No profile picture selected"});return}vn(1e3).subscribe(()=>{console.log("Saving profile"),this.userService.updateUserProfilePicture(this.fileUpload.nativeElement.files[0]).subscribe({next:()=>{this.currentUser.profilePicture=this.tempProfile,this.cancelProfileEdit(),this.messageService.add({severity:"success",summary:"Success",detail:"Profile picture updated successfully"})},error:i=>{console.error(i),this.cancelProfileEdit(),this.messageService.add({severity:"error",summary:"Error",detail:"Failed to update profile picture"})}})})}ngOnDestroy(){this.currentUserSubscription.unsubscribe()}};t.\u0275fac=function(r){return new(r||t)(v(Bt),v(ln))},t.\u0275cmp=M({type:t,selectors:[["app-profile"]],viewQuery:function(r,s){if(r&1&&fe(Az,5),r&2){let o;W(o=q())&&(s.fileUpload=o.first)}},decls:26,vars:14,consts:[["fileUploader",""],[1,"content"],[1,"picture"],["alt","user profile picture",3,"imageStyle","src","preview"],[1,"editor"],["class","edit-profile",3,"click",4,"ngIf"],["class","edit-profile text-danger",3,"click",4,"ngIf"],["class","edit-profile text-success",3,"click",4,"ngIf"],["class","pi-edit pi pi-spin pi-spinner",4,"ngIf"],["type","file","name","pic","accept","image/*",2,"display","none",3,"change"],[1,"info"],[1,"editable"],["id","disabled-input","type","text","pInputText","",3,"ngModelChange","disabled","ngModel"],["class","pi-edit pi pi-pencil",3,"click",4,"ngIf"],["class","pi-edit pi pi-check",3,"click",4,"ngIf"],[1,"edit-profile",3,"click"],[1,"edit-profile","text-danger",3,"click"],[1,"edit-profile","text-success",3,"click"],[1,"pi-edit","pi","pi-spin","pi-spinner"],[1,"pi-edit","pi","pi-pencil",3,"click"],[1,"pi-edit","pi","pi-check",3,"click"]],template:function(r,s){if(r&1){let o=U();b(0,"p-toast"),m(1,"div",1)(2,"h1"),V(3,"Profile"),g(),m(4,"div",2),b(5,"p-image",3),m(6,"div",4),F(7,Oz,2,0,"span",5)(8,Pz,2,0,"span",6)(9,Rz,2,0,"span",7)(10,Lz,1,0,"i",8),m(11,"input",9,0),k("change",function(){return E(o),D(s.editProfile())}),g()()(),m(13,"div",10)(14,"span"),V(15,"Your name"),g(),m(16,"div",11)(17,"h2")(18,"input",12),Mn("ngModelChange",function(l){return E(o),Yn(s.currentUser.name,l)||(s.currentUser.name=l),D(l)}),g()(),F(19,Bz,1,0,"i",8)(20,Vz,1,0,"i",13)(21,jz,1,0,"i",14),g(),m(22,"span"),V(23,"Your email"),g(),m(24,"h2"),V(25),g()()()}r&2&&(h(5),u("imageStyle",Et(13,Mz))("src",s.tempProfile!=""?s.tempProfile:s.currentUser==null?null:s.currentUser.profilePicture)("preview",!0),h(2),u("ngIf",!s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isEditingProfile&&!s.isSavingProfile),h(),u("ngIf",s.isSavingProfile),h(8),u("disabled",!s.isEditingName),An("ngModel",s.currentUser.name),h(),u("ngIf",s.editLoading),h(),u("ngIf",!s.isEditingName),h(),u("ngIf",s.isEditingName&&!s.editLoading),h(4),Ce(s.currentUser==null?null:s.currentUser.email))},dependencies:[ye,In,kn,Vn,dn,ts,JD],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1.5rem;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}h1[_ngcontent-%COMP%]{margin:1rem 0 1.5rem}.profile[_ngcontent-%COMP%]{width:20rem;height:20rem;border-radius:50%;align-self:center}.picture[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:1rem}.picture[_ngcontent-%COMP%] .editor[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.picture[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--text-secondary);cursor:pointer}.info[_ngcontent-%COMP%]{margin-top:2rem}h2[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.5rem}span[_ngcontent-%COMP%]{display:inline-block;font-size:.8rem;color:var(--primary-color);margin-bottom:1rem}.pi-edit[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--primary-color);margin:0 0 1rem 1rem;cursor:pointer}.editable[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center}"]});let n=t;return n})();function Uz(n,t){if(n&1){let e=U();m(0,"div")(1,"div",12),k("click",function(r){let s=E(e).$implicit,o=p(2);return D(o.addNewContact(r,s))}),b(2,"img",13),m(3,"div",14)(4,"div",15)(5,"span",16),V(6),g(),m(7,"span",17),V(8),g()()()()()}if(n&2){let e=t.$implicit;h(2),u("src",e.profilePicture,Fn)("alt",e.name),h(4),Ce(e.name),h(2),Ce(e.email?e.email:e.phoneNumber)}}function Hz(n,t){if(n&1&&(m(0,"div"),F(1,Uz,9,4,"div",11),g()),n&2){let e=p();h(),u("ngForOf",e.contacts)}}function zz(n,t){n&1&&(m(0,"div",18),b(1,"i",19),g())}var r3=(()=>{let t=class t{constructor(i,r,s,o){this.userService=i,this.confirmationService=r,this.discussionService=s,this.messageService=o,this.searchQuery="",this.isSearching=!1,this.subscriptions=[],this.userService.findByName(this.searchQuery).subscribe({next:a=>{this.contacts=a,this.isSearching=!1},error:a=>{this.isSearching=!1,console.error(a)}})}ngOnInit(){this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error(i)}})}searchUsers(){if(!this.searchQuery){this.contacts=[];return}this.isSearching=!0,this.subscriptions.push(this.userService.findByName(this.searchQuery).subscribe({next:i=>{this.contacts=i,console.log(i),this.isSearching=!1},error:i=>{this.isSearching=!1,console.error(i)}}))}addNewContact(i,r){this.confirmationService.confirm({target:i.target,message:`Do you want to start a new discussion with ${r.name}?`,header:"Add new contact",icon:"pi pi-address-book",acceptIcon:"none",rejectIcon:"none",rejectButtonStyleClass:"p-button-text",accept:()=>{let s={ownerId:this.currentUser?.id,contactId:r.id};this.subscriptions.push(this.discussionService.startDiscussion(s).pipe(He(o=>this.userService.addContact(r.id).pipe(de(()=>o)))).subscribe({next:o=>{this.messageService.add({severity:"success",summary:"Success",detail:"New discussion started and contact added"}),this.discussionService.setCurrentDiscussion(o),this.updateCurrentUser()},error:o=>{o&&o.status===409?this.messageService.add({severity:"error",summary:"Error",detail:"A discussion already exists with this contact"}):this.messageService.add({severity:"error",summary:"Error",detail:"An error occurred while starting a new discussion or adding contact"}),console.error(o)}}))}})}updateCurrentUser(){this.subscriptions.push(this.userService.getCurrentUserDetails().subscribe({next:i=>{this.userService.setCurrentUser(i),console.log("New user",i)},error:i=>{console.error(i),this.messageService.add({severity:"error",summary:"Error",detail:"An error occurred while loading user details"})}}))}ngOnDestroy(){this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(Bt),v(aa),v(is),v(ln))},t.\u0275cmp=M({type:t,selectors:[["app-contacts"]],decls:14,vars:3,consts:[[1,"content"],[1,"header"],[1,"title"],[1,"search-bar"],["type","text","pInputText","","placeholder","Search contacts by name","autofocus","",3,"ngModelChange","keydown.enter","ngModel"],[1,"pi","pi-search",3,"click"],[1,"contacts-panel"],[1,"contacts"],[3,"value"],["pTemplate","list"],["class","spinner",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"contact",3,"click"],[1,"contact-profile",3,"src","alt"],[1,"contact-info"],[1,"data"],[1,"name"],[1,"email"],[1,"spinner"],[1,"pi","pi-spin","pi-spinner"]],template:function(r,s){r&1&&(m(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1"),V(4,"Find new contacts "),g()()(),m(5,"div",3)(6,"input",4),Mn("ngModelChange",function(a){return Yn(s.searchQuery,a)||(s.searchQuery=a),a}),k("keydown.enter",function(){return s.searchUsers()}),g(),m(7,"i",5),k("click",function(){return s.searchUsers()}),g(),b(8,"p-confirmDialog"),g(),m(9,"p-scrollPanel",6)(10,"div",7)(11,"p-dataView",8),F(12,Hz,2,1,"ng-template",9),g(),F(13,zz,2,0,"div",10),g()()()),r&2&&(h(6),An("ngModel",s.searchQuery),h(5),u("value",s.contacts),h(2),u("ngIf",s.isSearching))},dependencies:[yt,ye,In,kn,Vn,Ve,dn,ua,LD,t3],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;position:relative;width:500px;height:100vh;background:#fff;border:1px solid rgba(0,0,0,.08)}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:20px;gap:16px;width:100%;height:100px;background:#fff;box-shadow:0 1px #00000014}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{margin:0 24px}.content[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:24px;line-height:150%;color:#000}.search-bar[_ngcontent-%COMP%]{width:100%;padding:12px 24px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:1rem}.pi[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--primary-color);cursor:pointer}.search-bar[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{background-color:#f3f3f3;width:100%}.contacts-panel[_ngcontent-%COMP%]{width:100%}.contacts-panel[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{text-align:center}.contacts[_ngcontent-%COMP%]{height:100vh}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:16px;box-shadow:0 1px #00000014;padding:10px;align-items:center;height:80px}.contacts[_ngcontent-%COMP%] .contact[_ngcontent-%COMP%]:hover{background-color:#f3f3f3;cursor:pointer;border-radius:2px}.contact-profile[_ngcontent-%COMP%]{width:auto;height:100%;border-radius:12px}.contact-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:16px;line-height:150%;color:#000}.contact-info[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{height:21px;font-family:Inter;font-style:normal;font-weight:600;font-size:14px;line-height:150%;padding:10px;color:#000;opacity:.5}.contact-info[_ngcontent-%COMP%] .last-message[_ngcontent-%COMP%]{width:229px;height:18px;font-family:Inter;font-style:normal;font-weight:600;font-size:12px;line-height:150%;color:#00000080}"]});let n=t;return n})();function s3(n,t,e){let i=n?t.url:e;t.navigateByUrl("/",{skipLocationChange:!0}).then(()=>{t.navigate([i])})}var Ys={LF:` `,NULL:"\0"};var Pl=class n{constructor(t){let{command:e,headers:i,body:r,binaryBody:s,escapeHeaderValues:o,skipContentLengthHeader:a}=t;this.command=e,this.headers=Object.assign({},i||{}),s?(this._binaryBody=s,this.isBinaryBody=!0):(this._body=r||"",this.isBinaryBody=!1),this.escapeHeaderValues=o||!1,this.skipContentLengthHeader=a||!1}get body(){return!this._body&&this.isBinaryBody&&(this._body=new TextDecoder().decode(this._binaryBody)),this._body}get binaryBody(){return!this._binaryBody&&!this.isBinaryBody&&(this._binaryBody=new TextEncoder().encode(this._body)),this._binaryBody}static fromRawFrame(t,e){let i={},r=s=>s.replace(/^\s+|\s+$/g,"");for(let s of t.headers.reverse()){let o=s.indexOf(":"),a=r(s[0]),l=r(s[1]);e&&t.command!=="CONNECT"&&t.command!=="CONNECTED"&&(l=n.hdrValueUnEscape(l)),i[a]=l}return new n({command:t.command,headers:i,binaryBody:t.binaryBody,escapeHeaderValues:e})}toString(){return this.serializeCmdAndHeaders()}serialize(){let t=this.serializeCmdAndHeaders();return this.isBinaryBody?n.toUnit8Array(t,this._binaryBody).buffer:t+this._body+Ys.NULL}serializeCmdAndHeaders(){let t=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(let e of Object.keys(this.headers||{})){let i=this.headers[e];this.escapeHeaderValues&&this.command!=="CONNECT"&&this.command!=="CONNECTED"?t.push(`${e}:${n.hdrValueEscape(`${i}`)}`):t.push(`${e}:${i}`)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&t.push(`content-length:${this.bodyLength()}`),t.join(Ys.LF)+Ys.LF+Ys.LF}isBodyEmpty(){return this.bodyLength()===0}bodyLength(){let t=this.binaryBody;return t?t.length:0}static sizeOfUTF8(t){return t?new TextEncoder().encode(t).length:0}static toUnit8Array(t,e){let i=new TextEncoder().encode(t),r=new Uint8Array([0]),s=new Uint8Array(i.length+e.length+r.length);return s.set(i),s.set(e,i.length),s.set(r,i.length+e.length),s}static marshall(t){return new n(t).serialize()}static hdrValueEscape(t){return t.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}static hdrValueUnEscape(t){return t.replace(/\\r/g,"\r").replace(/\\n/g,` `).replace(/\\c/g,":").replace(/\\\\/g,"\\")}};var zh=class{constructor(t,e){this.onFrame=t,this.onIncomingPing=e,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(t,e=!1){let i;if(t instanceof ArrayBuffer?i=new Uint8Array(t):i=this._encoder.encode(t),e&&i[i.length-1]!==0){let r=new Uint8Array(i.length+1);r.set(i,0),r[i.length]=0,i=r}for(let r=0;re[0]==="content-length")[0];t?(this._bodyBytesRemaining=parseInt(t[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(t){if(t===0){this._retrievedBody();return}this._consumeByte(t)}_collectBodyFixedSize(t){if(this._bodyBytesRemaining--===0){this._retrievedBody();return}this._consumeByte(t)}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw(),this.onFrame(this._results),this._initState()}_consumeByte(t){this._token.push(t)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){let t=new Uint8Array(this._token);return this._token=[],t}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}};var _r=function(n){return n[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSING=2]="CLOSING",n[n.CLOSED=3]="CLOSED",n}(_r||{}),si=function(n){return n[n.ACTIVE=0]="ACTIVE",n[n.DEACTIVATING=1]="DEACTIVATING",n[n.INACTIVE=2]="INACTIVE",n}(si||{});var zt=class{constructor(t){this.versions=t}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map(t=>`v${t.replace(".","")}.stomp`)}};zt.V1_0="1.0";zt.V1_1="1.1";zt.V1_2="1.2";zt.default=new zt([zt.V1_0,zt.V1_1,zt.V1_2]);function o3(n,t){n.terminate=function(){let e=()=>{};this.onerror=e,this.onmessage=e,this.onopen=e;let i=new Date,r=this.onclose;this.onclose=s=>{let o=new Date().getTime()-i.getTime();t(`Discarded socket closed after ${o}ms, with code/reason: ${s.code}/${s.reason}`)},this.close(),r.call(this,{code:4001,reason:"Heartbeat failure, discarding the socket",wasClean:!1})}}var $h=class{constructor(t,e,i={}){this._client=t,this._webSocket=e,this._serverFrameHandlers={CONNECTED:r=>{this.debug(`connected to server ${r.headers.server}`),this._connected=!0,this._connectedVersion=r.headers.version,this._connectedVersion===zt.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(r.headers),this.onConnect(r)},MESSAGE:r=>{let s=r.headers.subscription,o=this._subscriptions[s]||this.onUnhandledMessage,a=r,l=this,c=this._connectedVersion===zt.V1_2?a.headers.ack:a.headers["message-id"];a.ack=(d={})=>l.ack(c,s,d),a.nack=(d={})=>l.nack(c,s,d),o(a)},RECEIPT:r=>{let s=this._receiptWatchers[r.headers["receipt-id"]];s?(s(r),delete this._receiptWatchers[r.headers["receipt-id"]]):this.onUnhandledReceipt(r)},ERROR:r=>{this.onStompError(r)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.configure(i)}get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}configure(t){Object.assign(this,t)}start(){let t=new zh(e=>{let i=Pl.fromRawFrame(e,this._escapeHeaderValues);this.logRawCommunication||this.debug(`<<< ${i}`),(this._serverFrameHandlers[i.command]||this.onUnhandledFrame)(i)},()=>{this.debug("<<< PONG")});this._webSocket.onmessage=e=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){let i=e.data instanceof ArrayBuffer?new TextDecoder().decode(e.data):e.data;this.debug(`<<< ${i}`)}t.parseChunk(e.data,this.appendMissingNULLonIncoming)},this._onclose=e=>{this.debug(`Connection closed to ${this._client.brokerURL}`),this._cleanUp(),this.onWebSocketClose(e)},this._webSocket.onclose=this._onclose,this._webSocket.onerror=e=>{this.onWebSocketError(e)},this._webSocket.onopen=()=>{let e=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),e["accept-version"]=this.stompVersions.supportedVersions(),e["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:e})}}_setupHeartbeat(t){if(t.version!==zt.V1_1&&t.version!==zt.V1_2||!t["heart-beat"])return;let[e,i]=t["heart-beat"].split(",").map(r=>parseInt(r,10));if(this.heartbeatOutgoing!==0&&i!==0){let r=Math.max(this.heartbeatOutgoing,i);this.debug(`send PING every ${r}ms`),this._pinger=setInterval(()=>{this._webSocket.readyState===_r.OPEN&&(this._webSocket.send(Ys.LF),this.debug(">>> PING"))},r)}if(this.heartbeatIncoming!==0&&e!==0){let r=Math.max(this.heartbeatIncoming,e);this.debug(`check PONG every ${r}ms`),this._ponger=setInterval(()=>{let s=Date.now()-this._lastServerActivityTS;s>r*2&&(this.debug(`did not receive server activity for the last ${s}ms`),this._closeOrDiscardWebsocket())},r)}}_closeOrDiscardWebsocket(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this._discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState===_r.CONNECTING||this._webSocket.readyState===_r.OPEN)&&this._closeOrDiscardWebsocket()}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}_discardWebsocket(){this._webSocket.terminate||o3(this._webSocket,t=>this.debug(t)),this._webSocket.terminate()}_transmit(t){let{command:e,headers:i,body:r,binaryBody:s,skipContentLengthHeader:o}=t,a=new Pl({command:e,headers:i,body:r,binaryBody:s,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:o}),l=a.serialize();if(this.logRawCommunication?this.debug(`>>> ${l}`):this.debug(`>>> ${a}`),this.forceBinaryWSFrames&&typeof l=="string"&&(l=new TextEncoder().encode(l)),typeof l!="string"||!this.splitLargeFrames)this._webSocket.send(l);else{let c=l;for(;c.length>0;){let d=c.substring(0,this.maxWebSocketChunkSize);c=c.substring(this.maxWebSocketChunkSize),this._webSocket.send(d),this.debug(`chunk sent = ${d.length}, remaining = ${c.length}`)}}}dispose(){if(this.connected)try{let t=Object.assign({},this.disconnectHeaders);t.receipt||(t.receipt=`close-${this._counter++}`),this.watchForReceipt(t.receipt,e=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(e)}),this._transmit({command:"DISCONNECT",headers:t})}catch(t){this.debug(`Ignoring error during disconnect ${t}`)}else(this._webSocket.readyState===_r.CONNECTING||this._webSocket.readyState===_r.OPEN)&&this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&clearInterval(this._pinger),this._ponger&&clearInterval(this._ponger)}publish(t){let{destination:e,headers:i,body:r,binaryBody:s,skipContentLengthHeader:o}=t,a=Object.assign({destination:e},i);this._transmit({command:"SEND",headers:a,body:r,binaryBody:s,skipContentLengthHeader:o})}watchForReceipt(t,e){this._receiptWatchers[t]=e}subscribe(t,e,i={}){i=Object.assign({},i),i.id||(i.id=`sub-${this._counter++}`),i.destination=t,this._subscriptions[i.id]=e,this._transmit({command:"SUBSCRIBE",headers:i});let r=this;return{id:i.id,unsubscribe(s){return r.unsubscribe(i.id,s)}}}unsubscribe(t,e={}){e=Object.assign({},e),delete this._subscriptions[t],e.id=t,this._transmit({command:"UNSUBSCRIBE",headers:e})}begin(t){let e=t||`tx-${this._counter++}`;this._transmit({command:"BEGIN",headers:{transaction:e}});let i=this;return{id:e,commit(){i.commit(e)},abort(){i.abort(e)}}}commit(t){this._transmit({command:"COMMIT",headers:{transaction:t}})}abort(t){this._transmit({command:"ABORT",headers:{transaction:t}})}ack(t,e,i={}){i=Object.assign({},i),this._connectedVersion===zt.V1_2?i.id=t:i["message-id"]=t,i.subscription=e,this._transmit({command:"ACK",headers:i})}nack(t,e,i={}){return i=Object.assign({},i),this._connectedVersion===zt.V1_2?i.id=t:i["message-id"]=t,i.subscription=e,this._transmit({command:"NACK",headers:i})}};var a3=function(n,t,e,i){function r(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(f){o(f)}}function l(d){try{c(i.throw(d))}catch(f){o(f)}}function c(d){d.done?s(d.value):r(d.value).then(a,l)}c((i=i.apply(n,t||[])).next())})},Wh=class{constructor(t={}){this.stompVersions=zt.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8*1024,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.state=si.INACTIVE;let e=()=>{};this.debug=e,this.beforeConnect=e,this.onConnect=e,this.onDisconnect=e,this.onUnhandledMessage=e,this.onUnhandledReceipt=e,this.onUnhandledFrame=e,this.onStompError=e,this.onWebSocketClose=e,this.onWebSocketError=e,this.logRawCommunication=!1,this.onChangeState=e,this.connectHeaders={},this._disconnectHeaders={},this.configure(t)}get webSocket(){return this._stompHandler?this._stompHandler._webSocket:void 0}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(t){this._disconnectHeaders=t,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===si.ACTIVE}_changeState(t){this.state=t,this.onChangeState(t)}configure(t){Object.assign(this,t)}activate(){if(this.state===si.DEACTIVATING)throw this.debug("Still DEACTIVATING, please await call to deactivate before trying to re-activate"),new Error("Still DEACTIVATING, can not activate now");if(this.active){this.debug("Already ACTIVE, ignoring request to activate");return}this._changeState(si.ACTIVE),this._connect()}_connect(){return a3(this,void 0,void 0,function*(){if(this.connected){this.debug("STOMP: already connected, nothing to do");return}if(yield this.beforeConnect(),!this.active){this.debug("Client has been marked inactive, will not attempt to connect");return}this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket...");let t=this._createWebSocket();this._stompHandler=new $h(this,t,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:e=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),!this.active){this.debug("STOMP got connected while deactivate was issued, will disconnect now"),this._disposeStompHandler();return}this.onConnect(e)},onDisconnect:e=>{this.onDisconnect(e)},onStompError:e=>{this.onStompError(e)},onWebSocketClose:e=>{this._stompHandler=void 0,this.state===si.DEACTIVATING&&(this._resolveSocketClose(),this._resolveSocketClose=void 0,this._changeState(si.INACTIVE)),this.onWebSocketClose(e),this.active&&this._schedule_reconnect()},onWebSocketError:e=>{this.onWebSocketError(e)},onUnhandledMessage:e=>{this.onUnhandledMessage(e)},onUnhandledReceipt:e=>{this.onUnhandledReceipt(e)},onUnhandledFrame:e=>{this.onUnhandledFrame(e)}}),this._stompHandler.start()})}_createWebSocket(){let t;return this.webSocketFactory?t=this.webSocketFactory():t=new WebSocket(this.brokerURL,this.stompVersions.protocolVersions()),t.binaryType="arraybuffer",t}_schedule_reconnect(){this.reconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this.reconnectDelay}ms`),this._reconnector=setTimeout(()=>{this._connect()},this.reconnectDelay))}deactivate(){return a3(this,void 0,void 0,function*(){let t;if(this.state!==si.ACTIVE)return this.debug(`Already ${si[this.state]}, ignoring call to deactivate`),Promise.resolve();if(this._changeState(si.DEACTIVATING),this._reconnector&&clearTimeout(this._reconnector),this._stompHandler&&this.webSocket.readyState!==_r.CLOSED)t=new Promise((e,i)=>{this._resolveSocketClose=e});else return this._changeState(si.INACTIVE),Promise.resolve();return this._disposeStompHandler(),t})}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&(this._stompHandler.dispose(),this._stompHandler=null)}publish(t){this._stompHandler.publish(t)}watchForReceipt(t,e){this._stompHandler.watchForReceipt(t,e)}subscribe(t,e,i={}){return this._stompHandler.subscribe(t,e,i)}unsubscribe(t,e={}){this._stompHandler.unsubscribe(t,e)}begin(t){return this._stompHandler.begin(t)}commit(t){this._stompHandler.commit(t)}abort(t){this._stompHandler.abort(t)}ack(t,e,i={}){this._stompHandler.ack(t,e,i)}nack(t,e,i={}){this._stompHandler.nack(t,e,i)}};var hn=function(n){return n[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSING=2]="CLOSING",n[n.CLOSED=3]="CLOSED",n}(hn||{});var l3=function(n,t,e,i){function r(s){return s instanceof e?s:new e(function(o){o(s)})}return new(e||(e=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(f){o(f)}}function l(d){try{c(i.throw(d))}catch(f){o(f)}}function c(d){d.done?s(d.value):r(d.value).then(a,l)}c((i=i.apply(n,t||[])).next())})},qh=class{constructor(t){this._queuedMessages=[];let e=t||new Wh;this._stompClient=e;let i=()=>{};this._beforeConnect=i,this._correlateErrors=()=>{},this._debug=i,this._connectionStatePre$=new dt(hn.CLOSED),this._connectedPre$=this._connectionStatePre$.pipe(qt(r=>r===hn.OPEN)),this.connectionState$=new dt(hn.CLOSED),this.connected$=this.connectionState$.pipe(qt(r=>r===hn.OPEN)),this.connected$.subscribe(()=>{this._sendQueuedMessages()}),this._serverHeadersBehaviourSubject$=new dt(null),this.serverHeaders$=this._serverHeadersBehaviourSubject$.pipe(qt(r=>r!==null)),this.stompErrors$=new Be,this.unhandledMessage$=new Be,this.unhandledReceipts$=new Be,this.unhandledFrame$=new Be,this.webSocketErrors$=new Be}get stompClient(){return this._stompClient}configure(t){let e=Object.assign({},t);e.beforeConnect&&(this._beforeConnect=e.beforeConnect,delete e.beforeConnect),e.correlateErrors&&(this._correlateErrors=e.correlateErrors,delete e.correlateErrors),this._stompClient.configure(e),e.debug&&(this._debug=e.debug)}activate(){this._stompClient.configure({beforeConnect:()=>l3(this,void 0,void 0,function*(){this._changeState(hn.CONNECTING),yield this._beforeConnect(this)}),onConnect:t=>{this._serverHeadersBehaviourSubject$.next(t.headers),this._changeState(hn.OPEN)},onStompError:t=>{this.stompErrors$.next(t)},onWebSocketClose:()=>{this._changeState(hn.CLOSED)},onUnhandledMessage:t=>{this.unhandledMessage$.next(t)},onUnhandledReceipt:t=>{this.unhandledReceipts$.next(t)},onUnhandledFrame:t=>{this.unhandledFrame$.next(t)},onWebSocketError:t=>{this.webSocketErrors$.next(t)}}),this._stompClient.activate()}deactivate(){return l3(this,void 0,void 0,function*(){this._changeState(hn.CLOSING),yield this._stompClient.deactivate(),this._changeState(hn.CLOSED)})}connected(){return this.connectionState$.getValue()===hn.OPEN}get active(){return this.stompClient.active}publish(t){let e=t.retryIfDisconnected==null?!0:t.retryIfDisconnected;if(this.connected())this._stompClient.publish(t);else if(e)this._debug("Not connected, queueing"),this._queuedMessages.push(t);else throw new Error("Cannot publish while broker is not connected")}_sendQueuedMessages(){let t=this._queuedMessages;if(this._queuedMessages=[],t.length!==0){this._debug(`Will try sending ${t.length} queued message(s)`);for(let e of t)this._debug(`Attempting to send ${e}`),this.publish(e)}}watch(t,e={}){let i={subHeaders:{},unsubHeaders:{},subscribeOnlyOnce:!1},r;return typeof t=="string"?r=Object.assign({},i,{destination:t,subHeaders:e}):r=Object.assign({},i,t),this._debug(`Request to subscribe ${r.destination}`),xe.create(o=>{let a,l,c=this._connectedPre$;r.subscribeOnlyOnce&&(c=c.pipe(ui(1)));let d=this.stompErrors$.subscribe(f=>{this._correlateErrors(f)===r.destination&&o.error(f)});return l=c.subscribe(()=>{this._debug(`Will subscribe to ${r.destination}`);let f=r.subHeaders;typeof f=="function"&&(f=f()),a=this._stompClient.subscribe(r.destination,_=>{o.next(_)},f)}),()=>{if(this._debug(`Stop watching connection state (for ${r.destination})`),l.unsubscribe(),d.unsubscribe(),this.connected()){this._debug(`Will unsubscribe from ${r.destination} at Stomp`);let f=r.unsubHeaders;typeof f=="function"&&(f=f()),a.unsubscribe(f)}else this._debug(`Stomp not connected, no need to unsubscribe from ${r.destination} at Stomp`)}}).pipe(Wf())}watchForReceipt(t,e){this._stompClient.watchForReceipt(t,e)}_changeState(t){this._connectionStatePre$.next(t),this.connectionState$.next(t)}};var Gh=(()=>{let t=class t{constructor(){this.client=new qh,this.isConnected$=new dt(!1),this.webSocketUrl=Ei.apiUrl+Ei.chatWebsocketEndpoint}initializeConnectionStateMonitoring(){this.isConnected$=new dt(!1),this.client.connectionState$.subscribe(i=>{let r=i===hn.OPEN;this.isConnected$.next(r),r&&console.log("Connected to WebSocket")})}connect(i){let r=this.getStompConfig(i);this.client.configure(r),this.client.connectionState$.getValue()!==hn.CLOSING&&this.client.connectionState$.getValue()!==hn.OPEN&&this.client.activate()}getStompConfig(i){return{brokerURL:this.webSocketUrl,connectHeaders:{Authorization:`Bearer ${i}`},heartbeatIncoming:0,heartbeatOutgoing:2e4,reconnectDelay:5e3}}sendMessage(i,r){this.client.active?this.client.publish({destination:i,body:JSON.stringify(r)}):console.error("Cannot send message, WebSocket is not connected.")}sendNewMessage(i){this.sendMessage("/app/send",i)}sendUpdatedMessage(i){this.sendMessage("/app/update",i)}sendUpdateMessages(i){this.sendMessage("/app/update-messages",i)}listenForNewMessage(){return this.client.watch("/topic/message").pipe(de(i=>JSON.parse(i.body)),Nt(i=>(console.error("Error receiving message",i),ci(()=>i))))}listenForListOfMessages(){return this.client.watch("/topic/messages").pipe(de(i=>JSON.parse(i.body)),Nt(i=>(console.error("Error receiving message",i),ci(()=>i))))}disconnect(){this.isConnected$.getValue()&&(console.log("Disconnecting WebSocket"),this.client.deactivate(),this.isConnected$.complete())}getIsConnectionOpened(){return this.isConnected$.asObservable()}ngOnDestroy(){this.disconnect()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var oi=(()=>{let t=class t{constructor(i,r,s){this.auth=i,this.userService=r,this.websocketService=s,this.tokenKey="api.token",this.refreshToken$=this.refreshToken(),this.idToken=this.getToken()}get isLoggedIn(){return this.getToken()!==null}getToken(){return this.idToken=localStorage.getItem(this.tokenKey)||sessionStorage.getItem(this.tokenKey),!this.idToken||$z(this.idToken)?(this.handleExpiredToken(),null):this.idToken}set rememberMe(i){localStorage.setItem("rememberMe",i?"true":"false")}get rememberMe(){return localStorage.getItem("rememberMe")==="true"}setToken(i){this.rememberMe?localStorage.setItem(this.tokenKey,i):sessionStorage.setItem(this.tokenKey,i)}signInWithProvider(i){return this.firebaseAuthProvider=this.getAuthProvider(i),Xe(nE(this.auth,this.firebaseAuthProvider)).pipe(He(r=>this.handleSignInResult(r)),Nt(r=>this.handleError("Error signing in with provider",r)))}signInWithEmail(i,r){return Xe(tE(this.auth,i,r)).pipe(He(s=>this.handleSignInResult(s)),Nt(s=>this.handleError("Error signing in with email",s)))}refreshToken(){return new xe(i=>{this.auth.onAuthStateChanged(r=>T(this,null,function*(){if(r)try{let s=yield r.getIdToken(!1);this.setToken(s),i.next(s),i.complete()}catch(s){console.error("Error getting token",s),i.error(s)}else i.complete()}))})}signOut(i=!1){return this.idToken?i?(this.performSignOut(),null):this.userService.updateUserStatus(ns.offline).pipe(Hf(2),de(()=>{this.performSignOut()}),Nt(()=>(this.signOut(!0),le(null)))):null}performSignOut(){this.clearTokens(),this.websocketService.disconnect(),this.auth.signOut()}clearTokens(){this.idToken=null,localStorage.clear(),sessionStorage.clear()}handleSignInResult(i,r=!1){return r&&!nh.credentialFromResult(i)?(console.error("Credential is null"),le()):this.refreshToken$?.pipe(de(s=>this.setToken(s)),Nt(s=>this.handleError("Error refreshing token",s)))||le()}handleError(i,r){throw console.error(i,r),this.signOut(!0)?.subscribe(),r}handleExpiredToken(){this.rememberMe?this.refreshToken$?.subscribe({next:i=>this.setToken(i),error:i=>this.handleError("Error refreshing token",i)}):this.signOut()?.subscribe()}getAuthProvider(i){switch(i){case Js.Google:return new nh;case Js.Microsoft:default:throw new Error("Unsupported provider")}}};t.\u0275fac=function(r){return new(r||t)(z(js),z(Bt),z(Gh))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function $z(n){let t=JSON.parse(atob(n.split(".")[1])).exp;return Math.floor(new Date().getTime()/1e3)>=t}var Js=function(n){return n.Google="google",n.Microsoft="microsoft",n}(Js||{});var Re="primary",Yl=Symbol("RouteTitle"),SF=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function ya(n){return new SF(n)}function Wz(n,t,e){let i=e.path.split("/");if(i.length>n.length||e.pathMatch==="full"&&(t.hasChildren()||i.lengthi[s]===r)}else return n===t}function y3(n){return n.length>0?n[n.length-1]:null}function as(n){return Bf(n)?n:Vr(n)?Xe(Promise.resolve(n)):le(n)}var Gz={exact:v3,subset:b3},w3={exact:Kz,subset:Qz,ignored:()=>!0};function u3(n,t,e){return Gz[e.paths](n.root,t.root,e.matrixParams)&&w3[e.queryParams](n.queryParams,t.queryParams)&&!(e.fragment==="exact"&&n.fragment!==t.fragment)}function Kz(n,t){return Gi(n,t)}function v3(n,t,e){if(!eo(n.segments,t.segments)||!Zh(n.segments,t.segments,e)||n.numberOfChildren!==t.numberOfChildren)return!1;for(let i in t.children)if(!n.children[i]||!v3(n.children[i],t.children[i],e))return!1;return!0}function Qz(n,t){return Object.keys(t).length<=Object.keys(n).length&&Object.keys(t).every(e=>_3(n[e],t[e]))}function b3(n,t,e){return C3(n,t,t.segments,e)}function C3(n,t,e,i){if(n.segments.length>e.length){let r=n.segments.slice(0,e.length);return!(!eo(r,e)||t.hasChildren()||!Zh(r,e,i))}else if(n.segments.length===e.length){if(!eo(n.segments,e)||!Zh(n.segments,e,i))return!1;for(let r in t.children)if(!n.children[r]||!b3(n.children[r],t.children[r],i))return!1;return!0}else{let r=e.slice(0,n.segments.length),s=e.slice(n.segments.length);return!eo(n.segments,r)||!Zh(n.segments,r,i)||!n.children[Re]?!1:C3(n.children[Re],t,s,i)}}function Zh(n,t,e){return t.every((i,r)=>w3[e](n[r].parameters,i.parameters))}var rs=class{constructor(t=new ot([],{}),e={},i=null){this.root=t,this.queryParams=e,this.fragment=i}get queryParamMap(){return this._queryParamMap??=ya(this.queryParams),this._queryParamMap}toString(){return Jz.serialize(this)}},ot=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(i=>i.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Yh(this)}},Xs=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=ya(this.parameters),this._parameterMap}toString(){return D3(this)}};function Zz(n,t){return eo(n,t)&&n.every((e,i)=>Gi(e.parameters,t[i].parameters))}function eo(n,t){return n.length!==t.length?!1:n.every((e,i)=>e.path===t[i].path)}function Yz(n,t){let e=[];return Object.entries(n.children).forEach(([i,r])=>{i===Re&&(e=e.concat(t(r,i)))}),Object.entries(n.children).forEach(([i,r])=>{i!==Re&&(e=e.concat(t(r,i)))}),e}var Jl=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:()=>new zl,providedIn:"root"});let n=t;return n})(),zl=class{parse(t){let e=new xF(t);return new rs(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${Ll(t.root,!0)}`,i=t$(t.queryParams),r=typeof t.fragment=="string"?`#${Xz(t.fragment)}`:"";return`${e}${i}${r}`}},Jz=new zl;function Yh(n){return n.segments.map(t=>D3(t)).join("/")}function Ll(n,t){if(!n.hasChildren())return Yh(n);if(t){let e=n.children[Re]?Ll(n.children[Re],!1):"",i=[];return Object.entries(n.children).forEach(([r,s])=>{r!==Re&&i.push(`${r}:${Ll(s,!1)}`)}),i.length>0?`${e}(${i.join("//")})`:e}else{let e=Yz(n,(i,r)=>r===Re?[Ll(n.children[Re],!1)]:[`${r}:${Ll(i,!1)}`]);return Object.keys(n.children).length===1&&n.children[Re]!=null?`${Yh(n)}/${e[0]}`:`${Yh(n)}/(${e.join("//")})`}}function E3(n){return encodeURIComponent(n).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Kh(n){return E3(n).replace(/%3B/gi,";")}function Xz(n){return encodeURI(n)}function NF(n){return E3(n).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Jh(n){return decodeURIComponent(n)}function d3(n){return Jh(n.replace(/\+/g,"%20"))}function D3(n){return`${NF(n.path)}${e$(n.parameters)}`}function e$(n){return Object.entries(n).map(([t,e])=>`;${NF(t)}=${NF(e)}`).join("")}function t$(n){let t=Object.entries(n).map(([e,i])=>Array.isArray(i)?i.map(r=>`${Kh(e)}=${Kh(r)}`).join("&"):`${Kh(e)}=${Kh(i)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var n$=/^[^\/()?;#]+/;function EF(n){let t=n.match(n$);return t?t[0]:""}var i$=/^[^\/()?;=#]+/;function r$(n){let t=n.match(i$);return t?t[0]:""}var s$=/^[^=?&#]+/;function o$(n){let t=n.match(s$);return t?t[0]:""}var a$=/^[^&#]+/;function l$(n){let t=n.match(a$);return t?t[0]:""}var xF=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new ot([],{}):new ot([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let i={};return this.peekStartsWith("(")&&(i=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(i[Re]=new ot(t,e)),i}parseSegment(){let t=EF(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new j(4009,!1);return this.capture(t),new Xs(Jh(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=r$(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let r=EF(this.remaining);r&&(i=r,this.capture(i))}t[Jh(e)]=Jh(i)}parseQueryParam(t){let e=o$(this.remaining);if(!e)return;this.capture(e);let i="";if(this.consumeOptional("=")){let o=l$(this.remaining);o&&(i=o,this.capture(i))}let r=d3(e),s=d3(i);if(t.hasOwnProperty(r)){let o=t[r];Array.isArray(o)||(o=[o],t[r]=o),o.push(s)}else t[r]=s}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let i=EF(this.remaining),r=this.remaining[i.length];if(r!=="/"&&r!==")"&&r!==";")throw new j(4010,!1);let s;i.indexOf(":")>-1?(s=i.slice(0,i.indexOf(":")),this.capture(s),this.capture(":")):t&&(s=Re);let o=this.parseChildren();e[s]=Object.keys(o).length===1?o[Re]:new ot([],o),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new j(4011,!1)}};function I3(n){return n.segments.length>0?new ot([],{[Re]:n}):n}function k3(n){let t={};for(let[i,r]of Object.entries(n.children)){let s=k3(r);if(i===Re&&s.segments.length===0&&s.hasChildren())for(let[o,a]of Object.entries(s.children))t[o]=a;else(s.segments.length>0||s.hasChildren())&&(t[i]=s)}let e=new ot(n.segments,t);return c$(e)}function c$(n){if(n.numberOfChildren===1&&n.children[Re]){let t=n.children[Re];return new ot(n.segments.concat(t.segments),t.children)}return n}function wa(n){return n instanceof rs}function u$(n,t,e=null,i=null){let r=S3(n);return T3(r,t,e,i)}function S3(n){let t;function e(s){let o={};for(let l of s.children){let c=e(l);o[l.outlet]=c}let a=new ot(s.url,o);return s===n&&(t=a),a}let i=e(n.root),r=I3(i);return t??r}function T3(n,t,e,i){let r=n;for(;r.parent;)r=r.parent;if(t.length===0)return DF(r,r,r,e,i);let s=d$(t);if(s.toRoot())return DF(r,r,new ot([],{}),e,i);let o=h$(s,r,n),a=o.processChildren?jl(o.segmentGroup,o.index,s.commands):x3(o.segmentGroup,o.index,s.commands);return DF(r,o.segmentGroup,a,e,i)}function Xh(n){return typeof n=="object"&&n!=null&&!n.outlets&&!n.segmentPath}function $l(n){return typeof n=="object"&&n!=null&&n.outlets}function DF(n,t,e,i,r){let s={};i&&Object.entries(i).forEach(([l,c])=>{s[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let o;n===t?o=e:o=N3(n,t,e);let a=I3(k3(o));return new rs(a,s,r)}function N3(n,t,e){let i={};return Object.entries(n.children).forEach(([r,s])=>{s===t?i[r]=e:i[r]=N3(s,t,e)}),new ot(n.segments,i)}var ef=class{constructor(t,e,i){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=i,t&&i.length>0&&Xh(i[0]))throw new j(4003,!1);let r=i.find($l);if(r&&r!==y3(i))throw new j(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function d$(n){if(typeof n[0]=="string"&&n.length===1&&n[0]==="/")return new ef(!0,0,n);let t=0,e=!1,i=n.reduce((r,s,o)=>{if(typeof s=="object"&&s!=null){if(s.outlets){let a={};return Object.entries(s.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(s.segmentPath)return[...r,s.segmentPath]}return typeof s!="string"?[...r,s]:o===0?(s.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,s]},[]);return new ef(e,t,i)}var Fa=class{constructor(t,e,i){this.segmentGroup=t,this.processChildren=e,this.index=i}};function h$(n,t,e){if(n.isAbsolute)return new Fa(t,!0,0);if(!e)return new Fa(t,!1,NaN);if(e.parent===null)return new Fa(e,!0,0);let i=Xh(n.commands[0])?0:1,r=e.segments.length-1+i;return f$(e,r,n.numberOfDoubleDots)}function f$(n,t,e){let i=n,r=t,s=e;for(;s>r;){if(s-=r,i=i.parent,!i)throw new j(4005,!1);r=i.segments.length}return new Fa(i,!1,r-s)}function p$(n){return $l(n[0])?n[0].outlets:{[Re]:n}}function x3(n,t,e){if(n??=new ot([],{}),n.segments.length===0&&n.hasChildren())return jl(n,t,e);let i=m$(n,t,e),r=e.slice(i.commandIndex);if(i.match&&i.pathIndexs!==Re)&&n.children[Re]&&n.numberOfChildren===1&&n.children[Re].segments.length===0){let s=jl(n.children[Re],t,e);return new ot(n.segments,s.children)}return Object.entries(i).forEach(([s,o])=>{typeof o=="string"&&(o=[o]),o!==null&&(r[s]=x3(n.children[s],t,o))}),Object.entries(n.children).forEach(([s,o])=>{i[s]===void 0&&(r[s]=o)}),new ot(n.segments,r)}}function m$(n,t,e){let i=0,r=t,s={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return s;let o=n.segments[r],a=e[i];if($l(a))break;let l=`${a}`,c=i0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!f3(l,c,o))return s;i+=2}else{if(!f3(l,{},o))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}function AF(n,t,e){let i=n.segments.slice(0,t),r=0;for(;r{typeof i=="string"&&(i=[i]),i!==null&&(t[e]=AF(new ot([],{}),0,i))}),t}function h3(n){let t={};return Object.entries(n).forEach(([e,i])=>t[e]=`${i}`),t}function f3(n,t,e){return n==e.path&&Gi(t,e.parameters)}var Ul="imperative",Yt=function(n){return n[n.NavigationStart=0]="NavigationStart",n[n.NavigationEnd=1]="NavigationEnd",n[n.NavigationCancel=2]="NavigationCancel",n[n.NavigationError=3]="NavigationError",n[n.RoutesRecognized=4]="RoutesRecognized",n[n.ResolveStart=5]="ResolveStart",n[n.ResolveEnd=6]="ResolveEnd",n[n.GuardsCheckStart=7]="GuardsCheckStart",n[n.GuardsCheckEnd=8]="GuardsCheckEnd",n[n.RouteConfigLoadStart=9]="RouteConfigLoadStart",n[n.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",n[n.ChildActivationStart=11]="ChildActivationStart",n[n.ChildActivationEnd=12]="ChildActivationEnd",n[n.ActivationStart=13]="ActivationStart",n[n.ActivationEnd=14]="ActivationEnd",n[n.Scroll=15]="Scroll",n[n.NavigationSkipped=16]="NavigationSkipped",n}(Yt||{}),ai=class{constructor(t,e){this.id=t,this.url=e}},va=class extends ai{constructor(t,e,i="imperative",r=null){super(t,e),this.type=Yt.NavigationStart,this.navigationTrigger=i,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Ki=class extends ai{constructor(t,e,i){super(t,e),this.urlAfterRedirects=i,this.type=Yt.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},Un=function(n){return n[n.Redirect=0]="Redirect",n[n.SupersededByNewNavigation=1]="SupersededByNewNavigation",n[n.NoDataFromResolver=2]="NoDataFromResolver",n[n.GuardRejected=3]="GuardRejected",n}(Un||{}),tf=function(n){return n[n.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",n[n.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",n}(tf||{}),ss=class extends ai{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=Yt.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},os=class extends ai{constructor(t,e,i,r){super(t,e),this.reason=i,this.code=r,this.type=Yt.NavigationSkipped}},Wl=class extends ai{constructor(t,e,i,r){super(t,e),this.error=i,this.target=r,this.type=Yt.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},nf=class extends ai{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=Yt.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},MF=class extends ai{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=Yt.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},OF=class extends ai{constructor(t,e,i,r,s){super(t,e),this.urlAfterRedirects=i,this.state=r,this.shouldActivate=s,this.type=Yt.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},PF=class extends ai{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=Yt.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},RF=class extends ai{constructor(t,e,i,r){super(t,e),this.urlAfterRedirects=i,this.state=r,this.type=Yt.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},LF=class{constructor(t){this.route=t,this.type=Yt.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},BF=class{constructor(t){this.route=t,this.type=Yt.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},VF=class{constructor(t){this.snapshot=t,this.type=Yt.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},jF=class{constructor(t){this.snapshot=t,this.type=Yt.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},UF=class{constructor(t){this.snapshot=t,this.type=Yt.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},HF=class{constructor(t){this.snapshot=t,this.type=Yt.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},rf=class{constructor(t,e,i){this.routerEvent=t,this.position=e,this.anchor=i,this.type=Yt.Scroll}toString(){let t=this.position?`${this.position[0]}, ${this.position[1]}`:null;return`Scroll(anchor: '${this.anchor}', position: '${t}')`}},ql=class{},Gl=class{constructor(t){this.url=t}};var zF=class{constructor(){this.outlet=null,this.route=null,this.injector=null,this.children=new Xl,this.attachRef=null}},Xl=(()=>{let t=class t{constructor(){this.contexts=new Map}onChildOutletCreated(i,r){let s=this.getOrCreateContext(i);s.outlet=r,this.contexts.set(i,s)}onChildOutletDestroyed(i){let r=this.getContext(i);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let i=this.contexts;return this.contexts=new Map,i}onOutletReAttached(i){this.contexts=i}getOrCreateContext(i){let r=this.getContext(i);return r||(r=new zF,this.contexts.set(i,r)),r}getContext(i){return this.contexts.get(i)||null}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),sf=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=$F(t,this._root);return e?e.children.map(i=>i.value):[]}firstChild(t){let e=$F(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=WF(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return WF(t,this._root).map(e=>e.value)}};function $F(n,t){if(n===t.value)return t;for(let e of t.children){let i=$F(n,e);if(i)return i}return null}function WF(n,t){if(n===t.value)return[t];for(let e of t.children){let i=WF(n,e);if(i.length)return i.unshift(t),i}return[]}var jn=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function ga(n){let t={};return n&&n.children.forEach(e=>t[e.value.outlet]=e),t}var of=class extends sf{constructor(t,e){super(t),this.snapshot=e,t_(this,t)}toString(){return this.snapshot.toString()}};function A3(n){let t=F$(n),e=new dt([new Xs("",{})]),i=new dt({}),r=new dt({}),s=new dt({}),o=new dt(""),a=new to(e,i,s,o,r,Re,n,t.root);return a.snapshot=t.root,new of(new jn(a,[]),t)}function F$(n){let t={},e={},i={},r="",s=new Kl([],t,i,r,e,Re,n,null,{});return new af("",new jn(s,[]))}var to=class{constructor(t,e,i,r,s,o,a,l){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=i,this.fragmentSubject=r,this.dataSubject=s,this.outlet=o,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(de(c=>c[Yl]))??le(void 0),this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(de(t=>ya(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(de(t=>ya(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function e_(n,t,e="emptyOnly"){let i,{routeConfig:r}=n;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?i={params:P(P({},t.params),n.params),data:P(P({},t.data),n.data),resolve:P(P(P(P({},n.data),t.data),r?.data),n._resolvedData)}:i={params:P({},n.params),data:P({},n.data),resolve:P(P({},n.data),n._resolvedData??{})},r&&O3(r)&&(i.resolve[Yl]=r.title),i}var Kl=class{get title(){return this.data?.[Yl]}constructor(t,e,i,r,s,o,a,l,c){this.url=t,this.params=e,this.queryParams=i,this.fragment=r,this.data=s,this.outlet=o,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ya(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ya(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(i=>i.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},af=class extends sf{constructor(t,e){super(e),this.url=t,t_(this,e)}toString(){return M3(this._root)}};function t_(n,t){t.value._routerState=n,t.children.forEach(e=>t_(n,e))}function M3(n){let t=n.children.length>0?` { ${n.children.map(M3).join(", ")} } `:"";return`${n.value}${t}`}function IF(n){if(n.snapshot){let t=n.snapshot,e=n._futureSnapshot;n.snapshot=e,Gi(t.queryParams,e.queryParams)||n.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&n.fragmentSubject.next(e.fragment),Gi(t.params,e.params)||n.paramsSubject.next(e.params),qz(t.url,e.url)||n.urlSubject.next(e.url),Gi(t.data,e.data)||n.dataSubject.next(e.data)}else n.snapshot=n._futureSnapshot,n.dataSubject.next(n._futureSnapshot.data)}function qF(n,t){let e=Gi(n.params,t.params)&&Zz(n.url,t.url),i=!n.parent!=!t.parent;return e&&!i&&(!n.parent||qF(n.parent,t.parent))}function O3(n){return typeof n.title=="string"||n.title===null}var n_=(()=>{let t=class t{constructor(){this.activated=null,this._activatedRoute=null,this.name=Re,this.activateEvents=new R,this.deactivateEvents=new R,this.attachEvents=new R,this.detachEvents=new R,this.parentContexts=B(Xl),this.location=B(Qn),this.changeDetector=B(ke),this.environmentInjector=B(rn),this.inputBinder=B(hf,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(i){if(i.name){let{firstChange:r,previousValue:s}=i.name;if(r)return;this.isTrackedInParentContexts(s)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(s)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(i){return this.parentContexts.getContext(i)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let i=this.parentContexts.getContext(this.name);i?.route&&(i.attachRef?this.attach(i.attachRef,i.route):this.activateWith(i.route,i.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new j(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new j(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new j(4012,!1);this.location.detach();let i=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(i.instance),i}attach(i,r){this.activated=i,this._activatedRoute=r,this.location.insert(i.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(i.instance)}deactivate(){if(this.activated){let i=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(i)}}activateWith(i,r){if(this.isActivated)throw new j(4013,!1);this._activatedRoute=i;let s=this.location,a=i.snapshot.component,l=this.parentContexts.getOrCreateContext(this.name).children,c=new GF(i,l,s.injector);this.activated=s.createComponent(a,{index:s.length,injector:c,environmentInjector:r??this.environmentInjector}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275dir=Ge({type:t,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[at]});let n=t;return n})(),GF=class n{__ngOutletInjector(t){return new n(this.route,this.childContexts,t)}constructor(t,e,i){this.route=t,this.childContexts=e,this.parent=i}get(t,e){return t===to?this.route:t===Xl?this.childContexts:this.parent.get(t,e)}},hf=new X(""),p3=(()=>{let t=class t{constructor(){this.outletDataSubscriptions=new Map}bindActivatedRouteToOutletComponent(i){this.unsubscribeFromRouteData(i),this.subscribeToRouteData(i)}unsubscribeFromRouteData(i){this.outletDataSubscriptions.get(i)?.unsubscribe(),this.outletDataSubscriptions.delete(i)}subscribeToRouteData(i){let{activatedRoute:r}=i,s=Ta([r.queryParams,r.params,r.data]).pipe(He(([o,a,l],c)=>(l=P(P(P({},o),a),l),c===0?le(l):Promise.resolve(l)))).subscribe(o=>{if(!i.isActivated||!i.activatedComponentRef||i.activatedRoute!==r||r.component===null){this.unsubscribeFromRouteData(i);return}let a=$v(r.component);if(!a){this.unsubscribeFromRouteData(i);return}for(let{templateName:l}of a.inputs)i.activatedComponentRef.setInput(l,o[l])});this.outletDataSubscriptions.set(i,s)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac});let n=t;return n})();function _$(n,t,e){let i=Ql(n,t._root,e?e._root:void 0);return new of(i,t)}function Ql(n,t,e){if(e&&n.shouldReuseRoute(t.value,e.value.snapshot)){let i=e.value;i._futureSnapshot=t.value;let r=y$(n,t,e);return new jn(i,r)}else{if(n.shouldAttach(t.value)){let s=n.retrieve(t.value);if(s!==null){let o=s.route;return o.value._futureSnapshot=t.value,o.children=t.children.map(a=>Ql(n,a)),o}}let i=w$(t.value),r=t.children.map(s=>Ql(n,s));return new jn(i,r)}}function y$(n,t,e){return t.children.map(i=>{for(let r of e.children)if(n.shouldReuseRoute(i.value,r.value.snapshot))return Ql(n,i,r);return Ql(n,i)})}function w$(n){return new to(new dt(n.url),new dt(n.params),new dt(n.queryParams),new dt(n.fragment),new dt(n.data),n.outlet,n.component,n)}var P3="ngNavigationCancelingError";function R3(n,t){let{redirectTo:e,navigationBehaviorOptions:i}=wa(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=L3(!1,Un.Redirect);return r.url=e,r.navigationBehaviorOptions=i,r}function L3(n,t){let e=new Error(`NavigationCancelingError: ${n||""}`);return e[P3]=!0,e.cancellationCode=t,e}function v$(n){return B3(n)&&wa(n.url)}function B3(n){return!!n&&n[P3]}var b$=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=M({type:t,selectors:[["ng-component"]],standalone:!0,features:[J],decls:1,vars:0,template:function(r,s){r&1&&b(0,"router-outlet")},dependencies:[n_],encapsulation:2});let n=t;return n})();function C$(n,t){return n.providers&&!n._injector&&(n._injector=Ku(n.providers,t,`Route: ${n.path}`)),n._injector??t}function i_(n){let t=n.children&&n.children.map(i_),e=t?Ne(P({},n),{children:t}):P({},n);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Re&&(e.component=b$),e}function Qi(n){return n.outlet||Re}function E$(n,t){let e=n.filter(i=>Qi(i)===t);return e.push(...n.filter(i=>Qi(i)!==t)),e}function ec(n){if(!n)return null;if(n.routeConfig?._injector)return n.routeConfig._injector;for(let t=n.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var D$=(n,t,e,i)=>de(r=>(new KF(t,r.targetRouterState,r.currentRouterState,e,i).activate(n),r)),KF=class{constructor(t,e,i,r,s){this.routeReuseStrategy=t,this.futureState=e,this.currState=i,this.forwardEvent=r,this.inputBindingEnabled=s}activate(t){let e=this.futureState._root,i=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,i,t),IF(this.futureState.root),this.activateChildRoutes(e,i,t)}deactivateChildRoutes(t,e,i){let r=ga(e);t.children.forEach(s=>{let o=s.value.outlet;this.deactivateRoutes(s,r[o],i),delete r[o]}),Object.values(r).forEach(s=>{this.deactivateRouteAndItsChildren(s,i)})}deactivateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(r===s)if(r.component){let o=i.getContext(r.outlet);o&&this.deactivateChildRoutes(t,e,o.children)}else this.deactivateChildRoutes(t,e,i);else s&&this.deactivateRouteAndItsChildren(e,i)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=ga(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);if(i&&i.outlet){let o=i.outlet.detach(),a=i.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:o,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let i=e.getContext(t.value.outlet),r=i&&t.value.component?i.children:e,s=ga(t);for(let o of Object.values(s))this.deactivateRouteAndItsChildren(o,r);i&&(i.outlet&&(i.outlet.deactivate(),i.children.onOutletDeactivated()),i.attachRef=null,i.route=null)}activateChildRoutes(t,e,i){let r=ga(e);t.children.forEach(s=>{this.activateRoutes(s,r[s.value.outlet],i),this.forwardEvent(new HF(s.value.snapshot))}),t.children.length&&this.forwardEvent(new jF(t.value.snapshot))}activateRoutes(t,e,i){let r=t.value,s=e?e.value:null;if(IF(r),r===s)if(r.component){let o=i.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,o.children)}else this.activateChildRoutes(t,e,i);else if(r.component){let o=i.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),o.children.onOutletReAttached(a.contexts),o.attachRef=a.componentRef,o.route=a.route.value,o.outlet&&o.outlet.attach(a.componentRef,a.route.value),IF(a.route.value),this.activateChildRoutes(t,null,o.children)}else{let a=ec(r.snapshot);o.attachRef=null,o.route=r,o.injector=a,o.outlet&&o.outlet.activateWith(r,o.injector),this.activateChildRoutes(t,null,o.children)}}else this.activateChildRoutes(t,null,i)}},lf=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},_a=class{constructor(t,e){this.component=t,this.route=e}};function I$(n,t,e){let i=n._root,r=t?t._root:null;return Bl(i,r,e,[i.value])}function k$(n){let t=n.routeConfig?n.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:n,guards:t}}function Ca(n,t){let e=Symbol(),i=t.get(n,e);return i===e?typeof n=="function"&&!e2(n)?n:t.get(n):i}function Bl(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=ga(t);return n.children.forEach(o=>{S$(o,s[o.value.outlet],e,i.concat([o.value]),r),delete s[o.value.outlet]}),Object.entries(s).forEach(([o,a])=>Hl(a,e.getContext(o),r)),r}function S$(n,t,e,i,r={canDeactivateChecks:[],canActivateChecks:[]}){let s=n.value,o=t?t.value:null,a=e?e.getContext(n.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){let l=T$(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new lf(i)):(s.data=o.data,s._resolvedData=o._resolvedData),s.component?Bl(n,t,a?a.children:null,i,r):Bl(n,t,e,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new _a(a.outlet.component,o))}else o&&Hl(t,a,r),r.canActivateChecks.push(new lf(i)),s.component?Bl(n,null,a?a.children:null,i,r):Bl(n,null,e,i,r);return r}function T$(n,t,e){if(typeof e=="function")return e(n,t);switch(e){case"pathParamsChange":return!eo(n.url,t.url);case"pathParamsOrQueryParamsChange":return!eo(n.url,t.url)||!Gi(n.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!qF(n,t)||!Gi(n.queryParams,t.queryParams);case"paramsChange":default:return!qF(n,t)}}function Hl(n,t,e){let i=ga(n),r=n.value;Object.entries(i).forEach(([s,o])=>{r.component?t?Hl(o,t.children.getContext(s),e):Hl(o,null,e):Hl(o,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new _a(t.outlet.component,r)):e.canDeactivateChecks.push(new _a(null,r)):e.canDeactivateChecks.push(new _a(null,r))}function tc(n){return typeof n=="function"}function N$(n){return typeof n=="boolean"}function x$(n){return n&&tc(n.canLoad)}function A$(n){return n&&tc(n.canActivate)}function M$(n){return n&&tc(n.canActivateChild)}function O$(n){return n&&tc(n.canDeactivate)}function P$(n){return n&&tc(n.canMatch)}function V3(n){return n instanceof Yi||n?.name==="EmptyError"}var Qh=Symbol("INITIAL_VALUE");function ba(){return He(n=>Ta(n.map(t=>t.pipe(ui(1),qf(Qh)))).pipe(de(t=>{for(let e of t)if(e!==!0){if(e===Qh)return Qh;if(e===!1||e instanceof rs)return e}return!0}),qt(t=>t!==Qh),ui(1)))}function R$(n,t){return kt(e=>{let{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=e;return o.length===0&&s.length===0?le(Ne(P({},e),{guardsResult:!0})):L$(o,i,r,n).pipe(kt(a=>a&&N$(a)?B$(i,s,n,t):le(a)),de(a=>Ne(P({},e),{guardsResult:a})))})}function L$(n,t,e,i){return Xe(n).pipe(kt(r=>z$(r.component,r.route,e,t,i)),Si(r=>r!==!0,!0))}function B$(n,t,e,i){return Xe(t).pipe(zn(r=>Fo(j$(r.route.parent,i),V$(r.route,i),H$(n,r.path,e),U$(n,r.route,e))),Si(r=>r!==!0,!0))}function V$(n,t){return n!==null&&t&&t(new UF(n)),le(!0)}function j$(n,t){return n!==null&&t&&t(new VF(n)),le(!0)}function U$(n,t,e){let i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||i.length===0)return le(!0);let r=i.map(s=>Lc(()=>{let o=ec(t)??e,a=Ca(s,o),l=A$(a)?a.canActivate(t,n):gi(o,()=>a(t,n));return as(l).pipe(Si())}));return le(r).pipe(ba())}function H$(n,t,e){let i=t[t.length-1],s=t.slice(0,t.length-1).reverse().map(o=>k$(o)).filter(o=>o!==null).map(o=>Lc(()=>{let a=o.guards.map(l=>{let c=ec(o.node)??e,d=Ca(l,c),f=M$(d)?d.canActivateChild(i,n):gi(c,()=>d(i,n));return as(f).pipe(Si())});return le(a).pipe(ba())}));return le(s).pipe(ba())}function z$(n,t,e,i,r){let s=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!s||s.length===0)return le(!0);let o=s.map(a=>{let l=ec(t)??r,c=Ca(a,l),d=O$(c)?c.canDeactivate(n,t,e,i):gi(l,()=>c(n,t,e,i));return as(d).pipe(Si())});return le(o).pipe(ba())}function $$(n,t,e,i){let r=t.canLoad;if(r===void 0||r.length===0)return le(!0);let s=r.map(o=>{let a=Ca(o,n),l=x$(a)?a.canLoad(t,e):gi(n,()=>a(t,e));return as(l)});return le(s).pipe(ba(),j3(i))}function j3(n){return xf(Rt(t=>{if(wa(t))throw R3(n,t)}),de(t=>t===!0))}function W$(n,t,e,i){let r=t.canMatch;if(!r||r.length===0)return le(!0);let s=r.map(o=>{let a=Ca(o,n),l=P$(a)?a.canMatch(t,e):gi(n,()=>a(t,e));return as(l)});return le(s).pipe(ba(),j3(i))}var Zl=class{constructor(t){this.segmentGroup=t||null}},cf=class extends Error{constructor(t){super(),this.urlTree=t}};function ma(n){return ci(new Zl(n))}function q$(n){return ci(new j(4e3,!1))}function G$(n){return ci(L3(!1,Un.GuardRejected))}var QF=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let i=[],r=e.root;for(;;){if(i=i.concat(r.segments),r.numberOfChildren===0)return le(i);if(r.numberOfChildren>1||!r.children[Re])return q$(t.redirectTo);r=r.children[Re]}}applyRedirectCommands(t,e,i){let r=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,i);if(e.startsWith("/"))throw new cf(r);return r}applyRedirectCreateUrlTree(t,e,i,r){let s=this.createSegmentGroup(t,e.root,i,r);return new rs(s,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let i={};return Object.entries(t).forEach(([r,s])=>{if(typeof s=="string"&&s.startsWith(":")){let a=s.substring(1);i[r]=e[a]}else i[r]=s}),i}createSegmentGroup(t,e,i,r){let s=this.createSegments(t,e.segments,i,r),o={};return Object.entries(e.children).forEach(([a,l])=>{o[a]=this.createSegmentGroup(t,l,i,r)}),new ot(s,o)}createSegments(t,e,i,r){return e.map(s=>s.path.startsWith(":")?this.findPosParam(t,s,r):this.findOrReturn(s,i))}findPosParam(t,e,i){let r=i[e.path.substring(1)];if(!r)throw new j(4001,!1);return r}findOrReturn(t,e){let i=0;for(let r of e){if(r.path===t.path)return e.splice(i),r;i++}return t}},ZF={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function K$(n,t,e,i,r){let s=r_(n,t,e);return s.matched?(i=C$(t,i),W$(i,t,e,r).pipe(de(o=>o===!0?s:P({},ZF)))):le(s)}function r_(n,t,e){if(t.path==="**")return Q$(e);if(t.path==="")return t.pathMatch==="full"&&(n.hasChildren()||e.length>0)?P({},ZF):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||Wz)(e,n,t);if(!r)return P({},ZF);let s={};Object.entries(r.posParams??{}).forEach(([a,l])=>{s[a]=l.path});let o=r.consumed.length>0?P(P({},s),r.consumed[r.consumed.length-1].parameters):s;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:o,positionalParamSegments:r.posParams??{}}}function Q$(n){return{matched:!0,parameters:n.length>0?y3(n).parameters:{},consumedSegments:n,remainingSegments:[],positionalParamSegments:{}}}function m3(n,t,e,i){return e.length>0&&J$(n,e,i)?{segmentGroup:new ot(t,Y$(i,new ot(e,n.children))),slicedSegments:[]}:e.length===0&&X$(n,e,i)?{segmentGroup:new ot(n.segments,Z$(n,e,i,n.children)),slicedSegments:e}:{segmentGroup:new ot(n.segments,n.children),slicedSegments:e}}function Z$(n,t,e,i){let r={};for(let s of e)if(ff(n,t,s)&&!i[Qi(s)]){let o=new ot([],{});r[Qi(s)]=o}return P(P({},i),r)}function Y$(n,t){let e={};e[Re]=t;for(let i of n)if(i.path===""&&Qi(i)!==Re){let r=new ot([],{});e[Qi(i)]=r}return e}function J$(n,t,e){return e.some(i=>ff(n,t,i)&&Qi(i)!==Re)}function X$(n,t,e){return e.some(i=>ff(n,t,i))}function ff(n,t,e){return(n.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function eW(n,t,e,i){return Qi(n)!==i&&(i===Re||!ff(t,e,n))?!1:r_(t,n,e).matched}function tW(n,t,e){return t.length===0&&!n.children[e]}var YF=class{};function nW(n,t,e,i,r,s,o="emptyOnly"){return new JF(n,t,e,i,r,o,s).recognize()}var iW=31,JF=class{constructor(t,e,i,r,s,o,a){this.injector=t,this.configLoader=e,this.rootComponentType=i,this.config=r,this.urlTree=s,this.paramsInheritanceStrategy=o,this.urlSerializer=a,this.applyRedirects=new QF(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new j(4002,`'${t.segmentGroup}'`)}recognize(){let t=m3(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(de(e=>{let i=new Kl([],Object.freeze({}),Object.freeze(P({},this.urlTree.queryParams)),this.urlTree.fragment,{},Re,this.rootComponentType,null,{}),r=new jn(i,e),s=new af("",r),o=u$(i,[],this.urlTree.queryParams,this.urlTree.fragment);return o.queryParams=this.urlTree.queryParams,s.url=this.urlSerializer.serialize(o),this.inheritParamsAndData(s._root,null),{state:s,tree:o}}))}match(t){return this.processSegmentGroup(this.injector,this.config,t,Re).pipe(Nt(i=>{if(i instanceof cf)return this.urlTree=i.urlTree,this.match(i.urlTree.root);throw i instanceof Zl?this.noMatchError(i):i}))}inheritParamsAndData(t,e){let i=t.value,r=e_(i,e,this.paramsInheritanceStrategy);i.params=Object.freeze(r.params),i.data=Object.freeze(r.data),t.children.forEach(s=>this.inheritParamsAndData(s,i))}processSegmentGroup(t,e,i,r){return i.segments.length===0&&i.hasChildren()?this.processChildren(t,e,i):this.processSegment(t,e,i,i.segments,r,!0).pipe(de(s=>s instanceof jn?[s]:[]))}processChildren(t,e,i){let r=[];for(let s of Object.keys(i.children))s==="primary"?r.unshift(s):r.push(s);return Xe(r).pipe(zn(s=>{let o=i.children[s],a=E$(e,s);return this.processSegmentGroup(t,a,o,s)}),zf((s,o)=>(s.push(...o),s)),Cr(null),Uf(),kt(s=>{if(s===null)return ma(i);let o=U3(s);return rW(o),le(o)}))}processSegment(t,e,i,r,s,o){return Xe(e).pipe(zn(a=>this.processSegmentAgainstRoute(a._injector??t,e,a,i,r,s,o).pipe(Nt(l=>{if(l instanceof Zl)return le(null);throw l}))),Si(a=>!!a),Nt(a=>{if(V3(a))return tW(i,r,s)?le(new YF):ma(i);throw a}))}processSegmentAgainstRoute(t,e,i,r,s,o,a){return eW(i,r,s,o)?i.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,i,s,o):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,i,s,o):ma(r):ma(r)}expandSegmentAgainstRouteUsingRedirect(t,e,i,r,s,o){let{matched:a,consumedSegments:l,positionalParamSegments:c,remainingSegments:d}=r_(e,r,s);if(!a)return ma(e);r.redirectTo.startsWith("/")&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>iW&&(this.allowRedirects=!1));let f=this.applyRedirects.applyRedirectCommands(l,r.redirectTo,c);return this.applyRedirects.lineralizeSegments(r,f).pipe(kt(_=>this.processSegment(t,i,e,_.concat(d),o,!1)))}matchSegmentAgainstRoute(t,e,i,r,s){let o=K$(e,i,r,t,this.urlSerializer);return i.path==="**"&&(e.children={}),o.pipe(He(a=>a.matched?(t=i._injector??t,this.getChildConfig(t,i,r).pipe(He(({routes:l})=>{let c=i._loadedInjector??t,{consumedSegments:d,remainingSegments:f,parameters:_}=a,y=new Kl(d,_,Object.freeze(P({},this.urlTree.queryParams)),this.urlTree.fragment,oW(i),Qi(i),i.component??i._loadedComponent??null,i,aW(i)),{segmentGroup:C,slicedSegments:N}=m3(e,d,f,l);if(N.length===0&&C.hasChildren())return this.processChildren(c,l,C).pipe(de(O=>O===null?null:new jn(y,O)));if(l.length===0&&N.length===0)return le(new jn(y,[]));let x=Qi(i)===s;return this.processSegment(c,l,C,N,x?Re:s,!0).pipe(de(O=>new jn(y,O instanceof jn?[O]:[])))}))):ma(e)))}getChildConfig(t,e,i){return e.children?le({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?le({routes:e._loadedRoutes,injector:e._loadedInjector}):$$(t,e,i,this.urlSerializer).pipe(kt(r=>r?this.configLoader.loadChildren(t,e).pipe(Rt(s=>{e._loadedRoutes=s.routes,e._loadedInjector=s.injector})):G$(e))):le({routes:[],injector:t})}};function rW(n){n.sort((t,e)=>t.value.outlet===Re?-1:e.value.outlet===Re?1:t.value.outlet.localeCompare(e.value.outlet))}function sW(n){let t=n.value.routeConfig;return t&&t.path===""}function U3(n){let t=[],e=new Set;for(let i of n){if(!sW(i)){t.push(i);continue}let r=t.find(s=>i.value.routeConfig===s.value.routeConfig);r!==void 0?(r.children.push(...i.children),e.add(r)):t.push(i)}for(let i of e){let r=U3(i.children);t.push(new jn(i.value,r))}return t.filter(i=>!e.has(i))}function oW(n){return n.data||{}}function aW(n){return n.resolve||{}}function lW(n,t,e,i,r,s){return kt(o=>nW(n,t,e,i,o.extractedUrl,r,s).pipe(de(({state:a,tree:l})=>Ne(P({},o),{targetSnapshot:a,urlAfterRedirects:l}))))}function cW(n,t){return kt(e=>{let{targetSnapshot:i,guards:{canActivateChecks:r}}=e;if(!r.length)return le(e);let s=new Set(r.map(l=>l.route)),o=new Set;for(let l of s)if(!o.has(l))for(let c of H3(l))o.add(c);let a=0;return Xe(o).pipe(zn(l=>s.has(l)?uW(l,i,n,t):(l.data=e_(l,l.parent,n).resolve,le(void 0))),Rt(()=>a++),_o(1),kt(l=>a===o.size?le(e):pn))})}function H3(n){let t=n.children.map(e=>H3(e)).flat();return[n,...t]}function uW(n,t,e,i){let r=n.routeConfig,s=n._resolve;return r?.title!==void 0&&!O3(r)&&(s[Yl]=r.title),dW(s,n,t,i).pipe(de(o=>(n._resolvedData=o,n.data=e_(n,n.parent,e).resolve,null)))}function dW(n,t,e,i){let r=TF(n);if(r.length===0)return le({});let s={};return Xe(r).pipe(kt(o=>hW(n[o],t,e,i).pipe(Si(),Rt(a=>{s[o]=a}))),_o(1),jf(s),Nt(o=>V3(o)?pn:ci(o)))}function hW(n,t,e,i){let r=ec(t)??i,s=Ca(n,r),o=s.resolve?s.resolve(t,e):gi(r,()=>s(t,e));return as(o)}function kF(n){return He(t=>{let e=n(t);return e?Xe(e).pipe(de(()=>t)):le(t)})}var z3=(()=>{let t=class t{buildTitle(i){let r,s=i.root;for(;s!==void 0;)r=this.getResolvedTitleForRoute(s)??r,s=s.children.find(o=>o.outlet===Re);return r}getResolvedTitleForRoute(i){return i.data[Yl]}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:()=>B(fW),providedIn:"root"});let n=t;return n})(),fW=(()=>{let t=class t extends z3{constructor(i){super(),this.title=i}updateTitle(i){let r=this.buildTitle(i);r!==void 0&&this.title.setTitle(r)}};t.\u0275fac=function(r){return new(r||t)(z(Tb))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),nc=new X("",{providedIn:"root",factory:()=>({})}),uf=new X(""),s_=(()=>{let t=class t{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=B(nd)}loadComponent(i){if(this.componentLoaders.get(i))return this.componentLoaders.get(i);if(i._loadedComponent)return le(i._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(i);let r=as(i.loadComponent()).pipe(de($3),Rt(o=>{this.onLoadEndListener&&this.onLoadEndListener(i),i._loadedComponent=o}),Er(()=>{this.componentLoaders.delete(i)})),s=new co(r,()=>new Be).pipe(lo());return this.componentLoaders.set(i,s),s}loadChildren(i,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return le({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=pW(r,this.compiler,i,this.onLoadEndListener).pipe(Er(()=>{this.childrenLoaders.delete(r)})),a=new co(o,()=>new Be).pipe(lo());return this.childrenLoaders.set(r,a),a}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function pW(n,t,e,i){return as(n.loadChildren()).pipe(de($3),kt(r=>r instanceof Ha||Array.isArray(r)?le(r):Xe(t.compileModuleAsync(r))),de(r=>{i&&i(n);let s,o,a=!1;return Array.isArray(r)?(o=r,a=!0):(s=r.create(e).injector,o=s.get(uf,[],{optional:!0,self:!0}).flat()),{routes:o.map(i_),injector:s}}))}function mW(n){return n&&typeof n=="object"&&"default"in n}function $3(n){return mW(n)?n.default:n}var o_=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:()=>B(gW),providedIn:"root"});let n=t;return n})(),gW=(()=>{let t=class t{shouldProcessUrl(i){return!0}extract(i){return i}merge(i,r){return i}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),W3=new X(""),q3=new X("");function FW(n,t,e){let i=n.get(q3),r=n.get(Se);return n.get(se).runOutsideAngular(()=>{if(!r.startViewTransition||i.skipNextTransition)return i.skipNextTransition=!1,new Promise(c=>setTimeout(c));let s,o=new Promise(c=>{s=c}),a=r.startViewTransition(()=>(s(),_W(n))),{onViewTransitionCreated:l}=i;return l&&gi(n,()=>l({transition:a,from:t,to:e})),o})}function _W(n){return new Promise(t=>{Gu(t,{injector:n})})}var a_=(()=>{let t=class t{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new Be,this.transitionAbortSubject=new Be,this.configLoader=B(s_),this.environmentInjector=B(rn),this.urlSerializer=B(Jl),this.rootContexts=B(Xl),this.location=B(Uo),this.inputBindingEnabled=B(hf,{optional:!0})!==null,this.titleStrategy=B(z3),this.options=B(nc,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=B(o_),this.createViewTransition=B(W3,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>le(void 0),this.rootComponentType=null;let i=s=>this.events.next(new LF(s)),r=s=>this.events.next(new BF(s));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=i}complete(){this.transitions?.complete()}handleNavigationRequest(i){let r=++this.navigationId;this.transitions?.next(Ne(P(P({},this.transitions.value),i),{id:r}))}setupNavigations(i,r,s){return this.transitions=new dt({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:Ul,restoredState:null,currentSnapshot:s.snapshot,targetSnapshot:null,currentRouterState:s,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(qt(o=>o.id!==0),de(o=>Ne(P({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),He(o=>{let a=!1,l=!1;return le(o).pipe(He(c=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",Un.SupersededByNewNavigation),pn;this.currentTransition=o,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?Ne(P({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let d=!i.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),f=c.extras.onSameUrlNavigation??i.onSameUrlNavigation;if(!d&&f!=="reload"){let _="";return this.events.next(new os(c.id,this.urlSerializer.serialize(c.rawUrl),_,tf.IgnoredSameUrlNavigation)),c.resolve(null),pn}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return le(c).pipe(He(_=>{let y=this.transitions?.getValue();return this.events.next(new va(_.id,this.urlSerializer.serialize(_.extractedUrl),_.source,_.restoredState)),y!==this.transitions?.getValue()?pn:Promise.resolve(_)}),lW(this.environmentInjector,this.configLoader,this.rootComponentType,i.config,this.urlSerializer,this.paramsInheritanceStrategy),Rt(_=>{o.targetSnapshot=_.targetSnapshot,o.urlAfterRedirects=_.urlAfterRedirects,this.currentNavigation=Ne(P({},this.currentNavigation),{finalUrl:_.urlAfterRedirects});let y=new nf(_.id,this.urlSerializer.serialize(_.extractedUrl),this.urlSerializer.serialize(_.urlAfterRedirects),_.targetSnapshot);this.events.next(y)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:_,extractedUrl:y,source:C,restoredState:N,extras:x}=c,O=new va(_,this.urlSerializer.serialize(y),C,N);this.events.next(O);let G=A3(this.rootComponentType).snapshot;return this.currentTransition=o=Ne(P({},c),{targetSnapshot:G,urlAfterRedirects:y,extras:Ne(P({},x),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=y,le(o)}else{let _="";return this.events.next(new os(c.id,this.urlSerializer.serialize(c.extractedUrl),_,tf.IgnoredByUrlHandlingStrategy)),c.resolve(null),pn}}),Rt(c=>{let d=new MF(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),de(c=>(this.currentTransition=o=Ne(P({},c),{guards:I$(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),o)),R$(this.environmentInjector,c=>this.events.next(c)),Rt(c=>{if(o.guardsResult=c.guardsResult,wa(c.guardsResult))throw R3(this.urlSerializer,c.guardsResult);let d=new OF(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(d)}),qt(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",Un.GuardRejected),!1)),kF(c=>{if(c.guards.canActivateChecks.length)return le(c).pipe(Rt(d=>{let f=new PF(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}),He(d=>{let f=!1;return le(d).pipe(cW(this.paramsInheritanceStrategy,this.environmentInjector),Rt({next:()=>f=!0,complete:()=>{f||this.cancelNavigationTransition(d,"",Un.NoDataFromResolver)}}))}),Rt(d=>{let f=new RF(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(f)}))}),kF(c=>{let d=f=>{let _=[];f.routeConfig?.loadComponent&&!f.routeConfig._loadedComponent&&_.push(this.configLoader.loadComponent(f.routeConfig).pipe(Rt(y=>{f.component=y}),de(()=>{})));for(let y of f.children)_.push(...d(y));return _};return Ta(d(c.targetSnapshot.root)).pipe(Cr(null),ui(1))}),kF(()=>this.afterPreactivation()),He(()=>{let{currentSnapshot:c,targetSnapshot:d}=o,f=this.createViewTransition?.(this.environmentInjector,c.root,d.root);return f?Xe(f).pipe(de(()=>o)):le(o)}),de(c=>{let d=_$(i.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=o=Ne(P({},c),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,o}),Rt(()=>{this.events.next(new ql)}),D$(this.rootContexts,i.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),ui(1),Rt({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Ki(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),$n(this.transitionAbortSubject.pipe(Rt(c=>{throw c}))),Er(()=>{!a&&!l&&this.cancelNavigationTransition(o,"",Un.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),Nt(c=>{if(l=!0,B3(c))this.events.next(new ss(o.id,this.urlSerializer.serialize(o.extractedUrl),c.message,c.cancellationCode)),v$(c)?this.events.next(new Gl(c.url)):o.resolve(!1);else{this.events.next(new Wl(o.id,this.urlSerializer.serialize(o.extractedUrl),c,o.targetSnapshot??void 0));try{o.resolve(i.errorHandler(c))}catch(d){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(d)}}return pn}))}))}cancelNavigationTransition(i,r,s){let o=new ss(i.id,this.urlSerializer.serialize(i.extractedUrl),r,s);this.events.next(o),i.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function yW(n){return n!==Ul}var wW=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:()=>B(vW),providedIn:"root"});let n=t;return n})(),XF=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},vW=(()=>{let t=class t extends XF{};t.\u0275fac=(()=>{let i;return function(s){return(i||(i=he(t)))(s||t)}})(),t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),G3=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:()=>B(bW),providedIn:"root"});let n=t;return n})(),bW=(()=>{let t=class t extends G3{constructor(){super(...arguments),this.location=B(Uo),this.urlSerializer=B(Jl),this.options=B(nc,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=B(o_),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new rs,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=A3(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(i){return this.location.subscribe(r=>{r.type==="popstate"&&i(r.url,r.state)})}handleRouterEvent(i,r){if(i instanceof va)this.stateMemento=this.createStateMemento();else if(i instanceof os)this.rawUrlTree=r.initialUrl;else if(i instanceof nf){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let s=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(s,r)}}else i instanceof ql?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,r))):i instanceof ss&&(i.code===Un.GuardRejected||i.code===Un.NoDataFromResolver)?this.restoreHistory(r):i instanceof Wl?this.restoreHistory(r,!0):i instanceof Ki&&(this.lastSuccessfulId=i.id,this.currentPageId=this.browserPageId)}setBrowserUrl(i,r){let s=this.urlSerializer.serialize(i);if(this.location.isCurrentPathEqualTo(s)||r.extras.replaceUrl){let o=this.browserPageId,a=P(P({},r.extras.state),this.generateNgRouterState(r.id,o));this.location.replaceState(s,"",a)}else{let o=P(P({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(s,"",o)}}restoreHistory(i,r=!1){if(this.canceledNavigationResolution==="computed"){let s=this.browserPageId,o=this.currentPageId-s;o!==0?this.location.historyGo(o):this.currentUrlTree===i.finalUrl&&o===0&&(this.resetState(i),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(i),this.resetUrlToCurrentUrlTree())}resetState(i){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,i.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(i,r){return this.canceledNavigationResolution==="computed"?{navigationId:i,\u0275routerPageId:r}:{navigationId:i}}};t.\u0275fac=(()=>{let i;return function(s){return(i||(i=he(t)))(s||t)}})(),t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Vl=function(n){return n[n.COMPLETE=0]="COMPLETE",n[n.FAILED=1]="FAILED",n[n.REDIRECTING=2]="REDIRECTING",n}(Vl||{});function K3(n,t){n.events.pipe(qt(e=>e instanceof Ki||e instanceof ss||e instanceof Wl||e instanceof os),de(e=>e instanceof Ki||e instanceof os?Vl.COMPLETE:(e instanceof ss?e.code===Un.Redirect||e.code===Un.SupersededByNewNavigation:!1)?Vl.REDIRECTING:Vl.FAILED),qt(e=>e!==Vl.REDIRECTING),ui(1)).subscribe(()=>{t()})}function CW(n){throw n}var EW={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},DW={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Zt=(()=>{let t=class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.isNgZoneEnabled=!1,this.console=B(Yu),this.stateManager=B(G3),this.options=B(nc,{optional:!0})||{},this.pendingTasks=B(Mr),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=B(a_),this.urlSerializer=B(Jl),this.location=B(Uo),this.urlHandlingStrategy=B(o_),this._events=new Be,this.errorHandler=this.options.errorHandler||CW,this.navigated=!1,this.routeReuseStrategy=B(wW),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=B(uf,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!B(hf,{optional:!0}),this.eventsSubscription=new Tt,this.isNgZoneEnabled=B(se)instanceof se&&se.isInAngularZone(),this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:i=>{this.console.warn(i)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let i=this.navigationTransitions.events.subscribe(r=>{try{let s=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(s!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof ss&&r.code!==Un.Redirect&&r.code!==Un.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof Ki)this.navigated=!0;else if(r instanceof Gl){let a=this.urlHandlingStrategy.merge(r.url,s.currentRawUrl),l={info:s.extras.info,skipLocationChange:s.extras.skipLocationChange,replaceUrl:this.urlUpdateStrategy==="eager"||yW(s.source)};this.scheduleNavigation(a,Ul,null,l,{resolve:s.resolve,reject:s.reject,promise:s.promise})}}kW(r)&&this._events.next(r)}catch(s){this.navigationTransitions.transitionAbortSubject.next(s)}});this.eventsSubscription.add(i)}resetRootComponentType(i){this.routerState.root.component=i,this.navigationTransitions.rootComponentType=i}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),Ul,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((i,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(i,"popstate",r)},0)})}navigateToSyncWithBrowser(i,r,s){let o={replaceUrl:!0},a=s?.navigationId?s:null;if(s){let c=P({},s);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let l=this.parseUrl(i);this.scheduleNavigation(l,r,a,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(i){this.config=i.map(i_),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(i,r={}){let{relativeTo:s,queryParams:o,fragment:a,queryParamsHandling:l,preserveFragment:c}=r,d=c?this.currentUrlTree.fragment:a,f=null;switch(l){case"merge":f=P(P({},this.currentUrlTree.queryParams),o);break;case"preserve":f=this.currentUrlTree.queryParams;break;default:f=o||null}f!==null&&(f=this.removeEmptyProps(f));let _;try{let y=s?s.snapshot:this.routerState.snapshot.root;_=S3(y)}catch{(typeof i[0]!="string"||!i[0].startsWith("/"))&&(i=[]),_=this.currentUrlTree.root}return T3(_,i,f,d??null)}navigateByUrl(i,r={skipLocationChange:!1}){let s=wa(i)?i:this.parseUrl(i),o=this.urlHandlingStrategy.merge(s,this.rawUrlTree);return this.scheduleNavigation(o,Ul,null,r)}navigate(i,r={skipLocationChange:!1}){return IW(i),this.navigateByUrl(this.createUrlTree(i,r),r)}serializeUrl(i){return this.urlSerializer.serialize(i)}parseUrl(i){try{return this.urlSerializer.parse(i)}catch{return this.urlSerializer.parse("/")}}isActive(i,r){let s;if(r===!0?s=P({},EW):r===!1?s=P({},DW):s=r,wa(i))return u3(this.currentUrlTree,i,s);let o=this.parseUrl(i);return u3(this.currentUrlTree,o,s)}removeEmptyProps(i){return Object.entries(i).reduce((r,[s,o])=>(o!=null&&(r[s]=o),r),{})}scheduleNavigation(i,r,s,o,a){if(this.disposed)return Promise.resolve(!1);let l,c,d;a?(l=a.resolve,c=a.reject,d=a.promise):d=new Promise((_,y)=>{l=_,c=y});let f=this.pendingTasks.add();return K3(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(f))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:s,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:i,extras:o,resolve:l,reject:c,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(_=>Promise.reject(_))}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function IW(n){for(let t=0;t{let t=class t{constructor(i,r,s,o,a,l){this.router=i,this.route=r,this.tabIndexAttribute=s,this.renderer=o,this.el=a,this.locationStrategy=l,this.href=null,this.commands=null,this.onChanges=new Be,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let c=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area",this.isAnchorElement?this.subscription=i.events.subscribe(d=>{d instanceof Ki&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(i){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",i)}ngOnChanges(i){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(i){i!=null?(this.commands=Array.isArray(i)?i:[i],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(i,r,s,o,a){let l=this.urlTree;if(l===null||this.isAnchorElement&&(i!==0||r||s||o||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(l,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let i=this.urlTree;this.href=i!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(i)):null;let r=this.href===null?null:Cw(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",r)}applyAttributeValue(i,r){let s=this.renderer,o=this.el.nativeElement;r!==null?s.setAttribute(o,i,r):s.removeAttribute(o,i)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};t.\u0275fac=function(r){return new(r||t)(v(Zt),v(to),Vm("tabindex"),v(et),v(De),v(ur))},t.\u0275dir=Ge({type:t,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(r,s){r&1&&k("click",function(a){return s.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),r&2&&w("target",s.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[I.HasDecoratorInputTransform,"preserveFragment","preserveFragment",A],skipLocationChange:[I.HasDecoratorInputTransform,"skipLocationChange","skipLocationChange",A],replaceUrl:[I.HasDecoratorInputTransform,"replaceUrl","replaceUrl",A],routerLink:"routerLink"},standalone:!0,features:[Ie,at]});let n=t;return n})();var df=class{};var SW=(()=>{let t=class t{constructor(i,r,s,o,a){this.router=i,this.injector=s,this.preloadingStrategy=o,this.loader=a}setUpPreloading(){this.subscription=this.router.events.pipe(qt(i=>i instanceof Ki),zn(()=>this.preload())).subscribe(()=>{})}preload(){return this.processRoutes(this.injector,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(i,r){let s=[];for(let o of r){o.providers&&!o._injector&&(o._injector=Ku(o.providers,i,`Route: ${o.path}`));let a=o._injector??i,l=o._loadedInjector??a;(o.loadChildren&&!o._loadedRoutes&&o.canLoad===void 0||o.loadComponent&&!o._loadedComponent)&&s.push(this.preloadConfig(a,o)),(o.children||o._loadedRoutes)&&s.push(this.processRoutes(l,o.children??o._loadedRoutes))}return Xe(s).pipe(go())}preloadConfig(i,r){return this.preloadingStrategy.preload(r,()=>{let s;r.loadChildren&&r.canLoad===void 0?s=this.loader.loadChildren(i,r):s=le(null);let o=s.pipe(kt(a=>a===null?le(void 0):(r._loadedRoutes=a.routes,r._loadedInjector=a.injector,this.processRoutes(a.injector??i,a.routes))));if(r.loadComponent&&!r._loadedComponent){let a=this.loader.loadComponent(r);return Xe([o,a]).pipe(go())}else return o})}};t.\u0275fac=function(r){return new(r||t)(z(Zt),z(nd),z(rn),z(df),z(s_))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Q3=new X(""),TW=(()=>{let t=class t{constructor(i,r,s,o,a={}){this.urlSerializer=i,this.transitions=r,this.viewportScroller=s,this.zone=o,this.options=a,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},this.environmentInjector=B(rn),a.scrollPositionRestoration||="disabled",a.anchorScrolling||="disabled"}init(){this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.transitions.events.subscribe(i=>{i instanceof va?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=i.navigationTrigger,this.restoredId=i.restoredState?i.restoredState.navigationId:0):i instanceof Ki?(this.lastId=i.id,this.scheduleScrollEvent(i,this.urlSerializer.parse(i.urlAfterRedirects).fragment)):i instanceof os&&i.code===tf.IgnoredSameUrlNavigation&&(this.lastSource=void 0,this.restoredId=0,this.scheduleScrollEvent(i,this.urlSerializer.parse(i.url).fragment))})}consumeScrollEvents(){return this.transitions.events.subscribe(i=>{i instanceof rf&&(i.position?this.options.scrollPositionRestoration==="top"?this.viewportScroller.scrollToPosition([0,0]):this.options.scrollPositionRestoration==="enabled"&&this.viewportScroller.scrollToPosition(i.position):i.anchor&&this.options.anchorScrolling==="enabled"?this.viewportScroller.scrollToAnchor(i.anchor):this.options.scrollPositionRestoration!=="disabled"&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(i,r){this.zone.runOutsideAngular(()=>T(this,null,function*(){yield new Promise(s=>{setTimeout(()=>{s()}),Gu(()=>{s()},{injector:this.environmentInjector})}),this.zone.run(()=>{this.transitions.events.next(new rf(i,this.lastSource==="popstate"?this.store[this.restoredId]:null,r))})}))}ngOnDestroy(){this.routerEventsSubscription?.unsubscribe(),this.scrollEventsSubscription?.unsubscribe()}};t.\u0275fac=function(r){Rw()},t.\u0275prov=H({token:t,factory:t.\u0275fac});let n=t;return n})();function NW(n){return n.routerState.root}function ic(n,t){return{\u0275kind:n,\u0275providers:t}}function xW(){let n=B(Kt);return t=>{let e=n.get(Ns);if(t!==e.components[0])return;let i=n.get(Zt),r=n.get(Z3);n.get(l_)===1&&i.initialNavigation(),n.get(Y3,null,ze.Optional)?.setUpPreloading(),n.get(Q3,null,ze.Optional)?.init(),i.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var Z3=new X("",{factory:()=>new Be}),l_=new X("",{providedIn:"root",factory:()=>1});function AW(){return ic(2,[{provide:l_,useValue:0},{provide:ed,multi:!0,deps:[Kt],useFactory:t=>{let e=t.get(eb,Promise.resolve());return()=>e.then(()=>new Promise(i=>{let r=t.get(Zt),s=t.get(Z3);K3(r,()=>{i(!0)}),t.get(a_).afterPreactivation=()=>(i(!0),s.closed?le(void 0):s),r.initialNavigation()}))}}])}function MW(){return ic(3,[{provide:ed,multi:!0,useFactory:()=>{let t=B(Zt);return()=>{t.setUpLocationChangeListener()}}},{provide:l_,useValue:2}])}var Y3=new X("");function OW(n){return ic(0,[{provide:Y3,useExisting:SW},{provide:df,useExisting:n}])}function PW(){return ic(8,[p3,{provide:hf,useExisting:p3}])}function RW(n){let t=[{provide:W3,useValue:FW},{provide:q3,useValue:P({skipNextTransition:!!n?.skipInitialTransition},n)}];return ic(9,t)}var g3=new X("ROUTER_FORROOT_GUARD"),LW=[Uo,{provide:Jl,useClass:zl},Zt,Xl,{provide:to,useFactory:NW,deps:[Zt]},s_,[]],c_=(()=>{let t=class t{constructor(i){}static forRoot(i,r){return{ngModule:t,providers:[LW,[],{provide:uf,multi:!0,useValue:i},{provide:g3,useFactory:UW,deps:[[Zt,new qn,new Eu]]},{provide:nc,useValue:r||{}},r?.useHash?VW():jW(),BW(),r?.preloadingStrategy?OW(r.preloadingStrategy).\u0275providers:[],r?.initialNavigation?HW(r):[],r?.bindToComponentInputs?PW().\u0275providers:[],r?.enableViewTransitions?RW().\u0275providers:[],zW()]}}static forChild(i){return{ngModule:t,providers:[{provide:uf,multi:!0,useValue:i}]}}};t.\u0275fac=function(r){return new(r||t)(z(g3,8))},t.\u0275mod=Q({type:t}),t.\u0275inj=K({});let n=t;return n})();function BW(){return{provide:Q3,useFactory:()=>{let n=B(ub),t=B(se),e=B(nc),i=B(a_),r=B(Jl);return e.scrollOffset&&n.setOffset(e.scrollOffset),new TW(r,i,n,t,e)}}}function VW(){return{provide:ur,useClass:nb}}function jW(){return{provide:ur,useClass:A1}}function UW(n){return"guarded"}function HW(n){return[n.initialNavigation==="disabled"?MW().\u0275providers:[],n.initialNavigation==="enabledBlocking"?AW().\u0275providers:[]]}var F3=new X("");function zW(){return[{provide:F3,useFactory:xW},{provide:td,multi:!0,useExisting:F3}]}var mf=n=>({active:n}),J3=(()=>{let t=class t{constructor(i,r,s){this.authService=i,this.router=r,this.userService=s,this.panelEvent=new R,this.panels={contacts:"contacts",groups:"groups",profile:"profile",search:"search",settings:"settings"},this.currentPanel=this.panels.contacts}ngOnInit(){this.currentUserSubscription=this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error(i)}})}logout(){this.authService.signOut()?.subscribe({next:()=>{this.userService.setCurrentUser({}),s3(!1,this.router,"/login")},error:i=>{console.error(i)}})}changePanel(i){this.currentPanel=i,this.panelEvent.emit(i)}ngOnDestroy(){this.currentUserSubscription.unsubscribe()}};t.\u0275fac=function(r){return new(r||t)(v(oi),v(Zt),v(Bt))},t.\u0275cmp=M({type:t,selectors:[["app-sidebar"]],outputs:{panelEvent:"panelEvent"},decls:18,vars:13,consts:[[1,"sidebar"],[1,"content"],["src","assets/img/logo.png","alt","",1,"logo"],[1,"menu"],[3,"click","ngClass"],[1,"pi","pi-comments"],[1,"pi","pi-users"],[1,"pi","pi-search"],[1,"setting"],[1,"profile",3,"click"],["alt","",3,"src"],[1,"pi","pi-cog"]],template:function(r,s){r&1&&(m(0,"div",0)(1,"div",1),b(2,"img",2),m(3,"ul",3)(4,"li")(5,"a",4),k("click",function(){return s.changePanel(s.panels.contacts)}),b(6,"i",5),g()(),m(7,"li")(8,"a",4),k("click",function(){return s.changePanel(s.panels.groups)}),b(9,"i",6),g()(),m(10,"li")(11,"a",4),k("click",function(){return s.changePanel(s.panels.search)}),b(12,"i",7),g()()()(),m(13,"div",8)(14,"a",9),k("click",function(){return s.changePanel(s.panels.profile)}),b(15,"img",10),g(),m(16,"a",4),k("click",function(){return s.logout()}),b(17,"i",11),g()()()),r&2&&(h(5),u("ngClass",ee(5,mf,s.currentPanel==s.panels.contacts)),h(3),u("ngClass",ee(7,mf,s.currentPanel==s.panels.groups)),h(3),u("ngClass",ee(9,mf,s.currentPanel==s.panels.search)),h(4),u("src",s.currentUser==null?null:s.currentUser.profilePicture,Fn),h(),u("ngClass",ee(11,mf,s.currentPanel==s.panels.settings)))},dependencies:[_e],styles:[".sidebar[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:0;gap:10px;width:80px;height:100%;background:#fff;box-shadow:0 1px 24px #000c}.sidebar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;padding:0;margin-top:49%;width:100%;height:100%}.sidebar[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:80%;height:auto;background:var(--primary-color);border-radius:14px;margin-bottom:3rem}.sidebar[_ngcontent-%COMP%] .menu[_ngcontent-%COMP%]{list-style:none;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:0;gap:42px;position:relative;top:2rem}.pi[_ngcontent-%COMP%]{font-size:2rem}.sidebar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--secondary-color)}.sidebar[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .active[_ngcontent-%COMP%]{text-decoration:none;color:var(--primary-color)!important;cursor:pointer}.sidebar[_ngcontent-%COMP%] .setting[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:2rem;margin-bottom:3rem}.sidebar[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%}.sidebar[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:100%;height:100%;background-size:cover;border-radius:50%}"]});let n=t;return n})();var no={sent:"SENT",read:"READ",delivered:"DELIVERED",deleted:"DELETED"};var X3=(()=>{let t=class t{constructor(i,r,s,o){this.webSocketService=i,this.authService=r,this.discussionService=s,this.userService=o,this.destroy$=new Be}connect(){this.webSocketService.initializeConnectionStateMonitoring(),this.webSocketService.getIsConnectionOpened().pipe($n(this.destroy$)).subscribe({next:i=>{i||(console.log("Connection has been closed. Reconnecting..."),this.webSocketService.connect(this.authService.getToken()))},error:i=>{console.error("Error while connecting to WebSocket:",i)}})}sendMessage(i){this.webSocketService.sendNewMessage(i)}sendUpdatedMessage(i){this.webSocketService.sendUpdatedMessage(i)}sendUpdateMessages(i){this.webSocketService.sendUpdateMessages(i)}listenForNewMessage(i){console.log("Listening for new messages"),this.listenSubscription=this.webSocketService.getIsConnectionOpened().pipe(de(r=>!r),He(()=>this.webSocketService.listenForNewMessage()),He(r=>this.userService.userInfoSubject$.getValue().id===r.receiverId&&r.status!==no.read?(r.status=no.read,r.discussionId=i.id,this.sendUpdatedMessage(r),this.discussionService.updateMessageStatus(i.id,r)):le(r)),$n(this.destroy$)).subscribe({next:r=>{let s=i.messages.findIndex(o=>o.id===r.id);s!==-1?(console.log("Updating message status"),i.messages[s]=r):i.messages.push(r)},error:r=>{console.error("Error receiving message:",r)}})}listenForListOfMessages(i){console.log("Listening for updated messages"),this.listenSubscription=this.webSocketService.getIsConnectionOpened().pipe(de(r=>!r),He(()=>this.webSocketService.listenForListOfMessages()),$n(this.destroy$)).subscribe({next:r=>{r.forEach(s=>{let o=i.messages.findIndex(a=>a.id===s.id);o!==-1&&(console.log("Updating message status"),i.messages[o]=s)})},error:r=>{console.error("Error receiving a list of messages:",r)}})}disconnect(){console.log("Disconnecting from WebSocket"),this.listenSubscription?.unsubscribe(),this.webSocketService.disconnect()}ngOnDestroy(){console.log("Destroying ChatService"),this.destroy$.next(),this.destroy$.complete(),this.disconnect()}};t.\u0275fac=function(r){return new(r||t)(z(Gh),z(oi),z(is),z(Bt))},t.\u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();var qW=["button"],e4=["*","*"];function GW(n,t){if(n&1&&V(0),n&2){let e=p(3);Ce(e.unified)}}function KW(n,t){if(n&1&&(m(0,"button",4,1)(2,"span",5),F(3,GW,1,1,"ng-template",2),gt(4),g()()),n&2){let e=p(2);Ct("emoji-mart-emoji-native",e.isNative)("emoji-mart-emoji-custom",e.custom),w("title",e.title)("aria-label",e.label),h(2),u("ngStyle",e.style),h(),u("ngIf",e.isNative)}}function QW(n,t){if(n&1&&F(0,KW,5,8,"button",3),n&2){let e=p(),i=st(2);u("ngIf",e.useButton)("ngIfElse",i)}}function ZW(n,t){if(n&1&&V(0),n&2){let e=p(2);Ce(e.unified)}}function YW(n,t){if(n&1&&(m(0,"span",6,1)(2,"span",5),F(3,ZW,1,1,"ng-template",2),gt(4,1),g()()),n&2){let e=p();Ct("emoji-mart-emoji-native",e.isNative)("emoji-mart-emoji-custom",e.custom),w("title",e.title)("aria-label",e.label),h(2),u("ngStyle",e.style),h(),u("ngIf",e.isNative)}}var u_=[{id:"people",name:"Smileys & People",emojis:["1F600","1F603","1F604","1F601","1F606","1F605","1F923","1F602","1F642","1F643","1FAE0","1F609","1F60A","1F607","1F970","1F60D","1F929","1F618","1F617","263A-FE0F","1F61A","1F619","1F972","1F60B","1F61B","1F61C","1F92A","1F61D","1F911","1F917","1F92D","1FAE2","1FAE3","1F92B","1F914","1FAE1","1F910","1F928","1F610","1F611","1F636","1FAE5","1F636-200D-1F32B-FE0F","1F60F","1F612","1F644","1F62C","1F62E-200D-1F4A8","1F925","1F60C","1F614","1F62A","1F924","1F634","1F637","1F912","1F915","1F922","1F92E","1F927","1F975","1F976","1F974","1F635","1F635-200D-1F4AB","1F92F","1F920","1F973","1F978","1F60E","1F913","1F9D0","1F615","1FAE4","1F61F","1F641","2639-FE0F","1F62E","1F62F","1F632","1F633","1F97A","1F979","1F626","1F627","1F628","1F630","1F625","1F622","1F62D","1F631","1F616","1F623","1F61E","1F613","1F629","1F62B","1F971","1F624","1F621","1F620","1F92C","1F608","1F47F","1F480","2620-FE0F","1F4A9","1F921","1F479","1F47A","1F47B","1F47D","1F47E","1F916","1F44B","1F91A","1F590-FE0F","270B","1F596","1FAF1","1FAF2","1FAF3","1FAF4","1F44C","1F90C","1F90F","270C-FE0F","1F91E","1FAF0","1F91F","1F918","1F919","1F448","1F449","1F446","1F595","1F447","261D-FE0F","1FAF5","1F44D","1F44E","270A","1F44A","1F91B","1F91C","1F44F","1F64C","1FAF6","1F450","1F932","1F91D","1F64F","270D-FE0F","1F485","1F933","1F4AA","1F9BE","1F9BF","1F9B5","1F9B6","1F442","1F9BB","1F443","1F9E0","1FAC0","1FAC1","1F9B7","1F9B4","1F440","1F441-FE0F","1F445","1F444","1FAE6","1F476","1F9D2","1F466","1F467","1F9D1","1F471","1F468","1F9D4","1F9D4-200D-2642-FE0F","1F9D4-200D-2640-FE0F","1F468-200D-1F9B0","1F468-200D-1F9B1","1F468-200D-1F9B3","1F468-200D-1F9B2","1F469","1F469-200D-1F9B0","1F9D1-200D-1F9B0","1F469-200D-1F9B1","1F9D1-200D-1F9B1","1F469-200D-1F9B3","1F9D1-200D-1F9B3","1F469-200D-1F9B2","1F9D1-200D-1F9B2","1F471-200D-2640-FE0F","1F471-200D-2642-FE0F","1F9D3","1F474","1F475","1F64D","1F64D-200D-2642-FE0F","1F64D-200D-2640-FE0F","1F64E","1F64E-200D-2642-FE0F","1F64E-200D-2640-FE0F","1F645","1F645-200D-2642-FE0F","1F645-200D-2640-FE0F","1F646","1F646-200D-2642-FE0F","1F646-200D-2640-FE0F","1F481","1F481-200D-2642-FE0F","1F481-200D-2640-FE0F","1F64B","1F64B-200D-2642-FE0F","1F64B-200D-2640-FE0F","1F9CF","1F9CF-200D-2642-FE0F","1F9CF-200D-2640-FE0F","1F647","1F647-200D-2642-FE0F","1F647-200D-2640-FE0F","1F926","1F926-200D-2642-FE0F","1F926-200D-2640-FE0F","1F937","1F937-200D-2642-FE0F","1F937-200D-2640-FE0F","1F9D1-200D-2695-FE0F","1F468-200D-2695-FE0F","1F469-200D-2695-FE0F","1F9D1-200D-1F393","1F468-200D-1F393","1F469-200D-1F393","1F9D1-200D-1F3EB","1F468-200D-1F3EB","1F469-200D-1F3EB","1F9D1-200D-2696-FE0F","1F468-200D-2696-FE0F","1F469-200D-2696-FE0F","1F9D1-200D-1F33E","1F468-200D-1F33E","1F469-200D-1F33E","1F9D1-200D-1F373","1F468-200D-1F373","1F469-200D-1F373","1F9D1-200D-1F527","1F468-200D-1F527","1F469-200D-1F527","1F9D1-200D-1F3ED","1F468-200D-1F3ED","1F469-200D-1F3ED","1F9D1-200D-1F4BC","1F468-200D-1F4BC","1F469-200D-1F4BC","1F9D1-200D-1F52C","1F468-200D-1F52C","1F469-200D-1F52C","1F9D1-200D-1F4BB","1F468-200D-1F4BB","1F469-200D-1F4BB","1F9D1-200D-1F3A4","1F468-200D-1F3A4","1F469-200D-1F3A4","1F9D1-200D-1F3A8","1F468-200D-1F3A8","1F469-200D-1F3A8","1F9D1-200D-2708-FE0F","1F468-200D-2708-FE0F","1F469-200D-2708-FE0F","1F9D1-200D-1F680","1F468-200D-1F680","1F469-200D-1F680","1F9D1-200D-1F692","1F468-200D-1F692","1F469-200D-1F692","1F46E","1F46E-200D-2642-FE0F","1F46E-200D-2640-FE0F","1F575-FE0F","1F575-FE0F-200D-2642-FE0F","1F575-FE0F-200D-2640-FE0F","1F482","1F482-200D-2642-FE0F","1F482-200D-2640-FE0F","1F977","1F477","1F477-200D-2642-FE0F","1F477-200D-2640-FE0F","1FAC5","1F934","1F478","1F473","1F473-200D-2642-FE0F","1F473-200D-2640-FE0F","1F472","1F9D5","1F935","1F935-200D-2642-FE0F","1F935-200D-2640-FE0F","1F470","1F470-200D-2642-FE0F","1F470-200D-2640-FE0F","1F930","1FAC3","1FAC4","1F931","1F469-200D-1F37C","1F468-200D-1F37C","1F9D1-200D-1F37C","1F47C","1F385","1F936","1F9D1-200D-1F384","1F9B8","1F9B8-200D-2642-FE0F","1F9B8-200D-2640-FE0F","1F9B9","1F9B9-200D-2642-FE0F","1F9B9-200D-2640-FE0F","1F9D9","1F9D9-200D-2642-FE0F","1F9D9-200D-2640-FE0F","1F9DA","1F9DA-200D-2642-FE0F","1F9DA-200D-2640-FE0F","1F9DB","1F9DB-200D-2642-FE0F","1F9DB-200D-2640-FE0F","1F9DC","1F9DC-200D-2642-FE0F","1F9DC-200D-2640-FE0F","1F9DD","1F9DD-200D-2642-FE0F","1F9DD-200D-2640-FE0F","1F9DE","1F9DE-200D-2642-FE0F","1F9DE-200D-2640-FE0F","1F9DF","1F9DF-200D-2642-FE0F","1F9DF-200D-2640-FE0F","1F9CC","1F486","1F486-200D-2642-FE0F","1F486-200D-2640-FE0F","1F487","1F487-200D-2642-FE0F","1F487-200D-2640-FE0F","1F6B6","1F6B6-200D-2642-FE0F","1F6B6-200D-2640-FE0F","1F9CD","1F9CD-200D-2642-FE0F","1F9CD-200D-2640-FE0F","1F9CE","1F9CE-200D-2642-FE0F","1F9CE-200D-2640-FE0F","1F9D1-200D-1F9AF","1F468-200D-1F9AF","1F469-200D-1F9AF","1F9D1-200D-1F9BC","1F468-200D-1F9BC","1F469-200D-1F9BC","1F9D1-200D-1F9BD","1F468-200D-1F9BD","1F469-200D-1F9BD","1F3C3","1F3C3-200D-2642-FE0F","1F3C3-200D-2640-FE0F","1F483","1F57A","1F574-FE0F","1F46F","1F46F-200D-2642-FE0F","1F46F-200D-2640-FE0F","1F9D6","1F9D6-200D-2642-FE0F","1F9D6-200D-2640-FE0F","1F9D7","1F9D7-200D-2642-FE0F","1F9D7-200D-2640-FE0F","1F93A","1F3C7","26F7-FE0F","1F3C2","1F3CC-FE0F","1F3CC-FE0F-200D-2642-FE0F","1F3CC-FE0F-200D-2640-FE0F","1F3C4","1F3C4-200D-2642-FE0F","1F3C4-200D-2640-FE0F","1F6A3","1F6A3-200D-2642-FE0F","1F6A3-200D-2640-FE0F","1F3CA","1F3CA-200D-2642-FE0F","1F3CA-200D-2640-FE0F","26F9-FE0F","26F9-FE0F-200D-2642-FE0F","26F9-FE0F-200D-2640-FE0F","1F3CB-FE0F","1F3CB-FE0F-200D-2642-FE0F","1F3CB-FE0F-200D-2640-FE0F","1F6B4","1F6B4-200D-2642-FE0F","1F6B4-200D-2640-FE0F","1F6B5","1F6B5-200D-2642-FE0F","1F6B5-200D-2640-FE0F","1F938","1F938-200D-2642-FE0F","1F938-200D-2640-FE0F","1F93C","1F93C-200D-2642-FE0F","1F93C-200D-2640-FE0F","1F93D","1F93D-200D-2642-FE0F","1F93D-200D-2640-FE0F","1F93E","1F93E-200D-2642-FE0F","1F93E-200D-2640-FE0F","1F939","1F939-200D-2642-FE0F","1F939-200D-2640-FE0F","1F9D8","1F9D8-200D-2642-FE0F","1F9D8-200D-2640-FE0F","1F6C0","1F6CC","1F9D1-200D-1F91D-200D-1F9D1","1F46D","1F46B","1F46C","1F48F","1F469-200D-2764-FE0F-200D-1F48B-200D-1F468","1F468-200D-2764-FE0F-200D-1F48B-200D-1F468","1F469-200D-2764-FE0F-200D-1F48B-200D-1F469","1F491","1F469-200D-2764-FE0F-200D-1F468","1F468-200D-2764-FE0F-200D-1F468","1F469-200D-2764-FE0F-200D-1F469","1F46A","1F468-200D-1F469-200D-1F466","1F468-200D-1F469-200D-1F467","1F468-200D-1F469-200D-1F467-200D-1F466","1F468-200D-1F469-200D-1F466-200D-1F466","1F468-200D-1F469-200D-1F467-200D-1F467","1F468-200D-1F468-200D-1F466","1F468-200D-1F468-200D-1F467","1F468-200D-1F468-200D-1F467-200D-1F466","1F468-200D-1F468-200D-1F466-200D-1F466","1F468-200D-1F468-200D-1F467-200D-1F467","1F469-200D-1F469-200D-1F466","1F469-200D-1F469-200D-1F467","1F469-200D-1F469-200D-1F467-200D-1F466","1F469-200D-1F469-200D-1F466-200D-1F466","1F469-200D-1F469-200D-1F467-200D-1F467","1F468-200D-1F466","1F468-200D-1F466-200D-1F466","1F468-200D-1F467","1F468-200D-1F467-200D-1F466","1F468-200D-1F467-200D-1F467","1F469-200D-1F466","1F469-200D-1F466-200D-1F466","1F469-200D-1F467","1F469-200D-1F467-200D-1F466","1F469-200D-1F467-200D-1F467","1F5E3-FE0F","1F464","1F465","1FAC2","1F463","1F63A","1F638","1F639","1F63B","1F63C","1F63D","1F640","1F63F","1F63E","1F648","1F649","1F64A","1F48B","1F48C","1F498","1F49D","1F496","1F497","1F493","1F49E","1F495","1F49F","2763-FE0F","1F494","2764-FE0F-200D-1F525","2764-FE0F-200D-1FA79","2764-FE0F","1F9E1","1F49B","1F49A","1F499","1F49C","1F90E","1F5A4","1F90D","1F4AF","1F4A2","1F4A5","1F4AB","1F4A6","1F4A8","1F573-FE0F","1F4A3","1F4AC","1F441-FE0F-200D-1F5E8-FE0F","1F5E8-FE0F","1F5EF-FE0F","1F4AD","1F4A4"]},{id:"nature",name:"Animals & Nature",emojis:["1F435","1F412","1F98D","1F9A7","1F436","1F415","1F9AE","1F415-200D-1F9BA","1F429","1F43A","1F98A","1F99D","1F431","1F408","1F408-200D-2B1B","1F981","1F42F","1F405","1F406","1F434","1F40E","1F984","1F993","1F98C","1F9AC","1F42E","1F402","1F403","1F404","1F437","1F416","1F417","1F43D","1F40F","1F411","1F410","1F42A","1F42B","1F999","1F992","1F418","1F9A3","1F98F","1F99B","1F42D","1F401","1F400","1F439","1F430","1F407","1F43F-FE0F","1F9AB","1F994","1F987","1F43B","1F43B-200D-2744-FE0F","1F428","1F43C","1F9A5","1F9A6","1F9A8","1F998","1F9A1","1F43E","1F983","1F414","1F413","1F423","1F424","1F425","1F426","1F427","1F54A-FE0F","1F985","1F986","1F9A2","1F989","1F9A4","1FAB6","1F9A9","1F99A","1F99C","1F438","1F40A","1F422","1F98E","1F40D","1F432","1F409","1F995","1F996","1F433","1F40B","1F42C","1F9AD","1F41F","1F420","1F421","1F988","1F419","1F41A","1FAB8","1F40C","1F98B","1F41B","1F41C","1F41D","1FAB2","1F41E","1F997","1FAB3","1F577-FE0F","1F578-FE0F","1F982","1F99F","1FAB0","1FAB1","1F9A0","1F490","1F338","1F4AE","1FAB7","1F3F5-FE0F","1F339","1F940","1F33A","1F33B","1F33C","1F337","1F331","1FAB4","1F332","1F333","1F334","1F335","1F33E","1F33F","2618-FE0F","1F340","1F341","1F342","1F343","1FAB9","1FABA"]},{id:"foods",name:"Food & Drink",emojis:["1F347","1F348","1F349","1F34A","1F34B","1F34C","1F34D","1F96D","1F34E","1F34F","1F350","1F351","1F352","1F353","1FAD0","1F95D","1F345","1FAD2","1F965","1F951","1F346","1F954","1F955","1F33D","1F336-FE0F","1FAD1","1F952","1F96C","1F966","1F9C4","1F9C5","1F344","1F95C","1FAD8","1F330","1F35E","1F950","1F956","1FAD3","1F968","1F96F","1F95E","1F9C7","1F9C0","1F356","1F357","1F969","1F953","1F354","1F35F","1F355","1F32D","1F96A","1F32E","1F32F","1FAD4","1F959","1F9C6","1F95A","1F373","1F958","1F372","1FAD5","1F963","1F957","1F37F","1F9C8","1F9C2","1F96B","1F371","1F358","1F359","1F35A","1F35B","1F35C","1F35D","1F360","1F362","1F363","1F364","1F365","1F96E","1F361","1F95F","1F960","1F961","1F980","1F99E","1F990","1F991","1F9AA","1F366","1F367","1F368","1F369","1F36A","1F382","1F370","1F9C1","1F967","1F36B","1F36C","1F36D","1F36E","1F36F","1F37C","1F95B","2615","1FAD6","1F375","1F376","1F37E","1F377","1F378","1F379","1F37A","1F37B","1F942","1F943","1FAD7","1F964","1F9CB","1F9C3","1F9C9","1F9CA","1F962","1F37D-FE0F","1F374","1F944","1F52A","1FAD9","1F3FA"]},{id:"activity",name:"Activities",emojis:["1F383","1F384","1F386","1F387","1F9E8","2728","1F388","1F389","1F38A","1F38B","1F38D","1F38E","1F38F","1F390","1F391","1F9E7","1F380","1F381","1F397-FE0F","1F39F-FE0F","1F3AB","1F396-FE0F","1F3C6","1F3C5","1F947","1F948","1F949","26BD","26BE","1F94E","1F3C0","1F3D0","1F3C8","1F3C9","1F3BE","1F94F","1F3B3","1F3CF","1F3D1","1F3D2","1F94D","1F3D3","1F3F8","1F94A","1F94B","1F945","26F3","26F8-FE0F","1F3A3","1F93F","1F3BD","1F3BF","1F6F7","1F94C","1F3AF","1FA80","1FA81","1F3B1","1F52E","1FA84","1F9FF","1FAAC","1F3AE","1F579-FE0F","1F3B0","1F3B2","1F9E9","1F9F8","1FA85","1FAA9","1FA86","2660-FE0F","2665-FE0F","2666-FE0F","2663-FE0F","265F-FE0F","1F0CF","1F004","1F3B4","1F3AD","1F5BC-FE0F","1F3A8","1F9F5","1FAA1","1F9F6","1FAA2"]},{id:"places",name:"Travel & Places",emojis:["1F30D","1F30E","1F30F","1F310","1F5FA-FE0F","1F5FE","1F9ED","1F3D4-FE0F","26F0-FE0F","1F30B","1F5FB","1F3D5-FE0F","1F3D6-FE0F","1F3DC-FE0F","1F3DD-FE0F","1F3DE-FE0F","1F3DF-FE0F","1F3DB-FE0F","1F3D7-FE0F","1F9F1","1FAA8","1FAB5","1F6D6","1F3D8-FE0F","1F3DA-FE0F","1F3E0","1F3E1","1F3E2","1F3E3","1F3E4","1F3E5","1F3E6","1F3E8","1F3E9","1F3EA","1F3EB","1F3EC","1F3ED","1F3EF","1F3F0","1F492","1F5FC","1F5FD","26EA","1F54C","1F6D5","1F54D","26E9-FE0F","1F54B","26F2","26FA","1F301","1F303","1F3D9-FE0F","1F304","1F305","1F306","1F307","1F309","2668-FE0F","1F3A0","1F6DD","1F3A1","1F3A2","1F488","1F3AA","1F682","1F683","1F684","1F685","1F686","1F687","1F688","1F689","1F68A","1F69D","1F69E","1F68B","1F68C","1F68D","1F68E","1F690","1F691","1F692","1F693","1F694","1F695","1F696","1F697","1F698","1F699","1F6FB","1F69A","1F69B","1F69C","1F3CE-FE0F","1F3CD-FE0F","1F6F5","1F9BD","1F9BC","1F6FA","1F6B2","1F6F4","1F6F9","1F6FC","1F68F","1F6E3-FE0F","1F6E4-FE0F","1F6E2-FE0F","26FD","1F6DE","1F6A8","1F6A5","1F6A6","1F6D1","1F6A7","2693","1F6DF","26F5","1F6F6","1F6A4","1F6F3-FE0F","26F4-FE0F","1F6E5-FE0F","1F6A2","2708-FE0F","1F6E9-FE0F","1F6EB","1F6EC","1FA82","1F4BA","1F681","1F69F","1F6A0","1F6A1","1F6F0-FE0F","1F680","1F6F8","1F6CE-FE0F","1F9F3","231B","23F3","231A","23F0","23F1-FE0F","23F2-FE0F","1F570-FE0F","1F55B","1F567","1F550","1F55C","1F551","1F55D","1F552","1F55E","1F553","1F55F","1F554","1F560","1F555","1F561","1F556","1F562","1F557","1F563","1F558","1F564","1F559","1F565","1F55A","1F566","1F311","1F312","1F313","1F314","1F315","1F316","1F317","1F318","1F319","1F31A","1F31B","1F31C","1F321-FE0F","2600-FE0F","1F31D","1F31E","1FA90","2B50","1F31F","1F320","1F30C","2601-FE0F","26C5","26C8-FE0F","1F324-FE0F","1F325-FE0F","1F326-FE0F","1F327-FE0F","1F328-FE0F","1F329-FE0F","1F32A-FE0F","1F32B-FE0F","1F32C-FE0F","1F300","1F308","1F302","2602-FE0F","2614","26F1-FE0F","26A1","2744-FE0F","2603-FE0F","26C4","2604-FE0F","1F525","1F4A7","1F30A"]},{id:"objects",name:"Objects",emojis:["1F453","1F576-FE0F","1F97D","1F97C","1F9BA","1F454","1F455","1F456","1F9E3","1F9E4","1F9E5","1F9E6","1F457","1F458","1F97B","1FA71","1FA72","1FA73","1F459","1F45A","1F45B","1F45C","1F45D","1F6CD-FE0F","1F392","1FA74","1F45E","1F45F","1F97E","1F97F","1F460","1F461","1FA70","1F462","1F451","1F452","1F3A9","1F393","1F9E2","1FA96","26D1-FE0F","1F4FF","1F484","1F48D","1F48E","1F507","1F508","1F509","1F50A","1F4E2","1F4E3","1F4EF","1F514","1F515","1F3BC","1F3B5","1F3B6","1F399-FE0F","1F39A-FE0F","1F39B-FE0F","1F3A4","1F3A7","1F4FB","1F3B7","1FA97","1F3B8","1F3B9","1F3BA","1F3BB","1FA95","1F941","1FA98","1F4F1","1F4F2","260E-FE0F","1F4DE","1F4DF","1F4E0","1F50B","1FAAB","1F50C","1F4BB","1F5A5-FE0F","1F5A8-FE0F","2328-FE0F","1F5B1-FE0F","1F5B2-FE0F","1F4BD","1F4BE","1F4BF","1F4C0","1F9EE","1F3A5","1F39E-FE0F","1F4FD-FE0F","1F3AC","1F4FA","1F4F7","1F4F8","1F4F9","1F4FC","1F50D","1F50E","1F56F-FE0F","1F4A1","1F526","1F3EE","1FA94","1F4D4","1F4D5","1F4D6","1F4D7","1F4D8","1F4D9","1F4DA","1F4D3","1F4D2","1F4C3","1F4DC","1F4C4","1F4F0","1F5DE-FE0F","1F4D1","1F516","1F3F7-FE0F","1F4B0","1FA99","1F4B4","1F4B5","1F4B6","1F4B7","1F4B8","1F4B3","1F9FE","1F4B9","2709-FE0F","1F4E7","1F4E8","1F4E9","1F4E4","1F4E5","1F4E6","1F4EB","1F4EA","1F4EC","1F4ED","1F4EE","1F5F3-FE0F","270F-FE0F","2712-FE0F","1F58B-FE0F","1F58A-FE0F","1F58C-FE0F","1F58D-FE0F","1F4DD","1F4BC","1F4C1","1F4C2","1F5C2-FE0F","1F4C5","1F4C6","1F5D2-FE0F","1F5D3-FE0F","1F4C7","1F4C8","1F4C9","1F4CA","1F4CB","1F4CC","1F4CD","1F4CE","1F587-FE0F","1F4CF","1F4D0","2702-FE0F","1F5C3-FE0F","1F5C4-FE0F","1F5D1-FE0F","1F512","1F513","1F50F","1F510","1F511","1F5DD-FE0F","1F528","1FA93","26CF-FE0F","2692-FE0F","1F6E0-FE0F","1F5E1-FE0F","2694-FE0F","1F52B","1FA83","1F3F9","1F6E1-FE0F","1FA9A","1F527","1FA9B","1F529","2699-FE0F","1F5DC-FE0F","2696-FE0F","1F9AF","1F517","26D3-FE0F","1FA9D","1F9F0","1F9F2","1FA9C","2697-FE0F","1F9EA","1F9EB","1F9EC","1F52C","1F52D","1F4E1","1F489","1FA78","1F48A","1FA79","1FA7C","1FA7A","1FA7B","1F6AA","1F6D7","1FA9E","1FA9F","1F6CF-FE0F","1F6CB-FE0F","1FA91","1F6BD","1FAA0","1F6BF","1F6C1","1FAA4","1FA92","1F9F4","1F9F7","1F9F9","1F9FA","1F9FB","1FAA3","1F9FC","1FAE7","1FAA5","1F9FD","1F9EF","1F6D2","1F6AC","26B0-FE0F","1FAA6","26B1-FE0F","1F5FF","1FAA7","1FAAA"]},{id:"symbols",name:"Symbols",emojis:["1F3E7","1F6AE","1F6B0","267F","1F6B9","1F6BA","1F6BB","1F6BC","1F6BE","1F6C2","1F6C3","1F6C4","1F6C5","26A0-FE0F","1F6B8","26D4","1F6AB","1F6B3","1F6AD","1F6AF","1F6B1","1F6B7","1F4F5","1F51E","2622-FE0F","2623-FE0F","2B06-FE0F","2197-FE0F","27A1-FE0F","2198-FE0F","2B07-FE0F","2199-FE0F","2B05-FE0F","2196-FE0F","2195-FE0F","2194-FE0F","21A9-FE0F","21AA-FE0F","2934-FE0F","2935-FE0F","1F503","1F504","1F519","1F51A","1F51B","1F51C","1F51D","1F6D0","269B-FE0F","1F549-FE0F","2721-FE0F","2638-FE0F","262F-FE0F","271D-FE0F","2626-FE0F","262A-FE0F","262E-FE0F","1F54E","1F52F","2648","2649","264A","264B","264C","264D","264E","264F","2650","2651","2652","2653","26CE","1F500","1F501","1F502","25B6-FE0F","23E9","23ED-FE0F","23EF-FE0F","25C0-FE0F","23EA","23EE-FE0F","1F53C","23EB","1F53D","23EC","23F8-FE0F","23F9-FE0F","23FA-FE0F","23CF-FE0F","1F3A6","1F505","1F506","1F4F6","1F4F3","1F4F4","2640-FE0F","2642-FE0F","26A7-FE0F","2716-FE0F","2795","2796","2797","1F7F0","267E-FE0F","203C-FE0F","2049-FE0F","2753","2754","2755","2757","3030-FE0F","1F4B1","1F4B2","2695-FE0F","267B-FE0F","269C-FE0F","1F531","1F4DB","1F530","2B55","2705","2611-FE0F","2714-FE0F","274C","274E","27B0","27BF","303D-FE0F","2733-FE0F","2734-FE0F","2747-FE0F","00A9-FE0F","00AE-FE0F","2122-FE0F","0023-FE0F-20E3","002A-FE0F-20E3","0030-FE0F-20E3","0031-FE0F-20E3","0032-FE0F-20E3","0033-FE0F-20E3","0034-FE0F-20E3","0035-FE0F-20E3","0036-FE0F-20E3","0037-FE0F-20E3","0038-FE0F-20E3","0039-FE0F-20E3","1F51F","1F520","1F521","1F522","1F523","1F524","1F170-FE0F","1F18E","1F171-FE0F","1F191","1F192","1F193","2139-FE0F","1F194","24C2-FE0F","1F195","1F196","1F17E-FE0F","1F197","1F17F-FE0F","1F198","1F199","1F19A","1F201","1F202-FE0F","1F237-FE0F","1F236","1F22F","1F250","1F239","1F21A","1F232","1F251","1F238","1F234","1F233","3297-FE0F","3299-FE0F","1F23A","1F235","1F534","1F7E0","1F7E1","1F7E2","1F535","1F7E3","1F7E4","26AB","26AA","1F7E5","1F7E7","1F7E8","1F7E9","1F7E6","1F7EA","1F7EB","2B1B","2B1C","25FC-FE0F","25FB-FE0F","25FE","25FD","25AA-FE0F","25AB-FE0F","1F536","1F537","1F538","1F539","1F53A","1F53B","1F4A0","1F518","1F533","1F532"]},{id:"flags",name:"Flags",emojis:["1F1E6-1F1E8","1F1E6-1F1E9","1F1E6-1F1EA","1F1E6-1F1EB","1F1E6-1F1EC","1F1E6-1F1EE","1F1E6-1F1F1","1F1E6-1F1F2","1F1E6-1F1F4","1F1E6-1F1F6","1F1E6-1F1F7","1F1E6-1F1F8","1F1E6-1F1F9","1F1E6-1F1FA","1F1E6-1F1FC","1F1E6-1F1FD","1F1E6-1F1FF","1F1E7-1F1E6","1F1E7-1F1E7","1F1E7-1F1E9","1F1E7-1F1EA","1F1E7-1F1EB","1F1E7-1F1EC","1F1E7-1F1ED","1F1E7-1F1EE","1F1E7-1F1EF","1F1E7-1F1F1","1F1E7-1F1F2","1F1E7-1F1F3","1F1E7-1F1F4","1F1E7-1F1F6","1F1E7-1F1F7","1F1E7-1F1F8","1F1E7-1F1F9","1F1E7-1F1FB","1F1E7-1F1FC","1F1E7-1F1FE","1F1E7-1F1FF","1F1E8-1F1E6","1F1E8-1F1E8","1F1E8-1F1E9","1F1E8-1F1EB","1F1E8-1F1EC","1F1E8-1F1ED","1F1E8-1F1EE","1F1E8-1F1F0","1F1E8-1F1F1","1F1E8-1F1F2","1F1E8-1F1F3","1F1E8-1F1F4","1F1E8-1F1F5","1F1E8-1F1F7","1F1E8-1F1FA","1F1E8-1F1FB","1F1E8-1F1FC","1F1E8-1F1FD","1F1E8-1F1FE","1F1E8-1F1FF","1F1E9-1F1EA","1F1E9-1F1EC","1F1E9-1F1EF","1F1E9-1F1F0","1F1E9-1F1F2","1F1E9-1F1F4","1F1E9-1F1FF","1F1EA-1F1E6","1F1EA-1F1E8","1F1EA-1F1EA","1F1EA-1F1EC","1F1EA-1F1ED","1F1EA-1F1F7","1F1EA-1F1F8","1F1EA-1F1F9","1F1EA-1F1FA","1F1EB-1F1EE","1F1EB-1F1EF","1F1EB-1F1F0","1F1EB-1F1F2","1F1EB-1F1F4","1F1EB-1F1F7","1F1EC-1F1E6","1F1EC-1F1E7","1F1EC-1F1E9","1F1EC-1F1EA","1F1EC-1F1EB","1F1EC-1F1EC","1F1EC-1F1ED","1F1EC-1F1EE","1F1EC-1F1F1","1F1EC-1F1F2","1F1EC-1F1F3","1F1EC-1F1F5","1F1EC-1F1F6","1F1EC-1F1F7","1F1EC-1F1F8","1F1EC-1F1F9","1F1EC-1F1FA","1F1EC-1F1FC","1F1EC-1F1FE","1F1ED-1F1F0","1F1ED-1F1F2","1F1ED-1F1F3","1F1ED-1F1F7","1F1ED-1F1F9","1F1ED-1F1FA","1F1EE-1F1E8","1F1EE-1F1E9","1F1EE-1F1EA","1F1EE-1F1F1","1F1EE-1F1F2","1F1EE-1F1F3","1F1EE-1F1F4","1F1EE-1F1F6","1F1EE-1F1F7","1F1EE-1F1F8","1F1EE-1F1F9","1F1EF-1F1EA","1F1EF-1F1F2","1F1EF-1F1F4","1F1EF-1F1F5","1F1F0-1F1EA","1F1F0-1F1EC","1F1F0-1F1ED","1F1F0-1F1EE","1F1F0-1F1F2","1F1F0-1F1F3","1F1F0-1F1F5","1F1F0-1F1F7","1F1F0-1F1FC","1F1F0-1F1FE","1F1F0-1F1FF","1F1F1-1F1E6","1F1F1-1F1E7","1F1F1-1F1E8","1F1F1-1F1EE","1F1F1-1F1F0","1F1F1-1F1F7","1F1F1-1F1F8","1F1F1-1F1F9","1F1F1-1F1FA","1F1F1-1F1FB","1F1F1-1F1FE","1F1F2-1F1E6","1F1F2-1F1E8","1F1F2-1F1E9","1F1F2-1F1EA","1F1F2-1F1EB","1F1F2-1F1EC","1F1F2-1F1ED","1F1F2-1F1F0","1F1F2-1F1F1","1F1F2-1F1F2","1F1F2-1F1F3","1F1F2-1F1F4","1F1F2-1F1F5","1F1F2-1F1F6","1F1F2-1F1F7","1F1F2-1F1F8","1F1F2-1F1F9","1F1F2-1F1FA","1F1F2-1F1FB","1F1F2-1F1FC","1F1F2-1F1FD","1F1F2-1F1FE","1F1F2-1F1FF","1F1F3-1F1E6","1F1F3-1F1E8","1F1F3-1F1EA","1F1F3-1F1EB","1F1F3-1F1EC","1F1F3-1F1EE","1F1F3-1F1F1","1F1F3-1F1F4","1F1F3-1F1F5","1F1F3-1F1F7","1F1F3-1F1FA","1F1F3-1F1FF","1F1F4-1F1F2","1F1F5-1F1E6","1F1F5-1F1EA","1F1F5-1F1EB","1F1F5-1F1EC","1F1F5-1F1ED","1F1F5-1F1F0","1F1F5-1F1F1","1F1F5-1F1F2","1F1F5-1F1F3","1F1F5-1F1F7","1F1F5-1F1F8","1F1F5-1F1F9","1F1F5-1F1FC","1F1F5-1F1FE","1F1F6-1F1E6","1F1F7-1F1EA","1F1F7-1F1F4","1F1F7-1F1F8","1F1F7-1F1FA","1F1F7-1F1FC","1F1F8-1F1E6","1F1F8-1F1E7","1F1F8-1F1E8","1F1F8-1F1E9","1F1F8-1F1EA","1F1F8-1F1EC","1F1F8-1F1ED","1F1F8-1F1EE","1F1F8-1F1EF","1F1F8-1F1F0","1F1F8-1F1F1","1F1F8-1F1F2","1F1F8-1F1F3","1F1F8-1F1F4","1F1F8-1F1F7","1F1F8-1F1F8","1F1F8-1F1F9","1F1F8-1F1FB","1F1F8-1F1FD","1F1F8-1F1FE","1F1F8-1F1FF","1F1F9-1F1E6","1F1F9-1F1E8","1F1F9-1F1E9","1F1F9-1F1EB","1F1F9-1F1EC","1F1F9-1F1ED","1F1F9-1F1EF","1F1F9-1F1F0","1F1F9-1F1F1","1F1F9-1F1F2","1F1F9-1F1F3","1F1F9-1F1F4","1F1F9-1F1F7","1F1F9-1F1F9","1F1F9-1F1FB","1F1F9-1F1FC","1F1F9-1F1FF","1F1FA-1F1E6","1F1FA-1F1EC","1F1FA-1F1F2","1F1FA-1F1F3","1F1FA-1F1F8","1F1FA-1F1FE","1F1FA-1F1FF","1F1FB-1F1E6","1F1FB-1F1E8","1F1FB-1F1EA","1F1FB-1F1EC","1F1FB-1F1EE","1F1FB-1F1F3","1F1FB-1F1FA","1F1FC-1F1EB","1F1FC-1F1F8","1F1FD-1F1F0","1F1FE-1F1EA","1F1FE-1F1F9","1F1FF-1F1E6","1F1FF-1F1F2","1F1FF-1F1FC","1F38C","1F3C1","1F3F3-FE0F","1F3F3-FE0F-200D-1F308","1F3F3-FE0F-200D-26A7-FE0F","1F3F4","1F3F4-200D-2620-FE0F","1F3F4-E0067-E0062-E0065-E006E-E0067-E007F","1F3F4-E0067-E0062-E0073-E0063-E0074-E007F","1F3F4-E0067-E0062-E0077-E006C-E0073-E007F","1F6A9"]}],JW=[{name:"Grinning Face",unified:"1F600",text:":D",keywords:["grinning_face","face","smile","happy","joy",":D","grin"],sheet:[32,20],shortName:"grinning"},{name:"Smiling Face with Open Mouth",unified:"1F603",text:":)",emoticons:["=)","=-)"],keywords:["grinning_face_with_big_eyes","face","happy","joy","haha",":D",":)","smile","funny"],sheet:[32,23],shortName:"smiley"},{name:"Smiling Face with Open Mouth and Smiling Eyes",unified:"1F604",text:":)",emoticons:["C:","c:",":D",":-D"],keywords:["grinning_face_with_smiling_eyes","face","happy","joy","funny","haha","laugh","like",":D",":)","smile"],sheet:[32,24],shortName:"smile"},{name:"Grinning Face with Smiling Eyes",unified:"1F601",keywords:["beaming_face_with_smiling_eyes","face","happy","smile","joy","kawaii"],sheet:[32,21],shortName:"grin"},{name:"Smiling Face with Open Mouth and Tightly-Closed Eyes",unified:"1F606",emoticons:[":>",":->"],keywords:["grinning_squinting_face","happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],sheet:[32,26],shortNames:["satisfied"],shortName:"laughing"},{name:"Smiling Face with Open Mouth and Cold Sweat",unified:"1F605",keywords:["grinning_face_with_sweat","face","hot","happy","laugh","sweat","smile","relief"],sheet:[32,25],shortName:"sweat_smile"},{name:"Rolling on the Floor Laughing",unified:"1F923",keywords:["rolling_on_the_floor_laughing","face","rolling","floor","laughing","lol","haha","rofl"],sheet:[40,15],shortName:"rolling_on_the_floor_laughing"},{name:"Face with Tears of Joy",unified:"1F602",keywords:["face_with_tears_of_joy","face","cry","tears","weep","happy","happytears","haha"],sheet:[32,22],shortName:"joy"},{name:"Slightly Smiling Face",unified:"1F642",emoticons:[":)","(:",":-)"],keywords:["slightly_smiling_face","face","smile"],sheet:[33,28],shortName:"slightly_smiling_face"},{name:"Upside-Down Face",unified:"1F643",keywords:["upside_down_face","face","flipped","silly","smile"],sheet:[33,29],shortName:"upside_down_face"},{name:"Melting Face",unified:"1FAE0",keywords:["melting face","hot","heat"],sheet:[55,12],hidden:["facebook"],shortName:"melting_face"},{name:"Winking Face",unified:"1F609",text:";)",emoticons:[";)",";-)"],keywords:["winking_face","face","happy","mischievous","secret",";)","smile","eye"],sheet:[32,29],shortName:"wink"},{name:"Smiling Face with Smiling Eyes",unified:"1F60A",text:":)",keywords:["smiling_face_with_smiling_eyes","face","smile","happy","flushed","crush","embarrassed","shy","joy"],sheet:[32,30],shortName:"blush"},{name:"Smiling Face with Halo",unified:"1F607",keywords:["smiling_face_with_halo","face","angel","heaven","halo","innocent"],sheet:[32,27],shortName:"innocent"},{name:"Smiling Face with Smiling Eyes and Three Hearts",unified:"1F970",keywords:["smiling_face_with_hearts","face","love","like","affection","valentines","infatuation","crush","hearts","adore"],sheet:[43,58],shortName:"smiling_face_with_3_hearts"},{name:"Smiling Face with Heart-Shaped Eyes",unified:"1F60D",keywords:["smiling_face_with_heart_eyes","face","love","like","affection","valentines","infatuation","crush","heart"],sheet:[32,33],shortName:"heart_eyes"},{name:"Grinning Face with Star Eyes",unified:"1F929",keywords:["star_struck","face","smile","starry","eyes","grinning"],sheet:[40,38],shortNames:["grinning_face_with_star_eyes"],shortName:"star-struck"},{name:"Face Throwing a Kiss",unified:"1F618",emoticons:[":*",":-*"],keywords:["face_blowing_a_kiss","face","love","like","affection","valentines","infatuation","kiss"],sheet:[32,44],shortName:"kissing_heart"},{name:"Kissing Face",unified:"1F617",keywords:["kissing_face","love","like","face","3","valentines","infatuation","kiss"],sheet:[32,43],shortName:"kissing"},{name:"White Smiling Face",unified:"263A-FE0F",keywords:["smiling_face","face","blush","massage","happiness"],sheet:[57,4],shortName:"relaxed"},{name:"Kissing Face with Closed Eyes",unified:"1F61A",keywords:["kissing_face_with_closed_eyes","face","love","like","affection","valentines","infatuation","kiss"],sheet:[32,46],shortName:"kissing_closed_eyes"},{name:"Kissing Face with Smiling Eyes",unified:"1F619",keywords:["kissing_face_with_smiling_eyes","face","affection","valentines","infatuation","kiss"],sheet:[32,45],shortName:"kissing_smiling_eyes"},{name:"Smiling Face with Tear",unified:"1F972",keywords:["smiling face with tear","sad","cry","pretend"],sheet:[43,60],shortName:"smiling_face_with_tear"},{name:"Face Savouring Delicious Food",unified:"1F60B",keywords:["face_savoring_food","happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],sheet:[32,31],shortName:"yum"},{name:"Face with Stuck-out Tongue",unified:"1F61B",text:":p",emoticons:[":p",":-p",":P",":-P",":b",":-b"],keywords:["face_with_tongue","face","prank","childish","playful","mischievous","smile","tongue"],sheet:[32,47],shortName:"stuck_out_tongue"},{name:"Face with Stuck-out Tongue and Winking Eye",unified:"1F61C",text:";p",emoticons:[";p",";-p",";b",";-b",";P",";-P"],keywords:["winking_face_with_tongue","face","prank","childish","playful","mischievous","smile","wink","tongue"],sheet:[32,48],shortName:"stuck_out_tongue_winking_eye"},{name:"Grinning Face with One Large and One Small Eye",unified:"1F92A",keywords:["zany_face","face","goofy","crazy"],sheet:[40,39],shortNames:["grinning_face_with_one_large_and_one_small_eye"],shortName:"zany_face"},{name:"Face with Stuck-out Tongue and Tightly-Closed Eyes",unified:"1F61D",keywords:["squinting_face_with_tongue","face","prank","playful","mischievous","smile","tongue"],sheet:[32,49],shortName:"stuck_out_tongue_closed_eyes"},{name:"Money-Mouth Face",unified:"1F911",keywords:["money_mouth_face","face","rich","dollar","money"],sheet:[38,59],shortName:"money_mouth_face"},{name:"Hugging Face",unified:"1F917",keywords:["hugging_face","face","smile","hug"],sheet:[39,4],shortName:"hugging_face"},{name:"Smiling Face with Smiling Eyes and Hand Covering Mouth",unified:"1F92D",keywords:["face_with_hand_over_mouth","face","whoops","shock","surprise"],sheet:[40,42],shortNames:["smiling_face_with_smiling_eyes_and_hand_covering_mouth"],shortName:"face_with_hand_over_mouth"},{name:"Face with Open Eyes and Hand over Mouth",unified:"1FAE2",keywords:["face with open eyes and hand over mouth","silence","secret","shock","surprise"],sheet:[55,14],hidden:["facebook"],shortName:"face_with_open_eyes_and_hand_over_mouth"},{name:"Face with Peeking Eye",unified:"1FAE3",keywords:["face with peeking eye","scared","frightening","embarrassing","shy"],sheet:[55,15],hidden:["facebook"],shortName:"face_with_peeking_eye"},{name:"Face with Finger Covering Closed Lips",unified:"1F92B",keywords:["shushing_face","face","quiet","shhh"],sheet:[40,40],shortNames:["face_with_finger_covering_closed_lips"],shortName:"shushing_face"},{name:"Thinking Face",unified:"1F914",keywords:["thinking_face","face","hmmm","think","consider"],sheet:[39,1],shortName:"thinking_face"},{name:"Saluting Face",unified:"1FAE1",keywords:["saluting face","respect","salute"],sheet:[55,13],hidden:["facebook"],shortName:"saluting_face"},{name:"Zipper-Mouth Face",unified:"1F910",keywords:["zipper_mouth_face","face","sealed","zipper","secret"],sheet:[38,58],shortName:"zipper_mouth_face"},{name:"Face with One Eyebrow Raised",unified:"1F928",keywords:["face_with_raised_eyebrow","face","distrust","scepticism","disapproval","disbelief","surprise"],sheet:[40,37],shortNames:["face_with_one_eyebrow_raised"],shortName:"face_with_raised_eyebrow"},{name:"Neutral Face",unified:"1F610",emoticons:[":|",":-|"],keywords:["neutral_face","indifference","meh",":|","neutral"],sheet:[32,36],shortName:"neutral_face"},{name:"Expressionless Face",unified:"1F611",keywords:["expressionless_face","face","indifferent","-_-","meh","deadpan"],sheet:[32,37],shortName:"expressionless"},{name:"Face Without Mouth",unified:"1F636",keywords:["face_without_mouth","face","hellokitty"],sheet:[33,16],shortName:"no_mouth"},{name:"Dotted Line Face",unified:"1FAE5",keywords:["dotted line face","invisible","lonely","isolation","depression"],sheet:[55,17],hidden:["facebook"],shortName:"dotted_line_face"},{name:"Face in Clouds",unified:"1F636-200D-1F32B-FE0F",keywords:["face in clouds","shower","steam","dream"],sheet:[33,15],hidden:["facebook"],shortName:"face_in_clouds"},{name:"Smirking Face",unified:"1F60F",keywords:["smirking_face","face","smile","mean","prank","smug","sarcasm"],sheet:[32,35],shortName:"smirk"},{name:"Unamused Face",unified:"1F612",text:":(",keywords:["unamused_face","indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],sheet:[32,38],shortName:"unamused"},{name:"Face with Rolling Eyes",unified:"1F644",keywords:["face_with_rolling_eyes","face","eyeroll","frustrated"],sheet:[33,30],shortName:"face_with_rolling_eyes"},{name:"Grimacing Face",unified:"1F62C",keywords:["grimacing_face","face","grimace","teeth"],sheet:[33,3],shortName:"grimacing"},{name:"Face Exhaling",unified:"1F62E-200D-1F4A8",keywords:["face exhaling","relieve","relief","tired","sigh"],sheet:[33,5],hidden:["facebook"],shortName:"face_exhaling"},{name:"Lying Face",unified:"1F925",keywords:["lying_face","face","lie","pinocchio"],sheet:[40,17],shortName:"lying_face"},{name:"Relieved Face",unified:"1F60C",keywords:["relieved_face","face","relaxed","phew","massage","happiness"],sheet:[32,32],shortName:"relieved"},{name:"Pensive Face",unified:"1F614",keywords:["pensive_face","face","sad","depressed","upset"],sheet:[32,40],shortName:"pensive"},{name:"Sleepy Face",unified:"1F62A",keywords:["sleepy_face","face","tired","rest","nap"],sheet:[33,1],shortName:"sleepy"},{name:"Drooling Face",unified:"1F924",keywords:["drooling_face","face"],sheet:[40,16],shortName:"drooling_face"},{name:"Sleeping Face",unified:"1F634",keywords:["sleeping_face","face","tired","sleepy","night","zzz"],sheet:[33,12],shortName:"sleeping"},{name:"Face with Medical Mask",unified:"1F637",keywords:["face_with_medical_mask","face","sick","ill","disease","covid"],sheet:[33,17],shortName:"mask"},{name:"Face with Thermometer",unified:"1F912",keywords:["face_with_thermometer","sick","temperature","thermometer","cold","fever","covid"],sheet:[38,60],shortName:"face_with_thermometer"},{name:"Face with Head-Bandage",unified:"1F915",keywords:["face_with_head_bandage","injured","clumsy","bandage","hurt"],sheet:[39,2],shortName:"face_with_head_bandage"},{name:"Nauseated Face",unified:"1F922",keywords:["nauseated_face","face","vomit","gross","green","sick","throw up","ill"],sheet:[40,14],shortName:"nauseated_face"},{name:"Face with Open Mouth Vomiting",unified:"1F92E",keywords:["face_vomiting","face","sick"],sheet:[40,43],shortNames:["face_with_open_mouth_vomiting"],shortName:"face_vomiting"},{name:"Sneezing Face",unified:"1F927",keywords:["sneezing_face","face","gesundheit","sneeze","sick","allergy"],sheet:[40,36],shortName:"sneezing_face"},{name:"Overheated Face",unified:"1F975",keywords:["hot_face","face","feverish","heat","red","sweating"],sheet:[44,2],shortName:"hot_face"},{name:"Freezing Face",unified:"1F976",keywords:["cold_face","face","blue","freezing","frozen","frostbite","icicles"],sheet:[44,3],shortName:"cold_face"},{name:"Face with Uneven Eyes and Wavy Mouth",unified:"1F974",keywords:["woozy_face","face","dizzy","intoxicated","tipsy","wavy"],sheet:[44,1],shortName:"woozy_face"},{name:"Dizzy Face",unified:"1F635",keywords:["dizzy_face","spent","unconscious","xox","dizzy"],sheet:[33,14],shortName:"dizzy_face"},{name:"Face with Spiral Eyes",unified:"1F635-200D-1F4AB",keywords:["face with spiral eyes","sick","ill","confused","nauseous","nausea"],sheet:[33,13],hidden:["facebook"],shortName:"face_with_spiral_eyes"},{name:"Shocked Face with Exploding Head",unified:"1F92F",keywords:["exploding_head","face","shocked","mind","blown"],sheet:[40,44],shortNames:["shocked_face_with_exploding_head"],shortName:"exploding_head"},{name:"Face with Cowboy Hat",unified:"1F920",keywords:["cowboy_hat_face","face","cowgirl","hat"],sheet:[40,12],shortName:"face_with_cowboy_hat"},{name:"Face with Party Horn and Party Hat",unified:"1F973",keywords:["partying_face","face","celebration","woohoo"],sheet:[44,0],shortName:"partying_face"},{name:"Disguised Face",unified:"1F978",keywords:["disguised face","pretent","brows","glasses","moustache"],sheet:[44,10],shortName:"disguised_face"},{name:"Smiling Face with Sunglasses",unified:"1F60E",emoticons:["8)"],keywords:["smiling_face_with_sunglasses","face","cool","smile","summer","beach","sunglass"],sheet:[32,34],shortName:"sunglasses"},{name:"Nerd Face",unified:"1F913",keywords:["nerd_face","face","nerdy","geek","dork"],sheet:[39,0],shortName:"nerd_face"},{name:"Face with Monocle",unified:"1F9D0",keywords:["face_with_monocle","face","stuffy","wealthy"],sheet:[47,11],shortName:"face_with_monocle"},{name:"Confused Face",unified:"1F615",emoticons:[":\\\\",":-\\\\",":/",":-/"],keywords:["confused_face","face","indifference","huh","weird","hmmm",":/"],sheet:[32,41],shortName:"confused"},{name:"Face with Diagonal Mouth",unified:"1FAE4",keywords:["face with diagonal mouth","skeptic","confuse","frustrated","indifferent"],sheet:[55,16],hidden:["facebook"],shortName:"face_with_diagonal_mouth"},{name:"Worried Face",unified:"1F61F",keywords:["worried_face","face","concern","nervous",":("],sheet:[32,51],shortName:"worried"},{name:"Slightly Frowning Face",unified:"1F641",keywords:["slightly_frowning_face","face","frowning","disappointed","sad","upset"],sheet:[33,27],shortName:"slightly_frowning_face"},{name:"Frowning Face",unified:"2639-FE0F",keywords:["frowning_face","face","sad","upset","frown"],sheet:[57,3],shortName:"white_frowning_face"},{name:"Face with Open Mouth",unified:"1F62E",emoticons:[":o",":-o",":O",":-O"],keywords:["face_with_open_mouth","face","surprise","impressed","wow","whoa",":O"],sheet:[33,6],shortName:"open_mouth"},{name:"Hushed Face",unified:"1F62F",keywords:["hushed_face","face","woo","shh"],sheet:[33,7],shortName:"hushed"},{name:"Astonished Face",unified:"1F632",keywords:["astonished_face","face","xox","surprised","poisoned"],sheet:[33,10],shortName:"astonished"},{name:"Flushed Face",unified:"1F633",keywords:["flushed_face","face","blush","shy","flattered"],sheet:[33,11],shortName:"flushed"},{name:"Face with Pleading Eyes",unified:"1F97A",keywords:["pleading_face","face","begging","mercy","cry","tears","sad","grievance"],sheet:[44,12],shortName:"pleading_face"},{name:"Face Holding Back Tears",unified:"1F979",keywords:["face holding back tears","touched","gratitude","cry"],sheet:[44,11],hidden:["facebook"],shortName:"face_holding_back_tears"},{name:"Frowning Face with Open Mouth",unified:"1F626",keywords:["frowning_face_with_open_mouth","face","aw","what"],sheet:[32,58],shortName:"frowning"},{name:"Anguished Face",unified:"1F627",emoticons:["D:"],keywords:["anguished_face","face","stunned","nervous"],sheet:[32,59],shortName:"anguished"},{name:"Fearful Face",unified:"1F628",keywords:["fearful_face","face","scared","terrified","nervous"],sheet:[32,60],shortName:"fearful"},{name:"Face with Open Mouth and Cold Sweat",unified:"1F630",keywords:["anxious_face_with_sweat","face","nervous","sweat"],sheet:[33,8],shortName:"cold_sweat"},{name:"Disappointed but Relieved Face",unified:"1F625",keywords:["sad_but_relieved_face","face","phew","sweat","nervous"],sheet:[32,57],shortName:"disappointed_relieved"},{name:"Crying Face",unified:"1F622",text:":'(",emoticons:[":'("],keywords:["crying_face","face","tears","sad","depressed","upset",":'("],sheet:[32,54],shortName:"cry"},{name:"Loudly Crying Face",unified:"1F62D",text:":'(",keywords:["loudly_crying_face","face","cry","tears","sad","upset","depressed"],sheet:[33,4],shortName:"sob"},{name:"Face Screaming in Fear",unified:"1F631",keywords:["face_screaming_in_fear","face","munch","scared","omg"],sheet:[33,9],shortName:"scream"},{name:"Confounded Face",unified:"1F616",keywords:["confounded_face","face","confused","sick","unwell","oops",":S"],sheet:[32,42],shortName:"confounded"},{name:"Persevering Face",unified:"1F623",keywords:["persevering_face","face","sick","no","upset","oops"],sheet:[32,55],shortName:"persevere"},{name:"Disappointed Face",unified:"1F61E",text:":(",emoticons:["):",":(",":-("],keywords:["disappointed_face","face","sad","upset","depressed",":("],sheet:[32,50],shortName:"disappointed"},{name:"Face with Cold Sweat",unified:"1F613",keywords:["downcast_face_with_sweat","face","hot","sad","tired","exercise"],sheet:[32,39],shortName:"sweat"},{name:"Weary Face",unified:"1F629",keywords:["weary_face","face","tired","sleepy","sad","frustrated","upset"],sheet:[33,0],shortName:"weary"},{name:"Tired Face",unified:"1F62B",keywords:["tired_face","sick","whine","upset","frustrated"],sheet:[33,2],shortName:"tired_face"},{name:"Yawning Face",unified:"1F971",keywords:["yawning_face","tired","sleepy"],sheet:[43,59],shortName:"yawning_face"},{name:"Face with Look of Triumph",unified:"1F624",keywords:["face_with_steam_from_nose","face","gas","phew","proud","pride"],sheet:[32,56],shortName:"triumph"},{name:"Pouting Face",unified:"1F621",keywords:["pouting_face","angry","mad","hate","despise"],sheet:[32,53],shortName:"rage"},{name:"Angry Face",unified:"1F620",emoticons:[">:(",">:-("],keywords:["angry_face","mad","face","annoyed","frustrated"],sheet:[32,52],shortName:"angry"},{name:"Serious Face with Symbols Covering Mouth",unified:"1F92C",keywords:["face_with_symbols_on_mouth","face","swearing","cursing","cussing","profanity","expletive"],sheet:[40,41],shortNames:["serious_face_with_symbols_covering_mouth"],shortName:"face_with_symbols_on_mouth"},{name:"Smiling Face with Horns",unified:"1F608",keywords:["smiling_face_with_horns","devil","horns"],sheet:[32,28],shortName:"smiling_imp"},{name:"Imp",unified:"1F47F",keywords:["angry_face_with_horns","devil","angry","horns"],sheet:[25,8],shortName:"imp"},{name:"Skull",unified:"1F480",keywords:["skull","dead","skeleton","creepy","death"],sheet:[25,9],shortName:"skull"},{name:"Skull and Crossbones",unified:"2620-FE0F",keywords:["skull_and_crossbones","poison","danger","deadly","scary","death","pirate","evil"],sheet:[56,56],shortName:"skull_and_crossbones"},{name:"Pile of Poo",unified:"1F4A9",keywords:["pile_of_poo","hankey","shitface","fail","turd","shit"],sheet:[27,56],shortNames:["poop","shit"],shortName:"hankey"},{name:"Clown Face",unified:"1F921",keywords:["clown_face","face"],sheet:[40,13],shortName:"clown_face"},{name:"Japanese Ogre",unified:"1F479",keywords:["ogre","monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],sheet:[24,58],shortName:"japanese_ogre"},{name:"Japanese Goblin",unified:"1F47A",keywords:["goblin","red","evil","mask","monster","scary","creepy","japanese","goblin"],sheet:[24,59],shortName:"japanese_goblin"},{name:"Ghost",unified:"1F47B",keywords:["ghost","halloween","spooky","scary"],sheet:[24,60],shortName:"ghost"},{name:"Extraterrestrial Alien",unified:"1F47D",keywords:["alien","UFO","paul","weird","outer_space"],sheet:[25,6],shortName:"alien"},{name:"Alien Monster",unified:"1F47E",keywords:["alien_monster","game","arcade","play"],sheet:[25,7],shortName:"space_invader"},{name:"Robot Face",unified:"1F916",keywords:["robot","computer","machine","bot"],sheet:[39,3],shortName:"robot_face"},{name:"Smiling Cat Face with Open Mouth",unified:"1F63A",keywords:["grinning_cat","animal","cats","happy","smile"],sheet:[33,20],shortName:"smiley_cat"},{name:"Grinning Cat Face with Smiling Eyes",unified:"1F638",keywords:["grinning_cat_with_smiling_eyes","animal","cats","smile"],sheet:[33,18],shortName:"smile_cat"},{name:"Cat Face with Tears of Joy",unified:"1F639",keywords:["cat_with_tears_of_joy","animal","cats","haha","happy","tears"],sheet:[33,19],shortName:"joy_cat"},{name:"Smiling Cat Face with Heart-Shaped Eyes",unified:"1F63B",keywords:["smiling_cat_with_heart_eyes","animal","love","like","affection","cats","valentines","heart"],sheet:[33,21],shortName:"heart_eyes_cat"},{name:"Cat Face with Wry Smile",unified:"1F63C",keywords:["cat_with_wry_smile","animal","cats","smirk"],sheet:[33,22],shortName:"smirk_cat"},{name:"Kissing Cat Face with Closed Eyes",unified:"1F63D",keywords:["kissing_cat","animal","cats","kiss"],sheet:[33,23],shortName:"kissing_cat"},{name:"Weary Cat Face",unified:"1F640",keywords:["weary_cat","animal","cats","munch","scared","scream"],sheet:[33,26],shortName:"scream_cat"},{name:"Crying Cat Face",unified:"1F63F",keywords:["crying_cat","animal","tears","weep","sad","cats","upset","cry"],sheet:[33,25],shortName:"crying_cat_face"},{name:"Pouting Cat Face",unified:"1F63E",keywords:["pouting_cat","animal","cats"],sheet:[33,24],shortName:"pouting_cat"},{name:"See-No-Evil Monkey",unified:"1F648",keywords:["see_no_evil_monkey","monkey","animal","nature","haha"],sheet:[34,24],shortName:"see_no_evil"},{name:"Hear-No-Evil Monkey",unified:"1F649",keywords:["hear_no_evil_monkey","animal","monkey","nature"],sheet:[34,25],shortName:"hear_no_evil"},{name:"Speak-No-Evil Monkey",unified:"1F64A",keywords:["speak_no_evil_monkey","monkey","animal","nature","omg"],sheet:[34,26],shortName:"speak_no_evil"},{name:"Kiss Mark",unified:"1F48B",keywords:["kiss_mark","face","lips","love","like","affection","valentines"],sheet:[26,37],shortName:"kiss"},{name:"Love Letter",unified:"1F48C",keywords:["love_letter","email","like","affection","envelope","valentines"],sheet:[26,38],shortName:"love_letter"},{name:"Heart with Arrow",unified:"1F498",keywords:["heart_with_arrow","love","like","heart","affection","valentines"],sheet:[27,39],shortName:"cupid"},{name:"Heart with Ribbon",unified:"1F49D",keywords:["heart_with_ribbon","love","valentines"],sheet:[27,44],shortName:"gift_heart"},{name:"Sparkling Heart",unified:"1F496",keywords:["sparkling_heart","love","like","affection","valentines"],sheet:[27,37],shortName:"sparkling_heart"},{name:"Growing Heart",unified:"1F497",keywords:["growing_heart","like","love","affection","valentines","pink"],sheet:[27,38],shortName:"heartpulse"},{name:"Beating Heart",unified:"1F493",keywords:["beating_heart","love","like","affection","valentines","pink","heart"],sheet:[27,34],shortName:"heartbeat"},{name:"Revolving Hearts",unified:"1F49E",keywords:["revolving_hearts","love","like","affection","valentines"],sheet:[27,45],shortName:"revolving_hearts"},{name:"Two Hearts",unified:"1F495",keywords:["two_hearts","love","like","affection","valentines","heart"],sheet:[27,36],shortName:"two_hearts"},{name:"Heart Decoration",unified:"1F49F",keywords:["heart_decoration","purple-square","love","like"],sheet:[27,46],shortName:"heart_decoration"},{name:"Heart Exclamation",unified:"2763-FE0F",keywords:["heart_exclamation","decoration","love"],sheet:[59,7],shortName:"heavy_heart_exclamation_mark_ornament"},{name:"Broken Heart",unified:"1F494",text:"`https://cdn.jsdelivr.net/npm/emoji-datasource-${n}@14.0.0/img/${n}/sheets-256/${t}.png`,sc=(()=>{class n{uncompressed=!1;names={};emojis=[];constructor(){this.uncompressed||(this.uncompress(JW),this.uncompressed=!0)}uncompress(e){this.emojis=e.map(i=>{let r=P({},i);if(r.shortNames||(r.shortNames=[]),r.shortNames.unshift(r.shortName),r.id=r.shortName,r.native=this.unifiedToNative(r.unified),r.skinVariations||(r.skinVariations=[]),r.keywords||(r.keywords=[]),r.emoticons||(r.emoticons=[]),r.hidden||(r.hidden=[]),r.text||(r.text=""),r.obsoletes){let s=e.find(o=>o.unified===r.obsoletes);s&&(s.keywords?r.keywords=[...r.keywords,...s.keywords,s.shortName]:r.keywords=[...r.keywords,s.shortName])}this.names[r.unified]=r;for(let s of r.shortNames)this.names[s]=r;return r})}getData(e,i,r){let s;if(typeof e=="string"){let a=e.match(XW);if(a&&(e=a[1],a[2]&&(i=parseInt(a[2],10))),this.names.hasOwnProperty(e))s=this.names[e];else return null}else e.id?s=this.names[e.id]:e.unified&&(s=this.names[e.unified.toUpperCase()]);if(s||(s=e,s.custom=!0),s.skinVariations&&s.skinVariations.length&&i&&i>1&&r){s=P({},s);let a=eq[i-1],l=s.skinVariations.find(c=>c.unified.includes(a));(!l.hidden||!l.hidden.includes(r))&&(s.skinTone=i,s=P(P({},s),l)),s.native=this.unifiedToNative(s.unified)}return s.set=r||"",s}unifiedToNative(e){let i=e.split("-").map(r=>parseInt(`0x${r}`,16));return String.fromCodePoint(...i)}emojiSpriteStyles(e,i="apple",r=24,s=64,o=60,a=t4,l=61,c){let d=!!c;return c=c||a(i,s),{width:`${r}px`,height:`${r}px`,display:"inline-block","background-image":`url(${c})`,"background-size":d?"100% 100%":`${100*l}% ${100*o}%`,"background-position":d?void 0:this.getSpritePosition(e,l)}}getSpritePosition(e,i){let[r,s]=e,o=100/(i-1);return`${o*r}% ${o*s}%`}sanitize(e){if(e===null)return null;let r=`:${e.id||e.shortNames[0]}:`;return e.skinTone&&(r+=`:skin-tone-${e.skinTone}:`),e.colons=r,P({},e)}getSanitizedData(e,i,r){return this.sanitize(this.getData(e,i,r))}static \u0275fac=function(i){return new(i||n)};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),d_=(()=>{class n{skin=1;set="apple";sheetSize=64;isNative=!1;forceSize=!1;tooltip=!1;size=24;emoji="";fallback;hideObsolete=!1;sheetRows;sheetColumns;useButton;emojiOver=new R;emojiOverOutsideAngular=new R;emojiLeave=new R;emojiLeaveOutsideAngular=new R;emojiClick=new R;emojiClickOutsideAngular=new R;style;title=void 0;label="";unified;custom=!1;isVisible=!0;backgroundImageFn=t4;imageUrlFn;set button(e){this.ngZone.runOutsideAngular(()=>this.button$.next(e?.nativeElement))}button$=new Be;destroy$=new Be;ngZone=B(se);emojiService=B(sc);constructor(){this.setupMouseListeners()}ngOnChanges(){if(!this.emoji)return this.isVisible=!1;let e=this.getData();if(!e)return this.isVisible=!1;if(this.unified=e.native||null,e.custom&&(this.custom=e.custom),!e.unified&&!e.custom)return this.isVisible=!1;if(this.tooltip&&(this.title=e.shortNames[0]),e.obsoletedBy&&this.hideObsolete)return this.isVisible=!1;if(this.label=[e.native].concat(e.shortNames).filter(Boolean).join(", "),this.isNative&&e.unified&&e.native)this.style={fontSize:`${this.size}px`},this.forceSize&&(this.style.display="inline-block",this.style.width=`${this.size}px`,this.style.height=`${this.size}px`,this.style["word-break"]="keep-all");else if(e.custom)this.style={width:`${this.size}px`,height:`${this.size}px`,display:"inline-block"},e.spriteUrl&&this.sheetRows&&this.sheetColumns?this.style=Ne(P({},this.style),{backgroundImage:`url(${e.spriteUrl})`,backgroundSize:`${100*this.sheetColumns}% ${100*this.sheetRows}%`,backgroundPosition:this.emojiService.getSpritePosition(e.sheet,this.sheetColumns)}):this.style=Ne(P({},this.style),{backgroundImage:`url(${e.imageUrl})`,backgroundSize:"contain"});else if(e.hidden.length&&e.hidden.includes(this.set))if(this.fallback)this.style={fontSize:`${this.size}px`},this.unified=this.fallback(e,this);else return this.isVisible=!1;else this.style=this.emojiService.emojiSpriteStyles(e.sheet,this.set,this.size,this.sheetSize,this.sheetRows,this.backgroundImageFn,this.sheetColumns,this.imageUrlFn?.(this.getData()));return this.isVisible=!0}ngOnDestroy(){this.destroy$.next()}getData(){return this.emojiService.getData(this.emoji,this.skin,this.set)}getSanitizedData(){return this.emojiService.getSanitizedData(this.emoji,this.skin,this.set)}setupMouseListeners(){let e=i=>this.button$.pipe(He(r=>r?ms(r,i):pn),$n(this.destroy$));e("click").subscribe(i=>{let r=this.getSanitizedData();this.emojiClickOutsideAngular.emit({emoji:r,$event:i}),this.emojiClick.observed&&this.ngZone.run(()=>this.emojiClick.emit({emoji:r,$event:i}))}),e("mouseenter").subscribe(i=>{let r=this.getSanitizedData();this.emojiOverOutsideAngular.emit({emoji:r,$event:i}),this.emojiOver.observed&&this.ngZone.run(()=>this.emojiOver.emit({emoji:r,$event:i}))}),e("mouseleave").subscribe(i=>{let r=this.getSanitizedData();this.emojiLeaveOutsideAngular.emit({emoji:r,$event:i}),this.emojiLeave.observed&&this.ngZone.run(()=>this.emojiLeave.emit({emoji:r,$event:i}))})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=M({type:n,selectors:[["ngx-emoji"]],viewQuery:function(i,r){if(i&1&&fe(qW,5),i&2){let s;W(s=q())&&(r.button=s.first)}},inputs:{skin:"skin",set:"set",sheetSize:"sheetSize",isNative:"isNative",forceSize:"forceSize",tooltip:"tooltip",size:"size",emoji:"emoji",fallback:"fallback",hideObsolete:"hideObsolete",sheetRows:"sheetRows",sheetColumns:"sheetColumns",useButton:"useButton",backgroundImageFn:"backgroundImageFn",imageUrlFn:"imageUrlFn"},outputs:{emojiOver:"emojiOver",emojiOverOutsideAngular:"emojiOverOutsideAngular",emojiLeave:"emojiLeave",emojiLeaveOutsideAngular:"emojiLeaveOutsideAngular",emojiClick:"emojiClick",emojiClickOutsideAngular:"emojiClickOutsideAngular"},standalone:!0,features:[at,J],ngContentSelectors:e4,decls:3,vars:1,consts:[["spanTpl",""],["button",""],[3,"ngIf"],["type","button","class","emoji-mart-emoji",3,"emoji-mart-emoji-native","emoji-mart-emoji-custom",4,"ngIf","ngIfElse"],["type","button",1,"emoji-mart-emoji"],[3,"ngStyle"],[1,"emoji-mart-emoji"]],template:function(i,r){i&1&&(_t(e4),F(0,QW,1,2,"ng-template",2)(1,YW,5,8,"ng-template",null,0,lt)),i&2&&u("ngIf",r.isVisible)},dependencies:[ce,ye,Pe],encapsulation:2,changeDetection:0})}return n})();function nq(n,t){if(n&1){let e=U();m(0,"span",3),k("click",function(r){E(e);let s=p().index,o=p();return D(o.handleClick(r,s))}),m(1,"div"),oe(),m(2,"svg",4),b(3,"path"),g()(),Ar(),b(4,"span",5),g()}if(n&2){let e=p().$implicit,i=p();Pr("color",e.name===i.selected?i.color:null),Ct("emoji-mart-anchor-selected",e.name===i.selected),w("title",i.i18n.categories[e.id]),h(3),w("d",i.icons[e.id]),h(),Pr("background-color",i.color)}}function iq(n,t){if(n&1&&F(0,nq,5,8,"span",2),n&2){let e=t.$implicit;u("ngIf",e.anchor!==!1)}}var rq=["container"],sq=["label"];function oq(n,t){if(n&1){let e=U();m(0,"ngx-emoji",9),k("emojiOverOutsideAngular",function(r){E(e);let s=p(3);return D(s.emojiOverOutsideAngular.emit(r))})("emojiLeaveOutsideAngular",function(r){E(e);let s=p(3);return D(s.emojiLeaveOutsideAngular.emit(r))})("emojiClickOutsideAngular",function(r){E(e);let s=p(3);return D(s.emojiClickOutsideAngular.emit(r))}),g()}if(n&2){let e=t.$implicit,i=p(3);u("emoji",e)("size",i.emojiSize)("skin",i.emojiSkin)("isNative",i.emojiIsNative)("set",i.emojiSet)("sheetSize",i.emojiSheetSize)("forceSize",i.emojiForceSize)("tooltip",i.emojiTooltip)("backgroundImageFn",i.emojiBackgroundImageFn)("imageUrlFn",i.emojiImageUrlFn)("hideObsolete",i.hideObsolete)("useButton",i.emojiUseButton)}}function aq(n,t){if(n&1&&(m(0,"div"),F(1,oq,1,12,"ngx-emoji",8),g()),n&2){let e=t.ngIf,i=p(2);h(),u("ngForOf",e)("ngForTrackBy",i.trackById)}}function lq(n,t){if(n&1&&(m(0,"div"),F(1,aq,2,2,"div",7),On(2,"async"),g()),n&2){let e=p();h(),u("ngIf",Zu(2,1,e.filteredEmojis$))}}function cq(n,t){if(n&1&&(m(0,"div")(1,"div"),b(2,"ngx-emoji",10),g(),m(3,"div",11),V(4),g()()),n&2){let e=p();h(2),u("emoji",e.notFoundEmoji)("size",38)("skin",e.emojiSkin)("isNative",e.emojiIsNative)("set",e.emojiSet)("sheetSize",e.emojiSheetSize)("forceSize",e.emojiForceSize)("tooltip",e.emojiTooltip)("backgroundImageFn",e.emojiBackgroundImageFn)("useButton",e.emojiUseButton),h(2),Ot(" ",e.i18n.notfound," ")}}function uq(n,t){if(n&1){let e=U();m(0,"ngx-emoji",9),k("emojiOverOutsideAngular",function(r){E(e);let s=p(2);return D(s.emojiOverOutsideAngular.emit(r))})("emojiLeaveOutsideAngular",function(r){E(e);let s=p(2);return D(s.emojiLeaveOutsideAngular.emit(r))})("emojiClickOutsideAngular",function(r){E(e);let s=p(2);return D(s.emojiClickOutsideAngular.emit(r))}),g()}if(n&2){let e=t.$implicit,i=p(2);u("emoji",e)("size",i.emojiSize)("skin",i.emojiSkin)("isNative",i.emojiIsNative)("set",i.emojiSet)("sheetSize",i.emojiSheetSize)("forceSize",i.emojiForceSize)("tooltip",i.emojiTooltip)("backgroundImageFn",i.emojiBackgroundImageFn)("imageUrlFn",i.emojiImageUrlFn)("hideObsolete",i.hideObsolete)("useButton",i.emojiUseButton)}}function dq(n,t){if(n&1&&F(0,uq,1,12,"ngx-emoji",8),n&2){let e=p();u("ngForOf",e.emojisToDisplay)("ngForTrackBy",e.trackById)}}function hq(n,t){if(n&1){let e=U();m(0,"span",2)(1,"span",3),k("click",function(){let r=E(e).$implicit,s=p();return D(s.handleClick(r))})("keyup.enter",function(){let r=E(e).$implicit,s=p();return D(s.handleClick(r))})("keyup.space",function(){let r=E(e).$implicit,s=p();return D(s.handleClick(r))}),g()()}if(n&2){let e=t.$implicit,i=p();Ct("selected",e===i.skin),h(),c1("emoji-mart-skin emoji-mart-skin-tone-",e,""),u("tabIndex",i.tabIndex(e)),w("aria-hidden",!i.isVisible(e))("aria-pressed",i.pressed(e))("aria-haspopup",!!i.isSelected(e))("aria-expanded",i.expanded(e))("aria-label",i.i18n.skintones[e])("title",i.i18n.skintones[e])}}function fq(n,t){if(n&1&&(m(0,"span",11),V(1),g()),n&2){let e=t.$implicit;h(),Ot(" :",e,": ")}}function pq(n,t){if(n&1&&(m(0,"span",15),V(1),g()),n&2){let e=t.$implicit;h(),Ot(" ",e," ")}}function mq(n,t){if(n&1&&(m(0,"div",8)(1,"div",2),b(2,"ngx-emoji",9),g(),m(3,"div",4)(4,"div",10),V(5),g(),m(6,"div",11),F(7,fq,2,1,"span",12),g(),m(8,"div",13),F(9,pq,2,1,"span",14),g()()()),n&2){let e=p();h(2),u("emoji",e.emoji)("size",38)("isNative",e.emojiIsNative)("skin",e.emojiSkin)("size",e.emojiSize)("set",e.emojiSet)("sheetSize",e.emojiSheetSize)("backgroundImageFn",e.emojiBackgroundImageFn)("imageUrlFn",e.emojiImageUrlFn),h(3),Ce(e.emojiData.name),h(2),u("ngForOf",e.emojiData.shortNames),h(2),u("ngForOf",e.listedEmoticons)}}function gq(n,t){if(n&1&&b(0,"ngx-emoji",16),n&2){let e=p();u("isNative",e.emojiIsNative)("skin",e.emojiSkin)("set",e.emojiSet)("emoji",e.idleEmoji)("backgroundImageFn",e.emojiBackgroundImageFn)("size",38)("imageUrlFn",e.emojiImageUrlFn)}}var Fq=["inputRef"],_q=["scrollRef"];function yq(n,t){if(n&1){let e=U();m(0,"emoji-search",8),k("searchResults",function(r){E(e);let s=p();return D(s.handleSearch(r))})("enterKeyOutsideAngular",function(r){E(e);let s=p();return D(s.handleEnterKey(r))}),g()}if(n&2){let e=p();u("i18n",e.i18n)("include",e.include)("exclude",e.exclude)("custom",e.custom)("autoFocus",e.autoFocus)("icons",e.searchIcons)("emojisToShowFilter",e.emojisToShowFilter)}}function wq(n,t){if(n&1){let e=U();m(0,"emoji-category",9),k("emojiOverOutsideAngular",function(r){E(e);let s=p();return D(s.handleEmojiOver(r))})("emojiLeaveOutsideAngular",function(){E(e);let r=p();return D(r.handleEmojiLeave())})("emojiClickOutsideAngular",function(r){E(e);let s=p();return D(s.handleEmojiClick(r))}),g()}if(n&2){let e=t.$implicit,i=p();u("id",e.id)("name",e.name)("emojis",e.emojis)("perLine",i.perLine)("totalFrequentLines",i.totalFrequentLines)("hasStickyPosition",i.isNative)("i18n",i.i18n)("hideObsolete",i.hideObsolete)("notFoundEmoji",i.notFoundEmoji)("custom",e.id===i.RECENT_CATEGORY.id?i.CUSTOM_CATEGORY.emojis:void 0)("recent",e.id===i.RECENT_CATEGORY.id?i.recent:void 0)("virtualize",i.virtualize)("virtualizeOffset",i.virtualizeOffset)("emojiIsNative",i.isNative)("emojiSkin",i.skin)("emojiSize",i.emojiSize)("emojiSet",i.set)("emojiSheetSize",i.sheetSize)("emojiForceSize",i.isNative)("emojiTooltip",i.emojiTooltip)("emojiBackgroundImageFn",i.backgroundImageFn)("emojiImageUrlFn",i.imageUrlFn)("emojiUseButton",i.useButton)}}function vq(n,t){if(n&1){let e=U();m(0,"div",2)(1,"emoji-preview",10),k("skinChange",function(r){E(e);let s=p();return D(s.handleSkinChange(r))}),g()()}if(n&2){let e=p();h(),u("emoji",e.previewEmoji)("idleEmoji",e.emoji)("emojiIsNative",e.isNative)("emojiSize",38)("emojiSkin",e.skin)("emojiSet",e.set)("i18n",e.i18n)("emojiSheetSize",e.sheetSize)("emojiBackgroundImageFn",e.backgroundImageFn)("emojiImageUrlFn",e.imageUrlFn),w("title",e.title)}}var bq=(()=>{class n{categories=[];color;selected;i18n;icons={};anchorClick=new R;trackByFn(e,i){return i.id}handleClick(e,i){this.anchorClick.emit({category:this.categories[i],index:i})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=M({type:n,selectors:[["emoji-mart-anchors"]],inputs:{categories:"categories",color:"color",selected:"selected",i18n:"i18n",icons:"icons"},outputs:{anchorClick:"anchorClick"},standalone:!0,features:[J],decls:2,vars:2,consts:[[1,"emoji-mart-anchors"],["ngFor","",3,"ngForOf","ngForTrackBy"],["class","emoji-mart-anchor",3,"emoji-mart-anchor-selected","color","click",4,"ngIf"],[1,"emoji-mart-anchor",3,"click"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 24","width","24","height","24"],[1,"emoji-mart-anchor-bar"]],template:function(i,r){i&1&&(m(0,"div",0),F(1,iq,1,1,"ng-template",1),g()),i&2&&(h(),u("ngForOf",r.categories)("ngForTrackBy",r.trackByFn))},dependencies:[ce,yt,ye],encapsulation:2,changeDetection:0})}return n})(),c4=(()=>{class n{platformId;NAMESPACE="emoji-mart";frequently=null;defaults={};initialized=!1;DEFAULTS=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","poop"];constructor(e){this.platformId=e}init(){this.frequently=JSON.parse(ct(this.platformId)&&localStorage.getItem(`${this.NAMESPACE}.frequently`)||"null"),this.initialized=!0}add(e){this.initialized||this.init(),this.frequently||(this.frequently=this.defaults),this.frequently[e.id]||(this.frequently[e.id]=0),this.frequently[e.id]+=1,ct(this.platformId)&&(localStorage.setItem(`${this.NAMESPACE}.last`,e.id),localStorage.setItem(`${this.NAMESPACE}.frequently`,JSON.stringify(this.frequently)))}get(e,i){if(this.initialized||this.init(),this.frequently===null){this.defaults={};let c=[];for(let d=0;dthis.frequently[c]-this.frequently[d]).reverse().slice(0,r),l=ct(this.platformId)&&localStorage.getItem(`${this.NAMESPACE}.last`);return l&&!a.includes(l)&&(a.pop(),a.push(l)),a}static \u0275fac=function(i){return new(i||n)(z(Qe))};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),n4=(()=>{class n{ref;emojiService;frequently;emojis=null;hasStickyPosition=!0;name="";perLine=9;totalFrequentLines=4;recent=[];custom=[];i18n;id;hideObsolete=!0;notFoundEmoji;virtualize=!1;virtualizeOffset=0;emojiIsNative;emojiSkin;emojiSize;emojiSet;emojiSheetSize;emojiForceSize;emojiTooltip;emojiBackgroundImageFn;emojiImageUrlFn;emojiUseButton;emojiOverOutsideAngular=new R;emojiLeaveOutsideAngular=new R;emojiClickOutsideAngular=new R;container;label;containerStyles={};emojisToDisplay=[];filteredEmojisSubject=new Be;filteredEmojis$=this.filteredEmojisSubject.asObservable();labelStyles={};labelSpanStyles={};margin=0;minMargin=0;maxMargin=0;top=0;rows=0;constructor(e,i,r){this.ref=e,this.emojiService=i,this.frequently=r}ngOnInit(){this.updateRecentEmojis(),this.emojisToDisplay=this.filterEmojis(),this.noEmojiToDisplay&&(this.containerStyles={display:"none"}),this.hasStickyPosition||(this.labelStyles={height:28})}ngOnChanges(e){e.emojis?.currentValue?.length!==e.emojis?.previousValue?.length&&(this.emojisToDisplay=this.filterEmojis(),this.ngAfterViewInit())}ngAfterViewInit(){if(!this.virtualize)return;let{width:e}=this.container.nativeElement.getBoundingClientRect(),i=Math.floor(e/(this.emojiSize+12));this.rows=Math.ceil(this.emojisToDisplay.length/i),this.containerStyles=Ne(P({},this.containerStyles),{minHeight:`${this.rows*(this.emojiSize+12)+28}px`}),this.ref.detectChanges(),this.handleScroll(this.container.nativeElement.parentNode.parentNode.scrollTop)}get noEmojiToDisplay(){return this.emojisToDisplay.length===0}memoizeSize(){let e=this.container.nativeElement.parentNode.parentNode,{top:i,height:r}=this.container.nativeElement.getBoundingClientRect(),s=e.getBoundingClientRect().top,o=this.label.nativeElement.getBoundingClientRect().height;this.top=i-s+e.scrollTop,r===0?this.maxMargin=0:this.maxMargin=r-o}handleScroll(e){let i=e-this.top;if(i=ithis.maxMargin?this.maxMargin:i,this.virtualize){let{top:r,height:s}=this.container.nativeElement.getBoundingClientRect(),o=this.container.nativeElement.parentNode.parentNode.clientHeight;o+(o+this.virtualizeOffset)>=r&&-s-(o+this.virtualizeOffset)<=r?this.filteredEmojisSubject.next(this.emojisToDisplay):this.filteredEmojisSubject.next([])}return i===this.margin?(this.ref.detectChanges(),!1):(this.hasStickyPosition||(this.label.nativeElement.style.top=`${i}px`),this.margin=i,this.ref.detectChanges(),!0)}updateRecentEmojis(){if(this.name!=="Recent")return;let e=this.recent||this.frequently.get(this.perLine,this.totalFrequentLines);(!e||!e.length)&&(e=this.frequently.get(this.perLine,this.totalFrequentLines)),e.length&&(this.emojis=e.map(i=>{let r=this.custom.filter(s=>s.id===i)[0];return r||i}).filter(i=>!!this.emojiService.getData(i)))}updateDisplay(e){this.containerStyles.display=e,this.updateRecentEmojis(),this.ref.detectChanges()}trackById(e,i){return i}filterEmojis(){let e=[];for(let i of this.emojis||[]){if(!i)continue;let r=this.emojiService.getData(i);!r||r.obsoletedBy&&this.hideObsolete||!r.unified&&!r.custom||e.push(i)}return e}static \u0275fac=function(i){return new(i||n)(v(ke),v(sc),v(c4))};static \u0275cmp=M({type:n,selectors:[["emoji-category"]],viewQuery:function(i,r){if(i&1&&(fe(rq,7),fe(sq,7)),i&2){let s;W(s=q())&&(r.container=s.first),W(s=q())&&(r.label=s.first)}},inputs:{emojis:"emojis",hasStickyPosition:"hasStickyPosition",name:"name",perLine:"perLine",totalFrequentLines:"totalFrequentLines",recent:"recent",custom:"custom",i18n:"i18n",id:"id",hideObsolete:"hideObsolete",notFoundEmoji:"notFoundEmoji",virtualize:"virtualize",virtualizeOffset:"virtualizeOffset",emojiIsNative:"emojiIsNative",emojiSkin:"emojiSkin",emojiSize:"emojiSize",emojiSet:"emojiSet",emojiSheetSize:"emojiSheetSize",emojiForceSize:"emojiForceSize",emojiTooltip:"emojiTooltip",emojiBackgroundImageFn:"emojiBackgroundImageFn",emojiImageUrlFn:"emojiImageUrlFn",emojiUseButton:"emojiUseButton"},outputs:{emojiOverOutsideAngular:"emojiOverOutsideAngular",emojiLeaveOutsideAngular:"emojiLeaveOutsideAngular",emojiClickOutsideAngular:"emojiClickOutsideAngular"},standalone:!0,features:[at,J],decls:10,vars:11,consts:[["container",""],["label",""],["normalRenderTemplate",""],[1,"emoji-mart-category",3,"ngStyle"],[1,"emoji-mart-category-label",3,"ngStyle"],["aria-hidden","true",3,"ngStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],[3,"emoji","size","skin","isNative","set","sheetSize","forceSize","tooltip","backgroundImageFn","imageUrlFn","hideObsolete","useButton","emojiOverOutsideAngular","emojiLeaveOutsideAngular","emojiClickOutsideAngular",4,"ngFor","ngForOf","ngForTrackBy"],[3,"emojiOverOutsideAngular","emojiLeaveOutsideAngular","emojiClickOutsideAngular","emoji","size","skin","isNative","set","sheetSize","forceSize","tooltip","backgroundImageFn","imageUrlFn","hideObsolete","useButton"],[3,"emoji","size","skin","isNative","set","sheetSize","forceSize","tooltip","backgroundImageFn","useButton"],[1,"emoji-mart-no-results-label"]],template:function(i,r){if(i&1&&(m(0,"section",3,0)(2,"div",4)(3,"span",5,1),V(5),g()(),F(6,lq,3,3,"div",6)(7,cq,5,11,"div",7),g(),F(8,dq,1,2,"ng-template",null,2,lt)),i&2){let s=st(9);Ct("emoji-mart-no-results",r.noEmojiToDisplay),u("ngStyle",r.containerStyles),w("aria-label",r.i18n.categories[r.id]),h(2),u("ngStyle",r.labelStyles),w("data-name",r.name),h(),u("ngStyle",r.labelSpanStyles),h(2),Ot(" ",r.i18n.categories[r.id]," "),h(),u("ngIf",r.virtualize)("ngIfElse",s),h(),u("ngIf",r.noEmojiToDisplay)}},dependencies:[ce,yt,ye,Pe,ab,d_],encapsulation:2,changeDetection:0})}return n})();function i4(n){return n.reduce((t,e)=>(t.includes(e)||t.push(e),t),[])}function Cq(n,t){let e=i4(n),i=i4(t);return e.filter(r=>i.indexOf(r)>=0)}function Eq(){if(typeof document>"u")return 0;let n=document.createElement("div");n.style.width="100px",n.style.height="100px",n.style.overflow="scroll",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);let t=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),t}var Dq=(()=>{class n{emojiService;originalPool={};index={};emojisList={};emoticonsList={};emojiSearch={};constructor(e){this.emojiService=e;for(let i of this.emojiService.emojis){let{shortNames:r,emoticons:s}=i,o=r[0];for(let a of s)this.emoticonsList[a]||(this.emoticonsList[a]=o);this.emojisList[o]=this.emojiService.getSanitizedData(o),this.originalPool[o]=i}}addCustomToPool(e,i){for(let r of e){let s=r.id||r.shortNames[0];s&&!i[s]&&(i[s]=this.emojiService.getData(r),this.emojisList[s]=this.emojiService.getSanitizedData(r))}}search(e,i,r=75,s=[],o=[],a=[]){this.addCustomToPool(a,this.originalPool);let l,c=this.originalPool;if(e.length){if(e==="-"||e==="-1")return[this.emojisList[-1]];if(e==="+"||e==="+1")return[this.emojisList["+1"]];let d=e.toLowerCase().split(/[\s|,|\-|_]+/),f=[];if(d.length>2&&(d=[d[0],d[1]]),s.length||o.length){c={};for(let _ of u_||[]){let y=s&&s.length?s.indexOf(_.id)>-1:!0,C=o&&o.length?o.indexOf(_.id)>-1:!1;if(!(!y||C))for(let N of _.emojis||[]){let x=this.emojiService.getData(N);c[x?.id??""]=x}}if(a.length){let _=s&&s.length?s.indexOf("custom")>-1:!0,y=o&&o.length?o.indexOf("custom")>-1:!1;_&&!y&&this.addCustomToPool(a,c)}}f=d.map(_=>{let y=c,C=this.index,N=0;for(let x=0;x<_.length;x++){let O=_[x];if(N++,C[O]||(C[O]={}),C=C[O],!C.results){let G={};C.results=[],C.pool={};for(let re of Object.keys(y)){let te=y[re];this.emojiSearch[re]||(this.emojiSearch[re]=this.buildSearch(te.short_names,te.name,te.id,te.keywords,te.emoticons));let Je=this.emojiSearch[re],je=_.substr(0,N),rt=Je.indexOf(je);if(rt!==-1){let vt=rt+1;je===re&&(vt=0),C.results.push(this.emojisList[re]),C.pool[re]=te,G[re]=vt}}C.results.sort((re,te)=>{let Je=G[re.id],je=G[te.id];return Je-je})}y=C.pool}return C.results}).filter(_=>_),f.length>1?l=Cq.apply(null,f):f.length?l=f[0]:l=[]}return l&&(i&&(l=l.filter(d=>d&&d.id?i(this.emojiService.names[d.id]):!1)),l&&l.length>r&&(l=l.slice(0,r))),l||null}buildSearch(e,i,r,s,o){let a=[],l=(c,d)=>{if(!c)return;let f=Array.isArray(c)?c:[c];for(let _ of f){let y=d?_.split(/[-|_|\s]+/):[_];for(let C of y)C=C.toLowerCase(),a.includes(C)||a.push(C)}};return l(e,!0),l(i,!0),l(r,!0),l(s,!0),l(o,!1),a.join(",")}static \u0275fac=function(i){return new(i||n)(z(sc))};static \u0275prov=H({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Iq=(()=>{class n{skin;i18n;changeSkin=new R;opened=!1;skinTones=[1,2,3,4,5,6];toggleOpen(){this.opened=!this.opened}isSelected(e){return e===this.skin}isVisible(e){return this.opened||this.isSelected(e)}pressed(e){return this.opened?!!this.isSelected(e):""}tabIndex(e){return this.isVisible(e)?"0":""}expanded(e){return this.isSelected(e)?this.opened:""}handleClick(e){if(!this.opened){this.opened=!0;return}this.opened=!1,e!==this.skin&&this.changeSkin.emit(e)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=M({type:n,selectors:[["emoji-skins"]],inputs:{skin:"skin",i18n:"i18n"},outputs:{changeSkin:"changeSkin"},standalone:!0,features:[J],decls:2,vars:3,consts:[[1,"emoji-mart-skin-swatches"],["class","emoji-mart-skin-swatch",3,"selected",4,"ngFor","ngForOf"],[1,"emoji-mart-skin-swatch"],["role","button",3,"click","keyup.enter","keyup.space","tabIndex"]],template:function(i,r){i&1&&(m(0,"section",0),F(1,hq,2,12,"span",1),g()),i&2&&(Ct("opened",r.opened),h(),u("ngForOf",r.skinTones))},dependencies:[ce,yt],encapsulation:2,changeDetection:0})}return n})(),r4=(()=>{class n{ref;emojiService;title;emoji;idleEmoji;i18n;emojiIsNative;emojiSkin;emojiSize;emojiSet;emojiSheetSize;emojiBackgroundImageFn;emojiImageUrlFn;skinChange=new R;emojiData={};listedEmoticons;constructor(e,i){this.ref=e,this.emojiService=i}ngOnChanges(){if(!this.emoji)return;this.emojiData=this.emojiService.getData(this.emoji,this.emojiSkin,this.emojiSet);let e=[],i=[];(this.emojiData.emoticons||[]).forEach(s=>{e.indexOf(s.toLowerCase())>=0||(e.push(s.toLowerCase()),i.push(s))}),this.listedEmoticons=i,this.ref?.detectChanges()}static \u0275fac=function(i){return new(i||n)(v(ke),v(sc))};static \u0275cmp=M({type:n,selectors:[["emoji-preview"]],inputs:{title:"title",emoji:"emoji",idleEmoji:"idleEmoji",i18n:"i18n",emojiIsNative:"emojiIsNative",emojiSkin:"emojiSkin",emojiSize:"emojiSize",emojiSet:"emojiSet",emojiSheetSize:"emojiSheetSize",emojiBackgroundImageFn:"emojiBackgroundImageFn",emojiImageUrlFn:"emojiImageUrlFn"},outputs:{skinChange:"skinChange"},standalone:!0,features:[at,J],decls:9,vars:6,consts:[["class","emoji-mart-preview",4,"ngIf"],[1,"emoji-mart-preview",3,"hidden"],[1,"emoji-mart-preview-emoji"],[3,"isNative","skin","set","emoji","backgroundImageFn","size","imageUrlFn",4,"ngIf"],[1,"emoji-mart-preview-data"],[1,"emoji-mart-title-label"],[1,"emoji-mart-preview-skins"],[3,"changeSkin","skin","i18n"],[1,"emoji-mart-preview"],[3,"emoji","size","isNative","skin","set","sheetSize","backgroundImageFn","imageUrlFn"],[1,"emoji-mart-preview-name"],[1,"emoji-mart-preview-shortname"],["class","emoji-mart-preview-shortname",4,"ngFor","ngForOf"],[1,"emoji-mart-preview-emoticons"],["class","emoji-mart-preview-emoticon",4,"ngFor","ngForOf"],[1,"emoji-mart-preview-emoticon"],[3,"isNative","skin","set","emoji","backgroundImageFn","size","imageUrlFn"]],template:function(i,r){i&1&&(F(0,mq,10,12,"div",0),m(1,"div",1)(2,"div",2),F(3,gq,1,7,"ngx-emoji",3),g(),m(4,"div",4)(5,"span",5),V(6),g()(),m(7,"div",6)(8,"emoji-skins",7),k("changeSkin",function(o){return r.skinChange.emit(o)}),g()()()),i&2&&(u("ngIf",r.emoji&&r.emojiData),h(),u("hidden",r.emoji),h(2),u("ngIf",r.idleEmoji&&r.idleEmoji.length),h(3),Ce(r.title),h(2),u("skin",r.emojiSkin)("i18n",r.i18n))},dependencies:[ce,yt,ye,d_,Iq],encapsulation:2,changeDetection:0})}return n})(),kq=0,s4=(()=>{class n{ngZone;emojiSearch;maxResults=75;autoFocus=!1;i18n;include=[];exclude=[];custom=[];icons;emojisToShowFilter;searchResults=new R;enterKeyOutsideAngular=new R;inputRef;isSearching=!1;icon;query="";inputId=`emoji-mart-search-${++kq}`;destroy$=new Be;constructor(e,i){this.ngZone=e,this.emojiSearch=i}ngOnInit(){this.icon=this.icons.search,this.setupKeyupListener()}ngAfterViewInit(){this.autoFocus&&this.inputRef.nativeElement.focus()}ngOnDestroy(){this.destroy$.next()}clear(){this.query="",this.handleSearch(""),this.inputRef.nativeElement.focus()}handleSearch(e){e===""?(this.icon=this.icons.search,this.isSearching=!1):(this.icon=this.icons.delete,this.isSearching=!0);let i=this.emojiSearch.search(this.query,this.emojisToShowFilter,this.maxResults,this.include,this.exclude,this.custom);this.searchResults.emit(i)}handleChange(){this.handleSearch(this.query)}setupKeyupListener(){this.ngZone.runOutsideAngular(()=>ms(this.inputRef.nativeElement,"keyup").pipe($n(this.destroy$)).subscribe(e=>{!this.query||e.key!=="Enter"||(this.enterKeyOutsideAngular.emit(e),e.preventDefault())}))}static \u0275fac=function(i){return new(i||n)(v(se),v(Dq))};static \u0275cmp=M({type:n,selectors:[["emoji-search"]],viewQuery:function(i,r){if(i&1&&fe(Fq,7),i&2){let s;W(s=q())&&(r.inputRef=s.first)}},inputs:{maxResults:"maxResults",autoFocus:"autoFocus",i18n:"i18n",include:"include",exclude:"exclude",custom:"custom",icons:"icons",emojisToShowFilter:"emojisToShowFilter"},outputs:{searchResults:"searchResults",enterKeyOutsideAngular:"enterKeyOutsideAngular"},standalone:!0,features:[J],decls:8,vars:9,consts:[["inputRef",""],[1,"emoji-mart-search"],["type","search",3,"ngModelChange","id","placeholder","autofocus","ngModel"],[1,"emoji-mart-sr-only",3,"htmlFor"],["type","button",1,"emoji-mart-search-icon",3,"click","keyup.enter","disabled"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 20 20","width","13","height","13","opacity","0.5"]],template:function(i,r){if(i&1){let s=U();m(0,"div",1)(1,"input",2,0),Mn("ngModelChange",function(a){return E(s),Yn(r.query,a)||(r.query=a),D(a)}),k("ngModelChange",function(){return E(s),D(r.handleChange())}),g(),m(3,"label",3),V(4),g(),m(5,"button",4),k("click",function(){return E(s),D(r.clear())})("keyup.enter",function(){return E(s),D(r.clear())}),oe(),m(6,"svg",5),b(7,"path"),g()()()}i&2&&(h(),u("id",r.inputId)("placeholder",r.i18n.search)("autofocus",r.autoFocus),An("ngModel",r.query),h(2),u("htmlFor",r.inputId),h(),Ot(" ",r.i18n.search," "),h(),u("disabled",!r.isSearching),w("aria-label",r.i18n.clear),h(2),w("d",r.icon))},dependencies:[Gs,In,kn,Vn],encapsulation:2})}return n})(),o4={activity:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24m10 11h-5c.3-2.5 1.3-4.8 2-6.1a10 10 0 0 1 3 6.1m-9 0V2a10 10 0 0 1 4.4 1.6A18 18 0 0 0 15 11h-2zm-2 0H9a18 18 0 0 0-2.4-7.4A10 10 0 0 1 11 2.1V11zm0 2v9a10 10 0 0 1-4.4-1.6A18 18 0 0 0 9 13h2zm4 0a18 18 0 0 0 2.4 7.4 10 10 0 0 1-4.4 1.5V13h2zM5 4.9c.7 1.3 1.7 3.6 2 6.1H2a10 10 0 0 1 3-6.1M2 13h5c-.3 2.5-1.3 4.8-2 6.1A10 10 0 0 1 2 13m17 6.1c-.7-1.3-1.7-3.6-2-6.1h5a10 10 0 0 1-3 6.1",custom:"M10 1h3v21h-3zm10.186 4l1.5 2.598L3.5 18.098 2 15.5zM2 7.598L3.5 5l18.186 10.5-1.5 2.598z",flags:"M0 0l6 24h2L2 0zm21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.6 3h7.8l2 8H8.6l-2-8zm8.8 10l-2.9 1.9-.4-1.9h3.3zm3.6 0l-1.5-6h2l2 8H16l3-2z",foods:"M17 5c-1.8 0-2.9.4-3.7 1 .5-1.3 1.8-3 4.7-3a1 1 0 0 0 0-2c-3 0-4.6 1.3-5.5 2.5l-.2.2c-.6-1.9-1.5-3.7-3-3.7C8.5 0 7.7.3 7 1c-2 1.5-1.7 2.9-.5 4C3.6 5.2 0 7.4 0 13c0 4.6 5 11 9 11 2 0 2.4-.5 3-1 .6.5 1 1 3 1 4 0 9-6.4 9-11 0-6-4-8-7-8M8.2 2.5c.7-.5 1-.5 1-.5.4.2 1 1.4 1.4 3-1.6-.6-2.8-1.3-3-1.8l.6-.7M15 22c-1 0-1.2-.1-1.6-.4l-.1-.2a2 2 0 0 0-2.6 0l-.1.2c-.4.3-.5.4-1.6.4-2.8 0-7-5.4-7-9 0-6 4.5-6 5-6 2 0 2.5.4 3.4 1.2l.3.3a2 2 0 0 0 2.6 0l.3-.3c1-.8 1.5-1.2 3.4-1.2.5 0 5 .1 5 6 0 3.6-4.2 9-7 9",nature:"M15.5 8a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m-7 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m10.43-8h-.02c-.97 0-2.14.79-3.02 1.5A13.88 13.88 0 0 0 12 .99c-1.28 0-2.62.13-3.87.51C7.24.8 6.07 0 5.09 0h-.02C3.35 0 .07 2.67 0 7.03c-.04 2.47.28 4.23 1.04 5 .26.27.88.69 1.3.9.19 3.17.92 5.23 2.53 6.37.9.64 2.19.95 3.2 1.1-.03.2-.07.4-.07.6 0 1.77 2.35 3 4 3s4-1.23 4-3c0-.2-.04-.4-.07-.59 2.57-.38 5.43-1.87 5.92-7.58.4-.22.89-.57 1.1-.8.77-.76 1.09-2.52 1.05-5C23.93 2.67 20.65 0 18.93 0M3.23 9.13c-.24.29-.84 1.16-.9 1.24A9.67 9.67 0 0 1 2 7.08c.05-3.28 2.48-4.97 3.1-5.03.25.02.72.27 1.26.65A7.95 7.95 0 0 0 4 7.82c-.14.55-.4.86-.79 1.31M12 22c-.9 0-1.95-.7-2-1 0-.65.47-1.24 1-1.6v.6a1 1 0 1 0 2 0v-.6c.52.36 1 .95 1 1.6-.05.3-1.1 1-2 1m3-3.48v.02a4.75 4.75 0 0 0-1.26-1.02c1.09-.52 2.24-1.33 2.24-2.22 0-1.84-1.78-2.2-3.98-2.2s-3.98.36-3.98 2.2c0 .89 1.15 1.7 2.24 2.22A4.8 4.8 0 0 0 9 18.54v-.03a6.1 6.1 0 0 1-2.97-.84c-1.3-.92-1.84-3.04-1.86-6.48l.03-.04c.5-.82 1.49-1.45 1.8-3.1C6 6 7.36 4.42 8.36 3.53c1.01-.35 2.2-.53 3.59-.53 1.45 0 2.68.2 3.73.57 1 .9 2.32 2.46 2.32 4.48.31 1.65 1.3 2.27 1.8 3.1l.1.18c-.06 5.97-1.95 7.01-4.9 7.19m6.63-8.2l-.11-.2a7.59 7.59 0 0 0-.74-.98 3.02 3.02 0 0 1-.79-1.32 7.93 7.93 0 0 0-2.35-5.12c.53-.38 1-.63 1.26-.65.64.07 3.05 1.77 3.1 5.03.02 1.81-.35 3.22-.37 3.24",objects:"M12 0a9 9 0 0 0-5 16.5V21s2 3 5 3 5-3 5-3v-4.5A9 9 0 0 0 12 0zm0 2a7 7 0 1 1 0 14 7 7 0 0 1 0-14zM9 17.5a9 9 0 0 0 6 0v.8a7 7 0 0 1-3 .7 7 7 0 0 1-3-.7v-.8zm.2 3a8.9 8.9 0 0 0 2.8.5c1 0 1.9-.2 2.8-.5-.6.7-1.6 1.5-2.8 1.5-1.1 0-2.1-.8-2.8-1.5zm5.5-8.1c-.8 0-1.1-.8-1.5-1.8-.5-1-.7-1.5-1.2-1.5s-.8.5-1.3 1.5c-.4 1-.8 1.8-1.6 1.8h-.3c-.5-.2-.8-.7-1.3-1.8l-.2-1A3 3 0 0 0 7 9a1 1 0 0 1 0-2c1.7 0 2 1.4 2.2 2.1.5-1 1.3-2 2.8-2 1.5 0 2.3 1.1 2.7 2.1.2-.8.6-2.2 2.3-2.2a1 1 0 1 1 0 2c-.2 0-.3.5-.3.7a6.5 6.5 0 0 1-.3 1c-.5 1-.8 1.7-1.7 1.7",people:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24m0 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20M8 7a2 2 0 1 0 0 4 2 2 0 0 0 0-4m8 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4m-.8 8c-.7 1.2-1.8 2-3.3 2-1.5 0-2.7-.8-3.4-2H15m3-2H6a6 6 0 1 0 12 0",places:"M6.5 12a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5m11-3a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 3c-.3 0-.5-.2-.5-.5s.2-.5.5-.5.5.2.5.5-.2.5-.5.5m5-5.5l-1-.4-.1-.1h.6c.6 0 1-.4 1-1 0-1-.9-2-2-2h-.6l-.8-1.7A3 3 0 0 0 16.8 2H7.2a3 3 0 0 0-2.8 2.3L3.6 6H3a2 2 0 0 0-2 2c0 .6.4 1 1 1h.6v.1l-1 .4a2 2 0 0 0-1.4 2l.7 7.6a1 1 0 0 0 1 .9H3v1c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-1h6v1c0 1.1.9 2 2 2h2a2 2 0 0 0 2-2v-1h1.1a1 1 0 0 0 1-.9l.7-7.5a2 2 0 0 0-1.3-2.1M6.3 4.9c.1-.5.5-.9 1-.9h9.5c.4 0 .8.4 1 .9L19.2 9H4.7l1.6-4.1zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.2-3H2.8l-.7-6.6.9-.4h18l.9.4-.7 6.6z",recent:"M13 4h-2v7H9v2h2v2h2v-2h4v-2h-4zm-1-4a12 12 0 1 0 0 24 12 12 0 0 0 0-24m0 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20",symbols:"M0 0h11v2H0zm4 11h3V6h4V4H0v2h4zm11.5 6a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5m0-2.99a.5.5 0 0 1 0 .99c-.28 0-.5-.22-.5-.5s.22-.49.5-.49m6 5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5m0 2.99a.5.5 0 0 1-.5-.5.5.5 0 0 1 1 .01.5.5 0 0 1-.5.49m.5-9l-9 9 1.51 1.5 9-9zm-5-2c2.2 0 4-1.12 4-2.5V2s.98-.16 1.5.95C23 4.05 23 6 23 6s1-1.12 1-3.13C24-.02 21 0 21 0h-2v6.35A5.85 5.85 0 0 0 17 6c-2.2 0-4 1.12-4 2.5s1.8 2.5 4 2.5m-6.7 9.48L8.82 18.9a47.54 47.54 0 0 1-1.44 1.13c-.3-.3-.99-1.02-2.04-2.19.9-.83 1.47-1.46 1.72-1.89s.38-.87.38-1.33c0-.6-.27-1.18-.82-1.76-.54-.58-1.33-.87-2.35-.87-1 0-1.79.29-2.34.87-.56.6-.83 1.18-.83 1.79 0 .81.42 1.75 1.25 2.8a6.57 6.57 0 0 0-1.8 1.79 3.46 3.46 0 0 0-.51 1.83c0 .86.3 1.56.92 2.1a3.5 3.5 0 0 0 2.42.83c1.17 0 2.44-.38 3.81-1.14L8.23 24h2.82l-2.09-2.38 1.34-1.14zM3.56 14.1a1.02 1.02 0 0 1 .73-.28c.31 0 .56.08.75.25a.85.85 0 0 1 .28.66c0 .52-.42 1.11-1.26 1.78-.53-.65-.8-1.23-.8-1.74a.9.9 0 0 1 .3-.67m.18 7.9c-.43 0-.78-.12-1.06-.35-.28-.23-.41-.49-.41-.76 0-.6.5-1.3 1.52-2.09a31.23 31.23 0 0 0 2.25 2.44c-.92.5-1.69.76-2.3.76"},a4={search:"M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z",delete:"M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"},l4={search:"Search",emojilist:"List of emoji",notfound:"No Emoji Found",clear:"Clear",categories:{search:"Search Results",recent:"Frequently Used",people:"Smileys & People",nature:"Animals & Nature",foods:"Food & Drink",activity:"Activity",places:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags",custom:"Custom"},skintones:{1:"Default Skin Tone",2:"Light Skin Tone",3:"Medium-Light Skin Tone",4:"Medium Skin Tone",5:"Medium-Dark Skin Tone",6:"Dark Skin Tone"}},gf=(()=>{class n{ngZone;renderer;ref;frequently;platformId;perLine=9;totalFrequentLines=4;i18n={};style={};title="Emoji Mart\u2122";emoji="department_store";darkMode=!!(typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches);color="#ae65c5";hideObsolete=!0;categories=[];activeCategories=[];set="apple";skin=1;isNative=!1;emojiSize=24;sheetSize=64;emojisToShowFilter;showPreview=!0;emojiTooltip=!1;autoFocus=!1;custom=[];hideRecent=!0;imageUrlFn;include;exclude;notFoundEmoji="sleuth_or_spy";categoriesIcons=o4;searchIcons=a4;useButton=!1;enableFrequentEmojiSort=!1;enableSearch=!0;showSingleCategory=!1;virtualize=!1;virtualizeOffset=0;recent;emojiClick=new R;emojiSelect=new R;skinChange=new R;scrollRef;previewRef;searchRef;categoryRefs;scrollHeight=0;clientHeight=0;clientWidth=0;selected;nextScroll;scrollTop;firstRender=!0;previewEmoji=null;animationFrameRequestId=null;NAMESPACE="emoji-mart";measureScrollbar=0;RECENT_CATEGORY={id:"recent",name:"Recent",emojis:null};SEARCH_CATEGORY={id:"search",name:"Search",emojis:null,anchor:!1};CUSTOM_CATEGORY={id:"custom",name:"Custom",emojis:[]};scrollListener;backgroundImageFn=(e,i)=>`https://cdn.jsdelivr.net/npm/emoji-datasource-${e}@14.0.0/img/${e}/sheets-256/${i}.png`;constructor(e,i,r,s,o){this.ngZone=e,this.renderer=i,this.ref=r,this.frequently=s,this.platformId=o}ngOnInit(){this.measureScrollbar=Eq(),this.i18n=P(P({},l4),this.i18n),this.i18n.categories=P(P({},l4.categories),this.i18n.categories),this.skin=JSON.parse(ct(this.platformId)&&localStorage.getItem(`${this.NAMESPACE}.skin`)||"null")||this.skin;let e=[...u_];this.custom.length>0&&(this.CUSTOM_CATEGORY.emojis=this.custom.map(a=>Ne(P({},a),{id:a.shortNames[0],custom:!0})),e.push(this.CUSTOM_CATEGORY)),this.include!==void 0&&e.sort((a,l)=>this.include.indexOf(a.id)>this.include.indexOf(l.id)?1:-1);for(let a of e){let l=this.include&&this.include.length?this.include.indexOf(a.id)>-1:!0,c=this.exclude&&this.exclude.length?this.exclude.indexOf(a.id)>-1:!1;if(!(!l||c)){if(this.emojisToShowFilter){let d=[],{emojis:f}=a;for(let _=0;_-1:!0,r=this.exclude&&this.exclude.length?this.exclude.indexOf(this.RECENT_CATEGORY.id)>-1:!1;i&&!r&&(this.hideRecent=!1,this.categories.unshift(this.RECENT_CATEGORY)),this.categories[0]&&(this.categories[0].first=!0),this.categories.unshift(this.SEARCH_CATEGORY),this.selected=this.categories.filter(a=>a.first)[0].name;let s=Math.min(this.categories.length,3);this.setActiveCategories(this.activeCategories=this.categories.slice(0,s));let o=this.categories[s-1].emojis.slice();this.categories[s-1].emojis=o.slice(0,60),setTimeout(()=>{this.categories[s-1].emojis=o,this.setActiveCategories(this.categories),this.ref.detectChanges(),ct(this.platformId)&&this.ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this.updateCategoriesSize()})})}),this.ngZone.runOutsideAngular(()=>{this.scrollListener=this.renderer.listen(this.scrollRef.nativeElement,"scroll",()=>{this.handleScroll()})})}ngOnDestroy(){this.scrollListener?.(),this.cancelAnimationFrame()}setActiveCategories(e){this.showSingleCategory?this.activeCategories=e.filter(i=>i.name===this.selected||i===this.SEARCH_CATEGORY):this.activeCategories=e}updateCategoriesSize(){if(this.categoryRefs.forEach(e=>e.memoizeSize()),this.scrollRef){let e=this.scrollRef.nativeElement;this.scrollHeight=e.scrollHeight,this.clientHeight=e.clientHeight,this.clientWidth=e.clientWidth}}handleAnchorClick(e){if(this.updateCategoriesSize(),this.selected=e.category.name,this.setActiveCategories(this.categories),this.SEARCH_CATEGORY.emojis){this.handleSearch(null),this.searchRef?.clear(),this.handleAnchorClick(e);return}let i=this.categoryRefs.find(r=>r.id===e.category.id);if(i){let{top:r}=i;e.category.first?r=0:r+=1,this.scrollRef.nativeElement.scrollTop=r}this.nextScroll=e.category.name;for(let r of this.categories)this.categoryRefs.find(({id:o})=>o===r.id)?.handleScroll(this.scrollRef.nativeElement.scrollTop)}categoryTrack(e,i){return i.id}handleScroll(e=!1){if(this.nextScroll){this.selected=this.nextScroll,this.nextScroll=void 0,this.ref.detectChanges();return}if(!this.scrollRef||this.showSingleCategory)return;let i;if(this.SEARCH_CATEGORY.emojis)i=this.SEARCH_CATEGORY;else{let r=this.scrollRef.nativeElement;if(r.scrollTop===0)i=this.categories.find(s=>s.first===!0);else if(r.scrollHeight-r.scrollTop===this.clientHeight)i=this.categories[this.categories.length-1];else for(let s of this.categories)this.categoryRefs.find(({id:l})=>l===s.id)?.handleScroll(r.scrollTop)&&(i=s);this.scrollTop=r.scrollTop}!e&&i&&i.name!==this.selected?(this.selected=i.name,this.ref.detectChanges()):e&&this.ref.detectChanges()}handleSearch(e){this.SEARCH_CATEGORY.emojis=e;for(let i of this.categoryRefs.toArray())i.name==="Search"?(i.emojis=e,i.updateDisplay(e?"block":"none")):i.updateDisplay(e?"none":"block");this.scrollRef.nativeElement.scrollTop=0,this.handleScroll()}handleEnterKey(e,i){if(!i&&this.SEARCH_CATEGORY.emojis!==null&&this.SEARCH_CATEGORY.emojis.length)if(i=this.SEARCH_CATEGORY.emojis[0],i)h_(this.emojiSelect,this.ngZone,{$event:e,emoji:i});else return;!this.hideRecent&&!this.recent&&i&&this.frequently.add(i);let r=this.categoryRefs.toArray()[1];r&&this.enableFrequentEmojiSort&&this.ngZone.run(()=>{r.updateRecentEmojis(),r.ref.markForCheck()})}handleEmojiOver(e){if(!this.showPreview||!this.previewRef)return;let i=this.CUSTOM_CATEGORY.emojis.find(r=>r.id===e.emoji.id);i&&(e.emoji=P({},i)),this.previewEmoji=e.emoji,this.cancelAnimationFrame(),this.ref.detectChanges()}handleEmojiLeave(){!this.showPreview||!this.previewRef||(this.animationFrameRequestId=requestAnimationFrame(()=>{this.previewEmoji=null,this.ref.detectChanges()}))}handleEmojiClick(e){h_(this.emojiClick,this.ngZone,e),h_(this.emojiSelect,this.ngZone,e),this.handleEnterKey(e.$event,e.emoji)}handleSkinChange(e){this.skin=e,localStorage.setItem(`${this.NAMESPACE}.skin`,String(e)),this.skinChange.emit(e)}getWidth(){return this.style&&this.style.width?this.style.width:this.perLine*(this.emojiSize+12)+12+2+this.measureScrollbar+"px"}cancelAnimationFrame(){this.animationFrameRequestId!==null&&(cancelAnimationFrame(this.animationFrameRequestId),this.animationFrameRequestId=null)}static \u0275fac=function(i){return new(i||n)(v(se),v(et),v(ke),v(c4),v(Qe))};static \u0275cmp=M({type:n,selectors:[["emoji-mart"]],viewQuery:function(i,r){if(i&1&&(fe(_q,7),fe(r4,5),fe(s4,5),fe(n4,5)),i&2){let s;W(s=q())&&(r.scrollRef=s.first),W(s=q())&&(r.previewRef=s.first),W(s=q())&&(r.searchRef=s.first),W(s=q())&&(r.categoryRefs=s)}},inputs:{perLine:"perLine",totalFrequentLines:"totalFrequentLines",i18n:"i18n",style:"style",title:"title",emoji:"emoji",darkMode:"darkMode",color:"color",hideObsolete:"hideObsolete",categories:"categories",activeCategories:"activeCategories",set:"set",skin:"skin",isNative:"isNative",emojiSize:"emojiSize",sheetSize:"sheetSize",emojisToShowFilter:"emojisToShowFilter",showPreview:"showPreview",emojiTooltip:"emojiTooltip",autoFocus:"autoFocus",custom:"custom",hideRecent:"hideRecent",imageUrlFn:"imageUrlFn",include:"include",exclude:"exclude",notFoundEmoji:"notFoundEmoji",categoriesIcons:"categoriesIcons",searchIcons:"searchIcons",useButton:"useButton",enableFrequentEmojiSort:"enableFrequentEmojiSort",enableSearch:"enableSearch",showSingleCategory:"showSingleCategory",virtualize:"virtualize",virtualizeOffset:"virtualizeOffset",recent:"recent",backgroundImageFn:"backgroundImageFn"},outputs:{emojiClick:"emojiClick",emojiSelect:"emojiSelect",skinChange:"skinChange"},standalone:!0,features:[J],decls:8,vars:16,consts:[["scrollRef",""],[3,"ngStyle"],[1,"emoji-mart-bar"],[3,"anchorClick","categories","color","selected","i18n","icons"],[3,"i18n","include","exclude","custom","autoFocus","icons","emojisToShowFilter","searchResults","enterKeyOutsideAngular",4,"ngIf"],[1,"emoji-mart-scroll"],[3,"id","name","emojis","perLine","totalFrequentLines","hasStickyPosition","i18n","hideObsolete","notFoundEmoji","custom","recent","virtualize","virtualizeOffset","emojiIsNative","emojiSkin","emojiSize","emojiSet","emojiSheetSize","emojiForceSize","emojiTooltip","emojiBackgroundImageFn","emojiImageUrlFn","emojiUseButton","emojiOverOutsideAngular","emojiLeaveOutsideAngular","emojiClickOutsideAngular",4,"ngFor","ngForOf","ngForTrackBy"],["class","emoji-mart-bar",4,"ngIf"],[3,"searchResults","enterKeyOutsideAngular","i18n","include","exclude","custom","autoFocus","icons","emojisToShowFilter"],[3,"emojiOverOutsideAngular","emojiLeaveOutsideAngular","emojiClickOutsideAngular","id","name","emojis","perLine","totalFrequentLines","hasStickyPosition","i18n","hideObsolete","notFoundEmoji","custom","recent","virtualize","virtualizeOffset","emojiIsNative","emojiSkin","emojiSize","emojiSet","emojiSheetSize","emojiForceSize","emojiTooltip","emojiBackgroundImageFn","emojiImageUrlFn","emojiUseButton"],[3,"skinChange","emoji","idleEmoji","emojiIsNative","emojiSize","emojiSkin","emojiSet","i18n","emojiSheetSize","emojiBackgroundImageFn","emojiImageUrlFn"]],template:function(i,r){if(i&1){let s=U();m(0,"section",1)(1,"div",2)(2,"emoji-mart-anchors",3),k("anchorClick",function(a){return E(s),D(r.handleAnchorClick(a))}),g()(),F(3,yq,1,7,"emoji-search",4),m(4,"section",5,0),F(6,wq,1,23,"emoji-category",6),g(),F(7,vq,2,11,"div",7),g()}i&2&&(c1("emoji-mart ",r.darkMode?"emoji-mart-dark":"",""),Pr("width",r.getWidth()),u("ngStyle",r.style),h(2),u("categories",r.categories)("color",r.color)("selected",r.selected)("i18n",r.i18n)("icons",r.categoriesIcons),h(),u("ngIf",r.enableSearch),h(),w("aria-label",r.i18n.emojilist),h(2),u("ngForOf",r.activeCategories)("ngForTrackBy",r.categoryTrack),h(),u("ngIf",r.showPreview))},dependencies:[ce,yt,ye,Pe,bq,s4,r4,n4],encapsulation:2,changeDetection:0})}return n})();function h_(n,t,e){n.observed&&t.run(()=>n.emit(e))}var u4=(()=>{let t=class t{transform(i,r){let s=new Date(i).toDateString(),o=new Date(r).toDateString();return s!==o}};t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Oi({name:"isAnotherDay",type:t,pure:!0});let n=t;return n})();var d4=(()=>{let t=class t{transform(i){if(!i)return"";let r=new Date(i),s=new Date,o=this.calculateDateDifference(r,s);return o===0?"Today":o===1?"Yesterday":o<7?r.toLocaleDateString("en-US",{weekday:"long"}):r.toLocaleDateString("en-US")}calculateDateDifference(i,r){let s=new Date(i.getFullYear(),i.getMonth(),i.getDate()),a=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime()-s.getTime();return Math.floor(a/t.MILLISECONDS_IN_A_DAY)}};t.MILLISECONDS_IN_A_DAY=1e3*60*60*24,t.\u0275fac=function(r){return new(r||t)},t.\u0275pipe=Oi({name:"getDate",type:t,pure:!0});let n=t;return n})();var xq=(n,t)=>t.id,Aq=(n,t)=>({" bg-success":n," bg-danger":t}),Mq=()=>({width:"100%",height:"95%"}),Oq=(n,t)=>({sender:n,new:t});function Pq(n,t){if(n&1&&(m(0,"div",18),V(1),On(2,"getDate"),g()),n&2){let e=p().$implicit;h(),Ot(" ",Zu(2,1,e.sentAt)," ")}}function Rq(n,t){if(n&1&&b(0,"img",3),n&2){let e=p().$implicit,i=p(2);u("src",e.senderId===(i.currentUser==null?null:i.currentUser.id)?i.currentUser==null?null:i.currentUser.profilePicture:i.currentReceiver==null?null:i.currentReceiver.profilePicture,Fn)}}function Lq(n,t){n&1&&b(0,"i",23)}function Bq(n,t){n&1&&b(0,"i",24)(1,"i",24)}function Vq(n,t){if(n&1&&F(0,Lq,1,0,"i",23)(1,Bq,2,0),n&2){let e=p().$implicit,i=p(2);Lr(0,e.status===i.messageStatues.sent?0:e.status===i.messageStatues.read?1:-1)}}function jq(n,t){if(n&1&&(F(0,Pq,3,3,"div",18),On(1,"isAnotherDay"),m(2,"div",11)(3,"div",19),F(4,Rq,1,1,"img",3),g(),m(5,"div",20)(6,"div",21),V(7),g(),m(8,"div",22),V(9),On(10,"date"),F(11,Vq,2,1),g()()()),n&2){let e=t.$implicit,i=t.$index,r=p(2);Lr(0,i>0&&Br(1,6,e.sentAt,r.activeDiscussion.messages[i-1].sentAt)||i===0?0:-1),h(2),u("ngClass",Ze(12,Oq,e.senderId===(r.currentUser==null?null:r.currentUser.id),i===(r.activeDiscussion.messages==null?null:r.activeDiscussion.messages.length)-1)),h(2),Lr(4,i>0&&r.activeDiscussion.messages[i-1].senderId!==e.senderId||i===0?4:-1),h(3),Ot(" ",e.content," "),h(2),Ot(" ",Br(10,9,e.sentAt,"HH:mm")," "),h(2),Lr(11,e.senderId===(r.currentUser==null?null:r.currentUser.id)?11:-1)}}function Uq(n,t){if(n&1){let e=U();m(0,"emoji-mart",25),k("emojiSelect",function(r){E(e);let s=p(2);return D(s.addEmojiToMessage(r))}),g()}n&2&&u("darkMode",!1)}function Hq(n,t){if(n&1){let e=U();m(0,"div",1)(1,"div",2),b(2,"img",3),m(3,"div",4)(4,"span",5),V(5),g(),m(6,"div",6),b(7,"span",7),m(8,"span",8),V(9),g()()()(),b(10,"div",9),g(),m(11,"div",10)(12,"p-scrollPanel"),Ev(13,jq,12,15,"div",11,xq),g()(),m(15,"div",12)(16,"i",13),k("click",function(){E(e);let r=p();return D(r.openEmojiPicker())}),g(),m(17,"p-iconField",14)(18,"p-inputIcon",15),k("click",function(){E(e);let r=p();return D(r.sendMessage())}),g(),m(19,"input",16),Mn("ngModelChange",function(r){E(e);let s=p();return Yn(s.messageContent,r)||(s.messageContent=r),D(r)}),k("keydown.enter",function(){E(e);let r=p();return D(r.sendMessage())}),g()()(),F(20,Uq,1,1,"emoji-mart",17)}if(n&2){let e=p();h(2),u("src",e.currentReceiver==null?null:e.currentReceiver.profilePicture,Fn),h(3),Ce(e.currentReceiver==null?null:e.currentReceiver.name),h(2),u("ngClass",Ze(8,Aq,(e.currentReceiver==null?null:e.currentReceiver.status)==e.userStatuses.online,(e.currentReceiver==null?null:e.currentReceiver.status)==e.userStatuses.offline)),h(2),Ce(e.currentReceiver==null?null:e.currentReceiver.status),h(3),Rr(Et(11,Mq)),h(),Dv(e.activeDiscussion.messages),h(6),An("ngModel",e.messageContent),h(),u("ngIf",e.isEmojiPickerOpened)}}function zq(n,t){n&1&&(m(0,"div",26)(1,"p"),V(2,"Start a conversation"),g()())}var h4=(()=>{let t=class t{constructor(i,r,s){this.chatService=i,this.userService=r,this.discussionService=s,this.messageContent="",this.userStatuses=ns,this.messageStatues=no,this.subscriptions=[],this.isEmojiPickerOpened=!1}ngOnInit(){this.initializeCurrentUser(),this.initializeDiscussion()}initializeCurrentUser(){this.subscriptions.push(this.userService.getCurrentUser().subscribe({next:i=>{this.currentUser=i},error:i=>{console.error("Error fetching current user:",i)}}))}initializeDiscussion(){this.chatService.connect(),this.subscribeToDiscussion()}subscribeToDiscussion(){this.subscriptions.push(this.discussionService.getCurrentDiscussion().pipe(He(i=>this.handleDiscussionChange(i))).subscribe({next:i=>{this.currentReceiver=i},error:i=>{console.error("Error subscribing to discussion:",i)}}))}handleDiscussionChange(i){if(!i||this.activeDiscussion?.id===i.id)return[];this.activeDiscussion=i,this.activeDiscussion.messages=this.activeDiscussion.messages??[],this.connectToDiscussion();let r=this.getUnreadMessages();return r.length>0&&this.markMessagesAsRead(r),this.fetchReceiverDetails(i)}connectToDiscussion(){this.chatService.listenForNewMessage(this.activeDiscussion),this.chatService.listenForListOfMessages(this.activeDiscussion)}getUnreadMessages(){return this.activeDiscussion.messages.filter(i=>i.receiverId===this.currentUser?.id&&i.status!==no.read)}markMessagesAsRead(i){i.forEach(r=>{r.status=no.read,r.discussionId=this.activeDiscussion.id??""}),this.chatService.sendUpdateMessages(i)}fetchReceiverDetails(i){return this.activeDiscussion.ownerId===this.currentUser?.id?this.userService.getUserDetails(i.contactId):this.activeDiscussion.contactId===this.currentUser?.id?this.userService.getUserDetails(i.ownerId):[]}sendMessage(){if(this.messageContent){let i={receiverId:this.currentReceiver?.id,content:this.messageContent,discussionId:this.activeDiscussion.id};this.chatService.sendMessage(i),this.messageContent="",this.isEmojiPickerOpened=!1}}openEmojiPicker(){this.isEmojiPickerOpened=!this.isEmojiPickerOpened}addEmojiToMessage(i){this.messageContent+=i.emoji.native}ngOnDestroy(){console.log("Destroying discussion component"),this.chatService.disconnect(),this.discussionService.setCurrentDiscussion(void 0),this.subscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(X3),v(Bt),v(is))},t.\u0275cmp=M({type:t,selectors:[["app-discussion"]],decls:3,vars:1,consts:[[1,"content"],[1,"contact-info"],[1,"profile"],["alt","avatar",1,"avatar",3,"src"],[1,"data"],[1,"name"],[1,"status"],[1,"ball",3,"ngClass"],[1,"text"],[1,"call"],[1,"discussion"],[1,"message-box",3,"ngClass"],[1,"send-message"],[1,"pi","pi-face-smile",3,"click"],["iconPosition","right",1,"w-95"],["styleClass","pi pi-send",1,"send-icon",3,"click"],["type","text","pInputText","","placeholder","Type a message","autofocus","",1,"w-100",3,"ngModelChange","keydown.enter","ngModel"],["title","Pick your emoji\u2026","emoji","point_up","class","emoji",3,"darkMode","emojiSelect",4,"ngIf"],[1,"date"],[1,"avatar"],[1,"message"],[1,"message-content"],[1,"message-time"],[1,"pi","pi-check","status"],[1,"pi","pi-check","status","colored"],["title","Pick your emoji\u2026","emoji","point_up",1,"emoji",3,"emojiSelect","darkMode"],[1,"empty-discussion"]],template:function(r,s){r&1&&(m(0,"div",0),F(1,Hq,21,12)(2,zq,3,0),g()),r&2&&(h(),Lr(1,s.activeDiscussion?1:2))},dependencies:[_e,ye,In,kn,Vn,Lh,Bh,dn,ua,gf,lb,u4,d4],styles:[".content[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;width:auto;height:100%}.empty-discussion[_ngcontent-%COMP%]{text-align:center;margin:auto;font-size:2rem;color:var(--primary-color)}.contact-info[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center;width:100%;height:80px;box-shadow:0 1px #00000014}.contact-info[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;padding:0;gap:16px;margin:0 24px;width:240px;height:43px}.avatar[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%}.contact-info[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .data[_ngcontent-%COMP%]{display:flex;flex-direction:column}.contact-info[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .data[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:20px;line-height:125%;color:#000}.contact-info[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:8px;width:auto;height:18px}.contact-info[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .ball[_ngcontent-%COMP%]{width:10px;height:10px;border-radius:50%}.contact-info[_ngcontent-%COMP%] .profile[_ngcontent-%COMP%] .status[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-family:Inter;font-style:normal;font-weight:600;font-size:12px;line-height:150%;color:#000;align-self:center;opacity:.6}.contact-info[_ngcontent-%COMP%] .call[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:10px 16px;gap:8px;margin:0 24px;width:94px;height:44px;background:#615ef01a;border-radius:8px}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}p-scrollPanel[_ngcontent-%COMP%]{height:100%;width:100%}.discussion[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:0 32px;gap:24px;width:100%;height:75%;transition:display .5s}.date[_ngcontent-%COMP%]{background-color:#fff;padding:10px;width:fit-content;margin:1rem auto;border-radius:6px;box-shadow:#00000059 0 5px 15px}.discussion[_ngcontent-%COMP%] .message-box[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:flex-start;padding:0;gap:16px}.discussion[_ngcontent-%COMP%] .message-box[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{max-width:50%}.discussion[_ngcontent-%COMP%] .message-box.new[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fadeIn .2s ease-in-out}.sender[_ngcontent-%COMP%]{justify-content:flex-end}.sender[_ngcontent-%COMP%] .message-content[_ngcontent-%COMP%]{background:var(--primary-color)!important;color:#fff}.sender[_ngcontent-%COMP%] .avatar[_ngcontent-%COMP%]{order:1}.sender[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{margin-left:auto;width:fit-content!important}.discussion[_ngcontent-%COMP%] .message-box[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;width:auto;margin-bottom:10px}.message[_ngcontent-%COMP%] .message-content[_ngcontent-%COMP%]{padding:8px 16px;width:auto;background:#f1f1f1;border-radius:4px}.message[_ngcontent-%COMP%] .message-time[_ngcontent-%COMP%]{font-size:12px;color:#2e2e2e;margin-left:auto}.pi.status[_ngcontent-%COMP%]{font-size:.8rem}.pi.status.colored[_ngcontent-%COMP%]{color:var(--green);font-weight:700}.send-message[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:24px;gap:24px;margin:0 auto 5px;width:100%;height:60px;border-radius:4px;background-color:#d4d4d459;z-index:100}.send-icon[_ngcontent-%COMP%]{cursor:pointer}.emoji[_ngcontent-%COMP%]{position:absolute;bottom:65px}.pi-face-smile[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--primary-color);cursor:pointer}"]});let n=t;return n})();function Wq(n,t){n&1&&ne(0)}var f4=(()=>{let t=class t{constructor(i,r){this.userService=i,this.messageService=r,this.panels={contacts:"contacts",settings:"settings",profile:"profile",search:"search"},this.panel=this.panels.contacts,this.subscriptions=[]}ngOnInit(){this.initializeCurrentUser()}initializeCurrentUser(){this.subscriptions.push(this.userService.updateUserStatus(ns.online).pipe(He(()=>this.userService.getCurrentUserDetails())).subscribe({next:i=>{this.userService.setCurrentUser(i)},error:i=>{console.error(i),this.messageService.add({severity:"error",summary:"Error",detail:"An error occurred while loading user details"})}}))}changePanel(i){this.panel=i}loadPanel(){switch(this.panel){case this.panels.contacts:return CF;case this.panels.profile:return i3;case this.panels.search:return r3;default:return CF}}};t.\u0275fac=function(r){return new(r||t)(v(Bt),v(ln))},t.\u0275cmp=M({type:t,selectors:[["app-home"]],decls:5,vars:1,consts:[[1,"content"],[3,"panelEvent"],[4,"ngComponentOutlet"]],template:function(r,s){r&1&&(b(0,"p-toast"),m(1,"div",0)(2,"app-sidebar",1),k("panelEvent",function(a){return s.changePanel(a)}),g(),F(3,Wq,1,0,"ng-container",2),b(4,"app-discussion"),g()),r&2&&(h(3),u("ngComponentOutlet",s.loadPanel()))},dependencies:[ob,ts,J3,h4],styles:[".content[_ngcontent-%COMP%]{width:100%;height:100vh;overflow-y:hidden;display:flex;flex-direction:row;justify-content:flex-start}app-discussion[_ngcontent-%COMP%]{flex-grow:1}"]});let n=t;return n})();var p4=()=>({width:"100%"}),qq=()=>["/register"];function Gq(n,t){n&1&&b(0,"span",37)}var m4=(()=>{let t=class t{constructor(i,r,s,o,a){this.authService=i,this.router=r,this.messageService=s,this.userService=o,this.formBuilder=a,this.loadingGoogle=!1,this.loading=!1,this.loginSubscriptions=[],this.loginForm=this.formBuilder.group({email:["",ni.required],password:["",ni.required],rememberMe:[!1]})}get formControls(){return this.loginForm.controls}ngOnInit(){this.authService.isLoggedIn&&this.router.navigate([""])}login(){if(this.loginForm.invalid)return;let{email:i,password:r,rememberMe:s}=this.loginForm.value;this.authService.rememberMe=s,this.loading=!0,this.authService.signInWithEmail(i,r).subscribe({next:()=>{this.loading=!1,this.messageService.add({severity:"success",summary:"Sign in successful",detail:"You have been signed in successfully"}),vn(1500).subscribe(()=>this.router.navigateByUrl(""))},error:o=>{this.loading=!1;let a=o.code==="auth/invalid-credential"?"Invalid credentials":o.message;this.messageService.add({severity:"error",summary:"Failed to sign in",detail:a}),console.error("Sign in failed",o),this.authService.signOut(!0)?.subscribe()}})}signInWithGoogle(){this.loadingGoogle=!0,this.authService.signInWithProvider(Js.Google).pipe(He(()=>this.userService.registerUserWithOauth())).subscribe({next:i=>{console.log(i),this.loadingGoogle=!1,this.messageService.add({severity:"success",summary:"Sign in successful",detail:"You have been signed in successfully"}),vn(1500).subscribe(()=>this.router.navigateByUrl(""))},error:i=>{this.loadingGoogle=!1,console.error("Sign in with Google failed",i),this.messageService.add({severity:"error",summary:"Failed to sign in",detail:i.message}),this.authService.signOut(!0)?.subscribe()}})}ngOnDestroy(){this.loginSubscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(oi),v(Zt),v(ln),v(Bt),v(Mh))},t.\u0275cmp=M({type:t,selectors:[["app-login"]],decls:51,vars:13,consts:[[1,"content"],[1,"col-md-8"],["src","assets/img/login.png","alt","",1,"login-img"],[1,"login","card"],[1,"header"],["src","assets/img/login.png","alt","",1,"logo"],[1,"h3"],[1,"col-md-9",3,"ngSubmit","formGroup"],[1,"mb-3","d-flex","flex-column","gap-2"],["for","email"],["pInputText","","id","email","aria-describedby","email-help","formControlName","email","variant","filled","autofocus","",3,"keydown.enter"],["for","password"],["inputId","password","feedback","false","formControlName","password","variant","filled",3,"keydown.enter","toggleMask","inputStyle"],[1,"mb-4","d-flex","justify-content-between"],[1,"d-flex"],["inputId","rememberMe","formControlName","rememberMe"],["for","rememberMe",1,"mx-1"],[1,"forget"],["href","#",1,"text-decoration-none"],[1,"text-center","mt-3"],["label","Sign in","styleClass","w-100 mb-3",3,"onClick","loading","raised","disabled"],[1,"text-decoration-none",3,"routerLink"],[1,"d-flex","text-center","flex-column","col-10","mx-auto"],[1,"col-11","mx-auto","my-"],["type","button",1,"d-flex","align-items-center","social-items","text-black",3,"click"],["xmlns","http://www.w3.org/2000/svg","x","0px","y","0px"],["fill","#FFC107","d","M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"],["fill","#FF3D00","d","M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"],["fill","#4CAF50","d","M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"],["fill","#1976D2","d","M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"],[1,"social-item"],["class","spinner-border spinner-border-sm",4,"ngIf"],["type","button",1,"d-flex","align-items-center","social-items","text-black"],["fill","#ff5722","d","M6 6H22V22H6z","transform","rotate(-180 14 14)"],["fill","#4caf50","d","M26 6H42V22H26z","transform","rotate(-180 34 14)"],["fill","#ffc107","d","M26 26H42V42H26z","transform","rotate(-180 34 34)"],["fill","#03a9f4","d","M6 26H22V42H6z","transform","rotate(-180 14 34)"],[1,"spinner-border","spinner-border-sm"]],template:function(r,s){r&1&&(b(0,"p-toast"),m(1,"div",0)(2,"div",1),b(3,"img",2),g(),m(4,"div",3)(5,"div",4),b(6,"img",5),m(7,"h1",6),V(8,"KuroLine"),g()(),m(9,"form",7),k("ngSubmit",function(){return s.login()}),m(10,"div",8)(11,"label",9),V(12,"email"),g(),m(13,"input",10),k("keydown.enter",function(){return s.login()}),g()(),m(14,"div",8)(15,"label",11),V(16,"Password"),g(),m(17,"p-password",12),k("keydown.enter",function(){return s.login()}),g()(),m(18,"div",13)(19,"div",14),b(20,"p-inputSwitch",15),m(21,"label",16),V(22,"Remember Me"),g()(),m(23,"div",17)(24,"a",18),V(25,"Forget Password?"),g()()(),m(26,"div",19)(27,"p-button",20),k("onClick",function(){return s.login()}),g(),m(28,"small"),V(29,"Don't have an account? "),m(30,"a",21),V(31,"Sign up"),g()()()(),m(32,"div",22),b(33,"hr",23),m(34,"button",24),k("click",function(){return s.signInWithGoogle()}),oe(),m(35,"svg",25),b(36,"path",26)(37,"path",27)(38,"path",28)(39,"path",29),g(),Ar(),m(40,"span",30),F(41,Gq,1,0,"span",31),V(42," or sign in with Google "),g()(),m(43,"button",32),oe(),m(44,"svg",25),b(45,"path",33)(46,"path",34)(47,"path",35)(48,"path",36),g(),Ar(),m(49,"span",30),V(50," or sign in with Microsoft "),g()()()()()),r&2&&(h(9),u("formGroup",s.loginForm),h(8),Rr(Et(10,p4)),u("toggleMask",!0)("inputStyle",Et(11,p4)),h(10),u("loading",s.loading)("raised",!0)("disabled",!s.loginForm.valid),h(3),u("routerLink",Et(12,qq)),h(11),u("ngIf",s.loadingGoogle))},dependencies:[ye,pf,Ah,In,kn,Sh,Tl,Nl,Zs,dn,ts,Ol,fF],styles:[".content[_ngcontent-%COMP%]{display:flex;padding:0;background:#fff;justify-content:center;overflow:hidden}.login-img[_ngcontent-%COMP%]{height:100vh;width:100%;transform:scaleX(-1);border-radius:0 24px 24px 0}.header[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 auto}.logo[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;margin-right:10px}.content[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;flex-direction:column;padding-top:1.5rem;padding-bottom:0;gap:2rem;border-radius:0 24px 24px 0;height:100vh}.login-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:48px;margin:0 auto;width:70%;height:560.5px;flex:none;order:0;align-self:stretch;flex-grow:0;background-color:#198cff}.social-items[_ngcontent-%COMP%]{margin:1rem;margin-bottom:0;padding:.2rem;background-color:#000;border-radius:8px}.social-items[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff;font-size:1.1rem;font-weight:700;text-align:center;margin:auto}.social-items[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-left:1rem;width:2.8rem;height:2.8rem}.spinner-border[_ngcontent-%COMP%]{margin-right:1rem!important}"]});let n=t;return n})();var Kq=()=>["/login"],Qq=n=>({"ng-invalid ng-dirty":n}),g4=()=>({width:"100%"});function Zq(n,t){n&1&&(m(0,"div"),V(1,"Please enter a name "),g())}function Yq(n,t){if(n&1&&(m(0,"div",35),F(1,Zq,2,0,"div",36),g()),n&2){let e=p();h(),u("ngIf",e.formControls.name.errors.required)}}function Jq(n,t){n&1&&(m(0,"div"),V(1,"Please enter an email "),g())}function Xq(n,t){n&1&&(m(0,"div"),V(1,"Please enter a valid email"),g())}function eG(n,t){if(n&1&&(m(0,"div",35),F(1,Jq,2,0,"div",36)(2,Xq,2,0,"div",36),g()),n&2){let e=p(2);h(),u("ngIf",e.formControls.email.errors.required),h(),u("ngIf",e.formControls.email.errors.pattern)}}function tG(n,t){if(n&1&&(m(0,"div",37)(1,"label",38),V(2,"Email"),g(),b(3,"input",39),F(4,eG,3,2,"div",11),m(5,"label",40),V(6,"Password"),g(),b(7,"p-password",41),g()),n&2){let e=p();h(3),u("ngClass",ee(6,Qq,e.submitted)),h(),u("ngIf",e.formControls.email.errors),h(3),Rr(Et(8,g4)),u("toggleMask",!0)("inputStyle",Et(9,g4))}}function nG(n,t){n&1&&(m(0,"div"),V(1,"Please enter a phone number "),g())}function iG(n,t){n&1&&(m(0,"div"),V(1,"Please enter a valid phone number"),g())}function rG(n,t){if(n&1&&(m(0,"div",35),F(1,nG,2,0,"div",36)(2,iG,2,0,"div",36),g()),n&2){let e=p(2);h(),u("ngIf",e.formControls.phoneNumber.errors.required),h(),u("ngIf",e.formControls.phoneNumber.errors.pattern)}}function sG(n,t){if(n&1&&(m(0,"div",37)(1,"label",42),V(2,"Phone number"),g(),b(3,"input",43),F(4,rG,3,2,"div",11),g()),n&2){let e=p();h(4),u("ngIf",e.formControls.phoneNumber.errors)}}function oG(n,t){n&1&&b(0,"span",44)}var F4=(()=>{let t=class t{constructor(i,r,s,o,a){this.authService=i,this.router=r,this.messageService=s,this.userService=o,this.formBuilder=a,this.loadingGoogle=!1,this.loading=!1,this.signupChoice=[{label:"Email",value:"email"},{label:"Phone number",value:"phoneNumber"}],this.showEmail=!1,this.showPhoneNumber=!1,this.submitted=!1,this.firebaseEmailErrorCodes={alreadyInUse:"auth/email-already-in-use",invalidEmail:"auth/invalid-email",operationNotAllowed:"auth/operation",weakPassword:"auth/weak-password"},this.registrationSubscriptions=[],this.registerForm=this.formBuilder.group({name:["",ni.required],password:[""],email:[""],phoneNumber:[""],signupChoice:["",ni.required],profilePicture:[null]})}ngOnInit(){this.authService.isLoggedIn&&this.router.navigate([""])}get formControls(){return this.registerForm.controls}onSelectProfilePicture(i){this.formControls.profilePicture.setValue(i.files[0])}onClearProfilePicture(i){this.formControls.profilePicture.setValue("")}onRemoveProfilePicture(i){this.formControls.profilePicture.setValue("")}signup(){if(this.registerForm.invalid)return;let i=this.createUserObject();console.log("photo",i.profilePicture),this.loading=!0,this.registrationSubscriptions.push(this.userService.registerUserWithEmailOrPhoneNumber(i).subscribe({next:r=>this.onSignupSuccess(r),error:r=>this.onSignupError(r)}))}createUserObject(){return{name:this.formControls.name.value,password:this.formControls.password.value,email:this.formControls.email.value,phoneNumber:this.formControls.phoneNumber.value,profilePicture:this.formControls.profilePicture.value}}onSignupSuccess(i){console.log(i),this.messageService.add({severity:"success",summary:"Sign up successful",detail:"You have successfully signed up"}),vn(1500).subscribe(()=>{this.router.navigateByUrl("/login")})}onSignupError(i){this.loading=!1,console.error(i),this.messageService.add({severity:"error",summary:"Failed to sign up",detail:i.error.message}),this.authService.signOut()?.subscribe()}signInWithGoogle(){this.loadingGoogle=!0,this.registrationSubscriptions.push(this.authService.signInWithProvider(Js.Google).pipe(He(i=>this.userService.registerUserWithOauth())).subscribe({next:i=>this.onGoogleSignInSuccess(i),error:i=>this.onGoogleSignInError(i)}))}onGoogleSignInSuccess(i){console.log(i),this.loadingGoogle=!1,this.messageService.add({severity:"success",summary:"Sign in successful",detail:"You have been signed in successfully"}),vn(1500).subscribe(()=>{this.router.navigateByUrl("")})}onGoogleSignInError(i){this.loadingGoogle=!1,console.error("Sign in with Google failed",i),this.messageService.add({severity:"error",summary:"Failed to sign in",detail:i.message}),this.authService.signOut()?.subscribe()}signupChoiceChange(i){i.value==="phoneNumber"?(this.showEmail=!1,this.showPhoneNumber=!0,this.setValidators("phoneNumber",[ni.pattern("^\\+[^\\s][0-9\\s]+$"),ni.maxLength(18)]),this.clearValidators("email"),this.clearValidators("password")):i.value==="email"?(this.showEmail=!0,this.showPhoneNumber=!1,this.setValidators("email",[ni.pattern("^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$")]),this.setValidators("password"),this.clearValidators("phoneNumber")):(this.showEmail=!1,this.showPhoneNumber=!1,this.clearValidators("email"),this.clearValidators("password"),this.clearValidators("phoneNumber"))}setValidators(i,r=[]){this.formControls[i].setValidators([ni.required,...r]),this.formControls[i].updateValueAndValidity()}clearValidators(i){this.formControls[i].clearValidators(),this.formControls[i].updateValueAndValidity()}ngOnDestroy(){this.registrationSubscriptions.forEach(i=>i.unsubscribe())}};t.\u0275fac=function(r){return new(r||t)(v(oi),v(Zt),v(ln),v(Bt),v(Mh))},t.\u0275cmp=M({type:t,selectors:[["app-signup"]],decls:50,vars:13,consts:[[1,"content"],[1,"col-md-8"],["src","assets/img/login.png","alt","",1,"login-img"],[1,"login","card"],[1,"header"],["src","assets/img/login.png","alt","",1,"logo"],[1,"h3"],[1,"col-md-9",3,"formGroup"],[1,"mb-3","d-flex","flex-column","gap-2"],["for","name"],["pInputText","","id","name","aria-describedby","name-help","formControlName","name","placeholder","John Doe","variant","filled"],["class","invalid-feedback d-block",4,"ngIf"],["for","signupChoice"],["optionLabel","label","optionValue","value","formControlName","signupChoice",3,"onChange","options"],["class","d-flex flex-column gap-2",4,"ngIf"],["for","profile"],["mode","advanced","chooseLabel","Choose","chooseIcon","pi pi-upload","name","demo[]","accept","image/*","maxFileSize","3000000",3,"onSelect","onClear","onRemove","showUploadButton","showCancelButton"],[1,"text-center","mt-3"],["label","Sign up","id","register-btn","styleClass","w-100 mb-3",3,"onClick","loading","raised","disabled"],[1,"text-decoration-none",3,"routerLink"],[1,"d-flex","text-center","flex-column","col-10","mx-auto"],[1,"col-11","mx-auto","my-2"],["type","button",1,"social-items",3,"click"],["xmlns","http://www.w3.org/2000/svg","x","0px","y","0px"],["fill","#FFC107","d","M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"],["fill","#FF3D00","d","M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"],["fill","#4CAF50","d","M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"],["fill","#1976D2","d","M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"],[1,"social-item"],["class","spinner-border spinner-border-sm",4,"ngIf"],["type","button",1,"social-items"],["fill","#ff5722","d","M6 6H22V22H6z","transform","rotate(-180 14 14)"],["fill","#4caf50","d","M26 6H42V22H26z","transform","rotate(-180 34 14)"],["fill","#ffc107","d","M26 26H42V42H26z","transform","rotate(-180 34 34)"],["fill","#03a9f4","d","M6 26H22V42H6z","transform","rotate(-180 14 34)"],[1,"invalid-feedback","d-block"],[4,"ngIf"],[1,"d-flex","flex-column","gap-2"],["for","email"],["pInputText","","id","email","aria-describedby","email-help","formControlName","email","variant","filled","placeholder","johndoe@example.com",3,"ngClass"],["for","password"],["inputId","password","formControlName","password","promptLabel","Choose a password","weakLabel","Too simple","mediumLabel","Average complexity","strongLabel","Complex password","variant","filled",3,"toggleMask","inputStyle"],["for","phone"],["pInputText","","id","phone","aria-describedby","phone-help","formControlName","phoneNumber","variant","filled","placeholder","+221 77 777 77 77"],[1,"spinner-border","spinner-border-sm"]],template:function(r,s){r&1&&(b(0,"p-toast"),m(1,"div",0)(2,"div",1),b(3,"img",2),g(),m(4,"div",3)(5,"div",4),b(6,"img",5),m(7,"h1",6),V(8,"KuroLine"),g()(),m(9,"form",7)(10,"div",8)(11,"label",9),V(12,"Name"),g(),b(13,"input",10),F(14,Yq,2,1,"div",11),g(),m(15,"div",8)(16,"label",12),V(17,"Connect using "),g(),m(18,"p-selectButton",13),k("onChange",function(a){return s.signupChoiceChange(a)}),g(),F(19,tG,8,10,"div",14)(20,sG,5,1,"div",14),g(),m(21,"div")(22,"label",15),V(23,"Choose your profile photo"),g(),m(24,"p-fileUpload",16),k("onSelect",function(a){return s.onSelectProfilePicture(a)})("onClear",function(a){return s.onClearProfilePicture(a)})("onRemove",function(a){return s.onRemoveProfilePicture(a)}),g()(),m(25,"div",17)(26,"p-button",18),k("onClick",function(){return s.signup()}),g(),m(27,"small"),V(28,"Already have an account? "),m(29,"a",19),V(30,"Sign in"),g()()()(),m(31,"div",20),b(32,"hr",21),m(33,"button",22),k("click",function(){return s.signInWithGoogle()}),oe(),m(34,"svg",23),b(35,"path",24)(36,"path",25)(37,"path",26)(38,"path",27),g(),Ar(),m(39,"span",28),F(40,oG,1,0,"span",29),V(41," or sign in with Google "),g()(),m(42,"button",30),oe(),m(43,"svg",23),b(44,"path",31)(45,"path",32)(46,"path",33)(47,"path",34),g(),Ar(),m(48,"span",28),V(49," or sign in with Microsoft "),g()()()()()),r&2&&(h(9),u("formGroup",s.registerForm),h(5),u("ngIf",s.formControls.name.errors),h(4),u("options",s.signupChoice),h(),u("ngIf",s.showEmail),h(),u("ngIf",s.showPhoneNumber),h(4),u("showUploadButton",!1)("showCancelButton",!0),h(2),u("loading",s.loading)("raised",!0)("disabled",!s.registerForm.valid||s.loading),h(3),u("routerLink",Et(12,Kq)),h(11),u("ngIf",s.loadingGoogle))},dependencies:[_e,ye,pf,Ah,In,kn,Sh,Tl,Nl,Zs,dn,ts,Ol,pF,KD],styles:[".content[_ngcontent-%COMP%]{display:flex;padding:0;background:#fff;justify-content:center;overflow:hidden}.login-img[_ngcontent-%COMP%]{height:100vh;width:100%;transform:scaleX(-1);border-radius:0 24px 24px 0}.header[_ngcontent-%COMP%]{display:flex;align-items:center;margin:0 auto}.logo[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:50%;margin-right:10px}.content[_ngcontent-%COMP%] .login[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;flex-direction:column;padding-top:1.5rem;padding-bottom:0;gap:1rem;border-radius:0 24px 24px 0;height:100vh}.login-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:0;gap:48px;margin:0 auto;width:70%;height:560.5px;flex:none;order:0;align-self:stretch;flex-grow:0;background-color:#198cff}.social-items[_ngcontent-%COMP%]{margin:1rem;margin-bottom:0;padding:.2rem;background-color:#000;border-radius:8px}.social-item[_ngcontent-%COMP%]{color:#fff;font-size:1.1rem;font-weight:700;text-align:center;margin:auto}.social-items[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin:.5rem 1rem;width:2.8rem;height:2.8rem}.spinner-border[_ngcontent-%COMP%]{margin-right:1rem!important}"]});let n=t;return n})();var _4=(()=>{let t=class t{constructor(){this.title="kuroLine"}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=M({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(r,s){r&1&&b(0,"router-outlet")},dependencies:[n_],styles:["[_nghost-%COMP%]{--primary-color: #807ef1;--secondary-color: #343638;--tertiary-color: #f5f5f5;--green: #4eda7b;--active-color: #615ef0;--text-color: #000;--text-secondary: #725785}"]});let n=t;return n})();var y4=(n,t)=>{let e=B(oi),i=B(Zt);return e.isLoggedIn?!0:(e.signOut()?.subscribe(),i.navigate(["/login"]),!1)};var aG=[{path:"",title:"Kuroline - Discussion",component:f4,canActivate:[y4]},{path:"login",title:"Login",component:m4},{path:"register",title:"Sign Up",component:F4}],w4=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Q({type:t}),t.\u0275inj=K({imports:[c_.forRoot(aG,{}),c_]});let n=t;return n})();var v4=(()=>{let t=class t{constructor(i,r){this.authService=i,this.router=r}intercept(i,r){return this.authService.isLoggedIn?(i=i.clone({setHeaders:{Authorization:`Bearer ${this.authService.getToken()}`}}),r.handle(i)):this.authService.rememberMe?Xe(this.authService.refreshToken()).pipe(He(()=>{console.log("Refreshing token");let s=i.clone({setHeaders:{Authorization:`Bearer ${this.authService.getToken()}`}});return r.handle(s)}),Nt(s=>(this.authService.signOut()?.subscribe(),ci(()=>s)))):(!this.router.url.includes("login")&&!this.router.url.includes("register")&&this.router.navigateByUrl("/login"),r.handle(i))}};t.\u0275fac=function(r){return new(r||t)(z(oi),z(Zt))},t.\u0275prov=H({token:t,factory:t.\u0275fac});let n=t;return n})();var b4=(()=>{let t=class t{};t.\u0275fac=function(r){return new(r||t)},t.\u0275mod=Q({type:t,bootstrap:[_4]}),t.\u0275inj=K({providers:[{provide:V1,useClass:v4,multi:!0},iC(()=>rC(Ei.firebaseConfig)),XC(()=>eE()),ln,aa],imports:[ce,Id,w4,vb,RE,Gs,fD,Wi,yD,wD,bD,ca,ED,BD,VD,UD,un,HD,$D,WD,QD,XD,n3,gf]});let n=t;return n})();Sb().bootstrapModule(b4).catch(n=>console.error(n));