dealpos 12.34.1 → 12.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/POS/{chunk-DFLE3DVW.js → chunk-24XWGFAY.js} +1 -1
  2. package/POS/{chunk-5DXYQPXL.js → chunk-27DARDSW.js} +1 -1
  3. package/POS/{chunk-QSDU5YDY.js → chunk-2GGQMYSI.js} +1 -1
  4. package/POS/{chunk-YIR34TSG.js → chunk-2ZEQ5ME3.js} +1 -1
  5. package/POS/{chunk-XS5WWK2V.js → chunk-33MEWIVY.js} +1 -1
  6. package/POS/{chunk-BMBKMHIS.js → chunk-37QQUV3K.js} +1 -1
  7. package/POS/{chunk-AHQLMS52.js → chunk-3N56EUT5.js} +1 -1
  8. package/POS/{chunk-WSGPQGGE.js → chunk-3OO4LNV7.js} +1 -1
  9. package/POS/{chunk-VUYXRIYI.js → chunk-3TQZ3CP3.js} +1 -1
  10. package/POS/{chunk-DR75E2ZM.js → chunk-3XGNVJKS.js} +1 -1
  11. package/POS/{chunk-U6BX7XSZ.js → chunk-46BNAKDD.js} +1 -1
  12. package/POS/{chunk-JCMFETAK.js → chunk-46MDMCNP.js} +1 -1
  13. package/POS/{chunk-3D6NIBVS.js → chunk-4CUGB6WL.js} +1 -1
  14. package/POS/{chunk-JI3GO4YT.js → chunk-4ERZJHGP.js} +1 -1
  15. package/POS/{chunk-N3RS7B2H.js → chunk-4PXRZCDJ.js} +1 -1
  16. package/POS/{chunk-AMJ2GH6D.js → chunk-52APBBCP.js} +1 -1
  17. package/POS/{chunk-5XD4NKZD.js → chunk-547FTLLR.js} +2 -2
  18. package/POS/{chunk-P6ZU26G2.js → chunk-55ATNGI5.js} +1 -1
  19. package/POS/{chunk-H7MK67N7.js → chunk-5GHPK2UU.js} +1 -1
  20. package/POS/{chunk-UBHSGAPM.js → chunk-5OXCF3ZE.js} +1 -1
  21. package/POS/{chunk-M7T5XBVT.js → chunk-6KVBWGGI.js} +1 -1
  22. package/POS/{chunk-6WHM3IKR.js → chunk-6UUL7HAM.js} +1 -1
  23. package/POS/{chunk-NUZADJLK.js → chunk-72DTLQ67.js} +1 -1
  24. package/POS/{chunk-XZG7F7HK.js → chunk-77BRMWCB.js} +1 -1
  25. package/POS/{chunk-GGMB6K2W.js → chunk-7CZNHJQE.js} +1 -1
  26. package/POS/{chunk-RKUCIJ6M.js → chunk-7OA3KK57.js} +1 -1
  27. package/POS/{chunk-TKCDCOVM.js → chunk-7U7KZE4F.js} +1 -1
  28. package/POS/{chunk-K7U4DJPY.js → chunk-7YNN7VOP.js} +1 -1
  29. package/POS/{chunk-6PIRKLAS.js → chunk-A6UKOE4U.js} +1 -1
  30. package/POS/{chunk-VNT4RHVN.js → chunk-AM5XTGYK.js} +1 -1
  31. package/POS/{chunk-6VTGG3AK.js → chunk-AMQZMFWW.js} +1 -1
  32. package/POS/{chunk-ZCCJROAG.js → chunk-AZLBFQLU.js} +1 -1
  33. package/POS/{chunk-HR47AUON.js → chunk-AZYNA3LP.js} +1 -1
  34. package/POS/{chunk-MBW3PQR7.js → chunk-BC5CD6L7.js} +1 -1
  35. package/POS/{chunk-HBIQJRGD.js → chunk-BXL5U5L5.js} +1 -1
  36. package/POS/{chunk-TFDCBOE5.js → chunk-C25AMMEL.js} +1 -1
  37. package/POS/{chunk-56BG6XLD.js → chunk-CEVGPJ6Q.js} +1 -1
  38. package/POS/{chunk-SHAK4VGU.js → chunk-CIQESGL2.js} +1 -1
  39. package/POS/{chunk-ARQAQNHR.js → chunk-CNDELEHI.js} +1 -1
  40. package/POS/{chunk-ZLVTQ6XN.js → chunk-CNH6FQNG.js} +1 -1
  41. package/POS/chunk-COBW36UA.js +1 -0
  42. package/POS/{chunk-QSMJ3CBV.js → chunk-D4O6CWYT.js} +1 -1
  43. package/POS/{chunk-N5YCURY7.js → chunk-DGGJHY45.js} +1 -1
  44. package/POS/{chunk-B7BAQS3I.js → chunk-DNG4SY6V.js} +1 -1
  45. package/POS/{chunk-X3Y54425.js → chunk-DXSOXUET.js} +1 -1
  46. package/POS/{chunk-5XA3ENSB.js → chunk-EWFYOLC5.js} +1 -1
  47. package/POS/{chunk-5RSJEKRE.js → chunk-EX4JFUWB.js} +1 -1
  48. package/POS/{chunk-ULN6WM4O.js → chunk-G2LYBE3P.js} +1 -1
  49. package/POS/{chunk-T22RGKWY.js → chunk-G6BQ56VA.js} +1 -1
  50. package/POS/{chunk-TRYA3FSN.js → chunk-GCVHDO6C.js} +1 -1
  51. package/POS/{chunk-P3YS5JP7.js → chunk-GU2O5II3.js} +1 -1
  52. package/POS/{chunk-EJ4YXLOK.js → chunk-HCG7JPFR.js} +1 -1
  53. package/POS/{chunk-DRIPKN73.js → chunk-HF3XOMVP.js} +1 -1
  54. package/POS/{chunk-4O7TZOLO.js → chunk-HHIOVWS7.js} +1 -1
  55. package/POS/{chunk-U56DT3RM.js → chunk-HQS63BHC.js} +1 -1
  56. package/POS/{chunk-NJCXWOIB.js → chunk-HRCZMNUL.js} +1 -1
  57. package/POS/{chunk-PTMN4VWB.js → chunk-HYD6NEXR.js} +1 -1
  58. package/POS/{chunk-HBKFVG46.js → chunk-I7WCTUQ7.js} +1 -1
  59. package/POS/{chunk-WOCBBG4C.js → chunk-ISCQSVXB.js} +1 -1
  60. package/POS/{chunk-W7T7NQO7.js → chunk-IU2I4Z2R.js} +1 -1
  61. package/POS/{chunk-IMCIZDZT.js → chunk-IXUWWAZD.js} +1 -1
  62. package/POS/{chunk-SHMATFLF.js → chunk-JDXGIPIE.js} +1 -1
  63. package/POS/{chunk-GFUTNJ4H.js → chunk-JIK6RBKC.js} +1 -1
  64. package/POS/{chunk-S7JEQAP5.js → chunk-JNID24LK.js} +1 -1
  65. package/POS/{chunk-YZNFN2TF.js → chunk-K7AD5W3C.js} +1 -1
  66. package/POS/{chunk-XDGNI3SU.js → chunk-KCQWCJNS.js} +1 -1
  67. package/POS/{chunk-XKQUHECQ.js → chunk-KKEDUBQL.js} +1 -1
  68. package/POS/{chunk-7ASKC6UY.js → chunk-KOM2GPPO.js} +1 -1
  69. package/POS/{chunk-FTGX4LAF.js → chunk-KWKOC5MK.js} +1 -1
  70. package/POS/{chunk-EMR32IYD.js → chunk-KYPHICLN.js} +1 -1
  71. package/POS/{chunk-CCKK7ODT.js → chunk-LBYZCO2P.js} +1 -1
  72. package/POS/{chunk-KZZ2AB3Y.js → chunk-LCL5ZJDB.js} +1 -1
  73. package/POS/{chunk-27JE25V6.js → chunk-LD42WUA6.js} +1 -1
  74. package/POS/{chunk-XL6D24UY.js → chunk-LJHCM2ZZ.js} +1 -1
  75. package/POS/{chunk-W54O3IYY.js → chunk-LUKYQFSV.js} +1 -1
  76. package/POS/{chunk-NSEYADD7.js → chunk-LVM7N5KZ.js} +1 -1
  77. package/POS/{chunk-3DGZDZMX.js → chunk-LXEIKJ7F.js} +1 -1
  78. package/POS/{chunk-2OF3VDNV.js → chunk-M6BFLQNA.js} +1 -1
  79. package/POS/{chunk-IXSIBE5A.js → chunk-ME4JBR2O.js} +1 -1
  80. package/POS/{chunk-MQHXP2FJ.js → chunk-MECQC2PI.js} +1 -1
  81. package/POS/{chunk-EEUKWP2O.js → chunk-MHARY6AB.js} +1 -1
  82. package/POS/{chunk-SKVWXJMQ.js → chunk-MNZEGTC4.js} +1 -1
  83. package/POS/{chunk-X3QKWP2B.js → chunk-MPTSEJJY.js} +1 -1
  84. package/POS/{chunk-SLHDQ433.js → chunk-N3CC7L5P.js} +1 -1
  85. package/POS/{chunk-3LUFOR24.js → chunk-N46AV3L7.js} +1 -1
  86. package/POS/{chunk-QYP537EF.js → chunk-NH5IT3FQ.js} +1 -1
  87. package/POS/{chunk-I5SU3SF7.js → chunk-NI4BSNI6.js} +1 -1
  88. package/POS/{chunk-ZT4IMS55.js → chunk-NL7EPKYO.js} +1 -1
  89. package/POS/{chunk-2TKSXKGA.js → chunk-NPGWJEUH.js} +1 -1
  90. package/POS/{chunk-7XQ2KBNQ.js → chunk-NTRXNWG4.js} +1 -1
  91. package/POS/{chunk-SN5WX5RT.js → chunk-O2DUPXB6.js} +1 -1
  92. package/POS/{chunk-Y7TXKBW2.js → chunk-OFAVGTPP.js} +1 -1
  93. package/POS/{chunk-O3MYRMTN.js → chunk-OU5SN5ZR.js} +2 -2
  94. package/POS/{chunk-JKLCBHE3.js → chunk-OXNTXTLJ.js} +1 -1
  95. package/POS/{chunk-VOP2GOLN.js → chunk-P4K5GY5C.js} +1 -1
  96. package/POS/{chunk-UQONCANW.js → chunk-P6VV2GZN.js} +1 -1
  97. package/POS/{chunk-DVWRBKNM.js → chunk-P7CIXHVC.js} +1 -1
  98. package/POS/{chunk-GQ2G7GXX.js → chunk-PBY2MNTQ.js} +1 -1
  99. package/POS/{chunk-ZYBY2LGN.js → chunk-PKSFEMXX.js} +1 -1
  100. package/POS/chunk-PLIM3MDE.js +1 -0
  101. package/POS/{chunk-LGOITI3T.js → chunk-POO6NBAM.js} +1 -1
  102. package/POS/{chunk-5COSV647.js → chunk-QFDS63KU.js} +1 -1
  103. package/POS/{chunk-RK2GWM7N.js → chunk-QIFKL7OC.js} +1 -1
  104. package/POS/{chunk-3RAZLCV6.js → chunk-QKB5NJM4.js} +1 -1
  105. package/POS/{chunk-27LBF554.js → chunk-QKSUW7SV.js} +1 -1
  106. package/POS/{chunk-UZ3NDSL3.js → chunk-QUWHF6WD.js} +1 -1
  107. package/POS/chunk-QYTGIUYD.js +1 -0
  108. package/POS/{chunk-6RYC5THT.js → chunk-RLWXBPHQ.js} +1 -1
  109. package/POS/{chunk-ZF4F37EJ.js → chunk-S5NWP3CF.js} +1 -1
  110. package/POS/{chunk-JNG3FZZW.js → chunk-SA3U4FFR.js} +1 -1
  111. package/POS/{chunk-JRZWZJXF.js → chunk-SIPU2Z2R.js} +1 -1
  112. package/POS/{chunk-K2LHPAH7.js → chunk-SQSJIXGM.js} +1 -1
  113. package/POS/{chunk-U2IPG5DA.js → chunk-SSV5EXBE.js} +1 -1
  114. package/POS/{chunk-SXWJZTCV.js → chunk-SZBQZS35.js} +1 -1
  115. package/POS/{chunk-K62UCXV7.js → chunk-T7HXNFJL.js} +1 -1
  116. package/POS/{chunk-IUZD4Z6C.js → chunk-TDPQREZZ.js} +1 -1
  117. package/POS/{chunk-5BPEGH6H.js → chunk-TEMF3GGA.js} +1 -1
  118. package/POS/{chunk-ZSDHVFHF.js → chunk-TJ35M53U.js} +1 -1
  119. package/POS/{chunk-D3DRSY3T.js → chunk-TJPRURGT.js} +1 -1
  120. package/POS/{chunk-IJL53UGU.js → chunk-TMZXABPP.js} +1 -1
  121. package/POS/{chunk-SGW5PBOQ.js → chunk-TVNGNFKY.js} +1 -1
  122. package/POS/{chunk-M44P4BYW.js → chunk-TVPRZDVC.js} +1 -1
  123. package/POS/{chunk-GBXKEHMT.js → chunk-TXQOTG74.js} +1 -1
  124. package/POS/{chunk-UZSXYQIM.js → chunk-TZ6S2HTA.js} +1 -1
  125. package/POS/{chunk-3SCINMMF.js → chunk-USKW2XRV.js} +1 -1
  126. package/POS/{chunk-WXIIR2CB.js → chunk-UW76NGDL.js} +1 -1
  127. package/POS/{chunk-O7KEP3UE.js → chunk-UWS3J2P4.js} +1 -1
  128. package/POS/{chunk-Q5V2TUKG.js → chunk-V22XAS7J.js} +1 -1
  129. package/POS/{chunk-42EUUE7T.js → chunk-VAEPDAZJ.js} +1 -1
  130. package/POS/{chunk-5RL2OG5J.js → chunk-VKW6UQGS.js} +1 -1
  131. package/POS/{chunk-F672RX2W.js → chunk-VRVHW3KG.js} +1 -1
  132. package/POS/{chunk-W4L3UVVG.js → chunk-WJG4B7FY.js} +1 -1
  133. package/POS/{chunk-DPGWYG7W.js → chunk-WYG5HENA.js} +1 -1
  134. package/POS/{chunk-FSVZTDJS.js → chunk-WZ2A57UN.js} +1 -1
  135. package/POS/{chunk-Z7USZGOM.js → chunk-X5EHUDZH.js} +1 -1
  136. package/POS/{chunk-XYTOXGBD.js → chunk-XBDYWRWG.js} +1 -1
  137. package/POS/{chunk-HDKFRF3O.js → chunk-XEBZ33XB.js} +1 -1
  138. package/POS/{chunk-XZ2NHE7B.js → chunk-XGY47MIP.js} +1 -1
  139. package/POS/{chunk-LQS25GMS.js → chunk-XM4A3TAE.js} +1 -1
  140. package/POS/{chunk-UUJK76XY.js → chunk-XRTWHYXY.js} +1 -1
  141. package/POS/{chunk-DAD5BAVR.js → chunk-XTFV7SHM.js} +1 -1
  142. package/POS/{chunk-VDGYS3EN.js → chunk-XZ7W2TBF.js} +1 -1
  143. package/POS/{chunk-MJTCY2YX.js → chunk-Y2BKCEQ3.js} +1 -1
  144. package/POS/{chunk-ZXLUYQP7.js → chunk-Y4NYJCH4.js} +1 -1
  145. package/POS/{chunk-U7UF2WSR.js → chunk-YEUNFXGA.js} +1 -1
  146. package/POS/{chunk-7FGOW7H4.js → chunk-YHPQQ4E7.js} +1 -1
  147. package/POS/{chunk-ET2FVYOP.js → chunk-YL6ORJNP.js} +1 -1
  148. package/POS/{chunk-YL3CLAYM.js → chunk-ZPAIMRF5.js} +1 -1
  149. package/POS/{chunk-D5BU7TEQ.js → chunk-ZTD3RZPY.js} +1 -1
  150. package/POS/index.html +2 -2
  151. package/POS/{main-T3M2AXOD.js → main-NPFKIID3.js} +2 -2
  152. package/package.json +1 -1
  153. package/POS/chunk-2BCFLPYK.js +0 -1
  154. package/POS/chunk-4Z5PN4WN.js +0 -1
  155. package/POS/chunk-LHTDEUZF.js +0 -1
@@ -1,4 +1,4 @@
1
- import{b as ei,c as ti}from"./chunk-AMJ2GH6D.js";import{a as Jt,b as Xt}from"./chunk-Z7USZGOM.js";import{a as et}from"./chunk-MBW3PQR7.js";import{a as Qe}from"./chunk-5COSV647.js";import{a as Yt,b as Kt}from"./chunk-ULN6WM4O.js";import{d as Gt,e as $t}from"./chunk-I5SU3SF7.js";import{c as Ft,d as Vt}from"./chunk-D3DRSY3T.js";import{b as Ye}from"./chunk-XS5WWK2V.js";import"./chunk-3D6NIBVS.js";import{a as Bt,b as Lt}from"./chunk-5RSJEKRE.js";import{r as Xe,s as Qt}from"./chunk-WXIIR2CB.js";import"./chunk-UZSXYQIM.js";import{b as ne,c as qt}from"./chunk-QYP537EF.js";import"./chunk-5XA3ENSB.js";import{a as Nt,b as ue}from"./chunk-27JE25V6.js";import{l as Zt,m as zt}from"./chunk-ZT4IMS55.js";import"./chunk-U2IPG5DA.js";import"./chunk-DRIPKN73.js";import{a as W,d as $,e as de,f as ie,h as Q,i as Y,j as Rt}from"./chunk-DAD5BAVR.js";import{Aa as kt,za as ce}from"./chunk-56BG6XLD.js";import{G as Je,N as Ut,g as Ke,o as jt,s as Wt,v as Ht}from"./chunk-FTGX4LAF.js";import{d as Tt}from"./chunk-UQONCANW.js";import{d as De,e as At}from"./chunk-K62UCXV7.js";import"./chunk-ZF4F37EJ.js";import{B as Pt,C as Ot,c as q,h as R,i as we,k as Ee,n as j,o as Ie,w as Te,y as Dt,z as Ge}from"./chunk-M44P4BYW.js";import"./chunk-U56DT3RM.js";import"./chunk-JCMFETAK.js";import{b as $e}from"./chunk-NUZADJLK.js";import{a as N}from"./chunk-3F3GWS3L.js";import{$b as Ze,Ab as b,B as re,Bd as Se,Cb as s,Cc as yt,Cd as Me,Ed as pt,Fb as ke,Fc as Mt,Fd as Fe,Gb as vt,Hc as G,Hd as H,Ic as V,J as xt,Ka as k,Kd as P,La as he,Nc as wt,Pa as l,Pb as L,Pc as z,Qa as f,Qb as a,Rb as _,Rc as te,Sb as C,T as Be,Tb as Ce,Ub as mt,Uc as Et,Wa as We,Wb as M,X as J,Xb as w,Yb as E,Zb as Ct,_ as bt,aa as Le,ac as U,b as Ne,bb as pe,bc as ze,c as ft,d as Ae,db as d,ea as me,ed as It,fa as Re,fb as m,ha as ee,hb as He,hc as u,ia as St,ib as Ue,ic as v,jb as se,jc as O,kc as ye,ma as I,n as gt,na as je,nc as le,q as ae,rb as n,sb as i,ta as h,tb as g,u as ht,ua as x,ub as A,vb as B,xb as y,zd as qe}from"./chunk-KZZ2AB3Y.js";import{a as ut,b as _t}from"./chunk-HBPJYABI.js";function st(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var Ti="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Di="0123456789ABCDEFGHIJKLMNOPQRSTUV",Pi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function ct(t,c,e){e=e||{};let r,o;switch(c){case"RFC3548":case"RFC4648":r=Ti,o=!0;break;case"RFC4648-HEX":r=Di,o=!0;break;case"Crockford":r=Pi,o=!1;break;default:throw new Error("Unknown base32 variant: "+c)}let p=e.padding!==void 0?e.padding:o,S=st(t),T=0,D=0,ge="";for(let be=0;be<S.byteLength;be++)for(D=D<<8|S.getUint8(be),T+=8;T>=5;)ge+=r[D>>>T-5&31],T-=5;if(T>0&&(ge+=r[D<<5-T&31]),p)for(;ge.length%8!==0;)ge+="=";return ge}var ii=(()=>{class t{dialogRef;config;constructor(e){this.dialogRef=e}ngOnInit(){this.config=new Q,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=W.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(r){return new(r||t)(f($))};static \u0275cmp=I({type:t,selectors:[["POS-modal-confirmation-disabled"]],decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"p",2),a(4,"Are you sure you want to disable two factor authentication for your account? "),i()()()()),r&2&&m("config",o.config)},dependencies:[Y]})}return t})();function ki(t,c){if(t&1){let e=y();A(0),n(1,"div")(2,"div",3),a(3," Two Factor Authentication Status: "),n(4,"span",4),a(5,"Enabled"),i()()(),n(6,"div",5)(7,"button",6),b("click",function(){h(e);let o=s();return x(o.onDisableTotp())}),a(8,"Disable Two Factor Authentication"),i()(),B()}}function Fi(t,c){if(t&1){let e=y();n(0,"div",7)(1,"div",8)(2,"h4"),a(3,"Connect Your DealPOS account to an Authenticator Application"),i(),n(4,"p"),a(5,"Secure your login with One Time Password using an Authenticator Application!"),i()()(),n(6,"div",7)(7,"div",8)(8,"ol",9)(9,"li",10)(10,"h5"),a(11,"Download Authenticator application"),i(),n(12,"div",11)(13,"a",12),g(14,"img",13),a(15," Microsoft Authenticator "),i(),n(16,"a",14),g(17,"img",15),a(18," Google Authenticator "),i()()(),n(19,"li",16)(20,"h5"),a(21,"Scan the QR code below"),i(),n(22,"div",5),g(23,"qr-code",17),i()(),n(24,"li",16)(25,"h5"),a(26,"Validate your QR Code"),i(),n(27,"form",18),b("submit",function(){h(e);let o=s();return x(o.onValidate())}),n(28,"div")(29,"input",19),b("keypress",function(o){h(e);let p=s();return x(p.numberOnly(o))}),E("ngModelChange",function(o){h(e);let p=s();return w(p.validation2FA.ValidationCode,o)||(p.validation2FA.ValidationCode=o),x(o)}),i()(),n(30,"div",5)(31,"button",20),a(32,"Validate"),i()()()()()()()}if(t&2){let e=s();l(23),m("value",e.qrcodeContent)("size",265),l(6),M("ngModel",e.validation2FA.ValidationCode)}}var ni=(()=>{class t{document;authenticatorService;toastrService;dialog;qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;constructor(e,r,o,p){this.document=e,this.authenticatorService=r,this.toastrService=o,this.dialog=p,this.destroy$=new ft}ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let e=this.getDomainName(),r=this.generateRandomSecret();this.validation2FA.SecretKey=r;var o=N.parseJwt(localStorage.getItem("Token"));let p=o.LID;this.qrcodeContent=`otpauth://totp/${p}?secret=${r}&issuer=${e}`}generateRandomSecret(){let e=N.Guid_NewGuid(),r=new TextEncoder().encode(e);return ct(r,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(bt(this.destroy$)).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let e=!0;return N.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 N.numberOnly(e)}onDisableTotp(){this.dialog.open(ii).afterClosed().pipe(re(e=>N.IsNotEmpty(e)),J(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(r){return new(r||t)(f(yt),f(Qe),f(H),f(ie))};static \u0275cmp=I({type:t,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},decls:4,vars:2,consts:[["TOTP_ENABLED",""],[1,"container-fluid","mt-6"],[4,"ngIf","ngIfElse"],[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,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(r,o){if(r&1&&(n(0,"div",1),d(1,ki,9,0,"ng-container",2)(2,Fi,33,3,"ng-template",null,0,le),i()),r&2){let p=L(3);l(),m("ngIf",o.totpEnabled)("ngIfElse",p)}},dependencies:[V,Ie,q,R,we,j,Ee,Jt],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
1
+ import{b as ei,c as ti}from"./chunk-52APBBCP.js";import{a as Jt,b as Xt}from"./chunk-X5EHUDZH.js";import{a as et}from"./chunk-BC5CD6L7.js";import{a as Qe}from"./chunk-QFDS63KU.js";import{a as Yt,b as Kt}from"./chunk-G2LYBE3P.js";import{d as Gt,e as $t}from"./chunk-NI4BSNI6.js";import{c as Ft,d as Vt}from"./chunk-TJPRURGT.js";import{b as Ye}from"./chunk-33MEWIVY.js";import"./chunk-4CUGB6WL.js";import{a as Bt,b as Lt}from"./chunk-EX4JFUWB.js";import{r as Xe,s as Qt}from"./chunk-UW76NGDL.js";import"./chunk-TZ6S2HTA.js";import{b as ne,c as qt}from"./chunk-NH5IT3FQ.js";import"./chunk-EWFYOLC5.js";import{a as Nt,b as ue}from"./chunk-LD42WUA6.js";import{l as Zt,m as zt}from"./chunk-NL7EPKYO.js";import"./chunk-SSV5EXBE.js";import"./chunk-HF3XOMVP.js";import{a as W,d as $,e as de,f as ie,h as Q,i as Y,j as Rt}from"./chunk-XTFV7SHM.js";import{Aa as kt,za as ce}from"./chunk-CEVGPJ6Q.js";import{G as Je,N as Ut,g as Ke,o as jt,s as Wt,v as Ht}from"./chunk-KWKOC5MK.js";import{d as Tt}from"./chunk-P6VV2GZN.js";import{d as De,e as At}from"./chunk-T7HXNFJL.js";import"./chunk-S5NWP3CF.js";import{B as Pt,C as Ot,c as q,h as R,i as we,k as Ee,n as j,o as Ie,w as Te,y as Dt,z as Ge}from"./chunk-TVPRZDVC.js";import"./chunk-HQS63BHC.js";import"./chunk-46MDMCNP.js";import{b as $e}from"./chunk-72DTLQ67.js";import{a as N}from"./chunk-3F3GWS3L.js";import{$b as Ze,Ab as b,B as re,Bd as Se,Cb as s,Cc as yt,Cd as Me,Ed as pt,Fb as ke,Fc as Mt,Fd as Fe,Gb as vt,Hc as G,Hd as H,Ic as V,J as xt,Ka as k,Kd as P,La as he,Nc as wt,Pa as l,Pb as L,Pc as z,Qa as f,Qb as a,Rb as _,Rc as te,Sb as C,T as Be,Tb as Ce,Ub as mt,Uc as Et,Wa as We,Wb as M,X as J,Xb as w,Yb as E,Zb as Ct,_ as bt,aa as Le,ac as U,b as Ne,bb as pe,bc as ze,c as ft,d as Ae,db as d,ea as me,ed as It,fa as Re,fb as m,ha as ee,hb as He,hc as u,ia as St,ib as Ue,ic as v,jb as se,jc as O,kc as ye,ma as I,n as gt,na as je,nc as le,q as ae,rb as n,sb as i,ta as h,tb as g,u as ht,ua as x,ub as A,vb as B,xb as y,zd as qe}from"./chunk-LCL5ZJDB.js";import{a as ut,b as _t}from"./chunk-HBPJYABI.js";function st(t){if(t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray)return new DataView(t.buffer,t.byteOffset,t.byteLength);if(t instanceof ArrayBuffer)return new DataView(t);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var Ti="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Di="0123456789ABCDEFGHIJKLMNOPQRSTUV",Pi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function ct(t,c,e){e=e||{};let r,o;switch(c){case"RFC3548":case"RFC4648":r=Ti,o=!0;break;case"RFC4648-HEX":r=Di,o=!0;break;case"Crockford":r=Pi,o=!1;break;default:throw new Error("Unknown base32 variant: "+c)}let p=e.padding!==void 0?e.padding:o,S=st(t),T=0,D=0,ge="";for(let be=0;be<S.byteLength;be++)for(D=D<<8|S.getUint8(be),T+=8;T>=5;)ge+=r[D>>>T-5&31],T-=5;if(T>0&&(ge+=r[D<<5-T&31]),p)for(;ge.length%8!==0;)ge+="=";return ge}var ii=(()=>{class t{dialogRef;config;constructor(e){this.dialogRef=e}ngOnInit(){this.config=new Q,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=W.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(r){return new(r||t)(f($))};static \u0275cmp=I({type:t,selectors:[["POS-modal-confirmation-disabled"]],decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"p",2),a(4,"Are you sure you want to disable two factor authentication for your account? "),i()()()()),r&2&&m("config",o.config)},dependencies:[Y]})}return t})();function ki(t,c){if(t&1){let e=y();A(0),n(1,"div")(2,"div",3),a(3," Two Factor Authentication Status: "),n(4,"span",4),a(5,"Enabled"),i()()(),n(6,"div",5)(7,"button",6),b("click",function(){h(e);let o=s();return x(o.onDisableTotp())}),a(8,"Disable Two Factor Authentication"),i()(),B()}}function Fi(t,c){if(t&1){let e=y();n(0,"div",7)(1,"div",8)(2,"h4"),a(3,"Connect Your DealPOS account to an Authenticator Application"),i(),n(4,"p"),a(5,"Secure your login with One Time Password using an Authenticator Application!"),i()()(),n(6,"div",7)(7,"div",8)(8,"ol",9)(9,"li",10)(10,"h5"),a(11,"Download Authenticator application"),i(),n(12,"div",11)(13,"a",12),g(14,"img",13),a(15," Microsoft Authenticator "),i(),n(16,"a",14),g(17,"img",15),a(18," Google Authenticator "),i()()(),n(19,"li",16)(20,"h5"),a(21,"Scan the QR code below"),i(),n(22,"div",5),g(23,"qr-code",17),i()(),n(24,"li",16)(25,"h5"),a(26,"Validate your QR Code"),i(),n(27,"form",18),b("submit",function(){h(e);let o=s();return x(o.onValidate())}),n(28,"div")(29,"input",19),b("keypress",function(o){h(e);let p=s();return x(p.numberOnly(o))}),E("ngModelChange",function(o){h(e);let p=s();return w(p.validation2FA.ValidationCode,o)||(p.validation2FA.ValidationCode=o),x(o)}),i()(),n(30,"div",5)(31,"button",20),a(32,"Validate"),i()()()()()()()}if(t&2){let e=s();l(23),m("value",e.qrcodeContent)("size",265),l(6),M("ngModel",e.validation2FA.ValidationCode)}}var ni=(()=>{class t{document;authenticatorService;toastrService;dialog;qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;constructor(e,r,o,p){this.document=e,this.authenticatorService=r,this.toastrService=o,this.dialog=p,this.destroy$=new ft}ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let e=this.getDomainName(),r=this.generateRandomSecret();this.validation2FA.SecretKey=r;var o=N.parseJwt(localStorage.getItem("Token"));let p=o.LID;this.qrcodeContent=`otpauth://totp/${p}?secret=${r}&issuer=${e}`}generateRandomSecret(){let e=N.Guid_NewGuid(),r=new TextEncoder().encode(e);return ct(r,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(bt(this.destroy$)).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let e=!0;return N.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 N.numberOnly(e)}onDisableTotp(){this.dialog.open(ii).afterClosed().pipe(re(e=>N.IsNotEmpty(e)),J(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(e=>{this.toastrService.success(e.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(r){return new(r||t)(f(yt),f(Qe),f(H),f(ie))};static \u0275cmp=I({type:t,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},decls:4,vars:2,consts:[["TOTP_ENABLED",""],[1,"container-fluid","mt-6"],[4,"ngIf","ngIfElse"],[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,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(r,o){if(r&1&&(n(0,"div",1),d(1,ki,9,0,"ng-container",2)(2,Fi,33,3,"ng-template",null,0,le),i()),r&2){let p=L(3);l(),m("ngIf",o.totpEnabled)("ngIfElse",p)}},dependencies:[V,Ie,q,R,we,j,Ee,Jt],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
2
2
  `],encapsulation:2})}return t})();var dt=t=>({active:t}),oi=t=>({"is-invalid":t}),Ai=(t,c)=>({border:t,"border-danger":c}),Bi=t=>({"border-top-0":t});function Li(t,c){if(t&1){let e=y();n(0,"button",56),b("click",function(){h(e);let o=s(3);return x(o.validate())}),a(1,"Submit"),i()}if(t&2){s(2);let e=L(33);m("disabled",e==null||e.form==null?null:e.form.invalid)}}function Ri(t,c){if(t&1&&(A(0),d(1,Li,2,1,"button",55),B()),t&2){let e=s(2);l(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function ji(t,c){t&1&&(n(0,"small",60),a(1,"*Email is required"),i())}function Wi(t,c){t&1&&(n(0,"small",60),a(1,"*Enter a valid email address"),i())}function Hi(t,c){if(t&1&&(A(0),d(1,ji,2,0,"small",59)(2,Wi,2,0,"small",59),B()),t&2){s();let e=L(2);l(),m("ngIf",e.errors==null?null:e.errors.required),l(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function Ui(t,c){if(t&1){let e=y();n(0,"div",23)(1,"input",57,3),E("ngModelChange",function(o){h(e);let p=s(2);return w(p.formData.Email,o)||(p.formData.Email=o),x(o)}),i(),n(3,"label",58),a(4,"Email"),i(),d(5,Hi,3,2,"ng-container",6),i()}if(t&2){let e=L(2),r=s(2);l(),se(ze(5,Ai,e.touched&&e.invalid,e.touched&&e.invalid)),M("ngModel",r.formData.Email),m("disabled",!(r.roleService.users.View||r.roleService.profile.View)),l(4),m("ngIf",e.touched)}}function Zi(t,c){t&1&&(n(0,"small",60),a(1,"*Enter a valid email address"),i())}function zi(t,c){if(t&1&&(A(0),d(1,Zi,2,0,"small",59),B()),t&2){s();let e=L(2);l(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function qi(t,c){if(t&1){let e=y();n(0,"div",23)(1,"input",61,3),E("ngModelChange",function(o){h(e);let p=s(2);return w(p.formData.Email,o)||(p.formData.Email=o),x(o)}),i(),n(3,"label",58),a(4,"Email"),i(),d(5,zi,2,1,"ng-container",6),i()}if(t&2){let e=L(2),r=s(2);l(),m("disabled",!(r.roleService.users.View||r.roleService.profile.View)),M("ngModel",r.formData.Email),l(4),m("ngIf",e.touched)}}function Gi(t,c){t&1&&(n(0,"i",62),a(1," required."),i())}function $i(t,c){t&1&&(n(0,"div")(1,"i",62),a(2," These passwords don't match."),i()())}function Qi(t,c){if(t&1&&(n(0,"ul",63)(1,"li",64),a(2),i()()),t&2){let e=c.$implicit;l(2),_(e)}}function Yi(t,c){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td"),a(4),i(),n(5,"td"),a(6),i()()),t&2){let e=c.$implicit,r=c.index;l(2),_(r+1),l(2),_(e.Key),l(2),_(e.Value)}}function Ki(t,c){if(t&1&&(n(0,"ul",63)(1,"li",64),a(2),i()()),t&2){let e=c.$implicit;l(2),_(e)}}function Ji(t,c){if(t&1&&(n(0,"tr")(1,"td"),a(2),i(),n(3,"td"),a(4),i(),n(5,"td"),a(6),i()()),t&2){let e=c.$implicit,r=c.index;l(2),_(r+1),l(2),_(e.Key),l(2),_(e.Value)}}function Xi(t,c){if(t&1&&(n(0,"div",68)(1,"div",69),a(2),i()()),t&2){let e=c.$implicit,r=c.index;l(),se(U(3,Bi,r/4>=1)),l(),C(" ",e.Model," ")}}function en(t,c){if(t&1&&(n(0,"div",65)(1,"div",66),a(2),i(),n(3,"div",41)(4,"div",18),d(5,Xi,3,5,"div",67),i()()()),t&2){let e=c.$implicit;l(2),C(" ",e.Name," "),l(3),m("ngForOf",e.ListRole)}}function tn(t,c){if(t&1){let e=y();n(0,"button",78),b("click",function(){h(e);let o=s(3);return x(o.copyToClipboard())}),a(1," Copy to Clipboard"),i()}if(t&2){let e=s(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function nn(t,c){if(t&1){let e=y();n(0,"a",79),b("click",function(){h(e);let o=s(3);return x(o.preview("Profile/GenerateClientID"))}),a(1,"Generate"),i()}}function on(t,c){if(t&1&&(n(0,"div",19)(1,"div",73),g(2,"input",74),i()()),t&2){let e=s(3);l(2),m("value",e.formData.ClientSecret)}}function an(t,c){if(t&1){let e=y();n(0,"button",78),b("click",function(){h(e);let o=s(3);return x(o.copyToClipboard())}),a(1," Copy to Clipboard"),i()}if(t&2){let e=s(3);m("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function rn(t,c){if(t&1){let e=y();n(0,"a",79),b("click",function(){h(e);let o=s(3);return x(o.preview("Profile/GenerateClientSecret"))}),a(1,"Generate"),i()}}function ln(t,c){if(t&1&&(A(0),n(1,"div",70)(2,"h3"),a(3,"API Client ID"),i(),n(4,"small",71),a(5,"(developer.dealpos.com)"),i()(),n(6,"div",72)(7,"div",19)(8,"div",73),g(9,"input",74),i()(),n(10,"div",19)(11,"div",23),d(12,tn,2,2,"button",75)(13,nn,2,0,"a",76),i()()(),n(14,"div",70)(15,"h3"),a(16,"API Client Secret"),i(),n(17,"small",71),a(18,"(developer.dealpos.com)"),i()(),n(19,"div",72),d(20,on,3,1,"div",77),n(21,"div",19)(22,"div",23),d(23,an,2,2,"button",75)(24,rn,2,0,"a",76),i()()(),B()),t&2){let e=s(2);l(9),m("value",e.formData.ClientID),l(3),m("ngIf",e.formData.ClientID),l(),m("ngIf",e.roleService.users.View||e.roleService.profile.View),l(7),m("ngIf",e.formData.ClientSecret),l(3),m("ngIf",e.formData.ClientSecret),l(),m("ngIf",e.roleService.users.View||e.roleService.profile.View)}}function mn(t,c){t&1&&(n(0,"div",80)(1,"h4"),a(2,"You have no access to view this info, please contact your administrator to view this tab information"),i()())}function pn(t,c){if(t&1){let e=y();n(0,"mainpanel-cmp",5)(1,"actions"),d(2,Ri,2,1,"ng-container",6),i(),n(3,"content")(4,"div",7)(5,"div")(6,"ul",8)(7,"li",9)(8,"a",10),b("click",function(){h(e);let o=s();return x(o.onSelectTab("GENERAL"))}),a(9,"General"),i()(),n(10,"li",9)(11,"a",11),b("click",function(){h(e);let o=s();return x(o.onSelectTab("SECURITY"))}),a(12,"Security"),i()(),n(13,"li",9)(14,"a",12),b("click",function(){h(e);let o=s();return x(o.onSelectTab("ROLES"))}),a(15,"Roles"),i()(),n(16,"li",9)(17,"a",13),b("click",function(){h(e);let o=s();return x(o.onSelectTab("API"))}),a(18,"Developer API"),i()(),n(19,"li",9)(20,"a",14),b("click",function(){h(e);let o=s();return x(o.onSelectTab("TOTP"))}),a(21,"TOTP"),i()()(),n(22,"div",15)(23,"div",16)(24,"div",17)(25,"div",18)(26,"div",19)(27,"div",20)(28,"div",21)(29,"h2"),a(30,"General Credential"),i()(),n(31,"div",22)(32,"form",null,0)(34,"div",23)(35,"input",24),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.FirstName,o)||(p.formData.FirstName=o),x(o)}),i(),n(36,"label",25),a(37,"First Name"),i()(),n(38,"div",23)(39,"input",26),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.LastName,o)||(p.formData.LastName=o),x(o)}),i(),n(40,"label",27),a(41,"Last Name"),i()(),n(42,"div",23)(43,"input",28),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.LoginID,o)||(p.formData.LoginID=o),x(o)}),i(),n(44,"label",29),a(45,"Username"),i()(),d(46,Ui,6,8,"div",30)(47,qi,6,3,"div",30),i()()()(),n(48,"div",19)(49,"div",20)(50,"div",21)(51,"h2"),a(52,"Change Password"),i(),n(53,"small",31),a(54,"Leave blank if you do not want to change"),i()(),n(55,"div",22)(56,"div",23)(57,"input",32,1),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.NewPassword,o)||(p.formData.NewPassword=o),x(o)}),i(),n(59,"label",33),a(60,"Password"),i(),d(61,Gi,2,0,"i",34),i(),n(62,"div",23)(63,"input",35),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.RePassword,o)||(p.formData.RePassword=o),x(o)}),i(),n(64,"label",36),a(65,"Re-Password"),i(),d(66,$i,3,0,"div",6),i()()()()()()(),n(67,"div",37)(68,"div",38)(69,"div",39)(70,"h5",40),a(71,"Group"),i(),n(72,"i"),a(73,"Profile Groups"),i()(),n(74,"div",41)(75,"div",18),d(76,Qi,3,1,"ul",42),i()()(),n(77,"div",43)(78,"div",44)(79,"h5",40),a(80,"Outlets"),i(),n(81,"i"),a(82,"Profile Outlets"),i()(),n(83,"div",41)(84,"div",18)(85,"div")(86,"table",45)(87,"thead",46)(88,"tr")(89,"th"),a(90,"No"),i(),n(91,"th"),a(92,"Outlet"),i(),n(93,"th"),a(94,"Access"),i()()(),n(95,"tbody"),d(96,Yi,7,3,"tr",47),i()()()()()()(),n(97,"div",48)(98,"div",38)(99,"div",39)(100,"h5",40),a(101,"Group"),i(),n(102,"i"),a(103,"Profile Groups"),i()(),n(104,"div",41)(105,"div",18),d(106,Ki,3,1,"ul",42),i()()(),n(107,"div",43)(108,"div",44)(109,"h5",40),a(110,"Outlets"),i(),n(111,"i"),a(112,"Profile Outlets"),i()(),n(113,"div",41)(114,"div",18)(115,"div")(116,"table",45)(117,"thead",46)(118,"tr")(119,"th"),a(120,"No"),i(),n(121,"th"),a(122,"Outlet"),i(),n(123,"th"),a(124,"Access"),i()()(),n(125,"tbody"),d(126,Ji,7,3,"tr",47),i()()()()()()(),n(127,"div",49),d(128,en,6,2,"div",50),i(),n(129,"div",51),d(130,ln,25,6,"ng-container",52)(131,mn,3,0,"ng-template",null,2,le),i(),n(133,"div",53),g(134,"POS-setup-2FA",54),i()()()()()()}if(t&2){let e=L(58),r=L(132),o=s();m("pageData",o.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),m("ngIf",o.activeTab=="GENERAL"),l(6),m("ngClass",U(31,dt,o.activeTab=="GENERAL")),l(3),m("ngClass",U(33,dt,o.activeTab=="SECURITY")),l(12),m("ngClass",U(35,dt,o.activeTab=="GENERAL")),l(12),M("ngModel",o.formData.FirstName),m("disabled",!(o.roleService.users.View||o.roleService.profile.View)),l(4),M("ngModel",o.formData.LastName),m("disabled",!(o.roleService.users.View||o.roleService.profile.View)),l(4),M("ngModel",o.formData.LoginID),m("disabled",!(o.roleService.users.View||o.roleService.profile.View)),l(3),m("ngIf",o.data.EmailRequired),l(),m("ngIf",!o.data.EmailRequired),l(10),m("ngClass",U(37,oi,e.touched&&e.invalid)),M("ngModel",o.formData.NewPassword),m("disabled",!(o.roleService.users.View||o.roleService.profile.View)),l(4),m("ngIf",e.touched&&e.invalid),l(2),M("ngModel",o.formData.RePassword),m("ngClass",U(39,oi,o.formData.NewPassword!=o.formData.RePassword))("disabled",!(o.roleService.users.View||o.roleService.profile.View)),l(3),m("ngIf",o.formData.NewPassword!=o.formData.RePassword),l(10),m("ngForOf",o.data.Security.Groups),l(20),m("ngForOf",o.data.Security.Outlets),l(10),m("ngForOf",o.data.Security.Groups),l(20),m("ngForOf",o.data.Security.Outlets),l(2),m("ngForOf",o.data.Role),l(2),m("ngIf",o.roleService.developer.Api)("ngIfElse",r),l(4),m("totpEnabled",o.totpEnabled)}}var ai=(()=>{class t extends et{toastr;dialog;authenticatorService;roleService;tooltipText="Copy to Clipboard";totpEnabled;activeTab="GENERAL";constructor(e,r,o,p,S,T,D){super(e,r,"Profile/MyProfileFormInitial",o),this.toastr=p,this.dialog=S,this.authenticatorService=T,this.roleService=D}postBindForm(e){this.totpEnabled=e?.Form?.TOTPEnabled}validate(){if(this.formData.NewPassword!=this.formData.RePassword){this.toastr.error("Password and re-enter password must be equal.",W.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",W.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:r=>{this.data.Form=r},error:r=>{this.toastr.error(r,W.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}static \u0275fac=function(r){return new(r||t)(f(ue),f(P),f(qe),f(H),f(ie),f(Qe),f($e))};static \u0275cmp=I({type:t,selectors:[["POS-my-profile"]],features:[pe],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["REQUIRED_ROLE_API",""],["email","ngModel"],[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,"click","ngClass"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"click","ngClass"],["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"],[1,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputName"],["class","form-floating-outline",4,"ngIf"],[1,"text-body-secondary","h6"],["type","password","id","inputPassword","name","password","placeholder","Password","required","",1,"form-control",3,"ngModelChange","ngClass","ngModel","disabled"],["for","inputPassword"],["class","control-label text-danger",4,"ngIf"],["type","password","id","inputrepassword","placeholder","Re-Password","required","",1,"form-control",3,"ngModelChange","ngModel","ngClass","disabled"],["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"],[4,"ngIf","ngIfElse"],["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,"click","disabled"],["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,"ngModelChange","ngModel","disabled"],["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,"ngModelChange","disabled","ngModel"],[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","border-start-0"],[1,"d-flex","align-items-center"],[1,"text-body-secondary","h6","ms-2"],[1,"row","d-flex","align-items-center"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],["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"],["class","col-sm-6",4,"ngIf"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"click","matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm",3,"click"],[1,"d-flex","justify-content-center","align-items-center","p-12"]],template:function(r,o){r&1&&d(0,pn,135,41,"mainpanel-cmp",4),r&2&&m("ngIf",o.data&&o.formData)},dependencies:[Mt,G,V,Ie,q,R,we,Te,Ge,j,Ee,ne,ce,ei,ni]})}return t})();var cn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],dn=t=>({ID:t});function un(t,c){t&1&&(n(0,"th",22),a(1," @@ Cost "),i())}function _n(t,c){if(t&1&&(n(0,"span",39),a(1),u(2,"number"),i()),t&2){let e=s().$implicit;l(),_(" - Profit: "+v(2,1,e.Profit))}}function fn(t,c){if(t&1&&(n(0,"small"),a(1),i()),t&2){let e=s(2).$implicit;l(),C("( ",e.Commissions[0].Quantity," unit )")}}function gn(t,c){if(t&1&&(n(0,"i",52),a(1),d(2,fn,2,1,"small",53),i()),t&2){let e=s().$implicit;l(),C("sold by ",e.Commissions[0].SalesName," "),l(),m("ngIf",e.Commissions[0].Quantity<e.Quantity)}}function hn(t,c){if(t&1&&(n(0,"li")(1,"i"),a(2),i()()),t&2){let e=c.$implicit;l(2),C("( ",e.Quantity+" unit by "+e.SalesName," )")}}function xn(t,c){if(t&1&&(n(0,"ul",54)(1,"li")(2,"i"),a(3,"sold by"),i()(),d(4,hn,3,1,"li",19),i()),t&2){let e=s().$implicit;l(4),m("ngForOf",e.Commissions)}}function bn(t,c){if(t&1&&(n(0,"th",55),a(1),u(2,"number"),i()),t&2){let e=s().$implicit;l(),_(v(2,1,e.UnitCost))}}function Sn(t,c){if(t&1&&(n(0,"tr")(1,"th",40)(2,"div")(3,"span",41),a(4),i(),d(5,gn,3,2,"i",42)(6,xn,5,1,"ul",43),g(7,"span",44),u(8,"newlines"),i()(),n(9,"th",45),a(10),i(),n(11,"th",46),a(12),u(13,"number"),i(),n(14,"th",47),a(15),i(),d(16,bn,3,3,"th",48),n(17,"th",49),a(18),u(19,"number"),i(),n(20,"th",50),a(21),i(),n(22,"th",51),a(23),u(24,"number"),i()()),t&2){let e=c.$implicit,r=s(3);l(4),_(e.Name),l(),m("ngIf",e.Commissions.length==1),l(),m("ngIf",e.Commissions.length>1),l(),m("innerHTML",v(8,11,e.Note),k),l(3),_(e.Code),l(2),_(v(13,13,e.Quantity)),l(3),_(e.UOMName),l(),m("ngIf",r.roleService.product.Cost),l(2),_(v(19,15,e.UnitPrice)),l(3),_(e.Discount==0?"":e.Discount+"%"),l(2),_(v(24,17,e.Total))}}function vn(t,c){if(t&1&&(n(0,"tr")(1,"th",56),a(2,"\xA0"),i(),g(3,"th",57)(4,"th",58)(5,"th",59)(6,"th",16),n(7,"th",60),a(8),i(),n(9,"th",61),a(10),i(),n(11,"th",62),a(12),u(13,"number"),i()()),t&2){let e=c.$implicit;l(8),C("",e.Label," :"),l(2),_(e.CurrencySymbol),l(2),_(v(13,3,e.Amount))}}function Cn(t,c){if(t&1&&(n(0,"div")(1,"div",23)(2,"div",24)(3,"a",25),g(4,"span",26),u(5,"date"),g(6,"small",27),u(7,"date"),i(),n(8,"span"),a(9),u(10,"showIfNotNullOrEmptyString"),i(),g(11,"span",28),n(12,"strong",29),a(13),u(14,"sum"),u(15,"number"),n(16,"span"),a(17),u(18,"showIfNotNullOrEmptyString"),i()(),d(19,_n,3,3,"span",30),n(20,"i",31),a(21),i(),n(22,"span",32),a(23),i(),n(24,"span",33),a(25),i()(),n(26,"div",34),g(27,"label",35),i()(),n(28,"table",36),g(29,"thead"),n(30,"tbody",37),d(31,Sn,25,19,"tr",19),i()(),n(32,"table",38),d(33,vn,14,5,"tr",19),i()()),t&2){let e=c.$implicit,r=s(2);l(3),m("routerLink",Ze(31,cn))("queryParams",U(32,dn,e.ID)),l(),m("innerHTML",e.EntityName+" #"+e.Number+" - "+O(5,14,e.Date,"dd MMM yyyy"),k),l(2),m("innerHTML","("+O(7,17,e.Created,"HH:mm")+")",k),l(3),_(O(10,20,e.CustomerNameDisplay," - {0}")),l(4),C(" ","[Q: "+O(14,23,e.Items,"Quantity")+", T: "+v(15,26,e.Final)+"]"," "),l(4),_(O(18,28,e.SalesName," - Sales: {0}")),l(2),m("ngIf",r.roleService.report.Profit),l(2),_(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),l(2),_(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),l(2),_(e.SONote==null?"":": "+e.SONote),l(2),m("innerHTML",e.PaymentStateLabel,k),l(4),m("ngForOf",e.Items),l(2),m("ngForOf",e.Aggregate)}}function yn(t,c){if(t&1&&(n(0,"div")(1,"strong"),a(2,"Cost ("),g(3,"span",67),u(4,"number"),a(5,"%)"),i(),g(6,"span",65),u(7,"number"),i()),t&2){let e=s(3);l(3),m("innerHTML",v(4,2,e.data.Aggregate.CostRatio),k),l(3),m("innerHTML",v(7,4,e.data.Aggregate.Cost),k)}}function Mn(t,c){if(t&1&&(n(0,"div")(1,"strong")(2,"span"),a(3,"Profit"),i(),a(4," ("),g(5,"span",67),u(6,"number"),a(7,"%)"),i(),g(8,"span",65),u(9,"number"),i()),t&2){let e=s(3);l(5),m("innerHTML",v(6,2,e.data.Aggregate.ProfitRatio),k),l(3),m("innerHTML",v(9,4,e.data.Aggregate.Profit),k)}}function wn(t,c){if(t&1&&(n(0,"div",63)(1,"div",64)(2,"div")(3,"strong"),a(4,"Tax Added"),i(),g(5,"span",65),u(6,"number"),i(),n(7,"div")(8,"strong"),a(9,"Sales with Tax"),i(),g(10,"span",65),u(11,"number"),i()(),n(12,"div",66)(13,"div")(14,"strong"),a(15,"Orders"),i(),g(16,"span",65),u(17,"number"),i(),n(18,"div")(19,"strong"),a(20,"Qty"),i(),g(21,"span",65),u(22,"number"),i()(),n(23,"div",66)(24,"div")(25,"strong"),a(26,"Gross Sales"),i(),g(27,"span",65),u(28,"number"),i(),n(29,"div")(30,"strong"),a(31,"Discount"),i(),g(32,"span",65),u(33,"number"),i(),n(34,"div")(35,"strong"),a(36,"Tax Incl."),i(),g(37,"span",65),u(38,"number"),i(),n(39,"div")(40,"strong"),a(41,"Net Sales"),i(),g(42,"span",65),u(43,"number"),i(),d(44,yn,8,6,"div",53)(45,Mn,10,6,"div",53),i()()),t&2){let e=s(2);l(5),m("innerHTML",v(6,10,e.data.Aggregate.TaxAdd),k),l(5),m("innerHTML",v(11,12,e.data.Aggregate.SalesWithTax),k),l(6),m("innerHTML",v(17,14,e.data.Aggregate.Orders),k),l(5),m("innerHTML",v(22,16,e.data.Aggregate.ItemsQuantity),k),l(6),m("innerHTML",v(28,18,e.data.Aggregate.GrossItems),k),l(5),m("innerHTML",v(33,20,e.data.Aggregate.Discount),k),l(5),m("innerHTML",v(38,22,e.data.Aggregate.TaxInclude),k),l(5),m("innerHTML",v(43,24,e.data.Aggregate.SalesWithoutTax),k),l(2),m("ngIf",e.roleService.product.Cost),l(),m("ngIf",e.roleService.report.Profit)}}function En(t,c){if(t&1){let e=y();n(0,"mainpanel-cmp",1),b("onSubmit",function(){h(e);let o=s();return x(o.searchFromPageOne())}),n(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),a(6,"Type"),i(),n(7,"ng-select",4),E("ngModelChange",function(o){h(e);let p=s();return w(p.pageData.Filter.TypeID,o)||(p.pageData.Filter.TypeID=o),x(o)}),i()(),n(8,"div")(9,"h6"),a(10,"Customer"),i(),n(11,"autocompleteV2",5),b("onInputChange",function(o){h(e);let p=s();return x(p.resetCustomer(o))})("onSelect",function(o){h(e);let p=s();return x(p.onSelectCustomer(o))}),i()(),n(12,"div")(13,"h6"),a(14,"From"),i(),n(15,"datepicker",6),E("dateChange",function(o){h(e);let p=s();return w(p.pageData.Filter.From,o)||(p.pageData.Filter.From=o),x(o)}),i()(),n(16,"div")(17,"h6"),a(18,"To"),i(),n(19,"datepicker",7),E("dateChange",function(o){h(e);let p=s();return w(p.pageData.Filter.To,o)||(p.pageData.Filter.To=o),x(o)}),i()()()()(),n(20,"content")(21,"div",8)(22,"table",9)(23,"thead",10)(24,"tr")(25,"th",11),a(26," Name "),i(),n(27,"th",12),a(28," Code "),i(),n(29,"th",13),a(30," Qty "),i(),n(31,"th",14),a(32," UOM "),i(),d(33,un,2,0,"th",15),n(34,"th",16),a(35," @@ Price "),i(),n(36,"th",17),a(37," % "),i(),n(38,"th",18),a(39," Total "),i()()()(),d(40,Cn,34,34,"div",19)(41,wn,46,26,"div",20),n(42,"POS-complex-pagination",21),b("jumpToPage",function(){h(e);let o=s();return x(o.getListData())})("previousPage",function(){h(e);let o=s();return x(o.getListData())})("nextPage",function(){h(e);let o=s();return x(o.getListData())}),i()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0),l(7),m("items",e.pageData.Options.Types),M("ngModel",e.pageData.Filter.TypeID),l(8),M("date",e.pageData.Filter.From),l(4),M("date",e.pageData.Filter.To),l(14),m("ngIf",e.roleService.product.Cost),l(7),m("ngForOf",e.data.Data),l(),m("ngIf",e.data.Data&&e.data.Data.length>0),l(),m("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var mi=(()=>{class t extends Ye{roleService;constructor(e,r,o){super(e,r,"Report/MySales","ReportLoader/MyActivity"),this.roleService=o}onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}static \u0275fac=function(r){return new(r||t)(f(ue),f(P),f($e))};static \u0275cmp=I({type:t,selectors:[["POS-my-sales"]],features:[pe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[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,"jumpToPage","previousPage","nextPage","total","pageData"],["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(r,o){r&1&&d(0,En,43,11,"mainpanel-cmp",0),r&2&&m("ngIf",o.data)},dependencies:[G,V,R,j,Me,ne,Xe,De,Yt,Zt,te,z,Ke,jt,Wt]})}return t})();function In(t,c){t&1&&(n(0,"small",17),a(1,"*Enter a valid phone number"),i())}function Tn(t,c){if(t&1&&(A(0),d(1,In,2,0,"small",16),B()),t&2){s();let e=L(9);l(),m("ngIf",e.errors==null?null:e.errors.pattern)}}function Dn(t,c){t&1&&(n(0,"small",17),a(1,"*Enter a valid email address"),i())}function Pn(t,c){if(t&1&&(A(0),d(1,Dn,2,0,"small",16),B()),t&2){s();let e=L(16);l(),m("ngIf",e.errors==null?null:e.errors.pattern)}}var pi=(()=>{class t{httpService;dialogRef;data;toastr;router;config=new Q;constructor(e,r,o,p,S){this.httpService=e,this.dialogRef=r,this.data=o,this.toastr=p,this.router=S,this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}onOk(e){if(e!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",W.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(r=>{this.toastr.success(r,W.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(r){return new(r||t)(f(P),f($),f(de),f(H),f(Se))};static \u0275cmp=I({type:t,selectors:[["POS-modal-subscribe"]],decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[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,"ngModelChange","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,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],["class","text-danger",4,"ngIf"],[1,"text-danger"]],template:function(r,o){if(r&1){let p=y();n(0,"modal-material",3),b("onOk",function(T){return h(p),x(o.onOk(T))})("onCancel",function(){return h(p),x(o.dialogRef.close())})("onClose",function(){return h(p),x(o.dialogRef.close())}),n(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),E("ngModelChange",function(T){return h(p),w(o.data.form.Phone,T)||(o.data.form.Phone=T),x(T)}),i(),n(10,"label",9),a(11,"Phone*"),i(),d(12,Tn,2,1,"ng-container",10),i()(),n(13,"div",6)(14,"div",7)(15,"input",11,2),E("ngModelChange",function(T){return h(p),w(o.data.form.Email,T)||(o.data.form.Email=T),x(T)}),i(),n(17,"label",12),a(18,"Email*"),i(),d(19,Pn,2,1,"ng-container",10),i()()(),n(20,"div",5)(21,"div",13)(22,"div",7)(23,"textarea",14),E("ngModelChange",function(T){return h(p),w(o.data.form.Note,T)||(o.data.form.Note=T),x(T)}),i(),n(24,"label",15),a(25,"Note"),i()()()()()()()()}if(r&2){let p=L(9),S=L(16);m("dynamicValidated",(p==null?null:p.valid)||(S==null?null:S.valid))("config",o.config),l(8),M("ngModel",o.data.form.Phone),l(4),m("ngIf",p.touched&&p.dirty),l(3),M("ngModel",o.data.form.Email),l(4),m("ngIf",S.touched&&S.dirty),l(4),M("ngModel",o.data.form.Note)}},dependencies:[V,Ie,q,R,we,Te,Ge,j,Ee,Y,ce]})}return t})();function On(t,c){if(t&1){let e=y();n(0,"div",23),b("click",function(){let o=h(e).$implicit,p=s(2);return x(p.onCycleChange(o.key))}),n(1,"div",24)(2,"span",25),a(3),i(),g(4,"div",26),i()()}if(t&2){let e=c.$implicit,r=s(2);se(e.key==r.formData.Cycle?"active":""),l(3),_(e.dicount),l(),m("innerHTML",e.desc,k)}}function kn(t,c){if(t&1){let e=y();n(0,"tr")(1,"th",27),a(2,"Register"),i(),n(3,"td"),a(4,":"),i(),n(5,"td")(6,"input",28),E("ngModelChange",function(o){h(e);let p=s(2);return w(p.formData.Register,o)||(p.formData.Register=o),x(o)}),b("ngModelChange",function(){h(e);let o=s(2);return x(o.onQtyRegisterChange())}),i(),n(7,"span"),a(8),u(9,"number"),i()()()}if(t&2){let e=s(2);l(6),m("preventNegative",!0),M("ngModel",e.formData.Register),l(2),C("/ ",v(9,3,e.data.Options.Register),"")}}function Fn(t,c){if(t&1){let e=y();n(0,"div",7)(1,"div",29)(2,"div",9)(3,"h2",10),a(4,"Setup Fee "),i(),n(5,"small",11),a(6,"(One-time payment)"),i()()(),n(7,"div",30)(8,"table",31)(9,"tr")(10,"th"),a(11,"POS"),i(),n(12,"td"),a(13,"\xA0:"),i(),n(14,"td")(15,"label",32)(16,"radio-options",33),E("modelChange",function(o){h(e);let p=s(2);return w(p.data.Options.SetupFee,o)||(p.data.Options.SetupFee=o),x(o)}),b("modelChange",function(){h(e);let o=s(2);return x(o.calculateSetupFee())}),i()()()()()()()}if(t&2){let e=s(2);l(16),M("model",e.data.Options.SetupFee)}}function Vn(t,c){t&1&&(A(0),a(1,"s "),B())}function Nn(t,c){if(t&1&&(n(0,"tr")(1,"td")(2,"strong"),a(3,"Additional Register"),i(),n(4,"p")(5,"small",40),a(6),i()()(),n(7,"td",36),a(8),i(),n(9,"td",37),g(10,"span",39),a(11),u(12,"number"),i(),n(13,"td",38),a(14),i(),n(15,"td",37),g(16,"span",39),a(17),u(18,"number"),i()()),t&2){let e=s(4);l(6),Ce("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),l(2),_(e.formData.Cycle),l(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(12,8,e.data.Options.Register)),l(3),C(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),l(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(18,10,e.registerFee))}}function An(t,c){if(t&1&&(n(0,"tr")(1,"td")(2,"strong")(3,"span"),a(4,"POS"),i()(),n(5,"p")(6,"small",40),a(7," - Consultation "),g(8,"br"),a(9," - Training 2x "),g(10,"br"),a(11," - 1 Month Support Group"),i()()(),g(12,"td",36),n(13,"td",37)(14,"span"),a(15,"IDR "),i(),a(16),u(17,"number"),i(),g(18,"td",38),n(19,"td",37)(20,"span"),a(21,"IDR "),i(),a(22),u(23,"number"),i()()),t&2){let e=s(4);l(16),_(v(17,2,e.formData.Setup)),l(6),_(v(23,4,e.formData.Setup))}}function Bn(t,c){if(t&1&&(A(0),n(1,"tr")(2,"td")(3,"strong"),g(4,"span",39),i(),n(5,"p")(6,"small",40),a(7),d(8,Vn,2,0,"ng-container",17),i()()(),n(9,"td",36),a(10),i(),n(11,"td",37),g(12,"span",39),a(13),u(14,"number"),i(),n(15,"td",38),a(16),i(),n(17,"td",37),g(18,"span",39),a(19),u(20,"number"),i()(),d(21,Nn,19,12,"tr",17)(22,An,24,6,"tr",17),B()),t&2){let e=s(3);l(4),m("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",k),l(3),C(" ",e.formData.Qty," Outlet"),l(),m("ngIf",e.formData.Qty>1),l(2),_(e.formData.Cycle),l(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(14,11,e.data.Options.Type)),l(3),C(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),l(2),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(20,13,e.outletFee)),l(2),m("ngIf",e.formData.Register>0),l(),m("ngIf",e.data.Options.SetupFee)}}function Ln(t,c){if(t&1&&(A(0),n(1,"div",41)(2,"table",42)(3,"tr")(4,"th"),a(5,"Sub Total"),i(),n(6,"td",43),a(7,":"),i(),n(8,"td",37)(9,"strong"),g(10,"span",39),a(11),u(12,"number"),i()()(),n(13,"tr")(14,"th"),a(15,"Tax (11%)"),i(),n(16,"td",43),a(17,":"),i(),n(18,"td",37)(19,"strong"),g(20,"span",39),a(21),u(22,"number"),i()()(),n(23,"tr")(24,"th"),a(25,"Total"),i(),n(26,"td",43),a(27,":"),i(),n(28,"td",37)(29,"strong"),g(30,"span",39),a(31),u(32,"number"),i()()()()(),B()),t&2){let e=s(3);l(10),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(12,6,e.subTotal)),l(9),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(22,8,e.subTotal*.11)),l(9),m("innerHTML",e.data.Options.Setup?"IDR ":"$ ",k),l(),_(v(32,10,e.subTotal+e.subTotal*.11))}}function Rn(t,c){if(t&1&&(n(0,"div",30)(1,"table",34)(2,"thead",35)(3,"tr")(4,"th"),a(5,"Product"),i(),n(6,"th",36),a(7,"Month"),i(),n(8,"th",37),a(9,"Price"),i(),n(10,"th",38),a(11,"Disc"),i(),n(12,"th",37),a(13,"Total"),i()()(),n(14,"tbody"),d(15,Bn,23,15,"ng-container",17),i()(),d(16,Ln,33,12,"ng-container",17),i()),t&2){let e=s(2);l(15),m("ngIf",(e.formData==null?null:e.formData.Qty)>0),l(),m("ngIf",(e.formData==null?null:e.formData.Qty)>0)}}function jn(t,c){t&1&&(n(0,"div",7)(1,"div",29)(2,"h2"),a(3,'Your payment currency is "IDR"'),i()(),n(4,"div",30)(5,"div",44)(6,"div",45)(7,"h2",46)(8,"button",47),a(9," I Want to pay in USD "),i()(),n(10,"div",48)(11,"div",49)(12,"ol",50)(13,"li",51),a(14," Go to setup menu"),i(),n(15,"li",51),a(16," Click tab currency"),i(),n(17,"li",51),a(18," Select the currency you want to make for payment"),i(),n(19,"li",51),a(20," Select Yes at primary currency box and click save"),i(),n(21,"li",52),a(22," Then you can check to my subscribe again "),i()(),n(23,"p",53),a(24,"For more detailed information, please check the following article: "),n(25,"a",54),a(26,"Added Currency Conversion"),i()()()()()()()())}function Wn(t,c){if(t&1){let e=y();n(0,"mainpanel-cmp",2)(1,"actions")(2,"button",3),b("click",function(){h(e);let o=s();return x(o.onOpenSubscribeDialog())}),a(3,"Subscribe Now"),i()(),n(4,"content")(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"h2",10),a(12,"Subscribe "),i(),n(13,"small",11),a(14,"(Recurring)"),i()(),n(15,"a",12),b("click",function(){h(e);let o=s();return x(o.showRegister=!o.showRegister)}),a(16,"More"),i()(),n(17,"div",13)(18,"table",14)(19,"tr")(20,"th"),a(21,"Outlets"),i(),n(22,"td"),a(23,":"),i(),n(24,"td")(25,"input",15,0),E("ngModelChange",function(o){h(e);let p=s();return w(p.formData.Qty,o)||(p.formData.Qty=o),x(o)}),b("ngModelChange",function(){h(e);let o=s();return x(o.onQtyOutletChange())}),i(),n(27,"span"),a(28),u(29,"number"),i()()(),n(30,"tr")(31,"th"),a(32,"Cycle"),i(),n(33,"td"),a(34,":"),i(),n(35,"td"),d(36,On,5,4,"div",16),i()(),d(37,kn,10,5,"tr",17),i()()(),d(38,Fn,17,1,"div",18),i(),n(39,"div",19)(40,"div",7)(41,"div",20),b("click",function(){h(e);let o=s();return x(o.invoice=!o.invoice)}),n(42,"h2",21),a(43,"Invoice Preview"),i()(),d(44,Rn,17,2,"div",22),i(),d(45,jn,27,0,"div",18),i()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),l(2),m("disabled",e.formData.Qty==0),l(23),m("preventNegative",!0),M("ngModel",e.formData.Qty),l(3),C("/ ",v(29,13,e.data.Type[0].amount),""),l(8),m("ngForOf",e.data.DiscountOptions),l(),m("ngIf",e.showRegister),l(),m("ngIf",e.data.Options.Setup),l(6),m("ngIf",e.invoice),l(),m("ngIf",e.data.Options.Setup)}}var nt=function(t){return t[t.Monthly=1]="Monthly",t[t.ThreeMonth=3]="ThreeMonth",t[t.SixMonth=6]="SixMonth",t[t.Yearly=12]="Yearly",t}(nt||{}),si=(()=>{class t extends et{matDialog;showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;constructor(e,r,o,p){super(e,r,"Subscription/MySubscriptionLoader",o),this.matDialog=p}postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(pi,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case nt.ThreeMonth:this.formData.Discount=0;break;case nt.SixMonth:this.formData.Discount=10;break;case nt.Yearly:this.formData.Discount=15;break}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){if(this.formData.Cycle>1){let e=this.data.Options.Type*this.formData.Qty*this.formData.Cycle;this.data.Discount=e*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}else 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;if(this.formData.Discount>0){let r=e*this.formData.Discount/100;this.registerFee=e-r}else this.registerFee=e}static \u0275fac=function(r){return new(r||t)(f(ue),f(P),f(qe),f(ie))};static \u0275cmp=I({type:t,selectors:[["POS-choose-plan"]],features:[pe],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","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,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"card-body"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[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/8956190-how-to-create-new-currency","target","_blank"]],template:function(r,o){r&1&&d(0,Wn,46,15,"mainpanel-cmp",1),r&2&&m("ngIf",o.data&&o.formData)},dependencies:[G,V,q,R,Dt,j,ne,Bt,Gt,ce,te],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})}return t})();var ci=(()=>{class t{dialogRef;data;router;config=new Q;constructor(e,r,o){this.dialogRef=e,this.data=r,this.router=o,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()}static \u0275fac=function(r){return new(r||t)(f($),f(de),f(Se))};static \u0275cmp=I({type:t,selectors:[["POS-modal-choose-plan"]],decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"text-center",2,"width","440px"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"h4",1),a(3),n(4,"span"),a(5,"Do you want to Choose your Plan ?"),i()()()()),r&2&&(m("config",o.config),l(3),C(" ",o.data.body," "))},dependencies:[Y]})}return t})();var di=(()=>{class t{httpService;dialogRef;data;toastr;message="";config=new Q;constructor(e,r,o,p){this.httpService=e,this.dialogRef=r,this.data=o,this.toastr=p,this.config.title="Confim Adjusted Subscription"}onOk(){let e={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",W.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",e).subscribe(r=>{this.toastr.success(r.Message,W.Success),this.dialogRef.close()})}static \u0275fac=function(r){return new(r||t)(f(P),f($),f(de),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-modal-confirm-adjusted-plan"]],decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[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,"ngModelChange","ngModel"],["for","inputAddress"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"p",1),a(3," Do you agree about billing adjusted? "),i(),n(4,"div",2)(5,"textarea",3),E("ngModelChange",function(S){return w(o.message,S)||(o.message=S),S}),i(),n(6,"label",4),a(7,"Reason"),i()()()()),r&2&&(m("config",o.config),l(5),M("ngModel",o.message))},dependencies:[q,R,Te,j,Y,ce]})}return t})();var ot=(()=>{class t{httpService;dialogRef;data;toastr;message="";config=new Q;constructor(e,r,o,p){this.httpService=e,this.dialogRef=r,this.data=o,this.toastr=p,this.config.title="Stop Subscription"}onOk(){let e={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",W.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",JSON.stringify(e)).subscribe(r=>{this.toastr.success(r.Message,W.Error),this.dialogRef.close()})}static \u0275fac=function(r){return new(r||t)(f(P),f($),f(de),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-modal-stop-subscription"]],decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","250px","height","102px",3,"ngModelChange","ngModel"],["for","message"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.dialogRef.close()})("onClose",function(){return o.dialogRef.close()}),n(1,"content")(2,"div",1)(3,"textarea",2),E("ngModelChange",function(S){return w(o.message,S)||(o.message=S),S}),i(),n(4,"label",3),a(5,"Reason"),i()()()()),r&2&&(m("config",o.config),l(3),M("ngModel",o.message))},dependencies:[q,R,j,Y]})}return t})();var at=(()=>{class t{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new Ne(e=>{let r;this.injected||(r=document.createElement("script"),r.src=this.apiUrl,r.async=!0,r.setAttribute("data-client-key",Fe.midtransClientKey),this.injected=!0,document.body.appendChild(r))})}static \u0275fac=function(r){return new(r||t)};static \u0275prov=me({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Hn=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],Un=(t,c)=>({"bg-warning":t,"bg-danger":c}),Zn=t=>({"background-color":t}),zn=t=>({"bg-gradient-warning":t});function qn(t,c){t&1&&(n(0,"a",35),a(1,"Choose Your Plan"),i()),t&2&&m("routerLink",Ze(1,Hn))}function Gn(t,c){if(t&1&&(n(0,"div",16),a(1),u(2,"date"),i()),t&2){let e=s(2);l(),C(" ",O(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function $n(t,c){if(t&1&&(n(0,"div",36)(1,"div",37)(2,"h5",13),a(3," Subscription "),i(),n(4,"div",16),a(5),i()()()),t&2){let e=s(2);l(),se(ze(3,Un,e.data.Zoho.Subscription.SubscriptionState=="SellOnly"||e.data.Zoho.Subscription.SubscriptionState=="Overdue",e.data.Zoho.Subscription.SubscriptionState=="Suspended")),l(4),C(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function Qn(t,c){if(t&1&&(n(0,"span",42),a(1),u(2,"number"),i()),t&2){let e=s(3);l(),C("",v(2,1,e.data.Zoho.Subscription.Discount)," %")}}function Yn(t,c){if(t&1&&(n(0,"span")(1,"del"),a(2),u(3,"number"),i(),g(4,"br"),i()),t&2){let e=s(3);l(2),_(v(3,1,e.data.Zoho.Subscription.TotalAmount))}}function Kn(t,c){if(t&1&&(n(0,"div",6)(1,"div",7)(2,"h2"),a(3,"Current Plan"),i()(),n(4,"div",28)(5,"table",29)(6,"thead",30)(7,"tr")(8,"th",38),a(9,"Usage"),i(),n(10,"th",38),a(11,"Frequency"),i(),n(12,"th",39),a(13,"Amount"),i()()(),n(14,"tbody")(15,"tr")(16,"td",40),a(17),g(18,"br"),a(19),u(20,"number"),n(21,"small"),a(22,"month"),i(),a(23,") "),i(),n(24,"td",40)(25,"span"),a(26),g(27,"br"),i(),d(28,Qn,3,3,"span",41),i(),n(29,"td",40),d(30,Yn,5,3,"span",19),n(31,"span"),a(32),u(33,"number"),i()()()()()()()),t&2){let e=s(2);l(17),C(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),l(2),C(" (",v(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),l(7),_(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==1?"Monthly":e.data.Zoho.Subscription.Frequency==3?"3 Months":"6 Months"),l(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),l(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),l(2),_(v(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function Jn(t,c){if(t&1&&(n(0,"span",42),a(1),u(2,"number"),i()),t&2){let e=s(3);l(),C("",v(2,1,e.data.Zoho.Subscription.Discount)," %")}}function Xn(t,c){if(t&1&&(n(0,"span")(1,"del"),a(2),u(3,"number"),i(),g(4,"br"),i()),t&2){let e=s(3);l(2),_(v(3,1,e.data.NextBilling.TotalAmount))}}function eo(t,c){if(t&1){let e=y();n(0,"div",6)(1,"div",7)(2,"div")(3,"h2"),a(4,"Adjusted Plan"),i()(),n(5,"div",43)(6,"button",44),b("click",function(){h(e);let o=s(2);return x(o.onOpenConfirmAdjustedModal())}),a(7," Confirm "),i()()(),n(8,"div",28)(9,"table",29)(10,"thead",30)(11,"tr")(12,"th",38),a(13,"Usage"),i(),n(14,"th",38),a(15,"Frequency"),i(),n(16,"th",39),a(17,"Amount"),i()()(),n(18,"tbody")(19,"tr")(20,"td",40),a(21),g(22,"br"),a(23),u(24,"number"),n(25,"small"),a(26,"month"),i(),a(27,") "),i(),n(28,"td",40)(29,"span"),a(30),g(31,"br"),i(),d(32,Jn,3,3,"span",41),i(),n(33,"td",40),d(34,Xn,5,3,"span",19),n(35,"span"),a(36),u(37,"number"),i()()()()()()()}if(t&2){let e=s(2);l(21),C(" ",e.data.NextBilling.Outlet," Outlet"),l(2),C(" (",v(24,6,e.data.NextBilling.RecurringAmount)," / "),l(7),_(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),l(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),l(2),m("ngIf",e.data.Zoho.Subscription.Discount!=0),l(2),_(v(37,8,e.data.NextBilling.TotalAfterDiscount))}}function to(t,c){if(t&1&&(n(0,"tr")(1,"th",47),a(2,"Withholding Tax"),i(),n(3,"td"),a(4,":"),i(),n(5,"td"),a(6),i()()),t&2){let e=s(3);l(6),C(" ",e.data.Zoho.WHTPercentage," % ")}}function io(t,c){if(t&1&&(n(0,"tr")(1,"th",47),a(2,"Document Link"),i(),n(3,"td"),a(4,":"),i(),n(5,"td")(6,"a",48),g(7,"i",49),a(8," Upload "),i()()()),t&2){let e=s(3);l(6),ke("href",e.data.Zoho.DocumentLink,he)}}function no(t,c){if(t&1&&(A(0),n(1,"div",6)(2,"div",7)(3,"h2"),g(4,"i",45),a(5,"Tax Information"),i()(),n(6,"div",9)(7,"table",46),d(8,to,7,1,"tr",19)(9,io,9,1,"tr",19),i()()(),B()),t&2){let e=s(2);l(8),m("ngIf",e.data.Zoho.WHTPercentage>0),l(),m("ngIf",e.data.Zoho.DocumentLink)}}function oo(t,c){if(t&1){let e=y();n(0,"a",62),b("click",function(){h(e);let o=s(3);return x(o.payAllInvoice())}),g(1,"i",63),a(2),u(3,"Filter"),u(4,"sum"),u(5,"Filter"),u(6,"sum"),u(7,"number"),i()}if(t&2){let e=s(3);l(2),C(" Pay All ~ IDR ",v(7,15,O(4,5,ye(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+O(6,12,ye(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function ao(t,c){if(t&1&&(n(0,"p",68),a(1),u(2,"number"),i()),t&2){let e=s().$implicit;l(),C("(",v(2,1,e.balance)," due)")}}function ro(t,c){if(t&1&&(A(0),n(1,"a",69),g(2,"i",70),n(3,"span",71),a(4,"View"),i()(),B()),t&2){let e=s().$implicit;l(),ke("href",e.invoice_url,he)}}function lo(t,c){if(t&1){let e=y();A(0),n(1,"button",72),b("click",function(){h(e);let o=s().$implicit,p=s(3);return x(p.paySingleInvoice(o))}),g(2,"i",63),n(3,"span",71),a(4,"Pay Now"),i()(),B()}if(t&2){let e=s().$implicit;l(),vt("id","pay-button",e.invoice_number,"")}}function mo(t,c){if(t&1&&(n(0,"tr",64)(1,"td"),a(2),i(),n(3,"td"),a(4),u(5,"date"),i(),n(6,"td"),a(7),i(),n(8,"td",57),a(9),u(10,"number"),d(11,ao,3,3,"p",65),i(),n(12,"td"),a(13),i(),n(14,"td",66),a(15),i(),n(16,"td",67),d(17,ro,5,1,"ng-container",19)(18,lo,5,2,"ng-container",19),i()()),t&2){let e=c.$implicit,r=c.index;Ue(U(16,Zn,e.status=="overdue"?"#f2dede":"")),l(2),_(r+1+"."),l(2),_(O(5,11,e.date,"dd MMM yyyy")),l(3),_(e.invoice_number),l(2),C(" ",v(10,14,e.total)," "),l(2),m("ngIf",e.total!=e.balance&&e.balance>0),l(2),_(e.currency_code),l(2),_(e.status),l(2),m("ngIf",e.status!="draft"&&e.status!="void"),l(),m("ngIf",(e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR")}}function po(t,c){if(t&1&&(n(0,"div",6)(1,"div",7)(2,"div",50)(3,"h2",51),g(4,"i",52),a(5," Invoices"),i()(),d(6,oo,8,17,"a",53),i(),n(7,"div",28)(8,"table",54)(9,"thead",30)(10,"tr")(11,"th",31),a(12,"No"),i(),n(13,"th",55),a(14,"Date"),i(),n(15,"th",56),a(16,"Number"),i(),n(17,"th",57),a(18,"Amount"),i(),g(19,"th",58),n(20,"th",59),a(21,"Status"),i(),n(22,"th"),a(23,"Invoice"),i()()(),n(24,"tbody"),d(25,mo,19,18,"tr",60),i()(),n(26,"p",61),a(27," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),i()()()),t&2){let e=s(2);l(6),m("ngIf",e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"),l(19),m("ngForOf",e.data.Zoho.invoices)}}function so(t,c){if(t&1){let e=y();n(0,"button",73),b("click",function(){h(e);let o=s(2);return x(o.load())}),a(1," Load "),i()}}function co(t,c){if(t&1&&(n(0,"tr",64)(1,"td"),a(2),i(),n(3,"td"),a(4),i(),n(5,"td",57),a(6),u(7,"number"),i(),n(8,"td",57),a(9),i(),n(10,"td",57),a(11),u(12,"date"),i(),n(13,"td",57),a(14),u(15,"date"),i()()),t&2){let e=c.$implicit,r=c.index;l(2),_(r+1+"."),l(2),_(e.Name),l(),se(U(16,zn,e.OrdersCount<25)),l(),C(" ",v(7,8,e.OrdersCount),""),l(3),_(e.RegisterCount),l(2),_(O(12,10,e.MinDate,"dd MMM yyyy")),l(3),_(O(15,13,e.MaxDate,"dd MMM yyyy"))}}function uo(t,c){if(t&1){let e=y();n(0,"mainpanel-cmp",1)(1,"actions"),d(2,qn,2,2,"a",2),i(),n(3,"content")(4,"div",3)(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",7)(9,"h2"),g(10,"i",8),a(11," Account"),i()(),n(12,"div",9)(13,"div",10)(14,"div",11)(15,"div",12)(16,"h5",13),a(17," Since "),i(),d(18,Gn,3,4,"div",14),i()(),n(19,"div",15)(20,"div",12)(21,"h5",13),a(22," Type "),i(),n(23,"div",16),a(24),i()()(),d(25,$n,6,6,"div",17),i()()(),d(26,Kn,34,10,"div",18)(27,eo,38,10,"div",18)(28,no,10,2,"ng-container",19),n(29,"div",6)(30,"div",7)(31,"h2"),g(32,"i",20),a(33," Close Store"),i()(),n(34,"div",9)(35,"div"),a(36," You can close your store to stop your billing. "),i(),n(37,"div",21)(38,"button",22),b("click",function(){h(e);let o=s();return x(o.onOpenCloseModal())}),a(39," Close "),i()()()()(),n(40,"div",23),d(41,po,28,2,"div",18),n(42,"div",6)(43,"div",24)(44,"h2"),g(45,"i",25),a(46," Outlets Usage "),n(47,"small",26),a(48),u(49,"date"),u(50,"date"),i()(),d(51,so,2,0,"button",27),i(),n(52,"div",28)(53,"table",29)(54,"thead",30)(55,"tr")(56,"th",31),a(57,"No"),i(),n(58,"th"),a(59,"Outlet Name"),i(),n(60,"th",32),a(61,"Orders"),i(),n(62,"th",32),a(63,"Registers"),i(),n(64,"th",33),a(65,"Min Date"),i(),n(66,"th",33),a(67,"Max Date"),i()()(),n(68,"tbody"),d(69,co,16,18,"tr",34),u(70,"sortBy"),i()()()()()()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),m("ngIf",e.data.Account.Type=="Trial"),l(16),m("ngIf",e.data.Zoho.Subscription),l(6),C(" ",e.data.Account.Type," "),l(),m("ngIf",e.data.Zoho.CustomerID!=null),l(),m("ngIf",e.data.Zoho.Subscription!=null),l(),m("ngIf",e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount),l(),m("ngIf",e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink),l(13),m("ngIf",e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0),l(7),Ce("(",O(49,15,e.data.From,"dd MMM yyyy")," - ",O(50,18,e.data.To,"dd MMM yyyy"),")"),l(3),m("ngIf",e.data.Outlets.length==0),l(18),m("ngForOf",ye(70,21,e.data.Outlets,"desc","OrdersCount"))}}var _i=(()=>{class t extends Nt{httpService;matDialog;midtrans;ngZone;toastr;modalTitle;modalBody;data;loadOutlet=!1;outstandingInvoiceCount=0;constructor(e,r,o,p,S,T){super(e),this.httpService=r,this.matDialog=o,this.midtrans=p,this.ngZone=S,this.toastr=T,this.data=null}ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){let e={LoadOutlet:this.loadOutlet};this.httpService.post("/API/Subscription/GetData",e).subscribe({next:r=>{this.data=r,N.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(r)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],e.Zoho.code!=200&&(e.Zoho.code==401?this.modalTitle="Trial Customer":e.Zoho.code==400&&(this.modalTitle="your account customer"),e.Zoho.message==null?this.modalBody=e.Zoho.message:this.modalBody=e.Zoho.message,this.matDialog.open(ci,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(r=>{(r.status=="sent"||r.status=="overdue")&&this.outstandingInvoiceCount++})}showToaster(e){var r="Payment Successful!";e>1&&(r+=`
3
3
  Please Log out and re-login if your account is currently suspended!`),this.toastr.success(r,W.Success)}payAllInvoice(){let e=0,r,o,p,S;this.data.Zoho.invoices.forEach(D=>{(D.status=="sent"||D.status=="overdue")&&(e+=D.total,o==null?(r=D.invoice_number,o=D.invoice_number.concat("$"+D.total+";"),p=D.invoice_id,S=D.invoice_id.concat("$"+D.total+";")):(r=r.concat("_"+D.invoice_number),o=o.concat(D.invoice_number.concat("$"+D.total+";")),p=p.concat(";"+D.invoice_id),S=S.concat(D.invoice_id.concat("$"+D.total)+";")))});let T={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:o,OrderID:r,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:S};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",T).subscribe(D=>{this.openSNAPDialog(D)})}paySingleInvoice(e){let r={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:e.invoice_id,CustomerID:e.customer_id};this.httpService.post("/API/Subscription/GetSNAPToken",r).subscribe(o=>{this.openSNAPDialog(o)})}openSNAPDialog(e){let r=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:o=>{this.ngZone.run(()=>{this.showToaster(r),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(ot)}onOpenConfirmAdjustedModal(){this.matDialog.open(di)}load(){this.loadOutlet=!0,this.getData()}static \u0275fac=function(r){return new(r||t)(f(ue),f(P),f(ie),f(at),f(We),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-my-subscription"]],features:[pe],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"],[4,"ngIf"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],["class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],["class","border",4,"ngFor","ngForOf"],[1,"btn","btn-success",3,"routerLink"],[1,"col","ps-0","pe-3"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],["class","text-danger",4,"ngIf"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"fa-solid","fa-file-circle-plus"],[1,"table-sm","table-borderless"],[2,"width","103px"],["target","_blank",1,"btn","btn-light","btn-sm",2,"height","32px",3,"href"],[1,"fa","fa-upload"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["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"],[1,"pt-3"],["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"],[1,"fst-italic","text-warning"],["target","_blank",3,"href"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],[2,"border-width","1px",3,"click","id"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(r,o){r&1&&d(0,uo,71,25,"mainpanel-cmp",0),r&2&&m("ngIf",o.data)},dependencies:[G,V,Me,ne,ce,te,z,Ke,Ht,Je]})}return t})();function _o(t,c){t&1&&(n(0,"div",13)(1,"h5",14),g(2,"i",15),a(3," You are not listening to any outlet. Please select one. "),i()())}function fo(t,c){if(t&1&&(n(0,"div",16)(1,"h5",14),g(2,"i",15),a(3),i()()),t&2){let e=s(2);l(3),C(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function go(t,c){if(t&1&&(n(0,"div",9)(1,"div",10),d(2,_o,4,0,"div",11)(3,fo,4,1,"div",12),i()()),t&2){let e=s();l(2),m("ngIf",!e.selectedOutlet),l(),m("ngIf",e.selectedOutlet)}}var fi=(()=>{class t{signalrClientService;httpService;dialogRef;toastr;modalConfig;entities;outletID;selectedOutlet;initialOutlet;touchOnSelectOption;previousSelectedOutlet;constructor(e,r,o,p){this.signalrClientService=e,this.httpService=r,this.dialogRef=o,this.toastr=p,this.modalConfig=new Q,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(re(e=>N.IsNotEmpty(e))).subscribe(e=>{this.entities=e.Options.Entities,N.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,N.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(){let e=this.initialOutlet?this.initialOutlet.ID:null;this.outletID!==e?N.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,r){let o=localStorage.getItem("PushNotificationID"),p={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",p).subscribe(S=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",o),this.setLocalStorage(),this.toastr.success(e,r),this.dialogRef.close()})}setLocalStorage(e=!1){e?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID)}findOutletByID(e){return this.entities.find(o=>o.ID==e)}static \u0275fac=function(r){return new(r||t)(f(Tt),f(P),f($),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-modal-subscribe-notification"]],decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[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,"open","clear","ngModelChange","change","items","ngModel"],[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(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.onOk()})("onCancel",function(){return o.onCancel()})("onClose",function(){return o.onCancel()}),n(1,"content")(2,"div",1),d(3,go,4,2,"div",2),n(4,"div",3)(5,"div",4)(6,"h5",5),a(7,"Outlet"),i()(),n(8,"div",6)(9,"div",7)(10,"ng-select",8),b("open",function(){return o.onOpenSelectOutlet()})("clear",function(){return o.onOpenSelectOutlet()}),E("ngModelChange",function(S){return w(o.outletID,S)||(o.outletID=S),S}),b("change",function(S){return o.onSelectOutlet(S)}),i()()()()()()()),r&2&&(m("config",o.modalConfig),l(3),m("ngIf",!o.touchOnSelectOption),l(7),m("items",o.entities),M("ngModel",o.outletID))},dependencies:[V,R,j,Y,De]})}return t})();var ho=t=>({ID:t});function xo(t,c){if(t&1&&(n(0,"a",18),a(1),i()),t&2){let e=s().$implicit;m("routerLink","/menu"+e.URL)("queryParams",U(3,ho,e.ObjectID)),l(),C(" ",e.Body," ")}}function bo(t,c){if(t&1&&(n(0,"a",19),a(1),i()),t&2){let e=s().$implicit;ke("href",e.URL,he),l(),C(" ",e.Body," ")}}function So(t,c){if(t&1&&(n(0,"tr",15)(1,"td"),a(2),i(),n(3,"td")(4,"b"),a(5),i(),g(6,"br"),n(7,"span"),d(8,xo,2,5,"a",16)(9,bo,2,2,"a",17),i()(),n(10,"td"),a(11),u(12,"date"),i(),n(13,"td"),a(14),i()()),t&2){let e=c.$implicit;l(2),_(e.OutletName),l(3),_(e.Header),l(3),m("ngIf",e.ObjectIDType>0),l(),m("ngIf",e.ObjectIDType==0),l(2),_(O(12,6,e.Created,"dd MMM yyyy HH:mm")),l(3),_(e.TypeString)}}function vo(t,c){if(t&1){let e=y();n(0,"mat-paginator",20),b("page",function(o){h(e);let p=s(2);return x(p.onPaginationChange(o))}),i()}if(t&2){let e=s(2);m("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Co(t,c){if(t&1){let e=y();n(0,"mainpanel-cmp",1),b("onSubmit",function(){h(e);let o=s();return x(o.searchFromPageOne())}),n(1,"actions")(2,"a",2),b("click",function(){h(e);let o=s();return x(o.openSubscribeModal())}),a(3,"Subscribe"),i()(),n(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),a(9,"Outlet"),i(),n(10,"ng-select",5),E("ngModelChange",function(o){h(e);let p=s();return w(p.pageData.Filter.ListIDs,o)||(p.pageData.Filter.ListIDs=o),x(o)}),i()(),n(11,"div")(12,"h6"),a(13,"From"),i(),n(14,"datepicker",6),E("dateChange",function(o){h(e);let p=s();return w(p.pageData.Filter.From,o)||(p.pageData.Filter.From=o),x(o)}),i()(),n(15,"div")(16,"h6"),a(17,"To"),i(),n(18,"datepicker",7),E("dateChange",function(o){h(e);let p=s();return w(p.pageData.Filter.To,o)||(p.pageData.Filter.To=o),x(o)}),i()()()()(),n(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),a(25,"Outlet"),i(),n(26,"th"),a(27,"Message"),i(),n(28,"th"),a(29,"Created"),i(),n(30,"th"),a(31,"Type"),i()()(),n(32,"tbody"),d(33,So,15,9,"tr",13),i()(),n(34,"div"),d(35,vo,1,3,"mat-paginator",14),i()()()()}if(t&2){let e=s();m("pageData",e.menuData)("hideSearchBox",!0),l(10),m("items",e.pageData.Options.Entities),M("ngModel",e.pageData.Filter.ListIDs),m("multiple",!0),l(4),M("date",e.pageData.Filter.From),l(4),M("date",e.pageData.Filter.To),l(15),m("ngForOf",e.data.Data),l(2),m("ngIf",e.pagination.listTotal>0)}}var gi=(()=>{class t extends Ye{dialog;constructor(e,r,o){super(e,r,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList"),this.dialog=o}preInitList(){let e=new Date;e.setHours(0,0,0,0);let r=new Date;r.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=r}openSubscribeModal(){this.dialog.open(fi)}static \u0275fac=function(r){return new(r||t)(f(ue),f(P),f(ie))};static \u0275cmp=I({type:t,selectors:[["POS-notification"]],features:[pe],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","onSubmit",4,"ngIf"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[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,"page","length","pageSize","pageIndex"]],template:function(r,o){r&1&&d(0,Co,36,9,"mainpanel-cmp",0),r&2&&m("ngIf",o.data)},dependencies:[G,V,R,j,Me,ne,Ft,Xe,De,z]})}return t})();var fe=(()=>{class t{_loadSubscriptionData=new Ae(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(e){this.subscriptionData$=this.loadSubscriptionData$.pipe(J(()=>e.get("/API/Subscription/GetInitialData").pipe(Le(r=>{let o=0;r.Subscription?.SubscriptionState=="Overdue"?o=1:r.Subscription?.SubscriptionState=="Sell Only"?o=2:r.Subscription?.SubscriptionState=="Suspended"&&(o=3),N.IsNotEmpty(r.Subscription)&&(r.Subscription.SubscriptionStatus=o)}))),Be(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(ae(r=>r.invoices.filter(o=>(o.status=="sent"||o.status=="overdue")&&o.currency_code=="IDR")),ae(r=>r.length>0?r[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(r){return new(r||t)(ee(P))};static \u0275prov=me({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var lt=(()=>{class t{constructor(e,r){e.subscriptionData$.pipe(re(p=>p.code!=200),J(()=>gt(r.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(r){return new(r||t)(ee(fe),ee(Se))};static \u0275prov=me({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Oe=(()=>{class t{outlets$;from$;to$;_isLoadOutlet=new Ae(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(re(e=>e));showLoadButton$;constructor(e,r){let o=this.isLoadOutlet$.pipe(J(()=>e.post("/API/Subscription/GetUsage").pipe()),Be(1));this.outlets$=o.pipe(ae(p=>p.Outlets)),this.from$=o.pipe(ae(p=>p.From)),this.to$=o.pipe(ae(p=>p.To)),r.subscriptionData$.pipe(re(p=>p.Subscription?.OutletCount<=Fe.outletMaximumSubscription),Le(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=ht(r.subscriptionData$.pipe(ae(p=>p.Subscription?.OutletCount>Fe.outletMaximumSubscription),xt(1)),o.pipe(ae(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(r){return new(r||t)(ee(P),ee(fe))};static \u0275prov=me({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var xi=(()=>{class t{http;ngZone;toastr;constructor(e,r,o){this.http=e,this.ngZone=r,this.toastr=o}payInvoice(e,r,o,p){let S={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:r,VATEnabled:o,InvoiceID:e.invoice_id,CustomerID:e.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",S).pipe(J(T=>this.openSNAPDialog(T,p)))}payAllInvoices(e,r,o,p){let S=0,T,D,ge,be;e.forEach(Z=>{(Z.status=="sent"||Z.status=="overdue")&&(S+=Z.total,D==null?(T=Z.invoice_number,D=Z.invoice_number.concat("$"+Z.total+";"),ge=Z.invoice_id,be=Z.invoice_id.concat("$"+Z.total+";")):(T=T.concat("_"+Z.invoice_number),D=D.concat(Z.invoice_number.concat("$"+Z.total+";")),ge=ge.concat(";"+Z.invoice_id),be=be.concat(Z.invoice_id.concat("$"+Z.total)+";")))});let Ii={CustomerID:e[0].customer_id,InvNumber:D,OrderID:T,GrossAmount:S,WHTPercentage:r,VATEnabled:o,InvoiceID:be};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Ii).pipe(J(Z=>this.openSNAPDialog(Z,p)))}openSNAPDialog(e,r){let o=r;return new Ne(p=>{snap.pay(e.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(o),p.next(),p.complete()})}})})}showToaster(e){let r="Payment Successful!";e>1&&(r+=`
4
4
  Please Log out and re-login if your account is currently suspended!`),this.toastr.success(r,W.Success)}static \u0275fac=function(r){return new(r||t)(ee(P),ee(We),ee(H))};static \u0275prov=me({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var wo=t=>({"background-color":t});function Eo(t,c){if(t&1){let e=y();n(0,"button",12),b("click",function(){h(e);let o=s();return x(o.payAllInvoices())}),a(1),u(2,"number"),i()}if(t&2){let e=s();l(),C("PAY ALL - ",e.currency+" "+v(2,1,e.totalPayable),"")}}function Io(t,c){if(t&1&&(n(0,"a",22),a(1),i()),t&2){let e=s().$implicit;m("href",e.invoice_url,he),l(),_(e.invoice_number)}}function To(t,c){if(t&1&&(n(0,"span"),a(1),i()),t&2){let e=s().$implicit;l(),_(e.invoice_number)}}function Do(t,c){if(t&1){let e=y();n(0,"button",23),b("click",function(){h(e);let o=s().$implicit,p=s();return x(p.payInvoice(o))}),a(1,"Pay"),i()}}function Po(t,c){if(t&1&&(n(0,"button",24),a(1),i()),t&2){let e=s().$implicit;l(),_(e.status)}}function Oo(t,c){if(t&1&&(n(0,"div",13)(1,"div",14)(2,"div",15)(3,"h3",16),d(4,Io,2,2,"a",17)(5,To,2,1,"ng-template",null,0,le),i(),n(7,"small",7),a(8),u(9,"date"),i(),n(10,"small",18),a(11),u(12,"date"),i()(),n(13,"div",19)(14,"span",20),a(15),u(16,"number"),i(),d(17,Do,2,0,"button",21)(18,Po,2,1,"ng-template",null,1,le),i()()()),t&2){let e=c.$implicit,r=L(6),o=L(19),p=s();Ue(U(18,wo,e.status=="overdue"?"#f2dede":"")),l(4),m("ngIf",e.invoice_url)("ngIfElse",r),l(4),C("Invoice Date: ",O(9,10,e.date,"dd MMM yyyy"),""),l(3),C("Due Date: ",O(12,13,e.date,"dd MMM yyyy"),""),l(4),Ce("",p.currency," ",v(16,16,e.total),""),l(2),m("ngIf",e.status=="sent"||e.status=="overdue")("ngIfElse",o)}}var bi=(()=>{class t{payment;subscription;router;showPayAll=!0;totalPayable=0;get invoices(){return this._invoices}set invoices(e){N.IsNotEmpty(e)&&(this._invoices=e,this.showPayAll=e.filter(r=>r.status=="sent"||r.status=="overdue"&&r.currency_code=="IDR").length>1,this.totalPayable=e.filter(r=>r.status=="sent"||r.status=="overdue"&&r.currency_code=="IDR").reduce((r,o)=>r+o.total,0))}_invoices=[];WHTPercentage;VATEnabled;subscriptionStatus;currency;constructor(e,r,o){this.payment=e,this.subscription=r,this.router=o}payAllInvoices(){this.payment.payAllInvoices(this.invoices,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}payInvoice(e){this.currency=="USD"?window.open(e.invoice_url,"_blank"):this.payment.payInvoice(e,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}static \u0275fac=function(r){return new(r||t)(f(xi),f(fe),f(Se))};static \u0275cmp=I({type:t,selectors:[["POS-invoices-card"]],inputs:{invoices:"invoices",WHTPercentage:"WHTPercentage",VATEnabled:"VATEnabled",subscriptionStatus:"subscriptionStatus",currency:"currency"},decls:13,vars:4,consts:[["UNPAID",""],["PAID",""],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between",2,"padding-left","15px"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-file-invoice","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],["class","btn btn-sm btn-outline-primary btn-pay",3,"click",4,"ngIf"],[1,"card-body","px-0"],[1,"row","gx-0"],["class","invoice-list col-12","style","padding: 0px 15px;",3,"style",4,"ngFor","ngForOf"],[1,"btn","btn-sm","btn-outline-primary","btn-pay",3,"click"],[1,"invoice-list","col-12",2,"padding","0px 15px"],[1,"py-10","border-top","d-flex","justify-content-between"],[1,"invoice-info"],[1,"fw-normal"],["target","_blank",3,"href",4,"ngIf","ngIfElse"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column","justify-content-between"],[1,"d-block","invoice-total"],["class","btn btn-sm btn-outline-primary btn-pay text-uppercase py-2",3,"click",4,"ngIf","ngIfElse"],["target","_blank",3,"href"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2",3,"click"],["disabled","",1,"btn","btn-sm","btn-outline-secondary","btn-pay","text-uppercase","py-2"]],template:function(r,o){r&1&&(n(0,"div",2)(1,"div",3)(2,"div",4),g(3,"i",5),n(4,"div")(5,"h3",6),a(6,"Invoices"),i(),n(7,"small",7),a(8,"Invoice are created for each subscription cycle."),i()()(),d(9,Eo,3,3,"button",8),i(),n(10,"div",9)(11,"div",10),d(12,Oo,20,20,"div",11),i()()()),r&2&&(l(9),m("ngIf",o.showPayAll&&o.currency!="USD"),l(),He("pb-0",o.invoices.length==1),l(2),m("ngForOf",o.invoices))},dependencies:[G,V,te,z],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-pay[_ngcontent-%COMP%]{min-width:140px}.invoice-total[_ngcontent-%COMP%]{font-size:14.5px}"]})}return t})();var Si=(()=>{class t{subscribedSince;outlets;frequency;total;static \u0275fac=function(r){return new(r||t)};static \u0275cmp=I({type:t,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:"subscribedSince",outlets:"outlets",frequency:"frequency",total:"total"},decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"card-body"],[1,"bill-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"]],template:function(r,o){r&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Billing Information"),i(),n(5,"small",2),a(6),u(7,"date"),i()()(),n(8,"div",3)(9,"div",4)(10,"div")(11,"h3",5),a(12),i(),n(13,"h5",6),a(14,"Outlet"),i()(),g(15,"div",7),n(16,"div")(17,"h3",5),a(18),i(),n(19,"h5",6),a(20,"Frequency"),i()(),g(21,"div",7),n(22,"div")(23,"h3",5),a(24),u(25,"number"),i(),n(26,"h5",6),a(27,"Amount"),i()()()()()),r&2&&(l(6),C("Subscribe Since: ",O(7,4,o.subscribedSince,"dd MMM yyyy"),""),l(6),_(o.outlets),l(6),C("",o.frequency," Month"),l(6),_(v(25,7,o.total)))},dependencies:[te,z],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.bill-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}"]})}return t})();var vi=(()=>{class t{dialogRef;toastr;email;phone="";mobilePhone="";config=new Q;constructor(e,r,o){this.dialogRef=e,this.toastr=o,this.config.title="Update Billing Contact",this.config.customWidth="500px",this.email=r.email,this.phone=r.phone,this.mobilePhone=r.mobilePhone}ok(){if(N.IsEmpty(this.email)){this.toastr.info("Email is required");return}if(N.IsEmpty(this.phone)){this.toastr.info("Phone is required");return}N.IsEmpty(this.mobilePhone)&&(this.mobilePhone=""),this.dialogRef.close({email:this.email,phone:this.phone.toString(),mobilePhone:this.mobilePhone.toString()})}close(){this.dialogRef.close()}static \u0275fac=function(r){return new(r||t)(f($),f(de),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-dialog-update-billing"]],decls:14,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline","d-flex","align-items-center"],[1,"fw-normal",2,"flex-basis","200px"],["type","email",1,"form-control",3,"ngModelChange","ngModel"],["type","text",1,"form-control",3,"ngModelChange","ngModel"]],template:function(r,o){r&1&&(n(0,"modal-material",0),b("onOk",function(){return o.ok()})("onCancel",function(){return o.close()})("onClose",function(){return o.close()}),n(1,"content")(2,"div",1)(3,"h3",2),a(4,"Email"),i(),n(5,"input",3),E("ngModelChange",function(S){return w(o.email,S)||(o.email=S),S}),i()(),n(6,"div",1)(7,"h3",2),a(8,"Phone"),i(),n(9,"input",4),E("ngModelChange",function(S){return w(o.phone,S)||(o.phone=S),S}),i()(),n(10,"div",1)(11,"h3",2),a(12,"Mobile Phone"),i(),n(13,"input",4),E("ngModelChange",function(S){return w(o.mobilePhone,S)||(o.mobilePhone=S),S}),i()()()()),r&2&&(m("config",o.config),l(5),M("ngModel",o.email),l(4),M("ngModel",o.phone),l(4),M("ngModel",o.mobilePhone))},dependencies:[q,R,j,Y]})}return t})();var Ci=(()=>{class t{matDialog;http;toastr;lastUnpaidInvoiceDate;email;phone;mobilePhone;recurringStatus;constructor(e,r,o){this.matDialog=e,this.http=r,this.toastr=o}cancel(){this.matDialog.open(ot).afterClosed().subscribe()}updateBilling(){this.matDialog.open(vi,{data:{email:this.email,phone:this.phone,mobilePhone:this.mobilePhone}}).afterClosed().pipe(re(e=>N.IsNotEmpty(e)),J(e=>this.http.post("/API/Subscription/UpdateBillingData",{Email:e.email,Phone:e.phone,Mobile:e.mobilePhone}).pipe(ae(r=>_t(ut({},e),{Message:r.Message}))))).subscribe(e=>{this.toastr.success(e.Message,W.Success),this.email=e.email,this.phone=e.phone,this.mobilePhone=e.mobilePhone})}static \u0275fac=function(r){return new(r||t)(f(ie),f(P),f(H))};static \u0275cmp=I({type:t,selectors:[["POS-renewal-card"]],inputs:{lastUnpaidInvoiceDate:"lastUnpaidInvoiceDate",email:"email",phone:"phone",mobilePhone:"mobilePhone",recurringStatus:"recurringStatus"},decls:37,vars:16,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text","text-capitalize"],[1,"btn-group"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],[1,"dropdown-item",3,"click"],[1,"card-body"],[1,"renewal-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"text-center","invdate-container",2,"flex-grow","1"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"],[1,"d-flex","flex-column","ps-0","ps-sm-10","emwa-container",2,"flex-grow","2.5"],[1,"mt-sm-4","mt-8"]],template:function(r,o){if(r&1&&(n(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Renewal"),i(),n(5,"small",2),a(6),i()(),n(7,"div",3)(8,"button",4),g(9,"b",5),i(),n(10,"ul",6)(11,"li")(12,"a",7),b("click",function(){return o.updateBilling()}),a(13,"Update Billing Contact"),i()(),n(14,"li")(15,"a",7),b("click",function(){return o.cancel()}),a(16,"Cancel Renewal"),i()()()()(),n(17,"div",8)(18,"div",9)(19,"div",10)(20,"h3",11),a(21),u(22,"date"),i(),n(23,"h5",12),a(24,"Invoice Date"),i()(),g(25,"div",13),n(26,"div",14)(27,"div")(28,"h3",11),a(29),i(),n(30,"h5",12),a(31,"Billing Email"),i()(),n(32,"div",15)(33,"h3",11),a(34),i(),n(35,"h5",12),a(36),i()()()()()()),r&2){let p;l(5),He("text-success",o.recurringStatus=="active")("text-danger",o.recurringStatus=="stopped"),l(),_(o.recurringStatus),l(15),_(o.lastUnpaidInvoiceDate=="-"?o.lastUnpaidInvoiceDate:O(22,13,o.lastUnpaidInvoiceDate,"dd MMM yyyy")),l(8),_((p=o.email)!==null&&p!==void 0?p:"-"),l(5),mt("",o.phone," ",o.phone&&o.mobilePhone?"/":""," ",o.mobilePhone,""),l(2),mt("",o.phone?"Phone":""," ",o.phone&&o.mobilePhone?"/":""," ",o.mobilePhone?"Mobile Phone":"","")}},dependencies:[z],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-cancel[_ngcontent-%COMP%]{width:140px}.renewal-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.renewal-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}@media (max-width: 576px){.invdate-container[_ngcontent-%COMP%], .emwa-container[_ngcontent-%COMP%]{flex-grow:0!important}}@media (max-width: 576px){ #modal_material{width:100%!important}}"]})}return t})();var No=t=>({"bg-gradient-warning":t});function Ao(t,c){if(t&1&&(n(0,"small",14),a(1),u(2,"date"),u(3,"date"),i()),t&2){let e=s();l(),C("(",O(2,1,e.lastMonthDate,"dd MMM yyyy")+" - "+O(3,4,e.currentDate,"dd MMM yyyy"),")")}}function Bo(t,c){if(t&1){let e=y();n(0,"button",15),b("click",function(){h(e);let o=s();return x(o.loadOutlet())}),a(1,"Load"),i()}}function Lo(t,c){if(t&1){let e=y();n(0,"button",15),b("click",function(){h(e);let o=s();return x(o.loadMinMax())}),a(1,"Load Min Max Date"),i()}}function Ro(t,c){t&1&&(n(0,"th",11),a(1,"Min Date"),i())}function jo(t,c){t&1&&(n(0,"th",11),a(1,"Max Date"),i())}function Wo(t,c){if(t&1&&(n(0,"td",17),a(1),u(2,"date"),i()),t&2){let e=s().$implicit;l(),_(O(2,1,e.MinDate,"dd MMM yyyy"))}}function Ho(t,c){if(t&1&&(n(0,"td",17),a(1),u(2,"date"),i()),t&2){let e=s().$implicit;l(),_(O(2,1,e.MaxDate,"dd MMM yyyy"))}}function Uo(t,c){if(t&1&&(n(0,"tr",16)(1,"td"),a(2),i(),n(3,"td"),a(4),i(),n(5,"td",17),a(6),u(7,"number"),i(),n(8,"td",17),a(9),u(10,"number"),i(),d(11,Wo,3,4,"td",18)(12,Ho,3,4,"td",18),i()),t&2){let e,r,o=c.$implicit,p=c.index,S=s();l(2),_(p+1),l(2),C(" ",o.Name," "),l(),se(U(12,No,(o==null?null:o.OrdersCount)<25||o.OrdersCount==null)),l(),C(" ",v(7,8,(e=o.OrdersCount)!==null&&e!==void 0?e:0),""),l(3),_(v(10,10,(r=o.RegisterCount)!==null&&r!==void 0?r:1)),l(2),m("ngIf",S.isLoadMinMaxDate),l(),m("ngIf",S.isLoadMinMaxDate)}}var yi=(()=>{class t{outletUsage;http;lastMonthDate;currentDate;outlets;showLoadButton;isLoadMinMaxDate=!1;constructor(e,r){this.outletUsage=e,this.http=r}loadOutlet(){this.outletUsage.loadOutlet()}loadMinMax(){this.http.post("/api/subscription/GetOutletWithMinMax").subscribe(e=>{this.outlets=e.Outlets,this.isLoadMinMaxDate=!0})}static \u0275fac=function(r){return new(r||t)(f(Oe),f(P))};static \u0275cmp=I({type:t,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:"lastMonthDate",currentDate:"currentDate",outlets:"outlets",showLoadButton:"showLoadButton"},decls:27,vars:10,consts:[[1,"card"],[1,"card-header","d-flex","align-os-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"fa","fa-location-dot","me-4",2,"font-size","30px"],[1,"d-inline"],["class","sub-text d-block",4,"ngIf"],["class","btn btn-sm btn-outline-secondary",3,"click",4,"ngIf"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],["style","width: 120px","class","text-end",4,"ngIf"],["class","border",4,"ngFor","ngForOf"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"border"],[1,"text-end"],["class","text-end",4,"ngIf"]],template:function(r,o){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),g(3,"i",3),n(4,"div")(5,"h3",4),a(6,"Outlets Usage"),i(),d(7,Ao,4,7,"small",5),i()(),d(8,Bo,2,0,"button",6)(9,Lo,2,0,"button",6),i(),n(10,"div",7)(11,"table",8)(12,"thead",9)(13,"tr")(14,"th",10),a(15,"No"),i(),n(16,"th"),a(17,"Name"),i(),n(18,"th",11),a(19,"Orders"),i(),n(20,"th",11),a(21,"Registers"),i(),d(22,Ro,2,0,"th",12)(23,jo,2,0,"th",12),i()(),n(24,"tbody"),d(25,Uo,13,14,"tr",13),u(26,"sortBy"),i()()()()),r&2&&(l(7),m("ngIf",o.outlets==null?null:o.outlets.length),l(),m("ngIf",o.showLoadButton),l(),m("ngIf",!o.showLoadButton&&!o.isLoadMinMaxDate),l(13),m("ngIf",o.isLoadMinMaxDate),l(),m("ngIf",o.isLoadMinMaxDate),l(2),m("ngForOf",ye(26,6,o.outlets,"desc","OrdersCount")))},dependencies:[G,V,te,z,Je],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:16px}"]})}return t})();function zo(t,c){if(t&1){let e=y();A(0),n(1,"input",13),E("ngModelChange",function(o){h(e);let p=s();return w(p.nameForm,o)||(p.nameForm=o),x(o)}),i(),B()}if(t&2){let e=s();l(),M("ngModel",e.nameForm)}}function qo(t,c){if(t&1&&(n(0,"h4",14),a(1),i()),t&2){let e,r=s();l(),_((e=r.name)!==null&&e!==void 0?e:"-")}}function Go(t,c){if(t&1){let e=y();A(0),n(1,"input",13),E("ngModelChange",function(o){h(e);let p=s();return w(p.npwpForm,o)||(p.npwpForm=o),x(o)}),i(),B()}if(t&2){let e=s();l(),M("ngModel",e.npwpForm)}}function $o(t,c){if(t&1&&(n(0,"h4",14),a(1),i()),t&2){let e,r=s();l(),_((e=r.npwp)!==null&&e!==void 0?e:"-")}}function Qo(t,c){if(t&1){let e=y();A(0),n(1,"textarea",15),E("ngModelChange",function(o){h(e);let p=s();return w(p.addressForm,o)||(p.addressForm=o),x(o)}),i(),B()}if(t&2){let e=s();l(),M("ngModel",e.addressForm)}}function Yo(t,c){if(t&1&&(n(0,"h4",14),a(1),i()),t&2){let e,r=s();l(),_((e=r.taxAddress)!==null&&e!==void 0?e:"-")}}function Ko(t,c){if(t&1&&(n(0,"div",11)(1,"h4",9),a(2,"Document Link"),i(),n(3,"h4",14)(4,"a",16),a(5),i()()()),t&2){let e,r=s();l(4),m("href",r.documentLink,he),l(),_((e="view")!==null&&e!==void 0?e:"-")}}function Jo(t,c){if(t&1&&(n(0,"div",11)(1,"h4",9),a(2,"WHT"),i(),n(3,"h4",14),a(4),i()()),t&2){let e,r=s();l(4),C("",(e=r.whtPercentage)!==null&&e!==void 0?e:"-","%")}}var Mi=(()=>{class t{http;outletCount;name;npwp;documentLink;whtPercentage;frequency;taxAddress;isEdit=!1;nameForm="";npwpForm="";addressForm="";constructor(e){this.http=e}editData(){this.isEdit?this.http.post("/API/Subscription/UpdateTaxInformation",{TaxID:this.npwpForm,TaxName:this.nameForm,TaxAddress:this.addressForm}).subscribe(()=>{this.isEdit=!1,this.name=this.nameForm,this.npwp=this.npwpForm,this.taxAddress=this.addressForm}):(this.isEdit=!0,this.nameForm=this.name,this.npwpForm=this.npwp,this.addressForm=this.taxAddress)}static \u0275fac=function(r){return new(r||t)(f(P))};static \u0275cmp=I({type:t,selectors:[["POS-tax-card"]],inputs:{outletCount:"outletCount",name:"name",npwp:"npwp",documentLink:"documentLink",whtPercentage:"whtPercentage",frequency:"frequency",taxAddress:"taxAddress"},decls:30,vars:9,consts:[["nameField",""],["npwpField",""],["taxAddressField",""],[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"btn","btn-sm","btn-outline-primary","btn-upgrade",3,"click"],[1,"card-body"],[1,"d-flex","justify-content-between"],[1,"fw-normal","title-form"],[4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between","mt-8"],["class","d-flex justify-content-between mt-8",4,"ngIf"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],[1,"text-secondary","fw-normal","user-info"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(r,o){if(r&1){let p=y();n(0,"div",3)(1,"div",4)(2,"div")(3,"h3"),a(4,"Tax Information"),i(),n(5,"small",5),a(6,"PPN 11% + Tax Invoice"),i()(),n(7,"button",6),b("click",function(){return h(p),x(o.editData())}),a(8),i()(),n(9,"div",7)(10,"div",8)(11,"h4",9),a(12,"Full Name"),i(),d(13,zo,2,1,"ng-container",10)(14,qo,2,1,"ng-template",null,0,le),i(),n(16,"div",11)(17,"h4",9),a(18,"NPWP"),i(),d(19,Go,2,1,"ng-container",10)(20,$o,2,1,"ng-template",null,1,le),i(),n(22,"div",11)(23,"h4",9),a(24,"Tax Address"),i(),d(25,Qo,2,1,"ng-container",10)(26,Yo,2,1,"ng-template",null,2,le),i(),d(28,Ko,6,2,"div",12)(29,Jo,5,1,"div",12),i()()}if(r&2){let p=L(15),S=L(21),T=L(27);l(8),_(o.isEdit?"Save":"Edit"),l(5),m("ngIf",o.isEdit)("ngIfElse",p),l(6),m("ngIf",o.isEdit)("ngIfElse",S),l(6),m("ngIf",o.isEdit)("ngIfElse",T),l(3),m("ngIf",o.documentLink),l(),m("ngIf",o.whtPercentage)}},dependencies:[V,q,R,j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080}.user-info[_ngcontent-%COMP%]{max-width:50%}@media (max-width: 576px){.title-form[_ngcontent-%COMP%]{flex-basis:100px;word-break:break-all}}"]})}return t})();function ea(t,c){if(t&1&&g(0,"POS-tax-card",12),t&2){let e=s().ngIf;m("name",e.Subscription==null?null:e.Subscription.TaxName)("npwp",e.Subscription==null?null:e.Subscription.TaxID)("outletCount",e.Subscription==null?null:e.Subscription.OutletCount)("documentLink",e.DocumentLink)("whtPercentage",e.WHTPercentage)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("taxAddress",e.Subscription==null?null:e.Subscription.TaxAddress)}}function ta(t,c){if(t&1&&(n(0,"mainpanel-cmp",1)(1,"content")(2,"div",2)(3,"section",3)(4,"div",4)(5,"div",5),g(6,"POS-invoices-card",6)(7,"POS-outlet-card",7),u(8,"async"),u(9,"async"),u(10,"async"),u(11,"async"),i(),n(12,"div",8),g(13,"POS-billing-info-card",9)(14,"POS-renewal-card",10),d(15,ea,1,7,"POS-tax-card",11),i()()()()()()),t&2){let e=c.ngIf,r=s();m("pageData",r.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),l(6),m("invoices",e.invoices)("WHTPercentage",e.WHTPercentage)("VATEnabled",e.VATEnabled)("subscriptionStatus",e.Subscription==null?null:e.Subscription.SubscriptionStatus)("currency",e.Subscription==null?null:e.Subscription.Currency),l(),m("lastMonthDate",v(8,22,r.from$))("currentDate",v(9,24,r.to$))("outlets",v(10,26,r.outlets$))("showLoadButton",v(11,28,r.showLoadButton$)),l(6),m("subscribedSince",e.Subscription==null?null:e.Subscription.Since)("outlets",e.Subscription==null?null:e.Subscription.OutletCount)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("total",e.Subscription==null?null:e.Subscription.TotalAmount),l(),m("lastUnpaidInvoiceDate",e.Subscription==null?null:e.Subscription.NextRecurring)("email",e.Subscription==null?null:e.Subscription.Email)("phone",e.Subscription==null?null:e.Subscription.Phone)("mobilePhone",e.Subscription==null?null:e.Subscription.MobilePhone)("recurringStatus",e.Subscription==null?null:e.Subscription.RecurringStatus),l(),m("ngIf",(e.Subscription==null?null:e.Subscription.Currency)!="USD")}}var wi=(()=>{class t{title=St(It);menuData={H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]};outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(e,r,o,p){let T=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(T),this.subscriptionData$=e.subscriptionData$,this.lastUnpaidInvoiceDate$=e.lastUnpaidInvoiceDate$,this.outlets$=o.outlets$,this.showLoadButton$=o.showLoadButton$,this.from$=o.from$,this.to$=o.to$,p.initScript().subscribe()}static \u0275fac=function(r){return new(r||t)(f(fe),f(lt),f(Oe),f(at))};static \u0275cmp=I({type:t,selectors:[["POS-my-subscription-v2"]],features:[Ct([fe,lt,Oe])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown",4,"ngIf"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"subs-container"],[1,"content"],[1,"d-flex","flex-sm-row","flex-column",2,"column-gap","20px"],[1,"left-container"],[3,"invoices","WHTPercentage","VATEnabled","subscriptionStatus","currency"],[3,"lastMonthDate","currentDate","outlets","showLoadButton"],[1,"right-container"],[3,"subscribedSince","outlets","frequency","total"],[3,"lastUnpaidInvoiceDate","email","phone","mobilePhone","recurringStatus"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress",4,"ngIf"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(r,o){r&1&&(d(0,ta,16,30,"mainpanel-cmp",0),u(1,"async")),r&2&&m("ngIf",v(1,1,o.subscriptionData$))},dependencies:[V,ne,bi,Si,Ci,yi,Mi,wt],styles:[".subs-container[_ngcontent-%COMP%]{padding:18px 20px 0;background:#fafaf9}.subs-container[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding-left:15px}.subs-container[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:60%}.subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:40%}@media (max-width: 576px){.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%], .subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:100%}}"]})}return t})();var ia=[{path:"Main/My_Profile",component:ai},{path:"Main/My_Subscription",component:wi},{path:"Main/My_Subscription/V2",component:_i},{path:"Main/Notification",component:gi},{path:"Main/My_Sales",component:mi},{path:"Main/My_Subscription/Choose_your_plan",component:si}],Ei=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=je({type:t});static \u0275inj=Re({imports:[pt.forChild(ia),pt]})}return t})();var jl=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=je({type:t});static \u0275inj=Re({providers:[z],imports:[Et,Pt,Ot,Ei,qt,Ut,Rt,Lt,$t,Vt,Qt,At,Kt,zt,kt,ti,Xt]})}return t})();export{jl as ProfileModule};