marketplacepos 5.48.6 → 5.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +214 -214
- package/Marketplace/{chunk-SHUYFOQI.js → chunk-24KZDZKS.js} +1 -1
- package/Marketplace/{chunk-7JQEF4XX.js → chunk-27DIE2YS.js} +1 -1
- package/Marketplace/chunk-2AXBEVQ7.js +4 -0
- package/Marketplace/chunk-2K5AP6IZ.js +1 -0
- package/Marketplace/{chunk-4RG5YR7N.js → chunk-2NRHX6CZ.js} +2 -2
- package/Marketplace/{chunk-ZTHO6JJM.js → chunk-2ST3DMR6.js} +1 -1
- package/Marketplace/chunk-34ZZ4GCS.js +1 -0
- package/Marketplace/chunk-35N7HHLQ.js +1 -0
- package/Marketplace/{chunk-5X2E3W32.js → chunk-3HME327V.js} +1 -1
- package/Marketplace/chunk-3NAMEVOB.js +1 -0
- package/Marketplace/{chunk-AFIF6VRM.js → chunk-3SCX7IMW.js} +1 -1
- package/Marketplace/chunk-47JP6ZSE.js +1 -0
- package/Marketplace/chunk-47Q5JJIA.js +1 -0
- package/Marketplace/chunk-4KGXKQPG.js +1 -0
- package/Marketplace/chunk-4ORO4H6Z.js +266 -0
- package/Marketplace/chunk-4PG2EBJQ.js +1 -0
- package/Marketplace/chunk-4Q4I4JG4.js +5 -0
- package/Marketplace/{chunk-QFSA7CU4.js → chunk-4S4BOPUV.js} +2 -2
- package/Marketplace/{chunk-KTLMPVSK.js → chunk-4XENFCCZ.js} +1 -1
- package/Marketplace/chunk-52YCKO3Z.js +1 -0
- package/Marketplace/chunk-55E6VHIU.js +2 -0
- package/Marketplace/{chunk-5BSPSA4O.js → chunk-5C24BA5F.js} +1 -1
- package/Marketplace/{chunk-PMVDQ2OP.js → chunk-5QDH4ZNS.js} +1 -1
- package/Marketplace/{chunk-ZETUYNFJ.js → chunk-5UFP37GQ.js} +1 -1
- package/Marketplace/{chunk-PDCVMSLL.js → chunk-5WQ3LCWP.js} +1 -1
- package/Marketplace/chunk-5WT456T7.js +3 -0
- package/Marketplace/chunk-5ZS5MEG7.js +1 -0
- package/Marketplace/chunk-654AVLKM.js +1 -0
- package/Marketplace/chunk-6C4UBIZK.js +10 -0
- package/Marketplace/{chunk-ZKIO2ZQ6.js → chunk-6F62N7RZ.js} +2 -2
- package/Marketplace/chunk-6NS3D6KQ.js +5 -0
- package/Marketplace/chunk-7E53IHXI.js +1 -0
- package/Marketplace/{chunk-RQQWNLDZ.js → chunk-7HRL6MHY.js} +1 -1
- package/Marketplace/{chunk-LEUBNBGC.js → chunk-7IOQ6VVF.js} +1 -1
- package/Marketplace/chunk-7QP3VZ6H.js +1 -0
- package/Marketplace/chunk-7R2D2JZ6.js +3 -0
- package/Marketplace/{chunk-5MV3UFJQ.js → chunk-7X4B2T6C.js} +2 -2
- package/Marketplace/chunk-A2RTZANN.js +1 -0
- package/Marketplace/chunk-A53NYS6S.js +1 -0
- package/Marketplace/chunk-AHMFSCTX.js +2 -0
- package/Marketplace/chunk-ALLZQ6Y3.js +1 -0
- package/Marketplace/chunk-AQVMOA6Z.js +1 -0
- package/Marketplace/chunk-AUEWKPWQ.js +1 -0
- package/Marketplace/chunk-B5ZK5TGW.js +1 -0
- package/Marketplace/chunk-BAW6PICI.js +2 -0
- package/Marketplace/{chunk-DTAHV4GM.js → chunk-BC6LHZWP.js} +1 -1
- package/Marketplace/chunk-BKZIKCX7.js +1 -0
- package/Marketplace/chunk-BL6MPO6D.js +2 -0
- package/Marketplace/{chunk-GPHNPV7O.js → chunk-BMOMTOEW.js} +2 -2
- package/Marketplace/chunk-BUMWMFHU.js +2 -0
- package/Marketplace/chunk-BYL4N2KB.js +1 -0
- package/Marketplace/chunk-BYX6HZW7.js +1 -0
- package/Marketplace/{chunk-6KWG6O5L.js → chunk-C2LAQOUW.js} +1 -1
- package/Marketplace/chunk-CC7KUBNZ.js +1 -0
- package/Marketplace/chunk-CZWUOW55.js +1 -0
- package/Marketplace/{chunk-L7WZ6U4T.js → chunk-DDFP4CNP.js} +1 -1
- package/Marketplace/chunk-DI2VKA4Z.js +1 -0
- package/Marketplace/{chunk-6OJQRHIZ.js → chunk-DLHIDOS3.js} +1 -1
- package/Marketplace/chunk-DPB2343S.js +1 -0
- package/Marketplace/chunk-EBXGQWOL.js +1 -0
- package/Marketplace/{chunk-IM5M2CAI.js → chunk-EH3PIGLJ.js} +1 -1
- package/Marketplace/chunk-EHND5PFE.js +1 -0
- package/Marketplace/{chunk-2J7P6ENI.js → chunk-F26O6FCO.js} +1 -1
- package/Marketplace/chunk-FEQXCPQI.js +2 -0
- package/Marketplace/chunk-FFJXYPVA.js +1 -0
- package/Marketplace/chunk-FJU2CZTJ.js +1 -0
- package/Marketplace/chunk-FLNIURLD.js +1 -0
- package/Marketplace/{chunk-4ILDFTIG.js → chunk-FOKLBUX6.js} +1 -1
- package/Marketplace/chunk-FTIUJUXI.js +1 -0
- package/Marketplace/{chunk-WNUTNP6I.js → chunk-G3B6ETBU.js} +5 -5
- package/Marketplace/{chunk-VWX2IX64.js → chunk-G4T4VM5E.js} +1 -1
- package/Marketplace/{chunk-OQM7K2EA.js → chunk-G6O6VFLS.js} +1 -1
- package/Marketplace/chunk-GG3X4R7G.js +1 -0
- package/Marketplace/chunk-GVJLKDIO.js +1 -0
- package/Marketplace/chunk-HFGQAVIU.js +1 -0
- package/Marketplace/{chunk-N5AE5WMQ.js → chunk-HO2TMGLM.js} +1 -1
- package/Marketplace/chunk-HORS2MKK.js +1 -0
- package/Marketplace/chunk-IBE5KBZU.js +1 -0
- package/Marketplace/chunk-IDGK6BMG.js +1 -0
- package/Marketplace/chunk-IF7EJSQG.js +1 -0
- package/Marketplace/chunk-IKC5WEP5.js +1 -0
- package/Marketplace/{chunk-3L7Y6LG6.js → chunk-IM7YH54S.js} +1 -1
- package/Marketplace/{chunk-63I3I3MX.js → chunk-IVKFEOCB.js} +1 -1
- package/Marketplace/chunk-J3QDFXZ7.js +1 -0
- package/Marketplace/chunk-J6HA4ZHH.js +1 -0
- package/Marketplace/chunk-JM3NLPH4.js +9 -0
- package/Marketplace/chunk-JNRCB7N3.js +2 -0
- package/Marketplace/chunk-JSQ7SYYK.js +1 -0
- package/Marketplace/chunk-JV4F6ZYF.js +1 -0
- package/Marketplace/chunk-JWDQVXQP.js +1 -0
- package/Marketplace/chunk-JYSOUJ42.js +1 -0
- package/Marketplace/chunk-JZ3E5MLG.js +1 -0
- package/Marketplace/chunk-K5WSFDNA.js +1 -0
- package/Marketplace/chunk-KDIXLH2S.js +1 -0
- package/Marketplace/chunk-KR6UNAIL.js +3 -0
- package/Marketplace/chunk-KSRL7Y2J.js +2 -0
- package/Marketplace/{chunk-3664K4KH.js → chunk-LAMGWNDE.js} +19 -19
- package/Marketplace/chunk-LKJCOEGO.js +1 -0
- package/Marketplace/chunk-LQPY6AYJ.js +1 -0
- package/Marketplace/{chunk-FULVA6QB.js → chunk-LR2YCE6M.js} +1 -1
- package/Marketplace/{chunk-DXYMG6QK.js → chunk-LUJ3SHSP.js} +1 -1
- package/Marketplace/{chunk-J6CZKQ53.js → chunk-M3DUXHYE.js} +4 -4
- package/Marketplace/{chunk-6PW6S7MI.js → chunk-MAQQQB3T.js} +1 -1
- package/Marketplace/chunk-MM7SAZOU.js +1 -0
- package/Marketplace/{chunk-CM3B2UZ7.js → chunk-MPFJ7FBJ.js} +1 -1
- package/Marketplace/{chunk-SJ5MC42H.js → chunk-MT3CWRVG.js} +2 -2
- package/Marketplace/chunk-MTVUPPAN.js +149 -0
- package/Marketplace/{chunk-WHHW4IZT.js → chunk-N3E43QWK.js} +2 -2
- package/Marketplace/{chunk-AFDI4TD4.js → chunk-NIJCYMZM.js} +3 -3
- package/Marketplace/chunk-NMFPLAWN.js +1 -0
- package/Marketplace/chunk-NQLMPUSB.js +1 -0
- package/Marketplace/chunk-NQVNAQCL.js +1 -0
- package/Marketplace/{chunk-DUXKDRDP.js → chunk-NRSDIDOP.js} +1 -1
- package/Marketplace/{chunk-3JRUKSV3.js → chunk-NVPT5BF2.js} +2 -2
- package/Marketplace/chunk-NY2YBW66.js +1 -0
- package/Marketplace/chunk-O4D64GHO.js +2 -0
- package/Marketplace/{chunk-UH5C5HXK.js → chunk-O4U34AC7.js} +1 -1
- package/Marketplace/chunk-OCXIDX74.js +1 -0
- package/Marketplace/chunk-OGF4VFSK.js +1 -0
- package/Marketplace/chunk-OHGMB7HJ.js +4 -0
- package/Marketplace/chunk-OIWQSDTS.js +1 -0
- package/Marketplace/chunk-OSGPJXJZ.js +1 -0
- package/Marketplace/chunk-P3XVM6DH.js +1 -0
- package/Marketplace/{chunk-ODLI42YV.js → chunk-P6RAMHDB.js} +1 -1
- package/Marketplace/chunk-PBAFAOKJ.js +1 -0
- package/Marketplace/chunk-PGX5ZJ6P.js +1 -0
- package/Marketplace/{chunk-IGKMJFKP.js → chunk-PN3KM4M4.js} +2 -2
- package/Marketplace/chunk-PSJVP2XO.js +1 -0
- package/Marketplace/chunk-PUCIZX6E.js +1 -0
- package/Marketplace/chunk-PWCN6GJX.js +5 -0
- package/Marketplace/{chunk-L76NLJD7.js → chunk-PWOKOWVV.js} +2 -2
- package/Marketplace/chunk-QJ55WDGL.js +1 -0
- package/Marketplace/chunk-QJCYEP2A.js +1 -0
- package/Marketplace/{chunk-4RLWHMI6.js → chunk-QMHG3QTI.js} +1 -1
- package/Marketplace/chunk-QMIL5QUX.js +1 -0
- package/Marketplace/chunk-QMQCIH3X.js +7 -0
- package/Marketplace/chunk-QQF5ZMGS.js +2 -0
- package/Marketplace/{chunk-6XDT56RT.js → chunk-R3WIWDSP.js} +2 -2
- package/Marketplace/{chunk-LOWGZOML.js → chunk-RBZU7OVM.js} +1 -1
- package/Marketplace/chunk-RM6ZXD3O.js +1 -0
- package/Marketplace/chunk-RN5CI3LE.js +1 -0
- package/Marketplace/chunk-ROS2QMKF.js +1 -0
- package/Marketplace/{chunk-YTHY4IFS.js → chunk-RQUCYFCB.js} +1 -1
- package/Marketplace/chunk-RTLTTFZ7.js +1 -0
- package/Marketplace/chunk-RUYX7KTP.js +1 -0
- package/Marketplace/{chunk-5PMKN6PM.js → chunk-RXC5D64C.js} +2 -2
- package/Marketplace/chunk-RZ5N5JLA.js +1 -0
- package/Marketplace/chunk-S4JKTHY2.js +1 -0
- package/Marketplace/chunk-SABMHH6B.js +1 -0
- package/Marketplace/{chunk-TXOZULMZ.js → chunk-SIPZP62B.js} +1 -1
- package/Marketplace/{chunk-6CM22SKR.js → chunk-SMZOSLIK.js} +1 -1
- package/Marketplace/chunk-SPLGZRGH.js +5 -0
- package/Marketplace/chunk-SS6PBSX7.js +1 -0
- package/Marketplace/chunk-SZ33XJ4F.js +1 -0
- package/Marketplace/chunk-TBVMCNS2.js +1 -0
- package/Marketplace/{chunk-3WRXJBHF.js → chunk-TDMNVEUU.js} +3 -3
- package/Marketplace/{chunk-RUBV3KX2.js → chunk-TKZ74HJD.js} +1 -1
- package/Marketplace/chunk-TOK5EWN4.js +1 -0
- package/Marketplace/{chunk-7GY4O2UX.js → chunk-TYQYNICX.js} +3 -3
- package/Marketplace/{chunk-VX75I7HA.js → chunk-TZTW72NT.js} +1 -1
- package/Marketplace/{chunk-AZOCRKXK.js → chunk-UB62TZOI.js} +1 -1
- package/Marketplace/{chunk-L22SKCLL.js → chunk-UE2QO2Y4.js} +1 -1
- package/Marketplace/chunk-UE5E7JXK.js +1 -0
- package/Marketplace/chunk-UMLV2ZUF.js +1 -0
- package/Marketplace/{chunk-JBEKD57G.js → chunk-UPRDDI4K.js} +1 -1
- package/Marketplace/{chunk-MDP2SGJI.js → chunk-V6QH3IVL.js} +1 -1
- package/Marketplace/chunk-VH7JZJ2B.js +1 -0
- package/Marketplace/chunk-VOONKP66.js +1 -0
- package/Marketplace/chunk-VP3XO25X.js +2 -0
- package/Marketplace/chunk-VVTBM3Z5.js +1 -0
- package/Marketplace/chunk-VWMEDVEG.js +1 -0
- package/Marketplace/{chunk-NWB7EVME.js → chunk-W33M7S2S.js} +1 -1
- package/Marketplace/{chunk-L3W6SG2T.js → chunk-WAXAIL2I.js} +1 -1
- package/Marketplace/{chunk-HK5FXZE4.js → chunk-WIRBYT7F.js} +1 -1
- package/Marketplace/chunk-WQHFRJZZ.js +1 -0
- package/Marketplace/{chunk-KJE5GRQ4.js → chunk-WVA5LYVE.js} +1 -1
- package/Marketplace/chunk-X35EOX3B.js +1 -0
- package/Marketplace/chunk-X52ZT4MU.js +1 -0
- package/Marketplace/chunk-XLQGQESJ.js +2 -0
- package/Marketplace/chunk-XPA7U45N.js +1 -0
- package/Marketplace/{chunk-6Q6L5NUD.js → chunk-XUDE7VBC.js} +1 -1
- package/Marketplace/{chunk-DHPNXR6E.js → chunk-Y3O22N4P.js} +1 -1
- package/Marketplace/{chunk-Q2QX5AAJ.js → chunk-YABJCAAL.js} +4 -4
- package/Marketplace/{chunk-WFVK32EW.js → chunk-YAWT3CLI.js} +1 -1
- package/Marketplace/chunk-YD6BNJ2B.js +1 -0
- package/Marketplace/{chunk-FHER4TFY.js → chunk-YKKHSYDW.js} +1 -1
- package/Marketplace/chunk-YLQU53ID.js +1 -0
- package/Marketplace/chunk-YNL43MLU.js +1 -0
- package/Marketplace/chunk-YQZHIZHO.js +6 -0
- package/Marketplace/chunk-YX65R6YJ.js +1 -0
- package/Marketplace/chunk-YYV4FSYQ.js +1 -0
- package/Marketplace/{chunk-EYT2YJGK.js → chunk-Z2XRGVGT.js} +1 -1
- package/Marketplace/chunk-Z6LN3X5Q.js +1 -0
- package/Marketplace/{chunk-HPINZVE4.js → chunk-ZC526ERX.js} +1 -1
- package/Marketplace/{chunk-M4ZE35XK.js → chunk-ZDBFIPDM.js} +1 -1
- package/Marketplace/{chunk-RNWHARPK.js → chunk-ZGIYCORM.js} +1 -1
- package/Marketplace/chunk-ZMQQVXQU.js +1 -0
- package/Marketplace/chunk-ZQHOCT7I.js +1 -0
- package/Marketplace/chunk-ZVNZGCYO.js +1 -0
- package/Marketplace/{chunk-ITGVXYDV.js → chunk-ZWUYPYHD.js} +1 -1
- package/Marketplace/index.html +2 -2
- package/Marketplace/main-IQOLSEWV.js +1 -0
- package/package.json +1 -1
- package/Marketplace/chunk-2B5DXBBJ.js +0 -1
- package/Marketplace/chunk-2F4DTZCZ.js +0 -2
- package/Marketplace/chunk-2MEVIFIA.js +0 -1
- package/Marketplace/chunk-2USFVKEX.js +0 -1
- package/Marketplace/chunk-36U7D4LI.js +0 -1
- package/Marketplace/chunk-4JDI3AL5.js +0 -1
- package/Marketplace/chunk-4LQREJ6J.js +0 -1
- package/Marketplace/chunk-4YCSITNV.js +0 -1
- package/Marketplace/chunk-5A3P2NB3.js +0 -1
- package/Marketplace/chunk-6EORXONU.js +0 -4
- package/Marketplace/chunk-6LRZDPE5.js +0 -1
- package/Marketplace/chunk-6UOPF4ZP.js +0 -1
- package/Marketplace/chunk-7Z5X4HRT.js +0 -1
- package/Marketplace/chunk-A7PUMY67.js +0 -1
- package/Marketplace/chunk-BQEBDVGB.js +0 -7
- package/Marketplace/chunk-BXYXVBXP.js +0 -1
- package/Marketplace/chunk-C4VD7LDS.js +0 -266
- package/Marketplace/chunk-C6JVY2ER.js +0 -1
- package/Marketplace/chunk-C7N6EI73.js +0 -1
- package/Marketplace/chunk-CBD25LAJ.js +0 -5
- package/Marketplace/chunk-CT6UFONR.js +0 -1
- package/Marketplace/chunk-D2J64VUP.js +0 -1
- package/Marketplace/chunk-DAUML5UD.js +0 -2
- package/Marketplace/chunk-DDV2A3Y2.js +0 -1
- package/Marketplace/chunk-E32KODU7.js +0 -1
- package/Marketplace/chunk-E3EBAWLJ.js +0 -1
- package/Marketplace/chunk-E66QUDQF.js +0 -1
- package/Marketplace/chunk-E6AMKEQR.js +0 -149
- package/Marketplace/chunk-E6ZWL77N.js +0 -1
- package/Marketplace/chunk-EDEZ3JLR.js +0 -4
- package/Marketplace/chunk-ESXDXSQ3.js +0 -1
- package/Marketplace/chunk-FCEXPGTK.js +0 -5
- package/Marketplace/chunk-FKGKMEDE.js +0 -2
- package/Marketplace/chunk-FKPDG4AM.js +0 -1
- package/Marketplace/chunk-GG3MDS4C.js +0 -1
- package/Marketplace/chunk-GURSK3ZV.js +0 -1
- package/Marketplace/chunk-HNFW4VQS.js +0 -1
- package/Marketplace/chunk-HSQHQZV7.js +0 -1
- package/Marketplace/chunk-I3R7CC6J.js +0 -1
- package/Marketplace/chunk-I7C6W3RB.js +0 -1
- package/Marketplace/chunk-ICE4DSEP.js +0 -1
- package/Marketplace/chunk-ILW6ZFFV.js +0 -1
- package/Marketplace/chunk-JW7NES7L.js +0 -1
- package/Marketplace/chunk-JWK3HR6P.js +0 -1
- package/Marketplace/chunk-K2BII75W.js +0 -15
- package/Marketplace/chunk-KSR5TQDN.js +0 -1
- package/Marketplace/chunk-KUBWQQZK.js +0 -1
- package/Marketplace/chunk-KUNITWR6.js +0 -1
- package/Marketplace/chunk-KVDREHOE.js +0 -1
- package/Marketplace/chunk-LNJUGHOX.js +0 -2
- package/Marketplace/chunk-LY32FUZ4.js +0 -2
- package/Marketplace/chunk-M2BYW5SR.js +0 -1
- package/Marketplace/chunk-MTPSSM64.js +0 -2
- package/Marketplace/chunk-N5VHHR26.js +0 -1
- package/Marketplace/chunk-NBCUYSP7.js +0 -1
- package/Marketplace/chunk-NCKPMA6Q.js +0 -1
- package/Marketplace/chunk-NH6QGSVC.js +0 -1
- package/Marketplace/chunk-O2YF5VGD.js +0 -2
- package/Marketplace/chunk-O4EO3YBL.js +0 -1
- package/Marketplace/chunk-OBF4XVU7.js +0 -1
- package/Marketplace/chunk-ONPG3DER.js +0 -2
- package/Marketplace/chunk-OPXITNRF.js +0 -1
- package/Marketplace/chunk-OXWPYJNB.js +0 -1
- package/Marketplace/chunk-Q4TAOZ73.js +0 -1
- package/Marketplace/chunk-Q56RJPES.js +0 -1
- package/Marketplace/chunk-R2XT5M5F.js +0 -3
- package/Marketplace/chunk-RI7L4QSY.js +0 -5
- package/Marketplace/chunk-RWVVRZJY.js +0 -1
- package/Marketplace/chunk-S5R6MCNP.js +0 -5
- package/Marketplace/chunk-S7CKRTJV.js +0 -2
- package/Marketplace/chunk-STYL7ETF.js +0 -3
- package/Marketplace/chunk-T5IUZ6UD.js +0 -1
- package/Marketplace/chunk-TAITBX62.js +0 -1
- package/Marketplace/chunk-TJYYRHZZ.js +0 -1
- package/Marketplace/chunk-TYQY4WPY.js +0 -1
- package/Marketplace/chunk-UQK5JNU2.js +0 -1
- package/Marketplace/chunk-XLIPGDSC.js +0 -2
- package/Marketplace/chunk-ZLBPUHTQ.js +0 -1
- package/Marketplace/chunk-ZME22WYI.js +0 -1
- package/Marketplace/chunk-ZW2TMVZP.js +0 -10
- package/Marketplace/chunk-ZYJ6LAJ3.js +0 -4
- package/Marketplace/main-K3MDOIIF.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as B}from"./chunk-
|
|
1
|
+
import{c as B}from"./chunk-ZWUYPYHD.js";import{a as A}from"./chunk-WVA5LYVE.js";import{a as P}from"./chunk-FOKLBUX6.js";import{b as F,c as z,e as p}from"./chunk-RBZU7OVM.js";import{ua as S}from"./chunk-RXC5D64C.js";import{g as w}from"./chunk-WAXAIL2I.js";import{Aa as m,Fd as c,Hb as h,Ib as b,Jb as C,Lb as a,Mb as I,Mc as D,Pa as d,_b as y,_c as N,lc as u,ma as f,mc as l,na as x,nc as s,ob as v,pa as g,pd as k,qd as E,ra as o,sc as T,ud as r,wc as M}from"./chunk-OHGMB7HJ.js";var U=["data-p-icon","spinner"],q=(()=>{class t extends P{pathId;onInit(){this.pathId="url(#"+F()+")"}static \u0275fac=(()=>{let e;return function(i){return(e||(e=d(t)))(i||t)}})();static \u0275cmp=h({type:t,selectors:[["","data-p-icon","spinner"]],features:[a],attrs:U,decls:5,vars:2,consts:[["d","M6.99701 14C5.85441 13.999 4.72939 13.7186 3.72012 13.1832C2.71084 12.6478 1.84795 11.8737 1.20673 10.9284C0.565504 9.98305 0.165424 8.89526 0.041387 7.75989C-0.0826496 6.62453 0.073125 5.47607 0.495122 4.4147C0.917119 3.35333 1.59252 2.4113 2.46241 1.67077C3.33229 0.930247 4.37024 0.413729 5.4857 0.166275C6.60117 -0.0811796 7.76026 -0.0520535 8.86188 0.251112C9.9635 0.554278 10.9742 1.12227 11.8057 1.90555C11.915 2.01493 11.9764 2.16319 11.9764 2.31778C11.9764 2.47236 11.915 2.62062 11.8057 2.73C11.7521 2.78503 11.688 2.82877 11.6171 2.85864C11.5463 2.8885 11.4702 2.90389 11.3933 2.90389C11.3165 2.90389 11.2404 2.8885 11.1695 2.85864C11.0987 2.82877 11.0346 2.78503 10.9809 2.73C9.9998 1.81273 8.73246 1.26138 7.39226 1.16876C6.05206 1.07615 4.72086 1.44794 3.62279 2.22152C2.52471 2.99511 1.72683 4.12325 1.36345 5.41602C1.00008 6.70879 1.09342 8.08723 1.62775 9.31926C2.16209 10.5513 3.10478 11.5617 4.29713 12.1803C5.48947 12.7989 6.85865 12.988 8.17414 12.7157C9.48963 12.4435 10.6711 11.7264 11.5196 10.6854C12.3681 9.64432 12.8319 8.34282 12.8328 7C12.8328 6.84529 12.8943 6.69692 13.0038 6.58752C13.1132 6.47812 13.2616 6.41667 13.4164 6.41667C13.5712 6.41667 13.7196 6.47812 13.8291 6.58752C13.9385 6.69692 14 6.84529 14 7C14 8.85651 13.2622 10.637 11.9489 11.9497C10.6356 13.2625 8.85432 14 6.99701 14Z","fill","currentColor"],[3,"id"],["width","14","height","14","fill","white"]],template:function(n,i){n&1&&(m(),u(0,"g"),s(1,"path",0),l(),u(2,"defs")(3,"clipPath",1),s(4,"rect",2),l()()),n&2&&(y("clip-path",i.pathId),v(3),T("id",i.pathId))},encapsulation:2})}return t})();var V=`
|
|
2
2
|
.p-inputtext {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
font-feature-settings: inherit;
|
|
@@ -87,4 +87,4 @@ import{c as B}from"./chunk-ITGVXYDV.js";import{a as A}from"./chunk-KJE5GRQ4.js";
|
|
|
87
87
|
.p-inputtext.ng-invalid.ng-dirty::placeholder {
|
|
88
88
|
color: dt('inputtext.invalid.placeholder.color');
|
|
89
89
|
}
|
|
90
|
-
`,_={root:({instance:t})=>["p-inputtext p-component",{"p-filled":t.$filled(),"p-inputtext-sm":t.pSize==="small","p-inputtext-lg":t.pSize==="large","p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-inputtext-fluid":t.hasFluid}]},$=(()=>{class t extends
|
|
90
|
+
`,_={root:({instance:t})=>["p-inputtext p-component",{"p-filled":t.$filled(),"p-inputtext-sm":t.pSize==="small","p-inputtext-lg":t.pSize==="large","p-invalid":t.invalid(),"p-variant-filled":t.$variant()==="filled","p-inputtext-fluid":t.hasFluid}]},$=(()=>{class t extends S{name="inputtext";style=X;classes=_;static \u0275fac=(()=>{let e;return function(i){return(e||(e=d(t)))(i||t)}})();static \u0275prov=f({token:t,factory:t.\u0275fac})}return t})();var j=new g("INPUTTEXT_INSTANCE"),lt=(()=>{class t extends A{hostName="";ptInputText=r();bindDirectiveInstance=o(p,{self:!0});$pcInputText=o(j,{optional:!0,skipSelf:!0})??void 0;ngControl=o(w,{optional:!0,self:!0});pcFluid=o(B,{optional:!0,host:!0,skipSelf:!0});pSize;variant=r();fluid=r(void 0,{transform:c});invalid=r(void 0,{transform:c});$variant=k(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());_componentStyle=o($);constructor(){super(),E(()=>{this.ptInputText()&&this.directivePT.set(this.ptInputText())})}onAfterViewInit(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value),this.cd.detectChanges()}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("root"))}onDoCheck(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}onInput(){this.writeModelValue(this.ngControl?.value??this.el.nativeElement.value)}get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=function(n){return new(n||t)};static \u0275dir=C({type:t,selectors:[["","pInputText",""]],hostVars:2,hostBindings:function(n,i){n&1&&M("input",function(H){return i.onInput(H)}),n&2&&D(i.cx("root"))},inputs:{hostName:"hostName",ptInputText:[1,"ptInputText"],pSize:"pSize",variant:[1,"variant"],fluid:[1,"fluid"],invalid:[1,"invalid"]},features:[N([$,{provide:j,useExisting:t},{provide:z,useExisting:t}]),I([p]),a]})}return t})(),st=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=b({type:t});static \u0275inj=x({})}return t})();export{q as a,lt as b,st as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as $,b as ee}from"./chunk-AHMFSCTX.js";import{a as Z}from"./chunk-XLQGQESJ.js";import"./chunk-6F62N7RZ.js";import"./chunk-LR2YCE6M.js";import{a as Y}from"./chunk-UE2QO2Y4.js";import"./chunk-MT3CWRVG.js";import"./chunk-W33M7S2S.js";import"./chunk-MTVUPPAN.js";import"./chunk-2NRHX6CZ.js";import{a as X}from"./chunk-27DIE2YS.js";import"./chunk-NVPT5BF2.js";import"./chunk-QMHG3QTI.js";import"./chunk-NIJCYMZM.js";import"./chunk-UMLV2ZUF.js";import"./chunk-7X4B2T6C.js";import"./chunk-PN3KM4M4.js";import"./chunk-WIRBYT7F.js";import"./chunk-ZWUYPYHD.js";import"./chunk-WVA5LYVE.js";import"./chunk-FOKLBUX6.js";import"./chunk-A6QXXKPR.js";import"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{b as Q}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-3SCX7IMW.js";import"./chunk-6C4UBIZK.js";import"./chunk-SPLGZRGH.js";import"./chunk-4S4BOPUV.js";import"./chunk-TBVMCNS2.js";import"./chunk-RM6ZXD3O.js";import"./chunk-2ST3DMR6.js";import"./chunk-24KZDZKS.js";import"./chunk-3RK6DDJD.js";import"./chunk-A2RTZANN.js";import"./chunk-N3E43QWK.js";import"./chunk-ZC526ERX.js";import"./chunk-YD6BNJ2B.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-RXC5D64C.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{h as U}from"./chunk-QMQCIH3X.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import{c as z}from"./chunk-UPRDDI4K.js";import{A as K,c as j,h as q,m as G,o as J}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as V}from"./chunk-MM7SAZOU.js";import{e as A,g as H}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as k,x as B,z as F}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as L,Nc as r,Oc as f,Pc as y,Rc as s,Sc as g,Tc as u,ac as M,ad as W,cc as E,ec as P,fc as x,gc as T,hc as c,ic as e,id as b,jc as t,jd as N,kc as _,kd as R,mb as O,ob as a,ra as C,rc as I,wc as w,ya as v,yc as S,za as D}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var te=l=>({ID:l});function ne(l,m){if(l&1&&(e(0,"tr")(1,"td"),r(2),t(),e(3,"td"),_(4,"img",23),t(),e(5,"td"),r(6),t(),e(7,"td",24)(8,"a",25),r(9),b(10,"number"),t()(),e(11,"td"),r(12),t(),e(13,"td"),r(14),b(15,"date"),t()()),l&2){let o=m.$implicit;a(2),f(o._source.ChannelName),a(2),c("src",o.logo,O),a(2),f(o._source.DateRange),a(2),c("queryParams",W(12,te,o._source.ID)),a(),y(" ",N(10,7,o._source.CountOrder)," "),a(3),f(o._source.UserLogin),a(2),y(" ",R(15,9,o._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function ie(l,m){if(l&1){let o=I();e(0,"div",14)(1,"table",16)(2,"thead")(3,"tr",17)(4,"th",18),r(5,"Channel"),t(),e(6,"th",19),r(7,"Type"),t(),e(8,"th",20),r(9,"Download Date Range"),t(),e(10,"th",21),r(11,"Count"),t(),e(12,"th"),r(13,"User Login"),t(),e(14,"th"),r(15,"Created"),t()()(),e(16,"tbody"),x(17,ne,16,14,"tr",null,P),t()(),e(19,"mat-paginator",22),w("page",function(p){v(o);let n=S();return D(n.onPaginationChange(p))}),t()()}if(l&2){let o=S();a(17),T(o.downloadOrders),a(2),c("length",o.paginationTotal)("pageSize",o.paginationPageSize)("pageIndex",(o.filter==null?null:o.filter.PageNumber)==0?0:(o.filter==null?null:o.filter.PageNumber)-1)}}function oe(l,m){l&1&&(e(0,"div",15),_(1,"app-empty-state"),t())}var De=(()=>{let m=class m{constructor(){this.http=C(V),this.authService=C(U),this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=z.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],decls:27,vars:7,consts:[["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"]],template:function(p,n){p&1&&(e(0,"mainpanel",0),w("onSubmit",function(){return n.getDownloadOrders()}),e(1,"filters")(2,"div")(3,"label",1),r(4,"Channel"),t(),e(5,"app-channel-options-v2",2),u("ngModelChange",function(i){return g(n.filter.ChannelID,i)||(n.filter.ChannelID=i),i}),t()(),e(6,"div",3)(7,"label",4),r(8,"From/To"),t(),e(9,"div",5)(10,"datepicker",6),u("dateChange",function(i){return g(n.filter.From,i)||(n.filter.From=i),i}),t()(),e(11,"div")(12,"datepicker",7),u("dateChange",function(i){return g(n.filter.To,i)||(n.filter.To=i),i}),t()()(),e(13,"div",3)(14,"label",8),r(15,"Page Number"),t(),e(16,"input",9),u("ngModelChange",function(i){return g(n.filter.PageNumber,i)||(n.filter.PageNumber=i),i}),t()(),e(17,"div",3)(18,"label",8),r(19,"Page Size"),t(),e(20,"input",10),u("ngModelChange",function(i){return g(n.filter.RowCount,i)||(n.filter.RowCount=i),i}),t()()(),e(21,"content")(22,"div",11)(23,"div",12)(24,"div",13),M(25,ie,20,3,"div",14)(26,oe,2,0,"div",15),t()()()()()),p&2&&(c("hideSearchBox",!0),a(5),s("ngModel",n.filter.ChannelID),a(5),s("date",n.filter.From),a(2),s("date",n.filter.To),a(4),s("ngModel",n.filter.PageNumber),a(4),s("ngModel",n.filter.RowCount),a(5),E((n.downloadOrders==null?null:n.downloadOrders.length)>0?25:26))},dependencies:[k,ee,$,Q,K,j,J,q,G,Z,H,A,X,Y,F,B],encapsulation:2});let l=m;return l})();export{De as DownloadOrderLogComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as re,b as pe}from"./chunk-AHMFSCTX.js";import"./chunk-6F62N7RZ.js";import"./chunk-LR2YCE6M.js";import{a as ne,b as ie,d as ae,e as oe}from"./chunk-C2LAQOUW.js";import{a as le}from"./chunk-27DIE2YS.js";import{b as te}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-SPLGZRGH.js";import"./chunk-2ST3DMR6.js";import"./chunk-24KZDZKS.js";import"./chunk-A2RTZANN.js";import"./chunk-N3E43QWK.js";import"./chunk-YD6BNJ2B.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{h as X}from"./chunk-QMQCIH3X.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import{c as K}from"./chunk-UPRDDI4K.js";import{A as ee,h as Y,m as Z}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as Q}from"./chunk-MM7SAZOU.js";import"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{A as G,w as k,x as H,y as U}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as B,Nb as P,Nc as s,Oc as f,Pc as y,Rc as z,Sc as A,Tc as V,Z as D,_c as J,aa as M,ac as R,bc as T,cc as $,dc as F,fc as j,g as L,gc as O,hc as h,ic as a,id as c,jc as o,jd as d,kc as u,kd as W,ma as w,mb as S,ob as p,ra as g,rc as q,v as I,wc as v,ya as E,yc as x,za as N}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{let t=class t{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(M(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=_(_({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=w({token:t,factory:t.\u0275fac});let i=t;return i})();function se(i,t){if(i&1&&(a(0,"span",10),u(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,S)("alt",l.Name),p(),y(" ",l.Name," ")}}function ce(i,t){if(i&1&&(a(0,"tr")(1,"td"),u(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td")(6,"span",18),s(7),c(8,"json"),o()(),a(9,"td"),s(10),c(11,"json"),o(),a(12,"td"),s(13),c(14,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,S),p(2),y(" ",l.ChannelName," "),p(3),f(d(8,5,l.Request)),p(3),f(d(11,7,l.Response)),p(3),f(W(14,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function de(i,t){if(i&1){let l=q();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),j(13,ce,15,12,"tr",null,F),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),v("page",function(e){E(l);let r=x();return N(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=x();p(13),O((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function he(i,t){i&1&&(a(0,"div",9),u(1,"app-empty-state"),o())}var je=(()=>{let t=class t{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=K.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=B({type:t,selectors:[["app-channel-log"]],features:[J([b])],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"],[1,""]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),V("ngModelChange",function(C){return A(r.channelID,C)||(r.channelID=C),C}),P(7,se,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),R(12,de,21,13,"div",8),c(13,"async"),T(14,he,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),z("ngModel",r.channelID),p(6),$(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[G,te,le,pe,re,oe,ae,ne,ie,ee,Y,Z,k,U,H],encapsulation:2});let i=t;return i})();export{je as ChannelLogComponent};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as j,b as G,c as z,d as q,e as J,f as K}from"./chunk-KR6UNAIL.js";import{b as $}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-KSRL7Y2J.js";import"./chunk-XUDE7VBC.js";import"./chunk-X52ZT4MU.js";import"./chunk-BMOMTOEW.js";import"./chunk-HO2TMGLM.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{h as R}from"./chunk-QMQCIH3X.js";import"./chunk-YYV4FSYQ.js";import"./chunk-QXRG5XYP.js";import"./chunk-AGBJEXIM.js";import"./chunk-5UFP37GQ.js";import"./chunk-UPRDDI4K.js";import{A as W,c as F,h as A,m as H}from"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import"./chunk-RXLMJGUY.js";import{e as P}from"./chunk-MM7SAZOU.js";import"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import{u as O}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as b,Ic as y,Nb as S,Nc as p,Oc as U,Rc as k,Sc as B,Tc as M,_c as L,ac as C,ad as V,cc as x,ec as w,fc as v,gc as E,hc as m,ic as i,jc as o,kc as d,lb as I,ma as T,ob as s,ra as g,rc as _,tb as N,ud as D,wc as h,ya as u,yc as c,za as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var X=(()=>{let t=class t{constructor(){this.httpService=g(P)}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=T({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var te=e=>({"background-color":e});function ne(e,t){if(e&1&&(i(0,"th"),p(1),o()),e&2){let a=t.$implicit;s(),U(a.column)}}function ie(e,t){if(e&1&&(i(0,"td"),d(1,"span",4),o()),e&2){let a=t.$implicit,n=c().$implicit;s(),m("innerHTML",n[a.prop],I)}}function oe(e,t){if(e&1&&(i(0,"tr",3),v(1,ie,2,1,"td",null,w),o()),e&2){let a=t.$implicit,n=c();m("ngStyle",V(1,te,a.Status>200?"#F4D6D5":"#DEE9C9")),s(),E(n.configs())}}var Y=(()=>{let t=class t{constructor(){this.configs=D([]),this.data=D([]),this.status=D(void 0),this.eventClose=new N}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"ngStyle"],[3,"innerHTML"]],template:function(r,l){r&1&&(i(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),v(4,ne,2,1,"th",null,w),o()(),i(6,"tbody"),v(7,oe,3,3,"tr",3,w),o()()()),r&2&&(s(4),E(l.configs()),s(3),E(l.data()))},dependencies:[O],encapsulation:2});let e=t;return e})();function re(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onNewStepperState(l))}),d(1,"i",18),p(2," New "),o()}}function ae(e,t){if(e&1){let a=_();i(0,"button",17),h("click",function(){u(a),c();let r=y(11);return f(r.previous())}),p(1," Back "),o()}}function le(e,t){if(e&1){let a=_();i(0,"button",19),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onStepperNext(l))}),p(1," Next "),o()}}function pe(e,t){if(e&1){let a=_();i(0,"button",20),h("click",function(){u(a);let r=c(),l=y(11);return f(r.onSubmit(l))}),p(1,"Download"),o()}if(e&2){let a=c();m("disabled",!a.urls)}}function se(e,t){e&1&&(d(0,"i",21),i(1,"span"),p(2,"Instruction"),o())}function ce(e,t){e&1&&(i(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),p(4,"Note"),o()(),i(5,"div",26)(6,"ol",27)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),o(),i(9,"li"),p(10," Copy Product URL from "),i(11,"a",28),p(12,"https://seller.tokopedia.com/ "),o(),p(13," and paste in this form "),o(),i(14,"li"),p(15," Use New Line when you want to input several product URLs "),o()()()()())}function me(e,t){e&1&&(d(0,"i",29),i(1,"span"),p(2,"Download"),o())}function de(e,t){if(e&1){let a=_();i(0,"div",22)(1,"textarea",30),M("ngModelChange",function(r){u(a);let l=c();return B(l.urls,r)||(l.urls=r),f(r)}),o()()}if(e&2){let a=c();s(),m("placeholder",a.urlPlaceholder),k("ngModel",a.urls)}}function ue(e,t){e&1&&(d(0,"i",31),i(1,"span"),p(2,"Finish"),o())}function fe(e,t){if(e&1&&(i(0,"div",22),d(1,"app-response-api-list",32),o()),e&2){let a=c();s(),m("data",a.downloadResponses)("configs",a.configs)}}function _e(e,t){e&1&&(i(0,"h6"),p(1,"1"),o())}function he(e,t){e&1&&(i(0,"h6"),p(1,"2"),o())}function ge(e,t){e&1&&(i(0,"h6"),p(1,"3"),o())}var Ae=(()=>{let t=class t{constructor(){this.downloadService=g(X),this.authService=g(R),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
|
|
2
|
+
https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let r=this.urls.split(/\r?\n/);this.downloadService.download(r).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
|
|
3
|
+
${n?.Name}
|
|
4
|
+
</a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=b({type:t,selectors:[["app-by-url"]],features:[L([{provide:j,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(r,l){if(r&1){let Z=_();i(0,"mainpanel",1)(1,"actions"),C(2,re,3,0,"button",2),C(3,ae,2,0,"button",2),C(4,le,2,0,"button",3),C(5,pe,2,1,"button",4),o(),i(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),h("selectionChange",function(ee){return u(Z),f(l.onStepperChange(ee))}),i(12,"mat-step",9),S(13,se,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),o(),i(15,"mat-step",12),S(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),o(),i(18,"mat-step",13),S(19,ue,3,0,"ng-template",10)(20,fe,2,2,"ng-template",11),o(),S(21,_e,2,0,"ng-template",14)(22,he,2,0,"ng-template",15)(23,ge,2,0,"ng-template",16),o()()()()()()}r&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),x(l.stepperState=="FINISH"?2:-1),s(),x(l.stepperState=="DOWNLOAD"?3:-1),s(),x(l.stepperState=="GUIDE"?4:-1),s(),x(l.stepperState=="DOWNLOAD"?5:-1),s(5),m("selectedIndex",1),s(2),m("editable",l.stepperState!="FINISH")("completed",!0),s(3),m("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[$,K,J,G,q,W,F,A,H,Y,z],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
|
|
5
|
+
`],encapsulation:2});let e=t;return e})();export{Ae as ByUrlComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as jt}from"./chunk-EYT2YJGK.js";import{a as Ht,b as Ie}from"./chunk-RNWHARPK.js";import{c as we,d as De,e as Pe}from"./chunk-6KWG6O5L.js";import{a as zt}from"./chunk-HK5FXZE4.js";import{a as _e}from"./chunk-A6QXXKPR.js";import{a as Rt,b as rt}from"./chunk-M4ZE35XK.js";import{a as $t,g as st}from"./chunk-L7WZ6U4T.js";import{b as Ft,c as Kt,d as it,e as nt,f as ot}from"./chunk-LOWGZOML.js";import{A as Pt,B as Ye,E as Ot,I as Et,K as Lt,Q as Je,T as F,X as et,Y as tt,ca as Vt,g as Xe,ja as Nt,m as wt,oa as Bt,q as Dt,ra as At,sa as xe,u as ge,v as fe}from"./chunk-5PMKN6PM.js";import{a as T}from"./chunk-AGBJEXIM.js";import{e as Me}from"./chunk-OXWPYJNB.js";import{c as Qe,d as We,f as de,i as he}from"./chunk-XBIHN6D3.js";import{b as f,c as qe}from"./chunk-JBEKD57G.js";import{b as Oe,c as Ee,d as Tt,e as Le,f as Ve,g as Mt,h as Fe}from"./chunk-EDEZ3JLR.js";import{A as V,h as Se,m as Te}from"./chunk-L3W6SG2T.js";import{v as kt,w as St}from"./chunk-STYL7ETF.js";import{G as Ct,I as Ze,e as vt,f as Ge,g as Ue,h as yt,j as ke,m as R,n as ue}from"./chunk-LNJUGHOX.js";import{$b as J,$c as xt,Ac as ve,Bc as H,Cc as D,Dc as P,Fd as $,G as X,Gb as k,Gd as Q,Ha as x,Hb as ft,Hc as ye,Jc as ze,Kb as Re,Kc as Ce,Lc as I,Mb as v,Mc as d,Nc as w,Oa as dt,Oc as re,Qa as ht,Qc as ae,Rc as le,Sc as ce,Yb as je,Zb as M,Zc as He,_c as pe,aa as K,ad as It,bc as ee,cc as te,ec as ie,fc as ne,gc as l,hc as c,hd as G,ic as m,jc as y,jd as U,kb as $e,kd as me,la as mt,lb as _t,ma as O,na as ut,nb as p,nc as oe,oc as se,od as Z,pa as Ae,pd as bt,qc as S,ra as b,sb as E,sd as q,td as L,v as W,vc as g,xa as h,xc as a,ya as _,yb as gt,za as Ke,zb as Y}from"./chunk-ZYJ6LAJ3.js";import{a as j,b as z}from"./chunk-66YHNWRR.js";var Gt=(()=>{let s=class s{constructor(){this.httpService=b(Me)}getShippingOptions(t,i){return this.httpService.post(T.GetShopeeShippingOptions,{OrderNumber:t,ShopID:i})}pickupOrder(t){return this.httpService.post(T.ShopeeSelectShipping,t)}pickupMultipleOrders(t){return this.httpService.post(T.ShopeeSelectMultipleShipping,t)}dropOffOrder(t,i){let n={OrderNumber:t,ShopID:i,dropoff:{}};return this.httpService.post(T.ShopeeSelectShipping,n)}dropOffMultipleOrders(t){return this.httpService.post(T.ShopeeSelectMultipleShipping,t)}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();var Ut=(()=>{let s=class s{constructor(){this.httpService=b(Me)}getShippingOptions(t,i){return this.httpService.post(T.GetTiktokShippingOptions,{OrderNumber:t,ShopID:i}).pipe(W(n=>this.formatDatePickUpOptions(n)))}pickupOrder(t){return this.httpService.post(T.TiktokSelectShipping,t)}pickupMultipleOrders(t){return this.httpService.post(T.TiktokSelectMultipleShipping,t)}dropOffOrder(t,i){let n={handover_method:"DROP_OFF",PackageID:t,ShopID:i};return this.httpService.post(T.TiktokSelectShipping,n)}dropOffMultipleOrders(t){return this.httpService.post(T.TiktokSelectMultipleShipping,t)}formatDatePickUpOptions(t){return t?.Options?.pickup_slots&&(t.Options.pickup_slots=t?.Options?.pickup_slots.map(i=>{let n=qe.convertTimestampToDate(i.start_time),r=qe.convertTimestampToDate(i.end_time);return i.start_date=n,i.end_date=r,i})),t}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();function ii(o,s){if(o&1){let e=S();c(0,"div",10),g("click",function(){h(e);let i=a();return _(i.onSelectDelivery("DROP_OFF"))}),c(1,"div",11),y(2,"i",12),c(3,"h3",13),d(4,"Drop off"),m()(),c(5,"p",14),d(6," You can drop off your package at the nearest shipping counter in your city. "),m()()}if(o&2){let e=a();ze("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function ni(o,s){if(o&1){let e=S();c(0,"div",10),g("click",function(){h(e);let i=a();return _(i.onSelectDelivery("PICK_UP"))}),c(1,"div",11),y(2,"i",15),c(3,"h3",16),d(4,"Pick up"),m()(),c(5,"p",17),d(6," The courier will collect the package from your address. "),m()()}if(o&2){let e=a();ze("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var at=(()=>{let s=class s{constructor(){this.data=b(Ee),this.dialogRef=b(Oe),this.selectedDelivery=x("DROP_OFF"),this.showPickup=x(!0),this.showDropOff=x(!0),this.initOptionsCondition()}onSelectDelivery(t){this.selectedDelivery.set(t)}initOptionsCondition(){switch(this.data.channelType){case f.Shopee:break;case f.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),d(4,"Delivery Order"),m(),c(5,"div",3),d(6,"Your selected order(s) will be set to"),m()(),c(7,"div")(8,"i",4),g("click",function(){return n.onClose()}),m()()()(),c(9,"mat-dialog-content",5)(10,"div",6),J(11,ii,7,4,"div",7),J(12,ni,7,4,"div",7),m(),c(13,"div",8)(14,"button",9),g("click",function(){return n.onConfirm()}),d(15," OK "),m()()()),i&2&&(p(11),ee(n.showPickup()?11:-1),p(),ee(n.showDropOff()?12:-1))},dependencies:[Fe,Le,Ve],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]});let o=s;return o})();function ri(o,s){if(o&1&&(c(0,"ng-option",3),d(1),m()),o&2){let e=s.$implicit;l("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),w(e==null?null:e.address)}}function ai(o,s){if(o&1&&(c(0,"ng-option",6)(1,"span",7),d(2),G(3,"date"),m(),c(4,"span"),d(5),m()()),o&2){let e=s.$implicit;l("value",e==null?null:e.pickup_time_id),p(2),w(U(3,3,e==null?null:e.date,"d MMMM")),p(3),w(e==null?null:e.time_text)}}var qt=(()=>{let s=class s{constructor(){this.shippingOptions=L(),this.onFormChanges=q(),this.addressList=Z(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=x(null),this.timeOptions=x(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=x(null)}onAddressChange(t){let i=this.addressList().find(n=>n.address_id===t);this.timeOptions.set(this.convertTimestampToDate(i?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(t){return t.map(i=>{let n=new Date(i.date*1e3);return z(j({},i),{date:n})})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"label",1),d(2,"Address"),m(),c(3,"ng-select",2),ce("ngModelChange",function(u){return le(n.selectedShipping,u)||(n.selectedShipping=u),u}),g("ngModelChange",function(u){return n.onAddressChange(u),n.onValueChanges()}),ie(4,ri,2,3,"ng-option",3,te),m()(),c(6,"div",0)(7,"label",4),d(8,"Date"),m(),c(9,"ng-select",5),ce("ngModelChange",function(u){return le(n.pickupTime,u)||(n.pickupTime=u),u}),g("ngModelChange",function(){return n.onValueChanges()}),ie(10,ai,6,6,"ng-option",6,te),m()()),i&2&&(p(3),l("clearable",!1),ae("ngModel",n.selectedShipping),p(),ne(n.addressList()),p(5),l("clearable",!1),ae("ngModel",n.pickupTime),p(),ne(n.timeOptions()))},dependencies:[R,Pe,De,we,V,Se,Te,St,kt,ke],encapsulation:2});let o=s;return o})();function li(o,s){if(o&1&&(c(0,"ng-option",3)(1,"span",4),d(2),G(3,"date"),m(),c(4,"span"),d(5),G(6,"date"),m(),c(7,"span",5),d(8,"-"),m(),c(9,"span"),d(10),G(11,"date"),m()()),o&2){let e=s.$implicit,t=s.$index;l("value",t),p(2),w(U(3,4,e==null?null:e.start_date,"d MMMM")),p(3),w(U(6,7,e==null?null:e.start_date,"HH:mm")),p(5),w(U(11,10,e==null?null:e.end_date,"HH:mm"))}}var Qt=(()=>{let s=class s{constructor(){this.shippingOptions=L(),this.onFormChanges=q(),this.timeOptions=Z(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=x(null)}onValueChanges(){let t=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:t?.start_time,end_time:t?.end_time})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"label",1),d(2,"Time"),m(),c(3,"ng-select",2),ce("ngModelChange",function(u){return le(n.selectedTimeIndex,u)||(n.selectedTimeIndex=u),u}),g("ngModelChange",function(){return n.onValueChanges()}),ie(4,li,12,13,"ng-option",3,te),m()()),i&2&&(p(3),l("clearable",!1),ae("ngModel",n.selectedTimeIndex),p(),ne(n.timeOptions()))},dependencies:[R,Pe,De,we,V,Se,Te,ke],encapsulation:2});let o=s;return o})();function ci(o,s){if(o&1){let e=S();c(0,"shopee-pickup",10),g("onFormChanges",function(i){h(e);let n=a();return _(n.onFormChanges(i))}),m()}if(o&2){let e=a();l("shippingOptions",e.dialogData.shippingOptions)}}function pi(o,s){if(o&1){let e=S();c(0,"tiktok-pickup",10),g("onFormChanges",function(i){h(e);let n=a();return _(n.onFormChanges(i))}),m()}if(o&2){let e=a();l("shippingOptions",e.dialogData.shippingOptions)}}var lt=(()=>{let s=class s{constructor(){this.dialogRef=b(Oe),this.dialogData=b(Ee),this.shippingOptions=x(this.dialogData.shippingOptions),this.channelType=x(this.dialogData.channelType),this.order=x(this.dialogData.order),this.channelTypeEnum=f,this.pickupData=x(null)}onFormChanges(t){this.pickupData.set(t)}onClose(){this.dialogRef.close()}onSave(){let t=this.generatePickupData();this.dialogRef.close(t)}generatePickupData(){let t=this.dialogData.multipleOrder??!1;switch(this.channelType()){case f.Shopee:return t?{pickup:this.pickupData()}:{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case f.Tiktok:return t?{pickup_slot:this.pickupData(),handover_method:"PICKUP"}:{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(i,n){if(i&1&&(c(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),d(4,"Set Pickup"),m(),c(5,"div",2)(6,"div",3),d(7,"Shipping Method"),m(),c(8,"div",3),d(9),m()()(),c(10,"div")(11,"i",4),g("click",function(){return n.onClose()}),m()()()(),c(12,"mat-dialog-content",5),J(13,ci,1,1,"shopee-pickup",6)(14,pi,1,1,"tiktok-pickup",6),m(),c(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),g("click",function(){return n.onClose()}),d(18," Cancel "),m(),c(19,"button",9),g("click",function(){return n.onSave()}),d(20," Ok "),m()()()),i&2){let r,u;p(9),re(" ",!((r=n.order())==null||r.LogisticService==null)&&r.LogisticService.Name?(r=n.order())==null||r.LogisticService==null?null:r.LogisticService.Name:"-"," "),p(4),ee((u=n.channelType())===n.channelTypeEnum.Shopee?13:u===n.channelTypeEnum.Tiktok?14:-1)}},dependencies:[Fe,Le,Mt,Ve,V,qt,Qt],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 7 Pro";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']});let o=s;return o})();var Xn=(()=>{let s=class s{constructor(){this.shopeeShippingService=b(Gt),this.tiktokShippingService=b(Ut),this.dialog=b(Tt)}setFulfillmentOrder(t){return this.getShippingOptions(t.Number,t.ShopID,t.MarketType).pipe(K(i=>this.dialog.open(at,{height:"400px",width:"530px",data:{options:i,channelType:t.MarketType}}).afterClosed().pipe(X(n=>_e.IsNotEmpty(n)),W(n=>({type:n,order:t,options:i})),K(n=>n.type=="PICK_UP"?this.onPickupOrder(n.order,n.options):this.onDropOffOrder(n.order,n.options)))))}onPickupOrder(t,i){return this.dialog.open(lt,{width:"530px",data:{order:t,shippingOptions:i,channelType:t.MarketType,multipleOrder:!1},disableClose:!0}).afterClosed().pipe(X(n=>_e.IsNotEmpty(n)),K(n=>this.pickupOrder(t,n)))}pickupOrder(t,i){switch(t.MarketType){case f.Shopee:return this.shopeeShippingService.pickupOrder(i);case f.Tiktok:return this.tiktokShippingService.pickupOrder(i)}}onDropOffOrder(t,i){switch(t.MarketType){case f.Shopee:return this.shopeeShippingService.dropOffOrder(t.Number,t.ShopID);case f.Tiktok:let n=i?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(n,t.ShopID)}}setFulfillmentMultipleOrders(t){let i=t[0];return this.getShippingOptions(i.Number,i.ShopID,i.MarketType).pipe(K(n=>this.dialog.open(at,{height:"400px",width:"530px",data:{options:n,channelType:i.MarketType}}).afterClosed().pipe(X(r=>_e.IsNotEmpty(r)),W(r=>({type:r,orders:t,options:n})))),K(n=>n.type=="PICK_UP"?this.openDialogPickupMultipleOrders(n.orders,n.options):this.dropOffMultipleOrder(n.orders,n.options)))}openDialogPickupMultipleOrders(t,i){let n=t[0];return this.dialog.open(lt,{width:"530px",data:{order:n,shippingOptions:i,channelType:n.MarketType,multipleOrder:!0},disableClose:!0}).afterClosed().pipe(X(r=>_e.IsNotEmpty(r)),K(r=>this.pickupMultipleOrder(t,r)))}pickupMultipleOrder(t,i){let n=t[0],r=this.generateMultiplePickupData(t,i);switch(n.MarketType){case f.Shopee:return this.shopeeShippingService.pickupOrder(r);case f.Tiktok:return this.tiktokShippingService.pickupOrder(r)}}generateMultiplePickupData(t,i){switch(t[0].MarketType){case f.Shopee:let n=t.map(u=>({OrderNumber:u.Number,ShopID:u.ShopID}));return i.List=n,i;case f.Tiktok:let r=t.map(u=>({PackageID:u.Number,ShopID:u.ShopID}));return i.List=r,i}}dropOffMultipleOrder(t,i){switch(t[0].MarketType){case f.Shopee:let r=this.generateMultipleDropOffData(t);return this.shopeeShippingService.dropOffMultipleOrders(r);case f.Tiktok:let u=i?.Form?.information?.PackageID,C=this.generateMultipleDropOffData(t,u);return this.tiktokShippingService.dropOffMultipleOrders(C)}}generateMultipleDropOffData(t,i){switch(t[0].MarketType){case f.Shopee:return t.map(C=>({OrderNumber:C.Number,ShopID:C.ShopID}));case f.Tiktok:return{List:t.map(C=>({PackageID:i,ShopID:C.ShopID})),handover_method:"DROP_OFF"}}}getShippingOptions(t,i,n){switch(n){case f.Shopee:return this.getShopeeShippingOptions(t,i);case f.Tiktok:return this.getTiktokShippingOptions(t,i)}}getShopeeShippingOptions(t,i){return this.shopeeShippingService.getShippingOptions(t,i)}getTiktokShippingOptions(t,i){return this.tiktokShippingService.getShippingOptions(t,i)}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();var Wt=`
|
|
1
|
+
import{a as jt}from"./chunk-Z2XRGVGT.js";import{a as Ht,b as Ie}from"./chunk-ZGIYCORM.js";import{c as Le,d as Ve,e as Fe}from"./chunk-C2LAQOUW.js";import{a as zt}from"./chunk-WIRBYT7F.js";import{a as xe}from"./chunk-A6QXXKPR.js";import{a as Rt,b as rt}from"./chunk-ZDBFIPDM.js";import{a as $t,g as st}from"./chunk-DDFP4CNP.js";import{b as Ot,c as Kt,d as it,e as nt,f as ot}from"./chunk-RBZU7OVM.js";import{a as we,b as De,c as Bt,d as Pe,e as Oe,f as At,g as Ee}from"./chunk-5WT456T7.js";import{a as Nt}from"./chunk-YNL43MLU.js";import{A as Tt,B as Ye,E as Mt,I as wt,K as Dt,Q as Je,T as V,X as et,Y as tt,ca as Pt,g as Xe,ia as Et,la as Lt,m as kt,ma as fe,q as St,u as _e,ua as Vt,v as ge}from"./chunk-RXC5D64C.js";import{c as Ft}from"./chunk-O4D64GHO.js";import{a as T}from"./chunk-AGBJEXIM.js";import{b as f,c as Ze}from"./chunk-UPRDDI4K.js";import{A as F,h as Te,m as Me}from"./chunk-WAXAIL2I.js";import{e as Se}from"./chunk-MM7SAZOU.js";import{e as Ct,g as We}from"./chunk-NQLMPUSB.js";import{A as R,C as ue,s as vt,t as Ge,u as Ue,v as yt,x as ke}from"./chunk-JNRCB7N3.js";import{c as qe,d as Qe,f as de,i as he}from"./chunk-XBIHN6D3.js";import{$c as pe,Aa as Ke,Ab as Y,Bc as ve,Cc as H,Dc as D,Ec as P,Fd as $,G as X,Gd as Q,Hb as k,Ia as x,Ib as ft,Ic as ye,Kc as ze,Lb as Re,Lc as Ce,Mc as I,Nb as v,Nc as d,Oc as w,Pa as dt,Pc as re,Ra as ht,Rc as ae,Sc as le,Tc as ce,Zb as je,_b as M,_c as He,aa as K,ac as J,ad as xt,bd as It,cc as ee,dc as te,fc as ie,gc as ne,hc as l,ic as c,id as G,jc as m,kc as y,kd as U,la as mt,lb as $e,ld as me,ma as O,mb as _t,na as ut,ob as p,oc as oe,pa as Ae,pc as se,pd as Z,qd as bt,ra as b,rc as S,tb as E,td as q,ud as L,v as W,wc as g,ya as h,yc as a,za as _,zb as gt}from"./chunk-OHGMB7HJ.js";import{a as j,b as z}from"./chunk-66YHNWRR.js";var Gt=(()=>{let s=class s{constructor(){this.httpService=b(Se)}getShippingOptions(t,i){return this.httpService.post(T.GetShopeeShippingOptions,{OrderNumber:t,ShopID:i})}pickupOrder(t){return this.httpService.post(T.ShopeeSelectShipping,t)}pickupMultipleOrders(t){return this.httpService.post(T.ShopeeSelectMultipleShipping,t)}dropOffOrder(t,i){let n={OrderNumber:t,ShopID:i,dropoff:{}};return this.httpService.post(T.ShopeeSelectShipping,n)}dropOffMultipleOrders(t){return this.httpService.post(T.ShopeeSelectMultipleShipping,t)}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();var Ut=(()=>{let s=class s{constructor(){this.httpService=b(Se)}getShippingOptions(t,i){return this.httpService.post(T.GetTiktokShippingOptions,{OrderNumber:t,ShopID:i}).pipe(W(n=>this.formatDatePickUpOptions(n)))}pickupOrder(t){return this.httpService.post(T.TiktokSelectShipping,t)}pickupMultipleOrders(t){return this.httpService.post(T.TiktokSelectMultipleShipping,t)}dropOffOrder(t,i){let n={handover_method:"DROP_OFF",PackageID:t,ShopID:i};return this.httpService.post(T.TiktokSelectShipping,n)}dropOffMultipleOrders(t){return this.httpService.post(T.TiktokSelectMultipleShipping,t)}formatDatePickUpOptions(t){return t?.Options?.pickup_slots&&(t.Options.pickup_slots=t?.Options?.pickup_slots.map(i=>{let n=Ze.convertTimestampToDate(i.start_time),r=Ze.convertTimestampToDate(i.end_time);return i.start_date=n,i.end_date=r,i})),t}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();function ii(o,s){if(o&1){let e=S();c(0,"div",10),g("click",function(){h(e);let i=a();return _(i.onSelectDelivery("DROP_OFF"))}),c(1,"div",11),y(2,"i",12),c(3,"h3",13),d(4,"Drop off"),m()(),c(5,"p",14),d(6," You can drop off your package at the nearest shipping counter in your city. "),m()()}if(o&2){let e=a();ze("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function ni(o,s){if(o&1){let e=S();c(0,"div",10),g("click",function(){h(e);let i=a();return _(i.onSelectDelivery("PICK_UP"))}),c(1,"div",11),y(2,"i",15),c(3,"h3",16),d(4,"Pick up"),m()(),c(5,"p",17),d(6," The courier will collect the package from your address. "),m()()}if(o&2){let e=a();ze("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var at=(()=>{let s=class s{constructor(){this.data=b(De),this.dialogRef=b(we),this.selectedDelivery=x("DROP_OFF"),this.showPickup=x(!0),this.showDropOff=x(!0),this.initOptionsCondition()}onSelectDelivery(t){this.selectedDelivery.set(t)}initOptionsCondition(){switch(this.data.channelType){case f.Shopee:break;case f.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),d(4,"Delivery Order"),m(),c(5,"div",3),d(6,"Your selected order(s) will be set to"),m()(),c(7,"div")(8,"i",4),g("click",function(){return n.onClose()}),m()()()(),c(9,"mat-dialog-content",5)(10,"div",6),J(11,ii,7,4,"div",7),J(12,ni,7,4,"div",7),m(),c(13,"div",8)(14,"button",9),g("click",function(){return n.onConfirm()}),d(15," OK "),m()()()),i&2&&(p(11),ee(n.showPickup()?11:-1),p(),ee(n.showDropOff()?12:-1))},dependencies:[Ee,Pe,Oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]});let o=s;return o})();function ri(o,s){if(o&1&&(c(0,"ng-option",3),d(1),m()),o&2){let e=s.$implicit;l("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),w(e==null?null:e.address)}}function ai(o,s){if(o&1&&(c(0,"ng-option",6)(1,"span",7),d(2),G(3,"date"),m(),c(4,"span"),d(5),m()()),o&2){let e=s.$implicit;l("value",e==null?null:e.pickup_time_id),p(2),w(U(3,3,e==null?null:e.date,"d MMMM")),p(3),w(e==null?null:e.time_text)}}var qt=(()=>{let s=class s{constructor(){this.shippingOptions=L(),this.onFormChanges=q(),this.addressList=Z(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=x(null),this.timeOptions=x(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=x(null)}onAddressChange(t){let i=this.addressList().find(n=>n.address_id===t);this.timeOptions.set(this.convertTimestampToDate(i?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(t){return t.map(i=>{let n=new Date(i.date*1e3);return z(j({},i),{date:n})})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"label",1),d(2,"Address"),m(),c(3,"ng-select",2),ce("ngModelChange",function(u){return le(n.selectedShipping,u)||(n.selectedShipping=u),u}),g("ngModelChange",function(u){return n.onAddressChange(u),n.onValueChanges()}),ie(4,ri,2,3,"ng-option",3,te),m()(),c(6,"div",0)(7,"label",4),d(8,"Date"),m(),c(9,"ng-select",5),ce("ngModelChange",function(u){return le(n.pickupTime,u)||(n.pickupTime=u),u}),g("ngModelChange",function(){return n.onValueChanges()}),ie(10,ai,6,6,"ng-option",6,te),m()()),i&2&&(p(3),l("clearable",!1),ae("ngModel",n.selectedShipping),p(),ne(n.addressList()),p(5),l("clearable",!1),ae("ngModel",n.pickupTime),p(),ne(n.timeOptions()))},dependencies:[R,Fe,Ve,Le,F,Te,Me,Nt,Ft,ke],encapsulation:2});let o=s;return o})();function li(o,s){if(o&1&&(c(0,"ng-option",3)(1,"span",4),d(2),G(3,"date"),m(),c(4,"span"),d(5),G(6,"date"),m(),c(7,"span",5),d(8,"-"),m(),c(9,"span"),d(10),G(11,"date"),m()()),o&2){let e=s.$implicit,t=s.$index;l("value",t),p(2),w(U(3,4,e==null?null:e.start_date,"d MMMM")),p(3),w(U(6,7,e==null?null:e.start_date,"HH:mm")),p(5),w(U(11,10,e==null?null:e.end_date,"HH:mm"))}}var Qt=(()=>{let s=class s{constructor(){this.shippingOptions=L(),this.onFormChanges=q(),this.timeOptions=Z(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=x(null)}onValueChanges(){let t=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:t?.start_time,end_time:t?.end_time})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(i,n){i&1&&(c(0,"div",0)(1,"label",1),d(2,"Time"),m(),c(3,"ng-select",2),ce("ngModelChange",function(u){return le(n.selectedTimeIndex,u)||(n.selectedTimeIndex=u),u}),g("ngModelChange",function(){return n.onValueChanges()}),ie(4,li,12,13,"ng-option",3,te),m()()),i&2&&(p(3),l("clearable",!1),ae("ngModel",n.selectedTimeIndex),p(),ne(n.timeOptions()))},dependencies:[R,Fe,Ve,Le,F,Te,Me,ke],encapsulation:2});let o=s;return o})();function ci(o,s){if(o&1){let e=S();c(0,"shopee-pickup",10),g("onFormChanges",function(i){h(e);let n=a();return _(n.onFormChanges(i))}),m()}if(o&2){let e=a();l("shippingOptions",e.dialogData.shippingOptions)}}function pi(o,s){if(o&1){let e=S();c(0,"tiktok-pickup",10),g("onFormChanges",function(i){h(e);let n=a();return _(n.onFormChanges(i))}),m()}if(o&2){let e=a();l("shippingOptions",e.dialogData.shippingOptions)}}var lt=(()=>{let s=class s{constructor(){this.dialogRef=b(we),this.dialogData=b(De),this.shippingOptions=x(this.dialogData.shippingOptions),this.channelType=x(this.dialogData.channelType),this.order=x(this.dialogData.order),this.channelTypeEnum=f,this.pickupData=x(null)}onFormChanges(t){this.pickupData.set(t)}onClose(){this.dialogRef.close()}onSave(){let t=this.generatePickupData();this.dialogRef.close(t)}generatePickupData(){let t=this.dialogData.multipleOrder??!1;switch(this.channelType()){case f.Shopee:return t?{pickup:this.pickupData()}:{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case f.Tiktok:return t?{pickup_slot:this.pickupData(),handover_method:"PICKUP"}:{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(i,n){if(i&1&&(c(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),d(4,"Set Pickup"),m(),c(5,"div",2)(6,"div",3),d(7,"Shipping Method"),m(),c(8,"div",3),d(9),m()()(),c(10,"div")(11,"i",4),g("click",function(){return n.onClose()}),m()()()(),c(12,"mat-dialog-content",5),J(13,ci,1,1,"shopee-pickup",6)(14,pi,1,1,"tiktok-pickup",6),m(),c(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),g("click",function(){return n.onClose()}),d(18," Cancel "),m(),c(19,"button",9),g("click",function(){return n.onSave()}),d(20," Ok "),m()()()),i&2){let r,u;p(9),re(" ",!((r=n.order())==null||r.LogisticService==null)&&r.LogisticService.Name?(r=n.order())==null||r.LogisticService==null?null:r.LogisticService.Name:"-"," "),p(4),ee((u=n.channelType())===n.channelTypeEnum.Shopee?13:u===n.channelTypeEnum.Tiktok?14:-1)}},dependencies:[Ee,Pe,At,Oe,F,qt,Qt],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 7 Pro";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']});let o=s;return o})();var Xn=(()=>{let s=class s{constructor(){this.shopeeShippingService=b(Gt),this.tiktokShippingService=b(Ut),this.dialog=b(Bt)}setFulfillmentOrder(t){return this.getShippingOptions(t.Number,t.ShopID,t.MarketType).pipe(K(i=>this.dialog.open(at,{height:"400px",width:"530px",data:{options:i,channelType:t.MarketType}}).afterClosed().pipe(X(n=>xe.IsNotEmpty(n)),W(n=>({type:n,order:t,options:i})),K(n=>n.type=="PICK_UP"?this.onPickupOrder(n.order,n.options):this.onDropOffOrder(n.order,n.options)))))}onPickupOrder(t,i){return this.dialog.open(lt,{width:"530px",data:{order:t,shippingOptions:i,channelType:t.MarketType,multipleOrder:!1},disableClose:!0}).afterClosed().pipe(X(n=>xe.IsNotEmpty(n)),K(n=>this.pickupOrder(t,n)))}pickupOrder(t,i){switch(t.MarketType){case f.Shopee:return this.shopeeShippingService.pickupOrder(i);case f.Tiktok:return this.tiktokShippingService.pickupOrder(i)}}onDropOffOrder(t,i){switch(t.MarketType){case f.Shopee:return this.shopeeShippingService.dropOffOrder(t.Number,t.ShopID);case f.Tiktok:let n=i?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(n,t.ShopID)}}setFulfillmentMultipleOrders(t){let i=t[0];return this.getShippingOptions(i.Number,i.ShopID,i.MarketType).pipe(K(n=>this.dialog.open(at,{height:"400px",width:"530px",data:{options:n,channelType:i.MarketType}}).afterClosed().pipe(X(r=>xe.IsNotEmpty(r)),W(r=>({type:r,orders:t,options:n})))),K(n=>n.type=="PICK_UP"?this.openDialogPickupMultipleOrders(n.orders,n.options):this.dropOffMultipleOrder(n.orders,n.options)))}openDialogPickupMultipleOrders(t,i){let n=t[0];return this.dialog.open(lt,{width:"530px",data:{order:n,shippingOptions:i,channelType:n.MarketType,multipleOrder:!0},disableClose:!0}).afterClosed().pipe(X(r=>xe.IsNotEmpty(r)),K(r=>this.pickupMultipleOrder(t,r)))}pickupMultipleOrder(t,i){let n=t[0],r=this.generateMultiplePickupData(t,i);switch(n.MarketType){case f.Shopee:return this.shopeeShippingService.pickupOrder(r);case f.Tiktok:return this.tiktokShippingService.pickupOrder(r)}}generateMultiplePickupData(t,i){switch(t[0].MarketType){case f.Shopee:let n=t.map(u=>({OrderNumber:u.Number,ShopID:u.ShopID}));return i.List=n,i;case f.Tiktok:let r=t.map(u=>({PackageID:u.Number,ShopID:u.ShopID}));return i.List=r,i}}dropOffMultipleOrder(t,i){switch(t[0].MarketType){case f.Shopee:let r=this.generateMultipleDropOffData(t);return this.shopeeShippingService.dropOffMultipleOrders(r);case f.Tiktok:let u=i?.Form?.information?.PackageID,C=this.generateMultipleDropOffData(t,u);return this.tiktokShippingService.dropOffMultipleOrders(C)}}generateMultipleDropOffData(t,i){switch(t[0].MarketType){case f.Shopee:return t.map(C=>({OrderNumber:C.Number,ShopID:C.ShopID}));case f.Tiktok:return{List:t.map(C=>({PackageID:i,ShopID:C.ShopID})),handover_method:"DROP_OFF"}}}getShippingOptions(t,i,n){switch(n){case f.Shopee:return this.getShopeeShippingOptions(t,i);case f.Tiktok:return this.getTiktokShippingOptions(t,i)}}getShopeeShippingOptions(t,i){return this.shopeeShippingService.getShippingOptions(t,i)}getTiktokShippingOptions(t,i){return this.tiktokShippingService.getShippingOptions(t,i)}};s.\u0275fac=function(i){return new(i||s)},s.\u0275prov=O({token:s,factory:s.\u0275fac,providedIn:"root"});let o=s;return o})();var Wt=`
|
|
2
2
|
.p-contextmenu {
|
|
3
3
|
background: dt('contextmenu.background');
|
|
4
4
|
color: dt('contextmenu.color');
|
|
@@ -146,4 +146,4 @@ import{a as jt}from"./chunk-EYT2YJGK.js";import{a as Ht,b as Ie}from"./chunk-RNW
|
|
|
146
146
|
.p-contextmenu-mobile .p-contextmenu-item-active > .p-contextmenu-item-content .p-contextmenu-submenu-icon {
|
|
147
147
|
transform: rotate(-90deg);
|
|
148
148
|
}
|
|
149
|
-
`;var mi=["sublist"],ui=(o,s)=>({instance:o,processedItem:s}),Yt=()=>({class:"p-contextmenu-submenu-icon"}),di=()=>({exact:!1}),hi=o=>({$implicit:o});function _i(o,s){if(o&1&&y(0,"li",8),o&2){let e=a().$implicit,t=a(2);Ce(t.getItemProp(e,"style")),I(t.cn(t.cx("separator"),t.getItemProp(e,"styleClass"))),l("pBind",t._ptm("separator")),M("id",t.getItemId(e))}}function gi(o,s){if(o&1&&y(0,"span",19),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cn(n.cx("itemIcon"),n.getItemProp(t,"icon"))),l("ngStyle",n.getItemProp(t,"iconStyle"))("pBind",n.getPTOptions(t,i,"itemIcon")),M("aria-hidden",!0)("tabindex",-1)}}function fi(o,s){if(o&1&&(c(0,"span",20),d(1),m()),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("pBind",n.getPTOptions(t,i,"itemLabel")),p(),re(" ",n.getItemLabel(t)," ")}}function xi(o,s){if(o&1&&y(0,"span",21),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("innerHTML",n.getItemLabel(t),$e)("pBind",n.getPTOptions(t,i,"itemLabel"))}}function Ii(o,s){if(o&1&&y(0,"p-badge",22),o&2){let e=a(4).$implicit,t=a(2);I(t.getItemProp(e,"badgeStyleClass")),l("value",t.getItemProp(e,"badge"))}}function bi(o,s){if(o&1&&(Ke(),y(0,"svg",25)),o&2){let e=a(5),t=e.$implicit,i=e.index,n=a(2);I(n.cx("submenuIcon")),l("pBind",n.getPTOptions(t,i,"submenuIcon")),M("aria-hidden",!0)}}function vi(o,s){}function yi(o,s){o&1&&v(0,vi,0,0,"ng-template",26),o&2&&je("aria-hidden",!0)}function Ci(o,s){if(o&1&&(oe(0),v(1,bi,1,4,"svg",23)(2,yi,1,1,null,24),se()),o&2){let e=a(6);p(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),p(),l("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",pe(3,Yt))}}function ki(o,s){if(o&1&&(c(0,"a",15),v(1,gi,1,6,"span",16)(2,fi,2,4,"span",17)(3,xi,1,4,"ng-template",null,2,me)(5,Ii,1,3,"p-badge",18)(6,Ci,3,4,"ng-container",11),m()),o&2){let e=ye(4),t=a(3),i=t.$implicit,n=t.index,r=a(2);I(r.cx("itemLink")),l("target",r.getItemProp(i,"target"))("pBind",r.getPTOptions(i,n,"itemLink")),M("href",r.getItemProp(i,"url"),_t)("data-automationid",r.getItemProp(i,"automationId"))("tabindex",-1),p(),l("ngIf",r.getItemProp(i,"icon")),p(),l("ngIf",r.getItemProp(i,"escape"))("ngIfElse",e),p(3),l("ngIf",r.getItemProp(i,"badge")),p(),l("ngIf",r.isItemGroup(i))}}function Si(o,s){if(o&1&&y(0,"span",19),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cn(n.cx("itemIcon"),n.getItemProp(t,"icon"))),l("ngStyle",n.getItemProp(t,"iconStyle"))("pBind",n.getPTOptions(t,i,"itemIcon")),M("aria-hidden",!0)("tabindex",-1)}}function Ti(o,s){if(o&1&&(c(0,"span",20),d(1),m()),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("pBind",n.getPTOptions(t,i,"itemLabel")),p(),re(" ",n.getItemLabel(t)," ")}}function Mi(o,s){if(o&1&&y(0,"span",21),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("innerHTML",n.getItemLabel(t),$e)("pBind",n.getPTOptions(t,i,"itemLabel"))}}function wi(o,s){if(o&1&&y(0,"p-badge",22),o&2){let e=a(4).$implicit,t=a(2);I(t.getItemProp(e,"badgeStyleClass")),l("value",t.getItemProp(e,"badge"))}}function Di(o,s){if(o&1&&(Ke(),y(0,"svg",25)),o&2){let e=a(5),t=e.$implicit,i=e.index,n=a(2);I(n.cx("submenuIcon")),l("pBind",n.getPTOptions(t,i,"submenuIcon")),M("aria-hidden",!0)}}function Pi(o,s){}function Oi(o,s){o&1&&v(0,Pi,0,0,"ng-template",26),o&2&&je("aria-hidden",!0)}function Ei(o,s){if(o&1&&(oe(0),v(1,Di,1,4,"svg",23)(2,Oi,1,1,null,24),se()),o&2){let e=a(6);p(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),p(),l("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",pe(3,Yt))}}function Li(o,s){if(o&1&&(c(0,"a",27),v(1,Si,1,6,"span",16)(2,Ti,2,4,"span",17)(3,Mi,1,4,"ng-template",null,2,me)(5,wi,1,3,"p-badge",18)(6,Ei,3,4,"ng-container",11),m()),o&2){let e=ye(4),t=a(3),i=t.$implicit,n=t.index,r=a(2);I(r.cx("itemLink")),l("routerLink",r.getItemProp(i,"routerLink"))("queryParams",r.getItemProp(i,"queryParams"))("routerLinkActiveOptions",r.getItemProp(i,"routerLinActiveOptions")||pe(20,di))("target",r.getItemProp(i,"target"))("fragment",r.getItemProp(i,"fragment"))("queryParamsHandling",r.getItemProp(i,"queryParamsHandling"))("preserveFragment",r.getItemProp(i,"preserveFragment"))("skipLocationChange",r.getItemProp(i,"skipLocationChange"))("replaceUrl",r.getItemProp(i,"replaceUrl"))("state",r.getItemProp(i,"state"))("pBind",r.getPTOptions(i,n,"itemLink")),M("data-automationid",r.getItemProp(i,"automationId"))("tabindex",-1),p(),l("ngIf",r.getItemProp(i,"icon")),p(),l("ngIf",r.getItemProp(i,"escape"))("ngIfElse",e),p(3),l("ngIf",r.getItemProp(i,"badge")),p(),l("ngIf",r.isItemGroup(i))}}function Vi(o,s){if(o&1&&(oe(0),v(1,ki,7,12,"a",13)(2,Li,7,21,"a",14),se()),o&2){let e=a(2).$implicit,t=a(2);p(),l("ngIf",!t.getItemProp(e,"routerLink")),p(),l("ngIf",t.getItemProp(e,"routerLink"))}}function Fi(o,s){}function Ni(o,s){o&1&&v(0,Fi,0,0,"ng-template")}function Bi(o,s){if(o&1&&(oe(0),v(1,Ni,1,0,null,24),se()),o&2){let e=a(2).$implicit,t=a(2);p(),l("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",xt(2,hi,e.item))}}function Ai(o,s){if(o&1){let e=S();c(0,"p-contextmenu-sub",28),g("itemClick",function(i){h(e);let n=a(4);return _(n.itemClick.emit(i))})("itemMouseEnter",function(i){h(e);let n=a(4);return _(n.onItemMouseEnter(i))}),m()}if(o&2){let e=a(2).$implicit,t=a(2);l("items",e.items)("itemTemplate",t.itemTemplate)("menuId",t.menuId)("visible",t.isItemActive(e)&&t.isItemGroup(e))("activeItemPath",t.activeItemPath)("focusedItemId",t.focusedItemId)("level",t.level+1)("pt",t.pt())}}function Ki(o,s){if(o&1){let e=S();c(0,"li",9,1)(2,"div",10),g("click",function(i){h(e);let n=a().$implicit,r=a(2);return _(r.onItemClick(i,n))})("mouseenter",function(i){h(e);let n=a().$implicit,r=a(2);return _(r.onItemMouseEnter({$event:i,processedItem:n}))}),v(3,Vi,3,2,"ng-container",11)(4,Bi,2,4,"ng-container",11),m(),v(5,Ai,1,8,"p-contextmenu-sub",12),m()}if(o&2){let e=a(),t=e.$implicit,i=e.index,n=a(2);Ce(n.getItemProp(t,"style")),I(n.cn(n.cx("item",It(23,ui,n,t)),n.getItemProp(t,"styleClass"))),l("pBind",n.getPTOptions(t,i,"item"))("tooltipOptions",n.getItemProp(t,"tooltipOptions")),M("id",n.getItemId(t))("data-p-highlight",n.isItemActive(t))("data-p-focused",n.isItemFocused(t))("data-p-disabled",n.isItemDisabled(t))("aria-label",n.getItemLabel(t))("aria-disabled",n.isItemDisabled(t)||void 0)("aria-haspopup",n.isItemGroup(t)&&!n.getItemProp(t,"to")?"menu":void 0)("aria-expanded",n.isItemGroup(t)?n.isItemActive(t):void 0)("aria-level",n.level+1)("aria-setsize",n.getAriaSetSize())("aria-posinset",n.getAriaPosInset(i)),p(2),I(n.cx("itemContent")),l("pBind",n.getPTOptions(t,i,"itemContent")),p(),l("ngIf",!n.itemTemplate),p(),l("ngIf",n.itemTemplate),p(),l("ngIf",n.isItemVisible(t)&&n.isItemGroup(t))}}function $i(o,s){if(o&1&&v(0,_i,1,6,"li",6)(1,Ki,6,26,"li",7),o&2){let e=s.$implicit,t=a(2);l("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),p(),l("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function Ri(o,s){if(o&1){let e=S();c(0,"ul",4,0),g("@overlayAnimation.start",function(i){h(e);let n=ye(1),r=a();return _(r.onEnter(i,n))})("keydown",function(i){h(e);let n=a();return _(n.menuKeydown.emit(i))})("focus",function(i){h(e);let n=a();return _(n.menuFocus.emit(i))})("blur",function(i){h(e);let n=a();return _(n.menuBlur.emit(i))}),v(2,$i,2,2,"ng-template",5),m()}if(o&2){let e=a();I(e.root?e.cx("rootList"):e.cx("submenu")),l("pBind",e._ptm(e.root?"rootList":"submenu"))("@overlayAnimation",e.visible)("tabindex",e.tabindex),M("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical"),p(2),l("ngForOf",e.items)}}var ji=["item"],zi=["submenuicon"],Hi=["rootmenu"],Gi=["container"],Ui=()=>({value:"visible"});function Zi(o,s){if(o&1){let e=S();c(0,"div",3,0),g("@overlayAnimation.start",function(i){h(e);let n=a();return _(n.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){h(e);let n=a();return _(n.onOverlayAnimationEnd(i))}),c(2,"p-contextmenu-sub",4,1),g("itemClick",function(i){h(e);let n=a();return _(n.onItemClick(i))})("menuFocus",function(i){h(e);let n=a();return _(n.onMenuFocus(i))})("menuBlur",function(i){h(e);let n=a();return _(n.onMenuBlur(i))})("menuKeydown",function(i){h(e);let n=a();return _(n.onKeyDown(i))})("itemMouseEnter",function(i){h(e);let n=a();return _(n.onItemMouseEnter(i))}),m()()}if(o&2){let e=a();Ce(e.sx("root")),I(e.cn(e.cx("root"),e.styleClass)),l("ngStyle",e.style)("pBind",e.ptm("root"))("@overlayAnimation",pe(21,Ui)),M("id",e.id),p(2),l("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())("pt",e.pt())}}var qi={root:{position:"absolute"}},Qi={root:()=>["p-contextmenu p-component"],rootList:"p-contextmenu-root-list",item:({instance:o,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":o.isItemActive(s),"p-focus":o.isItemFocused(s),"p-disabled":o.isItemDisabled(s),"p-contextmenu-mobile":o.queryMatches}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},Ne=(()=>{class o extends Nt{name="contextmenu";style=Wt;classes=Qi;inlineStyles=qi;static \u0275fac=(()=>{let e;return function(i){return(e||(e=dt(o)))(i||o)}})();static \u0275prov=O({token:o,factory:o.\u0275fac})}return o})();var Jt=new Ae("CONTEXTMENU_INSTANCE"),Xt=new Ae("CONTEXTMENUSUB_INSTANCE"),Wi=(()=>{class o extends it{el;renderer;contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new E;itemMouseEnter=new E;menuFocus=new E;menuBlur=new E;menuKeydown=new E;sublistViewChild;hostName="ContextMenu";_componentStyle=b(Ne);$pcContextMenu=b(Jt,{optional:!0,skipSelf:!0})??void 0;$pcContextMenuSub=b(Xt,{optional:!0,skipSelf:!0})??void 0;constructor(e,t,i){super(),this.el=e,this.renderer=t,this.contextMenu=i}getItemProp(e,t,i=null){return e&&e.item?tt(e.item[t],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemLabel(e){return this.getItemProp(e,"label")}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(t=>this.isItemVisible(t)&&this.getItemProp(t,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(t=>t.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return F(e.items)}onItemMouseEnter(e){let{event:t,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:t,processedItem:i})}onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.itemClick.emit({originalEvent:e,processedItem:t,isFocus:!0})}onEnter(e,t){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}_ptm(e,t){return this.$pcContextMenu?this.$pcContextMenu.ptm(e,t):this.ptm(e,t)}getPTOptions(e,t,i){return this._ptm(i,{context:{item:e.item,index:t,active:this.isItemActive(e),focused:this.isItemFocused(e),disabled:this.isItemDisabled(e)}})}position(e){let t=e.parentElement.parentElement,i=Ot(e.parentElement.parentElement),n=Xe(),r=e.offsetParent?e.offsetWidth:Ye(e),u=wt(t.children[0]);e.style.top="0px",parseInt(i.left,10)+u+r>n.width-Dt()?e.style.left=-1*r+"px":e.style.left=u+"px"}static \u0275fac=function(t){return new(t||o)(Y(ht),Y(gt),Y(mt(()=>Be)))};static \u0275cmp=k({type:o,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&H(mi,5),t&2){let n;D(n=P())&&(i.sublistViewChild=n.first)}},inputs:{visible:[2,"visible","visible",$],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",$],autoZIndex:[2,"autoZIndex","autoZIndex",$],baseZIndex:[2,"baseZIndex","baseZIndex",Q],popup:[2,"popup","popup",$],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",Q],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",Q]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[He([Ne,{provide:Xt,useExisting:o},{provide:Kt,useExisting:o}]),Re],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"class","pBind","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","pBind","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","class","pBind",4,"ngIf"],["role","menuitem","pTooltip","",3,"style","class","pBind","tooltipOptions",4,"ngIf"],["role","separator",3,"pBind"],["role","menuitem","pTooltip","",3,"pBind","tooltipOptions"],[3,"click","mouseenter","pBind"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","pt","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","class","pBind",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","class","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","pBind",4,"ngIf"],["pRipple","",3,"target","pBind"],[3,"class","ngStyle","pBind",4,"ngIf"],[3,"class","pBind",4,"ngIf","ngIfElse"],[3,"class","value",4,"ngIf"],[3,"ngStyle","pBind"],[3,"pBind"],[3,"innerHTML","pBind"],[3,"value"],["data-p-icon","angle-right",3,"class","pBind",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","angle-right",3,"pBind"],[3,"aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","pBind"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","pt"]],template:function(t,i){t&1&&v(0,Ri,3,11,"ul",3),t&2&&l("ngIf",i.root?!0:i.visible)},dependencies:[o,R,vt,Ge,yt,Ue,Ze,Ct,zt,rt,Rt,nt,jt,Ie,Ht,xe,ot],encapsulation:2,data:{animation:[Qe("overlayAnimation",[he(":enter",[de({opacity:0})]),he(":leave",[de({opacity:0})])])]}})}return o})(),Be=(()=>{class o extends it{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;appendTo=L(void 0);onShow=new E;onHide=new E;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=x(!1);focused=!1;activeItemPath=x([]);focusedItemInfo=x({index:-1,level:0,parentKey:"",item:null});submenuVisible=x(!1);$appendTo=Z(()=>this.appendTo()||this.config.overlayAppendTo());searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=b(Ne);get visibleItems(){let e=this.activeItemPath().find(t=>t.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${F(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,bt(()=>{let t=this.activeItemPath();F(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}onInit(){this.id=this.id||Ft("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return Lt()||Et()}bindTriggerEventListener(){ue(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(ue(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",t=>{this.containerViewChild?.nativeElement?.offsetParent&&this.isOutsideClicked(t)&&!t.ctrlKey&&t.button!==2&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;onAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}getPTOptions(e,t,i,n){return this.ptm(e,{context:{item:t,index:i,focused:this.isItemFocused({index:i,item:t}),disabled:this.isItemDisabled(t)}})}isItemFocused(e){return this.focusedItemInfo().index===e.index}createProcessedItems(e,t=0,i={},n=""){let r=[];return e&&e.forEach((u,C)=>{let B=(n!==""?n+"_":"")+C,A={item:u,index:C,level:t,key:B,parent:i,parentKey:n};A.items=this.createProcessedItems(u.items,t+1,A,B),r.push(A)}),r}bindMatchMediaListener(){if(ue(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,t){return e?tt(e[t]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&F(e.items)}isSelected(e){return this.activeItemPath().some(t=>t.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&F(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:r,key:u,level:C,parentKey:B,item:A}=t;this.activeItemPath.set(this.activeItemPath().filter(be=>u!==be.key&&u.startsWith(be.key))),this.focusedItemInfo.set({index:r,level:C,parentKey:B,item:A}),fe(this.rootmenu?.sublistViewChild?.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&Vt(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let t=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}onArrowRightKey(e){let t=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo.set({index:-1,parentKey:t.key,item:t.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide(),e.preventDefault()}else{let t=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}}onArrowLeftKey(e){let t=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(u=>u.key===t.parentKey);Je(t.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:t.item}),this.searchValue="",this.onArrowDownKey(e));let r=this.activeItemPath().filter(u=>u.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(r),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let t=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(z(j({},i),{index:this.findFirstFocusedItemIndex(),item:t.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let t=ge(this.rootmenu?.el?.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&(ge(t,'[data-pc-section="itemlink"]')||ge(t,"a,button"));i?i.click():t&&t.click();let n=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(n)){let u=this.focusedItemInfo();this.focusedItemInfo.set(z(j({},u),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:n}=e;if(Je(i))return;let{index:r,key:u,level:C,parentKey:B,items:A}=i,be=F(A),ct=this.activeItemPath().filter(pt=>pt.parentKey!==B&&pt.parentKey!==u);be&&(ct.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:r,level:C,parentKey:B,item:i.item}),n&&fe(this.rootmenu?.sublistViewChild?.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(ct)}onMenuFocus(e){this.focused=!0;let t=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(t)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.$attrSelector&&this.container?.setAttribute(this.$attrSelector,""),this.appendOverlay(),this.bindGlobalListeners(),fe(this.rootmenu?.sublistViewChild?.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){$t.appendOverlay(this.container,this.$appendTo()==="body"?this.document.body:this.$appendTo(),this.$appendTo())}moveOnTop(){this.autoZIndex&&this.containerViewChild&&st.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&st.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),fe(this.rootmenu?.sublistViewChild?.nativeElement),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){if(!this.document.scrollingElement||!this.containerViewChild?.nativeElement)return;let e=this.pageX+1,t=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:Ye(this.containerViewChild.nativeElement),n=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:Pt(this.containerViewChild.nativeElement),r=Xe();e+i-this.document.scrollingElement.scrollLeft>r.width&&(e-=i),t+n-this.document.scrollingElement.scrollTop>r.height&&(t-=n),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),t<this.document.scrollingElement.scrollTop&&(t=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=t+"px"}searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(r=>this.isItemMatched(r)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(r=>this.isItemMatched(r)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(r=>this.isItemMatched(r)),i!==-1&&(n=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),n}findVisibleItem(e){return F(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return et(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?et(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return t>-1?t:e}findNextItemIndex(e){let t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return t>-1?t+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,t){let i=this.findVisibleItem(t),n=this.focusedItemInfo();n.index!==t&&(this.focusedItemInfo.set(z(j({},n),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=ge(this.rootmenu?.el?.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){ue(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild?.nativeElement?.isSameNode(e.target)||this.containerViewChild?.nativeElement?.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.$appendTo()&&this.containerViewChild&&this.$appendTo()==="body"&&this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement)}onDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements()}static \u0275fac=function(t){return new(t||o)(Y(Bt))};static \u0275cmp=k({type:o,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,n){if(t&1&&(ve(n,ji,4),ve(n,zi,4),ve(n,At,4)),t&2){let r;D(r=P())&&(i.itemTemplate=r.first),D(r=P())&&(i.submenuIconTemplate=r.first),D(r=P())&&(i.templates=r)}},viewQuery:function(t,i){if(t&1&&(H(Hi,5),H(Gi,5)),t&2){let n;D(n=P())&&(i.rootmenu=n.first),D(n=P())&&(i.containerViewChild=n.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",$],style:"style",styleClass:"styleClass",autoZIndex:[2,"autoZIndex","autoZIndex",$],baseZIndex:[2,"baseZIndex","baseZIndex",Q],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",Q],appendTo:[1,"appendTo"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[He([Ne,{provide:Jt,useExisting:o}]),Re],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"class","style","ngStyle","pBind",4,"ngIf"],[3,"ngStyle","pBind"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath","pt"]],template:function(t,i){t&1&&v(0,Zi,4,22,"div",2),t&2&&l("ngIf",i.visible())},dependencies:[R,Ge,Ue,Wi,Ze,rt,nt,Ie,xe,ot],encapsulation:2,data:{animation:[Qe("overlayAnimation",[he(":enter",[de({opacity:0}),We("250ms")]),he(":leave",[We(".1s linear",de({opacity:0}))])])]},changeDetection:0})}return o})(),ei=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ft({type:o});static \u0275inj=ut({imports:[Be,xe,xe]})}return o})();var Yi=["contextMenu"];function Ji(o,s){if(o&1){let e=S();c(0,"a",3),g("click",function(){let i=h(e).$implicit,n=a();return _(n.onClickContextMenuItem(i))}),y(1,"i"),c(2,"span",4),d(3),m()()}if(o&2){let e=s.$implicit;p(),I(e.icon),p(2),w(e.label)}}var Ro=(()=>{let s=class s{constructor(){this.items=L([]),this.onSelectItem=q()}show(t,i){clearTimeout(this.hoverTimeout),this.selectedData=null,this.hoverTimeout=setTimeout(()=>{this.contextMenuEl.show(t),this.selectedData=i},100)}hide(){this.contextMenuEl?.hide(),clearTimeout(this.hoverTimeout),this.selectedData=null}onClickContextMenuItem(t){this.onSelectItem.emit({item:t,data:this.selectedData})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-context-menu"]],viewQuery:function(i,n){if(i&1&&H(Yi,5),i&2){let r;D(r=P())&&(n.contextMenuEl=r.first)}},inputs:{items:[1,"items"]},outputs:{onSelectItem:"onSelectItem"},decls:4,vars:1,consts:[["contextMenu",""],["item",""],[3,"model"],["pRipple","",1,"flex","items-center","p-contextmenu-item-link",3,"click"],[1,"ml-2"]],template:function(i,n){i&1&&(c(0,"p-contextmenu",2,0),v(2,Ji,4,3,"ng-template",null,1,me),m()),i&2&&l("model",n.items())},dependencies:[V,ei,Be,Ie],encapsulation:2});let o=s;return o})();export{Xn as a,Ro as b};
|
|
149
|
+
`;var mi=["sublist"],ui=(o,s)=>({instance:o,processedItem:s}),Yt=()=>({class:"p-contextmenu-submenu-icon"}),di=()=>({exact:!1}),hi=o=>({$implicit:o});function _i(o,s){if(o&1&&y(0,"li",8),o&2){let e=a().$implicit,t=a(2);Ce(t.getItemProp(e,"style")),I(t.cn(t.cx("separator"),t.getItemProp(e,"styleClass"))),l("pBind",t._ptm("separator")),M("id",t.getItemId(e))}}function gi(o,s){if(o&1&&y(0,"span",19),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cn(n.cx("itemIcon"),n.getItemProp(t,"icon"))),l("ngStyle",n.getItemProp(t,"iconStyle"))("pBind",n.getPTOptions(t,i,"itemIcon")),M("aria-hidden",!0)("tabindex",-1)}}function fi(o,s){if(o&1&&(c(0,"span",20),d(1),m()),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("pBind",n.getPTOptions(t,i,"itemLabel")),p(),re(" ",n.getItemLabel(t)," ")}}function xi(o,s){if(o&1&&y(0,"span",21),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("innerHTML",n.getItemLabel(t),$e)("pBind",n.getPTOptions(t,i,"itemLabel"))}}function Ii(o,s){if(o&1&&y(0,"p-badge",22),o&2){let e=a(4).$implicit,t=a(2);I(t.getItemProp(e,"badgeStyleClass")),l("value",t.getItemProp(e,"badge"))}}function bi(o,s){if(o&1&&(Ke(),y(0,"svg",25)),o&2){let e=a(5),t=e.$implicit,i=e.index,n=a(2);I(n.cx("submenuIcon")),l("pBind",n.getPTOptions(t,i,"submenuIcon")),M("aria-hidden",!0)}}function vi(o,s){}function yi(o,s){o&1&&v(0,vi,0,0,"ng-template",26),o&2&&je("aria-hidden",!0)}function Ci(o,s){if(o&1&&(oe(0),v(1,bi,1,4,"svg",23)(2,yi,1,1,null,24),se()),o&2){let e=a(6);p(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),p(),l("ngTemplateOutlet",e.contextMenu.submenuIconTemplate||e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",pe(3,Yt))}}function ki(o,s){if(o&1&&(c(0,"a",15),v(1,gi,1,6,"span",16)(2,fi,2,4,"span",17)(3,xi,1,4,"ng-template",null,2,me)(5,Ii,1,3,"p-badge",18)(6,Ci,3,4,"ng-container",11),m()),o&2){let e=ye(4),t=a(3),i=t.$implicit,n=t.index,r=a(2);I(r.cx("itemLink")),l("target",r.getItemProp(i,"target"))("pBind",r.getPTOptions(i,n,"itemLink")),M("href",r.getItemProp(i,"url"),_t)("data-automationid",r.getItemProp(i,"automationId"))("tabindex",-1),p(),l("ngIf",r.getItemProp(i,"icon")),p(),l("ngIf",r.getItemProp(i,"escape"))("ngIfElse",e),p(3),l("ngIf",r.getItemProp(i,"badge")),p(),l("ngIf",r.isItemGroup(i))}}function Si(o,s){if(o&1&&y(0,"span",19),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cn(n.cx("itemIcon"),n.getItemProp(t,"icon"))),l("ngStyle",n.getItemProp(t,"iconStyle"))("pBind",n.getPTOptions(t,i,"itemIcon")),M("aria-hidden",!0)("tabindex",-1)}}function Ti(o,s){if(o&1&&(c(0,"span",20),d(1),m()),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("pBind",n.getPTOptions(t,i,"itemLabel")),p(),re(" ",n.getItemLabel(t)," ")}}function Mi(o,s){if(o&1&&y(0,"span",21),o&2){let e=a(4),t=e.$implicit,i=e.index,n=a(2);I(n.cx("itemLabel")),l("innerHTML",n.getItemLabel(t),$e)("pBind",n.getPTOptions(t,i,"itemLabel"))}}function wi(o,s){if(o&1&&y(0,"p-badge",22),o&2){let e=a(4).$implicit,t=a(2);I(t.getItemProp(e,"badgeStyleClass")),l("value",t.getItemProp(e,"badge"))}}function Di(o,s){if(o&1&&(Ke(),y(0,"svg",25)),o&2){let e=a(5),t=e.$implicit,i=e.index,n=a(2);I(n.cx("submenuIcon")),l("pBind",n.getPTOptions(t,i,"submenuIcon")),M("aria-hidden",!0)}}function Pi(o,s){}function Oi(o,s){o&1&&v(0,Pi,0,0,"ng-template",26),o&2&&je("aria-hidden",!0)}function Ei(o,s){if(o&1&&(oe(0),v(1,Di,1,4,"svg",23)(2,Oi,1,1,null,24),se()),o&2){let e=a(6);p(),l("ngIf",!e.contextMenu.submenuIconTemplate&&!e.contextMenu._submenuIconTemplate),p(),l("ngTemplateOutlet",!e.contextMenu.submenuIconTemplate||!e.contextMenu._submenuIconTemplate)("ngTemplateOutletContext",pe(3,Yt))}}function Li(o,s){if(o&1&&(c(0,"a",27),v(1,Si,1,6,"span",16)(2,Ti,2,4,"span",17)(3,Mi,1,4,"ng-template",null,2,me)(5,wi,1,3,"p-badge",18)(6,Ei,3,4,"ng-container",11),m()),o&2){let e=ye(4),t=a(3),i=t.$implicit,n=t.index,r=a(2);I(r.cx("itemLink")),l("routerLink",r.getItemProp(i,"routerLink"))("queryParams",r.getItemProp(i,"queryParams"))("routerLinkActiveOptions",r.getItemProp(i,"routerLinActiveOptions")||pe(20,di))("target",r.getItemProp(i,"target"))("fragment",r.getItemProp(i,"fragment"))("queryParamsHandling",r.getItemProp(i,"queryParamsHandling"))("preserveFragment",r.getItemProp(i,"preserveFragment"))("skipLocationChange",r.getItemProp(i,"skipLocationChange"))("replaceUrl",r.getItemProp(i,"replaceUrl"))("state",r.getItemProp(i,"state"))("pBind",r.getPTOptions(i,n,"itemLink")),M("data-automationid",r.getItemProp(i,"automationId"))("tabindex",-1),p(),l("ngIf",r.getItemProp(i,"icon")),p(),l("ngIf",r.getItemProp(i,"escape"))("ngIfElse",e),p(3),l("ngIf",r.getItemProp(i,"badge")),p(),l("ngIf",r.isItemGroup(i))}}function Vi(o,s){if(o&1&&(oe(0),v(1,ki,7,12,"a",13)(2,Li,7,21,"a",14),se()),o&2){let e=a(2).$implicit,t=a(2);p(),l("ngIf",!t.getItemProp(e,"routerLink")),p(),l("ngIf",t.getItemProp(e,"routerLink"))}}function Fi(o,s){}function Ni(o,s){o&1&&v(0,Fi,0,0,"ng-template")}function Bi(o,s){if(o&1&&(oe(0),v(1,Ni,1,0,null,24),se()),o&2){let e=a(2).$implicit,t=a(2);p(),l("ngTemplateOutlet",t.itemTemplate)("ngTemplateOutletContext",xt(2,hi,e.item))}}function Ai(o,s){if(o&1){let e=S();c(0,"p-contextmenu-sub",28),g("itemClick",function(i){h(e);let n=a(4);return _(n.itemClick.emit(i))})("itemMouseEnter",function(i){h(e);let n=a(4);return _(n.onItemMouseEnter(i))}),m()}if(o&2){let e=a(2).$implicit,t=a(2);l("items",e.items)("itemTemplate",t.itemTemplate)("menuId",t.menuId)("visible",t.isItemActive(e)&&t.isItemGroup(e))("activeItemPath",t.activeItemPath)("focusedItemId",t.focusedItemId)("level",t.level+1)("pt",t.pt())}}function Ki(o,s){if(o&1){let e=S();c(0,"li",9,1)(2,"div",10),g("click",function(i){h(e);let n=a().$implicit,r=a(2);return _(r.onItemClick(i,n))})("mouseenter",function(i){h(e);let n=a().$implicit,r=a(2);return _(r.onItemMouseEnter({$event:i,processedItem:n}))}),v(3,Vi,3,2,"ng-container",11)(4,Bi,2,4,"ng-container",11),m(),v(5,Ai,1,8,"p-contextmenu-sub",12),m()}if(o&2){let e=a(),t=e.$implicit,i=e.index,n=a(2);Ce(n.getItemProp(t,"style")),I(n.cn(n.cx("item",It(23,ui,n,t)),n.getItemProp(t,"styleClass"))),l("pBind",n.getPTOptions(t,i,"item"))("tooltipOptions",n.getItemProp(t,"tooltipOptions")),M("id",n.getItemId(t))("data-p-highlight",n.isItemActive(t))("data-p-focused",n.isItemFocused(t))("data-p-disabled",n.isItemDisabled(t))("aria-label",n.getItemLabel(t))("aria-disabled",n.isItemDisabled(t)||void 0)("aria-haspopup",n.isItemGroup(t)&&!n.getItemProp(t,"to")?"menu":void 0)("aria-expanded",n.isItemGroup(t)?n.isItemActive(t):void 0)("aria-level",n.level+1)("aria-setsize",n.getAriaSetSize())("aria-posinset",n.getAriaPosInset(i)),p(2),I(n.cx("itemContent")),l("pBind",n.getPTOptions(t,i,"itemContent")),p(),l("ngIf",!n.itemTemplate),p(),l("ngIf",n.itemTemplate),p(),l("ngIf",n.isItemVisible(t)&&n.isItemGroup(t))}}function $i(o,s){if(o&1&&v(0,_i,1,6,"li",6)(1,Ki,6,26,"li",7),o&2){let e=s.$implicit,t=a(2);l("ngIf",t.isItemVisible(e)&&t.getItemProp(e,"separator")),p(),l("ngIf",t.isItemVisible(e)&&!t.getItemProp(e,"separator"))}}function Ri(o,s){if(o&1){let e=S();c(0,"ul",4,0),g("@overlayAnimation.start",function(i){h(e);let n=ye(1),r=a();return _(r.onEnter(i,n))})("keydown",function(i){h(e);let n=a();return _(n.menuKeydown.emit(i))})("focus",function(i){h(e);let n=a();return _(n.menuFocus.emit(i))})("blur",function(i){h(e);let n=a();return _(n.menuBlur.emit(i))}),v(2,$i,2,2,"ng-template",5),m()}if(o&2){let e=a();I(e.root?e.cx("rootList"):e.cx("submenu")),l("pBind",e._ptm(e.root?"rootList":"submenu"))("@overlayAnimation",e.visible)("tabindex",e.tabindex),M("id",e.menuId+"_list")("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy)("aria-activedescendant",e.focusedItemId)("aria-orientation","vertical"),p(2),l("ngForOf",e.items)}}var ji=["item"],zi=["submenuicon"],Hi=["rootmenu"],Gi=["container"],Ui=()=>({value:"visible"});function Zi(o,s){if(o&1){let e=S();c(0,"div",3,0),g("@overlayAnimation.start",function(i){h(e);let n=a();return _(n.onOverlayAnimationStart(i))})("@overlayAnimation.done",function(i){h(e);let n=a();return _(n.onOverlayAnimationEnd(i))}),c(2,"p-contextmenu-sub",4,1),g("itemClick",function(i){h(e);let n=a();return _(n.onItemClick(i))})("menuFocus",function(i){h(e);let n=a();return _(n.onMenuFocus(i))})("menuBlur",function(i){h(e);let n=a();return _(n.onMenuBlur(i))})("menuKeydown",function(i){h(e);let n=a();return _(n.onKeyDown(i))})("itemMouseEnter",function(i){h(e);let n=a();return _(n.onItemMouseEnter(i))}),m()()}if(o&2){let e=a();Ce(e.sx("root")),I(e.cn(e.cx("root"),e.styleClass)),l("ngStyle",e.style)("pBind",e.ptm("root"))("@overlayAnimation",pe(21,Ui)),M("id",e.id),p(2),l("root",!0)("items",e.processedItems)("itemTemplate",e.itemTemplate||e._itemTemplate)("menuId",e.id)("tabindex",e.disabled?-1:e.tabindex)("ariaLabel",e.ariaLabel)("ariaLabelledBy",e.ariaLabelledBy)("baseZIndex",e.baseZIndex)("autoZIndex",e.autoZIndex)("visible",e.submenuVisible())("focusedItemId",e.focused?e.focusedItemId:void 0)("activeItemPath",e.activeItemPath())("pt",e.pt())}}var qi={root:{position:"absolute"}},Qi={root:()=>["p-contextmenu p-component"],rootList:"p-contextmenu-root-list",item:({instance:o,processedItem:s})=>["p-contextmenu-item",{"p-contextmenu-item-active":o.isItemActive(s),"p-focus":o.isItemFocused(s),"p-disabled":o.isItemDisabled(s),"p-contextmenu-mobile":o.queryMatches}],itemContent:"p-contextmenu-item-content",itemLink:"p-contextmenu-item-link",itemIcon:"p-contextmenu-item-icon",itemLabel:"p-contextmenu-item-label",submenuIcon:"p-contextmenu-submenu-icon",submenu:"p-contextmenu-submenu",separator:"p-contextmenu-separator"},Ne=(()=>{class o extends Vt{name="contextmenu";style=Wt;classes=Qi;inlineStyles=qi;static \u0275fac=(()=>{let e;return function(i){return(e||(e=dt(o)))(i||o)}})();static \u0275prov=O({token:o,factory:o.\u0275fac})}return o})();var Jt=new Ae("CONTEXTMENU_INSTANCE"),Xt=new Ae("CONTEXTMENUSUB_INSTANCE"),Wi=(()=>{class o extends it{el;renderer;contextMenu;visible=!1;items;itemTemplate;root=!1;autoZIndex=!0;baseZIndex=0;popup;menuId;ariaLabel;ariaLabelledBy;level=0;focusedItemId;activeItemPath;tabindex=0;itemClick=new E;itemMouseEnter=new E;menuFocus=new E;menuBlur=new E;menuKeydown=new E;sublistViewChild;hostName="ContextMenu";_componentStyle=b(Ne);$pcContextMenu=b(Jt,{optional:!0,skipSelf:!0})??void 0;$pcContextMenuSub=b(Xt,{optional:!0,skipSelf:!0})??void 0;constructor(e,t,i){super(),this.el=e,this.renderer=t,this.contextMenu=i}getItemProp(e,t,i=null){return e&&e.item?tt(e.item[t],i):void 0}getItemId(e){return e.item&&e.item?.id?e.item.id:`${this.menuId}_${e.key}`}getItemKey(e){return this.getItemId(e)}getItemLabel(e){return this.getItemProp(e,"label")}getAriaSetSize(){return this.items.filter(e=>this.isItemVisible(e)&&!this.getItemProp(e,"separator")).length}getAriaPosInset(e){return e-this.items.slice(0,e).filter(t=>this.isItemVisible(t)&&this.getItemProp(t,"separator")).length+1}isItemVisible(e){return this.getItemProp(e,"visible")!==!1}isItemActive(e){if(this.activeItemPath)return this.activeItemPath.some(t=>t.key===e.key)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemFocused(e){return this.focusedItemId===this.getItemId(e)}isItemGroup(e){return V(e.items)}onItemMouseEnter(e){let{event:t,processedItem:i}=e;this.itemMouseEnter.emit({originalEvent:t,processedItem:i})}onItemClick(e,t){this.getItemProp(t,"command",{originalEvent:e,item:t.item}),this.itemClick.emit({originalEvent:e,processedItem:t,isFocus:!0})}onEnter(e,t){if(e.fromState==="void"&&e.toState){let i=e.element;this.position(i)}}_ptm(e,t){return this.$pcContextMenu?this.$pcContextMenu.ptm(e,t):this.ptm(e,t)}getPTOptions(e,t,i){return this._ptm(i,{context:{item:e.item,index:t,active:this.isItemActive(e),focused:this.isItemFocused(e),disabled:this.isItemDisabled(e)}})}position(e){let t=e.parentElement.parentElement,i=Mt(e.parentElement.parentElement),n=Xe(),r=e.offsetParent?e.offsetWidth:Ye(e),u=kt(t.children[0]);e.style.top="0px",parseInt(i.left,10)+u+r>n.width-St()?e.style.left=-1*r+"px":e.style.left=u+"px"}static \u0275fac=function(t){return new(t||o)(Y(ht),Y(gt),Y(mt(()=>Be)))};static \u0275cmp=k({type:o,selectors:[["p-contextMenuSub"],["p-contextmenu-sub"]],viewQuery:function(t,i){if(t&1&&H(mi,5),t&2){let n;D(n=P())&&(i.sublistViewChild=n.first)}},inputs:{visible:[2,"visible","visible",$],items:"items",itemTemplate:"itemTemplate",root:[2,"root","root",$],autoZIndex:[2,"autoZIndex","autoZIndex",$],baseZIndex:[2,"baseZIndex","baseZIndex",Q],popup:[2,"popup","popup",$],menuId:"menuId",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",level:[2,"level","level",Q],focusedItemId:"focusedItemId",activeItemPath:"activeItemPath",tabindex:[2,"tabindex","tabindex",Q]},outputs:{itemClick:"itemClick",itemMouseEnter:"itemMouseEnter",menuFocus:"menuFocus",menuBlur:"menuBlur",menuKeydown:"menuKeydown"},features:[He([Ne,{provide:Xt,useExisting:o},{provide:Kt,useExisting:o}]),Re],decls:1,vars:1,consts:[["sublist",""],["listItem",""],["htmlLabel",""],["role","menu",3,"class","pBind","tabindex","keydown","focus","blur",4,"ngIf"],["role","menu",3,"keydown","focus","blur","pBind","tabindex"],["ngFor","",3,"ngForOf"],["role","separator",3,"style","class","pBind",4,"ngIf"],["role","menuitem","pTooltip","",3,"style","class","pBind","tooltipOptions",4,"ngIf"],["role","separator",3,"pBind"],["role","menuitem","pTooltip","",3,"pBind","tooltipOptions"],[3,"click","mouseenter","pBind"],[4,"ngIf"],[3,"items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","pt","itemClick","itemMouseEnter",4,"ngIf"],["pRipple","",3,"target","class","pBind",4,"ngIf"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","class","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","pBind",4,"ngIf"],["pRipple","",3,"target","pBind"],[3,"class","ngStyle","pBind",4,"ngIf"],[3,"class","pBind",4,"ngIf","ngIfElse"],[3,"class","value",4,"ngIf"],[3,"ngStyle","pBind"],[3,"pBind"],[3,"innerHTML","pBind"],[3,"value"],["data-p-icon","angle-right",3,"class","pBind",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-p-icon","angle-right",3,"pBind"],[3,"aria-hidden"],["pRipple","",3,"routerLink","queryParams","routerLinkActiveOptions","target","fragment","queryParamsHandling","preserveFragment","skipLocationChange","replaceUrl","state","pBind"],[3,"itemClick","itemMouseEnter","items","itemTemplate","menuId","visible","activeItemPath","focusedItemId","level","pt"]],template:function(t,i){t&1&&v(0,Ri,3,11,"ul",3),t&2&&l("ngIf",i.root?!0:i.visible)},dependencies:[o,R,vt,Ge,yt,Ue,We,Ct,zt,rt,Rt,nt,jt,Ie,Ht,fe,ot],encapsulation:2,data:{animation:[qe("overlayAnimation",[he(":enter",[de({opacity:0})]),he(":leave",[de({opacity:0})])])]}})}return o})(),Be=(()=>{class o extends it{overlayService;set model(e){this._model=e,this._processedItems=this.createProcessedItems(this._model||[])}get model(){return this._model}triggerEvent="contextmenu";target;global;style;styleClass;autoZIndex=!0;baseZIndex=0;id;breakpoint="960px";ariaLabel;ariaLabelledBy;pressDelay=500;appendTo=L(void 0);onShow=new E;onHide=new E;rootmenu;containerViewChild;container;outsideClickListener;resizeListener;triggerEventListener;documentClickListener;documentTriggerListener;touchEndListener;pageX;pageY;visible=x(!1);focused=!1;activeItemPath=x([]);focusedItemInfo=x({index:-1,level:0,parentKey:"",item:null});submenuVisible=x(!1);$appendTo=Z(()=>this.appendTo()||this.config.overlayAppendTo());searchValue="";searchTimeout;_processedItems;_model;pressTimer;matchMediaListener;query;queryMatches;_componentStyle=b(Ne);get visibleItems(){let e=this.activeItemPath().find(t=>t.key===this.focusedItemInfo().parentKey);return e?e.items:this.processedItems}get processedItems(){return(!this._processedItems||!this._processedItems.length)&&(this._processedItems=this.createProcessedItems(this.model||[])),this._processedItems}get focusedItemId(){let e=this.focusedItemInfo();return e.item&&e.item?.id?e.item.id:e.index!==-1?`${this.id}${V(e.parentKey)?"_"+e.parentKey:""}_${e.index}`:null}constructor(e){super(),this.overlayService=e,bt(()=>{let t=this.activeItemPath();V(t)?this.bindGlobalListeners():this.visible()||this.unbindGlobalListeners()})}onInit(){this.id=this.id||Ot("pn_id_"),this.bindMatchMediaListener(),this.bindTriggerEventListener()}isMobile(){return Dt()||wt()}bindTriggerEventListener(){ue(this.platformId)&&(this.triggerEventListener||(this.isMobile()?this.global?(this.triggerEventListener=this.renderer.listen(this.document,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.document,"touchend",this.onTouchEnd.bind(this))):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,"touchstart",this.onTouchStart.bind(this)),this.touchEndListener=this.renderer.listen(this.target,"touchend",this.onTouchEnd.bind(this))):this.global?this.triggerEventListener=this.renderer.listen(this.document,this.triggerEvent,e=>{this.show(e)}):this.target&&(this.triggerEventListener=this.renderer.listen(this.target,this.triggerEvent,e=>{this.show(e)}))))}bindGlobalListeners(){if(ue(this.platformId)){if(!this.documentClickListener){let e=this.el?this.el.nativeElement.ownerDocument:"document";this.documentClickListener=this.renderer.listen(e,"click",t=>{this.containerViewChild?.nativeElement?.offsetParent&&this.isOutsideClicked(t)&&!t.ctrlKey&&t.button!==2&&this.hide()})}this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()}))}}itemTemplate;submenuIconTemplate;templates;_submenuIconTemplate;_itemTemplate;onAfterContentInit(){this.templates?.forEach(e=>{switch(e.getType()){case"submenuicon":this._submenuIconTemplate=e.template;break;case"item":this._itemTemplate=e.template;break;default:this._itemTemplate=e.template;break}})}getPTOptions(e,t,i,n){return this.ptm(e,{context:{item:t,index:i,focused:this.isItemFocused({index:i,item:t}),disabled:this.isItemDisabled(t)}})}isItemFocused(e){return this.focusedItemInfo().index===e.index}createProcessedItems(e,t=0,i={},n=""){let r=[];return e&&e.forEach((u,C)=>{let B=(n!==""?n+"_":"")+C,A={item:u,index:C,level:t,key:B,parent:i,parentKey:n};A.items=this.createProcessedItems(u.items,t+1,A,B),r.push(A)}),r}bindMatchMediaListener(){if(ue(this.platformId)&&!this.matchMediaListener){let e=window.matchMedia(`(max-width: ${this.breakpoint})`);this.query=e,this.queryMatches=e.matches,this.matchMediaListener=()=>{this.queryMatches=e.matches},e.addEventListener("change",this.matchMediaListener)}}unbindMatchMediaListener(){this.matchMediaListener&&(this.query.removeEventListener("change",this.matchMediaListener),this.matchMediaListener=null)}getItemProp(e,t){return e?tt(e[t]):void 0}getProccessedItemLabel(e){return e?this.getItemLabel(e.item):void 0}getItemLabel(e){return this.getItemProp(e,"label")}isProcessedItemGroup(e){return e&&V(e.items)}isSelected(e){return this.activeItemPath().some(t=>t.key===e.key)}isValidSelectedItem(e){return this.isValidItem(e)&&this.isSelected(e)}isValidItem(e){return!!e&&!this.isItemDisabled(e.item)&&!this.isItemSeparator(e.item)}isItemDisabled(e){return this.getItemProp(e,"disabled")}isItemSeparator(e){return this.getItemProp(e,"separator")}isItemMatched(e){return this.isValidItem(e)&&this.getProccessedItemLabel(e).toLocaleLowerCase().startsWith(this.searchValue.toLocaleLowerCase())}isProccessedItemGroup(e){return e&&V(e.items)}onItemClick(e){let{processedItem:t}=e,i=this.isProcessedItemGroup(t);if(this.isSelected(t)){let{index:r,key:u,level:C,parentKey:B,item:A}=t;this.activeItemPath.set(this.activeItemPath().filter(be=>u!==be.key&&u.startsWith(be.key))),this.focusedItemInfo.set({index:r,level:C,parentKey:B,item:A}),ge(this.rootmenu?.sublistViewChild?.nativeElement)}else i?this.onItemChange(e):this.hide()}onItemMouseEnter(e){this.onItemChange(e,"hover")}onKeyDown(e){let t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e);break;case"ArrowLeft":this.onArrowLeftKey(e);break;case"ArrowRight":this.onArrowRightKey(e);break;case"Home":this.onHomeKey(e);break;case"End":this.onEndKey(e);break;case"Space":this.onSpaceKey(e);break;case"Enter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"PageDown":case"PageUp":case"Backspace":case"ShiftLeft":case"ShiftRight":break;default:!t&&Pt(e.key)&&this.searchItems(e,e.key);break}}onArrowDownKey(e){let t=this.focusedItemInfo().index!==-1?this.findNextItemIndex(this.focusedItemInfo().index):this.findFirstFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}onArrowRightKey(e){let t=this.visibleItems[this.focusedItemInfo().index];this.isProccessedItemGroup(t)&&(this.onItemChange({originalEvent:e,processedItem:t}),this.focusedItemInfo.set({index:-1,parentKey:t.key,item:t.item}),this.searchValue="",this.onArrowDownKey(e)),e.preventDefault()}onArrowUpKey(e){if(e.altKey){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide(),e.preventDefault()}else{let t=this.focusedItemInfo().index!==-1?this.findPrevItemIndex(this.focusedItemInfo().index):this.findLastFocusedItemIndex();this.changeFocusedItemIndex(e,t),e.preventDefault()}}onArrowLeftKey(e){let t=this.visibleItems[this.focusedItemInfo().index],i=this.activeItemPath().find(u=>u.key===t.parentKey);Je(t.parent)||(this.focusedItemInfo.set({index:-1,parentKey:i?i.parentKey:"",item:t.item}),this.searchValue="",this.onArrowDownKey(e));let r=this.activeItemPath().filter(u=>u.parentKey!==this.focusedItemInfo().parentKey);this.activeItemPath.set(r),e.preventDefault()}onHomeKey(e){this.changeFocusedItemIndex(e,this.findFirstItemIndex()),e.preventDefault()}onEndKey(e){this.changeFocusedItemIndex(e,this.findLastItemIndex()),e.preventDefault()}onSpaceKey(e){this.onEnterKey(e)}onEscapeKey(e){this.hide();let t=this.findVisibleItem(this.findFirstFocusedItemIndex()),i=this.focusedItemInfo();this.focusedItemInfo.set(z(j({},i),{index:this.findFirstFocusedItemIndex(),item:t.item})),e.preventDefault()}onTabKey(e){if(this.focusedItemInfo().index!==-1){let t=this.visibleItems[this.focusedItemInfo().index];!this.isProccessedItemGroup(t)&&this.onItemChange({originalEvent:e,processedItem:t})}this.hide()}onEnterKey(e){if(this.focusedItemInfo().index!==-1){let t=_e(this.rootmenu?.el?.nativeElement,`li[id="${`${this.focusedItemId}`}"]`),i=t&&(_e(t,'[data-pc-section="itemlink"]')||_e(t,"a,button"));i?i.click():t&&t.click();let n=this.visibleItems[this.focusedItemInfo().index];if(!this.isProccessedItemGroup(n)){let u=this.focusedItemInfo();this.focusedItemInfo.set(z(j({},u),{index:this.findFirstFocusedItemIndex()}))}}e.preventDefault()}onItemChange(e,t){let{processedItem:i,isFocus:n}=e;if(Je(i))return;let{index:r,key:u,level:C,parentKey:B,items:A}=i,be=V(A),ct=this.activeItemPath().filter(pt=>pt.parentKey!==B&&pt.parentKey!==u);be&&(ct.push(i),this.submenuVisible.set(!0)),this.focusedItemInfo.set({index:r,level:C,parentKey:B,item:i.item}),n&&ge(this.rootmenu?.sublistViewChild?.nativeElement),!(t==="hover"&&this.queryMatches)&&this.activeItemPath.set(ct)}onMenuFocus(e){this.focused=!0;let t=this.focusedItemInfo().index!==-1?this.focusedItemInfo():{index:-1,level:0,parentKey:"",item:null};this.focusedItemInfo.set(t)}onMenuBlur(e){this.focused=!1,this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),this.searchValue=""}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.position(),this.moveOnTop(),this.$attrSelector&&this.container?.setAttribute(this.$attrSelector,""),this.appendOverlay(),this.bindGlobalListeners(),ge(this.rootmenu?.sublistViewChild?.nativeElement);break}}onOverlayAnimationEnd(e){switch(e.toState){case"void":this.onOverlayHide();break}}appendOverlay(){$t.appendOverlay(this.container,this.$appendTo()==="body"?this.document.body:this.$appendTo(),this.$appendTo())}moveOnTop(){this.autoZIndex&&this.containerViewChild&&st.set("menu",this.containerViewChild.nativeElement,this.baseZIndex+this.config.zIndex.menu)}onOverlayHide(){this.unbindGlobalListeners(),this.cd.destroyed||(this.target=null),this.container&&this.autoZIndex&&st.clear(this.container),this.container=null}onTouchStart(e){this.pressTimer=setTimeout(()=>{this.show(e)},this.pressDelay)}onTouchEnd(){clearTimeout(this.pressTimer)}hide(){this.visible.set(!1),this.onHide.emit(),this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null})}toggle(e){this.visible()?this.hide():this.show(e)}show(e){this.activeItemPath.set([]),this.focusedItemInfo.set({index:-1,level:0,parentKey:"",item:null}),ge(this.rootmenu?.sublistViewChild?.nativeElement),this.pageX=e.pageX,this.pageY=e.pageY,this.onShow.emit(),this.visible()?this.position():this.visible.set(!0),e.stopPropagation(),e.preventDefault()}position(){if(!this.document.scrollingElement||!this.containerViewChild?.nativeElement)return;let e=this.pageX+1,t=this.pageY+1,i=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetWidth:Ye(this.containerViewChild.nativeElement),n=this.containerViewChild.nativeElement.offsetParent?this.containerViewChild.nativeElement.offsetHeight:Tt(this.containerViewChild.nativeElement),r=Xe();e+i-this.document.scrollingElement.scrollLeft>r.width&&(e-=i),t+n-this.document.scrollingElement.scrollTop>r.height&&(t-=n),e<this.document.scrollingElement.scrollLeft&&(e=this.document.scrollingElement.scrollLeft),t<this.document.scrollingElement.scrollTop&&(t=this.document.scrollingElement.scrollTop),this.containerViewChild.nativeElement.style.left=e+"px",this.containerViewChild.nativeElement.style.top=t+"px"}searchItems(e,t){this.searchValue=(this.searchValue||"")+t;let i=-1,n=!1;return this.focusedItemInfo().index!==-1?(i=this.visibleItems.slice(this.focusedItemInfo().index).findIndex(r=>this.isItemMatched(r)),i=i===-1?this.visibleItems.slice(0,this.focusedItemInfo().index).findIndex(r=>this.isItemMatched(r)):i+this.focusedItemInfo().index):i=this.visibleItems.findIndex(r=>this.isItemMatched(r)),i!==-1&&(n=!0),i===-1&&this.focusedItemInfo().index===-1&&(i=this.findFirstFocusedItemIndex()),i!==-1&&this.changeFocusedItemIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),n}findVisibleItem(e){return V(this.visibleItems)?this.visibleItems[e]:null}findLastFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findLastItemIndex():e}findLastItemIndex(){return et(this.visibleItems,e=>this.isValidItem(e))}findPrevItemIndex(e){let t=e>0?et(this.visibleItems.slice(0,e),i=>this.isValidItem(i)):-1;return t>-1?t:e}findNextItemIndex(e){let t=e<this.visibleItems.length-1?this.visibleItems.slice(e+1).findIndex(i=>this.isValidItem(i)):-1;return t>-1?t+e+1:e}findFirstFocusedItemIndex(){let e=this.findSelectedItemIndex();return e<0?this.findFirstItemIndex():e}findFirstItemIndex(){return this.visibleItems.findIndex(e=>this.isValidItem(e))}findSelectedItemIndex(){return this.visibleItems.findIndex(e=>this.isValidSelectedItem(e))}changeFocusedItemIndex(e,t){let i=this.findVisibleItem(t),n=this.focusedItemInfo();n.index!==t&&(this.focusedItemInfo.set(z(j({},n),{index:t,item:i.item})),this.scrollInView())}scrollInView(e=-1){let t=e!==-1?`${this.id}_${e}`:this.focusedItemId,i=_e(this.rootmenu?.el?.nativeElement,`li[id="${t}"]`);i&&i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}bindResizeListener(){ue(this.platformId)&&(this.resizeListener||(this.resizeListener=this.renderer.listen(this.document.defaultView,"resize",e=>{this.hide()})))}isOutsideClicked(e){return!(this.containerViewChild?.nativeElement?.isSameNode(e.target)||this.containerViewChild?.nativeElement?.contains(e.target))}unbindResizeListener(){this.resizeListener&&(this.resizeListener(),this.resizeListener=null)}unbindGlobalListeners(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null),this.documentTriggerListener&&(this.documentTriggerListener(),this.documentTriggerListener=null),this.resizeListener&&(this.resizeListener(),this.resizeListener=null),this.touchEndListener&&(this.touchEndListener(),this.touchEndListener=null)}unbindTriggerEventListener(){this.triggerEventListener&&(this.triggerEventListener(),this.triggerEventListener=null)}removeAppendedElements(){this.$appendTo()&&this.containerViewChild&&this.$appendTo()==="body"&&this.renderer.removeChild(this.document.body,this.containerViewChild.nativeElement)}onDestroy(){this.unbindGlobalListeners(),this.unbindTriggerEventListener(),this.unbindMatchMediaListener(),this.removeAppendedElements()}static \u0275fac=function(t){return new(t||o)(Y(Et))};static \u0275cmp=k({type:o,selectors:[["p-contextMenu"],["p-contextmenu"],["p-context-menu"]],contentQueries:function(t,i,n){if(t&1&&(ve(n,ji,4),ve(n,zi,4),ve(n,Lt,4)),t&2){let r;D(r=P())&&(i.itemTemplate=r.first),D(r=P())&&(i.submenuIconTemplate=r.first),D(r=P())&&(i.templates=r)}},viewQuery:function(t,i){if(t&1&&(H(Hi,5),H(Gi,5)),t&2){let n;D(n=P())&&(i.rootmenu=n.first),D(n=P())&&(i.containerViewChild=n.first)}},inputs:{model:"model",triggerEvent:"triggerEvent",target:"target",global:[2,"global","global",$],style:"style",styleClass:"styleClass",autoZIndex:[2,"autoZIndex","autoZIndex",$],baseZIndex:[2,"baseZIndex","baseZIndex",Q],id:"id",breakpoint:"breakpoint",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",pressDelay:[2,"pressDelay","pressDelay",Q],appendTo:[1,"appendTo"]},outputs:{onShow:"onShow",onHide:"onHide"},features:[He([Ne,{provide:Jt,useExisting:o}]),Re],decls:1,vars:1,consts:[["container",""],["rootmenu",""],[3,"class","style","ngStyle","pBind",4,"ngIf"],[3,"ngStyle","pBind"],[3,"itemClick","menuFocus","menuBlur","menuKeydown","itemMouseEnter","root","items","itemTemplate","menuId","tabindex","ariaLabel","ariaLabelledBy","baseZIndex","autoZIndex","visible","focusedItemId","activeItemPath","pt"]],template:function(t,i){t&1&&v(0,Zi,4,22,"div",2),t&2&&l("ngIf",i.visible())},dependencies:[R,Ge,Ue,Wi,We,rt,nt,Ie,fe,ot],encapsulation:2,data:{animation:[qe("overlayAnimation",[he(":enter",[de({opacity:0}),Qe("250ms")]),he(":leave",[Qe(".1s linear",de({opacity:0}))])])]},changeDetection:0})}return o})(),ei=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=ft({type:o});static \u0275inj=ut({imports:[Be,fe,fe]})}return o})();var Yi=["contextMenu"];function Ji(o,s){if(o&1){let e=S();c(0,"a",3),g("click",function(){let i=h(e).$implicit,n=a();return _(n.onClickContextMenuItem(i))}),y(1,"i"),c(2,"span",4),d(3),m()()}if(o&2){let e=s.$implicit;p(),I(e.icon),p(2),w(e.label)}}var Ro=(()=>{let s=class s{constructor(){this.items=L([]),this.onSelectItem=q()}show(t,i){clearTimeout(this.hoverTimeout),this.selectedData=null,this.hoverTimeout=setTimeout(()=>{this.contextMenuEl.show(t),this.selectedData=i},100)}hide(){this.contextMenuEl?.hide(),clearTimeout(this.hoverTimeout),this.selectedData=null}onClickContextMenuItem(t){this.onSelectItem.emit({item:t,data:this.selectedData})}};s.\u0275fac=function(i){return new(i||s)},s.\u0275cmp=k({type:s,selectors:[["app-context-menu"]],viewQuery:function(i,n){if(i&1&&H(Yi,5),i&2){let r;D(r=P())&&(n.contextMenuEl=r.first)}},inputs:{items:[1,"items"]},outputs:{onSelectItem:"onSelectItem"},decls:4,vars:1,consts:[["contextMenu",""],["item",""],[3,"model"],["pRipple","",1,"flex","items-center","p-contextmenu-item-link",3,"click"],[1,"ml-2"]],template:function(i,n){i&1&&(c(0,"p-contextmenu",2,0),v(2,Ji,4,3,"ng-template",null,1,me),m()),i&2&&l("model",n.items())},dependencies:[F,ei,Be,Ie],encapsulation:2});let o=s;return o})();export{Xn as a,Ro as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h}from"./chunk-QMQCIH3X.js";import{a as u}from"./chunk-5UFP37GQ.js";import{b as l}from"./chunk-MM7SAZOU.js";import{d as p}from"./chunk-NQLMPUSB.js";import{ma as c,qa as t}from"./chunk-OHGMB7HJ.js";var g=(()=>{let e=class e{constructor(s,i,r,n){this.toastr=s,this.authService=i,this.router=r,this.permissionService=n}canActivate(s,i){let r=JSON.parse(window.localStorage.getItem("user")),n=new Date,a=!1;if(r!=null){let m=new Date(r?.Token?.expiredAt);n<m?a=!0:(this.authService.logout(),this.onTokenExpired())}else this.router.navigate([""]),this.onTokenExpired();return a}onTokenExpired(){this.toastr.error("Your session has expired. Please login again.","Session Expired")}};e.\u0275fac=function(i){return new(i||e)(t(l),t(h),t(p),t(u))},e.\u0275prov=c({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as D,b as E}from"./chunk-ZDBFIPDM.js";import"./chunk-DDFP4CNP.js";import"./chunk-RBZU7OVM.js";import{b as B}from"./chunk-BUMWMFHU.js";import"./chunk-ROS2QMKF.js";import"./chunk-5WT456T7.js";import"./chunk-YNL43MLU.js";import"./chunk-RXC5D64C.js";import"./chunk-O4D64GHO.js";import"./chunk-7R2D2JZ6.js";import{a as k}from"./chunk-AGBJEXIM.js";import"./chunk-WAXAIL2I.js";import"./chunk-RQUCYFCB.js";import{e as j}from"./chunk-MM7SAZOU.js";import"./chunk-OSGPJXJZ.js";import{A as $,w as F}from"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Hb as y,Mc as S,Nc as u,Oc as w,Pc as T,Uc as b,Z as x,_c as P,ac as _,ad as M,cc as C,dc as c,fc as d,gc as m,hc as s,ic as r,id as I,jc as l,jd as R,ma as g,ob as n,ra as a,yc as f}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var h=(()=>{let e=class e{constructor(){this.httpService=a(j)}getMyProfile(){return this.httpService.get(k.MyProfile)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=g({token:e,factory:e.\u0275fac});let t=e;return t})();var H=t=>({"border-end-0":t});function L(t,e){if(t&1&&(r(0,"div",11)(1,"div",12)(2,"p",13),u(3),l()()()),t&2){let i=e.$implicit,p=e.$index,o=f(2).$implicit;S(M(4,H,p!==o.Role.length-1)),s("pTooltip",i.Description),n(3),T(" ",i.Name," ")}}function U(t,e){if(t&1&&(r(0,"div",5)(1,"div",6)(2,"div",7)(3,"span",8),u(4),l()()(),r(5,"div",9)(6,"div",5),d(7,L,4,6,"div",10,c),l()()()),t&2){let i=f().$implicit;n(4),w(i.Name),n(3),m(i==null?null:i.Role)}}function q(t,e){if(t&1&&_(0,U,9,1,"div",5),t&2){let i=e.$implicit;C((i==null||i.Role==null?null:i.Role.length)>0?0:-1)}}var oe=(()=>{let e=class e{constructor(){this.myProfileService=a(h),this.profile$=this.myProfileService.getMyProfile().pipe(x(1))}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=y({type:e,selectors:[["app-roles-info"]],features:[P([h])],decls:10,vars:4,consts:[["headerTitle","My Profile",3,"hideSearchBox","hideSearchDropdown"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12"],[1,"d-flex","flex-column","row-gap-6","px-8"],[1,"row"],[1,"col-2","border","d-flex","align-items-center","justify-content-between","border-end-0",2,"height","40px","background","#f6f6f6"],[1,"d-flex","justify-content-center","w-100","align-items-center","gap-4"],[1,"fs-5","w-100","text-center"],[1,"col"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"class","pTooltip"],["tooltipPosition","top",1,"col-3","border","p-0","bg-white",2,"height","40px",3,"pTooltip"],[1,"d-flex","h-100","align-items-center","gap-4","px-2"],[1,"fs-6","text-dark",2,"margin","0"]],template:function(o,A){if(o&1&&(b(0),I(1,"async"),r(2,"mainpanel",0)(3,"content")(4,"div",1)(5,"div",2)(6,"div",3)(7,"div",4),d(8,q,1,1,null,null,c),l()()()()()()),o&2){let v=R(1,2,A.profile$);n(2),s("hideSearchBox",!0)("hideSearchDropdown",!0),n(6),m(v==null?null:v.Roles)}},dependencies:[$,B,E,D,F],encapsulation:2});let t=e;return t})();export{oe as RolesInfoComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g}from"./chunk-
|
|
1
|
+
import{c as g}from"./chunk-ZWUYPYHD.js";import{b as m}from"./chunk-WVA5LYVE.js";import{Fd as o,Jb as a,Lb as u,Pa as d,pd as r,ra as i,ud as e}from"./chunk-OHGMB7HJ.js";var c=(()=>{class n extends m{pcFluid=i(g,{optional:!0,host:!0,skipSelf:!0});fluid=e(void 0,{transform:o});variant=e();size=e();inputSize=e();pattern=e();min=e();max=e();step=e();minlength=e();maxlength=e();$variant=r(()=>this.variant()||this.config.inputStyle()||this.config.inputVariant());get hasFluid(){return this.fluid()??!!this.pcFluid}static \u0275fac=(()=>{let t;return function(f){return(t||(t=d(n)))(f||n)}})();static \u0275dir=a({type:n,inputs:{fluid:[1,"fluid"],variant:[1,"variant"],size:[1,"size"],inputSize:[1,"inputSize"],pattern:[1,"pattern"],min:[1,"min"],max:[1,"max"],step:[1,"step"],minlength:[1,"minlength"],maxlength:[1,"maxlength"]},features:[u]})}return n})();export{c as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as b}from"./chunk-MM7SAZOU.js";import{b as h,d as u}from"./chunk-NQLMPUSB.js";import"./chunk-OSGPJXJZ.js";import"./chunk-JNRCB7N3.js";import"./chunk-XBIHN6D3.js";import{Ab as c,Hb as m,Nc as o,Oc as l,lc as e,mc as r,nc as s,ob as p,xc as g}from"./chunk-OHGMB7HJ.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var O=(()=>{let i=class i{constructor(t,n,d){this.route=t,this.http=n,this.service=d}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",t).subscribe(d=>{this.service.navigate(["/menu/channel"])})}};i.\u0275fac=function(n){return new(n||i)(c(h),c(b),c(u))},i.\u0275cmp=m({type:i,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(n,d){n&1&&(e(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),s(5,"i",5),e(6,"div",6),o(7,"Success !"),r()(),e(8,"div",7)(9,"div"),o(10,"You have successfully authorized"),r(),e(11,"div"),o(12,"DEALPOS to manage your Shopee"),r(),e(13,"div"),o(14," Your shopID is "),e(15,"span",8),o(16),r()(),e(17,"button",9),g("click",function(){return d.addShopee()}),s(18,"i",10),o(19," Add to my Channel "),r()()()()()()),n&2&&(p(16),l(d.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let a=i;return a})();export{O as ShopeeAuthorizedComponent};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{a as nt}from"./chunk-YYV4FSYQ.js";import{a as ee}from"./chunk-QXRG5XYP.js";import{a as rt}from"./chunk-5UFP37GQ.js";import{b as we,c as te}from"./chunk-UPRDDI4K.js";import{b as Qe}from"./chunk-RQUCYFCB.js";import{a as Ge,b as fe,c as Ze,d as Je,e as ge,f as Xe,g as me,h as Ye,i as J,j as ye,k as x}from"./chunk-RXLMJGUY.js";import{e as et}from"./chunk-MM7SAZOU.js";import{d as tt}from"./chunk-NQLMPUSB.js";import{C as qe,D as Ve}from"./chunk-JNRCB7N3.js";import{Da as Ue,F as Ne,G as Fe,Ib as z,Ma as ze,O as le,S as Le,T as $e,Wa as K,Z as ue,aa as O,ba as de,c as m,ea as he,f as je,ga as We,ha as He,j as Oe,k as Be,ma as D,n as G,na as H,o as Q,p as B,pa as P,q as Z,qa as g,ra as M,ub as U,v as _,va as pe,w as Me,xa as Ke,zd as L}from"./chunk-OHGMB7HJ.js";import{b as w}from"./chunk-WFMAM73Y.js";import{a as ce,i as k}from"./chunk-66YHNWRR.js";var ot={production:!0,version:"5.50.0",firebaseConfig:{apiKey:"AIzaSyDnnitFXpM8TglWKNpzu4ChgF98n25Rgvw",authDomain:"auth.dealpos.com",projectId:"devops-signin",storageBucket:"devops-signin.appspot.com",messagingSenderId:"412465165194",appId:"1:412465165194:web:03d806f6b6ab6f8b460e73",measurementId:"G-MNDBRJ5XZD"},news:"https://changelog.dealpos.app/umbraco/delivery/api/v2/content?fetch=children:omni&sort=sortOrder:asc"};var it=(()=>{let o=class o{constructor(){}getParseToken(){let e=JSON.parse(window.localStorage.getItem("user"));return this.ParseToken(e.Token.access_token)}GetRoles(){let r=this.getParseToken()["http://schemas.microsoft.com/ws/2008/06/identity/claims/role"];return typeof r=="string"&&(r=[r]),r||[]}ParseToken(e){try{let n=e.split(".")[0].replace("-","+").replace("_","/"),i=JSON.parse(window.atob(n)),l=e.split(".")[1].replace("-","+").replace("_","/"),c=JSON.parse(window.atob(l));return c.header=i,c}catch{return!1}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Tt="firebase",Ct="11.10.0";J(Tt,Ct,"app");var q=new We("ANGULARFIRE2_VERSION");var st=(t,o)=>{let s=o?[o]:Ye(),e=[];return s.forEach(r=>{r.container.getProvider(t).instances.forEach(i=>{e.includes(i)||e.push(i)})}),e},Ae=(function(t){return t[t.SILENT=0]="SILENT",t[t.WARN=1]="WARN",t[t.VERBOSE=2]="VERBOSE",t})(Ae||{}),Mr=L()&&typeof Zone<"u"?Ae.WARN:Ae.SILENT;var re=class{zone;delegate;constructor(o,s=Be){this.zone=o,this.delegate=s}now(){return this.delegate.now()}schedule(o,s,e){let r=this.zone,n=function(i){r?r.runGuarded(()=>{o.apply(this,[i])}):o.apply(this,[i])};return this.delegate.schedule(n,s,e)}},ve=(()=>{class t{outsideAngular;insideAngular;constructor(){let s=M(U);this.outsideAngular=s.runOutsideAngular(()=>new re(typeof Zone>"u"?void 0:Zone.current)),this.insideAngular=s.run(()=>new re(typeof Zone>"u"?void 0:Zone.current,Oe))}static \u0275fac=function(e){return new(e||t)};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Pt="firebase",xt="11.10.0";x.registerVersion(Pt,xt,"app-compat");var Rt=["ngOnDestroy"],ct=(t,o,s,e={})=>new Proxy(t,{get:(r,n)=>s.runOutsideAngular(()=>{if(t[n])return e?.spy?.get&&e.spy.get(n,t[n]),t[n];if(Rt.indexOf(n)>-1)return()=>{};let i=o.toPromise().then(a=>{let l=a?.[n];return typeof l=="function"?l.bind(a):l?.then?l.then(c=>s.run(()=>c)):s.run(()=>l)});return new Proxy(()=>{},{get:(a,l)=>i[l],apply:(a,l,c)=>i.then(u=>{let f=u?.(...c);return e?.spy?.apply&&e.spy.apply(n,c,f),f})})})});var ne=class{constructor(o){return o}},oe=new P("angularfire2.app.options"),ie=new P("angularfire2.app.name");function ke(t,o,s){let e=typeof s=="string"&&s||"[DEFAULT]",r=typeof s=="object"&&s||{};r.name=r.name||e;let i=x.apps.filter(a=>a&&a.name===r.name)[0]||o.runOutsideAngular(()=>x.initializeApp(t,r));try{if(JSON.stringify(t)!==JSON.stringify(i.options)){let a=!!module.hot;_t("error",`${i.name} Firebase App already initialized with different options${a?", you may need to reload as Firebase is not HMR aware.":"."}`)}}catch{}return new ne(i)}var _t=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)},jt={provide:ne,useFactory:ke,deps:[oe,U,[new ze,ie]]},zr=(()=>{class t{static initializeApp(s,e){return{ngModule:t,providers:[{provide:oe,useValue:s},{provide:ie,useValue:e}]}}constructor(s){x.registerVersion("angularfire",q.full,"core"),x.registerVersion("angularfire",q.full,"app-compat"),x.registerVersion("angular",He.full,s.toString())}static \u0275fac=function(e){return new(e||t)(g(K))};static \u0275mod=z({type:t});static \u0275inj=H({providers:[jt]})}return t})();function lt(t,o,s,e,r){let[,n,i]=globalThis.\u0275AngularfireInstanceCache.find(a=>a[0]===t)||[];if(n)return Ot(r,i)||(at("error",`${o} was already initialized on the ${s} Firebase App with different settings.${Bt?" You may need to reload as Firebase is not HMR aware.":""}`),at("warn",{is:r,was:i})),n;{let a=e();return globalThis.\u0275AngularfireInstanceCache.push([t,a,r]),a}}function Ot(t,o){try{return t.toString()===o.toString()}catch{return t===o}}var Bt=typeof module<"u"&&!!module.hot,at=(t,...o)=>{L()&&typeof console<"u"&&console[t](...o)};globalThis.\u0275AngularfireInstanceCache||=[];var Mt=new Map,Nt={activated:!1,tokenObservers:[]},Ft={initialized:!1,enabled:!1};function R(t){return Mt.get(t)||Object.assign({},Nt)}function pt(){return Ft}var Lt="https://content-firebaseappcheck.googleapis.com/v1";var $t="exchangeDebugToken",ut={OFFSET_DURATION:300*1e3,RETRIAL_MIN_WAIT:30*1e3,RETRIAL_MAX_WAIT:960*1e3},nn=1440*60*1e3;var Ee=class{constructor(o,s,e,r,n){if(this.operation=o,this.retryPolicy=s,this.getWaitDuration=e,this.lowerBound=r,this.upperBound=n,this.pending=null,this.nextErrorWaitInterval=r,r>n)throw new Error("Proactive refresh lower bound greater than upper bound!")}start(){this.nextErrorWaitInterval=this.lowerBound,this.process(!0).catch(()=>{})}stop(){this.pending&&(this.pending.reject("cancelled"),this.pending=null)}isRunning(){return!!this.pending}process(o){return k(this,null,function*(){this.stop();try{this.pending=new fe,this.pending.promise.catch(s=>{}),yield Wt(this.getNextRun(o)),this.pending.resolve(),yield this.pending.promise,this.pending=new fe,this.pending.promise.catch(s=>{}),yield this.operation(),this.pending.resolve(),yield this.pending.promise,this.process(!0).catch(()=>{})}catch(s){this.retryPolicy(s)?this.process(!1).catch(()=>{}):this.stop()}})}getNextRun(o){if(o)return this.nextErrorWaitInterval=this.lowerBound,this.getWaitDuration();{let s=this.nextErrorWaitInterval;return this.nextErrorWaitInterval*=2,this.nextErrorWaitInterval>this.upperBound&&(this.nextErrorWaitInterval=this.upperBound),s}}};function Wt(t){return new Promise(o=>{setTimeout(o,t)})}var Ht={"already-initialized":"You have already called initializeAppCheck() for FirebaseApp {$appName} with different options. To avoid this error, call initializeAppCheck() with the same options as when it was originally called. This will return the already initialized instance.","use-before-activation":"App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. Call initializeAppCheck() before instantiating other Firebase services.","fetch-network-error":"Fetch failed to connect to a network. Check Internet connection. Original error: {$originalErrorMessage}.","fetch-parse-error":"Fetch client could not parse response. Original error: {$originalErrorMessage}.","fetch-status-error":"Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.","storage-open":"Error thrown when opening storage. Original error: {$originalErrorMessage}.","storage-get":"Error thrown when reading from storage. Original error: {$originalErrorMessage}.","storage-set":"Error thrown when writing to storage. Original error: {$originalErrorMessage}.","recaptcha-error":"ReCAPTCHA error.","initial-throttle":"{$httpStatus} error. Attempts allowed again after {$time}",throttled:"Requests throttled due to previous {$httpStatus} error. Attempts allowed again after {$time}"},N=new Je("appCheck","AppCheck",Ht);function ft(t){if(!R(t).activated)throw N.create("use-before-activation",{appName:t.name})}function gt(e,r){return k(this,arguments,function*({url:t,body:o},s){let n={"Content-Type":"application/json"},i=s.getImmediate({optional:!0});if(i){let h=yield i.getHeartbeatsHeader();h&&(n["X-Firebase-Client"]=h)}let a={method:"POST",body:JSON.stringify(o),headers:n},l;try{l=yield fetch(t,a)}catch(h){throw N.create("fetch-network-error",{originalErrorMessage:h?.message})}if(l.status!==200)throw N.create("fetch-status-error",{httpStatus:l.status});let c;try{c=yield l.json()}catch(h){throw N.create("fetch-parse-error",{originalErrorMessage:h?.message})}let u=c.ttl.match(/^([\d.]+)(s)$/);if(!u||!u[2]||isNaN(Number(u[1])))throw N.create("fetch-parse-error",{originalErrorMessage:`ttl field (timeToLive) is not in standard Protobuf Duration format: ${c.ttl}`});let f=Number(u[1])*1e3,d=Date.now();return{token:c.token,expireTimeMillis:d+f,issuedAtTimeMillis:d}})}function mt(t,o){let{projectId:s,appId:e,apiKey:r}=t.options;return{url:`${Lt}/projects/${s}/apps/${e}:${$t}?key=${r}`,body:{debug_token:o}}}var Kt="firebase-app-check-database",Ut=1,Ie="firebase-app-check-store";var se=null;function zt(){return se||(se=new Promise((t,o)=>{try{let s=indexedDB.open(Kt,Ut);s.onsuccess=e=>{t(e.target.result)},s.onerror=e=>{var r;o(N.create("storage-open",{originalErrorMessage:(r=e.target.error)===null||r===void 0?void 0:r.message}))},s.onupgradeneeded=e=>{let r=e.target.result;switch(e.oldVersion){case 0:r.createObjectStore(Ie,{keyPath:"compositeKey"})}}}catch(s){o(N.create("storage-open",{originalErrorMessage:s?.message}))}}),se)}function qt(t,o){return Vt(Gt(t),o)}function Vt(t,o){return k(this,null,function*(){let e=(yield zt()).transaction(Ie,"readwrite"),n=e.objectStore(Ie).put({compositeKey:t,value:o});return new Promise((i,a)=>{n.onsuccess=l=>{i()},e.onerror=l=>{var c;a(N.create("storage-set",{originalErrorMessage:(c=l.target.error)===null||c===void 0?void 0:c.message}))}})})}function Gt(t){return`${t.options.appId}-${t.name}`}var X=new Xe("@firebase/app-check");function be(t,o){return Ze()?qt(t,o).catch(s=>{X.warn(`Failed to write token to IndexedDB. Error: ${s}`)}):Promise.resolve()}function yt(){return pt().enabled}function wt(){return k(this,null,function*(){let t=pt();if(t.enabled&&t.token)return t.token.promise;throw Error(`
|
|
2
|
+
Can't get debug token in production mode.
|
|
3
|
+
`)})}var Zt={error:"UNKNOWN_ERROR"};function Jt(t){return Ge.encodeString(JSON.stringify(t),!1)}function Te(t,o=!1,s=!1){return k(this,null,function*(){let e=t.app;ft(e);let r=R(e),n=r.token,i;if(n&&!Y(n)&&(r.token=void 0,n=void 0),!n){let c=yield r.cachedTokenPromise;c&&(Y(c)?n=c:yield be(e,void 0))}if(!o&&n&&Y(n))return{token:n.token};let a=!1;if(yt())try{r.exchangeTokenPromise||(r.exchangeTokenPromise=gt(mt(e,yield wt()),t.heartbeatServiceProvider).finally(()=>{r.exchangeTokenPromise=void 0}),a=!0);let c=yield r.exchangeTokenPromise;return yield be(e,c),r.token=c,{token:c.token}}catch(c){return c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),Se(c)}try{r.exchangeTokenPromise||(r.exchangeTokenPromise=r.provider.getToken().finally(()=>{r.exchangeTokenPromise=void 0}),a=!0),n=yield R(e).exchangeTokenPromise}catch(c){c.code==="appCheck/throttled"||c.code==="appCheck/initial-throttle"?X.warn(c.message):s&&X.error(c),i=c}let l;return n?i?Y(n)?l={token:n.token,internalError:i}:l=Se(i):(l={token:n.token},r.token=n,yield be(e,n)):l=Se(i),a&&er(e,l),l})}function Xt(t){return k(this,null,function*(){let o=t.app;ft(o);let{provider:s}=R(o);if(yt()){let e=yield wt(),{token:r}=yield gt(mt(o,e),t.heartbeatServiceProvider);return{token:r}}else{let{token:e}=yield s.getToken();return{token:e}}})}function Yt(t,o,s,e){let{app:r}=t,n=R(r),i={next:s,error:e,type:o};if(n.tokenObservers=[...n.tokenObservers,i],n.token&&Y(n.token)){let a=n.token;Promise.resolve().then(()=>{s({token:a.token}),dt(t)}).catch(()=>{})}n.cachedTokenPromise.then(()=>dt(t))}function At(t,o){let s=R(t),e=s.tokenObservers.filter(r=>r.next!==o);e.length===0&&s.tokenRefresher&&s.tokenRefresher.isRunning()&&s.tokenRefresher.stop(),s.tokenObservers=e}function dt(t){let{app:o}=t,s=R(o),e=s.tokenRefresher;e||(e=Qt(t),s.tokenRefresher=e),!e.isRunning()&&s.isTokenAutoRefreshEnabled&&e.start()}function Qt(t){let{app:o}=t;return new Ee(()=>k(null,null,function*(){let s=R(o),e;if(s.token?e=yield Te(t,!0):e=yield Te(t),e.error)throw e.error;if(e.internalError)throw e.internalError}),()=>!0,()=>{let s=R(o);if(s.token){let e=s.token.issuedAtTimeMillis+(s.token.expireTimeMillis-s.token.issuedAtTimeMillis)*.5+3e5,r=s.token.expireTimeMillis-300*1e3;return e=Math.min(e,r),Math.max(0,e-Date.now())}else return 0},ut.RETRIAL_MIN_WAIT,ut.RETRIAL_MAX_WAIT)}function er(t,o){let s=R(t).tokenObservers;for(let e of s)try{e.type==="EXTERNAL"&&o.error!=null?e.error(o.error):e.next(o)}catch{}}function Y(t){return t.expireTimeMillis-Date.now()>0}function Se(t){return{token:Jt(Zt),error:t}}var Ce=class{constructor(o,s){this.app=o,this.heartbeatServiceProvider=s}_delete(){let{tokenObservers:o}=R(this.app);for(let s of o)At(this.app,s.next);return Promise.resolve()}};function tr(t,o){return new Ce(t,o)}function rr(t){return{getToken:o=>Te(t,o),getLimitedUseToken:()=>Xt(t),addTokenListener:o=>Yt(t,"INTERNAL",o),removeTokenListener:o=>At(t.app,o)}}var nr="@firebase/app-check",or="0.10.1";var ir="app-check",ht="app-check-internal";function sr(){me(new ge(ir,t=>{let o=t.getProvider("app").getImmediate(),s=t.getProvider("heartbeat");return tr(o,s)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,o,s)=>{t.getProvider(ht).initialize()})),me(new ge(ht,t=>{let o=t.getProvider("app-check").getImmediate();return rr(o)},"PUBLIC").setInstantiationMode("EXPLICIT")),J(nr,or)}sr();var ar="app-check";var ae=class{constructor(){return st(ar)}};var cr=["localhost","0.0.0.0","127.0.0.1"],An=typeof window<"u"&&cr.includes(window.location.hostname);var ur=new P("angularfire2.auth.use-emulator"),dr=new P("angularfire2.auth.settings"),hr=new P("angularfire2.auth.tenant-id"),pr=new P("angularfire2.auth.langugage-code"),fr=new P("angularfire2.auth.use-device-language"),gr=new P("angularfire.auth.persistence"),mr=(t,o,s,e,r,n,i,a)=>lt(`${t.name}.auth`,"AngularFireAuth",t.name,()=>{let l=o.runOutsideAngular(()=>t.auth());if(s&&l.useEmulator(...s),e&&(l.tenantId=e),l.languageCode=r,n&&l.useDeviceLanguage(),i)for(let[c,u]of Object.entries(i))l.settings[c]=u;return a&&l.setPersistence(a),l},[s,e,r,n,i,a]),De=(()=>{class t{injector=M(pe);authState;idToken;user;idTokenResult;credential;constructor(s,e,r,n,i,a,l,c,u,f,d,h){let p=new je,y=Z(void 0).pipe(G(i.outsideAngular),O(()=>n.runOutsideAngular(()=>import("./chunk-XRLXIT7I.js"))),_(()=>ke(s,n,e)),_(T=>mr(T,n,a,c,u,f,l,d)),ue({bufferSize:1,refCount:!1}));if(Ve(r))this.authState=this.user=this.idToken=this.idTokenResult=this.credential=Z(null);else{y.pipe($e()).subscribe();let T=y.pipe(O(I=>I.getRedirectResult().then(j=>j,()=>null)),Qe(this.injector),ue({bufferSize:1,refCount:!1})),W=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onAuthStateChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))})))),V=y.pipe(O(I=>new m(j=>({unsubscribe:n.runOutsideAngular(()=>I.onIdTokenChanged(F=>j.next(F),F=>j.error(F),()=>j.complete()))}))));this.authState=T.pipe(de(W),Q(i.outsideAngular),G(i.insideAngular)),this.user=T.pipe(de(V),Q(i.outsideAngular),G(i.insideAngular)),this.idToken=this.user.pipe(O(I=>I?B(I.getIdToken()):Z(null))),this.idTokenResult=this.user.pipe(O(I=>I?B(I.getIdTokenResult()):Z(null))),this.credential=Ne(T,p,this.authState.pipe(Fe(I=>!I))).pipe(_(I=>I?.user?I:null),Q(i.outsideAngular),G(i.insideAngular))}return ct(this,y,n,{spy:{apply:(T,W,V)=>{(T.startsWith("signIn")||T.startsWith("createUser"))&&V.then(I=>p.next(I))}}})}static \u0275fac=function(e){return new(e||t)(g(oe),g(ie,8),g(K),g(U),g(ve),g(ur,8),g(dr,8),g(hr,8),g(pr,8),g(fr,8),g(gr,8),g(ae,8))};static \u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"any"})}return t})(),Bn=(()=>{class t{constructor(){x.registerVersion("angularfire",q.full,"auth-compat")}static \u0275fac=function(e){return new(e||t)};static \u0275mod=z({type:t});static \u0275inj=H({providers:[De]})}return t})();var b=(function(t){return t.readonly="readonly",t.readwrite="readwrite",t})(b||{}),vt=new P(null),kt=new P("Indexed DB"),wr=new P("Server Indexed DB");function Ar(t,o){return t.objectStoreNames.contains(o)}function C(t,o,s){if(!t){s("You need to use the openDatabase function to create a database before you query it!");return}Ar(t,o)||s(`objectStore does not exists: ${o}`)}function S(t,o){let s=t.transaction(o.storeName,o.dbMode);return s.onerror=o.error,s.onabort=o.abort,s}function E(t,o,s,e){return{storeName:o,dbMode:t,error:r=>{s(r)},abort:r=>{s(r)}}}var xe=[];function A(t,o,s,e){return new Promise((r,n)=>{t||n("IndexedDB not available");let i=t.open(o,s),a;i.onsuccess=()=>{a=i.result,xe.push(a),r(a)},i.onerror=()=>{n(`IndexedDB error: ${i.error}`)},typeof e=="function"&&(i.onupgradeneeded=l=>{e(l,a)})})}function Pe(t,o,s,e,r){return k(this,null,function*(){return new Promise((n,i)=>{if(!t)return;let a=t.open(o,s);a.onupgradeneeded=l=>k(null,null,function*(){let c=l.target.result,u=e.map(d=>k(null,null,function*(){if(!c.objectStoreNames.contains(d.store)){let h=c.createObjectStore(d.store,d.storeConfig);for(let p of d.storeSchema)h.createIndex(p.name,p.keypath,p.options)}}));yield Promise.all(u);let f=r&&r();if(f){let d=Object.keys(f).map(h=>parseInt(h,10)).filter(h=>h>l.oldVersion).sort((h,p)=>h-p);for(let h of d)f[h](c,a.transaction)}c.close(),n()}),a.onsuccess=l=>{l.target.result.close(),n()},a.onerror=l=>{i(l)}})})}function vr(t,o,s){if(!t||!o||!s)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new m(e=>{try{let r=o+1,n=indexedDB.open(t,r);n.onupgradeneeded=i=>{let a=i.target.result;a.deleteObjectStore(s),a.close(),console.log("onupgradeneeded"),e.next(),e.complete()},n.onerror=i=>e.error(i)}catch(r){e.error(r)}})}function kr(t){return new Promise((o,s)=>{if(!t){s(new Error("No database to close"));return}try{t.close(),o()}catch(e){s(`Error closing database: ${e}`)}})}function v(){return function(t,o,s){let e=s.value;return s.value=function(...r){let n=e.apply(this,r);return n instanceof m?n.pipe(Le(()=>k(this,null,function*(){let i=xe.map(a=>k(this,null,function*(){yield kr(a)}));yield Promise.all(i),xe.length=0}))):n},s}}var _e=(()=>{let o=class o{constructor(e,r){this.dbConfigs=e,this.indexedDB=r,this.defaultDatabaseName=null,Object.values(this.dbConfigs).forEach((n,i,a)=>this.instanciateConfig(n,a.length===1))}instanciateConfig(e,r){return k(this,null,function*(){if(!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if((e.isDefault??!1)&&this.defaultDatabaseName)throw new Error("NgxIndexedDB: Only one database can be set as default");((e.isDefault??!1)&&!this.defaultDatabaseName||r)&&(this.defaultDatabaseName=e.name,this.selectedDb=e.name),yield Pe(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),A(this.indexedDB,e.name).then(n=>{n.version!==e.version&&(L()&&(console.warn(`
|
|
4
|
+
Your DB Config doesn't match the most recent version of the DB with name ${e.name}, please update it
|
|
5
|
+
DB current version: ${n.version};
|
|
6
|
+
Your configuration: ${e.version};
|
|
7
|
+
`),console.warn(`Using latest version ${n.version}`)),this.dbConfigs[e.name].version=n.version),n.close()})})}get dbConfig(){return this.dbConfigs[this.selectedDb]}getDatabaseVersion(){return new m(e=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{e.next(r.version),e.complete()}).catch(r=>e.error(`error during get version of database => ${r} `))})}selectDb(e){if(e=e??this.defaultDatabaseName,!e)throw new Error("No database name specified and no default database set.");if(!Object.keys(this.dbConfigs).includes(e))throw new Error(`NgxIndexedDB: Database ${e} is not initialized.`);this.selectedDb=e}createObjectStore(e,r){return k(this,null,function*(){let n=[e];yield Pe(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,n,r)})}createDynamicObjectStore(e,r){return k(this,null,function*(){let n=[e];yield Pe(this.indexedDB,this.dbConfig.name,this.dbConfig.version,n,r)})}add(e,r,n){return new m(i=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{let c=S(a,E(b.readwrite,e,d=>i.error(d))).objectStore(e),f=!!n?c.add(r,n):c.add(r);f.onsuccess=d=>k(this,null,function*(){let h=d.target.result,p=c.get(h);p.onsuccess=y=>{i.next(y.target.result),i.complete()},p.onerror=y=>{i.error(y)}}),f.onerror=d=>{i.error(d)}}).catch(a=>i.error(a))})}bulkAdd(e,r){let n=new Promise((i,a)=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{let u=S(l,E(b.readwrite,e,i,a)).objectStore(e),f=r.map(d=>new Promise(h=>{let p=d.key;delete d.key;let T=!!p?u.add(d,p):u.add(d);T.onsuccess=W=>{let V=W.target.result;h(V)}}));i(Promise.all(f))}).catch(l=>a(l))});return B(n)}bulkDelete(e,r){let n=r.map(i=>new Promise((a,l)=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let u=S(c,E(b.readwrite,e,l,a));u.objectStore(e).delete(i),u.oncomplete=()=>{this.getAll(e).pipe(le(1)).subscribe(d=>{a(d)})}}).catch(c=>l(c))}));return B(Promise.all(n))}getByKey(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let c=S(i,E(b.readonly,e,n.error)).objectStore(e).get(r);c.onsuccess=u=>{n.next(u.target.result),n.complete()},c.onerror=u=>{n.error(u)}}).catch(i=>n.error(i))})}bulkGet(e,r){let n=r.map(i=>this.getByKey(e,i));return new m(i=>{Me(n).subscribe(a=>{i.next(a),i.complete()})})}getByID(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{C(i,e,u=>n.error(u));let c=S(i,E(b.readonly,e,n.error,n.next)).objectStore(e).get(r);c.onsuccess=u=>{n.next(u.target.result),n.complete()}}).catch(i=>n.error(i))})}getByIndex(e,r,n){return new m(i=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{C(a,e,d=>i.error(d));let f=S(a,E(b.readonly,e,i.error)).objectStore(e).index(r).get(n);f.onsuccess=d=>{i.next(d.target.result),i.complete()}}).catch(a=>i.error(a))})}getAll(e){return new m(r=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{C(n,e,c=>r.error(c));let l=S(n,E(b.readonly,e,r.error,r.next)).objectStore(e).getAll();l.onerror=c=>{r.error(c)},l.onsuccess=({target:{result:c}})=>{r.next(c),r.complete()}}).catch(n=>r.error(n))})}update(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{C(i,e,u=>n.error(u));let l=S(i,E(b.readwrite,e,u=>n.error(u))).objectStore(e),c=l.put(r);c.onsuccess=u=>k(this,null,function*(){let f=u.target.result,d=l.get(f);d.onsuccess=h=>{n.next(h.target.result),n.complete()}})}).catch(i=>n.error(i))})}bulkPut(e,r){let n;return new m(i=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{C(a,e,c=>i.error(c)),n=S(a,E(b.readwrite,e,c=>i.error(c)));let l=n.objectStore(e);r.forEach((c,u)=>{let f=l.put(c);u===r.length-1&&(f.onsuccess=d=>{n.commit(),i.next(d.target.result),i.complete()}),f.onerror=d=>{n.abort(),i.error(d)}})}).catch(a=>{n?.abort(),i.error(a)})})}delete(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{C(i,e,c=>n.error(c));let a=S(i,E(b.readwrite,e,c=>n.error(c)));a.objectStore(e).delete(r),a.onerror=c=>n.error(c),a.oncomplete=()=>{this.getAll(e).pipe(le(1)).subscribe({next:c=>{n.next(c)},error:c=>n.error(c),complete:()=>n.complete()})}}).catch(i=>n.error(i))})}deleteByKey(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{C(i,e,c=>n.error(c));let a=S(i,E(b.readwrite,e,c=>n.error(c)));a.objectStore(e).delete(r),a.onerror=c=>n.error(c),a.oncomplete=()=>{n.next(),n.complete()}}).catch(i=>n.error(i))})}deleteAllByIndex(e,r,n,i){return new m(a=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{C(l,e,h=>a.error(h));let d=S(l,E(b.readwrite,e,a.error)).objectStore(e).index(r).openCursor(n,i);d.onerror=h=>a.error(h),d.onsuccess=h=>{let p=h.target.result;p?(p.delete(),p.continue()):(a.next(),a.complete())}}).catch(l=>a.error(l))})}clear(e){return new m(r=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{C(n,e,l=>r.error(l));let i=S(n,E(b.readwrite,e,l=>r.error(l)));i.objectStore(e).clear(),i.onerror=l=>r.error(l),i.oncomplete=()=>{r.next(),r.complete()}}).catch(n=>r.error(n))})}deleteDatabase(){return new m(e=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>k(this,null,function*(){r.close();let n=this.indexedDB.deleteDatabase(this.dbConfig.name);n.onsuccess=()=>{e.next(),e.complete()},n.onerror=i=>e.error(i),n.onblocked=()=>{console.warn("Delete blocked: Ensure all tabs, instances, or connections are closed. Database name:",this.dbConfig.name),e.error(new Error("Unable to delete database because it's blocked"))}})).catch(r=>e.error(r))})}openCursor(e){let{storeName:r,query:n,direction:i,mode:a=b.readonly}=e;return new m(l=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{C(c,r,h=>l.error(h));let u=S(c,E(a,r,l.error)),d=u.objectStore(r).openCursor(n,i);u.oncomplete=()=>l.complete(),d.onerror=h=>l.error(h),d.onsuccess=h=>{let p=h.target.result;p&&l.next(p)}}).catch(c=>l.error(c))})}openCursorByIndex(e){let{storeName:r,indexName:n,query:i,direction:a,mode:l=b.readonly}=e;return new m(c=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(u=>{C(u,r,y=>c.error(y));let f=S(u,E(l,r,c.error)),p=f.objectStore(r).index(n).openCursor(i,a);f.oncomplete=()=>c.complete(),p.onerror=y=>c.error(y),p.onsuccess=y=>{let T=y.target.result;T&&c.next(T)}}).catch(u=>c.error(u))})}getAllByIndex(e,r,n,i){return new m(a=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{C(l,e,p=>a.error(p));let d=S(l,E(b.readonly,e,a.error)).objectStore(e).index(r).openCursor(n,i),h=[];d.onerror=p=>a.error(p),d.onsuccess=p=>{let y=p.target.result;y?(h.push(y.value),y.continue()):(a.next(h),a.complete())}}).catch(l=>a.error(l))})}getAllKeysByIndex(e,r,n,i){return new m(a=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(l=>{C(l,e,p=>a.error(p));let f=S(l,E(b.readonly,e,a.error)).objectStore(e).index(r),d=[],h=f.openKeyCursor(n,i);h.onerror=p=>a.error(p),h.onsuccess=p=>{let y=p.target.result;if(y){let{primaryKey:T,key:W}=y;d.push({primaryKey:T,key:W}),y.continue()}else a.next(d),a.complete()}}).catch(l=>a.error(l))})}count(e,r){return new m(n=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{C(i,e,u=>n.error(u));let c=S(i,E(b.readonly,e,n.error)).objectStore(e).count(r);c.onerror=u=>n.error(u),c.onsuccess=u=>{n.next(u.target.result),n.complete()}}).catch(i=>n.error(i))})}countByIndex(e,r,n){return new m(i=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(a=>{C(a,e,d=>i.error(d));let f=S(a,E(b.readonly,e,i.error)).objectStore(e).index(r).count(n);f.onerror=d=>i.error(d),f.onsuccess=d=>{i.next(d.target.result),i.complete()}}).catch(a=>i.error(a))})}deleteObjectStore(e){return vr(this.dbConfig.name,++this.dbConfig.version,e)}getAllObjectStoreNames(){return new m(e=>{A(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{e.next(Array.from(r.objectStoreNames)),e.complete()}).catch(r=>e.error(r))})}};o.\u0275fac=function(r){return new(r||o)(g(vt),g(kt))},o.\u0275prov=D({token:o,factory:o.\u0275fac});let t=o;return w([v()],t.prototype,"getDatabaseVersion",null),w([v()],t.prototype,"add",null),w([v()],t.prototype,"bulkAdd",null),w([v()],t.prototype,"bulkDelete",null),w([v()],t.prototype,"getByKey",null),w([v()],t.prototype,"bulkGet",null),w([v()],t.prototype,"getByID",null),w([v()],t.prototype,"getByIndex",null),w([v()],t.prototype,"getAll",null),w([v()],t.prototype,"update",null),w([v()],t.prototype,"bulkPut",null),w([v()],t.prototype,"delete",null),w([v()],t.prototype,"deleteByKey",null),w([v()],t.prototype,"deleteAllByIndex",null),w([v()],t.prototype,"clear",null),w([v()],t.prototype,"deleteDatabase",null),w([v()],t.prototype,"openCursor",null),w([v()],t.prototype,"openCursorByIndex",null),w([v()],t.prototype,"getAllByIndex",null),w([v()],t.prototype,"getAllKeysByIndex",null),w([v()],t.prototype,"count",null),w([v()],t.prototype,"countByIndex",null),w([v()],t.prototype,"getAllObjectStoreNames",null),t})(),Re=class{cmp(){return 0}databases(){return Promise.resolve([])}deleteDatabase(){return{onupgradeneeded:null,onblocked:null,onerror:null,onsuccess:null,error:null}}open(){return{onupgradeneeded:null,onblocked:null,onerror:null,onsuccess:null,error:null}}};function bt(){Ke(bt);let t=M(K),o=M(wr,{optional:!0})??new Re;return qe(t)?M(Ue).defaultView.indexedDB:o}var br=(...t)=>{let o=t.reduce((s,e)=>(s[e.name]=e,s),{});return[_e,{provide:vt,useValue:o},{provide:kt,useFactory:bt}]},zn=(()=>{let o=class o{static forRoot(...e){return{ngModule:o,providers:[...br(...e)]}}};o.\u0275fac=function(r){return new(r||o)},o.\u0275mod=z({type:o}),o.\u0275inj=H({});let t=o;return t})();var St=(()=>{let o=class o{inititalizeIntercom(){let e=this.getFromLocalStorage();e?.Enabled&&window.Intercom("boot",{app_id:"xv1oomgl",name:e.Name,email:e.Email,created_at:e.Created,user_hash:e.Hash})}shutdown(){this.getFromLocalStorage()?.Enabled&&(window.Intercom("shutdown"),this.clearStorage())}clearStorage(){localStorage.removeItem("Intercom")}updateLocalStorage(e){let r={Enabled:!0};e&&(r=ce(ce({},r),e)),localStorage.setItem("Intercom",JSON.stringify(r))}getFromLocalStorage(){let e=localStorage.getItem("Intercom");return JSON.parse(e)}hideLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!0}),e.hide_default_launcher=!0,this.updateLocalStorage(e))}showLauncher(){let e=this.getFromLocalStorage();e?.Enabled&&(window.Intercom("update",{app_id:"xv1oomgl",hide_default_launcher:!1}),e.hide_default_launcher=!1,this.updateLocalStorage(e))}isHideLauncher(){let e=this.getFromLocalStorage();return te.IsEmpty(e?.hide_default_launcher)?!1:e?.hide_default_launcher}};o.\u0275fac=function(r){return new(r||o)},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Et=(()=>{let o=class o{constructor(e){this.db=e,this.DATABASE="Categories"}saveCategoriesByChannelType(e,r){let n=this.getKey(r);return this.db.add(this.DATABASE,e,n).pipe(_(i=>e))}getCategoriesByChannelType(e){let r=this.getKey(e);return this.db.getByKey(this.DATABASE,r)}getKey(e){let r="";switch(e){case we.Lazada:r="Lazada";break;case we.Tokopedia:r="Tokopedia";break}return r}clearDatabase(){this.db.clear(this.DATABASE)}getHostName(){let e=localStorage.getItem("Authorization");return this.hostName=JSON.parse(e)?.Host,this.hostName}};o.\u0275fac=function(r){return new(r||o)(g(_e))},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();var Ki=(()=>{let o=class o{constructor(e,r,n,i,a,l,c,u){this.httpService=e,this.tokenDecodeService=r,this.afAuth=n,this.ngxPermission=i,this.localDataService=a,this.router=l,this.intercomService=c,this.tokenService=u}login(e){return this.httpService.post("/api/token/Login",e).pipe(he(r=>{this.setLocalStorage(r,e.Host,e.Username),this.loadPermissions()}))}getNews(){return this.httpService.get(ot.news).pipe(_(e=>e?.items?.map(r=>r?.properties)))}loginWithGoogle(e,r){e.preventDefault();let n=new ye;return n.setCustomParameters({prompt:"select_account"}),B(this.afAuth.signInWithPopup(n)).pipe(_(i=>i.credential),_(i=>i.idToken),O(i=>this.httpService.post("/api/token/LoginWithSocialProvider",JSON.stringify({IDToken:i,Host:r}))),he(i=>{this.setLocalStorage(i,r,null),this.loadPermissions()}))}setLocalStorage(e,r,n){this.tokenService.updateTokenInLocalStorage(e),localStorage.setItem(ee.AUTHORIZATION,JSON.stringify({Host:r,username:n})),this.intercomService.updateLocalStorage(e.IntercomWidget),this.intercomService.inititalizeIntercom()}loadPermissions(){this.ngxPermission.loadPermissions([]);let e=localStorage.getItem(ee.USER);if(te.IsNotEmpty(e)){let r=this.tokenDecodeService.GetRoles();this.ngxPermission.loadPermissions(r)}}getChannels(){return this.tokenService.getChannels()}logout(){this.clearLocalStorage(),this.ngxPermission.flushPermissions()}isActiveToken(){let e=this.tokenService.getUser(),r=new Date;if(e!=null){let n=new Date(e.Token.expiredAt);return r<n?!0:(this.clearLocalStorage(),!1)}else return!1}getDomain(){if(!this.domain){let e=localStorage.getItem(ee.AUTHORIZATION);this.domain="https://"+JSON.parse(e).Host}return this.domain}clearLocalStorage(){this.domain=null,this.tokenService.clearStorage(),this.intercomService.shutdown(),this.localDataService.clearDatabase(),this.router.navigate([""])}};o.\u0275fac=function(r){return new(r||o)(g(et),g(it),g(De),g(rt),g(Et),g(tt),g(St),g(nt))},o.\u0275prov=D({token:o,factory:o.\u0275fac,providedIn:"root"});let t=o;return t})();export{ot as a,it as b,zr as c,Bn as d,zn as e,Et as f,St as g,Ki as h};
|