PageSourceSearch

https://sociallab.sa/chunk-iEhi37Qs.js

js sociallab.sa collected 2026-09-24 13:30:48 UTC 12,369 bytes, 1 lines download raw bytes

1import {d}from'./chunk-D9m366pd.js';import {S}from'./chunk-AvbB3w2y.js';import {c as ce}from'./chunk-Cha4_V9g.js';import'./chunk-yuXVPJRt.js';import {g,b as gr,h as c$1,eJ as Kt,E,D,c8 as Xr,H,bQ as P,bO as Gt,aE as lt$1,K as Kb,P as Pg,bt as Is,bu as Tg,bV as $s,bS as Dc,bT as zc,T as Tt,m as dn,b2 as da,by as vr,bz as yr,n as Vw,bA as Pw,L as L0,k as Kv,V as Vg,l as b0,Y as Yx,o as nk,t as td,p as tC,q as bC,s as sv,N as NC,X as XC,_ as _D,aO as oD,aP as lD,b0 as mD,aX as sD,r as il,u as XD,cj as $D,ck as Bu,cl as Nu,cm as KD,v as rM,F as Fb,w as t1,y as A1,z as gS,B as Vs,C as zs,I as Fi,J as NS,Z as ZS,M as EI,Q as us,R as ms,S as HI,U as ZI,$ as Dn,a0 as kE,a1 as Jv,a2 as go,a3 as qd,a4 as YE,a5 as OT,a6 as lA,a7 as mt$1,a8 as cy,aa as Xs,ac as V_,ad as hd,ae as fS,a9 as qT,bZ as Vy,b_ as G_,bB as lb,ab as my,ai as ay,bC as tS,ag as _C,ak as Dd,al as hS,ah as ZT,aj as ky,b$ as By,bE as fb,af as KT,aV as QT,am as XT,aT as l_,aR as o_,aS as Pp,aU as Lp,aD as Fy}from'./main-CTPND76J.js';import {R as Ri}from'./chunk-CLFEoJNz.js';import'./chunk-CAH8VGMK.js';var it=()=>["Add a quick reply with a clear title \u2014 the title is what agents search for.","Write the message exactly as it should be sent.","Agents pick these from the composer during a conversation."],nt=()=>[0,1,2,3,4,5],at=(r,u)=>u.id;function ot(r,u){r&1&&(Xs(0,"div",20),cy(1,"app-skeleton-loader",21)(2,"app-skeleton-loader",22),hd());}function lt(r,u){r&1&&(Xs(0,"div",4),KT(1,ot,3,0,"div",20,QT),hd()),r&2&&(_C(),XT(tS(0,nt)));}function rt(r,u){r&1&&(Xs(0,"mat-hint",14),V_(1),fS(2,"translate"),hd()),r&2&&(_C(),Dd(" ",hS(2,1,"You have reached the maximum number of characters")," "));}function ct(r,u){if(r&1){let i=o_();Xs(0,"div",17)(1,"mat-icon",31),V_(2,"description"),hd(),Xs(3,"span",32),V_(4),hd(),Xs(5,"button",33),my("click",function(){Pp(i);let t=l_().$implicit,c=l_(2);return Lp(c.clearFileForItem(t))}),Xs(6,"mat-icon",23),V_(7,"close"),hd()()();}r&2&&(_C(4),ky(u.name));}function dt(r,u){if(r&1){let i=o_();Xs(0,"div",17)(1,"mat-icon",31),V_(2,"description"),hd(),Xs(3,"span",32),V_(4),hd(),Xs(5,"button",33),my("click",function(){Pp(i);let t=l_().$implicit,c=l_(2);return Lp(c.clearFileForItem(t))}),Xs(6,"mat-icon",23),V_(7,"close"),hd()()();}if(r&2){let i=l_().$implicit;_C(4),Fy("","File #","",i.fileId);}}function pt(r,u){if(r&1){let i=o_();Xs(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title",1)(3,"mat-icon",23),V_(4,"chat"),hd(),V_(5),hd()(),Xs(6,"div",24)(7,"mat-form-field",9)(8,"mat-label"),V_(9),fS(10,"translate"),hd(),Xs(11,"input",25),Vy("ngModelChange",function(t){let c=Pp(i).$implicit;return G_(c.title,t)||(c.title=t),Lp(t)}),hd(),lb(),Xs(12,"mat-hint",11),V_(13),hd()(),Xs(14,"mat-form-field",12)(15,"mat-label"),V_(16),fS(17,"translate"),hd(),Xs(18,"textarea",26),Vy("ngModelChange",function(t){let c=Pp(i).$implicit;return G_(c.text,t)||(c.text=t),Lp(t)}),hd(),lb(),Xs(19,"mat-hint",11),V_(20),hd(),qT(21,rt,3,3,"mat-hint",14),hd(),Xs(22,"div",27)(23,"button",16),my("click",function(){let t=Pp(i).$implicit,c=l_(2);return Lp(c.openFileDialogForItem(t))}),Xs(24,"mat-icon",2),V_(25,"attach_file"),hd(),V_(26),fS(27,"translate"),hd(),qT(28,ct,8,1,"div",17)(29,dt,8,2,"div",17),hd(),Xs(30,"div",28)(31,"button",29),my("click",function(){let t=Pp(i).$implicit,c=l_(2);return Lp(c.updateQuickReply(t))}),V_(32),fS(33,"translate"),Xs(34,"mat-icon",2),V_(35,"task_alt"),hd()(),Xs(36,"button",30),my("click",function(){let t=Pp(i).$implicit,c=l_(2);return Lp(c.deleteQuickReply(t.id))}),V_(37),fS(38,"translate"),Xs(39,"mat-icon",2),V_(40,"delete"),hd()()()()();}if(r&2){let i,e=u.$implicit,t=l_(2);_C(5),Dd(" ",e.title," "),_C(4),ky(hS(10,13,"Title")),_C(2),By("ngModel",e.title),fb(),_C(2),Dd("",e.title.length||0,"/50"),_C(3),ky(hS(17,15,"Message")),_C(2),By("ngModel",e.text),fb(),_C(2),Dd("",e.text.length||0,"/1000"),_C(),ZT(e.text.length===1e3?21:-1),_C(5),Dd(" ",hS(27,17,e.fileId?"Change File":"Attach File (optional)")," "),_C(2),ZT((i=t.selectedFilesMap.get(e.id))?28:e.fileId?29:-1,i),_C(3),ay("disabled",!e.title||!e.title.trim()||!e.text||!e.text.trim()),_C(),Dd(" ",hS(33,19,"Save")," "),_C(5),Dd(" ",hS(38,21,"Delete")," ");}}function st(r,u){if(r&1&&(Xs(0,"mat-accordion",5),KT(1,pt,41,23,"mat-expansion-panel",null,at),hd()),r&2){let i=l_();_C(),XT(i.quickReplies);}}
1function mt(r,u){r&1&&(Xs(0,"mat-hint",14),V_(1),fS(2,"translate"),hd()),r&2&&(_C(),Dd(" ",hS(2,1,"You have reached the maximum number of characters")," "));}function ut(r,u){if(r&1){let i=o_();Xs(0,"div",17)(1,"mat-icon",31),V_(2,"description"),hd(),Xs(3,"span",32),V_(4),hd(),Xs(5,"button",33),my("click",function(){Pp(i);let t=l_();return Lp(t.clearNewFile())}),Xs(6,"mat-icon",23),V_(7,"close"),hd()()();}if(r&2){let i=l_();_C(4),ky(i.newSelectedFile.name);}}var xi=(()=>{class r{constructor(i,e,t,c){this.loadingService=i,this.errorService=e,this.quickReplyService=t,this.toastr=c,this.newQuickReplyTitle="",this.newQuickReplyText="",this.newQuickReplyFileId=null,this.newSelectedFile=null,this.selectedFilesMap=new Map,this.dialog=g(gr),this.dialogConfig=g(c$1),this.pageTitle="Quick Replies",this.isLoading=false,this.quickReplies=[];}ngOnInit(){this.getQuickReplies();}openFileDialogForItem(i){this.dialog.open(Kt,E(D({},this.dialogConfig.getDefaultDialogConfig()),{width:"800px"})).afterClosed().subscribe(t=>{t&&(this.selectedFilesMap.set(i.id,t),i.fileId=t.id);});}clearFileForItem(i){this.selectedFilesMap.delete(i.id),i.fileId=null;}openFileDialogForNew(){this.dialog.open(Kt,E(D({},this.dialogConfig.getDefaultDialogConfig()),{width:"800px"})).afterClosed().subscribe(e=>{e&&(this.newSelectedFile=e,this.newQuickReplyFileId=e.id);});}clearNewFile(){this.newSelectedFile=null,this.newQuickReplyFileId=null;}getQuickReplies(){this.isLoading=true,this.loadingService.beginSuppress(),this.sub=this.quickReplyService.GetQuickReplies().pipe(Xr(()=>{this.isLoading=false,this.loadingService.endSuppress();})).subscribe({next:i=>{this.quickReplies=i.data,this.selectedFilesMap.clear(),this.quickReplies.forEach(e=>{e.file&&this.selectedFilesMap.set(e.id,{id:e.file.id,isFolder:false,name:e.file.name,path:e.file.path,fullPath:e.file.fullPath??"",type:e.file.type,size:e.file.size,parentId:e.file.parentId,mimeType:e.file.mimeType??"",createdBy:"",createdOn:new Date,updatedBy:null,updatedOn:null});});},error:i=>this.errorService.setError(i,"Error while getting the data")});}addQuickReply(){!this.newQuickReplyTitle?.trim()||!this.newQuickReplyText?.trim()||(this.loadingService.loadingOn(),this.sub=this.quickReplyService.addQuickReply(this.newQuickReplyTitle.trim(),this.newQuickReplyText.trim(),this.newQuickReplyFileId).subscribe({next:i=>{this.loadingService.loadingOff(),i.succeeded?(this.getQuickReplies(),this.toastr.success("Added Successfully"),this.newQuickReplyTitle="",this.newQuickReplyText="",this.newQuickReplyFileId=null,this.newSelectedFile=null):this.errorService.setError(i,"Error while sending");},error:i=>{this.errorService.setError(i,"Failed to Add");}}));}confirmDeleteQuickReply(i){this.loadingService.loadingOn(),this.sub=this.quickReplyService.deleteQuickReply(i).subscribe({next:e=>{this.loadingService.loadingOff(),e?(this.getQuickReplies(),this.toastr.success("Deleted Successfully")):this.errorService.setError(e,"Fail to delete!");},error:e=>{this.errorService.setError(e,"Fail to delete!");}});}deleteQuickReply(i){this.dialog.open(Ri,E(D({},this.dialogConfig.getDefaultDialogConfig()),{data:{confirmed:true}})).afterClosed().subscribe(t=>{(t===true||t?.confirmed===true)&&this.confirmDeleteQuickReply(i);});}updateQuickReply(i){this.loadingService.loadingOn(),this.sub=this.quickReplyService.updateQuickReply(i.id,i.title,i.text,i.fileId).subscribe({next:e=>{this.loadingService.loadingOff(),e.succeeded?(this.getQuickReplies(),this.toastr.success("Updated Successfully")):this.toastr.error("Failed to Update");},error:e=>{this.errorService.setError(e,"Failed to Complete the Operation");}});}static{this.\u0275fac=function(e){return new(e||r)(H(P),H(Gt),H(d),H(lt$1))};}static{this.\u0275cmp=Kb({type:r,selectors:[["app-settings-quickReply"]],decls:46,vars:29,consts:[["helpKey","settings-quick-reply","intro","Short canned answers your agents insert while chatting, so common questions are answered in one click.",3,"steps"],[1,"d-flex","align-items-center","gap-8"],[1,"icon-18"],[1,"b-t-1","p-t-8"],[1,"skeleton-list"],["multi",""],[1,"d-flex","align-items-center","gap-8","m-t-16"],[1,"row","align-items-start"],[1,"col-9"],["color","primary",1,"w-100","m-b-4"],["matInput","","name","newQuickReplyTitle","required","","maxlength","50",3,"ngModelChange","ngModel"],["align","end"],["color","primary",1,"w-100","m-b-8"],["matInput","","rows","5","name","newQuickReplyText","required","","maxlength","1000","oninput","this.style.height = ''; this.style.height = this.scrollHeight + 'px'",3,"ngModelChange","ngModel"],["align","start","color","warn"],[1,"d-flex","align-items-center","gap-8","flex-wrap"],["type","button","mat-stroked-button","","color","primary",3,"click"],[1,"d-flex","align-items-center","gap-4"],[1,"col-3","p-t-24","d-flex","align-items-start"],["type","button","mat-flat-button","","color","primary",3,"click","disabled"],[1,"d-flex","align-items-center","gap-2","p-y-8"],["type","avatar","size","small"],["type","text","width","240px"],[1,"icon-16"],[1,"p-t-8"],["matInput","","maxlength","50","required","",3,"ngModelChange","ngModel"],["matInput","","rows","3","maxlength","1000","oninput","this.style.height = ''; this.style.height = this.scrollHeight + 'px'",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","gap-8","m-b-16","flex-wrap"],[1,"d-flex","justify-content-end","gap-8","flex-wrap"],["mat-flat-button","","color","primary",1,"shadow-none",3,"click","disabled"],["mat-flat-button","","color","warn",1,"shadow-none",3,"click"],[1,"icon-16","text-muted"],[1,"f-s-12"],["mat-icon-button","","color","warn","aria-label","close",3,"click"]],template:function(e,t){e&1&&(cy(0,"app-page-help",0),Xs(1,"mat-card")(2,"mat-card-header")(3,"mat-card-title",1)(4,"mat-icon",2),V_(5,"reply"),hd(),V_(6),fS(7,"translate"),hd()(),Xs(8,"mat-card-content",3),qT(9,lt,3,1,"div",4),qT(10,st,3,0,"mat-accordion",5),Xs(11,"h3",6)(12,"mat-icon",2),V_(13,"add"),hd(),V_(14),fS(15,"translate"),hd(),Xs(16,"div",7)(17,"div",8)(18,"mat-form-field",9)(19,"mat-label"),V_(20),fS(21,"translate"),hd(),Xs(22,"input",10),Vy("ngModelChange",function(_){return G_(t.newQuickReplyTitle,_)||(t.newQuickReplyTitle=_),_}),hd(),lb(),Xs(23,"mat-hint",11),V_(24),hd()(),Xs(25,"mat-form-field",12)(26,"mat-label"),V_(27),fS(28,"translate"),hd(),Xs(29,"textarea",13),Vy("ngModelChange",function(_){return G_(t.newQuickReplyText,_)||(t.newQuickReplyText=_),_}),my("ngModelChange",function(){return t.newQuickReplyTitle=t.newQuickReplyTitle||t.newQuickReplyText.slice(0,50)}),hd(),lb(),Xs(30,"mat-hint",11),V_(31),hd(),qT(32,mt,3,3,"mat-hint",14),hd(),Xs(33,"div",15)(34,"button",16),my("click",function(){return t.openFileDialogForNew()}),Xs(35,"mat-icon",2),V_(36,"attach_file"),hd(),V_(37),fS(38,"translate"),hd(),qT(39,ut,8,1,"div",17),hd()(),Xs(40,"div",18)(41,"button",19),my("click",function(){return t.addQuickReply()}),V_(42),fS(43,"translate"),Xs(44,"mat-icon",2),V_(45,"add"),hd()()()()()()),e&2&&(ay("steps",tS(28,it)),_C(6),Dd(" ",hS(7,16,"Manage Quick-Reply")," "),_C(3),ZT(t.isLoading?9:-1),_C(),ZT(t.isLoading?-1:10),_C(4),Dd(" ",hS(15,18,"Add new quick reply")," "),_C(6),ky(hS(21,20,"Title")),_C(2),By("ngModel",t.newQuickReplyTitle),fb(),_C(2),Dd("",t.newQuickReplyTitle.length||0,"/50"),_C(3),ky(hS(28,22,"Message")),_C(2),By("ngModel",t.newQuickReplyText),fb(),_C(2),Dd("",t.newQuickReplyText.length||0,"/1000"),_
1C(),ZT(t.newQuickReplyText.length===1e3?32:-1),_C(5),Dd(" ",hS(38,24,t.newSelectedFile?"Change File":"Attach File (optional)")," "),_C(2),ZT(t.newSelectedFile?39:-1),_C(2),ay("disabled",!t.newQuickReplyTitle||!t.newQuickReplyTitle.trim()||!t.newQuickReplyText||!t.newQuickReplyText.trim()),_C(),Dd(" ",hS(43,26,"Add")," "));},dependencies:[ce,Pg,Is,Tg,$s,Dc,zc,Tt,dn,da,vr,yr,Vw,Pw,L0,S,Kv,Vg,b0,Yx,nk,td,tC,bC,sv,NC,XC,_D,oD,lD,mD,sD,il,XD,$D,Bu,Nu,KD,rM,Fb,t1,A1,gS,Vs,zs,Fi,NS,ZS,EI,us,ms,HI,ZI,Dn,kE,Jv,go,qd,YE,OT,lA,mt$1],styles:["a[_ngcontent-%COMP%]:hover{cursor:pointer}"],changeDetection:1});}}return r})();export{xi as ManageQuickReplyComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.