dealpos 25.50.4 → 25.51.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-TZGHU6I5.js → chunk-243EB36Y.js} +2 -2
- package/browser/{chunk-HGSF7LOB.js → chunk-27OXTS7Y.js} +1 -1
- package/browser/{chunk-BRNU2JXC.js → chunk-2MAOKHWO.js} +1 -1
- package/browser/{chunk-KVMBRL53.js → chunk-2WSP3Y6V.js} +1 -1
- package/browser/{chunk-HWPSC7RE.js → chunk-3DL5OLEL.js} +1 -1
- package/browser/{chunk-CFWHBIM3.js → chunk-3DUSH3ND.js} +1 -1
- package/browser/{chunk-NOYC5PIT.js → chunk-3FS7DBBR.js} +1 -1
- package/browser/{chunk-2BO3IFU3.js → chunk-3K2A4Z67.js} +1 -1
- package/browser/chunk-3M5FKEPW.js +1 -0
- package/browser/{chunk-O2VVATBW.js → chunk-3MAZIRSX.js} +1 -1
- package/browser/{chunk-PHH2AA3W.js → chunk-3Q5WV3VF.js} +1 -1
- package/browser/{chunk-ZMJLTU5O.js → chunk-3XH2STFE.js} +1 -1
- package/browser/{chunk-26YFRPR2.js → chunk-3ZH3XK5V.js} +1 -1
- package/browser/{chunk-MLBTUOHX.js → chunk-4467AQLM.js} +1 -1
- package/browser/{chunk-2MPRVJXH.js → chunk-4HJHXVYF.js} +1 -1
- package/browser/{chunk-S7FOJJP2.js → chunk-4HLKKTIV.js} +1 -1
- package/browser/{chunk-MNJSQKLX.js → chunk-4L4MSVOU.js} +1 -1
- package/browser/{chunk-NFOJONR6.js → chunk-4OP4E5Q4.js} +1 -1
- package/browser/{chunk-OP66LK4H.js → chunk-4PDGY62B.js} +1 -1
- package/browser/chunk-54SK3PVO.js +1 -0
- package/browser/{chunk-3NPCLTJT.js → chunk-55Z32OLJ.js} +1 -1
- package/browser/{chunk-TXJJUZ26.js → chunk-5PDQ5UNO.js} +1 -1
- package/browser/{chunk-FW4OCSXV.js → chunk-5RFSSCAR.js} +1 -1
- package/browser/{chunk-36GWLMZX.js → chunk-5RYL4EJ2.js} +1 -1
- package/browser/{chunk-B36P4U32.js → chunk-5VYU6SHE.js} +1 -1
- package/browser/{chunk-KZG64H5Q.js → chunk-5XTMPVSF.js} +1 -1
- package/browser/chunk-5YBSS4EL.js +21 -0
- package/browser/{chunk-DC3TCY6D.js → chunk-6G7LPAEQ.js} +1 -1
- package/browser/{chunk-7F4QLFQQ.js → chunk-6I2YT4SH.js} +1 -1
- package/browser/{chunk-RQFU4YVM.js → chunk-6OULAYGH.js} +1 -1
- package/browser/{chunk-QMOYHBVM.js → chunk-6VYP636I.js} +1 -1
- package/browser/{chunk-OXWQ7ZZS.js → chunk-6WMEGLEF.js} +1 -1
- package/browser/{chunk-D7DUI5NF.js → chunk-6XNP4ZXB.js} +1 -1
- package/browser/{chunk-YSRJI33K.js → chunk-7264OPXA.js} +1 -1
- package/browser/chunk-735YXRQB.js +1 -0
- package/browser/{chunk-OYGBAHVX.js → chunk-73ADHCC2.js} +1 -1
- package/browser/{chunk-QZZ2NRA3.js → chunk-75FYOZH7.js} +1 -1
- package/browser/{chunk-CCD6EYWH.js → chunk-76CUXDTU.js} +1 -1
- package/browser/{chunk-DWZ5JTI2.js → chunk-7MRUPBXU.js} +1 -1
- package/browser/{chunk-QVKXQ4BK.js → chunk-7OQXKVTC.js} +16 -16
- package/browser/{chunk-KZFNI67M.js → chunk-7YYWBCWJ.js} +1 -1
- package/browser/{chunk-QI7I46MV.js → chunk-A7C35XPM.js} +1 -1
- package/browser/{chunk-W3PBP3KZ.js → chunk-AB7O2ERM.js} +1 -1
- package/browser/{chunk-ILTEBIEO.js → chunk-ABOSNV75.js} +1 -1
- package/browser/{chunk-AQW4VS3Y.js → chunk-ACXQ2FOW.js} +1 -1
- package/browser/{chunk-WMZLH4YK.js → chunk-AHTR7XKG.js} +1 -1
- package/browser/{chunk-XTCEZONP.js → chunk-AJAUI7BA.js} +1 -1
- package/browser/{chunk-6C2HPRJZ.js → chunk-AQKJ3LSN.js} +1 -1
- package/browser/{chunk-RESN2GAB.js → chunk-ARAUAPQU.js} +1 -1
- package/browser/{chunk-3HZIDGPN.js → chunk-AXCTEREY.js} +1 -1
- package/browser/{chunk-SIQZO2WM.js → chunk-B4TZQBTN.js} +1 -1
- package/browser/{chunk-BT7NN7PT.js → chunk-BAXZ74LK.js} +1 -1
- package/browser/{chunk-AKRUT4XG.js → chunk-BCGNQKO5.js} +2 -2
- package/browser/{chunk-KB4247J2.js → chunk-BHQZXJKQ.js} +1 -1
- package/browser/{chunk-MHD5SGI2.js → chunk-BRQVQGLJ.js} +1 -1
- package/browser/{chunk-IBGFKSEC.js → chunk-BWVEZ3MZ.js} +1 -1
- package/browser/{chunk-RSNEHVIM.js → chunk-C22G4JGX.js} +1 -1
- package/browser/{chunk-WWWSD2MX.js → chunk-CAGFIP4G.js} +1 -1
- package/browser/{chunk-4BXCIT62.js → chunk-CCIHCGP5.js} +1 -1
- package/browser/{chunk-FQZELIHB.js → chunk-CERE2LBX.js} +1 -1
- package/browser/{chunk-MLEUJB3A.js → chunk-CJ4ET4PG.js} +1 -1
- package/browser/{chunk-O4RWYZYV.js → chunk-CR5CHTI7.js} +1 -1
- package/browser/{chunk-FAED643P.js → chunk-CVN6ZXXJ.js} +1 -1
- package/browser/{chunk-BYTV42NJ.js → chunk-D6HBPIFD.js} +1 -1
- package/browser/chunk-DAH4EEQV.js +149 -0
- package/browser/{chunk-E4VY3BC3.js → chunk-DBRZ7F2Z.js} +1 -1
- package/browser/{chunk-TYE7PH3R.js → chunk-DIWYKKLA.js} +1 -1
- package/browser/{chunk-2LKYW2KM.js → chunk-DNY4JYTC.js} +1 -1
- package/browser/{chunk-GWKBJZYT.js → chunk-DODZXMH2.js} +1 -1
- package/browser/{chunk-GTPQNPNO.js → chunk-DSXOFWO7.js} +1 -1
- package/browser/{chunk-VVYRPW2Y.js → chunk-E4AXPU4U.js} +1 -1
- package/browser/{chunk-Y7QIF2WS.js → chunk-E5TUY2II.js} +1 -1
- package/browser/{chunk-R2GUMKAU.js → chunk-E634BI4W.js} +1 -1
- package/browser/{chunk-DDWKAORH.js → chunk-EFDMYOLZ.js} +2 -2
- package/browser/{chunk-C2NCV7VC.js → chunk-EMH25BNO.js} +1 -1
- package/browser/{chunk-NVOIIOWN.js → chunk-EMHEIQNS.js} +1 -1
- package/browser/{chunk-TCUCRGQD.js → chunk-EXFA6B6P.js} +1 -1
- package/browser/{chunk-B5IABJO5.js → chunk-EZNBK62W.js} +3 -3
- package/browser/chunk-F3HDP5CA.js +1 -0
- package/browser/{chunk-IFIH2CE2.js → chunk-F6LSMAF4.js} +1 -1
- package/browser/{chunk-BKTC6IB2.js → chunk-FEHMPX43.js} +1 -1
- package/browser/{chunk-ESDXMFGP.js → chunk-FINTUPRM.js} +1 -1
- package/browser/{chunk-D4FCXEV4.js → chunk-FM7BHGBW.js} +1 -1
- package/browser/{chunk-VZUPDSBH.js → chunk-FMEMQRBJ.js} +1 -1
- package/browser/chunk-FVFTYYCC.js +4 -0
- package/browser/{chunk-A565EUMD.js → chunk-FVNQ7SQY.js} +1 -1
- package/browser/{chunk-X44CHNHS.js → chunk-FZQE7J2C.js} +1 -1
- package/browser/{chunk-HSIXOQO7.js → chunk-G7L6AVIG.js} +1 -1
- package/browser/{chunk-23VPQAH7.js → chunk-GE5I6JYL.js} +1 -1
- package/browser/{chunk-DTVCBHPA.js → chunk-GFSJZHCB.js} +1 -1
- package/browser/{chunk-QPAUI5EG.js → chunk-GXAF3JUO.js} +1 -1
- package/browser/chunk-GZ6OVEDL.js +380 -0
- package/browser/{chunk-7AZJVR4Y.js → chunk-H6RHVRGW.js} +1 -1
- package/browser/{chunk-4XJWQAS6.js → chunk-HAXEFEKW.js} +1 -1
- package/browser/{chunk-7Q672H4P.js → chunk-HLCZLXPS.js} +1 -1
- package/browser/{chunk-FPRM3L6U.js → chunk-HYCKETL4.js} +1 -1
- package/browser/{chunk-4OEDK7YE.js → chunk-IDJEXQ5I.js} +1 -1
- package/browser/{chunk-XMZLK7EB.js → chunk-IDOUPEKS.js} +1 -1
- package/browser/{chunk-H74MLHRV.js → chunk-IET73YWA.js} +1 -1
- package/browser/{chunk-VKWSK452.js → chunk-IEX7S7T7.js} +1 -1
- package/browser/{chunk-AXUSK4R7.js → chunk-IF6EZMOM.js} +3 -3
- package/browser/chunk-IKSROKD5.css +1 -0
- package/browser/chunk-ISZRZRCT.js +3 -0
- package/browser/{chunk-WM2DGNWH.js → chunk-ITTFNOLB.js} +1 -1
- package/browser/{chunk-JXXYVM7W.js → chunk-IZF7S2RF.js} +1 -1
- package/browser/{chunk-C3STDN73.js → chunk-JEZMYDZR.js} +1 -1
- package/browser/{chunk-QHXZVGLB.js → chunk-JHBK7LOJ.js} +7 -7
- package/browser/{chunk-T4MU3R7Y.js → chunk-JIRDK6TJ.js} +1 -1
- package/browser/chunk-JOLAOKHD.js +21 -0
- package/browser/{chunk-6WATOQG3.js → chunk-JQDS4BXR.js} +1 -1
- package/browser/{chunk-J6M7UWVR.js → chunk-JT4M6AIA.js} +1 -1
- package/browser/{chunk-USD2ALDX.js → chunk-K355XAWO.js} +1 -1
- package/browser/{chunk-WFQIMZGL.js → chunk-KBLVOO4J.js} +1 -1
- package/browser/{chunk-VDZXLRMK.js → chunk-KDISSQKT.js} +1 -1
- package/browser/{chunk-XFGPCEKV.js → chunk-KFC3V2GW.js} +1 -1
- package/browser/{chunk-FHB5KLDR.js → chunk-KFOEUAQT.js} +1 -1
- package/browser/{chunk-3TWVKV7J.js → chunk-KHB5Q7IN.js} +1 -1
- package/browser/{chunk-W2HVYAUB.js → chunk-KIYO2YC2.js} +1 -1
- package/browser/{chunk-VX7AVGUY.js → chunk-KKM7I2BT.js} +1 -1
- package/browser/chunk-KOZYTEZI.js +1 -0
- package/browser/{chunk-KUG5VVV4.js → chunk-KRBFME4B.js} +1 -1
- package/browser/chunk-L3U6V3BF.js +5 -0
- package/browser/{chunk-45E6XCHN.js → chunk-LB5UXGDG.js} +1 -1
- package/browser/{chunk-NM3IQUNN.js → chunk-LGD5WUG2.js} +1 -1
- package/browser/{chunk-X5XDXZ47.js → chunk-LHTHIOAY.js} +1 -1
- package/browser/{chunk-M4EQZHIE.js → chunk-LKVUZZ5J.js} +1 -1
- package/browser/{chunk-4ZITX27A.js → chunk-LMUFX64W.js} +1 -1
- package/browser/{chunk-DWYMJ5NO.js → chunk-M4FNFZNJ.js} +1 -1
- package/browser/{chunk-D55YCZRM.js → chunk-MEL6Z4NI.js} +1 -1
- package/browser/{chunk-IA5RDP6C.js → chunk-MHPLYS7O.js} +1 -1
- package/browser/{chunk-45Z7RKI2.js → chunk-MJCLLJBB.js} +2 -2
- package/browser/{chunk-53VS5DA7.js → chunk-MM4IJDHI.js} +1 -1
- package/browser/{chunk-LNDHYAFW.js → chunk-MWGICBEB.js} +1 -1
- package/browser/{chunk-UEN2SKB2.js → chunk-MZDVGN2B.js} +1 -1
- package/browser/{chunk-ZTD4APMR.js → chunk-N5RDRDT7.js} +1 -1
- package/browser/{chunk-7P3L3ODB.js → chunk-N7OS7SFI.js} +1 -1
- package/browser/{chunk-RACYAEOL.js → chunk-NFWYR26Q.js} +1 -1
- package/browser/{chunk-S27D5MBU.js → chunk-NJ4KEQKH.js} +1 -1
- package/browser/{chunk-72RZBOHX.js → chunk-NS6IC2PT.js} +1 -1
- package/browser/{chunk-QIQOKWUA.js → chunk-NYMHQHNP.js} +1 -1
- package/browser/{chunk-BNNKSBQ6.js → chunk-O22HDFH6.js} +1 -1
- package/browser/{chunk-L7NMU3EE.js → chunk-O7SYLGUB.js} +2 -2
- package/browser/{chunk-7YUPYNWQ.js → chunk-OB6KFXD6.js} +2 -2
- package/browser/{chunk-5ZD6KTDH.js → chunk-ODYEJFNJ.js} +1 -1
- package/browser/{chunk-EHXF34TI.js → chunk-OEOAWKXA.js} +1 -1
- package/browser/chunk-OF3BZHBQ.js +1 -0
- package/browser/{chunk-VGTN2T5K.js → chunk-OFWJY5WB.js} +1 -1
- package/browser/{chunk-SXYJ7APZ.js → chunk-ORTAUDOX.js} +1 -1
- package/browser/{chunk-TSH564VU.js → chunk-OUJXEQKL.js} +1 -1
- package/browser/{chunk-PRVQ3NAP.js → chunk-P3TFDLWR.js} +2 -2
- package/browser/{chunk-COA4UL2V.js → chunk-P7KMHPVN.js} +1 -1
- package/browser/{chunk-7JULWG2B.js → chunk-PCRUTQ3T.js} +1 -1
- package/browser/{chunk-T7XU5W5A.js → chunk-PNFJVQUF.js} +1 -1
- package/browser/{chunk-WKM2QOAU.js → chunk-PSFQWURP.js} +1 -1
- package/browser/{chunk-Q6APDC4Z.js → chunk-PSLGWGNP.js} +1 -1
- package/browser/{chunk-ERE6AE7H.js → chunk-Q22HR52N.js} +1 -1
- package/browser/{chunk-WJXKZZS2.js → chunk-QEL7CGCP.js} +1 -1
- package/browser/{chunk-M5R2CYXH.js → chunk-QHGZQ2IG.js} +1 -1
- package/browser/{chunk-2CL5FM3P.js → chunk-QJ3CWKQT.js} +1 -1
- package/browser/{chunk-PS7477UG.js → chunk-QLSGGWTW.js} +1 -1
- package/browser/{chunk-TEGIL5RZ.js → chunk-QWLNF7VL.js} +1 -1
- package/browser/chunk-R3HIQ5AX.js +1 -0
- package/browser/chunk-R6DRKF4V.js +136 -0
- package/browser/{chunk-TOPX3JFU.js → chunk-RDASAJA5.js} +1 -1
- package/browser/{chunk-FU2ZGMX4.js → chunk-RIZ4YVMH.js} +1 -1
- package/browser/chunk-RJYFOAYX.js +1 -0
- package/browser/{chunk-QR7VN5GL.js → chunk-RPBIQ4ME.js} +1 -1
- package/browser/{chunk-PWTUEIUR.js → chunk-RT7OZJYZ.js} +1 -1
- package/browser/{chunk-EQ4O2B6P.js → chunk-RWW55Z7V.js} +1 -1
- package/browser/{chunk-ZNBXH3TQ.js → chunk-RWZGTR3S.js} +1 -1
- package/browser/{chunk-IZLEZJ6U.js → chunk-SCAKRK4B.js} +1 -1
- package/browser/{chunk-THT6CY5E.js → chunk-SCGKVOSE.js} +1 -1
- package/browser/chunk-SMEVWRVE.js +1 -0
- package/browser/{chunk-RTQ4SJP2.js → chunk-SQAFHZEO.js} +1 -1
- package/browser/{chunk-IKKPP4JS.js → chunk-SWF6XISV.js} +1 -1
- package/browser/{chunk-VVWAYTKN.js → chunk-SWVQK6HM.js} +1 -1
- package/browser/{chunk-7DAPNQYU.js → chunk-SXRKKO75.js} +1 -1
- package/browser/{chunk-WBWMUDOK.js → chunk-T43ISYOP.js} +1 -1
- package/browser/{chunk-LGOSIAUC.js → chunk-TANYEHMZ.js} +1 -1
- package/browser/{chunk-PQ6W7KXC.js → chunk-TDHDQRJN.js} +1 -1
- package/browser/{chunk-YWOH2LVD.js → chunk-TKHSLAZH.js} +14 -14
- package/browser/{chunk-6P2ASCNY.js → chunk-TP6ZUC53.js} +1 -1
- package/browser/{chunk-ZKOARDC2.js → chunk-TPJWIEYA.js} +1 -1
- package/browser/{chunk-L6PKNRWO.js → chunk-TRK4LJDS.js} +1 -1
- package/browser/{chunk-QTAF2OHJ.js → chunk-TYVVSM36.js} +1 -1
- package/browser/{chunk-32QBWLTN.js → chunk-U4MC22BG.js} +1 -1
- package/browser/{chunk-QJUU75N6.js → chunk-U56LRRCE.js} +1 -1
- package/browser/{chunk-BAEWHHDC.js → chunk-U6FO6TSU.js} +1 -1
- package/browser/{chunk-7NZLZJYF.js → chunk-UFVN6MTY.js} +1 -1
- package/browser/{chunk-HXXX3USD.js → chunk-UI6U53UY.js} +9 -9
- package/browser/{chunk-B7AC4RMR.js → chunk-UIVJ2JQT.js} +1 -1
- package/browser/chunk-UMFN4AJF.js +1 -0
- package/browser/{chunk-QG4B6W6L.js → chunk-UPV6ZIB5.js} +1 -1
- package/browser/{chunk-ZTU3TIGR.js → chunk-UPZZHMG6.js} +1 -1
- package/browser/{chunk-MZITJQAC.js → chunk-UX4QS4XQ.js} +1 -1
- package/browser/{chunk-PPVORSJQ.js → chunk-V4LDEQZZ.js} +1 -1
- package/browser/chunk-V4V55JMO.js +1 -0
- package/browser/{chunk-JBS5UYZC.js → chunk-V6D6TV7B.js} +1 -1
- package/browser/{chunk-KYXB2UQI.js → chunk-VEQJR5VL.js} +1 -1
- package/browser/{chunk-S2B6A2P3.js → chunk-VG3B7TDX.js} +1 -1
- package/browser/{chunk-5USF4MRW.js → chunk-VGHEGWAM.js} +1 -1
- package/browser/{chunk-7BQKGIZM.js → chunk-VL7THV5U.js} +1 -1
- package/browser/chunk-VRKJC53Z.js +10 -0
- package/browser/{chunk-EJWFW6Y5.js → chunk-VS6CGXUJ.js} +1 -1
- package/browser/{chunk-54UGZEAQ.js → chunk-WDUPZI6X.js} +1 -1
- package/browser/{chunk-4CPRMZL6.js → chunk-WFVMID6Q.js} +1 -1
- package/browser/{chunk-Z6X5UYRZ.js → chunk-WFWUOLEG.js} +1 -1
- package/browser/{chunk-ARYZHNFV.js → chunk-WGOUSPMF.js} +1 -1
- package/browser/{chunk-3CSCTT6I.js → chunk-WOAKN4QZ.js} +1 -1
- package/browser/{chunk-GDNVMJOU.js → chunk-WSFSSHIX.js} +1 -1
- package/browser/{chunk-ZZBF7AOW.js → chunk-WSWTWRKJ.js} +1 -1
- package/browser/chunk-WTIIZBRC.js +22 -0
- package/browser/{chunk-5UMDVS4U.js → chunk-XCSDEGWL.js} +1 -1
- package/browser/{chunk-FIOEXMKH.js → chunk-XDFUPYND.js} +1 -1
- package/browser/{chunk-COGKLKKE.js → chunk-XEPEGKS2.js} +1 -1
- package/browser/{chunk-VBIZF245.js → chunk-XFU3EMCG.js} +1 -1
- package/browser/{chunk-3NPP3FHR.js → chunk-XGXXFTMA.js} +1 -1
- package/browser/{chunk-EHEOIROM.js → chunk-XMPWQ5UV.js} +1 -1
- package/browser/chunk-XPM7J5AN.js +1 -0
- package/browser/{chunk-RL24GQSJ.js → chunk-XW7VJLDW.js} +1 -1
- package/browser/{chunk-4W3WYXI2.js → chunk-XWYCNPUZ.js} +1 -1
- package/browser/{chunk-PJ3DTEH2.js → chunk-Y4MERAVA.js} +1 -1
- package/browser/chunk-Y6SAXN2J.js +1 -0
- package/browser/{chunk-363IDTE3.js → chunk-Y7ZKGM5U.js} +1 -1
- package/browser/{chunk-SIDUUVNA.js → chunk-YDL2MTWE.js} +1 -1
- package/browser/{chunk-LOWQOYUL.js → chunk-YLXBICIW.js} +1 -1
- package/browser/{chunk-JTZHHVPI.js → chunk-YMKZUNJH.js} +1 -1
- package/browser/{chunk-VXPORXGI.js → chunk-YQ5PAXUW.js} +1 -1
- package/browser/{chunk-C5N3GKEC.js → chunk-Z4WEJMVU.js} +1 -1
- package/browser/{chunk-IISHJIET.js → chunk-Z5BFBI3D.js} +1 -1
- package/browser/chunk-Z5HEFUTD.js +1 -0
- package/browser/{chunk-SLX34TWD.js → chunk-Z76C52NM.js} +1 -1
- package/browser/{chunk-A2EVMYAR.js → chunk-ZBHPM2JC.js} +1 -1
- package/browser/{chunk-LGINK7BD.js → chunk-ZOYWCF3Q.js} +1 -1
- package/browser/{chunk-VZBXT2TV.js → chunk-ZRC22L45.js} +1 -1
- package/browser/{chunk-LUKLFBAY.js → chunk-ZRJU5XBX.js} +1 -1
- package/browser/{chunk-BQUL7SGN.js → chunk-ZV4K4PP6.js} +3 -3
- package/browser/chunk-ZVWC6CBP.js +1 -0
- package/browser/index.html +2 -2
- package/browser/main-4BFS7RVV.css +1 -0
- package/browser/main-6NLSRECT.js +3 -0
- package/browser/{styles-URIEURGQ.css → styles-LFDMQGKE.css} +1 -1
- package/package.json +1 -1
- package/browser/chunk-2VE2WNSA.js +0 -21
- package/browser/chunk-4HEJOI53.js +0 -1
- package/browser/chunk-4SRWAPD4.js +0 -1
- package/browser/chunk-65JSM2XC.js +0 -1
- package/browser/chunk-7SRLQQ53.js +0 -22
- package/browser/chunk-CQLZHUT4.js +0 -9
- package/browser/chunk-DI2O7SU5.js +0 -4
- package/browser/chunk-DOCQN2VL.js +0 -1
- package/browser/chunk-DSNA2CBA.js +0 -1
- package/browser/chunk-DTX2BFBV.js +0 -1
- package/browser/chunk-FBNETY2W.js +0 -1
- package/browser/chunk-GRGZQFG6.js +0 -380
- package/browser/chunk-IEVGW2RT.js +0 -5
- package/browser/chunk-JB7Y2263.js +0 -1
- package/browser/chunk-KWWIO4GT.js +0 -1
- package/browser/chunk-M3DKYPGC.js +0 -1
- package/browser/chunk-NBMH5YL2.css +0 -1
- package/browser/chunk-NIDHEU4E.js +0 -3
- package/browser/chunk-Q7YUJXQP.js +0 -1
- package/browser/chunk-SLYXMED6.js +0 -1
- package/browser/chunk-SVVH6PSD.js +0 -137
- package/browser/chunk-V432I4ZE.js +0 -21
- package/browser/chunk-VLISY5AT.js +0 -149
- package/browser/chunk-VM4K4MNV.js +0 -1
- package/browser/chunk-XY3FCZN2.js +0 -1
- package/browser/chunk-ZCQDZKFQ.js +0 -1
- package/browser/main-4WYCY6M5.js +0 -3
- package/browser/main-WPNH2WGQ.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ft,b as xt}from"./chunk-S2B6A2P3.js";import"./chunk-ZKOARDC2.js";import{a as st}from"./chunk-BQUL7SGN.js";import{a as ut}from"./chunk-BKTC6IB2.js";import{a as Ct}from"./chunk-ZMJLTU5O.js";import"./chunk-PRVQ3NAP.js";import"./chunk-BYXBJQAS.js";import{a as tt}from"./chunk-363IDTE3.js";import{d as mt,e as _t}from"./chunk-WMZLH4YK.js";import"./chunk-72RZBOHX.js";import"./chunk-3RK6DDJD.js";import"./chunk-M3DKYPGC.js";import"./chunk-6WATOQG3.js";import"./chunk-VM4K4MNV.js";import"./chunk-XTCEZONP.js";import"./chunk-LNDHYAFW.js";import{d as lt,e as ct}from"./chunk-5ZD6KTDH.js";import"./chunk-ZZBF7AOW.js";import{a as X}from"./chunk-23VPQAH7.js";import{b as pt}from"./chunk-4W3WYXI2.js";import{f as dt}from"./chunk-GRGZQFG6.js";import{b as $}from"./chunk-VXPORXGI.js";import"./chunk-5UMDVS4U.js";import"./chunk-3NPCLTJT.js";import"./chunk-L6PKNRWO.js";import"./chunk-SIQZO2WM.js";import{a as it}from"./chunk-J6M7UWVR.js";import{e as at,f as rt}from"./chunk-UEN2SKB2.js";import"./chunk-7YUPYNWQ.js";import"./chunk-2CL5FM3P.js";import"./chunk-LGINK7BD.js";import"./chunk-IKKPP4JS.js";import"./chunk-QPAUI5EG.js";import"./chunk-45E6XCHN.js";import"./chunk-SIDUUVNA.js";import"./chunk-KZFNI67M.js";import"./chunk-4BXCIT62.js";import"./chunk-D4FCXEV4.js";import"./chunk-6P2ASCNY.js";import"./chunk-EQ4O2B6P.js";import{b as et}from"./chunk-SLYXMED6.js";import"./chunk-R2GUMKAU.js";import"./chunk-BT7NN7PT.js";import"./chunk-26YFRPR2.js";import{b as Z,c as J}from"./chunk-JBS5UYZC.js";import{N as ot,g as nt}from"./chunk-TEGIL5RZ.js";import"./chunk-B7AC4RMR.js";import"./chunk-EQLHPWVB.js";import"./chunk-THT6CY5E.js";import{g as Y}from"./chunk-ZTD4APMR.js";import"./chunk-7P3L3ODB.js";import"./chunk-S7FOJJP2.js";import"./chunk-FU2ZGMX4.js";import"./chunk-2FWFPV5I.js";import"./chunk-SLX34TWD.js";import{F as K}from"./chunk-DWZ5JTI2.js";import"./chunk-ILTEBIEO.js";import"./chunk-PWTUEIUR.js";import"./chunk-36GWLMZX.js";import{b as U}from"./chunk-WFQIMZGL.js";import"./chunk-WUV22SZ4.js";import"./chunk-7AZJVR4Y.js";import{s as Q}from"./chunk-LGOSIAUC.js";import{Ab as p,Bb as W,Db as N,Eb as j,Fb as u,Fc as s,Gb as a,Gc as C,Hb as o,Hc as v,Ib as E,Jd as H,Lc as q,Pb as S,Qd as z,Sb as V,Ub as c,Xa as i,eb as h,hc as r,ib as L,ic as b,jc as f,jd as R,mb as O,mc as T,nc as g,ob as D,oc as I,sd as A,ta as x,ua as y,vd as G,wb as k,xc as F,yb as d,yc as P}from"./chunk-IEVGW2RT.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["View inventory traffic using each transaction\u2019s created date. Transfer Orders always use actual dispatch and receive dates","View inventory traffic using each transaction\u2019s invoice date (including backdated). Transfer Orders always use actual dispatch and receive dates"],Tt=()=>["/menu/Outlets/Master/Outlets/Info"],B=e=>({ID:e}),gt=()=>["/menu/Products/Catalog/Variants/Info"],It=()=>["/menu/Products/Catalog/Products/Info"];function ht(e,l){if(e&1){let t=S();a(0,"button",13),V("click",function(){x(t);let n=c();return y(n.openExportModal())}),E(1,"i",14),r(2," Export "),o()}}function St(e,l){if(e&1){let t=S();a(0,"div",15)(1,"h6"),r(2,"Outlet Group"),o(),a(3,"POS-outlet-group-tree-select",16),I("selectedOutletGroupIDChange",function(n){x(t);let _=c();return g(_.pageData.Filter.OutletGroupID,n)||(_.pageData.Filter.OutletGroupID=n),y(n)}),o(),a(4,"h6"),r(5,"Category"),o(),a(6,"POS-product-category-select",17),I("selectedCategoryIDChange",function(n){x(t);let _=c();return g(_.pageData.Filter.CategoryID,n)||(_.pageData.Filter.CategoryID=n),y(n)}),o(),a(7,"h6"),r(8,"Search Type"),o(),a(9,"radio-options",18),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.ProductVariantSearchMode,n)||(_.pageData.Filter.ProductVariantSearchMode=n),y(n)}),V("modelChange",function(n){x(t);let _=c();return y(_.onChangeSearchType(n))}),o(),a(10,"autocompleteV3",19),I("modelNameChange",function(n){x(t);let _=c();return g(_.productVariantModel,n)||(_.productVariantModel=n),y(n)}),o(),a(11,"h6"),r(12,"From - To"),o(),a(13,"div")(14,"datepicker",20),I("dateChange",function(n){x(t);let _=c();return g(_.pageData.Filter.From,n)||(_.pageData.Filter.From=n),y(n)}),o()(),a(15,"div",21)(16,"datepicker",22),I("dateChange",function(n){x(t);let _=c();return g(_.pageData.Filter.To,n)||(_.pageData.Filter.To=n),y(n)}),o()(),a(17,"h6"),r(18,"Inventory Type"),o(),a(19,"radio-options",23),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.InventoryType,n)||(_.pageData.Filter.InventoryType=n),y(n)}),o(),a(20,"h6"),r(21,"Movement Type"),o(),a(22,"radio-options",24),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.MovementType,n)||(_.pageData.Filter.MovementType=n),y(n)}),o(),a(23,"h6"),r(24,"Hide Zero Traffic"),o(),a(25,"radio-options",25),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.RowOption,n)||(_.pageData.Filter.RowOption=n),y(n)}),o()()}if(e&2){let t=c();i(3),u("showClear",!0),T("selectedOutletGroupID",t.pageData.Filter.OutletGroupID),i(3),T("selectedCategoryID",t.pageData.Filter.CategoryID),u("showClear",!0),i(3),T("model",t.pageData.Filter.ProductVariantSearchMode),u("options",t.pageData.Options.ProductVariantSearchModes),i(),T("modelName",t.productVariantModel),u("placeholder",t.pageData.Filter.ProductVariantSearchMode===0?"Search Product":"Search Variant")("isShowEmptyMessage",!0)("emptyMessage",t.pageData.Filter.ProductVariantSearchMode===0?"No Product found":"No Variant found")("tooltipMessage",t.pageData.Filter.ProductVariantSearchMode===0?"Search by product name":"Search by variant name")("label",t.pageData.Filter.ProductVariantSearchMode===0?"Product to Analyze":"Variant to Analyze")("listDataEndpoint",t.pageData.Filter.ProductVariantSearchMode===0?"/api/ac/GetProductSuggestionByCodeNName":"/API/AC/GetVariantSuggestionByCodeNName")("valueField",t.pageData.Filter.ProductVariantSearchMode===0?"Name":"Value")("showThumbnail",!0)("thumbnailKey","ImageURL"),i(4),u("isFloatingLabel",!1),T("date",t.pageData.Filter.From),u("hidelClearBtn",!0),i(2),u("isFloatingLabel",!1),T("date",t.pageData.Filter.To),u("hidelClearBtn",!0),i(3),T("model",t.pageData.Filter.InventoryType),u("options",t.pageData.Options.InventoryTypes),i(3),T("model",t.pageData.Filter.MovementType),u("options",t.pageData.Options.MovementTypes)("title",F(29,vt)),i(3),T("model",t.pageData.Filter.RowOption),u("options",t.pageData.Options.RowOptions)}}function Vt(e,l){e&1&&(a(0,"th",8),r(1,"Product"),o())}function Ft(e,l){e&1&&(a(0,"th",9)(1,"span",26),r(2," P.Code "),o()())}function wt(e,l){e&1&&(a(0,"th",10),r(1,"Code"),o())}function Dt(e,l){e&1&&(a(0,"th",11)(1,"span",27),r(2," Start "),o()())}function Et(e,l){e&1&&(a(0,"th",11)(1,"span",28),r(2," Bought "),o()())}function Pt(e,l){e&1&&(a(0,"th",11)(1,"span",29),r(2," Sold "),o()())}function bt(e,l){e&1&&(a(0,"th",11)(1,"span",30),r(2," T.In "),o()())}function Bt(e,l){e&1&&(a(0,"th",11)(1,"span",31),r(2," T.Out "),o()())}function Mt(e,l){e&1&&(a(0,"th",11)(1,"span",32),r(2," Adjust "),o()())}function Lt(e,l){e&1&&(a(0,"th",11)(1,"span",33),r(2," End "),o()())}function Ot(e,l){e&1&&(a(0,"th",11)(1,"span",34),r(2," Now "),o()())}function kt(e,l){e&1&&(a(0,"th",11)(1,"span",35),r(2," % "),o()())}function Wt(e,l){if(e&1&&(a(0,"td")(1,"a",36),r(2),o()()),e&2){let t=c().$implicit;i(),u("routerLink",F(3,It))("queryParams",P(4,B,t.ProductID)),i(),f(" ",t.ProductName," ")}}function Nt(e,l){if(e&1&&(a(0,"td"),r(1),o()),e&2){let t=c().$implicit;i(),f(" ",t.ProductCode," ")}}function jt(e,l){if(e&1&&(a(0,"td",37),r(1),o()),e&2){let t=c().$implicit;i(),f(" ",t.VariantCode," ")}}function qt(e,l){if(e&1&&(a(0,"td",38),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Start),i(),f(" ",C(2,2,t.Start)," ")}}function Rt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.Bought)," ")}}function At(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.Sold)," ")}}function Gt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.TransferredIn)," ")}}function Ht(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.TransferredOut)," ")}}function zt(e,l){if(e&1&&(a(0,"td",38),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Adjustment),i(),f(" ",t.Adjustment<0?t.Adjustment*-1:C(2,2,t.Adjustment)," ")}}function Kt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;u("colsFontColor",t.End),i(),f(" ",t.End," ")}}function Qt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Now),i(),f(" ",t.Now," ")}}function Ut(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.SellTransferInRate)," ")}}function Zt(e,l){if(e&1&&(a(0,"tr")(1,"td")(2,"a",36),r(3),o()(),d(4,Wt,3,6,"td"),d(5,Nt,2,1,"td"),a(6,"td")(7,"a",36),r(8),o()(),d(9,jt,2,1,"td",37),d(10,qt,3,4,"td",38),d(11,Rt,3,3,"td",37),d(12,At,3,3,"td",39),d(13,Gt,3,3,"td",37),d(14,Ht,3,3,"td",39),d(15,zt,3,4,"td",38),d(16,Kt,2,2,"td",38),d(17,Qt,2,2,"td",38),d(18,Ut,3,3,"td",37),o()),e&2){let t=l.$implicit,m=c(2);i(2),u("routerLink",F(18,Tt))("queryParams",P(19,B,t.OutletID)),i(),f(" ",t.OutletName," "),i(),p(m.column.productname.selected?4:-1),i(),p(m.column.productcode.selected?5:-1),i(2),u("routerLink",F(21,gt))("queryParams",P(22,B,t.VariantID)),i(),b(t.VariantName),i(),p(m.column.code.selected?9:-1),i(),p(m.column.start.selected?10:-1),i(),p(m.column.bought.selected?11:-1),i(),p(m.column.sold.selected?12:-1),i(),p(m.column.transferredIn.selected?13:-1),i(),p(m.column.transferredOut.selected?14:-1),i(),p(m.column.adjust.selected?15:-1),i(),p(m.column.end.selected?16:-1),i(),p(m.column.now.selected?17:-1),i(),p(m.column.percent.selected?18:-1)}}function Jt(e,l){if(e&1&&N(0,Zt,19,24,"tr",null,W),e&2){let t=c();j(t.infiniteList)}}function Xt(e,l){e&1&&(a(0,"tr")(1,"td",40),E(2,"app-empty-state"),o()())}function Yt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Start"))," ")}}function $t(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Bought"))," ")}}function te(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Sold"))," ")}}function ee(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"TransferredIn"))," ")}}function ie(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"TransferredOut"))," ")}}function ne(e,l){if(e&1&&(a(0,"td",38),s(1,"sum"),s(2,"quantityFraction"),r(3),s(4,"sum"),s(5,"quantityFraction"),o()),e&2){let t=c(2);u("colsFontColor",C(2,5,v(1,2,t.infiniteList,"Adjustment"))),i(3),f(" ",C(5,10,v(4,7,t.infiniteList,"Adjustment"))," ")}}function oe(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"End"))," ")}}function ae(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Now"))," ")}}function re(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"sum"),s(4,"sum"),s(5,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",v(2,1,t.infiniteList,"TransferredIn")?C(5,10,v(3,4,t.infiniteList,"Sold")/v(4,7,t.infiniteList,"TransferredIn")*100):0," ")}}function le(e,l){if(e&1&&(a(0,"tfoot")(1,"tr",41)(2,"th",42),r(3," Total: "),o(),d(4,Yt,4,6,"td",37),d(5,$t,4,6,"td",37),d(6,te,4,6,"td",39),d(7,ee,4,6,"td",37),d(8,ie,4,6,"td",39),d(9,ne,6,12,"td",38),d(10,oe,4,6,"td",37),d(11,ae,4,6,"td",37),d(12,re,6,12,"td",37),o()()),e&2){let t=c();i(2),k("colspan",2+(t.column.productname.selected?1:0)+(t.column.productcode.selected?1:0)+(t.column.code.selected?1:0)),i(2),p(t.column.start.selected?4:-1),i(),p(t.column.bought.selected?5:-1),i(),p(t.column.sold.selected?6:-1),i(),p(t.column.transferredIn.selected?7:-1),i(),p(t.column.transferredOut.selected?8:-1),i(),p(t.column.adjust.selected?9:-1),i(),p(t.column.end.selected?10:-1),i(),p(t.column.now.selected?11:-1),i(),p(t.column.percent.selected?12:-1)}}function ce(e,l){if(e&1){let t=S();a(0,"span",49),V("click",function(){x(t);let n=c(2);return y(n.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),a(1,"i",50),r(2,"?"),o()()}}function de(e,l){if(e&1&&(a(0,"span"),r(1),s(2,"number"),o()),e&2){let t=c(2);i(),b(C(2,1,t.listTotal))}}function pe(e,l){if(e&1){let t=S();a(0,"div",12)(1,"div",43)(2,"div",44),r(3),s(4,"number"),D(5,ce,3,0,"span",45)(6,de,3,3,"span",46),r(7),o()(),a(8,"a",47),V("click",function(){x(t);let n=c();return y(n.NextPage(!0))}),E(9,"i",48),r(10," Next"),o()()}if(e&2){let t=c();i(3),f(" Showing 1 - ",C(4,4,t.infiniteList.length)," of "),i(2),u("ngIf",!t.pageData.HideStoreApiCount),i(),u("ngIf",t.pageData.HideStoreApiCount),i(),f(" records ~ ",t.pageData.Filter.PageNumber," Page ")}}var yt=class e extends X{constructor(t,m,n,_,M,w,me){super(t,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=n;this.pageTitle=_;this.converter=M;this.roleService=w;this.matDialog=me;this.pageTitle.setTitle(this.menuData.T)}column={productname:{selected:!1,name:"Product"},productcode:{selected:!1,name:"Product Code"},code:{selected:!0,name:"Variant Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!1,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!0,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open($,{data:{title:"Variant Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportVariantInventoryTraffic",Value:"Default",FileName:"Variant Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}onChangeSearchType(t){this.pageData.Filter.ListProductID=[],this.pageData.Filter.ListVariantID=[]}get productVariantModel(){return this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID:this.pageData.Filter.ListVariantID}set productVariantModel(t){this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID=t:this.pageData.Filter.ListVariantID=t}static \u0275fac=function(m){return new(m||e)(h(et),h(Q),h(it),h(H),h(st),h(U),h(Y))};static \u0275cmp=L({type:e,selectors:[["POS-variant-inventory-traffic"]],features:[O],decls:33,vars:21,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","150px"],[2,"width","80px"],[1,"text-end",2,"width","130px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","SearchType",3,"modelChange","model","options"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField","showThumbnail","thumbnailKey"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","InventoryType",3,"modelChange","model","options"],["name","MovementType",3,"modelChange","model","options","title"],["name","RowOption",3,"modelChange","model","options"],["matTooltip","Product Code","matTooltipPosition","above"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-danger"],["colspan","13"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(m,n){if(m&1){let _=S();a(0,"mainpanel-cmp",1),V("onSubmit",function(){return x(_),y(n.searchFromPageOne())}),I("filterChange",function(w){return x(_),g(n.pageData.Filter,w)||(n.pageData.Filter=w),y(w)}),a(1,"actions"),D(2,ht,3,0,"button",2),o(),a(3,"filters"),D(4,St,26,30,"ng-template",null,0,q),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),d(14,Vt,2,0,"th",8),d(15,Ft,3,0,"th",9),a(16,"th"),r(17,"Variant"),o(),d(18,wt,2,0,"th",10),d(19,Dt,3,0,"th",11),d(20,Et,3,0,"th",11),d(21,Pt,3,0,"th",11),d(22,bt,3,0,"th",11),d(23,Bt,3,0,"th",11),d(24,Mt,3,0,"th",11),d(25,Lt,3,0,"th",11),d(26,Ot,3,0,"th",11),d(27,kt,3,0,"th",11),o()(),a(28,"tbody"),d(29,Jt,2,0)(30,Xt,3,0,"tr"),o(),d(31,le,13,10,"tfoot"),o()(),d(32,pe,11,6,"div",12),o()()()}m&2&&(u("pageData",n.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),T("filter",n.pageData.Filter),u("column",n.column),i(2),u("ngIf",n.roleService.global.Export),i(12),p(n.column.productname.selected?14:-1),i(),p(n.column.productcode.selected?15:-1),i(3),p(n.column.code.selected?18:-1),i(),p(n.column.start.selected?19:-1),i(),p(n.column.bought.selected?20:-1),i(),p(n.column.sold.selected?21:-1),i(),p(n.column.transferredIn.selected?22:-1),i(),p(n.column.transferredOut.selected?23:-1),i(),p(n.column.adjust.selected?24:-1),i(),p(n.column.end.selected?25:-1),i(),p(n.column.now.selected?26:-1),i(),p(n.column.percent.selected?27:-1),i(2),p(n.infiniteList&&n.infiniteList.length>0?29:30),i(2),p(n.infiniteList&&n.infiniteList.length>0?31:-1),i(),p(n.infiniteList&&n.infiniteList.length>0?32:-1))},dependencies:[rt,at,G,R,K,ut,dt,ft,ot,z,_t,mt,ct,lt,Ct,pt,xt,J,Z,A,nt,tt],encapsulation:2})};export{yt as Variant_Inventory_TrafficComponent};
|
|
1
|
+
import{a as ft,b as xt}from"./chunk-VG3B7TDX.js";import"./chunk-TPJWIEYA.js";import{a as st}from"./chunk-ZV4K4PP6.js";import{a as ut}from"./chunk-FEHMPX43.js";import{a as Ct}from"./chunk-3XH2STFE.js";import"./chunk-P3TFDLWR.js";import"./chunk-BYXBJQAS.js";import{a as tt}from"./chunk-Y7ZKGM5U.js";import{d as mt,e as _t}from"./chunk-AHTR7XKG.js";import"./chunk-NS6IC2PT.js";import"./chunk-3RK6DDJD.js";import"./chunk-SMEVWRVE.js";import"./chunk-JQDS4BXR.js";import"./chunk-F3HDP5CA.js";import"./chunk-AJAUI7BA.js";import"./chunk-MWGICBEB.js";import{d as lt,e as ct}from"./chunk-ODYEJFNJ.js";import"./chunk-WSWTWRKJ.js";import{a as X}from"./chunk-GE5I6JYL.js";import{b as pt}from"./chunk-XWYCNPUZ.js";import{f as dt}from"./chunk-GZ6OVEDL.js";import{b as $}from"./chunk-YQ5PAXUW.js";import"./chunk-XCSDEGWL.js";import"./chunk-55Z32OLJ.js";import"./chunk-TRK4LJDS.js";import"./chunk-B4TZQBTN.js";import{a as it}from"./chunk-JT4M6AIA.js";import{e as at,f as rt}from"./chunk-MZDVGN2B.js";import"./chunk-OB6KFXD6.js";import"./chunk-QJ3CWKQT.js";import"./chunk-ZOYWCF3Q.js";import"./chunk-SWF6XISV.js";import"./chunk-GXAF3JUO.js";import"./chunk-LB5UXGDG.js";import"./chunk-YDL2MTWE.js";import"./chunk-7YYWBCWJ.js";import"./chunk-CCIHCGP5.js";import"./chunk-FM7BHGBW.js";import"./chunk-TP6ZUC53.js";import"./chunk-RWW55Z7V.js";import{b as et}from"./chunk-XPM7J5AN.js";import"./chunk-E634BI4W.js";import"./chunk-BAXZ74LK.js";import"./chunk-3ZH3XK5V.js";import{b as Z,c as J}from"./chunk-V6D6TV7B.js";import{N as ot,g as nt}from"./chunk-QWLNF7VL.js";import"./chunk-UIVJ2JQT.js";import"./chunk-EQLHPWVB.js";import"./chunk-SCGKVOSE.js";import{g as Y}from"./chunk-N5RDRDT7.js";import"./chunk-N7OS7SFI.js";import"./chunk-4HLKKTIV.js";import"./chunk-RIZ4YVMH.js";import"./chunk-2FWFPV5I.js";import"./chunk-Z76C52NM.js";import{F as K}from"./chunk-7MRUPBXU.js";import"./chunk-ABOSNV75.js";import"./chunk-RT7OZJYZ.js";import"./chunk-5RYL4EJ2.js";import{b as U}from"./chunk-KBLVOO4J.js";import"./chunk-WUV22SZ4.js";import"./chunk-H6RHVRGW.js";import{s as Q}from"./chunk-TANYEHMZ.js";import{Ab as d,Ac as P,Cb as p,Db as W,Fb as N,Gb as j,Hb as u,Hc as s,Ib as a,Ic as C,Jb as o,Jc as v,Kb as E,Ld as H,Nc as q,Rb as S,Sd as z,Ub as V,Wb as c,Xa as i,eb as h,ib as L,jc as r,kc as b,lc as f,ld as R,mb as O,ob as D,oc as T,pc as g,qc as I,ta as x,ua as y,ud as A,wb as k,xd as G,zc as F}from"./chunk-L3U6V3BF.js";import"./chunk-WFMAM73Y.js";import"./chunk-SNAKHGZS.js";var vt=()=>["View inventory traffic using each transaction\u2019s created date. Transfer Orders always use actual dispatch and receive dates","View inventory traffic using each transaction\u2019s invoice date (including backdated). Transfer Orders always use actual dispatch and receive dates"],Tt=()=>["/menu/Outlets/Master/Outlets/Info"],B=e=>({ID:e}),gt=()=>["/menu/Products/Catalog/Variants/Info"],It=()=>["/menu/Products/Catalog/Products/Info"];function ht(e,l){if(e&1){let t=S();a(0,"button",13),V("click",function(){x(t);let n=c();return y(n.openExportModal())}),E(1,"i",14),r(2," Export "),o()}}function St(e,l){if(e&1){let t=S();a(0,"div",15)(1,"h6"),r(2,"Outlet Group"),o(),a(3,"POS-outlet-group-tree-select",16),I("selectedOutletGroupIDChange",function(n){x(t);let _=c();return g(_.pageData.Filter.OutletGroupID,n)||(_.pageData.Filter.OutletGroupID=n),y(n)}),o(),a(4,"h6"),r(5,"Category"),o(),a(6,"POS-product-category-select",17),I("selectedCategoryIDChange",function(n){x(t);let _=c();return g(_.pageData.Filter.CategoryID,n)||(_.pageData.Filter.CategoryID=n),y(n)}),o(),a(7,"h6"),r(8,"Search Type"),o(),a(9,"radio-options",18),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.ProductVariantSearchMode,n)||(_.pageData.Filter.ProductVariantSearchMode=n),y(n)}),V("modelChange",function(n){x(t);let _=c();return y(_.onChangeSearchType(n))}),o(),a(10,"autocompleteV3",19),I("modelNameChange",function(n){x(t);let _=c();return g(_.productVariantModel,n)||(_.productVariantModel=n),y(n)}),o(),a(11,"h6"),r(12,"From - To"),o(),a(13,"div")(14,"datepicker",20),I("dateChange",function(n){x(t);let _=c();return g(_.pageData.Filter.From,n)||(_.pageData.Filter.From=n),y(n)}),o()(),a(15,"div",21)(16,"datepicker",22),I("dateChange",function(n){x(t);let _=c();return g(_.pageData.Filter.To,n)||(_.pageData.Filter.To=n),y(n)}),o()(),a(17,"h6"),r(18,"Inventory Type"),o(),a(19,"radio-options",23),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.InventoryType,n)||(_.pageData.Filter.InventoryType=n),y(n)}),o(),a(20,"h6"),r(21,"Movement Type"),o(),a(22,"radio-options",24),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.MovementType,n)||(_.pageData.Filter.MovementType=n),y(n)}),o(),a(23,"h6"),r(24,"Hide Zero Traffic"),o(),a(25,"radio-options",25),I("modelChange",function(n){x(t);let _=c();return g(_.pageData.Filter.RowOption,n)||(_.pageData.Filter.RowOption=n),y(n)}),o()()}if(e&2){let t=c();i(3),u("showClear",!0),T("selectedOutletGroupID",t.pageData.Filter.OutletGroupID),i(3),T("selectedCategoryID",t.pageData.Filter.CategoryID),u("showClear",!0),i(3),T("model",t.pageData.Filter.ProductVariantSearchMode),u("options",t.pageData.Options.ProductVariantSearchModes),i(),T("modelName",t.productVariantModel),u("placeholder",t.pageData.Filter.ProductVariantSearchMode===0?"Search Product":"Search Variant")("isShowEmptyMessage",!0)("emptyMessage",t.pageData.Filter.ProductVariantSearchMode===0?"No Product found":"No Variant found")("tooltipMessage",t.pageData.Filter.ProductVariantSearchMode===0?"Search by product name":"Search by variant name")("label",t.pageData.Filter.ProductVariantSearchMode===0?"Product to Analyze":"Variant to Analyze")("listDataEndpoint",t.pageData.Filter.ProductVariantSearchMode===0?"/api/ac/GetProductSuggestionByCodeNName":"/API/AC/GetVariantSuggestionByCodeNName")("valueField",t.pageData.Filter.ProductVariantSearchMode===0?"Name":"Value")("showThumbnail",!0)("thumbnailKey","ImageURL"),i(4),u("isFloatingLabel",!1),T("date",t.pageData.Filter.From),u("hidelClearBtn",!0),i(2),u("isFloatingLabel",!1),T("date",t.pageData.Filter.To),u("hidelClearBtn",!0),i(3),T("model",t.pageData.Filter.InventoryType),u("options",t.pageData.Options.InventoryTypes),i(3),T("model",t.pageData.Filter.MovementType),u("options",t.pageData.Options.MovementTypes)("title",F(29,vt)),i(3),T("model",t.pageData.Filter.RowOption),u("options",t.pageData.Options.RowOptions)}}function Vt(e,l){e&1&&(a(0,"th",8),r(1,"Product"),o())}function Ft(e,l){e&1&&(a(0,"th",9)(1,"span",26),r(2," P.Code "),o()())}function wt(e,l){e&1&&(a(0,"th",10),r(1,"Code"),o())}function Dt(e,l){e&1&&(a(0,"th",11)(1,"span",27),r(2," Start "),o()())}function Et(e,l){e&1&&(a(0,"th",11)(1,"span",28),r(2," Bought "),o()())}function Pt(e,l){e&1&&(a(0,"th",11)(1,"span",29),r(2," Sold "),o()())}function bt(e,l){e&1&&(a(0,"th",11)(1,"span",30),r(2," T.In "),o()())}function Bt(e,l){e&1&&(a(0,"th",11)(1,"span",31),r(2," T.Out "),o()())}function Mt(e,l){e&1&&(a(0,"th",11)(1,"span",32),r(2," Adjust "),o()())}function Lt(e,l){e&1&&(a(0,"th",11)(1,"span",33),r(2," End "),o()())}function Ot(e,l){e&1&&(a(0,"th",11)(1,"span",34),r(2," Now "),o()())}function kt(e,l){e&1&&(a(0,"th",11)(1,"span",35),r(2," % "),o()())}function Wt(e,l){if(e&1&&(a(0,"td")(1,"a",36),r(2),o()()),e&2){let t=c().$implicit;i(),u("routerLink",F(3,It))("queryParams",P(4,B,t.ProductID)),i(),f(" ",t.ProductName," ")}}function Nt(e,l){if(e&1&&(a(0,"td"),r(1),o()),e&2){let t=c().$implicit;i(),f(" ",t.ProductCode," ")}}function jt(e,l){if(e&1&&(a(0,"td",37),r(1),o()),e&2){let t=c().$implicit;i(),f(" ",t.VariantCode," ")}}function qt(e,l){if(e&1&&(a(0,"td",38),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Start),i(),f(" ",C(2,2,t.Start)," ")}}function Rt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.Bought)," ")}}function At(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.Sold)," ")}}function Gt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.TransferredIn)," ")}}function Ht(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.TransferredOut)," ")}}function zt(e,l){if(e&1&&(a(0,"td",38),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Adjustment),i(),f(" ",t.Adjustment<0?t.Adjustment*-1:C(2,2,t.Adjustment)," ")}}function Kt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;u("colsFontColor",t.End),i(),f(" ",t.End," ")}}function Qt(e,l){if(e&1&&(a(0,"td",38),r(1),o()),e&2){let t=c().$implicit;u("colsFontColor",t.Now),i(),f(" ",t.Now," ")}}function Ut(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"quantityFraction"),o()),e&2){let t=c().$implicit;i(),f(" ",C(2,1,t.SellTransferInRate)," ")}}function Zt(e,l){if(e&1&&(a(0,"tr")(1,"td")(2,"a",36),r(3),o()(),d(4,Wt,3,6,"td"),d(5,Nt,2,1,"td"),a(6,"td")(7,"a",36),r(8),o()(),d(9,jt,2,1,"td",37),d(10,qt,3,4,"td",38),d(11,Rt,3,3,"td",37),d(12,At,3,3,"td",39),d(13,Gt,3,3,"td",37),d(14,Ht,3,3,"td",39),d(15,zt,3,4,"td",38),d(16,Kt,2,2,"td",38),d(17,Qt,2,2,"td",38),d(18,Ut,3,3,"td",37),o()),e&2){let t=l.$implicit,m=c(2);i(2),u("routerLink",F(18,Tt))("queryParams",P(19,B,t.OutletID)),i(),f(" ",t.OutletName," "),i(),p(m.column.productname.selected?4:-1),i(),p(m.column.productcode.selected?5:-1),i(2),u("routerLink",F(21,gt))("queryParams",P(22,B,t.VariantID)),i(),b(t.VariantName),i(),p(m.column.code.selected?9:-1),i(),p(m.column.start.selected?10:-1),i(),p(m.column.bought.selected?11:-1),i(),p(m.column.sold.selected?12:-1),i(),p(m.column.transferredIn.selected?13:-1),i(),p(m.column.transferredOut.selected?14:-1),i(),p(m.column.adjust.selected?15:-1),i(),p(m.column.end.selected?16:-1),i(),p(m.column.now.selected?17:-1),i(),p(m.column.percent.selected?18:-1)}}function Jt(e,l){if(e&1&&N(0,Zt,19,24,"tr",null,W),e&2){let t=c();j(t.infiniteList)}}function Xt(e,l){e&1&&(a(0,"tr")(1,"td",40),E(2,"app-empty-state"),o()())}function Yt(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Start"))," ")}}function $t(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Bought"))," ")}}function te(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Sold"))," ")}}function ee(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"TransferredIn"))," ")}}function ie(e,l){if(e&1&&(a(0,"td",39),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"TransferredOut"))," ")}}function ne(e,l){if(e&1&&(a(0,"td",38),s(1,"sum"),s(2,"quantityFraction"),r(3),s(4,"sum"),s(5,"quantityFraction"),o()),e&2){let t=c(2);u("colsFontColor",C(2,5,v(1,2,t.infiniteList,"Adjustment"))),i(3),f(" ",C(5,10,v(4,7,t.infiniteList,"Adjustment"))," ")}}function oe(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"End"))," ")}}function ae(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",C(3,4,v(2,1,t.infiniteList,"Now"))," ")}}function re(e,l){if(e&1&&(a(0,"td",37),r(1),s(2,"sum"),s(3,"sum"),s(4,"sum"),s(5,"quantityFraction"),o()),e&2){let t=c(2);i(),f(" ",v(2,1,t.infiniteList,"TransferredIn")?C(5,10,v(3,4,t.infiniteList,"Sold")/v(4,7,t.infiniteList,"TransferredIn")*100):0," ")}}function le(e,l){if(e&1&&(a(0,"tfoot")(1,"tr",41)(2,"th",42),r(3," Total: "),o(),d(4,Yt,4,6,"td",37),d(5,$t,4,6,"td",37),d(6,te,4,6,"td",39),d(7,ee,4,6,"td",37),d(8,ie,4,6,"td",39),d(9,ne,6,12,"td",38),d(10,oe,4,6,"td",37),d(11,ae,4,6,"td",37),d(12,re,6,12,"td",37),o()()),e&2){let t=c();i(2),k("colspan",2+(t.column.productname.selected?1:0)+(t.column.productcode.selected?1:0)+(t.column.code.selected?1:0)),i(2),p(t.column.start.selected?4:-1),i(),p(t.column.bought.selected?5:-1),i(),p(t.column.sold.selected?6:-1),i(),p(t.column.transferredIn.selected?7:-1),i(),p(t.column.transferredOut.selected?8:-1),i(),p(t.column.adjust.selected?9:-1),i(),p(t.column.end.selected?10:-1),i(),p(t.column.now.selected?11:-1),i(),p(t.column.percent.selected?12:-1)}}function ce(e,l){if(e&1){let t=S();a(0,"span",49),V("click",function(){x(t);let n=c(2);return y(n.StoreRowsCountAPIResult("inventory/GetCountVariantInventoryTraffic"))}),a(1,"i",50),r(2,"?"),o()()}}function de(e,l){if(e&1&&(a(0,"span"),r(1),s(2,"number"),o()),e&2){let t=c(2);i(),b(C(2,1,t.listTotal))}}function pe(e,l){if(e&1){let t=S();a(0,"div",12)(1,"div",43)(2,"div",44),r(3),s(4,"number"),D(5,ce,3,0,"span",45)(6,de,3,3,"span",46),r(7),o()(),a(8,"a",47),V("click",function(){x(t);let n=c();return y(n.NextPage(!0))}),E(9,"i",48),r(10," Next"),o()()}if(e&2){let t=c();i(3),f(" Showing 1 - ",C(4,4,t.infiniteList.length)," of "),i(2),u("ngIf",!t.pageData.HideStoreApiCount),i(),u("ngIf",t.pageData.HideStoreApiCount),i(),f(" records ~ ",t.pageData.Filter.PageNumber," Page ")}}var yt=class e extends X{constructor(t,m,n,_,M,w,me){super(t,m,"inventory/GetVariantInventoryTraffic","inventoryloader/GetVariantInventoryTraffic",void 0,void 0,!0);this.httpService=m;this.csvConverter=n;this.pageTitle=_;this.converter=M;this.roleService=w;this.matDialog=me;this.pageTitle.setTitle(this.menuData.T)}column={productname:{selected:!1,name:"Product"},productcode:{selected:!1,name:"Product Code"},code:{selected:!0,name:"Variant Code"},start:{selected:!0,name:"Start"},bought:{selected:!1,name:"Bought"},sold:{selected:!0,name:"Sold"},transferredIn:{selected:!0,name:"T.In"},transferredOut:{selected:!0,name:"T.Out"},adjust:{selected:!1,name:"Adjust"},end:{selected:!1,name:"End"},now:{selected:!0,name:"Now"},percent:{selected:!0,name:"Percentage"}};selectedProduct=[];postBindData(){this.menuData.H=this.data.PageTitle}openExportModal(){this.matDialog.open($,{data:{title:"Variant Inventory Traffic",exportTypes:[{ID:"inventoryexport/GetExportVariantInventoryTraffic",Value:"Default",FileName:"Variant Inventory Traffic"}],filterExport:this.pageData.Filter,getAllDataLengthAPI:"",pagination:!0}})}onChangeSearchType(t){this.pageData.Filter.ListProductID=[],this.pageData.Filter.ListVariantID=[]}get productVariantModel(){return this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID:this.pageData.Filter.ListVariantID}set productVariantModel(t){this.pageData.Filter.ProductVariantSearchMode===0?this.pageData.Filter.ListProductID=t:this.pageData.Filter.ListVariantID=t}static \u0275fac=function(m){return new(m||e)(h(et),h(Q),h(it),h(H),h(st),h(U),h(Y))};static \u0275cmp=L({type:e,selectors:[["POS-variant-inventory-traffic"]],features:[O],decls:33,vars:21,consts:[["pageFilterTemplate",""],[3,"onSubmit","filterChange","pageData","hideSearchBox","isFilterOnDropdown","filter","column"],["class","btn btn-outline-secondary me-3",3,"click",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"table-responsive"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[2,"width","180px"],[2,"width","150px"],[2,"width","80px"],[1,"text-end",2,"width","130px"],[1,"text-end",2,"width","80px"],[1,"d-flex","justify-content-between","mt-5"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["aria-hidden","true",1,"fa-solid","fa-upload"],[1,"dialog-filter"],[1,"tree-select-as-filter",3,"selectedOutletGroupIDChange","showClear","selectedOutletGroupID"],[1,"tree-select-as-filter",3,"selectedCategoryIDChange","selectedCategoryID","showClear"],["name","SearchType",3,"modelChange","model","options"],[3,"modelNameChange","modelName","placeholder","isShowEmptyMessage","emptyMessage","tooltipMessage","label","listDataEndpoint","valueField","showThumbnail","thumbnailKey"],["placeholder","From","appearance","outline","name","From",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],[1,"mt-4"],["placeholder","To","appearance","outline","name","To",3,"dateChange","isFloatingLabel","date","hidelClearBtn"],["name","InventoryType",3,"modelChange","model","options"],["name","MovementType",3,"modelChange","model","options","title"],["name","RowOption",3,"modelChange","model","options"],["matTooltip","Product Code","matTooltipPosition","above"],["matTooltip","Stock based on start date (from date filter)","matTooltipPosition","above"],["matTooltip","Movement Stock from Inbound Logistics (Supplier Bill)","matTooltipPosition","above"],["matTooltip","Movement Stock from Outbound Logistics (Customer Invoice)","matTooltipPosition","above"],["matTooltip","Stock received from other outlets","matTooltipPosition","above"],["matTooltip","Stock sent to other outlets","matTooltipPosition","above"],["matTooltip","Total stock adjustments made","matTooltipPosition","above"],["matTooltip","Stock based on end date (to date filter)","matTooltipPosition","above"],["matTooltip","Current on-hand inventory","matTooltipPosition","above"],["matTooltip","Percentage of sold items compared to the total items received from other outlets.","matTooltipPosition","above",1,"text-end"],[3,"routerLink","queryParams"],[1,"text-end"],[1,"text-end",3,"colsFontColor"],[1,"text-end","text-danger"],["colspan","13"],[1,"table-footer"],[1,"empty-column","text-end"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"fw-bold","fst-italic","hidden-xxs"],["style","cursor: pointer",3,"click",4,"ngIf"],[4,"ngIf"],["role","button",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fa-solid","fa-arrow-right"],[2,"cursor","pointer",3,"click"],["matTooltipPosition","above","matTooltip","Retrieve rows count",1,"border","p-3"]],template:function(m,n){if(m&1){let _=S();a(0,"mainpanel-cmp",1),V("onSubmit",function(){return x(_),y(n.searchFromPageOne())}),I("filterChange",function(w){return x(_),g(n.pageData.Filter,w)||(n.pageData.Filter=w),y(w)}),a(1,"actions"),D(2,ht,3,0,"button",2),o(),a(3,"filters"),D(4,St,26,30,"ng-template",null,0,q),o(),a(6,"content")(7,"div",3)(8,"div",4)(9,"table",5)(10,"thead",6)(11,"tr")(12,"th",7),r(13,"Outlet"),o(),d(14,Vt,2,0,"th",8),d(15,Ft,3,0,"th",9),a(16,"th"),r(17,"Variant"),o(),d(18,wt,2,0,"th",10),d(19,Dt,3,0,"th",11),d(20,Et,3,0,"th",11),d(21,Pt,3,0,"th",11),d(22,bt,3,0,"th",11),d(23,Bt,3,0,"th",11),d(24,Mt,3,0,"th",11),d(25,Lt,3,0,"th",11),d(26,Ot,3,0,"th",11),d(27,kt,3,0,"th",11),o()(),a(28,"tbody"),d(29,Jt,2,0)(30,Xt,3,0,"tr"),o(),d(31,le,13,10,"tfoot"),o()(),d(32,pe,11,6,"div",12),o()()()}m&2&&(u("pageData",n.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),T("filter",n.pageData.Filter),u("column",n.column),i(2),u("ngIf",n.roleService.global.Export),i(12),p(n.column.productname.selected?14:-1),i(),p(n.column.productcode.selected?15:-1),i(3),p(n.column.code.selected?18:-1),i(),p(n.column.start.selected?19:-1),i(),p(n.column.bought.selected?20:-1),i(),p(n.column.sold.selected?21:-1),i(),p(n.column.transferredIn.selected?22:-1),i(),p(n.column.transferredOut.selected?23:-1),i(),p(n.column.adjust.selected?24:-1),i(),p(n.column.end.selected?25:-1),i(),p(n.column.now.selected?26:-1),i(),p(n.column.percent.selected?27:-1),i(2),p(n.infiniteList&&n.infiniteList.length>0?29:30),i(2),p(n.infiniteList&&n.infiniteList.length>0?31:-1),i(),p(n.infiniteList&&n.infiniteList.length>0?32:-1))},dependencies:[rt,at,G,R,K,ut,dt,ft,ot,z,_t,mt,ct,lt,Ct,pt,xt,J,Z,A,nt,tt],encapsulation:2})};export{yt as Variant_Inventory_TrafficComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as xo}from"./chunk-YXCPHYC5.js";import{a as Jt,b as zt}from"./chunk-JFLT7NX3.js";import{a as Bo}from"./chunk-RACYAEOL.js";import{a as Di}from"./chunk-GGDW5WFA.js";import{e as wo}from"./chunk-QJUU75N6.js";import{b as ko}from"./chunk-D7DUI5NF.js";import{d as Ao}from"./chunk-TXJJUZ26.js";import{a as No}from"./chunk-BNNKSBQ6.js";import{a as Io}from"./chunk-IZLEZJ6U.js";import{a as he,b as Re,e as Lo}from"./chunk-4XJWQAS6.js";import{b as Eo}from"./chunk-DC3TCY6D.js";import{a as Do,b as Vo,c as Fo}from"./chunk-CQLZHUT4.js";import{a as Mo}from"./chunk-S27D5MBU.js";import{a as jo}from"./chunk-HGSF7LOB.js";import{c as Dn,d as Oo}from"./chunk-7BVPHIEF.js";import{a as lo}from"./chunk-T7XU5W5A.js";import{a as Mt}from"./chunk-25H27N7N.js";import{a as To}from"./chunk-MNJSQKLX.js";import{a as Mi,b as xi,c as Ii}from"./chunk-OXWQ7ZZS.js";import{a as Ro}from"./chunk-4CPRMZL6.js";import{a as Ho}from"./chunk-ESDXMFGP.js";import{a as Ke}from"./chunk-J6U6UYNI.js";import{a as tt,b as dt,c as de}from"./chunk-NSNUUKNK.js";import{a as Oi,b as xe}from"./chunk-EN2Y56CS.js";import{a as Pn,b as $t,c as On}from"./chunk-PXDS3HXW.js";import{b as Po}from"./chunk-WKM2QOAU.js";import{a as So}from"./chunk-ZMJLTU5O.js";import{g as bo}from"./chunk-PRVQ3NAP.js";import{d as Pi}from"./chunk-WMZLH4YK.js";import{p as mo}from"./chunk-6WATOQG3.js";import{d as co}from"./chunk-XTCEZONP.js";import{a as go,c as Ot}from"./chunk-D4FCXEV4.js";import{g as po}from"./chunk-6P2ASCNY.js";import{B as _o,C as oe,D as Oe,G as yo,u as ie,v as ne,w as Pt}from"./chunk-26YFRPR2.js";import{b as yi,c as qt}from"./chunk-JBS5UYZC.js";import{F as Dt,N as Si,O as U,g as fo,n as bi,o as ho,q as Co,t as vo}from"./chunk-TEGIL5RZ.js";import{a as rt}from"./chunk-B7AC4RMR.js";import{a as fi,c as hi}from"./chunk-EQLHPWVB.js";import{d as St,e as uo}from"./chunk-THT6CY5E.js";import{a as ee,b as so,e as te,f as fe,g as we}from"./chunk-ZTD4APMR.js";import{a as me}from"./chunk-2FWFPV5I.js";import{A as ro,B as ao,F as vi,c as Te,e as Ci,h as Pe,i as Xn,k as eo,l as et,n as to,o as Ee,p as io,s as bt,x as no,y as oo}from"./chunk-DWZ5JTI2.js";import{b as _i}from"./chunk-WFQIMZGL.js";import{a as f}from"./chunk-WUV22SZ4.js";import{a as Zn}from"./chunk-7AZJVR4Y.js";import{p as L,s as ge}from"./chunk-LGOSIAUC.js";import{$ as si,Ab as C,Bb as ot,Bc as jn,Ca as R,Cb as ve,Db as K,E as ce,Eb as Z,Fb as p,Fc as y,Gb as a,Gc as x,Gd as $n,Hb as s,Hc as X,I as nt,Ib as b,Ic as _t,Jb as N,Kb as k,Kd as Jn,Lb as Xe,Lc as Qn,M as ht,Mb as Ct,N as Qe,Nb as vt,Ob as di,Oc as se,Pb as E,Pd as zn,Q as Fe,Qa as Je,Qb as Fn,Qd as Yn,Sa as mt,Sb as S,Sc as yt,Sd as Kn,Ta as Vn,Tb as Ln,Tc as Gt,Ub as d,Xa as l,Xc as gi,Y as Le,Yb as Qt,Zb as Ut,_b as Wt,aa as Y,b as oi,cc as ue,d as Me,da as Ie,dc as Bn,e as be,eb as P,fa as le,gc as pi,gd as Be,hc as m,ib as A,ic as O,id as Un,jb as ci,jc as M,jd as Wn,k as gt,kc as ui,la as I,lc as Hn,ma as li,mc as H,md as Gn,n as An,nc as V,nd as qn,o as ke,oa as g,ob as $,oc as j,od as ze,p as ft,pa as T,q as ri,qd as Ye,r as ai,sd as q,t as J,ta as v,u as $e,ua as _,v as kn,vd as Se,wb as mi,yb as h,yc as Q,zb as Sn,zc as Ue}from"./chunk-IEVGW2RT.js";import{a as ii,i as Ze,k as ni}from"./chunk-SNAKHGZS.js";var We=class{constructor(e){this.roleService=e;e&&this.setRole()}_Retrieve;_DateEditor;_NumberEditor;_PriceVisible;_UnitPriceEditor;_PricebookSelector;_Cost;_Return;_Discount;_SalesPerson;_PriceMinimum;_Payment;_CreditSalesLock;_CustomerInputLock;_PaymentCodeLock;_Shipping;_Tax;_DeleteItem;_BundlingPrice;_EmailRestriction;_ParkedDeletionAuthorized;_SellEditor;_ContactCreate;_PrepaidPackageCreate;_Order;_Reprint;_Contacts;_ContactsCreate;_InventoryView;_DebtView;_ClearCart;_SellDelete;_DeliveryEditor;_CouponInputLock;_Park;_Commission;setRole(){this._Retrieve=this.roleService.sell.RetrieveR,this._DateEditor=this.roleService.global.Date,this._NumberEditor=this.roleService.sell.Number,this._PriceVisible=this.roleService.sell.PriceVisible,this._SalesPerson=this.roleService.sell.SalesPerson,this._UnitPriceEditor=this.roleService.sell.UnitPriceEditor,this._PricebookSelector=this.roleService.sell.PricebookSelector,this._Cost=this.roleService.product.Cost,this._Return=this.roleService.sell.Return,this._Discount=this.roleService.sell.Discount,this._PriceMinimum=this.roleService.sell.PriceMinimum,this._Payment=this.roleService.sell.Payment,this._CreditSalesLock=this.roleService.sell.CreditSalesLock,this._CustomerInputLock=this.roleService.sell.CustomerInputLock,this._PaymentCodeLock=this.roleService.sell.PaymentCodeLock,this._Shipping=this.roleService.sell.Shipping,this._Tax=this.roleService.sell.Tax,this._DeleteItem=this.roleService.sell.DeleteItem,this._BundlingPrice=this.roleService.sell.BundlingPrice,this._EmailRestriction=this.roleService.sell.Email,this._SellEditor=this.roleService.sell.Edit,this._ContactCreate=this.roleService.contact.Create,this._PrepaidPackageCreate=this.roleService.prepaidPackage.Create,this._Order=this.roleService.order.View,this._Contacts=this.roleService.contact.View,this._ContactsCreate=this.roleService.contact.Create,this._InventoryView=this.roleService.inventory.View,this._DebtView=this.roleService.debt.View,this._ClearCart=this.roleService.sell.DeleteItem,this._SellDelete=this.roleService.sell.Delete,this._DeliveryEditor=this.roleService.logistic.Edit,this._Reprint=this.roleService.order.Print,this._CouponInputLock=this.roleService.sell.CouponInputLock,this._Park=this.roleService.sell.Park,this._Commission=this.roleService.product.CommissionView}get Park(){return this._Park}get CouponInputLock(){return this._CouponInputLock}set CouponInputLock(e){this._CouponInputLock=e}get Retrieve(){return this._Retrieve}get DateEditor(){return this._DateEditor}set DateEditor(e){this._DateEditor=e}get NumberEditor(){return this._NumberEditor}set NumberEditor(e){this._NumberEditor=e}get PriceVisible(){return this._PriceVisible}get UnitPriceEditor(){return this._UnitPriceEditor}set UnitPriceEditor(e){this._UnitPriceEditor=e}get PricebookSelector(){return this._PricebookSelector}set PricebookSelector(e){this._PricebookSelector=e}get Cost(){return this._Cost}get Return(){return this._Return}set Return(e){this._Return=e}get Discount(){return this._Discount}set Discount(e){this._Discount=e}get SalesPerson(){return this._SalesPerson}get PriceMinimum(){return this._PriceMinimum}get Payment(){return this._Payment}get CreditSalesLock(){return this._CreditSalesLock}get CustomerInputLock(){return this._CustomerInputLock}get PaymentCodeLock(){return this._PaymentCodeLock}get Shipping(){return this._Shipping}get Tax(){return this._Tax}set Tax(e){this._Tax=e}get DeleteItem(){return this._DeleteItem}set DeleteItem(e){this._DeleteItem=e}get BundlingPrice(){return this._BundlingPrice}get Email(){return this._EmailRestriction}get ParkedDeletionAuthorized(){return this._ParkedDeletionAuthorized}set ParkedDeletionAuthorized(e){this._ParkedDeletionAuthorized=e}get SellEditor(){return this._SellEditor}get PrepaidPackageCreate(){return this._PrepaidPackageCreate}get Order(){return this._Order}get Reprint(){return this._Reprint}get Contacts(){return this._Contacts}get ContactsCreate(){return this._ContactsCreate}get InventoryView(){return this._InventoryView}get DebtView(){return this._DebtView}get ClearCartRestriction(){return this._ClearCart}get SellDelete(){return this._SellDelete}get DeliveryEditor(){return this._DeliveryEditor}get Commission(){return this._Commission}};var Yt=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var Ti=class{Type;Amount;Notification;ApplyToProduct;Requirement};var G=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let e=0;for(let t of this.CartItems)e+=t.Quantity;return e}constructor(){this.Order=new Dn,this.Invoice=new $t,this.Shipping=new On,this.Action=new Yt,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let e=0;return this.Payments.forEach(t=>{e+=t.PaidAmount}),e}get RedeemableAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID!=1);return this.GetAmountByCart(e)}get TotalQuantity(){let e=0;return this.CartItems.forEach(t=>{t.PromotionGift||(e+=t.Quantity)}),e}get CashOnlyAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID==1);return this.GetAmountByCart(e)}get PointOnlyAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID==2);return this.GetAmountByCart(e)}get PrepaidPackageItem(){return this.CartItems.filter(t=>t.Variant.TypeID==10)}GetAmountByCart(e){let t=0;return e.forEach(i=>{t+=i.Total}),t=t*(100-this.Order.Discount)/100,t=t*(100-this.Order.Discount2)/100,t}getRewards(){return this.CartItems.filter(t=>t.PromotionGift)}};Ze([tt(()=>Dn)],G.prototype,"Order",2),Ze([tt(()=>$t)],G.prototype,"Invoice",2),Ze([tt(()=>On)],G.prototype,"Shipping",2),Ze([tt(()=>Yt)],G.prototype,"Action",2),Ze([tt(()=>Ke)],G.prototype,"Payments",2),Ze([tt(()=>Oi)],G.prototype,"Items",2),Ze([tt(()=>xe)],G.prototype,"CartItems",2),Ze([tt(()=>Ti)],G.prototype,"Promotion",2);var Ei=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var xt=class n{constructor(e,t,i,o){this.httpService=e;this._localDataService=t;this._onlineStatusService=i;this._toastrService=o;this._onlineStatusService.getOnlineStatus$().subscribe(r=>{this.isOnline=r})}_Data=new be(null);Data$=this._Data.pipe(Fe(),ce(e=>e!==null));isOnline;get Data(){return this._Data.value}pushNewValue(e){this._Data.next(e)}getSalesOrderPrint(e){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:e})}submitOrder(e,t){let i=this.generatePOSDataForSubmission(e,this.isOnline);if(this.isOnline)return this.submitOnline(i).pipe(this.handleTimeOutError(i));if(t.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(i).pipe(J(()=>this.generateCompleteData(i)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(e){return this._localDataService.uploadSingleOrder(e).pipe(nt(t=>t?.message?.includes("objectStore does not exists")?this.submitOnline(e):ft(()=>t)))}submitOnline(e){return this.httpService.post(U.SubmitOrder,e,Zn.pos.submitOrderTimeout)}handleTimeOutError(e){return oi(nt(t=>{if(t instanceof ai||t?.name=="TimeoutError"){let i=this.generateCompleteData(e);this.pushNewValue(i)}throw t}))}generatePOSDataForSubmission(e,t=!0){let i=Object.assign(new G,e);i.Items=[],i.Order.CustomerID==null&&(i.Order.CustomerID=f.GuidEmpty),i.Order.SalesID==null&&(i.Order.SalesID=f.GuidEmpty);let o=1;i.Payments=i.Payments.map(c=>(c.Date=i.Order.Date,c.Index=o,o++,delete c.TypeID,c));let r=1;for(let c of i.CartItems){let u=new Oi;u.ID=c.ID,u.VariantID=c.VariantID,u.Quantity=c.Quantity,u.Cost=c.Cost,u.Price=c.Price,u.Discount=c.Discount,u.DiscountAmount=c.DiscountAmount,u.Note=c.Note,u.Taxable=c.Variant.Taxable,u.LoyaltyPoint=c.LoyaltyPoint,u.UnitCost=c.Cost,u.UnitPrice=c.Price,u.UnitPriceOriginal=c.UnitPriceOriginal,u.UnitExpense=c.UnitExpense,u.EntityID=c.EntityID,u.Index=r,u.UnitQuantity=c.UnitQuantity,u.PriceTypeID=c.PriceTypeID,u.PriceNote=c.PriceNote,u.Splited=c.SplitQuantity>0,u.SplitQuantity=c.SplitQuantity,u.InventoryTypeID=c.Variant.TypeID,u.SalesID="",u.Serial=c.Serial,c.SalesID&&(u.SalesID=c.SalesID),delete c.CouponDiscount,i.Items.push(u),r++}return t?(delete i.CartItems,delete i.Order.ClientTimestamp):i.Order.ClientTimestamp=new Date,i}generateCompleteData(e){let t=new Ei;return t.InvoiceNumber=e.Order.Number,t.OrderTimeString=new Date().toString(),t.PaymentStateID=e.Action?.Type,t.PaymentStateLabel="Offline",t.Success=!0,t.OutDeliveryID=e.Action.DeliveryEntityID,t}GetReturnInvoice(e,t){return this.httpService.get(U.ReturInvoice,[{key:"EntityID",value:t},{key:"Number",value:e}])}GetInvoiceBySoID(e){return this.httpService.get(U.GetPOSDataByID,[{key:"ID",value:e}])}UploadCSV(e,t){let i={CartItems:e,EntityID:t};return this.httpService.post(U.UploadCsv,i)}sendEmail(e,t){return new Promise((i,o)=>{this._localDataService.isProductFromServer().subscribe(r=>{if(r){let c={invoiceID:t,email:e};this.httpService.post(U.SendInvoiceEmail,c).subscribe({next:u=>{i(u)},error:u=>{o(u)}})}else o(oe.wrongOfflineAction)})})}sendWhatsaap(e,t){let i={InvoiceID:e,PhoneNumber:t};return this.httpService.post(U.SendInvoiceWhatsapp,i)}createCustomerByInvoice(e,t){let i={InvoiceID:e,Mobile:t};return this.httpService.post(U.CreateCustomerInvoice,i)}saveCommission(e,t){let i={SOID:e,commission:t};return this.httpService.POSText("/API/Transaction/SetCommission",i)}generateReceiptA4(e){let t={ID:e};return this.httpService.post(U.InvoiceA4,t)}getVacant(e){return this.httpService.get(U.GetVacant,[{key:"EntityID",value:e}])}static \u0275fac=function(t){return new(t||n)(g(ge),g(Oe),g(he),g(L))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var Zt=(r=>(r[r.cash=1]="cash",r[r.card=2]="card",r[r.emoney=3]="emoney",r[r.other=4]="other",r[r.ECR=99]="ECR",r))(Zt||{});var B=class n{constructor(e,t,i){this._OrderHttpService=e;this._customerHttpService=t;this._toastrService=i}_Data=new be(new G);transaction_id;Data$=this._Data.asObservable();get Data(){return this._Data.value}pushNewValue(e){if(e)this._Data.next(e);else{let t=this.Data;this._Data.next(t)}}submitOrder(e){return new Promise((t,i)=>{this.checkTransactionId(),this._OrderHttpService.submitOrder(this.Data,e).subscribe({next:o=>{t(o)},error:o=>{this.Data.Items=[],i(o)}})})}uploadOfflineOrder(){return this.checkTransactionId(),this._OrderHttpService.uploadOfflineOrder(this.Data)}checkTransactionId(){let t=this.Data.Payments.find(i=>i.TypeID==3);f.IsNotEmpty(t)&&f.IsEmpty(this.transaction_id)&&this._toastrService.warning("Midtrans transaction_id is empty. Please verify manually!","Mobile Payment Failure")}updateCustomerID(e){return this.Data.Order.CustomerID=e,this.pushNewValue(this.Data),new Promise((t,i)=>{this._customerHttpService.GetPrivilegeByID(e,this.Data.Order.EntityID).subscribe({next:o=>{this._customerHttpService.Data=o,this.pushNewValue(this.Data),t(o)},error:o=>{this.Data.Order.CustomerID=null,this.Data.ContactName=null;let r=o.error?.Message;o.status==409?this._toastrService.warning(r,"Warning"):this._toastrService.error(r,`API Error - ${o.status}`),i(o)}})})}static \u0275fac=function(t){return new(t||n)(g(xt),g(Re),g(L))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var z=class n{constructor(e,t,i){this._localDataService=e;this._onlineStatusService=t;this._httpService=i;this._onlineStatusService.getOnlineStatus$().subscribe(o=>{this.isOnline=o})}_Data=new be(null);Data$=this._Data.asObservable().pipe(ce(e=>e!==null),Fe());isOnline;get Data(){return this._Data.value}pushNewValue(e){this._Data.next(e)}requestObservable(){return this.isOnline?this._httpService.get(U.GetPOSStorage).pipe(J(e=>({data:e,type:"Online"}))):this._localDataService.getPOSStorage().pipe(ce(e=>e!=null),J(e=>({data:e,type:"Offline"})))}getOutletName(e){return this.Data.Entities.find(i=>i.ID==e)?.Name}static \u0275fac=function(t){return new(t||n)(g(Oe),g(he),g(ge))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var De=class n{constructor(e){this.roleService=e;this.pushNewValue(new We(e))}_Data=new be(new We(null));get Data(){return this._Data.value}Data$=this._Data.asObservable();pushNewValue(e){this._Data.next(e)}static \u0275fac=function(t){return new(t||n)(g(_i))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var ei=class{ID;Code;EntityID;Name;Description;Start;StartDisplay;State;Open;CashierID;OpeningCash;EntityName;LoginID;Active;CustomerDisplayEnabled;OvoConfigurationID;CustomerDisplayID;ListImage;Suspended};var wi=class n{odsConfigType=R(0);setODSConfig(e){this.odsConfigType.set(e)}isEnabled(){return this.odsConfigType()>0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var sr=n=>({active:n}),lr=n=>({gray:n});function cr(n,e){if(n&1){let t=E();a(0,"span",15),S("click",function(o){v(t);let r=d().$implicit;return d().closeRegister(r),_(o.stopPropagation())}),s()}}function mr(n,e){n&1&&(a(0,"div")(1,"span",16),m(2,"VACANT"),s()())}function dr(n,e){if(n&1&&(a(0,"div")(1,"span",17),b(2,"i",18),a(3,"span",19),m(4),s()(),a(5,"span",20),b(6,"i",21),a(7,"span",19),m(8),s()()()),n&2){let t=d().$implicit;l(4),O(t.LoginID),l(4),M("",t.StartDisplay.split(" ")[3]," - Now")}}function pr(n,e){if(n&1){let t=E();a(0,"div",8)(1,"div",9)(2,"div",10)(3,"h5",11),S("click",function(){let o=v(t).$implicit,r=d();return _(r.select(o))}),a(4,"span"),b(5,"i",12),m(6),y(7,"limitTo"),s(),h(8,cr,1,0,"span",13),s(),a(9,"div",14),S("click",function(){let o=v(t).$implicit,r=d();return _(r.select(o))}),h(10,mr,3,0,"div")(11,dr,9,2,"div"),s()()()()}if(n&2){let t,i=e.$implicit,o=d();l(),p("ngClass",i.Active?"active":""),l(),p("ngClass",Q(9,sr,(i==null?null:i.ID)==(o.selectedRegister==null?null:o.selectedRegister.ID))),l(),p("ngClass",Q(11,lr,i!=o.selectedRegister)),l(3),O(X(7,6,i.Name,15)),l(2),C(i.State!="Close"?8:-1),l(2),C((t=i.State)==="Close"?10:t==="Open"?11:-1)}}var Ri=class n{constructor(e,t,i,o,r,c,u){this._dialogRef=e;this._outletService=t;this._posService=i;this._userRoleService=o;this.router=r;this.httpService=c;this._odsService=u}originalSelectedRegister=null;registers;searchInput="";selectedRegister=new ei;modalConfig=new ie;role;get AppConfigJSON(){return this._posService.Data.AppConfigJSON}destroy$=new Me;ngOnInit(){this.subscribeToObsChanges(),this.initModalConfig()}subscribeToObsChanges(){this._posService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.registers=e.Registers}),this._outletService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.selectedRegister=this.findOutletRegisterById(e.RegisterID),this.originalSelectedRegister=this.selectedRegister?ii({},this.selectedRegister):null}),this._userRoleService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.role=e})}findOutletRegisterById(e){let t=this.registers.find(i=>i.ID===e);return t||new ei}initModalConfig(){this.modalConfig.hideFooter=!0,this.modalConfig.hideScrollbar=!0,this.modalConfig.title="Choose an outlet"}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onClose(){this._dialogRef.close()}select(e){if(this.AppConfigJSON.ModuleShift.Closure.Enabled)if(this.selectedRegister.ID!=null&&this.selectedRegister.Open&&e.CashierID==null)confirm("You already have an active register with "+this.selectedRegister.Name+`!
|
|
1
|
+
import{a as xo}from"./chunk-YXCPHYC5.js";import{a as Jt,b as zt}from"./chunk-JFLT7NX3.js";import{a as Bo}from"./chunk-NFWYR26Q.js";import{a as Di}from"./chunk-GGDW5WFA.js";import{e as wo}from"./chunk-U56LRRCE.js";import{b as ko}from"./chunk-6XNP4ZXB.js";import{d as Ao}from"./chunk-5PDQ5UNO.js";import{a as No}from"./chunk-O22HDFH6.js";import{a as Io}from"./chunk-SCAKRK4B.js";import{a as he,b as Re,e as Lo}from"./chunk-HAXEFEKW.js";import{b as Eo}from"./chunk-6G7LPAEQ.js";import{a as Do,b as Vo,c as Fo}from"./chunk-VRKJC53Z.js";import{a as Mo}from"./chunk-NJ4KEQKH.js";import{a as jo}from"./chunk-27OXTS7Y.js";import{c as Dn,d as Oo}from"./chunk-7BVPHIEF.js";import{a as lo}from"./chunk-PNFJVQUF.js";import{a as Mt}from"./chunk-25H27N7N.js";import{a as To}from"./chunk-4L4MSVOU.js";import{a as Mi,b as xi,c as Ii}from"./chunk-6WMEGLEF.js";import{a as Ro}from"./chunk-WFVMID6Q.js";import{a as Ho}from"./chunk-FINTUPRM.js";import{a as Ke}from"./chunk-J6U6UYNI.js";import{a as tt,b as dt,c as de}from"./chunk-NSNUUKNK.js";import{a as Oi,b as xe}from"./chunk-EN2Y56CS.js";import{a as Pn,b as $t,c as On}from"./chunk-PXDS3HXW.js";import{b as Po}from"./chunk-PSFQWURP.js";import{a as So}from"./chunk-3XH2STFE.js";import{g as bo}from"./chunk-P3TFDLWR.js";import{d as Pi}from"./chunk-AHTR7XKG.js";import{p as mo}from"./chunk-JQDS4BXR.js";import{d as co}from"./chunk-AJAUI7BA.js";import{a as go,c as Ot}from"./chunk-FM7BHGBW.js";import{g as po}from"./chunk-TP6ZUC53.js";import{B as _o,C as oe,D as Oe,G as yo,u as ie,v as ne,w as Pt}from"./chunk-3ZH3XK5V.js";import{b as yi,c as qt}from"./chunk-V6D6TV7B.js";import{F as Dt,N as Si,O as U,g as fo,n as bi,o as ho,q as Co,t as vo}from"./chunk-QWLNF7VL.js";import{a as rt}from"./chunk-UIVJ2JQT.js";import{a as fi,c as hi}from"./chunk-EQLHPWVB.js";import{d as St,e as uo}from"./chunk-SCGKVOSE.js";import{a as ee,b as so,e as te,f as fe,g as we}from"./chunk-N5RDRDT7.js";import{a as me}from"./chunk-2FWFPV5I.js";import{A as ro,B as ao,F as vi,c as Te,e as Ci,h as Pe,i as Xn,k as eo,l as et,n as to,o as Ee,p as io,s as bt,x as no,y as oo}from"./chunk-7MRUPBXU.js";import{b as _i}from"./chunk-KBLVOO4J.js";import{a as f}from"./chunk-WUV22SZ4.js";import{a as Zn}from"./chunk-H6RHVRGW.js";import{p as L,s as ge}from"./chunk-TANYEHMZ.js";import{$ as si,$b as Ut,Ab as h,Ac as Q,Bb as Sn,Bc as Ue,Ca as R,Cb as C,Db as ot,Dc as jn,E as ce,Eb as ve,Fb as K,Gb as Z,Hb as p,Hc as y,I as nt,Ib as a,Ic as x,Id as $n,Jb as s,Jc as X,Kb as b,Kc as _t,Lb as N,M as ht,Mb as k,Md as Jn,N as Qe,Nb as Xe,Nc as Qn,Ob as Ct,Pb as vt,Q as Fe,Qa as Je,Qb as di,Qc as se,Rb as E,Rd as zn,Sa as mt,Sb as Fn,Sd as Yn,Ta as Vn,Ub as S,Uc as yt,Ud as Kn,Vb as Ln,Vc as Gt,Wb as d,Xa as l,Y as Le,Zc as gi,_b as Qt,aa as Y,ac as Wt,b as oi,d as Me,da as Ie,e as be,eb as P,ec as ue,fa as le,fc as Bn,ib as A,ic as pi,id as Be,jb as ci,jc as m,k as gt,kc as O,kd as Un,la as I,lc as M,ld as Wn,ma as li,mc as ui,n as An,nc as Hn,o as ke,oa as g,ob as $,oc as H,od as Gn,p as ft,pa as T,pc as V,pd as qn,q as ri,qc as j,qd as ze,r as ai,sd as Ye,t as J,ta as v,u as $e,ua as _,ud as q,v as kn,wb as mi,xd as Se}from"./chunk-L3U6V3BF.js";import{a as ii,i as Ze,k as ni}from"./chunk-SNAKHGZS.js";var We=class{constructor(e){this.roleService=e;e&&this.setRole()}_Retrieve;_DateEditor;_NumberEditor;_PriceVisible;_UnitPriceEditor;_PricebookSelector;_Cost;_Return;_Discount;_SalesPerson;_PriceMinimum;_Payment;_CreditSalesLock;_CustomerInputLock;_PaymentCodeLock;_Shipping;_Tax;_DeleteItem;_BundlingPrice;_EmailRestriction;_ParkedDeletionAuthorized;_SellEditor;_ContactCreate;_PrepaidPackageCreate;_Order;_Reprint;_Contacts;_ContactsCreate;_InventoryView;_DebtView;_ClearCart;_SellDelete;_DeliveryEditor;_CouponInputLock;_Park;_Commission;setRole(){this._Retrieve=this.roleService.sell.RetrieveR,this._DateEditor=this.roleService.global.Date,this._NumberEditor=this.roleService.sell.Number,this._PriceVisible=this.roleService.sell.PriceVisible,this._SalesPerson=this.roleService.sell.SalesPerson,this._UnitPriceEditor=this.roleService.sell.UnitPriceEditor,this._PricebookSelector=this.roleService.sell.PricebookSelector,this._Cost=this.roleService.product.Cost,this._Return=this.roleService.sell.Return,this._Discount=this.roleService.sell.Discount,this._PriceMinimum=this.roleService.sell.PriceMinimum,this._Payment=this.roleService.sell.Payment,this._CreditSalesLock=this.roleService.sell.CreditSalesLock,this._CustomerInputLock=this.roleService.sell.CustomerInputLock,this._PaymentCodeLock=this.roleService.sell.PaymentCodeLock,this._Shipping=this.roleService.sell.Shipping,this._Tax=this.roleService.sell.Tax,this._DeleteItem=this.roleService.sell.DeleteItem,this._BundlingPrice=this.roleService.sell.BundlingPrice,this._EmailRestriction=this.roleService.sell.Email,this._SellEditor=this.roleService.sell.Edit,this._ContactCreate=this.roleService.contact.Create,this._PrepaidPackageCreate=this.roleService.prepaidPackage.Create,this._Order=this.roleService.order.View,this._Contacts=this.roleService.contact.View,this._ContactsCreate=this.roleService.contact.Create,this._InventoryView=this.roleService.inventory.View,this._DebtView=this.roleService.debt.View,this._ClearCart=this.roleService.sell.DeleteItem,this._SellDelete=this.roleService.sell.Delete,this._DeliveryEditor=this.roleService.logistic.Edit,this._Reprint=this.roleService.order.Print,this._CouponInputLock=this.roleService.sell.CouponInputLock,this._Park=this.roleService.sell.Park,this._Commission=this.roleService.product.CommissionView}get Park(){return this._Park}get CouponInputLock(){return this._CouponInputLock}set CouponInputLock(e){this._CouponInputLock=e}get Retrieve(){return this._Retrieve}get DateEditor(){return this._DateEditor}set DateEditor(e){this._DateEditor=e}get NumberEditor(){return this._NumberEditor}set NumberEditor(e){this._NumberEditor=e}get PriceVisible(){return this._PriceVisible}get UnitPriceEditor(){return this._UnitPriceEditor}set UnitPriceEditor(e){this._UnitPriceEditor=e}get PricebookSelector(){return this._PricebookSelector}set PricebookSelector(e){this._PricebookSelector=e}get Cost(){return this._Cost}get Return(){return this._Return}set Return(e){this._Return=e}get Discount(){return this._Discount}set Discount(e){this._Discount=e}get SalesPerson(){return this._SalesPerson}get PriceMinimum(){return this._PriceMinimum}get Payment(){return this._Payment}get CreditSalesLock(){return this._CreditSalesLock}get CustomerInputLock(){return this._CustomerInputLock}get PaymentCodeLock(){return this._PaymentCodeLock}get Shipping(){return this._Shipping}get Tax(){return this._Tax}set Tax(e){this._Tax=e}get DeleteItem(){return this._DeleteItem}set DeleteItem(e){this._DeleteItem=e}get BundlingPrice(){return this._BundlingPrice}get Email(){return this._EmailRestriction}get ParkedDeletionAuthorized(){return this._ParkedDeletionAuthorized}set ParkedDeletionAuthorized(e){this._ParkedDeletionAuthorized=e}get SellEditor(){return this._SellEditor}get PrepaidPackageCreate(){return this._PrepaidPackageCreate}get Order(){return this._Order}get Reprint(){return this._Reprint}get Contacts(){return this._Contacts}get ContactsCreate(){return this._ContactsCreate}get InventoryView(){return this._InventoryView}get DebtView(){return this._DebtView}get ClearCartRestriction(){return this._ClearCart}get SellDelete(){return this._SellDelete}get DeliveryEditor(){return this._DeliveryEditor}get Commission(){return this._Commission}};var Yt=class{DeliveryEntityID;Type;NewOrderID;constructor(){this.DeliveryEntityID="",this.Type=3}};var Ti=class{Type;Amount;Notification;ApplyToProduct;Requirement};var G=class{Order;Invoice;Shipping;Action;Payments;Items;CartItems;Promotion;ContactName;SplitParkLabel;get cartQuantity(){let e=0;for(let t of this.CartItems)e+=t.Quantity;return e}constructor(){this.Order=new Dn,this.Invoice=new $t,this.Shipping=new On,this.Action=new Yt,this.Payments=Array(),this.Items=Array(),this.CartItems=Array(),this.ContactName=""}get TotalPaidAmount(){let e=0;return this.Payments.forEach(t=>{e+=t.PaidAmount}),e}get RedeemableAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID!=1);return this.GetAmountByCart(e)}get TotalQuantity(){let e=0;return this.CartItems.forEach(t=>{t.PromotionGift||(e+=t.Quantity)}),e}get CashOnlyAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID==1);return this.GetAmountByCart(e)}get PointOnlyAmount(){let e=this.CartItems.filter(t=>t.Variant.PaymentTypeID==2);return this.GetAmountByCart(e)}get PrepaidPackageItem(){return this.CartItems.filter(t=>t.Variant.TypeID==10)}GetAmountByCart(e){let t=0;return e.forEach(i=>{t+=i.Total}),t=t*(100-this.Order.Discount)/100,t=t*(100-this.Order.Discount2)/100,t}getRewards(){return this.CartItems.filter(t=>t.PromotionGift)}};Ze([tt(()=>Dn)],G.prototype,"Order",2),Ze([tt(()=>$t)],G.prototype,"Invoice",2),Ze([tt(()=>On)],G.prototype,"Shipping",2),Ze([tt(()=>Yt)],G.prototype,"Action",2),Ze([tt(()=>Ke)],G.prototype,"Payments",2),Ze([tt(()=>Oi)],G.prototype,"Items",2),Ze([tt(()=>xe)],G.prototype,"CartItems",2),Ze([tt(()=>Ti)],G.prototype,"Promotion",2);var Ei=class{Success;Message;message;ObjectID;SalesOrderID;OutDeliveryID;Contact;LoyaltyPoint;InvoiceNumber;Creator;OrderTimeString;PrintMode;PaymentStateID;PaymentStateLabel;Final;InvoiceNumberResult;constructor(){this.Success=!0,this.Message="",this.ObjectID="",this.SalesOrderID="",this.OutDeliveryID="",this.Contact=null,this.LoyaltyPoint="",this.InvoiceNumber="",this.Creator="",this.OrderTimeString="",this.PrintMode=0,this.PaymentStateID=0,this.PaymentStateLabel="",this.Final=0}};var xt=class n{constructor(e,t,i,o){this.httpService=e;this._localDataService=t;this._onlineStatusService=i;this._toastrService=o;this._onlineStatusService.getOnlineStatus$().subscribe(r=>{this.isOnline=r})}_Data=new be(null);Data$=this._Data.pipe(Fe(),ce(e=>e!==null));isOnline;get Data(){return this._Data.value}pushNewValue(e){this._Data.next(e)}getSalesOrderPrint(e){return this.httpService.post("/API/POS/GetSalesOrderPrint",{TemplateID:e})}submitOrder(e,t){let i=this.generatePOSDataForSubmission(e,this.isOnline);if(this.isOnline)return this.submitOnline(i).pipe(this.handleTimeOutError(i));if(t.ModuleSell.EnableOfflineTransaction)return this._localDataService.syncOrder(i).pipe(J(()=>this.generateCompleteData(i)));this._toastrService.warning("Offline order is not Supported!","Info!")}uploadOfflineOrder(e){return this._localDataService.uploadSingleOrder(e).pipe(nt(t=>t?.message?.includes("objectStore does not exists")?this.submitOnline(e):ft(()=>t)))}submitOnline(e){return this.httpService.post(U.SubmitOrder,e,Zn.pos.submitOrderTimeout)}handleTimeOutError(e){return oi(nt(t=>{if(t instanceof ai||t?.name=="TimeoutError"){let i=this.generateCompleteData(e);this.pushNewValue(i)}throw t}))}generatePOSDataForSubmission(e,t=!0){let i=Object.assign(new G,e);i.Items=[],i.Order.CustomerID==null&&(i.Order.CustomerID=f.GuidEmpty),i.Order.SalesID==null&&(i.Order.SalesID=f.GuidEmpty);let o=1;i.Payments=i.Payments.map(c=>(c.Date=i.Order.Date,c.Index=o,o++,delete c.TypeID,c));let r=1;for(let c of i.CartItems){let u=new Oi;u.ID=c.ID,u.VariantID=c.VariantID,u.Quantity=c.Quantity,u.Cost=c.Cost,u.Price=c.Price,u.Discount=c.Discount,u.DiscountAmount=c.DiscountAmount,u.Note=c.Note,u.Taxable=c.Variant.Taxable,u.LoyaltyPoint=c.LoyaltyPoint,u.UnitCost=c.Cost,u.UnitPrice=c.Price,u.UnitPriceOriginal=c.UnitPriceOriginal,u.UnitExpense=c.UnitExpense,u.EntityID=c.EntityID,u.Index=r,u.UnitQuantity=c.UnitQuantity,u.PriceTypeID=c.PriceTypeID,u.PriceNote=c.PriceNote,u.Splited=c.SplitQuantity>0,u.SplitQuantity=c.SplitQuantity,u.InventoryTypeID=c.Variant.TypeID,u.SalesID="",u.Serial=c.Serial,c.SalesID&&(u.SalesID=c.SalesID),delete c.CouponDiscount,i.Items.push(u),r++}return t?(delete i.CartItems,delete i.Order.ClientTimestamp):i.Order.ClientTimestamp=new Date,i}generateCompleteData(e){let t=new Ei;return t.InvoiceNumber=e.Order.Number,t.OrderTimeString=new Date().toString(),t.PaymentStateID=e.Action?.Type,t.PaymentStateLabel="Offline",t.Success=!0,t.OutDeliveryID=e.Action.DeliveryEntityID,t}GetReturnInvoice(e,t){return this.httpService.get(U.ReturInvoice,[{key:"EntityID",value:t},{key:"Number",value:e}])}GetInvoiceBySoID(e){return this.httpService.get(U.GetPOSDataByID,[{key:"ID",value:e}])}UploadCSV(e,t){let i={CartItems:e,EntityID:t};return this.httpService.post(U.UploadCsv,i)}sendEmail(e,t){return new Promise((i,o)=>{this._localDataService.isProductFromServer().subscribe(r=>{if(r){let c={invoiceID:t,email:e};this.httpService.post(U.SendInvoiceEmail,c).subscribe({next:u=>{i(u)},error:u=>{o(u)}})}else o(oe.wrongOfflineAction)})})}sendWhatsaap(e,t){let i={InvoiceID:e,PhoneNumber:t};return this.httpService.post(U.SendInvoiceWhatsapp,i)}createCustomerByInvoice(e,t){let i={InvoiceID:e,Mobile:t};return this.httpService.post(U.CreateCustomerInvoice,i)}saveCommission(e,t){let i={SOID:e,commission:t};return this.httpService.POSText("/API/Transaction/SetCommission",i)}generateReceiptA4(e){let t={ID:e};return this.httpService.post(U.InvoiceA4,t)}getVacant(e){return this.httpService.get(U.GetVacant,[{key:"EntityID",value:e}])}static \u0275fac=function(t){return new(t||n)(g(ge),g(Oe),g(he),g(L))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var Zt=(r=>(r[r.cash=1]="cash",r[r.card=2]="card",r[r.emoney=3]="emoney",r[r.other=4]="other",r[r.ECR=99]="ECR",r))(Zt||{});var B=class n{constructor(e,t,i){this._OrderHttpService=e;this._customerHttpService=t;this._toastrService=i}_Data=new be(new G);transaction_id;Data$=this._Data.asObservable();get Data(){return this._Data.value}pushNewValue(e){if(e)this._Data.next(e);else{let t=this.Data;this._Data.next(t)}}submitOrder(e){return new Promise((t,i)=>{this.checkTransactionId(),this._OrderHttpService.submitOrder(this.Data,e).subscribe({next:o=>{t(o)},error:o=>{this.Data.Items=[],i(o)}})})}uploadOfflineOrder(){return this.checkTransactionId(),this._OrderHttpService.uploadOfflineOrder(this.Data)}checkTransactionId(){let t=this.Data.Payments.find(i=>i.TypeID==3);f.IsNotEmpty(t)&&f.IsEmpty(this.transaction_id)&&this._toastrService.warning("Midtrans transaction_id is empty. Please verify manually!","Mobile Payment Failure")}updateCustomerID(e){return this.Data.Order.CustomerID=e,this.pushNewValue(this.Data),new Promise((t,i)=>{this._customerHttpService.GetPrivilegeByID(e,this.Data.Order.EntityID).subscribe({next:o=>{this._customerHttpService.Data=o,this.pushNewValue(this.Data),t(o)},error:o=>{this.Data.Order.CustomerID=null,this.Data.ContactName=null;let r=o.error?.Message;o.status==409?this._toastrService.warning(r,"Warning"):this._toastrService.error(r,`API Error - ${o.status}`),i(o)}})})}static \u0275fac=function(t){return new(t||n)(g(xt),g(Re),g(L))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var z=class n{constructor(e,t,i){this._localDataService=e;this._onlineStatusService=t;this._httpService=i;this._onlineStatusService.getOnlineStatus$().subscribe(o=>{this.isOnline=o})}_Data=new be(null);Data$=this._Data.asObservable().pipe(ce(e=>e!==null),Fe());isOnline;get Data(){return this._Data.value}pushNewValue(e){this._Data.next(e)}requestObservable(){return this.isOnline?this._httpService.get(U.GetPOSStorage).pipe(J(e=>({data:e,type:"Online"}))):this._localDataService.getPOSStorage().pipe(ce(e=>e!=null),J(e=>({data:e,type:"Offline"})))}getOutletName(e){return this.Data.Entities.find(i=>i.ID==e)?.Name}static \u0275fac=function(t){return new(t||n)(g(Oe),g(he),g(ge))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var De=class n{constructor(e){this.roleService=e;this.pushNewValue(new We(e))}_Data=new be(new We(null));get Data(){return this._Data.value}Data$=this._Data.asObservable();pushNewValue(e){this._Data.next(e)}static \u0275fac=function(t){return new(t||n)(g(_i))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var ei=class{ID;Code;EntityID;Name;Description;Start;StartDisplay;State;Open;CashierID;OpeningCash;EntityName;LoginID;Active;CustomerDisplayEnabled;OvoConfigurationID;CustomerDisplayID;ListImage;Suspended};var wi=class n{odsConfigType=R(0);setODSConfig(e){this.odsConfigType.set(e)}isEnabled(){return this.odsConfigType()>0}static \u0275fac=function(t){return new(t||n)};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var sr=n=>({active:n}),lr=n=>({gray:n});function cr(n,e){if(n&1){let t=E();a(0,"span",15),S("click",function(o){v(t);let r=d().$implicit;return d().closeRegister(r),_(o.stopPropagation())}),s()}}function mr(n,e){n&1&&(a(0,"div")(1,"span",16),m(2,"VACANT"),s()())}function dr(n,e){if(n&1&&(a(0,"div")(1,"span",17),b(2,"i",18),a(3,"span",19),m(4),s()(),a(5,"span",20),b(6,"i",21),a(7,"span",19),m(8),s()()()),n&2){let t=d().$implicit;l(4),O(t.LoginID),l(4),M("",t.StartDisplay.split(" ")[3]," - Now")}}function pr(n,e){if(n&1){let t=E();a(0,"div",8)(1,"div",9)(2,"div",10)(3,"h5",11),S("click",function(){let o=v(t).$implicit,r=d();return _(r.select(o))}),a(4,"span"),b(5,"i",12),m(6),y(7,"limitTo"),s(),h(8,cr,1,0,"span",13),s(),a(9,"div",14),S("click",function(){let o=v(t).$implicit,r=d();return _(r.select(o))}),h(10,mr,3,0,"div")(11,dr,9,2,"div"),s()()()()}if(n&2){let t,i=e.$implicit,o=d();l(),p("ngClass",i.Active?"active":""),l(),p("ngClass",Q(9,sr,(i==null?null:i.ID)==(o.selectedRegister==null?null:o.selectedRegister.ID))),l(),p("ngClass",Q(11,lr,i!=o.selectedRegister)),l(3),O(X(7,6,i.Name,15)),l(2),C(i.State!="Close"?8:-1),l(2),C((t=i.State)==="Close"?10:t==="Open"?11:-1)}}var Ri=class n{constructor(e,t,i,o,r,c,u){this._dialogRef=e;this._outletService=t;this._posService=i;this._userRoleService=o;this.router=r;this.httpService=c;this._odsService=u}originalSelectedRegister=null;registers;searchInput="";selectedRegister=new ei;modalConfig=new ie;role;get AppConfigJSON(){return this._posService.Data.AppConfigJSON}destroy$=new Me;ngOnInit(){this.subscribeToObsChanges(),this.initModalConfig()}subscribeToObsChanges(){this._posService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.registers=e.Registers}),this._outletService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.selectedRegister=this.findOutletRegisterById(e.RegisterID),this.originalSelectedRegister=this.selectedRegister?ii({},this.selectedRegister):null}),this._userRoleService.Data$.pipe(Ie(this.destroy$)).subscribe(e=>{this.role=e})}findOutletRegisterById(e){let t=this.registers.find(i=>i.ID===e);return t||new ei}initModalConfig(){this.modalConfig.hideFooter=!0,this.modalConfig.hideScrollbar=!0,this.modalConfig.title="Choose an outlet"}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}onClose(){this._dialogRef.close()}select(e){if(this.AppConfigJSON.ModuleShift.Closure.Enabled)if(this.selectedRegister.ID!=null&&this.selectedRegister.Open&&e.CashierID==null)confirm("You already have an active register with "+this.selectedRegister.Name+`!
|
|
2
2
|
Do you want to end your session?`)&&(this.onClose(),this.router.navigate(["menu/Shift/Main/My_Shift"],{queryParams:{RegisterID:e.ID}}));else if(!e.Open||this.selectedRegister.ID==e.ID)this.selectedRegister=e,this.onSubmitSelectedRegister();else{if(this.role.SellEditor==!1){alert("You cannot end shift for Register "+e.Name+" - Unauthorized Access");return}alert("This Register has already active register, Are you sure you want to end this register?"),this.onClose(),this.router.navigate(["/menu/Shift/Main/My_Shift"],{queryParams:{RegisterID:e.ID}})}else this.selectedRegister=e,this.onSubmitSelectedRegister()}onSubmitSelectedRegister(){if(this.selectedRegister.ID==null){alert("Please select a register first!");return}this._outletService.pushNewRegister(this.selectedRegister),this.loadOdsConfig(this.selectedRegister.EntityID),this._dialogRef.close({selectedRegister:this.selectedRegister,openStartingCashDialog:this.selectedRegister.ID!=this.originalSelectedRegister?.ID})}closeRegister(e){let t=this.selectedRegister.ID;if(this.role.SellEditor==!1){alert("You cannot end shift for Register "+e.Name+" - Unauthorized Access");return}t==e.ID?this.router.navigate(["/menu/Shift/Main/My_Shift"]):this.router.navigate(["/menu/Shift/Main/My_Shift"],{queryParams:{RegisterID:e.ID}}),this.onClose()}loadOdsConfig(e){this.httpService.get(`/api/outlet/GetOrderDisplayBroadcastMode?EntityID=${e}`).pipe(le(t=>{this._odsService.setODSConfig(t.form.OrderDisplayBroadcastMode)})).subscribe()}static \u0275fac=function(t){return new(t||n)(P(te),P(re),P(z),P(De),P(zn),P(ge),P(wi))};static \u0275cmp=A({type:n,selectors:[["pos-modal-register"]],standalone:!1,decls:12,vars:6,consts:[[3,"onClose","config"],[1,"ms-0","mb-8","search-container",3,"hidden"],[1,"input-group","mb-3","rounded-start-1"],[1,"input-group-text","txtFilter","rounded-end-0"],["aria-hidden","true",1,"fa","fa-magnifying-glass"],["data-cy","SearchOutlet","type","text","placeholder","Filter by Name","aria-label","Search",1,"txtFilter","form-control","border-start-0","rounded-1","rounded-start-0",3,"ngModelChange","ngModel"],[1,"container","custom-scroll"],[1,"row",2,"width","600px"],["data-cy","registers",1,"col-4"],[1,"card","border-0",3,"ngClass"],[1,"card-body","p-0",3,"ngClass"],[1,"card-title","mb-0",3,"click","ngClass"],[1,"fa-solid","fa-house","pe-1","fs-6"],[1,"fa","fa-xmark-circle","fa-lg","position-absolute",2,"text-shadow","0 1px 0 #afafaf","right","5px","top","16px"],[1,"card-text","px-0","py-2",3,"click"],[1,"fa","fa-xmark-circle","fa-lg","position-absolute",2,"text-shadow","0 1px 0 #afafaf","right","5px","top","16px",3,"click"],[1,"idle"],[1,"cashier"],["aria-hidden","true",1,"fa","fa-user","pe-2"],[1,"d-inline"],[1,"open"],["aria-hidden","true",1,"fa-regular","fa-clock","pe-2"]],template:function(t,i){t&1&&(a(0,"modal-material",0),S("onClose",function(){return i.onClose()}),a(1,"content")(2,"div",1)(3,"div",2)(4,"span",3),b(5,"i",4),s(),a(6,"input",5),j("ngModelChange",function(r){return V(i.searchInput,r)||(i.searchInput=r),r}),s()()(),a(7,"div",6)(8,"div",7),K(9,pr,12,13,"div",8,ve),y(11,"FilterByName"),s()()()()),t&2&&(p("config",i.modalConfig),l(2),p("hidden",i.registers.length<=6),l(4),H("ngModel",i.searchInput),l(3),Z(X(11,3,i.registers,i.searchInput)))},dependencies:[Be,Te,Pe,Ee,ne,bi,vo],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.search-container[_ngcontent-%COMP%]{transition:all .3s ease;width:97%}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]{position:relative;transition:all .3s ease;height:2.3rem}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:hover, .search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:focus-within{box-shadow:0 0 0 2px #89b03e4d,0 0 8px 4px #89b03e33;border-radius:4px}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .txtFilter.form-control[_ngcontent-%COMP%]{transition:all .3s ease;border-left:none!important}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .txtFilter.form-control[_ngcontent-%COMP%]:focus{box-shadow:none!important;border-color:#ced4da!important}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .input-group-text[_ngcontent-%COMP%]{transition:all .3s ease;background-color:#fff;border-right:none!important}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:hover .input-group-text[_ngcontent-%COMP%], .search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:focus-within .input-group-text[_ngcontent-%COMP%]{background-color:#89b03e1a;border-color:#84cc16!important}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .fa-magnifying-glass[_ngcontent-%COMP%]{transition:all .3s ease}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:hover .fa-magnifying-glass[_ngcontent-%COMP%], .search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:focus-within .fa-magnifying-glass[_ngcontent-%COMP%]{color:#84cc16!important}.search-container[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]:focus-within{box-shadow:0 0 0 2px #89b03e66,0 0 12px 6px #89b03e40!important}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:#89b03e;border-radius:3px}.custom-scroll[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:#7a9e37}.container[_ngcontent-%COMP%]{overflow-y:auto;overflow-x:hidden;max-height:260px;min-height:150px}.col-4[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{width:180px;min-height:95px;margin-right:17px;margin-bottom:17px;position:relative}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]{display:block;outline:0;border:1px solid #B1AAAA;border-radius:5px;cursor:pointer}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{height:30px;border-radius:4px;padding:5px 10px;color:#fff;background:#b1aaaa;overflow:hidden}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]:hover, .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.active[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.vacant[_ngcontent-%COMP%]{background:#ffffe1;border:1px solid #89b03e}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%]:hover > h5[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.active[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.vacant[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%]{background:#89b03e}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover{border:1px solid #c9302c}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%] > h6[_ngcontent-%COMP%], .col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover > h6[_ngcontent-%COMP%]{background:#c9302c!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{background:#c9302c}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.occupied[_ngcontent-%COMP%]:hover{background:#fff}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]{border:1px solid #f6a828}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] > h6[_ngcontent-%COMP%]{background:#f6a828!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]:hover{border:1px solid #f6a828;background:#fff}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%]:hover > strong[_ngcontent-%COMP%]{background:#f6a828!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{background:#f6a828}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body.preparing[_ngcontent-%COMP%] div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-size:.75rem!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{height:80px;padding:15px 10px;position:relative}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;font-weight:400;font-size:.875rem;width:100%;margin-bottom:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{margin-top:-10px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:last-child{margin-bottom:0}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span.alias[_ngcontent-%COMP%]{text-align:center;position:absolute;bottom:0;right:0;width:auto;background-color:#b1aaaa;border-radius:3px;padding:2px 5px;color:#fff;display:none!important}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > .card-body[_ngcontent-%COMP%] div[_ngcontent-%COMP%] span.idle[_ngcontent-%COMP%]{display:block;font-size:1.25rem;text-align:center}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{position:absolute;width:27px;height:28px;cursor:pointer;top:5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-of-type{right:-5px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:nth-last-of-type(2){right:15px}.col-4[_ngcontent-%COMP%] .card[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{bottom:20px;right:5px;position:absolute}.col-4[_ngcontent-%COMP%] .duration[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border:1px solid!important;position:absolute;bottom:-3px;left:58px;background:#fff;border-radius:5px}"]})};var ur=["inputCash"],Ni=class n{constructor(e,t){this.dialogRef=e;this.data=t;this.generateModalTitle$.subscribe()}registerService=T(re);loadPOSService=T(z);register=this.registerService.Data;username=this.loadPOSService?.Data?.UserName;amount=R(0);config=new ie;currentRegisterName;generateModalTitle$=this.registerService.Data$.pipe(ce(e=>f.IsNotEmpty(e)),le(()=>{let e=this.registerService.getOutletRegister(),t=e?.Name?.length>18?`${e?.Name?.substring(0,18)}...`:e?.Name;this.config.title="Open Shift",this.currentRegisterName=t}),ee());today=new Date;inputCashEl;ngOnInit(){this.config.customWidth="350px",this.config.hideCancel=!0}ngAfterViewInit(){this.inputCashEl?.nativeElement?.focus()}onOk(){this.dialogRef.close({amount:this.amount()})}static \u0275fac=function(t){return new(t||n)(P(te),P(fe))};static \u0275cmp=A({type:n,selectors:[["POS-modal-opening-cash"]],viewQuery:function(t,i){if(t&1&&Qt(ur,5),t&2){let o;Ut(o=Wt())&&(i.inputCashEl=o.first)}},standalone:!1,decls:25,vars:8,consts:[["inputCash",""],[3,"onOk","onCancel","onClose","config"],[1,"table","fs-5","text"],[1,"py-3"],[1,"text-end","pe-3"],[1,"py-4"],[1,"text-end"],["data-cy","InputCash","autoNum","",1,"border","form-control-lg","text-end","w-100",3,"ngModelChange","ngModel"]],template:function(t,i){if(t&1){let o=E();a(0,"modal-material",1),S("onOk",function(){return v(o),_(i.onOk())})("onCancel",function(){return v(o),_(i.dialogRef.close())})("onClose",function(){return v(o),_(i.dialogRef.close())}),a(1,"content")(2,"table",2)(3,"tr")(4,"td",3),m(5,"Outlet Register"),s(),a(6,"td",4),m(7),s()(),a(8,"tr")(9,"td",5),m(10,"Current User"),s(),a(11,"td",4),m(12),s()(),a(13,"tr")(14,"td",5),m(15,"Starting Time"),s(),a(16,"td",4),m(17),y(18,"date"),s()(),a(19,"tr")(20,"td",3),m(21,"Starting Cash"),s(),a(22,"td",6)(23,"input",7,0),j("ngModelChange",function(c){return v(o),V(i.amount,c)||(i.amount=c),_(c)}),s()()()()()()}t&2&&(p("config",i.config),l(7),O(i.currentRegisterName),l(5),O(i.username),l(5),O(X(18,5,i.today,"EEEE, HH:mm")),l(6),H("ngModel",i.amount))},dependencies:[Te,Pe,Ee,ne,Ot,Ye],styles:[".table-title-width[_ngcontent-%COMP%]{width:120px}"]})};var Ai=class{OrderNumberElement;InvoiceNumberElement;NewOrderID};var Tt=class n{constructor(e,t,i){this._httpService=e;this._onlineStatusService=t;this._localDataService=i;this._onlineStatusService.getOnlineStatus$().subscribe(o=>{this.isOnline=o})}isOnline;GenerateNumber(e,t){if(this.isOnline)return this._httpService.get(U.GenerateNumber,[{key:"EntityID",value:e},{key:"TypeID",value:1}]);{let i=new Ai;return f.IsNotEmpty(t.NumberElement)&&(t.NumberElement.Seed+=1),f.IsNotEmpty(t.InvoiceNumberElement)&&(t.InvoiceNumberElement.Seed+=1),i.InvoiceNumberElement=t.InvoiceNumberElement,i.OrderNumberElement=t.NumberElement,i.NewOrderID=f.Guid_NewGuid(),ke(i)}}findRegisterById(e){return new Promise(t=>{this._localDataService.isConfigFromServer().subscribe(i=>{i?this._httpService.get(U.GetRegisterInfo,[{key:"RegisterID",value:e}]).subscribe(o=>{t(o)}):this._localDataService.findRegisterByID(e).subscribe(o=>{t(o)})})})}recordOpeningCash(e){return ri(this._httpService.post("/API/POS/RecordOpeningCash",e))}static \u0275fac=function(t){return new(t||n)(g(ge),g(he),g(Oe))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var re=class n{constructor(e,t,i,o,r,c){this._signalRClientService=e;this._matDialog=t;this._posHttpResponseService=i;this._CoreHttpService=o;this._toastrService=r;this._roleService=c}datePipe=T(Ye);_Data=new be(null);Data$=this._Data.asObservable().pipe(ce(e=>e!==null),Fe());get Data(){return this._Data.value}getSalesname(e){return this.Data&&this.Data.ListSales?this._Data.value.ListSales.find(t=>t.ID==e)?.Name:""}setActiveRegisterFromOptions(e,t){let o=this._posHttpResponseService.Data.AppConfigJSON.ModuleShift.Closure.Enabled;if(e.length>1){let r=e.find(c=>c.LoginID==t);if(r)this.pushNewRegister(r);else{let c=this.getOutletRegisterFromLocalStorage(),u=this.Data?.RegisterID?this.Data.RegisterID:c?.ID;e.some(F=>F.ID==u)?o?this.openChooseRegisterModal():this.initRegisterFromLocalStorage():this.openChooseRegisterModal()}}e.length==1&&(this.pushNewRegister(e[0]),f.IsEmpty(e[0].LoginID)&&f.IsEmpty(e[0].CashierID)&&this.openOpeningCashModal(e[0].ID)),e.length==0&&this._toastrService.warning("You do not have access to any OUTLET","Warning")}openChooseRegisterModal(){this._matDialog.open(Ri,{id:"registerModal",disableClose:!0}).afterClosed().pipe(ce(e=>f.IsNotEmpty(e?.selectedRegister))).subscribe(e=>{e.selectedRegister&&this.openOpeningCashModal(e.selectedRegister.ID)})}openOpeningCashModal(e){this._posHttpResponseService.Data.AppConfigJSON.ModuleShift.Closure.Enabled&&this._matDialog.open(Ni,{disableClose:!0}).afterClosed().pipe(ce(o=>f.IsNotEmpty(o))).subscribe(o=>{let r={RegisterID:e,OpAmount:o.amount};this._CoreHttpService.recordOpeningCash(r).then(()=>{this.updateRegisterList(r)})})}updateRegisterList(e){let i=this._posHttpResponseService.Data.Registers.map(r=>r.ID==e.RegisterID?this.mapRegisterAsActiveRegister(r,e):r),o=this._posHttpResponseService.Data;o.Registers=i,this._posHttpResponseService.pushNewValue(o)}mapRegisterAsActiveRegister(e,t){let i=localStorage.getItem("AccountInfo");if(i){let r=JSON.parse(i);e.LoginID=r.UserName}e.OpeningCash=t.OpAmount,e.Open=!0,e.State="Open";let o=this.datePipe.transform(new Date,"dd MM yyyy HH:mm");return e.StartDisplay=o,e}initRegisterFromLocalStorage(){if(this._roleService.Data.DeleteItem==!1){let t=this.getOutletRegisterFromLocalStorage();t&&this.pushNewRegister(t)}}pushNewRegister(e){let t=this._Data.value,i=t?t.RegisterID:null;i!=e.ID&&this._CoreHttpService.findRegisterById(e.ID).then(o=>{o.RegisterCode=e.Code,o.DefaultPrintTemplate=o.PrintTemplate,o.SplitPaymentEnabled=this.findSplitPaymentConfig(o.EntityID),this._signalRClientService.SubscribeGroup(o.RegisterID,i),this.saveOutletRegisterToLocalStorage(e),this.pushNewValue(o)})}getOutletRegister(){let e=this.Data.RegisterID;return this._posHttpResponseService.Data.Registers.find(o=>o.ID==e)}pushNewValue(e){this._Data.next(e)}saveOutletRegisterToLocalStorage(e){if(this._roleService.Data.DeleteItem==!1){let i=JSON.stringify(e);localStorage.setItem("outlet_register",i)}}getOutletRegisterFromLocalStorage(){let e=this._roleService.Data.DeleteItem,t=localStorage.getItem("outlet_register"),i=null;return t&&(e?localStorage.removeItem("outlet_register"):i=JSON.parse(t)),i}findOutletRegisterById(e){return this._posHttpResponseService.Data.Registers.find(o=>o.ID===e)}findSplitPaymentConfig(e){let i=this._posHttpResponseService.Data.Entities.find(o=>o.ID===e);return i?i.SplitPaymentEnabled:!1}static \u0275fac=function(t){return new(t||n)(g(rt),g(we),g(z),g(Tt),g(L),g(De))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};function gr(n,e){if(n&1&&(a(0,"span",5),m(1),y(2,"number"),s()),n&2){let t=d(3);l(),M("-",x(2,1,t.coupon.Amount),"%")}}function fr(n,e){if(n&1&&(a(0,"span",5),m(1),y(2,"number"),s()),n&2){let t=d(3);l(),M(" -",x(2,1,t.coupon.Amount)," ")}}function hr(n,e){if(n&1){let t=E();a(0,"button",9),S("click",function(){v(t);let o=d().$implicit,r=d(2);return _(r.onRemoveCouponDiscount(o))}),m(1," Remove "),s()}}function Cr(n,e){if(n&1){let t=E();a(0,"button",10),S("click",function(){v(t);let o=d().$implicit,r=d(2);return _(r.onApplyCouponDiscount(o))}),m(1," Apply "),s()}if(n&2){let t=d(3);p("disabled",t.hasAppliedCouponDiscount())}}function vr(n,e){if(n&1&&(a(0,"tr")(1,"td"),m(2),s(),a(3,"td"),m(4),s(),a(5,"td",4),m(6),y(7,"number"),s(),a(8,"td",4),h(9,gr,3,3,"span",5)(10,fr,3,3,"span",5),s(),a(11,"td",6),h(12,hr,2,0,"button",7)(13,Cr,2,1,"button",8),s()()),n&2){let t=e.$implicit,i=d(2);l(2),O(t==null||t.Variant==null?null:t.Variant.Name),l(2),O(t==null||t.Variant==null?null:t.Variant.Code),l(2),O(x(7,5,t.UnitPrice)),l(3),C((i.coupon==null||i.coupon.Requirement==null?null:i.coupon.Requirement.Type)==i.couponType.DiscountPercentage?9:10),l(3),C((t==null?null:t.CouponDiscount)>0?12:13)}}function _r(n,e){if(n&1&&K(0,vr,14,7,"tr",null,ot),n&2){let t=d();Z(t.eligibleItems())}}function yr(n,e){n&1&&(a(0,"tr")(1,"td",11),b(2,"app-empty-state",12),s()())}var ki=class n{constructor(e){this.data=e;this.coupon=this.data.coupon,this.initModalConfig(),this.initEligibleItems()}dialogRef=T(te);config;eligibleItems=R([]);coupon;couponType=Jt;hasAppliedCouponDiscount=R(!1);initModalConfig(){this.config=new ie,this.config.title="Choose Item to Apply Discount",this.config.hideFooter=!0}initEligibleItems(){let e=this.data.coupon?.ApplyToProduct.map(t=>t.ID);e&&(this.eligibleItems.update(()=>this.data.cartItems.filter(i=>e.includes(i.VariantID))),this.hasAppliedCouponDiscount.update(()=>this.eligibleItems().some(t=>t.CouponDiscount>0)))}onApplyCouponDiscount(e){let t=[e];this.hasAppliedCouponDiscount.update(()=>!0),this.dialogRef.close(t)}onRemoveCouponDiscount(e){this.eligibleItems.update(t=>{let i=t.findIndex(o=>o.VariantID===e.VariantID);return i>-1&&(t[i].Discount=0,t[i].CouponDiscount=0),t}),this.hasAppliedCouponDiscount.update(()=>!1)}onClose(){this.dialogRef.close()}static \u0275fac=function(t){return new(t||n)(P(fe))};static \u0275cmp=A({type:n,selectors:[["app-modal-coupon-selected-item"]],decls:17,vars:2,consts:[[3,"onCancel","onClose","config"],[1,"table","table-bordered"],[1,"thead-light"],["scope","col"],[1,"text-end"],[1,"text-danger"],[1,"text-center"],[1,"btn","btn-sm","btn-danger"],[1,"btn","btn-sm","btn-success",3,"disabled"],[1,"btn","btn-sm","btn-danger",3,"click"],[1,"btn","btn-sm","btn-success",3,"click","disabled"],["colspan","5"],["title","No eligible products","message","No products in the cart qualify for coupon use"]],template:function(t,i){t&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.onClose()})("onClose",function(){return i.onClose()}),a(1,"content")(2,"table",1)(3,"thead",2)(4,"tr")(5,"th",3),m(6,"Name"),s(),a(7,"th",3),m(8,"Code"),s(),a(9,"th",3),m(10,"Price"),s(),a(11,"th",3),m(12,"Discount"),s(),b(13,"th",3),s()(),a(14,"tbody"),h(15,_r,2,0)(16,yr,3,0,"tr"),s()()()()),t&2&&(p("config",i.config),l(15),C(i.eligibleItems().length!==0?15:16))},dependencies:[Se,Pt,ne,So,q],encapsulation:2})};var st=class{ModuleSell;ApplicationLoyalty;ApplicationMath;CoreDefaults;ModuleDelivery;ApplicationParkAndRetrieve;ApplicationRegisterClosure;PaymentConfigGopay;PaymentConfigLink;PrintConfigInvoice;CorePrint;PaymentConfigEmpatKali;ApplicationSettings;PrintConfigGeneral;ModuleProducts;ModuleContact;ApplicationTransactionNumbering;ModuleOrders;ModuleShift;ModuleBuy;ModuleAdjustment;TadaCouponVisible;CouponRedemptionType;ProviderOption};var ae=class n{constructor(e,t,i,o){this._orderDataService=e;this._posService=t;this.POSMATH=i;this.decimalPipe=o;this._orderDataService.Data$.pipe(Y(r=>this._posService.Data$.pipe(J(c=>({appConfig:c.AppConfigJSON,salesOrder:r}))))).subscribe(r=>{this.salesOrderData=r.salesOrder,this.appConfigJSON=r.appConfig,this.calculateDiscountAmount(),this.pushNewValue(this.grandTotal)})}_Data=new be(0);Data$=this._Data.asObservable().pipe(Fe());tax=new xo;discountAfterTax=0;currencySymbol="Rp";get Data(){return this._Data.value}salesOrderData=new G;appConfigJSON=new st;pushNewValue(e){this._Data.next(e)}get grandTotal(){let e=this.TotalAfterSurcharge;return isNaN(e)?0:e}setDecimalDigit(e){let t=this.decimalPipe.transform(e,"1.0-4");return e=parseFloat(t.split(",").join("")),e}get TotalAfterTax(){let e=this.TaxAmount,t=this.TotalBeforeTax+e;return t=this.POSMATH.Round(t,this.appConfigJSON.ApplicationMath.RoundingDigit.DecimalPlaceValue,this.appConfigJSON.ApplicationMath.RoundingDigit.RoundAlgorithm),t}get TotalBeforeTax(){let e=this.tax?.CalculationTypeID===1,t=0;return e?t=this.DiscountTotal-this.TaxAmount:t=this.DiscountTotal,t}get TotalAfterSurcharge(){let e=this.TotalAfterTax+this.SurchargeAmount;return this.POSMATH.Round(e,this.appConfigJSON.ApplicationMath.RoundingDigit.DecimalPlaceValue,this.appConfigJSON.ApplicationMath.RoundingDigit.RoundAlgorithm)}get TotalAfterDiscountTaxable(){return this.GrossTotalTaxable-this.DiscountTotal}get TaxAmount(){if(this.tax!=null){let e=0,t=this.appConfigJSON.ApplicationMath.RoundingTaxDigit.DecimalPlaceValue,i=this.appConfigJSON.ApplicationMath.RoundingTaxDigit.RoundAlgorithm,o=this.GrossTotalTaxable;return this.tax.CalculationTypeID==1?e=this.tax.Rate/(100+this.tax.Rate)*o:e=this.tax.Rate/100*o,e=this.POSMATH.Round(e,t,i),e}else return 0}get SurchargeAmount(){return this.TotalAfterTax*this.salesOrderData.Invoice.SurchargePcg/100}get Discount1Amount(){return this.GrossTotal*this.salesOrderData.Order.Discount/100}get AfterDiscount1Amount(){return this.GrossTotal-this.Discount1Amount}get Discount2Amount(){return this.AfterDiscount1Amount*this.salesOrderData.Order.Discount2/100}get AfterDiscount2Amount(){return this.AfterDiscount1Amount-this.Discount2Amount}get DiscountTotal(){return this.AfterDiscount2Amount-this.salesOrderData.Order.DiscountAmount}calculateDiscountAmount(){let e=this.salesOrderData.Order.DiscountAmount,t=0;this.AfterDiscount2Amount>=0&&e>0&&e>this.AfterDiscount2Amount&&(t=this.AfterDiscount2Amount),t!==0&&t<=e&&this.GrossTotal!==0&&(e=t),this.salesOrderData.Order.DiscountAmount=e}get GrossTotal(){return this.sum(this.salesOrderData.CartItems,"Total")}get GrossTotalTaxable(){let e=this.salesOrderData.CartItems.filter(i=>i.Taxable),t=this.sum(e,"Total");if(e.length!==0){let i=this.calculateDiscountTaxableItem(e);t=t*(100-this.salesOrderData.Order.Discount)/100,t=t*(100-this.salesOrderData.Order.Discount2)/100,t=t-i}return t}calculateDiscountTaxableItem(e){let t=this.GrossTotal,i=this.salesOrderData.Order.DiscountAmount,o=0,r=0,c=0,u=0;for(let D of e)o=D.getItemAfterDiscount/t,r=o*i,u=r*D.Quantity,c+=u;return c}get GrossTotalNonTaxable(){let e=this.salesOrderData.CartItems.filter(i=>i.Taxable==!1),t=this.sum(e,"Total");return t=t*(100-this.salesOrderData.Order.Discount)/100,t=t*(100-this.salesOrderData.Order.Discount2)/100,t=t-this.salesOrderData.Order.DiscountAmount,t}sum(e,t){let i=e.reduce((o,r)=>o+r[t],0);return i=this.setDecimalDigit(i),i}GetPointOnlyAmount(){let e=this.salesOrderData.CartItems.filter(t=>t.Variant.PaymentTypeID==2);return this.GetAmountByCart(e)}GetCashOnlyAmount(){let e=this.salesOrderData.CartItems.filter(t=>t.Variant.PaymentTypeID==1);return this.GetAmountByCart(e)}GetCashAndPointAmountCart(){let e=this.salesOrderData.CartItems.filter(t=>t.Variant.PaymentTypeID!=1);return this.GetAmountByCart(e)}GetAmountByCart(e){let t=this.sum(e,"Total");return t=t*(100-this.salesOrderData.Order.Discount)/100,t=t*(100-this.salesOrderData.Order.Discount2)/100,t}calculateGrossTotal(e){return this.sum(e,"Total")}static \u0275fac=function(t){return new(t||n)(g(B),g(z),g(Io),g(q))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var Vi=class{Code;Provider;EntityID;Customer;ShoppingCart};var Et=class n{salesOrderService=T(B);registerService=T(re);customerService=T(Re);orderCalculator=T(ae);generateRedeemCouponDto(e,t){let i=new Vi,o=this.registerService.Data?.EntityID;return i.Code=e,i.Provider=t,i.ShoppingCart={Amount:this.orderCalculator.Data,Items:this.generateItems()},i.EntityID=o,i.Customer=this.generateCustomer(t),i}generateItems(){return this.salesOrderService.Data.CartItems.map(i=>({Price:i.Price,Quantity:i.Quantity,VariantID:i.VariantID,Code:i?.Variant?.Code}))}generateCustomer(e){let t=this.customerService.Data,i=this.salesOrderService?.Data?.Order?.CustomerID,o=null;return f.IsNotEmpty(i)&&(o={Phone:t.Mobile,Email:t.Email},e==="Internal"&&(o=ii({ID:i},o))),o}static \u0275fac=function(t){return new(t||n)};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var wt=class n{constructor(e,t,i,o,r,c){this._httpService=e;this._orderDataService=t;this._userRoleService=i;this.toastr=o;this._invoiceCalculatorService=r;this.promotionCouponFactoryService=c;this.subscribeToObservable()}dialog=T(we);role;originalRoleData;_coupon=R(null);salesOrderBeforePromotion=R(null);isShowToastrInApplyCoupon=R(!1);get coupon(){return this._coupon()}subscribeToObservable(){this._userRoleService.Data$.subscribe(e=>{this.role=e,f.IsEmpty(this.originalRoleData)&&(this.originalRoleData=de(We,e))})}RedeemCoupon(e,t,i=!1){i||(this.isShowToastrInApplyCoupon.set(!0),this.copyOriginalSalesOrder());let o=this.promotionCouponFactoryService.generateRedeemCouponDto(e,"Internal");this._httpService.post(U.ValidateInternalCoupon,o).subscribe({next:r=>{switch(this._orderDataService.Data.Order.PromotionCoupon=e,this._orderDataService.Data.Order.PromotionNote=t,this._orderDataService.Data.Order.CouponType=1,r.Requirement?.Type){case 1:this.HandleDiscountPercentage(r);break;case 2:this.HandleDiscountAmount(r);break;case 3:this.handleCouponReturnAccess(r);break;case 4:this.handleCouponParkedDeletionAccess();break;case 5:this.handleFullAccessCoupon();break;case 6:this.handleDeleteItemCoupon();break}this._coupon.set(r),this.isShowToastrInApplyCoupon.set(!1)},error:r=>{this.removeAppliedCoupon(!1),this.isShowToastrInApplyCoupon.set(!1)}})}setCouponOnEdit(e){this._coupon.set(e),this.generateOriginalSalesOrderOnEdit()}generateOriginalSalesOrderOnEdit(){let e=de(G,this._orderDataService.Data);e.Order.PromotionCoupon=null,e.Order.PromotionNote=null,e.Order.Discount=0,e.Order.DiscountAmount=0,this.salesOrderBeforePromotion.set(e)}copyOriginalSalesOrder(){let e=de(G,this._orderDataService.Data);this.salesOrderBeforePromotion.set(e)}HandleDiscountPercentage(e,t=!1){e.Amount>0?e.Requirement?.MaximumDiscount>0?this.applyConfigMaxDiscount(e,t):e.Requirement?.FullPriceProductOnly?this.applyFullPriceDisc(e,t):this.applyDiscountPercentage(e,t):(this.role.Discount=t?this.originalRoleData.Discount:!0,this._userRoleService.pushNewValue(this.role))}applyFullPriceDisc(e,t=!1){let i=this._orderDataService.Data,o=this.filterItemWithDisc(i.CartItems),r=this.filterItemWithCouponDisc(i.CartItems);if(t)r.length>0?(i.CartItems=this.resetItemsDisc(i.CartItems),this._orderDataService.pushNewValue()):this.applyDiscountPercentage(e,t);else if(o.length>0){let c=this.filterItemWithoutDisc(i.CartItems);c.length>0?this.applyConfigItemsScope(e,c).subscribe(u=>{let D=this.applyItemsDisc(u,e);i.CartItems=this.updateCartItems(D,e),this._orderDataService.pushNewValue(i),this.showToastr(e)}):(this.removeAppliedCoupon(!1),this._orderDataService.pushNewValue(),this.toastr.error("No products in the cart qualify for coupon use","Coupon Not Applied"))}else this.applyDiscountPercentage(e,t)}updateCartItems(e,t){let o=this._orderDataService.Data.CartItems.map((r,c)=>{let u=e.find(D=>this.isSameCartItem(D,r));return u||r});return o=this.applyOneOfFirstQuantity(o,t),o}applyOneOfFirstQuantity(e,t){if(t?.Requirement?.RequirementDiscountType==2){let i=e.findIndex(o=>o.CouponDiscount>0);if(e[i]?.Quantity>1){let o=dt(xe,e[i]);o.Quantity=1,o.ID=f.GuidEmpty,e[i].Quantity=e[i].Quantity-1,e[i].CouponDiscount=0,e[i].Discount=0,e[i].DiscountAmount=0,e.push(o)}}return e}filterItemWithDisc(e){return e.filter(i=>i.Discount>0||i.DiscountAmount>0||i.Price!=i?.Variant?.UnitPrice||f.IsNotEmpty(i.PriceBookID)||i.PriceTypeID==2)}filterItemWithoutDisc(e){return e.filter(i=>this.itemConditionFullPriceOnly(i))}filterItemWithCouponDisc(e){return e.filter(i=>i.CouponDiscount>0)}applyDiscountPercentage(e,t=!1){let i=this._orderDataService.Data.Order.CustomerDiscountRate,o=e.Amount;if(t){let r=this._orderDataService.Data;this._orderDataService.Data.Order.Discount=0,r.CartItems=this.resetItemsDisc(r.CartItems),this._orderDataService.pushNewValue(r)}else o>=i?e.ApplyToProduct?.length>0?this.applyDiscountRequiredItems(e):(this._orderDataService.Data.Order.Discount=e.Amount,this._orderDataService.pushNewValue(),this.showToastr(e)):(this.toastr.warning("Member discount is applied because member discount is greater than Coupon Discount","Warning"),this.removeAppliedDiscountOnCustomerChange())}applyDiscountRequiredItems(e){let i=this._orderDataService.Data.CartItems.filter(o=>e.ApplyToProduct.map(r=>r.ID)?.includes(o.VariantID));this.applyConfigItemsScope(e,i).subscribe(o=>{let r=o.map(u=>(u.Discount=e.Amount,u.CouponDiscount=e.Amount,u)),c=this.updateCartItems(r,e);this._orderDataService.Data.CartItems=c,this._orderDataService.pushNewValue(),this.showToastr(e)})}showToastr(e){let t=e?.Requirement?.Notify;f.IsNotEmpty(t)&&this.isShowToastrInApplyCoupon()&&this.toastr.success(t,"Coupon Applied")}applyConfigMaxDiscount(e,t=!1){let i=this._orderDataService.Data.CartItems;e.Requirement?.FullPriceProductOnly&&(i=i.filter(o=>this.itemConditionFullPriceOnly(o))),this.applyConfigItemsScope(e,i,t).subscribe(o=>{this.applyMaxDiscount(e,o,t)})}applyConfigItemsScope(e,t,i=!1){let o=e.Requirement?.RequirementDiscountType;return(o==1||o==2)&&i==!1?this.dialog.open(ki,{data:{coupon:e,cartItems:t},id:"modal-coupon-selected-item"}).afterClosed().pipe(le(c=>{let F=this._orderDataService.Data.CartItems.some(W=>W.CouponDiscount>0);!c&&!F&&this.removeAppliedDiscountOnCustomerChange()}),ce(c=>!!c)):ke(t)}applyMaxDiscount(e,t,i=!1){let o=this._invoiceCalculatorService.calculateGrossTotal(t),r=this._orderDataService.Data,c=o*e.Amount/100,u=e.Requirement?.MaximumDiscount,D=t;c>=u?(r.Order.DiscountAmount=i?0:u,D=this.resetItemsDisc(t)):(r.Order.DiscountAmount=0,D=i?this.resetItemsDisc(t):this.applyItemsDisc(t,e)),r.CartItems=this.updateCartItems(D,e),this._orderDataService.pushNewValue(r),i||this.showToastr(e)}resetItemsDisc(e){return this.coupon?.Requirement?.RequirementDiscountType==2?e=this.resetConfigOneOfFirstQuantity(e):e=e.map(t=>(t.CouponDiscount>0&&(t.Discount=0,t.DiscountAmount=0,t.CouponDiscount=0),t)),e}resetConfigOneOfFirstQuantity(e){let t=e.findIndex(i=>i.CouponDiscount>0);if(t!==-1){let i=e.findIndex(o=>o.CouponDiscount==0&&e[t]?.VariantID==o?.VariantID);i!==-1?(e.splice(t,1),e[i].Quantity+=1):(e[t].CouponDiscount=0,e[t].Discount=0,e[t].DiscountAmount=0)}return e}applyItemsDisc(e,t){return t.ApplyToProduct?.length>0?e=this.applyDiscByVariant(e,t):e=e.map(i=>(i.Discount=t.Amount,i.CouponDiscount=t.Amount,i)),e}applyDiscByVariant(e,t){return e=e.map(i=>(t.ApplyToProduct.find(r=>r.ID==i.VariantID)&&this.itemConditionFullPriceOnly(i)&&(i.Discount=t.Amount,i.CouponDiscount=t.Amount),i)),e}itemConditionFullPriceOnly(e){return(e.Discount==0||e.CouponDiscount>0)&&e.DiscountAmount==0&&e.Price==e?.Variant?.UnitPrice&&f.IsEmpty(e.PriceBookID)}HandleDiscountAmount(e,t=!1){e.Amount>0?(e.ApplyToProduct?.length>0?this.applyDiscountInItem(e,t):(t?this._orderDataService.Data.Order.DiscountAmount=0:(this._orderDataService.Data.Order.DiscountAmount=e.Amount,this.showToastr(e)),this._orderDataService.pushNewValue()),this.resetCustomerPoint(t)):(this.role.Discount=t?this.originalRoleData.Discount:!0,this._userRoleService.pushNewValue(this.role))}applyDiscountInItem(e,t=!1){let i=this._orderDataService.Data;if(t)i.CartItems=this.resetItemsDisc(i.CartItems);else{let r=i.CartItems.filter(c=>e.ApplyToProduct.map(u=>u.ID)?.includes(c.VariantID));this.applyConfigItemsScope(e,r,t).subscribe(c=>{let u=c.map(D=>(D.DiscountAmount=e.Amount,D.CouponDiscount=e.Amount,D));i.CartItems=this.updateCartItems(u,e),this._orderDataService.pushNewValue(i),this.showToastr(e)})}}resetCustomerPoint(e){if(!e){let t=this._orderDataService.Data;t.Order.PointUsed=0}}handleCouponReturnAccess(e){let t=de(We,this.role);t.Return=!0,this._userRoleService.pushNewValue(t),this.isShowToastrInApplyCoupon()&&this.toastr.success("You got access to return a sales transaction!","Coupon Applied")}handleCouponParkedDeletionAccess(){let e=de(We,this.role);e.ParkedDeletionAuthorized=!0,this._userRoleService.pushNewValue(e),this.isShowToastrInApplyCoupon()&&this.toastr.success("You Have Access to delete park and delete item when retrieve!","Coupon Applied")}handleFullAccessCoupon(){let e=de(We,this.role);e.UnitPriceEditor=!0,e.Discount=!0,e.Return=!0,e.Tax=!0,e.NumberEditor=!0,e.DateEditor=!0,e.PricebookSelector=!0,e.DeleteItem=!0,e.ParkedDeletionAuthorized=!0,this._userRoleService.pushNewValue(e),this.isShowToastrInApplyCoupon()&&this.toastr.success("You now have Full Access for this Order!","Coupon Applied")}handleDeleteItemCoupon(){let e=de(We,this.role);e.DeleteItem=!0,this._userRoleService.pushNewValue(e),this.isShowToastrInApplyCoupon()&&this.toastr.success("You Have Access to delete item","Coupon Applied")}removeAppliedCoupon(e=!0){this._userRoleService.pushNewValue(this.originalRoleData),this._orderDataService.pushNewValue(this.salesOrderBeforePromotion()),this.salesOrderBeforePromotion.set(null),this._coupon.set(null),e&&this.toastr.warning("Coupon Cancelled","Warning")}resetCouponOnNewTransaction(){this._userRoleService.pushNewValue(this.originalRoleData),this._coupon.set(null)}removeAppliedDiscountOnCustomerChange(){if(this.coupon)switch(this.coupon.Requirement?.Type){case 1:this.HandleDiscountPercentage(this._coupon(),!0),this.removeAppliedCouponOnCustomerChange();break;case 2:this.HandleDiscountAmount(this._coupon(),!0),this.removeAppliedCouponOnCustomerChange();break}}removeAppliedCouponOnCustomerChange(){if(this.coupon){let e=this._orderDataService.Data;e.Order.PromotionCoupon=null,e.Order.PromotionNote=null,this._coupon.set(null),this._userRoleService.pushNewValue(this.originalRoleData),this._orderDataService.pushNewValue(e)}}isSameCartItem(e,t){return e.VariantID===t.VariantID&&e.Quantity===t.Quantity&&e.Price===t.Price&&e.Discount===t.Discount&&e.PriceBookID===t.PriceBookID}static \u0275fac=function(t){return new(t||n)(g(ge),g(B),g(De),g(L),g(ae),g(Et))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};var Rt=class{CommissionID;ReturNumber;parkTemporaryItem;posState;InputTextValue;constructor(){this.posState=0,this.CommissionID="",this.ReturNumber="",this.parkTemporaryItem=[],this.InputTextValue=""}};var Fi=class n{constructor(e,t,i){this._promotionEventService=e;this._dialogRef=t;this.data=i;this.modalConfig=new ie,this.modalConfig.hideCancel=!0,this.modalConfig.hideClose=!0,this.modalConfig.headerType=me.Warning,this.modalConfig.title="Promotion Requirement unfulfilled!",this.modalConfig.customWidth="350px",this.modalConfig.okText="Ok",this.selectedPromotion=e.selectedPromotion}modalConfig;selectedPromotion;onOk(){this._promotionEventService.restoreOrder(),this._dialogRef.close()}static \u0275fac=function(t){return new(t||n)(P(Ae),P(te),P(fe))};static \u0275cmp=A({type:n,selectors:[["POS-modal-promotion-confirm"]],standalone:!1,decls:9,vars:4,consts:[[3,"onOk","config"],[1,"fst-italic","text-danger","mb-3"],[1,"mb-0"]],template:function(t,i){t&1&&(a(0,"modal-material",0),S("onOk",function(){return i.onOk()}),a(1,"content")(2,"div")(3,"h5"),m(4),s(),a(5,"p",1),m(6),s(),a(7,"p",2),m(8),s()()()()),t&2&&(p("config",i.modalConfig),l(4),O(i.selectedPromotion==null?null:i.selectedPromotion.Name),l(2),O(i.selectedPromotion==null?null:i.selectedPromotion.Description),l(2),O(i.data==null?null:i.data.message))},dependencies:[ne],encapsulation:2})};var Li=class extends xe{};var kt=class n{constructor(e,t,i,o,r,c,u,D,F,W){this.variantService=e;this._posService=t;this._orderDataService=i;this.toastr=o;this._orderProcessorService=r;this._customerHttpService=c;this.promotionCouponService=u;this.promotionCouponExternalService=D;this.userRoleService=F;this.decimalPipe=W;this.subscribeToObservable()}salesOrderData;appConfigJson;entityID;audio=new Audio;subscribeToObservable(){this._posService.Data$.pipe(ee()).subscribe(e=>{this.appConfigJson=e.AppConfigJSON}),this._orderDataService.Data$.pipe(ee()).subscribe(e=>{this.salesOrderData=e,this.entityID=e.Order.EntityID}),this._orderProcessorService.Data$.pipe(ee()).subscribe(e=>{e.posState==3&&this.clearCartItemsInLocalStorage()})}addCartItemById(e,t,i=!0){return new Promise((o,r)=>{this.variantService.findVariantByID(e,this.entityID,i).then(c=>{this.createNewCartItem(c,t),o(c)}).catch(c=>{r(c)})})}addCartItemByCode(e){return new Promise((t,i)=>{let o=this.appConfigJson.ModuleSell.DigitalScale;o.Digit>0&&f.IsNotEmpty(o.Regex)&&e.length==o.Digit?this.parseDigitalScaleBarcodeWithRegex(e,o).then(c=>{c||(this.toastr.info("Matching Regex Rule to Barcode","Digital Scale"),this.findVariantByCode(e).then(u=>t(u)).catch(u=>i(u)))}):this.findVariantByCode(e).then(c=>t(c)).catch(c=>i(c))})}findVariantByCode(e){let t=this.appConfigJson.ModuleSell.BarcodeSerialEnabled;return new Promise((i,o)=>{this.variantService.findVariantByCode(e,this.entityID,t).then(r=>{i(r),this.createNewCartItem(r)}).catch(r=>{this.playBellRing(),o(r)})})}addItemBySerial(e){this.variantService.findVariantBySerial(e,this.entityID).subscribe(t=>{let i=this.salesOrderData.CartItems;if(i.length>0){let o,r=[],c=i.findIndex(u=>u.Variant.ID==t.ID);r=[],c!==-1?(o=i[c].Serial?.findIndex(u=>u.Number==e),r=[...i[c].Serial?i[c].Serial:[]],o==-1?(r.push({Number:e,Quantity:1}),i[c].Quantity=r.length):r.length>0?r[o].Quantity+=1:(r=[{Number:e,Quantity:1}],this.addNewSerials(t,e)),i[c].Serial=[...r],i[c].Quantity=i[c].calculateSerialQty(),this.updateCartItem(i[c],c)):this.addNewSerials(t,e)}else this.addNewSerials(t,e)})}addNewSerials(e,t){e.Serial=[{Number:t,Quantity:1}],this.createNewCartItem(e)}playBellRing(){this.audio.src="https://cdn.dealpos.xyz/web-audio/bell_ring.mp3",this.audio.load(),this.audio.play()}updateCartItem(e,t){this.salesOrderData.CartItems[t]=e,this._orderDataService.pushNewValue(this.salesOrderData),this.applyCustomerPoint(),this.reApplyPromotionCoupon(),this.saveItemsToLocalStorage()}deleteCartItem(e){this.salesOrderData.CartItems=this.salesOrderData.CartItems.filter(t=>t!==e),this._orderDataService.pushNewValue(this.salesOrderData),this.applyCustomerPoint(),this.isRemoveItemRequirement(e)&&this.reApplyPromotionCoupon()}parseDigitalScaleBarcodeWithRegex(e,t){return new Promise(i=>{let o=this.appConfigJson.ModuleSell.BarcodeSerialEnabled,r=new RegExp(t.Regex),c=e.match(r);if(console.log(c),f.IsNotEmpty(c)){let u=c[1],D=parseFloat(c[2]);console.log(D,"productQuantity"),D=D/t.QuantityDivider,this.variantService.findVariantByCode(u,this.entityID,o).then(F=>{this.createNewCartItem(F,null,D),i(!0)}).catch(()=>{i(!1)})}else i(!1)})}createNewCartItem(e,t,i){let o=new xe,r=this.appConfigJson.ModuleSell.ProductNotes.CopyProductDescription,c=this.appConfigJson.ModuleSell.ProductNotes.CopyPromotionName;o.patchByVariant(e,r,c),o=this.applyReward(o,t),f.IsEmpty(t)&&(o=this.applyPriceBook(o)),this.validateCartItem(o)&&(o.Quantity=i||o.Quantity,t?.PromotionType==2?this.handlingPromotionQuantity(o):this.pushNewItemToArray(o,o.PromotionGift),this.applyCustomerPoint()),this.addAvailableComponent(o)}applyCustomerPoint(){let e=this.salesOrderData.Order.CustomerID,t=f.IsEmpty(e);this._orderProcessorService.reedemPointToDiscount(t)}handlingPromotionQuantity(e){let t=de(xe,this.salesOrderData.CartItems),i=t.findIndex(o=>o.VariantID==e.VariantID&&o.PromotionGift);i!==-1?t[i].Quantity+=e.Quantity?e.Quantity:1:t=[...t,e],this.salesOrderData.CartItems=t,this._orderDataService.pushNewValue(this.salesOrderData)}applyPromotionProduct(e){let t=e.Variant.DiscountAmount;return t&&(e.Price=e.UnitPriceOriginal-t),e}applyReward(e,t){if(t){let i=this.appConfigJson.ModuleSell.ProductNotes.CopyPromotionName;e.Discount=t.Discount,e.Price=t.OriginalPrice;let o=t.OriginalPrice-t.UnitPrice;e.Price=e.UnitPriceOriginal-o,e.UnitPrice=e.UnitPriceOriginal-o,e.PromotionGift=!0,e.PromotionID=t.PromotionID,e.Quantity=t.Quantity?t.Quantity:1,e.PriceTypeID=3,e.Cost+=t.ExtraCost,e.UnitCost+=t.ExtraCost,e.PriceNote=t.PromotionName,i&&(e.Note=`${e.Note?e.Note:""} ${t.PromotionName} `)}return e}addAvailableComponent(e){let t=e.Price!=0,i=this.appConfigJson.ModuleSell.SellProductComponentDefaultPrice,o=e.Variant;if(o.Component!=null&&o.Component.length>0)for(let r of o.Component){let c=new Li;c.patchByVariant(r),c.Quantity=e.Quantity*r.Quantity,t&&!i&&(r.UnitPrice=0),c.Price=r.UnitPrice,this.pushNewItemToArray(c)}}pushNewItemToArray(e,t=!1){let i=this.salesOrderData.CartItems.findIndex(o=>o.VariantID==e.VariantID);if(e=this.applyPromotionProduct(e),i==-1||t)this.salesOrderData.CartItems.push(e);else{let o=this.appConfigJson.ModuleSell.QuickKey.NewRowBehaviour;if(o==2)this.salesOrderData.CartItems.push(e);else if(o==1)this._orderProcessorService.Data.posState==4?this.salesOrderData.CartItems.push(e):this.addingQuantityItem(i,e);else{if(!this.validatePrepaidPackage(e,i)){this.toastr.error("This prepaid package is already in the cart while editing. Please remove it first before adding again.","Cannot Add Item");return}this.addingQuantityItem(i,e)}}this._orderDataService.pushNewValue(this.salesOrderData),this.saveItemsToLocalStorage(),this.reApplyPromotionCoupon()}saveItemsToLocalStorage(){let e=this.userRoleService.Data.DeleteItem,t=this._orderProcessorService.Data?.posState;if(!e&&t!==4){let i=this._orderDataService.Data,o=i?.Order?.Number,r=i.CartItems,c={Number:o,CartItems:r};try{localStorage.setItem("cart_items",JSON.stringify(c))}catch(u){console.error("Error saving cart items to localStorage:",u)}}}clearCartItemsInLocalStorage(){localStorage.getItem("cart_items")&&(this.userRoleService.Data?.DeleteItem?this.clearCartItemsBasedOnCoupon():this.clearCartItemsStorage())}clearCartItemsBasedOnCoupon(){let e=this.promotionCouponService?.coupon;e&&(e.Requirement?.Type==5||e.Requirement?.Type==6)&&this.clearCartItemsStorage()}clearCartItemsStorage(){try{localStorage.removeItem("cart_items")}catch(e){console.error("Error clearing cart items from localStorage:",e)}}validatePrepaidPackage(e,t){let i=this.salesOrderData.CartItems[t],o=this._orderProcessorService.Data.posState,r=e.Variant.TypeID==10,c=f.IsNotEmpty(i.ID),u=!0;return o==2&&r&&c&&(u=!1),u}reApplyPromotionCoupon(){let e=this.salesOrderData.Order.CouponProvider,t=e=="Internal"||f.IsEmpty(e),i=this.salesOrderData.Order.PromotionCoupon,o=this.salesOrderData.Order.PromotionNote;f.IsNotEmpty(i)&&(t?this.promotionCouponService.RedeemCoupon(i,o,!0):this.promotionCouponExternalService.redeemCoupon(i,"External",o))}isRemoveItemRequirement(e){let t=this.promotionCouponService?.coupon,i=t?.ApplyToProduct,o=!0;return f.IsNotEmpty(t)&&i?.length>0&&(o=i.some(r=>r.ID==e.VariantID)),o}addingQuantityItem(e,t){let i=this.salesOrderData.CartItems.filter(u=>u.VariantID==t.VariantID),o=i.length,r=i.find(u=>!u.PromotionGift);this.salesOrderData.CartItems[e].PromotionGift&&o==1?this.salesOrderData.CartItems.push(t):(r.Quantity+=t.Quantity,r=this.applyPromotionProduct(r)),r&&(r=this.applyPriceBook(r))}validateCartItem(e){return e.Variant.CategoryTypeID==-1?(this.toastr.info(e.Variant.Name+" cannot be sold, check Category "+e.Variant.CategoryName+" settings","info"),!1):!(!this.validatePriceMinimum(e)||!this.validateSerialItem(e))}validatePriceMinimum(e){let t=!0,i=this.userRoleService.Data.PriceMinimum,o=this.appConfigJson.ModuleSell.ProductDialog.PriceMinimumTypeID;if(i){let r=0;switch(o){case 1:r=e.UnitPrice;break;case 2:r=e.UnitCost;break;case 3:r=e.UnitPriceMinimum;break}if(e.Price<r){t=!1;let c=f.StringFormat("You have no right to sell this item lower than {0}",this.decimalPipe.transform(r));alert(c)}}return t}validateSerialItem(e){let t=!0;if(e?.Serial?.length>0&&e.Variant.TypeID==4&&e.Quantity>0){let i=0;e?.Serial?.forEach(o=>{i+=o.Quantity}),i!=e.Quantity&&(this.toastr.error("Serial must be equal with the quantity","Error"),t=!1)}return t}applyPriceBook(e){let t=e.Variant.PriceBook!=null?e.Variant.PriceBook:[],i=this.findCustomerPricebook(t);if(t&&t.length!==0){let o=t.sort(function(r,c){return c.MinimumQuantity-r.MinimumQuantity}).filter(r=>e.Quantity>=r.MinimumQuantity&&r.MinimumQuantity!=0);o.length>0||f.IsNotEmpty(i)?f.IsNotEmpty(i)?e=this.applyPricebookToItem(e,i):e=this.applyPricebookToItem(e,o[0]):e=this.resetAppliedPricebook(e)}return e}resetAppliedPricebook(e){let i=(e?.Variant?.PriceBook).find(o=>o.ID==e.PriceBookID);return f.IsNotEmpty(i)&&(e.Discount=e.Variant.PriceDiscount,e.PriceBookID=f.GuidEmpty,e.Price=e.Variant.UnitPrice,e.UnitPrice=e.Variant.UnitPrice,e.PriceTypeID=0,e=this.applyPromotionProduct(e),e=this.removePromotionNote(e)),e}removePromotionNote(e){let t=this.appConfigJson.ModuleSell.ProductNotes;if(this.appConfigJson?.ModuleSell?.Pricebook?.PricebookVisible&&(e.Note=e.Note?.replace(e.PriceNote,""),e.PriceNote=""),t.CopyPromotionName){let o=e.Variant?.PriceNote;e.Note=`${o||""} ${e.Note?e.Note:""}`,e.PriceNote=o}return e}applyPricebookToItem(e,t){return e.Discount=t.PriceDiscount,e.UnitPrice=t.UnitPrice,e.PriceBookID=t.ID,e.Price=t.UnitPrice,e.PriceTypeID=2,e=this.assignItemNote(e,t),e}assignItemNote(e,t){return this.appConfigJson?.ModuleSell?.Pricebook?.PricebookVisible?(e.Note?.includes(e.PriceNote)?e.Note=e.Note?.replace(e.PriceNote,t.Name):e.Note=`${t.Name} ${e.Note?e.Note:""}`,e.PriceNote=t.Name):(e.Note="",e.PriceNote=""),e}findCustomerPricebook(e=[]){let t=this._customerHttpService.Data,i;return t&&(i=e.find(o=>o.ID==t.PricebookID)),i}static \u0275fac=function(t){return new(t||n)(g(Mo),g(z),g(B),g(L),g(je),g(Re),g(wt),g(Bi),g(De),g(q))};static \u0275prov=I({token:n,factory:n.\u0275fac,providedIn:"root"})};function Or(n,e){if(n&1&&(a(0,"div",2)(1,"div",4),b(2,"input",8),s()()),n&2){let t=d();l(2),p("formControl",t.searchControl)}}function Dr(n,e){n&1&&(a(0,"span"),m(1,"Apply"),s())}function Mr(n,e){n&1&&(a(0,"span"),m(1,"Applying..."),s())}function xr(n,e){if(n&1){let t=E();a(0,"tr")(1,"td"),m(2),s(),a(3,"td"),m(4),s(),a(5,"td",9),m(6),y(7,"number"),s(),a(8,"td",9),m(9),y(10,"number"),s(),a(11,"td",10)(12,"button",11),S("click",function(){let o=v(t).$implicit,r=d();return _(r.onSelectReward(o))}),h(13,Dr,2,0,"span"),h(14,Mr,2,0,"span"),s()()()}if(n&2){let t=e.$implicit,i=d();l(2),O(t.VariantName),l(2),O(t.VariantCode),l(2),O(x(7,7,t.OriginalPrice)),l(3),O(x(10,9,t.UnitPrice)),l(3),p("disabled",i.isApplyingReward()),l(),C(i.isApplyingReward()?-1:13),l(),C(i.isApplyingReward()?14:-1)}}var ji=class n{constructor(e,t,i,o,r,c){this._dialogRef=e;this._matDialog=t;this._shoppingCartService=i;this._promotionEventService=o;this._toastr=r;this.data=c;this.selectedPromotion=this._promotionEventService.selectedPromotion}modalConfig=new ie;selectedPromotion;rewards$;searchControl=new et;isApplyingReward=R(!1);ngOnInit(){this.modalConfig.title="Select a Reward",this.modalConfig.hideFooter=!0,this.initRewards(!0)}initRewards(e){this.rewards$=this.searchControl.valueChanges.pipe(si(""),ht(e?0:500),Fe(),Y(t=>{let i;return i=ke(this.data.rewards).pipe(J(o=>o.filter(r=>this.findKeywordInValue(t,r?.VariantCode)||this.findKeywordInValue(t,r?.VariantName)))),e=!0,i}))}findKeywordInValue(e,t){return t?.toUpperCase()?.indexOf(e?.toUpperCase())>-1}onSelectReward(e){return ni(this,null,function*(){if(!this.isApplyingReward()){this.isApplyingReward.set(!0);try{e.PromotionType=this.data.promotion.TypeID,yield this._shoppingCartService.addCartItemById(e.VariantID,e,!0).then(()=>{this._matDialog.closeAll(),this._promotionEventService.pushNewValue(this._promotionEventService.Data),this.showToastAppliedPromo()})}finally{this.isApplyingReward.set(!1)}}})}showToastAppliedPromo(){this._toastr.success("Applied "+this.selectedPromotion.Name+" to order!","Applied successfully!")}close(){this._dialogRef.close()}static \u0275fac=function(t){return new(t||n)(P(te),P(we),P(kt),P(Ae),P(L),P(fe))};static \u0275cmp=A({type:n,selectors:[["POS-modal-select-item"]],standalone:!1,decls:23,vars:8,consts:[[3,"onCancel","onClose","config"],[1,"container"],[1,"row","mb-3"],[1,"row"],[1,"col-12"],[1,"table","table-bordered"],[1,"thead-light"],["scope","col"],["type","text","placeholder","Type to filter reward",1,"form-control",3,"formControl"],[1,"text-end"],[1,"text-center"],[1,"btn","btn-sm","btn-success",3,"click","disabled"]],template:function(t,i){t&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.close()})("onClose",function(){return i.close()}),a(1,"content")(2,"div",1),h(3,Or,3,1,"div",2),a(4,"div",3)(5,"div",4)(6,"table",5)(7,"thead",6)(8,"tr")(9,"th",7),m(10,"Name"),s(),a(11,"th",7),m(12,"Code"),s(),a(13,"th",7),m(14,"Price"),s(),a(15,"th",7),m(16,"Promo"),s(),b(17,"th",7),s()(),a(18,"tbody"),K(19,xr,15,11,"tr",null,ve),y(21,"async"),y(22,"sortBy"),s()()()()()()()),t&2&&(p("config",i.modalConfig),l(3),C((i.data==null||i.data.rewards==null?null:i.data.rewards.length)>5?3:-1),l(16),Z(_t(22,4,x(21,2,i.rewards$),"desc","VariantCode")))},dependencies:[Te,Pe,bt,ne,ze,q,Dt],styles:[".table-scroll[_ngcontent-%COMP%]{max-height:400px;overflow-y:auto}table[_ngcontent-%COMP%]{max-width:600px!important;overflow-x:hidden}"]})};function Ir(n,e){if(n&1&&(a(0,"div",3)(1,"div",5),b(2,"input",10),s()()),n&2){let t=d();l(2),p("formControl",t.searchCtrl)}}function Tr(n,e){n&1&&(a(0,"th",9),m(1,"Qty"),s())}function Er(n,e){n&1&&b(0,"th",8)}function wr(n,e){if(n&1){let t=E();a(0,"td")(1,"input",13),j("ngModelChange",function(o){v(t);let r=d().$implicit;return V(r.Quantity,o)||(r.Quantity=o),_(o)}),s()()}if(n&2){let t=d().$implicit;l(),H("ngModel",t.Quantity)}}function Rr(n,e){n&1&&(a(0,"span"),m(1,"Apply"),s())}function Nr(n,e){n&1&&(a(0,"span"),m(1,"Applying..."),s())}function Ar(n,e){if(n&1){let t=E();a(0,"td",12)(1,"button",14),S("click",function(){v(t);let o=d().$implicit,r=d();return _(r.onApplyReward(o))}),h(2,Rr,2,0,"span"),h(3,Nr,2,0,"span"),s()()}if(n&2){let t=d(2);l(),p("disabled",t.isApplyingReward()),l(),C(t.isApplyingReward()?-1:2),l(),C(t.isApplyingReward()?3:-1)}}function kr(n,e){if(n&1&&(a(0,"tr")(1,"td"),m(2),s(),a(3,"td"),m(4),s(),a(5,"td",11),m(6),y(7,"number"),s(),a(8,"td",11),m(9),y(10,"number"),s(),h(11,wr,2,1,"td")(12,Ar,4,3,"td",12),s()),n&2){let t=e.$implicit,i=d();l(2),O(t.VariantName),l(2),O(t.VariantCode),l(2),O(x(7,5,t.OriginalPrice)),l(3),O(x(10,7,t.UnitPrice)),l(2),C(i.rewardQuantity>1?11:12)}}var Qi=class n{constructor(e,t,i,o,r,c){this.data=e;this.shoppingCartService=t;this.promotionEventService=i;this.dialogRef=o;this.matDialog=r;this.toastr=c;this.searchCtrl=new et,this.rewardQuantity=e.rewardQuantity,this.sourceRewards=[...e.rewards]}modalConfig;rewards$;rewardQuantity;rewards;sourceRewards=[];searchCtrl;isApplyingReward=R(!1);ngOnInit(){this.initModalConfig(),this.initSearchCtrl(!0)}initModalConfig(){this.modalConfig=new ie,this.modalConfig.title="Select a Reward",this.rewardQuantity<2&&(this.modalConfig.hideFooter=!0)}initSearchCtrl(e){this.rewards$=this.searchCtrl.valueChanges.pipe(si(""),ht(e?0:500),Fe(),Y(t=>{let i;return i=ke(this.sourceRewards).pipe(J(o=>(o.length===1&&(o[0].Quantity=this.rewardQuantity),o)),J(o=>o.filter(r=>this.findKeywordInValue(t,r?.VariantCode)||this.findKeywordInValue(t,r?.VariantName)))),e=!1,i}),le(t=>{this.rewards=t}))}findKeywordInValue(e,t){return t?.toUpperCase()?.indexOf(e.toUpperCase())>-1}onApplyReward(e){return ni(this,null,function*(){if(!this.isApplyingReward()){this.isApplyingReward.set(!0);try{yield this.addRewardToShoppingCart(e)}finally{this.isApplyingReward.set(!1)}}})}onClose(){this.dialogRef.close()}onOk(){this.calculateRewardQty()>this.rewardQuantity?this.toastr.warning("Product reward exceeds the maximum amount earned","Warning"):[...this.rewards].filter(i=>i.Quantity>0).forEach(i=>{this.addRewardToShoppingCart(i)})}calculateRewardQty(){let e=0;return this.rewards.forEach(t=>{e+=t.Quantity?t.Quantity:0}),e}addRewardToShoppingCart(e){return e.PromotionType=this.data.promotion.TypeID,this.shoppingCartService.addCartItemById(e.VariantID,e,!0).then(()=>{this.matDialog.closeAll(),this.promotionEventService.pushNewValue(this.promotionEventService.Data)})}static \u0275fac=function(t){return new(t||n)(P(fe),P(kt),P(Ae),P(te),P(we),P(L))};static \u0275cmp=A({type:n,selectors:[["app-modal-quantity-reward"]],standalone:!1,decls:27,vars:10,consts:[[3,"onCancel","onOk","onClose","config"],[1,"ms-3"],[1,"container"],[1,"row","mb-3"],[1,"row","table-scroll"],[1,"col-12"],[1,"table","table-bordered"],[1,"thead-light"],["scope","col"],["scope","col",2,"width","66px"],["type","text","placeholder","Type to filter reward",1,"form-control",3,"formControl"],[1,"text-end"],[1,"text-center"],["type","text","autoNum","","min","0",1,"form-control",3,"ngModelChange","ngModel"],[1,"btn","btn-sm","btn-success",3,"click","disabled"]],template:function(t,i){t&1&&(a(0,"modal-material",0),S("onCancel",function(){return i.onClose()})("onOk",function(){return i.onOk()})("onClose",function(){return i.onClose()}),a(1,"header")(2,"small",1),m(3),s()(),a(4,"content")(5,"div",2),h(6,Ir,3,1,"div",3),a(7,"div",4)(8,"div",5)(9,"table",6)(10,"thead",7)(11,"tr")(12,"th",8),m(13,"Name"),s(),a(14,"th",8),m(15,"Code"),s(),a(16,"th",8),m(17,"Price"),s(),a(18,"th",8),m(19,"Promo"),s(),h(20,Tr,2,0,"th",9)(21,Er,1,0,"th",8),s()(),a(22,"tbody"),K(23,kr,13,9,"tr",null,ve),y(25,"async"),y(26,"sortBy"),s()()()()()()()),t&2&&(p("config",i.modalConfig),l(3),M(" ( ",i.rewardQuantity," products reward ) "),l(3),C((i.sourceRewards==null?null:i.sourceRewards.length)>5?6:-1),l(14),C(i.rewardQuantity>1?20:21),l(3),Z(_t(26,6,x(25,4,i.rewards$),"desc","VariantCode")))},dependencies:[Te,Pe,Ee,bt,ne,Ot,ze,q,Dt],encapsulation:2})};var Ae=class n{constructor(e,t,i,o,r,c,u,D,F){this._orderDataService=e;this._outletService=t;this._invoiceCalculatorService=i;this._dialog=o;this._httpService=r;this._posService=c;this._toastr=u;this._signalrService=D;this.decimalPipe=F;this.previousQuantity=0,this.previousTotalEligible=0,this.subscribeNotification(),this._posService.Data$.subscribe(W=>{this.taxes=W.Taxes}),this._outletService.Data$.subscribe(W=>{this.loadPromotions(W.Promotion)}),this._orderDataService.Data$.pipe(ce(W=>{this.salesOrderData=W;let ye=this.calculateOrderReward(W.getRewards()),_n=this.calculateOrderReward(this.previousRewards);return this.previousQuantity!=W.TotalQuantity||_n<ye||this.isRestroreOrder}),ht(100)).subscribe(W=>{this.isRestroreOrder=!1,this.checkQtyPromotion(),this.applyQuantityPromotion(),this.previousRewards=[...W.getRewards()]}),this._invoiceCalculatorService.Data$.subscribe(W=>{this.checkEligiblePromotionWithMinSpend()})}_Data=new be([]);get Data(){return this._Data.getValue()}Data$=this._Data.asObservable();selectedPromotion=null;onClickToastPromo=new Me;previousQuantity;salesOrderData;orderDataBeforePromotion;taxes=[];previousTotalEligible;previousRewards=[];isRestroreOrder=!1;calculateOrderReward(e){let t=0;return e.length>0&&(t=e.map(i=>i.Quantity).reduce((i,o)=>i+o)),t}checkQtyPromotion(){let e=this._orderDataService.Data;this.checkEligibleQtyPromotion(e.CartItems),this.checkEligibleTierPromotion(e.CartItems),this.previousQuantity=e.TotalQuantity}subscribeNotification(){this._signalrService.OnPromotionEventChange.pipe(ee(),Y(()=>{let e=this._outletService.Data?.RegisterID;return this.getPromotions(e)})).subscribe(()=>{this._toastr.info("Promotion Event Updated","Promotion Update")})}getPromotions(e){return this._httpService.get(U.GetListPromotion,[{key:"RegisterID",value:e}]).pipe(le(t=>{this.loadPromotions(t)}))}loadPromotions(e){let t=this.getPromotionDesc(e);this.pushNewValue(t),this.checkQtyPromotion(),this.checkEligiblePromotionWithMinSpend()}pushNewValue(e){this.showToastEligiblePromotion(),this._Data.next(e)}checkSelectedPromotionRequirement(e){this.selectedPromotion!=null&&this.selectedPromotion.TypeID==e&&this.Data.find(i=>i.ID===this.selectedPromotion.ID)?.Eligible===!1&&(this._dialog.open(Fi,{id:"modal-promotion-confirm",data:{message:"Order will be restored to before the promotion is applied"},disableClose:!0}),this.isRestroreOrder=!0)}restoreOrder(){this._orderDataService.pushNewValue(this.orderDataBeforePromotion),this.selectedPromotion=null}getPromotionDesc(e=[]){return e?.map(i=>(i.Description=this.generatePromotionDesc(i),i))}checkEligiblePromotionWithMinSpend(){let e=this._invoiceCalculatorService.Data,t=this.Data?.filter(o=>(o.TypeID===1||o.TypeID==3)&&!this.checkExpiredPromotion(o)).map(o=>(e>=o.MinimumAmount?o.Eligible=!0:o.Eligible=!1,o)),i=this.mappingEligiblePromotion(t);this.pushNewValue(i),this.checkSelectedPromotionRequirement(1),this.checkSelectedPromotionRequirement(3)}checkEligibleQtyPromotion(e){let t=0,i=this.Data?.filter(r=>r.TypeID===2&&!this.checkExpiredPromotion(r)).map(r=>(r.Eligible=!1,r.ListVariant.length>0?(t=this.getQuantityByRequirementType(e,"variant",r.ListVariant),t>=r.MinimumAmount&&(r.Eligible=!0)):r.ListCategory.length>0?(t=this.getQuantityByRequirementType(e,"category",r.ListCategory),t>=r.MinimumAmount&&(r.Eligible=!0)):this.salesOrderData.TotalQuantity>=r.MinimumAmount&&(r.Eligible=!0),r)),o=this.mappingEligiblePromotion(i);this.pushNewValue(o)}checkEligibleTierPromotion(e){let t,i=this.Data?.filter(r=>r.TypeID===5&&!this.checkExpiredPromotion(r)).map(r=>(r.Eligible=!1,r.ListVariant.length>0?t=this.getQuantityByRequirementType(e,"variant",r.ListVariant):r.ListCategory.length>0?t=this.getQuantityByRequirementType(e,"category",r.ListCategory):t=this.salesOrderData.TotalQuantity,r.PromotionTieredQuantity.forEach(c=>{t>=c.Quantity&&(r.Eligible=!0)}),r)),o=this.mappingEligiblePromotion(i);this.pushNewValue(o)}getQuantityByRequirementType(e,t,i){let o=0,r;return t=="variant"?e.forEach(c=>{r=i.findIndex(u=>u.ID===c.VariantID),r!==-1&&(o+=c.Quantity)}):e.forEach(c=>{c.Variant&&(r=i.findIndex(u=>u.ID===c.Variant.CategoryID),r!==-1&&(o+=c.Quantity))}),o}mappingEligiblePromotion(e=[]){let t=this.Data;if(e?.length>0){let i;t=this.Data?.map(o=>(i=e.findIndex(r=>r.ID==o.ID),i!==-1&&(o=e[i]),o))}return t}checkExpiredPromotion(e){let t=new Date,i=new Date(e.StartDate),r=(f.IsEmpty(e.StartTime)?"00:00:00":e.StartTime).split(":").map(F=>parseInt(F));i.setHours(r[0],r[1],r[2]);let c=new Date(e.ExpirationDate),D=(f.IsEmpty(e.EndTime)?"23:59:59":e.EndTime).split(":").map(F=>parseInt(F));return c.setHours(D[0],D[1],D[2]),!(t.getTime()>=i.getTime()&&t.getTime()<=c.getTime())}showToastEligiblePromotion(){let e=this.getTotalEligiblePromotion(),t=f.IsNotEmpty(this.salesOrderData.Order.ID);this.previousTotalEligible!==e&&e>0&&!t&&this._toastr.info(e+" promotion(s) can be applied!","Promo available!",{timeOut:2e4}).onTap.pipe(Qe(1)).subscribe(()=>{this.onClickToastPromo.next(!0)}),this.previousTotalEligible=e}getTotalEligiblePromotion(){return this.Data?.filter(t=>t.Eligible).length}generatePromotionDesc(e){let t="";switch(e.TypeID){case 2:t+="Minimum "+this.decimalPipe.transform(e.MinimumAmount)+" ",e.ListVariant.length>0?(t=t+" piece of ",t+=this.generateItemListDescription(e.ListVariant)):e.ListCategory.length>0?(t+="from category ",t+=this.generateItemListDescription(e.ListCategory)):t+="items";break;case 1:t+="Minimum spend Rp. "+this.decimalPipe.transform(e.MinimumAmount);break;case 3:t+=`Apply
|
|
3
3
|
${e.Discount1!==0?"discount1 = "+e.Discount1+"%":""}
|
|
4
4
|
${e.Discount1!==0&&e.Discount2!==0?" and ":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as w,d as I,k as r,l as N}from"./chunk-
|
|
1
|
+
import{c as w,d as I,k as r,l as N}from"./chunk-RIZ4YVMH.js";import{S as E,V as B,pa as s,xa as x}from"./chunk-Z76C52NM.js";import{Ia as g,Vc as n,bd as D,fc as v,ib as p,ic as y,jb as u,jc as m,kc as S,la as l,ma as b,mb as f,na as c,nb as h,pa as a,xd as C,yc as z}from"./chunk-L3U6V3BF.js";var M=`
|
|
2
2
|
.p-badge {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
border-radius: dt('badge.border.radius');
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as Ze,b as Ye}from"./chunk-DC3TCY6D.js";import{a as K}from"./chunk-LNDHYAFW.js";import{a as Ue,e as Ke,f as We}from"./chunk-26YFRPR2.js";import{A as He,C as Qe,G as Ve,H as Be,O as $e,S as je,T as qe,f as Re,g as Le,j as Fe,ka as Ge,la as le,o as Ae,q as Pe,r as Ne}from"./chunk-7P3L3ODB.js";import{f as Oe}from"./chunk-DWZ5JTI2.js";import{$ as S,$c as z,Ab as v,Ac as we,Ca as f,Cb as B,Db as $,Eb as j,Fa as be,Fb as u,Ga as ye,Gb as d,Ha as xe,Hb as c,Ia as te,Ib as ie,Ja as O,Ka as R,Lc as Te,Ob as M,Oc as G,Pb as Ie,Sb as ne,Ub as p,Vb as F,Wb as A,Xa as s,Xb as g,Ya as E,Yb as P,Za as Ce,Zb as m,Zc as U,_b as h,a as he,aa as _e,ab as k,ad as ze,cc as re,d as N,da as b,db as Se,dc as Ee,ec as D,gb as Me,gc as q,hc as x,ib as w,ic as C,jb as Q,kb as y,la as ve,ma as H,mb as L,na as ge,nd as se,o as ue,ob as V,pa as l,pb as De,t as fe,ta as X,tc as ke,ua as ee,wb as T,wc as ae,yb as _,yc as oe}from"./chunk-IEVGW2RT.js";var nt=["*"];function rt(t,a){t&1&&A(0)}var pe=(()=>{class t{_elementRef=l(O);constructor(){}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}return t})(),de=(()=>{class t{template=l(k);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepLabel",""]]})}return t})();var I={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},at=new ge("STEPPER_GLOBAL_OPTIONS"),W=(()=>{class t{_stepperOptions;_stepper=l(Z);_displayDefaultIndicatorType;stepLabel;_childForms;content;stepControl;get interacted(){return this._interacted()}set interacted(e){this._interacted.set(e)}_interacted=f(!1);interactedStream=new E;label;errorMessage;ariaLabel;ariaLabelledby;get state(){return this._state()}set state(e){this._state.set(e)}_state=f(void 0);get editable(){return this._editable()}set editable(e){this._editable.set(e)}_editable=f(!0);optional=!1;get completed(){let e=this._completedOverride(),i=this._interacted();return e??(i&&(!this.stepControl||this.stepControl.valid))}set completed(e){this._completedOverride.set(e)}_completedOverride=f(null);index=f(-1);isSelected=G(()=>this._stepper.selectedIndex===this.index());indicatorType=G(()=>{let e=this.isSelected(),i=this.completed,n=this._state()??I.NUMBER,r=this._editable();return this._showError()&&this.hasError&&!e?I.ERROR:this._displayDefaultIndicatorType?!i||e?I.NUMBER:r?I.EDIT:I.DONE:i&&!e?I.DONE:i&&e?n:r&&e?I.EDIT:n});isNavigable=G(()=>{let e=this.isSelected();return this.completed||e||!this._stepper.linear});get hasError(){let e=this._customError();return e??this._getDefaultError()}set hasError(e){this._customError.set(e)}_customError=f(null);_getDefaultError(){return this.interacted&&!!this.stepControl?.invalid}constructor(){let e=l(at,{optional:!0});this._stepperOptions=e||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this._interacted.set(!1),this._completedOverride()!=null&&this._completedOverride.set(!1),this._customError()!=null&&this._customError.set(!1),this.stepControl&&(this._childForms?.forEach(e=>e.resetForm?.()),this.stepControl.reset())}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this._interacted()||(this._interacted.set(!0),this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError()!=null}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["cdk-step"]],contentQueries:function(i,n,r){if(i&1&&(g(r,de,5),g(r,Oe,5)),i&2){let o;m(o=h())&&(n.stepLabel=o.first),m(o=h())&&(n._childForms=o)}},viewQuery:function(i,n){if(i&1&&P(k,7),i&2){let r;m(r=h())&&(n.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],state:"state",editable:[2,"editable","editable",z],optional:[2,"optional","optional",z],completed:[2,"completed","completed",z],hasError:[2,"hasError","hasError",z]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[xe],ngContentSelectors:nt,decls:1,vars:0,template:function(i,n){i&1&&(F(),De(0,rt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return t})(),Z=(()=>{class t{_dir=l(Ve,{optional:!0});_changeDetectorRef=l(U);_elementRef=l(O);_destroyed=new N;_keyManager;_steps;steps=new R;_stepHeader;_sortedHeaders=new R;linear=!1;get selectedIndex(){return this._selectedIndex()}set selectedIndex(e){this._steps?(this._isValidIndex(e),this.selectedIndex!==e&&(this.selected?._markAsInteracted(),!this._anyControlsInvalidOrPending(e)&&(e>=this.selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e))):this._selectedIndex.set(e)}_selectedIndex=f(0);get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}selectionChange=new E;selectedIndexChange=new E;_groupId=l(He).getId("cdk-stepper-");get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation(e==="vertical")}_orientation="horizontal";constructor(){}ngAfterContentInit(){this._steps.changes.pipe(S(this._steps),b(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(i=>i._stepper===this)),this.steps.forEach((i,n)=>i.index.set(n)),this.steps.notifyOnChanges()})}ngAfterViewInit(){if(this._stepHeader.changes.pipe(S(this._stepHeader),b(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((i,n)=>i._elementRef.nativeElement.compareDocumentPosition(n._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Qe(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),this._keyManager.updateActiveItem(this.selectedIndex),(this._dir?this._dir.change:ue()).pipe(S(this._layoutDirection()),b(this._destroyed)).subscribe(e=>this._keyManager?.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this.selectedIndex),this.steps.changes.subscribe(()=>{this.selected||this._selectedIndex.set(Math.max(this.selectedIndex-1,0))}),this._isValidIndex(this.selectedIndex)||this._selectedIndex.set(0),this.linear&&this.selectedIndex>0){let e=this.steps.toArray().slice(0,this._selectedIndex());for(let i of e)i._markAsInteracted()}}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex()+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex()-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`${this._groupId}-label-${e}`}_getStepContentId(e){return`${this._groupId}-content-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){let i=e-this._selectedIndex();return i<0?this._layoutDirection()==="rtl"?"next":"previous":i>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex()}_updateSelectedItemIndex(e){let i=this.steps.toArray(),n=this._selectedIndex();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:n,selectedStep:i[e],previouslySelectedStep:i[n]}),this._keyManager&&(this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e)),this._selectedIndex.set(e),this.selectedIndexChange.emit(e),this._stateChanged()}_onKeydown(e){let i=Re(e),n=e.keyCode,r=this._keyManager;r?.activeItemIndex!=null&&!i&&(n===32||n===13)?(this.selectedIndex=r.activeItemIndex,e.preventDefault()):r?.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(i=>{let n=i.stepControl;return(n?n.invalid||n.pending||!i.interacted:!i.completed)&&!i.optional&&!i._completedOverride()}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,i=Fe();return e===i||e.contains(i)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(i,n,r){if(i&1&&(g(r,W,5),g(r,pe,5)),i&2){let o;m(o=h())&&(n._steps=o),m(o=h())&&(n._stepHeader=o)}},inputs:{linear:[2,"linear","linear",z],selectedIndex:[2,"selectedIndex","selectedIndex",ze],selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"]})}return t})();var Je=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=H({imports:[Be]})}return t})();var ot=(t,a,e)=>({index:t,active:a,optional:e});function st(t,a){if(t&1&&M(0,2),t&2){let e=p();u("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",we(2,ot,e.index,e.active,e.optional))}}function lt(t,a){if(t&1&&(d(0,"span",7),x(1),c()),t&2){let e=p(2);s(),C(e._getDefaultTextForState(e.state))}}function pt(t,a){if(t&1&&(d(0,"span",8),x(1),c()),t&2){let e=p(3);s(),C(e._intl.completedLabel)}}function dt(t,a){if(t&1&&(d(0,"span",8),x(1),c()),t&2){let e=p(3);s(),C(e._intl.editableLabel)}}function ct(t,a){if(t&1&&(_(0,pt,2,1,"span",8)(1,dt,2,1,"span",8),d(2,"mat-icon",7),x(3),c()),t&2){let e=p(2);v(e.state==="done"?0:e.state==="edit"?1:-1),s(3),C(e._getDefaultTextForState(e.state))}}function mt(t,a){if(t&1&&_(0,lt,2,1,"span",7)(1,ct,4,2),t&2){let e,i=p();v((e=i.state)==="number"?0:1)}}function ht(t,a){t&1&&(d(0,"div",4),M(1,9),c()),t&2&&(s(),u("ngTemplateOutlet",a.template))}function ut(t,a){if(t&1&&(d(0,"div",4),x(1),c()),t&2){let e=p();s(),C(e.label)}}function ft(t,a){if(t&1&&(d(0,"div",5),x(1),c()),t&2){let e=p();s(),C(e._intl.optionalLabel)}}function _t(t,a){if(t&1&&(d(0,"div",6),x(1),c()),t&2){let e=p();s(),C(e.errorMessage)}}var Xe=["*"];function vt(t,a){}function gt(t,a){if(t&1&&(A(0),V(1,vt,0,0,"ng-template",0)),t&2){let e=p();s(),u("cdkPortalOutlet",e._portal)}}var bt=["animatedContainer"],et=t=>({step:t});function yt(t,a){t&1&&A(0)}function xt(t,a){t&1&&ie(0,"div",7)}function Ct(t,a){if(t&1&&(M(0,6),_(1,xt,1,0,"div",7)),t&2){let e=a.$implicit,i=a.$index,n=a.$count;p(2);let r=re(4);u("ngTemplateOutlet",r)("ngTemplateOutletContext",oe(3,et,e)),s(),v(i!==n-1?1:-1)}}function St(t,a){if(t&1&&(d(0,"div",8,1),M(2,9),c()),t&2){let e=a.$implicit,i=a.$index,n=p(2);q("mat-horizontal-stepper-content-"+n._getAnimationDirection(i)),u("id",n._getStepContentId(i)),T("aria-labelledby",n._getStepLabelId(i))("inert",n.selectedIndex===i?null:""),s(2),u("ngTemplateOutlet",e.content)}}function Mt(t,a){if(t&1&&(d(0,"div",2)(1,"div",3),$(2,Ct,2,5,null,null,B),c(),d(4,"div",4),$(5,St,3,6,"div",5,B),c()()),t&2){let e=p();s(2),j(e.steps),s(3),j(e.steps)}}function Dt(t,a){if(t&1&&(d(0,"div",10),M(1,6),d(2,"div",11,1)(4,"div",12)(5,"div",13),M(6,9),c()()()()),t&2){let e=a.$implicit,i=a.$index,n=a.$index,r=a.$count,o=p(2),J=re(4);s(),u("ngTemplateOutlet",J)("ngTemplateOutletContext",oe(10,et,e)),s(),D("mat-stepper-vertical-line",n!==r-1)("mat-vertical-content-container-active",o.selectedIndex===i),T("inert",o.selectedIndex===i?null:""),s(2),u("id",o._getStepContentId(i)),T("aria-labelledby",o._getStepLabelId(i)),s(2),u("ngTemplateOutlet",e.content)}}function It(t,a){if(t&1&&$(0,Dt,7,12,"div",10,B),t&2){let e=p();j(e.steps)}}function Et(t,a){if(t&1){let e=Ie();d(0,"mat-step-header",14),ne("click",function(){let n=X(e).step;return ee(n.select())})("keydown",function(n){X(e);let r=p();return ee(r._onKeydown(n))}),c()}if(t&2){let e=a.step,i=p();D("mat-horizontal-stepper-header",i.orientation==="horizontal")("mat-vertical-stepper-header",i.orientation==="vertical"),u("tabIndex",i._getFocusIndex()===e.index()?0:-1)("id",i._getStepLabelId(e.index()))("index",e.index())("state",e.indicatorType())("label",e.stepLabel||e.label)("selected",e.isSelected())("active",e.isNavigable())("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!e.isNavigable())("color",e.color||i.color),T("aria-posinset",e.index()+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(e.index()))("aria-selected",e.isSelected())("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",e.isNavigable()?null:!0)}}var ce=(()=>{class t extends de{static \u0275fac=(()=>{let e;return function(n){return(e||(e=te(t)))(n||t)}})();static \u0275dir=y({type:t,selectors:[["","matStepLabel",""]],features:[L]})}return t})(),Y=(()=>{class t{changes=new N;optionalLabel="Optional";completedLabel="Completed";editableLabel="Editable";static \u0275fac=function(i){return new(i||t)};static \u0275prov=ve({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kt(t){return t||new Y}var wt={provide:Y,deps:[[new be,new ye,Y]],useFactory:kt},me=(()=>{class t extends pe{_intl=l(Y);_focusMonitor=l(Ae);_intlSubscription;state;label;errorMessage;iconOverrides;index;selected;active;optional;disableRipple;color;constructor(){super();let e=l(Pe);e.load(Ue),e.load(Ne);let i=l(U);this._intlSubscription=this._intl.changes.subscribe(()=>i.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._elementRef,e,i):this._elementRef.nativeElement.focus(i)}_stringLabel(){return this.label instanceof ce?null:this.label}_templateLabel(){return this.label instanceof ce?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getDefaultTextForState(e){return e=="number"?`${this.index+1}`:e=="edit"?"create":e=="error"?"warning":e}_hasEmptyLabel(){return!this._stringLabel()&&!this._templateLabel()&&!this._hasOptionalLabel()&&!this._hasErrorLabel()}_hasOptionalLabel(){return this.optional&&this.state!=="error"}_hasErrorLabel(){return this.state==="error"}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:4,hostBindings:function(i,n){i&2&&(q("mat-"+(n.color||"primary")),D("mat-step-header-empty-label",n._hasEmptyLabel()))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},features:[L],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],[1,"mat-step-text-label"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[3,"ngTemplateOutlet"]],template:function(i,n){if(i&1&&(ie(0,"div",0),d(1,"div")(2,"div",1),_(3,st,1,6,"ng-container",2)(4,mt,2,1),c()(),d(5,"div",3),_(6,ht,2,1,"div",4)(7,ut,2,1,"div",4),_(8,ft,2,1,"div",5),_(9,_t,2,1,"div",6),c()),i&2){let r;u("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disableRipple),s(),q(ke("mat-step-icon-state-",n.state," mat-step-icon")),D("mat-step-icon-selected",n.selected),s(2),v(n.iconOverrides&&n.iconOverrides[n.state]?3:4),s(2),D("mat-step-label-active",n.active)("mat-step-label-selected",n.selected)("mat-step-label-error",n.state=="error"),s(),v((r=n._templateLabel())?6:n._stringLabel()?7:-1,r),s(2),v(n._hasOptionalLabel()?8:-1),s(),v(n._hasErrorLabel()?9:-1)}},dependencies:[Ke,se,Ze],styles:[`.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-hover-state-layer-shape, var(--mat-sys-corner-medium))}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-focus-state-layer-shape, var(--mat-sys-corner-medium))}@media(hover: none){.mat-step-header:hover{background:none}}@media(forced-colors: active){.mat-step-header{outline:solid 1px}.mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.mat-step-header[aria-disabled=true]{outline-color:GrayText}.mat-step-header[aria-disabled=true] .mat-step-label,.mat-step-header[aria-disabled=true] .mat-step-icon,.mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color, var(--mat-sys-surface));background-color:var(--mat-stepper-header-icon-background-color, var(--mat-sys-on-surface-variant))}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color, transparent);color:var(--mat-stepper-header-error-state-icon-foreground-color, var(--mat-sys-error))}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-stepper-header-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-stepper-header-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color, var(--mat-sys-error));font-size:var(--mat-stepper-header-error-state-label-text-size, var(--mat-sys-title-small-size))}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-selected-state-label-text-weight, var(--mat-sys-title-small-weight))}.mat-step-header-empty-label .mat-step-label{min-width:0}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-selected-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-done-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-edit-state-icon-foreground-color, var(--mat-sys-on-primary))}
|
|
1
|
+
import{a as Ze,b as Ye}from"./chunk-6G7LPAEQ.js";import{a as K}from"./chunk-MWGICBEB.js";import{a as Ue,e as Ke,f as We}from"./chunk-3ZH3XK5V.js";import{A as He,C as Qe,G as Ve,H as Be,O as $e,S as je,T as qe,f as Re,g as Le,j as Fe,ka as Ge,la as le,o as Ae,q as Pe,r as Ne}from"./chunk-N7OS7SFI.js";import{f as Oe}from"./chunk-7MRUPBXU.js";import{$ as S,$b as m,$c as U,Ab as _,Ac as oe,Ca as f,Cb as v,Cc as we,Eb as B,Fa as be,Fb as $,Ga as ye,Gb as j,Ha as xe,Hb as u,Ia as te,Ib as d,Ja as O,Jb as c,Ka as R,Kb as ie,Nc as Te,Qb as M,Qc as G,Rb as Ie,Ub as ne,Wb as p,Xa as s,Xb as F,Ya as E,Yb as A,Za as Ce,Zb as g,_b as P,a as he,aa as _e,ab as k,ac as h,bd as z,cd as ze,d as N,da as b,db as Se,ec as re,fc as Ee,gb as Me,gc as D,ib as w,ic as q,jb as Q,jc as x,kb as y,kc as C,la as ve,ma as H,mb as L,na as ge,o as ue,ob as V,pa as l,pb as De,pd as se,t as fe,ta as X,ua as ee,vc as ke,wb as T,yc as ae}from"./chunk-L3U6V3BF.js";var nt=["*"];function rt(t,a){t&1&&A(0)}var pe=(()=>{class t{_elementRef=l(O);constructor(){}focus(){this._elementRef.nativeElement.focus()}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}return t})(),de=(()=>{class t{template=l(k);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepLabel",""]]})}return t})();var I={NUMBER:"number",EDIT:"edit",DONE:"done",ERROR:"error"},at=new ge("STEPPER_GLOBAL_OPTIONS"),W=(()=>{class t{_stepperOptions;_stepper=l(Z);_displayDefaultIndicatorType;stepLabel;_childForms;content;stepControl;get interacted(){return this._interacted()}set interacted(e){this._interacted.set(e)}_interacted=f(!1);interactedStream=new E;label;errorMessage;ariaLabel;ariaLabelledby;get state(){return this._state()}set state(e){this._state.set(e)}_state=f(void 0);get editable(){return this._editable()}set editable(e){this._editable.set(e)}_editable=f(!0);optional=!1;get completed(){let e=this._completedOverride(),i=this._interacted();return e??(i&&(!this.stepControl||this.stepControl.valid))}set completed(e){this._completedOverride.set(e)}_completedOverride=f(null);index=f(-1);isSelected=G(()=>this._stepper.selectedIndex===this.index());indicatorType=G(()=>{let e=this.isSelected(),i=this.completed,n=this._state()??I.NUMBER,r=this._editable();return this._showError()&&this.hasError&&!e?I.ERROR:this._displayDefaultIndicatorType?!i||e?I.NUMBER:r?I.EDIT:I.DONE:i&&!e?I.DONE:i&&e?n:r&&e?I.EDIT:n});isNavigable=G(()=>{let e=this.isSelected();return this.completed||e||!this._stepper.linear});get hasError(){let e=this._customError();return e??this._getDefaultError()}set hasError(e){this._customError.set(e)}_customError=f(null);_getDefaultError(){return this.interacted&&!!this.stepControl?.invalid}constructor(){let e=l(at,{optional:!0});this._stepperOptions=e||{},this._displayDefaultIndicatorType=this._stepperOptions.displayDefaultIndicatorType!==!1}select(){this._stepper.selected=this}reset(){this._interacted.set(!1),this._completedOverride()!=null&&this._completedOverride.set(!1),this._customError()!=null&&this._customError.set(!1),this.stepControl&&(this._childForms?.forEach(e=>e.resetForm?.()),this.stepControl.reset())}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this._interacted()||(this._interacted.set(!0),this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??this._customError()!=null}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["cdk-step"]],contentQueries:function(i,n,r){if(i&1&&(g(r,de,5),g(r,Oe,5)),i&2){let o;m(o=h())&&(n.stepLabel=o.first),m(o=h())&&(n._childForms=o)}},viewQuery:function(i,n){if(i&1&&P(k,7),i&2){let r;m(r=h())&&(n.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],state:"state",editable:[2,"editable","editable",z],optional:[2,"optional","optional",z],completed:[2,"completed","completed",z],hasError:[2,"hasError","hasError",z]},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[xe],ngContentSelectors:nt,decls:1,vars:0,template:function(i,n){i&1&&(F(),De(0,rt,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}return t})(),Z=(()=>{class t{_dir=l(Ve,{optional:!0});_changeDetectorRef=l(U);_elementRef=l(O);_destroyed=new N;_keyManager;_steps;steps=new R;_stepHeader;_sortedHeaders=new R;linear=!1;get selectedIndex(){return this._selectedIndex()}set selectedIndex(e){this._steps?(this._isValidIndex(e),this.selectedIndex!==e&&(this.selected?._markAsInteracted(),!this._anyControlsInvalidOrPending(e)&&(e>=this.selectedIndex||this.steps.toArray()[e].editable)&&this._updateSelectedItemIndex(e))):this._selectedIndex.set(e)}_selectedIndex=f(0);get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}selectionChange=new E;selectedIndexChange=new E;_groupId=l(He).getId("cdk-stepper-");get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation(e==="vertical")}_orientation="horizontal";constructor(){}ngAfterContentInit(){this._steps.changes.pipe(S(this._steps),b(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(i=>i._stepper===this)),this.steps.forEach((i,n)=>i.index.set(n)),this.steps.notifyOnChanges()})}ngAfterViewInit(){if(this._stepHeader.changes.pipe(S(this._stepHeader),b(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((i,n)=>i._elementRef.nativeElement.compareDocumentPosition(n._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Qe(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation(this._orientation==="vertical"),this._keyManager.updateActiveItem(this.selectedIndex),(this._dir?this._dir.change:ue()).pipe(S(this._layoutDirection()),b(this._destroyed)).subscribe(e=>this._keyManager?.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this.selectedIndex),this.steps.changes.subscribe(()=>{this.selected||this._selectedIndex.set(Math.max(this.selectedIndex-1,0))}),this._isValidIndex(this.selectedIndex)||this._selectedIndex.set(0),this.linear&&this.selectedIndex>0){let e=this.steps.toArray().slice(0,this._selectedIndex());for(let i of e)i._markAsInteracted()}}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex()+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex()-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`${this._groupId}-label-${e}`}_getStepContentId(e){return`${this._groupId}-content-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){let i=e-this._selectedIndex();return i<0?this._layoutDirection()==="rtl"?"next":"previous":i>0?this._layoutDirection()==="rtl"?"previous":"next":"current"}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex()}_updateSelectedItemIndex(e){let i=this.steps.toArray(),n=this._selectedIndex();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:n,selectedStep:i[e],previouslySelectedStep:i[n]}),this._keyManager&&(this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e)),this._selectedIndex.set(e),this.selectedIndexChange.emit(e),this._stateChanged()}_onKeydown(e){let i=Re(e),n=e.keyCode,r=this._keyManager;r?.activeItemIndex!=null&&!i&&(n===32||n===13)?(this.selectedIndex=r.activeItemIndex,e.preventDefault()):r?.setFocusOrigin("keyboard").onKeydown(e)}_anyControlsInvalidOrPending(e){return this.linear&&e>=0?this.steps.toArray().slice(0,e).some(i=>{let n=i.stepControl;return(n?n.invalid||n.pending||!i.interacted:!i.completed)&&!i.optional&&!i._completedOverride()}):!1}_layoutDirection(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_containsFocus(){let e=this._elementRef.nativeElement,i=Fe();return e===i||e.contains(i)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["","cdkStepper",""]],contentQueries:function(i,n,r){if(i&1&&(g(r,W,5),g(r,pe,5)),i&2){let o;m(o=h())&&(n._steps=o),m(o=h())&&(n._stepHeader=o)}},inputs:{linear:[2,"linear","linear",z],selectedIndex:[2,"selectedIndex","selectedIndex",ze],selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange",selectedIndexChange:"selectedIndexChange"},exportAs:["cdkStepper"]})}return t})();var Je=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=H({imports:[Be]})}return t})();var ot=(t,a,e)=>({index:t,active:a,optional:e});function st(t,a){if(t&1&&M(0,2),t&2){let e=p();u("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",we(2,ot,e.index,e.active,e.optional))}}function lt(t,a){if(t&1&&(d(0,"span",7),x(1),c()),t&2){let e=p(2);s(),C(e._getDefaultTextForState(e.state))}}function pt(t,a){if(t&1&&(d(0,"span",8),x(1),c()),t&2){let e=p(3);s(),C(e._intl.completedLabel)}}function dt(t,a){if(t&1&&(d(0,"span",8),x(1),c()),t&2){let e=p(3);s(),C(e._intl.editableLabel)}}function ct(t,a){if(t&1&&(_(0,pt,2,1,"span",8)(1,dt,2,1,"span",8),d(2,"mat-icon",7),x(3),c()),t&2){let e=p(2);v(e.state==="done"?0:e.state==="edit"?1:-1),s(3),C(e._getDefaultTextForState(e.state))}}function mt(t,a){if(t&1&&_(0,lt,2,1,"span",7)(1,ct,4,2),t&2){let e,i=p();v((e=i.state)==="number"?0:1)}}function ht(t,a){t&1&&(d(0,"div",4),M(1,9),c()),t&2&&(s(),u("ngTemplateOutlet",a.template))}function ut(t,a){if(t&1&&(d(0,"div",4),x(1),c()),t&2){let e=p();s(),C(e.label)}}function ft(t,a){if(t&1&&(d(0,"div",5),x(1),c()),t&2){let e=p();s(),C(e._intl.optionalLabel)}}function _t(t,a){if(t&1&&(d(0,"div",6),x(1),c()),t&2){let e=p();s(),C(e.errorMessage)}}var Xe=["*"];function vt(t,a){}function gt(t,a){if(t&1&&(A(0),V(1,vt,0,0,"ng-template",0)),t&2){let e=p();s(),u("cdkPortalOutlet",e._portal)}}var bt=["animatedContainer"],et=t=>({step:t});function yt(t,a){t&1&&A(0)}function xt(t,a){t&1&&ie(0,"div",7)}function Ct(t,a){if(t&1&&(M(0,6),_(1,xt,1,0,"div",7)),t&2){let e=a.$implicit,i=a.$index,n=a.$count;p(2);let r=re(4);u("ngTemplateOutlet",r)("ngTemplateOutletContext",oe(3,et,e)),s(),v(i!==n-1?1:-1)}}function St(t,a){if(t&1&&(d(0,"div",8,1),M(2,9),c()),t&2){let e=a.$implicit,i=a.$index,n=p(2);q("mat-horizontal-stepper-content-"+n._getAnimationDirection(i)),u("id",n._getStepContentId(i)),T("aria-labelledby",n._getStepLabelId(i))("inert",n.selectedIndex===i?null:""),s(2),u("ngTemplateOutlet",e.content)}}function Mt(t,a){if(t&1&&(d(0,"div",2)(1,"div",3),$(2,Ct,2,5,null,null,B),c(),d(4,"div",4),$(5,St,3,6,"div",5,B),c()()),t&2){let e=p();s(2),j(e.steps),s(3),j(e.steps)}}function Dt(t,a){if(t&1&&(d(0,"div",10),M(1,6),d(2,"div",11,1)(4,"div",12)(5,"div",13),M(6,9),c()()()()),t&2){let e=a.$implicit,i=a.$index,n=a.$index,r=a.$count,o=p(2),J=re(4);s(),u("ngTemplateOutlet",J)("ngTemplateOutletContext",oe(10,et,e)),s(),D("mat-stepper-vertical-line",n!==r-1)("mat-vertical-content-container-active",o.selectedIndex===i),T("inert",o.selectedIndex===i?null:""),s(2),u("id",o._getStepContentId(i)),T("aria-labelledby",o._getStepLabelId(i)),s(2),u("ngTemplateOutlet",e.content)}}function It(t,a){if(t&1&&$(0,Dt,7,12,"div",10,B),t&2){let e=p();j(e.steps)}}function Et(t,a){if(t&1){let e=Ie();d(0,"mat-step-header",14),ne("click",function(){let n=X(e).step;return ee(n.select())})("keydown",function(n){X(e);let r=p();return ee(r._onKeydown(n))}),c()}if(t&2){let e=a.step,i=p();D("mat-horizontal-stepper-header",i.orientation==="horizontal")("mat-vertical-stepper-header",i.orientation==="vertical"),u("tabIndex",i._getFocusIndex()===e.index()?0:-1)("id",i._getStepLabelId(e.index()))("index",e.index())("state",e.indicatorType())("label",e.stepLabel||e.label)("selected",e.isSelected())("active",e.isNavigable())("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!e.isNavigable())("color",e.color||i.color),T("aria-posinset",e.index()+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(e.index()))("aria-selected",e.isSelected())("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",e.isNavigable()?null:!0)}}var ce=(()=>{class t extends de{static \u0275fac=(()=>{let e;return function(n){return(e||(e=te(t)))(n||t)}})();static \u0275dir=y({type:t,selectors:[["","matStepLabel",""]],features:[L]})}return t})(),Y=(()=>{class t{changes=new N;optionalLabel="Optional";completedLabel="Completed";editableLabel="Editable";static \u0275fac=function(i){return new(i||t)};static \u0275prov=ve({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kt(t){return t||new Y}var wt={provide:Y,deps:[[new be,new ye,Y]],useFactory:kt},me=(()=>{class t extends pe{_intl=l(Y);_focusMonitor=l(Ae);_intlSubscription;state;label;errorMessage;iconOverrides;index;selected;active;optional;disableRipple;color;constructor(){super();let e=l(Pe);e.load(Ue),e.load(Ne);let i=l(U);this._intlSubscription=this._intl.changes.subscribe(()=>i.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,i){e?this._focusMonitor.focusVia(this._elementRef,e,i):this._elementRef.nativeElement.focus(i)}_stringLabel(){return this.label instanceof ce?null:this.label}_templateLabel(){return this.label instanceof ce?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getDefaultTextForState(e){return e=="number"?`${this.index+1}`:e=="edit"?"create":e=="error"?"warning":e}_hasEmptyLabel(){return!this._stringLabel()&&!this._templateLabel()&&!this._hasOptionalLabel()&&!this._hasErrorLabel()}_hasOptionalLabel(){return this.optional&&this.state!=="error"}_hasErrorLabel(){return this.state==="error"}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],hostVars:4,hostBindings:function(i,n){i&2&&(q("mat-"+(n.color||"primary")),D("mat-step-header-empty-label",n._hasEmptyLabel()))},inputs:{state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple",color:"color"},features:[L],decls:10,vars:17,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-step-label"],[1,"mat-step-text-label"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[3,"ngTemplateOutlet"]],template:function(i,n){if(i&1&&(ie(0,"div",0),d(1,"div")(2,"div",1),_(3,st,1,6,"ng-container",2)(4,mt,2,1),c()(),d(5,"div",3),_(6,ht,2,1,"div",4)(7,ut,2,1,"div",4),_(8,ft,2,1,"div",5),_(9,_t,2,1,"div",6),c()),i&2){let r;u("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disableRipple),s(),q(ke("mat-step-icon-state-",n.state," mat-step-icon")),D("mat-step-icon-selected",n.selected),s(2),v(n.iconOverrides&&n.iconOverrides[n.state]?3:4),s(2),D("mat-step-label-active",n.active)("mat-step-label-selected",n.selected)("mat-step-label-error",n.state=="error"),s(),v((r=n._templateLabel())?6:n._stringLabel()?7:-1,r),s(2),v(n._hasOptionalLabel()?8:-1),s(),v(n._hasErrorLabel()?9:-1)}},dependencies:[Ke,se,Ze],styles:[`.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-hover-state-layer-shape, var(--mat-sys-corner-medium))}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));border-radius:var(--mat-stepper-header-focus-state-layer-shape, var(--mat-sys-corner-medium))}@media(hover: none){.mat-step-header:hover{background:none}}@media(forced-colors: active){.mat-step-header{outline:solid 1px}.mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.mat-step-header[aria-disabled=true]{outline-color:GrayText}.mat-step-header[aria-disabled=true] .mat-step-label,.mat-step-header[aria-disabled=true] .mat-step-icon,.mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color, var(--mat-sys-surface));background-color:var(--mat-stepper-header-icon-background-color, var(--mat-sys-on-surface-variant))}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color, transparent);color:var(--mat-stepper-header-error-state-icon-foreground-color, var(--mat-sys-error))}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font, var(--mat-sys-title-small-font));font-size:var(--mat-stepper-header-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-label-text-weight, var(--mat-sys-title-small-weight));color:var(--mat-stepper-header-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color, var(--mat-sys-on-surface-variant))}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color, var(--mat-sys-error));font-size:var(--mat-stepper-header-error-state-label-text-size, var(--mat-sys-title-small-size))}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size, var(--mat-sys-title-small-size));font-weight:var(--mat-stepper-header-selected-state-label-text-weight, var(--mat-sys-title-small-weight))}.mat-step-header-empty-label .mat-step-label{min-width:0}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-selected-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-done-state-icon-foreground-color, var(--mat-sys-on-primary))}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color, var(--mat-sys-primary));color:var(--mat-stepper-header-edit-state-icon-foreground-color, var(--mat-sys-on-primary))}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return t})(),Tt=(()=>{class t{templateRef=l(k);name;constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:[0,"matStepperIcon","name"]}})}return t})(),zt=(()=>{class t{_template=l(k);constructor(){}static \u0275fac=function(i){return new(i||t)};static \u0275dir=y({type:t,selectors:[["ng-template","matStepContent",""]]})}return t})(),Ot=(()=>{class t extends W{_errorStateMatcher=l(K,{skipSelf:!0});_viewContainerRef=l(Me);_isSelected=he.EMPTY;stepLabel=void 0;color;_lazyContent;_portal;ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe(_e(()=>this._stepper.selectionChange.pipe(fe(e=>e.selectedStep===this),S(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new $e(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,i){let n=this._errorStateMatcher.isErrorState(e,i),r=!!(e&&e.invalid&&this.interacted);return n||r}static \u0275fac=(()=>{let e;return function(n){return(e||(e=te(t)))(n||t)}})();static \u0275cmp=w({type:t,selectors:[["mat-step"]],contentQueries:function(i,n,r){if(i&1&&(g(r,ce,5),g(r,zt,5)),i&2){let o;m(o=h())&&(n.stepLabel=o.first),m(o=h())&&(n._lazyContent=o.first)}},hostAttrs:["hidden",""],inputs:{color:"color"},exportAs:["matStep"],features:[ae([{provide:K,useExisting:t},{provide:W,useExisting:t}]),L],ngContentSelectors:Xe,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(i,n){i&1&&(F(),V(0,gt,2,1,"ng-template"))},dependencies:[je],encapsulation:2,changeDetection:0})}return t})(),Rt=(()=>{class t extends Z{_ngZone=l(Ce);_renderer=l(Se);_animationsDisabled=Ge();_cleanupTransition;_isAnimating=f(!1);_stepHeader=void 0;_animatedContainers;_steps=void 0;steps=new R;_icons;animationDone=new E;disableRipple;color;labelPosition="end";headerPosition="top";_iconOverrides={};get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}_animationDuration="";_isServer=!l(Le).isBrowser;constructor(){super();let i=l(O).nativeElement.nodeName.toLowerCase();this.orientation=i==="mat-vertical-stepper"?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:i})=>this._iconOverrides[e]=i),this.steps.changes.pipe(b(this._destroyed)).subscribe(()=>this._stateChanged()),this.selectedIndexChange.pipe(b(this._destroyed)).subscribe(()=>{let e=this._getAnimationDuration();e==="0ms"||e==="0s"?this._onAnimationDone():this._isAnimating.set(!0)}),this._ngZone.runOutsideAngular(()=>{this._animationsDisabled||setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-stepper-animations-enabled"),this._cleanupTransition=this._renderer.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionend)},200)})}ngAfterViewInit(){if(super.ngAfterViewInit(),typeof queueMicrotask=="function"){let e=!1;this._animatedContainers.changes.pipe(S(null),b(this._destroyed)).subscribe(()=>queueMicrotask(()=>{e||(e=!0,this.animationDone.emit()),this._stateChanged()}))}}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransition?.()}_getAnimationDuration(){return this._animationsDisabled?"0ms":this.animationDuration?this.animationDuration:this.orientation==="horizontal"?"500ms":"225ms"}_handleTransitionend=e=>{let i=e.target;if(!i)return;let n=this.orientation==="horizontal"&&e.propertyName==="transform"&&i.classList.contains("mat-horizontal-stepper-content-current"),r=this.orientation==="vertical"&&e.propertyName==="grid-template-rows"&&i.classList.contains("mat-vertical-content-container-active");(n||r)&&this._animatedContainers.find(J=>J.nativeElement===i)&&this._onAnimationDone()};_onAnimationDone(){this._isAnimating.set(!1),this.animationDone.emit()}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=w({type:t,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(i,n,r){if(i&1&&(g(r,Ot,5),g(r,Tt,5)),i&2){let o;m(o=h())&&(n._steps=o),m(o=h())&&(n._icons=o)}},viewQuery:function(i,n){if(i&1&&(P(me,5),P(bt,5)),i&2){let r;m(r=h())&&(n._stepHeader=r),m(r=h())&&(n._animatedContainers=r)}},hostAttrs:["role","tablist"],hostVars:15,hostBindings:function(i,n){i&2&&(T("aria-orientation",n.orientation),Ee("--mat-stepper-animation-duration",n._getAnimationDuration()),D("mat-stepper-horizontal",n.orientation==="horizontal")("mat-stepper-vertical",n.orientation==="vertical")("mat-stepper-label-position-end",n.orientation==="horizontal"&&n.labelPosition=="end")("mat-stepper-label-position-bottom",n.orientation==="horizontal"&&n.labelPosition=="bottom")("mat-stepper-header-position-bottom",n.headerPosition==="bottom")("mat-stepper-animating",n._isAnimating()))},inputs:{disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[ae([{provide:Z,useExisting:t}]),L],ngContentSelectors:Xe,decls:5,vars:2,consts:[["stepTemplate",""],["animatedContainer",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[1,"mat-horizontal-content-container"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id","class"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"click","keydown","tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color"]],template:function(i,n){if(i&1&&(F(),_(0,yt,1,0),_(1,Mt,7,0,"div",2)(2,It,2,0),V(3,Et,1,23,"ng-template",null,0,Te)),i&2){let r;v(n._isServer?0:-1),s(),v((r=n.orientation)==="horizontal"?1:r==="vertical"?2:-1)}},dependencies:[se,me],styles:[`.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font, var(--mat-sys-body-medium-font));background:var(--mat-stepper-container-color, var(--mat-sys-surface))}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color, var(--mat-sys-outline))}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height, 72px)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header.mat-step-header-empty-label .mat-step-icon{margin:0}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color, var(--mat-sys-outline))}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height, 72px) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{visibility:hidden;overflow:hidden;outline:0;height:0}.mat-stepper-animations-enabled .mat-horizontal-stepper-content{transition:transform var(--mat-stepper-animation-duration, 0) cubic-bezier(0.35, 0, 0.25, 1)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-previous{transform:translate3d(-100%, 0, 0)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-next{transform:translate3d(100%, 0, 0)}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-current{visibility:visible;transform:none;height:auto}.mat-stepper-horizontal:not(.mat-stepper-animating) .mat-horizontal-stepper-content.mat-horizontal-stepper-content-current{overflow:visible}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}@media(forced-colors: active){.mat-horizontal-content-container{outline:solid 1px}}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{display:grid;grid-template-rows:0fr;grid-template-columns:100%;margin-left:36px;border:0;position:relative}.mat-stepper-animations-enabled .mat-vertical-content-container{transition:grid-template-rows var(--mat-stepper-animation-duration, 0) cubic-bezier(0.4, 0, 0.2, 1)}.mat-vertical-content-container.mat-vertical-content-container-active{grid-template-rows:1fr}.mat-step:last-child .mat-vertical-content-container{border:none}@media(forced-colors: active){.mat-vertical-content-container{outline:solid 1px}}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}@supports not (grid-template-rows: 0fr){.mat-vertical-content-container{height:0}.mat-vertical-content-container.mat-vertical-content-container-active{height:auto}}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color, var(--mat-sys-outline));top:calc(8px - calc((var(--mat-stepper-header-height, 72px) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height, 72px) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0;visibility:hidden}.mat-stepper-animations-enabled .mat-vertical-stepper-content{transition:visibility var(--mat-stepper-animation-duration, 0) linear}.mat-vertical-content-container-active>.mat-vertical-stepper-content{visibility:visible}.mat-vertical-content{padding:0 24px 24px 24px}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return t})();var Oi=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Q({type:t});static \u0275inj=H({providers:[wt,K],imports:[le,qe,Je,Ye,We,Rt,me,le]})}return t})();export{Je as a,ce as b,Tt as c,zt as d,Ot as e,Rt as f,Oi as g};
|