1"use strict";(self.webpackChunkclient_platform=self.webpackChunkclient_platform||[]).push([[956],{38111:(nn,ie,C)=>{C.d(ie,{Y:()=>Ze});var n=C(18359),d=C(45383),re=C(47690),H=C(90515),o=C(54438),de=C(50779),K=C(60177),J=C(20060),ee=C(89978),oe=C(64042),x=C(78606),e=C(90614),Ge=C(87787);const W=g=>({"mb-1":g});function le(g,G){if(1&g&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&g){const a=o.XpG(3);o.R7$(),o.JRh(a.clientUser.name)}}function v(g,G){if(1&g&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&g){const a=o.XpG(3);o.R7$(),o.SpI(" ",a.clientUser.lastName,"")}}function se(g,G){if(1&g&&(o.j41(0,"p",18),o.DNE(1,le,2,1,"span",13)(2,v,2,1,"span",13),o.k0s()),2&g){const a=o.XpG(2);o.R7$(),o.Y8G("ngIf",a.clientUser.name),o.R7$(),o.Y8G("ngIf",a.clientUser.lastName)}}function q(g,G){if(1&g&&o.EFF(0),2&g){const a=o.XpG(2);o.JRh(a.clientUser.email)}}function he(g,G){if(1&g&&(o.j41(0,"p"),o.nrm(1,"fa-icon",19),o.j41(2,"a",20),o.EFF(3),o.k0s()()),2&g){const a=o.XpG(2);o.R7$(),o.Y8G("icon",a.faAt),o.R7$(),o.Mz_("href","mailto:",a.clientUser.email,"",o.B4B),o.R7$(),o.JRh(a.clientUser.email)}}function ve(g,G){if(1&g&&(o.j41(0,"p",18),o.nrm(1,"fa-icon",19),o.j41(2,"a",20),o.EFF(3),o.k0s()()),2&g){const a=o.XpG(2);o.R7$(),o.Y8G("icon",a.faMobileAlt),o.R7$(),o.Mz_("href","tel:",a.clientUser.mob,"",o.B4B),o.R7$(),o.JRh(a.clientUser.mob)}}function Ce(g,G){if(1&g&&(o.j41(0,"div",22),o.EFF(1),o.k0s()),2&g){const a=G.$implicit,T=G.last,r=o.XpG(3);o.Y8G("ngClass",o.eq3(2,W,!T)),o.R7$(),o.JRh(r.getRoleName(a))}}function ue(g,G){if(1&g&&(o.qex(0),o.DNE(1,Ce,2,4,"div",21),o.bVm()),2&g){const a=o.XpG(2);o.R7$(),o.Y8G("ngForOf",a.clientUser.roles)}}function $e(g,G){1&g&&o.EFF(0,"-")}function me(g,G){if(1&g){const a=o.RV6();o.j41(0,"div",15)(1,"a",23),o.nrm(2,"fa-icon",24),o.k0s(),o.j41(3,"button",25),o.bIt("click",function(){o.eBV(a);const r=o.XpG(2);return o.Njj(r.delete(r.clientUser))}),o.nrm(4,"fa-icon",24),o.k0s()()}if(2&g){const a=o.XpG(2);o.R7$(),o.FCK("routerLink","/clients/edit/",a.client.uuid,"/user/",a.clientUser.uuid,""),o.R7$(),o.Y8G("size","lg")("icon",a.faEdit),o.R7$(2),o.Y8G("size","lg")("icon",a.faTrash)}}function Ee(g,G){if(1&g&&(o.j41(0,"div",6)(1,"div",7),o.EFF(2,"#"),o.k0s(),o.j41(3,"div",8),o.EFF(4),o.k0s(),o.j41(5,"div",9),o.EFF(6,"Ime"),o.k0s(),o.j41(7,"div",10),o.DNE(8,se,3,2,"p",11)(9,q,1,1,"ng-template",null,0,o.C5r),o.k0s(),o.j41(11,"div",9),o.pXf(12,2),o.k0s(),o.j41(13,"div",12),o.DNE(14,he,4,4,"p",13)(15,ve,4,4,"p",14),o.k0s(),o.j41(16,"div",9),o.pXf(17,3),o.k0s(),o.j41(18,"div",15),o.DNE(19,ue,2,1,"ng-container",16)(20,$e,1,0,"ng-template",null,1,o.C5r),o.k0s(),o.j41(22,"div",9),o.pXf(23,4),o.k0s(),o.DNE(24,me,5,7,"div",17),o.k0s()),2&g){const a=o.sdS(10),T=o.sdS(21),r=o.XpG();o.R7$(4),o.JRh(r.index),o.R7$(4),o.Y8G("ngIf",r.clientUser.name||r.clientUser.lastName)("ngIfElse",a),o.R7$(6),o.Y8G("ngIf",r.clientUser.email),o.R7$(),o.Y8G("ngIf",r.clientUser.mob),o.R7$(4),o.Y8G("ngIf",r.clientUser.roles&&r.clientUser.roles.length>0)("ngIfElse",T),o.R7$(5),o.Y8G("ngIf",r.currentUser.isAdmin||r.currentUser.uuid!==r.clientUser.uuid&&(!r.clientUser.roles||r.clientUser.roles.indexOf(1)<0))}}let R=(()=>{var g;class G{constructor(){this.clientRoles=[],this.deleteClientUser=new o.bkB,this.loading={clientUser:!1},this.faUserMinus=d.bB2,this.faAt=d.Hzw,this.faTrash=e.BeE,this.faEdit=e.MT7,this.faMobileAlt=d.XRN}ngOnInit(){}delete(T){this.deleteClientUser.emit(T)}getRoleName(T){const r=this.clientRoles.find(f=>f.id===T);return r?r.name:null}}return(g=G).\u0275fac=function(T){return new(T||g)},g.\u0275cmp=o.VBU({type:g,selectors:[["app-client-user"]],inputs:{client:"client",clientUser:"clientUser",clientRoles:"clientRoles",currentUser:"currentUser",index:"index"},outputs:{deleteClientUser:"deleteClientUser"},decls:1,vars:1,consts:()=>{let a,T,r;return a="Kontakt",T="Role",r="Akcija",[["noMail",""],["noRole",""],a,T,r,["class","row g-0 p-2 border-bottom link-grey-hover",4,"ngIf"],[1,"row","g-0","p-2","border-bottom","link-grey-hover"],[1,"fw-bold","col-4","d-lg-none","py-2","px-3"],[1,"col-8","col-lg-1","py-2","px-3"],[1,"fw-bold","col-4","d-lg-none","py-2"],[1,"col-8","col-lg-4","py-2"],["class","m-0",4,"ngIf","ngIfElse"],[1,"col-8","col-lg-3","py-2"],[4,"ngIf"],["class","m-0",4,"ngIf"],[1,"col-8","col-lg-2","py-2"],[4,"ngIf","ngIfElse"],["class","col-8 col-lg-2 py-2",4,"ngIf"],[1,"m-0"],[1,"me-2",3,"icon"],[1,"text-old-bronze","text-decoration-none",3,"href"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"btn","btn-sm","btn-link","text-info","me-2",3,"routerLink"],[3,"size","icon"],["type","button",1,"btn","btn-sm","btn-link","text-danger",3,"click"]]},template:function(T,r){1&T&&o.DNE(0,Ee,25,8,"div",5),2&T&&o.Y8G("ngIf",null==r.clientUser?null:r.clientUser.uuid)},dependencies:[K.YU,K.Sq,K.bT,Ge.Wk,J.aY],encapsulation:2}),G})();var Y=C(11221);const M=["newClientUserModal"],b=["deleteClientUserModal"],$=()=>({"height.px":20}),F=()=>({"height.px":24});function ae(g,G){if(1&g&&(o.j41(0,"div",26)(1,"button",27),o.nrm(2,"fa-icon",28),o.k0s(),o.j41(3,"h5",29),o.pXf(4,4),o.k0s(),o.nrm(5,"div",30),o.k0s()),2&g){const a=o.XpG();o.R7$(2),o.Y8G("icon",a.faChevronLeft)}}function Se(g,G){if(1&g&&(o.j41(0,"span",31)(1,"span",32),o.pXf(2,5),o.k0s(),o.j41(3,"span",33),o.EFF(4),o.k0s()()),2&g){const a=o.XpG();o.R7$(4),o.JRh(a.clientAdmins.length)}}function fe(g,G){1&g&&(o.qex(0),o.j41(1,"div",34)(2,"div",35),o.EFF(3,"#"),o.k0s(),o.j41(4,"div",36),o.pXf(5,6),o.k0s(),o.j41(6,"div",37),o.pXf(7,7),o.k0s(),o.j41(8,"div",38),o.pXf(9,8),o.k0s(),o.j41(10,"div",38),o.pXf(11,9),o.k0s()(),o.bVm())}function Te(g,G){if(1&g){const a=o.RV6();o.j41(0,"app-client-user",42),o.bIt("deleteClientUser",function(r){o.eBV(a);const f=o.XpG(3);return o.Njj(f.deleteClientUser(r))}),o.k0s()}if(2&g){const a=o.XpG(),T=a.$implicit,r=a.index,f=o.XpG(2);o.Y8G("clientUser",T)("client",f.client)("currentUser",f.currentUser)("index",r+1)("clientRoles",f.clientAvailableRoles)}}function z(g,G){if(1&g&&(o.qex(0),o.DNE(1,Te,1,5,"app-client-user",41),o.bVm()),2&g){const a=o.XpG(2);o.R7$(),o.Y8G("ngIf",a.clientAvailableRoles&&(null==a.client?null:a.client.uuid))}}function ne(g,G){if(1&g&&(o.qex(0),o.j41(1,"div",39),o.DNE(2,z,2,1,"ng-container",40),o.k0s(),o.bVm()),2&g){const a=o.XpG();o.R7$(2),o.Y8G("ngForOf",a.clientAdmins)("ngForTrackBy",a.getClientAdminId)}}function Xe(g,G){1&g&&(o.j41(0,"div",43),o.nrm(1,"svg-icon",44),o.j41(2,"span"),o.pXf(3,10),o.k0s()()),2&g&&(o.R7$(),o.Y8G("svgStyle",o.lJ4(1,F)))}function Ye(g,G){if(1&g&&(o.j41(0,"div",45),o.nrm(1,"fa-icon",46),o.k0s()),2&g){const a=o.XpG();o.R7$(),o.Y8G("icon",a.faSpinner)}}function Be(g,G){if(1&g){const a=o.RV6();o.j41(0,"app-client-user-edit",53),o.bIt("newClientUser",function(r){o.eBV(a);const f=o.XpG(2);return o.Njj(f.addClientUser(r))}),o.k0s()}if(2&g){const a=o.XpG(2);o.Y8G("new",!0)("client",a.client)}}function Ve(g,G){if(1&g){const a=o.RV6();o.j41(0,"div",47)(1,"h5")(2,"span",48),o.pXf(3,11),o.k0s(),o.j41(4,"span",49),o.EFF(5),o.k0s()(),o.j41(6,"button",50),o.bIt("click",function(){o.eBV(a);const r=o.XpG();return o.Njj(r.closeModal())}),o.k0s()(),o.j41(7,"div",51),o.DNE(8,Be,1,2,"app-client-user-edit",52),o.k0s()}if(2&g){const a=o.XpG();o.R7$(5),o.JRh(null==a.client?null:a.client.name),o.R7$(3),o.Y8G("ngIf",null==a.client?null:a.client.uuid)}}function Ke(g,G){if(1&g&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&g){const a=o.XpG(3);o.R7$(),o.JRh(a.tmpClientUser.name)}
1}function qe(g,G){if(1&g&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&g){const a=o.XpG(3);o.R7$(),o.SpI(" ",a.tmpClientUser.lastName,"")}}function Je(g,G){if(1&g&&(o.j41(0,"span"),o.EFF(1),o.k0s()),2&g){const a=o.XpG(3);o.R7$(),o.JRh(a.tmpClientUser.email)}}function We(g,G){if(1&g){const a=o.RV6();o.qex(0),o.j41(1,"div",54)(2,"h5",29)(3,"span"),o.pXf(4,12),o.k0s(),o.j41(5,"span",49),o.DNE(6,Ke,2,1,"span",24)(7,qe,2,1,"span",24)(8,Je,2,1,"span",24),o.k0s()(),o.j41(9,"button",50),o.bIt("click",function(){o.eBV(a);const r=o.XpG(2);return o.Njj(r.closeModal())}),o.k0s()(),o.j41(10,"div",51)(11,"p"),o.pXf(12,13),o.k0s()(),o.j41(13,"div",55)(14,"button",56),o.bIt("click",function(){o.eBV(a);const r=o.XpG(2);return o.Njj(r.closeModal())}),o.pXf(15,14),o.k0s(),o.j41(16,"button",57),o.bIt("click",function(){o.eBV(a);const r=o.XpG(2);return o.Njj(r.deleteClientUser(r.tmpClientUser,!0))}),o.pXf(17,15),o.k0s()(),o.bVm()}if(2&g){const a=o.XpG(2);o.R7$(6),o.Y8G("ngIf",a.tmpClientUser.name),o.R7$(),o.Y8G("ngIf",a.tmpClientUser.lastName),o.R7$(),o.Y8G("ngIf",!a.tmpClientUser.name&&!a.tmpClientUser.lastName)}}function He(g,G){if(1&g&&o.DNE(0,We,18,3,"ng-container",24),2&g){const a=o.XpG();o.Y8G("ngIf",a.tmpClientUser)}}let Ze=(()=>{var g;class G{constructor(T,r,f,I){this.auth=T,this.adminS=r,this.modalService=f,this.alert=I,this.subscription=new n.yU,this.faSpinner=d.z1G,this.faChevronLeft=d.Wzs,this.faUserPlus=d.nWR,this.loading={clientAdmins:!1,roles:!1,delete:!1},this.clientAdmins=[]}getClientAdminId(T,r){return r.id}ngOnInit(){void 0===this.showClientDropdown&&(this.showClientDropdown=!1),this.currentUser||(this.currentUser=this.auth.currentUserValue),this.subscription.add(this.auth.displayClientSubscription.subscribe(T=>{this.client=T,T&&(this.getClientRoleList(),this.getClientUsers())}))}closeModal(){this.modalRef&&(this.modalRef.hide(),this.modalRef=void 0)}changeClient(T){this.client=T,this.getClientRoleList(),this.getClientUsers()}getClientUsers(){this.clientAdmins=[],this.loading.clientAdmins=!0,this.subscription.add(this.adminS.getClientUsers(this.client).subscribe(T=>{this.loading.clientAdmins=!1,T&&(this.clientAdmins=T)}))}getClientRoleList(){this.clientAvailableRoles=[];const T=this.client&&void 0!==this.client.uuid?this.client.uuid:null;this.loading.roles=!0,this.subscription.add(this.adminS.getClientRoleList(T).subscribe(r=>{this.loading.roles=!1,this.clientAvailableRoles=r}))}addClientUserModal(){this.modalRef=this.modalService.show(this.newClientUserModal,{animated:!0,class:"modal-lg"})}addClientUser(T){T&&(this.closeModal(),this.getClientUsers())}deleteClientUser(T,r=!1){if(!r)return this.tmpClientUser=T,void(this.modalRef=this.modalService.show(this.deleteClientUserModal,{animated:!0}));this.subscription.add(this.adminS.deleteClientUser(this.client.uuid,T).subscribe(f=>{if(!0===f.status){const I=this.clientAdmins.indexOf(T);-1!==I&&this.clientAdmins.splice(I,1),this.alert.success(f.message),this.closeModal(),this.getClientUsers()}}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(g=G).\u0275fac=function(T){return new(T||g)(o.rXU(H.uR),o.rXU(re.Y),o.rXU(de.I8),o.rXU(H.uE))},g.\u0275cmp=o.VBU({type:g,selectors:[["app-client-admin-list"]],viewQuery:function(T,r){if(1&T&&(o.GBs(M,5),o.GBs(b,5)),2&T){let f;o.mGM(f=o.lsd())&&(r.newClientUserModal=f.first),o.mGM(f=o.lsd())&&(r.deleteClientUserModal=f.first)}},inputs:{currentUser:"currentUser",showClientDropdown:"showClientDropdown"},decls:18,vars:8,consts:()=>{let a,T,r,f,I,A,w,_e,Q,ge,Le,Oe,Re;return a="Novi administrator",T="Lista administratora",r="Ukupno administratora:",f="Ime i prezime",I="Kontakt",A="Role",w="Akcija",_e="Nema dodanih administratora",Q="Novi administator:",ge="Brisanje administratora:",Le="Jeste li sigurni da \u017Eelite obrisati korisnika kao administratora?",Oe="Odustani",Re="Obri\u0161i",[["noAdmins",""],["newClientUserModal",""],["deleteClientUserModal",""],a,T,r,f,I,A,w,_e,Q,ge,Le,Oe,Re,["class","ms-xl-3 d-flex justify-content-between align-items-center pt-2 pt-lg-3 mb-2 mg-lg-3",4,"ngIf"],[1,"container-fluid","card","border-0","bg-transparent"],[1,"card-header","align-items-center","mb-2","p-0","bg-transparent","border-0"],[1,"d-flex","flex-column","flex-lg-row","align-items-center","justify-content-between","mb-2"],["class","mb-3 mb-lg-0",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-dark","rounded","d-flex","align-items-center","justify-content-center",3,"click"],["src","assets/icons/icon-user-plus.svg",1,"text-snow-white","me-2",3,"svgStyle"],[4,"ngIf","ngIfElse"],[4,"ngIf"],["class","d-flex justify-content-center",4,"ngIf"],[1,"ms-xl-3","d-flex","justify-content-between","align-items-center","pt-2","pt-lg-3","mb-2","mg-lg-3"],["type","button","appGoBack","","appHiddenDesktop","",1,"btn","btn-link"],[3,"icon"],[1,"fw-600","m-0"],[1,"menu-ce
1nter-fix"],[1,"mb-3","mb-lg-0"],[1,"me-2","fst-italic","font-size-14"],[1,"badge","rounded-pill","bg-bronze"],[1,"row","mb-2","align-items-center","fw-600","d-none","font-size-14","d-lg-flex","border-bottom","g-0","px-2"],[1,"fw-600","col-1","pt-2","pb-2","px-3"],[1,"fw-600","col-4","pt-2","pb-2"],[1,"fw-600","col-3","pt-2","pb-2"],[1,"fw-600","col-2","pt-2","pb-2"],[1,"card-body","bg-white","rounded-sm","p-0"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"clientUser","client","currentUser","index","clientRoles","deleteClientUser",4,"ngIf"],[3,"deleteClientUser","clientUser","client","currentUser","index","clientRoles"],[1,"py-2"],["src","assets/icons/icon-info.svg",1,"d-inline-block","vertical-align-center","me-2",3,"svgStyle"],[1,"d-flex","justify-content-center"],["animation","spin","size","2x",3,"icon"],[1,"modal-header","d-flex","justify-content-between"],[1,"me-1"],[1,"fw-600"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body","text-center"],[3,"new","client","newClientUser",4,"ngIf"],[3,"newClientUser","new","client"],[1,"modal-header","d-flex","align-items-center","justify-content-between"],[1,"modal-footer","d-flex","justify-content-between"],["type","button",1,"btn","col-3",3,"click"],["type","button",1,"btn","btn-danger","rounded","col-3",3,"click"]]},template:function(T,r){if(1&T){const f=o.RV6();o.DNE(0,ae,6,1,"div",16),o.j41(1,"div",17)(2,"div",18)(3,"div",19),o.DNE(4,Se,5,1,"span",20),o.j41(5,"button",21),o.bIt("click",function(){return o.eBV(f),o.Njj(r.addClientUserModal())}),o.nrm(6,"svg-icon",22),o.j41(7,"span"),o.pXf(8,3),o.k0s()()(),o.DNE(9,fe,12,0,"ng-container",23),o.k0s(),o.DNE(10,ne,3,2,"ng-container",24)(11,Xe,4,2,"ng-template",null,0,o.C5r)(13,Ye,2,1,"div",25),o.k0s(),o.DNE(14,Ve,9,2,"ng-template",null,1,o.C5r)(16,He,1,1,"ng-template",null,2,o.C5r)}if(2&T){const f=o.sdS(12);o.Y8G("ngIf",r.showClientDropdown),o.R7$(4),o.Y8G("ngIf",null==r.clientAdmins?null:r.clientAdmins.length),o.R7$(2),o.Y8G("svgStyle",o.lJ4(7,$)),o.R7$(3),o.Y8G("ngIf",(null==r.clientAdmins?null:r.clientAdmins.length)>0)("ngIfElse",f),o.R7$(),o.Y8G("ngIf",(null==r.clientAdmins?null:r.clientAdmins.length)>0),o.R7$(3),o.Y8G("ngIf",r.loading.clientAdmins)}},dependencies:[K.Sq,K.bT,J.aY,ee.d,oe.S,x.DM,R,Y.o],encapsulation:2}),G})()},53167:(nn,ie,C)=>{C.d(ie,{w:()=>Ee});var n=C(54438),d=C(18359),re=C(45383),H=C(90515),o=C(47690),de=C(50779),K=C(60177),J=C(87787),ee=C(20060),oe=C(534),x=C(3366);const e=["newClientRoleModal"],Ge=["deleteClientRoleModal"],W=R=>({"col-lg-11":R});function le(R,Y){if(1&R){const M=n.RV6();n.j41(0,"div",15)(1,"button",16),n.bIt("click",function(){n.eBV(M);const $=n.XpG(2);return n.Njj($.addClientRoleModal())}),n.nrm(2,"fa-icon",17),n.j41(3,"span",18),n.pXf(4,3),n.k0s()()()}if(2&R){const M=n.XpG(2);n.R7$(2),n.Y8G("icon",M.faUserTag)}}function v(R,Y){if(1&R){const M=n.RV6();n.j41(0,"div",27)(1,"button",28),n.bIt("click",function(){n.eBV(M);const $=n.XpG().$implicit,F=n.XpG(3);return n.Njj(F.openDeleteClientRoleModal($))}),n.nrm(2,"fa-icon",29),n.k0s()()}if(2&R){const M=n.XpG(4);n.R7$(2),n.Y8G("icon",M.faTrash)}}function se(R,Y){if(1&R&&(n.j41(0,"div",23)(1,"div",24)(2,"a",25),n.EFF(3),n.k0s()(),n.DNE(4,v,3,1,"div",26),n.k0s()),2&R){const M=Y.$implicit,b=n.XpG(3);n.R7$(),n.Y8G("ngClass",n.eq3(6,W,b.hasAcl("admin"))),n.R7$(),n.FCK("routerLink","/clients/",null==b.client?null:b.client.uuid,"/role/",M.id,""),n.R7$(),n.JRh(M.name),n.R7$(),n.Y8G("ngIf",M.clientId&&(b.hasAcl("admin")||(null==b.currentUser?null:b.currentUser.isAdmin)))}}function q(R,Y){if(1&R&&(n.qex(0),n.j41(1,"div",19)(2,"div",20),n.pXf(3,4),n.k0s(),n.nrm(4,"div",21),n.k0s(),n.DNE(5,se,5,8,"div",22),n.bVm()),2&R){const M=n.XpG(2);n.R7$(5),n.Y8G("ngForOf",M.clientAvailableRoles)}}function he(R,Y){1&R&&(n.j41(0,"div",30),n.pXf(1,5),n.k0s())}function ve(R,Y){if(1&R&&(n.qex(0),n.DNE(1,le,5,1,"div",13)(2,q,6,1,"ng-container",14)(3,he,2,0,"ng-template",null,2,n.C5r),n.bVm()),2&R){const M=n.sdS(4),b=n.XpG();n.R7$(),n.Y8G("ngIf",b.hasAcl("admin")||(null==b.currentUser?null:b.currentUser.isAdmin)),n.R7$(),n.Y8G("ngIf",!b.loading.roles&&(null==b.clientAvailableRoles?null:b.clientAvailableRoles.length)>0)("ngIfElse",M)}}function Ce(R,Y){if(1&R){const M=n.RV6();n.j41(0,"div",31)(1,"h5",32)(2,"span",33),n.pXf(3,6),n.k0s(),n.j41(4,"span",34),n.EFF(5),n.k0s()(),n.j41(6,"button",35),n.bIt("click",function(){n.eBV(M);const $=n.XpG();return $.modalRef.hide(),n.Njj($.modalRef=void 0)}),n.k0s()(),n.j41(7,"div",36)(8,"app-role-edit",37),n.bIt("newRole",function($){n.eBV(M);const F=n.XpG();return n.Njj(F.roleAdded($))}),n.k0s()()}if(2&R){const M=n.XpG();n.R7$(5),n.JRh(null==M.client?null:M.client.name),n.R7$(3),n.Y8G("new",!0)("client",M.client)}}function ue(R,Y){if(1&R){const M=n.RV6();n.qex(0),n.j41(1,"div",31)(2,"h5",38),n.pXf(3,7),n.k0s(),n.j41(4,"button",35),n.bIt("click",function(){n.eBV(M);const $=n.XpG(2);return $.modalRef.hide(),n.Njj($.modalRef=void 0)}),n.k0s()(),n.j41(5,"div",36)(6,"div",39),n.pXf(7,8),n.k0s(),n.j41(8,"div",34),n.EFF(9),n.k0s()(),n.j41(10,"div",40)(11,"button",41),n.bIt("click",function(){n.eBV(M);const $=n.XpG(2);return $.modalRef.hide(),n.Njj($.modalRef=void 0)}),n.pXf(12,9),n.k0s(),n.j41(13,"button",42),n.bIt("click",function(){n.eBV(M);const $=n.XpG(2);return n.Njj($.confirmDelete())}),n.pXf(14,10),n.k0s()(),n.bVm()}if(2&R){const M=n.XpG(2);n.R7$(9),n.JRh(M.forDeleteRole.name)}}function $e(R,Y){if(1&R&&n.DNE(0,ue,15,1,"ng-container",11),2&R){const M=n.XpG();n.Y8G("ngIf",M.forDeleteRole)}}function me(R,Y){if(1&R&&n.nrm(0,"fa-icon",43),2&R){const M=n.XpG();n.Y8G("icon",M.faSpinner)}}let Ee=(()=>{var R;class Y{constructor(b,$,F){this.auth=b,this.adminS=$,this.modalService=F,this.template="edit",this.clientAvailableRoleIds=new n.bkB,this.clientAvailableRoles=[],this.faTrash=re.yLS,this.faSpinner=re.z1G,this.faUserTag=re.jd5,this.subscription=new d.yU,this.loading={roles:!1},this.subscription.add(this.auth.currentUser.subscribe(ae=>{ae&&(this.currentUser=ae)}))}ngOnInit(){this.getClientRoleList()}roleAdded(b){this.clientAvailableRoles.push(b),this.modalRef.hide(),this.modalRef=void 0}hasAcl(b){return this.auth.hasAcl(this.client,b)}deleteRole(b){this.loading.roles=!0,this.subscription.add(this.adminS.deleteClientRole(this.client,b).subscribe($=>{this.loading.roles=!1;const F=this.clientAvailableRoles.indexOf(b);F>=0&&this.clientAvailableRoles.splice(F,1),this.modalRef.hide(),this.modalRef=void 0}))}getClientRoleList(){const b=this.client&&void 0!==this.client.uuid?this.client.uuid:null;this.loading.roles=!0,this.subscription.add(this.adminS.getClientRoleList(b).subscribe($=>{this.loading.roles=!1,this.clientAvailableRoles=$,this.outputAvailableRoleIds()}))}outputAvailableRoleIds(){const b=this.clientAvailableRoles.map($=>
1$.id);this.clientAvailableRoleIds.emit(b)}addClientRoleModal(){this.modalRef=this.modalService.show(this.newClientRoleModal,{animated:!0,class:"modal-lg"})}openDeleteClientRoleModal(b){this.forDeleteRole=b,this.modalRef=this.modalService.show(this.deleteClientRoleModal,{animated:!0})}confirmDelete(){this.deleteRole(this.forDeleteRole)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(R=Y).\u0275fac=function(b){return new(b||R)(n.rXU(H.uR),n.rXU(o.Y),n.rXU(de.I8))},R.\u0275cmp=n.VBU({type:R,selectors:[["app-client-roles"]],viewQuery:function(b,$){if(1&b&&(n.GBs(e,5),n.GBs(Ge,5)),2&b){let F;n.mGM(F=n.lsd())&&($.newClientRoleModal=F.first),n.mGM(F=n.lsd())&&($.deleteClientRoleModal=F.first)}},inputs:{template:"template",client:"client"},outputs:{clientAvailableRoleIds:"clientAvailableRoleIds"},decls:6,vars:2,consts:()=>{let M,b,$,F,ae,Se,fe,Te,z;return M="Nova rola",b="Ime role",$="Obri\u0161i rolu",F="Nema dostupnih rola",ae="Nova rola za:",Se="Brisanje role",fe="Jeste li sigurni da \u017Eelite obrisati rolu?",Te="Odustani",z="Obri\u0161i",[["newClientRoleModal",""],["deleteClientRoleModal",""],["noRoles",""],M,b,F,ae,Se,fe,Te,z,[4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["class","col-12 text-end mb-3",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"col-12","text-end","mb-3"],["type","button","tooltip","Kreiraj novu rolu",1,"btn","btn-sm","btn-success","text-pearl-white","rounded",3,"click"],[1,"me-lg-2",3,"icon"],[1,"d-none","d-lg-inline"],[1,"row","bg-white","rounded-xs","shadow-sm","mb-1","align-items-center","border-bottom","fw-bold","d-none","d-lg-flex","border-bottom"],[1,"fw-bold","col-10","pt-2","pb-2"],[1,"fw-bold","col-2","pt-2","pb-2"],["class","row bg-white rounded-xs mb-1 text-capitalize",4,"ngFor","ngForOf"],[1,"row","bg-white","rounded-xs","mb-1","text-capitalize"],[1,"col-12","pt-2","pb-2",3,"ngClass"],[1,"text-decoration-none",3,"routerLink"],["class","col-12 col-lg-1",4,"ngIf"],[1,"col-12","col-lg-1"],["tooltip",$,"type","button",1,"btn",3,"click"],[3,"icon"],[1,"alert","alert-info"],[1,"modal-header","d-flex","align-items-center","justify-content-between"],[1,"m-0"],[1,"me-2"],[1,"fw-bold"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body","text-center"],[3,"newRole","new","client"],[1,"m-0","fw-bold"],[1,"mb-3"],[1,"modal-footer","d-flex","justify-content-between"],[1,"btn",3,"click"],["type","button",1,"col-3","btn","btn-danger","rounded",3,"click"],["animation","spin","size","2x",3,"icon"]]},template:function(b,$){1&b&&n.DNE(0,ve,5,3,"ng-container",11)(1,Ce,9,3,"ng-template",null,0,n.C5r)(3,$e,1,1,"ng-template",null,1,n.C5r)(5,me,1,1,"fa-icon",12),2&b&&(n.Y8G("ngIf","edit"===$.template),n.R7$(5),n.Y8G("ngIf",$.loading.roles))},dependencies:[K.YU,K.Sq,K.bT,J.Wk,ee.aY,oe.dg,x.A],encapsulation:2}),Y})()},98269:(nn,ie,C)=>{C.d(ie,{w:()=>n.w});var n=C(53167)},11221:(nn,ie,C)=>{C.d(ie,{o:()=>et});var n=C(54438),d=C(89417),re=C(15083),H=C(40334),o=C(18359),de=C(7673),K=C(25558),J=C(45383),ee=C(63620),oe=C(47690),x=C(90515),e=C(35691),W=(C(98269),C(87787)),le=C(60177),v=C(20060),se=C(94388),q=C(72510),he=C(89978),ve=C(64042),Ce=C(7181),ue=C(53167);const $e=["clientRoles"],me=(c,m)=>({"mb-2":c,"mb-4":m}),Ee=c=>({"col-lg-9":c}),R=c=>({"is-invalid":c}),Y=(c,m)=>[c,m];function M(c,m){if(1&c&&(n.j41(0,"div",62)(1,"button",63),n.nrm(2,"fa-icon",64),n.k0s(),n.j41(3,"h5",65),n.pXf(4,3),n.k0s(),n.nrm(5,"div",66),n.k0s()),2&c){const E=n.XpG();n.R7$(2),n.Y8G("icon",E.faChevronLeft)}}function b(c,m){if(1&c&&n.nrm(0,"app-profile-picture",70),2&c){const E=n.XpG(2);n.Y8G("user",E.clientUser)("enableEdit",!0)}}function $(c,m){if(1&c&&(n.j41(0,"div",67)(1,"div",68),n.DNE(2,b,1,2,"app-profile-picture",69),n.k0s()()),2&c){const E=n.XpG();n.R7$(2),n.Y8G("ngIf",E.clientUser)}}function F(c,m){1&c&&(n.j41(0,"div",71),n.nrm(1,"input",72),n.j41(2,"label",73),n.pXf(3,4),n.k0s()())}function ae(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,5),n.k0s())}function Se(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,6),n.k0s())}function fe(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,ae,2,0,"div",56)(2,Se,2,0,"div",56),n.k0s()),2&c){const E=n.XpG();n.R7$(),n.Y8G("ngIf",E.f.email.errors.required),n.R7$(),n.Y8G("ngIf",E.f.email.errors.email)}}function Te(c,m){1&c&&(n.j41(0,"div",75)(1,"div"),n.pXf(2,7),n.k0s()())}function z(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,16),n.k0s())}function ne(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,17),n.k0s())}function Xe(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,z,2,0,"div",56)(2,ne,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.oib.errors.required),n.R7$(),n.Y8G("ngIf",E.f.oib.errors.digitsLen)}}function Ye(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,18),n.k0s())}function Be(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,19),n.k0s())}function Ve(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,Ye,2,0,"div",56)(2,Be,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.mbo.errors.required),n.R7$(),n.Y8G("ngIf",E.f.mbo.errors.digitsLen)}}function Ke(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,20),n.k0s())}function qe(c,m){if(1&c&&(n.j41(0,"div",95),n.DNE(1,Ke,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.gender.errors.required)}}function Je(c,m){if(1&c&&(n.qex(0),n.j41(1,"div",82),n.nrm(2,"input",83),n.j41(3,"label",84),n.pXf(4,11),n.k0s(),n.DNE(5,Xe,3,2,"div",54),n.k0s(),n.j41(6,"div",85),n.nrm(7,"input",86),n.j41(8,"label",87),n.pXf(9,12),n.k0s(),n.DNE(10,Ve,3,2,"div",54),n.k0s(),n.j41(11,"div",88),n.pXf(12,13),n.k0s(),n.j41(13,"div",89)(14,"div"),n.nrm(15,"input",90),n.j41(16,"label",91),n.pXf(17,14),n.k0s(),n.nrm(18,"input",92),n.j41(19,"label",93),n.pXf(20,15),n.k0s()()(),n.DNE(21,qe,2,1,"div",94),n.bVm()),2&c){const E=n.XpG(2);n.R7$(2),n.Y8G("ngClass",n.eq3(6,R,E.submitted&&E.f.oib.errors)),n.R7$(3),n.Y8G("ngIf",E.submitted&&E.f.oib.errors),n.R7$(2),n.Y8G("ngClass",n.eq3(8,R,E.submitted&&E.f.mbo.errors)),n.R7$(3),n.Y8G("ngIf",E.submitted&&E.f.mbo.errors),n.R7$(3),n.Y8G("ngClass",n.eq3(10,R,E.submitted&&E.f.gender.errors)),n.R7$(8),n.Y8G("ngIf",E.submitted&&E.f.gender.errors)}}function We(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,21),n.k0s())}function He(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,22),n.k0s())}function Ze(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,23),n.k0s())}function g(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,24),n.k0s())}function G(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,We,2,0,"div",56)(2,He,2,0,"div",56)(3,Ze,2,0,"div",56)(4,g,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(2);n.R7$(),n.Y8G("ngIf",E.f.name.errors.required),n.R7$(),n.Y8G("ngIf",E.f.name.errors.minlength),n.R7$(),n.Y8G("ngIf",E.f.name.errors.maxlength),n.R7$(),n.Y8G("ngIf",E.f.name.errors.pattern)}}function a(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,25),n.k0s())}function T(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,26),n.k0s())}function r(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,27),n.k0s())}function f(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,28),n.k0s())}function I(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,a,2,0,"div",56)(2,T,2,0,"div",56)(3,r,2,0,"div",56)(4,f,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(2);n.R7$(),n.Y8G("ngIf",E.f.lastName.errors.required),n.R7$(),n.Y8G("ngIf",E.f.lastName.errors.minlength),n.R7$(),n.Y8G("ngIf",E.f.lastName.errors.maxlength),n.R7$(),n.Y8G("ngIf",E.f.lastName.errors.pattern)}}function A(c,m){if(1&c&&n.nrm(0,"ngx-intl-tel-input",96),2&c){const E=n.XpG(2);n.Y8G("cssClass",E.telInvalidPhone())("preferredCountries",E.preferredCountries)("searchCountryField",n.l_i(11,Y,E.SearchCountryField.Iso2,E.SearchCountryField.Name))("enableAutoCountrySelect",!0)("enablePlaceholder",!0)("searchCountryFlag",!0)("selectFirstCountry",!1)("separateDialCode",!1)("selectedCountryISO",E.currentCountryPhone.code)("maxLength","15")("phoneValidation",!0)}}function w(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,29),n.k0s())}function _e(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,w,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(2);n.R7$(),n.Y8G("ngIf",E.f.phoneNumber.errors.required)}}function Q(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,34),n.k0s())}function ge(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,Q,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.address.errors.required)}}function Le(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,35),n.k0s())}function Oe(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,Le,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.city.errors.required)}}function Re(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,36),n.k0s())}function k(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,Re,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.postalCode.errors.required)}}function yn(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,37),n.k0s())}function xn(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,yn,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(3);n.R7$(),n.Y8G("ngIf",E.f.countryId.errors.required)}}function Un(c,m){if(1&c){const E=n.RV6();n.qex(0),n.j41(1,"div",97),n.nrm(2,"input",98,0),n.j41(4,"label",99),n.pXf(5,30),n.k0s(),n.DNE(6,ge,2,1,"div",54),n.k0s(),n.j41(7,"div",97),n.nrm(8,"input",100),n.j41(9,"label",101),n.pXf(10,31),n.k0s(),n.DNE(11,Oe,2,1,"div",54),n.k0s(),n.j41(12,"div",97),n.nrm(13,"input",102),n.j41(14,"label",103),n.pXf(15,32),n.k0s(),n.DNE(16,k,2,1,"div",54),n.k0s(),n.j41(17,"div",104)(18,"ng-select",105),n.bIt("close",function(){n.eBV(E);
1const p=n.XpG(2);return n.Njj(p.hideKeyboard())}),n.k0s(),n.DNE(19,xn,2,1,"div",54),n.j41(20,"label",106),n.pXf(21,33),n.k0s()(),n.bVm()}if(2&c){const E=n.XpG(2);n.R7$(2),n.Y8G("ngClass",n.eq3(10,R,E.submitted&&E.f.address.errors)),n.R7$(4),n.Y8G("ngIf",E.submitted&&E.f.address.errors),n.R7$(2),n.Y8G("ngClass",n.eq3(12,R,E.submitted&&E.f.city.errors)),n.R7$(3),n.Y8G("ngIf",E.submitted&&E.f.city.errors),n.R7$(2),n.Y8G("ngClass",n.eq3(14,R,E.submitted&&E.f.postalCode.errors)),n.R7$(3),n.Y8G("ngIf",E.submitted&&E.f.postalCode.errors),n.R7$(2),n.Y8G("items",E.countries)("clearable",!1)("ngClass",n.eq3(16,R,E.submitted&&E.f.countryId.errors)),n.R7$(),n.Y8G("ngIf",E.submitted&&E.f.countryId.errors)}}function Fn(c,m){if(1&c&&(n.qex(0),n.DNE(1,Je,22,12,"ng-container",56),n.j41(2,"div",50)(3,"div",51),n.nrm(4,"input",76),n.j41(5,"label",77),n.pXf(6,8),n.k0s()(),n.DNE(7,G,5,4,"div",54),n.k0s(),n.j41(8,"div",50)(9,"div",51),n.nrm(10,"input",78),n.j41(11,"label",79),n.pXf(12,9),n.k0s()(),n.DNE(13,I,5,4,"div",54),n.k0s(),n.j41(14,"div",50)(15,"div",51),n.DNE(16,A,1,14,"ngx-intl-tel-input",80),n.j41(17,"label",81),n.pXf(18,10),n.k0s()(),n.DNE(19,_e,2,1,"div",54),n.k0s(),n.DNE(20,Un,22,18,"ng-container",56),n.bVm()),2&c){const E=n.XpG();n.R7$(),n.Y8G("ngIf","patient"===E.userType),n.R7$(2),n.Y8G("ngClass",n.eq3(9,R,E.submitted&&E.f.name.errors)),n.R7$(4),n.Y8G("ngIf",E.submitted&&E.f.name.errors),n.R7$(2),n.Y8G("ngClass",n.eq3(11,R,E.submitted&&E.f.lastName.errors)),n.R7$(4),n.Y8G("ngIf",E.submitted&&E.f.lastName.errors),n.R7$(2),n.Y8G("ngClass",n.eq3(13,R,E.submitted&&E.f.phoneNumber.errors)),n.R7$(),n.Y8G("ngIf",E.currentCountry),n.R7$(3),n.Y8G("ngIf",E.submitted&&E.f.phoneNumber.errors),n.R7$(),n.Y8G("ngIf","patient"===E.userType)}}function zn(c,m){if(1&c){const E=n.RV6();n.j41(0,"app-client-roles",110,1),n.bIt("clientAvailableRoleIds",function(p){n.eBV(E);const B=n.XpG(2);return n.Njj(B.clearUnavailableRoles(p))}),n.k0s()}if(2&c){const E=n.XpG(2);n.Y8G("client",E.client)("template","none")}}function an(c,m){if(1&c){const E=n.RV6();n.j41(0,"div",111)(1,"ng-select",112),n.bIt("close",function(){n.eBV(E);const p=n.XpG(2);return n.Njj(p.hideKeyboard())}),n.k0s(),n.j41(2,"label",113),n.pXf(3,38),n.k0s()()}if(2&c){const E=n.XpG(2);n.Y8G("ngClass",n.eq3(4,R,E.submitted&&E.f.roles.errors)),n.R7$(),n.Y8G("items",null==E.clientRolesComponent?null:E.clientRolesComponent.clientAvailableRoles)("multiple",!0)("ngClass",n.eq3(6,R,E.submitted&&E.f.roles.errors))}}function wn(c,m){1&c&&(n.j41(0,"div"),n.pXf(1,39),n.k0s())}function Yn(c,m){if(1&c&&(n.j41(0,"div",74),n.DNE(1,wn,2,0,"div",56),n.k0s()),2&c){const E=n.XpG(2);n.R7$(),n.Y8G("ngIf",E.f.roles.errors.required)}}function Bn(c,m){if(1&c&&n.nrm(0,"fa-icon",114),2&c){const E=n.XpG(2);n.Y8G("icon",E.faSpinner)}}function Vn(c,m){1&c&&n.nrm(0,"hr")}function Kn(c,m){if(1&c&&(n.j41(0,"div",50),n.DNE(1,zn,2,2,"app-client-roles",107),n.j41(2,"div",108),n.DNE(3,an,4,8,"div",109)(4,Yn,2,1,"div",54)(5,Bn,1,1,"fa-icon",60),n.k0s(),n.DNE(6,Vn,1,0,"hr",56),n.k0s()),2&c){const E=n.XpG();n.R7$(),n.Y8G("ngIf",null==E.client?null:E.client.uuid),n.R7$(2),n.Y8G("ngIf",(null==E.clientRolesComponent?null:E.clientRolesComponent.clientAvailableRoles.length)>0),n.R7$(),n.Y8G("ngIf",E.submitted&&E.f.roles.errors),n.R7$(),n.Y8G("ngIf",E.loading.roles),n.R7$(),n.Y8G("ngIf",E.clientUserForm.dirty&&E.clientUserForm.touched)}}function qn(c,m){1&c&&(n.j41(0,"span"),n.pXf(1,40),n.k0s())}function Jn(c,m){1&c&&(n.j41(0,"span"),n.pXf(1,41),n.k0s())}function Wn(c,m){if(1&c&&(n.j41(0,"button",115),n.DNE(1,qn,2,0,"span",56)(2,Jn,2,0,"span",56),n.k0s()),2&c){const E=n.XpG();n.R7$(),n.Y8G("ngIf",!E.new),n.R7$(),n.Y8G("ngIf",E.new)}}function Hn(c,m){if(1&c&&n.nrm(0,"fa-icon",114),2&c){const E=n.XpG();n.Y8G("icon",E.faSpinner)}}function Zn(c,m){if(1&c){const E=n.RV6();n.j41(0,"button",116),n.bIt("click",function(){n.eBV(E);const p=n.XpG();return n.Njj(p.checkEmail())}),n.j41(1,"span"),n.pXf(2,42),n.k0s()()}}const Qn=(c,m)=>E=>{const L=E.value;if(null==L||""===L)return null;const p=String(L).replace(/\D/g,"").length;return p<c||p>m?{digitsLen:{min:c,max:m,actual:p}}:null};let et=(()=>{var c;class m{constructor(L,p,B,ce,be,Me,Pe){this.route=L,this.router=p,this.auth=B,this.adminS=ce,this.alert=be,this.formBuilder=Me,this.specialistService=Pe,this.userType="clientUser",this.newClientUser=new n.bkB,this.subscription=new o.yU,this.faSpinner=J.z1G,this.faChevronLeft=J.Wzs,this.preferredCountries=[ee.ij.Croatia,ee.ij.Germany],this.SearchCountryField=ee.XY,this.countries=[],this.currentCountry=null,this.currentCountryPhone=null,this.submitted=!1,this.nameRegex="^[A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u
10219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+(?: [A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u0219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+)*$",this.loading={client:!1,clientUser:!1,roles:!1,countries:!1,emailCheck:!1},this.loadSettings(),this.subscription.add(this.auth.currentUser.subscribe(Ae=>{this.currentUser=Ae,this.setClientBusinessRoles()}))}ngOnInit(){const p=this.new&&"patient"===this.userType?[]:[d.k0.required],B="clientUser"===this.userType?[d.k0.required]:[],ce={uuid:[null,this.new?[]:[d.k0.required]],clientUuid:[null,[d.k0.required]],userType:[this.userType,[d.k0.required]],email:[null,[d.k0.required,d.k0.email]],name:[null,[d.k0.required,d.k0.minLength(2),d.k0.maxLength(100),d.k0.pattern(this.nameRegex)]],lastName:[null,[d.k0.required,d.k0.minLength(2),d.k0.maxLength(100),d.k0.pattern(this.nameRegex)]],roles:[null,B],phoneNumber:[null,p],emailChecked:!1,emailExists:!1};"patient"===this.userType&&Object.assign(ce,{oib:[null,[Qn(11,15)]],gender:[null,[d.k0.required]],address:[null,[d.k0.required]],city:[null,[d.k0.required]],mbo:null,postalCode:null,countryId:1}),this.clientUserForm=this.formBuilder.group(ce),this.loadClientUser()}setClientBusinessRoles(){if(!this.client||!this.currentUser)return!1;this.auth.getClientBusinessRoleNames(this.client)}hideKeyboard(){re.Ii.isNativePlatform()&&H.s3.hide().then(L=>{})}hasAcl(L){return this.auth.hasAcl(this.client,L)}loadSettings(){this.loading.countries=!0,this.subscription.add(this.specialistService.getSpecialistCountryList().subscribe(L=>{this.loading.countries=!1,this.countries=L,this.setCurrentCountry()}))}loadClientUser(){this.subscription.add(this.route.params.pipe((0,K.n)(L=>{this.loading.clientUser=!0;const p=L.clientUserUuid?L.clientUserUuid:null;return this.clientUuid=L.clientUuid?L.clientUuid:this.clientUuid,this.new||p?(this.loadClient(),this.new?(0,de.of)(null):this.adminS.getClientUserByUuid(p,this.clientUuid)):this.router.navigate(["/clients"])})).subscribe(L=>{this.loading.clientUser=!1,!this.new&&!L&&this.alert.error("Klijent nije prona\u0111en"),this.clientUser=L,this.updateFormValues()}))}loadClient(){!this.client||this.clientUuid&&this.client.uuid!==this.clientUuid?(this.loading.client=!0,this.subscription.add(this.adminS.getClientByUuid(this.clientUuid).subscribe(L=>{this.loading.client=!1,this.client=L,this.updateFormValues(),this.setClientBusinessRoles()}))):this.clientUuid=this.client.uuid}telInvalidPhone(){const L="form-control";return!this.submitted||this.submitted&&null===this.f.phoneNumber.errors?L:`${L} is-invalid`}get f(){return this.clientUserForm.controls}clearUnavailableRoles(L){this.clientUser&&(this.clientUser.roles=this.clientUser.roles.filter(p=>L.indexOf(p)>=0),this.clientUserForm.patchValue({roles:this.clientUser.roles}))}updateFormValues(){this.clientUserForm.reset(),this.client&&(this.new||this.clientUser)&&(this.clientUserForm.patchValue({clientUuid:this.clientUuid}),this.clientUserForm.patchValue({userType:this.userType}),this.clientUser&&(this.clientUserForm.patchValue({uuid:this.clientUser.uuid}),this.clientUserForm.patchValue({name:this.clientUser.name}),this.clientUserForm.patchValue({lastName:this.clientUser.lastName}),this.clientUserForm.patchValue({email:this.clientUser.email}),this.clientUserForm.patchValue({roles:this.clientUser.roles}),this.clientUserForm.patchValue({phoneNumber:this.clientUser.phoneNumber}),this.clientUserForm.patchValue({emailChecked:!0})),this.setCurrentCountry())}setCurrentCountry(){if(!this.countries||!this.new&&!this.clientUser)return!1;let L="HR";if(!this.new&&void 0!==this.clientUser.countryId){const p=this.countries.find(B=>B.id===this.clientUser.countryId);p&&(L=p.code)}for(const[p,B]of Object.entries(ee.ij))this.countries.push({code:B.toUpperCase(),name:p});this.currentCountry=this.countries.find(p=>p.code===L),this.currentCountryPhone=this.countries.find(p=>p.code===L),this.clientUser.countryId&&this.clientUserForm.patchValue({countryId:this.clientUser.countryId})}
1onSubmit(){this.submitted=!0,!this.clientUserForm.invalid&&(this.new?this.createNewClientUser():this.updateExistingClientUser())}checkEmail(){this.submitted=!0;const L=this.clientUserForm.get("email");L.invalid||(this.loading.emailCheck=!0,this.subscription.add(this.adminS.checkExistingUserEmail(L.value).subscribe(p=>{this.submitted=!1,this.loading.emailCheck=!1;let B={emailChecked:!0};var ce,be,Me,Pe,Ae;p.exists&&(B={...B,address:null==p||null===(ce=p.user)||void 0===ce?void 0:ce.address,city:null==p||null===(be=p.user)||void 0===be?void 0:be.city,countryId:null==p||null===(Me=p.user)||void 0===Me?void 0:Me.countryId,lastName:null==p||null===(Pe=p.user)||void 0===Pe?void 0:Pe.lastName,postalCode:null==p||null===(Ae=p.user)||void 0===Ae?void 0:Ae.postalNumber,emailExists:!0}),this.clientUserForm.patchValue(B)})))}createNewClientUser(){this.loading.clientUser=!0,this.subscription.add(this.adminS.createClientUser(this.clientUserForm.value).subscribe(L=>{this.loading.clientUser=!1,L&&(this.clientUser=L,this.updateFormValues(),this.alert.success("Kreirano"),this.newClientUser.emit(L))}))}updateExistingClientUser(){this.loading.clientUser=!0,this.subscription.add(this.adminS.updateClientUser(this.clientUserForm.value).subscribe(L=>{this.loading.clientUser=!1,L&&(this.clientUser=L,this.updateFormValues(),this.alert.success("A\u017Eurirano"))}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(c=m).\u0275fac=function(L){return new(L||c)(n.rXU(W.nX),n.rXU(W.Ix),n.rXU(x.uR),n.rXU(oe.Y),n.rXU(x.uE),n.rXU(d.ok),n.rXU(e.x))},c.\u0275cmp=n.VBU({type:c,selectors:[["app-client-user-edit"]],viewQuery:function(L,p){if(1&L&&n.GBs($e,5),2&L){let B;n.mGM(B=n.lsd())&&(p.clientRolesComponent=B.first)}},inputs:{new:"new",userType:"userType",client:"client"},outputs:{newClientUser:"newClientUser"},decls:20,vars:21,consts:()=>{let E,L,p,B,ce,be,Me,Pe,Ae,cn,rn,tn,dn,on,Cn,En,_n,fn,Tn,gn,In,Nn,pn,un,mn,Sn,Ln,Rn,bn,Mn,Pn,An,hn,vn,Z,$n,On,Gn,Xn,jn,Dn,kn;return E="E-mail",L="Ure\u0111ivanje administratora:",p="ID",B="E-mail obavezno polje",ce="Neispravan format e-mail adrese",be="E-mail adresa ve\u0107 postoji. Ako nastavite, kreirat \u0107e se novi profil pacijenta, osnovni podaci su preuzeti iz postoje\u0107eg korisni\u010Dkog ra\u010Duna.",Me="Ime",Pe="Prezime",Ae="Telefonski broj",cn="OIB",rn="MBO",tn="Spol",dn="\u017Denski",on="Mu\u0161ki",Cn="OIB obavezno polje",En="Ispravan OIB ima minimalno 11 brojeva i maksimalno 15 brojeva",_n="MBO obavezno polje",fn="Ispravan MBO je 9 brojeva",Tn="Spol obavezno polje",gn="Ime obavezno polje",In="Minimalno 2 znaka",Nn="Maksimalno 100 znakova",pn="Neispravan format imena",un="Prezime obavezno polje",mn="Minimalno 2 znaka",Sn="Maksimalno 100 znakova",Ln="Neispravan format prezimena",Rn="Telefonski broj obavezno polje",bn="Odaberi dr\u017Eavu",Mn="Adresa",Pn="Grad",An="Po\u0161tanski broj",hn="Dr\u017Eava",vn="Adresa obavezno polje",Z="Grad obavezno polje",$n="Po\u0161tanski broj je obavezno polje",On="Dr\u017Eava obavezno polje",Gn="Dozvoljene role",Xn="Obavezna barem jedna rola",jn="Spremi",Dn="Kreiraj",kn="Nastavi",[["addressGeocode",""],["clientRoles",""],E,L,p,B,ce,be,Me,Pe,Ae,cn,rn,tn,dn,on,Cn,En,_n,fn,Tn,gn,In,Nn,pn,un,mn,Sn,Ln,Rn,Mn,Pn,An,hn,vn,Z,$n,On,Gn,Xn,jn,Dn,kn,[1,"container-fluid"],["class","ms-xl-3 d-flex justify-content-between align-items-center mb-3 pt-2 pt-lg-3",4,"ngIf"],[1,"text-start",3,"ngSubmit","formGroup","ngClass"],[1,"row","mb-3"],["class","col-12 col-lg-3 d-flex align-items-end justify-content-center mb-3 mb-lg-0",4,"ngIf"],[1,"col-12","pt-2",3,"ngClass"],["class","mb-3 form-floating",4,"ngIf"],[1,"mb-3","input-group","has-validation"],[1,"form-floating",3,"ngClass"],["type","text","formControlName","email","id","email",1,"form-control","fw-600"],["for","email",1,"fw-600"],["class","invalid-feedback w-100",4,"ngIf"],["class","alert alert-info",4,"ngIf"],[4,"ngIf"],["class","mb-3 input-group has-validation",4,"ngIf"],[1,"d-block","text-end"],["type","submit","class","col-3 btn btn-success rounded text-pearl-white",4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["type","button","class","col-3 btn btn-success rounded text-pearl-white",3,"click",4,"ngIf"],[1,"ms-xl-3","d-flex","justify-content-between","align-items-center","mb-3","pt-2","pt-lg-3"],["type","button","appGoBack","","appHiddenDesktop","",1,"btn","btn-link"],[3,"icon"],[1,"fw-600","m-0"],[1,"menu-ce
1nter-fix"],[1,"col-12","col-lg-3","d-flex","align-items-end","justify-content-center","mb-3","mb-lg-0"],[1,"d-flex","flex-column","align-items-center"],[3,"user","enableEdit",4,"ngIf"],[3,"user","enableEdit"],[1,"mb-3","form-floating"],["type","text","formControlName","uuid","id","uuid","readonly","",1,"form-control","fw-600"],["for","uuid",1,"fw-600"],[1,"invalid-feedback","w-100"],[1,"alert","alert-info"],["type","text","formControlName","name","id","name",1,"form-control","fw-600"],["for","name",1,"fw-600"],["type","text","formControlName","lastName","id","lastName",1,"form-control","fw-600"],["for","lastName",1,"fw-600"],["id","phoneNumber","formControlName","phoneNumber",3,"cssClass","preferredCountries","searchCountryField","enableAutoCountrySelect","enablePlaceholder","searchCountryFlag","selectFirstCountry","separateDialCode","selectedCountryISO","maxLength","phoneValidation",4,"ngIf"],["for","phoneNumber",1,"fw-600"],["id","oib",1,"form-floating","mb-3"],["type","number","formControlName","oib","id","oib_element",1,"form-control",3,"ngClass"],["for","oib_element"],["id","mbo",1,"form-floating","mb-3"],["type","number","formControlName","mbo","id","mbo_element",1,"form-control",3,"ngClass"],["for","mbo_element"],[1,"fw-600","mb-2"],[1,"form-check","switch-div","rounded","mb-4",3,"ngClass"],["id","toggle-on","formControlName","gender","name","gender","value","F","type","radio",1,"toggle","toggle-left"],["for","toggle-on",1,"btn-switch","rounded","p-2"],["id","toggle-off","formControlName","gender","name","gender","value","M","type","radio",1,"toggle","toggle-right"],["for","toggle-off",1,"btn-switch","rounded","p-2"],["class","invalid-feedback w-100 mb-3",4,"ngIf"],[1,"invalid-feedback","w-100","mb-3"],["id","phoneNumber","formControlName","phoneNumber",3,"cssClass","preferredCountries","searchCountryField","enableAutoCountrySelect","enablePlaceholder","searchCountryFlag","selectFirstCountry","separateDialCode","selectedCountryISO","maxLength","phoneValidation"],[1,"form-floating","mb-3"],["type","text","formControlName","address","id","address","placeholder","Bana Jela\u010di\u0107a, 25",1,"form-control",3,"ngClass"],["for","address"],["type","text","placeholder","Zagreb","formControlName","city","id","city",1,"form-control",3,"ngClass"],["for","city"],["type","text","formControlName","postalCode","id","postalCode","placeholder","10000",1,"form-control",3,"ngClass"],["for","postalCode"],[1,"form-floating","custom-select","mb-3"],["appNgSelectCloseButton","","formControlName","countryId","bindValue","id","bindLabel","name","id","countryId","placeholder",bn,1,"h56",3,"close","items","clearable","ngClass"],["for","countryId"],[3,"client","template","clientAvailableRoleIds",4,"ngIf"],[1,"input-group","has-validation"],["class","form-floating custom-select",3,"ngClass",4,"ngIf"],[3,"clientAvailableRoleIds","client","template"],[1,"form-floating","custom-select",3,"ngClass"],["appNgSelectCloseButton","","formControlName","roles","bindValue","id","bindLabel","name","id","roles",1,"w-100","h56",3,"close","items","multiple","ngClass"],["for","roles",1,"fw-600"],["animation","spin","size","2x",3,"icon"],["type","submit",1,"col-3","btn","btn-success","rounded","text-pearl-white"],["type","button",1,"col-3","btn","btn-success","rounded","text-pearl-white",3,"click"]]},template:function(L,p){1&L&&(n.j41(0,"div",43),n.DNE(1,M,6,1,"div",44),n.j41(2,"form",45),n.bIt("ngSubmit",function(){return p.onSubmit()}),n.j41(3,"div",46),n.DNE(4,$,3,1,"div",47),n.j41(5,"div",48),n.DNE(6,F,4,0,"div",49),n.j41(7,"div",50)(8,"div",51),n.nrm(9,"input",52),n.j41(10,"label",53),n.pXf(11,2),n.k0s()(),n.DNE(12,fe,3,2,"div",54)(13,Te,3,0,"div",55),n.k0s(),n.DNE(14,Fn,21,15,"ng-container",56),n.k0s()(),n.DNE(15,Kn,7,5,"div",57),n.j41(16,"div",58),n.DNE(17,Wn,3,2,"button",59)(18,Hn,1,1,"fa-icon",60)(19,Zn,3,0,"button",61),n.k0s()()()),2&L&&(n.R7$(),n.Y8G("ngIf",!p.new),n.R7$(),n.Y8G("formGroup",p.clientUserForm)("ngClass",n.l_i(14,me,p.new,!p.new)),n.R7$(2),n.Y8G("ngIf",!p.new),n.R7$(),n.Y8G("ngClass",n.eq3(17,Ee,!p.new)),n.R7$(),n.Y8G("ngIf",!p.new),n.R7$(2),n.Y8G("ngClass",n.eq3(19,R,p.submitted&&p.f.email.errors)),n.R7$(4),n.Y8G("ngIf",p.submitted&&p.f.email.errors),n.R7$(),n.Y8G("ngIf",p.f.emailExists.value),n.R7$(),n.Y8G("ngIf",p.f.emailChecked.value),n.R7$(),n.Y8G("ngIf","patient"!==p.userType),n.R7$(2),n.Y8G("ngIf",p.f.emailChecked.value&&p.clientUserForm.dirty&&p.clientUserForm.touched),n.R7$(),n.Y8G("ngIf",p.loading.emailCheck),n.R7$(),n.Y8G("ngIf",!p.loading.emailCheck&&!p.f.emailChecked.value))},dependencies:[le.YU,le.bT,v.aY,d.qT,d.me,d.Q0,d.Fm,d.BC,d.cb,d.j4,d.JD,se.r,q.vr,ee.NA,ee.ZP,he.d,ve.S,Ce.d,ue.w],encapsulation:2}),m})()},11956:(nn,ie,C)=>{C.r(ie),C.d(ie,{ClientsModule:()=>v_});var n=C(60177),d=C(89417),re=C(99213),H=C(20060),o=C(72510),de=C(13816),K=C(534),J=C(63620),ee=C(54722),oe=C(78606),x=C(87787),e=C(54438);let Ge=(()=>{var i;class s{}return(i=s).\u0275fac=function(_){return new(_||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["app-clients"]],decls:1,vars:0,template:function(_,l){1&_&&e.nrm(0,"router-outlet")},dependencies:[x.n3],encapsulation:2}),s})();var W=C(18359),le=C(25558),v=C(45383),se=C(47690),q=C(90515);let he=(()=>{var i;class s{constructor(_,l,N,u){this.adminS=_,this.route=l,this.router=N,this.alert=u,this.subscription=new W.yU,this.faSpinner=v.z1G,this.loading={client:!1},this.subscription.add(this.route.params.pipe((0,le.n)(h=>{const j=h.clientUuid?h.clientUuid:null;return j?this.adminS.getClientByUuid(j):this.router.navigate(["/clients"])})).subscribe(h=>
1{if(!h)return this.alert.error("Klijent nije prona\u0111en"),this.router.navigate(["/clients"]);this.client=h}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(se.Y),e.rXU(x.nX),e.rXU(x.Ix),e.rXU(q.uE))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client"]],decls:2,vars:0,template:function(_,l){1&_&&(e.j41(0,"p"),e.EFF(1,"client works!"),e.k0s())},encapsulation:2}),s})();var ve=C(32024),Ce=C(50779),ue=C(77540),$e=C(89978),me=C(64042),Ee=C(15083),R=C(40334),Y=C(7673),M=C(28460),b=C(94388),$=C(4766),F=C(81989),ae=C(89988),Se=C(7181),fe=C(52287),Te=C(28999),z=C(67376);const ne=["webhookApiKeyConfirmationModal"],Xe=i=>({"is-invalid":i});function Ye(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,6),e.k0s())}function Be(i,s){if(1&i&&(e.j41(0,"div",32),e.DNE(1,Ye,2,0,"div",31),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.apiUrl.errors.required)}}function Ve(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,7),e.k0s())}function Ke(i,s){if(1&i&&(e.j41(0,"div",32),e.DNE(1,Ve,2,0,"div",31),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.apiKey.errors.required)}}function qe(i,s){1&i&&(e.j41(0,"button",36),e.pXf(1,8),e.k0s())}function Je(i,s){if(1&i&&e.nrm(0,"fa-icon",37),2&i){const t=e.XpG(3);e.Y8G("icon",t.faSpinner)}}function We(i,s){if(1&i&&(e.qex(0),e.nrm(1,"hr"),e.j41(2,"div",33),e.DNE(3,qe,2,0,"button",34)(4,Je,1,1,"fa-icon",35),e.k0s(),e.bVm()),2&i){const t=e.XpG(2);e.R7$(3),e.Y8G("ngIf",!t.loading.save),e.R7$(),e.Y8G("ngIf",t.loading.save)}}function He(i,s){if(1&i){const t=e.RV6();e.j41(0,"form",17),e.bIt("ngSubmit",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onSubmit())}),e.j41(1,"div",18)(2,"label",19),e.pXf(3,1),e.k0s(),e.j41(4,"div",20),e.nrm(5,"input",21),e.DNE(6,Be,2,1,"div",22),e.k0s()(),e.j41(7,"div",18)(8,"label",23),e.pXf(9,2),e.k0s(),e.j41(10,"div",20),e.nrm(11,"input",24),e.DNE(12,Ke,2,1,"div",22),e.k0s()(),e.j41(13,"div",18)(14,"span",25),e.pXf(15,3),e.k0s(),e.j41(16,"div",20),e.nrm(17,"input",26),e.j41(18,"button",27),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.webhookApiKeyConfirmation())}),e.pXf(19,4),e.k0s()()(),e.j41(20,"label",28),e.nrm(21,"input",29),e.j41(22,"span",30),e.pXf(23,5),e.k0s()(),e.DNE(24,We,5,2,"ng-container",31),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("formGroup",t.clientIntegrationForm),e.R7$(5),e.Y8G("ngClass",e.eq3(6,Xe,t.submitted&&t.f.apiUrl.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.apiUrl.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(8,Xe,t.submitted&&t.f.apiKey.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.apiKey.errors),e.R7$(12),e.Y8G("ngIf",null==t.clientIntegrationForm?null:t.clientIntegrationForm.dirty)}}function Ze(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",38)(1,"h5",39),e.pXf(2,9),e.k0s(),e.j41(3,"button",40),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.closeModal())}),e.k0s()(),e.j41(4,"div",41)(5,"div",42)(6,"span",43),e.pXf(7,10),e.k0s(),e.j41(8,"span",44),e.pXf(9,11),e.k0s(),e.j41(10,"span"),e.EFF(11,"( "),e.j41(12,"strong"),e.EFF(13),e.k0s(),e.EFF(14," )"),e.k0s(),e.j41(15,"span",45),e.pXf(16,12),e.k0s()(),e.nrm(17,"hr"),e.j41(18,"div",46)(19,"button",47),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.closeModal())}),e.pXf(20,13),e.k0s(),e.j41(21,"button",48),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.regenerateWebhookKey())}),e.EFF(22,"Kreiraj novi"),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(13),e.JRh(t.integration.provider.name)}}let g=(()=>{var i;class s{constructor(_,l,N,u){this.alert=_,this.formBuilder=l,this.integrationS=N,this.modalService=u,this.integrationUpdated=new e.bkB,this.subscription=new W.yU,this.clientIntegrationForm=void 0,this.submitted=!1,this.loading={save:!1,webhook:!1},this.faSpinner=v.z1G,this.setIntegrationsForm()}ngOnInit(){this.clientIntegrationForm.patchValue({id:this.integration.id,apiKey:this.integration.apiKey,apiUrl:this.integration.config.apiUrl,webhookApiKey:this.integration.webhookApiKey,isActive:this.integration.isActive})}setIntegrationsForm(){this.clientIntegrationForm=this.formBuilder.group({id:[null,[d.k0.required]],apiKey:[null,[d.k0.required]],apiUrl:[null,[d.k0.required]],webhookApiKey:null,isActive:!1})}webhookApiKeyConfirmation(){this.modalRef=this.modalService.show(this.webhookApiKeyConfirmationModal,{animated:!0})}regenerateWebhookKey(){this.closeModal(),this.loading.webhook=!0,this.subscription.add(this.integrationS.regenerateWebhookApiKey(this.integration.id).subscribe(_=>{this.loading.webhook=!1,this.alert.success("Api key generated successfully."),this.integrationUpdated.emit(!0)}))}closeModal(){this.modalRef.hide(),this.modalRef=void 0}get f(){return this.clientIntegrationForm.controls}onSubmit(){if(this.submitted=!0,this.clientIntegrationForm.invali
1d)return;const _=z.clone(this.integration);_.config.apiUrl=this.clientIntegrationForm.value.apiUrl,_.apiKey=this.clientIntegrationForm.value.apiKey,_.isActive=this.clientIntegrationForm.value.isActive,this.loading.save=!0,this.subscription.add(this.integrationS.updateIntegrationConfig(_).subscribe(l=>{this.loading.save=!1,this.alert.success(l.message),this.integrationUpdated.emit(!0)}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(q.uE),e.rXU(d.ok),e.rXU(Te.a),e.rXU(Ce.I8))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-integration"]],viewQuery:function(_,l){if(1&_&&e.GBs(ne,5),2&_){let N;e.mGM(N=e.lsd())&&(l.webhookApiKeyConfirmationModal=N.first)}},inputs:{integration:"integration"},outputs:{integrationUpdated:"integrationUpdated"},standalone:!0,features:[e.aNF],decls:6,vars:2,consts:()=>{let t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe;return t="API Url",_="API klju\u010D",l="Webhook API klju\u010D",N="Kreiraj novi",u="Integracija aktivna",h="API Url obavezno polje",j="API klju\u010D obavezno polje",O="Spremi",X="Potvrda kreiranja novog klju\u010Da.",D="Kreiranjem novog webhook API klju\u010Da prekinut \u0107e se veza s postoje\u0107om integracijom.",Ie="Nakon \u0161to se novi klju\u010D generira, potrebno ga je ru\u010Dno unijeti u sustav Va\u0161eg integracijskog providera",Ne="kako bi veza ponovno funkcionirala.",pe="Otka\u017Ei",[["webhookApiKeyConfirmationModal",""],t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe,[1,"card-header","fw-bold"],[1,"card-body","py-4"],["class","text-start",3,"formGroup","ngSubmit",4,"ngIf"],[1,"text-start",3,"ngSubmit","formGroup"],[1,"mb-3","row","align-items-center"],["for","apiUrl",1,"col-12","col-lg-3","fw-bold"],[1,"input-group","col-12","col-lg-5"],["type","text","formControlName","apiUrl","id","apiUrl",1,"form-control","fw-bold",3,"ngClass"],["class","invalid-feedback w-100",4,"ngIf"],["for","apiKey",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","apiKey","id","apiKey",1,"form-control","fw-bold",3,"ngClass"],[1,"col-12","col-lg-3","fw-bold"],["type","text","readonly","","formControlName","webhookApiKey","id","webhookApiKey",1,"form-control","fw-bold"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"d-flex","align-items-center","fw-bold","mt-4","mb-3"],["type","checkbox","formControlName","isActive",1,"apple-switch","me-2"],[1,"me-3"],[4,"ngIf"],[1,"invalid-feedback","w-100"],[1,"d-flex","justify-content-end"],["type","submit","class","btn btn-success col-3 rounded text-pearl-white",4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["type","submit",1,"btn","btn-success","col-3","rounded","text-pearl-white"],["animation","spin","size","2x",3,"icon"],[1,"modal-header","d-flex","justify-content-between","border-0"],[1,"fw-bold","mb-0"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body"],[1,"mb-4"],[1,"me-1"],[1,"d-block"],[1,"ms-1"],[1,"d-flex","align-items-center","justify-content-around"],["type","button",1,"btn",3,"click"],["type","button",1,"btn","bg-healing-blue","text-snow-white",3,"click"]]},template:function(_,l){1&_&&(e.j41(0,"div",14),e.EFF(1),e.k0s(),e.j41(2,"div",15),e.DNE(3,He,25,10,"form",16),e.k0s(),e.DNE(4,Ze,23,1,"ng-template",null,0,e.C5r)),2&_&&(e.R7$(),e.JRh(l.integration.provider.name),e.R7$(2),e.Y8G("ngIf",l.clientIntegrationForm))},dependencies:[d.YN,d.qT,d.me,d.Zm,d.BC,d.cb,n.bT,J.s0,J.ZP,d.X1,d.j4,d.JD,n.YU,H.aY],encapsulation:2}),s})();function G(i,s){if(1&i&&e.nrm(0,"fa-icon",5),2&i){const t=e.XpG(2);e.Y8G("icon",t.faSpinner)}}function a(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",7)(1,"app-client-integration",8),e.bIt("integrationUpdated",function(){e.eBV(t);const l=e.XpG(3);return e.Njj(l.getClientIntegrationConfigs())}),e.k0s()()}if(2&i){const t=s.$implicit;e.R7$(),e.Y8G("integration",t)}}function T(i,s){if(1&i&&(e.qex(0),e.DNE(1,a,2,1,"div",6),e.bVm()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.integrations)}}function r(i,s){1&i&&(e.qex(0),e.j41(1,"div",9),e.pXf(2,1),e.k0s(),e.bVm())}function f(i,s){if(1&i&&(e.qex(0),e.DNE(1,G,1,1,"fa-icon",4)(2,T,2,1,"ng-container",3)(3,r,3,0,"ng-container",3),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.loading.integrations),e.R7$(),e.Y8G("ngIf",!t.loading.integrations&&t.integrations.length>0),e.R7$(),e.Y8G("ngIf",!t.loading.integrations&&!t.integrations.length)}}let I=(()=>{var i;class s{constructor(_,l){this.auth=_,this.integrationS=l,this.subscription=new W.yU,this.loading={integrations:!1},this.integrations=[],this.faSpinner=v.z1G,this.getClientIntegrationConfigs()}hasAcl(_){return this.auth.hasAcl(this.client,_)}getClientIntegrationConfigs(){this.loading.integrations=!0,this.subscription.add(this.integrationS.getIntegrationConfigs().subscribe(_=>{this.loading.integrations=!1,this.integrations=_}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(q.uR),e.rXU(Te.a))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-integrations"]],inputs:{client:"client"},standalone:!0,features:[e.aNF],decls:3,vars:1,consts:()=>{let t,_;return t="Integracije",_="Ne postoje aktivne integracije za va\u0161eg klijenta",[t,_,[1,"fw-bold","mb-3"],[4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["animation","spin","size","2x",3,"icon"],["class","card mb-4",4,"ngFor","ngForOf"],[1,"card","mb-4"],[3,"integrationUpdated","integration"],[1,"alert-info"]]},template:function(_,l){1&_&&(e.j41(0,"h6",2),e.pXf(1,0),e.k0s(),e.DNE(2,f,4,3,"ng-container",3)),2&_&&(e.R7$(2),e.Y8G("ngIf",l.client&&l.hasAcl("integration")))},dependencies:[fe.r,H.aY,d.YN,n.bT,J.s0,d.X1,K.Ss,n.Sq,g],encapsulation:2}),s})();var A=C(53167),w=C(69037),_e=C(90614),Q=C(48616),ge=C(32266),Le=C(79532),Oe=C(21462),Re=C(11221);const k=["newClientPatientModal"],yn=["deleteClientPatientModal"],xn=["addMedicalDocumentMod
1al"],Un=i=>({"d-none":i}),Fn=i=>({"col-lg-8":i}),zn=()=>({"height.px":20}),an=()=>({"height.px":25}),wn=()=>({"height.px":24});function Yn(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",53),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.showPatientFilter=!l.showPatientFilter)}),e.nrm(1,"fa-icon",54),e.k0s()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSearch)}}function Bn(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",55),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.clearFilter())}),e.j41(1,"span",34),e.pXf(2,12),e.k0s(),e.nrm(3,"fa-icon",35),e.k0s()}if(2&i){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faRedo)}}function Vn(i,s){if(1&i&&(e.j41(0,"span",56),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.JRh(null==t.pager?null:t.pager.total)}}function Kn(i,s){1&i&&(e.j41(0,"span",56),e.EFF(1,"0"),e.k0s())}function qn(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.name)}}function Jn(i,s){if(1&i&&e.EFF(0),2&i){const t=e.XpG().$implicit;e.JRh(null==t?null:t.email)}}function Wn(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,", "),e.k0s())}function Hn(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.DNE(2,Wn,2,0,"span",63),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.address),e.R7$(),e.Y8G("ngIf",null==t?null:t.city)}}function Zn(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.city)}}function Qn(i,s){if(1&i&&(e.j41(0,"div",73),e.nrm(1,"fa-icon",74),e.j41(2,"a",75),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit,_=e.XpG(2);e.R7$(),e.Y8G("icon",_.faAt),e.R7$(),e.Mz_("href","mailto:",t.email,"",e.B4B),e.R7$(),e.JRh(t.email)}}function et(i,s){if(1&i&&(e.j41(0,"div",76),e.nrm(1,"fa-icon",74),e.j41(2,"a",75),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit,_=e.XpG(2);e.R7$(),e.Y8G("icon",_.faMobileAlt),e.R7$(),e.Mz_("href","tel:",t.mob,"",e.B4B),e.R7$(),e.JRh(t.mob)}}function c(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",58)(1,"div",59),e.EFF(2,"#"),e.k0s(),e.j41(3,"div",60),e.EFF(4),e.k0s(),e.j41(5,"div",61)(6,"span"),e.pXf(7,13),e.k0s(),e.j41(8,"span"),e.pXf(9,14),e.k0s()(),e.j41(10,"div",62),e.DNE(11,qn,2,1,"span",51)(12,Jn,1,1,"ng-template",null,4,e.C5r),e.j41(14,"div"),e.DNE(15,Hn,3,2,"span",63)(16,Zn,2,1,"span",63),e.k0s()(),e.j41(17,"div",64),e.pXf(18,15),e.k0s(),e.j41(19,"div",65),e.DNE(20,Qn,4,4,"div",66)(21,et,4,4,"div",67),e.k0s(),e.j41(22,"div",64),e.pXf(23,16),e.k0s(),e.j41(24,"div",68)(25,"button",69),e.bIt("click",function(){const l=e.eBV(t).$implicit,N=e.XpG(2);return e.Njj(N.addMedicalDocumentM(l))}),e.nrm(26,"svg-icon",70),e.k0s(),e.j41(27,"button",71),e.bIt("click",function(){const l=e.eBV(t).$implicit,N=e.XpG(2);return e.Njj(N.deletePatientModal(l))}),e.nrm(28,"svg-icon",72),e.k0s()()()}if(2&i){const t=s.$implicit,_=s.index,l=e.sdS(13);e.R7$(4),e.SpI(" ",_+1," "),e.R7$(7),e.Y8G("ngIf",null==t?null:t.name)("ngIfElse",l),e.R7$(4),e.Y8G("ngIf",null==t?null:t.address),e.R7$(),e.Y8G("ngIf",null==t?null:t.city),e.R7$(4),e.Y8G("ngIf",null==t?null:t.email),e.R7$(),e.Y8G("ngIf",null==t?null:t.mob),e.R7$(5),e.Y8G("svgStyle",e.lJ4(9,an)),e.R7$(2),e.Y8G("svgStyle",e.lJ4(10,an))}}function m(i,s){if(1&i&&(e.qex(0),e.DNE(1,c,29,11,"div",57),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngForOf",t.clientPatients)}}function E(i,s){1&i&&(e.j41(0,"div",77),e.nrm(1,"svg-icon",78),e.j41(2,"span"),e.pXf(3,17),e.k0s()()),2&i&&(e.R7$(),e.Y8G("svgStyle",e.lJ4(1,wn)))}function L(i,s){if(1&i&&(e.j41(0,"div",79),e.nrm(1,"fa-icon",80),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function p(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",81)(1,"h5")(2,"span"),e.pXf(3,18),e.k0s(),e.EFF(4,": "),e.j41(5,"span",82),e.EFF(6),e.k0s()(),e.j41(7,"button",83),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return l.modalRef.hide(),e.Njj(l.modalRef=void 0)}),e.k0s()(),e.j41(8,"div",84)(9,"app-client-user-edit",85),e.bIt("newClientUser",function(l){e.eBV(t);const N=e.XpG();return e.Njj(N.addClientPatient(l))}),e.k0s()()}if(2&i){const t=e.XpG();e.R7$(6),e.JRh(null==t.client?null:t.client.name),e.R7$(3),e.Y8G("new",!0)("userType","patient")("client",t.client)}}function B(i,s){if(1&i&&(e.j41(0,"span",82),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.JRh(t.clientPatient.name)}}
1function ce(i,s){if(1&i&&(e.j41(0,"span",82),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.JRh(null==t.clientPatient?null:t.clientPatient.email)}}function be(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",81)(1,"h5")(2,"span"),e.pXf(3,19),e.k0s(),e.EFF(4,": "),e.DNE(5,B,2,1,"span",86)(6,ce,2,1,"ng-template",null,4,e.C5r),e.k0s(),e.j41(8,"button",83),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return l.modalRef.hide(),e.Njj(l.modalRef=void 0)}),e.k0s()(),e.j41(9,"div",84)(10,"p"),e.pXf(11,20),e.k0s(),e.j41(12,"p")(13,"span",87),e.pXf(14,21),e.k0s(),e.EFF(15),e.k0s(),e.j41(16,"div",88),e.pXf(17,22),e.k0s()(),e.j41(18,"div",89)(19,"button",90),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return l.modalRef.hide(),e.Njj(l.modalRef=void 0)}),e.pXf(20,23),e.k0s(),e.j41(21,"button",91),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.deletePatient())}),e.pXf(22,24),e.k0s()()}if(2&i){const t=e.sdS(7),_=e.XpG();e.R7$(5),e.Y8G("ngIf",null==_.clientPatient?null:_.clientPatient.name)("ngIfElse",t),e.R7$(10),e.JRh(null==_.clientPatient?null:_.clientPatient.email)}}function Me(i,s){if(1&i&&(e.j41(0,"span",82),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.JRh(t.clientPatient.name)}}function Pe(i,s){if(1&i&&(e.j41(0,"span",82),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.JRh(null==t.clientPatient?null:t.clientPatient.email)}}function Ae(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",92)(1,"h5",76)(2,"span",93)(3,"span"),e.pXf(4,25),e.k0s(),e.EFF(5,":"),e.nrm(6,"br"),e.k0s(),e.DNE(7,Me,2,1,"span",86)(8,Pe,2,1,"ng-template",null,4,e.C5r),e.k0s(),e.j41(10,"button",83),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return l.modalRef.hide(),e.Njj(l.modalRef=void 0)}),e.k0s()(),e.j41(11,"div",84),e.nrm(12,"app-documents",94),e.k0s()}if(2&i){const t=e.sdS(9),_=e.XpG();e.R7$(7),e.Y8G("ngIf",null==_.clientPatient?null:_.clientPatient.name)("ngIfElse",t),e.R7$(5),e.Y8G("namespace","e-documents")("includePrivate",!0)("client",_.client)("showNoDocuments",!1)("loadExisting",!1)("userUuid",_.clientPatient.uuid)}}let cn=(()=>{var i;class s{constructor(_,l,N,u,h,j,O){this.platformId=_,this.auth=l,this.adminS=N,this.modalService=u,this.alert=h,this.formBuilder=j,this.deviceService=O,this.subscription=new W.yU,this.faSpinner=v.z1G,this.faUserPlus=v.nWR,this.faAt=v.Hzw,this.faRedo=v.yek,this.faSearch=v.MjD,this.faNotesMedical=v.UPF,this.faTrash=_e.BeE,this.faMobileAlt=v.XRN,this.filterActive=!1,this.defaultFilterKeys=[],this.clientPatients=[],this.loading={clientClients:!1,delete:!1},(Ee.Ii.isNativePlatform()||(0,n.UE)(this.platformId))&&(this.isMobile=this.deviceService.isMobile()&&window.outerWidth<1280,this.showPatientFilter=window.outerWidth>1280),this.resetFilter(),this.searchForm=this.formBuilder.group({query:null})}ngOnInit(){void 0===this.showClientDropdown&&(this.showClientDropdown=!1),this.subscription.add(this.auth.displayClientSubscription.subscribe(_=>{this.client=_,_&&(this.resetFilter(),this.getClientClients(!0))}))}filterIsActive(_){let l=!1;Object.keys(_).forEach(N=>{this.defaultFilterKeys.indexOf(N)<0&&(l=!0)}),this.filterActive=l}changeClient(_){this.client=_,this.clientPatients=[],this.resetFilter(),this.getClientClients()}getClientClients(_=!1){this.loading.clientClients=!0,_&&(this.clientPatients=[],(Ee.Ii.isNativePlatform()||(0,n.UE)(this.platformId))&&(this.showPatientFilter=window.outerWidth>1280)),this.filterIsActive(this.filterData),this.subscription.add(this.adminS.getClientClientsList(this.client.uuid,this.filterData).subscribe(l=>{this.loading.clientClients=!1,l.data&&(this.clientPatients=[...this.clientPatients,...l.data]),this.pager=l.pager}))}resetFilter(){this.filterData=new Q.W,this.filterData.page=1,this.filterData.pageSize=20}clearFilter(){this.resetFilter(),this.searchForm.reset(),this.getClientClients(!0)}onScroll(){var _,l;(null===(_=this.pager)||void 0===_?void 0:_.totalPages)>1&&(null===(l=this.pager)||void 0===l?void 0:l.totalPages)>this.filterData.page&&(this.filterData.page+=1,this.getClientClients())}deletePatientModal(_){this.clientPatient=_,this.modalRef=this.modalService.show(this.deleteClientPatientModal,{animated:!0})}addMedicalDocumentM(_){this.clientPatient=_,this.modalRef=this.modalService.show(this.addMedicalDocumentMod
1al,{animated:!0,class:"modal-lg"})}deletePatient(){this.clientPatient&&(this.loading.delete=!0,this.subscription.add(this.adminS.deleteClientClient(this.client.uuid,this.clientPatient.uuid).subscribe(_=>{if(this.loading.delete=!1,_){const N=[...this.clientPatients].indexOf(this.clientPatient);this.clientPatients.splice(N,1),this.clientPatient=void 0,this.modalRef.hide(),this.modalRef=void 0;const u=void 0!==_.message?_.message:"Uspje\u0161no obrisano";this.alert.success(u)}})))}addClientPatientModal(){this.modalRef=this.modalService.show(this.newClientPatientModal,{animated:!0,class:"modal-lg"})}addClientPatient(_){this.clientPatients=[...this.clientPatients,_],this.modalService.hide()}searchPatients(){if(this.searchForm.invalid)return!1;this.showPatientFilter=!1,this.filterData.page=1,this.filterData={...this.filterData,...this.searchForm.value},this.getClientClients(!0)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(e.Agw),e.rXU(q.uR),e.rXU(se.Y),e.rXU(Ce.I8),e.rXU(q.uE),e.rXU(d.ok),e.rXU(ge.Kg))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-patient-list"]],viewQuery:function(_,l){if(1&_&&(e.GBs(k,5),e.GBs(yn,5),e.GBs(xn,5)),2&_){let N;e.mGM(N=e.lsd())&&(l.newClientPatientModal=N.first),e.mGM(N=e.lsd())&&(l.deleteClientPatientModal=N.first),e.mGM(N=e.lsd())&&(l.addMedicalDocumentModal=N.first)}},inputs:{hasAcl:"hasAcl",showClientDropdown:"showClientDropdown"},decls:47,vars:20,consts:()=>{let t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we;return t="Ime i/ili prezime, email",_="Tra\u017Ei",l="Ukupno pacijenata:",N="Novi pacijent",u="Ime i prezime",h="Adresa",j="E-mail",O="Akcije",X="O\u010Disti",D="Ime i prezime",Ie="Adresa",Ne="Kontakt",pe="Akcije",V="Nema povezanih pacijenta",De="Novi pacijent",ke="Brisanje pacijenta",ye="Jeste li sigurni da \u017Eelite obrisati pacijenta?",xe="E-mail pacijenta:",Ue="Obrisat \u0107e se pacijent iz baze poslovnog korisnika",Fe="Odustani",ze="Obri\u0161i",we="Dodavanje nalaza pacijentu",[["noClientsTemplate",""],["newClientPatientModal",""],["deleteClientPatientModal",""],["addMedicalDocumentModal",""],["clientEmail",""],_,l,N,u,h,j,O,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we,[1,"container-fluid","bg-grey-light3","position-relative","card","rounded-0","border-0","p-0","vh100-header-extended"],["class","btn btn-sm filter-absolute",3,"click",4,"ngIf"],[1,"card-header","sticky-top-header","bg-grey-light3","p-0","border-0","mb-3",3,"ngClass"],[1,"g-0","row","fw-600","d-flex","align-items-center","mb-3",3,"ngSubmit","formGroup"],[1,"col-9","col-lg-6","position-relative","search-form-input","input-group"],["type","text","aria-label","Search","placeholder",t,"formControlName","query",1,"form-control"],[1,"d-flex","position-absolute","z-index-5"],["type","submit",1,"btn","btn-dark","rounded-pill","py-1","me-2"],["appHiddenMobile",""],["appHiddenDesktop","",3,"icon"],["type","button","class","btn btn-outline-dark rounded-pill py-1",3,"click",4,"ngIf"],[1,"row","mb-1","align-items-center"],[1,"col-12","col-lg-6","fw-600","mb-3","mb-lg-0"],[1,"me-2","font-size-14"],["class","badge badge-pill bg-bronze",4,"ngIf"],[1,"col-12","col-lg-6","d-flex","justify-content-lg-end",3,"ngClass"],["type","button","tooltip","Dodaj",1,"btn","btn-sm","rounded","btn-dark","d-flex","align-items-center","justify-content-center","mb-2",3,"click"],["src","assets/icons/icon-user-plus.svg",1,"text-snow-white","me-2",3,"svgStyle"],[1,"row","fw-600","d-none","d-lg-flex","align-items-center","font-size-14","border-bottom"],[1,"col-1","py-2","px-3"],[1,"col-5","p-2","d-flex","flex-column"],[1,"col-4","p-2"],[1,"col-2","p-2"],["infiniteScroll","",1,"card-body","py-0","px-2","pb-mobile-menu","custom-scroll","border-0","msg_card_body","font-size-14",3,"scrolled","infiniteScrollDistance","infiniteScrollThrottle","scrollWindow"],[1,"bg-white","rounded-sm"],[4,"ngIf","ngIfElse"],["class","d-flex justify-content-center py-3",4,"ngIf"],[1,"btn","btn-sm","filter-absolute",3,"click"],[1,"me-1",3,"icon"],["type","button",1,"btn","btn-outline-dark","rounded-pill","py-1",3,"click"],[1,"badge","badge-pill","bg-bronze"],["class","row g-0 align-items-center link-grey-hover border-bottom py-2",4,"ngFor","ngForOf"],[1,"row","g-0","align-items-center","link-grey-hover","border-bottom","py-2"],[1,"col-4","d-lg-none","p-2","fw-600","d-flex","flex-column","px-3"],[1,"col-8","col-lg-1","p-2","d-flex","flex-column","px-3"],[1,"col-4","d-lg-none","p-2","fw-600","d-flex","flex-column"],[1,"col-8","col-lg-5","p-2","d-flex","flex-column"],[4,"ngIf"],[1,"col-4","d-lg-none","fw-600","p-2"],[1,"col-8","col-lg-4","p-2"],["class","mb-1",4,"ngIf"],["class","m-0",4,"ngIf"],[1,"col-8","col-lg-2","p-2","d-flex","align-items-center","justify-content-end"],[1,"btn","btn-link","btn-sm","me-2","text-healing-blue",3,"click"],["src","assets/icons/icon-e-document.svg",3,"svgStyle"],[1,"btn","btn-link","btn-sm","text-danger",3,"click"],["src","assets/icons/icon-trash.svg",3,"svgStyle"],[1,"mb-1"],[1,"me-2",3,"icon"],[1,"text-bronze","text-decoration-none",3,"href"],[1,"m-0"],[1,"d-flex","align-items-center","py-3"],["src","assets/icons/icon-info.svg",1,"d-inline-block","vertical-align-center","me-2",3,"svgStyle"],[1,"d-flex","justify-content-center","py-3"],["animation","spin","size","2x",3,"icon"],[1,"modal-header","d-flex","justify-content-between"],[1,"fw-600"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body","text-center"],[3,"newClientUser","new","userType","client"],["class","fw-600",4,"ngIf","ngIfElse"],[1,"fw-600","me-2"],[1,"alert","alert-warning"],[1,"modal-footer","d-flex","justify-content-between"],[1,"btn","btn-sm",3,"click"],[1,"btn","btn-sm","btn-danger",3,"click"],[1,"modal-header","d-flex","justify-content-between","align-items-center"],[1,"d-block","mb-2"],[3,"namespace","includePrivate","client","showNoDocuments","loadExisting","userUuid"]]},template:function(_,l){if(1&_){const N=e.RV6();e.j41(0,"div",26),e.DNE(1,Yn,2,1,"button",27),e.j41(2,"div",28)(3,"form",29),e.bIt("ngSubmit",function(){return e.eBV(N),e.Njj(l.searchPatients())}),e.j41(4,"div",30),e.nrm(5,"input",31),e.j41(6,"div",32)(7,"button",33)(8,"span",34),e.pXf(9,5),e.k0s(),e.nrm(10,"fa-icon",35),e.k0s(),e.DNE(11,Bn,4,1,"button",36),e.k0s()()(),e.j41(12,"div",37)(13,"div",38)(14,"span",39),e.pXf(15,6),e.k0s(),e.DNE(16,Vn,2,1,"span",40)(17,Kn,2,0,"span",40),e.k0s(),e.j41(18,"div",41)(19,"button",42),e.bIt("click",function(){return e.eBV(N),e.Njj(l.addClientPatientModal())}),e.nrm(20,"svg-icon",43),e.j41(21,"span"),e.pXf(22,7),e.k0s()()()(),e.j41(23,"div",44)(24,"div",45),e.EFF(25,"#"),e.k0s(),e.j41(26,"div",46)(27,"span"),e.pXf(28,8),e.k0s(),e.j41(29,"span"),e.pXf(30,9),e.k0s()(),e.j41(31,"div",47),e.pXf(32,10),e.k0s(),e.j41(33,"div",48),e.pXf(34,11),e.k0s()()(),e.j41(35,"div",49),e.bIt("scrolled",function(){return e.eBV(N),e.Njj(l.onScroll())}),e.j41(36,"div",50),e.DNE(37,m,2,1,"ng-container",51),e.k0s(),e.DNE(38,E,4,2,"ng-template",null,0,e.C5r)(40,L,2,1,"div",52),e.k0s()(),e.DNE(41,p,10,4,"ng-template",null,1,e.C5r)(43,be,23,3,"ng-template",null,2,e.C5r)(45,Ae,13,8,"ng-template",null,3,e.C5r)}if(2&_){const N=e.sdS(39);e.R7$(),e.Y8G("ngIf",l.isMobile),e.R7$(),e.Y8G("ngClass",e.eq3(15,Un,!l.showPatientFilter)),e.R7$(),e.Y8G("formGroup",l.searchForm),e.R7$(7),e.Y8G("icon",l.faSearch),e.R7$(),e.Y8G("ngIf",l.filterActive),e.R7$(5),e.Y8G("ngIf",(null==l.clientPatients?null:l.clientPatients.length)>0),e.R7$(),e.Y8G("ngIf",0===(null==l.clientPatients?null:l.clientPatients.length)),e.R7$(),e.Y8G("ngClass",e.eq3(17,Fn,null==l.client?null:l.client.users)),e.R7$(2),e.Y8G("svgStyle",e.lJ4(19,zn)),e.R7$(15),e.Y8G("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("scrollWindow",!1),e.R7$(2),e.Y8G("ngIf",(null==l.clientPatients?null:l.clientPatients.length)>0)("ngIfElse",N),e.R7$(3),e.Y8G("ngIf",l.loading.clientClients)}},dependencies:[n.YU,n.Sq,n.bT,ue.D,H.aY,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,K.dg,J.ZP,Le.i,me.S,oe.DM,Oe._,Re.o],encapsulation:2}),s})();var rn=C(38111);const tn=i=>({"mb-lg-0":i}),dn=()=>({config:"users",display:"users"}),on=(i,s)=>({active:i,"mh-70":s}),Cn=()=>({"height.px":25}),En=()=>({config:"users",display:"clients"}),_n=()=>({"height.px":25,"width.px":25}),fn=()=>({config:"users",display:"specialists"});function Tn(i,s){if(1&i&&(e.j41(0,"div",17)(1,"a",18),e.nrm(2,"svg-icon",19),e.j41(3,"span"),e.pXf(4,4),e.k0s()()()),2&i){const t=e.XpG();
1e.Y8G("ngClass",e.eq3(4,tn,t.displayTab)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,dn))("ngClass",e.l_i(7,on,"users"===t.displayTab,!t.displayTab)),e.R7$(),e.Y8G("svgStyle",e.lJ4(10,Cn))}}function gn(i,s){if(1&i&&(e.j41(0,"div",17)(1,"a",18),e.nrm(2,"svg-icon",20),e.j41(3,"span"),e.pXf(4,5),e.k0s()()()),2&i){const t=e.XpG();e.Y8G("ngClass",e.eq3(4,tn,t.displayTab)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,En))("ngClass",e.l_i(7,on,"clients"===t.displayTab,!t.displayTab)),e.R7$(),e.Y8G("svgStyle",e.lJ4(10,_n))}}function In(i,s){if(1&i&&(e.j41(0,"div",21)(1,"a",18),e.nrm(2,"svg-icon",22),e.j41(3,"span"),e.pXf(4,6),e.k0s()()()),2&i){const t=e.XpG();e.Y8G("ngClass",e.eq3(4,tn,t.displayTab)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,fn))("ngClass",e.l_i(7,on,"specialists"===t.displayTab,!t.displayTab)),e.R7$(),e.Y8G("svgStyle",e.lJ4(10,_n))}}function Nn(i,s){1&i&&(e.j41(0,"div",24),e.pXf(1,7),e.k0s())}function pn(i,s){1&i&&e.nrm(0,"app-client-admin-list",25),2&i&&e.Y8G("showClientDropdown",!1)}function un(i,s){if(1&i&&(e.qex(0),e.DNE(1,Nn,2,0,"div",23)(2,pn,1,1,"ng-template",null,0,e.C5r),e.bVm()),2&i){const t=e.sdS(3),_=e.XpG();e.R7$(),e.Y8G("ngIf",!_.hasAcl("users"))("ngIfElse",t)}}function mn(i,s){1&i&&(e.j41(0,"div",24),e.pXf(1,8),e.k0s())}function Sn(i,s){if(1&i&&e.nrm(0,"app-client-patient-list",26),2&i){const t=e.XpG(2);e.Y8G("hasAcl",t.hasAcl("clients"))("showClientDropdown",!1)}}function Ln(i,s){if(1&i&&(e.qex(0),e.DNE(1,mn,2,0,"div",23)(2,Sn,1,2,"ng-template",null,1,e.C5r),e.bVm()),2&i){const t=e.sdS(3),_=e.XpG();e.R7$(),e.Y8G("ngIf",!_.hasAcl("clients"))("ngIfElse",t)}}function Rn(i,s){1&i&&(e.j41(0,"div",24),e.pXf(1,9),e.k0s())}function bn(i,s){if(1&i&&e.nrm(0,"app-specialist-list",32),2&i){const t=e.XpG(3);e.Y8G("polyclinicId",null==t.client?null:t.client.polyclinicId)("getAdmin",!0)("hasMap",!1)("template","admin")("client",t.client)}}function Mn(i,s){if(1&i){const t=e.RV6();e.j41(0,"label",27)(1,"input",28),e.bIt("click",function(){e.eBV(t);const l=e.XpG(2);return e.Njj(l.togglePrivateDoctors())}),e.k0s(),e.j41(2,"span",29),e.pXf(3,10),e.k0s(),e.j41(4,"small",30),e.EFF(5,"Doktori \u0107e biti javno dostupni svim korisnicima BigDot-a. Ako \u017eelite da doktori budu dostupni samo za va\u0161e pacijente isklju\u010dite ovu opciju."),e.k0s()(),e.DNE(6,bn,1,5,"app-specialist-list",31)}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("checked",!(null!=t.client&&t.client.hasPrivateEmployees)),e.R7$(5),e.Y8G("ngIf",null==t.client?null:t.client.uuid)}}function Pn(i,s){if(1&i&&(e.qex(0),e.DNE(1,Rn,2,0,"div",23)(2,Mn,7,2,"ng-template",null,2,e.C5r),e.bVm()),2&i){const t=e.sdS(3),_=e.XpG();e.R7$(),e.Y8G("ngIf",!_.hasAcl("specialists"))("ngIfElse",t)}}let An=(()=>{var i;class s{constructor(_,l){this.route=_,this.auth=l,this.privateEmployees=new e.bkB,this.subscription=new W.yU,this.faUserMd=v.EeG,this.faHospitalUser=v.NYN,this.faUsers=v.gdJ,this.faUserShield=v.CN3,this.clientUserRoleNames=[],this.loading={users:!1}}ngOnInit(){!this.client||!this.currentUser||(this.clientUserRoleNames=this.auth.getClientBusinessRoleNames(this.client),this.subscription.add(this.route.queryParams.pipe((0,le.n)(_=>(0,Y.of)(_))).subscribe(_=>{this.displayTab=this.hasAcl(_.display)?_.display:null})))}hasAcl(_){return!!_&&this.auth.hasAcl(this.client,_)}togglePrivateDoctors(){this.client.hasPrivateEmployees=!this.client.hasPrivateEmployees,this.privateEmployees.emit(this.client.hasPrivateEmployees)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(x.nX),e.rXU(q.uR))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-users"]],inputs:{client:"client",currentUser:"currentUser",new:"new"},outputs:{privateEmployees:"privateEmployees"},decls:10,vars:7,consts:()=>{let t,_,l,N,u,h,j,O;return t="Administracija korisnika",_="Administratori",l="Pacijenti",N="Doktori",u="Nemate pristup ure\u0111ivanju korisnika",h="Nemate pristup ure\u0111ivanju pacijenata",j="Nemate pristup ure\u0111ivanju specijalista",O="Doktori javno dostupni",[["adminList",""],["patientList",""],["specialistList",""],t,_,l,N,u,h,j,O,[1,"fw-bold","my-3"],[1,"d-flex","flex-wrap","align-items-center","mb-3"],["class","mb-3 me-3",3,"ngClass",4,"ngIf"],["class","mb-3",3,"ngClass",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"mb-3","me-3",3,"ngClass"],["routerLink","./","type","button",1,"d-flex","align-items-center","font-size-18","justify-content-center","btn","btn-sm","bg-white","px-3",3,"queryParams","ngClass"],["src","assets/icons/icon-admin.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-hospital-user.svg",1,"me-2",3,"svgStyle"],[1,"mb-3",3,"ngClass"],["src","assets/icons/icon-doctors.svg",1,"me-2",3,"svgStyle"],["class","alert alert-info",4,"ngIf","ngIfElse"],[1,"alert","alert-info"],[3,"showClientDropdown"],[3,"hasAcl","showClientDropdown"],[1,"d-flex","align-items-center","fw-bold","mt-4","mb-3"],["type","checkbox",1,"apple-switch","me-2",3,"click","checked"],[1,"me-3"],[1,"font-size-12","d-block","form-text","text-muted"],[3,"polyclinicId","getAdmin","hasMap","template","client",4,"ngIf"],[3,"polyclinicId","getAdmin","hasMap","template","client"]]},template:function(_,l){1&_&&(e.j41(0,"h6",11),e.pXf(1,3),e.k0s(),e.j41(2,"div",12),e.DNE(3,Tn,5,11,"div",13)(4,gn,5,11,"div",13)(5,In,5,11,"div",14),e.k0s(),e.qex(6,15),e.DNE(7,un,4,2,"ng-container",16)(8,Ln,4,2,"ng-container",16)(9,Pn,4,2,"ng-container",16),e.bVm()),2&_&&(e.R7$(3),e.Y8G("ngIf",l.hasAcl("users")),e.R7$(),e.Y8G("ngIf",l.hasAcl("clients")&&(null==l.client?null:l.client.polyclinicId)),e.R7$(),e.Y8G("ngIf",l.hasAcl("specialists")&&(null==l.client?null:l.client.polyclinicId)),e.R7$(),e.Y8G("ngSwitch",l.displayTab),e.R7$(),e.Y8G("ngSwitchCase","users"),e.R7$(),e.Y8G("ngSwitchCase","clients"),e.R7$(),e.Y8G("ngSwitchCase","specialists"))},dependencies:[n.YU,n.bT,n.ux,n.e1,x.Wk,w.V,oe.DM,cn,rn.Y],encapsulation:2}),s})();var hn=C(75560),vn=C(13877);const Z=i=>({"is-invalid":i});function $n(i,s){if(1&i&&e.nrm(0,"fa-icon",124),2&i){const t=e.XpG(3);e.Y8G("icon",t.faEyeSlash)}}function On(i,s){if(1&i&&e.nrm(0,"fa-icon",125),2&i){const t=e.XpG(3);e.Y8G("icon",t.faEye)}}function Gn(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,31),e.k0s())}function Xn(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,32),e.k0s())}function jn(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Gn,2,0,"div",54)(2,Xn,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.f.certificatePassword.errors.required),e.R7$(),e.Y8G("ngIf",t.f.certificatePassword.errors.minlength)}}function Dn(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",118)(1,"div",69)(2,"label",119),e.pXf(3,30),e.k0s(),e.j41(4,"div",120),e.nrm(5,"input",121),e.j41(6,"div",106)(7,"div",107),e.bIt("click",function(){e.eBV(t);const l=e.XpG(2);return e.Njj(l.togglePass())}),e.DNE(8,$n,1,1,"fa-icon",122)(9,On,1,1,"fa-icon",123),e.k0s()(),e.DNE(10,jn,3,2,"div",67),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(5),e.Y8G("ngClass",e.eq3(5,Z,t.submitted&&t.f.certificatePassword.errors))("type",t.passShown?"text":"password"),e.R7$(3),e.Y8G("ngIf",!t.passShown),e.R7$(),e.Y8G("ngIf",t.passShown),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.certificatePassword.errors)}}function kn(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,33),e.k0s())}
1function P(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,kn,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.shopName.errors.required)}}function Yt(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,34),e.k0s())}function Bt(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Yt,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.active.errors.required)}}function Vt(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,35),e.k0s())}function Kt(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Vt,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.hasVat.errors.required)}}function qt(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,36),e.k0s())}function Jt(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,37),e.k0s())}function Wt(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,qt,2,0,"div",54)(2,Jt,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.companyName.errors.required),e.R7$(),e.Y8G("ngIf",t.f.companyName.errors.minlength||t.f.companyName.errors.maxlength)}}function Ht(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,38),e.k0s())}function Zt(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,39),e.k0s())}
1function Qt(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Ht,2,0,"div",54)(2,Zt,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.pin.errors.required),e.R7$(),e.Y8G("ngIf",t.f.pin.errors.minlength||t.f.pin.errors.maxlength)}}function ei(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,40),e.k0s())}function ni(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,ei,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.posTag.errors.required)}}function ti(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,41),e.k0s())}function ii(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,42),e.k0s())}function oi(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,ti,2,0,"div",54)(2,ii,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.pinSeller.errors.required),e.R7$(),e.Y8G("ngIf",t.f.pinSeller.errors.minlength||t.f.pinSeller.errors.maxlength)}}function _i(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,43),e.k0s())}function li(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,_i,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.seller.errors.required)}}function si(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,44),e.k0s())}function ai(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,si,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.settlement.errors.required)}}function ci(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,45),e.k0s())}function ri(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,ci,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.street.errors.required)}}function di(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,46),e.k0s())}function Ci(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,di,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.houseNb.errors.required)}}function Ei(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,47),e.k0s())}function fi(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Ei,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.city.errors.required)}}function Ti(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,48),e.k0s())}function gi(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,49),e.k0s())}function Ii(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,Ti,2,0,"div",54)(2,gi,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.zip.errors.required),e.R7$(),e.Y8G("ngIf",t.f.zip.errors.numeric)}}function Ni(i,s){if(1&i&&e.nrm(0,"fa-icon",127),2&i){const t=e.XpG(2);e.Y8G("icon",t.faEyeSlash)}}function pi(i,s){if(1&i&&e.nrm(0,"fa-icon",128),2&i){const t=e.XpG(2);e.Y8G("icon",t.faEye)}}function ui(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,50),e.k0s())}function mi(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,51),e.k0s())}function Si(i,s){if(1&i&&(e.j41(0,"div",126),e.DNE(1,ui,2,0,"div",54)(2,mi,2,0,"div",54),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.kpdCode.errors.required),e.R7$(),e.Y8G("ngIf",t.f.kpdCode.errors.pattern)}}function Li(i,s){1&i&&(e.j41(0,"button",131),e.pXf(1,52),e.k0s())}function Ri(i,s){if(1&i&&e.nrm(0,"fa-icon",132),2&i){const t=e.XpG(3);e.Y8G("icon",t.faSpinner)}}function bi(i,s){if(1&i&&(e.qex(0),e.nrm(1,"hr"),e.DNE(2,Li,2,0,"button",129)(3,Ri,1,1,"fa-icon",130),e.bVm()),2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",!t.loading.save),e.R7$(),e.Y8G("ngIf",t.loading.save)}}function Mi(i,s){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"form",55),e.bIt("ngSubmit",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onSubmit())}),e.j41(2,"div",56)(3,"div",57),e.pXf(4,1),e.k0s(),e.j41(5,"div",58)(6,"app-documents",59),e.bIt("documentDeleted",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.certificateDeleted())}),e.k0s(),e.DNE(7,Dn,11,7,"div",60),e.k0s()(),e.j41(8,"div",61)(9,"div",62)(10,"div",63)(11,"label",64),e.pXf(12,2),e.k0s(),e.j41(13,"div",65),e.nrm(14,"input",66),e.DNE(15,P,2,1,"div",67),e.k0s()()(),e.j41(16,"div",68)(17,"div",69)(18,"label",70),e.pXf(19,3),e.k0s(),e.j41(20,"div",71)(21,"label",72),e.nrm(22,"input",73),e.k0s(),e.DNE(23,Bt,2,1,"div",67),e.k0s()(),e.j41(24,"div",69)(25,"label",74),e.pXf(26,4),e.k0s(),e.j41(27,"div",71)(28,"label",72),e.nrm(29,"input",75),e.k0s(),e.DNE(30,Kt,2,1,"div",67),e.k0s()(),e.j41(31,"div",69)(32,"label",76),e.pXf(33,5),e.k0s(),e.j41(34,"div",71),e.nrm(35,"input",77),e.DNE(36,Wt,3,2,"div",67),e.k0s()(),e.j41(37,"div",69)(38,"label",78),e.pXf(39,6),e.k0s(),e.j41(40,"div",71),e.nrm(41,"input",79),e.DNE(42,Qt,3,2,"div",67),e.k0s()(),e.j41(43,"div",69)(44,"label",80),e.pXf(45,7),e.k0s(),e.j41(46,"div",71),e.nrm(47,"input",81),e.DNE(48,ni,2,1,"div",67),e.k0s()(),e.j41(49,"div",69)(50,"label",82),e.pXf(51,8),e.k0s(),e.j41(52,"div",71),e.nrm(53,"input",83),e.DNE(
154,oi,3,2,"div",67),e.k0s()(),e.j41(55,"div",69)(56,"label",84),e.pXf(57,9),e.k0s(),e.j41(58,"div",71),e.nrm(59,"input",85),e.DNE(60,li,2,1,"div",67),e.k0s()(),e.j41(61,"div",69)(62,"label",86),e.pXf(63,10),e.k0s(),e.j41(64,"div",71),e.nrm(65,"input",87),e.DNE(66,ai,2,1,"div",67),e.k0s()(),e.j41(67,"div",69)(68,"label",88),e.pXf(69,11),e.k0s(),e.j41(70,"div",71),e.nrm(71,"input",89),e.DNE(72,ri,2,1,"div",67),e.k0s()(),e.j41(73,"div",69)(74,"label",90),e.pXf(75,12),e.k0s(),e.j41(76,"div",71),e.nrm(77,"input",91),e.DNE(78,Ci,2,1,"div",67),e.k0s()(),e.j41(79,"div",69)(80,"label",92),e.pXf(81,13),e.k0s(),e.j41(82,"div",71),e.nrm(83,"input",93),e.DNE(84,fi,2,1,"div",67),e.k0s()(),e.j41(85,"div",69)(86,"label",94),e.pXf(87,14),e.k0s(),e.j41(88,"div",71),e.nrm(89,"input",95),e.DNE(90,Ii,3,2,"div",67),e.k0s()()()(),e.j41(91,"div",96)(92,"div",57),e.pXf(93,15),e.k0s(),e.j41(94,"div",68)(95,"div",69)(96,"label",97),e.pXf(97,16),e.k0s(),e.j41(98,"div",71)(99,"label",72),e.nrm(100,"input",98),e.k0s(),e.j41(101,"small",99),e.pXf(102,17),e.k0s()()(),e.j41(103,"div",69)(104,"label",100),e.pXf(105,18),e.k0s(),e.j41(106,"div",71)(107,"select",101)(108,"option",102),e.pXf(109,19),e.k0s()(),e.j41(110,"small",99),e.pXf(111,20),e.k0s()()(),e.j41(112,"div",69)(113,"label",103),e.pXf(114,21),e.k0s(),e.j41(115,"div",71)(116,"div",104),e.nrm(117,"input",105),e.j41(118,"div",106)(119,"div",107),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.toggleApiKey())}),e.DNE(120,Ni,1,1,"fa-icon",108)(121,pi,1,1,"fa-icon",109),e.k0s()()(),e.j41(122,"small",99),e.pXf(123,22),e.k0s()()(),e.j41(124,"div",69)(125,"label",110),e.pXf(126,23),e.k0s(),e.j41(127,"div",71),e.nrm(128,"input",111),e.k0s()(),e.j41(129,"div",69)(130,"label",112),e.pXf(131,24),e.k0s(),e.j41(132,"div",71),e.nrm(133,"input",113),e.j41(134,"small",99),e.pXf(135,25),e.k0s()()(),e.j41(136,"div",69)(137,"label",114),e.pXf(138,26),e.k0s(),e.j41(139,"div",71),e.nrm(140,"textarea",115),e.j41(141,"small",99),e.pXf(142,27),e.k0s()()(),e.j41(143,"div",69)(144,"label",116),e.pXf(145,28),e.k0s(),e.j41(146,"div",71),e.nrm(147,"input",117),e.j41(148,"small",99),e.pXf(149,29),e.k0s(),e.DNE(150,Si,3,2,"div",67),e.k0s()()()(),e.DNE(151,bi,4,2,"ng-container",54),e.k0s(),e.bVm()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("formGroup",t.clientFiscalForm),e.R7$(5),e.Y8G("isPublic",!1)("namespace",t.certificateNamespace)("client",t.client)("parentForm",t.clientFiscalForm)("userType","client")("userUuid",null==t.client?null:t.client.uuid)("enableDownload",!1)("includePrivate",!0)("queueLimit",1),e.R7$(),e.Y8G("ngIf",!(null!=t.fiscalConfig&&t.fiscalConfig.certificatePasswordValid)),e.R7$(7),e.Y8G("ngClass",e.eq3(43,Z,t.submitted&&t.f.shopName.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.shopName.errors),e.R7$(7),e.Y8G("ngClass",e.eq3(45,Z,t.submitted&&t.f.active.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.active.errors),e.R7$(6),e.Y8G("ngClass",e.eq3(47,Z,t.submitted&&t.f.hasVat.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.hasVat.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(49,Z,t.submitted&&t.f.companyName.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.companyName.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(51,Z,t.submitted&&t.f.pin.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.pin.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(53,Z,t.submitted&&t.f.posTag.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.posTag.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(55,Z,t.submitted&&t.f.pinSeller.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.pinSeller.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(57,Z,t.submitted&&t.f.seller.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.seller.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(59,Z,t.submitted&&t.f.settlement.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.settlement.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(61,Z,t.submitted&&t.f.street.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.street.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(63,Z,t.submitted&&t.f.houseNb.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.houseNb.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(65,Z,t.submitted&&t.f.city.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.city.errors),e.R7$(5),e.Y8G("ngClass",e.eq3(67,Z,t.submitted&&t.f.zip.errors)),e.R7$(),e.Y8G("ngIf",t.submitted&&t.f.zip.errors),e.R7$(27),e.Y8G("type",t.apiKeyShown?"text":"password"),e.R7$(3),e.Y8G("ngIf",!t.apiKeyShown),e.R7$(),e.Y8G("ngIf",t.apiKeyShown),e.R7$(26),e.Y8G("ngClass",e.eq3(69,Z,t.submitted&&t.f.kpdCode.errors)),e.R7$(3),e.Y8G("ngIf",t.submitted&&t.f.kpdCode.errors),e.R7$(),e.Y8G("ngIf",t.clientFiscalForm.dirty&&t.clientFiscalForm.touched)}}let Pi=(()=>{var i;class s{constructor(_,l,N,u){this.auth=_,this.formBuilder=l,this.alert=N,this.adminS=u,this.subscription=new W.yU,this.faSpinner=v.z1G,this.faEye=v.pS3,this.faEyeSlash=v.k6j,this.certificateNamespace="fiscal",this.submitted=!1,this.loading={config:!1,save:!1},this.passShown=!1,this.apiKeyShown=!1,this.setFiscalForm()}ngOnInit(){this.currentUser&&(this.clientFiscalForm.patchValue({clientUuid:this.client.uuid}),this.getFiscalConfig())}getFiscalConfig(){this.loading.config=!0,this.subscription.add(this.adminS.getFiscalConfig(this.client).subscribe(_=>{this.loading.config=!1,_&&(this.fiscalConfig=_,this.patchFiscalForm())}))}certificateDeleted(){this.fiscalConfig.certificateFileId=null,this.fiscalConfig.active=!1}setFiscalForm(){this.clientFiscalForm=this.formBuilder.group({active:!1,certificateFileUuid:[null,d.k0.required],certificatePassword:[null,[d.k0.required,d.k0.minLength(5)]],city:[null,d.k0.required],clientUuid:[null,d.k0.required],companyName:[null,[d.k0.required,d.k0.minLength(2),d.k0.maxLength(255)]],houseNb:[null,d.k0.required],posTag:[null,d.k0.required],seller:[null,d.k0.required],settlement:[null,d.k0.required],shopName:[null,d.k0.required],street:[null,d.k0.required],pin:[null,[d.k0.required,d.k0.minLength(11),d.k0.maxLength(11)]],pinSeller:[null,[d.k0.required,d.k0.minLength(11),d.k0.maxLength(11)]],zip:[null,[d.k0.required,vn.kl.numbericValidator]],hasVat:[null],fisc2Enabled:[!1],fisc2Provider:["zlatni-eracun"],fisc2ApiKey:[null],fisc2ApiUrl:[null],fisc2ErpIdentifier:["LittleDot-API"],fisc2TaxExemptionReason:[null],kpdCode:["62.20.20",[d.k0.required,d.k0.pattern(/^\d{2}\.\d{2}\.\d{2}$/)]]})}patchFiscalForm(){this.clientFiscalForm.patchValue({active:this.fiscalConfig.active,city:this.fiscalConfig.city,companyName:this.fiscalConfig.companyName,houseNb:this.fiscalConfig.houseNb,posTag:this.fiscalConfig.posTag,seller:this.fiscalConfig.seller,settlement:this.fiscalConfig.settlement,shopName:this.fiscalConfig.shopName,street:this.fiscalConfig.street,pin:this.fiscalConfig.pin,pinSeller:this.fiscalConfig.pinSeller,zip:this.fiscalConfig.zip,hasVat:this.fiscalConfig.hasVat,fisc2Enabled:this.fiscalConfig.fisc2Enabled,fisc2Provider:this.fiscalConfig.fisc2Provider||"zlatni-eracun",fisc2ApiKey:this.fiscalConfig.fisc2ApiKey,fisc2ApiUrl:this.fiscalConfig.fisc2ApiUrl,fisc2ErpIdentifier:this.fiscalConfig.fisc2ErpIdentifier||"LittleDot-API",fisc2TaxExemptionReason:this.fiscalConfig.fisc2TaxExemptionReason,kpdCode:this.fiscalConfig.kpdCode||"62.20.20"}
1),this.fiscalConfig.certificatePasswordValid&&(this.clientFiscalForm.get("certificatePassword").clearValidators(),this.clientFiscalForm.get("certificatePassword").updateValueAndValidity())}hasAcl(_){return this.auth.hasAcl(this.client,_)}get f(){return this.clientFiscalForm.controls}togglePass(){this.passShown=!this.passShown}toggleApiKey(){this.apiKeyShown=!this.apiKeyShown}onSubmit(){this.submitted=!0,!this.clientFiscalForm.invalid&&(this.loading.save=!0,this.subscription.add(this.adminS.updateFiscalConfig(this.client,this.clientFiscalForm.value).subscribe(_=>{this.loading.save=!1,_&&_ instanceof hn.g&&this.alert.success("Promjene uspje\u0161no spremljene")})))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(q.uR),e.rXU(d.ok),e.rXU(q.uE),e.rXU(se.Y))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-fiscal"]],inputs:{client:"client",currentUser:"currentUser"},decls:3,vars:1,consts:()=>{let t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we,y,sn,U,ct,rt,dt,Ct,Et,ft,Tt,gt,It,Nt,pt,ut,it,ot,mt,St,Lt,Rt,bt,Mt,Pt,At,ht,vt,$t,Ot,Gt,Xt,jt,Dt,kt,yt,xt,Ut,Ft,zt,wt;return t="Postavke fiskalizacije",_="x-api-key",l="Vidi klju\u010D",N="Sakrij klju\u010D",u="https://api.zlatni-eracun.hr/api/v1",h="LittleDot-API",j="Opcionalno - npr. Oslobo\u0111eno sukladno \u010Dl. 40. ZPDV-a",O="62.20.20",X="Certifikat",D="Ime prodajnog mjesta",Ie="Prodajno mjesto aktivno",Ne="U sustavu PDV-a",pe="Ime tvrtke",V="OIB prodajnog mjesta",De="Oznaka prodajnog mjesta",ke="OIB prodavatelja",ye="Prodavatelj",xe="Grad prodaje",Ue="Ulica",Fe="Ku\u0107ni broj",ze="Grad",we="Po\u0161tanski broj",y="Fiskalizacija 2.0 (B2B eRa\u010Duni)",sn="Omogu\u0107i Fiskalizaciju 2.0",U="Automatska fiskalizacija B2B ra\u010Duna (tvrtka-tvrtka) prema novom sustavu eRa\u010Duna",ct="Pru\u017Eatelj usluge",rt="Zlatni eRa\u010Dun",dt="Posredni\u010Dki servis za slanje eRa\u010Duna Poreznoj upravi",Ct="API Klju\u010D",Et="API klju\u010D dobiven od pru\u017Eatelja usluge",ft="API URL",Tt="ERP Identifikator",gt="Identifikator va\u0161eg sustava (default: LittleDot-API)",It="Razlog oslobo\u0111enja od PDV-a",Nt="Razlog oslobo\u0111enja PDV-a ako nije u sustavu PDV-a (opcionalno)",pt="KPD kod",ut="Klasifikacija proizvoda/usluga prema KPD (format: XX.XX.XX). Mora odgovarati NKD registraciji tvrtke.",it="Vidi lozinku",ot="Sakrij lozinku",mt="Zaporka certifikata",St="Zaporka certifikata obavezno polje",Lt="Zaporka certifikata minimalno 5 znaka du\u017Eine",Rt="Ime prodajnog mjesta obavezno polje",bt="Obavezno polje",Mt="Obavezno polje",Pt="Ime tvrtke obavezno polje",At="Ime tvrtke izme\u0111u 2 i 255 znakova",ht="OIB obavezno polje",vt="OIB mora sadr\u017Eavati 11 znamenaka",$t="Oznaka prodajnog mjesta obavezno polje",Ot="OIB obavezno polje",Gt="OIB mora sadr\u017Eavati 11 znamenaka",Xt="Prodavatelj obavezno polje",jt="Grad obavezno polje",Dt="Ulica obavezno polje",kt="Ku\u0107ni broj obavezno polje",yt="Grad obavezno polje",xt="Po\u0161tanski broj obavezno polje",Ut="Po\u0161tanski broj mo\u017Ee sadr\u017Eavati samo brojeve",Ft="KPD kod je obavezno polje",zt="KPD kod mora biti u formatu XX.XX.XX (npr. 62.20.20)",wt="Spremi",[t,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we,y,sn,U,ct,rt,dt,Ct,Et,ft,Tt,gt,It,Nt,pt,ut,mt,St,Lt,Rt,bt,Mt,Pt,At,ht,vt,$t,Ot,Gt,Xt,jt,Dt,kt,yt,xt,Ut,Ft,zt,wt,[1,"fw-bold","mb-3"],[4,"ngIf"],[1,"text-start","mb-5",3,"ngSubmit","formGroup"],[1,"card","mb-3"],[1,"card-header","fw-bold"],[1,"card-body","p-1"],[3,"documentDeleted","isPublic","namespace","client","parentForm","userType","userUuid","enableDownload","includePrivate","queueLimit"],["class","container-fluid",4,"ngIf"],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between","fw-bold"],[1,"mb-3","row","align-items-center","m-0"],["for","shopName",1,"fw-bold","mb-3","mb-lg-0","me-2"],[1,""],["type","text","formControlName","shopName","id","shopName",1,"form-control","fw-bold",3,"ngClass"],["class","invalid-feedback w-100",4,"ngIf"],[1,"card-body"],[1,"mb-3","row","align-items-center"],["for","active",1,"col-12","col-lg-3","fw-bold"],[1,"col-12","col-lg-5"],[1,"m-0","d-flex"],["type","checkbox","formControlName","active","name","active","id","active",1,"apple-switch",3,"ngClass"],["for","hasVat",1,"col-12","col-lg-3","fw-bold"],["type","checkbox","formControlName","hasVat","name","hasVat","id","hasVat",1,"apple-switch",3,"ngClass"],["for","companyName",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","companyName","id","companyName",1,"form-control","fw-bold",3,"ngClass"],["for","pin",1,"col-12","col-lg-3","fw-bold"],["type","number","formControlName","pin","id","pin",1,"form-control","fw-bold",3,"ngClass"],["for","posTag",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","posTag","id","posTag",1,"form-control","fw-bold",3,"ngClass"],["for","pinSeller",1,"col-12","col-lg-3","fw-bold"],["type","number","formControlName","pinSeller","id","pinSeller",1,"form-control","fw-bold",3,"ngClass"],["for","seller",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","seller","id","seller",1,"form-control","fw-bold",3,"ngClass"],["for","settlement",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","settlement","id","settlement",1,"form-control","fw-bold",3,"ngClass"],["for","street",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","street","id","street",1,"form-control","fw-bold",3,"ngClass"],["for","houseNb",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","houseNb","id","houseNb",1,"form-control","fw-bold",3,"ngClass"],["for","city",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","city","id","city",1,"form-control","fw-bold",3,"ngClass"],["for","zip",1,"col-12","col-lg-3","fw-bold"],["type","number","formControlName","zip","id","zip",1,"form-control","fw-bold",3,"ngClass"],[1,"card","mt-3"],["for","fisc2Enabled",1,"col-12","col-lg-3","fw-bold"],["type","checkbox","formControlName","fisc2Enabled","name","fisc2Enabled","id","fisc2Enabled",1,"apple-switch"],[1,"form-text","text-muted"],["for","fisc2Provider",1,"col-12","col-lg-3","fw-bold"],["formControlName","fisc2Provider","id","fisc2Provider",1,"form-control","fw-bold"],["value","zlatni-eracun"],["for","fisc2ApiKey",1,"col-12","col-lg-3","fw-bold"],[1,"input-group"],["formControlName","fisc2ApiKey","id","fisc2ApiKey","placeholder",_,1,"form-control","fw-bold",3,"type"],[1,"input-group-append","toggable"],[1,"input-group-text",3,"click"],["tooltip",l,3,"icon",4,"ngIf"],["tooltip",N,3,"icon",4,"ngIf"],["for","fisc2ApiUrl",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","fisc2ApiUrl","id","fisc2ApiUrl","placeholder",u,1,"form-control","fw-bold"],["for","fisc2ErpIdentifier",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","fisc2ErpIdentifier","id","fisc2ErpIdentifier","placeholder",h,1,"form-control","fw-bold"],["for","fisc2TaxExemptionReason",1,"col-12","col-lg-3","fw-bold"],["formControlName","fisc2TaxExemptionReason","id","fisc2TaxExemptionReason","rows","3","placeholder",j,1,"form-control","fw-bold"],["for","kpdCode",1,"col-12","col-lg-3","fw-bold"],["type","text","formControlName","kpdCode","id","kpdCode","placeholder",O,1,"form-control","fw-bold",3,"ngClass"],[1,"container-fluid"],["for","certificatePassword",1,"col-12","col-lg-3","fw-bold"],[1,"input-group","col-12","col-lg-5"],["type","password","formControlName","certificatePassword","id","certificatePassword",1,"form-control","fw-bold",3,"ngClass","type"],["tooltip",it,3,"icon",4,"ngIf"],["tooltip",ot,3,"icon",4,"ngIf"],["tooltip",it,3,"icon"],["tooltip",ot,3,"icon"],[1,"invalid-feedback","w-100"],["tooltip",l,3,"icon"],["tooltip",N,3,"icon"],["type","submit","class","btn btn-success float-end rounded text-pearl-white",4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["type","submit",1,"btn","btn-success","float-end","rounded","text-pearl-white"],["animation","spin","size","2x",3,"icon"]]},template:function(_,l){1&_&&(e.j41(0,"h6",53),e.pXf(1,0),e.k0s(),e.DNE(2,Mi,152,71,"ng-container",54)),2&_&&(e.R7$(2),e.Y8G("ngIf",l.client&&l.hasAcl("fiscal")))},dependencies:[n.YU,n.bT,H.aY,d.qT,d.xH,d.y7,d.me,d.Q0,d.Zm,d.wz,d.BC,d.cb,d.j4,d.JD,K.dg,J.ZP,Le.i],encapsulation:2}),s})();const Ai=["newClientUserModal"],hi=["mainTabs"],vi=i=>({"mt-3":i}),Qe=i=>({"mb-lg-1":i}),$i=()=>({config:"users"}),ln=(i,s,t)=>({active:i,"font-size-16":s,"mh-70":t}),en=i=>({"height.px":i}),Oi=()=>({config:"prices"}),Gi=()=>({config:"integrations"}),_t=(i,s,t,_)=>({active:i,"font-size-16":s,"mh-70":t,"h-100":_}),Xi=()=>({config:"billing"}),ji=()=>({config:"reports"}),Di=()=>({config:"fiscal"}),ki=()=>({config:"roles"}),yi=(i,s)=>({"col-lg-9":i,"col-lg-12":s}),nt=i=>({"is-invalid":i});function xi(i,s){1&i&&(e.j41(0,"h6",30),e.pXf(1,0),e.k0s())}function Ui(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",36),e.j41(3,"span"),e.pXf(4,1),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,$i))("ngClass",e.sMw(7,ln,"users"===t.config,t.config,!t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(11,en,t.config?20:30))}}function Fi(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",37),e.j41(3,"span"),e.pXf(4,2),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,Oi))("ngClass",e.sMw(7,ln,"prices"===t.config,t.config,!t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(11,en,t.config?20:40))}}function zi(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",38),e.j41(3,"span"),e.pXf(4,3),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,Gi))("ngClass",e.ziG(7,_t,"integrations"===t.config,t.config,!t.config,t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(12,en,t.config?20:40))}}function wi(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",39),e.j41(3,"span"),e.pXf(4,4),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,Xi))("ngClass",e.sMw(7,ln,"billing"===t.config,t.config,!t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(11,en,t.config?20:40))}}function Yi(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",40),e.j41(3,"span"),e.pXf(4,5),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,ji))("ngClass",e.sMw(7,ln,"reports"===t.config,t.config,!t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(11,en,t.config?20:40))}}function Bi(i,s){if(1&i&&(e.j41(0,"div",34)(1,"a",35),e.nrm(2,"svg-icon",41),e.j41(3,"span"),e.pXf(4,6),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,Di))("ngClass",e.sMw(7,ln,"fiscal"===t.config,t.config,!t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(11,en,t.config?20:40))}}function Vi(i,s){if(1&i&&(e.j41(0,"div",42)(1,"a",35),e.nrm(2,"svg-icon",38),e.j41(3,"span"),e.pXf(4,7),e.k0s()()()),2&i){const t=e.XpG(3);e.Y8G("ngClass",e.eq3(4,Qe,t.config)),e.R7$(),e.Y8G("queryParams",e.lJ4(6,ki))("ngClass",e.ziG(7,_t,"roles"===t.config,t.config,!t.config,t.config)),e.R7$(),e.Y8G("svgStyle",e.eq3(12,en,t.config?20:40))}}function Ki(i,s){if(1&i&&(e.j41(0,"div",31),e.DNE(1,Ui,5,13,"div",32)(2,Fi,5,13,"div",32)(3,zi,5,14,"div",32)(4,wi,5,13,"div",32)(5,Yi,5,13,"div",32)(6,Bi,5,13,"div",32)(7,Vi,5,14,"div",33),e.k0s()),2&i){const t=e.XpG(2);e.Y8G("ngClass",e.eq3(8,vi,!t.config)),e.R7$(),e.Y8G("ngIf",t.hasAcl("users")),e.R7$(),e.Y8G("ngIf",t.hasAcl("prices")),e.R7$(),e.Y8G("ngIf",null==t.currentUser?null:t.currentUser.isAdmin),e.R7$(),e.Y8G("ngIf",t.hasAcl("billing")),e.R7$(),e.Y8G("ngIf",t.hasAcl("reports")),e.R7$(),e.Y8G("ngIf",t.hasAcl("fiscal")),e.R7$(),e.Y8G("ngIf",null==t.currentUser?null:t.currentUser.isAdmin)}}function qi(i,s){if(1&i){const t=e.RV6();e.j41(0,"app-client-users",48),e.bIt("privateEmployees",function(l){e.eBV(t);const N=e.XpG(4);return e.Njj(N.togglePrivateDoctors(l))}),e.k0s()}if(2&i){const t=e.XpG(4);e.Y8G("client",t.client)("new",t.new)("currentUser",t.currentUser)}}function Ji(i,s){if(1&i&&(e.qex(0),e.DNE(1,qi,1,3,"app-client-users",47),e.bVm()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.currentUser)}}function Wi(i,s){if(1&i&&e.nrm(0,"app-client-prices",49),2&i){const t=e.XpG(3);e.Y8G("client",t.client)("currentUser",t.currentUser)}}function Hi(i,s){if(1&i&&e.nrm(0,"app-payment-list",50),2&i){const t=e.XpG(3);e.Y8G("getAdmin",!0)("showClientDropdown",!1)("currentUser",t.currentUser)}}function Zi(i,s){1&i&&e.nrm(0,"app-reports")}function Qi(i,s){if(1&i&&(e.qex(0),e.nrm(1,"app-client-fiscal",49),e.bVm()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("client",t.client)("currentUser",t.currentUser)}}function eo(i,s){if(1&i&&e.nrm(0,"app-client-roles",52),2&i){const t=e.XpG(4);e.Y8G("client",t.client)}}function no(i,s){if(1&i&&(e.qex(0),e.DNE(1,eo,1,1,"app-client-roles",51),e.bVm()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",null==t.client?null:t.client.uuid)}}function to(i,s){if(1&i&&e.nrm(0,"app-client-integrations",52),2&i){const t=e.XpG(4);e.Y8G("client",t.client)}}function io(i,s){if(1&i&&(e.qex(0),e.DNE(1,to,1,1,"app-client-integrations",51),e.bVm()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",null==t.client?null:t.client.uuid)}}function oo(i,s){if(1&i&&(e.qex(0)(1,43),e.DNE(2,Ji,2,1,"ng-container",44)(3,Wi,1,2,"app-client-prices",45)(4,Hi,1,3,"app-payment-list",46)(5,Zi,1,0,"app-reports",44)(6,Qi,2,2,"ng-container",44)(7,no,2,1,"ng-container",44)(8,io,2,1,"ng-container",44),e.bVm()()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngSwitch",t.config),e.R7$(),e.Y8G("ngSwitchCase","users"),e.R7$(),e.Y8G("ngSwitchCase","prices"),e.R7$(),e.Y8G("ngSwitchCase","billing"),e.R7$(),e.Y8G("ngSwitchCase","reports"),e.R7$(),e.Y8G("ngSwitchCase","fiscal"),e.R7$(),e.Y8G("ngSwitchCase","roles"),e.R7$(),e.Y8G("ngSwitchCase","integrations")}}function _o(i,s){if(1&i&&(e.qex(0),e.DNE(1,xi,2,0,"h6",28)(2,Ki,8,10,"div",29)(3,oo,9,8,"ng-container",25),e.bVm()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",t.config),e.R7$(),e.Y8G("ngIf","reports"!==t.config),e.R7$(),e.Y8G("ngIf",t.client)}}function lo(i,s){1&i&&(e.qex(0),e.j41(1,"div",68)(2,"h5",69),e.pXf(3,9),e.k0s()(),e.bVm())}function so(i,s){if(1&i&&e.nrm(0,"app-profile-picture",73),2&i){const t=e.XpG(3);e.Y8G("user",t.client)("client",t.client)("allowGallery",!0)("galleryLimit",null==t.client?null:t.client.galleryLimit)("enableEdit",!0)}}function ao(i,s){if(1&i&&(e.j41(0,"div",70)(1,"div",71),e.DNE(2,so,1,5,"app-profile-picture",72),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.client)}}function co(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",74)(1,"ng-select",75),e.bIt("close",function(){e.eBV(t);const l=e.XpG(2);return e.Njj(l.hideKeyboard())}),e.k0s(),e.j41(2,"label",76),e.pXf(3,10),e.k0s()()}if(2&i){const t=e.XpG(2);e.R7$(),e.Y8G("items",t.clientType)}}function ro(i,s){1&i&&(e.j41(0,"div",77),e.nrm(1,"input",78),e.j41(2,"label",79),e.pXf(3,11),e.k0s()())}function Co(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,12),e.k0s())}function Eo(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,13),e.k0s())}function fo(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,14),e.k0s())}function To(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,15),e.k0s())}function go(i,s){if(1&i&&(e.j41(0,"div",80),e.DNE(1,Co,2,0,"div",25)(2,Eo,2,0,"div",25)(3,fo,2,0,"div",25)(4,To,2,0,"div",25),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",t.f.name.errors.required),e.R7$(),e.Y8G("ngIf",t.f.name.errors.minlength),e.R7$(),e.Y8G("ngIf",t.f.name.errors.maxlength),e.R7$(),e.Y8G("ngIf",t.f.name.errors.pattern)}}function Io(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,17),e.k0s())}function No(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,18),e.k0s())}function po(i,s){if(1&i&&(e.j41(0,"div",80),e.DNE(1,Io,2,0,"div",25)(2,No,2,0,"div",25),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.f.domain.errors.required),e.R7$(),e.Y8G("ngIf",t.f.domain.errors.pattern)}}function uo(i,s){if(1&i&&(e.j41(0,"div",60)(1,"div",61),e.nrm(2,"input",81),e.j41(3,"label",82),e.pXf(4,16),e.k0s()(),e.DNE(5,po,3,2,"div",64),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngClass",e.eq3(3,nt,t.submitted&&t.f.domain.errors)),e.R7$(),e.Y8G("readOnly",!t.new),e.R7$(3),e.Y8G("ngIf",t.submitted&&t.f.domain.errors)}}function mo(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,20),e.k0s())}function So(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,21),e.k0s())}function Lo(i,s){if(1&i&&(e.j41(0,"div",80),e.DNE
1(1,mo,2,0,"div",25)(2,So,2,0,"div",25),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Y8G("ngIf",t.f.email.errors.required),e.R7$(),e.Y8G("ngIf",t.f.email.errors.email)}}function Ro(i,s){if(1&i&&(e.j41(0,"div",60)(1,"div",61),e.nrm(2,"input",83),e.j41(3,"label",84),e.pXf(4,19),e.k0s()(),e.DNE(5,Lo,3,2,"div",64),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngClass",e.eq3(3,nt,t.submitted&&t.f.email.errors)),e.R7$(),e.Y8G("readOnly",!t.new),e.R7$(3),e.Y8G("ngIf",t.submitted&&t.f.email.errors)}}function bo(i,s){1&i&&(e.j41(0,"span"),e.pXf(1,22),e.k0s())}function Mo(i,s){1&i&&(e.j41(0,"span"),e.pXf(1,23),e.k0s())}function Po(i,s){if(1&i&&(e.j41(0,"button",85),e.DNE(1,bo,2,0,"span",25)(2,Mo,2,0,"span",25),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngIf",!t.new),e.R7$(),e.Y8G("ngIf",t.new)}}function Ao(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",53),e.DNE(1,lo,4,0,"ng-container",25),e.j41(2,"form",54),e.bIt("ngSubmit",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onSubmit())}),e.j41(3,"div",55),e.DNE(4,ao,3,1,"div",56),e.j41(5,"div",57),e.DNE(6,co,4,1,"div",58)(7,ro,4,0,"div",59),e.j41(8,"div",60)(9,"div",61),e.nrm(10,"input",62),e.j41(11,"label",63),e.pXf(12,8),e.k0s()(),e.DNE(13,go,5,4,"div",64),e.k0s(),e.DNE(14,uo,6,5,"div",65)(15,Ro,6,5,"div",65),e.k0s()(),e.j41(16,"div",66),e.DNE(17,Po,3,2,"button",67),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",!t.new),e.R7$(),e.Y8G("formGroup",t.clientForm),e.R7$(2),e.Y8G("ngIf",!t.new),e.R7$(),e.Y8G("ngClass",e.l_i(12,yi,!t.new,t.new)),e.R7$(),e.Y8G("ngIf",t.new&&(null==t.currentUser?null:t.currentUser.isAdmin)),e.R7$(),e.Y8G("ngIf",!t.new),e.R7$(2),e.Y8G("ngClass",e.eq3(15,nt,t.submitted&&t.f.name.errors)),e.R7$(),e.Y8G("readOnly",!t.new),e.R7$(3),e.Y8G("ngIf",t.submitted&&t.f.name.errors),e.R7$(),e.Y8G("ngIf",!t.new&&1!==(null==t.client?null:t.client.id)),e.R7$(),e.Y8G("ngIf",1!==(null==t.client?null:t.client.id)&&t.hasAcl("admin")),e.R7$(2),e.Y8G("ngIf",t.clientForm.dirty&&t.clientForm.touched)}}function ho(i,s){if(1&i&&e.nrm(0,"fa-icon",86),2&i){const t=e.XpG();e.Y8G("icon",t.faSpinner)}}let lt=(()=>{var i;class s{constructor(_,l,N,u,h,j,O,X){this.localeId=_,this.localeService=l,this.adminS=N,this.route=u,this.router=h,this.auth=j,this.alert=O,this.formBuilder=X,this.newClient=new e.bkB,this.subscription=new W.yU,this.faSpinner=v.z1G,this.faUsers=v.gdJ,this.faUserMd=v.EeG,this.faStamp=v.Hcm,this.faUserShield=v.CN3,this.faHospitalUser=v.NYN,this.faDollarSign=v.Vpi,this.faChartPie=v.W1p,this.faFileInvoiceDollar=v.DO5,this.clientType=["policlinic"],this.submitted=!1,this.nameRegex="^[A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u0219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+(?: [A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u
10219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+)*$",this.domainRegex="^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\\.[a-zA-Z]{2,})+$",this.loading={client:!1,roles:!1},this.subscription.add(this.auth.currentUser.subscribe(D=>{D&&(this.currentUser=D)})),this.localeService.use(this.localeId)}ngOnInit(){const l=this.new?[d.k0.required]:[];this.clientForm=this.formBuilder.group({uuid:[null,this.new?[]:[d.k0.required]],email:[null,this.new?[d.k0.required,d.k0.email]:[d.k0.email]],hasPrivateEmployees:!1,name:[null,[d.k0.required,d.k0.minLength(3),d.k0.maxLength(100),d.k0.pattern(this.nameRegex)]],domain:[null,[d.k0.pattern(this.domainRegex)]],type:["polyclinic",l]}),this.subscription.add(this.auth.displayClientSubscription.subscribe(u=>{this.client=u,this.adminS.getClientByUuid(this.client.uuid),this.new||this.updateFormValues()})),this.subscription.add(this.route.params.pipe((0,le.n)(u=>{this.loading.client=!0;const h=u.clientUuid?u.clientUuid:null;return h?this.adminS.getClientByUuid(h):this.router.navigate(["/clients"])})).subscribe(u=>{if(this.loading.client=!1,!u)return this.alert.error("Klijent nije prona\u0111en"),this.router.navigate(["/clients"]);this.client=u,this.auth.setDisplayClient(u),u&&(this.new||this.updateFormValues())})),this.subscription.add(this.route.queryParams.pipe((0,le.n)(u=>(0,Y.of)(u))).subscribe(u=>{this.config=void 0!==u.config?u.config:null,this.queryParams=u}))}hasAcl(_){return this.auth.hasAcl(this.client,_)}get f(){return this.clientForm.controls}hideKeyboard(){Ee.Ii.isNativePlatform()&&R.s3.hide()}updateFormValues(_=!0){_&&this.clientForm.reset(),this.clientForm.patchValue({uuid:this.client.uuid,name:this.client.name,email:null!==this.client.email?this.client.email:this.client.adminEmail,domain:this.client.domain,hasPrivateEmployees:this.client.hasPrivateEmployees})}togglePrivateDoctors(_){this.client.hasPrivateEmployees=_,this.updateFormValues(),this.updateExistingClient(!0)}onSubmit(){this.submitted=!0,!this.clientForm.invalid&&(this.new?this.createNewClient():this.updateExistingClient())}createNewClient(){this.loading.client=!0,this.subscription.add(this.adminS.createClient(this.clientForm.value).subscribe(_=>{this.loading.client=!1,_&&(this.client=_,this.newClient.emit(_),this.updateFormValues())}))}updateExistingClient(_=!1){this.loading.client=!0,this.subscription.add(this.adminS.updateClient(this.clientForm.value,_).subscribe(l=>{this.loading.client=!1,l&&(this.client=l,this.updateFormValues(!1),this.alert.success("A\u017Eurirano"))}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(e.xe9),e.rXU(M.ZJ),e.rXU(se.Y),e.rXU(x.nX),e.rXU(x.Ix),e.rXU(q.uR),e.rXU(q.uE),e.rXU(d.ok))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-edit"]],viewQuery:function(_,l){if(1&_&&(e.GBs(Ai,5),e.GBs(hi,5)),2&_){let N;e.mGM(N=e.lsd())&&(l.newClientUserModal=N.first),e.mGM(N=e.lsd())&&(l.mainTabs=N.first)}},inputs:{new:"new"},outputs:{newClient:"newClient"},decls:4,vars:4,consts:()=>{let t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we,y,sn;return t="Usluge",_="Administracija",l="Konfiguracija cijena",N="Integracije",u="Ra\u010Duni",h="Izvje\u0161taji",j="Fiskalizacija",O="Role",X="Ime",D="Ure\u0111ivanje poliklinike:",Ie="Tip korisnika",Ne="ID",pe="Ime obavezno polje",V="Minimalno 5 znakova",De="Maksimalno 100 znakova",ke="Dozvoljena samo slova",ye="Domena",xe="Domena obavezno polje",Ue="Upi\u0161ite pravilan format domene",Fe="E-mail",ze="E-mail obavezno polje",we="Neispravan format e-mail adrese",y="Spremi",sn="Kreiraj",[t,_,l,N,u,h,j,O,X,D,Ie,Ne,pe,V,De,ke,ye,xe,Ue,Fe,ze,we,y,sn,[3,"ngClass"],[4,"ngIf"],["class","rounded-sm bg-white p-2",4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],["class","fw-600 mt-3 mb-2",4,"ngIf"],["class","d-flex flex-wrap align-items-stretch mb-4",3,"ngClass",4,"ngIf"],[1,"fw-600","mt-3","mb-2"],[1,"d-flex","flex-wrap","align-items-stretch","mb-4",3,"ngClass"],["class","mb-3 me-3",3,"ngClass",4,"ngIf"],["class","mb-3",3,"ngClass",4,"ngIf"],[1,"mb-3","me-3",3,"ngClass"],["routerLink","./","type","button",1,"d-flex","align-items-center","justify-content-center","btn","btn-sm","bg-white","rounded-sm","h-100","font-size-18","px-3",3,"queryParams","ngClass"],["src","assets/icons/icon-administration.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-price-configuration.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-role.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-admin-bills.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-reports.svg",1,"me-2",3,"svgStyle"],["src","assets/icons/icon-fiscalization.svg",1,"me-2",3,"svgStyle"],[1,"mb-3",3,"ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],[3,"client","currentUser",4,"ngSwitchCase"],[3,"getAdmin","
1showClientDropdown","currentUser",4,"ngSwitchCase"],[3,"client","new","currentUser","privateEmployees",4,"ngIf"],[3,"privateEmployees","client","new","currentUser"],[3,"client","currentUser"],[3,"getAdmin","showClientDropdown","currentUser"],[3,"client",4,"ngIf"],[3,"client"],[1,"rounded-sm","bg-white","p-2"],[1,"text-start",3,"ngSubmit","formGroup"],[1,"row","g-0","mb-3","px-2"],["class","col-12 col-lg-3 d-flex align-items-end justify-content-center mb-3 mb-lg-0",4,"ngIf"],[1,"col-12","pt-2",3,"ngClass"],["class","mb-3 form-floating custom-select",4,"ngIf"],["class","form-floating mb-3",4,"ngIf"],[1,"input-group","has-validation","mb-3"],[1,"form-floating",3,"ngClass"],["type","text","formControlName","name","id","name",1,"form-control","fw-600",3,"readOnly"],["for","name",1,"fw-600"],["class","invalid-feedback w-100",4,"ngIf"],["class","input-group has-validation mb-3",4,"ngIf"],[1,"d-block","text-end"],["type","submit","class","col-3 btn btn-success",4,"ngIf"],[1,"row","g-0","p-2","pt-lg-3"],[1,"col-12","col-lg-3","mb-3","mb-lg-0","d-inline-block","fw-600"],[1,"col-12","col-lg-3","d-flex","align-items-end","justify-content-center","mb-3","mb-lg-0"],[1,"d-flex","flex-column","align-items-center"],[3,"user","client","allowGallery","galleryLimit","enableEdit",4,"ngIf"],[3,"user","client","allowGallery","galleryLimit","enableEdit"],[1,"mb-3","form-floating","custom-select"],["appNgSelectCloseButton","","formControlName","type","id","client_type",1,"w-100","h56",3,"close","items"],["for","client_type",1,"fw-600"],[1,"form-floating","mb-3"],["type","text","formControlName","uuid","id","uuid","readonly","",1,"form-control","fw-600"],["for","uuid",1,"fw-600"],[1,"invalid-feedback","w-100"],["type","text","formControlName","domain","id","domain",1,"form-control","fw-600",3,"readOnly"],["for","domain",1,"col-12","col-lg-2","fw-600"],["type","text","formControlName","email","id","email",1,"form-control","fw-600",3,"readOnly"],["for","email",1,"col-12","col-lg-2","fw-600"],["type","submit",1,"col-3","btn","btn-success"],["animation","spin","size","2x",3,"icon"]]},template:function(_,l){1&_&&(e.j41(0,"div",24),e.DNE(1,_o,4,3,"ng-container",25)(2,Ao,18,17,"div",26),e.k0s(),e.DNE(3,ho,1,1,"fa-icon",27)),2&_&&(e.Y8G("ngClass","reports"!==l.config?"container-fluid":""),e.R7$(),e.Y8G("ngIf",!l.new),e.R7$(),e.Y8G("ngIf",!l.config),e.R7$(),e.Y8G("ngIf",l.loading.client))},dependencies:[n.YU,n.bT,n.ux,n.e1,x.Wk,H.aY,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,b.r,o.vr,J.ZP,$.s,F.l,ae.v,oe.DM,Se.d,I,A.w,An,Pi],encapsulation:2}),s})();const vo=["newClientModal"],$o=()=>({"height.px":20}),st=i=>({"m-0":i});function Oo(i,s){1&i&&e.nrm(0,"div",24)}function Go(i,s){if(1&i){const t=e.RV6();e.j41(0,"button",25),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.addClientModal())}),e.nrm(1,"svg-icon",26),e.j41(2,"span",27),e.pXf(3,7),e.k0s()()}2&i&&(e.R7$(),e.Y8G("svgStyle",e.lJ4(1,$o)))}function Xo(i,s){if(1&i&&(e.j41(0,"div",40),e.nrm(1,"fa-icon",41),e.j41(2,"a",42),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit,_=e.XpG(2);e.Y8G("ngClass",e.eq3(5,st,!t.mob)),e.R7$(),e.Y8G("icon",_.faAt),e.R7$(),e.Mz_("href","mailto:",t.email,"",e.B4B),e.R7$(),e.JRh(t.email)}}function jo(i,s){if(1&i&&(e.j41(0,"div",43),e.nrm(1,"fa-icon",41),e.j41(2,"a",42),e.EFF(3),e.k0s()()),2&i){const t=e.XpG().$implicit,_=e.XpG(2);e.Y8G("ngClass",e.eq3(5,st,!t.email)),e.R7$(),e.Y8G("icon",_.faMobileAlt),e.R7$(),e.Mz_("href","tel:",t.mob,"",e.B4B),e.R7$(),e.JRh(t.mob)}}function Do(i,s){1&i&&(e.j41(0,"span"),e.EFF(1,"Poliklinika"),e.k0s())}function ko(i,s){if(1&i&&(e.j41(0,"div",30)(1,"div",31),e.EFF(2,"#"),e.k0s(),e.j41(3,"div",32),e.EFF(4),e.k0s(),e.j41(5,"div",33),e.EFF(6,"Naziv centra / poliklinike"),e.k0s(),e.j41(7,"div",34)(8,"a",35),e.EFF(9),e.k0s()(),e.j41(10,"div",33),e.EFF(11,"Vlasnik"),e.k0s(),e.j41(12,"div",34),e.EFF(13),e.k0s(),e.j41(14,"div",33),e.EFF(15,"Kontakt"),e.k0s(),e.j41(16,"div",34),e.DNE(17,Xo,4,7,"div",36)(18,jo,4,7,"div",37),e.k0s(),e.j41(19,"div",33),e.EFF(20,"Tip"),e.k0s(),e.j41(21,"div",38),e.DNE(22,Do,2,0,"span",39),e.k0s()()),2&i){const t=s.$implicit,_=s.index;e.R7$(4),e.JRh(_+1),e.R7$(4),e.Mz_("routerLink","/clients/edit/",t.uuid,""),e.R7$(),e.JRh(t.name),e.R7$(4),e.JRh(t.adminName),e.R7$(4),e.Y8G("ngIf",t.email),e.R7$(),e.Y8G("ngIf",t.mob),e.R7$(4),e.Y8G("ngIf",t.polyclinicId)}}function yo(i,s){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"div",28),e.bIt("scrolled",function(){e.eBV(t);const l=e.XpG();return e.Njj(l.onScroll())}),e.DNE(2,ko,23,8,"div",29),e.k0s(),e.bVm()}if(2&i){const t=e.XpG();e.R7$(),e.Y8G("infiniteScrollDistance",1)("infiniteScrollThrottle",300)("scrollWindow",!1),e.R7$(),e.Y8G("ngForOf",t.clients)}}function xo(i,s){if(1&i&&(e.j41(0,"div",44),e.nrm(1,"fa-icon",45),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function Uo(i,s){1&i&&(e.j41(0,"p"),e.pXf(1,8),e.k0s())}function Fo(i,s){if(1&i){const t=e.RV6();e.j41(0,"div",46)(1,"h5",14),e.pXf(2,9),e.k0s(),e.j41(3,"button",47),e.bIt("click",function(){e.eBV(t);const l=e.XpG();return l.modalRef.hide(),e.Njj(l.modalRef=void 0)}),e.k0s()(),e.j41(4,"div",48)(5,"app-client-edit",49),e.bIt("newClient",function(l){e.eBV(t);const N=e.XpG();return e.Njj(N.addClient(l))}),e.k0s()()}2&i&&(e.R7$(5),e.Y8G("new",!0))}let zo=(()=>{var i;class s{constructor(_,l,N){this.adminS=_,this.auth=l,this.modalService=N,this.subscription=new W.yU,this.faSpinner=v.z1G,this.faAt=v.Hzw,this.faChevronLeft=v.Wzs,this.faMobileAlt=v.XRN,this.clients=[],this.loading={clients:!1},this.subscription.add(this.auth.currentUser.subscribe(u=>{u&&(this.currentUser=u)})),this.resetFilter(),this.getClientList()}getClientList(){this.subscription.add(this.adminS.getClients(this.filterData).subscribe(_=>{this.loading.clients=!1,_&&(this.clients=[...this.clients,..._.data],this.pager=void 0!==_.pager?_.pager:null)}))}onScroll(){this.pager.totalPages>1&&this.pager.totalPages>this.filterData.page&&(this.filterData.page+=1,this.getClientList())}addClientModal(){this.modalRef=this.modalService.show(this.newClientModal,{animated:!0,class:"modal-lg"})}addClient(_){this.modalRef.hide(),this.modalRef=void 0,this.clients=[...this.clients,_]}resetFilter(){this.filterData=new ve.k,this.filterData.page=1,this.filterData.pageSize=20}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(se.Y),e.rXU(q.uR),e.rXU(Ce.I8))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-list"]],viewQuery:function(_,l){if(1&_&&e.GBs(vo,5),2&_){let N;e.mGM(N=e.lsd())&&(l.newClientModal=N.first)}},decls:26,vars:6,consts:()=>{let t,_,l,N,u,h,j,O;return t="Lista centara / poliklinika",_="Naziv centra / poliklinike",l="Vlasnik",N="Kontakt",u="Tip",h="Novi korisnik",j="Ne postoje korisnici",O="Novi LittleDot poslovni korisnik",[["noClients",""],["newClientModal",""],t,_,l,N,u,h,j,O,[1,"container-fluid","card","bg-grey-light3","ms-0","border-0","px-0","g-0","vh100-header","custom-scroll"],[1,"w-100","d-flex","justify-content-between","align-items-center","col-12","col-lg-6","mb-2","mb-lg-3","mb-lg-0","mt-lg-3"],["type","button","appHiddenDesktop","","appGoBack","",1,"btn","btn-link"],[3,"icon"],[1,"fw-600","m-0"],["class","menu-ce
1nter-fix",4,"ngIf"],["class","btn btn-sm btn-dark rounded d-flex align-items-center justify-content-center d-flex","type","button","tooltip","Dodaj",3,"click",4,"ngIf"],[1,"card-header","fixed-sm-top","sticky-top","sticky-top-header","mb-3","p-0","bg-transparent","border-bottom"],[1,"row","g-0","fw-600","d-none","d-lg-flex","pb-2","font-size-14"],[1,"col-1","px-3"],[1,"col-3","px-2"],[1,"col-2","px-2"],[4,"ngIf","ngIfElse"],["class","p-2",4,"ngIf"],[1,"menu-center-fix"],["type","button","tooltip","Dodaj",1,"btn","btn-sm","btn-dark","rounded","d-flex","align-items-center","justify-content-center","d-flex",3,"click"],["src","assets/icons/icon-user-plus.svg",1,"text-snow-white","me-2",3,"svgStyle"],[1,"d-none","d-lg-inline"],["infiniteScroll","",1,"card-body","bg-white","custom-scroll","custom-scroll-white","border-0","bg-grey-light3","msg_card_body","rounded-xs","p-0","meeting-list",3,"scrolled","infiniteScrollDistance","infiniteScrollThrottle","scrollWindow"],["class","row g-0 align-items-center border-bottom link-grey-hover py-2 font-size-14",4,"ngFor","ngForOf"],[1,"row","g-0","align-items-center","border-bottom","link-grey-hover","py-2","font-size-14"],[1,"col-4","d-lg-none","py-2","px-3","fw-600"],[1,"col-8","col-lg-1","fw-600","py-2","px-3"],[1,"col-4","d-lg-none","p-2","fw-600"],[1,"col-8","col-lg-3","p-2"],[1,"text-bronze","text-decoration-none",3,"routerLink"],["class","mb-2",3,"ngClass",4,"ngIf"],[3,"ngClass",4,"ngIf"],[1,"col-8","col-lg-2","p-2"],[4,"ngIf"],[1,"mb-2",3,"ngClass"],[1,"me-2",3,"icon"],[1,"text-bronze","text-decoration-none",3,"href"],[3,"ngClass"],[1,"p-2"],["animation","spin","size","2x",3,"icon"],[1,"modal-header","d-flex","justify-content-between"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body","text-center"],[3,"newClient","new"]]},template:function(_,l){if(1&_&&(e.j41(0,"div",10)(1,"div",11)(2,"button",12),e.nrm(3,"fa-icon",13),e.k0s(),e.j41(4,"h5",14),e.pXf(5,2),e.k0s(),e.DNE(6,Oo,1,0,"div",15)(7,Go,4,2,"button",16),e.k0s(),e.j41(8,"div",17)(9,"div",18)(10,"div",19),e.EFF(11,"#"),e.k0s(),e.j41(12,"div",20),e.pXf(13,3),e.k0s(),e.j41(14,"div",20),e.pXf(15,4),e.k0s(),e.j41(16,"div",20),e.pXf(17,5),e.k0s(),e.j41(18,"div",21),e.pXf(19,6),e.k0s()()(),e.DNE(20,yo,3,4,"ng-container",22)(21,xo,2,1,"div",23)(22,Uo,2,0,"ng-template",null,0,e.C5r),e.k0s(),e.DNE(24,Fo,6,1,"ng-template",null,1,e.C5r)),2&_){const N=e.sdS(23);e.R7$(3),e.Y8G("icon",l.faChevronLeft),e.R7$(3),e.Y8G("ngIf",!(null!=l.currentUser&&l.currentUser.isAdmin)),e.R7$(),e.Y8G("ngIf",null==l.currentUser?null:l.currentUser.isAdmin),e.R7$(13),e.Y8G("ngIf",(null==l.clients?null:l.clients.length)>0)("ngIfElse",N),e.R7$(),e.Y8G("ngIf",l.loading.clients)}},dependencies:[n.YU,n.Sq,n.bT,x.Wk,ue.D,H.aY,K.dg,$e.d,me.S,oe.DM,lt],encapsulation:2}),s})();var te=C(82143),wo=C(98269),Yo=C(3366),je=C(73016),Bo=C(84572),at=C(48796),Vo=C(97933),Ko=C(55956);function qo(i,s){if(1&i&&(e.j41(0,"div",12),e.nrm(1,"fa-icon",13),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function Jo(i,s){if(1&i&&(e.j41(0,"span",19),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.prefixTitle)}}function Wo(i,s){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(),e.JRh(t.sufixTitle)}}function Ho(i,s){if(1&i&&(e.j41(0,"div",16)(1,"div",6),e.EFF(2),e.k0s(),e.j41(3,"div",7)(4,"a",17),e.DNE(5,Jo,2,1,"span",18),e.EFF(6,"l "),e.j41(7,"span",19),e.EFF(8),e.k0s(),e.DNE(9,Wo,2,1,"span",11),e.k0s()(),e.j41(10,"div",8),e.EFF(11),e.nI1(12,"number"),e.k0s(),e.j41(13,"div",9),e.EFF(14),e.nI1(15,"number"),e.k0s()()),2&i){const t=s.$implicit,_=s.index;e.R7$(2),e.SpI("",_+1,"."),e.R7$(2),e.Mz_("href","mailto:",t.email,"",e.B4B),e.R7$(),e.Y8G("ngIf",t.prefixTitle),e.R7$(3),e.JRh(t.name),e.R7$(),e.Y8G("ngIf",t.sufixTitle),e.R7$(2),e.JRh(e.i5U(12,8,t.totalincome,"1.2-2")),e.R7$(3),e.JRh(e.i5U(15,11,t.totalIncomeShare,"1.2-2"))}}function Zo(i,s){if(1&i&&(e.qex(0),e.DNE(1,Ho,16,14,"div",15),e.bVm()),2&i){const t=e.XpG(2);e.R7$(),e.Y8G("ngForOf",t.specialistsEarnings.data)}}function Qo(i,s){1&i&&(e.j41(0,"div"),e.pXf(1,4),e.k0s())}
1function e_(i,s){if(1&i&&(e.qex(0),e.DNE(1,Zo,2,1,"ng-container",14)(2,Qo,2,0,"ng-template",null,0,e.C5r),e.bVm()),2&i){const t=e.sdS(3),_=e.XpG();e.R7$(),e.Y8G("ngIf",null==_.specialistsEarnings?null:_.specialistsEarnings.data.length)("ngIfElse",t)}}let n_=(()=>{var i;class s{constructor(){this.faSpinner=v.z1G}}return(i=s).\u0275fac=function(_){return new(_||i)},i.\u0275cmp=e.VBU({type:i,selectors:[["app-specialist-earnings"]],inputs:{loading:"loading",specialistsEarnings:"specialistsEarnings"},decls:11,vars:2,consts:()=>{let t,_,l,N;return t="Stru\u010Dnjak",_="Prihod",l="%",N="Ne postoji stru\u010Dnjak",[["noSpecialists",""],t,_,l,N,[1,"row","border-bottom","fw-600","d-none","d-lg-flex","align-items-center","mb-1","font-size-14"],[1,"col-1","p-2"],[1,"col-6","p-2"],[1,"col-3","p-2","text-end"],[1,"col-2","p-2","text-end"],["class","d-flex align-items-center justify-content-center py-3",4,"ngIf"],[4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","py-3"],["animation","spin","size","2x",3,"icon"],[4,"ngIf","ngIfElse"],["class","row align-items-center mb-1 font-size-14 fw-500",4,"ngFor","ngForOf"],[1,"row","align-items-center","mb-1","font-size-14","fw-500"],[1,"text-decoration-none","text-healing-blue",3,"href"],["class","me-1",4,"ngIf"],[1,"me-1"]]},template:function(_,l){1&_&&(e.j41(0,"div",5)(1,"div",6),e.EFF(2,"#"),e.k0s(),e.j41(3,"div",7),e.pXf(4,1),e.k0s(),e.j41(5,"div",8),e.pXf(6,2),e.k0s(),e.j41(7,"div",9),e.pXf(8,3),e.k0s()(),e.DNE(9,qo,2,1,"div",10)(10,e_,4,2,"ng-container",11)),2&_&&(e.R7$(9),e.Y8G("ngIf",l.loading),e.R7$(),e.Y8G("ngIf",!l.loading))},dependencies:[n.Sq,n.bT,H.aY,n.QX],encapsulation:2}),s})();const tt=()=>({"height.px":40});function t_(i,s){if(1&i&&e.nrm(0,"canvas",30),2&i){const t=e.XpG(2);e.Y8G("type","line")("data",null==t.chartData?null:t.chartData.appointments)("options",t.lineChartOptions)}}function i_(i,s){if(1&i&&(e.j41(0,"div",28),e.DNE(1,t_,1,3,"canvas",29),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.chartData.appointments?null:t.chartData.appointments.labels.length)>0)}}function o_(i,s){if(1&i&&(e.j41(0,"div",31),e.nrm(1,"fa-icon",32),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function __(i,s){if(1&i&&e.nrm(0,"canvas",30),2&i){const t=e.XpG(2);e.Y8G("type","line")("data",null==t.chartData?null:t.chartData.newPatients)("options",t.lineChartOptions)}}function l_(i,s){if(1&i&&(e.j41(0,"div",28),e.DNE(1,__,1,3,"canvas",29),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.chartData.newPatients?null:t.chartData.newPatients.labels.length)>0)}}function s_(i,s){if(1&i&&(e.j41(0,"div",31),e.nrm(1,"fa-icon",32),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function a_(i,s){if(1&i&&e.nrm(0,"canvas",30),2&i){const t=e.XpG(2);e.Y8G("type","line")("data",null==t.chartData?null:t.chartData.earnings)("options",t.lineChartOptions)}}function c_(i,s){if(1&i&&(e.j41(0,"div",28),e.DNE(1,a_,1,3,"canvas",29),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.chartData.earnings?null:t.chartData.earnings.labels.length)>0)}}function r_(i,s){if(1&i&&(e.j41(0,"div",31),e.nrm(1,"fa-icon",32),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function d_(i,s){if(1&i&&e.nrm(0,"canvas",34),2&i){const t=e.XpG(2);e.Y8G("type","line")("data",null==t.chartData?null:t.chartData.soldServicesCount)("options",t.lineChartOptions2)}}function C_(i,s){if(1&i&&(e.j41(0,"div"),e.DNE(1,d_,1,3,"canvas",33),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.chartData.soldServicesCount?null:t.chartData.soldServicesCount.labels.length)>0)}}function E_(i,s){if(1&i&&(e.j41(0,"div",31),e.nrm(1,"fa-icon",32),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function f_(i,s){if(1&i&&e.nrm(0,"canvas",34),2&i){const t=e.XpG(2);e.Y8G("type","bar")("data",null==t.chartData?null:t.chartData.commonDiseasesReport)("options",t.barChartOptions)}}function T_(i,s){if(1&i&&(e.j41(0,"div"),e.DNE(1,f_,1,3,"canvas",33),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("ngIf",(null==t.chartData.commonDiseasesReport?null:t.chartData.commonDiseasesReport.labels.length)>0)}}
1function g_(i,s){if(1&i&&(e.j41(0,"div",31),e.nrm(1,"fa-icon",32),e.k0s()),2&i){const t=e.XpG();e.R7$(),e.Y8G("icon",t.faSpinner)}}function I_(i,s){if(1&i&&(e.j41(0,"div",35)(1,"div",21)(2,"h5",25),e.pXf(3,6),e.k0s(),e.nrm(4,"app-specialist-earnings",36),e.k0s()()),2&i){const t=e.XpG();e.R7$(4),e.Y8G("loading",t.loading.charts)("specialistsEarnings",t.specialistsEarnings)}}const p_=[{path:"",component:Ge,data:{name:"clients"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T],children:[{path:"list",component:zo,data:{name:"viewClientList"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:"edit/:clientUuid",component:lt,data:{name:"editClient"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:"edit/:clientUuid/user/:clientUserUuid",component:Re.o,data:{name:"editClientUser"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:":clientUuid",component:he,data:{name:"viewClient"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:":clientUuid/roles",component:wo.w,data:{name:"viewRoleList"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:":clientUuid/dashboard",component:(()=>{var i;class s{constructor(_,l,N,u,h){this.locale=_,this.route=l,this.reportS=N,this.auth=u,this.router=h,this.subscription=new W.yU,this.lineChartData={labels:[],datasets:[{data:[],fill:!0,cubicInterpolationMode:"monotone",tension:.4,label:"Series A",borderWidth:4,pointStyle:"circle",pointRadius:4,borderColor:"rgba(103,119,239,.7)",pointBackgroun
1dColor:"rgba(103,119,239,.2)",backgroundColor:"rgba(103,119,239,.2)",pointBorderColor:"transparent"}]},this.barChartData={labels:[],datasets:[{data:[],label:"Series A",borderWidth:4,pointStyle:"circle",borderColor:"rgba(103,119,239,.7)",hoverBorderColor:"rgba(103,119,239,.7)",backgroundColor:"rgba(103,119,239,.2)",hoverBackgroundColor:"rgba(103,119,239,.7)"}]},this.lineChartOptions={responsive:!1,scales:{y:{beginAtZero:!0,grid:{display:!1},ticks:{display:!1}},x:{beginAtZero:!0,grid:{display:!1},ticks:{display:!1}}},plugins:{tooltip:{enabled:!1},legend:{display:!1},title:{display:!1}}},this.lineChartOptions2={responsive:!0,scales:{y:{beginAtZero:!0,grid:{display:!0},ticks:{display:!0}},x:{beginAtZero:!0,grid:{display:!1},ticks:{display:!0}}},plugins:{tooltip:{enabled:!0,mode:"index",intersect:!1,titleFont:{size:12,family:"campton"},cornerRadius:3},legend:{display:!0},title:{display:!0}}},this.barChartOptions={responsive:!0,scales:{y:{beginAtZero:!0},x:{beginAtZero:!0,grid:{display:!1}}},plugins:{tooltip:{enabled:!0,mode:"index",intersect:!1,titleFont:{size:12,family:"campton"},cornerRadius:3},legend:{display:!1},title:{display:!1}}},this.chartData={appointments:z.cloneDeep(this.lineChartData),earnings:z.cloneDeep(this.lineChartData),newPatients:z.cloneDeep(this.lineChartData),soldServicesCount:z.cloneDeep(this.lineChartData),commonDiseasesReport:z.cloneDeep(this.barChartData)},this.chartDataTotal={appointments:0,earnings:0,newPatients:0},this.symptomColors=[{border:"rgb(0,123,255)",point:"rgb(0,123,255)",bg:"rgb(0,123,255)"},{border:"rgb(40,167,69)",point:"rgb(40,167,69)",bg:"rgb(40,167,69)"},{border:"rgb(253,126,20)",point:"rgb(253,126,20)",bg:"rgb(253,126,20)"},{border:"rgb(103,119,239)",point:"rgb(103,119,239)",bg:"rgb(103,119,239)"},{border:"rgb(247,167,123)",point:"rgb(247,167,123)",bg:"rgb(247,167,123)"},{border:"rgb(243,127,139)",point:"rgb(243,127,139)",bg:"rgb(243,127,139)"},{border:"rgb(59,54,39)",point:"rgb(59,54,39)",bg:"rgb(59,54,39)"},{border:"rgb(145,134,97)",point:"rgb(145,134,97)",bg:"rgb(145,134,97)"}],this.firstChartLoad=!1,this.loading={meeting:!1,charts:!1},this.meetings=[],this.faSpinner=v.z1G,this.chartData.newPatients.datasets[0].borderColor="rgba(40,167,69,.7)",this.chartData.newPatients.datasets[0].pointBackgroun
1dColor="rgba(40,167,69,.2)",this.chartData.newPatients.datasets[0].backgroundColor="rgba(40,167,69,.2)",this.chartData.earnings.datasets[0].borderColor="rgba(0,123,255,.7)",this.chartData.earnings.datasets[0].pointBackgroundColor="rgba(0,123,255,.2)",this.chartData.earnings.datasets[0].backgroundColor="rgba(0,123,255,.2)"}ngOnInit(){if(!this.auth.currentUserValue.isAdmin&&!this.auth.hasBusinessRoles())return void this.router.navigate(["/dashboard"]);const N=(0,Bo.z)([this.auth.displayClientSubscription,this.reportS.dateRange]);this.subscription.add(N.subscribe(u=>{this.client=u[0],this.dateRanges=u[1],this.client&&this.dateRanges.forEach(h=>{this.getCharts(h)})}))}getCharts(_){this.loading.charts=!0,this.subscription.add(this.reportS.getReportList("appointments,earnings,newPatients,soldServicesCount,commonDiseasesReport,specialistsEarnings",_,this.client.uuid,null,!1,"dashboard").subscribe(l=>{if(this.loading.charts=!1,l){if(l.appointments&&void 0!==l.appointments&&(this.chartData.appointments.datasets[0].data=l.appointments.data,this.chartData.appointments.labels=l.appointments.labels,this.chartDataTotal.appointments=l.appointments.total),l.earnings&&void 0!==l.earnings&&(this.chartData.earnings.datasets[0].data=l.earnings.data,this.chartData.earnings.labels=l.earnings.labels,this.chartDataTotal.earnings=l.earnings.total),l.specialistsEarnings&&void 0!==l.specialistsEarnings&&(this.specialistsEarnings=l.specialistsEarnings),l.newPatients&&void 0!==l.newPatients&&(this.chartData.newPatients.datasets[0].data=l.newPatients.data,this.chartData.newPatients.labels=l.newPatients.labels,this.chartDataTotal.newPatients=l.newPatients.total),l.soldServicesCount&&void 0!==l.soldServicesCount&&void 0!==l.soldServicesCount.series){const N=[],u=l.soldServicesCount.categories.length,h=u>7?z.drop(l.soldServicesCount.categories,u-6):l.soldServicesCount.categories;for(const O of h)N.push((0,n.Yq)(O,"d MMM",this.locale));this.chartData.soldServicesCount.labels=[...N];const j=z.cloneDeep(this.chartData.soldServicesCount.datasets[0]);this.chartData.soldServicesCount.datasets=[],l.soldServicesCount.series.forEach((O,X)=>{const D=z.cloneDeep(j);D.data=u>6?z.drop(O.data,u-6):O.data,D.label=O.name,D.borderColor=0===X?"rgba(0,123,255,.7)":"rgba(40,167,69,.7)",D.pointBackgroun
1dColor=0===X?"rgba(0,123,255,.2)":"rgba(40,167,69,.2)",D.backgroundColor=0===X?"rgba(0,123,255,.2)":"rgba(40,167,69,.2)",this.chartData.soldServicesCount.datasets.push(D)})}if(l.commonDiseasesReport&&void 0!==l.commonDiseasesReport&&void 0!==l.commonDiseasesReport.series){const N=[],u=l.commonDiseasesReport.categories.length,h=u>6?z.drop(l.commonDiseasesReport.categories,u-6):l.commonDiseasesReport.categories;for(const O of h)N.push((0,n.Yq)(O,"EEE",this.locale));this.chartData.commonDiseasesReport.labels=N;const j=z.cloneDeep(this.chartData.commonDiseasesReport.datasets[0]);this.chartData.commonDiseasesReport.datasets=[],l.commonDiseasesReport.series.forEach((O,X)=>{const D=z.cloneDeep(j);D.data=u>6?z.drop(O.data,u-7):O.data,D.stack="a",D.label=O.name,D.borderColor="transparent",D.hoverBorderColor=this.getSymptomColor(X).border,D.backgroundColor=this.getSymptomColor(X).bg,D.hoverBackgroundColor=this.getSymptomColor(X).bg,this.chartData.commonDiseasesReport.datasets.push(D)})}this.firstChartLoad&&this.charts.forEach(N=>{N.chart.update()}),this.firstChartLoad=!0}}))}getSymptomColor(_){return void 0!==this.symptomColors[_]?this.symptomColors[_]:this.symptomColors[0]}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(i=s).\u0275fac=function(_){return new(_||i)(e.rXU(e.xe9),e.rXU(x.nX),e.rXU(Vo.G),e.rXU(q.uR),e.rXU(x.Ix))},i.\u0275cmp=e.VBU({type:i,selectors:[["app-client-dashboard"]],viewQuery:function(_,l){if(1&_&&e.GBs(at.j9,5),2&_){let N;e.mGM(N=e.lsd())&&(l.charts=N)}},decls:53,vars:25,consts:()=>{let t,_,l,N,u,h,j;return t="Pregledi",_="Novi pacijenti",l="Prihod",N="Broj prodanih usluga i pretplata",u="Bolesti",h="Rezervirani termini",j="Lista doktora",[t,_,l,N,u,h,j,[1,"row","g-0","align-items-stretch"],[1,"col-xl-4","col-lg-6","col-md-6","col-sm-6","col-xs-12"],[1,"card","m-2","rounded-xs","border-0","p-0","pt-2","pb-0","pt-lg-3","overflow-hidden","shadow-sm"],[1,"d-flex","align-items-center","justify-content-between","mb-2","mb-lg-3","px-2"],["src","assets/icons/icon-diagnostic-color.svg",3,"svgStyle"],[1,"d-flex","flex-column","justify-content-end"],[1,"text-end","fw-600","font-size-14","mb-1"],[1,"fw-600","text-end","mb-0","pe-2","font-size-14"],["class","card-chart",4,"ngIf"],["class","d-flex align-items-center justify-content-center py-3",4,"ngIf"],[1,"card","m-2","rounded-xs","border-0","p-0","pt-2","pt-lg-3","overflow-hidden","shadow-sm"],["src","assets/icons/icon-new-patient-color.svg",3,"svgStyle"],["src","assets/icons/icon-income-color.svg",3,"svgStyle"],[1,"col-xl-6","col-lg-6","col-md-6","col-sm-12","col-xs-12"],[1,"card","m-2","rounded-xs","border-0","px-2","pt-2","px-lg-3","pt-lg-3","overflow-hidden","shadow-sm"],[1,"fw-600","mb-0"],[4,"ngIf"],[1,"col-xs-12","col-sm-12","col-md-8","col-lg-7"],[1,"fw-600","mb-3"],[3,"template"],["class","col-xs-12 col-sm-12 col-md-4 col-lg-5",4,"ngIf"],[1,"card-chart"],["baseChart","","class","w-100",3,"type","data","options",4,"ngIf"],["baseChart","",1,"w-100",3,"type","data","options"],[1,"d-flex","align-items-center","justify-content-center","py-3"],["animation","spin","size","2x",3,"icon"],["baseChart","",3,"type","data","options",4,"ngIf"],["baseChart","",3,"type","data","options"],[1,"col-xs-12","col-sm-12","col-md-4","col-lg-5"],[3,"loading","specialistsEarnings"]]},template:function(_,l){1&_&&(e.j41(0,"div",7)(1,"div",8)(2,"div",9)(3,"div",10),e.nrm(4,"svg-icon",11),e.j41(5,"div",12)(6,"h5",13),e.pXf(7,0),e.k0s(),e.j41(8,"h3",14),e.EFF(9),e.k0s()()(),e.DNE(10,i_,2,1,"div",15)(11,o_,2,1,"div",16),e.k0s()(),e.j41(12,"div",8)(13,"div",17)(14,"div",10),e.nrm(15,"svg-icon",18),e.j41(16,"div",12)(17,"h5",13),e.pXf(18,1),e.k0s(),e.j41(19,"h3",14),e.EFF(20),e.k0s()()(),e.DNE(21,l_,2,1,"div",15)(22,s_,2,1,"div",16),e.k0s()(),e.j41(23,"div",8)(24,"div",17)(25,"div",10),e.nrm(26,"svg-icon",19),e.j41(27,"div",12)(28,"h5",13),e.pXf(29,2),e.k0s(),e.j41(30,"h3",14),e.EFF(31),e.nI1(32,"currency"),e.k0s()()(),e.DNE(33,c_,2,1,"div",15)(34,r_,2,1,"div",16),e.k0s()(),e.j41(35,"div",20)(36,"div",21)(37,"h5",22),e.pXf(38,3),e.k0s(),e.DNE(39,C_,2,1,"div",23)(40,E_,2,1,"div",16),e.k0s()(),e.j41(41,"div",20)(42,"div",21)(43,"h5",22),e.pXf(44,4),e.k0s(),e.DNE(45,T_,2,1,"div",23)(46,g_,2,1,"div",16),e.k0s()(),e.j41(47,"div",24)(48,"div",21)(49,"h5",25),e.pXf(50,5),e.k0s(),e.nrm(51,"app-meeting-list",26),e.k0s()(),e.DNE(52,I_,5,2,"div",27),e.k0s()),2&_&&(e.R7$(4),e.Y8G("svgStyle",e.lJ4(22,tt)),e.R7$(5),e.JRh(l.chartDataTotal.appointments),e.R7$(),e.Y8G("ngIf",!l.loading.charts),e.R7$(),e.Y8G("ngIf",l.loading.charts),e.R7$(4),e.Y8G("svgStyle",e.lJ4(23,tt)),e.R7$(5),e.JRh(l.chartDataTotal.newPatients),e.R7$(),e.Y8G("ngIf",!l.loading.charts),e.R7$(),e.Y8G("ngIf",l.loading.charts),e.R7$(4),e.Y8G("svgStyle",e.lJ4(24,tt)),e.R7$(5),e.JRh(e.brH(32,18,l.chartDataTotal.earnings,"EUR","symbol-narrow")),e.R7$(2),e.Y8G("ngIf",!l.loading.charts),e.R7$(),e.Y8G("ngIf",l.loading.charts),e.R7$(5),e.Y8G("ngIf",!l.loading.charts),e.R7$(),e.Y8G("ngIf",l.loading.charts),e.R7$(5),e.Y8G("ngIf",!l.loading.charts),e.R7$(),e.Y8G("ngIf",l.loading.charts),e.R7$(5),e.Y8G("template","admin-dashboard"),e.R7$(),e.Y8G("ngIf",l.specialistsEarnings&&l.specialistsEarnings.count>0))},dependencies:[n.bT,Ko.$,H.aY,oe.DM,at.j9,n_,n.oe],encapsulation:2}),s})(),data:{name:"clientDashboard"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:":clientUuid/role/:roleId",component:Yo.A,data:{name:"editRole"},canActivate:[te.q_,te.Kl],canDeactivate:[je.T]},{path:"",redirectTo:"/clients/list",pathMatch:"full"}]}];let u_=(()=>{var i;class s{}return(i=s).\u0275fac=function(_){return new(_||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[x.iI.forChild(p_),x.iI]}),s})();var m_=C(42668),S_=C(35691),L_=C(64856),R_=C(24489),b_=C(72463),M_=C(38819),P_=C(83507),A_=C(48287),h_
1=C(11183);let v_=(()=>{var i;class s{}return(i=s).\u0275fac=function(_){return new(_||i)},i.\u0275mod=e.$C({type:i}),i.\u0275inj=e.G2t({imports:[n.MD,u_,H.dX,d.X1,m_.w,o.MQ,de.jr,K.Ss,J.s0,S_.n,d.YN,ee.Cp,L_.g,R_.ReportsModule,fe.r,b_.t,h_.q,re.m_,M_.y,P_.J,oe.iu,A_.x,I]}),s})()},3366:(nn,ie,C)=>{C.d(ie,{A:()=>G});var n=C(54438),d=C(89417),re=C(18359),H=C(7673),o=C(25558),de=C(45383),K=C(47690),J=C(90515),ee=C(87787),oe=C(50779),x=C(60177),e=C(20060),Ge=C(534),W=C(63620);function le(a,T){1&a&&(n.j41(0,"div",12)(1,"label",13),n.pXf(2,2),n.k0s(),n.j41(3,"div",14),n.nrm(4,"input",15),n.k0s()())}function v(a,T){1&a&&(n.j41(0,"div",12)(1,"label",16),n.pXf(2,3),n.k0s(),n.j41(3,"div",14),n.nrm(4,"input",17),n.k0s()())}function se(a,T){if(1&a&&(n.j41(0,"h6",27),n.EFF(1),n.k0s()),2&a){const r=n.XpG().$implicit;n.R7$(),n.JRh(r.module)}}function q(a,T){1&a&&(n.j41(0,"div",28),n.nrm(1,"hr"),n.k0s())}function he(a,T){if(1&a&&(n.qex(0),n.DNE(1,se,2,1,"h6",22),n.j41(2,"div",23)(3,"label",24),n.nrm(4,"input",25),n.EFF(5),n.k0s()(),n.DNE(6,q,2,0,"div",26),n.bVm()),2&a){const r=T.$implicit,f=T.index,I=n.XpG(2);n.R7$(),n.Y8G("ngIf",!I.clientRoleActions[f-1]||r.module!==I.clientRoleActions[f-1].module),n.R7$(3),n.Y8G("formControlName",f),n.R7$(),n.SpI(" ",r.name," "),n.R7$(),n.Y8G("ngIf",!I.clientRoleActions[f+1]||r.module!==I.clientRoleActions[f+1].module)}}function ve(a,T){1&a&&(n.j41(0,"div",29),n.pXf(1,4),n.k0s())}function Ce(a,T){if(1&a&&(n.qex(0),n.j41(1,"div",18)(2,"div",19),n.DNE(3,he,7,4,"ng-container",20)(4,ve,2,0,"div",21),n.k0s()(),n.bVm()),2&a){const r=n.XpG();n.R7$(3),n.Y8G("ngForOf",r.clientRoleActions),n.R7$(),n.Y8G("ngIf",r.submitted&&!r.newRoleRouteForm.valid)}}function ue(a,T){1&a&&(n.j41(0,"div",30),n.pXf(1,5),n.k0s())}function $e(a,T){1&a&&(n.j41(0,"button",31),n.pXf(1,6),n.k0s())}let me=(()=>{var a;class T{constructor(f,I,A){this.formBuilder=f,this.alert=I,this.adminS=A,this.newRoleActions=new n.bkB,this.subscription=new re.yU,this.submitted=!1,this.faSpinner=de.z1G,this.loading={actions:!1},this.loading.actions=!0,this.subscription.add(this.adminS.getApiRoleActions().subscribe(w=>{this.loading.actions=!1,this.allClientRoleActions=w,this.deleteExistingActions()}))}ngOnInit(){!this.client||!this.role||(this.newRoleRouteForm=this.formBuilder.group({clientUuid:[this.client.uuid,d.k0.required],clientName:[this.client.name,d.k0.required],roleId:[this.role.i
1d,d.k0.required],roleName:[this.role.name],routeId:new d.Yp([],Ee(1))}),this.deleteExistingActions())}get routesFormArray(){return this.newRoleRouteForm.controls.routeId}deleteExistingActions(){if(!this.allClientRoleActions||!this.role.actions)return;const f=this.role.actions;this.clientRoleActions=this.allClientRoleActions.filter(function(I){return!f.find(function(A){return I.id===A.id})}),this.addRouteCheckboxes()}addRouteCheckboxes(){this.clientRoleActions.forEach(()=>this.routesFormArray.push(new d.MJ(!1)))}get f(){return this.newRoleRouteForm.controls}onSubmit(){if(this.submitted=!0,this.newRoleRouteForm.invalid)return;const f=this.newRoleRouteForm.value.routeId.map((I,A)=>I?this.clientRoleActions[A].id:null).filter(I=>null!==I);this.subscription.add(this.adminS.createClientRoleAction(this.newRoleRouteForm.value,f).subscribe(I=>{I&&(this.alert.success("Kreirano"),this.newRoleActions.emit(I))}))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(a=T).\u0275fac=function(f){return new(f||a)(n.rXU(d.ok),n.rXU(J.uE),n.rXU(K.Y))},a.\u0275cmp=n.VBU({type:a,selectors:[["app-role-new-route"]],inputs:{client:"client",role:"role"},outputs:{newRoleActions:"newRoleActions"},decls:11,vars:6,consts:()=>{let r,f,I,A,w,_e;return r="Dostupne rute",f="Korisnik",I="Rola",A="Barem jedna ruta mora biti odabrana za dodavanje",w="Sve rute dodane",_e="Dodaj rute",[["allRoleAdded",""],r,f,I,A,w,_e,[1,"mb-5",3,"ngSubmit","formGroup"],["class","mb-3 row align-items-center",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"d-block","text-end"],["type","submit","class","col-3 btn btn-success",4,"ngIf"],[1,"mb-3","row","align-items-center"],["for","clientName",1,"col-12","col-lg-2","fw-bold"],[1,"col-12","col-lg-10"],["type","text","id","clientName","formControlName","clientName","readonly","",1,"form-control","fw-bold"],["for","roleName",1,"col-12","col-lg-2","fw-bold"],["type","text","id","roleName","formControlName","roleName","readonly","",1,"form-control","fw-bold"],[1,"container-fluid"],[1,"row"],[4,"ngFor","ngForOf"],["class","alert alert-warning",4,"ngIf"],["class","fw-bold col-12 mb-3",4,"ngIf"],[1,"col-12","col-lg-6","mb-3","d-flex","justify-content-between"],["formArrayName","routeId"],["type","checkbox",1,"me-2",3,"formControlName"],["class","col-12",4,"ngIf"],[1,"fw-bold","col-12","mb-3"],[1,"col-12"],[1,"alert","alert-warning"],[1,"alert","alert-info"],["type","submit",1,"col-3","btn","btn-success"]]},template:function(f,I){if(1&f){const A=n.RV6();n.j41(0,"form",7),n.bIt("ngSubmit",function(){return n.eBV(A),n.Njj(I.onSubmit())}),n.DNE(1,le,5,0,"div",8)(2,v,5,0,"div",8),n.j41(3,"h6"),n.pXf(4,1),n.k0s(),n.nrm(5,"hr"),n.DNE(6,Ce,5,2,"ng-container",9)(7,ue,2,0,"ng-template",null,0,n.C5r),n.j41(9,"div",10),n.DNE(10,$e,2,0,"button",11),n.k0s()()}if(2&f){const A=n.sdS(8);n.Y8G("formGroup",I.newRoleRouteForm),n.R7$(),n.Y8G("ngIf",null==I.client?null:I.client.name),n.R7$(),n.Y8G("ngIf",null==I.role?null:I.role.name),n.R7$(4),n.Y8G("ngIf",(null==I.clientRoleActions?null:I.clientRoleActions.length)>0)("ngIfElse",A),n.R7$(4),n.Y8G("ngIf",I.newRoleRouteForm.dirty&&I.newRoleRouteForm.touched)}},dependencies:[x.Sq,x.bT,d.qT,d.me,d.Zm,d.BC,d.cb,d.j4,d.JD,d.v8,W.ZP],encapsulation:2}),T})();function Ee(a=1){return r=>r.controls.map(I=>I.value).reduce((I,A)=>A?I+A:I,0)>=a?null:{required:!0}}const R=["clientRoleRouteModal"],Y=()=>({tab:"roles"}),M=a=>({"is-invalid":a});function b(a,T){1&a&&(n.j41(0,"span",21),n.pXf(1,2),n.k0s())}function $(a,T){1&a&&(n.j41(0,"span",21),n.pXf(1,3),n.k0s())}function F(a,T){if(1&a&&(n.qex(0),n.j41(1,"span",22),n.pXf(2,4),n.k0s(),n.j41(3,"a",23),n.EFF(4),n.k0s(),n.bVm()),2&a){const r=n.XpG(3);n.R7$(3),n.Mz_("routerLink","/clients/edit/",r.client.uuid,""),n.Y8G("queryParams",n.lJ4(4,Y)),n.R7$(),n.JRh(r.client.name)}}function ae(a,T){if(1&a&&(n.j41(0,"h5",19),n.DNE(1,b,2,0,"span",20)(2,$,2,0,"span",20),n.j41(3,"strong"),n.EFF(4),n.k0s(),n.DNE(5,F,5,5,"ng-container",13),n.k0s()),2&a){const r=n.XpG(2);n.R7$(),n.Y8G("ngIf",null==r.role?null:r.role.clientId),n.R7$(),n.Y8G("ngIf",!(null!=r.role&&r.role.clientId)),n.R7$(2),n.JRh(null==r.role?null:r.role.name),n.R7$(),n.Y8G("ngIf",null==r.client?null:r.client.uuid)}}function Se(a,T){1&a&&(n.qex(0),n.j41(1,"div",24),n.nrm(2,"hr"),n.k0s(),n.bVm())}function fe(a,T){if(1&a){const r=n.RV6();n.j41(0,"div",25)(1,"button",26),n.bIt("click",function(){n.eBV(r);const I=n.XpG(2);
1return n.Njj(I.addClientRoleRouteModal())}),n.nrm(2,"fa-icon",27),n.EFF(3,"Dodaj rute"),n.k0s(),n.j41(4,"div",24),n.nrm(5,"hr"),n.k0s()()}if(2&a){const r=n.XpG(2);n.R7$(2),n.Y8G("icon",r.faRoute)}}function Te(a,T){if(1&a&&(n.j41(0,"h6",34),n.EFF(1),n.k0s()),2&a){const r=n.XpG().$implicit;n.R7$(),n.JRh(r.module)}}function z(a,T){if(1&a){const r=n.RV6();n.j41(0,"button",35),n.bIt("click",function(){n.eBV(r);const I=n.XpG().$implicit,A=n.XpG(3);return n.Njj(A.deleteRoleRoute(I))}),n.nrm(1,"fa-icon",36),n.k0s()}if(2&a){const r=n.XpG(4);n.R7$(),n.Y8G("icon",r.faTrash)}}function ne(a,T){1&a&&(n.j41(0,"div",24),n.nrm(1,"hr"),n.k0s())}function Xe(a,T){if(1&a&&(n.qex(0),n.DNE(1,Te,2,1,"h6",29),n.j41(2,"div",30)(3,"span",31),n.EFF(4),n.k0s(),n.DNE(5,z,2,1,"button",32),n.k0s(),n.DNE(6,ne,2,0,"div",33),n.bVm()),2&a){const r=T.$implicit,f=T.index,I=n.XpG(3);n.R7$(),n.Y8G("ngIf",!I.role.actions[f-1]||r.module!==I.role.actions[f-1].module),n.R7$(3),n.JRh(r.name),n.R7$(),n.Y8G("ngIf",I.role.clientId),n.R7$(),n.Y8G("ngIf",!I.role.actions[f+1]||r.module!==I.role.actions[f+1].module)}}function Ye(a,T){if(1&a&&(n.qex(0),n.DNE(1,Xe,7,4,"ng-container",28),n.bVm()),2&a){const r=n.XpG(2);n.R7$(),n.Y8G("ngForOf",r.role.actions)}}function Be(a,T){1&a&&(n.j41(0,"div",37),n.pXf(1,5),n.k0s())}function Ve(a,T){if(1&a&&(n.qex(0),n.j41(1,"div",15),n.DNE(2,ae,6,4,"h5",16)(3,Se,3,0,"ng-container",13)(4,fe,6,1,"div",17)(5,Ye,2,1,"ng-container",18)(6,Be,2,0,"ng-template",null,1,n.C5r),n.k0s(),n.bVm()),2&a){const r=n.sdS(7),f=n.XpG();n.R7$(2),n.Y8G("ngIf",!f.new),n.R7$(),n.Y8G("ngIf",null==f.role?null:f.role.actions),n.R7$(),n.Y8G("ngIf",f.role.clientId),n.R7$(),n.Y8G("ngIf",(null==f.role?null:f.role.actions.length)>0)("ngIfElse",r)}}function Ke(a,T){1&a&&(n.j41(0,"div"),n.pXf(1,8),n.k0s())}function qe(a,T){1&a&&(n.j41(0,"div"),n.pXf(1,9),n.k0s())}function Je(a,T){1&a&&(n.j41(0,"div"),n.pXf(1,10),n.k0s())}function We(a,T){if(1&a&&(n.j41(0,"div",46),n.DNE(1,Ke,2,0,"div",13)(2,qe,2,0,"div",13)(3,Je,2,0,"div",13),n.k0s()),2&a){const r=n.XpG(2);n.R7$(),n.Y8G("ngIf",r.f.name.errors.required),n.R7$(),n.Y8G("ngIf",r.f.name.errors.minlength),n.R7$(),n.Y8G("ngIf",r.f.name.errors.pattern)}}function He(a,T){if(1&a){const r=n.RV6();n.qex(0),n.j41(1,"form",38),n.bIt("ngSubmit",function(){n.eBV(r);const I=n.XpG();return n.Njj(I.onSubmit())}),n.j41(2,"div",39)(3,"label",40),n.pXf(4,6),n.k0s(),n.j41(5,"div",41),n.nrm(6,"input",42),n.DNE(7,We,4,3,"div",43),n.k0s()(),n.j41(8,"div",44)(9,"button",45),n.pXf(10,7),n.k0s()()(),n.bVm()}if(2&a){const r=n.XpG();n.R7$(),n.Y8G("formGroup",r.roleForm),n.R7$(5),n.Y8G("ngClass",n.eq3(3,M,r.submitted&&r.f.name.errors)),n.R7$(),n.Y8G("ngIf",r.submitted&&r.f.name.errors)}}function Ze(a,T){if(1&a&&n.nrm(0,"fa-icon",47),2&a){const r=n.XpG();n.Y8G("icon",r.faSpinner)}}function g(a,T){if(1&a){const r=n.RV6();n.qex(0),n.j41(1,"div",48)(2,"h5"),n.pXf(3,11),n.k0s(),n.j41(4,"button",49),n.bIt("click",function(){n.eBV(r);const I=n.XpG();return I.modalRef.hide(),n.Njj(I.modalRef=void 0)}),n.k0s()(),n.j41(5,"div",50)(6,"app-role-new-route",51),n.bIt("newRoleActions",function(I){n.eBV(r);const A=n.XpG();return n.Njj(A.roleActionAdded(I))}),n.k0s()(),n.bVm()}if(2&a){const r=n.XpG();n.R7$(6),n.Y8G("client",r.client)("role",r.role)}}let G=(()=>{var a;class T{constructor(f,I,A,w,_e,Q,ge){this.adminS=f,this.route=I,this.router=A,this.alert=w,this.auth=_e,this.formBuilder=Q,this.modalService=ge,this.newRole=new n.bkB,this.subscription=new re.yU,this.faSpinner=de.z1G,this.faTrash=de.yLS,this.faRoute=de.TBz,this.loading={client:!1,role:!1},this.nameRegex="^[A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u
10219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+(?: [A-Za-z0-9-s\\'\xc1\u010c\u010e\u0110\xc9\u011a\xcd\u0147\xd3\u0158\u0160\u0164\xda\u016e\xdd\u017d\xe1\u010d\u010f\u0111\xe9\u011b\xed\u0148\xf3\u0159\u0161\u0165\xfa\u016f\xfd\u017e\xc5\xc6\xc9\xd8\xe5\xe6\xe9\xf8\xc9\xcb\xcf\xd3\xd6\xdc\xe9\xeb\xef\xf3\xf6\xfc\xc4\xc5\xd6\xe4\xe5\xf6\xc0\xc2\xc6\xc7\xc9\xc8\xca\xcb\xcf\xce\xd4\u0152\xd9\xdb\xdc\u0178\xe0\xe2\xe6\xe7\xe9\xe8\xea\xeb\xef\xee\xf4\u0153\xf9\xfb\xfc\xff\xc4\xd6\xdc\u1e9e\xe4\xf6\xfc\xdf\xc1\xc9\xcd\xd6\xd3\u0150\xdc\xda\u0170\xe1\xe9\xed\xf6\xf3\u0151\xfc\xfa\u0171\xc1\xc6\xd0\xc9\xcd\xd3\xd6\xde\xda\xdd\xe1\xe6\xf0\xe9\xed\xf3\xf6\xfe\xfa\xfd\xc0\xc8\xc9\xcc\xd2\xd3\xd9\xe0\xe8\xe9\xec\xf2\xf3\xf9\xc5\xc6\xc2\xc9\xc8\xca\xd8\xd3\xd2\xd4\xe5\xe6\xe2\xe9\xe8\xea\xf8\xf3\xf2\xf4\u0104\u0106\u0118\u0141\u0143\xd3\u015a\u0179\u017b\u0105\u0107\u0119\u0142\u0144\xf3\u015b\u017a\u017c\xc3\xc1\xc0\xc2\xc7\xc9\xca\xcd\xd5\xd3\xd4\xda\xdc\xe3\xe1\xe0\xe2\xe7\xe9\xea\xed\xf5\xf3\xf4\xfa\xfc\u0102\xc2\xce\u015e\u0218\u0162\u021a\u0103\xe2\xee\u015f\u0219\u0163\u021b\xc1\xc9\xcd\xd1\xd3\xda\xdc\xe1\xe9\xed\xf1\xf3\xfa\xfc\xc4\xc5\xc9\xd6\xe4\xe5\xe9\xf6\xc2\xc7\u011eI\u0130\xce\xd6\u015e\xdc\xdb\xe2\xe7\u011f\u0131\u0130\xee\xf6\u015f\xfc\xfb]+)*$",this.submitted=!1}ngOnInit(){const f=this.route.params.pipe((0,o.n)(I=>{this.loading.role=!0;const A=I.clientUuid?I.clientUuid:void 0!==this.client.uuid?this.client.uuid:null;if(!A)return this.alert.error("Nedostaje klijent"),this.router.navigate(["/clients"]);this.loadClient(A);const w=I.roleId?I.roleId:null;return this.new||w?this.new?(0,H.of)(null):this.adminS.getRoleById(A,w):this.router.navigate(["/clients"])})).subscribe(I=>{if(this.loading.role=!1,this.new&&this.createForm(),!I)return this.router.navigate([`/clients/edit/${this.client.uuid}`]);this.role=I});this.subscription.add(f)}createForm(){this.roleForm=this.formBuilder.group({name:[null,[d.k0.required,d.k0.minLength(5),d.k0.pattern(this.nameRegex)]],clientUuid:[this.client.uuid]})}get f(){return this.roleForm.controls}hasAcl(f){return this.auth.hasAcl(this.client,f)}loadClient(f){this.client&&this.client.uuid===f||(this.loading.client=!0,this.subscription.add(this.adminS.getClientByUuid(f).subscribe(I=>{this.loading.client=!1,this.client=I})))}deleteRoleRoute(f){this.subscription.add(this.adminS.deleteRoleRoute(this.client.uuid,this.role.i
1d,f).subscribe(I=>{if(I){const A=void 0!==I.message?I.message:"Obrisano",w=this.role.actions.indexOf(f);w>=0&&(this.role.actions.splice(w,1),this.alert.success(A))}}))}addClientRoleRouteModal(){this.modalRef=this.modalService.show(this.clientRoleRouteModal,{animated:!0,class:"modal-lg"})}roleActionAdded(f){f.forEach(I=>this.role.actions.push(I)),this.modalService.hide()}onSubmit(){this.submitted=!0,!this.roleForm.invalid&&(this.loading.role=!0,this.subscription.add(this.adminS.createClientRole(this.roleForm.value).subscribe(f=>{this.loading.role=!1,f?this.newRole.emit(f):this.alert.error("Gre\u0161ka")})))}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}}return(a=T).\u0275fac=function(f){return new(f||a)(n.rXU(K.Y),n.rXU(ee.nX),n.rXU(ee.Ix),n.rXU(J.uE),n.rXU(J.uR),n.rXU(d.ok),n.rXU(oe.I8))},a.\u0275cmp=n.VBU({type:a,selectors:[["app-role-edit"]],viewQuery:function(f,I){if(1&f&&n.GBs(R,5),2&f){let A;n.mGM(A=n.lsd())&&(I.clientRoleRouteModal=A.first)}},inputs:{new:"new",client:"client"},outputs:{newRole:"newRole"},decls:6,vars:3,consts:()=>{let r,f,I,A,w,_e,Q,ge,Le,Oe,Re;return r="Ure\u0111ivanje dopu\u0161tenih ruta role:",f="Pregled dopu\u0161tenih ruta role:",I="korisnika:",A="Obri\u0161i rutu",w="Ne postoje rute za danu rolu! Dodajte nove rute",_e="Ime role",Q="Kreiraj",ge="Ime obavezno polje",Le="Minimalno 5 slova",Oe="Dozvoljena samo slova",Re="Dodaj rute za rolu korisnika",[["clientRoleRouteModal",""],["noRoleActions",""],r,f,I,w,_e,Q,ge,Le,Oe,Re,[1,"container-fluid"],[4,"ngIf"],["animation","spin","size","2x",3,"icon",4,"ngIf"],[1,"row"],["class","col-12 mb-3 pt-3",4,"ngIf"],["class","col-12 text-end mb-3 mb-lg-0",4,"ngIf"],[4,"ngIf","ngIfElse"],[1,"col-12","mb-3","pt-3"],["class","me-1",4,"ngIf"],[1,"me-1"],[1,"mx-1"],[1,"fw-bold",3,"routerLink","queryParams"],[1,"col-12"],[1,"col-12","text-end","mb-3","mb-lg-0"],["type","button","tooltip","Dodaj",1,"btn","btn-sm","btn-success",3,"click"],[1,"me-2",3,"icon"],[4,"ngFor","ngForOf"],["class","fw-bold col-12 mb-3",4,"ngIf"],[1,"col-12","col-lg-6","mb-3","d-flex","justify-content-between"],[1,"me-3"],["class","btn btn-sm btn-danger","tooltip",A,"type","button",3,"click",4,"ngIf"],["class","col-12",4,"ngIf"],[1,"fw-bold","col-12","mb-3"],["tooltip",A,"type","button",1,"btn","btn-sm","btn-danger",3,"click"],[3,"icon"],[1,"alert","alert-info"],[3,"ngSubmit","formGroup"],[1,"mb-3","row","mb-3"],["for","name",1,"col-12","col-lg-3","fw-bold"],[1,"col-12","col-lg-9"],["type","email","formControlName","name","id","name",1,"form-control",3,"ngClass"],["class","invalid-feedback w-100",4,"ngIf"],[1,"d-block","text-end"],["type","submit",1,"col-3","btn","btn-success","rounded","text-pearl-white"],[1,"invalid-feedback","w-100"],["animation","spin","size","2x",3,"icon"],[1,"modal-header","d-flex","justify-content-between"],["type","button","aria-label","Close",1,"btn-close","pull-right",3,"click"],[1,"modal-body","text-start"],[3,"newRoleActions","client","role"]]},template:function(f,I){1&f&&(n.j41(0,"div",12),n.DNE(1,Ve,8,5,"ng-container",13)(2,He,11,5,"ng-container",13)(3,Ze,1,1,"fa-icon",14),n.k0s(),n.DNE(4,g,7,2,"ng-template",null,0,n.C5r)),2&f&&(n.R7$(),n.Y8G("ngIf",!I.loading.role&&I.role),n.R7$(),n.Y8G("ngIf",I.new),n.R7$(),n.Y8G("ngIf",I.loading.role))},dependencies:[x.YU,x.Sq,x.bT,ee.Wk,e.aY,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,Ge.dg,W.ZP,me],encapsulation:2}),T})()},48616:(nn,ie,C)=>{C.d(ie,{W:()=>n});class n{}}}]);
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.