dealpos 12.2.3 → 12.2.5
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.
- package/POS/115.9d09955b84621c7e.js +1 -0
- package/POS/1407.cea5983b5065b971.js +1 -0
- package/POS/1853.0b7d5c34a8bdb568.js +1 -0
- package/POS/2004.43792eb2c3844b75.js +1 -0
- package/POS/2527.18b36661c60aeedb.js +1 -0
- package/POS/2545.486ecfb5b5ac4d10.js +1 -0
- package/POS/{273.ea208bf7f28a988e.js → 273.01fe94c875a75a0b.js} +1 -1
- package/POS/2750.dd74ab7f2c0f6027.js +1 -0
- package/POS/3194.809664148e543300.js +1 -0
- package/POS/3337.a2bd68596f135359.js +1 -0
- package/POS/4020.d39490e967282158.js +1 -0
- package/POS/4177.58de1fbc643a4231.js +1 -0
- package/POS/4941.f681578d46bf28bd.js +1 -0
- package/POS/4970.6d8a7b66680ecef9.js +1 -0
- package/POS/500.c29891705c8d62b0.js +1 -0
- package/POS/5189.772d1908b1a5b49e.js +1 -0
- package/POS/5453.9608edaefa20cba4.js +1 -0
- package/POS/5510.efcbcd3d504af7ca.js +1 -0
- package/POS/6268.d279e08ba41bc278.js +1 -0
- package/POS/6303.8c3e2acb2e7c0a6e.js +1 -0
- package/POS/6664.acfbb610f61c1f9a.js +1 -0
- package/POS/6756.6e784090bca3fb75.js +1 -0
- package/POS/7193.db25a5ca1144d26f.js +1 -0
- package/POS/7298.2a72e643d89a2ba2.js +1 -0
- package/POS/7516.864ba4ac85a31c5b.js +1 -0
- package/POS/7998.35d5ca190ce9a714.js +1 -0
- package/POS/8006.f2ff1f702bbaa0aa.js +1 -0
- package/POS/8105.9055c885f0b489c2.js +1 -0
- package/POS/{8317.5eadaac9d81f9a5f.js → 8317.f3ef008c8040230f.js} +1 -1
- package/POS/8393.b290f19109834d7a.js +1 -0
- package/POS/8401.431c29e3bcdfa0d1.js +1 -0
- package/POS/8761.7c6aa3885792e375.js +1 -0
- package/POS/9042.a789b7edc1cb17b5.js +1 -0
- package/POS/9055.8b8ca776fbd6c557.js +1 -0
- package/POS/9160.c5c1a01604f1c513.js +1 -0
- package/POS/9757.39ea29e3067bbbed.js +1 -0
- package/POS/9841.c344898b4d378750.js +1 -0
- package/POS/common.2e6564fa1d7bcc7c.js +1 -0
- package/POS/index.html +2 -2
- package/POS/main.19a65364ec642453.js +1 -0
- package/POS/runtime.f88d72385ad7d1e3.js +1 -0
- package/POS/{styles.45d4f2923299fcf3.css → styles.f85969ef039bf1d5.css} +1 -1
- package/package.json +1 -1
- package/POS/115.9ebdcaa2f52c0708.js +0 -1
- package/POS/1407.fb196bd5720b6cc4.js +0 -1
- package/POS/1853.f9088128bd32d62d.js +0 -1
- package/POS/2004.7dc740293b38e114.js +0 -1
- package/POS/2527.c8c1472e2583d15c.js +0 -1
- package/POS/2545.4b512389ad17c451.js +0 -1
- package/POS/2750.4f3502081043c30b.js +0 -1
- package/POS/3194.5d69479a1645296d.js +0 -1
- package/POS/3337.3f4f382f45acff41.js +0 -1
- package/POS/4020.ac80a34a4226b0f7.js +0 -1
- package/POS/4177.98ff79b4b72c8768.js +0 -1
- package/POS/4941.8c2fb6ad16dc21d1.js +0 -1
- package/POS/4970.4fd0b65a33ec215d.js +0 -1
- package/POS/500.8a2dabd11040f420.js +0 -1
- package/POS/5189.6d0b24db775d8a7c.js +0 -1
- package/POS/5453.70fcfbaa7bfcd55b.js +0 -1
- package/POS/5510.479c025aed7612fc.js +0 -1
- package/POS/6268.ff79e78429684e91.js +0 -1
- package/POS/6303.bfcba36635158bb0.js +0 -1
- package/POS/6664.5a6d92ea4c288821.js +0 -1
- package/POS/6756.ac761ce454dbfce0.js +0 -1
- package/POS/7193.6b127da2a149cb73.js +0 -1
- package/POS/7298.19d75745aecb3523.js +0 -1
- package/POS/7516.481c1df6180e492c.js +0 -1
- package/POS/7998.b5880cb3717edcca.js +0 -1
- package/POS/8006.c38fc1521b07c34d.js +0 -1
- package/POS/8105.fb4aa9713c5f8216.js +0 -1
- package/POS/8393.3639956afb96922e.js +0 -1
- package/POS/8401.82c1cc0352887254.js +0 -1
- package/POS/8589.2640680609642fa4.js +0 -1
- package/POS/8761.7c5539bff80a4998.js +0 -1
- package/POS/9042.5c52e1b1c2f26f40.js +0 -1
- package/POS/9160.caf169c0eef97fd6.js +0 -1
- package/POS/9757.197c3204c36bdd73.js +0 -1
- package/POS/9841.5c1c03ebf5b7893e.js +0 -1
- package/POS/common.5c2bee0b1072850d.js +0 -1
- package/POS/main.434c24ea7d5f6011.js +0 -1
- package/POS/runtime.7c28f5c91adf7583.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[115],{24424:(w,E,l)=>{l.d(E,{O:()=>Z});var n=l(81180),C=l(69751),y=l(94650);let Z=(()=>{class b{constructor(){(0,n.Z)(this,"csvPrefixFormat","")}convertToCSV(u,I){let S;if("string"==typeof u)S=u;else{var m="object"==typeof u?u:JSON.parse(u);S=this.transformToCSVStringFormat(m)}this.exportCSV(S,I)}isNumeric(u){return/^-?\d+$/.test(u)}parseCSV(u){return new C.y(S=>{let m=new FileReader;m.onload=()=>{let f=m.result.split(/\r\n|\n/),e=f[0].split(","),a=[];for(let t=0;t<f.length;t++){let s=f[t].split(",");if(s.length==e.length){let r=[];for(let g=0;g<e.length;g++)this.isNumeric(s[g])?r.push(parseFloat(s[g])):r.push(s[g]);a.push(r)}else{var o=f[t].split(new RegExp(',(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)'));let r=[];for(let g=0;g<o.length;g++)this.isNumeric(o[g])?r.push(parseFloat(o[g])):r.push(o[g]);a.push(r)}}S.next(a)},m.readAsBinaryString(u)})}transformToCSVStringFormat(u){if(!u||!u.length)return;const S=Object.keys(u[0]);return u.map(M=>S.map(f=>{let e=null==M[f]?"":M[f];return e=e instanceof Date?e.toLocaleString():e.toString().replace(/"/g,'""'),e.search(/("|,|\n)/g)>=0&&(e=`"${e}"`),e}).join(",")).join("\n")}exportCSV(u,I){var S=new Blob([u],{type:"text/csv;charset=utf8;"}),m=document.createElement("a");m.setAttribute("href",window.URL.createObjectURL(S)),m.setAttribute("download",I),document.body.appendChild(m),m.click(),document.body.removeChild(m)}}return(0,n.Z)(b,"\u0275fac",function(u){return new(u||b)}),(0,n.Z)(b,"\u0275prov",y.Yz7({token:b,factory:b.\u0275fac,providedIn:"root"})),b})()},4077:(w,E,l)=>{l.d(E,{s:()=>m,n:()=>M});var n=l(81180),C=l(96700),y=l(67327),Z=l(24351),b=l(41206);class A{constructor(){(0,n.Z)(this,"enabledDragItem",void 0),this.enabledDragItem=!1}drop(e,a){(0,b.bA)(a.Data,e.previousIndex,e.currentIndex)}toggleEnabledDragItem(){}onSaveDragAndDrop(e,a){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||a.postListID(e,a.data.Data)}onPutSaveDragAndDrop(e,a){this.enabledDragItem=!this.enabledDragItem,this.enabledDragItem||a.putListID(e,a.data.Data)}}class u{constructor(e){(0,n.Z)(this,"httpService",void 0),this.httpService=e}exportCSV(e,a,o,t){o.pageData.Filter.Export=!0,o.pageData.Filter.FormatType=m.CSV,t=t||"export.csv",this.httpService.post(`/api/${a}`,JSON.stringify(o.pageData.Filter)).subscribe(s=>{e.convertToCSV(s,t),o.pageData.Filter.Export=!1})}convertToCSV(e,a=!1,o){let t=this.ExportDataFromUI2(a);e.convertToCSV(t,o)}ExportDataFromUI2(e=!1){const a=document.getElementById("tableGrid"),o=[];return y.gT.IsNotEmpty(a)&&a.querySelectorAll("tr").forEach(s=>{const r=new Object;let g=0;s.querySelectorAll("th, td").forEach(R=>{g++;const O=parseInt(R.getAttribute("colspan"));for(let T=1;T<O;T++)r["column"+g]="",g++;const P=R.innerText,N=P.toString().split("");if(e&&"0"===N[0]&&N.length>1){let T="'"+P.trim();r["column"+g]=T}else r["column"+g]=P.trim()}),o.push(r)}),o}}var I=l(22863);class S{constructor(){(0,n.Z)(this,"listTotal",void 0),(0,n.Z)(this,"pageSize",void 0),(0,n.Z)(this,"show",void 0),this.listTotal=0,this.pageSize=0,this.show=!1}changePaginationData(e){this.pageSize=e.pageData.Filter.RowCount,this.listTotal=e.data?.ListTotal,this.show=this.pageSize<=this.listTotal}changePage(e,a,o){a.Filter.PageNumber=e.pageIndex+1,o.getListData()}}var m=(()=>{return(f=m||(m={}))[f.CSV=0]="CSV",f[f.XLSX=1]="XLSX",m;var f})();class M extends I.M{constructor(e,a,o,t,s,r){super(e),(0,n.Z)(this,"httpService",void 0),(0,n.Z)(this,"dataAPI",void 0),(0,n.Z)(this,"pageAPI",void 0),(0,n.Z)(this,"toastrService",void 0),(0,n.Z)(this,"route",void 0),(0,n.Z)(this,"pageData",{Filter:{},Options:{},Roles:{},Config:{}}),(0,n.Z)(this,"data",void 0),(0,n.Z)(this,"pagination",new S),(0,n.Z)(this,"dragDrop",new A),(0,n.Z)(this,"exportHandler",void 0),(0,n.Z)(this,"comparation",0),(0,n.Z)(this,"queryParams",{}),this.httpService=a,this.dataAPI=o,this.pageAPI=t,this.toastrService=s,this.route=r,this.exportHandler=new u(a),t?(r&&(this.queryParams=this.route.snapshot.queryParams),this.preInitLoader(),this.menuData$.pipe((0,Z.b)(()=>this.httpService.post("/api/"+this.pageAPI,JSON.stringify(this.queryParams)))).subscribe(g=>{this.pageData=g,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(e){this.preGetList(),this.dataAPI&&this.httpService.post("/api/"+this.dataAPI,JSON.stringify(this.pageData.Filter)).subscribe(a=>{this.data=a,this.postInit(a),this.pagination.changePaginationData(this),e&&(this.pageData.HideStoreApiCount=!1)})}searchFromPageOne(){this.preSearchFromPageOne(),this.pageData.Filter.PageNumber=1,this.getListData("filterMode")}postInit(e){null!=e.PageTitle&&(this.menuData.H=e.PageTitle)}preGetList(){null==this.pageData.Filter.From&&(this.pageData.Filter.From=y.gT.MinDate),null==this.pageData.Filter.To&&(this.pageData.Filter.To=y.gT.MinDate)}preSearchFromPageOne(){}onPaginationChange(e){this.pagination.changePage(e,this.pageData,this)}onSelectAllData(e){this.data.Data=this.data.Data.map(a=>(a.selected=e,a))}getSelectedData(){let e=[];return this.data&&(e=this.data.Data.filter(a=>a.selected)),e}httpPostListID(e,a,o){if(a||(a="Are you sure you want to selected record/s?"),0==confirm(a))return;let t=this.getSelectedData();t.length>0&&this.postListID(e,t,o)}httpPutListID(e,a,o){if(a||(a="Are you sure you want to selected record/s?"),0==confirm(a))return;let t=this.getSelectedData();t.length>0&&this.putListID(e,t,o)}httpDeleteListID(e,a,o){if(a||(a="Are you sure you want to delete selected record/s?"),0==confirm(a))return;let t=this.getSelectedData();t.length>0&&this.DeleteListID(e,t,o)}onSaveDragAndDrop(e){this.dragDrop.onSaveDragAndDrop(e,this)}onPutSaveDragAndDrop(e){this.dragDrop.onPutSaveDragAndDrop(e,this)}postListID(e,a,o){const t=a.map(s=>o?s[o]:s.ID);this.httpService.post(`/api/${e}`,t).subscribe(s=>{this.toastrService.success(s.Message?s.Message:s,C.n.Success),this.getListData()})}putListID(e,a,o){const t=a.map(s=>o?s[o]:s.ID);this.httpService.put(`/api/${e}`,t).subscribe(s=>{this.toastrService.success(s.Message?s.Message:s,C.n.Success),this.afterPutListSuccess(),this.getListData()})}afterPutListSuccess(){}DeleteListID(e,a,o){const t=a.map(s=>o?s[o]:s.ID);this.httpService.delete(`/api/${e}`,t).subscribe(s=>{this.toastrService.success(s.Message?s.Message:s,C.n.Success),this.getListData()})}postData(e,a){this.httpService.post("/API/"+e,JSON.stringify(a)).subscribe(o=>{this.getListData(),this.toastrService.success(o.Message?o.Message:o,C.n.Success)})}compare(e,a,o){return(e<a?-1:1)*(o?1:-1)}exportCSV(e,a,o){this.exportHandler.exportCSV(e,a,this,o)}s2ab(e){for(var a=new ArrayBuffer(e.length),o=new Uint8Array(a),t=0;t!=e.length;++t)o[t]=255&e.charCodeAt(t);return a}exportXlsx(e,a){this.pageData.Filter.FormatType=1,this.pageData.Filter.Export=!0,this.httpService.post(`/api/${e}`,JSON.stringify(this.pageData.Filter)).subscribe(o=>{a=decodeURI(a);const t=window.URL.createObjectURL(new Blob([this.s2ab(atob(o))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),s=document.createElement("a");s.href=t,s.setAttribute("download",a),document.body.appendChild(s),s.click(),window.URL.revokeObjectURL(t),s.remove()})}convertToCSV(e,a=!1,o){let t=this.exportHandler.ExportDataFromUI2(a);e.convertToCSV(t,o)}OnCompare(e){const a=e?this.data[e]:this.data;if(a.length<1)return;const o=Object.assign({},this.pageData.Filter);o.From=new Date(new Date(this.pageData.Filter.From).getFullYear(),new Date(this.pageData.Filter.From).getMonth()-1,1),o.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(o)).subscribe(t=>{const s=e?t[e]:t;this.comparation=0,a.forEach(r=>{r.PrevIndex="-",r.CurrentIndex="-",r.Increase="-";const g=s.filter(D=>D.EntityID==r.EntityID);if(r.CurrentIndex=r.Rank,g.length>0){const D=g[0];r.PrevIndex=D.Rank,D.SalesNet?r.Increase=(r.SalesNet-D.SalesNet)/D.SalesNet*100:D.Sales&&(r.Increase=(r.Sales-D.Sales)/D.Sales*100),r.IsPositive=r.Increase>0,r.IsNegative=r.Increase<0,this.comparation+=r.Increase}})})}}},17554:(w,E,l)=>{l.d(E,{H:()=>T});var n=l(81180),C=l(36895),y=l(24006),Z=l(90811),b=l(65412),A=l(88796),u=l(65131),I=l(42046),S=l(63165),m=l(77579),M=l(63900),f=l(54004),e=l(18505),a=l(34782),o=l(95698),t=l(94650),s=l(89156),r=l(4077);let g=(()=>{class d{constructor(i){(0,n.Z)(this,"http",void 0),this.http=i}exportCSV(i,h,p){const c={...h,Export:!0,FormatType:r.s.CSV};this.http.post(`/api/${i}`,JSON.stringify(c)).subscribe(x=>this.convertToCSV(x,p+".csv"))}convertToCSV(i,h){let p;if("string"==typeof i)p=i;else{var c="object"==typeof i?i:JSON.parse(i);p=this.transformToCSVStringFormat(c)}this.downloadCSV(p,h)}transformToCSVStringFormat(i){if(!i||!i.length)return;const p=Object.keys(i[0]);return i.map(x=>p.map(F=>{let v=null==x[F]?"":x[F];return v=v instanceof Date?v.toLocaleString():v.toString().replace(/"/g,'""'),v.search(/("|,|\n)/g)>=0&&(v=`"${v}"`),v}).join(",")).join("\n")}downloadCSV(i,h){var p=new Blob([i],{type:"text/csv;charset=utf8;"}),c=document.createElement("a");c.setAttribute("href",window.URL.createObjectURL(p)),c.setAttribute("download",h),document.body.appendChild(c),c.click(),document.body.removeChild(c)}exportXlsx(i,h,p){const c={...h,FormatType:r.s.XLSX};this.http.post(`/api/${i}`,JSON.stringify(c)).subscribe(x=>{p=decodeURI(p+".xlsx");const F=window.URL.createObjectURL(new Blob([this.s2ab(atob(x))],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,"})),v=document.createElement("a");v.href=F,v.setAttribute("download",p),document.body.appendChild(v),v.click(),window.URL.revokeObjectURL(F),v.remove()})}s2ab(i){const h=new ArrayBuffer(i.length),p=new Uint8Array(h);for(let c=0;c!=i.length;++c)p[c]=255&i.charCodeAt(c);return h}}return(0,n.Z)(d,"\u0275fac",function(i){return new(i||d)(t.LFG(s.O))}),(0,n.Z)(d,"\u0275prov",t.Yz7({token:d,factory:d.\u0275fac,providedIn:"root"})),d})();var D=l(83902);function R(d,L){if(1&d){const i=t.EpF();t.ynx(0),t.TgZ(1,"div",11),t._uU(2,"Columns"),t.qZA(),t.TgZ(3,"div",12)(4,"ng-select",13),t.NdJ("ngModelChange",function(p){t.CHM(i);const c=t.oxw();return t.KtG(c.exportType=p)})("change",function(p){t.CHM(i);const c=t.oxw();return t.KtG(c.onChangeExportType(p))}),t.qZA()(),t.BQk()}if(2&d){const i=t.oxw();t.xp6(4),t.Q6J("items",i.exportTypes)("ngModel",i.exportType)}}function O(d,L){if(1&d){const i=t.EpF();t.TgZ(0,"i",21),t.NdJ("click",function(){t.CHM(i);const p=t.oxw(3);return t.KtG(p.onGetAllDataLength())}),t.qZA()}}function P(d,L){if(1&d&&(t.TgZ(0,"span"),t._uU(1,"of "),t.YNc(2,O,1,0,"i",19),t.ALo(3,"async"),t.TgZ(4,"span",20),t._uU(5),t.ALo(6,"async"),t.qZA(),t._uU(7," page(s)"),t.qZA()),2&d){const i=t.oxw(2);t.xp6(2),t.Q6J("ngIf",!t.lcZ(3,2,i.allDataLength$)),t.xp6(3),t.Oqu(t.lcZ(6,4,i.allDataLength$))}}function N(d,L){if(1&d){const i=t.EpF();t.ynx(0),t.TgZ(1,"div",4),t._uU(2,"Page"),t.qZA(),t.TgZ(3,"div",14)(4,"input",15),t.NdJ("ngModelChange",function(p){t.CHM(i);const c=t.oxw();return c.pageNumber=p,t.KtG(c.onChangePageNumber())}),t.qZA(),t.YNc(5,P,8,6,"span",3),t.qZA(),t.TgZ(6,"div",16)(7,"div",17),t._UZ(8,"i",18),t._uU(9),t.ALo(10,"number"),t.ALo(11,"number"),t.qZA()(),t.BQk()}if(2&d){const i=t.oxw();t.xp6(4),t.Q6J("ngModel",i.pageNumber),t.xp6(1),t.Q6J("ngIf",i.getAllDataLengthAPI),t.xp6(4),t.AsE(" Exporting data from ",t.lcZ(10,4,i.displayedMinRangeRow)," - ",t.lcZ(11,6,i.displayedMaxRangeRow)," ")}}let T=(()=>{class d{constructor(i,h,p,c){(0,n.Z)(this,"dialogRef",void 0),(0,n.Z)(this,"exportHandler",void 0),(0,n.Z)(this,"pageNumber",1),(0,n.Z)(this,"pageSize",1e4),(0,n.Z)(this,"config",new I.O),(0,n.Z)(this,"exportTypes",[]),(0,n.Z)(this,"exportType",void 0),(0,n.Z)(this,"exportFormat","CSV"),(0,n.Z)(this,"exportFormats",[{ID:"CSV"},{ID:"XLSX"}]),(0,n.Z)(this,"_onGetAllDataLength",new m.x),(0,n.Z)(this,"onGetAllDataLength$",this._onGetAllDataLength.asObservable()),(0,n.Z)(this,"allDataLength$",void 0),(0,n.Z)(this,"filterExport",void 0),(0,n.Z)(this,"displayedMaxRangeRow",this.pageSize),(0,n.Z)(this,"displayedMinRangeRow",this.pageNumber),(0,n.Z)(this,"fileName",void 0),(0,n.Z)(this,"pagination",void 0),(0,n.Z)(this,"getAllDataLengthAPI",""),this.dialogRef=h,this.exportHandler=c,this.config.title=`Export ${i.title}`,this.config.hideCancel=!0,this.config.customWidth="450px",this.exportTypes=i.exportTypes,this.exportType=this.exportTypes[0].ID,this.fileName=this.exportTypes[0].FileName,this.filterExport=i.filterExport,this.pagination=i.pagination,this.getAllDataLengthAPI=i.getAllDataLengthAPI,this.allDataLength$=this.onGetAllDataLength$.pipe((0,M.w)(()=>p.post("/API/"+i.getAllDataLengthAPI,this.filterExport)),(0,f.U)(x=>"number"==typeof x?x:x.Count),(0,e.b)(x=>{x<this.displayedMaxRangeRow&&this.setMinMaxRangeDisplayedRow(x)}),(0,f.U)(x=>Math.floor(x/this.pageSize)+(x%this.pageSize>0?1:0)),(0,a.d)(1),(0,o.q)(1))}onOk(){this.filterExport={...this.filterExport,Export:!0},this.pagination&&(this.filterExport={...this.filterExport,ExportPageNumber:this.pageNumber,ExportRowCount:this.pageSize}),"CSV"==this.exportFormat?this.exportHandler.exportCSV(this.exportType,this.filterExport,this.fileName):"XLSX"==this.exportFormat&&this.exportHandler.exportXlsx(this.exportType,this.filterExport,this.fileName),this.dialogRef.close()}onGetAllDataLength(){this._onGetAllDataLength.next()}onChangePageNumber(){this.setDisplayedMinMaxRangeRow()}setMinMaxRangeDisplayedRow(i){for(;this.displayedMaxRangeRow>i&&this.pageNumber>1;)this.pageNumber-=1,this.setDisplayedMinMaxRangeRow();this.displayedMaxRangeRow=i}onChangeExportType(i){this.fileName=i.FileName}setDisplayedMinMaxRangeRow(){this.displayedMinRangeRow=this.pageNumber*this.pageSize-this.pageSize+1,this.displayedMaxRangeRow=this.pageNumber*this.pageSize}}return(0,n.Z)(d,"\u0275fac",function(i){return new(i||d)(t.Y36(b.WI),t.Y36(b.so),t.Y36(s.O),t.Y36(g))}),(0,n.Z)(d,"\u0275cmp",t.Xpm({type:d,selectors:[["POS-modal-complex-export"]],standalone:!0,features:[t.jDz],decls:16,vars:4,consts:[[3,"config","onCancel","onClose","onOk"],[1,"container-fluid"],[1,"row"],[4,"ngIf"],[1,"col-3","fw-bold","mt-8",2,"display","flex","align-items","center"],[1,"col-9","mt-8"],[3,"ngModel","ngModelChange"],["value","CSV"],[1,"fa-solid","fa-file-csv","me-3","mb-1"],["value","XLSX"],[1,"fa-solid","fa-file-excel","me-3","mb-1"],[1,"col-3","fw-bold",2,"display","flex","align-items","center"],[1,"col-9"],["appendTo","body","bindLabel","Value","bindValue","ID",3,"items","ngModel","ngModelChange","change"],[1,"col-9","mt-8",2,"display","flex","align-items","center","column-gap","10px"],["type","text","autoNum","","name","pageNumber","id","pageNumber",1,"form-control","text-center",2,"width","50px",3,"ngModel","ngModelChange"],[1,"col-12","mt-8"],[1,"p-3",2,"background-color","#ADD8E6","border-radius","4px"],[1,"fa-solid","fa-circle-exclamation","mx-3"],["class","fa-solid fa-circle-question mx-3",3,"click",4,"ngIf"],[1,"fw-bold"],[1,"fa-solid","fa-circle-question","mx-3",3,"click"]],template:function(i,h){1&i&&(t.TgZ(0,"modal-material",0),t.NdJ("onCancel",function(){return h.dialogRef.close()})("onClose",function(){return h.dialogRef.close()})("onOk",function(){return h.onOk()}),t.TgZ(1,"content")(2,"div",1)(3,"div",2),t.YNc(4,R,5,2,"ng-container",3),t.TgZ(5,"div",4),t._uU(6,"Format"),t.qZA(),t.TgZ(7,"div",5)(8,"mat-button-toggle-group",6),t.NdJ("ngModelChange",function(c){return h.exportFormat=c}),t.TgZ(9,"mat-button-toggle",7),t._UZ(10,"i",8),t._uU(11,"CSV"),t.qZA(),t.TgZ(12,"mat-button-toggle",9),t._UZ(13,"i",10),t._uU(14,"XLSX"),t.qZA()()(),t.YNc(15,N,12,8,"ng-container",3),t.qZA()()()()),2&i&&(t.Q6J("config",h.config),t.xp6(4),t.Q6J("ngIf",h.exportTypes.length>1),t.xp6(4),t.Q6J("ngModel",h.exportFormat),t.xp6(7),t.Q6J("ngIf",h.pagination))},dependencies:[S.d,S.M,A.A0,A.w9,y.u5,y.Fj,y.JJ,y.On,C.ez,C.O5,C.Ov,C.JJ,u.X,D.b,Z.vV,Z.A9,Z.Yi],styles:[".general[_ngcontent-%COMP%], .page[_ngcontent-%COMP%]{border:1px solid #dcdcdc;border-radius:3px;padding:10px 8px;position:relative}.general[_ngcontent-%COMP%]{margin-bottom:15px}.floating-title[_ngcontent-%COMP%]{position:absolute;top:-10.5px;background:white;color:gray;font-size:14px}.select-header[_ngcontent-%COMP%]{line-height:36px}.input-header[_ngcontent-%COMP%]{line-height:36.6px}.form-control[_ngcontent-%COMP%]{height:max-content!important;padding:.375rem .75rem!important}"]})),d})()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkPOS=self.webpackChunkPOS||[]).push([[1407],{11989:(y,M,e)=>{e.d(M,{AM:()=>u});var n=e(81180);class u{constructor(){(0,n.Z)(this,"ID",void 0),(0,n.Z)(this,"TypeID",void 0),(0,n.Z)(this,"Groups",void 0),(0,n.Z)(this,"Items",void 0)}}},42011:(y,M,e)=>{e.d(M,{D:()=>_,H:()=>c});var n=e(81180),u=e(36895),o=e(94650),P=e(24006),t=e(58393),O=e(93669),s=e(65412);function i(d,l){if(1&d){const a=o.EpF();o.TgZ(0,"div",4)(1,"a",8),o.NdJ("click",function(){o.CHM(a);const p=o.oxw();return o.KtG(p.openUploadModal())}),o._UZ(2,"i",9),o.qZA()()}}let c=(()=>{class d{constructor(a){(0,n.Z)(this,"_matDialog",void 0),(0,n.Z)(this,"onOpenUploadModal",new o.vpe),(0,n.Z)(this,"onAddItem",new o.vpe),(0,n.Z)(this,"onScanCode",new o.vpe),(0,n.Z)(this,"onCreateItem",new o.vpe),(0,n.Z)(this,"cartItems",void 0),(0,n.Z)(this,"isUpload",void 0),this._matDialog=a}handleF4(){this._matDialog.openDialogs&&this._matDialog.openDialogs.length>0||this.createItem()}createItem(){this.onCreateItem.emit()}openUploadModal(){this.onOpenUploadModal.emit()}addItem(a){this.onAddItem.emit(a)}scanCode(a){this.onScanCode.emit(a)}}return(0,n.Z)(d,"\u0275fac",function(a){return new(a||d)(o.Y36(s.uw))}),(0,n.Z)(d,"\u0275cmp",o.Xpm({type:d,selectors:[["POS-cart-header"]],hostBindings:function(a,C){1&a&&o.NdJ("keydown.F4",function(m){return C.handleF4(m)},!1,o.Jf7)},inputs:{cartItems:"cartItems",isUpload:"isUpload"},outputs:{onOpenUploadModal:"onOpenUploadModal",onAddItem:"onAddItem",onScanCode:"onScanCode",onCreateItem:"onCreateItem"},decls:16,vars:6,consts:[[1,"row","cart-header","border-bottom-0","g-0","justify-content-between","align-items-center","p-6"],[1,"col-auto"],["placeholder","Search product by name / code","requestUrl","/API/AC/GetVariantSuggestionByCodeNName","inputID","product","notFoundMessageFor","product","panelWidth","30%","prefixIcon","fa fa-barcode",1,"product-input",3,"clearOnSelect","onSelect","onInputEnter"],["class","col-auto add-item",4,"ngIf"],[1,"col-auto","add-item"],["matTooltipPosition","above","matTooltip","Add Item (F4)",1,"pointer","d-block","position-relative","cart-add",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-2x","text-success"],[1,"position-absolute","fst-italic","right-bottom","text-dark"],["matTooltipPosition","above","matTooltip","Upload Item",1,"pointer","d-block","position-relative","cart-add",3,"click"],["aria-hidden","true",1,"fa","fa-upload","fa-2x","text-success"]],template:function(a,C){1&a&&(o.TgZ(0,"div",0)(1,"div",1)(2,"h5"),o._UZ(3,"span"),o._uU(4,"\xa0"),o.TgZ(5,"span"),o._uU(6),o.ALo(7,"sum"),o.qZA()()(),o.TgZ(8,"div",1)(9,"autocompleteV2",2),o.NdJ("onSelect",function(m){return C.addItem(m)})("onInputEnter",function(m){return C.scanCode(m)}),o.qZA()(),o.YNc(10,i,3,0,"div",3),o.TgZ(11,"div",4)(12,"a",5),o.NdJ("click",function(){return C.createItem()}),o._UZ(13,"i",6),o.TgZ(14,"small",7),o._uU(15,"(F4)"),o.qZA()()()()),2&a&&(o.xp6(6),o.hij("",o.xi3(7,3,C.cartItems,"Quantity")," ITEM (S)"),o.xp6(3),o.Q6J("clearOnSelect",!0),o.xp6(1),o.Q6J("ngIf",C.isUpload))},dependencies:[u.O5,t.J,O.qU],styles:["div.row.cart-header[_ngcontent-%COMP%]{border:solid 1px #cfcfcf;border-radius:3px 3px 0 0;background:#f2f7fa;color:#222}div.row.cart-header[_ngcontent-%COMP%] .right-bottom[_ngcontent-%COMP%]{font-size:9px;right:-6px;bottom:-10px}.product-input[_ngcontent-%COMP%]{width:305px}.product-input[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{height:28px}.product-input[_ngcontent-%COMP%] autocompleteV2[_ngcontent-%COMP%]{width:267px}.cashier[_ngcontent-%COMP%]{width:550px;max-width:50rem;min-width:30rem}@media (max-width: 1222px){.cashier[_ngcontent-%COMP%]{width:450px}}@media (max-width: 1210px){.cashier[_ngcontent-%COMP%]{width:480px}}@media (max-width: 1092px){.cashier[_ngcontent-%COMP%]{min-width:20rem;width:400px}.barcode[_ngcontent-%COMP%]{width:260px!important;margin-left:0}.barcode[_ngcontent-%COMP%] autocompleteV2[_ngcontent-%COMP%]{width:200px!important}}@media (max-width: 991px){.cashier[_ngcontent-%COMP%]{min-width:20rem;width:430px}.barcode[_ngcontent-%COMP%]{width:280px!important;margin-left:0}.barcode[_ngcontent-%COMP%] autocompleteV2[_ngcontent-%COMP%]{width:200px!important}}"]})),d})(),_=(()=>{class d{}return(0,n.Z)(d,"\u0275fac",function(a){return new(a||d)}),(0,n.Z)(d,"\u0275mod",o.oAB({type:d})),(0,n.Z)(d,"\u0275inj",o.cJS({imports:[u.ez,P.UX,t.Q,O.dr]})),d})()},241:(y,M,e)=>{e.d(M,{w:()=>T});var n=e(81180),u=e(67327),o=e(77579),P=e(82722),t=e(94650),O=e(26128),s=e(36895),i=e(3848),c=e(9116),_=e(93669);function d(g,f){if(1&g&&t._UZ(0,"img",17),2&g){const r=t.oxw().$implicit;t.Q6J("src",r.ImageURLClient.indexOf("cloudinary")>-1?"https:"+r.ImageURLClient:r.ImageURLClient,t.LSH)}}function l(g,f){if(1&g&&(t.TgZ(0,"p",18),t._uU(1),t.ALo(2,"slice"),t.qZA()),2&g){const r=t.oxw().$implicit;t.xp6(1),t.Oqu(t.Dn7(2,1,r.Display,0,3))}}function a(g,f){if(1&g){const r=t.EpF();t.TgZ(0,"div",13)(1,"a",14),t.NdJ("click",function(){const k=t.CHM(r).$implicit,E=t.oxw(3);return t.KtG(E.select(k))}),t.YNc(2,d,1,1,"img",15),t.YNc(3,l,3,5,"p",16),t.TgZ(4,"small"),t._uU(5),t.ALo(6,"slice"),t.qZA()()()}if(2&g){const r=f.$implicit;t.xp6(2),t.Q6J("ngIf",r.ImageURLClient),t.xp6(1),t.Q6J("ngIf",!r.ImageURLClient),t.xp6(2),t.Oqu(t.Dn7(6,3,r.Display,0,36))}}const C=function(){return["/menu/Outlets/Master/Quick_Key_Templates/Form"]},p=function(g){return{ID:g}};function m(g,f){if(1&g&&(t.TgZ(0,"mat-tab",6)(1,"div",7)(2,"div",8),t.YNc(3,a,7,7,"div",9),t.TgZ(4,"div",10)(5,"a",11),t._UZ(6,"i",12),t.qZA()()()()()),2&g){const r=f.$implicit,h=t.oxw(2);t.Q6J("label",r.Name),t.xp6(3),t.Q6J("ngForOf",r.Items),t.xp6(2),t.Q6J("routerLink",t.DdM(4,C))("queryParams",t.VKq(5,p,h.quickKeyId))}}function x(g,f){if(1&g&&(t.TgZ(0,"mat-tab-group",4),t.YNc(1,m,7,7,"mat-tab",5),t.qZA()),2&g){const r=t.oxw();t.Q6J("disableRipple",!0)("hidden",r.subQuickKey),t.xp6(1),t.Q6J("ngForOf",r.quickKey.Groups)}}function v(g,f){if(1&g){const r=t.EpF();t.TgZ(0,"div",13)(1,"a",14),t.NdJ("click",function(){const k=t.CHM(r).$implicit,E=t.oxw(2);return t.KtG(E.selectChild(k.ID))}),t.TgZ(2,"p"),t._uU(3),t.ALo(4,"limitTo"),t.qZA(),t.TgZ(5,"small"),t._uU(6),t.ALo(7,"limitTo"),t.qZA()()()}if(2&g){const r=f.$implicit;t.xp6(3),t.Oqu(t.xi3(4,2,r.Model,3)),t.xp6(3),t.Oqu(t.xi3(7,5,r.Model,30))}}function D(g,f){if(1&g){const r=t.EpF();t.TgZ(0,"div",19)(1,"div",20),t.NdJ("click",function(){t.CHM(r);const b=t.oxw();return t.KtG(b.back())}),t.TgZ(2,"div",21),t._UZ(3,"i",22),t.qZA(),t.TgZ(4,"div",23)(5,"b"),t._uU(6),t.qZA()()(),t.TgZ(7,"div",24),t.YNc(8,v,8,8,"div",9),t.qZA()()}if(2&g){const r=t.oxw();t.xp6(6),t.hij(" ",r.subQuickKey.Name," "),t.xp6(2),t.Q6J("ngForOf",r.subQuickKey.Items)}}const I=function(g){return{OutletID:g}};function K(g,f){if(1&g&&(t.TgZ(0,"a",25)(1,"strong"),t._uU(2,"QUICK KEYS UNCONFIGURED"),t.qZA(),t._UZ(3,"i",26),t.TgZ(4,"span"),t._uU(5,"Click here to setup your Quick keys"),t.qZA()()),2&g){const r=t.oxw();t.Q6J("routerLink",t.DdM(2,C))("queryParams",t.VKq(3,I,r.outletID))}}let T=(()=>{class g{constructor(r){(0,n.Z)(this,"_quickKeyService",void 0),(0,n.Z)(this,"quickKeyId",void 0),(0,n.Z)(this,"outletID",void 0),(0,n.Z)(this,"data",void 0),(0,n.Z)(this,"quickKey",void 0),(0,n.Z)(this,"destroy$",void 0),(0,n.Z)(this,"subQuickKey",void 0),(0,n.Z)(this,"NextProductID",void 0),this._quickKeyService=r,this.destroy$=new o.x}ngOnInit(){this.initQuickey()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}initQuickey(){this._quickKeyService.Data$.pipe((0,P.R)(this.destroy$)).subscribe(r=>{this.setQuickey(r)})}setQuickey(r){if(r){let h;r.Groups&&0!==r.Groups.length&&(h=r.Groups),this.quickKey=h?r:null}}addQuickKeyItem(r){this._quickKeyService.addQuickKeyItem(r)}selectChild(r){this.addQuickKeyItem(r),this.back(),this.openNextProduct(this.NextProductID)}select(r){this.NextProductID=r.NextProductID,!r.Children||r.Children.length<1?this.selectChild(r.ItemID):1==r.Children.length?this.selectChild(r.Children[0].ID):this.subQuickKey={Items:r.Children,Name:r.Display}}openNextProduct(r){u.gT.IsNotEmpty(r)&&this.data.Groups.forEach(h=>{const b=h.Items.find(k=>k.ProductID==r);null!=b&&b.Children.length>1&&(this.NextProductID=b.NextProductID,this.subQuickKey={Items:b.Children,Name:b.Display})})}back(){delete this.subQuickKey}}return(0,n.Z)(g,"\u0275fac",function(r){return new(r||g)(t.Y36(O.w))}),(0,n.Z)(g,"\u0275cmp",t.Xpm({type:g,selectors:[["pos-quick-key"]],inputs:{quickKeyId:"quickKeyId",outletID:"outletID"},decls:5,vars:4,consts:[[1,"quickKeys",3,"ngClass"],["animationDuration","0ms","class","quickKeyTabs",3,"disableRipple","hidden",4,"ngIf","ngIfElse"],["class","container",4,"ngIf"],["noQuickKey",""],["animationDuration","0ms",1,"quickKeyTabs",3,"disableRipple","hidden"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"container","tabItems"],[1,"row","g-0"],["class","col-3 column",4,"ngFor","ngForOf"],[1,"col-3","column","add"],[3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-solid","fa-circle-plus","fa-5x","d-flex","align-items-center","justify-content-center","bg-white","h-100","text-primary"],[1,"col-3","column"],[3,"click"],["class","productTab",3,"src",4,"ngIf"],["class","productTab",4,"ngIf"],[1,"productTab",3,"src"],[1,"productTab"],[1,"container"],[1,"row","g-0","border","align-items-center","variants-header","cursor",3,"click"],[1,"col-auto","border-end","py-5","px-7"],["aria-hidden","true",1,"fa","fa-arrow-left"],[1,"col","text-center","fw-bold","text-uppercase","h5"],[1,"tabItems","row","g-0"],["id","LinkConfigureQuickkey","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-regular","fa-hand-pointer"]],template:function(r,h){if(1&r&&(t.TgZ(0,"section",0),t.YNc(1,x,2,3,"mat-tab-group",1),t.YNc(2,D,9,2,"div",2),t.YNc(3,K,6,5,"ng-template",null,3,t.W1O),t.qZA()),2&r){const b=t.MAs(4);t.Q6J("ngClass",h.quickKey?"":"no-quick-key"),t.xp6(1),t.Q6J("ngIf",h.quickKey)("ngIfElse",b),t.xp6(1),t.Q6J("ngIf",h.subQuickKey)}},dependencies:[s.mk,s.sg,s.O5,i.uX,i.SP,c.rH,s.OU,_.OI],styles:['.btn-add[_ngcontent-%COMP%]{-webkit-border-radius:50%;-moz-border-radius:50%;padding:6px 10px;cursor:pointer;right:-14px;top:5px;border:solid 1px #dddddd}section.quickKeys.no-quick-key[_ngcontent-%COMP%]{background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Cashier/no-quick-key.png);background-repeat:no-repeat;height:544px;position:relative}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:80px;width:80px;display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #dddddd}.quickKeys[_ngcontent-%COMP%] .row.g-0.border.align-items-center.variants-header.cursor[_ngcontent-%COMP%]{background:linear-gradient(to bottom,#ffffff 0%,#eeeeee 100%)}.btn-add[_ngcontent-%COMP%]{-webkit-border-radius:50%;-moz-border-radius:50%;padding:6px 10px;cursor:pointer;right:-14px;top:5px;border:solid 1px #DDDDDD}section.quickKeys.no-quick-key[_ngcontent-%COMP%]{background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Cashier/no-quick-key.png);background-repeat:no-repeat;height:544px}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%]{border-bottom:0px;display:flex;border-radius:3px;cursor:pointer}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]{background:#ffffff;background:linear-gradient(to bottom,#ffffff 0%,#eeeeee 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#eeeeee",GradientType=0);height:44px;max-height:44px;overflow:hidden;color:#aaa!important;font-size:14px;text-decoration:none;font-weight:700;outline:none;text-transform:uppercase;text-align:center;min-width:25%;display:flex;justify-content:center}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{align-self:center;text-align:center}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:last-child{border-right:none}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(4n){border-right:none}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:first-child{border-left:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(-n+4){border-right:1px solid #cfcfcf;border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(4n+1){border-left:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(4n+2){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(4n+3){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(4n+4){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col[_ngcontent-%COMP%]:nth-child(n+5){width:25%;flex-grow:0}.quickKeys[_ngcontent-%COMP%] .quickKeyTabs[_ngcontent-%COMP%] div.row[_ngcontent-%COMP%] > div.col.active[_ngcontent-%COMP%]{color:#268ec1!important}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%]{padding:0}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%]{margin-top:15px;margin-bottom:10px;word-break:break-all}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:solid 1px #cfcfcf}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]{text-align:center;display:block;cursor:pointer}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:80px;width:80px;display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #DDDDDD}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{height:80px;width:80px;font-size:20px;display:block;margin:0 auto;padding-top:22px;background-color:#a6a6a6;border:solid 1px #999999;border-top-left-radius:5px;border-bottom-right-radius:5px;color:#fff}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:#000;font-size:11px;display:block;margin:5px 0 0}.quickKeys[_ngcontent-%COMP%] .tabItems[_ngcontent-%COMP%] .column[_ngcontent-%COMP%] .ion-icon[_ngcontent-%COMP%]{font-size:75px;margin:10px}.quickKeys[_ngcontent-%COMP%] .variants-header[_ngcontent-%COMP%]{background:#ffffff;background:linear-gradient(to bottom,#ffffff 0%,#eeeeee 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#eeeeee",GradientType=0);color:#268ec1;cursor:pointer}.quickKeys[_ngcontent-%COMP%] .col-md-3.column.add[_ngcontent-%COMP%]{cursor:pointer}.quickKeys[_ngcontent-%COMP%] .col-md-3.column.add[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:10px}.quickKeys[_ngcontent-%COMP%] i.icon-col.fa.fa-xmark.text-danger[_ngcontent-%COMP%]{color:#fb404b!important;position:absolute;right:16px;top:5px}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%], .quickKeys[_ngcontent-%COMP%] a#LinkConfigureParkLayout[_ngcontent-%COMP%]{background-color:#479ccf;padding:15px 25px;color:#fff;text-decoration:none;width:240px;display:block;opacity:.85;border-radius:5px}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%]{position:absolute;top:120px;left:90px}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%]:hover, .quickKeys[_ngcontent-%COMP%] a#LinkConfigureParkLayout[_ngcontent-%COMP%]:hover{opacity:.95}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%], .quickKeys[_ngcontent-%COMP%] a#LinkConfigureParkLayout[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%]{border-bottom:1px solid white;font-size:14px;margin:0 0 10px;padding:0 0 3px;display:block}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%] i[_ngcontent-%COMP%], .quickKeys[_ngcontent-%COMP%] a#LinkConfigureParkLayout[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;height:35px;margin:0 10px 0 0;font-size:28px}.quickKeys[_ngcontent-%COMP%] a#LinkConfigureQuickkey[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .quickKeys[_ngcontent-%COMP%] a#LinkConfigureParkLayout[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;font-size:14px;width:135px;vertical-align:top}.quickKeys[_ngcontent-%COMP%] .row.no-gutters.border.align-items-center.variants-header.cursor[_ngcontent-%COMP%]{background:linear-gradient(to bottom,#ffffff 0%,#eeeeee 100%)}.general-information[_ngcontent-%COMP%] ol.mt-5.ml-5.pl-7[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{line-height:20px}.quickKeys[_ngcontent-%COMP%] {width:420px;position:relative}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-header-pagination{display:none!important}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-header{border-bottom:none}.quickKeys[_ngcontent-%COMP%] .mdc-tab-indicator{display:none!important}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels{border-bottom:0px;display:flex;flex-wrap:wrap}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab{height:44px;max-height:44px;overflow:hidden;padding:0!important;border-right:1px solid #cfcfcf;min-width:25%!important;flex-grow:1;flex-basis:0;font-size:14px;font-weight:700;outline:none;text-transform:uppercase;background:#ffffff;background:linear-gradient(to bottom,#ffffff 0%,#eeeeee 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#eeeeee",GradientType=0);display:flex;white-space:normal!important}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab .mdc-tab__content{white-space:normal!important;align-self:center}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(4n){border-right:none}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:first-child{border-left:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(-n+4){border-right:1px solid #cfcfcf;border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(4n+1){border-left:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(4n+2){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(4n+3){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(4n+4){border-bottom:1px solid #cfcfcf;border-right:1px solid #cfcfcf}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab:nth-child(n+5){width:25%;flex-grow:0}@media (max-width: 1092px){.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mat-mdc-tab{font-size:12px}}.quickKeys[_ngcontent-%COMP%] .mat-mdc-tab-labels .mdc-tab--active .mdc-tab__text-label{color:#268ec1!important;text-shadow:0px 0px 1px #268ec1!important}@media (max-width: 1210px){.quickKeys[_ngcontent-%COMP%]{width:340px}}']})),g})()},88441:(y,M,e)=>{e.d(M,{S:()=>i});var n=e(81180),u=e(36895),o=e(3848),P=e(93669),t=e(26128),O=e(9116),s=e(94650);let i=(()=>{class c{}return(0,n.Z)(c,"\u0275fac",function(d){return new(d||c)}),(0,n.Z)(c,"\u0275mod",s.oAB({type:c})),(0,n.Z)(c,"\u0275inj",s.cJS({providers:[t.w],imports:[u.ez,o.Nh,P.dr,O.Bz]})),c})()},26128:(y,M,e)=>{e.d(M,{w:()=>O});var n=e(81180),u=e(61135),o=e(77579),P=e(11989),t=e(94650);let O=(()=>{class s{constructor(){(0,n.Z)(this,"_Data",new u.X(new P.AM)),(0,n.Z)(this,"Data$",this._Data.asObservable()),(0,n.Z)(this,"_itemID",new o.x),(0,n.Z)(this,"onSelectQuickeyItem$",this._itemID.asObservable()),(0,n.Z)(this,"_EntityID",void 0)}set EntityID(c){this._EntityID=c}set Data(c){this._Data.next(c)}addQuickKeyItem(c,_=this._EntityID){this._itemID.next({id:c,entityID:_})}}return(0,n.Z)(s,"\u0275fac",function(c){return new(c||s)}),(0,n.Z)(s,"\u0275prov",t.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"})),s})()},86751:(y,M,e)=>{e.d(M,{U:()=>l,X:()=>d});var n=e(81180),u=e(36895),o=e(24006),P=e(65412),t=e(42046),O=e(63165),s=e(93669),i=e(94650);const c=function(a){return{active:a}};function _(a,C){if(1&a){const p=i.EpF();i.TgZ(0,"div",9)(1,"div",10),i.NdJ("click",function(){const v=i.CHM(p).$implicit,D=i.oxw();return i.KtG(D.select(v))}),i.TgZ(2,"div",11)(3,"h5",12)(4,"span"),i._UZ(5,"i",13),i._uU(6),i.ALo(7,"limitTo"),i.qZA()(),i.TgZ(8,"div",14)(9,"div")(10,"span",15),i._uU(11,"VACANT"),i.qZA()()()()()()}if(2&a){const p=C.$implicit,m=i.oxw();i.xp6(2),i.Tol(i.VKq(6,c,(null==p?null:p.Name)==(null==m.selectedRegister?null:m.selectedRegister.Name))),i.xp6(4),i.hij(" ",i.xi3(7,3,p.Name,15)," ")}}let d=(()=>{class a{constructor(p,m){(0,n.Z)(this,"dialogRef",void 0),(0,n.Z)(this,"Outlets",void 0),(0,n.Z)(this,"searchInput",""),(0,n.Z)(this,"modalConfig",new t.O),(0,n.Z)(this,"selectedRegister",void 0),this.dialogRef=m,this.Outlets=p.Entities,this.selectedRegister=p.SelectedRegister}ngOnInit(){this.modalConfig.hideClose=!0,this.modalConfig.bodyScrollable=!0,this.modalConfig.title="Choose an outlet"}select(p){this.selectedRegister=p}onOk(){this.dialogRef.close({outlet:this.selectedRegister})}}return(0,n.Z)(a,"\u0275fac",function(p){return new(p||a)(i.Y36(P.WI),i.Y36(P.so))}),(0,n.Z)(a,"\u0275cmp",i.Xpm({type:a,selectors:[["POS-modal-outlet"]],decls:12,vars:7,consts:[[3,"config","onOk","onCancel","onClose"],[1,"ms-0","mb-8",2,"width","200px",3,"hidden"],[1,"input-group","mb-3"],[1,"input-group-text","txtFilter"],["aria-hidden","true",1,"fa","fa-magnifying-glass"],["type","text","placeholder","Filter by Name","aria-label","Search",1,"txtFilter","form-control","border-start-0",3,"ngModel","ngModelChange"],[1,"container","mt-8"],[1,"row",2,"width","600px !important"],["class","col-4",4,"ngFor","ngForOf"],[1,"col-4"],[1,"card","border-0",3,"click"],[1,"card-body","p-0"],[1,"card-title","mb-0"],[1,"fa","fa-circle-info","pe-1"],[1,"card-text","px-0","py-2"],[1,"idle"]],template:function(p,m){1&p&&(i.TgZ(0,"modal-material",0),i.NdJ("onOk",function(){return m.onOk()})("onCancel",function(){return m.dialogRef.close()})("onClose",function(){return m.dialogRef.close()}),i.TgZ(1,"content")(2,"div",1)(3,"div",2)(4,"span",3),i._UZ(5,"i",4),i.qZA(),i.TgZ(6,"input",5),i.NdJ("ngModelChange",function(v){return m.searchInput=v}),i.qZA()()(),i.TgZ(7,"div",6)(8,"div",7),i.YNc(9,_,12,8,"div",8),i.ALo(10,"FilterByName"),i.qZA()()(),i._UZ(11,"footer"),i.qZA()),2&p&&(i.Q6J("config",m.modalConfig),i.xp6(2),i.Q6J("hidden",m.Outlets.length<=6),i.xp6(4),i.Q6J("ngModel",m.searchInput),i.xp6(3),i.Q6J("ngForOf",i.xi3(10,4,m.Outlets,m.searchInput)))},dependencies:[u.sg,O.M,o.Fj,o.JJ,o.On,s.OI,s.bs],styles:[".bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px,#f5c6cb 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#28a745,#28a745 15px,#a2dbb0 15px,#a2dbb0 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#FCF3CF,#FCF3CF 15px,#F9E79F 15px,#F9E79F 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.col-4[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{width:180px;min-height:95px;margin-right:17px;margin-bottom:17px;position:relative}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]{display:block;outline:0;border:1px solid #B1AAAA;border-radius:5px;cursor:pointer}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{height:30px;border-radius:4px;padding:5px 10px;color:#fff;background:#B1AAAA;overflow:hidden}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]:hover, .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.active[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.vacant[_ngcontent-%COMP%]{background:#ffffe1;border:1px solid #89b03e}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]:hover > h5[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.active[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.vacant[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%]{background:#89b03e}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover{border:1px solid #c9302c}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%] > h6[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover > h6[_ngcontent-%COMP%]{background:#c9302c!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{background:#c9302c}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover{background:white}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]{border:1px solid #f6a828}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] > h6[_ngcontent-%COMP%]{background:#f6a828!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]:hover{border:1px solid #f6a828;background:white}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]:hover > strong[_ngcontent-%COMP%]{background:#f6a828!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{background:#f6a828}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.75rem!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{height:80px;padding:15px 10px;position:relative}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;font-weight:400;font-size:.875rem;width:100%;margin-bottom:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{margin-top:-10px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child{margin-bottom:0}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{text-align:center;position:absolute;bottom:0;right:0;width:auto;background-color:#b1aaaa;border-radius:3px;padding:2px 5px;color:#fff;display:none!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span.idle[_ngcontent-%COMP%]{display:block;font-size:1.25rem;text-align:center}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{position:absolute;width:27px;height:28px;cursor:pointer;top:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-of-type{right:-5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:nth-last-of-type(2){right:15px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{bottom:20px;right:5px;position:absolute}.col-4[_ngcontent-%COMP%] .duration[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border:1px solid!important;position:absolute;bottom:-3px;left:58px;background:#fff;border-radius:5px}"]})),a})(),l=(()=>{class a{}return(0,n.Z)(a,"\u0275fac",function(p){return new(p||a)}),(0,n.Z)(a,"\u0275mod",i.oAB({type:a})),(0,n.Z)(a,"\u0275inj",i.cJS({imports:[u.ez,O.d,o.u5,s.dr]})),a})()},47634:(y,M,e)=>{e.d(M,{G:()=>i,s:()=>s});var n=e(81180),u=e(36895),o=e(42046),P=e(63165),t=e(94650),O=e(65412);let s=(()=>{class c{constructor(d){(0,n.Z)(this,"dialogRef",void 0),(0,n.Z)(this,"config",new o.O),this.dialogRef=d,this.config.title="Void Transaction?"}onOk(){this.dialogRef.close(!0)}}return(0,n.Z)(c,"\u0275fac",function(d){return new(d||c)(t.Y36(O.so))}),(0,n.Z)(c,"\u0275cmp",t.Xpm({type:c,selectors:[["POS-modal-void"]],decls:4,vars:1,consts:[[3,"config","onOk","onCancel","onClose"],[1,"fw-normal"]],template:function(d,l){1&d&&(t.TgZ(0,"modal-material",0),t.NdJ("onOk",function(){return l.onOk()})("onCancel",function(){return l.dialogRef.close(!1)})("onClose",function(){return l.dialogRef.close(!1)}),t.TgZ(1,"content")(2,"h4",1),t._uU(3,"This will erase all current data. Are you sure?"),t.qZA()()()),2&d&&t.Q6J("config",l.config)},dependencies:[P.M]})),c})(),i=(()=>{class c{}return(0,n.Z)(c,"\u0275fac",function(d){return new(d||c)}),(0,n.Z)(c,"\u0275mod",t.oAB({type:c})),(0,n.Z)(c,"\u0275inj",t.cJS({imports:[u.ez,P.d]})),c})()},50:(y,M,e)=>{e.d(M,{M:()=>O});var n=e(81180),u=e(54850),o=e(94650),P=e(89156),t=e(97185);let O=(()=>{class s{constructor(c,_){(0,n.Z)(this,"httpService",void 0),(0,n.Z)(this,"toastr",void 0),this.httpService=c,this.toastr=_}generateNumber(c,_){return this.httpService.post(_,JSON.stringify({ID:c}))}getQuickKey(c,_){return this.httpService.post(_,JSON.stringify(c))}updateCourierList(c){return this.httpService.post(u.W.UpdateCourierList,JSON.stringify({name:c}))}getVarianByCode(c,_,d){return this.httpService.post(u.W.GetVariantByCode,{code:c,entityID:_,barcodeSerial:d,Promotion:!0})}getVariantBySerial(c,_){return this.httpService.post(u.W.GetVariantBySerial,{Serial:c,EntityID:_,Promotion:!0})}getVariantById(c,_){return this.httpService.post(u.W.GetVariantByID,{id:c,entityID:_})}submitTransaction(c,_){return this.httpService.post(_,c)}getPrintTemplateID(c){return this.httpService.post(u.W.GetPrintTemplateID,JSON.stringify(c))}createNewContact(c,_){const d=[];return c.Group&&d.push(c.Group),this.httpService.post(u.W.CreateContact,{contact:c,type:_,groups:d})}getItemStock(c,_){return this.httpService.post(u.W.GetVariantStockByID,{id:c,entityID:_})}clearOutlet(c){return this.httpService.post("/api/TransferOrder/ClearOutlet",JSON.stringify(c))}}return(0,n.Z)(s,"\u0275fac",function(c){return new(c||s)(o.LFG(P.O),o.LFG(t._W))}),(0,n.Z)(s,"\u0275prov",o.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"})),s})()},23945:(y,M,e)=>{e.d(M,{O:()=>c});var n=e(81180),u=e(90287),o=e(61135),P=e(39300),t=e(18505),O=e(94650),s=e(89156),i=e(51161);let c=(()=>{class _{get Data(){return this._Data.value}pushNewValue(l){this._Data.next(l)}constructor(l,a){(0,n.Z)(this,"httpService",void 0),(0,n.Z)(this,"roleService",void 0),(0,n.Z)(this,"_role",new o.X(new u.Q(this.roleService))),(0,n.Z)(this,"role$",this._role.asObservable()),(0,n.Z)(this,"role",void 0),(0,n.Z)(this,"_pageState",void 0),(0,n.Z)(this,"_Data",new o.X(null)),(0,n.Z)(this,"Data$",this._Data.asObservable().pipe((0,P.h)(C=>null!==C))),this.httpService=l,this.roleService=a}getStorage(l,a,C){return this.httpService.post(l,JSON.stringify({ID:a,EntityID:C})).pipe((0,t.b)(m=>this.pushNewValue(m)))}getLoadData(l){return this.httpService.post(l).pipe((0,t.b)(a=>this.pushNewValue(a)))}get pageState(){return this._pageState}set pageState(l){this._pageState=l}updateRole(l){this.role=l,this._role.next(l)}initRoles(){this.updateRole(new u.Q(this.roleService))}}return(0,n.Z)(_,"\u0275fac",function(l){return new(l||_)(O.LFG(s.O),O.LFG(i.N))}),(0,n.Z)(_,"\u0275prov",O.Yz7({token:_,factory:_.\u0275fac,providedIn:"root"})),_})()}}]);
|
|
@@ -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-muted","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-muted","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",34),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",35)(1,"div",36)(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",42),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",9)(5,"table",28)(6,"thead",29)(7,"tr")(8,"th",37),t._uU(9,"Usage"),t.qZA(),t.TgZ(10,"th",37),t._uU(11,"Frequency"),t.qZA(),t.TgZ(12,"th",38),t._uU(13,"Amount"),t.qZA()()(),t.TgZ(14,"tbody")(15,"tr")(16,"td",39),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",39)(25,"span"),t._uU(26),t._UZ(27,"br"),t.qZA(),t.YNc(28,De,3,3,"span",40),t.qZA(),t.TgZ(29,"td",39),t.YNc(30,we,5,3,"span",41),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",42),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",43)(6,"button",44),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",9)(9,"table",28)(10,"thead",29)(11,"tr")(12,"th",37),t._uU(13,"Usage"),t.qZA(),t.TgZ(14,"th",37),t._uU(15,"Frequency"),t.qZA(),t.TgZ(16,"th",38),t._uU(17,"Amount"),t.qZA()()(),t.TgZ(18,"tbody")(19,"tr")(20,"td",39),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",39)(29,"span"),t._uU(30),t._UZ(31,"br"),t.qZA(),t.YNc(32,qe,3,3,"span",40),t.qZA(),t.TgZ(33,"td",39),t.YNc(34,Ue,5,3,"span",41),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",57),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.payAllInvoice())}),t._UZ(1,"i",58),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",67),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",68),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",58),t.TgZ(2,"span",65),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",59)(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",53),t._uU(9),t.ALo(10,"number"),t.YNc(11,Je,3,3,"p",60),t.qZA(),t.TgZ(12,"td"),t._uU(13),t.qZA(),t.TgZ(14,"td",61),t._uU(15),t.qZA(),t.TgZ(16,"td",62)(17,"a",63),t._UZ(18,"i",64),t.TgZ(19,"span",65),t._uU(20,"View"),t.qZA()(),t.YNc(21,Fe,4,1,"button",66),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",45)(3,"h2",46),t._UZ(4,"i",47),t._uU(5," Invoices"),t.qZA(),t.YNc(6,Ne,2,1,"small",48),t.qZA(),t.YNc(7,Ie,8,17,"a",49),t.qZA(),t.TgZ(8,"div",9)(9,"table",50)(10,"thead",29)(11,"tr")(12,"th",30),t._uU(13,"No"),t.qZA(),t.TgZ(14,"th",51),t._uU(15,"Date"),t.qZA(),t.TgZ(16,"th",52),t._uU(17,"Number"),t.qZA(),t.TgZ(18,"th",53),t._uU(19,"Amount"),t.qZA(),t._UZ(20,"th",54),t.TgZ(21,"th",55),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",56),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",69),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",59)(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td",53),t._uU(6),t.ALo(7,"number"),t.qZA(),t.TgZ(8,"td",53),t._uU(9),t.qZA(),t.TgZ(10,"td",53),t._uU(11),t.ALo(12,"date"),t.qZA(),t.TgZ(13,"td",53),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",9)(60,"table",28)(61,"thead",29)(62,"tr")(63,"th",30),t._uU(64,"No"),t.qZA(),t.TgZ(65,"th"),t._uU(66,"Outlet Name"),t.qZA(),t.TgZ(67,"th",31),t._uU(68,"Orders"),t.qZA(),t.TgZ(69,"th",31),t._uU(70,"Registers"),t.qZA(),t.TgZ(71,"th",32),t._uU(72,"Min Date"),t.qZA(),t.TgZ(73,"th",32),t._uU(74,"Max Date"),t.qZA()()(),t.TgZ(75,"tbody"),t.YNc(76,Ye,16,18,"tr",33),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-muted","h6"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[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-muted 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")}}]);
|