dealpos 1.0.0

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 (238) hide show
  1. package/POS/3rdpartylicenses.txt +1645 -0
  2. package/POS/assets/icons/icon-128x128.png +0 -0
  3. package/POS/assets/icons/icon-144x144.png +0 -0
  4. package/POS/assets/icons/icon-152x152.png +0 -0
  5. package/POS/assets/icons/icon-192x192.png +0 -0
  6. package/POS/assets/icons/icon-384x384.png +0 -0
  7. package/POS/assets/icons/icon-512x512.png +0 -0
  8. package/POS/assets/icons/icon-72x72.png +0 -0
  9. package/POS/assets/icons/icon-96x96.png +0 -0
  10. package/POS/chunk-26YXEYJK.js +1 -0
  11. package/POS/chunk-2DNKBN6G.js +1 -0
  12. package/POS/chunk-2FKYC63K.js +1 -0
  13. package/POS/chunk-2FWFPV5I.js +1 -0
  14. package/POS/chunk-2OSKJOSS.js +1 -0
  15. package/POS/chunk-2OXMYDYT.js +1 -0
  16. package/POS/chunk-2OZMF5DL.js +1 -0
  17. package/POS/chunk-2W3MAOOP.js +1 -0
  18. package/POS/chunk-33XCA4ER.js +14 -0
  19. package/POS/chunk-35V3VL6F.js +1 -0
  20. package/POS/chunk-3A7KA4YN.js +1 -0
  21. package/POS/chunk-3BODNSIH.js +1 -0
  22. package/POS/chunk-3FOIEYAT.js +4 -0
  23. package/POS/chunk-3PFXZUB6.js +7 -0
  24. package/POS/chunk-3QABPVXZ.js +3 -0
  25. package/POS/chunk-4BDQDYVB.js +1 -0
  26. package/POS/chunk-4CBDK52E.js +4 -0
  27. package/POS/chunk-4G26RHGA.js +1 -0
  28. package/POS/chunk-4MX7Q77M.js +2 -0
  29. package/POS/chunk-4UAHOTBD.js +1 -0
  30. package/POS/chunk-56EQRIAH.js +1 -0
  31. package/POS/chunk-5KBFQLSN.js +1 -0
  32. package/POS/chunk-5W7F4VJH.js +1 -0
  33. package/POS/chunk-64PDX5ZX.js +1 -0
  34. package/POS/chunk-65YDOCXF.js +1 -0
  35. package/POS/chunk-67VBXFVT.js +6 -0
  36. package/POS/chunk-6BQZINLH.js +1 -0
  37. package/POS/chunk-6L6CIH5M.js +1 -0
  38. package/POS/chunk-6PXJEE4K.js +1 -0
  39. package/POS/chunk-6S4Q5VRA.js +1 -0
  40. package/POS/chunk-75STMWUR.js +6 -0
  41. package/POS/chunk-76C33PK5.js +1 -0
  42. package/POS/chunk-77D6X2SQ.js +11 -0
  43. package/POS/chunk-7DWKYGA4.js +1 -0
  44. package/POS/chunk-7M6CWVRI.js +1 -0
  45. package/POS/chunk-7Q3437BR.js +1 -0
  46. package/POS/chunk-AA32I4UN.js +1 -0
  47. package/POS/chunk-AJMKP7YZ.js +1 -0
  48. package/POS/chunk-AOJW6WJT.js +1 -0
  49. package/POS/chunk-AOPKPEVH.js +1 -0
  50. package/POS/chunk-APJK7OH2.js +2 -0
  51. package/POS/chunk-APYNCJ2H.js +1 -0
  52. package/POS/chunk-AUYYX2UQ.js +45 -0
  53. package/POS/chunk-AVDGNFC7.js +1 -0
  54. package/POS/chunk-AWGZKLLY.js +1 -0
  55. package/POS/chunk-AYKDALBT.js +1 -0
  56. package/POS/chunk-B2OT7HA4.js +4 -0
  57. package/POS/chunk-B36XIZVJ.js +1 -0
  58. package/POS/chunk-B5FODXLM.js +1 -0
  59. package/POS/chunk-B7RM5KKA.js +1 -0
  60. package/POS/chunk-BCVO66L3.js +5 -0
  61. package/POS/chunk-BETKNHFK.js +1 -0
  62. package/POS/chunk-BH2ZVZIU.js +1 -0
  63. package/POS/chunk-BHXS5IA6.js +1 -0
  64. package/POS/chunk-BLZEDUEI.js +1 -0
  65. package/POS/chunk-BYXBJQAS.js +0 -0
  66. package/POS/chunk-BZC5JINN.js +5 -0
  67. package/POS/chunk-C43IYFVU.js +1 -0
  68. package/POS/chunk-CBW7IA6S.js +1 -0
  69. package/POS/chunk-CCGPOEE3.js +4 -0
  70. package/POS/chunk-CFIFFKWA.js +1 -0
  71. package/POS/chunk-CI45CZMG.js +1 -0
  72. package/POS/chunk-CJO25BBP.js +1 -0
  73. package/POS/chunk-CLL3TEL5.js +1 -0
  74. package/POS/chunk-CPUGWH3I.js +1 -0
  75. package/POS/chunk-CPW6IWAB.js +1 -0
  76. package/POS/chunk-CRSUSQ3W.js +1 -0
  77. package/POS/chunk-CW27R4N3.js +2 -0
  78. package/POS/chunk-CWU5DTSS.js +1 -0
  79. package/POS/chunk-CY2FQLP4.js +1 -0
  80. package/POS/chunk-DRGWLGRP.js +1 -0
  81. package/POS/chunk-DXF4M3Z6.js +1 -0
  82. package/POS/chunk-E72IOARD.js +1 -0
  83. package/POS/chunk-EA7CLJMQ.js +18 -0
  84. package/POS/chunk-ECMSF3OR.js +1 -0
  85. package/POS/chunk-EOFWQEK7.js +1 -0
  86. package/POS/chunk-EQOB7536.js +156 -0
  87. package/POS/chunk-ESD5O3BQ.js +1 -0
  88. package/POS/chunk-EZCHVNC5.js +3 -0
  89. package/POS/chunk-F3ZYFWTM.js +1 -0
  90. package/POS/chunk-F6GAPEFT.js +1 -0
  91. package/POS/chunk-FBR7TAEJ.js +5 -0
  92. package/POS/chunk-FE5LZK5I.js +1 -0
  93. package/POS/chunk-FOEYBSQT.js +2 -0
  94. package/POS/chunk-FWVI7M5F.js +1 -0
  95. package/POS/chunk-G4DDQBH4.js +1 -0
  96. package/POS/chunk-GDFWXFK2.js +1 -0
  97. package/POS/chunk-GHQFOULJ.js +2 -0
  98. package/POS/chunk-GNSQPTDB.js +1 -0
  99. package/POS/chunk-GSLPZSSX.js +1 -0
  100. package/POS/chunk-GVXSG66Q.js +1 -0
  101. package/POS/chunk-H55AJAX5.js +8 -0
  102. package/POS/chunk-HIRUHGYD.js +2 -0
  103. package/POS/chunk-HKR2C3HA.js +1 -0
  104. package/POS/chunk-HSOC6U4B.js +1 -0
  105. package/POS/chunk-I6CGSFEU.js +1 -0
  106. package/POS/chunk-I6YPWC52.js +1 -0
  107. package/POS/chunk-IDDHFZWG.js +1 -0
  108. package/POS/chunk-IE5R6YWY.js +1 -0
  109. package/POS/chunk-IOQ3OION.js +1 -0
  110. package/POS/chunk-IUKSWU5B.js +1 -0
  111. package/POS/chunk-IY6EDHBT.js +1 -0
  112. package/POS/chunk-IZGPRDGN.js +2 -0
  113. package/POS/chunk-J3W6DQKW.js +1 -0
  114. package/POS/chunk-JLWKTGB2.js +1 -0
  115. package/POS/chunk-JM3SJLS7.js +1 -0
  116. package/POS/chunk-JNUC6PO5.js +1 -0
  117. package/POS/chunk-K5XVN3MT.js +1 -0
  118. package/POS/chunk-KBQ5ZM55.js +1 -0
  119. package/POS/chunk-KCNSCS4R.js +1 -0
  120. package/POS/chunk-KI2MQKDF.js +1 -0
  121. package/POS/chunk-KNRLGMUT.js +1 -0
  122. package/POS/chunk-KR4OPCRF.js +1 -0
  123. package/POS/chunk-KW4B7WMB.js +1 -0
  124. package/POS/chunk-KYX6U2UX.js +1 -0
  125. package/POS/chunk-KZNSGBGF.js +2 -0
  126. package/POS/chunk-L3UWNQXB.js +1 -0
  127. package/POS/chunk-LHWN2J4H.js +15 -0
  128. package/POS/chunk-LJUP6CCS.js +1 -0
  129. package/POS/chunk-LY4FOMQ6.css +1 -0
  130. package/POS/chunk-LZ3SKBTU.js +1 -0
  131. package/POS/chunk-M5ONTRWK.js +1 -0
  132. package/POS/chunk-MA7NEQCZ.js +1 -0
  133. package/POS/chunk-MDKYCLYA.js +17 -0
  134. package/POS/chunk-MGDA6GY6.js +1 -0
  135. package/POS/chunk-MWWGZRMN.js +1 -0
  136. package/POS/chunk-NCATMO6T.js +1 -0
  137. package/POS/chunk-NDAI7L23.js +1 -0
  138. package/POS/chunk-NHUK6IK5.js +40 -0
  139. package/POS/chunk-NUZ5K7GT.js +1 -0
  140. package/POS/chunk-O2PELRQA.js +1 -0
  141. package/POS/chunk-OUOP65JB.js +1 -0
  142. package/POS/chunk-OXSD6KML.js +1 -0
  143. package/POS/chunk-PEOMRJUI.js +3 -0
  144. package/POS/chunk-PHGK3EAU.js +1 -0
  145. package/POS/chunk-PLC4GZ67.js +1 -0
  146. package/POS/chunk-PTF6AQY6.js +1 -0
  147. package/POS/chunk-PTXKBWBA.js +1 -0
  148. package/POS/chunk-Q3SJOSAG.js +1 -0
  149. package/POS/chunk-QBDEGNJP.js +1 -0
  150. package/POS/chunk-QCTMAR3L.js +1 -0
  151. package/POS/chunk-QZWOQRAM.js +1 -0
  152. package/POS/chunk-R5VG3XDC.js +1 -0
  153. package/POS/chunk-R7NR3M2Q.js +1 -0
  154. package/POS/chunk-RBKYZOZX.js +3 -0
  155. package/POS/chunk-RHQGCHFI.js +1 -0
  156. package/POS/chunk-RL3GYZVU.js +8 -0
  157. package/POS/chunk-RRKCUSBB.js +1 -0
  158. package/POS/chunk-S4OLP2TR.js +18 -0
  159. package/POS/chunk-SDH32O74.js +1 -0
  160. package/POS/chunk-SE7OFLAL.js +1 -0
  161. package/POS/chunk-SEVYM4GA.js +1 -0
  162. package/POS/chunk-SGRJ5YG2.js +1 -0
  163. package/POS/chunk-SNNLFZQ3.js +3 -0
  164. package/POS/chunk-SVNOJVQF.js +1 -0
  165. package/POS/chunk-TCLYGBIP.js +1 -0
  166. package/POS/chunk-TIDDF777.js +1 -0
  167. package/POS/chunk-TJQIORGG.js +1 -0
  168. package/POS/chunk-TK5H65DN.js +1 -0
  169. package/POS/chunk-TLHNFDPP.js +1 -0
  170. package/POS/chunk-TVNDX4KA.js +3 -0
  171. package/POS/chunk-TX6G2LAN.js +1 -0
  172. package/POS/chunk-U3O6FO5X.js +1 -0
  173. package/POS/chunk-UJMXJABS.js +1 -0
  174. package/POS/chunk-UNGT7KQO.js +1 -0
  175. package/POS/chunk-UPRH3DLS.js +1 -0
  176. package/POS/chunk-UVFDCVT4.js +2 -0
  177. package/POS/chunk-V22EVF6N.js +1 -0
  178. package/POS/chunk-V4RKZMUB.js +11 -0
  179. package/POS/chunk-VBOV2ZGQ.js +1 -0
  180. package/POS/chunk-VGGNSOCP.js +1 -0
  181. package/POS/chunk-VLGOEX3D.js +24 -0
  182. package/POS/chunk-VPAQFQA7.js +1 -0
  183. package/POS/chunk-VSMYP4AC.js +1 -0
  184. package/POS/chunk-VXCP4DBC.js +1 -0
  185. package/POS/chunk-W43P2XHR.js +1 -0
  186. package/POS/chunk-W7PIRMKD.js +1 -0
  187. package/POS/chunk-WG6PV6VL.js +4 -0
  188. package/POS/chunk-WK4T26FX.js +2 -0
  189. package/POS/chunk-WKS7JIOA.js +1 -0
  190. package/POS/chunk-WKXE4B24.js +1 -0
  191. package/POS/chunk-WLRXTHLM.js +1 -0
  192. package/POS/chunk-WSZGVB3P.js +1 -0
  193. package/POS/chunk-WXHOQKTU.js +1 -0
  194. package/POS/chunk-X55EKFUZ.js +1 -0
  195. package/POS/chunk-X7QMXCEW.js +4 -0
  196. package/POS/chunk-XIGLLWLV.js +1 -0
  197. package/POS/chunk-XRKZOON6.js +4 -0
  198. package/POS/chunk-XW2QKXZF.js +5 -0
  199. package/POS/chunk-XZPCPUT7.js +1 -0
  200. package/POS/chunk-Y5SPDICN.js +2 -0
  201. package/POS/chunk-Y7XBMFXR.js +1 -0
  202. package/POS/chunk-YATUCULL.js +1 -0
  203. package/POS/chunk-YBFOOZH4.js +2 -0
  204. package/POS/chunk-YBINYTS7.js +1 -0
  205. package/POS/chunk-YE2HNBMX.js +1 -0
  206. package/POS/chunk-YENHZRM5.js +9 -0
  207. package/POS/chunk-YHCFOJEX.js +1 -0
  208. package/POS/chunk-YKBQYDEJ.js +2 -0
  209. package/POS/chunk-YPFXYXHP.js +8 -0
  210. package/POS/chunk-YRHYSRBM.js +1 -0
  211. package/POS/chunk-YRITVFOW.js +1 -0
  212. package/POS/chunk-YRNTUREW.js +1 -0
  213. package/POS/chunk-YXRRTX7W.js +1 -0
  214. package/POS/chunk-Z426RGUL.js +24 -0
  215. package/POS/chunk-ZB45Y55B.js +1 -0
  216. package/POS/chunk-ZGRVB4IB.js +1 -0
  217. package/POS/chunk-ZJ3TX62Q.js +1 -0
  218. package/POS/chunk-ZKWXTWYY.js +1 -0
  219. package/POS/index.html +33 -0
  220. package/POS/main-CNMNNNEI.js +4 -0
  221. package/POS/main-VPAR6OBK.css +1 -0
  222. package/POS/manifest.webmanifest +59 -0
  223. package/POS/media/color-727V6BA6.png +0 -0
  224. package/POS/media/hue-3YTJE6JS.png +0 -0
  225. package/POS/media/primeicons-4GST5W3O.woff2 +0 -0
  226. package/POS/media/primeicons-DHQU4SEP.svg +345 -0
  227. package/POS/media/primeicons-GEFHGEHP.ttf +0 -0
  228. package/POS/media/primeicons-P53SE5CV.woff +0 -0
  229. package/POS/media/primeicons-RSSEDYLY.eot +0 -0
  230. package/POS/polyfills-FHOOFFEX.js +2 -0
  231. package/POS/scripts-3E2G6IZ4.js +10 -0
  232. package/POS/styles-T7FPZRNG.css +25 -0
  233. package/Styles/Master/app_custom.css +18 -0
  234. package/Styles/Master/login_custom.css +0 -0
  235. package/Styles/Print/PaperSize8cm_custom.css +1 -0
  236. package/Styles/Print/PaperSizeA4_custom.css +1 -0
  237. package/StylesB/Master/app_custom.css +0 -0
  238. package/package.json +1 -0
@@ -0,0 +1 @@
1
+ import{a as gt,b as mt}from"./chunk-NDAI7L23.js";import{a as N}from"./chunk-AOJW6WJT.js";import{I as dt,O as pt,g as ot,n as lt,o as at,q as ct,z as rt}from"./chunk-2W3MAOOP.js";import{a as O}from"./chunk-26YXEYJK.js";import{$b as u,$c as k,Ab as c,Bb as m,Cb as y,Db as h,Kb as l,Ld as it,Pa as g,Pc as J,Qa as R,Ra as w,Rc as K,Sb as Z,Sc as tt,Tb as Y,Ua as e,Ub as q,Va as V,Yb as S,Zb as p,Zc as nt,_b as v,ac as A,bb as $,cd as et,gb as s,hc as C,ia as U,ic as D,jc as z,mb as i,nb as E,pa as B,pb as b,qa as F,qc as _,rc as f,sb as W,sc as x,tc as I,ub as M,va as L,vb as j,wc as H,xb as G,yb as X,zb as a}from"./chunk-H55AJAX5.js";var Ct=["barcode"],Pt=(n,o)=>({lx300:n,"print-normal":o}),xt=n=>({"full-mode":n}),vt=(n,o)=>({"col-8":n,col:o}),bt=n=>({width:n}),T=()=>({width:"80px"}),Q=()=>({width:"65px"}),ft=()=>({width:"75px"}),Mt=()=>({width:"50px"}),yt=()=>({width:"110px"}),ht=()=>({width:"155px"}),It=()=>({width:"90px"});function Ot(n,o){if(n&1&&m(0,"POS-print-mode",7),n&2){let t=l(2);i("paperPrints",t.paperPrintMode)("paperType","A4")}}function Tt(n,o){if(n&1&&s(0,Ot,1,2,"POS-print-mode",9),n&2){let t=l();i("ngIf",t.invoiceOption)}}function St(n,o){if(n&1&&m(0,"img",59),n&2){let t=l(5);b(D(3,bt,(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.LogoConfig==null?null:t.config.PrintConfigInvoice.LogoConfig.ReceiptLogoResizedWidth)+"px")),i("src",t.printTemplate.Logo,R)}}function At(n,o){if(n&1&&(y(0),s(1,St,1,5,"img",58),h()),n&2){let t=l(4);e(),i("ngIf",t.printTemplate.Logo)}}function Ht(n,o){if(n&1&&m(0,"img",59),n&2){let t=l(5);i("src",t.printTemplate.Logo,R)}}function Rt(n,o){if(n&1&&s(0,Ht,1,1,"img",60),n&2){let t=l(4);i("ngIf",t.printTemplate.Logo)}}function wt(n,o){if(n&1&&(a(0,"div",56),s(1,At,2,1,"ng-container",57)(2,Rt,1,1,"ng-template",null,0,H),c()),n&2){let t=S(3),r=l(3);e(),i("ngIf",(r.config==null||r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.LogoConfig==null?null:r.config.PrintConfigInvoice.LogoConfig.ReceiptLogoResizedWidth)>0)("ngIfElse",t)}}function Vt(n,o){if(n&1&&(a(0,"div",53),s(1,wt,4,2,"div",54),a(2,"div",55),m(3,"h2",25)(4,"small",25),a(5,"div"),m(6,"div",25),_(7,"newlines"),m(8,"div",25),_(9,"newlines"),c()()()),n&2){let t=l(2);e(),i("ngIf",t.printTemplate.Logo),e(),i("ngClass",z(10,vt,t.printTemplate.Title,!t.printTemplate.Title)),e(),i("innerHtml",t.printTemplate.Title,g),e(),i("innerHtml",t.printTemplate.Field,g),e(2),i("innerHtml",f(7,6,t.printTemplate.Address),g),e(2),i("innerHtml",f(9,8,t.printTemplate.ContactInfo),g)}}function Et(n,o){if(n&1&&m(0,"h3",66),n&2){let t=l(3);i("innerHtml",t.config.PrintConfigInvoice.DocumentLabel.Customer,g)}}function Dt(n,o){if(n&1&&(a(0,"span",68),p(1),c()),n&2){let t=l(4);e(),u(" - ",t.data==null?null:t.data.Contact.Code,"")}}function zt(n,o){if(n&1&&(a(0,"strong")(1,"span"),p(2),c(),s(3,Dt,2,1,"span",67),c()),n&2){let t=l(3);e(2),v((t.data==null||t.data.Shipping==null?null:t.data.Shipping.Sender)||(t.data==null?null:t.data.ContactDisplay)),e(),i("ngIf",(t.data==null?null:t.data.Contact.Code)&&t.config.PrintConfigInvoice.DocumentVisibility.CustomerCodeVisible)}}function kt(n,o){if(n&1&&(a(0,"span"),p(1),c()),n&2){let t=l(3);e(),v(t.data==null?null:t.data.Contact.NationalIDNumber)}}function Nt(n,o){if(n&1&&m(0,"div",25),n&2){let t=l(3);i("innerHtml",t.data==null?null:t.data.Contact.Email,g)}}function Qt(n,o){if(n&1&&(m(0,"div",25),_(1,"newlines"),_(2,"newlines")),n&2){let t=l(3);i("innerHtml",!(t.data==null||t.data.Shipping==null)&&t.data.Shipping.Sender?f(1,1,t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderAddress):f(2,3,t.data==null?null:t.data.Contact.Address),g)}}function Ut(n,o){if(n&1&&(a(0,"div"),p(1),_(2,"limitTo"),_(3,"limitTo"),c()),n&2){let t=l(3);e(),u(" ",!(t.data==null||t.data.Shipping==null)&&t.data.Shipping.Sender?t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility==3?"*****"+I(2,1,t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone,4,(t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone.length)-4):" "+(t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone):t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility==3?"*****"+I(3,5,t.data==null?null:t.data.Contact.Phone,4,(t.data==null?null:t.data.Contact.Phone.length)-4):" "+(t.data==null?null:t.data.Contact.Phone)," ")}}function Bt(n,o){if(n&1&&(a(0,"div"),p(1),_(2,"limitTo"),_(3,"limitTo"),c()),n&2){let t=l(3);e(),u(" ",!(t.data==null||t.data.Shipping==null)&&t.data.Shipping.Sender?t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility==3?"*****"+I(2,1,t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone,4,(t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone.length)-4):" "+(t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderPhone):t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility==3?"*****"+I(3,5,t.data==null?null:t.data.Contact.PhoneNMobile,4,(t.data==null?null:t.data.Contact.PhoneNMobile.length)-4):" "+(t.data==null?null:t.data.Contact.PhoneNMobile)," ")}}function Ft(n,o){if(n&1&&m(0,"div",25),n&2){let t=l(3);i("innerHtml",(t.data==null||t.data.Shipping==null?null:t.data.Shipping.SenderCity)||(t.data==null?null:t.data.Contact.CityName),g)}}function Lt(n,o){if(n&1&&(a(0,"div",61)(1,"div",62),s(2,Et,1,1,"h3",63),a(3,"div",64),s(4,zt,4,2,"strong",19),a(5,"div",65),s(6,kt,2,1,"span",19)(7,Nt,1,1,"div",26)(8,Qt,3,5,"div",26)(9,Ut,4,9,"div",19)(10,Bt,4,9,"div",19)(11,Ft,1,1,"div",26),c()()()()),n&2){let t=l(2);e(2),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerVisible||t.config.PrintConfigInvoice.DocumentVisibility.CustomerCodeVisible||t.config.PrintConfigInvoice.DocumentVisibility.IdentificationVisible||t.config.PrintConfigInvoice.DocumentVisibility.CustomerEmailVisible||t.config.PrintConfigInvoice.DocumentVisibility.CustomerAddressVisible),e(2),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerVisible),e(2),i("ngIf",(t.data==null?null:t.data.Contact.NationalIDNumber)&&t.config.PrintConfigInvoice.DocumentVisibility.IdentificationVisible),e(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerEmailVisible&&(t.data==null?null:t.data.Contact.Email)),e(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerAddressVisible),e(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility!==1&&(t.data==null?null:t.data.Contact.Phone)!==null),e(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.PhoneCustomerVisibility!==1&&(t.data==null?null:t.data.Contact.Phone)==null),e(),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CustomerAddressVisible)}}function $t(n,o){if(n&1&&(a(0,"div",15)(1,"div",69),p(2),c()()),n&2){let t=l(2);e(2),u(" ",t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.FooterLabel==null?null:t.config.PrintConfigInvoice.FooterLabel.CopyLabelText," ")}}function Wt(n,o){n&1&&(y(0),m(1,"img",70,1),h())}function jt(n,o){if(n&1&&(a(0,"strong",73),p(1),c()),n&2){let t=l(3);e(),A(" ",t.modifiedlabel," ",t.data==null?null:t.data.HeaderTitle," # ")}}function Gt(n,o){if(n&1&&(a(0,"strong",73),p(1),c()),n&2){let t=l(3);e(),u(" ",t.config.PrintConfigInvoice.HeaderTitle," # ")}}function Xt(n,o){if(n&1&&m(0,"span",74),n&2){let t=l(3);i("innerHtml",t.data==null||t.data.Invoice==null?null:t.data.Invoice.Number,g)}}function Zt(n,o){if(n&1&&(a(0,"strong",73),p(1),c()),n&2){let t=l(3);e(),v(t.data==null?null:t.data.Title)}}function Yt(n,o){if(n&1&&s(0,jt,2,2,"strong",71)(1,Gt,2,1,"strong",71)(2,Xt,1,1,"span",72)(3,Zt,2,1,"strong",71),n&2){let t=l(2);i("ngIf",(t.data==null?null:t.data.Title)==null&&!(t.data!=null&&t.data.IsInvoiceAndDelivery)),e(),i("ngIf",(t.data==null?null:t.data.Title)==null&&(t.data==null?null:t.data.IsInvoiceAndDelivery)),e(),i("ngIf",(t.data==null?null:t.data.Title)==null),e(),i("ngIf",(t.data==null?null:t.data.Title)!=null)}}function qt(n,o){n&1&&(a(0,"th"),p(1," Due "),c())}function Jt(n,o){n&1&&(a(0,"th"),p(1," ToP "),c())}function Kt(n,o){n&1&&(a(0,"th"),p(1,"Sales"),c())}function tn(n,o){n&1&&(y(0),a(1,"th"),p(2,"PO#"),c(),h())}function nn(n,o){if(n&1&&(m(0,"td",25),_(1,"date")),n&2){let t=l(2);i("innerHtml",x(1,1,t.data==null||t.data.Invoice==null?null:t.data.Invoice.Due,"dd MMM yyyy"),g)}}function en(n,o){if(n&1&&m(0,"td",25),n&2){let t=l(2);i("innerHtml",(t.data==null||t.data.Invoice==null?null:t.data.Invoice.ToP)+" Days",g)}}function on(n,o){if(n&1&&m(0,"td",25),n&2){let t=l(2);i("innerHtml",t.data==null?null:t.data.SalesName,g)}}function ln(n,o){if(n&1&&(y(0),m(1,"td",25),h()),n&2){let t=l(2);e(),i("innerHtml",t.data==null||t.data.Order==null?null:t.data.Order.ReferenceNumber,g)}}function an(n,o){if(n&1&&(a(0,"div",75),m(1,"h3",25),a(2,"div"),p(3),m(4,"div",25)(5,"div",25),c()()),n&2){let t=l(2);E("margin-right","15px"),e(),i("innerHtml",t.config.PrintConfigInvoice.DocumentLabel.ShippingAddress,g),e(2),A(" ",t.data==null||t.data.Shipping==null?null:t.data.Shipping.Name," ",!(t.data==null||t.data.Shipping==null)&&t.data.Shipping.Phone?", "+(t.data==null||t.data.Shipping==null?null:t.data.Shipping.Phone):""," "),e(),i("innerHtml",t.data==null||t.data.Shipping==null?null:t.data.Shipping.Address,g),e(),i("innerHtml",t.data==null||t.data.Shipping==null?null:t.data.Shipping.City,g)}}function cn(n,o){if(n&1&&(a(0,"th"),p(1," Category "),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(2,T)||C(3,Q))}}function rn(n,o){n&1&&(a(0,"th"),p(1,"Brand"),c())}function dn(n,o){if(n&1&&(a(0,"th"),p(1," Model "),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(2,T)||C(3,Q))}}function pn(n,o){if(n&1&&(a(0,"th"),p(1),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(3,T)||C(4,ft)),e(),u(" ",t.config.PrintConfigInvoice.ItemsTable.ProductCodeVisibleTitle?t.config.PrintConfigInvoice.ItemsTable.ProductCodeVisibleTitle:"Product Code"," ")}}function gn(n,o){if(n&1&&(a(0,"th"),p(1),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(3,T)||C(4,ft)),e(),u(" ",t.config.PrintConfigInvoice.ItemsTable.CodeVisibleTitle!=""?t.config.PrintConfigInvoice.ItemsTable.CodeVisibleTitle:"Code"," ")}}function mn(n,o){if(n&1&&(a(0,"th",76),p(1," Qty "),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(2,Mt)||C(3,Q))}}function _n(n,o){if(n&1&&(a(0,"th",77),p(1),c()),n&2){let t=l(2);e(),u(" ",t.config.PrintConfigInvoice.ItemsTable.UOMVisibleTitle!=""?t.config.PrintConfigInvoice.ItemsTable.UOMVisibleTitle:"UOM"," ")}}function sn(n,o){if(n&1&&(a(0,"th",76),p(1),c()),n&2){let t=l(2);e(),u(" ",t.config.ModuleSell!=null&&t.config.ModuleSell.ProductDialog.UnitQtyLabel?t.config.ModuleSell==null?null:t.config.ModuleSell.ProductDialog.UnitQtyLabel:"Content"," ")}}function fn(n,o){if(n&1&&(a(0,"th",78),p(1),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(3,yt)||C(4,T)),e(),u(" Price (",t.data==null?null:t.data.CurrencySymbol,") ")}}function un(n,o){n&1&&(a(0,"th",79),p(1," Disc "),c())}function Cn(n,o){if(n&1&&(a(0,"th",78),p(1),c()),n&2){let t=l(2);b(t.printTemplate.PrintLX300&&C(3,ht)||C(4,It)),e(),u(" Total (",t.data==null?null:t.data.CurrencySymbol,") ")}}function Pn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Category,g)}}function xn(n,o){if(n&1&&(m(0,"p",25),_(1,"SafeHtml")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.Note),g)}}function vn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductBrand,g)}}function bn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Model,g)}}function Mn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductCode,g)}}function yn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Code,g)}}function hn(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),v(f(2,1,t.Quantity))}}function In(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),v(f(2,1,t.Quantity))}}function On(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),v(f(2,1,t.Quantity))}}function Tn(n,o){if(n&1&&(y(0),a(1,"span",86),p(2),_(3,"number"),c(),h()),n&2){let t=l(3).$implicit;e(2),u("x ",f(3,1,t.UnitQuantity),"")}}function Sn(n,o){if(n&1&&(y(0),a(1,"span"),p(2),_(3,"number"),c(),h()),n&2){let t=l(4).$implicit;e(2),u("@",f(3,1,t.VariantUnitQuantity),"")}}function An(n,o){if(n&1&&s(0,Sn,4,3,"ng-container",19),n&2){let t=l(3).$implicit,r=l(2);i("ngIf",t.VariantUnitQuantity>1&&!(!(r.config.ModuleSell==null||r.config.ModuleSell.ProductDialog==null)&&r.config.ModuleSell.ProductDialog.UnitQtyLabel))}}function Hn(n,o){if(n&1&&(y(0),s(1,Tn,4,3,"ng-container",57)(2,An,1,1,"ng-template",null,2,H),h()),n&2){let t=S(3),r=l(2).$implicit;e(),i("ngIf",r.UnitQuantity>1)("ngIfElse",t)}}function Rn(n,o){if(n&1&&(a(0,"td",78),s(1,hn,3,3,"span",19)(2,In,3,3,"span",19)(3,On,3,3,"span",19)(4,Hn,4,2,"ng-container",19),c()),n&2){let t=l().$implicit,r=l(2);e(),i("ngIf",r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount&&t.TypeID!=2),e(),i("ngIf",t.TypeID==2&&r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount),e(),i("ngIf",!r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount),e(),i("ngIf",r.config==null||r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.ItemsTable==null||r.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:r.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible)}}function wn(n,o){if(n&1&&m(0,"td",87),n&2){let t=l().$implicit;i("innerHtml",t.UOMName,g)}}function Vn(n,o){if(n&1&&(y(0),p(1),_(2,"number"),h()),n&2){let t=l(2).$implicit;e(),u(" ",f(2,1,t.Quantity*t.UnitQuantity)," ")}}function En(n,o){if(n&1&&(p(0),_(1,"number")),n&2){let t=l(2).$implicit;u(" ",f(1,1,(t==null?null:t.Quantity)*(t==null?null:t.VariantUnitQuantity))," ")}}function Dn(n,o){if(n&1&&(a(0,"td",78),s(1,Vn,3,3,"ng-container",57)(2,En,2,3,"ng-template",null,3,H),c()),n&2){let t=S(3),r=l(3);e(),i("ngIf",r.config.ModuleSell==null?null:r.config.ModuleSell.ProductDialog.UnitQtyLabel)("ngIfElse",t)}}function zn(n,o){if(n&1&&(p(0),_(1,"number")),n&2){let t=l(2).$implicit;u(" ",f(1,1,t.UnitPrice/t.VariantUnitQuantity)," ")}}function kn(n,o){if(n&1&&(p(0),_(1,"number")),n&2){let t=l(2).$implicit;u(" ",f(1,1,t.UnitPrice)," ")}}function Nn(n,o){if(n&1&&(a(0,"td",78),s(1,zn,2,3)(2,kn,2,3),c()),n&2){let t=l().$implicit,r=l(2);e(),M(!(r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.ItemsTable==null||r.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null)&&r.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Multiply&&t.VariantUnitQuantity>0&&!(r.config.ModuleSell!=null&&r.config.ModuleSell.ProductDialog.UnitQtyLabel)&&(!(r.config==null||r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.ItemsTable==null||r.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null)&&r.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible)?1:2)}}function Qn(n,o){if(n&1&&(a(0,"td",78),m(1,"div",88)(2,"div",88),_(3,"number"),c()),n&2){let t=l().$implicit;e(),i("innerHtml",t.Discount?-t.Discount+"%":"",g),e(),i("innerHtml",t.DiscountAmount?"-"+f(3,2,t.DiscountAmount):"",g)}}function Un(n,o){if(n&1&&(m(0,"td",89),_(1,"number")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.Total),g)}}function Bn(n,o){if(n&1&&(a(0,"tr"),m(1,"td",25),s(2,Pn,1,1,"td",26),a(3,"td",80),m(4,"span",81)(5,"app-serial-note",82),s(6,xn,2,3,"p",26),c(),s(7,vn,1,1,"td",26)(8,bn,1,1,"td",26)(9,Mn,1,1,"td",26)(10,yn,1,1,"td",26)(11,Rn,5,4,"td",83)(12,wn,1,1,"td",84)(13,Dn,4,2,"td",83)(14,Nn,3,1,"td",78)(15,Qn,4,4,"td",83)(16,Un,2,3,"td",85),c()),n&2){let t=o.$implicit,r=o.index,d=l(2);e(),i("innerHtml",r+1,g),e(),i("ngIf",d.config.PrintConfigGeneral.Visibility.CategoryVisible),e(2),i("innerHtml",d.config.PrintConfigOthers.OrderCartDisplayedField?t.ProductName:t.Name,g),e(),i("serials",t.Serial),e(),i("ngIf",t.Note&&d.config.PrintConfigInvoice.ItemsTable.NoteItemVisible),e(),i("ngIf",d.config.ModuleSell==null?null:d.config.ModuleSell.Grid.ShowBrandItemCart),e(),i("ngIf",d.config.PrintConfigOthers.OrderCartDisplayedField),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.ProductCodeWithCodeVariantVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.CodeVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.QuantityVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.UOMVisible),e(),i("ngIf",(t.VariantUnitQuantity>0||(d.config.ModuleSell==null?null:d.config.ModuleSell.ProductDialog.UnitQtyLabel))&&(d.config.PrintConfigInvoice==null||d.config.PrintConfigInvoice.ItemsTable==null||d.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:d.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Multiply)&&(d.config==null||d.config.PrintConfigInvoice==null||d.config.PrintConfigInvoice.ItemsTable==null||d.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:d.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible)),e(),M(d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.UnitPriceVisible?14:-1),e(),i("ngIf",d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.PercentageVisible&&d.isDiscColumnVisible),e(),i("ngIf",t.Total!=null&&d.amountVisible)}}function Fn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Category,g)}}function Ln(n,o){if(n&1&&(m(0,"p",25),_(1,"newlines")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.Note),g)}}function $n(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductBrand,g)}}function Wn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Model,g)}}function jn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductCode,g)}}function Gn(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Code,g)}}function Xn(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),u(" x ",f(2,1,t.UnitQuantity),"")}}function Zn(n,o){if(n&1&&(a(0,"td",78),p(1),_(2,"number"),s(3,Xn,3,3,"span",19),c()),n&2){let t=l().$implicit,r=l(2);e(),u(" ",f(2,2,t.Quantity)," "),e(2),i("ngIf",t.UnitQuantity!=1&&(r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.ItemsTable==null||r.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:r.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible))}}function Yn(n,o){if(n&1&&(a(0,"td"),p(1),_(2,"number"),c()),n&2){let t=l().$implicit;e(),u(" ",f(2,1,t.Quantity*t.UnitQuantity)," ")}}function qn(n,o){if(n&1&&m(0,"td",92),n&2){let t=l().$implicit;i("innerHtml",t.UOMName,g)}}function Jn(n,o){if(n&1&&(m(0,"td",89),_(1,"number")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.UnitPrice),g)}}function Kn(n,o){if(n&1&&(a(0,"td",78),m(1,"div",88)(2,"div",88),_(3,"number"),c()),n&2){let t=l().$implicit;e(),i("innerHtml",t.Discount?-t.Discount+"%":"",g),e(),i("innerHtml",t.DiscountAmount?"-"+f(3,2,t.DiscountAmount):"",g)}}function te(n,o){if(n&1&&(m(0,"td",89),_(1,"number"),_(2,"TrailingZero")),n&2){let t=l().$implicit,r=l(2);i("innerHtml",x(2,3,f(1,1,t.Total),r.data==null?null:r.data.TrailingZero),g)}}function ne(n,o){if(n&1&&(a(0,"tr",90),m(1,"td",25),s(2,Fn,1,1,"td",26),a(3,"td"),m(4,"span",25),s(5,Ln,2,3,"p",26),c(),s(6,$n,1,1,"td",26)(7,Wn,1,1,"td",26)(8,jn,1,1,"td",26)(9,Gn,1,1,"td",26)(10,Zn,4,4,"td",83)(11,Yn,3,3,"td",19)(12,qn,1,1,"td",91)(13,Jn,2,3,"td",85)(14,Kn,4,4,"td",83)(15,te,3,6,"td",85),c()),n&2){let t=o.$implicit,r=o.index,d=l(2);e(),i("innerHtml",d.cart.Main.length+r+1,g),e(),i("ngIf",d.config.PrintConfigGeneral.Visibility.CategoryVisible),e(2),i("innerHtml",d.config.PrintConfigOthers.OrderCartDisplayedField?t.ProductName:t.Name,g),e(),i("ngIf",t.Note&&t.Note&&(d.config.PrintConfigInvoice.ItemsTable.NoteItemVisible||d.config.POS.Default.PromotionVisible)),e(),i("ngIf",d.config.ModuleSell==null?null:d.config.ModuleSell.Grid.ShowBrandItemCart),e(),i("ngIf",d.config.PrintConfigOthers.OrderCartDisplayedField),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.ProductCodeWithCodeVariantVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.CodeVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.QuantityVisible),e(),i("ngIf",(d.config.ModuleSell==null?null:d.config.ModuleSell.ProductDialog.UnitQtyLabel)&&(d.config.PrintConfigInvoice==null||d.config.PrintConfigInvoice.ItemsTable==null||d.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:d.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Multiply)),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.UOMVisible),e(),i("ngIf",d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.UnitPriceVisible),e(),i("ngIf",d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.PercentageVisible),e(),i("ngIf",t.Total!=null&&d.amountVisible)}}function ee(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Category,g)}}function ie(n,o){if(n&1&&(m(0,"p",94),_(1,"SafeHtml")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.Note),g)}}function oe(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductBrand,g)}}function le(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Model,g)}}function ae(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.ProductCode,g)}}function ce(n,o){if(n&1&&m(0,"td",25),n&2){let t=l().$implicit;i("innerHtml",t.Code,g)}}function re(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),u(" ",f(2,1,t.Quantity)," ")}}function de(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),u(" ",f(2,1,t.Quantity)," ")}}function pe(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),u(" ",f(2,1,t.Quantity)," ")}}function ge(n,o){if(n&1&&(a(0,"span"),p(1),_(2,"number"),c()),n&2){let t=l(2).$implicit;e(),u(" x ",f(2,1,t.UnitQuantity),"")}}function me(n,o){if(n&1&&(a(0,"td",78),s(1,re,3,3,"span",19)(2,de,3,3,"span",19)(3,pe,3,3,"span",19)(4,ge,3,3,"span",19),c()),n&2){let t=l().$implicit,r=l(2);e(),i("ngIf",r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount&&t.TypeID!=2),e(),i("ngIf",t.TypeID==2&&r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount),e(),i("ngIf",!r.config.PrintConfigInvoice.ItemsTable.NonInventoryCount),e(),i("ngIf",t.UnitQuantity!=1&&(r.config.PrintConfigInvoice==null||r.config.PrintConfigInvoice.ItemsTable==null||r.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:r.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible))}}function _e(n,o){if(n&1&&(a(0,"td"),p(1),_(2,"number"),c()),n&2){let t=l().$implicit;e(),u(" ",f(2,1,t.Quantity*t.UnitQuantity)," ")}}function se(n,o){if(n&1&&m(0,"td",87),n&2){let t=l().$implicit;i("innerHtml",t.UOMName,g)}}function fe(n,o){if(n&1&&(m(0,"td",89),_(1,"number")),n&2){let t=l().$implicit;i("innerHtml",f(1,1,t.UnitPrice),g)}}function ue(n,o){if(n&1&&(a(0,"td",78),m(1,"div",88)(2,"div",88),_(3,"number"),c()),n&2){let t=l().$implicit;e(),i("innerHtml",t.Discount?-t.Discount+"%":"",g),e(),i("innerHtml",t.DiscountAmount?"-"+f(3,2,t.DiscountAmount):"",g)}}function Ce(n,o){if(n&1&&(m(0,"td",89),_(1,"number"),_(2,"TrailingZero")),n&2){let t=l().$implicit,r=l(2);i("innerHtml",x(2,3,f(1,1,t.Total),r.config.PrintConfigGeneral.TrailingZero),g)}}function Pe(n,o){if(n&1&&(a(0,"tr"),m(1,"td",25),s(2,ee,1,1,"td",26),a(3,"td",80),m(4,"span",25),s(5,ie,2,3,"p",93),c(),s(6,oe,1,1,"td",26)(7,le,1,1,"td",26)(8,ae,1,1,"td",26)(9,ce,1,1,"td",26)(10,me,5,4,"td",83)(11,_e,3,3,"td",19)(12,se,1,1,"td",84)(13,fe,2,3,"td",85)(14,ue,4,4,"td",83)(15,Ce,3,6,"td",85),c()),n&2){let t=o.$implicit,r=o.index,d=l(2);e(),i("innerHtml",r+1,g),e(),i("ngIf",d.config.PrintConfigGeneral.Visibility.CategoryVisible),e(2),i("innerHtml",d.config.PrintConfigOthers.OrderCartDisplayedField?t.ProductName:t.Name,g),e(),i("ngIf",t.Note&&d.config.PrintConfigInvoice.ItemsTable.NoteItemVisible),e(),i("ngIf",d.config.ModuleSell==null?null:d.config.ModuleSell.Grid.ShowBrandItemCart),e(),i("ngIf",d.config.PrintConfigOthers.OrderCartDisplayedField),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.ProductCodeWithCodeVariantVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.CodeVisible),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.QuantityVisible),e(),i("ngIf",(d.config.ModuleSell==null?null:d.config.ModuleSell.ProductDialog.UnitQtyLabel)&&(d.config.PrintConfigInvoice==null||d.config.PrintConfigInvoice.ItemsTable==null||d.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:d.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Multiply)),e(),i("ngIf",d.config.PrintConfigInvoice.ItemsTable.UOMVisible),e(),i("ngIf",d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.UnitPriceVisible),e(),i("ngIf",d.amountVisible&&d.config.PrintConfigInvoice.ItemsTable.PercentageVisible&&d.isDiscColumnVisible),e(),i("ngIf",t.Total!=null&&d.amountVisible)}}function xe(n,o){if(n&1&&(a(0,"span"),p(1),c()),n&2){let t=l().index,r=l(3);e(),u(" ",t==0&&(r.data==null?null:r.data.Items.length)>1?"Qty: "+r.totalItemsLabel:"","")}}function ve(n,o){if(n&1&&(a(0,"tr")(1,"th",95),s(2,xe,2,1,"span",19),p(3),c(),a(4,"th"),p(5,":"),c(),a(6,"th",96),p(7),c(),a(8,"th",77),p(9),_(10,"number"),_(11,"TrailingZero"),c()()),n&2){let t=o.$implicit,r=l(3);e(2),i("ngIf",r.config.PrintConfigInvoice.ItemsFooter.TotalQuantityVisible),e(),u(" ",t.Label," "),e(4),v(t.CurrencySymbol),e(2),u(" ",x(11,6,f(10,4,t.Amount),r.data==null?null:r.data.TrailingZero)," ")}}function be(n,o){if(n&1&&(a(0,"tbody"),s(1,ve,12,9,"tr",40),c()),n&2){let t=l(2);e(),i("ngForOf",t.data==null?null:t.data.AmountSummary)}}function Me(n,o){if(n&1&&(a(0,"tr")(1,"th"),p(2),c(),a(3,"td"),p(4,":"),c(),a(5,"td",96),p(6),c(),a(7,"td",97),p(8),_(9,"number"),_(10,"TrailingZero"),c()()),n&2){let t=o.$implicit,r=l(2);e(2),v(t.Label),e(4),v(t.CurrencySymbol),e(2),u(" ",x(10,5,f(9,3,t.Amount),r.data==null?null:r.data.TrailingZero)," ")}}function ye(n,o){if(n&1&&(m(0,"td",25),_(1,"newlines")),n&2){let t=l(4);i("innerHtml",f(1,1,t.data==null?null:t.data.TotalInWord),g)}}function he(n,o){if(n&1&&(a(0,"tr"),m(1,"th",100),a(2,"td"),p(3,":"),c(),s(4,ye,2,3,"td",26),c()),n&2){let t=l(3);e(),i("innerHtml",t.config.PrintConfigGeneral.Wordify.WordifyLanguageDefault?"Wordify":"Terbilang",g),e(3),i("ngIf",t.data==null?null:t.data.TotalInWord)}}function Ie(n,o){if(n&1&&(a(0,"tr"),m(1,"th",100),a(2,"td"),p(3,":"),c(),m(4,"td",25),_(5,"date"),c()),n&2){let t=l(3);e(),i("innerHtml",t.config.ModuleSell==null?null:t.config.ModuleSell.Shipping.DateLabel,g),e(3),i("innerHtml",x(5,2,t.data==null||t.data.Invoice==null?null:t.data.Invoice.CustomDateField,"dd MMM yyyy (HH:mm)"),g)}}function Oe(n,o){if(n&1&&(m(0,"div",25),_(1,"date")),n&2){let t=l().$implicit;i("innerHtml",x(1,1,t.Date,"dd MMM yy"),g)}}function Te(n,o){if(n&1&&(a(0,"div"),p(1),_(2,"limitTo"),c()),n&2){let t=l().$implicit,r=l(4);e(),u(" ",r.config.PrintConfigInvoice.DocumentVisibility.PaymentCode==3?"***"+I(2,1,t.Code,4,t.Code.length-4):t.Code," - ")}}function Se(n,o){if(n&1&&m(0,"div",103),n&2){let t=l().$implicit;i("innerHTML",t.Note?t.Note:"",g)}}function Ae(n,o){if(n&1&&(a(0,"div",101),s(1,Oe,2,4,"div",26),_(2,"checkPropValueIsSame"),a(3,"div"),p(4),c(),s(5,Te,3,5,"div",19),a(6,"div"),p(7),_(8,"number"),c()(),s(9,Se,1,1,"div",102)),n&2){let t=o.$implicit,r=l(4);e(),i("ngIf",!x(2,5,r.data==null?null:r.data.Payments,"Date")),e(3),u("- ",t.MethodName," -"),e(),i("ngIf",(t==null?null:t.Code)&&r.config.PrintConfigInvoice.DocumentVisibility.PaymentCode!=1),e(2),u(" ",t.Amount<(r.data==null?null:r.data.FinalAmount)?f(8,8,r.change>0?t.PaidAmount:t.Amount):""," "),e(2),i("ngIf",r.config.PrintConfigInvoice.DocumentVisibility.PaymentNoteVisible)}}function He(n,o){if(n&1&&(a(0,"tr"),m(1,"th",100),a(2,"td"),p(3,":"),c(),a(4,"td"),G(5,Ae,10,10,null,null,j),c()()),n&2){let t=l(3);e(),i("innerHtml",(t.data==null||t.data.Invoice==null?null:t.data.Invoice.PaymentStateID)==2?"Down Payment":"Payment",g),e(4),X(t.data==null?null:t.data.Payments)}}function Re(n,o){if(n&1&&(a(0,"tr")(1,"th",23),p(2),c(),a(3,"td"),p(4,":"),c(),m(5,"td",25),_(6,"sum"),_(7,"number"),c()),n&2){let t=l(4);e(2),u(" ",t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.Footer==null?null:t.config.PrintConfigInvoice.Footer.LabelRemaining," "),e(3),i("innerHtml",f(7,5,(t.data==null?null:t.data.FinalAmount)-x(6,2,t.data==null?null:t.data.Payments,"Amount")),g)}}function we(n,o){if(n&1&&s(0,Re,8,7,"tr",19),n&2){let t=l(3);i("ngIf",(t.data==null||t.data.Invoice==null?null:t.data.Invoice.PaymentStateID)!=null&&(t.data==null||t.data.Invoice==null?null:t.data.Invoice.PaymentStateID)<3)}}function Ve(n,o){if(n&1&&(a(0,"tr")(1,"th",23),p(2,"Delivery"),c(),a(3,"td"),p(4,":"),c(),m(5,"td",25),c()),n&2){let t=l(3);e(5),i("innerHtml",t.data==null||t.data.Order==null?null:t.data.Order.DeliveryStateString,g)}}function Ee(n,o){if(n&1&&(a(0,"tr")(1,"th",23),p(2,"Note"),c(),a(3,"td"),p(4,":"),c(),m(5,"td",104),_(6,"newlines"),_(7,"newlines"),c()),n&2){let t=l(3);e(5),i("innerHtml",!(t.data==null||t.data.Invoice==null)&&t.data.Invoice.Note?f(6,1,t.data==null||t.data.Invoice==null?null:t.data.Invoice.Note):f(7,3,t.data==null||t.data.Order==null?null:t.data.Order.Note),g)}}function De(n,o){if(n&1&&(a(0,"tr")(1,"th",23),p(2,"Point"),c(),a(3,"td"),p(4,":"),c(),m(5,"td",25),c()),n&2){let t=l(3);e(5),i("innerHtml",t.data==null?null:t.data.LoyaltyPoint,g)}}function ze(n,o){if(n&1&&(a(0,"div",20)(1,"div",98)(2,"table",99),s(3,he,5,2,"tr",19)(4,Ie,6,5,"tr",19)(5,He,7,1,"tr",19)(6,we,1,1,"tr")(7,Ve,6,1,"tr",19)(8,Ee,8,5,"tr",19)(9,De,6,1,"tr"),c()()()),n&2){let t=l(2);e(3),i("ngIf",t.config.PrintConfigGeneral.Wordify.WordifyTotalAmountVisible&&!t.workOrderMode),e(),i("ngIf",(t.data==null||t.data.Invoice==null?null:t.data.Invoice.CustomDateField)!="0001-01-01T00:00:00"),e(),i("ngIf",t.config.PrintConfigInvoice.Footer.PaymentMethodVisible&&!t.workOrderMode&&(t.data==null?null:t.data.Payments.length)),e(),M(!(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.Footer==null)&&t.config.PrintConfigInvoice.Footer.LabelRemaining?6:-1),e(),i("ngIf",(t.data==null||t.data.Order==null?null:t.data.Order.DeliveryStateID)!=3&&t.config.PrintConfigInvoice.Footer.DeliveryInfoVisible),e(),i("ngIf",t.config.PrintConfigInvoice.Footer.NoteVisible&&((t.data==null||t.data.Invoice==null?null:t.data.Invoice.Note)||(t.data==null||t.data.Order==null?null:t.data.Order.Note))),e(),M(t.data!=null&&t.data.LoyaltyPoint&&(!(t.config==null||t.config.PrintConfigInvoice==null)&&t.config.PrintConfigInvoice.Footer.ShowLoyaltyPoint)&&t.hasCustomer()?9:-1)}}function ke(n,o){if(n&1&&(a(0,"div",108),m(1,"h5",109),a(2,"div",110),p(3," \xA0 "),c()()),n&2){let t=l(3);e(),i("innerHtml",t.config.PrintConfigInvoice.Signature.Column1,g)}}function Ne(n,o){if(n&1&&(a(0,"div",108),m(1,"h5",109),a(2,"div",110),p(3," \xA0 "),c()()),n&2){let t=l(3);e(),i("innerHtml",t.config.PrintConfigInvoice.Signature.Column2,g)}}function Qe(n,o){if(n&1&&(a(0,"div",108),m(1,"h5",109),a(2,"div",110),p(3," \xA0 "),c()()),n&2){let t=l(3);e(),i("innerHtml",t.config.PrintConfigInvoice.Signature.Column3,g)}}function Ue(n,o){if(n&1&&(a(0,"div",108),m(1,"h5",109),a(2,"div",110),p(3," \xA0 "),c()()),n&2){let t=l(3);e(),i("innerHtml",t.config.PrintConfigInvoice.Signature.Column4,g)}}function Be(n,o){if(n&1&&(a(0,"div",105)(1,"div",106),s(2,ke,4,1,"div",107)(3,Ne,4,1,"div",107)(4,Qe,4,1,"div",107)(5,Ue,4,1,"div",107),c()()),n&2){let t=l(2);e(2),i("ngIf",t.config.PrintConfigInvoice.Signature.Column1),e(),i("ngIf",t.config.PrintConfigInvoice.Signature.Column2),e(),i("ngIf",t.config.PrintConfigInvoice.Signature.Column3),e(),i("ngIf",t.config.PrintConfigInvoice.Signature.Column4)}}function Fe(n,o){if(n&1&&(m(0,"div",111),_(1,"SafeHtml")),n&2){let t=l(2);i("innerHtml",f(1,1,t.printTemplate.FooterRight?t.printTemplate.FooterRight:""),g)}}function Le(n,o){if(n&1&&(a(0,"small",52),p(1),c()),n&2){let t=l(2);e(),A(" Print by: ",t.data==null?null:t.data.PrintPerson,", ",t.data==null?null:t.data.PrintTime," ")}}function $e(n,o){if(n&1&&(a(0,"small",52),p(1),c()),n&2){let t=l(2);e(),u(" Trace ID: ",t.data==null||t.data.Invoice==null?null:t.data.Invoice.ID," ")}}function We(n,o){if(n&1&&(a(0,"div",10)(1,"div",11)(2,"div",12),s(3,Vt,10,13,"div",13)(4,Lt,12,8,"div",14),c(),s(5,$t,3,1,"div",15),a(6,"div",16)(7,"div",17)(8,"div",18),s(9,Wt,3,0,"ng-container",19),c(),a(10,"div",18),s(11,Yt,4,4),c(),a(12,"div",18)(13,"div",20)(14,"div",21)(15,"table",22)(16,"thead",23)(17,"tr")(18,"th"),p(19,"Date"),c(),s(20,qt,2,0,"th",19)(21,Jt,2,0,"th",19)(22,Kt,2,0,"th",19)(23,tn,3,0,"ng-container",19),c()(),a(24,"tbody")(25,"tr",24),m(26,"td",25),_(27,"date"),s(28,nn,2,4,"td",26)(29,en,1,1,"td",26)(30,on,1,1,"td",26)(31,ln,2,1,"ng-container",19),c()()()()()()(),a(32,"div",27),s(33,an,6,7,"div",28),c()()(),a(34,"div",29)(35,"div",30)(36,"table",31)(37,"thead",32)(38,"tr")(39,"th",33),p(40,"No"),c(),s(41,cn,2,4,"th",34),a(42,"th"),p(43,"Name"),c(),s(44,rn,2,0,"th",19)(45,dn,2,4,"th",34)(46,pn,2,5,"th",34)(47,gn,2,5,"th",34)(48,mn,2,4,"th",35)(49,_n,2,1,"th",36)(50,sn,2,1,"th",37)(51,fn,2,5,"th",38)(52,un,2,0,"th",39)(53,Cn,2,5,"th",38),c()(),a(54,"tbody"),s(55,Bn,17,15,"tr",40)(56,ne,16,14,"tr",41)(57,Pe,16,14,"tr",40),c()()(),a(58,"div",42)(59,"table",43),s(60,be,2,1,"tbody",19),a(61,"tbody"),s(62,Me,11,8,"tr",40),c()()()(),s(63,ze,10,7,"div",44),a(64,"div",20),s(65,Be,6,4,"div",45),c(),a(66,"div",46),m(67,"div",47),_(68,"SafeHtml"),s(69,Fe,2,3,"div",48),c(),a(70,"div",49)(71,"div",50),s(72,Le,2,2,"small",51),c()(),a(73,"div",50),s(74,$e,2,1,"small",52),c()()),n&2){let t=l();W("",t.printTemplate.CssClass," ",t.workOrderMode?"workorder_container":"invoice_print_container"," printing d-print-block"),i("ngClass",D(50,xt,t.fullMode&&(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.A4PaperConfig==null?null:t.config.PrintConfigInvoice.A4PaperConfig.DockBottom))),e(3),i("ngIf",t.config.PrintConfigInvoice.DocumentVisibility.CompanyVisible),e(),i("ngIf",(t.data==null||t.data.Shipping==null?null:t.data.Shipping.Sender)||(t.data==null?null:t.data.ContactDisplay)),e(),M(!(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.Footer==null)&&t.config.PrintConfigInvoice.Footer.CopyLabelEnabled&&(!(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.FooterLabel==null)&&t.config.PrintConfigInvoice.FooterLabel.CopyLabelText)&&!t.data.AfterSell?5:-1),e(4),i("ngIf",(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.InvoiceQR==null?null:t.config.PrintConfigInvoice.InvoiceQR.TransformTo)==2&&!t.hidebarcodeunderminimum),e(2),M(!(t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.DocumentVisibility==null)&&t.config.PrintConfigInvoice.DocumentVisibility.NumberVisible?11:-1),e(9),i("ngIf",t.data.Invoice.Due&&(t.data==null||t.data.Invoice==null?null:t.data.Invoice.Due)!=t.mindate&&t.config.PrintConfigInvoice.DocumentVisibility.InvoicePaymentTermsVisible),e(),i("ngIf",t.data.Invoice.Due&&(t.data==null||t.data.Invoice==null?null:t.data.Invoice.Due)!=t.mindate&&t.config.PrintConfigInvoice.DocumentVisibility.InvoicePaymentTermsVisible),e(),i("ngIf",t.data==null?null:t.data.SalesName),e(),i("ngIf",(t.config==null||t.config.PrintConfigDelivery==null||t.config.PrintConfigDelivery.Advanced==null?null:t.config.PrintConfigDelivery.Advanced.PrintPONumber)&&(t.data==null||t.data.Order==null?null:t.data.Order.ReferenceNumber)),e(3),i("innerHtml",x(27,45,t.data==null||t.data.Invoice==null?null:t.data.Invoice.Date,"dd MMM yyyy"),g),e(2),i("ngIf",t.data.Invoice.Due&&(t.data==null||t.data.Invoice==null?null:t.data.Invoice.Due)!=t.mindate&&t.config.PrintConfigInvoice.DocumentVisibility.InvoicePaymentTermsVisible),e(),i("ngIf",t.data.Invoice.Due&&(t.data==null||t.data.Invoice==null?null:t.data.Invoice.Due)!=t.mindate&&t.config.PrintConfigInvoice.DocumentVisibility.InvoicePaymentTermsVisible),e(),i("ngIf",t.data==null?null:t.data.SalesName),e(),i("ngIf",(t.config==null||t.config.PrintConfigDelivery==null||t.config.PrintConfigDelivery.Advanced==null?null:t.config.PrintConfigDelivery.Advanced.PrintPONumber)&&(t.data==null||t.data.Order==null?null:t.data.Order.ReferenceNumber)),e(),E("margin-top","35px"),e(),i("ngIf",t.data==null||t.data.Shipping==null?null:t.data.Shipping.Name),e(8),i("ngIf",t.config.PrintConfigGeneral.Visibility.CategoryVisible),e(3),i("ngIf",t.config.ModuleSell==null?null:t.config.ModuleSell.Grid.ShowBrandItemCart),e(),i("ngIf",t.config.PrintConfigOthers.OrderCartDisplayedField),e(),i("ngIf",t.config.PrintConfigInvoice.ItemsTable.ProductCodeWithCodeVariantVisible&&t.cart.Main.length>0),e(),i("ngIf",t.config.PrintConfigInvoice.ItemsTable.CodeVisible),e(),i("ngIf",t.config.PrintConfigInvoice.ItemsTable.QuantityVisible),e(),i("ngIf",t.config.PrintConfigInvoice.ItemsTable.UOMVisible),e(),i("ngIf",((t.config.ModuleSell==null?null:t.config.ModuleSell.ProductDialog.UnitQtyLabel)||t.hasVariantUnitQty)&&(t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.ItemsTable==null||t.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:t.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Multiply)&&(t.config==null||t.config.PrintConfigInvoice==null||t.config.PrintConfigInvoice.ItemsTable==null||t.config.PrintConfigInvoice.ItemsTable.UnitQuantity==null?null:t.config.PrintConfigInvoice.ItemsTable.UnitQuantity.Visible)),e(),i("ngIf",t.amountVisible&&t.config.PrintConfigInvoice.ItemsTable.UnitPriceVisible),e(),i("ngIf",t.amountVisible&&t.config.PrintConfigInvoice.ItemsTable.PercentageVisible&&t.isDiscColumnVisible),e(),i("ngIf",t.amountVisible),e(2),i("ngForOf",t.cart.Main),e(),i("ngForOf",t.cart.NonTaxable),e(),i("ngForOf",t.cart.Return),e(3),i("ngIf",t.amountVisible),e(2),i("ngForOf",t.data==null?null:t.data.PaidAmountSummary),e(),i("ngIf",!(t.data!=null&&t.data.offlineMode)),e(2),i("ngIf",(t.config==null||t.config.PrintConfigGeneral==null||t.config.PrintConfigGeneral.Visibility==null?null:t.config.PrintConfigGeneral.Visibility.Visible)&&(t.config.PrintConfigInvoice.Signature.Column1||t.config.PrintConfigInvoice.Signature.Column2||t.config.PrintConfigInvoice.Signature.Column3||t.config.PrintConfigInvoice.Signature.Column4)),e(2),i("ngClass",!t.printTemplate.FooterRight&&"single")("innerHtml",f(68,48,t.printTemplate.FooterLeft?t.printTemplate.FooterLeft:""),g),e(2),i("ngIf",t.printTemplate.FooterRight),e(3),i("ngIf",t.config.PrintConfigInvoice.Footer.CreatorVisiblePosition!=1),e(2),M(t.config.PrintConfigInvoice.DocumentVisibility.TraceID&&(!(t.data==null||t.data.Invoice==null)&&t.data.Invoice.ID)?74:-1)}}var _t=class n{constructor(o,t){this.activeRoute=o;this.decimalPipe=t}set content(o){o&&JsBarcode("#barcode",this.data?.Invoice?.Number,{displayValue:!1})}barcodeOptions;data;printTemplate;config;workOrderMode=!1;fullMode;receiptParam;invoiceOption=!0;modifiedlabel;workModelabel;cart;amountVisible;change;isDiscColumnVisible=!1;paperPrintMode;printModeType;totalItemsLabel;mindate=O.MinDate;hidebarcodeunderminimum=!1;hasVariantUnitQty=!1;hasCustomer=$(!1);ngOnChanges(){if(this.config&&this.data){this.checkHasVariantUnitQty(),this.config.PrintConfigOthers!=null&&(this.modifiedlabel=this.workOrderMode?this.config.PrintConfigOthers.Modified.WorkOrder:this.config.PrintConfigOthers.Modified.CustomerDelivery),this.workModelabel=null,this.modifiedlabel&&this.data.Invoice.Modified!=O.MinDate&&(this.modifiedlabel="("+this.modifiedlabel+")",this.workModelabel=this.modifiedlabel);let o=this.activeRoute.snapshot.queryParamMap.get("Price"),t=o==null||o=="1";this.amountVisible=!this.workOrderMode&&t&&this.data.PriceVisible,this.cart={},this.cart.Main=this.data.Items,this.isDiscColumnVisible=this.cart.Main.filter(P=>P.Discount!=0||P.DiscountAmount!=0).length,this.cart.NonTaxable=[],this.cart.Return=[],this.config.PrintConfigInvoice.ItemsTable.SeparateRetur&&(this.cart.Main=this.data.Items.filter(P=>P.Quantity>0),this.cart.Return=this.data.Items.filter(P=>P.Quantity<0)),this.config.PrintConfigInvoice.ItemsTable.SeparateTaxable&&(this.cart.NonTaxable=this.cart.Main.filter(P=>!P.Taxable),this.cart.Main=this.cart.Main.filter(P=>P.Taxable));let r=this.data.FinalAmount,d=0;this.data.Payments!=null&&this.data.Payments.forEach(P=>{d+=P.PaidAmount}),this.change=d-r,this.data.Invoice.ToP&&(this.data.Invoice.ToP=parseInt(this.data.Invoice.ToP.toFixed(1)));let ut=O.IsNotEmpty(this.data?.Contact?.ID);this.hasCustomer.set(ut)}}checkHasVariantUnitQty(){this.hasVariantUnitQty=this.data.Items.some(o=>o.VariantUnitQuantity!=null&&o.VariantUnitQuantity>1)}ngOnInit(){this.initPaperModeConfig(),this.generateItemLabel()}initPaperModeConfig(){if(this.receiptParam){let o=this.receiptParam;this.paperPrintMode=[{label:"A4",link:"/print/Invoice",param:o},{label:"8cm",link:"/print/InvoiceMini",param:o}]}}generateItemLabel(){let o=0,t=0;for(let r of this.data.Items)(this.config.PrintConfigInvoice.ItemsTable.NonInventoryCount||r.TypeID!=2)&&(o+=r.Quantity,t+=r.Total);t<this.config.PrintConfigInvoice.InvoiceQR.MinimumAmount&&(this.hidebarcodeunderminimum=!0),this.totalItemsLabel=O.StringFormat("{0}",this.decimalPipe.transform(o).toString())}static \u0275fac=function(t){return new(t||n)(V(it),V(k))};static \u0275cmp=B({type:n,selectors:[["pos-receipt-a4"]],viewQuery:function(t,r){if(t&1&&Z(Ct,5),t&2){let d;Y(d=q())&&(r.content=d.first)}},inputs:{barcodeOptions:"barcodeOptions",data:"data",printTemplate:"printTemplate",config:"config",workOrderMode:"workOrderMode",fullMode:"fullMode",receiptParam:"receiptParam",invoiceOption:"invoiceOption"},features:[L],decls:5,vars:6,consts:[["DEFAULTWIDTH",""],["barcode",""],["VARIANT_UNIT_QTY",""],["VARIANT_UNIT_QUANTITY",""],["rel","stylesheet","href",w`/Styles/Master/app_custom.css`],["rel","stylesheet","href",w`/Styles/Print/PaperSizeA4_custom.css`],[1,"print_container",3,"ngClass"],[1,"d-print-none",3,"paperPrints","paperType"],[3,"class","ngClass",4,"ngIf"],["class","d-print-none",3,"paperPrints","paperType",4,"ngIf"],[3,"ngClass"],[1,"row","g-0","py-3","d-flex","justify-content-between","header","overflow-hidden"],[1,"header-left-invoice","col-7","p-0","ms-2","header-left"],["class","row ms-0",4,"ngIf"],["class","row ms-0 mt-3 header-customer",4,"ngIf"],[1,"h5","text-center","receipt-copy"],[1,"col","p-0","m-0","header_right"],[1,"row","me-0","invoice_number"],[1,"w-100","d-flex","justify-content-end"],[4,"ngIf"],[1,"row"],[1,"col-12","d-flex","justify-content-end"],[1,"table","table-bordered","w-auto","float-none"],[1,"bg-light-gray"],[1,"border"],[3,"innerHtml"],[3,"innerHtml",4,"ngIf"],[1,"row","d-flex","justify-content-end"],["class","col-11 border contact shippingAddress",3,"margin-right",4,"ngIf"],[1,"row","d-print-block","g-0"],[1,"col-md-12","cartItems"],[1,"w-100","table","table-sm","table-bordered","plain"],[2,"background","#fdf3c6"],[2,"width","20px"],[3,"style",4,"ngIf"],["class","text-end","style","width: 65px",3,"style",4,"ngIf"],["class","text-end","style","width: 50px",4,"ngIf"],["style","width: 65px","class","text-end",4,"ngIf"],["class","text-end",3,"style",4,"ngIf"],["class","text-end","style","width: 80px",4,"ngIf"],[4,"ngFor","ngForOf"],["class","separator-row separator-row-notaxable",4,"ngFor","ngForOf"],[1,"col-12"],[1,"table","table-sm","table-borderless","d-flex","justify-content-end"],["class","row",4,"ngIf"],["class","col-12 signature",4,"ngIf"],[1,"row","footer","h-auto","mt-8"],[1,"col",3,"ngClass","innerHtml"],["class","col",3,"innerHtml",4,"ngIf"],[1,"row","w-100","mt-5"],[1,"col-md","d-flex","justify-content-center","printed"],["class","d-block text-center fst-italic py-2","style","font-size: 12px",4,"ngIf"],[1,"d-block","text-center","fst-italic","py-2",2,"font-size","12px"],[1,"row","ms-0"],["class","shop-logo col-auto",4,"ngIf"],[1,"g-0","p-0","m-0","shop-description",3,"ngClass"],[1,"shop-logo","col-auto"],[4,"ngIf","ngIfElse"],["class","col-md-12 px-0",3,"style","src",4,"ngIf"],[1,"col-md-12","px-0",3,"src"],["class","col-md-12 px-0",3,"src",4,"ngIf"],[1,"row","ms-0","mt-3","header-customer"],[1,"col-6","border"],["class","fw-bold",3,"innerHtml",4,"ngIf"],[1,"box"],[1,"customer_info"],[1,"fw-bold",3,"innerHtml"],["class","codecustomer",4,"ngIf"],[1,"codecustomer"],[1,"p-3","receipt-copy-text","d-inline-block"],["id","barcode",2,"height","30px"],["class","h3",4,"ngIf"],["class","h3",3,"innerHtml",4,"ngIf"],[1,"h3"],[1,"h3",3,"innerHtml"],[1,"col-11","border","contact","shippingAddress"],[1,"text-end",2,"width","65px"],[1,"text-end",2,"width","50px"],[1,"text-end"],[1,"text-end",2,"width","80px"],[2,"word-break","break-word"],[1,"d-block",3,"innerHtml"],[3,"serials"],["class","text-end",4,"ngIf"],["class","number",3,"innerHtml",4,"ngIf"],["class","text-end",3,"innerHtml",4,"ngIf"],[1,"ms-1"],[1,"number",3,"innerHtml"],[1,"text-danger",3,"innerHtml"],[1,"text-end",3,"innerHtml"],[1,"separator-row","separator-row-notaxable"],["class","UOMWidth",3,"innerHtml",4,"ngIf"],[1,"UOMWidth",3,"innerHtml"],["class","special-TinyMCE",3,"innerHtml",4,"ngIf"],[1,"special-TinyMCE",3,"innerHtml"],["colspan","3"],[1,"currency"],[2,"width","50px"],[1,"col-auto"],[1,"table","table-sm","table-bordered","table-secondary","info"],[1,"bg-light-gray",3,"innerHtml"],[1,"d-flex","align-items-center","justify-content-start","gap-2","flex-wrap"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[2,"word-break","break-all",3,"innerHtml"],[1,"col-12","signature"],[1,"row","justify-content-between"],["class","col-3","style","height: 120px",4,"ngIf"],[1,"col-3",2,"height","120px"],[1,"text-center","mb-0",2,"line-height","20px",3,"innerHtml"],[1,"border-bottom","border-dark",2,"height","100px"],[1,"col",3,"innerHtml"]],template:function(t,r){t&1&&(m(0,"link",4)(1,"link",5),a(2,"div",6),s(3,Tt,1,1,"POS-print-mode",7)(4,We,75,52,"div",8),c()),t&2&&(e(2),i("ngClass",z(3,Pt,r.printTemplate.PrintLX300,!r.printTemplate.PrintLX300)),e(),M(r.receiptParam?3:-1),e(),i("ngIf",r.data))},dependencies:()=>[J,K,tt,gt,N,k,nt,lt,ot,at,ct,rt,dt],styles:['div.print_container[_ngcontent-%COMP%]{margin:0 auto!important;text-align:left;color:#000;position:relative}div.mode[_ngcontent-%COMP%]{color:gray;text-align:right;height:20px;padding-top:2px;font-size:10px}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{float:left;display:block;margin:0 5px 0 0;padding:0}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{float:left;display:block;margin:0;padding:0}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;display:block;margin:0 5px 0 0;padding:0 5px 0 0;border-right:solid 1px gray}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-right:none}div.header[_ngcontent-%COMP%]{width:100%;overflow:auto}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:12px;margin:0 5px 0 0;padding:0;font-weight:700}div.copy[_ngcontent-%COMP%]{background-image:url(/Images/Print/copy_bg.png);background-repeat:no-repeat;background-position:50% 70px}div.note[_ngcontent-%COMP%]{position:relative}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%]{float:left;margin-left:5px;width:440px;text-align:left}.special-TinyMCE[_ngcontent-%COMP%]{padding-top:10px!important}@media print{body[_ngcontent-%COMP%]{font-family:Arial;color:#000}}@-moz-document url-prefix(){}div.signature[_ngcontent-%COMP%], div.signature-b[_ngcontent-%COMP%]{clear:both;height:111px;margin-top:25px}div.signature[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0 0 80px;padding:0;font-size:12px;font-weight:700}div.signature[_ngcontent-%COMP%] div.name[_ngcontent-%COMP%]{border-top:solid 1px Gray;height:15px;text-align:center}div.signature[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%]{float:left;margin-left:70px;width:150px}div.signature[_ngcontent-%COMP%] div.center[_ngcontent-%COMP%]{float:left;margin-left:155px;width:150px}div.signature[_ngcontent-%COMP%] div.noLeftMargin[_ngcontent-%COMP%]{margin-left:0!important}div.signature[_ngcontent-%COMP%] div.leftSmall[_ngcontent-%COMP%]{margin-left:120px!important}div.signature[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], div.signature[_ngcontent-%COMP%] div.center[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{text-align:center}div.signature[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%]{float:right;width:150px;margin-right:5px}div.print_container[_ngcontent-%COMP%] div.footerNote[_ngcontent-%COMP%]{padding-left:5px;width:150px}div.signature[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{text-align:center}div.fullSignatureNote[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%}table[_ngcontent-%COMP%] tfoot[_ngcontent-%COMP%]{display:table-row-group}body[_ngcontent-%COMP%]{padding:0;font-size:12px}a.linkMini[_ngcontent-%COMP%]{left:130px;position:absolute;top:.5px;text-decoration:none;color:#3b5998}div.print_container[_ngcontent-%COMP%]{margin:0 auto;width:900px;text-align:left;color:#000;position:relative}div.print_container[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h5[_ngcontent-%COMP%], div.print_container[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-family:Arial!important;background-color:#fff}div.mode[_ngcontent-%COMP%]{color:gray;font-size:11px;text-align:right;height:20px;padding-top:2px}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{float:left;display:block;margin:0;padding:0}div.mode[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:first-child{padding-right:5px;margin-right:5px;border-right:solid 1px gray}div.mode[_ngcontent-%COMP%] div.printer[_ngcontent-%COMP%]{float:left}div.mode[_ngcontent-%COMP%] div.template[_ngcontent-%COMP%]{float:right}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#3b5998;text-decoration:none}div.mode[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]{color:gray}div.mode[_ngcontent-%COMP%] a.active[_ngcontent-%COMP%]:hover{text-decoration:none}div.mode[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin:0 5px}div.header_left[_ngcontent-%COMP%]{float:left;padding:5px 0 0 5px}div.header_left[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:5px 0 0;padding:0;font-size:18px}div.header_right[_ngcontent-%COMP%]{float:right;padding:0 5px 0 0;max-width:425px}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0;padding:0;text-align:right}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:16px;font-weight:700;margin:0 5px 0 0;text-transform:uppercase}div.header_right[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:18px;font-weight:400}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{float:right;border-collapse:collapse}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:solid 1px #9E9E9E;padding:4px}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background:#f6f6f6}div.header_right[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-bottom:6px}div.header[_ngcontent-%COMP%] img.float[_ngcontent-%COMP%]{margin:5px 0 0 5px;float:left}div.header[_ngcontent-%COMP%] div.company[_ngcontent-%COMP%]{width:100%;overflow:auto;margin:0 0 8px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%]{float:left}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:18px;font-weight:700;margin:0;padding:0}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:11px;text-align:left;font-weight:400}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%]{margin-top:3px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.address[_ngcontent-%COMP%]{float:left;min-width:125px}div.header[_ngcontent-%COMP%] div.companyBody[_ngcontent-%COMP%] div.contact_info[_ngcontent-%COMP%] div.number[_ngcontent-%COMP%]{margin-right:5px;min-width:160px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%]{width:max-content;overflow:auto;border:solid 1px #9E9E9E;padding:5px}div.header[_ngcontent-%COMP%] div.contact[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:12px;margin:0 5px 0 0;padding:0;font-weight:700;float:left}div.cartItems[_ngcontent-%COMP%]{padding:10px 3px 2px 5px}div.copy[_ngcontent-%COMP%]{background-image:url(/Images/Print/copy_bg.png);background-repeat:no-repeat;background-position:50% 70px}div.topNote[_ngcontent-%COMP%]{clear:both;text-align:right}div.invoiceNote[_ngcontent-%COMP%]{padding:10px 0 0 7px}div.note[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-weight:700;font-size:12px;margin:0 0 3px;padding:0}div.note[_ngcontent-%COMP%] div.single[_ngcontent-%COMP%]{width:895px!important}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%]{float:left;margin-left:5px;width:440px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:5px 0 0;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ol[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:2px 0 5px;padding:0 0 0 20px}div.note[_ngcontent-%COMP%] div.left[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 0 2px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%]{float:right;width:440px;border-left:solid 1px #CACACA;padding-left:8px;margin-right:5px}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}div.note[_ngcontent-%COMP%] div.right[_ngcontent-%COMP%] h3.closing[_ngcontent-%COMP%]{margin-top:10px;text-align:right}div.note-info[_ngcontent-%COMP%]{margin:auto;width:23%}table.info[_ngcontent-%COMP%]{border-collapse:collapse;margin-top:5px;margin-left:5px}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.info[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 7px;border:solid 1px #d8d8d8}table.info[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6}div.fullContainer[_ngcontent-%COMP%] div.print_container[_ngcontent-%COMP%]{min-height:970px;position:relative}.clearfix[_ngcontent-%COMP%]:before, .clearfix[_ngcontent-%COMP%]:after{content:"";display:table}.clearfix[_ngcontent-%COMP%]:after{clear:both}.clearfix[_ngcontent-%COMP%]{zoom:1}div.reportMargin[_ngcontent-%COMP%]{margin:20px 0 0}@media print{div.mode[_ngcontent-%COMP%], .linkMini[_ngcontent-%COMP%]{display:none;visibility:hidden;height:0px}thead[_ngcontent-%COMP%]{display:table-header-group}}small.timestamp[_ngcontent-%COMP%], small.creator[_ngcontent-%COMP%], small.printed[_ngcontent-%COMP%]{font-size:12px;text-align:center;display:block;font-style:italic;padding:2px 0}small.creator[_ngcontent-%COMP%]{padding:2px 0 20px;font-style:normal}span.titleJB[_ngcontent-%COMP%]{font-weight:700;padding:10px 0 7px 8px;display:block}.topHolder[_ngcontent-%COMP%]{margin-top:15px!important}h1.jobOrderHeader[_ngcontent-%COMP%]{text-align:center}.shippingAddress[_ngcontent-%COMP%]{text-align:right;min-width:240px;clear:both}.shippingAddress[_ngcontent-%COMP%] div.box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:first-child{text-align:left;font-weight:700}.packingSlip[_ngcontent-%COMP%]{min-width:150px}.customer_info[_ngcontent-%COMP%]{min-width:310px}table.plain[_ngcontent-%COMP%]{border-collapse:collapse}table.plain[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-shadow:0 -1px 0 rgba(0,0,0,.4);height:28px;line-height:16px;padding:2px 7px;color:#fff;font-weight:700}table.plain[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fceca3!important;background-image:none!important}table.plain[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{color:#000;text-shadow:none}table.plain[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 7px}table.plain[_ngcontent-%COMP%] tr.thick[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] tr.thick[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:3px solid black}table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f6f6f6}table.plain[_ngcontent-%COMP%] a.thumb[_ngcontent-%COMP%]{margin:0 5px 0 0;padding:0;float:left;display:block}table.plain[_ngcontent-%COMP%] a.thumb[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;background-color:#fff;display:block;background-color:#d8dfea;border:1px solid #bbb;-webkit-border-radius:3px;border-radius:3px}table.plain[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#2b4e75;font-style:italic;margin:0;padding:0}table.plain[_ngcontent-%COMP%] div.text[_ngcontent-%COMP%]{padding:2px 0 0}table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{display:block;color:#00f;text-decoration:none}table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(-n+3) a[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(-n+3) a[_ngcontent-%COMP%]:visited{font-weight:700}table.plain[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}table.plain[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{margin:0;padding:0;display:block}table.plain[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] input.txtPrice[_ngcontent-%COMP%]{border:solid 1px #C8D3DF;padding:3px;text-align:right}table.plain[_ngcontent-%COMP%] tr.group[_ngcontent-%COMP%]{background-color:#fdf3c6!important}table.plain[_ngcontent-%COMP%] tr.group[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#000!important}table.plain[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff}table.plain[_ngcontent-%COMP%] th.borderLRB0[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] td.borderLRB0[_ngcontent-%COMP%]{border-left-width:0px!important;border-right-width:0px!important;border-bottom-width:0px!important;background-color:#fff!important}table.plain[_ngcontent-%COMP%] th.number[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] td.number[_ngcontent-%COMP%]{text-align:right}table.plain[_ngcontent-%COMP%] th.numberCenter[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] td.numberCenter[_ngcontent-%COMP%]{text-align:center}table.plain[_ngcontent-%COMP%] th.red[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] td.red[_ngcontent-%COMP%]{color:red;text-align:right}table.plain[_ngcontent-%COMP%] td.top[_ngcontent-%COMP%]{vertical-align:top}table.plain[_ngcontent-%COMP%] td.noTopPad[_ngcontent-%COMP%]{padding-top:0}table.plain[_ngcontent-%COMP%] td.small[_ngcontent-%COMP%]{font-size:11px}table.plain[_ngcontent-%COMP%] tr.grid_footer[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] tr.grid_footer[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-width:0px;background-color:#fff}table.plain[_ngcontent-%COMP%] span.serial[_ngcontent-%COMP%]{display:inline-block;margin-left:10px}table.plain[_ngcontent-%COMP%] tr.grid_footer[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.plain[_ngcontent-%COMP%] tr.grid_footer[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px 0 5px 5px;background-color:#fff}table.plain[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .inlineMarginLeft[_ngcontent-%COMP%]{display:inline-block;margin-left:10px}table.rightAuto[_ngcontent-%COMP%]{margin:0 0 0 auto}table[_ngcontent-%COMP%] ul.float[_ngcontent-%COMP%]{margin:0;padding:0;list-style-type:circle;list-style-position:inside}table[_ngcontent-%COMP%] ul.float[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:0 20px 0 0;padding:0;float:left;display:block}table[_ngcontent-%COMP%] ul.float[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}table[_ngcontent-%COMP%] ul.float[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}div.scroll[_ngcontent-%COMP%]{width:100%;overflow:auto;padding:0 0 2px}table.fixed[_ngcontent-%COMP%]{table-layout:fixed}table.footer_row[_ngcontent-%COMP%]{margin:5px 8px 0 auto}table.footer_row[_ngcontent-%COMP%] td.currency[_ngcontent-%COMP%], table.footer_row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:5px 0 5px 5px;text-align:right}table.footer_row[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:5px;text-align:right;float:left}table.footer_adjust[_ngcontent-%COMP%]{margin:-10px 18px 0 auto}table.footer_adjust[_ngcontent-%COMP%] td.currency[_ngcontent-%COMP%], table.footer_adjust[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:last-child{padding:5px 0 5px 5px;text-align:right}table.footer_adjust[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:5px 23px 5px 5px;text-align:right;float:left}table.total-all-grid[_ngcontent-%COMP%]{width:100%!important;border-collapse:collapse;margin-top:10px}table.manufacture[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}table.manufacture[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fceca3!important}table.manufacture[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid #BBBBBB!important}table.accounting[_ngcontent-%COMP%]{max-width:1000px;border-collapse:collapse}table.accounting[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:1px solid #999;border-bottom:1px solid #999;height:28px;line-height:16px;color:#444;background-color:#fceca3!important}table.accounting[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#f6f6f6}table.accounting[_ngcontent-%COMP%] th[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:7px;border-bottom:1px solid black}table.accounting[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{color:#00f;text-decoration:none}table.accounting[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}table.accounting[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] input.txtPrice[_ngcontent-%COMP%]{border:solid 1px #C8D3DF;padding:3px;text-align:right}table.accounting[_ngcontent-%COMP%] th.number[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] td.number[_ngcontent-%COMP%]{text-align:right}table.accounting[_ngcontent-%COMP%] th.red[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] td.red[_ngcontent-%COMP%]{color:red;text-align:right}table.accounting[_ngcontent-%COMP%] th.bordertop[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] td.bordertop[_ngcontent-%COMP%]{border-top:1px #999 solid}table.accounting[_ngcontent-%COMP%] tfoot[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table.accounting[_ngcontent-%COMP%] tfoot[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-bottom:20px}table.main[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr.main[_ngcontent-%COMP%]:nth-child(2n){background-color:#fff}table.main[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr.main[_ngcontent-%COMP%]:nth-child(4n-1){background-color:#f6f6f6}table.main[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fceca3!important;background-image:none!important}table.main[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #9e9e9e;color:#000;text-shadow:none}.cartItems[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%]{width:100%;padding:0;margin:0}.cartItems[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%] > li[_ngcontent-%COMP%]{width:calc(33% - 17px);float:left;list-style:none;padding:5px 7px;border:solid 1px #d8d8d8}.cartItems[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{width:calc(33% - 17px);float:left;list-style:none;padding:5px 7px;border:solid 1px #d8d8d8;display:table-cell}.cartItems[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%] td[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{color:#2b4e75;font-style:italic;margin:0;padding:0}.listReturn[_ngcontent-%COMP%] tr.item[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){width:10%!important}.listReturn[_ngcontent-%COMP%] tr.item[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(3){width:10%!important}.listReturn[_ngcontent-%COMP%] tr.item[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(5){width:10%!important}.listReturn[_ngcontent-%COMP%] tr.item[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(6){width:5%!important}.listReturn[_ngcontent-%COMP%] tr.item[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(7){width:10%!important}.listReturn[_ngcontent-%COMP%] a.head[_ngcontent-%COMP%]{padding:10px 0 10px 10px;display:block;width:50%}.listReturn[_ngcontent-%COMP%] td.numberCenter[_ngcontent-%COMP%]{text-align:right!important}.listReturn[_ngcontent-%COMP%] table.summary[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{padding-top:20px!important;display:block}table.paidAmount[_ngcontent-%COMP%]{float:right;margin-top:-10px;text-align:right;padding-right:7px}table.paidAmount[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:0 0 1px}table.paidAmount[_ngcontent-%COMP%] td.currency[_ngcontent-%COMP%]{width:20px;text-align:left}table.paidAmount[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:nth-child(2){padding:0 5px}div.zebra[_ngcontent-%COMP%]{display:table;border-collapse:collapse}div.zebra[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-cell}div.zebra[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > strong[_ngcontent-%COMP%]{display:block;border:1px solid #525252;background-color:#545454;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#888),color-stop(100%,#545454));background-image:-webkit-linear-gradient(#888,#545454);background-image:-moz-linear-gradient(#888,#545454);background-image:-o-linear-gradient(#888,#545454);background-image:linear-gradient(#888,#545454);-webkit-box-shadow:inset 0 2px 0 -1px rgba(255,255,255,.2);-moz-box-shadow:inset 0 2px 0 -1px rgba(255,255,255,.2);box-shadow:inset 0 2px 0 -1px #fff3;text-shadow:0 -1px 0 rgba(0,0,0,.4);height:28px;line-height:24px;border-bottom:1px solid #333;padding:2px 7px;color:#fff;font-weight:700}div.zebra[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:block;padding:5px 7px;border:solid 1px #d8d8d8;font-weight:700}div.zebra[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span.number[_ngcontent-%COMP%]{text-align:right}.full-mode[_ngcontent-%COMP%]{min-height:970px;position:relative}.receipt-copy[_ngcontent-%COMP%]{position:absolute;width:100%;margin-left:auto;margin-right:auto;left:0;right:0}.receipt-copy-text[_ngcontent-%COMP%]{border:.5px solid;border-radius:4px}']})},st=class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=F({type:n});static \u0275inj=U({imports:[et,pt,mt,N]})};export{_t as a,st as b};
@@ -0,0 +1 @@
1
+ import{h as m}from"./chunk-LHWN2J4H.js";import{n as g}from"./chunk-4G26RHGA.js";import{Dc as u,Ia as a,Ib as p,Va as n,cd as f,ia as d,ob as c,qa as r,ra as s}from"./chunk-H55AJAX5.js";var y=(()=>{class e{el;ngModel;cd;config;variant="outlined";filled;constructor(o,t,i,l){this.el=o,this.ngModel=t,this.cd=i,this.config=l}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}static \u0275fac=function(t){return new(t||e)(n(a),n(g,8),n(u),n(m))};static \u0275dir=s({type:e,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:4,hostBindings:function(t,i){t&1&&p("input",function(v){return i.onInput(v)}),t&2&&c("p-filled",i.filled)("p-variant-filled",i.variant==="filled"||i.config.inputStyle()==="filled")},inputs:{variant:"variant"}})}return e})(),j=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=r({type:e});static \u0275inj=d({imports:[f]})}return e})();export{y as a,j as b};
@@ -0,0 +1 @@
1
+ import{d as X,o as U}from"./chunk-EZCHVNC5.js";import{Aa as H,Ba as G,ga as h,la as R}from"./chunk-2FKYC63K.js";import{a as L}from"./chunk-4G26RHGA.js";import{a as B}from"./chunk-26YXEYJK.js";import{Ab as d,Fb as T,Ia as x,Ib as l,Kb as f,Lb as A,Mb as S,Pc as N,Sc as O,Ta as D,Ua as o,Va as c,Zb as F,Zc as P,_b as k,bb as w,cd as u,fc as j,gb as _,gc as p,ia as v,ja as C,jc as E,mb as m,ob as I,pa as n,qa as b,qc as z,sc as V,wa as M,xa as y,zb as s}from"./chunk-H55AJAX5.js";var W=["*"];var Y=new C("MAT_CARD_CONFIG"),q=(()=>{class e{constructor(i){this.appearance=i?.appearance||"raised"}static{this.\u0275fac=function(a){return new(a||e)(c(Y,8))}}static{this.\u0275cmp=n({type:e,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(a,r){a&2&&I("mat-mdc-card-outlined",r.appearance==="outlined")("mdc-card--outlined",r.appearance==="outlined")},inputs:{appearance:"appearance"},exportAs:["matCard"],standalone:!0,features:[p],ngContentSelectors:W,decls:1,vars:0,template:function(a,r){a&1&&(A(),S(0))},styles:['.mat-mdc-card{display:flex;flex-direction:column;box-sizing:border-box;position:relative;border-style:solid;border-width:0;background-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-color:var(--mdc-elevated-card-container-color, var(--mat-app-surface-container-low));border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium));box-shadow:var(--mdc-elevated-card-container-elevation, var(--mat-app-level1))}.mat-mdc-card::after{position:absolute;top:0;left:0;width:100%;height:100%;border:solid 1px rgba(0,0,0,0);content:"";display:block;pointer-events:none;box-sizing:border-box;border-radius:var(--mdc-elevated-card-container-shape, var(--mat-app-corner-medium))}.mat-mdc-card-outlined{background-color:var(--mdc-outlined-card-container-color, var(--mat-app-surface));border-radius:var(--mdc-outlined-card-container-shape, var(--mat-app-corner-medium));border-width:var(--mdc-outlined-card-outline-width);border-color:var(--mdc-outlined-card-outline-color, var(--mat-app-outline-variant));box-shadow:var(--mdc-outlined-card-container-elevation, var(--mat-app-level0))}.mat-mdc-card-outlined::after{border:none}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mat-mdc-card-actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font, var(--mat-app-title-large-font));line-height:var(--mat-card-title-text-line-height, var(--mat-app-title-large-line-height));font-size:var(--mat-card-title-text-size, var(--mat-app-title-large-size));letter-spacing:var(--mat-card-title-text-tracking, var(--mat-app-title-large-tracking));font-weight:var(--mat-card-title-text-weight, var(--mat-app-title-large-weight))}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color, var(--mat-app-on-surface));font-family:var(--mat-card-subtitle-text-font, var(--mat-app-title-medium-font));line-height:var(--mat-card-subtitle-text-line-height, var(--mat-app-title-medium-line-height));font-size:var(--mat-card-subtitle-text-size, var(--mat-app-title-medium-size));letter-spacing:var(--mat-card-subtitle-text-tracking, var(--mat-app-title-medium-tracking));font-weight:var(--mat-card-subtitle-text-weight, var(--mat-app-title-medium-weight))}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}}return e})();var J=(()=>{class e{static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275mod=b({type:e})}static{this.\u0275inj=v({imports:[h,u,h]})}}return e})();var $=(e,t)=>({"bg-gradient-warning":e,"disabled-date py-2 px-3":t});function tt(e,t){if(e&1){let i=T();s(0,"mat-card",3)(1,"mat-calendar",4),l("selectedChange",function(r){M(i);let g=f();return y(g.onSelectDate(r))}),d()()}if(e&2){let i=f();o(),m("selected",i.date)}}var K=class e{constructor(t){this.ref=t}tooltip;date=new Date;showCalendar=!1;disabled=!1;isToday=w(!0);onChange=t=>{};onTouched=()=>{};writeValue(t){this.date=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}onSelectDate(t){this.showCalendar=!1,this.date=t,this.onChange(this.date),this.checkIsToday(this.date)}checkIsToday(t){t&&this.isToday.set(B.isToDay(t))}closeCalendar(t){this.ref.nativeElement.contains(t.target)||(this.showCalendar=!1)}onShowCalendar(){this.disabled||(this.showCalendar=!this.showCalendar)}static \u0275fac=function(i){return new(i||e)(c(x))};static \u0275cmp=n({type:e,selectors:[["POS-invoice-date"]],hostBindings:function(i,a){i&1&&l("mousedown",function(g){return a.closeCalendar(g)},!1,D)},inputs:{tooltip:"tooltip"},standalone:!0,features:[j([{provide:L,multi:!0,useExisting:e}]),p],decls:5,vars:10,consts:[["matTooltipPosition","above",1,"date-container","text-end","position-relative","p-1","px-2","pointer",3,"ngClass","matTooltip"],[1,"fw-normal","mb-0",3,"click"],["class","inline-calendar-card position-absolute",4,"ngIf"],[1,"inline-calendar-card","position-absolute"],[3,"selectedChange","selected"]],template:function(i,a){i&1&&(s(0,"div",0)(1,"h6",1),l("click",function(){return a.onShowCalendar()}),F(2),z(3,"date"),d(),_(4,tt,2,1,"mat-card",2),d()),i&2&&(m("ngClass",E(7,$,!a.isToday(),a.disabled))("matTooltip",a.tooltip),o(2),k(V(3,4,a.date,"dd MMMM yyyy")),o(2),m("ngIf",a.showCalendar))},dependencies:[u,N,O,P,J,q,U,X,R,G,H],styles:[".inline-calendar-card[_ngcontent-%COMP%]{width:300px;right:0;z-index:9999}.disabled-date[_ngcontent-%COMP%]{background-color:#ebebe4}"]})};export{J as a,K as b};
@@ -0,0 +1 @@
1
+ import{a as ht,b as wt}from"./chunk-CJO25BBP.js";import{j as _t,k as F,p as yt,q as xt}from"./chunk-LHWN2J4H.js";import{a as b}from"./chunk-2FWFPV5I.js";import{C as mt,D as gt,a as st,c as at,h as pt,i as lt,k as ut,n as dt,o as ct}from"./chunk-4G26RHGA.js";import{a as ot}from"./chunk-WG6PV6VL.js";import{a as ft}from"./chunk-RRKCUSBB.js";import{$b as K,Ab as a,Bb as E,Cb as _,Db as h,Dc as Z,Ea as T,Eb as H,Fb as w,Fc as J,Ib as f,Jc as X,Kb as r,Nd as it,Pc as $,Rb as L,Rc as tt,Sc as M,Sd as rt,Tb as W,Ua as l,Ub as j,Va as O,Wb as U,Wc as et,Xb as Q,Zb as m,_b as q,cb as B,cc as y,cd as nt,dc as x,ec as C,fb as R,fc as z,ga as A,gb as g,gc as Y,ia as N,jc as k,kc as G,la as I,mb as u,pa as P,qa as D,rb as S,wa as d,xa as c,zb as o}from"./chunk-H55AJAX5.js";import"./chunk-KW4B7WMB.js";var Tt=(i,s,t)=>({$implicit:i,events:s,index:t});function Ot(i,s){if(i&1){let t=w();_(0),o(1,"input",2),f("input",function(n){d(t);let p=r().$implicit,v=r();return c(v.onInput(n,p-1))})("focus",function(n){d(t);let p=r(2);return c(p.onInputFocus(n))})("blur",function(n){d(t);let p=r(2);return c(p.onInputBlur(n))})("paste",function(n){d(t);let p=r(2);return c(p.onPaste(n))})("keydown",function(n){d(t);let p=r(2);return c(p.onKeyDown(n))}),a(),h()}if(i&2){let t=r().$implicit,e=r();l(),u("value",e.getModelValue(t))("maxLength",1)("type",e.inputType)("inputmode",e.inputMode)("variant",e.variant)("readonly",e.readonly)("disabled",e.disabled)("invalid",e.invalid)("tabindex",e.tabindex)("unstyled",e.unstyled)("autofocus",e.getAutofocus(t))}}function Et(i,s){i&1&&H(0)}function Mt(i,s){if(i&1&&(_(0),g(1,Et,1,0,"ng-container",3),h()),i&2){let t=r().$implicit,e=r();l(),u("ngTemplateOutlet",e.inputTemplate)("ngTemplateOutletContext",G(2,Tt,e.getToken(t-1),e.getTemplateEvents(t-1),t))}}function It(i,s){if(i&1&&(_(0),g(1,Ot,2,11,"ng-container",1)(2,Mt,2,6,"ng-container",1),h()),i&2){let t=r();l(),u("ngIf",!t.inputTemplate),l(),u("ngIf",t.inputTemplate)}}var St={provide:st,useExisting:A(()=>V),multi:!0},V=(()=>{class i{cd;invalid=!1;disabled=!1;readonly=!1;variant="outlined";tabindex=null;length=4;mask=!1;integerOnly=!1;autofocus;onChange=new T;onFocus=new T;onBlur=new T;templates;inputTemplate;tokens=[];onModelChange=()=>{};onModelTouched=()=>{};value;get inputMode(){return this.integerOnly?"numeric":"text"}get inputType(){return this.mask?"password":"text"}constructor(t){this.cd=t}ngAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"input":this.inputTemplate=t.template;break;default:this.inputTemplate=t.template;break}})}getToken(t){return this.tokens[t]}getTemplateEvents(t){return{input:e=>this.onInput(e,t),keydown:e=>this.onKeyDown(e),focus:e=>this.onFocus.emit(e),blur:e=>this.onBlur.emit(e),paste:e=>this.onPaste(e)}}onInput(t,e){this.tokens[e]=t.target.value,this.updateModel(t),t.inputType==="deleteContentBackward"?this.moveToPrev(t):(t.inputType==="insertText"||t.inputType==="deleteContentForward")&&this.moveToNext(t)}updateModel(t){let e=this.tokens.join("");this.onModelChange(e),this.onChange.emit({originalEvent:t,value:e})}writeValue(t){t?Array.isArray(t)&&t.length>0?this.value=t.slice(0,this.length):this.value=t.toString().split("").slice(0,this.length):this.value=t,this.updateTokens(),this.cd.markForCheck()}updateTokens(){this.value!==null&&this.value!==void 0?Array.isArray(this.value)?this.tokens=[...this.value]:this.tokens=this.value.toString().split(""):this.tokens=[]}getModelValue(t){return this.tokens[t-1]||""}getAutofocus(t){return t===1?this.autofocus:!1}registerOnChange(t){this.onModelChange=t}registerOnTouched(t){this.onModelTouched=t}moveToPrev(t){let e=this.findPrevInput(t.target);e&&(e.focus(),e.select())}moveToNext(t){let e=this.findNextInput(t.target);e&&(e.focus(),e.select())}findNextInput(t){let e=t.nextElementSibling;if(e)return e.nodeName==="INPUT"?e:this.findNextInput(e)}findPrevInput(t){let e=t.previousElementSibling;if(e)return e.nodeName==="INPUT"?e:this.findPrevInput(e)}onInputFocus(t){t.target.select(),this.onFocus.emit(t)}onInputBlur(t){this.onBlur.emit(t)}onKeyDown(t){if(!(t.altKey||t.ctrlKey||t.metaKey))switch(t.key){case"ArrowLeft":this.moveToPrev(t),t.preventDefault();break;case"ArrowUp":case"ArrowDown":t.preventDefault();break;case"Backspace":t.target.value.length===0&&(this.moveToPrev(t),t.preventDefault());break;case"ArrowRight":this.moveToNext(t),t.preventDefault();break;case"Tab":break;default:(this.integerOnly&&!((t.code.startsWith("Digit")||t.code.startsWith("Numpad"))&&Number(t.key)>=0&&Number(t.key)<=9)||this.tokens.join("").length>=this.length&&t.code!=="Delete")&&t.preventDefault();break}}onPaste(t){if(!this.disabled&&!this.readonly){let e=t.clipboardData.getData("text");if(e.length){let n=e.substring(0,this.length);(!this.integerOnly||!isNaN(n))&&(this.tokens=n.split(""),this.updateModel(t))}t.preventDefault()}}getRange(t){return Array.from({length:t},(e,n)=>n+1)}trackByFn(t){return t}static \u0275fac=function(e){return new(e||i)(O(Z))};static \u0275cmp=P({type:i,selectors:[["p-inputOtp"]],contentQueries:function(e,n,p){if(e&1&&L(p,_t,4),e&2){let v;W(v=j())&&(n.templates=v)}},hostAttrs:[1,"p-inputotp","p-component"],inputs:{invalid:"invalid",disabled:"disabled",readonly:"readonly",variant:"variant",tabindex:"tabindex",length:"length",mask:"mask",integerOnly:"integerOnly",autofocus:[2,"autofocus","autofocus",J]},outputs:{onChange:"onChange",onFocus:"onFocus",onBlur:"onBlur"},features:[z([St]),R],decls:1,vars:2,consts:[[4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["type","text","pInputText","","pAutoFocus","",1,"p-inputotp-input",3,"input","focus","blur","paste","keydown","value","maxLength","type","inputmode","variant","readonly","disabled","invalid","tabindex","unstyled","autofocus"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,n){e&1&&g(0,It,3,2,"ng-container",0),e&2&&u("ngForOf",n.getRange(n.length))("ngForTrackBy",n.trackByFn)},dependencies:[tt,M,et,ht,yt],encapsulation:2,changeDetection:0})}return i})(),Ct=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=D({type:i});static \u0275inj=N({imports:[nt,F,wt,xt,F]})}return i})();var Ft=["otpInput"],bt=(i,s)=>({"rounded-end":i,"border-end-0":s});function Vt(i,s){if(i&1){let t=w();_(0),o(1,"form",12),f("submit",function(){d(t);let n=r();return c(n.requestOtp(n.Email))}),o(2,"h1",13),m(3,"Forgot Password"),a(),o(4,"h6",14),m(5,"Enter the username or email address to reset password"),a(),o(6,"div",15)(7,"div",16)(8,"span"),E(9,"i",17),a()(),o(10,"input",18),C("ngModelChange",function(n){d(t);let p=r();return x(p.Email,n)||(p.Email=n),c(n)}),a()(),o(11,"div",19)(12,"button",20),m(13,"Reset Password"),a()(),o(14,"a",21),m(15,"Return to log in"),a()(),h()}if(i&2){let t=r();l(10),y("ngModel",t.Email),l(2),u("disabled",!t.Email)}}function At(i,s){if(i&1){let t=w();_(0),o(1,"form",12),f("submit",function(){d(t);let n=r();return c(n.verifyOtp(n.otpEmail,n.otp))}),o(2,"h1",22),m(3,"OTP Code Verification"),a(),o(4,"h6",14),m(5,"Please enter the 6 digit code sent to "),o(6,"span",23),m(7),a()(),o(8,"div",24)(9,"p-inputOtp",25,0),C("ngModelChange",function(n){d(t);let p=r();return x(p.otp,n)||(p.otp=n),c(n)}),f("ngModelChange",function(){d(t);let n=r();return c(n.onInputOtp())}),a()(),o(11,"h6",26),m(12,"Didn't get a code? "),o(13,"span",27),f("click",function(){d(t);let n=r();return c(n.requestOtp(n.otpEmail))}),m(14,"Click to resend"),a()(),o(15,"div",19)(16,"button",20),m(17,"Verify"),a()()(),h()}if(i&2){let t=r();l(7),q(t.otpEmail),l(2),u("integerOnly",!0),y("ngModel",t.otp),u("autofocus",!0),l(7),u("disabled",!t.otp)}}function Nt(i,s){if(i&1){let t=w();o(0,"i",35),f("click",function(){d(t);let n=r(3);return c(n.showPassword())}),a()}if(i&2){let t=r(3);S("",t.showHideClass," fas")}}function Dt(i,s){if(i&1&&(o(0,"span",33),g(1,Nt,1,3,"i",34),a()),i&2){let t=r(2);l(),u("ngIf",t.password)}}function Bt(i,s){if(i&1){let t=w();o(0,"i",35),f("click",function(){d(t);let n=r(3);return c(n.showPassword())}),a()}if(i&2){let t=r(3);S("",t.showHideClassConfirm," fas")}}function Rt(i,s){if(i&1&&(o(0,"span",33),g(1,Bt,1,3,"i",34),a()),i&2){let t=r(2);l(),u("ngIf",t.password)}}function Ht(i,s){if(i&1){let t=w();_(0),o(1,"form",12),f("submit",function(){d(t);let n=r();return c(n.changePassword(n.otpEmail,n.otp,n.password))}),o(2,"h1",22),m(3,"Create New Password"),a(),o(4,"h6",14),m(5,"Create a strong password to keep your account safe"),a(),o(6,"div",28)(7,"div",29)(8,"input",30),C("ngModelChange",function(n){d(t);let p=r();return x(p.password,n)||(p.password=n),c(n)}),a(),g(9,Dt,2,1,"span",31),a(),o(10,"div",29)(11,"input",32),C("ngModelChange",function(n){d(t);let p=r();return x(p.confirmPassword,n)||(p.confirmPassword=n),c(n)}),a(),g(12,Rt,2,1,"span",31),a()(),o(13,"div",19)(14,"button",20),m(15,"Change Password"),a()()(),h()}if(i&2){let t=r();l(8),u("type",t.inputType)("ngClass",k(9,bt,t.browserType=="edge",t.browserType!="edge")),y("ngModel",t.password),l(),u("ngIf",t.browserType!="edge"),l(2),u("type",t.inputConfirm)("ngClass",k(12,bt,t.browserType=="edge",t.browserType!="edge")),y("ngModel",t.confirmPassword),l(),u("ngIf",t.browserType!="edge"),l(2),u("disabled",(!t.password||!t.confirmPassword)&&t.password!=t.confirmPassword)}}var vt=class i{constructor(s){this.httpService=s;document.title="Outlet | Forgot Password Form",this.alert={Visible:!1,Message:null,Success:!1},this.showHideClass="fas fa-eye fas",this.showHideClassConfirm="fas fa-eye fas",this.browserType=this.findname_browser(),X(()=>{let t=e=>{e.key==="Enter"&&(e.preventDefault(),this.verifyOtp(this.otpEmail,this.otp))};this.otpInputEl()?document.querySelector(".otp-input input:last-child").addEventListener("keyup",t):document.removeEventListener("keyup",t)})}otpInputEl=B("otpInput");appVersion=ot.version;showHideClass;showHideClassConfirm;inputType="password";inputConfirm="password";password;confirmPassword;browserType;Email;alert;toastr=I(rt);state="Email";otp="";otpEmail="";router=I(it);findname_browser(){var s=window.navigator.userAgent;if(s.indexOf("Edg/")>-1)return"edge";var t={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer/i,edge:/edg/i};for(var e in t)if(t[e].test(s))return e;return"unknown"}ngOnInit(){document.body.classList.add("login-body")}ngOnDestroy(){document.body.classList.remove("login-body")}showPassword(){this.showHideClass=this.showHideClass=="fas fa-eye fas"?"fas fas fa-eye-slash":"fas fa-eye fas",this.inputType=this.showHideClass=="fas fa-eye fas"?"password":"text",this.showHideClassConfirm=this.showHideClassConfirm=="fas fa-eye fas"?"fas fas fa-eye-slash":"fas fa-eye fas",this.inputConfirm=this.showHideClassConfirm=="fas fa-eye fas"?"password":"text"}Submit(){let s={Email:this.Email};this.httpService.post("/api/login/SubmitForgotPassword",s).subscribe({next:t=>{this.alert.Visible=!0,this.alert.Success=!0,this.alert.Message=t.Message},error:t=>{this.alert.Visible=!0,this.alert.Message=t?.error?.Message?t?.error?.Message:t?.error}})}requestOtp(s){this.httpService.post("/api/password/requestotp",{email:s}).subscribe(t=>{this.toastr.info(`OTP sent to ${t.otpEmailTarget}`,b.Info),this.otpEmail=t.otpEmailTarget,this.state="OTP"})}onInputOtp(){this.otp.length==6&&this.verifyOtp(this.otpEmail,this.otp)}verifyOtp(s,t){this.httpService.post("/api/password/verifyotp",{email:s,otp:t}).subscribe(e=>{e.success?(this.toastr.info("You can update your password",b.Info),this.state="Password"):this.toastr.info("You input the wrong OTP",b.Error)})}changePassword(s,t,e){this.httpService.post("/api/password/change",{email:s,otp:t,newPassword:e}).subscribe(()=>{this.toastr.info("Your password has been changed",b.Info),this.router.navigate(["/"])})}static \u0275fac=function(t){return new(t||i)(O(ft))};static \u0275cmp=P({type:i,selectors:[["POS-auth-forgot-password"]],viewQuery:function(t,e){t&1&&U(e.otpInputEl,Ft,5),t&2&&Q()},standalone:!0,features:[Y],decls:15,vars:4,consts:[["otpInput",""],[1,"container-fluid"],[1,"d-flex","justify-content-center","align-items-center","vh-100"],[1,"card",2,"width","30rem"],[1,"card-body","p-12"],[4,"ngIf"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_gAZdRhBYU7QVl&view=complete&v",1,"text-dark","fst-italic"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[3,"submit"],[1,"mt-8","fw-normal",2,"margin-bottom","1.3rem"],[1,"fw-normal","text-start",2,"font-size","0.8rem"],[1,"input-group","input-group-lg","mb-3","my-5"],[1,"input-group-text","input-group-text","rounded-start"],[1,"fas","fa-user","fa-lg"],["type","text","data-cy","username","placeholder","Username / Email","aria-label","Username","name","email","aria-describedby","basic-addon1",1,"form-control","form-control-lg","rounded-end","ps-2","border-start-0",2,"height","50px",3,"ngModelChange","ngModel"],[1,"my-6"],["type","submit",1,"btn","btn-primary","w-100",3,"disabled"],["href","/",1,"mt-6"],[1,"mt-8","fw-normal",2,"margin-bottom","3rem"],[1,"fw-bold"],[1,"mb-3","my-5","d-flex","justify-content-center"],["length","6","name","otp",1,"otp-input",3,"ngModelChange","integerOnly","ngModel","autofocus"],[1,"fw-normal","text-start"],[1,"text-primary","pointer",3,"click"],[1,"mb-3","my-5"],[1,"input-group","input-group-lg","mt-8"],["id","txtPassword","data-cy","password","placeholder","New Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password",1,"form-control","form-control-lg","rounded-end","ps-5",2,"height","50px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],["id","txtPassword","data-cy","password","placeholder","Confirm New Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password",1,"form-control","form-control-lg","rounded-end","ps-5",2,"height","50px",3,"ngModelChange","type","ngClass","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(t,e){t&1&&(o(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4),g(4,Vt,16,2,"ng-container",5)(5,At,18,5,"ng-container",5)(6,Ht,16,15,"ng-container",5),a()()(),o(7,"div",6)(8,"span",7),m(9,"powered by :"),a(),E(10,"a",8),a(),o(11,"div",9)(12,"a",10),m(13),E(14,"i",11),a()()()),t&2&&(l(4),u("ngIf",e.state=="Email"),l(),u("ngIf",e.state=="OTP"),l(),u("ngIf",e.state=="Password"),l(7),K("version ",e.appVersion,""))},dependencies:[M,$,gt,ct,at,pt,lt,mt,dt,ut,Ct,V],styles:["input[type=submit][_ngcontent-%COMP%]{font-size:1.125rem;width:11.25rem;font-family:Roboto Slab,serif}@media screen and (max-width: 768px){.footer-mobile[_ngcontent-%COMP%]{display:flex!important;justify-content:center!important}div.vh-100[_ngcontent-%COMP%]{height:40vh!important}.fixed-bottom[_ngcontent-%COMP%]{position:static!important}input[type=submit][_ngcontent-%COMP%]{width:98%}.card[_ngcontent-%COMP%]{border:none}} p-inputOtp{width:100%} p-inputOtp input{flex-grow:1;height:42px}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}"]})};export{vt as AuthForgotPasswordComponent};
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-AWGZKLLY.js";import{e as a,f as G}from"./chunk-WK4T26FX.js";import{C as B,a as Q,h as W,n as z}from"./chunk-4G26RHGA.js";import{a as q}from"./chunk-RRKCUSBB.js";import{Ab as M,Ea as w,Ib as m,Sb as I,Tb as $,Ub as L,Va as N,W as g,Xc as H,Z as h,_ as S,aa as v,cc as R,cd as D,d as p,da as r,dc as j,ea as b,ec as k,fc as E,ga as f,gc as V,ha as O,ka as C,la as y,mb as u,o as d,pa as _,qc as A,rc as F,t as s,zb as T}from"./chunk-H55AJAX5.js";var c=class n{signalRClient=y(P);outlets$;_onOpenNgSelect=new p;onOpenNgSelect$=this._onOpenNgSelect.asObservable();_accessOutlet=new p;accessOutlet$=this._accessOutlet.asObservable();constructor(t){this.outlets$=this.accessOutlet$.pipe(S(e=>this.onOpenNgSelect$.pipe(s(()=>e))),b(this.signalRClient.recacheOutlet$),v((e,[i,l])=>l||!e.data.get(i)?.length&&e.accessType!==i?(this.signalRClient.resetOutletCache(),t.get(`/api/Outlet/SelectOptions/${i}`).pipe(r(o=>e.data.set(i,o)),s(()=>({data:e.data,accessType:i})))):d({data:e.data,accessType:e.accessType}),{data:new Map,accessType:-1}),s(e=>e.data.get(e.accessType)),g(1))}onOpenNgSelect(){this._onOpenNgSelect.next(!1)}forceLoadOutlets(){this._onOpenNgSelect.next(!0)}accessOutlet(t){this._accessOutlet.next(t)}static \u0275fac=function(e){return new(e||n)(C(q))};static \u0275prov=O({token:n,factory:n.\u0275fac,providedIn:"root"})};var U=class n{constructor(t){this.outletsService=t}value=null;onChange=()=>{};onTouched=()=>{};multiple=!1;placeholder="Select Outlet";clearable=!0;accessType=4;outlets=[];outlets$;disabled=!1;ngSelect;onListOutlets=new w;ngOnInit(){this.outlets$=this.outletsService.outlets$.pipe(h(this.outlets),r(t=>{this.onListOutlets.emit(t)}))}ngAfterViewInit(){this.ngSelect.isOpen=!1,this.ngSelect.openEvent.emit()}onClickSelect(){this.outletsService.accessOutlet(this.accessType),this.outletsService.onOpenNgSelect()}setDisabledState(t){this.disabled=t}writeValue(t){this.value=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}onSelectChange(){this.onChange(this.value)}static \u0275fac=function(e){return new(e||n)(N(c))};static \u0275cmp=_({type:n,selectors:[["outlet-selector"]],viewQuery:function(e,i){if(e&1&&I(a,5),e&2){let l;$(l=L())&&(i.ngSelect=l.first)}},inputs:{multiple:"multiple",placeholder:"placeholder",clearable:"clearable",accessType:"accessType",outlets:"outlets"},outputs:{onListOutlets:"onListOutlets"},standalone:!0,features:[E([{provide:Q,useExisting:f(()=>n),multi:!0}]),V],decls:2,vars:8,consts:[["appendTo","body","bindLabel","v","bindValue","k",3,"open","ngModelChange","change","items","multiple","clearable","placeholder","ngModel","disabled"]],template:function(e,i){e&1&&(T(0,"ng-select",0),A(1,"async"),m("open",function(){return i.onClickSelect()}),k("ngModelChange",function(o){return j(i.value,o)||(i.value=o),o}),m("change",function(){return i.onSelectChange()}),M()),e&2&&(u("items",F(1,6,i.outlets$))("multiple",i.multiple)("clearable",i.clearable)("placeholder",i.placeholder),R("ngModel",i.value),u("disabled",i.disabled))},dependencies:[D,H,G,a,B,W,z],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important}"]})};export{U as a};
@@ -0,0 +1 @@
1
+ import{e as C}from"./chunk-7DWKYGA4.js";import{O as g,q as _}from"./chunk-V4RKZMUB.js";import{O as r}from"./chunk-2W3MAOOP.js";import{D as f}from"./chunk-4G26RHGA.js";import{Qd as u,cd as a,d,e as c,ha as s,ia as i,qa as n}from"./chunk-H55AJAX5.js";var m=class{ID;TypeID;Groups;Items};var l=class e{_Data=new c(new m);Data$=this._Data.asObservable();_itemID=new d;onSelectQuickeyItem$=this._itemID.asObservable();_EntityID;set EntityID(t){this._EntityID=t}set Data(t){this._Data.next(t)}addQuickKeyItem(t,o=this._EntityID){this._itemID.next({id:t,entityID:o})}static \u0275fac=function(o){return new(o||e)};static \u0275prov=s({token:e,factory:e.\u0275fac,providedIn:"root"})};var M=class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=n({type:e});static \u0275inj=i({providers:[l],imports:[a,C,r,u]})};var h=class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=n({type:e});static \u0275inj=i({imports:[a,f,g,r]})};var I=class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=n({type:e});static \u0275inj=i({imports:[a,_]})};export{M as a,h as b,I as c};
@@ -0,0 +1,2 @@
1
+ import{c as g,ha as h}from"./chunk-H55AJAX5.js";var b=class d{csvPrefixFormat="";convertToCSV(e,s){let i;if(typeof e=="string")i=e;else{var t=typeof e=="object"?e:JSON.parse(e);i=this.transformToCSVStringFormat(t)}this.exportCSV(i,s)}isNumeric(e){return/^-?\d+$/.test(e)}parseCSV(e){return new g(i=>{let t=new FileReader;t.onload=()=>{let a=t.result.split(/\r\n|\n/),r=a[0].split(","),m=[];for(let p=0;p<a.length;p++){let u=a[p].split(",");if(u.length==r.length){let l=[];for(let n=0;n<r.length;n++)if(this.isNumeric(u[n])){let f=u[n];l.push(parseFloat(f))}else l.push(u[n]);m.push(l)}else{var c=a[p].split(new RegExp(',(?![^"]*"(?:(?:[^"]*"){2})*[^"]*$)'));let l=[];for(let n=0;n<c.length;n++)if(this.isNumeric(c[n])){let f=c[n];l.push(parseFloat(f))}else l.push(c[n]);m.push(l)}}i.next(m)},t.readAsBinaryString(e)})}transformToCSVStringFormat(e){if(!e||!e.length)return;let s=",",i=Object.keys(e[0]);return e.map(o=>i.map(a=>{let r=o[a]===null||o[a]===void 0?"":o[a];return r=r instanceof Date?r.toLocaleString():r.toString().replace(/"/g,'""'),r.search(/("|,|\n)/g)>=0&&(r=`"${r}"`),r}).join(s)).join(`
2
+ `)}exportCSV(e,s){var i=new Blob([e],{type:"text/csv;charset=utf8;"}),t=document.createElement("a");t.setAttribute("href",window.URL.createObjectURL(i)),t.setAttribute("download",s),document.body.appendChild(t),t.click(),document.body.removeChild(t)}static \u0275fac=function(s){return new(s||d)};static \u0275prov=h({token:d,factory:d.\u0275fac,providedIn:"root"})};export{b as a};
@@ -0,0 +1 @@
1
+ import{q as i}from"./chunk-V4RKZMUB.js";import{O as r}from"./chunk-2W3MAOOP.js";import{C as c}from"./chunk-4G26RHGA.js";import{cd as o,ia as t,qa as e}from"./chunk-H55AJAX5.js";var a=class n{static \u0275fac=function(d){return new(d||n)};static \u0275mod=e({type:n});static \u0275inj=t({imports:[o,i,c,r]})};export{a};
@@ -0,0 +1 @@
1
+ import{K as c}from"./chunk-V4RKZMUB.js";import{a as m}from"./chunk-RRKCUSBB.js";import{I as s,Sd as a,da as p,ha as n,ka as o}from"./chunk-H55AJAX5.js";var g=class i{constructor(t,e){this.httpService=t;this.toastr=e}_ignoreWarning=!1;_importResponse;get ignoreWarning(){return this._ignoreWarning}get importResponse(){return this._importResponse}generateFormData(t,e){let r=new FormData;return e&&r.append("Data",e),r.append("File",t),r}onSubmitForm(t,e){return this.httpService.postFormData(`/api/${t}`,e).pipe(p(r=>{this._importResponse=r,this.importResponseHandling(r)}),s(r=>(this._importResponse=r.error,this._ignoreWarning=!1,r)))}import(t){return this.httpService.post(c.ImportProduct,t)}previewImport(t,e){return this.httpService.postFormData(t,e)}importResponseHandling(t){t.Issues?(this.toastr.warning(t.Message,"Warning!"),this._ignoreWarning=!0):(this.toastr.success(t.Message,"Success"),this.importResponse.Issues=[],this._ignoreWarning=!1)}static \u0275fac=function(e){return new(e||i)(o(m),o(a))};static \u0275prov=n({token:i,factory:i.\u0275fac,providedIn:"root"})};export{g as a};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-JNUC6PO5.js";import{a as t}from"./chunk-KW4B7WMB.js";var i=class extends e{constructor(r,a,o,l,s,p,F){super(r,a,o,l,s,p,F)}preInitLoader(){this.loaderPayload=t({ListIDs:this.reportFilterService.initOutletFilter([])},this.loaderPayload)}preInitList(){this.pageData.Filter.ListIDs=this.loaderPayload.ListIDs,this.pageData.Filter.From=this.reportFilterService.initDateFromFilter(this.pageData?.Filter?.From),this.pageData.Filter.To=this.reportFilterService.initDateToFilter(this.pageData?.Filter?.To)}onFilterOutlets(){this.reportFilterService.setOutletFilter(this.pageData.Filter.ListIDs)}onFilterFromDate(){this.reportFilterService.setDateFromFilter(this.pageData?.Filter?.From)}onFilterToDate(){this.reportFilterService.setDateToFilter(this.pageData?.Filter?.To)}};export{i as a};
@@ -0,0 +1 @@
1
+ import{a as p,b as D,c as A,j as g}from"./chunk-KW4B7WMB.js";var i=function(r){return r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Information=2]="Information",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.None=6]="None",r}(i||{});var C=class r{static write(e){return`${e}${r.RecordSeparator}`}static parse(e){if(e[e.length-1]!==r.RecordSeparator)throw new Error("Message is incomplete.");let t=e.split(r.RecordSeparator);return t.pop(),t}};C.RecordSeparatorCode=30;C.RecordSeparator=String.fromCharCode(C.RecordSeparatorCode);var k=class{constructor(){}log(e,t){}};k.instance=new k;var de="8.0.7",f=class{static isRequired(e,t){if(e==null)throw new Error(`The '${t}' argument is required.`)}static isNotEmpty(e,t){if(!e||e.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`)}static isIn(e,t,n){if(!(e in t))throw new Error(`Unknown ${n} value: ${e}.`)}},_=class r{static get isBrowser(){return!r.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!r.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!r.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}};function P(r,e){let t="";return v(r)?(t=`Binary data of length ${r.byteLength}`,e&&(t+=`. Content: '${fe(r)}'`)):typeof r=="string"&&(t=`String data of length ${r.length}`,e&&(t+=`. Content: '${r}'`)),t}function fe(r){let e=new Uint8Array(r),t="";return e.forEach(n=>{let o=n<16?"0":"";t+=`0x${o}${n.toString(16)} `}),t.substr(0,t.length-1)}function v(r){return r&&typeof ArrayBuffer<"u"&&(r instanceof ArrayBuffer||r.constructor&&r.constructor.name==="ArrayBuffer")}function j(r,e,t,n,o,s){return g(this,null,function*(){let c={},[a,l]=E();c[a]=l,r.log(i.Trace,`(${e} transport) sending data. ${P(o,s.logMessageContent)}.`);let u=v(o)?"arraybuffer":"text",d=yield t.post(n,{content:o,headers:p(p({},c),s.headers),responseType:u,timeout:s.timeout,withCredentials:s.withCredentials});r.log(i.Trace,`(${e} transport) request complete. Response status: ${d.statusCode}.`)})}function le(r){return r===void 0?new R(i.Information):r===null?k.instance:r.log!==void 0?r:new R(r)}var B=class{constructor(e,t){this._subject=e,this._observer=t}dispose(){let e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(t=>{})}},R=class{constructor(e){this._minLevel=e,this.out=console}log(e,t){if(e>=this._minLevel){let n=`[${new Date().toISOString()}] ${i[e]}: ${t}`;switch(e){case i.Critical:case i.Error:this.out.error(n);break;case i.Warning:this.out.warn(n);break;case i.Information:this.out.info(n);break;default:this.out.log(n);break}}}};function E(){let r="X-SignalR-User-Agent";return _.isNode&&(r="User-Agent"),[r,_e(de,pe(),we(),me())]}function _e(r,e,t,n){let o="Microsoft SignalR/",s=r.split(".");return o+=`${s[0]}.${s[1]}`,o+=` (${r}; `,e&&e!==""?o+=`${e}; `:o+="Unknown OS; ",o+=`${t}`,n?o+=`; ${n}`:o+="; Unknown Runtime Version",o+=")",o}function pe(){if(_.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function me(){if(_.isNode)return process.versions.node}function we(){return _.isNode?"NodeJS":"Browser"}function O(r){return r.stack?r.stack:r.message?r.message:`${r}`}function he(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}var F=class{writeHandshakeRequest(e){return C.write(JSON.stringify(e))}parseHandshakeResponse(e){let t,n;if(v(e)){let a=new Uint8Array(e),l=a.indexOf(C.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),n=a.byteLength>u?a.slice(u).buffer:null}else{let a=e,l=a.indexOf(C.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");let u=l+1;t=a.substring(0,u),n=a.length>u?a.substring(u):null}let o=C.parse(t),s=JSON.parse(o[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[n,s]}};var y=class extends Error{constructor(e,t){let n=new.target.prototype;super(`${e}: Status code '${t}'`),this.statusCode=t,this.__proto__=n}},x=class extends Error{constructor(e="A timeout occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},S=class extends Error{constructor(e="An abort occurred."){let t=new.target.prototype;super(e),this.__proto__=t}},q=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="UnsupportedTransportError",this.__proto__=n}},z=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="DisabledTransportError",this.__proto__=n}},K=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.transport=t,this.errorType="FailedToStartTransportError",this.__proto__=n}},L=class extends Error{constructor(e){let t=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=t}},V=class extends Error{constructor(e,t){let n=new.target.prototype;super(e),this.innerErrors=t,this.__proto__=n}};var h=function(r){return r[r.Invocation=1]="Invocation",r[r.StreamItem=2]="StreamItem",r[r.Completion=3]="Completion",r[r.StreamInvocation=4]="StreamInvocation",r[r.CancelInvocation=5]="CancelInvocation",r[r.Ping=6]="Ping",r[r.Close=7]="Close",r[r.Ack=8]="Ack",r[r.Sequence=9]="Sequence",r}(h||{});var X=class{constructor(){this.observers=[]}next(e){for(let t of this.observers)t.next(e)}error(e){for(let t of this.observers)t.error&&t.error(e)}complete(){for(let e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new B(this,e)}};var J=class{constructor(e,t,n){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=t,this._bufferSize=n}_send(e){return g(this,null,function*(){let t=this._protocol.writeMessage(e),n=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let o=()=>{},s=()=>{};v(t)?this._bufferedByteCount+=t.byteLength:this._bufferedByteCount+=t.length,this._bufferedByteCount>=this._bufferSize&&(n=new Promise((c,a)=>{o=c,s=a})),this._messages.push(new se(t,this._totalMessageCount,o,s))}try{this._reconnectInProgress||(yield this._connection.send(t))}catch{this._disconnected()}yield n})}_ack(e){let t=-1;for(let n=0;n<this._messages.length;n++){let o=this._messages[n];if(o._id<=e.sequenceId)t=n,v(o._message)?this._bufferedByteCount-=o._message.byteLength:this._bufferedByteCount-=o._message.length,o._resolver();else if(this._bufferedByteCount<this._bufferSize)o._resolver();else break}t!==-1&&(this._messages=this._messages.slice(t+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==h.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;let t=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,t<=this._latestReceivedSequenceId?(t===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=t,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}_resend(){return g(this,null,function*(){let e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;yield this._connection.send(this._protocol.writeMessage({type:h.Sequence,sequenceId:e}));let t=this._messages;for(let n of t)yield this._connection.send(n._message);this._reconnectInProgress=!1})}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(let t of this._messages)t._rejector(e)}_isInvocationMessage(e){switch(e.type){case h.Invocation:case h.StreamItem:case h.Completion:case h.StreamInvocation:case h.CancelInvocation:return!0;case h.Close:case h.Sequence:case h.Ping:case h.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(()=>g(this,null,function*(){try{this._reconnectInProgress||(yield this._connection.send(this._protocol.writeMessage({type:h.Ack,sequenceId:this._latestReceivedSequenceId})))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0}),1e3))}},se=class{constructor(e,t,n,o){this._message=e,this._id=t,this._resolver=n,this._rejector=o}};var be=30*1e3,Se=15*1e3,Ce=1e5,m=function(r){return r.Disconnected="Disconnected",r.Connecting="Connecting",r.Connected="Connected",r.Disconnecting="Disconnecting",r.Reconnecting="Reconnecting",r}(m||{}),N=class r{static create(e,t,n,o,s,c,a){return new r(e,t,n,o,s,c,a)}constructor(e,t,n,o,s,c,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(i.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},f.isRequired(e,"connection"),f.isRequired(t,"logger"),f.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=s??be,this.keepAliveIntervalInMilliseconds=c??Se,this._statefulReconnectBufferSize=a??Ce,this._logger=t,this._protocol=n,this.connection=e,this._reconnectPolicy=o,this._handshakeProtocol=new F,this.connection.onreceive=l=>this._processIncomingData(l),this.connection.onclose=l=>this._connectionClosed(l),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=m.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:h.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==m.Disconnected&&this._connectionState!==m.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}_startWithStateTransitions(){return g(this,null,function*(){if(this._connectionState!==m.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=m.Connecting,this._logger.log(i.Debug,"Starting HubConnection.");try{yield this._startInternal(),_.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=m.Connected,this._connectionStarted=!0,this._logger.log(i.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=m.Disconnected,this._logger.log(i.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}})}_startInternal(){return g(this,null,function*(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;let e=new Promise((t,n)=>{this._handshakeResolver=t,this._handshakeRejecter=n});yield this.connection.start(this._protocol.transferFormat);try{let t=this._protocol.version;this.connection.features.reconnect||(t=1);let n={protocol:this._protocol.name,version:t};if(this._logger.log(i.Debug,"Sending handshake request."),yield this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(n)),this._logger.log(i.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),yield e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new J(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||(yield this._sendMessage(this._cachedPingMessage))}catch(t){throw this._logger.log(i.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),yield this.connection.stop(t),t}})}stop(){return g(this,null,function*(){let e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),yield this._stopPromise;try{yield e}catch{}})}_stopInternal(e){if(this._connectionState===m.Disconnected)return this._logger.log(i.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===m.Disconnecting)return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;let t=this._connectionState;return this._connectionState=m.Disconnecting,this._logger.log(i.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(i.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(t===m.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new S("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}_sendCloseMessage(){return g(this,null,function*(){try{yield this._sendWithProtocol(this._createCloseMessage())}catch{}})}stream(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createStreamInvocation(e,t,o),c,a=new X;return a.cancelCallback=()=>{let l=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],c.then(()=>this._sendWithProtocol(l))},this._callbacks[s.invocationId]=(l,u)=>{if(u){a.error(u);return}else l&&(l.type===h.Completion?l.error?a.error(new Error(l.error)):a.complete():a.next(l.item))},c=this._sendWithProtocol(s).catch(l=>{a.error(l),delete this._callbacks[s.invocationId]}),this._launchStreams(n,c),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._sendWithProtocol(this._createInvocation(e,t,!0,o));return this._launchStreams(n,s),s}invoke(e,...t){let[n,o]=this._replaceStreamingParams(t),s=this._createInvocation(e,t,!1,o);return new Promise((a,l)=>{this._callbacks[s.invocationId]=(d,T)=>{if(T){l(T);return}else d&&(d.type===h.Completion?d.error?l(new Error(d.error)):a(d.result):l(new Error(`Unexpected message type: ${d.type}`)))};let u=this._sendWithProtocol(s).catch(d=>{l(d),delete this._callbacks[s.invocationId]});this._launchStreams(n,u)})}on(e,t){!e||!t||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(t)===-1&&this._methods[e].push(t))}off(e,t){if(!e)return;e=e.toLowerCase();let n=this._methods[e];if(n)if(t){let o=n.indexOf(t);o!==-1&&(n.splice(o,1),n.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){let t=this._protocol.parseMessages(e,this._logger);for(let n of t)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(n)))switch(n.type){case h.Invocation:this._invokeClientMethod(n).catch(o=>{this._logger.log(i.Error,`Invoke client method threw error: ${O(o)}`)});break;case h.StreamItem:case h.Completion:{let o=this._callbacks[n.invocationId];if(o){n.type===h.Completion&&delete this._callbacks[n.invocationId];try{o(n)}catch(s){this._logger.log(i.Error,`Stream callback threw error: ${O(s)}`)}}break}case h.Ping:break;case h.Close:{this._logger.log(i.Information,"Close message received from server.");let o=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(o):this._stopPromise=this._stopInternal(o);break}case h.Ack:this._messageBuffer&&this._messageBuffer._ack(n);break;case h.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(n);break;default:this._logger.log(i.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let t,n;try{[n,t]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(o){let s="Error parsing handshake response: "+o;this._logger.log(i.Error,s);let c=new Error(s);throw this._handshakeRejecter(c),c}if(t.error){let o="Server returned handshake error: "+t.error;this._logger.log(i.Error,o);let s=new Error(o);throw this._handshakeRejecter(s),s}else this._logger.log(i.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let e=this._nextKeepAlive-new Date().getTime();e<0&&(e=0),this._pingServerHandle=setTimeout(()=>g(this,null,function*(){if(this._connectionState===m.Connected)try{yield this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}),e)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}_invokeClientMethod(e){return g(this,null,function*(){let t=e.target.toLowerCase(),n=this._methods[t];if(!n){this._logger.log(i.Warning,`No client method with the name '${t}' found.`),e.invocationId&&(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),yield this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}let o=n.slice(),s=!!e.invocationId,c,a,l;for(let u of o)try{let d=c;c=yield u.apply(this,e.arguments),s&&c&&d&&(this._logger.log(i.Error,`Multiple results provided for '${t}'. Sending error to server.`),l=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(d){a=d,this._logger.log(i.Error,`A callback for the method '${t}' threw error '${d}'.`)}l?yield this._sendWithProtocol(l):s?(a?l=this._createCompletionMessage(e.invocationId,`${a}`,null):c!==void 0?l=this._createCompletionMessage(e.invocationId,null,c):(this._logger.log(i.Warning,`No result given for '${t}' method and invocation ID '${e.invocationId}'.`),l=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),yield this._sendWithProtocol(l)):c&&this._logger.log(i.Error,`Result given for '${t}' method but server is not expecting a result.`)})}_connectionClosed(e){this._logger.log(i.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new S("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===m.Disconnecting?this._completeClose(e):this._connectionState===m.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===m.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=m.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),_.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(t=>t.apply(this,[e]))}catch(t){this._logger.log(i.Error,`An onclose callback called with error '${e}' threw error '${t}'.`)}}}_reconnect(e){return g(this,null,function*(){let t=Date.now(),n=0,o=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(n++,0,o);if(s===null){this._logger.log(i.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=m.Reconnecting,e?this._logger.log(i.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(i.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(c=>c.apply(this,[e]))}catch(c){this._logger.log(i.Error,`An onreconnecting callback called with error '${e}' threw error '${c}'.`)}if(this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(i.Information,`Reconnect attempt number ${n} will start in ${s} ms.`),yield new Promise(c=>{this._reconnectDelayHandle=setTimeout(c,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(yield this._startInternal(),this._connectionState=m.Connected,this._logger.log(i.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(c=>c.apply(this,[this.connection.connectionId]))}catch(c){this._logger.log(i.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${c}'.`)}return}catch(c){if(this._logger.log(i.Information,`Reconnect attempt failed because of error '${c}'.`),this._connectionState!==m.Reconnecting){this._logger.log(i.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===m.Disconnecting&&this._completeClose();return}o=c instanceof Error?c:new Error(c.toString()),s=this._getNextRetryDelay(n++,Date.now()-t,o)}}this._logger.log(i.Information,`Reconnect retries have been exhausted after ${Date.now()-t} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()})}_getNextRetryDelay(e,t,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:t,previousRetryCount:e,retryReason:n})}catch(o){return this._logger.log(i.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${t}) threw error '${o}'.`),null}}_cancelCallbacksWithError(e){let t=this._callbacks;this._callbacks={},Object.keys(t).forEach(n=>{let o=t[n];try{o(null,e)}catch(s){this._logger.log(i.Error,`Stream 'error' callback called with '${e}' threw error: ${O(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,t,n,o){if(n)return o.length!==0?{arguments:t,streamIds:o,target:e,type:h.Invocation}:{arguments:t,target:e,type:h.Invocation};{let s=this._invocationId;return this._invocationId++,o.length!==0?{arguments:t,invocationId:s.toString(),streamIds:o,target:e,type:h.Invocation}:{arguments:t,invocationId:s.toString(),target:e,type:h.Invocation}}}_launchStreams(e,t){if(e.length!==0){t||(t=Promise.resolve());for(let n in e)e[n].subscribe({complete:()=>{t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:o=>{let s;o instanceof Error?s=o.message:o&&o.toString?s=o.toString():s="Unknown error",t=t.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,s)))},next:o=>{t=t.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,o)))}})}}_replaceStreamingParams(e){let t=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if(this._isObservable(s)){let c=this._invocationId;this._invocationId++,t[c]=s,n.push(c.toString()),e.splice(o,1)}}return[t,n]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,t,n){let o=this._invocationId;return this._invocationId++,n.length!==0?{arguments:t,invocationId:o.toString(),streamIds:n,target:e,type:h.StreamInvocation}:{arguments:t,invocationId:o.toString(),target:e,type:h.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:h.CancelInvocation}}_createStreamItemMessage(e,t){return{invocationId:e,item:t,type:h.StreamItem}}_createCompletionMessage(e,t,n){return t?{error:t,invocationId:e,type:h.Completion}:{invocationId:e,result:n,type:h.Completion}}_createCloseMessage(){return{type:h.Close}}};var ye=[0,2e3,1e4,3e4,null],W=class{constructor(e){this._retryDelays=e!==void 0?[...e,null]:ye}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}};var $=(()=>{class r{}return r.Authorization="Authorization",r.Cookie="Cookie",r})();var H=class{constructor(e,t,n){this.statusCode=e,this.statusText=t,this.content=n}},I=class{get(e,t){return this.send(D(p({},t),{method:"GET",url:e}))}post(e,t){return this.send(D(p({},t),{method:"POST",url:e}))}delete(e,t){return this.send(D(p({},t),{method:"DELETE",url:e}))}getCookieString(e){return""}};var G=class extends I{constructor(e,t){super(),this._innerClient=e,this._accessTokenFactory=t}send(e){return g(this,null,function*(){let t=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(t=!1,this._accessToken=yield this._accessTokenFactory()),this._setAuthorizationHeader(e);let n=yield this._innerClient.send(e);return t&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=yield this._accessTokenFactory(),this._setAuthorizationHeader(e),yield this._innerClient.send(e)):n})}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[$.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[$.Authorization]&&delete e.headers[$.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}};var Y=class extends I{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||_.isNode){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._jar=new(t("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=t("node-fetch"):this._fetchType=fetch,this._fetchType=t("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(he());if(typeof AbortController>"u"){let t=typeof __webpack_require__=="function"?__non_webpack_require__:A;this._abortControllerType=t("abort-controller")}else this._abortControllerType=AbortController}send(e){return g(this,null,function*(){if(e.abortSignal&&e.abortSignal.aborted)throw new S;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");let t=new this._abortControllerType,n;e.abortSignal&&(e.abortSignal.onabort=()=>{t.abort(),n=new S});let o=null;if(e.timeout){let l=e.timeout;o=setTimeout(()=>{t.abort(),this._logger.log(i.Warning,"Timeout from HTTP request."),n=new x},l)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},v(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=yield this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:p({"X-Requested-With":"XMLHttpRequest"},e.headers),method:e.method,mode:"cors",redirect:"follow",signal:t.signal})}catch(l){throw n||(this._logger.log(i.Warning,`Error from HTTP request. ${l}.`),l)}finally{o&&clearTimeout(o),e.abortSignal&&(e.abortSignal.onabort=null)}if(!s.ok){let l=yield ue(s,"text");throw new y(l||s.statusText,s.status)}let a=yield ue(s,e.responseType);return new H(s.status,s.statusText,a)})}getCookieString(e){let t="";return _.isNode&&this._jar&&this._jar.getCookies(e,(n,o)=>t=o.join("; ")),t}};function ue(r,e){let t;switch(e){case"arraybuffer":t=r.arrayBuffer();break;case"text":t=r.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:t=r.text();break}return t}var Q=class extends I{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?new Promise((t,n)=>{let o=new XMLHttpRequest;o.open(e.method,e.url,!0),o.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(v(e.content)?o.setRequestHeader("Content-Type","application/octet-stream"):o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));let s=e.headers;s&&Object.keys(s).forEach(c=>{o.setRequestHeader(c,s[c])}),e.responseType&&(o.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{o.abort(),n(new S)}),e.timeout&&(o.timeout=e.timeout),o.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),o.status>=200&&o.status<300?t(new H(o.status,o.statusText,o.response||o.responseText)):n(new y(o.response||o.responseText||o.statusText,o.status))},o.onerror=()=>{this._logger.log(i.Warning,`Error from HTTP request. ${o.status}: ${o.statusText}.`),n(new y(o.statusText,o.status))},o.ontimeout=()=>{this._logger.log(i.Warning,"Timeout from HTTP request."),n(new x)},o.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}};var Z=class extends I{constructor(e){if(super(),typeof fetch<"u"||_.isNode)this._httpClient=new Y(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new Q(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new S):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}};var b=function(r){return r[r.None=0]="None",r[r.WebSockets=1]="WebSockets",r[r.ServerSentEvents=2]="ServerSentEvents",r[r.LongPolling=4]="LongPolling",r}(b||{}),w=function(r){return r[r.Text=1]="Text",r[r.Binary=2]="Binary",r}(w||{});var ee=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};var U=class{get pollAborted(){return this._pollAbort.aborted}constructor(e,t,n){this._httpClient=e,this._logger=t,this._pollAbort=new ee,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){if(f.isRequired(e,"url"),f.isRequired(t,"transferFormat"),f.isIn(t,w,"transferFormat"),this._url=e,this._logger.log(i.Trace,"(LongPolling transport) Connecting."),t===w.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");let[n,o]=E(),s=p({[n]:o},this._options.headers),c={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};t===w.Binary&&(c.responseType="arraybuffer");let a=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${a}.`);let l=yield this._httpClient.get(a,c);l.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new y(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,c)})}_poll(e,t){return g(this,null,function*(){try{for(;this._running;)try{let n=`${e}&_=${Date.now()}`;this._logger.log(i.Trace,`(LongPolling transport) polling: ${n}.`);let o=yield this._httpClient.get(n,t);o.statusCode===204?(this._logger.log(i.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):o.statusCode!==200?(this._logger.log(i.Error,`(LongPolling transport) Unexpected response code: ${o.statusCode}.`),this._closeError=new y(o.statusText||"",o.statusCode),this._running=!1):o.content?(this._logger.log(i.Trace,`(LongPolling transport) data received. ${P(o.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(o.content)):this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof x?this._logger.log(i.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(i.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(i.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}})}send(e){return g(this,null,function*(){return this._running?j(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return g(this,null,function*(){this._logger.log(i.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{yield this._receiving,this._logger.log(i.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);let e={},[t,n]=E();e[t]=n;let o={headers:p(p({},e),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials},s;try{yield this._httpClient.delete(this._url,o)}catch(c){s=c}s?s instanceof y&&(s.statusCode===404?this._logger.log(i.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(i.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(i.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(i.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}})}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(i.Trace,e),this.onclose(this._closeError)}}};var te=class{constructor(e,t,n,o){this._httpClient=e,this._accessToken=t,this._logger=n,this._options=o,this.onreceive=null,this.onclose=null}connect(e,t){return g(this,null,function*(){return f.isRequired(e,"url"),f.isRequired(t,"transferFormat"),f.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,o)=>{let s=!1;if(t!==w.Text){o(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let c;if(_.isBrowser||_.isWebWorker)c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{let a=this._httpClient.getCookieString(e),l={};l.Cookie=a;let[u,d]=E();l[u]=d,c=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:p(p({},l),this._options.headers)})}try{c.onmessage=a=>{if(this.onreceive)try{this._logger.log(i.Trace,`(SSE transport) data received. ${P(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(l){this._close(l);return}},c.onerror=a=>{s?this._close():o(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},c.onopen=()=>{this._logger.log(i.Information,`SSE connected to ${this._url}`),this._eventSource=c,s=!0,n()}}catch(a){o(a);return}})})}send(e){return g(this,null,function*(){return this._eventSource?j(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))})}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}};var ne=class{constructor(e,t,n,o,s,c){this._logger=n,this._accessTokenFactory=t,this._logMessageContent=o,this._webSocketConstructor=s,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=c}connect(e,t){return g(this,null,function*(){f.isRequired(e,"url"),f.isRequired(t,"transferFormat"),f.isIn(t,w,"transferFormat"),this._logger.log(i.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=yield this._accessTokenFactory()),new Promise((o,s)=>{e=e.replace(/^http/,"ws");let c,a=this._httpClient.getCookieString(e),l=!1;if(_.isNode||_.isReactNative){let u={},[d,T]=E();u[d]=T,n&&(u[$.Authorization]=`Bearer ${n}`),a&&(u[$.Cookie]=a),c=new this._webSocketConstructor(e,void 0,{headers:p(p({},u),this._headers)})}else n&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);c||(c=new this._webSocketConstructor(e)),t===w.Binary&&(c.binaryType="arraybuffer"),c.onopen=u=>{this._logger.log(i.Information,`WebSocket connected to ${e}.`),this._webSocket=c,l=!0,o()},c.onerror=u=>{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="There was an error with the transport",this._logger.log(i.Information,`(WebSockets transport) ${d}.`)},c.onmessage=u=>{if(this._logger.log(i.Trace,`(WebSockets transport) data received. ${P(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(d){this._close(d);return}},c.onclose=u=>{if(l)this._close(u);else{let d=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?d=u.error:d="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(d))}}})})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(i.Trace,`(WebSockets transport) sending data. ${P(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(i.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}};var ge=100,oe=class{constructor(e,t={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,f.isRequired(e,"url"),this._logger=le(t.logger),this.baseUrl=this._resolveUrl(e),t=t||{},t.logMessageContent=t.logMessageContent===void 0?!1:t.logMessageContent,typeof t.withCredentials=="boolean"||t.withCredentials===void 0)t.withCredentials=t.withCredentials===void 0?!0:t.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");t.timeout=t.timeout===void 0?100*1e3:t.timeout;let n=null,o=null;if(_.isNode&&typeof A<"u"){let s=typeof __webpack_require__=="function"?__non_webpack_require__:A;n=s("ws"),o=s("eventsource")}!_.isNode&&typeof WebSocket<"u"&&!t.WebSocket?t.WebSocket=WebSocket:_.isNode&&!t.WebSocket&&n&&(t.WebSocket=n),!_.isNode&&typeof EventSource<"u"&&!t.EventSource?t.EventSource=EventSource:_.isNode&&!t.EventSource&&typeof o<"u"&&(t.EventSource=o),this._httpClient=new G(t.httpClient||new Z(this._logger),t.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=t,this.onreceive=null,this.onclose=null}start(e){return g(this,null,function*(){if(e=e||w.Binary,f.isIn(e,w,"transferFormat"),this._logger.log(i.Debug,`Starting connection with transfer format '${w[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),yield this._startInternalPromise,this._connectionState==="Disconnecting"){let t="Failed to start the HttpConnection before stop() was called.";return this._logger.log(i.Error,t),yield this._stopPromise,Promise.reject(new S(t))}else if(this._connectionState!=="Connected"){let t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(i.Error,t),Promise.reject(new S(t))}this._connectionStarted=!0})}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ie(this.transport)),this._sendQueue.send(e))}stop(e){return g(this,null,function*(){if(this._connectionState==="Disconnected")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(i.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(t=>{this._stopPromiseResolver=t}),yield this._stopInternal(e),yield this._stopPromise})}_stopInternal(e){return g(this,null,function*(){this._stopError=e;try{yield this._startInternalPromise}catch{}if(this.transport){try{yield this.transport.stop()}catch(t){this._logger.log(i.Error,`HttpConnection.transport.stop() threw error '${t}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(i.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")})}_startInternal(e){return g(this,null,function*(){let t=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===b.WebSockets)this.transport=this._constructTransport(b.WebSockets),yield this._startTransport(t,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,o=0;do{if(n=yield this._getNegotiationResponse(t),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new S("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(t=n.url),n.accessToken){let s=n.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}o++}while(n.url&&o<ge);if(o===ge&&n.url)throw new Error("Negotiate redirection limit exceeded.");yield this._createTransport(t,this._options.transport,n,e)}this.transport instanceof U&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(i.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(i.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}})}_getNegotiationResponse(e){return g(this,null,function*(){let t={},[n,o]=E();t[n]=o;let s=this._resolveNegotiateUrl(e);this._logger.log(i.Debug,`Sending negotiation request: ${s}.`);try{let c=yield this._httpClient.post(s,{content:"",headers:p(p({},t),this._options.headers),timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(c.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${c.statusCode}'`));let a=JSON.parse(c.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new L("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(c){let a="Failed to complete negotiation with the server: "+c;return c instanceof y&&c.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(i.Error,a),Promise.reject(new L(a))}})}_createConnectUrl(e,t){return t?e+(e.indexOf("?")===-1?"?":"&")+`id=${t}`:e}_createTransport(e,t,n,o){return g(this,null,function*(){let s=this._createConnectUrl(e,n.connectionToken);if(this._isITransport(t)){this._logger.log(i.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=t,yield this._startTransport(s,o),this.connectionId=n.connectionId;return}let c=[],a=n.availableTransports||[],l=n;for(let u of a){let d=this._resolveTransportOrError(u,t,o,l?.useStatefulReconnect===!0);if(d instanceof Error)c.push(`${u.transport} failed:`),c.push(d);else if(this._isITransport(d)){if(this.transport=d,!l){try{l=yield this._getNegotiationResponse(e)}catch(T){return Promise.reject(T)}s=this._createConnectUrl(e,l.connectionToken)}try{yield this._startTransport(s,o),this.connectionId=l.connectionId;return}catch(T){if(this._logger.log(i.Error,`Failed to start the transport '${u.transport}': ${T}`),l=void 0,c.push(new K(`${u.transport} failed: ${T}`,b[u.transport])),this._connectionState!=="Connecting"){let ae="Failed to select transport before stop() was called.";return this._logger.log(i.Debug,ae),Promise.reject(new S(ae))}}}}return c.length>0?Promise.reject(new V(`Unable to connect to the server with any of the available transports. ${c.join(" ")}`,c)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))})}_constructTransport(e){switch(e){case b.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new ne(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case b.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new te(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case b.LongPolling:return new U(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,t){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=n=>g(this,null,function*(){let o=!1;if(this.features.reconnect)try{this.features.disconnected(),yield this.transport.connect(e,t),yield this.features.resend()}catch{o=!0}else{this._stopConnection(n);return}o&&this._stopConnection(n)}):this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(e,t)}_resolveTransportOrError(e,t,n,o){let s=b[e.transport];if(s==null)return this._logger.log(i.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(ve(t,s))if(e.transferFormats.map(a=>w[a]).indexOf(n)>=0){if(s===b.WebSockets&&!this._options.WebSocket||s===b.ServerSentEvents&&!this._options.EventSource)return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it is not supported in your environment.'`),new q(`'${b[s]}' is not supported in your environment.`,s);this._logger.log(i.Debug,`Selecting transport '${b[s]}'.`);try{return this.features.reconnect=s===b.WebSockets?o:void 0,this._constructTransport(s)}catch(a){return a}}else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it does not support the requested transfer format '${w[n]}'.`),new Error(`'${b[s]}' does not support ${w[n]}.`);else return this._logger.log(i.Debug,`Skipping transport '${b[s]}' because it was disabled by the client.`),new z(`'${b[s]}' is disabled by the client.`,s)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(i.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(i.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(i.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(i.Error,`Connection disconnected with error '${e}'.`):this._logger.log(i.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(t=>{this._logger.log(i.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(t){this._logger.log(i.Error,`HttpConnection.onclose(${e}) threw error '${t}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!_.isBrowser)throw new Error(`Cannot resolve '${e}'.`);let t=window.document.createElement("a");return t.href=e,this._logger.log(i.Information,`Normalizing '${e}' to '${t.href}'.`),t.href}_resolveNegotiateUrl(e){let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="negotiate":t.pathname+="/negotiate";let n=new URLSearchParams(t.searchParams);return n.has("negotiateVersion")||n.append("negotiateVersion",this._negotiateVersion.toString()),n.has("useStatefulReconnect")?n.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&n.append("useStatefulReconnect","true"),t.search=n.toString(),t.toString()}};function ve(r,e){return!r||(e&r)!==0}var ie=class r{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new M,this._transportResult=new M,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new M),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}_sendLoop(){return g(this,null,function*(){for(;;){if(yield this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new M;let e=this._transportResult;this._transportResult=void 0;let t=typeof this._buffer[0]=="string"?this._buffer.join(""):r._concatBuffers(this._buffer);this._buffer.length=0;try{yield this._transport.send(t),e.resolve()}catch(n){e.reject(n)}}})}static _concatBuffers(e){let t=e.map(s=>s.byteLength).reduce((s,c)=>s+c),n=new Uint8Array(t),o=0;for(let s of e)n.set(new Uint8Array(s),o),o+=s.byteLength;return n.buffer}},M=class{constructor(){this.promise=new Promise((e,t)=>[this._resolver,this._rejecter]=[e,t])}resolve(){this._resolver()}reject(e){this._rejecter(e)}};var ke="json",re=class{constructor(){this.name=ke,this.version=2,this.transferFormat=w.Text}parseMessages(e,t){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];t===null&&(t=k.instance);let n=C.parse(e),o=[];for(let s of n){let c=JSON.parse(s);if(typeof c.type!="number")throw new Error("Invalid payload.");switch(c.type){case h.Invocation:this._isInvocationMessage(c);break;case h.StreamItem:this._isStreamItemMessage(c);break;case h.Completion:this._isCompletionMessage(c);break;case h.Ping:break;case h.Close:break;case h.Ack:this._isAckMessage(c);break;case h.Sequence:this._isSequenceMessage(c);break;default:t.log(i.Information,"Unknown message type '"+c.type+"' ignored.");continue}o.push(c)}return o}writeMessage(e){return C.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,t){if(typeof e!="string"||e==="")throw new Error(t)}};var Ee={trace:i.Trace,debug:i.Debug,info:i.Information,information:i.Information,warn:i.Warning,warning:i.Warning,error:i.Error,critical:i.Critical,none:i.None};function Ie(r){let e=Ee[r.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${r}`)}var ce=class{configureLogging(e){if(f.isRequired(e,"logging"),Te(e))this.logger=e;else if(typeof e=="string"){let t=Ie(e);this.logger=new R(t)}else this.logger=new R(e);return this}withUrl(e,t){return f.isRequired(e,"url"),f.isNotEmpty(e,"url"),this.url=e,typeof t=="object"?this.httpConnectionOptions=p(p({},this.httpConnectionOptions),t):this.httpConnectionOptions=D(p({},this.httpConnectionOptions),{transport:t}),this}withHubProtocol(e){return f.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new W(e):this.reconnectPolicy=e:this.reconnectPolicy=new W,this}withServerTimeout(e){return f.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return f.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e?.bufferSize,this}build(){let e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");let t=new oe(this.url,e);return N.create(t,this.logger||k.instance,this.protocol||new re,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}};function Te(r){return r.log!==void 0}export{i as a,m as b,ce as c};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ZKWXTWYY.js";import"./chunk-2DNKBN6G.js";import"./chunk-TCLYGBIP.js";import"./chunk-FBR7TAEJ.js";import"./chunk-XRKZOON6.js";import"./chunk-4CBDK52E.js";import"./chunk-CBW7IA6S.js";import"./chunk-VPAQFQA7.js";import"./chunk-AOPKPEVH.js";import"./chunk-V4RKZMUB.js";import"./chunk-2FKYC63K.js";import"./chunk-2W3MAOOP.js";import"./chunk-BCVO66L3.js";import"./chunk-LHWN2J4H.js";import"./chunk-2FWFPV5I.js";import"./chunk-4G26RHGA.js";import"./chunk-R7NR3M2Q.js";import"./chunk-MA7NEQCZ.js";import"./chunk-26YXEYJK.js";import"./chunk-WG6PV6VL.js";import"./chunk-RRKCUSBB.js";import"./chunk-H55AJAX5.js";import"./chunk-KW4B7WMB.js";export{a as SensitiveFieldComponent};