dealpos 12.3.2 → 12.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/POS/1853.e616ac5b6d9a72b6.js +1 -0
  2. package/POS/2004.30b75999d4f79e74.js +1 -0
  3. package/POS/2527.5c2bd53f470f2200.js +1 -0
  4. package/POS/2750.daa4c2166cb8163c.js +1 -0
  5. package/POS/3337.47497dbbd3587b88.js +1 -0
  6. package/POS/4941.fdbbba5388752626.js +1 -0
  7. package/POS/4970.13d9fca400be554f.js +1 -0
  8. package/POS/5189.921845ef5e27db19.js +1 -0
  9. package/POS/{6268.d279e08ba41bc278.js → 6268.ba81ff834f86b26a.js} +1 -1
  10. package/POS/6303.4ed4bd17dea67448.js +1 -0
  11. package/POS/6499.6d348c0f69ed1f80.js +1 -0
  12. package/POS/{7298.b974e43bf5beea2a.js → 7298.4f027fbf7f63217a.js} +1 -1
  13. package/POS/7490.2db20e6f4e74de4e.js +1 -0
  14. package/POS/7516.dbdb2393350fbba8.js +1 -0
  15. package/POS/7998.9f3d527343a13020.js +1 -0
  16. package/POS/{8126.b3daa63c16bb3e2b.js → 8126.ef6fc7f6dc10f056.js} +1 -1
  17. package/POS/{8317.238f5c768094234b.js → 8317.75fb5ab533934ebd.js} +1 -1
  18. package/POS/8670.e2ba622ead6066b5.js +1 -0
  19. package/POS/8761.d29137402054d41a.js +1 -0
  20. package/POS/{8914.a3caac170682904c.js → 8914.d0e02a830793f3f8.js} +1 -1
  21. package/POS/{8923.6bd1c1dc05546064.js → 8923.62b806e20272a2bf.js} +1 -1
  22. package/POS/9055.c66f6d7b3c6e98dd.js +1 -0
  23. package/POS/{9484.2c03e170bfbc29a9.js → 9484.e025327180507338.js} +1 -1
  24. package/POS/common.0223aa170d4d3551.js +1 -0
  25. package/POS/index.html +3 -3
  26. package/POS/{main.48494e47cd6193ae.js → main.858685debc9dba17.js} +1 -1
  27. package/POS/{runtime.66cc8ca643ab3599.js → runtime.7fec8fb318984d20.js} +1 -1
  28. package/POS/scripts.a7469d1567e78ada.js +1 -0
  29. package/POS/{styles.f85969ef039bf1d5.css → styles.817a1099e234123f.css} +2 -2
  30. package/package.json +1 -1
  31. package/POS/1853.8cbf7819d90d42b2.js +0 -1
  32. package/POS/2004.803c711f8f80862a.js +0 -1
  33. package/POS/2501.72448ce8c1dede1a.js +0 -1
  34. package/POS/2527.f15768f25b37f523.js +0 -1
  35. package/POS/2750.7815249ea2a8d360.js +0 -1
  36. package/POS/3337.065b3b76eee145bd.js +0 -1
  37. package/POS/4941.f681578d46bf28bd.js +0 -1
  38. package/POS/4970.71a56c91fa93c272.js +0 -1
  39. package/POS/5189.25c5d67ab7a244cb.js +0 -1
  40. package/POS/6303.5f6137e5343fb488.js +0 -1
  41. package/POS/7490.c38c2b1e08694f9c.js +0 -1
  42. package/POS/7516.d23685110df686b0.js +0 -1
  43. package/POS/7998.0044103c3406ad65.js +0 -1
  44. package/POS/8761.3a39a0584c1e92ef.js +0 -1
  45. package/POS/9055.8b8ca776fbd6c557.js +0 -1
  46. package/POS/9230.fb5bb3eb4503f610.js +0 -1
  47. package/POS/common.2eb3b8b5078ae92f.js +0 -1
  48. package/POS/scripts.cae5fdbdb517be56.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1853],{88651:(Q,U,_)=>{_.d(U,{U:()=>S});var a=_(81180),g=_(24351),l=_(22863);class S extends l.M{get formData(){return this.data.Form}get options(){return this.data.Options?this.data.Options:{}}get Roles(){return this.data.Roles?this.data.Roles:{}}constructor(v,t,b,x){super(v),(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"formDataAPI",void 0),(0,a.Z)(this,"route",void 0),(0,a.Z)(this,"data",{}),this.httpService=t,this.formDataAPI=b,this.route=x;let Z=this.route.snapshot.queryParams;this.menuData$.pipe((0,g.b)(()=>this.httpService.post(`/api/${this.formDataAPI}`,JSON.stringify(Z)))).subscribe(f=>{this.data=f,this.postBindForm(f)})}postBindForm(v){}onSubmit(v,t=!1){this.preSubmitForm(),this.httpService.post(`/api/${v}`,JSON.stringify(this.formData)).subscribe({next:b=>{this.onSubmitSuccess(b)},error:b=>{this.onSubmitError(b)}})}compare(v,t,b){return(v<t?-1:1)*(b?1:-1)}preSubmitForm(){}onSubmitSuccess(v){}onSubmitError(v){}}},4077:(Q,U,_)=>{_.d(U,{s:()=>Z,n:()=>f});var a=_(81180),g=_(96700),l=_(67327),S=_(24351),P=_(41206);class v{constructor(){(0,a.Z)(this,"enabledDragItem",void 0),this.enabledDragItem=!1}drop(p,s){(0,P.bA)(s.Data,p.previousIndex,p.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(p,s){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||s.postListID(p,s.data.Data)}onPutSaveDragAndDrop(p,s){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||s.putListID(p,s.data.Data)}}class t{constructor(p){(0,a.Z)(this,"httpService",void 0),this.httpService=p}exportCSV(p,s,d,u){d.pageData.Filter.Export=!0,d.pageData.Filter.FormatType=Z.CSV,u=u||"export.csv",this.httpService.post(`/api/${s}`,JSON.stringify(d.pageData.Filter)).subscribe(h=>{p.convertToCSV(h,u),d.pageData.Filter.Export=!1})}convertToCSV(p,s=!1,d){let u=this.ExportDataFromUI2(s);p.convertToCSV(u,d)}ExportDataFromUI2(p=!1){const s=document.getElementById("tableGrid"),d=[];return l.gT.IsNotEmpty(s)&&s.querySelectorAll("tr").forEach(h=>{const m=new Object;let C=0;h.querySelectorAll("th, td").forEach(w=>{C++;const N=parseInt(w.getAttribute("colspan"));for(let F=1;F<N;F++)m["column"+C]="",C++;const q=w.innerText,J=q.toString().split("");if(p&&"0"===J[0]&&J.length>1){let F="'"+q.trim();m["column"+C]=F}else m["column"+C]=q.trim()}),d.push(m)}),d}}var b=_(22863);class x{constructor(){(0,a.Z)(this,"listTotal",void 0),(0,a.Z)(this,"pageSize",void 0),(0,a.Z)(this,"show",void 0),this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(p){this.pageSize=p.pageData.Filter.RowCount,this.listTotal=p.data?.ListTotal,this.show=this.pageSize<=this.listTotal}changePage(p,s,d){s.Filter.PageNumber=p.pageIndex+1,d.getListData()}}var Z=(()=>{return(T=Z||(Z={}))[T.CSV=0]="CSV",T[T.XLSX=1]="XLSX",Z;var T})();class f extends b.M{constructor(p,s,d,u,h,m){super(p),(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"dataAPI",void 0),(0,a.Z)(this,"pageAPI",void 0),(0,a.Z)(this,"toastrService",void 0),(0,a.Z)(this,"route",void 0),(0,a.Z)(this,"pageData",{Filter:{},Options:{},Roles:{},Config:{}}),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"pagination",new x),(0,a.Z)(this,"dragDrop",new v),(0,a.Z)(this,"exportHandler",void 0),(0,a.Z)(this,"comparation",0),(0,a.Z)(this,"queryParams",{}),this.httpService=s,this.dataAPI=d,this.pageAPI=u,this.toastrService=h,this.route=m,this.exportHandler=new t(s),u?(m&&(this.queryParams=this.route.snapshot.queryParams),this.preInitLoader(),this.menuData$.pipe((0,S.b)(()=>this.httpService.post("/api/"+this.pageAPI,JSON.stringify(this.queryParams)))).subscribe(C=>{this.pageData=C,this.pageData.Filter||(this.pageData.Filter={}),this.pageData.Filter.PageNumber=1,this.pageData.Filter.ID=this.queryParams.ID,this.preInitList(),this.getListData()})):(this.pageData.Filter.RowCount=20,this.pageData.Filter.PageNumber=1,this.preInitList(),this.menuData$.subscribe(()=>{this.getListData()}))}preInitLoader(){}preInitList(){}getListData(p){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,JSON.stringify(this.pageData.Filter)).subscribe(s=>{this.data=s,this.postInit(s),this.pagination.changePaginationData(this),p&&(this.pageData.HideStoreApiCount=!1)})}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(p){null!=p.PageTitle&&(this.menuData.H=p.PageTitle)}preGetList(){null==this.pageData.Filter.From&&(this.pageData.Filter.From=l.gT.MinDate),null==this.pageData.Filter.To&&(this.pageData.Filter.To=l.gT.MinDate)}preSearchFromPageOne(){}onPaginationChange(p){this.pagination.changePage(p,this.pageData,this)}onSelectAllData(p){this.data.Data=this.data.Data.map(s=>(s.selected=p,s))}getSelectedData(){let p=[];return this.data&&(p=this.data.Data.filter(s=>s.selected)),p}httpPostListID(p,s,d){if(s||(s="Are you sure you want to selected record/s?"),0==confirm(s))return;let u=this.getSelectedData();u.length>0&&this.postListID(p,u,d)}httpPutListID(p,s,d){if(s||(s="Are you sure you want to selected record/s?"),0==confirm(s))return;let u=this.getSelectedData();u.length>0&&this.putListID(p,u,d)}httpDeleteListID(p,s,d){if(s||(s="Are you sure you want to delete selected record/s?"),0==confirm(s))return;let u=this.getSelectedData();u.length>0&&this.DeleteListID(p,u,d)}onSaveDragAndDrop(p){this.dragDrop.onSaveDragAndDrop(p,this)}onPutSaveDragAndDrop(p){this.dragDrop.onPutSaveDragAndDrop(p,this)}postListID(p,s,d){const u=s.map(h=>d?h[d]:h.ID);this.httpService.post(`/api/${p}`,u).subscribe(h=>{this.toastrService.success(h.Message?h.Message:h,g.n.Success),this.getListData()})}putListID(p,s,d){const u=s.map(h=>d?h[d]:h.ID);this.httpService.put(`/api/${p}`,u).subscribe(h=>{this.toastrService.success(h.Message?h.Message:h,g.n.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(p,s,d){const u=s.map(h=>d?h[d]:h.ID);this.httpService.delete(`/api/${p}`,u).subscribe(h=>{this.toastrService.success(h.Message?h.Message:h,g.n.Success),this.getListData()})}postData(p,s){this.httpService.post("/API/"+p,JSON.stringify(s)).subscribe(d=>{this.getListData(),this.toastrService.success(d.Message?d.Message:d,g.n.Success)})}compare(p,s,d){return(p<s?-1:1)*(d?1:-1)}exportCSV(p,s,d){this.exportHandler.exportCSV(p,s,this,d)}s2ab(p){for(var s=new ArrayBuffer(p.length),d=new Uint8Array(s),u=0;u!=p.length;++u)d[u]=255&p.charCodeAt(u);return s}exportXlsx(p,s){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${p}`,JSON.stringify(this.pageData.Filter)).subscribe(d=>{s=decodeURI(s);const u=window.URL.createObjectURL(new Blob([this.s2ab(atob(d))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),h=document.createElement("a");h.href=u,h.setAttribute("download",s),document.body.appendChild(h),h.click(),window.URL.revokeObjectURL(u),h.remove()})}convertToCSV(p,s=!1,d){let u=this.exportHandler.ExportDataFromUI2(s);p.convertToCSV(u,d)}OnCompare(p){const s=p?this.data[p]:this.data;if(s.length<1)return;const d=Object.assign({},this.pageData.Filter);d.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),d.To=new Date(new Date(this.pageData.Filter.To).getFullYear(),new Date(this.pageData.Filter.To).getMonth(),0).toDateString(),this.httpService.post("/API/"+this.dataAPI,JSON.stringify(d)).subscribe(u=>{const h=p?u[p]:u;this.comparation=0,s.forEach(m=>{m.PrevIndex="-",m.CurrentIndex="-",m.Increase="-";const C=h.filter(M=>M.EntityID==m.EntityID);if(m.CurrentIndex=m.Rank,C.length>0){const M=C[0];m.PrevIndex=M.Rank,M.SalesNet?m.Increase=(m.SalesNet-M.SalesNet)/M.SalesNet*100:M.Sales&&(m.Increase=(m.Sales-M.Sales)/M.Sales*100),m.IsPositive=m.Increase>0,m.IsNegative=m.Increase<0,this.comparation+=m.Increase}})})}}},15378:(Q,U,_)=>{_.r(U),_.d(U,{ProfileModule:()=>sn});var a=_(81180),g=_(36895),l=_(24006),S=_(9116),P=_(88651),v=_(96700),t=_(94650),b=_(58966),x=_(89156),Z=_(97185),f=_(65412),T=_(31920),p=_(51161),s=_(30273),d=_(10266),u=_(64425),h=_(67327);const C="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",M="0123456789ABCDEFGHIJKLMNOPQRSTUV",w="0123456789ABCDEFGHJKMNPQRSTVWXYZ";var q=_(77579),J=_(82722),F=_(39300),et=_(63900),k=_(42046),E=_(63165);let nt=(()=>{class n{constructor(e){(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"config",void 0),this.dialogRef=e}ngOnInit(){this.config=new k.O,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=v.n.Warning}onOk(){this.dialogRef.close(!0)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(f.so))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-confirmation-disabled"]],decls:5,vars:1,consts:[[3,"config","onOk","onCancel","onClose"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"p",2),t._uU(4,"Are you sure you want to disable two factor authentication for your account? "),t.qZA()()()()),2&e&&t.Q6J("config",o.config)},dependencies:[E.M]})),n})();var j=_(15861),V=_(3259),ot=_(11481);const it=["qrcElement"];let at=(()=>{class n{constructor(e,o){this.renderer=e,this.sanitizer=o,this.allowEmptyString=!1,this.colorDark="#000000ff",this.colorLight="#ffffffff",this.cssClass="qrcode",this.elementType="canvas",this.errorCorrectionLevel="M",this.margin=4,this.qrdata="",this.scale=4,this.width=10,this.qrCodeURL=new t.vpe,this.context=null}ngOnChanges(){var e=this;return(0,j.Z)(function*(){yield e.createQRCode()})()}isValidQrCodeText(e){return!1===this.allowEmptyString?!(typeof e>"u"||""===e||"null"===e||null===e):!(typeof e>"u")}toDataURL(e){return new Promise((o,i)=>{(0,V.toDataURL)(this.qrdata,e,(c,y)=>{c?i(c):o(y)})})}toCanvas(e,o){return new Promise((i,c)=>{(0,V.toCanvas)(e,this.qrdata,o,y=>{y?c(y):i("success")})})}toSVG(e){return new Promise((o,i)=>{(0,V.toString)(this.qrdata,e,(c,y)=>{c?i(c):o(y)})})}renderElement(e){for(const o of this.qrcElement.nativeElement.childNodes)this.renderer.removeChild(this.qrcElement.nativeElement,o);this.renderer.appendChild(this.qrcElement.nativeElement,e)}createQRCode(){var e=this;return(0,j.Z)(function*(){e.version&&e.version>40?(console.warn("[angularx-qrcode] max value for `version` is 40"),e.version=40):e.version&&e.version<1?(console.warn("[angularx-qrcode]`min value for `version` is 1"),e.version=1):void 0!==e.version&&isNaN(e.version)&&(console.warn("[angularx-qrcode] version should be a number, defaulting to auto."),e.version=void 0);try{if(!e.isValidQrCodeText(e.qrdata))throw new Error("[angularx-qrcode] Field `qrdata` is empty, set 'allowEmptyString=\"true\"' to overwrite this behaviour.");e.isValidQrCodeText(e.qrdata)&&""===e.qrdata&&(e.qrdata=" ");const o={color:{dark:e.colorDark,light:e.colorLight},errorCorrectionLevel:e.errorCorrectionLevel,margin:e.margin,scale:e.scale,version:e.version,width:e.width},i=e.imageSrc,c=e.imageHeight||40,y=e.imageWidth||40;switch(e.elementType){case"canvas":const D=e.renderer.createElement("canvas");e.context=D.getContext("2d"),e.toCanvas(D,o).then(()=>{if(e.ariaLabel&&e.renderer.setAttribute(D,"aria-label",`${e.ariaLabel}`),e.title&&e.renderer.setAttribute(D,"title",`${e.title}`),i&&e.context){e.centerImage=new Image(y,c),i!==e.centerImage.src&&(e.centerImage.src=i),c!==e.centerImage.height&&(e.centerImage.height=c),y!==e.centerImage.width&&(e.centerImage.width=y);const O=e.centerImage;O&&(O.onload=()=>{e.context?.drawImage(O,D.width/2-y/2,D.height/2-c/2,y,c)})}e.renderElement(D),e.emitQRCodeURL(D)}).catch(O=>{console.error("[angularx-qrcode] canvas error:",O)});break;case"svg":const A=e.renderer.createElement("div");e.toSVG(o).then(O=>{e.renderer.setProperty(A,"innerHTML",O);const H=A.firstChild;e.renderer.setAttribute(H,"height",`${e.width}`),e.renderer.setAttribute(H,"width",`${e.width}`),e.renderElement(H),e.emitQRCodeURL(H)}).catch(O=>{console.error("[angularx-qrcode] svg error:",O)});break;default:const I=e.renderer.createElement("img");e.toDataURL(o).then(O=>{e.alt&&I.setAttribute("alt",e.alt),e.ariaLabel&&I.setAttribute("aria-label",e.ariaLabel),I.setAttribute("src",O),e.title&&I.setAttribute("title",e.title),e.renderElement(I),e.emitQRCodeURL(I)}).catch(O=>{console.error("[angularx-qrcode] img/url error:",O)})}}catch(o){console.error("[angularx-qrcode] Error generating QR Code:",o.message)}})()}emitQRCodeURL(e){const o=e.constructor.name;if(o===SVGSVGElement.name){const y=new Blob([e.outerHTML],{type:"image/svg+xml"}),D=URL.createObjectURL(y),A=this.sanitizer.bypassSecurityTrustUrl(D);return void this.qrCodeURL.emit(A)}let i="";o===HTMLCanvasElement.name&&(i=e.toDataURL("image/png")),o===HTMLImageElement.name&&(i=e.src),fetch(i).then(c=>c.blob()).then(c=>URL.createObjectURL(c)).then(c=>this.sanitizer.bypassSecurityTrustUrl(c)).then(c=>{this.qrCodeURL.emit(c)}).catch(c=>{console.error("[angularx-qrcode] Error when fetching image/png URL: "+c)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(t.Qsj),t.Y36(ot.H7))},n.\u0275cmp=t.Xpm({type:n,selectors:[["qrcode"]],viewQuery:function(e,o){if(1&e&&t.Gf(it,7),2&e){let i;t.iGM(i=t.CRH())&&(o.qrcElement=i.first)}},inputs:{allowEmptyString:"allowEmptyString",colorDark:"colorDark",colorLight:"colorLight",cssClass:"cssClass",elementType:"elementType",errorCorrectionLevel:"errorCorrectionLevel",imageSrc:"imageSrc",imageHeight:"imageHeight",imageWidth:"imageWidth",margin:"margin",qrdata:"qrdata",scale:"scale",version:"version",width:"width",alt:"alt",ariaLabel:"ariaLabel",title:"title"},outputs:{qrCodeURL:"qrCodeURL"},features:[t.TTD],decls:2,vars:2,consts:[["qrcElement",""]],template:function(e,o){1&e&&t._UZ(0,"div",null,0),2&e&&t.Tol(o.cssClass)},encapsulation:2,changeDetection:0}),n})(),rt=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n}),n.\u0275inj=t.cJS({}),n})();function st(n,r){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div")(2,"div",3),t._uU(3," Two Factor Authentication Status: "),t.TgZ(4,"span",4),t._uU(5,"Enabled"),t.qZA()()(),t.TgZ(6,"div",5)(7,"button",6),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onDisableTotp())}),t._uU(8,"Disable Two Factor Authentication"),t.qZA()(),t.BQk()}}function lt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",8)(2,"h4"),t._uU(3,"Connect Your DealPOS account to an Authenticator Application"),t.qZA(),t.TgZ(4,"p"),t._uU(5,"Secure your login with One Time Password using an Authenticator Application!"),t.qZA()()(),t.TgZ(6,"div",7)(7,"div",8)(8,"ol",9)(9,"li",10)(10,"h5"),t._uU(11,"Download Authenticator application"),t.qZA(),t.TgZ(12,"div",11)(13,"a",12),t._UZ(14,"img",13),t._uU(15," Microsoft Authenticator "),t.qZA(),t.TgZ(16,"a",14),t._UZ(17,"img",15),t._uU(18," Google Authenticator "),t.qZA()()(),t.TgZ(19,"li",16)(20,"h5"),t._uU(21,"Scan the QR code below"),t.qZA(),t.TgZ(22,"div",5),t._UZ(23,"qrcode",17),t.qZA()(),t.TgZ(24,"li",16)(25,"h5"),t._uU(26,"Validate your QR Code"),t.qZA(),t.TgZ(27,"form",18),t.NdJ("submit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onValidate())}),t.TgZ(28,"div")(29,"input",19),t.NdJ("keypress",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.numberOnly(i))})("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.validation2FA.ValidationCode=i)}),t.qZA()(),t.TgZ(30,"div",5)(31,"button",20),t._uU(32,"Validate"),t.qZA()()()()()()()}if(2&n){const e=t.oxw();t.xp6(23),t.Q6J("qrdata",e.qrcodeContent)("width",256),t.xp6(6),t.Q6J("ngModel",e.validation2FA.ValidationCode)}}let ct=(()=>{class n{constructor(e,o,i,c){(0,a.Z)(this,"document",void 0),(0,a.Z)(this,"authenticatorService",void 0),(0,a.Z)(this,"toastrService",void 0),(0,a.Z)(this,"dialog",void 0),(0,a.Z)(this,"qrcodeContent",void 0),(0,a.Z)(this,"validation2FA",{SecretKey:null,ValidationCode:null,Enabled:!0}),(0,a.Z)(this,"destroy$",void 0),(0,a.Z)(this,"totpEnabled",void 0),this.document=e,this.authenticatorService=o,this.toastrService=i,this.dialog=c,this.destroy$=new q.x}ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){const e=this.getDomainName(),o=this.generateRandomSecret();this.validation2FA.SecretKey=o,this.qrcodeContent=`otpauth://totp/${e}?secret=${o}&issuer=dealpos`}generateRandomSecret(){const e=h.gT.Guid_NewGuid();return function N(n,r,e){let o,i;switch(e=e||{},r){case"RFC3548":case"RFC4648":o=C,i=!0;break;case"RFC4648-HEX":o=M,i=!0;break;case"Crockford":o=w,i=!1;break;default:throw new Error("Unknown base32 variant: "+r)}const c=void 0!==e.padding?e.padding:i,y=function m(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}(n);let D=0,A=0,I="";for(let O=0;O<y.byteLength;O++)for(A=A<<8|y.getUint8(O),D+=8;D>=5;)I+=o[A>>>D-5&31],D-=5;if(D>0&&(I+=o[A<<5-D&31]),c)for(;I.length%8!=0;)I+="=";return I}((new TextEncoder).encode(e),"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe((0,J.R)(this.destroy$)).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let e=!0;return h.gT.IsEmpty(this.validation2FA.ValidationCode)?(e=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(e=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),e}numberOnly(e){return h.gT.numberOnly(e)}onDisableTotp(){this.dialog.open(nt).afterClosed().pipe((0,F.h)(e=>h.gT.IsNotEmpty(e)),(0,et.w)(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(g.K0),t.Y36(T.g),t.Y36(Z._W),t.Y36(f.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},decls:4,vars:2,consts:[[1,"container-fluid","mt-6"],[4,"ngIf","ngIfElse"],["TOTP_ENABLED",""],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://res.cloudinary.com/pos/image/upload/v1666247461/POS/Images/Login/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://res.cloudinary.com/pos/image/upload/v1666247460/POS/Images/Login/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"qrdata","width"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","customInput","border","border-2","border-primary",3,"ngModel","keypress","ngModelChange"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,o){if(1&e&&(t.TgZ(0,"div",0),t.YNc(1,st,9,0,"ng-container",1),t.YNc(2,lt,33,3,"ng-template",null,2,t.W1O),t.qZA()),2&e){const i=t.MAs(3);t.xp6(1),t.Q6J("ngIf",o.totpEnabled)("ngIfElse",i)}},dependencies:[g.O5,l._Y,l.Fj,l.JJ,l.JL,l.On,l.F,at],styles:[".customInput[_ngcontent-%COMP%]{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px} qrcode.qr2fa>.qrcode>canvas{border:2px solid rgb(51,122,183);padding:2px}"]})),n})();function dt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",57),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.validate())}),t._uU(1,"Submit"),t.qZA()}if(2&n){t.oxw(2);const e=t.MAs(33);t.Q6J("disabled",null==e||null==e.form?null:e.form.invalid)}}function pt(n,r){if(1&n&&(t.ynx(0),t.YNc(1,dt,2,1,"button",56),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function ut(n,r){1&n&&(t.TgZ(0,"small",62),t._uU(1,"*Email is required"),t.qZA())}function mt(n,r){1&n&&(t.TgZ(0,"small",62),t._uU(1,"*Enter a valid email address"),t.qZA())}function _t(n,r){if(1&n&&(t.ynx(0),t.YNc(1,ut,2,0,"small",61),t.YNc(2,mt,2,0,"small",61),t.BQk()),2&n){t.oxw();const e=t.MAs(2);t.xp6(1),t.Q6J("ngIf",null==e.errors?null:e.errors.required),t.xp6(1),t.Q6J("ngIf",null==e.errors?null:e.errors.pattern)}}const B=function(n,r){return{border:n,"border-danger":r}};function gt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",20)(1,"input",58,59),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw(2);return t.KtG(c.formData.Email=i)}),t.qZA(),t.TgZ(3,"label",60),t._uU(4,"Email"),t.qZA(),t.YNc(5,_t,3,2,"ng-container",2),t.qZA()}if(2&n){const e=t.MAs(2),o=t.oxw(2);t.xp6(1),t.Tol(t.WLB(5,B,e.touched&&e.invalid,e.touched&&e.invalid)),t.Q6J("ngModel",o.formData.Email)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(4),t.Q6J("ngIf",e.touched)}}function ht(n,r){1&n&&(t.TgZ(0,"small",62),t._uU(1,"*Enter a valid email address"),t.qZA())}function ft(n,r){if(1&n&&(t.ynx(0),t.YNc(1,ht,2,0,"small",61),t.BQk()),2&n){t.oxw();const e=t.MAs(2);t.xp6(1),t.Q6J("ngIf",null==e.errors?null:e.errors.pattern)}}function Zt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",20)(1,"input",63,59),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw(2);return t.KtG(c.formData.Email=i)}),t.qZA(),t.TgZ(3,"label",60),t._uU(4,"Email"),t.qZA(),t.YNc(5,ft,2,1,"ng-container",2),t.qZA()}if(2&n){const e=t.MAs(2),o=t.oxw(2);t.xp6(1),t.Q6J("disabled",!(o.roleService.users.View||o.roleService.profile.View))("ngModel",o.formData.Email),t.xp6(4),t.Q6J("ngIf",e.touched)}}function bt(n,r){1&n&&(t.TgZ(0,"i",64),t._uU(1," required."),t.qZA())}function Tt(n,r){1&n&&(t.TgZ(0,"i",64),t._uU(1," These passwords don't match."),t.qZA())}function Ct(n,r){if(1&n&&(t.TgZ(0,"ul",65)(1,"li",66),t._uU(2),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e)}}function xt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Key),t.xp6(2),t.Oqu(e.Value)}}function vt(n,r){if(1&n&&(t.TgZ(0,"ul",65)(1,"li",66),t._uU(2),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e)}}function yt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.xp6(2),t.Oqu(o+1),t.xp6(2),t.Oqu(e.Key),t.xp6(2),t.Oqu(e.Value)}}const At=function(n){return{"border-top-0":n}};function St(n,r){if(1&n&&(t.TgZ(0,"div",70)(1,"div",71),t._uU(2),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.xp6(1),t.Tol(t.VKq(3,At,o/4>=1)),t.xp6(1),t.hij(" ",e.Model," ")}}function Mt(n,r){if(1&n&&(t.TgZ(0,"div",67)(1,"div",68),t._uU(2),t.qZA(),t.TgZ(3,"div",39)(4,"div",14),t.YNc(5,St,3,5,"div",69),t.qZA()()()),2&n){const e=r.$implicit;t.xp6(2),t.hij(" ",e.Name," "),t.xp6(3),t.Q6J("ngForOf",e.ListRole)}}function Dt(n,r){if(1&n&&(t.TgZ(0,"div",15)(1,"div",72),t._UZ(2,"input",73)(3,"label",74),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("value",e.formData.ClientSecret)}}function wt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",75),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.copyToClipboard())}),t._uU(1," Copy to Clipboard"),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function Ot(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",76),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.preview("Profile/GenerateClientSecret"))}),t._uU(1,"Generate"),t.qZA()}}const G=function(n){return{active:n}};function qt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,pt,2,1,"ng-container",2),t.qZA(),t.TgZ(3,"content")(4,"div",3)(5,"div")(6,"ul",4)(7,"li",5)(8,"a",6),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectTab("GENERAL"))}),t._uU(9,"General"),t.qZA()(),t.TgZ(10,"li",5)(11,"a",7),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectTab("SECURITY"))}),t._uU(12,"Security"),t.qZA()(),t.TgZ(13,"li",5)(14,"a",8),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectTab("ROLES"))}),t._uU(15,"Roles"),t.qZA()(),t.TgZ(16,"li",5)(17,"a",9),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectTab("API"))}),t._uU(18,"Developer API"),t.qZA()(),t.TgZ(19,"li",5)(20,"a",10),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onSelectTab("TOTP"))}),t._uU(21,"TOTP"),t.qZA()()(),t.TgZ(22,"div",11)(23,"div",12)(24,"div",13)(25,"div",14)(26,"div",15)(27,"div",16)(28,"div",17)(29,"h2"),t._uU(30,"General Credential"),t.qZA()(),t.TgZ(31,"div",18)(32,"form",null,19)(34,"div",20)(35,"input",21),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.FirstName=i)}),t.qZA(),t.TgZ(36,"label",22),t._uU(37,"First Name"),t.qZA()(),t.TgZ(38,"div",20)(39,"input",23),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.LastName=i)}),t.qZA(),t.TgZ(40,"label",24),t._uU(41,"Last Name"),t.qZA()(),t.TgZ(42,"div",20)(43,"input",25),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.LoginID=i)}),t.qZA(),t.TgZ(44,"label",26),t._uU(45,"Username"),t.qZA()(),t.YNc(46,gt,6,8,"div",27),t.YNc(47,Zt,6,3,"div",27),t.qZA()()()(),t.TgZ(48,"div",15)(49,"div",16)(50,"div",17)(51,"h2"),t._uU(52,"Change Password"),t.qZA(),t.TgZ(53,"small",28),t._uU(54,"Leave blank if you do not want to change"),t.qZA()(),t.TgZ(55,"div",18)(56,"div",20)(57,"input",29,30),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.NewPassword=i)}),t.qZA(),t.TgZ(59,"label",31),t._uU(60,"Password"),t.qZA(),t.YNc(61,bt,2,0,"i",32),t.qZA(),t.TgZ(62,"div",20)(63,"input",33),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.RePassword=i)}),t.qZA(),t.TgZ(64,"label",34),t._uU(65,"Re-Password"),t.qZA(),t.YNc(66,Tt,2,0,"i",32),t.qZA()()()()()()(),t.TgZ(67,"div",35)(68,"div",36)(69,"div",37)(70,"h5",38),t._uU(71,"Group"),t.qZA(),t.TgZ(72,"i"),t._uU(73,"Profile Groups"),t.qZA()(),t.TgZ(74,"div",39)(75,"div",14),t.YNc(76,Ct,3,1,"ul",40),t.qZA()()(),t.TgZ(77,"div",41)(78,"div",42)(79,"h5",38),t._uU(80,"Outlets"),t.qZA(),t.TgZ(81,"i"),t._uU(82,"Profile Outlets"),t.qZA()(),t.TgZ(83,"div",39)(84,"div",14)(85,"div")(86,"table",43)(87,"thead",44)(88,"tr")(89,"th"),t._uU(90,"No"),t.qZA(),t.TgZ(91,"th"),t._uU(92,"Outlet"),t.qZA(),t.TgZ(93,"th"),t._uU(94,"Access"),t.qZA()()(),t.TgZ(95,"tbody"),t.YNc(96,xt,7,3,"tr",45),t.qZA()()()()()()(),t.TgZ(97,"div",46)(98,"div",36)(99,"div",37)(100,"h5",38),t._uU(101,"Group"),t.qZA(),t.TgZ(102,"i"),t._uU(103,"Profile Groups"),t.qZA()(),t.TgZ(104,"div",39)(105,"div",14),t.YNc(106,vt,3,1,"ul",40),t.qZA()()(),t.TgZ(107,"div",41)(108,"div",42)(109,"h5",38),t._uU(110,"Outlets"),t.qZA(),t.TgZ(111,"i"),t._uU(112,"Profile Outlets"),t.qZA()(),t.TgZ(113,"div",39)(114,"div",14)(115,"div")(116,"table",43)(117,"thead",44)(118,"tr")(119,"th"),t._uU(120,"No"),t.qZA(),t.TgZ(121,"th"),t._uU(122,"Outlet"),t.qZA(),t.TgZ(123,"th"),t._uU(124,"Access"),t.qZA()()(),t.TgZ(125,"tbody"),t.YNc(126,yt,7,3,"tr",45),t.qZA()()()()()()(),t.TgZ(127,"div",47),t.YNc(128,Mt,6,2,"div",48),t.qZA(),t.TgZ(129,"div",49)(130,"h3"),t._uU(131,"API Client Secret "),t.TgZ(132,"small",28),t._uU(133,"(developer.dealpos.com)"),t.qZA()(),t.TgZ(134,"div",50),t.YNc(135,Dt,4,1,"div",51),t.TgZ(136,"div",15)(137,"div",20),t.YNc(138,wt,2,2,"button",52),t.YNc(139,Ot,2,0,"a",53),t.qZA()()()(),t.TgZ(140,"div",54),t._UZ(141,"POS-setup-2FA",55),t.qZA()()()()()()}if(2&n){const e=t.MAs(58),o=t.oxw();t.Q6J("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf","GENERAL"==o.activeTab),t.xp6(6),t.Q6J("ngClass",t.VKq(34,G,"GENERAL"==o.activeTab)),t.xp6(3),t.Q6J("ngClass",t.VKq(36,G,"SECURITY"==o.activeTab)),t.xp6(12),t.Q6J("ngClass",t.VKq(38,G,"GENERAL"==o.activeTab)),t.xp6(12),t.Q6J("ngModel",o.formData.FirstName)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(4),t.Q6J("ngModel",o.formData.LastName)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(4),t.Q6J("ngModel",o.formData.LoginID)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(3),t.Q6J("ngIf",o.data.EmailRequired),t.xp6(1),t.Q6J("ngIf",!o.data.EmailRequired),t.xp6(9),t.Tol(t.WLB(40,B,e.touched&&e.invalid,e.touched&&e.invalid)),t.xp6(1),t.Q6J("ngModel",o.formData.NewPassword)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(4),t.Q6J("ngIf",e.touched&&e.invalid),t.xp6(1),t.Tol(t.WLB(43,B,o.formData.NewPassword!=o.formData.RePassword,o.formData.NewPassword!=o.formData.RePassword)),t.xp6(1),t.Q6J("ngModel",o.formData.RePassword)("disabled",!(o.roleService.users.View||o.roleService.profile.View)),t.xp6(3),t.Q6J("ngIf",o.formData.NewPassword!=o.formData.RePassword),t.xp6(10),t.Q6J("ngForOf",o.data.Security.Groups),t.xp6(20),t.Q6J("ngForOf",o.data.Security.Outlets),t.xp6(10),t.Q6J("ngForOf",o.data.Security.Groups),t.xp6(20),t.Q6J("ngForOf",o.data.Security.Outlets),t.xp6(2),t.Q6J("ngForOf",o.data.Role),t.xp6(7),t.Q6J("ngIf",o.formData.ClientSecret),t.xp6(3),t.Q6J("ngIf",o.formData.ClientSecret),t.xp6(1),t.Q6J("ngIf",o.roleService.users.View||o.roleService.profile.View),t.xp6(2),t.Q6J("totpEnabled",o.totpEnabled)}}let Ut=(()=>{class n extends P.U{constructor(e,o,i,c,y,D,A){super(e,o,"Profile/MyProfileFormInitial",i),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"dialog",void 0),(0,a.Z)(this,"authenticatorService",void 0),(0,a.Z)(this,"roleService",void 0),(0,a.Z)(this,"tooltipText","Copy to Clipboard"),(0,a.Z)(this,"totpEnabled",void 0),(0,a.Z)(this,"activeTab","GENERAL"),this.toastr=c,this.dialog=y,this.authenticatorService=D,this.roleService=A}postBindForm(e){this.totpEnabled=e?.Form?.TOTPEnabled}validate(){this.formData.NewPassword==this.formData.RePassword?this.onSubmit("Profile/SubmitProfile"):this.toastr.error("Password and re-enter password must be equal.",v.n.Error)}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",v.n.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:o=>{this.data.Form=o},error:o=>{this.toastr.error(o,v.n.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.X),t.Y36(x.O),t.Y36(S.gz),t.Y36(Z._W),t.Y36(f.uw),t.Y36(T.g),t.Y36(p.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-my-profile"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-5"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item","cursor"],["id","general-tab","data-bs-toggle","tab","href","#general","role","tab","aria-controls","general","aria-selected","false",1,"nav-link","active",3,"ngClass","click"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"ngClass","click"],["id","roles-tab","data-bs-toggle","tab","href","#roles","role","tab","aria-controls","contact","aria-selected","false",1,"nav-link",3,"click"],["id","developerApi-tab","data-bs-toggle","tab","href","#developerApi","role","tab","aria-controls","developerApi","aria-selected","false",1,"nav-link",3,"click"],["id","setupAuth-tab","data-bs-toggle","tab","href","#setupAuth","role","tab","aria-controls","setupAuth","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","general","role","tab",1,"tab-pane","fade","show","active","mt-0","pt-8","border","border-top-0",3,"ngClass"],[1,"container"],[1,"row"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],["validation","ngForm"],[1,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","inputName"],["class","form-floating-outline",4,"ngIf"],[1,"text-body-secondary","h6"],["type","password","id","inputPassword","name","password","placeholder","Password","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["password","ngModel"],["for","inputPassword"],["class","control-label text-danger",4,"ngIf"],["type","password","id","inputrepassword","placeholder","Re-Password","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","inputRepassword"],["id","security","role","tab",1,"tab-pane","fade","show","border","border-top-0","mt-0"],[1,"border-bottom","row","pt-8","ms-3","me-3"],[1,"col-sm-2","mt-3"],[1,"fw-bold"],[1,"col-sm-10"],["class","mb-4",4,"ngFor","ngForOf"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],[4,"ngFor","ngForOf"],["id","security","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["id","roles","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["class","row pt-8 ms-3 me-3",4,"ngFor","ngForOf"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],[1,"row","mt-5","d-flex","align-items-center"],["class","col-sm-6",4,"ngIf"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken","class","btn btn-secondary btn-sm me-5",3,"matTooltip","cdkCopyToClipboard","click",4,"ngIf"],["class","btn btn-success btn-sm","role","button",3,"click",4,"ngIf"],["id","setupAuth","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[3,"totpEnabled"],["matTooltipPosition","above","matTooltip","Save","class","btn btn-success","role","button",3,"disabled","click",4,"ngIf"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"disabled","click"],["type","text","id","email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["email","ngModel"],["for","email"],["class","text-danger",4,"ngIf"],[1,"text-danger"],["id","email","type","Email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$",1,"form-control",3,"disabled","ngModel","ngModelChange"],[1,"control-label","text-danger"],[1,"mb-4"],[2,"list-style","circle"],[1,"row","pt-8","ms-3","me-3"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],["class","col-md-3 px-0",4,"ngFor","ngForOf"],[1,"col-md-3","px-0"],[1,"p-3","border"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],["for","api-client"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"matTooltip","cdkCopyToClipboard","click"],["role","button",1,"btn","btn-success","btn-sm",3,"click"]],template:function(e,o){1&e&&t.YNc(0,qt,142,46,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.formData)},dependencies:[g.mk,g.sg,g.O5,l._Y,l.Fj,l.JJ,l.JL,l.Q7,l.c5,l.On,l.F,s.p,d.gM,u.i3,ct]})),n})();var W=_(4077),K=_(98085),Y=_(88796),$=_(3077),z=_(58393),L=_(93669);function Pt(n,r){1&n&&(t.TgZ(0,"th",22),t._uU(1," @@ Cost "),t.qZA())}function Nt(n,r){if(1&n&&(t.TgZ(0,"span",39),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(" - Profit: "+t.lcZ(2,1,e.Profit))}}function It(n,r){if(1&n&&(t.TgZ(0,"small"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2).$implicit;t.xp6(1),t.hij("( ",e.Commissions[0].Quantity," unit )")}}function Jt(n,r){if(1&n&&(t.TgZ(0,"i",52),t._uU(1),t.YNc(2,It,2,1,"small",53),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("sold by ",e.Commissions[0].SalesName," "),t.xp6(1),t.Q6J("ngIf",e.Commissions[0].Quantity<e.Quantity)}}function Ft(n,r){if(1&n&&(t.TgZ(0,"li")(1,"i"),t._uU(2),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.hij("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Et(n,r){if(1&n&&(t.TgZ(0,"ul",54)(1,"li")(2,"i"),t._uU(3,"sold by"),t.qZA()(),t.YNc(4,Ft,3,1,"li",19),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(4),t.Q6J("ngForOf",e.Commissions)}}function Lt(n,r){if(1&n&&(t.TgZ(0,"th",55),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.UnitCost))}}function Qt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"th",40)(2,"div")(3,"span",41),t._uU(4),t.qZA(),t.YNc(5,Jt,3,2,"i",42),t.YNc(6,Et,5,1,"ul",43),t._UZ(7,"span",44),t.ALo(8,"newlines"),t.qZA()(),t.TgZ(9,"th",45),t._uU(10),t.qZA(),t.TgZ(11,"th",46),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"th",47),t._uU(15),t.qZA(),t.YNc(16,Lt,3,3,"th",48),t.TgZ(17,"th",49),t._uU(18),t.ALo(19,"number"),t.qZA(),t.TgZ(20,"th",50),t._uU(21),t.qZA(),t.TgZ(22,"th",51),t._uU(23),t.ALo(24,"number"),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(3);t.xp6(4),t.Oqu(e.Name),t.xp6(1),t.Q6J("ngIf",1==e.Commissions.length),t.xp6(1),t.Q6J("ngIf",e.Commissions.length>1),t.xp6(1),t.Q6J("innerHTML",t.lcZ(8,11,e.Note),t.oJD),t.xp6(3),t.Oqu(e.Code),t.xp6(2),t.Oqu(t.lcZ(13,13,e.Quantity)),t.xp6(3),t.Oqu(e.UOMName),t.xp6(1),t.Q6J("ngIf",o.roleService.product.Cost),t.xp6(2),t.Oqu(t.lcZ(19,15,e.UnitPrice)),t.xp6(3),t.Oqu(0==e.Discount?"":e.Discount+"%"),t.xp6(2),t.Oqu(t.lcZ(24,17,e.Total))}}function kt(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"th",56),t._uU(2,"\xa0"),t.qZA(),t._UZ(3,"th",57)(4,"th",58)(5,"th",59)(6,"th",16),t.TgZ(7,"th",60),t._uU(8),t.qZA(),t.TgZ(9,"th",61),t._uU(10),t.qZA(),t.TgZ(11,"th",62),t._uU(12),t.ALo(13,"number"),t.qZA()()),2&n){const e=r.$implicit;t.xp6(8),t.hij("",e.Label," :"),t.xp6(2),t.Oqu(e.CurrencySymbol),t.xp6(2),t.Oqu(t.lcZ(13,3,e.Amount))}}const Rt=function(){return["/menu/Orders/Orders/Customer_Invoice/Info"]},Yt=function(n){return{ID:n}};function Ht(n,r){if(1&n&&(t.TgZ(0,"div")(1,"div",23)(2,"div",24)(3,"a",25),t._UZ(4,"span",26),t.ALo(5,"date"),t._UZ(6,"small",27),t.ALo(7,"date"),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.ALo(10,"showIfNotNullOrEmptyString"),t.qZA(),t._UZ(11,"span",28),t.TgZ(12,"strong",29),t._uU(13),t.ALo(14,"sum"),t.ALo(15,"number"),t.TgZ(16,"span"),t._uU(17),t.ALo(18,"showIfNotNullOrEmptyString"),t.qZA()(),t.YNc(19,Nt,3,3,"span",30),t.TgZ(20,"i",31),t._uU(21),t.qZA(),t.TgZ(22,"span",32),t._uU(23),t.qZA(),t.TgZ(24,"span",33),t._uU(25),t.qZA()(),t.TgZ(26,"div",34),t._UZ(27,"label",35),t.qZA()(),t.TgZ(28,"table",36),t._UZ(29,"thead"),t.TgZ(30,"tbody",37),t.YNc(31,Qt,25,19,"tr",19),t.qZA()(),t.TgZ(32,"table",38),t.YNc(33,kt,14,5,"tr",19),t.qZA()()),2&n){const e=r.$implicit,o=t.oxw(2);t.xp6(3),t.Q6J("routerLink",t.DdM(31,Rt))("queryParams",t.VKq(32,Yt,e.ID)),t.xp6(1),t.Q6J("innerHTML",e.EntityName+" #"+e.Number+" - "+t.xi3(5,14,e.Date,"dd MMM yyyy"),t.oJD),t.xp6(2),t.Q6J("innerHTML","("+t.xi3(7,17,e.Created,"HH:mm")+")",t.oJD),t.xp6(3),t.Oqu(t.xi3(10,20,e.CustomerNameDisplay," - {0}")),t.xp6(4),t.hij(" ","[Q: "+t.xi3(14,23,e.Items,"Quantity")+", T: "+t.lcZ(15,26,e.Final)+"]"," "),t.xp6(4),t.Oqu(t.xi3(18,28,e.SalesName," - Sales: {0}")),t.xp6(2),t.Q6J("ngIf",o.roleService.report.Profit),t.xp6(2),t.Oqu(null==e.DeliveryOutlet?"":": Delivered from "+e.DeliveryOutlet),t.xp6(2),t.Oqu(null==e.AuthorizationKey?"":": "+e.AuthorizationKey),t.xp6(2),t.Oqu(null==e.SONote?"":": "+e.SONote),t.xp6(2),t.Q6J("innerHTML",e.PaymentStateLabel,t.oJD),t.xp6(4),t.Q6J("ngForOf",e.Items),t.xp6(2),t.Q6J("ngForOf",e.Aggregate)}}function Vt(n,r){if(1&n&&(t.TgZ(0,"div")(1,"strong"),t._uU(2,"Cost ("),t._UZ(3,"span",67),t.ALo(4,"number"),t._uU(5,"%)"),t.qZA(),t._UZ(6,"span",65),t.ALo(7,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(3),t.Q6J("innerHTML",t.lcZ(4,2,e.data.Aggregate.CostRatio),t.oJD),t.xp6(3),t.Q6J("innerHTML",t.lcZ(7,4,e.data.Aggregate.Cost),t.oJD)}}function Bt(n,r){if(1&n&&(t.TgZ(0,"div")(1,"strong")(2,"span"),t._uU(3,"Profit"),t.qZA(),t._uU(4," ("),t._UZ(5,"span",67),t.ALo(6,"number"),t._uU(7,"%)"),t.qZA(),t._UZ(8,"span",65),t.ALo(9,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(5),t.Q6J("innerHTML",t.lcZ(6,2,e.data.Aggregate.ProfitRatio),t.oJD),t.xp6(3),t.Q6J("innerHTML",t.lcZ(9,4,e.data.Aggregate.Profit),t.oJD)}}function Gt(n,r){if(1&n&&(t.TgZ(0,"div",63)(1,"div",64)(2,"div")(3,"strong"),t._uU(4,"Tax Added"),t.qZA(),t._UZ(5,"span",65),t.ALo(6,"number"),t.qZA(),t.TgZ(7,"div")(8,"strong"),t._uU(9,"Sales with Tax"),t.qZA(),t._UZ(10,"span",65),t.ALo(11,"number"),t.qZA()(),t.TgZ(12,"div",66)(13,"div")(14,"strong"),t._uU(15,"Orders"),t.qZA(),t._UZ(16,"span",65),t.ALo(17,"number"),t.qZA(),t.TgZ(18,"div")(19,"strong"),t._uU(20,"Qty"),t.qZA(),t._UZ(21,"span",65),t.ALo(22,"number"),t.qZA()(),t.TgZ(23,"div",66)(24,"div")(25,"strong"),t._uU(26,"Gross Sales"),t.qZA(),t._UZ(27,"span",65),t.ALo(28,"number"),t.qZA(),t.TgZ(29,"div")(30,"strong"),t._uU(31,"Discount"),t.qZA(),t._UZ(32,"span",65),t.ALo(33,"number"),t.qZA(),t.TgZ(34,"div")(35,"strong"),t._uU(36,"Tax Incl."),t.qZA(),t._UZ(37,"span",65),t.ALo(38,"number"),t.qZA(),t.TgZ(39,"div")(40,"strong"),t._uU(41,"Net Sales"),t.qZA(),t._UZ(42,"span",65),t.ALo(43,"number"),t.qZA(),t.YNc(44,Vt,8,6,"div",53),t.YNc(45,Bt,10,6,"div",53),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(5),t.Q6J("innerHTML",t.lcZ(6,10,e.data.Aggregate.TaxAdd),t.oJD),t.xp6(5),t.Q6J("innerHTML",t.lcZ(11,12,e.data.Aggregate.SalesWithTax),t.oJD),t.xp6(6),t.Q6J("innerHTML",t.lcZ(17,14,e.data.Aggregate.Orders),t.oJD),t.xp6(5),t.Q6J("innerHTML",t.lcZ(22,16,e.data.Aggregate.ItemsQuantity),t.oJD),t.xp6(6),t.Q6J("innerHTML",t.lcZ(28,18,e.data.Aggregate.GrossItems),t.oJD),t.xp6(5),t.Q6J("innerHTML",t.lcZ(33,20,e.data.Aggregate.Discount),t.oJD),t.xp6(5),t.Q6J("innerHTML",t.lcZ(38,22,e.data.Aggregate.TaxInclude),t.oJD),t.xp6(5),t.Q6J("innerHTML",t.lcZ(43,24,e.data.Aggregate.SalesWithoutTax),t.oJD),t.xp6(2),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(1),t.Q6J("ngIf",e.roleService.report.Profit)}}function Kt(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),t._uU(6,"Type"),t.qZA(),t.TgZ(7,"ng-select",4),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.TypeID=i)}),t.qZA()(),t.TgZ(8,"div")(9,"h6"),t._uU(10,"Customer"),t.qZA(),t.TgZ(11,"autocompleteV2",5),t.NdJ("onInputChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.resetCustomer(i))})("onSelect",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.onSelectCustomer(i))}),t.qZA()(),t.TgZ(12,"div")(13,"h6"),t._uU(14,"From"),t.qZA(),t.TgZ(15,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(16,"div")(17,"h6"),t._uU(18,"To"),t.qZA(),t.TgZ(19,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.To=i)}),t.qZA()()()()(),t.TgZ(20,"content")(21,"div",8)(22,"table",9)(23,"thead",10)(24,"tr")(25,"th",11),t._uU(26," Name "),t.qZA(),t.TgZ(27,"th",12),t._uU(28," Code "),t.qZA(),t.TgZ(29,"th",13),t._uU(30," Qty "),t.qZA(),t.TgZ(31,"th",14),t._uU(32," UOM "),t.qZA(),t.YNc(33,Pt,2,0,"th",15),t.TgZ(34,"th",16),t._uU(35," @@ Price "),t.qZA(),t.TgZ(36,"th",17),t._uU(37," % "),t.qZA(),t.TgZ(38,"th",18),t._uU(39," Total "),t.qZA()()()(),t.YNc(40,Ht,34,34,"div",19),t.YNc(41,Gt,46,26,"div",20),t.TgZ(42,"POS-complex-pagination",21),t.NdJ("jumpToPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("previousPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())})("nextPage",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.getListData())}),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(7),t.Q6J("items",e.pageData.Options.Types)("ngModel",e.pageData.Filter.TypeID),t.xp6(8),t.Q6J("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("date",e.pageData.Filter.To),t.xp6(14),t.Q6J("ngIf",e.roleService.product.Cost),t.xp6(7),t.Q6J("ngForOf",e.data.Data),t.xp6(1),t.Q6J("ngIf",e.data.Data&&e.data.Data.length>0),t.xp6(1),t.Q6J("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}let jt=(()=>{class n extends W.n{constructor(e,o,i){super(e,o,"Report/MySales","ReportLoader/MyActivity"),(0,a.Z)(this,"roleService",void 0),this.roleService=i}onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){""==e&&(this.pageData.Filter.CustomerID=null)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.X),t.Y36(x.O),t.Y36(p.N))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-my-sales"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"items","ngModel","ngModelChange"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost","class","text-end","style","width: 80px",4,"ngIf"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[4,"ngFor","ngForOf"],["class","clearfix mb-5 mt-5",4,"ngIf"],["api","Report/ReportDetailCount",3,"total","pageData","jumpToPage","previousPage","nextPage"],["id","thCost",1,"text-end",2,"width","80px"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],["class","fw-bold",4,"ngIf"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"table","table-sm","table-borderless","d-flex","justify-content-end","mt-3"],[1,"fw-bold"],[2,"width","726px"],[1,"fw-normal"],["class","text-warning inlineMarginLeft",4,"ngIf"],["class","list-inline text-warning inlineMarginLeft",4,"ngIf"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],["class","fw-normal text-end","style","width: 80px",4,"ngIf"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-warning","inlineMarginLeft"],[4,"ngIf"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"fw-normal","text-end",2,"width","80px"],[2,"width","645px"],[2,"width","75px"],[2,"width","30px"],[2,"width","40px"],[1,"text-end",2,"width","130px"],[1,"fw-normal","text-end",2,"width","20px"],[1,"fw-normal","text-end","pe3",2,"width","60px"],[1,"clearfix","mb-5","mt-5"],[1,"zebra",2,"float","right"],[1,"text-end",3,"innerHTML"],[1,"zebra",2,"float","right","margin-right","20px"],[1,"Percentage",3,"innerHTML"]],template:function(e,o){1&e&&t.YNc(0,Kt,43,11,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[g.sg,g.O5,l.JJ,l.On,S.rH,s.p,K.QB,Y.w9,$.v,z.J,g.JJ,g.uU,L.qU,L.sH,L.WV]})),n})();function Wt(n,r){1&n&&(t.TgZ(0,"small",17),t._uU(1,"*Enter a valid phone number"),t.qZA())}function $t(n,r){if(1&n&&(t.ynx(0),t.YNc(1,Wt,2,0,"small",16),t.BQk()),2&n){t.oxw();const e=t.MAs(9);t.xp6(1),t.Q6J("ngIf",null==e.errors?null:e.errors.pattern)}}function zt(n,r){1&n&&(t.TgZ(0,"small",17),t._uU(1,"*Enter a valid email address"),t.qZA())}function Xt(n,r){if(1&n&&(t.ynx(0),t.YNc(1,zt,2,0,"small",16),t.BQk()),2&n){t.oxw();const e=t.MAs(16);t.xp6(1),t.Q6J("ngIf",null==e.errors?null:e.errors.pattern)}}let te=(()=>{class n{constructor(e,o,i,c,y){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"config",new k.O),this.httpService=e,this.dialogRef=o,this.data=i,this.toastr=c,this.router=y,this.config.title="Subscribe",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}onOk(e){if("Enter"!==e){if(0==this.data.form.Qty)return this.toastr.error("The number of outlets can't be empty",v.n.Error),void this.dialogRef.close();this.httpService.post("/API/Subscription/SendSubscription",JSON.stringify(this.data.form)).subscribe(o=>{this.toastr.success(o,v.n.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(x.O),t.Y36(f.so),t.Y36(f.WI),t.Y36(Z._W),t.Y36(S.F0))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-subscribe"]],decls:26,vars:7,consts:[[3,"dynamicValidated","config","onOk","onCancel","onClose"],[1,"container"],["validation","ngForm"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModel","ngModelChange"],["phoneCtrl","ngModel"],["for","inputPhone"],[4,"ngIf"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModel","ngModelChange"],["emailCtrl","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModel","ngModelChange"],["for","inputNote"],["class","text-danger",4,"ngIf"],[1,"text-danger"]],template:function(e,o){if(1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(c){return o.onOk(c)})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"form",null,2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"input",6,7),t.NdJ("ngModelChange",function(c){return o.data.form.Phone=c}),t.qZA(),t.TgZ(10,"label",8),t._uU(11,"Phone*"),t.qZA(),t.YNc(12,$t,2,1,"ng-container",9),t.qZA()(),t.TgZ(13,"div",4)(14,"div",5)(15,"input",10,11),t.NdJ("ngModelChange",function(c){return o.data.form.Email=c}),t.qZA(),t.TgZ(17,"label",12),t._uU(18,"Email*"),t.qZA(),t.YNc(19,Xt,2,1,"ng-container",9),t.qZA()()(),t.TgZ(20,"div",3)(21,"div",13)(22,"div",5)(23,"textarea",14),t.NdJ("ngModelChange",function(c){return o.data.form.Note=c}),t.qZA(),t.TgZ(24,"label",15),t._uU(25,"Note"),t.qZA()()()()()()()()),2&e){const i=t.MAs(9),c=t.MAs(16);t.Q6J("dynamicValidated",(null==i?null:i.valid)||(null==c?null:c.valid))("config",o.config),t.xp6(8),t.Q6J("ngModel",o.data.form.Phone),t.xp6(4),t.Q6J("ngIf",i.touched&&i.dirty),t.xp6(3),t.Q6J("ngModel",o.data.form.Email),t.xp6(4),t.Q6J("ngIf",c.touched&&c.dirty),t.xp6(4),t.Q6J("ngModel",o.data.form.Note)}},dependencies:[g.O5,l._Y,l.Fj,l.JJ,l.JL,l.Q7,l.c5,l.On,l.F,E.M,d.gM]})),n})();var ee=_(83902),X=_(11594);function ne(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",24),t.NdJ("click",function(){const c=t.CHM(e).$implicit,y=t.oxw(2);return t.KtG(y.onCycleChange(c.key))}),t.TgZ(1,"div",25)(2,"span",26),t._uU(3),t.qZA(),t._UZ(4,"div",27),t.qZA()()}if(2&n){const e=r.$implicit,o=t.oxw(2);t.Tol(e.key==o.formData.Cycle?"active":""),t.xp6(3),t.Oqu(e.dicount),t.xp6(1),t.Q6J("innerHTML",e.desc,t.oJD)}}function oe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"tr")(1,"th",28),t._uU(2,"Register"),t.qZA(),t.TgZ(3,"td"),t._uU(4,":"),t.qZA(),t.TgZ(5,"td")(6,"input",29),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw(2);return t.KtG(c.formData.Register=i)})("ngModelChange",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onQtyRegisterChange())}),t.qZA(),t.TgZ(7,"span"),t._uU(8),t.ALo(9,"number"),t.qZA()()()}if(2&n){const e=t.oxw(2);t.xp6(6),t.Q6J("preventNegative",!0)("ngModel",e.formData.Register),t.xp6(2),t.hij("/ ",t.lcZ(9,3,e.data.Options.Register),"")}}function ie(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",30)(2,"div",9)(3,"h2",10),t._uU(4,"Setup Fee "),t.qZA(),t.TgZ(5,"small",11),t._uU(6,"(One-time payment)"),t.qZA()()(),t.TgZ(7,"div",31)(8,"table",32)(9,"tr")(10,"th"),t._uU(11,"POS"),t.qZA(),t.TgZ(12,"td"),t._uU(13,"\xa0:"),t.qZA(),t.TgZ(14,"td")(15,"label",33)(16,"radio-options",34),t.NdJ("modelChange",function(i){t.CHM(e);const c=t.oxw(2);return t.KtG(c.data.Options.SetupFee=i)})("modelChange",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.calculateSetupFee())}),t.qZA()()()()()()()}if(2&n){const e=t.oxw(2);t.xp6(16),t.Q6J("model",e.data.Options.SetupFee)}}function ae(n,r){1&n&&(t.ynx(0),t._uU(1,"s "),t.BQk())}function re(n,r){1&n&&(t.ynx(0),t._uU(1,"s"),t.BQk())}function se(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"strong"),t._uU(3,"Additional Register"),t.qZA(),t.TgZ(4,"p")(5,"small",41),t._uU(6),t.YNc(7,re,2,0,"ng-container",18),t.qZA()()(),t.TgZ(8,"td",37),t._uU(9),t.qZA(),t.TgZ(10,"td",38),t._UZ(11,"span",40),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"td",39),t._uU(15),t.qZA(),t.TgZ(16,"td",38),t._UZ(17,"span",40),t._uU(18),t.ALo(19,"number"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(6),t.hij("",e.formData.Register," Register "),t.xp6(1),t.Q6J("ngIf",e.formData.Register>1),t.xp6(2),t.Oqu(e.formData.Cycle),t.xp6(2),t.Q6J("innerHTML",e.data.Options.Setup?"IDR ":"$ ",t.oJD),t.xp6(1),t.Oqu(t.lcZ(13,8,e.data.Options.Register)),t.xp6(3),t.hij(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),t.xp6(2),t.Q6J("innerHTML",e.data.Options.Setup?"IDR ":"$ ",t.oJD),t.xp6(1),t.Oqu(t.lcZ(19,10,e.registerFee))}}function le(n,r){if(1&n&&(t.TgZ(0,"tr")(1,"td")(2,"strong")(3,"span"),t._uU(4,"POS"),t.qZA()(),t.TgZ(5,"p")(6,"small",41),t._uU(7," - Consultation "),t._UZ(8,"br"),t._uU(9," - Training 2x "),t._UZ(10,"br"),t._uU(11," - 1 Month Support Group"),t.qZA()()(),t._UZ(12,"td",37),t.TgZ(13,"td",38)(14,"span"),t._uU(15,"IDR "),t.qZA(),t._uU(16),t.ALo(17,"number"),t.qZA(),t._UZ(18,"td",39),t.TgZ(19,"td",38)(20,"span"),t._uU(21,"IDR "),t.qZA(),t._uU(22),t.ALo(23,"number"),t.qZA()()),2&n){const e=t.oxw(4);t.xp6(16),t.Oqu(t.lcZ(17,2,e.formData.Setup)),t.xp6(6),t.Oqu(t.lcZ(23,4,e.formData.Setup))}}function ce(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"strong"),t._UZ(4,"span",40),t.qZA(),t.TgZ(5,"p")(6,"small",41),t._uU(7),t.YNc(8,ae,2,0,"ng-container",18),t.qZA()()(),t.TgZ(9,"td",37),t._uU(10),t.qZA(),t.TgZ(11,"td",38),t._UZ(12,"span",40),t._uU(13),t.ALo(14,"number"),t.qZA(),t.TgZ(15,"td",39),t._uU(16),t.qZA(),t.TgZ(17,"td",38),t._UZ(18,"span",40),t._uU(19),t.ALo(20,"number"),t.qZA()(),t.YNc(21,se,20,12,"tr",18),t.YNc(22,le,24,6,"tr",18),t.BQk()),2&n){const e=t.oxw(3);t.xp6(4),t.Q6J("innerHTML",1==e.formData.Type?"Starter Subscription":"Standard Subscription",t.oJD),t.xp6(3),t.hij(" ",e.formData.Qty," Outlet"),t.xp6(1),t.Q6J("ngIf",e.formData.Qty>1),t.xp6(2),t.Oqu(e.formData.Cycle),t.xp6(2),t.Q6J("innerHTML",e.data.Options.Setup?"IDR ":"$ ",t.oJD),t.xp6(1),t.Oqu(t.lcZ(14,11,e.data.Options.Type)),t.xp6(3),t.hij(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),t.xp6(2),t.Q6J("innerHTML",e.data.Options.Setup?"IDR ":"$ ",t.oJD),t.xp6(1),t.Oqu(t.lcZ(20,13,e.outletFee)),t.xp6(2),t.Q6J("ngIf",e.formData.Register>0),t.xp6(1),t.Q6J("ngIf",e.data.Options.SetupFee)}}function de(n,r){if(1&n&&(t.ynx(0),t.TgZ(1,"div",42)(2,"table",43)(3,"tr")(4,"th"),t._uU(5,"Sub Total"),t.qZA(),t.TgZ(6,"td",44),t._uU(7,":"),t.qZA(),t.TgZ(8,"td",38)(9,"strong"),t._UZ(10,"span",40),t._uU(11),t.ALo(12,"number"),t.qZA()()()()(),t.BQk()),2&n){const e=t.oxw(3);t.xp6(10),t.Q6J("innerHTML",e.data.Options.Setup?"IDR ":"$ ",t.oJD),t.xp6(1),t.Oqu(t.lcZ(12,2,e.subTotal))}}function pe(n,r){if(1&n&&(t.TgZ(0,"div",31)(1,"table",35)(2,"thead",36)(3,"tr")(4,"th"),t._uU(5,"Product"),t.qZA(),t.TgZ(6,"th",37),t._uU(7,"Month"),t.qZA(),t.TgZ(8,"th",38),t._uU(9,"Price"),t.qZA(),t.TgZ(10,"th",39),t._uU(11,"Disc"),t.qZA(),t.TgZ(12,"th",38),t._uU(13,"Total"),t.qZA()()(),t.TgZ(14,"tbody"),t.YNc(15,ce,23,15,"ng-container",18),t.qZA()(),t.YNc(16,de,13,4,"ng-container",18),t.qZA()),2&n){const e=t.oxw(2);t.xp6(15),t.Q6J("ngIf",(null==e.formData?null:e.formData.Qty)>0),t.xp6(1),t.Q6J("ngIf",(null==e.formData?null:e.formData.Qty)>0)}}function ue(n,r){1&n&&(t.TgZ(0,"div",7)(1,"div",30)(2,"h2"),t._uU(3,'Your payment currency is "IDR"'),t.qZA()(),t.TgZ(4,"div",31)(5,"div",45)(6,"div",46)(7,"h2",47)(8,"button",48),t._uU(9," I Want to pay in USD "),t.qZA()(),t.TgZ(10,"div",49)(11,"div",50)(12,"ol",51)(13,"li",52),t._uU(14," Go to setup menu"),t.qZA(),t.TgZ(15,"li",52),t._uU(16," Click tab currency"),t.qZA(),t.TgZ(17,"li",52),t._uU(18," Select the currency you want to make for payment"),t.qZA(),t.TgZ(19,"li",52),t._uU(20," Select Yes at primary currency box and click save"),t.qZA(),t.TgZ(21,"li",53),t._uU(22," Then you can check to my subscribe again "),t.qZA()(),t.TgZ(23,"p",54),t._uU(24,"For more detailed information, please check the following article: "),t.TgZ(25,"a",55),t._uU(26,"Added Currency Conversion"),t.qZA()()()()()()()())}const me=function(){return["/menu/Profile/Main/My_Subscription"]};function _e(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),t._uU(3,"Subscribe Later"),t.qZA(),t.TgZ(4,"button",3),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onOpenSubscribeDialog())}),t._uU(5,"Subscribe Now"),t.qZA()(),t.TgZ(6,"content")(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"div",9)(13,"h2",10),t._uU(14,"Subscribe "),t.qZA(),t.TgZ(15,"small",11),t._uU(16,"(Recurring)"),t.qZA()(),t.TgZ(17,"a",12),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.showRegister=!i.showRegister)}),t._uU(18,"More"),t.qZA()(),t.TgZ(19,"div",13)(20,"table",14)(21,"tr")(22,"th"),t._uU(23,"Outlets"),t.qZA(),t.TgZ(24,"td"),t._uU(25,":"),t.qZA(),t.TgZ(26,"td")(27,"input",15,16),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.formData.Qty=i)})("ngModelChange",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onQtyOutletChange())}),t.qZA(),t.TgZ(29,"span"),t._uU(30),t.ALo(31,"number"),t.qZA()()(),t.TgZ(32,"tr")(33,"th"),t._uU(34,"Cycle"),t.qZA(),t.TgZ(35,"td"),t._uU(36,":"),t.qZA(),t.TgZ(37,"td"),t.YNc(38,ne,5,4,"div",17),t.qZA()(),t.YNc(39,oe,10,5,"tr",18),t.qZA()()(),t.YNc(40,ie,17,1,"div",19),t.qZA(),t.TgZ(41,"div",20)(42,"div",7)(43,"div",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.invoice=!i.invoice)}),t.TgZ(44,"h2",22),t._uU(45,"Invoice Preview"),t.qZA()(),t.YNc(46,pe,17,2,"div",23),t.qZA(),t.YNc(47,ue,27,0,"div",19),t.qZA()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("routerLink",t.DdM(15,me)),t.xp6(2),t.Q6J("disabled",0==e.formData.Qty),t.xp6(23),t.Q6J("preventNegative",!0)("ngModel",e.formData.Qty),t.xp6(3),t.hij("/ ",t.lcZ(31,13,e.data.Type[0].amount),""),t.xp6(8),t.Q6J("ngForOf",e.data.DiscountOptions),t.xp6(1),t.Q6J("ngIf",e.showRegister),t.xp6(1),t.Q6J("ngIf",e.data.Options.Setup),t.xp6(6),t.Q6J("ngIf",e.invoice),t.xp6(1),t.Q6J("ngIf",e.data.Options.Setup)}}var R=(()=>{return(n=R||(R={}))[n.Monthly=1]="Monthly",n[n.ThreeMonth=3]="ThreeMonth",n[n.SixMonth=6]="SixMonth",n[n.Yearly=12]="Yearly",R;var n})();let ge=(()=>{class n extends P.U{constructor(e,o,i,c){super(e,o,"Subscription/MySubscriptionLoader",i),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"showRegister",!1),(0,a.Z)(this,"invoice",!0),(0,a.Z)(this,"outletFee",0),(0,a.Z)(this,"registerFee",0),(0,a.Z)(this,"subTotal",0),this.matDialog=c}postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(te,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case R.ThreeMonth:this.formData.Discount=0;break;case R.SixMonth:this.formData.Discount=10;break;case R.Yearly:this.formData.Discount=15}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){this.formData.Cycle>1?(this.data.Discount=this.data.Options.Type*this.formData.Qty*this.formData.Cycle*this.formData.Discount/100,this.outletFee=this.data.Options.Type*this.formData.Qty*this.formData.Cycle-this.data.Discount,this.subTotal=this.outletFee+this.registerFee):(this.outletFee=this.data.Options.Type*this.formData.Qty,this.subTotal=this.outletFee+this.registerFee,this.data.Discount=0),this.data.Options.SetupFee&&(this.subTotal=this.subTotal+this.formData.Setup)}calculateSetupFee(){this.data.Options.SetupFee?(this.formData.SetupFee=!0,this.subTotal=this.subTotal+this.formData.Setup):(this.formData.SetupFee=!1,this.subTotal=this.subTotal-this.formData.Setup)}onQtyRegisterChange(){this.calculateregisterFee(),this.calculate()}calculateregisterFee(){let e=this.data.Options.Register*this.formData.Cycle*this.formData.Register;this.registerFee=this.formData.Discount>0?e-e*this.formData.Discount/100:e}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.X),t.Y36(x.O),t.Y36(S.gz),t.Y36(f.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-choose-plan"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","me-5",3,"routerLink"],[1,"btn","btn-success",3,"disabled","click"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"preventNegative","ngModel","ngModelChange"],["outletQty","ngModel"],["class","card border-dark align-text-top d-inline-block me-1 mb-0",3,"class","click",4,"ngFor","ngForOf"],[4,"ngIf"],["class","card",4,"ngIf"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],["class","card-body",4,"ngIf"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"preventNegative","ngModel","ngModelChange"],[1,"card-header"],[1,"card-body"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"model","modelChange"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"d-flex","justify-content-end"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/4774163-added-currency-conversion","target","_blank"]],template:function(e,o){1&e&&t.YNc(0,_e,48,16,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data&&o.formData)},dependencies:[g.sg,g.O5,l.Fj,l.JJ,l.nD,l.On,S.rH,s.p,ee.b,X.P,d.gM,g.JJ],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})),n})();var he=_(22863);let fe=(()=>{class n{constructor(e,o,i){(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"router",void 0),(0,a.Z)(this,"config",new k.O),this.dialogRef=e,this.data=o,this.router=i,this.config.title=this.data.title,this.config.okText="Yes",this.config.cancelText="No"}onOk(){this.router.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"]),this.dialogRef.close()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(f.so),t.Y36(f.WI),t.Y36(S.F0))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-choose-plan"]],decls:6,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"text-center",2,"width","440px"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"h4",1),t._uU(3),t.TgZ(4,"span"),t._uU(5,"Do you want to Choose your Plan ?"),t.qZA()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(3),t.hij(" ",o.data.body," "))},dependencies:[E.M]})),n})(),Ze=(()=>{class n{constructor(e,o,i,c){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"message",""),(0,a.Z)(this,"config",new k.O),this.httpService=e,this.dialogRef=o,this.data=i,this.toastr=c,this.config.title="Confim Adjusted Subscription"}onOk(){const e={Message:this.message};0==this.message.trim().length?(this.toastr.error("The reason cannot be empty",v.n.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",JSON.stringify(e)).subscribe(o=>{this.toastr.success(o.Message,v.n.Success),this.dialogRef.close()})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(x.O),t.Y36(f.so),t.Y36(f.WI),t.Y36(Z._W))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],decls:8,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"font-weight","h4","mb-5"],[1,"form-floating-outline"],["name","address","id","inputAddress","placeholder","Address","matTooltipPosition","above","matTooltip","Address","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","inputAddress"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"p",1),t._uU(3," Do you agree about billing adjusted? "),t.qZA(),t.TgZ(4,"div",2)(5,"textarea",3),t.NdJ("ngModelChange",function(c){return o.message=c}),t.qZA(),t.TgZ(6,"label",4),t._uU(7,"Reason"),t.qZA()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(5),t.Q6J("ngModel",o.message))},dependencies:[l.Fj,l.JJ,l.Q7,l.On,E.M,d.gM]})),n})(),be=(()=>{class n{constructor(e,o,i,c){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"message",""),(0,a.Z)(this,"config",new k.O),this.httpService=e,this.dialogRef=o,this.data=i,this.toastr=c,this.config.title="Stop Subscription"}onOk(){const e={Message:this.message};0==this.message.trim().length?(this.toastr.error("The reason cannot be empty",v.n.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",JSON.stringify(e)).subscribe(o=>{this.toastr.success(o.Message,v.n.Error),this.dialogRef.close()})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(x.O),t.Y36(f.so),t.Y36(f.WI),t.Y36(Z._W))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-stop-subscription"]],decls:6,vars:2,consts:[[3,"config","onOk","onCancel","onClose"],[1,"form-floating-outline"],["name","message",2,"width","250px","height","102px",3,"ngModel","ngModelChange"],["for","message"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),t.TgZ(1,"content")(2,"div",1)(3,"textarea",2),t.NdJ("ngModelChange",function(c){return o.message=c}),t.qZA(),t.TgZ(4,"label",3),t._uU(5,"Reason"),t.qZA()()()()),2&e&&(t.Q6J("config",o.config),t.xp6(3),t.Q6J("ngModel",o.message))},dependencies:[l.Fj,l.JJ,l.On,E.M]})),n})();var Te=_(69751);let Ce=(()=>{class n{constructor(){(0,a.Z)(this,"apiUrl","https://app.midtrans.com/snap/snap.js"),(0,a.Z)(this,"injected",!1)}initScript(){return new Te.y(e=>{let o;this.injected||(o=document.createElement("script"),o.src=this.apiUrl,o.async=!0,o.setAttribute("data-client-key","Mid-client-rdi5ridKhHfeIvTj"),this.injected=!0,document.body.appendChild(o))})}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275prov",t.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"})),n})();const ve=function(){return["/menu/Profile/Main/My_Subscription/Choose_your_plan"]};function ye(n,r){1&n&&(t.TgZ(0,"a",35),t._uU(1,"Choose Your Plan"),t.qZA()),2&n&&t.Q6J("routerLink",t.DdM(1,ve))}function Ae(n,r){if(1&n&&(t.TgZ(0,"div",16),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}const Se=function(n,r){return{"bg-warning":n,"bg-danger":r}};function Me(n,r){if(1&n&&(t.TgZ(0,"div",36)(1,"div",37)(2,"h5",13),t._uU(3," Subscription "),t.qZA(),t.TgZ(4,"div",16),t._uU(5),t.qZA()()()),2&n){const e=t.oxw(2);t.xp6(1),t.Tol(t.WLB(3,Se,"SellOnly"==e.data.Zoho.Subscription.SubscriptionState||"Overdue"==e.data.Zoho.Subscription.SubscriptionState,"Suspended"==e.data.Zoho.Subscription.SubscriptionState)),t.xp6(4),t.hij(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function De(n,r){if(1&n&&(t.TgZ(0,"span",43),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij("",t.lcZ(2,1,e.data.Zoho.Subscription.Discount)," %")}}function we(n,r){if(1&n&&(t.TgZ(0,"span")(1,"del"),t._uU(2),t.ALo(3,"number"),t.qZA(),t._UZ(4,"br"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,e.data.Zoho.Subscription.TotalAmount))}}function Oe(n,r){if(1&n&&(t.TgZ(0,"div",6)(1,"div",7)(2,"h2"),t._uU(3,"Current Plan"),t.qZA()(),t.TgZ(4,"div",28)(5,"table",29)(6,"thead",30)(7,"tr")(8,"th",38),t._uU(9,"Usage"),t.qZA(),t.TgZ(10,"th",38),t._uU(11,"Frequency"),t.qZA(),t.TgZ(12,"th",39),t._uU(13,"Amount"),t.qZA()()(),t.TgZ(14,"tbody")(15,"tr")(16,"td",40),t._uU(17),t._UZ(18,"br"),t._uU(19),t.ALo(20,"number"),t.TgZ(21,"small"),t._uU(22,"month"),t.qZA(),t._uU(23,") "),t.qZA(),t.TgZ(24,"td",40)(25,"span"),t._uU(26),t._UZ(27,"br"),t.qZA(),t.YNc(28,De,3,3,"span",41),t.qZA(),t.TgZ(29,"td",40),t.YNc(30,we,5,3,"span",42),t.TgZ(31,"span"),t._uU(32),t.ALo(33,"number"),t.qZA()()()()()()()),2&n){const e=t.oxw(2);t.xp6(17),t.hij(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),t.xp6(2),t.hij(" (",t.lcZ(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),t.xp6(7),t.Oqu(12==e.data.Zoho.Subscription.Frequency?"Yearly":1==e.data.Zoho.Subscription.Frequency?"Monthly":3==e.data.Zoho.Subscription.Frequency?"3 Months":"6 Months"),t.xp6(2),t.Q6J("ngIf",0!=e.data.Zoho.Subscription.Discount),t.xp6(2),t.Q6J("ngIf",0!=e.data.Zoho.Subscription.Discount),t.xp6(2),t.Oqu(t.lcZ(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function qe(n,r){if(1&n&&(t.TgZ(0,"span",43),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij("",t.lcZ(2,1,e.data.Zoho.Subscription.Discount)," %")}}function Ue(n,r){if(1&n&&(t.TgZ(0,"span")(1,"del"),t._uU(2),t.ALo(3,"number"),t.qZA(),t._UZ(4,"br"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(2),t.Oqu(t.lcZ(3,1,e.data.NextBilling.TotalAmount))}}function Pe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"div",6)(1,"div",7)(2,"div")(3,"h2"),t._uU(4,"Adjusted Plan"),t.qZA()(),t.TgZ(5,"div",44)(6,"button",45),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.onOpenConfirmAdjustedModal())}),t._uU(7," Confirm "),t.qZA()()(),t.TgZ(8,"div",28)(9,"table",29)(10,"thead",30)(11,"tr")(12,"th",38),t._uU(13,"Usage"),t.qZA(),t.TgZ(14,"th",38),t._uU(15,"Frequency"),t.qZA(),t.TgZ(16,"th",39),t._uU(17,"Amount"),t.qZA()()(),t.TgZ(18,"tbody")(19,"tr")(20,"td",40),t._uU(21),t._UZ(22,"br"),t._uU(23),t.ALo(24,"number"),t.TgZ(25,"small"),t._uU(26,"month"),t.qZA(),t._uU(27,") "),t.qZA(),t.TgZ(28,"td",40)(29,"span"),t._uU(30),t._UZ(31,"br"),t.qZA(),t.YNc(32,qe,3,3,"span",41),t.qZA(),t.TgZ(33,"td",40),t.YNc(34,Ue,5,3,"span",42),t.TgZ(35,"span"),t._uU(36),t.ALo(37,"number"),t.qZA()()()()()()()}if(2&n){const e=t.oxw(2);t.xp6(21),t.hij(" ",e.data.NextBilling.Outlet," Outlet"),t.xp6(2),t.hij(" (",t.lcZ(24,6,e.data.NextBilling.RecurringAmount)," / "),t.xp6(7),t.Oqu(12==e.data.Zoho.Subscription.Frequency?"Yearly":3==e.data.Zoho.Subscription.Frequency?"3 Monthly":"6 Months"),t.xp6(2),t.Q6J("ngIf",0!=e.data.Zoho.Subscription.Discount),t.xp6(2),t.Q6J("ngIf",0!=e.data.Zoho.Subscription.Discount),t.xp6(2),t.Oqu(t.lcZ(37,8,e.data.NextBilling.TotalAfterDiscount))}}function Ne(n,r){if(1&n&&(t.TgZ(0,"small",26),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.hij(" Tax Deduction (",e.data.Zoho.TaxDeductionPercentage," %)")}}function Ie(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"a",58),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.payAllInvoice())}),t._UZ(1,"i",59),t._uU(2),t.ALo(3,"number"),t.ALo(4,"sum"),t.ALo(5,"Filter"),t.ALo(6,"sum"),t.ALo(7,"Filter"),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(2),t.hij(" Pay All ~ IDR ",t.lcZ(3,1,t.xi3(4,3,t.Dn7(5,6,e.data.Zoho.invoices,"overdue","status"),"total")+t.xi3(6,10,t.Dn7(7,13,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function Je(n,r){if(1&n&&(t.TgZ(0,"p",68),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("(",t.lcZ(2,1,e.balance)," due)")}}function Fe(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",69),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().$implicit,c=t.oxw(3);return t.KtG(c.paySingleInvoice(i))}),t._UZ(1,"i",59),t.TgZ(2,"span",66),t._uU(3,"Pay Now"),t.qZA()()}if(2&n){const e=t.oxw().$implicit;t.MGl("id","pay-button",e.invoice_number,"")}}const Ee=function(n){return{"background-color":n}};function Le(n,r){if(1&n&&(t.TgZ(0,"tr",60)(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.ALo(5,"date"),t.qZA(),t.TgZ(6,"td"),t._uU(7),t.qZA(),t.TgZ(8,"td",54),t._uU(9),t.ALo(10,"number"),t.YNc(11,Je,3,3,"p",61),t.qZA(),t.TgZ(12,"td"),t._uU(13),t.qZA(),t.TgZ(14,"td",62),t._uU(15),t.qZA(),t.TgZ(16,"td",63)(17,"a",64),t._UZ(18,"i",65),t.TgZ(19,"span",66),t._uU(20,"View"),t.qZA()(),t.YNc(21,Fe,4,1,"button",67),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.Akn(t.VKq(16,Ee,"overdue"==e.status?"#f2dede":"")),t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Oqu(t.xi3(5,11,e.date,"dd MMM yyyy")),t.xp6(3),t.Oqu(e.invoice_number),t.xp6(2),t.hij(" ",t.lcZ(10,14,e.total)," "),t.xp6(2),t.Q6J("ngIf",e.total!=e.balance&&e.balance>0),t.xp6(2),t.Oqu(e.currency_code),t.xp6(2),t.Oqu(e.status),t.xp6(2),t.s9C("href",e.invoice_url,t.LSH),t.xp6(4),t.Q6J("ngIf",("sent"==e.status||"overdue"==e.status)&&"IDR"==e.currency_code)}}function Qe(n,r){if(1&n&&(t.TgZ(0,"div",6)(1,"div",7)(2,"div",46)(3,"h2",47),t._UZ(4,"i",48),t._uU(5," Invoices"),t.qZA(),t.YNc(6,Ne,2,1,"small",49),t.qZA(),t.YNc(7,Ie,8,17,"a",50),t.qZA(),t.TgZ(8,"div",28)(9,"table",51)(10,"thead",30)(11,"tr")(12,"th",31),t._uU(13,"No"),t.qZA(),t.TgZ(14,"th",52),t._uU(15,"Date"),t.qZA(),t.TgZ(16,"th",53),t._uU(17,"Number"),t.qZA(),t.TgZ(18,"th",54),t._uU(19,"Amount"),t.qZA(),t._UZ(20,"th",55),t.TgZ(21,"th",56),t._uU(22,"Status"),t.qZA(),t.TgZ(23,"th"),t._uU(24,"Invoice"),t.qZA()()(),t.TgZ(25,"tbody"),t.YNc(26,Le,22,18,"tr",57),t.qZA()()()()),2&n){const e=t.oxw(2);t.xp6(6),t.Q6J("ngIf",e.data.Zoho.TaxDeductionPercentage>0),t.xp6(1),t.Q6J("ngIf",e.outstandingInvoiceCount>1&&"RP"==e.data.Zoho.Subscription.Currency),t.xp6(19),t.Q6J("ngForOf",e.data.Zoho.invoices)}}function ke(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"button",70),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.load())}),t._uU(1," Load "),t.qZA()}}const Re=function(n){return{"bg-gradient-warning":n}};function Ye(n,r){if(1&n&&(t.TgZ(0,"tr",60)(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",54),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",54),t._uU(9),t.qZA(),t.TgZ(10,"td",54),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"td",54),t._uU(14),t.ALo(15,"date"),t.qZA()()),2&n){const e=r.$implicit,o=r.index;t.xp6(2),t.Oqu(o+1+"."),t.xp6(2),t.Oqu(e.Name),t.xp6(1),t.Tol(t.VKq(16,Re,e.OrdersCount<25)),t.xp6(1),t.Oqu(t.lcZ(7,8,e.OrdersCount)),t.xp6(3),t.Oqu(e.RegisterCount),t.xp6(2),t.Oqu(t.xi3(12,10,e.MinDate,"dd MMM yyyy")),t.xp6(3),t.Oqu(t.xi3(15,13,e.MaxDate,"dd MMM yyyy"))}}function He(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1)(1,"actions"),t.YNc(2,ye,2,2,"a",2),t.qZA(),t.TgZ(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h2"),t._UZ(10,"i",8),t._uU(11," Account"),t.qZA()(),t.TgZ(12,"div",9)(13,"div",10)(14,"div",11)(15,"div",12)(16,"h5",13),t._uU(17," Since "),t.qZA(),t.YNc(18,Ae,3,4,"div",14),t.qZA()(),t.TgZ(19,"div",15)(20,"div",12)(21,"h5",13),t._uU(22," Type "),t.qZA(),t.TgZ(23,"div",16),t._uU(24),t.qZA()()(),t.YNc(25,Me,6,6,"div",17),t.qZA()()(),t.YNc(26,Oe,34,10,"div",18),t.YNc(27,Pe,38,10,"div",18),t.TgZ(28,"div",6)(29,"div",7)(30,"h2"),t._UZ(31,"i",19),t._uU(32," Info"),t.qZA()(),t.TgZ(33,"div",9)(34,"div"),t._uU(35," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t.qZA()()(),t.TgZ(36,"div",6)(37,"div",7)(38,"h2"),t._UZ(39,"i",20),t._uU(40," Close Store"),t.qZA()(),t.TgZ(41,"div",9)(42,"div"),t._uU(43," You can close your store to stop your billing. "),t.qZA(),t.TgZ(44,"div",21)(45,"button",22),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.onOpenCloseModal())}),t._uU(46," Close "),t.qZA()()()()(),t.TgZ(47,"div",23),t.YNc(48,Qe,27,3,"div",18),t.TgZ(49,"div",6)(50,"div",24)(51,"h2"),t._UZ(52,"i",25),t._uU(53," Outlets Usage "),t.TgZ(54,"small",26),t._uU(55),t.ALo(56,"date"),t.ALo(57,"date"),t.qZA()(),t.YNc(58,ke,2,0,"button",27),t.qZA(),t.TgZ(59,"div",28)(60,"table",29)(61,"thead",30)(62,"tr")(63,"th",31),t._uU(64,"No"),t.qZA(),t.TgZ(65,"th"),t._uU(66,"Outlet Name"),t.qZA(),t.TgZ(67,"th",32),t._uU(68,"Orders"),t.qZA(),t.TgZ(69,"th",32),t._uU(70,"Registers"),t.qZA(),t.TgZ(71,"th",33),t._uU(72,"Min Date"),t.qZA(),t.TgZ(73,"th",33),t._uU(74,"Max Date"),t.qZA()()(),t.TgZ(75,"tbody"),t.YNc(76,Ye,16,18,"tr",34),t.ALo(77,"sortBy"),t.qZA()()()()()()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf","Trial"==e.data.Account.Type),t.xp6(16),t.Q6J("ngIf",e.data.Zoho.Subscription),t.xp6(6),t.hij(" ",e.data.Account.Type," "),t.xp6(1),t.Q6J("ngIf",null!=e.data.Zoho.CustomerID),t.xp6(1),t.Q6J("ngIf",null!=e.data.Zoho.Subscription),t.xp6(1),t.Q6J("ngIf",null!=e.data.Zoho.Subscription&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount),t.xp6(21),t.Q6J("ngIf",e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0),t.xp6(7),t.AsE("(",t.xi3(56,14,e.data.From,"dd MMM yyyy")," - ",t.xi3(57,17,e.data.To,"dd MMM yyyy"),")"),t.xp6(3),t.Q6J("ngIf",0==e.data.Outlets.length),t.xp6(18),t.Q6J("ngForOf",t.Dn7(77,20,e.data.Outlets,"desc","OrdersCount"))}}let Ve=(()=>{class n extends he.M{constructor(e,o,i,c,y,D){super(e),(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"matDialog",void 0),(0,a.Z)(this,"midtrans",void 0),(0,a.Z)(this,"ngZone",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"modalTitle",void 0),(0,a.Z)(this,"modalBody",void 0),(0,a.Z)(this,"data",void 0),(0,a.Z)(this,"loadOutlet",!1),(0,a.Z)(this,"outstandingInvoiceCount",0),this.httpService=o,this.matDialog=i,this.midtrans=c,this.ngZone=y,this.toastr=D,this.data=null}ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){this.httpService.post("/API/Subscription/GetData",{LoadOutlet:this.loadOutlet}).subscribe({next:o=>{this.data=o,h.gT.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(o)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],200!=e.Zoho.code&&(401==e.Zoho.code?this.modalTitle="Trial Customer":400==e.Zoho.code&&(this.modalTitle="your account customer"),this.modalBody=e.Zoho.message,this.matDialog.open(fe,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(o=>{("sent"==o.status||"overdue"==o.status)&&this.outstandingInvoiceCount++})}showToaster(e){var o="Payment Successful!";e>1&&(o+="\nPlease Log out and re-login if your account is currently suspended!"),this.toastr.success(o,v.n.Success)}payAllInvoice(){let o,i,c,y,e=0;this.data.Zoho.invoices.forEach(A=>{("sent"==A.status||"overdue"==A.status)&&(e+=A.total,null==i?(o=A.invoice_number,i=A.invoice_number.concat("$"+A.total+";"),c=A.invoice_id,y=A.invoice_id.concat("$"+A.total+";")):(o=o.concat("_"+A.invoice_number),i=i.concat(A.invoice_number.concat("$"+A.total+";")),c=c.concat(";"+A.invoice_id),y=y.concat(A.invoice_id.concat("$"+A.total)+";")))}),this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",JSON.stringify({customer_id:this.data.Zoho.invoices[0].customer_id,invoice_number:i,order_id:o,total:e,invoice_id:y})).subscribe(A=>{this.openSNAPDialog(A)})}paySingleInvoice(e){this.httpService.post("/API/Subscription/GetSNAPToken",JSON.stringify({invoice_number:e.invoice_number,balance:e.balance,TaxDeductionPercentage:this.data.Zoho.TaxDeductionPercentage,invoice_id:e.invoice_id,customer_id:e.customer_id})).subscribe(i=>{this.openSNAPDialog(i)})}openSNAPDialog(e){let o=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:i=>{this.ngZone.run(()=>{this.showToaster(o),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(be)}onOpenConfirmAdjustedModal(){this.matDialog.open(Ze)}load(){this.loadOutlet=!0,this.getData()}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.X),t.Y36(x.O),t.Y36(f.uw),t.Y36(Ce),t.Y36(t.R0b),t.Y36(Z._W))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-my-subscription"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],["class","btn btn-success",3,"routerLink",4,"ngIf"],[1,"container-fluid","bg-light-gray"],[1,"row","pt-5","ms-3"],[1,"col-md-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-user"],[1,"card-body"],[1,"row"],[1,"col","pe-0","ps-3"],[1,"p-3","border","rounded","bg-light-gray","text-black"],[1,"fw-bold"],["class","mt-4 h6",4,"ngIf"],[1,"col","pe-3","ps-3"],[1,"mt-4","h6"],["class","col ps-0 pe-3",4,"ngIf"],["class","card",4,"ngIf"],[1,"fa-solid","fa-circle-info"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],["class","border",4,"ngFor","ngForOf"],[1,"btn","btn-success",3,"routerLink"],[1,"col","ps-0","pe-3"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],["class","text-danger",4,"ngIf"],[4,"ngIf"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["class","text-body-secondary h6",4,"ngIf"],["class","btn btn-success btn-sm","role","button","matTooltipPosition","above","matTooltip","Pay All",3,"click",4,"ngIf"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],["class","border",3,"style",4,"ngFor","ngForOf"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm",3,"click"],[1,"fa-lg","fa-solid","fa-arrows-rotate"],[1,"border"],["class","fst-italic text-warning",4,"ngIf"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],["target","_blank",3,"href"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],["style","border-width: 1px;",3,"id","click",4,"ngIf"],[1,"fst-italic","text-warning"],[2,"border-width","1px",3,"id","click"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(e,o){1&e&&t.YNc(0,He,78,24,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[g.sg,g.O5,S.rH,s.p,d.gM,g.JJ,g.uU,L.qU,L.wn,L.W7]})),n})();var Be=_(71638);function Ge(n,r){1&n&&(t.TgZ(0,"div",13)(1,"h5",14),t._UZ(2,"i",15),t._uU(3," You are not listening to any outlet. Please select one. "),t.qZA()())}function Ke(n,r){if(1&n&&(t.TgZ(0,"div",16)(1,"h5",14),t._UZ(2,"i",15),t._uU(3),t.qZA()()),2&n){const e=t.oxw(2);t.xp6(3),t.hij(" You are currently listening to ",null==e.selectedOutlet?null:e.selectedOutlet.Name,". ")}}function je(n,r){if(1&n&&(t.TgZ(0,"div",9)(1,"div",10),t.YNc(2,Ge,4,0,"div",11),t.YNc(3,Ke,4,1,"div",12),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf",!e.selectedOutlet),t.xp6(1),t.Q6J("ngIf",e.selectedOutlet)}}let We=(()=>{class n{constructor(e,o,i,c){(0,a.Z)(this,"signalrClientService",void 0),(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"dialogRef",void 0),(0,a.Z)(this,"toastr",void 0),(0,a.Z)(this,"modalConfig",void 0),(0,a.Z)(this,"entities",void 0),(0,a.Z)(this,"outletID",void 0),(0,a.Z)(this,"selectedOutlet",void 0),(0,a.Z)(this,"initialOutlet",void 0),(0,a.Z)(this,"touchOnSelectOption",void 0),(0,a.Z)(this,"previousSelectedOutlet",void 0),this.signalrClientService=e,this.httpService=o,this.dialogRef=i,this.toastr=c,this.modalConfig=new k.O,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe((0,F.h)(e=>h.gT.IsNotEmpty(e))).subscribe(e=>{this.entities=e.Options.Entities,h.gT.IsNotEmpty(e.SubscribeOn)&&(this.outletID=e.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){this.selectedOutlet=this.findOutletByID(this.outletID),this.previousSelectedOutlet=this.selectedOutlet,this.initialOutlet=this.selectedOutlet,this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig.validated=!0,h.gT.IsEmpty(this.selectedOutlet)&&(this.modalConfig.validated=!1)}onSelectOutlet(e){this.previousSelectedOutlet=this.selectedOutlet,this.selectedOutlet=e,this.modalConfig.validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption=!0}onCancel(){this.dialogRef.close()}onOk(){this.outletID!==(this.initialOutlet?this.initialOutlet.ID:null)?h.gT.IsNotEmpty(this.outletID)?this.subscribeToPushNotification(`Listening to ${this.selectedOutlet?.Name}`,"Push Notification Enabled"):this.unsubscribeToPushNotification():this.dialogRef.close()}unsubscribeToPushNotification(){this.subscribeToPushNotification(`You are no longer listening to ${this.previousSelectedOutlet?.Name}`,"Push Notification Disabled"),this.setLocalStorage(!0)}subscribeToPushNotification(e,o){let i=localStorage.getItem("PushNotificationID");this.httpService.post("/api/PushNotification/Subscribe",{EntityID:this.outletID}).subscribe(y=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",i),this.setLocalStorage(),this.toastr.success(e,o),this.dialogRef.close()})}setLocalStorage(e=!1){e?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID)}findOutletByID(e){return this.entities.find(i=>i.ID==e)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(Be.G),t.Y36(x.O),t.Y36(f.so),t.Y36(Z._W))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-modal-subscribe-notification"]],decls:11,vars:4,consts:[[3,"config","onOk","onCancel","onClose"],[1,"container"],["class","row",4,"ngIf"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"items","ngModel","open","clear","ngModelChange","change"],[1,"row"],[1,"col-12"],["class","alert alert-danger",4,"ngIf"],["class","alert alert-success",4,"ngIf"],[1,"alert","alert-danger"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"],[1,"alert","alert-success"]],template:function(e,o){1&e&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return o.onOk()})("onCancel",function(){return o.onCancel()})("onClose",function(){return o.onCancel()}),t.TgZ(1,"content")(2,"div",1),t.YNc(3,je,4,2,"div",2),t.TgZ(4,"div",3)(5,"div",4)(6,"h5",5),t._uU(7,"Outlet"),t.qZA()(),t.TgZ(8,"div",6)(9,"div",7)(10,"ng-select",8),t.NdJ("open",function(){return o.onOpenSelectOutlet()})("clear",function(){return o.onOpenSelectOutlet()})("ngModelChange",function(c){return o.outletID=c})("change",function(c){return o.onSelectOutlet(c)}),t.qZA()()()()()()()),2&e&&(t.Q6J("config",o.modalConfig),t.xp6(3),t.Q6J("ngIf",!o.touchOnSelectOption),t.xp6(7),t.Q6J("items",o.entities)("ngModel",o.outletID))},dependencies:[g.O5,l.JJ,l.On,E.M,Y.w9]})),n})();var tt=_(59798);const $e=function(n){return{ID:n}};function ze(n,r){if(1&n&&(t.TgZ(0,"a",18),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.Q6J("routerLink","/menu"+e.URL)("queryParams",t.VKq(3,$e,e.ObjectID)),t.xp6(1),t.hij(" ",e.Body," ")}}function Xe(n,r){if(1&n&&(t.TgZ(0,"a",19),t._uU(1),t.qZA()),2&n){const e=t.oxw().$implicit;t.s9C("href",e.URL,t.LSH),t.xp6(1),t.hij(" ",e.Body," ")}}function tn(n,r){if(1&n&&(t.TgZ(0,"tr",15)(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td")(4,"b"),t._uU(5),t.qZA(),t._UZ(6,"br"),t.TgZ(7,"span"),t.YNc(8,ze,2,5,"a",16),t.YNc(9,Xe,2,2,"a",17),t.qZA()(),t.TgZ(10,"td"),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"td"),t._uU(14),t.qZA()()),2&n){const e=r.$implicit;t.xp6(2),t.Oqu(e.OutletName),t.xp6(3),t.Oqu(e.Header),t.xp6(3),t.Q6J("ngIf",e.ObjectIDType>0),t.xp6(1),t.Q6J("ngIf",0==e.ObjectIDType),t.xp6(2),t.Oqu(t.xi3(12,6,e.Created,"dd MMM yyyy HH:mm")),t.xp6(3),t.Oqu(e.TypeString)}}function en(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mat-paginator",20),t.NdJ("page",function(i){t.CHM(e);const c=t.oxw(2);return t.KtG(c.onPaginationChange(i))}),t.qZA()}if(2&n){const e=t.oxw(2);t.Q6J("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",0==e.pageData.Filter.PageNumber?0:e.pageData.Filter.PageNumber-1)}}function nn(n,r){if(1&n){const e=t.EpF();t.TgZ(0,"mainpanel-cmp",1),t.NdJ("onSubmit",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.searchFromPageOne())}),t.TgZ(1,"actions")(2,"a",2),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openSubscribeModal())}),t._uU(3,"Subscribe"),t.qZA()(),t.TgZ(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),t._uU(9,"Outlet"),t.qZA(),t.TgZ(10,"ng-select",5),t.NdJ("ngModelChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.ListIDs=i)}),t.qZA()(),t.TgZ(11,"div")(12,"h6"),t._uU(13,"From"),t.qZA(),t.TgZ(14,"datepicker",6),t.NdJ("dateChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.From=i)}),t.qZA()(),t.TgZ(15,"div")(16,"h6"),t._uU(17,"To"),t.qZA(),t.TgZ(18,"datepicker",7),t.NdJ("dateChange",function(i){t.CHM(e);const c=t.oxw();return t.KtG(c.pageData.Filter.To=i)}),t.qZA()()()()(),t.TgZ(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),t._uU(25,"Outlet"),t.qZA(),t.TgZ(26,"th"),t._uU(27,"Message"),t.qZA(),t.TgZ(28,"th"),t._uU(29,"Created"),t.qZA(),t.TgZ(30,"th"),t._uU(31,"Type"),t.qZA()()(),t.TgZ(32,"tbody"),t.YNc(33,tn,15,9,"tr",13),t.qZA()(),t.TgZ(34,"div"),t.YNc(35,en,1,3,"mat-paginator",14),t.qZA()()()()}if(2&n){const e=t.oxw();t.Q6J("pageData",e.menuData)("hideSearchBox",!0),t.xp6(10),t.Q6J("items",e.pageData.Options.Entities)("ngModel",e.pageData.Filter.ListIDs)("multiple",!0),t.xp6(4),t.Q6J("date",e.pageData.Filter.From),t.xp6(4),t.Q6J("date",e.pageData.Filter.To),t.xp6(15),t.Q6J("ngForOf",e.data.Data),t.xp6(2),t.Q6J("ngIf",e.pagination.listTotal>0)}}const on=[{path:"Main/My_Profile",component:Ut},{path:"Main/My_Subscription",component:Ve},{path:"Main/Notification",component:(()=>{class n extends W.n{constructor(e,o,i){super(e,o,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList"),(0,a.Z)(this,"dialog",void 0),this.dialog=i}preInitList(){let e=new Date;e.setHours(0,0,0,0);let o=new Date;o.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=o}openSubscribeModal(){this.dialog.open(We)}}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)(t.Y36(b.X),t.Y36(x.O),t.Y36(f.uw))}),(0,a.Z)(n,"\u0275cmp",t.Xpm({type:n,selectors:[["POS-notification"]],features:[t.qOj],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"pageData","hideSearchBox","onSubmit"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"items","ngModel","multiple","ngModelChange"],["name","From",3,"date","dateChange"],["name","To",3,"date","dateChange"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],["class","border-bottom",4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page",4,"ngIf"],[1,"border-bottom"],["target","_blank",3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"length","pageSize","pageIndex","page"]],template:function(e,o){1&e&&t.YNc(0,nn,36,9,"mainpanel-cmp",0),2&e&&t.Q6J("ngIf",o.data)},dependencies:[g.sg,g.O5,l.JJ,l.On,S.rH,s.p,tt.NW,K.QB,Y.w9,g.uU]})),n})()},{path:"Main/My_Sales",component:jt},{path:"Main/My_Subscription/Choose_your_plan",component:ge}];let an=(()=>{class n{}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275mod",t.oAB({type:n})),(0,a.Z)(n,"\u0275inj",t.cJS({imports:[S.Bz.forChild(on),S.Bz]})),n})();var rn=_(65131);let sn=(()=>{class n{}return(0,a.Z)(n,"\u0275fac",function(e){return new(e||n)}),(0,a.Z)(n,"\u0275mod",t.oAB({type:n})),(0,a.Z)(n,"\u0275inj",t.cJS({providers:[g.uU],imports:[g.ez,l.u5,l.UX,an,s.R,L.dr,E.d,rn.X,X.K,tt.TU,K.ZU,Y.A0,$.T,z.Q,d.AV,u.Iq,rt]})),n})()},3077:(Q,U,_)=>{_.d(U,{T:()=>d,v:()=>s});var a=_(81180),g=_(36895),l=_(94650),S=_(24006),P=_(65131),v=_(89156),t=_(83902);function b(u,h){if(1&u&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&u){const m=l.oxw();l.xp6(1),l.AsE(" Showing ",m.pageData.Filter.PageNumber*m.total-m.total+1," - ",m.pageData.Filter.PageNumber*m.total," ")}}function x(u,h){if(1&u&&(l.TgZ(0,"span"),l._uU(1),l.qZA()),2&u){const m=l.oxw();l.xp6(1),l.AsE(" Showing ",m.pageData.Filter.RowCount*m.pageData.Filter.PageNumber-m.pageData.Filter.RowCount+1," - ",m.pageData.Filter.RowCount*m.pageData.Filter.PageNumber-m.pageData.Filter.RowCount+m.total," ")}}function Z(u,h){if(1&u){const m=l.EpF();l.TgZ(0,"span",8),l.NdJ("click",function(){l.CHM(m);const M=l.oxw();return l.KtG(M.StoreRowsCountAPIResult())}),l.TgZ(1,"i",9),l._uU(2,"?"),l.qZA()()}}function f(u,h){if(1&u&&(l.TgZ(0,"span"),l._uU(1),l.ALo(2,"number"),l.qZA()),2&u){const m=l.oxw();l.xp6(1),l.hij(" of ",l.lcZ(2,1,m.listTotal),"")}}function T(u,h){if(1&u){const m=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){l.CHM(m);const M=l.oxw();return l.KtG(M.onPreviousPage())}),l._UZ(1,"i",11),l._uU(2," Previous"),l.qZA()}}function p(u,h){if(1&u){const m=l.EpF();l.TgZ(0,"a",10),l.NdJ("click",function(){l.CHM(m);const M=l.oxw();return l.KtG(M.onNextPage())}),l._UZ(1,"i",12),l._uU(2," Next"),l.qZA()}}let s=(()=>{class u{constructor(m){(0,a.Z)(this,"httpService",void 0),(0,a.Z)(this,"pageData",void 0),(0,a.Z)(this,"total",void 0),(0,a.Z)(this,"api",void 0),(0,a.Z)(this,"jumpToPage",new l.vpe),(0,a.Z)(this,"previousPage",new l.vpe),(0,a.Z)(this,"nextPage",new l.vpe),(0,a.Z)(this,"pageNumber",1),(0,a.Z)(this,"showingNumber",this.pageNumber),(0,a.Z)(this,"listTotal",-1),this.httpService=m}onJumpToPage(m){"Enter"===m.key&&(this.pageData.Filter.PageNumber=this.pageNumber,this.showingNumber=this.pageNumber,this.jumpToPage.emit())}onPreviousPage(){this.pageData.Filter.PageNumber-=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.previousPage.emit()}onNextPage(){this.pageData.Filter.PageNumber+=1,this.pageNumber=this.pageData.Filter.PageNumber,this.showingNumber=this.pageNumber,this.nextPage.emit()}StoreRowsCountAPIResult(){this.httpService.post("/api/"+this.api,JSON.stringify(this.pageData.Filter)).subscribe(m=>{this.listTotal=m.Count?m.Count:m,this.pageData.HideStoreApiCount=!0})}}return(0,a.Z)(u,"\u0275fac",function(m){return new(m||u)(l.Y36(v.O))}),(0,a.Z)(u,"\u0275cmp",l.Xpm({type:u,selectors:[["POS-complex-pagination"]],inputs:{pageData:"pageData",total:"total",api:"api"},outputs:{jumpToPage:"jumpToPage",previousPage:"previousPage",nextPage:"nextPage"},decls:12,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],[4,"ngIf"],["style","cursor: pointer",3,"click",4,"ngIf"],["type","text","autoNum","",1,"text-end",2,"width","45px",3,"ngModel","keyup","ngModelChange"],[1,"btn-group"],["class","btn btn-outline-secondary btn-sm text-primary",3,"click",4,"ngIf"],[2,"cursor","pointer",3,"click"],[1,"border","p-3"],[1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-left"],[1,"fa-solid","fa-arrow-right"]],template:function(m,C){1&m&&(l.TgZ(0,"div",0)(1,"div",1)(2,"div",2),l.YNc(3,b,2,2,"span",3),l.YNc(4,x,2,2,"span",3),l.YNc(5,Z,3,0,"span",4),l.YNc(6,f,3,3,"span",3),l._uU(7," records ~ Page "),l.TgZ(8,"input",5),l.NdJ("keyup",function(w){return C.onJumpToPage(w)})("ngModelChange",function(w){return C.pageNumber=w}),l.qZA()()(),l.TgZ(9,"div",6),l.YNc(10,T,3,0,"a",7),l.YNc(11,p,3,0,"a",7),l.qZA()()),2&m&&(l.xp6(3),l.Q6J("ngIf",C.pageData.Filter.RowCount==C.total),l.xp6(1),l.Q6J("ngIf",C.pageData.Filter.RowCount!=C.total),l.xp6(1),l.Q6J("ngIf",!C.pageData.HideStoreApiCount),l.xp6(1),l.Q6J("ngIf",C.pageData.HideStoreApiCount),l.xp6(2),l.Q6J("ngModel",C.pageNumber),l.xp6(2),l.Q6J("ngIf",1!=C.pageData.Filter.PageNumber),l.xp6(1),l.Q6J("ngIf",C.total>=C.pageData.Filter.RowCount))},dependencies:[g.O5,S.Fj,S.JJ,S.On,t.b,g.JJ]})),u})(),d=(()=>{class u{}return(0,a.Z)(u,"\u0275fac",function(m){return new(m||u)}),(0,a.Z)(u,"\u0275mod",l.oAB({type:u})),(0,a.Z)(u,"\u0275inj",l.cJS({imports:[g.ez,S.u5,S.UX,P.X]})),u})()},11594:(Q,U,_)=>{_.d(U,{K:()=>Z,P:()=>x});var a=_(81180),g=_(94650),l=_(10266),S=_(71948),P=_(36895),v=_(24006);const t=function(f,T){return{color:f,"font-weight":T}};function b(f,T){if(1&f&&(g.TgZ(0,"mat-radio-button",2),g._uU(1),g.qZA()),2&f){const p=T.$implicit,s=T.index,d=g.oxw();g.Akn(g.WLB(7,t,d.model==p.Key&&d.activeBold?"#0976b4":"",d.model==p.Key&&d.activeBold?"700":"")),g.Q6J("disabled",d.exception==p.Value)("matTooltip",d.title.length>0?d.title[s]:"")("value",p.Key)("name",d.name),g.xp6(1),g.hij("",p.Value," ")}}let x=(()=>{class f{constructor(){(0,a.Z)(this,"model",void 0),(0,a.Z)(this,"disabled",void 0),(0,a.Z)(this,"modelChange",new g.vpe),(0,a.Z)(this,"options",[{Key:!1,Value:"No"},{Key:!0,Value:"Yes"}]),(0,a.Z)(this,"border",!1),(0,a.Z)(this,"name",void 0),(0,a.Z)(this,"title",[]),(0,a.Z)(this,"exception",void 0),(0,a.Z)(this,"activeBold",void 0)}change(p){this.modelChange.emit(p)}}return(0,a.Z)(f,"\u0275fac",function(p){return new(p||f)}),(0,a.Z)(f,"\u0275cmp",g.Xpm({type:f,selectors:[["radio-options"]],inputs:{model:"model",disabled:"disabled",options:"options",border:"border",name:"name",title:"title",exception:"exception",activeBold:"activeBold"},outputs:{modelChange:"modelChange"},decls:2,vars:3,consts:[["color","primary",3,"disabled","ngModel","ngModelChange"],["matTooltipPosition","above","class","me-4 mt-1",3,"style","disabled","matTooltip","value","name",4,"ngFor","ngForOf"],["matTooltipPosition","above",1,"me-4","mt-1",3,"disabled","matTooltip","value","name"]],template:function(p,s){1&p&&(g.TgZ(0,"mat-radio-group",0),g.NdJ("ngModelChange",function(u){return s.change(u)}),g.YNc(1,b,2,10,"mat-radio-button",1),g.qZA()),2&p&&(g.Q6J("disabled",s.disabled)("ngModel",s.model),g.xp6(1),g.Q6J("ngForOf",s.options))},dependencies:[S.VQ,S.U0,P.sg,v.JJ,v.On,l.gM],styles:[".mat-mdc-radio-button .mdc-radio{padding:8px;margin:0}.mat-mdc-radio-button .mdc-radio .mdc-radio__background:before{top:-8px;left:-8px;width:36px;height:36px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control{top:0;right:0;left:0;width:36px;height:36px}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#0976b4!important}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{background-color:#0976b4!important;border-color:#0976b4!important}\n"],encapsulation:2})),f})(),Z=(()=>{class f{}return(0,a.Z)(f,"\u0275fac",function(p){return new(p||f)}),(0,a.Z)(f,"\u0275mod",g.oAB({type:f})),(0,a.Z)(f,"\u0275inj",g.cJS({imports:[S.Fk,P.ez,v.u5,l.AV]})),f})()},64425:(Q,U,_)=>{_.d(U,{Iq:()=>t,TU:()=>S,i3:()=>v});var a=_(36895),g=_(94650);class l{constructor(x,Z){this._document=Z;const f=this._textarea=this._document.createElement("textarea"),T=f.style;T.position="fixed",T.top=T.opacity="0",T.left="-999em",f.setAttribute("aria-hidden","true"),f.value=x,f.readOnly=!0,this._document.body.appendChild(f)}copy(){const x=this._textarea;let Z=!1;try{if(x){const f=this._document.activeElement;x.select(),x.setSelectionRange(0,x.value.length),Z=this._document.execCommand("copy"),f&&f.focus()}}catch{}return Z}destroy(){const x=this._textarea;x&&(x.remove(),this._textarea=void 0)}}let S=(()=>{class b{constructor(Z){this._document=Z}copy(Z){const f=this.beginCopy(Z),T=f.copy();return f.destroy(),T}beginCopy(Z){return new l(Z,this._document)}}return b.\u0275fac=function(Z){return new(Z||b)(g.LFG(a.K0))},b.\u0275prov=g.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"}),b})();const P=new g.OlP("CDK_COPY_TO_CLIPBOARD_CONFIG");let v=(()=>{class b{constructor(Z,f,T){this._clipboard=Z,this._ngZone=f,this.text="",this.attempts=1,this.copied=new g.vpe,this._pending=new Set,T&&null!=T.attempts&&(this.attempts=T.attempts)}copy(Z=this.attempts){if(Z>1){let f=Z;const T=this._clipboard.beginCopy(this.text);this._pending.add(T);const p=()=>{const s=T.copy();s||!--f||this._destroyed?(this._currentTimeout=null,this._pending.delete(T),T.destroy(),this.copied.emit(s)):this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(p,1))};p()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(Z=>Z.destroy()),this._pending.clear(),this._destroyed=!0}}return b.\u0275fac=function(Z){return new(Z||b)(g.Y36(S),g.Y36(g.R0b),g.Y36(P,8))},b.\u0275dir=g.lG2({type:b,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(Z,f){1&Z&&g.NdJ("click",function(){return f.copy()})},inputs:{text:["cdkCopyToClipboard","text"],attempts:["cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"}}),b})(),t=(()=>{class b{}return b.\u0275fac=function(Z){return new(Z||b)},b.\u0275mod=g.oAB({type:b}),b.\u0275inj=g.cJS({}),b})()},95017:(Q,U,_)=>{_.d(U,{A8:()=>f,Ov:()=>x,Z9:()=>P,eX:()=>b,k:()=>T,yy:()=>t});var a=_(94033),g=_(77579),l=_(94650);function P(p){return p&&"function"==typeof p.connect&&!(p instanceof a.c)}class t{applyChanges(s,d,u,h,m){s.forEachOperation((C,M,w)=>{let N,q;if(null==C.previousIndex){const J=u(C,M,w);N=d.createEmbeddedView(J.templateRef,J.context,J.index),q=1}else null==w?(d.remove(M),q=3):(N=d.get(M),d.move(N,w),q=2);m&&m({context:N?.context,operation:q,record:C})})}detach(){}}class b{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(s,d,u,h,m){s.forEachOperation((C,M,w)=>{let N,q;null==C.previousIndex?(N=this._insertView(()=>u(C,M,w),w,d,h(C)),q=N?1:0):null==w?(this._detachAndCacheView(M,d),q=3):(N=this._moveView(M,w,d,h(C)),q=2),m&&m({context:N?.context,operation:q,record:C})})}detach(){for(const s of this._viewCache)s.destroy();this._viewCache=[]}_insertView(s,d,u,h){const m=this._insertViewFromCache(d,u);if(m)return void(m.context.$implicit=h);const C=s();return u.createEmbeddedView(C.templateRef,C.context,C.index)}_detachAndCacheView(s,d){const u=d.detach(s);this._maybeCacheView(u,d)}_moveView(s,d,u,h){const m=u.get(s);return u.move(m,d),m.context.$implicit=h,m}_maybeCacheView(s,d){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(s);else{const u=d.indexOf(s);-1===u?s.destroy():d.remove(u)}}_insertViewFromCache(s,d){const u=this._viewCache.pop();return u&&d.insert(u,s),u||null}}class x{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(s=!1,d,u=!0,h){this._multiple=s,this._emitChanges=u,this.compareWith=h,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new g.x,d&&d.length&&(s?d.forEach(m=>this._markSelected(m)):this._markSelected(d[0]),this._selectedToEmit.length=0)}select(...s){this._verifyValueAssignment(s),s.forEach(u=>this._markSelected(u));const d=this._hasQueuedChanges();return this._emitChangeEvent(),d}deselect(...s){this._verifyValueAssignment(s),s.forEach(u=>this._unmarkSelected(u));const d=this._hasQueuedChanges();return this._emitChangeEvent(),d}setSelection(...s){this._verifyValueAssignment(s);const d=this.selected,u=new Set(s);s.forEach(m=>this._markSelected(m)),d.filter(m=>!u.has(m)).forEach(m=>this._unmarkSelected(m));const h=this._hasQueuedChanges();return this._emitChangeEvent(),h}toggle(s){return this.isSelected(s)?this.deselect(s):this.select(s)}clear(s=!0){this._unmarkAll();const d=this._hasQueuedChanges();return s&&this._emitChangeEvent(),d}isSelected(s){return this._selection.has(this._getConcreteValue(s))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(s){this._multiple&&this.selected&&this._selected.sort(s)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(s){s=this._getConcreteValue(s),this.isSelected(s)||(this._multiple||this._unmarkAll(),this.isSelected(s)||this._selection.add(s),this._emitChanges&&this._selectedToEmit.push(s))}_unmarkSelected(s){s=this._getConcreteValue(s),this.isSelected(s)&&(this._selection.delete(s),this._emitChanges&&this._deselectedToEmit.push(s))}_unmarkAll(){this.isEmpty()||this._selection.forEach(s=>this._unmarkSelected(s))}_verifyValueAssignment(s){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(s){if(this.compareWith){for(let d of this._selection)if(this.compareWith(s,d))return d;return s}return s}}let f=(()=>{class p{constructor(){this._listeners=[]}notify(d,u){for(let h of this._listeners)h(d,u)}listen(d){return this._listeners.push(d),()=>{this._listeners=this._listeners.filter(u=>d!==u)}}ngOnDestroy(){this._listeners=[]}}return p.\u0275fac=function(d){return new(d||p)},p.\u0275prov=l.Yz7({token:p,factory:p.\u0275fac,providedIn:"root"}),p})();const T=new l.OlP("_ViewRepeater")}}]);