dealpos 25.47.0 → 25.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/{chunk-K4LLK7O5.js → chunk-2B5OZGVM.js} +1 -1
- package/browser/{chunk-2RERZJD4.js → chunk-2MCEIRJY.js} +1 -1
- package/browser/{chunk-HV4KV3DJ.js → chunk-3FYNWZYY.js} +1 -1
- package/browser/{chunk-E2DUJTA4.js → chunk-3OHHXDTW.js} +1 -1
- package/browser/{chunk-FR66DARJ.js → chunk-3YOY54TO.js} +1 -1
- package/browser/{chunk-FY2ZQK3Q.js → chunk-3ZL5OQ6Y.js} +1 -1
- package/browser/{chunk-647PQZMJ.js → chunk-44RMDJGQ.js} +1 -1
- package/browser/{chunk-2LSFBE4Q.js → chunk-4CKBIRQ2.js} +1 -1
- package/browser/{chunk-5OKSTEWQ.js → chunk-4U2TXFUV.js} +1 -1
- package/browser/{chunk-KTPMM54V.js → chunk-4Y2FYXDF.js} +1 -1
- package/browser/{chunk-C5S5BG57.js → chunk-54OUVAKK.js} +1 -1
- package/browser/{chunk-2HOSLZ77.js → chunk-5BH2H4V6.js} +1 -1
- package/browser/{chunk-BATVMTNZ.js → chunk-5BLWYLXP.js} +1 -1
- package/browser/{chunk-RF5WGONA.js → chunk-5DQ4MJJT.js} +1 -1
- package/browser/{chunk-QIFQFG3V.js → chunk-5MJHW4YM.js} +1 -1
- package/browser/{chunk-HLML4BKF.js → chunk-5MWGLO24.js} +1 -1
- package/browser/{chunk-WDD7INF4.js → chunk-5QUOXOR7.js} +11 -11
- package/browser/{chunk-WBO7PC7R.js → chunk-5SJK4QC2.js} +1 -1
- package/browser/{chunk-LLEPB2B6.js → chunk-64RUCACD.js} +1 -1
- package/browser/{chunk-BYO7FJ4O.js → chunk-6GLKD66N.js} +1 -1
- package/browser/{chunk-XE46ZDV6.js → chunk-6PX2PA2J.js} +1 -1
- package/browser/{chunk-CAGQRIPG.js → chunk-6UMKFILJ.js} +1 -1
- package/browser/{chunk-NN2EFVJK.js → chunk-7GQF6UNI.js} +1 -1
- package/browser/{chunk-ROLAW5XO.js → chunk-7KAETFNH.js} +1 -1
- package/browser/{chunk-EZ5EW4QK.js → chunk-7SJB3DEF.js} +1 -1
- package/browser/{chunk-KBISFX5T.js → chunk-7WXQYKCT.js} +1 -1
- package/browser/chunk-A243LOWU.js +1 -0
- package/browser/{chunk-ZSW24KNO.js → chunk-A5MP4QMZ.js} +1 -1
- package/browser/{chunk-DWZLJMWC.js → chunk-ABNUBGXO.js} +1 -1
- package/browser/{chunk-APOV2ZYY.js → chunk-AEXXXOEQ.js} +1 -1
- package/browser/{chunk-ABO3BJKM.js → chunk-AMONIKLC.js} +1 -1
- package/browser/{chunk-INHUUGSI.js → chunk-AUBQH6JY.js} +1 -1
- package/browser/chunk-AVTYR2I6.js +1 -0
- package/browser/{chunk-DM4PGQEH.js → chunk-AZBA2YOQ.js} +2 -2
- package/browser/{chunk-QDE5Y76C.js → chunk-B3STLAM7.js} +1 -1
- package/browser/{chunk-QZMZBCE7.js → chunk-BA3BDB5Y.js} +1 -1
- package/browser/chunk-BCUIYEEN.js +1 -0
- package/browser/{chunk-OFTORAX4.js → chunk-BK4CA5K2.js} +1 -1
- package/browser/{chunk-H4DUHWPT.js → chunk-BVZ7ACQM.js} +1 -1
- package/browser/{chunk-EKORPCX3.js → chunk-BWXXYBLG.js} +1 -1
- package/browser/{chunk-ON47ICI3.js → chunk-C6YPXBIP.js} +1 -1
- package/browser/chunk-CLBQLTFG.js +4 -0
- package/browser/{chunk-PECGNYTX.js → chunk-CSFFF2YO.js} +1 -1
- package/browser/{chunk-P632SS2L.js → chunk-CUULWZUF.js} +1 -1
- package/browser/{chunk-QQ4DCXLE.js → chunk-D6HRDYFW.js} +1 -1
- package/browser/{chunk-HQ4NLUV6.js → chunk-DEGB7PBB.js} +1 -1
- package/browser/chunk-DPGY5YXC.js +1 -0
- package/browser/{chunk-NRF37QSD.js → chunk-E5XIALIA.js} +1 -1
- package/browser/chunk-EANAFODJ.js +1 -0
- package/browser/{chunk-IGNVHAO2.js → chunk-EQR3RN5K.js} +1 -1
- package/browser/{chunk-UBCB4G4S.js → chunk-F652VZDD.js} +1 -1
- package/browser/{chunk-EAFSL5ZF.js → chunk-FE5USLDO.js} +1 -1
- package/browser/{chunk-BCD363QF.js → chunk-FFNEDDOO.js} +1 -1
- package/browser/{chunk-ME5KGPYC.js → chunk-FFW4SP7H.js} +1 -1
- package/browser/{chunk-JVEVLEGH.js → chunk-FG3HLE5U.js} +1 -1
- package/browser/{chunk-DSQH2UQV.js → chunk-FHPFRT4L.js} +1 -1
- package/browser/{chunk-474F5EIO.js → chunk-FJC7EOO5.js} +1 -1
- package/browser/{chunk-ZXSVZL53.js → chunk-FNH6K4S4.js} +1 -1
- package/browser/chunk-FSBKLNRT.js +4 -0
- package/browser/{chunk-BKBSPC2U.js → chunk-G2VAG4V3.js} +1 -1
- package/browser/{chunk-5PUIMWNW.js → chunk-G5VELV3S.js} +1 -1
- package/browser/{chunk-6WEGHV7F.js → chunk-GN3HVOCN.js} +1 -1
- package/browser/{chunk-JWH2AZ3Z.js → chunk-GXVEYJWC.js} +1 -1
- package/browser/{chunk-L32BGRA6.js → chunk-GYNJFQPE.js} +1 -1
- package/browser/{chunk-UBXEYFKJ.js → chunk-H2SA27YZ.js} +1 -1
- package/browser/{chunk-BY57IAJ7.js → chunk-HD2QU6GJ.js} +1 -1
- package/browser/{chunk-27Y3MQJV.js → chunk-HVJHE6PQ.js} +1 -1
- package/browser/{chunk-P53EATPC.js → chunk-I2SL4ZPJ.js} +1 -1
- package/browser/{chunk-KEAT6AT3.js → chunk-I5W4NCFM.js} +1 -1
- package/browser/{chunk-EX4TE4E5.js → chunk-IDOZYC3I.js} +1 -1
- package/browser/chunk-IFOBYW26.js +1 -0
- package/browser/chunk-IVQ42QHP.js +5 -0
- package/browser/{chunk-MA6NB2EZ.js → chunk-JIPNMAEP.js} +1 -1
- package/browser/{chunk-GK4I3EKQ.js → chunk-JNORDOWT.js} +1 -1
- package/browser/{chunk-POJQGU7L.js → chunk-JR5LAUIS.js} +1 -1
- package/browser/{chunk-HTJJDQ3V.js → chunk-JYA7PGNK.js} +1 -1
- package/browser/{chunk-TH7SO4LD.js → chunk-L2V3KTC6.js} +1 -1
- package/browser/{chunk-ORQ3JDJE.js → chunk-LBZL2R6L.js} +1 -1
- package/browser/{chunk-Z7IU5JLK.js → chunk-LDTRYGRE.js} +1 -1
- package/browser/{chunk-DC426G2P.js → chunk-LOD3JYZW.js} +1 -1
- package/browser/{chunk-T5FBPKPS.js → chunk-LRXTFWOZ.js} +1 -1
- package/browser/{chunk-LWA7CCEY.js → chunk-M47WPS54.js} +3 -3
- package/browser/{chunk-WA4WWHYW.js → chunk-M4EGMZWI.js} +1 -1
- package/browser/{chunk-3HS4V7LK.js → chunk-MH7N5XSV.js} +3 -3
- package/browser/{chunk-IUDUQNN7.js → chunk-MUM4RT2P.js} +1 -1
- package/browser/{chunk-WH2BY5K4.js → chunk-MVUVDYGQ.js} +1 -1
- package/browser/chunk-NBMH5YL2.css +1 -0
- package/browser/{chunk-UE2HBW5H.js → chunk-NVCUDJUL.js} +1 -1
- package/browser/{chunk-PLWCVGTF.js → chunk-O2LFJOK7.js} +1 -1
- package/browser/{chunk-IT6GHGT4.js → chunk-OINIYEKP.js} +1 -1
- package/browser/{chunk-CX7CJIXK.js → chunk-OJM2IYYY.js} +2 -2
- package/browser/chunk-P3SYBLK4.js +21 -0
- package/browser/{chunk-MHVF2KXK.js → chunk-PACJK6XZ.js} +1 -1
- package/browser/{chunk-Q473GHR5.js → chunk-PEIXGMKS.js} +1 -1
- package/browser/{chunk-NX6ACGTN.js → chunk-PIZRVCBM.js} +1 -1
- package/browser/{chunk-GNODCFOP.js → chunk-PJCGIZLH.js} +1 -1
- package/browser/{chunk-BALKIB67.js → chunk-PKS7H624.js} +1 -1
- package/browser/{chunk-4JAEMXSQ.js → chunk-PSJRHKCL.js} +1 -1
- package/browser/{chunk-MSW23AJV.js → chunk-QDHSPK4B.js} +1 -1
- package/browser/{chunk-DGF2U27C.js → chunk-QGBQPCW2.js} +2 -2
- package/browser/{chunk-AIM6VG2H.js → chunk-QJD336PR.js} +1 -1
- package/browser/chunk-QLAA4AMU.js +1 -0
- package/browser/{chunk-SO4GMA3Y.js → chunk-QPOOLLKY.js} +1 -1
- package/browser/{chunk-HU3YNBXW.js → chunk-QVCQODGZ.js} +1 -1
- package/browser/chunk-QXWCGE56.js +1 -0
- package/browser/{chunk-WMUZZ5XX.js → chunk-RAQ5KDLF.js} +1 -1
- package/browser/{chunk-QVJJGWXC.js → chunk-RB6A4M7Y.js} +14 -14
- package/browser/{chunk-SGSO4UVM.js → chunk-RCW2TTR7.js} +1 -1
- package/browser/{chunk-ULYBLEXA.js → chunk-RJJYGGF6.js} +1 -1
- package/browser/{chunk-3YKXHA6Q.js → chunk-RMB6IO7X.js} +1 -1
- package/browser/{chunk-YG6ODXQF.js → chunk-RMU3G7EK.js} +1 -1
- package/browser/{chunk-FQSAJFS6.js → chunk-RNYFGIMB.js} +1 -1
- package/browser/{chunk-JKMJAL6Y.js → chunk-SIS55WCN.js} +2 -2
- package/browser/{chunk-RSN23KAR.js → chunk-SKDXVP3A.js} +1 -1
- package/browser/{chunk-IQDT5K5I.js → chunk-SQ3QIOE4.js} +1 -1
- package/browser/{chunk-RYTM3LHN.js → chunk-SUKZF5RZ.js} +1 -1
- package/browser/{chunk-XIXDLSA2.js → chunk-SVUUS5JD.js} +1 -1
- package/browser/{chunk-7EQG6N5Y.js → chunk-SWPKQM2X.js} +1 -1
- package/browser/{chunk-NZYZO47Z.js → chunk-T25N3EEG.js} +1 -1
- package/browser/{chunk-KD7WBOUR.js → chunk-T2H2XAEJ.js} +1 -1
- package/browser/{chunk-W3EZ4JHD.js → chunk-T4XIWNFQ.js} +1 -1
- package/browser/{chunk-GDS3XQ5F.js → chunk-T7DUQW7O.js} +1 -1
- package/browser/{chunk-7P3E5NJO.js → chunk-TEV65D26.js} +1 -1
- package/browser/{chunk-JEFUIFY4.js → chunk-TOUJ6K3E.js} +1 -1
- package/browser/{chunk-E3LGKC33.js → chunk-TUM5HKY7.js} +1 -1
- package/browser/{chunk-SKE3MW2D.js → chunk-TYX5PWAF.js} +1 -1
- package/browser/{chunk-P7UMAIIW.js → chunk-UTTEBWDI.js} +1 -1
- package/browser/{chunk-WBMSB25X.js → chunk-UTTKPBED.js} +1 -1
- package/browser/{chunk-MPAFCKH7.js → chunk-VAPCHGLS.js} +1 -1
- package/browser/{chunk-2JZS4BMV.js → chunk-VLHLS6LD.js} +1 -1
- package/browser/{chunk-YRGHPSPV.js → chunk-VX5HH3BW.js} +1 -1
- package/browser/{chunk-5L54U63F.js → chunk-W4W2KCYV.js} +1 -1
- package/browser/{chunk-SARJJ3AZ.js → chunk-WNZKCNMC.js} +1 -1
- package/browser/{chunk-MPE7Q4VX.js → chunk-XL7XI3DY.js} +1 -1
- package/browser/{chunk-QRTOTG7S.js → chunk-XNJ2P2ZO.js} +1 -1
- package/browser/{chunk-6TGKH2KC.js → chunk-XORANKYI.js} +1 -1
- package/browser/{chunk-O5IZN23R.js → chunk-XVAFOEWU.js} +2 -2
- package/browser/{chunk-3XKRDZSE.js → chunk-YQUQYWX3.js} +1 -1
- package/browser/{chunk-YMLCHH2G.js → chunk-ZEGLCDLU.js} +1 -1
- package/browser/{chunk-P6NP3EAO.js → chunk-ZJDY54VM.js} +1 -1
- package/browser/{chunk-M5KE2CW7.js → chunk-ZQHJ2WC2.js} +1 -1
- package/browser/chunk-ZVOEO2AC.js +3 -0
- package/browser/index.html +2 -2
- package/browser/main-WPNH2WGQ.css +1 -0
- package/browser/{main-VVZRGXWB.js → main-Z44VJHQT.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-4ZXLS56M.js +0 -4
- package/browser/chunk-5ZFCEP2C.css +0 -1
- package/browser/chunk-6SC4T77S.js +0 -1
- package/browser/chunk-D6Y2NJT7.js +0 -1
- package/browser/chunk-FIMFYHCK.js +0 -4
- package/browser/chunk-G5QWJMKY.js +0 -1
- package/browser/chunk-GI7KMXBX.js +0 -21
- package/browser/chunk-I2P6B3IK.js +0 -1
- package/browser/chunk-IR2QPNXA.js +0 -5
- package/browser/chunk-KUYGPZRD.js +0 -1
- package/browser/chunk-LEGL2HWF.js +0 -1
- package/browser/chunk-MMP7HKXF.js +0 -1
- package/browser/chunk-WY6RTBDA.js +0 -3
- package/browser/main-5IXVIJ7Z.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as at}from"./chunk-23PKMU5D.js";import{c as nt,d as st,e as ot}from"./chunk-INHUUGSI.js";import{a as fe}from"./chunk-UTAQ3FRE.js";import{c as it}from"./chunk-C4WJKF7R.js";import{N as rt}from"./chunk-NZYZO47Z.js";import{$ as pe,A as le,C as $e,G as N,O as Xe,V as Je,W as de,Z as me,aa as et,da as he,f as h,ha as tt,k as ce,n as ue,o as Ze}from"./chunk-NWSIPELM.js";import{a as Ge}from"./chunk-RNLSEEMX.js";import{$ as w,$d as We,Ab as j,Bb as z,Bc as K,Ca as Pe,Cb as v,D as q,Db as u,Ea as Z,Eb as d,Ec as B,F as xe,Fa as $,Fb as E,Ga as X,Gb as ee,Ha as Re,Hb as te,Ia as Ae,Ib as qe,Ja as H,Ka as Ke,Kc as Ue,M as Te,Mb as R,Nb as ie,O as Se,Ob as p,Q as De,Qb as l,Sa as J,Tb as He,Vb as Qe,Vc as re,Wb as Le,Xa as c,Xc as ae,Ya as b,Z as Ee,Za as Q,Zd as Ye,_ as we,aa as Oe,ac as ne,cb as L,cc as Ve,d as _,da as m,dc as f,ec as A,fb as Be,fc as Y,hb as V,ib as Ne,jb as k,la as G,lb as P,ma as Fe,na as T,pa as o,qd as je,rd as ze,sc as I,ta as O,tb as D,tc as se,ua as F,uc as oe,v as ve,vb as M,w as Ie,xa as S,xb as C,zb as U}from"./chunk-JYZTRN6N.js";import{a as x,b as Ce}from"./chunk-SNAKHGZS.js";var lt=()=>["/menu/Outlets/Master/Quick_Key_Templates/Form"],bt=t=>({ID:t}),Mt=t=>({OutletID:t});function Ct(t,s){if(t&1&&E(0,"img",16),t&2){let e=l(2).$implicit;v("src",e.ImageURLClient,J)}}function vt(t,s){if(t&1&&(u(0,"div",14)(1,"div",15),M(2,Ct,1,1,"img",16),d()()),t&2){let e=l().$implicit;c(2),C(e.ImageURLClient?2:-1)}}function It(t,s){if(t&1&&(u(0,"div",15)(1,"p",17)(2,"span"),f(3),K(4,"slice"),d()()()),t&2){let e=l().$implicit;c(3),A(B(4,1,e.Display,0,3))}}function xt(t,s){if(t&1){let e=R();u(0,"div",9)(1,"a",13),p("click",function(){let n=O(e).$implicit,r=l(4);return F(r.onSelectQuickKeyItem(n))}),M(2,vt,3,1,"div",14)(3,It,5,5,"div",15),u(4,"small"),f(5),K(6,"slice"),d()()()}if(t&2){let e=s.$implicit;c(2),C(e.ImageURLClient?2:3),c(3),A(B(6,2,e.Display,0,36))}}function Tt(t,s){if(t&1&&(u(0,"mat-tab",6)(1,"div",7)(2,"div",8),j(3,xt,7,6,"div",9,U),u(5,"div",10)(6,"a",11),E(7,"i",12),d()()()()()),t&2){let e=s.$implicit,i=l(3);v("label",e.Name),c(3),z(e==null?null:e.Items),c(3),v("routerLink",se(3,lt))("queryParams",oe(4,bt,i.quickKey.ID))}}function St(t,s){if(t&1){let e=R();u(0,"mat-tab-group",5),p("selectedIndexChange",function(n){O(e);let r=l(2);return F(r.onChangeTab(n))}),j(1,Tt,8,6,"mat-tab",6,U),d()}if(t&2){let e=l(2);v("disableRipple",!0)("selectedIndex",e.selectedTabIndex),c(),z(e.quickKey==null?null:e.quickKey.Groups)}}function Dt(t,s){if(t&1&&E(0,"img",16),t&2){let e=l(2).$implicit;v("src",e.ImageURLClient,J)}}function Et(t,s){if(t&1&&(u(0,"div",14)(1,"div",15),M(2,Dt,1,1,"img",16),d()()),t&2){let e=l().$implicit;c(2),C(e.ImageURLClient?2:-1)}}function wt(t,s){if(t&1&&(u(0,"div",15)(1,"p",17)(2,"span"),f(3),K(4,"slice"),d()()()),t&2){let e=l().$implicit;c(3),A(B(4,1,e.Model,0,3))}}function Ot(t,s){if(t&1){let e=R();u(0,"div",9)(1,"a",13),p("click",function(){let n=O(e).$implicit,r=l(3);return F(r.onSelectVariant(n.ID))}),M(2,Et,3,1,"div",14)(3,wt,5,5,"div",15),u(4,"small"),f(5),K(6,"slice"),d()()()}if(t&2){let e=s.$implicit;c(2),C(e.ImageURLClient?2:3),c(3),A(B(6,2,e.Model,0,30))}}function Ft(t,s){if(t&1){let e=R();u(0,"div",18)(1,"div",19),p("click",function(){O(e);let n=l(2);return F(n.quickKeyState="QUICKKEY")}),E(2,"i",20),d(),u(3,"div",21)(4,"b"),f(5),d()()(),u(6,"div",7)(7,"div",8),j(8,Ot,7,6,"div",9,U),d()()}if(t&2){let e=l(2);c(5),Y(" ",e.subQuickKeyPack.Display),c(3),z(e.subQuickKeyPack==null?null:e.subQuickKeyPack.Children)}}function Pt(t,s){if(t&1&&M(0,St,3,2,"mat-tab-group",4)(1,Ft,10,1),t&2){let e=l();C(e.quickKeyState=="QUICKKEY"?0:1)}}function Rt(t,s){if(t&1&&(u(0,"div",3)(1,"a",22)(2,"strong"),f(3,"QUICK KEYS UNCONFIGURED"),d(),E(4,"i",23),u(5,"span"),f(6,"Click here to setup your Quick keys"),d()()()),t&2){let e=l();c(),v("routerLink",se(2,lt))("queryParams",oe(3,Mt,e.outletID))}}var ct=class t{sf=o(at);quickKey;get outletID(){return this._outletID}set outletID(s){this._outletID=s,this._outletID&&(this.quickKeyState="QUICKKEY")}_outletID="";_onSelectVariant=new b;quickKeyState="QUICKKEY";subQuickKeyPack;selectedTabIndex=0;disabled=!1;onChange=s=>{};onTouched=()=>{};writeValue(s){}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}setDisabledState(s){this.disabled=s}onSelectQuickKeyItem(s){s.Children?s.Children.length==1?this.onSelectVariant(s.Children[0].ID):(this.quickKeyState="SUBQUICKKEY",this.subQuickKeyPack={Children:s.Children,Display:s.Display}):this.onSelectVariant(s.ItemID)}onSelectVariant(s){this.quickKeyState="QUICKKEY",this._onSelectVariant.emit(s),this.onChange(s),this.sf.searchFilterNativeEl?.focus()}onChangeTab(s){this.selectedTabIndex=s}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=V({type:t,selectors:[["POS-quick-key"]],inputs:{quickKey:"quickKey",outletID:"outletID"},outputs:{_onSelectVariant:"onSelectVariant"},features:[I([{provide:Ge,multi:!0,useExisting:t}])],decls:5,vars:1,consts:[[1,"row","h-100"],[1,"col-12"],[1,"quick-key-tab","h-100","pt-4"],[1,"no-quick-key"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"disableRipple","selectedIndex"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"selectedIndexChange","disableRipple","selectedIndex"],[3,"label"],[1,"container","tabItems"],[1,"row","g-0"],[1,"col-3","column","px-6"],[1,"col-3","column","px-8","add","pt-8"],[3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-5x","d-flex","align-items-center","justify-content-center","bg-white","h-100","text-primary"],[3,"click"],[1,"img-box","d-flex","align-items-center"],[1,"ratio","ratio-1x1"],[1,"full-screen-image",3,"src"],[1,"fw-normal","fs-1","d-flex","align-items-center","justify-content-center"],[1,"row","g-0","border","align-items-center","subquicKey"],[1,"col-auto","border-end","py-5","px-7","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-left"],[1,"col","text-center","fw-bold","text-uppercase","fs-5"],["id","LinkConfigureQuickkey","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-regular","fa-hand-pointer"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"section",2),M(3,Pt,2,1)(4,Rt,7,5,"div",3),d()()()),e&2&&(c(3),C(i.quickKey&&i.quickKey.Groups?3:4))},dependencies:[ze,We,Ye,rt,ot,nt,st,je],styles:[".quick-key-tab{width:100%;position:relative;height:100%;max-height:calc(100vh - 70px)} .quick-key-tab .mat-mdc-tab-header-pagination{display:none!important} .quick-key-tab .mat-mdc-tab-header{border:none} .quick-key-tab .mdc-tab-indicator{display:none!important} .quick-key-tab .mat-mdc-tab-body-wrapper{width:102%} .quick-key-tab .mat-mdc-tab-labels{border-bottom:0px;display:flex;flex-wrap:wrap;border-radius:6px} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab{color:#151515;opacity:1;height:38px;max-height:40px;white-space:normal!important;overflow:hidden;padding:0!important;min-width:25%!important;flex-basis:0;font-size:12px;font-weight:700;outline:none;text-transform:uppercase;background:#fff;display:flex} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab .mdc-tab__content{white-space:normal!important;align-self:center;font-size:.875rem!important} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active{background:linear-gradient(to bottom,#fff,#eee);border-radius:6px;border:.5px solid #dadada} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active .mdc-tab__text-label{color:gray!important;font-weight:700} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab:nth-child(n+5){flex-grow:0!important} .quick-key-tab .tabItems{padding:0} .quick-key-tab .tabItems .column{margin-top:15px;margin-bottom:10px;word-break:break-all} .quick-key-tab .tabItems .column>div{border:solid 1px #cfcfcf} .quick-key-tab .tabItems .column>a{text-align:center;display:block;cursor:pointer} .quick-key-tab .tabItems .column>a div.img-box{display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #dddddd} .quick-key-tab .tabItems .column>a .full-screen-image{position:absolute;object-fit:scale-down} .quick-key-tab .tabItems .column>a p{display:block;margin:0 auto;background-color:#a6a6a6;border:solid 1px #999999;border-top-left-radius:5px;border-bottom-right-radius:5px;color:#fff} .quick-key-tab .tabItems .column>a small{font-size:11px;display:block;margin:5px 0 0} .quick-key-tab .tabItems .column .ion-icon{font-size:75px;margin:10px} .quick-key-tab .col-md-3.column.add{cursor:pointer} .quick-key-tab .col-md-3.column.add i{margin-top:10px} .quick-key-tab ::-webkit-scrollbar{width:3px} .quick-key-tab ::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #bfd2da} .quick-key-tab ::-webkit-scrollbar-thumb{background:#c4c4c4;border-radius:10px} .quick-key-tab .subquicKey{background:linear-gradient(to bottom,#fff,#eee);color:gray;border-radius:6px} .quick-key-tab .no-quick-key{background-image:url(https://cdn.dealpos.xyz/web-image/no-quick-key.png)!important;background-repeat:no-repeat;height:calc(100vh - 70px);background-size:contain}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{background-color:#479ccf;padding:15px 25px;color:#fff;text-decoration:none;width:240px;display:block;opacity:.85;border-radius:6px}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{position:absolute;top:200px;left:calc(50% - 120px)}a#LinkConfigureQuickkey[_ngcontent-%COMP%]:hover{opacity:.95}a#LinkConfigureQuickkey[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%]{border-bottom:1px solid white;font-size:14px;margin:0 0 10px;padding:0 0 3px;display:block}a#LinkConfigureQuickkey[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;height:35px;margin:0 10px 0 0;font-size:28px}a#LinkConfigureQuickkey[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;font-size:14px;width:135px;vertical-align:top}"]})};var pt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],features:[I([{provide:fe,useClass:fe}])]})}return t})(),ye=new T("cdk-menu"),y=(function(t){return t[t.nextItem=0]="nextItem",t[t.previousItem=1]="previousItem",t[t.currentItem=2]="currentItem",t})(y||{}),g=new T("cdk-menu-stack"),Kt={provide:g,deps:[[new $,new X,new Z(g)]],useFactory:t=>t||new be},Bt=t=>({provide:g,deps:[[new $,new X,new Z(g)]],useFactory:s=>s||be.inline(t)}),be=(()=>{class t{id=o(le).getId("cdk-menu-stack-");_elements=[];_close=new _;_empty=new _;_hasFocus=new _;closed=this._close;hasFocus=this._hasFocus.pipe(w(!1),Te(0),De());emptied=this._empty;_inlineMenuOrientation=null;static inline(e){let i=new t;return i._inlineMenuOrientation=e,i}push(e){this._elements.push(e)}close(e,i){let{focusNextOnEmpty:n,focusParentTrigger:r}=x({},i);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:r});while(a!==e);this.isEmpty()&&this._empty.next(n)}}closeSubMenuOf(e){let i=!1;if(this._elements.indexOf(e)>=0)for(i=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return i}closeAll(e){let{focusNextOnEmpty:i,focusParentTrigger:n}=x({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let r=this._elements.pop();r&&this._close.next({item:r,focusParentTrigger:n})}this._empty.next(i)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=G({token:t,factory:t.\u0275fac})}return t})(),W=new T("cdk-menu-trigger"),Nt=new T("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=o(S);return()=>Je(t)}}),ht=(()=>{class t{static _openMenuTrigger;update(e){t._openMenuTrigger!==e&&(t._openMenuTrigger?.close(),t._openMenuTrigger=e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=G({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ft=(()=>{class t{injector=o(S);viewContainerRef=o(Be);menuStack=o(g);menuScrollStrategy=o(Nt);menuPosition;opened=new b;closed=new b;menuTemplateRef;menuData;overlayRef=null;destroyed=new _;stopOutsideClicksListener=q(this.closed,this.destroyed);childMenu;_menuPortal;_childMenuInjector;ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Xe(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let i=e;i;i=i?.parentElement??null)if(i.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||S.create({providers:[{provide:W,useValue:this},{provide:g,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,hostVars:2,hostBindings:function(i,n){i&2&&D("aria-controls",n.childMenu==null?null:n.childMenu.id)("data-cdk-menu-stack-id",n.menuStack.id)}})}return t})();var Me=new T("cdk-menu-aim");function _t(t,s){if(!s.isTrusted)return!1;let e=t.nativeElement,i=s.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?i===13||i===32:e.nodeName==="A"?i===13:!1}var qt=(()=>{class t extends ft{_elementRef=o(H);_ngZone=o(Q);_changeDetectorRef=o(re);_inputModalityDetector=o(ue);_directionality=o(N,{optional:!0});_renderer=o(L);_injector=o(S);_cleanupMouseenter;_menuTracker=o(ht);_parentMenu=o(ye,{optional:!0});_menuAim=o(Me,{optional:!0});constructor(){super(),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){this._parentMenu||this._menuTracker.update(this),!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||he(this._injector,this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}ngOnChanges(e){e.menuPosition&&this.overlayRef&&this.overlayRef.updatePositionStrategy(this._getOverlayPositionStrategy())}ngOnDestroy(){this._cleanupMouseenter(),super.ngOnDestroy()}_toggleOnKeydown(e){let i=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!h(e)&&!_t(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:h(e)||this._parentMenu&&i&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:h(e)||this._parentMenu&&i&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:h(e)||i||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._cleanupMouseenter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{if(this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()){let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()}}))}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new de({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return me(this._injector,this._elementRef).withLockedPosition().withFlexibleDimensions(!1).withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?pe:et)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(m(this.stopOutsideClicksListener)).subscribe(e=>{let i=ce(e),n=this._elementRef.nativeElement;i!==n&&!n.contains(i)&&(this.isElementInsideMenuStack(i)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(m(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(i,n){i&1&&p("focusin",function(){return n._setHasFocus(!0)})("focusout",function(){return n._setHasFocus(!1)})("keydown",function(a){return n._toggleOnKeydown(a)})("click",function(){return n._handleClick()}),i&2&&D("aria-haspopup",n.menuTemplateRef?"menu":null)("aria-expanded",n.menuTemplateRef==null?null:n.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],features:[I([{provide:W,useExisting:t},Kt]),P,Re]})}return t})(),Ht=(()=>{class t{_dir=o(N,{optional:!0});_elementRef=o(H);_ngZone=o(Q);_inputModalityDetector=o(ue);_renderer=o(L);_cleanupMouseEnter;_menuAim=o(Me,{optional:!0});_menuStack=o(g);_parentMenu=o(ye,{optional:!0});_menuTrigger=o(qt,{optional:!0,self:!0});disabled=!1;typeaheadLabel;triggered=new b;get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}_tabindex=-1;closeOnSpacebarTrigger=!0;destroyed=new _;constructor(){this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this._cleanupMouseEnter?.(),this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:i}=x({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),i||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_handleClick(e){this.disabled?(e.preventDefault(),e.stopPropagation()):this.trigger()}_onKeydown(e){switch(e.keyCode){case 32:case 13:if(!h(e)&&!_t(this._elementRef,e)){let i=this._elementRef.nativeElement.nodeName;i!=="A"&&i!=="BUTTON"&&e.preventDefault(),this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger})}break;case 39:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let i=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(i,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?y.previousItem:y.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:y.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._cleanupMouseEnter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu&&(this._menuAim?this._menuAim.toggle(e):e())}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:4,hostBindings:function(i,n){i&1&&p("blur",function(){return n._resetTabIndex()})("focus",function(){return n._setTabIndex()})("click",function(a){return n._handleClick(a)})("keydown",function(a){return n._onKeydown(a)}),i&2&&(ie("tabIndex",n._tabindex),D("aria-disabled",n.disabled||null),ne("cdk-menu-item-disabled",n.disabled))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",ae],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"]})}return t})(),ke=class{_renderer;_items;_eventCleanups;_itemsSubscription;entered=new _;exited=new _;activeElement;previousElement;constructor(s,e){this._renderer=s,this._items=e,this._bindEvents(),this.entered.subscribe(i=>this.activeElement=i),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._cleanupEvents(),this._itemsSubscription?.unsubscribe()}_bindEvents(){this._itemsSubscription=this._items.changes.pipe(w(this._items)).subscribe(()=>{this._cleanupEvents(),this._eventCleanups=[],this._items.forEach(s=>{let e=s._elementRef.nativeElement;this._eventCleanups.push(this._renderer.listen(e,"mouseenter",()=>{this.entered.next(s)}),this._renderer.listen(e,"mouseout",()=>{this.exited.next(s)}))})})}_cleanupEvents(){this._eventCleanups?.forEach(s=>s()),this._eventCleanups=void 0}},Qt=(()=>{class t extends pt{_focusMonitor=o(Ze);ngZone=o(Q);_renderer=o(L);nativeElement=o(H).nativeElement;menuStack=o(g);menuAim=o(Me,{optional:!0,self:!0});dir=o(N,{optional:!0});_allItems;id=o(le).getId("cdk-menu-");items=new Ke;orientation="vertical";isInline=!1;keyManager;destroyed=new _;triggerItem;pointerTracker;_menuStackHasFocus=Pe(!1);_tabIndexSignal=Ue(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null});ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setItems(),this._setKeyManager(),this._handleFocus(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.nativeElement),this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}setActiveMenuItem(e){this.keyManager?.setActiveItem(e)}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,i){let{focusParentTrigger:n}=x({},i),r=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),n&&(a?r.setActiveItem(a):r.setFirstItemActive()))}_setItems(){this._allItems.changes.pipe(w(this._allItems),m(this.destroyed)).subscribe(e=>{this.items.reset(e.filter(i=>i._parentMenu===this)),this.items.notifyOnChanges()})}_setKeyManager(){this.keyManager=new $e(this.items).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=q(this.items.changes,this.destroyed);this.items.changes.pipe(w(this.items),ve(i=>i.filter(n=>n.hasMenu).map(n=>n.getMenuTrigger().opened.pipe(Se(n),m(e)))),Ie(),Oe(i=>(this.triggerItem=i,i.getMenuTrigger().closed)),m(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e,focusParentTrigger:i})=>this.closeOpenMenu(e,{focusParentTrigger:i}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(m(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new ke(this._renderer,this.items)}),this.menuAim.initialize(this,this.pointerTracker))}_handleFocus(){this._focusMonitor.monitor(this.nativeElement,!1).pipe(m(this.destroyed)).subscribe(e=>{e!==null&&e!=="mouse"&&this.focusFirstItem(e)})}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ae(t)))(n||t)}})();static \u0275dir=k({type:t,contentQueries:function(i,n,r){if(i&1&&He(r,Ht,5),i&2){let a;Qe(a=Le())&&(n._allItems=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(i,n){i&1&&p("focusin",function(){return n.menuStack.setHasFocus(!0)})("focusout",function(){return n.menuStack.setHasFocus(!1)}),i&2&&(ie("tabIndex",n._getTabIndex())("id",n.id),D("aria-orientation",n.orientation)("data-cdk-menu-stack-id",n.menuStack.id))},inputs:{id:"id"},features:[P]})}return t})(),Ti=(()=>{class t extends Qt{_parentTrigger=o(W,{optional:!0});closed=new b;orientation="vertical";isInline=!this._parentTrigger;constructor(){super(),this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let i=this.keyManager;switch(e.keyCode){case 37:case 39:h(e)||(e.preventDefault(),i.setFocusOrigin("keyboard"),i.onKeydown(e));break;case 27:h(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:y.currentItem,focusParentTrigger:!0}));break;case 9:h(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:i.onKeydown(e)}}_toggleMenuFocus(e){let i=this.keyManager;switch(e){case y.nextItem:i.setFocusOrigin("keyboard"),i.setNextItemActive();break;case y.previousItem:i.setFocusOrigin("keyboard"),i.setPreviousItemActive();break;case y.currentItem:i.activeItem&&(i.setFocusOrigin("keyboard"),i.setActiveItem(i.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(m(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(i,n){i&1&&p("keydown",function(a){return n._handleKeyEvent(a)}),i&2&&ne("cdk-menu-inline",n.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],features:[I([{provide:pt,useExisting:t},{provide:ye,useExisting:t},Bt("vertical")]),P]})}return t})();var Lt=pe.map(t=>{let s=t.overlayX==="start"?2:-2,e=t.overlayY==="top"?2:-2;return Ce(x({},t),{offsetX:s,offsetY:e})}),Si=(()=>{class t extends ft{_injector=o(S);_directionality=o(N,{optional:!0});_menuTracker=o(ht);_changeDetectorRef=o(re);disabled=!1;constructor(){super(),this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._menuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new de({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return me(this._injector,e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??Lt)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this.childMenu=void 0,this._changeDetectorRef.markForCheck())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let i=this.overlayRef.outsidePointerEvents();if(e){let[n,r]=xe(i,({type:a})=>a==="auxclick");i=q(r.pipe(we((a,kt)=>e.ctrlKey&&kt===0&&a.ctrlKey)),n.pipe(Ee(1)))}i.pipe(m(this.stopOutsideClicksListener)).subscribe(n=>{this.isElementInsideMenuStack(ce(n))||this.menuStack.closeAll()})}}_open(e,i){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):this.overlayRef=he(this._injector,this._getOverlayConfig(i)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(i,n){i&1&&p("contextmenu",function(a){return n._openOnContextMenu(a)}),i&2&&D("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",ae]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],features:[I([{provide:W,useExisting:t},{provide:g,useClass:be}]),P]})}return t})();var Di=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Ne({type:t});static \u0275inj=Fe({imports:[tt]})}return t})();var gt=class t{icon="";label="";truncate=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=V({type:t,selectors:[["POS-dropdown-item-more-action"]],inputs:{icon:"icon",label:"label",truncate:"truncate"},decls:6,vars:3,consts:[[1,"dropdown-item","px-1"],[1,"row","g-0","d-flex","align-items-center"],[1,"col-2","px-0"],["aria-hidden","true",1,"fs-3"],[1,"col-10","pe-0","ps-4","fs-6"]],template:function(e,i){e&1&&(ee(0,"div",0)(1,"div",1)(2,"div",2),qe(3,"i",3),te(),ee(4,"div",4),f(5),te()()()),e&2&&(c(3),Ve(i.icon),c(2),Y(" ",i.label," "))},dependencies:[it],encapsulation:2})};export{ct as a,Ht as b,Ti as c,Si as d,Di as e,gt as f};
|
|
1
|
+
import{a as at}from"./chunk-23PKMU5D.js";import{c as nt,d as st,e as ot}from"./chunk-AUBQH6JY.js";import{a as fe}from"./chunk-UTAQ3FRE.js";import{c as it}from"./chunk-C4WJKF7R.js";import{N as rt}from"./chunk-T25N3EEG.js";import{$ as pe,A as le,C as $e,G as N,O as Xe,V as Je,W as de,Z as me,aa as et,da as he,f as h,ha as tt,k as ce,n as ue,o as Ze}from"./chunk-NWSIPELM.js";import{a as Ge}from"./chunk-RNLSEEMX.js";import{$ as w,$d as We,Ab as j,Bb as z,Bc as K,Ca as Pe,Cb as v,D as q,Db as u,Ea as Z,Eb as d,Ec as B,F as xe,Fa as $,Fb as E,Ga as X,Gb as ee,Ha as Re,Hb as te,Ia as Ae,Ib as qe,Ja as H,Ka as Ke,Kc as Ue,M as Te,Mb as R,Nb as ie,O as Se,Ob as p,Q as De,Qb as l,Sa as J,Tb as He,Vb as Qe,Vc as re,Wb as Le,Xa as c,Xc as ae,Ya as b,Z as Ee,Za as Q,Zd as Ye,_ as we,aa as Oe,ac as ne,cb as L,cc as Ve,d as _,da as m,dc as f,ec as A,fb as Be,fc as Y,hb as V,ib as Ne,jb as k,la as G,lb as P,ma as Fe,na as T,pa as o,qd as je,rd as ze,sc as I,ta as O,tb as D,tc as se,ua as F,uc as oe,v as ve,vb as M,w as Ie,xa as S,xb as C,zb as U}from"./chunk-JYZTRN6N.js";import{a as x,b as Ce}from"./chunk-SNAKHGZS.js";var lt=()=>["/menu/Outlets/Master/Quick_Key_Templates/Form"],bt=t=>({ID:t}),Mt=t=>({OutletID:t});function Ct(t,s){if(t&1&&E(0,"img",16),t&2){let e=l(2).$implicit;v("src",e.ImageURLClient,J)}}function vt(t,s){if(t&1&&(u(0,"div",14)(1,"div",15),M(2,Ct,1,1,"img",16),d()()),t&2){let e=l().$implicit;c(2),C(e.ImageURLClient?2:-1)}}function It(t,s){if(t&1&&(u(0,"div",15)(1,"p",17)(2,"span"),f(3),K(4,"slice"),d()()()),t&2){let e=l().$implicit;c(3),A(B(4,1,e.Display,0,3))}}function xt(t,s){if(t&1){let e=R();u(0,"div",9)(1,"a",13),p("click",function(){let n=O(e).$implicit,r=l(4);return F(r.onSelectQuickKeyItem(n))}),M(2,vt,3,1,"div",14)(3,It,5,5,"div",15),u(4,"small"),f(5),K(6,"slice"),d()()()}if(t&2){let e=s.$implicit;c(2),C(e.ImageURLClient?2:3),c(3),A(B(6,2,e.Display,0,36))}}function Tt(t,s){if(t&1&&(u(0,"mat-tab",6)(1,"div",7)(2,"div",8),j(3,xt,7,6,"div",9,U),u(5,"div",10)(6,"a",11),E(7,"i",12),d()()()()()),t&2){let e=s.$implicit,i=l(3);v("label",e.Name),c(3),z(e==null?null:e.Items),c(3),v("routerLink",se(3,lt))("queryParams",oe(4,bt,i.quickKey.ID))}}function St(t,s){if(t&1){let e=R();u(0,"mat-tab-group",5),p("selectedIndexChange",function(n){O(e);let r=l(2);return F(r.onChangeTab(n))}),j(1,Tt,8,6,"mat-tab",6,U),d()}if(t&2){let e=l(2);v("disableRipple",!0)("selectedIndex",e.selectedTabIndex),c(),z(e.quickKey==null?null:e.quickKey.Groups)}}function Dt(t,s){if(t&1&&E(0,"img",16),t&2){let e=l(2).$implicit;v("src",e.ImageURLClient,J)}}function Et(t,s){if(t&1&&(u(0,"div",14)(1,"div",15),M(2,Dt,1,1,"img",16),d()()),t&2){let e=l().$implicit;c(2),C(e.ImageURLClient?2:-1)}}function wt(t,s){if(t&1&&(u(0,"div",15)(1,"p",17)(2,"span"),f(3),K(4,"slice"),d()()()),t&2){let e=l().$implicit;c(3),A(B(4,1,e.Model,0,3))}}function Ot(t,s){if(t&1){let e=R();u(0,"div",9)(1,"a",13),p("click",function(){let n=O(e).$implicit,r=l(3);return F(r.onSelectVariant(n.ID))}),M(2,Et,3,1,"div",14)(3,wt,5,5,"div",15),u(4,"small"),f(5),K(6,"slice"),d()()()}if(t&2){let e=s.$implicit;c(2),C(e.ImageURLClient?2:3),c(3),A(B(6,2,e.Model,0,30))}}function Ft(t,s){if(t&1){let e=R();u(0,"div",18)(1,"div",19),p("click",function(){O(e);let n=l(2);return F(n.quickKeyState="QUICKKEY")}),E(2,"i",20),d(),u(3,"div",21)(4,"b"),f(5),d()()(),u(6,"div",7)(7,"div",8),j(8,Ot,7,6,"div",9,U),d()()}if(t&2){let e=l(2);c(5),Y(" ",e.subQuickKeyPack.Display),c(3),z(e.subQuickKeyPack==null?null:e.subQuickKeyPack.Children)}}function Pt(t,s){if(t&1&&M(0,St,3,2,"mat-tab-group",4)(1,Ft,10,1),t&2){let e=l();C(e.quickKeyState=="QUICKKEY"?0:1)}}function Rt(t,s){if(t&1&&(u(0,"div",3)(1,"a",22)(2,"strong"),f(3,"QUICK KEYS UNCONFIGURED"),d(),E(4,"i",23),u(5,"span"),f(6,"Click here to setup your Quick keys"),d()()()),t&2){let e=l();c(),v("routerLink",se(2,lt))("queryParams",oe(3,Mt,e.outletID))}}var ct=class t{sf=o(at);quickKey;get outletID(){return this._outletID}set outletID(s){this._outletID=s,this._outletID&&(this.quickKeyState="QUICKKEY")}_outletID="";_onSelectVariant=new b;quickKeyState="QUICKKEY";subQuickKeyPack;selectedTabIndex=0;disabled=!1;onChange=s=>{};onTouched=()=>{};writeValue(s){}registerOnChange(s){this.onChange=s}registerOnTouched(s){this.onTouched=s}setDisabledState(s){this.disabled=s}onSelectQuickKeyItem(s){s.Children?s.Children.length==1?this.onSelectVariant(s.Children[0].ID):(this.quickKeyState="SUBQUICKKEY",this.subQuickKeyPack={Children:s.Children,Display:s.Display}):this.onSelectVariant(s.ItemID)}onSelectVariant(s){this.quickKeyState="QUICKKEY",this._onSelectVariant.emit(s),this.onChange(s),this.sf.searchFilterNativeEl?.focus()}onChangeTab(s){this.selectedTabIndex=s}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=V({type:t,selectors:[["POS-quick-key"]],inputs:{quickKey:"quickKey",outletID:"outletID"},outputs:{_onSelectVariant:"onSelectVariant"},features:[I([{provide:Ge,multi:!0,useExisting:t}])],decls:5,vars:1,consts:[[1,"row","h-100"],[1,"col-12"],[1,"quick-key-tab","h-100","pt-4"],[1,"no-quick-key"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"disableRipple","selectedIndex"],[1,"h-100","bgQuickkeyIllustration","landscape",3,"selectedIndexChange","disableRipple","selectedIndex"],[3,"label"],[1,"container","tabItems"],[1,"row","g-0"],[1,"col-3","column","px-6"],[1,"col-3","column","px-8","add","pt-8"],[3,"routerLink","queryParams"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-5x","d-flex","align-items-center","justify-content-center","bg-white","h-100","text-primary"],[3,"click"],[1,"img-box","d-flex","align-items-center"],[1,"ratio","ratio-1x1"],[1,"full-screen-image",3,"src"],[1,"fw-normal","fs-1","d-flex","align-items-center","justify-content-center"],[1,"row","g-0","border","align-items-center","subquicKey"],[1,"col-auto","border-end","py-5","px-7","cursor-pointer",3,"click"],["aria-hidden","true",1,"fa","fa-arrow-left"],[1,"col","text-center","fw-bold","text-uppercase","fs-5"],["id","LinkConfigureQuickkey","target","_blank",3,"routerLink","queryParams"],["aria-hidden","true",1,"fa-regular","fa-hand-pointer"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"section",2),M(3,Pt,2,1)(4,Rt,7,5,"div",3),d()()()),e&2&&(c(3),C(i.quickKey&&i.quickKey.Groups?3:4))},dependencies:[ze,We,Ye,rt,ot,nt,st,je],styles:[".quick-key-tab{width:100%;position:relative;height:100%;max-height:calc(100vh - 70px)} .quick-key-tab .mat-mdc-tab-header-pagination{display:none!important} .quick-key-tab .mat-mdc-tab-header{border:none} .quick-key-tab .mdc-tab-indicator{display:none!important} .quick-key-tab .mat-mdc-tab-body-wrapper{width:102%} .quick-key-tab .mat-mdc-tab-labels{border-bottom:0px;display:flex;flex-wrap:wrap;border-radius:6px} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab{color:#151515;opacity:1;height:38px;max-height:40px;white-space:normal!important;overflow:hidden;padding:0!important;min-width:25%!important;flex-basis:0;font-size:12px;font-weight:700;outline:none;text-transform:uppercase;background:#fff;display:flex} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab .mdc-tab__content{white-space:normal!important;align-self:center;font-size:.875rem!important} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active{background:linear-gradient(to bottom,#fff,#eee);border-radius:6px;border:.5px solid #dadada} .quick-key-tab .mat-mdc-tab-labels .mdc-tab--active .mdc-tab__text-label{color:gray!important;font-weight:700} .quick-key-tab .mat-mdc-tab-labels .mat-mdc-tab:nth-child(n+5){flex-grow:0!important} .quick-key-tab .tabItems{padding:0} .quick-key-tab .tabItems .column{margin-top:15px;margin-bottom:10px;word-break:break-all} .quick-key-tab .tabItems .column>div{border:solid 1px #cfcfcf} .quick-key-tab .tabItems .column>a{text-align:center;display:block;cursor:pointer} .quick-key-tab .tabItems .column>a div.img-box{display:block;margin:0 auto;border-top-left-radius:5px;border-bottom-right-radius:5px;border:solid 1px #dddddd} .quick-key-tab .tabItems .column>a .full-screen-image{position:absolute;object-fit:scale-down} .quick-key-tab .tabItems .column>a p{display:block;margin:0 auto;background-color:#a6a6a6;border:solid 1px #999999;border-top-left-radius:5px;border-bottom-right-radius:5px;color:#fff} .quick-key-tab .tabItems .column>a small{font-size:11px;display:block;margin:5px 0 0} .quick-key-tab .tabItems .column .ion-icon{font-size:75px;margin:10px} .quick-key-tab .col-md-3.column.add{cursor:pointer} .quick-key-tab .col-md-3.column.add i{margin-top:10px} .quick-key-tab ::-webkit-scrollbar{width:3px} .quick-key-tab ::-webkit-scrollbar-track{box-shadow:inset 0 0 5px #bfd2da} .quick-key-tab ::-webkit-scrollbar-thumb{background:#c4c4c4;border-radius:10px} .quick-key-tab .subquicKey{background:linear-gradient(to bottom,#fff,#eee);color:gray;border-radius:6px} .quick-key-tab .no-quick-key{background-image:url(https://cdn.dealpos.xyz/web-image/no-quick-key.png)!important;background-repeat:no-repeat;height:calc(100vh - 70px);background-size:contain}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{background-color:#479ccf;padding:15px 25px;color:#fff;text-decoration:none;width:240px;display:block;opacity:.85;border-radius:6px}a#LinkConfigureQuickkey[_ngcontent-%COMP%]{position:absolute;top:200px;left:calc(50% - 120px)}a#LinkConfigureQuickkey[_ngcontent-%COMP%]:hover{opacity:.95}a#LinkConfigureQuickkey[_ngcontent-%COMP%] Strong[_ngcontent-%COMP%]{border-bottom:1px solid white;font-size:14px;margin:0 0 10px;padding:0 0 3px;display:block}a#LinkConfigureQuickkey[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:inline-block;height:35px;margin:0 10px 0 0;font-size:28px}a#LinkConfigureQuickkey[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-block;font-size:14px;width:135px;vertical-align:top}"]})};var pt=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],features:[I([{provide:fe,useClass:fe}])]})}return t})(),ye=new T("cdk-menu"),y=(function(t){return t[t.nextItem=0]="nextItem",t[t.previousItem=1]="previousItem",t[t.currentItem=2]="currentItem",t})(y||{}),g=new T("cdk-menu-stack"),Kt={provide:g,deps:[[new $,new X,new Z(g)]],useFactory:t=>t||new be},Bt=t=>({provide:g,deps:[[new $,new X,new Z(g)]],useFactory:s=>s||be.inline(t)}),be=(()=>{class t{id=o(le).getId("cdk-menu-stack-");_elements=[];_close=new _;_empty=new _;_hasFocus=new _;closed=this._close;hasFocus=this._hasFocus.pipe(w(!1),Te(0),De());emptied=this._empty;_inlineMenuOrientation=null;static inline(e){let i=new t;return i._inlineMenuOrientation=e,i}push(e){this._elements.push(e)}close(e,i){let{focusNextOnEmpty:n,focusParentTrigger:r}=x({},i);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:r});while(a!==e);this.isEmpty()&&this._empty.next(n)}}closeSubMenuOf(e){let i=!1;if(this._elements.indexOf(e)>=0)for(i=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return i}closeAll(e){let{focusNextOnEmpty:i,focusParentTrigger:n}=x({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let r=this._elements.pop();r&&this._close.next({item:r,focusParentTrigger:n})}this._empty.next(i)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=G({token:t,factory:t.\u0275fac})}return t})(),W=new T("cdk-menu-trigger"),Nt=new T("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let t=o(S);return()=>Je(t)}}),ht=(()=>{class t{static _openMenuTrigger;update(e){t._openMenuTrigger!==e&&(t._openMenuTrigger?.close(),t._openMenuTrigger=e)}static \u0275fac=function(i){return new(i||t)};static \u0275prov=G({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ft=(()=>{class t{injector=o(S);viewContainerRef=o(Be);menuStack=o(g);menuScrollStrategy=o(Nt);menuPosition;opened=new b;closed=new b;menuTemplateRef;menuData;overlayRef=null;destroyed=new _;stopOutsideClicksListener=q(this.closed,this.destroyed);childMenu;_menuPortal;_childMenuInjector;ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Xe(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let i=e;i;i=i?.parentElement??null)if(i.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||S.create({providers:[{provide:W,useValue:this},{provide:g,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,hostVars:2,hostBindings:function(i,n){i&2&&D("aria-controls",n.childMenu==null?null:n.childMenu.id)("data-cdk-menu-stack-id",n.menuStack.id)}})}return t})();var Me=new T("cdk-menu-aim");function _t(t,s){if(!s.isTrusted)return!1;let e=t.nativeElement,i=s.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?i===13||i===32:e.nodeName==="A"?i===13:!1}var qt=(()=>{class t extends ft{_elementRef=o(H);_ngZone=o(Q);_changeDetectorRef=o(re);_inputModalityDetector=o(ue);_directionality=o(N,{optional:!0});_renderer=o(L);_injector=o(S);_cleanupMouseenter;_menuTracker=o(ht);_parentMenu=o(ye,{optional:!0});_menuAim=o(Me,{optional:!0});constructor(){super(),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){this._parentMenu||this._menuTracker.update(this),!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||he(this._injector,this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}ngOnChanges(e){e.menuPosition&&this.overlayRef&&this.overlayRef.updatePositionStrategy(this._getOverlayPositionStrategy())}ngOnDestroy(){this._cleanupMouseenter(),super.ngOnDestroy()}_toggleOnKeydown(e){let i=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!h(e)&&!_t(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:h(e)||this._parentMenu&&i&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:h(e)||this._parentMenu&&i&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:h(e)||i||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._cleanupMouseenter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{if(this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()){let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()}}))}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new de({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return me(this._injector,this._elementRef).withLockedPosition().withFlexibleDimensions(!1).withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?pe:et)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(m(this.stopOutsideClicksListener)).subscribe(e=>{let i=ce(e),n=this._elementRef.nativeElement;i!==n&&!n.contains(i)&&(this.isElementInsideMenuStack(i)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(m(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(i,n){i&1&&p("focusin",function(){return n._setHasFocus(!0)})("focusout",function(){return n._setHasFocus(!1)})("keydown",function(a){return n._toggleOnKeydown(a)})("click",function(){return n._handleClick()}),i&2&&D("aria-haspopup",n.menuTemplateRef?"menu":null)("aria-expanded",n.menuTemplateRef==null?null:n.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],features:[I([{provide:W,useExisting:t},Kt]),P,Re]})}return t})(),Ht=(()=>{class t{_dir=o(N,{optional:!0});_elementRef=o(H);_ngZone=o(Q);_inputModalityDetector=o(ue);_renderer=o(L);_cleanupMouseEnter;_menuAim=o(Me,{optional:!0});_menuStack=o(g);_parentMenu=o(ye,{optional:!0});_menuTrigger=o(qt,{optional:!0,self:!0});disabled=!1;typeaheadLabel;triggered=new b;get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}_tabindex=-1;closeOnSpacebarTrigger=!0;destroyed=new _;constructor(){this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this._cleanupMouseEnter?.(),this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:i}=x({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),i||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_handleClick(e){this.disabled?(e.preventDefault(),e.stopPropagation()):this.trigger()}_onKeydown(e){switch(e.keyCode){case 32:case 13:if(!h(e)&&!_t(this._elementRef,e)){let i=this._elementRef.nativeElement.nodeName;i!=="A"&&i!=="BUTTON"&&e.preventDefault(),this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger})}break;case 39:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:h(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let i=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(i,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?y.previousItem:y.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:y.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._cleanupMouseEnter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu&&(this._menuAim?this._menuAim.toggle(e):e())}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:4,hostBindings:function(i,n){i&1&&p("blur",function(){return n._resetTabIndex()})("focus",function(){return n._setTabIndex()})("click",function(a){return n._handleClick(a)})("keydown",function(a){return n._onKeydown(a)}),i&2&&(ie("tabIndex",n._tabindex),D("aria-disabled",n.disabled||null),ne("cdk-menu-item-disabled",n.disabled))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",ae],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"]})}return t})(),ke=class{_renderer;_items;_eventCleanups;_itemsSubscription;entered=new _;exited=new _;activeElement;previousElement;constructor(s,e){this._renderer=s,this._items=e,this._bindEvents(),this.entered.subscribe(i=>this.activeElement=i),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._cleanupEvents(),this._itemsSubscription?.unsubscribe()}_bindEvents(){this._itemsSubscription=this._items.changes.pipe(w(this._items)).subscribe(()=>{this._cleanupEvents(),this._eventCleanups=[],this._items.forEach(s=>{let e=s._elementRef.nativeElement;this._eventCleanups.push(this._renderer.listen(e,"mouseenter",()=>{this.entered.next(s)}),this._renderer.listen(e,"mouseout",()=>{this.exited.next(s)}))})})}_cleanupEvents(){this._eventCleanups?.forEach(s=>s()),this._eventCleanups=void 0}},Qt=(()=>{class t extends pt{_focusMonitor=o(Ze);ngZone=o(Q);_renderer=o(L);nativeElement=o(H).nativeElement;menuStack=o(g);menuAim=o(Me,{optional:!0,self:!0});dir=o(N,{optional:!0});_allItems;id=o(le).getId("cdk-menu-");items=new Ke;orientation="vertical";isInline=!1;keyManager;destroyed=new _;triggerItem;pointerTracker;_menuStackHasFocus=Pe(!1);_tabIndexSignal=Ue(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null});ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setItems(),this._setKeyManager(),this._handleFocus(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.nativeElement),this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}setActiveMenuItem(e){this.keyManager?.setActiveItem(e)}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,i){let{focusParentTrigger:n}=x({},i),r=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),n&&(a?r.setActiveItem(a):r.setFirstItemActive()))}_setItems(){this._allItems.changes.pipe(w(this._allItems),m(this.destroyed)).subscribe(e=>{this.items.reset(e.filter(i=>i._parentMenu===this)),this.items.notifyOnChanges()})}_setKeyManager(){this.keyManager=new $e(this.items).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=q(this.items.changes,this.destroyed);this.items.changes.pipe(w(this.items),ve(i=>i.filter(n=>n.hasMenu).map(n=>n.getMenuTrigger().opened.pipe(Se(n),m(e)))),Ie(),Oe(i=>(this.triggerItem=i,i.getMenuTrigger().closed)),m(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e,focusParentTrigger:i})=>this.closeOpenMenu(e,{focusParentTrigger:i}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(m(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new ke(this._renderer,this.items)}),this.menuAim.initialize(this,this.pointerTracker))}_handleFocus(){this._focusMonitor.monitor(this.nativeElement,!1).pipe(m(this.destroyed)).subscribe(e=>{e!==null&&e!=="mouse"&&this.focusFirstItem(e)})}static \u0275fac=(()=>{let e;return function(n){return(e||(e=Ae(t)))(n||t)}})();static \u0275dir=k({type:t,contentQueries:function(i,n,r){if(i&1&&He(r,Ht,5),i&2){let a;Qe(a=Le())&&(n._allItems=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(i,n){i&1&&p("focusin",function(){return n.menuStack.setHasFocus(!0)})("focusout",function(){return n.menuStack.setHasFocus(!1)}),i&2&&(ie("tabIndex",n._getTabIndex())("id",n.id),D("aria-orientation",n.orientation)("data-cdk-menu-stack-id",n.menuStack.id))},inputs:{id:"id"},features:[P]})}return t})(),Ti=(()=>{class t extends Qt{_parentTrigger=o(W,{optional:!0});closed=new b;orientation="vertical";isInline=!this._parentTrigger;constructor(){super(),this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let i=this.keyManager;switch(e.keyCode){case 37:case 39:h(e)||(e.preventDefault(),i.setFocusOrigin("keyboard"),i.onKeydown(e));break;case 27:h(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:y.currentItem,focusParentTrigger:!0}));break;case 9:h(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:i.onKeydown(e)}}_toggleMenuFocus(e){let i=this.keyManager;switch(e){case y.nextItem:i.setFocusOrigin("keyboard"),i.setNextItemActive();break;case y.previousItem:i.setFocusOrigin("keyboard"),i.setPreviousItemActive();break;case y.currentItem:i.activeItem&&(i.setFocusOrigin("keyboard"),i.setActiveItem(i.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(m(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(i,n){i&1&&p("keydown",function(a){return n._handleKeyEvent(a)}),i&2&&ne("cdk-menu-inline",n.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],features:[I([{provide:pt,useExisting:t},{provide:ye,useExisting:t},Bt("vertical")]),P]})}return t})();var Lt=pe.map(t=>{let s=t.overlayX==="start"?2:-2,e=t.overlayY==="top"?2:-2;return Ce(x({},t),{offsetX:s,offsetY:e})}),Si=(()=>{class t extends ft{_injector=o(S);_directionality=o(N,{optional:!0});_menuTracker=o(ht);_changeDetectorRef=o(re);disabled=!1;constructor(){super(),this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._menuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new de({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return me(this._injector,e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??Lt)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(m(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this.childMenu=void 0,this._changeDetectorRef.markForCheck())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let i=this.overlayRef.outsidePointerEvents();if(e){let[n,r]=xe(i,({type:a})=>a==="auxclick");i=q(r.pipe(we((a,kt)=>e.ctrlKey&&kt===0&&a.ctrlKey)),n.pipe(Ee(1)))}i.pipe(m(this.stopOutsideClicksListener)).subscribe(n=>{this.isElementInsideMenuStack(ce(n))||this.menuStack.closeAll()})}}_open(e,i){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(i),this.overlayRef.updatePosition()):this.overlayRef=he(this._injector,this._getOverlayConfig(i)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static \u0275fac=function(i){return new(i||t)};static \u0275dir=k({type:t,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(i,n){i&1&&p("contextmenu",function(a){return n._openOnContextMenu(a)}),i&2&&D("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",ae]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],features:[I([{provide:W,useExisting:t},{provide:g,useClass:be}]),P]})}return t})();var Di=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=Ne({type:t});static \u0275inj=Fe({imports:[tt]})}return t})();var gt=class t{icon="";label="";truncate=!1;static \u0275fac=function(e){return new(e||t)};static \u0275cmp=V({type:t,selectors:[["POS-dropdown-item-more-action"]],inputs:{icon:"icon",label:"label",truncate:"truncate"},decls:6,vars:3,consts:[[1,"dropdown-item","px-1"],[1,"row","g-0","d-flex","align-items-center"],[1,"col-2","px-0"],["aria-hidden","true",1,"fs-3"],[1,"col-10","pe-0","ps-4","fs-6"]],template:function(e,i){e&1&&(ee(0,"div",0)(1,"div",1)(2,"div",2),qe(3,"i",3),te(),ee(4,"div",4),f(5),te()()()),e&2&&(c(3),Ve(i.icon),c(2),Y(" ",i.label," "))},dependencies:[it],encapsulation:2})};export{ct as a,Ht as b,Ti as c,Si as d,Di as e,gt as f};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as Ai,b as Bi}from"./chunk-KI4BAWII.js";import{a as dt}from"./chunk-F652VZDD.js";import{a as Oi}from"./chunk-DPGY5YXC.js";import{a as at,b as mi}from"./chunk-I5W4NCFM.js";import"./chunk-MVUVDYGQ.js";import{b as Ni,c as Vi}from"./chunk-ZRYRGDGM.js";import{a as ki,b as Fi}from"./chunk-7NOKG3UC.js";import{a as ot}from"./chunk-6UMKFILJ.js";import{a as Ci}from"./chunk-HL3ONSX6.js";import{a as _i}from"./chunk-XA4TVPAS.js";import{d as Fe,e as Ii}from"./chunk-QPOOLLKY.js";import"./chunk-CSFFF2YO.js";import"./chunk-3RK6DDJD.js";import"./chunk-WNZKCNMC.js";import"./chunk-LOD3JYZW.js";import"./chunk-3KSZCJ6T.js";import"./chunk-6GLKD66N.js";import"./chunk-CBSYYTXQ.js";import{d as Mi,e as wi}from"./chunk-GN3HVOCN.js";import"./chunk-G4IW5GPY.js";import{a as Ei,b as Pi}from"./chunk-I3ABVEQL.js";import{a as ke}from"./chunk-JNORDOWT.js";import"./chunk-G5VELV3S.js";import{a as Ti,b as Di}from"./chunk-QFON23YX.js";import{e as X,f as yi}from"./chunk-PKS7H624.js";import"./chunk-JEL3OND6.js";import"./chunk-VYQEM4T2.js";import"./chunk-UTAQ3FRE.js";import"./chunk-M43HNBJQ.js";import{a as ui,c as fi}from"./chunk-KKLNFVVN.js";import"./chunk-534MIVWD.js";import"./chunk-4U2TXFUV.js";import{a as pi,b as re}from"./chunk-XNJ2P2ZO.js";import"./chunk-CS6HBROS.js";import"./chunk-JUS6LLVX.js";import{F as Si,G as vi,u as Q,v as Y,w as rt}from"./chunk-BA3BDB5Y.js";import{b as Ce,c as ci}from"./chunk-C4WJKF7R.js";import{F as st,N as xi,g as lt,o as bi,s as gi,u as hi}from"./chunk-T25N3EEG.js";import{d as ve}from"./chunk-7TBS7SPQ.js";import{a as oi}from"./chunk-RLQLFW36.js";import"./chunk-EQLHPWVB.js";import{e as z,f as ie,g as J}from"./chunk-A45GTZVV.js";import"./chunk-NWSIPELM.js";import"./chunk-6SGN7MNX.js";import"./chunk-L76WVZW6.js";import{a as F}from"./chunk-2FWFPV5I.js";import"./chunk-O5SLP4JK.js";import{A as Oe,C as li,D as tt,E as si,F as it,G as di,c as Z,e as At,h as B,i as xe,k as Ie,o as j,p as Se,t as ai,w as ri}from"./chunk-RNLSEEMX.js";import"./chunk-BVZ7ACQM.js";import"./chunk-7KAETFNH.js";import{a as W,d as nt}from"./chunk-USJ6ILEE.js";import{a as je}from"./chunk-FSBKLNRT.js";import{$d as Vt,Ab as V,Bb as A,Bc as b,Cb as u,Cc as y,Db as i,Dc as I,E as de,Eb as t,Ec as Ee,Ed as ni,Fb as h,Hc as Jt,Lc as Xt,Mb as v,N as Gt,Ob as g,Pc as ei,Qa as G,Qb as d,Sa as ge,Wd as et,Xa as s,Y as Ze,Yd as he,Za as qe,Zd as Pe,_b as te,aa as ee,ac as Qe,bc as Ye,be as L,c as We,cc as fe,cd as Xe,d as Ut,da as qt,db as f,dc as o,e as Ue,ec as x,ee as E,fa as $e,fc as S,gc as De,hb as M,hc as Nt,ib as ze,ic as w,jc as T,kc as D,kd as ti,la as ue,lb as ae,ma as Ge,md as U,nb as Qt,o as Zt,oa as oe,oc as Le,od as _e,pa as we,pc as Yt,rd as ii,sc as Kt,t as se,ta as _,tc as Ke,ua as C,uc as R,vb as m,vc as Je,x as $t,xb as p,ya as zt,zb as N}from"./chunk-JYZTRN6N.js";import"./chunk-WFMAM73Y.js";import{a as Ht,b as Wt}from"./chunk-SNAKHGZS.js";function Bt(n){if(n instanceof Int8Array||n instanceof Uint8Array||n instanceof Uint8ClampedArray)return new DataView(n.buffer,n.byteOffset,n.byteLength);if(n instanceof ArrayBuffer)return new DataView(n);throw new TypeError("Expected `data` to be an ArrayBuffer, Buffer, Int8Array, Uint8Array or Uint8ClampedArray")}var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",Gi="0123456789ABCDEFGHIJKLMNOPQRSTUV",qi="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function Rt(n,l,e){e=e||{};let a,r;switch(l){case"RFC3548":case"RFC4648":a=$i,r=!0;break;case"RFC4648-HEX":a=Gi,r=!0;break;case"Crockford":a=qi,r=!1;break;default:throw new Error("Unknown base32 variant: "+l)}let c=e.padding!==void 0?e.padding:r,P=Bt(n),q=0,O=0,pe="";for(let Re=0;Re<P.byteLength;Re++)for(O=O<<8|P.getUint8(Re),q+=8;q>=5;)pe+=a[O>>>q-5&31],q-=5;if(q>0&&(pe+=a[O<<5-q&31]),c)for(;pe.length%8!==0;)pe+="=";return pe}var ct=class n{constructor(l){this.dialogRef=l}config;ngOnInit(){this.config=new Q,this.config.okText="Disable Two Factor Authentication",this.config.customWidth="500px",this.config.title="DIsabled Two Factor Authentication",this.config.headerType=F.Warning}onOk(){this.dialogRef.close(!0)}static \u0275fac=function(e){return new(e||n)(f(z))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirmation-disabled"]],standalone:!1,decls:5,vars:1,consts:[[3,"onOk","onCancel","onClose","config"],[1,"row","px-10","py-4"],[1,"font-weight-normal","h4","text-left","lh-base"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"p",2),o(4,"Are you sure you want to disable two factor authentication for your account? "),t()()()()),e&2&&u("config",a.config)},dependencies:[Y],encapsulation:2})};function Qi(n,l){if(n&1){let e=v();i(0,"div")(1,"div",1),o(2," Two Factor Authentication Status: "),i(3,"span",2),o(4,"Enabled"),t()()(),i(5,"div",3)(6,"button",4),g("click",function(){_(e);let r=d();return C(r.onDisableTotp())}),o(7,"Disable Two Factor Authentication"),t()()}}function Yi(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"h4"),o(3,"Connect Your DealPOS account to an Authenticator Application"),t(),i(4,"p"),o(5,"Secure your login with One Time Password using an Authenticator Application!"),t()()(),i(6,"div",5)(7,"div",6)(8,"ol",7)(9,"li",8)(10,"h5"),o(11,"Download Authenticator application"),t(),i(12,"div",9)(13,"a",10),h(14,"img",11),o(15," Microsoft Authenticator "),t(),i(16,"a",12),h(17,"img",13),o(18," Google Authenticator "),t()()(),i(19,"li",14)(20,"h5"),o(21,"Scan the QR code below"),t(),i(22,"div",3),h(23,"qr-code",15),t()(),i(24,"li",14)(25,"h5"),o(26,"Validate your QR Code"),t(),i(27,"form",16),g("submit",function(){_(e);let r=d();return C(r.onValidate())}),i(28,"div")(29,"input",17),g("keypress",function(r){_(e);let c=d();return C(c.numberOnly(r))}),D("ngModelChange",function(r){_(e);let c=d();return T(c.validation2FA.ValidationCode,r)||(c.validation2FA.ValidationCode=r),C(r)}),t()(),i(30,"div",3)(31,"button",18),o(32,"Validate"),t()()()()()()()}if(n&2){let e=d();s(23),u("value",e.qrcodeContent)("size",265),s(6),w("ngModel",e.validation2FA.ValidationCode)}}var mt=class n{constructor(l,e,a,r){this.document=l;this.authenticatorService=e;this.toastrService=a;this.dialog=r;this.destroy$=new Ut}qrcodeContent;validation2FA={SecretKey:null,ValidationCode:null,Enabled:!0};destroy$;totpEnabled;ngOnInit(){this.generateQrCodeContent()}generateQrCodeContent(){let l=this.getDomainName(),e=this.generateRandomSecret();this.validation2FA.SecretKey=e;var a=W.parseJwt(localStorage.getItem("Token"));let r=a.LID;this.qrcodeContent=`otpauth://totp/${r}?secret=${e}&issuer=${l}`}generateRandomSecret(){let l=W.Guid_NewGuid(),e=new TextEncoder().encode(l);return Rt(e,"RFC3548")}getDomainName(){return this.document.location.origin.replace(/^https?:\/\//,"")}onValidate(){this.validateOnVerfiyCode()&&this.authenticatorService.configure2FA(this.validation2FA).pipe(qt(this.destroy$)).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Enabled"),this.totpEnabled=!0})}validateOnVerfiyCode(){let l=!0;return W.IsEmpty(this.validation2FA.ValidationCode)?(l=!1,this.toastrService.warning("You must enter a authentication code.","Warning")):(this.validation2FA.ValidationCode.length<6||this.validation2FA.ValidationCode.length>6)&&(l=!1,this.toastrService.warning("The authentication code must be six digits long.","Warning")),l}numberOnly(l){return W.numberOnly(l)}onDisableTotp(){this.dialog.open(ct).afterClosed().pipe(de(l=>W.IsNotEmpty(l)),ee(()=>this.authenticatorService.disableTwoFactorAuthentication())).subscribe(l=>{this.toastrService.success(l.Message,"TOTP Disabled"),this.totpEnabled=!1})}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static \u0275fac=function(e){return new(e||n)(f(zt),f(ot),f(L),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-setup-2FA"]],inputs:{totpEnabled:"totpEnabled"},standalone:!1,decls:3,vars:1,consts:[[1,"container-fluid","mt-6"],[1,"d-inline-block","fs-5"],[1,"text-success","fw-bold"],[1,"mt-6"],["type","button","type","submit",1,"btn","btn-sm","btn-danger",3,"click"],[1,"row"],[1,"col-12"],[1,"ps-7"],[1,"fw-bold"],[1,"d-flex","align-items-center","mt-6"],["href","https://play.google.com/store/apps/details?id=com.azure.authenticator","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Microsoft_Authenticator.png",2,"width","35px"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2","target","_blank",1,"link-dark","border","py-3","px-6","me-6","border-primary","border-2"],["src","https://cdn.dealpos.xyz/web-image/Google_Authenticator.png",2,"width","35px"],[1,"fw-bold","mt-6"],["errorCorrectionLevel","H",1,"qr2fa",3,"value","size"],[1,"mt-6",3,"submit"],["type","text","name","auth","placeholder","Enter six Digit Code",1,"form-control","rounded","totpCustomStyle","border","border-2","border-primary",3,"keypress","ngModelChange","ngModel"],["type","button","type","submit",1,"btn","btn-sm","btn-primary","py-3"]],template:function(e,a){e&1&&(i(0,"div",0),m(1,Qi,8,0)(2,Yi,33,3),t()),e&2&&(s(),p(a.totpEnabled?1:2))},dependencies:[Se,Z,B,xe,j,Ie,ki],styles:[`.totpCustomStyle{height:3.625rem;padding:.75rem!important;color:#343434;font-size:.875rem;border-radius:.25rem!important;width:370px}qr-code.qr2fa>canvas{border:2px solid rgb(51,122,183);padding:2px}
|
|
2
|
+
`],encapsulation:2})};var Lt=n=>({active:n}),Ri=n=>({"ng-invalid ng-dirty":n}),Xi=(n,l)=>({border:n,"border-danger":l}),en=n=>({"border-top-0":n});function tn(n,l){if(n&1){let e=v();i(0,"button",64),g("click",function(){_(e);let r=d(3);return C(r.validate())}),o(1," Submit "),t()}if(n&2){d(2);let e=te(36);u("disabled",e==null||e.form==null?null:e.form.invalid)}}function nn(n,l){if(n&1&&m(0,tn,2,1,"button",63),n&2){let e=d(2);p(e.roleService.users.View||e.roleService.profile.View?0:-1)}}function on(n,l){n&1&&(i(0,"small",67),o(1,"*Email is required"),t())}function an(n,l){n&1&&(i(0,"small",67),o(1,"*Enter a valid email address"),t())}function rn(n,l){if(n&1&&(m(0,on,2,0,"small",67),m(1,an,2,0,"small",67)),n&2){d();let e=te(2);p(e.errors!=null&&e.errors.required?0:-1),s(),p(e.errors!=null&&e.errors.pattern?1:-1)}}function ln(n,l){if(n&1){let e=v();i(0,"div",22)(1,"input",65,3),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Email,r)||(c.formData.Email=r),C(r)}),t(),i(3,"label",66),o(4,"Email"),t(),m(5,rn,2,2),t()}if(n&2){let e=te(2),a=d(2);s(),fe(Je(5,Xi,e.touched&&e.invalid,e.touched&&e.invalid)),w("ngModel",a.formData.Email),u("disabled",!(a.roleService.users.View||a.roleService.profile.View)),s(4),p(e.touched?5:-1)}}function sn(n,l){n&1&&(i(0,"small",67),o(1,"*Enter a valid email address"),t())}function dn(n,l){if(n&1&&m(0,sn,2,0,"small",67),n&2){d();let e=te(2);p(e.errors!=null&&e.errors.pattern?0:-1)}}function cn(n,l){if(n&1){let e=v();i(0,"div",22)(1,"input",68,3),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Email,r)||(c.formData.Email=r),C(r)}),t(),i(3,"label",66),o(4,"Email"),t(),m(5,dn,1,1),t()}if(n&2){let e=te(2),a=d(2);s(),u("disabled",!(a.roleService.users.View||a.roleService.profile.View)),w("ngModel",a.formData.Email),s(4),p(e.touched?5:-1)}}function mn(n,l){n&1&&(i(0,"i",32),o(1," Password is required. "),t())}function pn(n,l){n&1&&(i(0,"i",32),o(1," These passwords don't match."),t())}function un(n,l){if(n&1&&(i(0,"ul",40)(1,"li",69),o(2),t()()),n&2){let e=l.$implicit;s(2),x(e)}}function fn(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1),s(2),x(e.Key),s(2),x(e.Value)}}function _n(n,l){if(n&1&&(i(0,"ul",40)(1,"li",69),o(2),t()()),n&2){let e=l.$implicit;s(2),x(e)}}function Cn(n,l){if(n&1&&(i(0,"tr")(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td"),o(6),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1),s(2),x(e.Key),s(2),x(e.Value)}}function bn(n,l){if(n&1&&(i(0,"div",71)(1,"div",72),o(2),t()()),n&2){let e=l.$implicit,a=l.$index;s(),fe(R(3,en,a/4>=1)),s(),S(" ",e.Model," ")}}function gn(n,l){if(n&1&&(i(0,"div",47)(1,"div",70),o(2),t(),i(3,"div",39)(4,"div",17),V(5,bn,3,5,"div",71,N),t()()()),n&2){let e=l.$implicit;s(2),S(" ",e.Name," "),s(3),A(e.ListRole)}}function hn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(3);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(3);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientID)}}function xn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(3);return C(r.preview("Profile/GenerateClientID"))}),o(1,"Generate"),t()}}function Sn(n,l){if(n&1&&(i(0,"div",18)(1,"div",57),h(2,"input",58),t()()),n&2){let e=d(3);s(2),u("value",e.formData.ClientSecret)}}function vn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(3);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(3);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.ClientSecret)}}function yn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(3);return C(r.preview("Profile/GenerateClientSecret"))}),o(1,"Generate"),t()}}function Mn(n,l){if(n&1&&(i(0,"div",54)(1,"h3"),o(2,"API Client ID"),t(),i(3,"small",73),o(4,"(developer.dealpos.com)"),t()(),i(5,"div",56)(6,"div",18)(7,"div",57),h(8,"input",58),t()(),i(9,"div",18)(10,"div",22),m(11,hn,2,2,"button",59),m(12,xn,2,0,"a",60),t()()(),i(13,"div",54)(14,"h3"),o(15,"API Client Secret"),t(),i(16,"small",73),o(17,"(developer.dealpos.com)"),t()(),i(18,"div",56),m(19,Sn,3,1,"div",18),i(20,"div",18)(21,"div",22),m(22,vn,2,2,"button",59),m(23,yn,2,0,"a",60),t()()()),n&2){let e=d(2);s(8),u("value",e.formData.ClientID),s(3),p(e.formData.ClientID?11:-1),s(),p(e.roleService.users.View||e.roleService.profile.View?12:-1),s(7),p(e.formData.ClientSecret?19:-1),s(3),p(e.formData.ClientSecret?22:-1),s(),p(e.roleService.users.View||e.roleService.profile.View?23:-1)}}function wn(n,l){n&1&&(i(0,"div",49)(1,"h4"),o(2," You have no access to view this info, please contact your administrator to view this tab information "),t()())}function Tn(n,l){if(n&1){let e=v();i(0,"button",74),g("click",function(){_(e);let r=d(2);return C(r.copyToClipboard())}),o(1," Copy to Clipboard "),t()}if(n&2){let e=d(2);u("matTooltip",e.tooltipText)("cdkCopyToClipboard",e.formData.OTTUrl)}}function Dn(n,l){if(n&1){let e=v();i(0,"a",75),g("click",function(){_(e);let r=d(2);return C(r.generateOTT("Profile/GenerateOneTimeToken"))}),o(1,"Generate"),t()}}function En(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",4)(1,"actions"),m(2,nn,1,1),t(),i(3,"content")(4,"div",5)(5,"div")(6,"ul",6)(7,"li",7)(8,"a",8),g("click",function(){_(e);let r=d();return C(r.onSelectTab("GENERAL"))}),o(9,"General"),t()(),i(10,"li",7)(11,"a",9),g("click",function(){_(e);let r=d();return C(r.onSelectTab("SECURITY"))}),o(12,"Outlet Access"),t()(),i(13,"li",7)(14,"a",10),g("click",function(){_(e);let r=d();return C(r.onSelectTab("ROLES"))}),o(15,"Roles"),t()(),i(16,"li",7)(17,"a",11),g("click",function(){_(e);let r=d();return C(r.onSelectTab("API"))}),o(18,"Developer API"),t()(),i(19,"li",7)(20,"a",12),g("click",function(){_(e);let r=d();return C(r.onSelectTab("TOTP"))}),o(21,"TOTP"),t()(),i(22,"li",7)(23,"a",13),g("click",function(){_(e);let r=d();return C(r.onSelectTab("OTT"))}),o(24,"One Time Token"),t()()(),i(25,"div",14)(26,"div",15)(27,"div",16)(28,"div",17)(29,"div",18)(30,"div",19)(31,"div",20)(32,"h2"),o(33,"General Credential"),t()(),i(34,"div",21)(35,"form",null,0)(37,"div",22)(38,"input",23),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.FirstName,r)||(c.formData.FirstName=r),C(r)}),t(),i(39,"label",24),o(40,"First Name"),t()(),i(41,"div",22)(42,"input",25),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.LastName,r)||(c.formData.LastName=r),C(r)}),t(),i(43,"label",26),o(44,"Last Name"),t()(),i(45,"div",22)(46,"input",27),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.LoginID,r)||(c.formData.LoginID=r),C(r)}),t(),i(47,"label",28),o(48,"Username"),t()(),m(49,ln,6,8,"div",22),m(50,cn,6,3,"div",22),t()()()(),i(51,"div",18)(52,"div",19)(53,"div",20)(54,"h2"),o(55,"Change Password"),t(),i(56,"small",29),o(57,"Leave blank if you do not want to change"),t()(),i(58,"div",21)(59,"div")(60,"p-floatLabel")(61,"p-password",30,1),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.NewPassword,r)||(c.formData.NewPassword=r),C(r)}),t(),i(63,"label",31),o(64,"Password"),t()(),m(65,mn,2,0,"i",32),t(),i(66,"div",33)(67,"p-floatLabel")(68,"p-password",34,2),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.RePassword,r)||(c.formData.RePassword=r),C(r)}),t(),i(70,"label",31),o(71,"Re-Password"),t()(),m(72,pn,2,0,"i",32),t()()()()()()(),i(73,"div",35)(74,"div",36)(75,"div",37)(76,"h5",38),o(77,"Group"),t(),i(78,"i"),o(79,"Profile Groups"),t()(),i(80,"div",39)(81,"div",17),V(82,un,3,1,"ul",40,N),t()()(),i(84,"div",41)(85,"div",42)(86,"h5",38),o(87,"Outlets"),t(),i(88,"i"),o(89,"Profile Outlets"),t()(),i(90,"div",39)(91,"div",17)(92,"div")(93,"table",43)(94,"thead",44)(95,"tr")(96,"th"),o(97,"No"),t(),i(98,"th"),o(99,"Outlet"),t(),i(100,"th"),o(101,"Access"),t()()(),i(102,"tbody"),V(103,fn,7,3,"tr",null,N),t()()()()()()(),i(105,"div",45)(106,"div",36)(107,"div",37)(108,"h5",38),o(109,"Group"),t(),i(110,"i"),o(111,"Profile Groups"),t()(),i(112,"div",39)(113,"div",17),V(114,_n,3,1,"ul",40,N),t()()(),i(116,"div",41)(117,"div",42)(118,"h5",38),o(119,"Outlets"),t(),i(120,"i"),o(121,"Profile Outlets"),t()(),i(122,"div",39)(123,"div",17)(124,"div")(125,"table",43)(126,"thead",44)(127,"tr")(128,"th"),o(129,"No"),t(),i(130,"th"),o(131,"Outlet"),t(),i(132,"th"),o(133,"Access"),t()()(),i(134,"tbody"),V(135,Cn,7,3,"tr",null,N),t()()()()()()(),i(137,"div",46),V(138,gn,7,1,"div",47,N),t(),i(140,"div",48),m(141,Mn,24,6)(142,wn,3,0,"div",49),t(),i(143,"div",50),h(144,"POS-setup-2FA",51),t(),i(145,"div",52)(146,"div",47)(147,"div",53)(148,"div",54)(149,"h3"),o(150,"One Time Token"),t(),i(151,"small",55),o(152,"*Token will expire in 1 hour"),t()(),i(153,"div",56)(154,"div",18)(155,"div",57),h(156,"input",58),t()(),i(157,"div",18)(158,"div",22),m(159,Tn,2,2,"button",59),m(160,Dn,2,0,"a",60),t()(),i(161,"div",53)(162,"small",61),o(163," Please refer this "),i(164,"a",62),o(165,"article"),t(),o(166," for more information "),t()()()()()()()()()()()}if(n&2){let e=te(62),a=te(69),r=d();u("pageData",r.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p(r.activeTab=="GENERAL"?2:-1),s(6),u("ngClass",R(32,Lt,r.activeTab=="GENERAL")),s(3),u("ngClass",R(34,Lt,r.activeTab=="SECURITY")),s(15),u("ngClass",R(36,Lt,r.activeTab=="GENERAL")),s(12),w("ngModel",r.formData.FirstName),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(4),w("ngModel",r.formData.LastName),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(4),w("ngModel",r.formData.LoginID),u("disabled",!(r.roleService.users.View||r.roleService.profile.View)),s(3),p(r.data.EmailRequired?49:-1),s(),p(r.data.EmailRequired?-1:50),s(11),u("toggleMask",!0)("feedback",!1)("disabled",!(r.roleService.users.View||r.roleService.profile.View)),w("ngModel",r.formData.NewPassword),u("ngClass",R(38,Ri,e.touched&&e.invalid)),s(4),p((e.touched||a.dirty)&&e.invalid?65:-1),s(3),w("ngModel",r.formData.RePassword),u("toggleMask",!0)("feedback",!1)("disabled",!(r.roleService.users.View||r.roleService.profile.View))("ngClass",R(40,Ri,r.formData.NewPassword!=r.formData.RePassword&&(a.touched||a.dirty))),s(4),p(r.formData.NewPassword!=r.formData.RePassword&&(a.touched||a.dirty)?72:-1),s(10),A(r.data.Security.Groups),s(21),A(r.data.Security.Outlets),s(11),A(r.data.Security.Groups),s(21),A(r.data.Security.Outlets),s(3),A(r.data.Role),s(3),p(r.roleService.developer.Api?141:142),s(3),u("totpEnabled",r.totpEnabled),s(12),u("value",r.formData.OneTimeToken),s(3),p(r.formData.OneTimeToken?159:-1),s(),p(r.roleService.users.View||r.roleService.profile.View?160:-1)}}var pt=class n extends dt{constructor(e,a,r,c,P,q,O){super(e,a,"Profile/MyProfileFormInitial",r);this.toastr=c;this.dialog=P;this.authenticatorService=q;this.roleService=O}tooltipText="Copy to Clipboard";totpEnabled;activeTab="GENERAL";postBindForm(e){this.totpEnabled=e?.Form?.TOTPEnabled,this.data.Form.OTTUrl=window.location.hostname+`?OTT=${e?.Form?.OneTimeToken}`}validate(){if(this.formData.NewPassword!=this.formData.RePassword){this.toastr.error("Password and re-enter password must be equal.",F.Error);return}this.onSubmit("Profile/SubmitProfile")}onSubmitSuccess(){this.toastr.success("Your profile is successfuly updated",F.Success)}preview(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form=a},error:a=>{this.toastr.error(a,F.Error)}})}copyToClipboard(){this.tooltipText="Token has been copied to clipboard",setTimeout(()=>{this.tooltipText="Copy to Clipboard"},2e3)}onSelectTab(e){this.activeTab=e}generateOTT(e){this.httpService.post(`/API/${e}`).subscribe({next:a=>{this.data.Form.OneTimeToken=a.OneTimeToken,this.data.Form.OTTUrl="https://"+window.location.hostname+`?OTT=${this.data.Form.OneTimeToken}`},error:a=>{this.toastr.error(a,F.Error)}})}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(et),f(L),f(J),f(ot),f(nt))};static \u0275cmp=M({type:n,selectors:[["POS-my-profile"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["validation","ngForm"],["password","ngModel"],["rePassword","ngModel"],["email","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-5"],["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item","cursor"],["id","general-tab","data-bs-toggle","tab","href","#general","role","tab","aria-controls","general","aria-selected","false",1,"nav-link","active",3,"click","ngClass"],["id","security-tab","data-bs-toggle","tab","href","#security","role","tab","aria-controls","profile","aria-selected","false",1,"nav-link",3,"click","ngClass"],["id","roles-tab","data-bs-toggle","tab","href","#roles","role","tab","aria-controls","contact","aria-selected","false",1,"nav-link",3,"click"],["id","developerApi-tab","data-bs-toggle","tab","href","#developerApi","role","tab","aria-controls","developerApi","aria-selected","false",1,"nav-link",3,"click"],["id","setupAuth-tab","data-bs-toggle","tab","href","#setupAuth","role","tab","aria-controls","setupAuth","aria-selected","false",1,"nav-link",3,"click"],["id","ott-tab","data-bs-toggle","tab","href","#ott","role","tab","aria-controls","ott","aria-selected","false",1,"nav-link",3,"click"],["id","myTabContent",1,"tab-content"],["id","general","role","tab",1,"tab-pane","fade","show","active","mt-0","pt-8","border","border-top-0",3,"ngClass"],[1,"container"],[1,"row"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"form-floating-outline"],["type","text","id","inputFirstName","name","firstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputFirstName"],["type","text","id","inputLastName","name","lastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputLastName"],["type","text","id","inputName","name","userName","placeholder","Username","readonly","",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","inputName"],[1,"text-body-secondary","h6"],["required","",1,"p-change-password",3,"ngModelChange","toggleMask","feedback","disabled","ngModel","ngClass"],["for","password"],[1,"control-label","text-danger"],[1,"mt-6"],[1,"p-change-password",3,"ngModelChange","ngModel","toggleMask","feedback","disabled","ngClass"],["id","security","role","tab",1,"tab-pane","fade","show","border","border-top-0","mt-0"],[1,"border-bottom","row","pt-8","ms-3","me-3"],[1,"col-sm-2","mt-3"],[1,"fw-bold"],[1,"col-sm-10"],[1,"mb-4"],[1,"row","border-bottom","mt-10","ms-3"],[1,"col-sm-2"],[1,"table"],[1,"thead-light","sticky-top-thead"],["id","security","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],["id","roles","role","tabpanel",1,"tab-pane","panel","fade","border","border-top-0","mt-0"],[1,"row","pt-8","ms-3","me-3"],["id","developerApi","role","tab",1,"tab-pane","fade","show","border","border-top-0","p-5","mt-0"],[1,"d-flex","justify-content-center","align-items-center","p-12"],["id","setupAuth","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[3,"totpEnabled"],["id","ott","role","tab",1,"tab-pane","fade","show","p-5","mt-0","border","border-top-0"],[1,"col-12"],[1,"d-flex","align-items-center"],[1,"text-danger","ms-5"],[1,"row","d-flex","align-items-center"],[1,"form-floating-outline","bg-light-gray"],["type","text","name","api-client","readonly","",1,"form-control",3,"value"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm"],[1,"text-body-secondary","fst-italic","h6","ms-2"],["href","https://support.dealpos.com/en/articles/9890206-one-time-token","target","_blank"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"disabled"],["matTooltipPosition","above","matTooltip","Save","role","button",1,"btn","btn-success",3,"click","disabled"],["type","text","id","email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","",1,"form-control",3,"ngModelChange","ngModel","disabled"],["for","email"],[1,"text-danger"],["id","email","type","Email","name","email","placeholder","Email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$",1,"form-control",3,"ngModelChange","disabled","ngModel"],[2,"list-style","circle"],[1,"col-sm-2","border","fw-bold","p-3","text-center",2,"background-color","#f6f6f6"],[1,"col-md-3","px-0"],[1,"p-3","border","border-start-0"],[1,"text-body-secondary","h6","ms-2"],["mat-raised-button","","matTooltipPosition","above","id","btnCopyToken",1,"btn","btn-secondary","btn-sm","me-5",3,"click","matTooltip","cdkCopyToClipboard"],["role","button",1,"btn","btn-success","btn-sm",3,"click"]],template:function(a,r){a&1&&m(0,En,167,42,"mainpanel-cmp",4),a&2&&p(r.data&&r.formData?0:-1)},dependencies:[Xe,Se,Z,B,xe,Oe,tt,j,Ie,X,Ce,Ni,Ai,Ti,mt],styles:["p-password.p-change-password>div.p-password.p-component.p-inputwrapper{width:100%!important} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>input{width:100%!important;height:58px!important;padding-left:15px!important;border:1px solid #dee2e6} p-password.p-change-password>div.p-password.p-component.p-inputwrapper>eyeicon.p-element.p-icon-wrapper{margin-right:10px}"]})};var Pn=()=>["/menu/Orders/Orders/Customer_Invoice/Info"],In=n=>({ID:n});function On(n,l){if(n&1){let e=v();i(0,"div",17)(1,"h6"),o(2,"Type"),t(),i(3,"ng-select",18),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.TypeID,r)||(c.pageData.Filter.TypeID=r),C(r)}),t(),i(4,"h6"),o(5,"Customer"),t(),i(6,"autocompleteV2",19),g("onInputChange",function(r){_(e);let c=d(2);return C(c.resetCustomer(r))})("onSelect",function(r){_(e);let c=d(2);return C(c.onSelectCustomer(r))}),t(),i(7,"h6"),o(8,"From"),t(),i(9,"datepicker",20),D("dateChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t(),i(10,"h6"),o(11,"To"),t(),i(12,"datepicker",21),D("dateChange",function(r){_(e);let c=d(2);return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()}if(n&2){let e=d(2);s(3),u("items",e.pageData.Options.Types),w("ngModel",e.pageData.Filter.TypeID),s(6),w("date",e.pageData.Filter.From),s(3),w("date",e.pageData.Filter.To)}}function kn(n,l){n&1&&(i(0,"th",10),o(1," @@ Cost "),t())}function Fn(n,l){if(n&1&&(i(0,"span",29),o(1),b(2,"amountFraction"),t()),n&2){let e=d().$implicit;s(),x(" - Profit: "+y(2,1,e.Profit))}}function Nn(n,l){if(n&1&&(i(0,"small"),o(1),t()),n&2){let e=d(2).$implicit;s(),S("( ",e.Commissions[0].Quantity," unit )")}}function Vn(n,l){if(n&1&&(i(0,"i",42),o(1),m(2,Nn,2,1,"small"),t()),n&2){let e=d().$implicit;s(),S("sold by ",e.Commissions[0].SalesName," "),s(),p(e.Commissions[0].Quantity<e.Quantity?2:-1)}}function An(n,l){if(n&1&&(i(0,"li")(1,"i"),o(2),t()()),n&2){let e=l.$implicit;s(2),S("( ",e.Quantity+" unit by "+e.SalesName," )")}}function Bn(n,l){if(n&1&&(i(0,"ul",43)(1,"li")(2,"i"),o(3,"sold by"),t()(),V(4,An,3,1,"li",null,N),t()),n&2){let e=d().$implicit;s(4),A(e.Commissions)}}function Rn(n,l){if(n&1&&(i(0,"th",48),o(1),b(2,"amountFraction"),t()),n&2){let e=d().$implicit;s(),S(" ",y(2,1,e.UnitCost)," ")}}function Ln(n,l){if(n&1&&(i(0,"tr",37)(1,"th",39)(2,"div",40)(3,"span",41),o(4),t(),m(5,Vn,3,2,"i",42),m(6,Bn,6,0,"ul",43),h(7,"span",44),b(8,"newlines"),t()(),i(9,"th",45),o(10),t(),i(11,"th",46),o(12),b(13,"quantityFraction"),t(),i(14,"th",47),o(15),t(),m(16,Rn,3,3,"th",48),i(17,"th",49),o(18),b(19,"amountFraction"),t(),i(20,"th",50),o(21),t(),i(22,"th",51),o(23),b(24,"amountFraction"),t()()),n&2){let e=l.$implicit,a=d(3);s(4),x(e.Name),s(),p(e.Commissions.length==1?5:-1),s(),p(e.Commissions.length>1?6:-1),s(),u("innerHTML",y(8,11,e.Note),G),s(3),S(" ",e.Code," "),s(2),S(" ",y(13,13,e.Quantity)," "),s(3),S(" ",e.UOMName," "),s(),p(a.roleService.product.Cost?16:-1),s(2),S(" ",y(19,15,e.UnitPrice)," "),s(3),S(" ",e.Discount==0?"":e.Discount+"%"," "),s(2),S(" ",y(24,17,e.Total)," ")}}function jn(n,l){if(n&1&&(i(0,"tr")(1,"th",52),o(2),t(),i(3,"th",53),o(4),t(),i(5,"th",54),o(6),b(7,"amountFraction"),t()()),n&2){let e=l.$implicit;s(2),S("",e.Label," :"),s(2),S(" ",e.CurrencySymbol," "),s(2),S(" ",y(7,3,e.Amount)," ")}}function Hn(n,l){if(n&1&&(i(0,"div")(1,"div",22)(2,"div",23)(3,"a",24),h(4,"span",25),b(5,"date"),h(6,"small",26),b(7,"date"),t(),i(8,"span"),o(9),b(10,"showIfNotNullOrEmptyString"),t(),h(11,"span",27),i(12,"strong",28),o(13),b(14,"sum"),i(15,"span"),o(16),b(17,"showIfNotNullOrEmptyString"),t()(),m(18,Fn,3,3,"span",29),i(19,"i",30),o(20),t(),i(21,"span",31),o(22),t(),i(23,"span",32),o(24),t()(),i(25,"div",33),h(26,"label",34),t()(),i(27,"table",35)(28,"tbody",36),V(29,Ln,25,19,"tr",37,N),t()(),i(31,"table",38),V(32,jn,8,5,"tr",null,N),t()()),n&2){let e=l.$implicit,a=d(2);s(3),u("routerLink",Ke(27,Pn))("queryParams",R(28,In,e.ID)),s(),u("innerHTML",e.EntityName+" #"+e.Number+" - "+I(5,12,e.Date,"dd MMM yyyy"),G),s(2),u("innerHTML","("+I(7,15,e.Created,"HH:mm")+")",G),s(3),x(I(10,18,e.CustomerNameDisplay," - {0}")),s(4),S(" ","[Q: "+I(14,21,e.Items,"Quantity")+"]"," "),s(3),x(I(17,24,e.SalesName," - Sales: {0}")),s(2),p(a.roleService.report.Profit?18:-1),s(2),x(e.DeliveryOutlet==null?"":": Delivered from "+e.DeliveryOutlet),s(2),x(e.PromotionCoupon==null?"":": "+e.PromotionCoupon),s(2),x(e.SONote==null?"":": "+e.SONote),s(2),u("innerHTML",e.PaymentStateLabel,G),s(3),A(e.Items),s(3),A(e.Aggregate)}}function Wn(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",2),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"filters"),Qt(2,On,13,4,"ng-template",null,0,Jt),t(),i(4,"content")(5,"div",3)(6,"table",4)(7,"thead",5)(8,"tr")(9,"th",6),o(10,"Name"),t(),i(11,"th",7),o(12,"Code"),t(),i(13,"th",8),o(14,"Qty"),t(),i(15,"th",9),o(16,"UOM"),t(),m(17,kn,2,0,"th",10),i(18,"th",11),o(19,"@@ Price"),t(),i(20,"th",12),o(21,"%"),t(),i(22,"th",13),o(23,"Total"),t()()()(),V(24,Hn,34,30,"div",null,N),i(26,"div",14)(27,"button",15),g("click",function(){_(e);let r=d();return C(r.showSummaryReport())}),o(28," View Report Summary "),t()(),i(29,"POS-complex-pagination",16),g("jumpToPage",function(){_(e);let r=d();return C(r.getListData())})("previousPage",function(){_(e);let r=d();return C(r.getListData())})("nextPage",function(){_(e);let r=d();return C(r.getListData())}),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("isFilterOnDropdown",!1),s(17),p(e.roleService.product.Cost?17:-1),s(7),A(e.data.Data),s(5),u("total",e.data.Data?e.data.Data.length:0)("pageData",e.pageData)}}var ft=class n extends ke{constructor(e,a,r){super(e,a,"Report/MySales","ReportLoader/MyActivity");this.roleService=r}dialog=we(J);onSelectCustomer(e){this.pageData.Filter.CustomerID=e}resetCustomer(e){e==""&&(this.pageData.Filter.CustomerID=null)}showSummaryReport(){this.dialog.open(Oi,{data:{Filter:this.pageData.Filter}})}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(nt))};static \u0275cmp=M({type:n,selectors:[["POS-my-sales"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["pageFilterTemplate",""],[3,"pageData","hideSearchBox","isFilterOnDropdown"],[3,"onSubmit","pageData","hideSearchBox","isFilterOnDropdown"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","660px"],[2,"width","68px"],[1,"text-end",2,"width","30px"],[2,"width","50px"],["id","thCost",1,"text-end",2,"width","80px"],[1,"text-end",2,"width","80px"],[1,"red",2,"width","30px"],[1,"text-end",2,"width","90px"],[1,"text-center"],["role","button",1,"btn","btn-outline-primary",3,"click"],["api","Report/ReportDetailCount",3,"jumpToPage","previousPage","nextPage","total","pageData"],[1,"dialog-filter"],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel"],["requestUrl","/API/AC/GetCustomerSuggestion",1,"w-100",3,"onInputChange","onSelect"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"d-lg-flex","mt-sm-0"],[1,"me-auto","d-sm-block","mt-8","mb-2"],[1,"h5","text-primary","fw-bold",3,"routerLink","queryParams"],["id","PONumber",1,"ms-4",3,"innerHTML"],[1,"fst-italic","fw-bold",3,"innerHTML"],[1,"d-block"],[1,"text-danger","ms-3"],[1,"fw-bold"],["id","deliveryNote"],[1,"d-inline-block","fst-italic"],[1,"d-inline-block"],[1,"d-lg-block","mt-8","me-2","fw-bold","fst-italic"],[1,"status",3,"innerHTML"],[1,"w-100"],[1,"table","table-sm","table-bordered","table-striped"],[1,"border-start","border-end"],[1,"table","table-sm","table-borderless"],[2,"width","645px"],[1,"lh-base"],[1,"fw-normal"],[1,"text-warning","inlineMarginLeft"],[1,"list-inline","text-warning","inlineMarginLeft"],[1,"d-block","fw-normal","fst-italic",3,"innerHTML"],[1,"fw-normal",2,"width","75px"],[1,"fw-normal","text-end",2,"width","42px"],[1,"fst-italic","small",2,"width","52px"],[1,"fw-normal","text-end",2,"width","80px"],[1,"fw-normal","text-end",2,"width","92px"],[1,"fw-normal","text-end","text-danger",2,"width","30px"],[1,"fw-normal","text-end",2,"width","102px"],[1,"text-end"],[1,"p-0","fw-normal","text-end",2,"width","1%"],[1,"fw-normal","text-end",2,"width","5%"]],template:function(a,r){a&1&&m(0,Wn,30,6,"mainpanel-cmp",1),a&2&&p(r.data?0:-1)},dependencies:[B,j,Pe,X,Fe,ve,Ei,Si,U,lt,bi,gi,_i,Ci],styles:[".table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{line-height:13px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:20px!important}"]})};function Un(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid phone number"),t())}function Zn(n,l){if(n&1&&m(0,Un,2,0,"small",15),n&2){d();let e=te(9);p(e.errors!=null&&e.errors.pattern?0:-1)}}function $n(n,l){n&1&&(i(0,"small",15),o(1,"*Enter a valid email address"),t())}function Gn(n,l){if(n&1&&m(0,$n,2,0,"small",15),n&2){d();let e=te(16);p(e.errors!=null&&e.errors.pattern?0:-1)}}var _t=class n{constructor(l,e,a,r,c){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.router=c;this.config.title="Subscribe Account Info",this.config.okText="I want to subscribe",this.config.cancelText="Cancel",this.config.customWidth="35vw"}config=new Q;onOk(l){if(l!=="Enter"){if(this.data.form.Qty==0){this.toastr.error("The number of outlets can't be empty",F.Error),this.dialogRef.close();return}this.httpService.post("/API/Subscription/SendSubscription",this.data.form).subscribe(e=>{this.toastr.success(e,F.Success),this.router.navigate(["/menu/Profile/Main/My_Subscription"]),this.dialogRef.close()})}}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe"]],standalone:!1,decls:26,vars:7,consts:[["validation","ngForm"],["phoneCtrl","ngModel"],["emailCtrl","ngModel"],[3,"onOk","onCancel","onClose","dynamicValidated","config"],[1,"container"],[1,"row"],[1,"col-6"],[1,"form-floating-outline"],["type","text","id","inputPhone","placeholder","Phone","name","phone","pattern","[0-9]{0,15}","required","","matTooltipPosition","above","matTooltip","Your number will be saved to help our customer service quickly identify you in the future",1,"form-control",3,"ngModelChange","ngModel"],["for","inputPhone"],["type","text","id","inputEmail","placeholder","Email","name","email","pattern","[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$","required","","matTooltipPosition","above","matTooltip","Your monthly recurring invoice will be sent to the email you specified above",1,"form-control",3,"ngModelChange","ngModel"],["for","inputEmail"],[1,"col-12"],["name","note","id","inputNote","placeholder","Note","rows","6",1,"form-control",3,"ngModelChange","ngModel"],["for","inputNote"],[1,"text-danger"]],template:function(e,a){if(e&1){let r=v();i(0,"modal-material",3),g("onOk",function(P){return _(r),C(a.onOk(P))})("onCancel",function(){return _(r),C(a.dialogRef.close())})("onClose",function(){return _(r),C(a.dialogRef.close())}),i(1,"content")(2,"div",4)(3,"form",null,0)(5,"div",5)(6,"div",6)(7,"div",7)(8,"input",8,1),D("ngModelChange",function(P){return _(r),T(a.data.form.Phone,P)||(a.data.form.Phone=P),C(P)}),t(),i(10,"label",9),o(11,"Phone*"),t(),m(12,Zn,1,1),t()(),i(13,"div",6)(14,"div",7)(15,"input",10,2),D("ngModelChange",function(P){return _(r),T(a.data.form.Email,P)||(a.data.form.Email=P),C(P)}),t(),i(17,"label",11),o(18,"Email*"),t(),m(19,Gn,1,1),t()()(),i(20,"div",5)(21,"div",12)(22,"div",7)(23,"textarea",13),D("ngModelChange",function(P){return _(r),T(a.data.form.Note,P)||(a.data.form.Note=P),C(P)}),t(),i(24,"label",14),o(25,"Note"),t()()()()()()()()}if(e&2){let r=te(9),c=te(16);u("dynamicValidated",(r==null?null:r.valid)||(c==null?null:c.valid))("config",a.config),s(8),w("ngModel",a.data.form.Phone),s(4),p(r.touched&&r.dirty?12:-1),s(3),w("ngModel",a.data.form.Email),s(4),p(c.touched&&c.dirty?19:-1),s(4),w("ngModel",a.data.form.Note)}},dependencies:[Se,Z,B,xe,Oe,tt,j,Ie,Y,Ce],encapsulation:2})};function qn(n,l){if(n&1){let e=v();i(0,"div",20),g("click",function(){let r=_(e).$implicit,c=d(2);return C(c.onCycleChange(r.key))}),i(1,"div",21)(2,"span",22),o(3),t(),h(4,"div",23),t()()}if(n&2){let e=l.$implicit,a=d(2);fe(e.key==a.formData.Cycle?"active":""),s(3),x(e.dicount),s(),u("innerHTML",e.desc,G)}}function zn(n,l){if(n&1){let e=v();i(0,"tr")(1,"th",24),o(2,"Register"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"input",25),D("ngModelChange",function(r){_(e);let c=d(2);return T(c.formData.Register,r)||(c.formData.Register=r),C(r)}),g("ngModelChange",function(){_(e);let r=d(2);return C(r.onQtyRegisterChange())}),t(),i(7,"span"),o(8),b(9,"number"),t()()()}if(n&2){let e=d(2);s(6),u("preventNegative",!0),w("ngModel",e.formData.Register),s(2),S("/ ",y(9,3,e.data.Options.Register))}}function Qn(n,l){if(n&1){let e=v();i(0,"div",6)(1,"div",26)(2,"div",8)(3,"h2",9),o(4,"Setup Fee "),t(),i(5,"small",10),o(6,"(One-time payment)"),t()()(),i(7,"div",19)(8,"table",27)(9,"tr")(10,"th"),o(11,"POS"),t(),i(12,"td"),o(13,"\xA0:"),t(),i(14,"td")(15,"label",28)(16,"radio-options",29),D("modelChange",function(r){_(e);let c=d(2);return T(c.data.Options.SetupFee,r)||(c.data.Options.SetupFee=r),C(r)}),g("modelChange",function(){_(e);let r=d(2);return C(r.calculateSetupFee())}),t()()()()()()()}if(n&2){let e=d(2);s(16),w("model",e.data.Options.SetupFee)}}function Yn(n,l){n&1&&o(0," s ")}function Kn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),o(3,"Additional Register"),t(),i(4,"p")(5,"small",37),o(6),t()()(),i(7,"td",32),o(8),t(),i(9,"td",33),h(10,"span",36),o(11),b(12,"number"),t(),i(13,"td",34),o(14),t(),i(15,"td",33),h(16,"span",36),o(17),b(18,"number"),t()()),n&2){let e=d(4);s(6),De("",e.formData.Register," Register",e.formData.Register>1?"s":""," "),s(2),x(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(12,8,e.data.Options.Register)),s(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(18,10,e.registerFee))}}function Jn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong")(3,"span"),o(4,"POS"),t()(),i(5,"p")(6,"small",37),o(7," - Consultation "),h(8,"br"),o(9," - Training 2x "),h(10,"br"),o(11," - 1 Month Support Group"),t()()(),h(12,"td",32),i(13,"td",33)(14,"span"),o(15,"IDR "),t(),o(16),b(17,"number"),t(),h(18,"td",34),i(19,"td",33)(20,"span"),o(21,"IDR "),t(),o(22),b(23,"number"),t()()),n&2){let e=d(4);s(16),x(y(17,2,e.formData.Setup)),s(6),x(y(23,4,e.formData.Setup))}}function Xn(n,l){if(n&1&&(i(0,"tr")(1,"td")(2,"strong"),h(3,"span",36),t(),i(4,"p")(5,"small",37),o(6),m(7,Yn,1,0),t()()(),i(8,"td",32),o(9),t(),i(10,"td",33),h(11,"span",36),o(12),b(13,"number"),t(),i(14,"td",34),o(15),t(),i(16,"td",33),h(17,"span",36),o(18),b(19,"number"),t()(),m(20,Kn,19,12,"tr"),m(21,Jn,24,6,"tr")),n&2){let e=d(3);s(3),u("innerHTML",e.formData.Type==1?"Starter Subscription":"Standard Subscription",G),s(3),S(" ",e.formData.Qty," Outlet"),s(),p(e.formData.Qty>1?7:-1),s(2),x(e.formData.Cycle),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(13,11,e.data.Options.Type)),s(3),S(" ",e.formData.Discount>0?e.formData.Discount+"%":"-"," "),s(2),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(19,13,e.outletFee)),s(2),p(e.formData.Register>0?20:-1),s(),p(e.data.Options.SetupFee?21:-1)}}function eo(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Sub Total"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),b(9,"number"),t()()()),n&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(9,2,e.subTotal))}}function to(n,l){if(n&1&&(i(0,"tr")(1,"th"),o(2,"Tax (11%)"),t(),i(3,"td",39),o(4,":"),t(),i(5,"td",33)(6,"strong"),h(7,"span",36),o(8),b(9,"number"),t()()()),n&2){let e=d(4);s(7),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),x(y(9,2,e.subTotal*.11))}}function io(n,l){if(n&1&&(i(0,"div",35)(1,"table",38),m(2,eo,10,4,"tr"),m(3,to,10,4,"tr"),i(4,"tr")(5,"th"),o(6,"Total"),t(),i(7,"td",39),o(8,":"),t(),i(9,"td",33)(10,"strong"),h(11,"span",36),o(12),b(13,"number"),t()()()()()),n&2){let e=d(3);s(2),p(e.data.vatEnabled?2:-1),s(),p(e.data.vatEnabled?3:-1),s(8),u("innerHTML",e.data.Options.Setup?"IDR ":"$ ",G),s(),S("",y(13,4,e.subTotal+(e.data.vatEnabled?e.subTotal*.11:0))," ")}}function no(n,l){if(n&1&&(i(0,"div",19)(1,"table",30)(2,"thead",31)(3,"tr")(4,"th"),o(5,"Product"),t(),i(6,"th",32),o(7,"Month"),t(),i(8,"th",33),o(9,"Price"),t(),i(10,"th",34),o(11,"Disc"),t(),i(12,"th",33),o(13,"Total"),t()()(),i(14,"tbody"),m(15,Xn,22,15),t()(),m(16,io,14,6,"div",35),t()),n&2){let e=d(2);s(15),p((e.formData==null?null:e.formData.Qty)>0?15:-1),s(),p((e.formData==null?null:e.formData.Qty)>0?16:-1)}}function oo(n,l){n&1&&(i(0,"div",6)(1,"div",26)(2,"h2"),o(3,'Your payment currency is "IDR"'),t()(),i(4,"div",19)(5,"div",40)(6,"div",41)(7,"h2",42)(8,"button",43),o(9," I Want to pay in USD "),t()(),i(10,"div",44)(11,"div",45)(12,"ol",46)(13,"li",47),o(14," Go to setup menu"),t(),i(15,"li",47),o(16," Click tab currency"),t(),i(17,"li",47),o(18," Select the currency you want to make for payment"),t(),i(19,"li",47),o(20," Select Yes at primary currency box and click save"),t(),i(21,"li",48),o(22," Then you can check to my subscribe again "),t()(),i(23,"p",49),o(24,"For more detailed information, please check the following article: "),i(25,"a",50),o(26,"Added Currency Conversion"),t()()()()()()()())}function ao(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1)(1,"actions")(2,"button",2),g("click",function(){_(e);let r=d();return C(r.onOpenSubscribeDialog())}),o(3,"Subscribe Now"),t()(),i(4,"content")(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"div",7)(10,"div",8)(11,"h2",9),o(12,"Subscribe "),t(),i(13,"small",10),o(14,"(Recurring)"),t()(),i(15,"a",11),g("click",function(){_(e);let r=d();return C(r.showRegister=!r.showRegister)}),o(16,"More"),t()(),i(17,"div",12)(18,"table",13)(19,"tr")(20,"th"),o(21,"Outlets"),t(),i(22,"td"),o(23,":"),t(),i(24,"td")(25,"input",14,0),D("ngModelChange",function(r){_(e);let c=d();return T(c.formData.Qty,r)||(c.formData.Qty=r),C(r)}),g("ngModelChange",function(){_(e);let r=d();return C(r.onQtyOutletChange())}),t(),i(27,"span"),o(28),b(29,"number"),t()()(),i(30,"tr")(31,"th"),o(32,"Cycle"),t(),i(33,"td"),o(34,":"),t(),i(35,"td"),V(36,qn,5,4,"div",15,N),t()(),m(38,zn,10,5,"tr"),t()()(),m(39,Qn,17,1,"div",6),t(),i(40,"div",16)(41,"div",6)(42,"div",17),g("click",function(){_(e);let r=d();return C(r.invoice=!r.invoice)}),i(43,"h2",18),o(44,"Invoice Preview"),t()(),m(45,no,17,2,"div",19),t(),m(46,oo,27,0,"div",6),t()()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0)("hideMenu",!0),s(2),u("disabled",e.formData.Qty==0),s(23),u("preventNegative",!0),w("ngModel",e.formData.Qty),s(3),S("/ ",y(29,12,e.data.Type[0].amount)),s(8),A(e.data.DiscountOptions),s(2),p(e.showRegister?38:-1),s(),p(e.data.Options.Setup?39:-1),s(6),p(e.invoice?45:-1),s(),p(e.data.Options.Setup?46:-1)}}var Ct=class n extends dt{constructor(e,a,r,c){super(e,a,"Subscription/MySubscriptionLoader",r);this.matDialog=c}showRegister=!1;invoice=!0;outletFee=0;registerFee=0;subTotal=0;postBindForm(e){this.calculate(),this.data.DiscountOptions=e.DiscountOptions}onOpenSubscribeDialog(){this.matDialog.open(_t,{data:{form:this.formData}})}onCycleChange(e){switch(this.formData.Cycle=e,e){case 3:this.formData.Discount=0;break;case 6:this.formData.Discount=10;break;case 12:this.formData.Discount=15;break}this.calculateregisterFee(),this.calculate()}onQtyOutletChange(){this.calculate()}calculate(){if(this.formData.Cycle>1){let e=this.data.Options.Type*this.formData.Qty*this.formData.Cycle;this.data.Discount=e*this.formData.Discount/100,this.outletFee=this.data.Options.Type*this.formData.Qty*this.formData.Cycle-this.data.Discount,this.subTotal=this.outletFee+this.registerFee}else this.outletFee=this.data.Options.Type*this.formData.Qty,this.subTotal=this.outletFee+this.registerFee,this.data.Discount=0;this.data.Options.SetupFee&&(this.subTotal=this.subTotal+this.formData.Setup)}calculateSetupFee(){this.data.Options.SetupFee?(this.formData.SetupFee=!0,this.subTotal=this.subTotal+this.formData.Setup):(this.formData.SetupFee=!1,this.subTotal=this.subTotal-this.formData.Setup)}onQtyRegisterChange(){this.calculateregisterFee(),this.calculate()}calculateregisterFee(){let e=this.data.Options.Register*this.formData.Cycle*this.formData.Register;if(this.formData.Discount>0){let a=e*this.formData.Discount/100;this.registerFee=e-a}else this.registerFee=e}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(et),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-choose-plan"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[["outletQty","ngModel"],[3,"pageData","hideSearchBox","hideSearchDropdown","hideMenu"],[1,"btn","btn-success",3,"click","disabled"],[1,"container-fluid","bg-light-gray","pb-10"],[1,"row","pt-5"],[1,"col-md-5","m-0","pe-0","pt-0","pb-0"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"me-auto","d-sm-block","mt-3"],[1,"d-inline"],[1,"text-body-secondary","h6"],["role","button",1,"btn","btn-outline-secondary",3,"click"],[1,"card-body",2,"padding-right","0.625rem"],[1,"table-sm"],["type","text","autoNum","",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"class"],[1,"col-md-7"],[1,"card-header",3,"click"],[1,"title"],[1,"card-body"],[1,"card","border-dark","align-text-top","d-inline-block","me-1","mb-0",3,"click"],[1,"card-body","text-center",2,"cursor","pointer","width","80px","padding","10px 5px"],[1,"fw-bold"],[1,"fw-normal","border-top","border-dark",3,"innerHTML"],["matTooltipPosition","above","matTooltip","Additional Register"],["type","text","autoNum","","maxlength","3",1,"form-control",2,"width","65px","display","inline-block",3,"ngModelChange","preventNegative","ngModel"],[1,"card-header"],[1,"form-horizontal"],[1,"form-check","form-check-inline",2,"cursor","pointer","padding-top","8px"],["name","POS",3,"modelChange","model"],[1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"text-end",2,"min-width","65px"],[1,"text-end"],[1,"text-end",2,"min-width","85px"],[1,"d-flex","justify-content-end"],[3,"innerHTML"],[2,"font-size","90% !important"],[1,"table-sm","table-borderless","me-3"],[1,"sep"],["id","accordionExample",1,"accordion"],[1,"accordion-item"],["id","panelsStayOpen-headingTwo",1,"accordion-header"],["type","button","data-bs-toggle","collapse","data-bs-target","#panelsStayOpen-collapseTwo","aria-expanded","false","aria-controls","panelsStayOpen-collapseTwo",1,"accordion-button","collapsed"],["id","panelsStayOpen-collapseTwo","aria-labelledby","panelsStayOpen-headingTwo",1,"accordion-collapse","collapse"],[1,"accordion-body","pt-2"],[1,"list-group","list-group-numbered","mt-5","mb-3"],[1,"list-group-item","mb-3","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"list-group-item","rounded-0","border-top-0","border-start-0","border-end-0","border-bottom-1"],[1,"ms-2","mt-6"],["href","https://support.dealpos.com/en/articles/8956190-how-to-create-new-currency","target","_blank"]],template:function(a,r){a&1&&m(0,ao,47,14,"mainpanel-cmp",1),a&2&&p(r.data&&r.formData?0:-1)},dependencies:[Z,B,li,j,X,fi,Mi,Ce,_e],styles:[".active[_ngcontent-%COMP%]{background-color:#fffed9}"]})};var bt=class n{constructor(l,e,a){this.dialogRef=l;this.data=e;this.router=a;this.config.title=this.data.title,this.config.okText="Yes",this.config.cancelText="No"}config=new Q;onOk(){this.router.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"]),this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(f(z),f(ie),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-modal-choose-plan"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"text-center",2,"width","440px"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h4",1),o(3),i(4,"span"),o(5,"Do you want to Choose your Plan ?"),t()()()()),e&2&&(u("config",a.config),s(3),S(" ",a.data.body," "))},dependencies:[Y],encapsulation:2})};var gt=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Confim Adjusted Subscription"}message="";config=new Q;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Confirm",l).subscribe(e=>{this.toastr.success(e.Message,F.Success),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-confirm-adjusted-plan"]],standalone:!1,decls:8,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"font-weight","h4","mb-5"],[1,"form-floating-outline"],["name","address","id","inputAddress","placeholder","Address","matTooltipPosition","above","matTooltip","Address","required","",1,"form-control",3,"ngModelChange","ngModel"],["for","inputAddress"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"p",1),o(3," Do you agree about billing adjusted? "),t(),i(4,"div",2)(5,"textarea",3),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(6,"label",4),o(7,"Reason"),t()()()()),e&2&&(u("config",a.config),s(5),w("ngModel",a.message))},dependencies:[Z,B,Oe,j,Y,Ce],encapsulation:2})};var Ve=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Stop Subscription",this.config.customWidth="450px"}message="";config=new Q;onOk(){let l={Message:this.message};this.message.trim().length==0?(this.toastr.error("The reason cannot be empty",F.Error),this.dialogRef.close()):this.httpService.post("/API/Subscription/Close",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-stop-subscription"]],standalone:!1,decls:6,vars:2,consts:[[3,"onOk","onCancel","onClose","config"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","200px",3,"ngModelChange","ngModel"],["for","message"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"textarea",2),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(4,"label",3),o(5,"Reason"),t()()()()),e&2&&(u("config",a.config),s(3),w("ngModel",a.message))},dependencies:[Z,B,j,Y],encapsulation:2})};var Ae=class n{apiUrl="https://app.midtrans.com/snap/snap.js";injected=!1;initScript(){return new We(l=>{let e;this.injected||(e=document.createElement("script"),e.src=this.apiUrl,e.async=!0,e.setAttribute("data-client-key",je.midtransClientKey),this.injected=!0,document.body.appendChild(e))})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var ro=()=>["/menu/Profile/Main/My_Subscription/Choose_your_plan"],lo=(n,l)=>({"bg-warning":n,"bg-danger":l}),so=n=>({"background-color":n}),co=n=>({"bg-gradient-warning":n});function mo(n,l){n&1&&(i(0,"a",1),o(1,"Choose Your Plan"),t()),n&2&&u("routerLink",Ke(1,ro))}function po(n,l){if(n&1&&(i(0,"div",13),o(1),b(2,"date"),t()),n&2){let e=d(2);s(),S(" ",I(2,1,e.data.Zoho.Subscription.Since,"dd MMM yyyy")," ")}}function uo(n,l){if(n&1&&(i(0,"div",15)(1,"div",31)(2,"h5",12),o(3," Subscription "),t(),i(4,"div",13),o(5),t()()()),n&2){let e=d(2);s(),fe(Je(3,lo,e.data.Zoho.Subscription.SubscriptionState=="SellOnly"||e.data.Zoho.Subscription.SubscriptionState=="Overdue",e.data.Zoho.Subscription.SubscriptionState=="Suspended")),s(4),S(" ",e.data.Zoho.Subscription.SubscriptionState," ")}}function fo(n,l){if(n&1&&(i(0,"span",35),o(1),b(2,"number"),t()),n&2){let e=d(3);s(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function _o(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),b(3,"number"),t(),h(4,"br"),t()),n&2){let e=d(3);s(2),x(y(3,1,e.data.Zoho.Subscription.TotalAmount))}}function Co(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),o(3,"Current Plan"),t()(),i(4,"div",24)(5,"table",25)(6,"thead",26)(7,"tr")(8,"th",32),o(9,"Usage"),t(),i(10,"th",32),o(11,"Frequency"),t(),i(12,"th",33),o(13,"Amount"),t()()(),i(14,"tbody")(15,"tr")(16,"td",34),o(17),h(18,"br"),o(19),b(20,"number"),i(21,"small"),o(22,"month"),t(),o(23,") "),t(),i(24,"td",34)(25,"span"),o(26),h(27,"br"),t(),m(28,fo,3,3,"span",35),t(),i(29,"td",34),m(30,_o,5,3,"span"),i(31,"span"),o(32),b(33,"number"),t()()()()()()()),n&2){let e=d(2);s(17),S(" ",e.data.Zoho.Subscription.OutletCount," Outlet"),s(2),S(" (",y(20,6,e.data.Zoho.Subscription.RecurringAmount)," / "),s(7),x(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==1?"Monthly":e.data.Zoho.Subscription.Frequency==3?"3 Months":"6 Months"),s(2),p(e.data.Zoho.Subscription.Discount!=0?28:-1),s(2),p(e.data.Zoho.Subscription.Discount!=0?30:-1),s(2),x(y(33,8,e.data.Zoho.Subscription.TotalAfterDiscount))}}function bo(n,l){if(n&1&&(i(0,"span",35),o(1),b(2,"number"),t()),n&2){let e=d(3);s(),S("",y(2,1,e.data.Zoho.Subscription.Discount)," %")}}function go(n,l){if(n&1&&(i(0,"span")(1,"del"),o(2),b(3,"number"),t(),h(4,"br"),t()),n&2){let e=d(3);s(2),x(y(3,1,e.data.NextBilling.TotalAmount))}}function ho(n,l){if(n&1){let e=v();i(0,"div",5)(1,"div",6)(2,"div")(3,"h2"),o(4,"Adjusted Plan"),t()(),i(5,"div",36)(6,"button",37),g("click",function(){_(e);let r=d(2);return C(r.onOpenConfirmAdjustedModal())}),o(7," Confirm "),t()()(),i(8,"div",24)(9,"table",25)(10,"thead",26)(11,"tr")(12,"th",32),o(13,"Usage"),t(),i(14,"th",32),o(15,"Frequency"),t(),i(16,"th",33),o(17,"Amount"),t()()(),i(18,"tbody")(19,"tr")(20,"td",34),o(21),h(22,"br"),o(23),b(24,"number"),i(25,"small"),o(26,"month"),t(),o(27,") "),t(),i(28,"td",34)(29,"span"),o(30),h(31,"br"),t(),m(32,bo,3,3,"span",35),t(),i(33,"td",34),m(34,go,5,3,"span"),i(35,"span"),o(36),b(37,"number"),t()()()()()()()}if(n&2){let e=d(2);s(21),S(" ",e.data.NextBilling.Outlet," Outlet"),s(2),S(" (",y(24,6,e.data.NextBilling.RecurringAmount)," / "),s(7),x(e.data.Zoho.Subscription.Frequency==12?"Yearly":e.data.Zoho.Subscription.Frequency==3?"3 Monthly":"6 Months"),s(2),p(e.data.Zoho.Subscription.Discount!=0?32:-1),s(2),p(e.data.Zoho.Subscription.Discount!=0?34:-1),s(2),x(y(37,8,e.data.NextBilling.TotalAfterDiscount))}}function xo(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Withholding Tax"),t(),i(3,"td"),o(4,":"),t(),i(5,"td"),o(6),t()()),n&2){let e=d(3);s(6),S(" ",e.data.Zoho.WHTPercentage," % ")}}function So(n,l){if(n&1&&(i(0,"tr")(1,"th",40),o(2,"Document Link"),t(),i(3,"td"),o(4,":"),t(),i(5,"td")(6,"a",41),h(7,"i",42),o(8," Upload "),t()()()),n&2){let e=d(3);s(6),u("href",Le(e.data.Zoho.DocumentLink),ge)}}function vo(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"h2"),h(3,"i",38),o(4,"Tax Information"),t()(),i(5,"div",8)(6,"table",39),m(7,xo,7,1,"tr"),m(8,So,9,2,"tr"),t()()()),n&2){let e=d(2);s(7),p(e.data.Zoho.WHTPercentage>0?7:-1),s(),p(e.data.Zoho.DocumentLink?8:-1)}}function yo(n,l){if(n&1){let e=v();i(0,"a",55),g("click",function(){_(e);let r=d(3);return C(r.payAllInvoice())}),h(1,"i",56),o(2),b(3,"Filter"),b(4,"sum"),b(5,"Filter"),b(6,"sum"),b(7,"number"),t()}if(n&2){let e=d(3);s(2),S(" Pay All ~ IDR ",y(7,15,I(4,5,Ee(3,1,e.data.Zoho.invoices,"overdue","status"),"total")+I(6,12,Ee(5,8,e.data.Zoho.invoices,"sent","status"),"total"))," ")}}function Mo(n,l){if(n&1&&(i(0,"p",57),o(1),b(2,"number"),t()),n&2){let e=d().$implicit;s(),S("(",y(2,1,e.balance)," due)")}}function wo(n,l){if(n&1&&(i(0,"a",60),h(1,"i",62),i(2,"span",63),o(3,"View"),t()()),n&2){let e=d().$implicit;u("href",Le(e.invoice_url),ge)}}function To(n,l){if(n&1){let e=v();i(0,"button",64),g("click",function(){_(e);let r=d().$implicit,c=d(3);return C(c.paySingleInvoice(r))}),h(1,"i",56),i(2,"span",63),o(3,"Pay Now"),t()()}if(n&2){let e=d().$implicit;u("id",Yt("pay-button",e.invoice_number))}}function Do(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),b(5,"date"),t(),i(6,"td"),o(7),t(),i(8,"td",50),o(9),b(10,"number"),m(11,Mo,3,3,"p",57),t(),i(12,"td"),o(13),t(),i(14,"td",58),o(15),t(),i(16,"td",59),m(17,wo,4,2,"a",60),m(18,To,4,2,"button",61),t()()),n&2){let e=l.$implicit,a=l.$index;Ye(R(16,so,e.status=="overdue"?"#f2dede":"")),s(2),x(a+1+"."),s(2),x(I(5,11,e.date,"dd MMM yyyy")),s(3),x(e.invoice_number),s(2),S(" ",y(10,14,e.total)," "),s(2),p(e.total!=e.balance&&e.balance>0?11:-1),s(2),x(e.currency_code),s(2),x(e.status),s(2),p(e.status!="draft"&&e.status!="void"?17:-1),s(),p((e.status=="sent"||e.status=="overdue")&&e.currency_code=="IDR"?18:-1)}}function Eo(n,l){if(n&1&&(i(0,"div",5)(1,"div",6)(2,"div",43)(3,"h2",44),h(4,"i",45),o(5," Invoices"),t()(),m(6,yo,8,17,"a",46),t(),i(7,"div",24)(8,"table",47)(9,"thead",26)(10,"tr")(11,"th",27),o(12,"No"),t(),i(13,"th",48),o(14,"Date"),t(),i(15,"th",49),o(16,"Number"),t(),i(17,"th",50),o(18,"Amount"),t(),h(19,"th",51),i(20,"th",52),o(21,"Status"),t(),i(22,"th"),o(23,"Invoice"),t()()(),i(24,"tbody"),V(25,Do,19,18,"tr",53,N),t()(),i(27,"p",54),o(28," Please pay your biling directly inside our platform. We provide multiple methods ex: Credit Card/Bank Transfer/E-Money. "),t()()()),n&2){let e=d(2);s(6),p(e.outstandingInvoiceCount>1&&e.data.Zoho.Subscription.Currency=="RP"?6:-1),s(19),A(e.data.Zoho.invoices)}}function Po(n,l){if(n&1){let e=v();i(0,"button",65),g("click",function(){_(e);let r=d(2);return C(r.load())}),o(1," Load "),t()}}function Io(n,l){if(n&1&&(i(0,"tr",30)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",50),o(6),b(7,"number"),t(),i(8,"td",50),o(9),t(),i(10,"td",50),o(11),b(12,"date"),t(),i(13,"td",50),o(14),b(15,"date"),t()()),n&2){let e=l.$implicit,a=l.$index;s(2),x(a+1+"."),s(2),x(e.Name),s(),fe(R(16,co,e.OrdersCount<25)),s(),S(" ",y(7,8,e.OrdersCount)),s(3),x(e.RegisterCount),s(2),x(I(12,10,e.MinDate,"dd MMM yyyy")),s(3),x(I(15,13,e.MaxDate,"dd MMM yyyy"))}}function Oo(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",0)(1,"actions"),m(2,mo,2,2,"a",1),t(),i(3,"content")(4,"div",2)(5,"div",3)(6,"div",4)(7,"div",5)(8,"div",6)(9,"h2"),h(10,"i",7),o(11," Account"),t()(),i(12,"div",8)(13,"div",9)(14,"div",10)(15,"div",11)(16,"h5",12),o(17," Since "),t(),m(18,po,3,4,"div",13),t()(),i(19,"div",14)(20,"div",11)(21,"h5",12),o(22," Type "),t(),i(23,"div",13),o(24),t()()(),m(25,uo,6,6,"div",15),t()()(),m(26,Co,34,10,"div",5),m(27,ho,38,10,"div",5),m(28,vo,9,2,"div",5),i(29,"div",5)(30,"div",6)(31,"h2"),h(32,"i",16),o(33," Close Store"),t()(),i(34,"div",8)(35,"div"),o(36," You can close your store to stop your billing. "),t(),i(37,"div",17)(38,"button",18),g("click",function(){_(e);let r=d();return C(r.onOpenCloseModal())}),o(39," Close "),t()()()()(),i(40,"div",19),m(41,Eo,29,1,"div",5),i(42,"div",5)(43,"div",20)(44,"h2"),h(45,"i",21),o(46," Outlets Usage "),i(47,"small",22),o(48),b(49,"date"),b(50,"date"),t()(),m(51,Po,2,0,"button",23),t(),i(52,"div",24)(53,"table",25)(54,"thead",26)(55,"tr")(56,"th",27),o(57,"No"),t(),i(58,"th"),o(59,"Outlet Name"),t(),i(60,"th",28),o(61,"Orders"),t(),i(62,"th",28),o(63,"Registers"),t(),i(64,"th",29),o(65,"Min Date"),t(),i(66,"th",29),o(67,"Max Date"),t()()(),i(68,"tbody"),V(69,Io,16,18,"tr",30,N),b(71,"sortBy"),t()()()()()()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(2),p(e.data.Account.Type=="Trial"?2:-1),s(16),p(e.data.Zoho.Subscription?18:-1),s(6),S(" ",e.data.Account.Type," "),s(),p(e.data.Zoho.CustomerID!=null?25:-1),s(),p(e.data.Zoho.Subscription!=null?26:-1),s(),p(e.data.Zoho.Subscription!=null&&e.data.NextBilling&&e.data.Billed>e.data.Zoho.Subscription.OutletCount?27:-1),s(),p(e.data.Zoho.WHTPercentage>0||e.data.Zoho.DocumentLink?28:-1),s(13),p(e.data.Zoho.invoices&&e.data.Zoho.invoices.length>0?41:-1),s(7),De("(",I(49,14,e.data.From,"dd MMM yyyy")," - ",I(50,17,e.data.To,"dd MMM yyyy"),")"),s(3),p(e.data.Outlets.length==0?51:-1),s(18),A(Ee(71,20,e.data.Outlets,"desc","OrdersCount"))}}var ht=class n extends pi{constructor(e,a,r,c,P,q){super(e);this.httpService=a;this.matDialog=r;this.midtrans=c;this.ngZone=P;this.toastr=q;this.data=null}modalTitle;modalBody;data;loadOutlet=!1;outstandingInvoiceCount=0;ngOnInit(){this.midtrans.initScript().subscribe(),this.menuData$.subscribe(()=>{this.getData()})}getData(){let e={LoadOutlet:this.loadOutlet};this.httpService.post("/API/Subscription/GetData",e).subscribe({next:a=>{this.data=a,W.IsEmpty(this.data.Outlets)&&(this.data.Outlets=[]),this.postInit(a)}})}postInit(e){e.Zoho.invoices=e.Zoho.invoices?e.Zoho.invoices:[],e.Zoho.code!=200&&(e.Zoho.code==401?this.modalTitle="Trial Customer":e.Zoho.code==400&&(this.modalTitle="your account customer"),e.Zoho.message==null?this.modalBody=e.Zoho.message:this.modalBody=e.Zoho.message,this.matDialog.open(bt,{data:{title:this.modalTitle,body:this.modalBody}})),e.Zoho.invoices.forEach(a=>{(a.status=="sent"||a.status=="overdue")&&this.outstandingInvoiceCount++})}showToaster(e){var a="Payment Successful!";e>1&&(a+=`
|
|
3
|
+
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(a,F.Success)}payAllInvoice(){let e=0,a,r,c,P;this.data.Zoho.invoices.forEach(O=>{(O.status=="sent"||O.status=="overdue")&&(e+=O.total,r==null?(a=O.invoice_number,r=O.invoice_number.concat("$"+O.total+";"),c=O.invoice_id,P=O.invoice_id.concat("$"+O.total+";")):(a=a.concat("_"+O.invoice_number),r=r.concat(O.invoice_number.concat("$"+O.total+";")),c=c.concat(";"+O.invoice_id),P=P.concat(O.invoice_id.concat("$"+O.total)+";")))});let q={CustomerID:this.data.Zoho.invoices[0].customer_id,InvNumber:r,OrderID:a,GrossAmount:e,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:P};this.httpService.post("/API/Subscription/GetSNAPTokenMultipleInvoice",q).subscribe(O=>{this.openSNAPDialog(O)})}paySingleInvoice(e){let a={InvNumber:e.invoice_number,GrossAmount:e.balance,WHTPercentage:this.data.Zoho.WHTPercentage,VATEnabled:this.data.Zoho.VATEnabled,InvoiceID:e.invoice_id,CustomerID:e.customer_id};this.httpService.post("/API/Subscription/GetSNAPToken",a).subscribe(r=>{this.openSNAPDialog(r)})}openSNAPDialog(e){let a=this.data.Account.SubscriptionStatus;snap.pay(e.token,{onSuccess:r=>{this.ngZone.run(()=>{this.showToaster(a),this.getData()})}})}onOpenCloseModal(){this.matDialog.open(Ve)}onOpenConfirmAdjustedModal(){this.matDialog.open(gt)}load(){this.loadOutlet=!0,this.getData()}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(J),f(Ae),f(qe),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success",3,"routerLink"],[1,"container-fluid","bg-light-gray"],[1,"row","pt-5","ms-3"],[1,"col-md-4"],[1,"card"],[1,"card-header","d-flex","justify-content-between"],[1,"fa-solid","fa-user"],[1,"card-body"],[1,"row"],[1,"col","pe-0","ps-3"],[1,"p-3","border","rounded","bg-light-gray","text-black"],[1,"fw-bold"],[1,"mt-4","h6"],[1,"col","pe-3","ps-3"],[1,"col","ps-0","pe-3"],[1,"fa-solid","fa-xmark-circle"],[1,"mt-4"],["type","button",1,"btn","btn-sm","btn-danger","py-2",3,"click"],[1,"col-md-8"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"fa","fa-location-dot"],[1,"text-body-secondary","h6"],[1,"btn","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table","mt-5"],[1,"thead-light","sticky-top-thead"],[2,"width","20px"],[1,"text-end",2,"width","100px"],[1,"text-end",2,"width","120px"],[1,"border"],[1,"p-3","border","rounded","bg-success","text-white"],[1,"text-center"],[1,"text-center",2,"width","104px"],[1,"text-center","align-top"],[1,"text-danger"],[1,"btn-group"],["type","button",1,"btn","btn-sm","btn-success","py-2",3,"click"],[1,"fa-solid","fa-file-circle-plus"],[1,"table-sm","table-borderless"],[2,"width","103px"],["target","_blank",1,"btn","btn-light","btn-sm",2,"height","32px",3,"href"],[1,"fa","fa-upload"],[1,"me-auto","d-sm-block"],[1,"d-inline"],[1,"fa-solid","fa-file-invoice"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm"],["id","tableGrid",1,"table","mt-5"],[2,"width","120px"],[2,"width","100px"],[1,"text-end"],[2,"width","60px"],[2,"width","80px"],[1,"border",3,"style"],[1,"pt-3"],["role","button","matTooltipPosition","above","matTooltip","Pay All",1,"btn","btn-success","btn-sm",3,"click"],[1,"fa-lg","fa-solid","fa-arrows-rotate"],[1,"fst-italic","text-warning"],[1,"text-uppercase"],[1,"d-flex","justify-content-between"],["target","_blank",3,"href"],[2,"border-width","1px",3,"id"],[1,"fa-lg","fa-solid","fa-file-lines"],[1,"ms-3"],[2,"border-width","1px",3,"click","id"],[1,"btn","btn-outline-secondary",3,"click"]],template:function(a,r){a&1&&m(0,Oo,72,24,"mainpanel-cmp",0),a&2&&p(r.data?0:-1)},dependencies:[Pe,X,Ce,_e,U,lt,hi,st],encapsulation:2})};function ko(n,l){n&1&&(i(0,"div",10)(1,"h5",12),h(2,"i",13),o(3," You are not listening to any outlet. Please select one. "),t()())}function Fo(n,l){if(n&1&&(i(0,"div",11)(1,"h5",12),h(2,"i",13),o(3),t()()),n&2){let e=d(2);s(3),S(" You are currently listening to ",e.selectedOutlet==null?null:e.selectedOutlet.Name,". ")}}function No(n,l){if(n&1&&(i(0,"div",2)(1,"div",9),m(2,ko,4,0,"div",10),m(3,Fo,4,1,"div",11),t()()),n&2){let e=d();s(2),p(e.selectedOutlet?-1:2),s(),p(e.selectedOutlet?3:-1)}}var xt=class n{constructor(l,e,a,r){this.signalrClientService=l;this.httpService=e;this.dialogRef=a;this.toastr=r;this.modalConfig=new Q,this.modalConfig.title="Subscribe Notification",this.modalConfig.customWidth="475px",this.initModalLoader(),this.touchOnSelectOption=!1}modalConfig;entities;outletID;selectedOutlet;initialOutlet;touchOnSelectOption;previousSelectedOutlet;initModalLoader(){this.httpService.post("/api/NotificationLoader/PushNotificationList").pipe(de(l=>W.IsNotEmpty(l))).subscribe(l=>{this.entities=l.Options.Entities,W.IsNotEmpty(l.SubscribeOn)&&(this.outletID=l.SubscribeOn),this.initSelectedOutlet()})}initSelectedOutlet(){this.selectedOutlet=this.findOutletByID(this.outletID),this.previousSelectedOutlet=this.selectedOutlet,this.initialOutlet=this.selectedOutlet,this.checkValidateButtonOk()}checkValidateButtonOk(){this.modalConfig.validated=!0,W.IsEmpty(this.selectedOutlet)&&(this.modalConfig.validated=!1)}onSelectOutlet(l){this.previousSelectedOutlet=this.selectedOutlet,this.selectedOutlet=l,this.modalConfig.validated=!0}onOpenSelectOutlet(){this.touchOnSelectOption=!0}onCancel(){this.dialogRef.close()}onOk(){let l=this.initialOutlet?this.initialOutlet.ID:null;this.outletID!==l?W.IsNotEmpty(this.outletID)?this.subscribeToPushNotification(`Listening to ${this.selectedOutlet?.Name}`,"Push Notification Enabled"):this.unsubscribeToPushNotification():this.dialogRef.close()}unsubscribeToPushNotification(){this.subscribeToPushNotification(`You are no longer listening to ${this.previousSelectedOutlet?.Name}`,"Push Notification Disabled"),this.setLocalStorage(!0)}subscribeToPushNotification(l,e){let a=localStorage.getItem("PushNotificationID"),r={EntityID:this.outletID};this.httpService.post("/api/PushNotification/Subscribe",r).subscribe(c=>{this.signalrClientService.SubscribeGroup(this.outletID?this.outletID:"",a),this.setLocalStorage(),this.toastr.success(l,e),this.dialogRef.close()})}setLocalStorage(l=!1){l?localStorage.removeItem("NotificationOutletID"):localStorage.setItem("NotificationOutletID",this.outletID)}findOutletByID(l){return this.entities.find(a=>a.ID==l)}static \u0275fac=function(e){return new(e||n)(f(oi),f(E),f(z),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-modal-subscribe-notification"]],standalone:!1,decls:11,vars:4,consts:[[3,"onOk","onCancel","onClose","config"],[1,"container"],[1,"row"],[1,"row","mt-1"],[1,"col-md-2"],[1,"pt-10"],[1,"col-md-10"],[1,"form-floating-outline","selected"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Choose an Options","id","outlet",1,"productform",3,"open","clear","ngModelChange","change","items","ngModel"],[1,"col-12"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"d-flex"],["aria-hidden","true",1,"fa-solid","fa-circle-info","me-3","mt-1"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.onCancel()})("onClose",function(){return a.onCancel()}),i(1,"content")(2,"div",1),m(3,No,4,2,"div",2),i(4,"div",3)(5,"div",4)(6,"h5",5),o(7,"Outlet"),t()(),i(8,"div",6)(9,"div",7)(10,"ng-select",8),g("open",function(){return a.onOpenSelectOutlet()})("clear",function(){return a.onOpenSelectOutlet()}),D("ngModelChange",function(c){return T(a.outletID,c)||(a.outletID=c),c}),g("change",function(c){return a.onSelectOutlet(c)}),t()()()()()()()),e&2&&(u("config",a.modalConfig),s(3),p(a.touchOnSelectOption?-1:3),s(7),u("items",a.entities),w("ngModel",a.outletID))},dependencies:[B,j,Y,ve],encapsulation:2})};var Ao=n=>({ID:n});function Bo(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=d().$implicit;u("routerLink","/menu"+e.URL)("queryParams",R(3,Ao,e.ObjectID)),s(),S(" ",e.Body," ")}}function Ro(n,l){if(n&1&&(i(0,"a",16),o(1),t()),n&2){let e=d().$implicit;u("href",Le(e.URL),ge),s(),S(" ",e.Body," ")}}function Lo(n,l){if(n&1&&(i(0,"tr",13)(1,"td"),o(2),t(),i(3,"td")(4,"b"),o(5),t(),h(6,"br"),i(7,"span"),m(8,Bo,2,5,"a",15),m(9,Ro,2,3,"a",16),t()(),i(10,"td"),o(11),b(12,"date"),t(),i(13,"td"),o(14),t()()),n&2){let e=l.$implicit;s(2),x(e.OutletName),s(3),x(e.Header),s(3),p(e.ObjectIDType>0?8:-1),s(),p(e.ObjectIDType==0?9:-1),s(2),x(I(12,6,e.Created,"dd MMM yyyy HH:mm")),s(3),x(e.TypeString)}}function jo(n,l){if(n&1){let e=v();i(0,"mat-paginator",17),g("page",function(r){_(e);let c=d(2);return C(c.onPaginationChange(r))}),t()}if(n&2){let e=d(2);u("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Ho(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"actions")(2,"a",2),g("click",function(){_(e);let r=d();return C(r.openSubscribeModal())}),o(3,"Subscribe"),t()(),i(4,"filters")(5,"div",3)(6,"div",4)(7,"div")(8,"h6"),o(9,"Outlet"),t(),i(10,"ng-select",5),D("ngModelChange",function(r){_(e);let c=d();return T(c.pageData.Filter.ListIDs,r)||(c.pageData.Filter.ListIDs=r),C(r)}),t()(),i(11,"div")(12,"h6"),o(13,"From"),t(),i(14,"datepicker",6),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t()(),i(15,"div")(16,"h6"),o(17,"To"),t(),i(18,"datepicker",7),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()()()(),i(19,"content")(20,"div",8)(21,"table",9)(22,"thead",10)(23,"tr",11)(24,"th",12),o(25,"Outlet"),t(),i(26,"th"),o(27,"Message"),t(),i(28,"th"),o(29,"Created"),t(),i(30,"th"),o(31,"Type"),t()()(),i(32,"tbody"),V(33,Lo,15,9,"tr",13,N),t()(),i(35,"div"),m(36,jo,1,3,"mat-paginator",14),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0),s(10),u("items",e.pageData.Options.Entities),w("ngModel",e.pageData.Filter.ListIDs),u("multiple",!0),s(4),w("date",e.pageData.Filter.From),s(4),w("date",e.pageData.Filter.To),s(15),A(e.data.Data),s(3),p(e.pagination.listTotal>0?36:-1)}}var St=class n extends ke{constructor(e,a,r){super(e,a,"v3/notification/WithTotalCount","NotificationLoader/PushNotificationList");this.dialog=r}preInitList(){let e=new Date;e.setHours(0,0,0,0);let a=new Date;a.setHours(23,59,59,59),this.pageData.Filter.From=e,this.pageData.Filter.To=a}openSubscribeModal(){this.dialog.open(xt)}static \u0275fac=function(a){return new(a||n)(f(re),f(E),f(J))};static \u0275cmp=M({type:n,selectors:[["POS-notification"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],["role","button",1,"btn","btn-success",3,"click"],[1,"d-flex"],["container",""],["bindLabel","Name","bindValue","ID",3,"ngModelChange","items","ngModel","multiple"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[2,"width","200px"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],["target","_blank",3,"routerLink","queryParams"],["target","_blank",3,"href"],[3,"page","length","pageSize","pageIndex"]],template:function(a,r){a&1&&m(0,Ho,37,8,"mainpanel-cmp",0),a&2&&p(r.data?0:-1)},dependencies:[B,j,Pe,X,at,Fe,ve,U],encapsulation:2})};var le=class n{_loadSubscriptionData=new Ue(null);loadSubscriptionData$=this._loadSubscriptionData.asObservable();subscriptionData$;lastUnpaidInvoiceDate$;constructor(l){this.subscriptionData$=this.loadSubscriptionData$.pipe(ee(()=>l.get("/API/Subscription/GetInitialData").pipe($e(e=>{let a=0;e.Subscription?.SubscriptionState=="Overdue"?a=1:e.Subscription?.SubscriptionState=="Sell Only"?a=2:e.Subscription?.SubscriptionState=="Suspended"&&(a=3),W.IsNotEmpty(e.Subscription)&&(e.Subscription.SubscriptionStatus=a)}))),Ze(1)),this.lastUnpaidInvoiceDate$=this.subscriptionData$.pipe(se(e=>e.invoices.filter(a=>(a.status=="sent"||a.status=="overdue")&&a.currency_code=="IDR")),se(e=>e.length>0?e[0].date:"-"))}loadSubscriptionData(){this._loadSubscriptionData.next()}static \u0275fac=function(e){return new(e||n)(oe(E))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Be=class n{constructor(l,e){l.subscriptionData$.pipe(de(r=>r.code!=200),ee(()=>Zt(e.navigate(["/menu/Profile/Main/My_Subscription/Choose_your_plan"])))).subscribe()}static \u0275fac=function(e){return new(e||n)(oe(le),oe(he))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Me=class n{outlets$;from$;to$;_isLoadOutlet=new Ue(!1);isLoadOutlet$=this._isLoadOutlet.asObservable().pipe(de(l=>l));showLoadButton$;constructor(l,e){let a=this.isLoadOutlet$.pipe(ee(()=>l.post("/API/Subscription/GetUsage").pipe()),Ze(1));this.outlets$=a.pipe(se(r=>r.Outlets)),this.from$=a.pipe(se(r=>r.From)),this.to$=a.pipe(se(r=>r.To)),e.subscriptionData$.pipe(de(r=>r.Subscription?.OutletCount<=je.outletMaximumSubscription),$e(()=>this.loadOutlet())).subscribe(),this.showLoadButton$=$t(e.subscriptionData$.pipe(se(r=>r.Subscription?.OutletCount>je.outletMaximumSubscription),Gt(1)),a.pipe(se(()=>!1)))}loadOutlet(){this._isLoadOutlet.next(!0)}static \u0275fac=function(e){return new(e||n)(oe(E),oe(le))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var yt=class n{constructor(l,e,a){this.http=l;this.ngZone=e;this.toastr=a}payInvoice(l,e,a,r){let c={InvNumber:l.invoice_number,GrossAmount:l.balance,WHTPercentage:e,VATEnabled:a,InvoiceID:l.invoice_id,CustomerID:l.customer_id};return this.http.post("/API/Subscription/GetSNAPToken",c).pipe(ee(P=>this.openSNAPDialog(P,r)))}payAllInvoices(l,e,a,r){let c=0,P,q,O,pe;l.forEach($=>{($.status=="sent"||$.status=="overdue")&&(c+=$.total,q==null?(P=$.invoice_number,q=$.invoice_number.concat("$"+$.total+";"),O=$.invoice_id,pe=$.invoice_id.concat("$"+$.total+";")):(P=P.concat("_"+$.invoice_number),q=q.concat($.invoice_number.concat("$"+$.total+";")),O=O.concat(";"+$.invoice_id),pe=pe.concat($.invoice_id.concat("$"+$.total)+";")))});let Re={CustomerID:l[0].customer_id,InvNumber:q,OrderID:P,GrossAmount:c,WHTPercentage:e,VATEnabled:a,InvoiceID:pe};return this.http.post("/API/Subscription/GetSNAPTokenMultipleInvoice",Re).pipe(ee($=>this.openSNAPDialog($,r)))}openSNAPDialog(l,e){let a=e;return new We(r=>{snap.pay(l.token,{onSuccess:()=>{this.ngZone.run(()=>{this.showToaster(a),r.next(),r.complete()})}})})}showToaster(l){let e="Payment Successful!";l>1&&(e+=`
|
|
4
|
+
Please Log out and re-login if your account is currently suspended!`),this.toastr.success(e,F.Success)}static \u0275fac=function(e){return new(e||n)(oe(E),oe(qe),oe(L))};static \u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"})};var Zo=n=>({"background-color":n});function $o(n,l){if(n&1){let e=v();i(0,"button",10),g("click",function(){_(e);let r=d();return C(r.payAllInvoices())}),o(1),b(2,"number"),t()}if(n&2){let e=d();s(),S("PAY ALL - ",e.currency+" "+y(2,1,e.totalPayable))}}function Go(n,l){if(n&1&&(i(0,"a",15),o(1),t()),n&2){let e=d().$implicit;u("href",e.invoice_url,ge),s(),x(e.invoice_number)}}function qo(n,l){if(n&1&&(i(0,"span"),o(1),t()),n&2){let e=d().$implicit;s(),x(e.invoice_number)}}function zo(n,l){if(n&1){let e=v();i(0,"button",21),g("click",function(){_(e);let r=d().$implicit,c=d();return C(c.payInvoice(r))}),o(1,"Pay"),t()}}function Qo(n,l){if(n&1&&(i(0,"button",20),o(1),t()),n&2){let e=d().$implicit;s(),x(e.status)}}function Yo(n,l){if(n&1&&(i(0,"div",11)(1,"div",12)(2,"div",13)(3,"h3",14),m(4,Go,2,2,"a",15)(5,qo,2,1,"span"),t(),i(6,"small",5),o(7),b(8,"date"),t(),i(9,"small",16),o(10),b(11,"date"),t()(),i(12,"div",17)(13,"span",18),o(14),b(15,"number"),t(),m(16,zo,2,0,"button",19)(17,Qo,2,1,"button",20),t()()()),n&2){let e=l.$implicit,a=d();Ye(R(16,Zo,e.status=="overdue"?"#f2dede":"")),s(4),p(e.invoice_url?4:5),s(3),S("Invoice Date: ",I(8,8,e.date,"dd MMM yyyy")),s(3),S("Due Date: ",I(11,11,e.date,"dd MMM yyyy")),s(4),De("",a.currency," ",y(15,14,e.total)),s(2),p(e.status=="sent"||e.status=="overdue"?16:17)}}var Mt=class n{constructor(l,e,a){this.payment=l;this.subscription=e;this.router=a}showPayAll=!0;totalPayable=0;get invoices(){return this._invoices}set invoices(l){W.IsNotEmpty(l)&&(this._invoices=l,this.showPayAll=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").length>1,this.totalPayable=l.filter(e=>e.status=="sent"||e.status=="overdue"&&e.currency_code=="IDR").reduce((e,a)=>e+a.total,0))}_invoices=[];WHTPercentage;VATEnabled;subscriptionStatus;currency;payAllInvoices(){this.payment.payAllInvoices(this.invoices,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}payInvoice(l){this.currency=="USD"?window.open(l.invoice_url,"_blank"):this.payment.payInvoice(l,this.WHTPercentage,this.VATEnabled,this.subscriptionStatus).subscribe(()=>this.subscription.loadSubscriptionData())}static \u0275fac=function(e){return new(e||n)(f(yt),f(le),f(he))};static \u0275cmp=M({type:n,selectors:[["POS-invoices-card"]],inputs:{invoices:"invoices",WHTPercentage:"WHTPercentage",VATEnabled:"VATEnabled",subscriptionStatus:"subscriptionStatus",currency:"currency"},standalone:!1,decls:14,vars:3,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between",2,"padding-left","15px"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-file-invoice","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-primary","btn-pay"],[1,"card-body","px-0"],[1,"row","gx-0"],[1,"invoice-list","col-12",2,"padding","0px 15px",3,"style"],[1,"btn","btn-sm","btn-outline-primary","btn-pay",3,"click"],[1,"invoice-list","col-12",2,"padding","0px 15px"],[1,"py-10","border-top","d-flex","justify-content-between"],[1,"invoice-info"],[1,"fw-normal"],["target","_blank",3,"href"],[1,"sub-text"],[1,"invoice-payment","text-end","d-flex","flex-column","justify-content-between"],[1,"d-block","invoice-total"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2"],["disabled","",1,"btn","btn-sm","btn-outline-secondary","btn-pay","text-uppercase","py-2"],[1,"btn","btn-sm","btn-outline-primary","btn-pay","text-uppercase","py-2",3,"click"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Invoices"),t(),i(7,"small",5),o(8,"Invoice are created for each subscription cycle."),t()()(),m(9,$o,3,3,"button",6),t(),i(10,"div",7)(11,"div",8),V(12,Yo,18,18,"div",9,N),t()()()),e&2&&(s(9),p(a.showPayAll&&a.currency!="USD"?9:-1),s(),Qe("pb-0",a.invoices.length==1),s(2),A(a.invoices))},dependencies:[_e,U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-pay[_ngcontent-%COMP%]{min-width:140px}.invoice-total[_ngcontent-%COMP%]{font-size:14.5px}"]})};var wt=class n{subscribedSince;outlets;frequency;total;static \u0275fac=function(e){return new(e||n)};static \u0275cmp=M({type:n,selectors:[["POS-billing-info-card"]],inputs:{subscribedSince:"subscribedSince",outlets:"outlets",frequency:"frequency",total:"total"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"card-body"],[1,"bill-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Billing Information"),t(),i(5,"small",2),o(6),b(7,"date"),t()()(),i(8,"div",3)(9,"div",4)(10,"div")(11,"h3",5),o(12),t(),i(13,"h5",6),o(14,"Outlet"),t()(),h(15,"div",7),i(16,"div")(17,"h3",5),o(18),t(),i(19,"h5",6),o(20,"Frequency"),t()(),h(21,"div",7),i(22,"div")(23,"h3",5),o(24),b(25,"number"),t(),i(26,"h5",6),o(27,"Amount"),t()()()()()),e&2&&(s(6),S("Subscribe Since: ",I(7,4,a.subscribedSince,"dd MMM yyyy")),s(6),x(a.outlets),s(6),S("",a.frequency," Month"),s(6),x(y(25,7,a.total)))},dependencies:[_e,U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.bill-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}"]})};var jt=n=>({"is-invalid":n});function Xo(n,l){n&1&&(i(0,"div",7),o(1,"Email is required."),t())}function ea(n,l){n&1&&(i(0,"div",7),o(1,"Phone is required."),t())}function ta(n,l){n&1&&h(0,"div",7)}var Tt=class n{constructor(l,e,a){this.dialogRef=l;this.toastr=a;this.config.title="Update Billing Contact",this.config.customWidth="500px",this.email=e.email,this.phone=e.phone,this.mobilePhone=e.mobilePhone}email;phone="";mobilePhone="";form;fb=we(si);data=we(ie);config=new Q;generateForm(){this.form=this.fb.group({email:this.fb.control(null,[At.required]),phone:this.fb.control(null,[At.required]),mobilePhone:this.fb.control(null,[])})}ngOnInit(){this.generateForm(),this.form.patchValue({email:this.data.email,phone:this.data.phone,mobilePhone:this.data.mobilePhone})}ok(){let{email:l,phone:e,mobilePhone:a}=this.form.value;this.dialogRef.close({email:l,phone:e,mobilePhone:a})}close(){this.dialogRef.close()}static \u0275fac=function(e){return new(e||n)(f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-update-billing"]],standalone:!1,decls:25,vars:15,consts:[[3,"onOk","onCancel","onClose","config","dynamicValidated"],[3,"formGroup"],[1,"mb-3","row"],["for","email",1,"col-4","fs-4"],[1,"text-danger","ms-2"],[1,"col"],["type","text","formControlName","email","id","email",1,"form-control","rounded",3,"ngClass"],["id","",1,"invalid-feedback"],["for","phone",1,"col-4","fs-4"],["formControlName","phone","type","text","id","phone",1,"form-control","rounded",3,"ngClass"],["for","mobilePhone",1,"col-4","fs-4"],["formControlName","mobilePhone","type","text","id","mobilePhone",1,"form-control","rounded",3,"ngClass"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.ok()})("onCancel",function(){return a.close()})("onClose",function(){return a.close()}),i(1,"content")(2,"form",1)(3,"div",2)(4,"label",3),o(5,"Email"),i(6,"sup",4),o(7,"*"),t()(),i(8,"div",5),h(9,"input",6),m(10,Xo,2,0,"div",7),t()(),i(11,"div",2)(12,"label",8),o(13,"Phone"),i(14,"sup",4),o(15,"*"),t()(),i(16,"div",5),h(17,"input",9),m(18,ea,2,0,"div",7),t()(),i(19,"div",2)(20,"label",10),o(21,"Mobile Phone"),t(),i(22,"div",5),h(23,"input",11),m(24,ta,1,0,"div",7),t()()()()()),e&2&&(u("config",a.config)("dynamicValidated",a.form.valid),s(2),u("formGroup",a.form),s(7),u("ngClass",R(9,jt,a.form.controls.email.invalid&&(a.form.controls.email.dirty||a.form.controls.email.touched))),s(),p(a.form.controls.email.errors!=null&&a.form.controls.email.errors.required?10:-1),s(7),u("ngClass",R(11,jt,a.form.controls.phone.invalid&&(a.form.controls.phone.dirty||a.form.controls.phone.touched))),s(),p(a.form.controls.phone.errors!=null&&a.form.controls.phone.errors.required?18:-1),s(5),u("ngClass",R(13,jt,a.form.controls.mobilePhone.invalid&&(a.form.controls.mobilePhone.dirty||a.form.controls.mobilePhone.touched))),s(),p(a.form.controls.mobilePhone.errors?24:-1))},dependencies:[Xe,Se,Z,B,xe,ai,ri,Y],styles:["form[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:2.5rem;border-radius:2px}form[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:invalid:focus, .form-control.is-invalid[_ngcontent-%COMP%]:focus{box-shadow:none}"]})};var Dt=class n{constructor(l,e,a,r){this.httpService=l;this.dialogRef=e;this.data=a;this.toastr=r;this.config.title="Pause Subscription",this.config.customWidth="480px"}message="";month=1;config=new Q;onOk(){let l={Month:this.month,Reason:this.message};if(this.message.trim().length==0){this.toastr.error("The reason cannot be empty",F.Error);return}this.month==0&&this.toastr.error("Month must be bigger than zero",F.Error),this.httpService.post("/api/subscription/pause",l).subscribe(e=>{this.toastr.success(e.Message,F.Error),this.dialogRef.close()})}static \u0275fac=function(e){return new(e||n)(f(E),f(z),f(ie),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-dialog-pause-subscription"]],decls:15,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],[1,"fw-normal"],[1,"form-floating-outline","mt-5"],["type","text","autoNum","",1,"form-control",3,"ngModelChange","ngModel"],["for","message"],[1,"form-floating-outline"],["name","message",2,"width","100%","height","220px",3,"ngModelChange","ngModel"]],template:function(e,a){e&1&&(i(0,"modal-material",0),g("onOk",function(){return a.onOk()})("onCancel",function(){return a.dialogRef.close()})("onClose",function(){return a.dialogRef.close()}),i(1,"content")(2,"h6",1),o(3,"Your data will be retained but you will lose access until renewal is made"),t(),h(4,"br"),i(5,"h4",1),o(6,"How long would you like to pause your subscription? "),t(),i(7,"div",2)(8,"input",3),D("ngModelChange",function(c){return T(a.month,c)||(a.month=c),c}),t(),i(9,"label",4),o(10,"Months"),t()(),i(11,"div",5)(12,"textarea",6),D("ngModelChange",function(c){return T(a.message,c)||(a.message=c),c}),t(),i(13,"label",4),o(14,"Reason"),t()()()()),e&2&&(u("config",a.config),s(8),w("ngModel",a.month),s(4),w("ngModel",a.message))},dependencies:[rt,Y,it,Z,B,j],encapsulation:2})};var Et=class n{constructor(l,e,a){this.matDialog=l;this.http=e;this.toastr=a;Xt(()=>{this.updateBillingOnPageLoad()&&this.updateBilling()})}updateBillingOnPageLoad=ei();lastUnpaidInvoiceDate;email;phone;mobilePhone;recurringStatus;cancel(){this.matDialog.open(Ve).afterClosed().subscribe()}pause(){this.matDialog.open(Dt).afterClosed().subscribe()}updateBilling(){this.matDialog.open(Tt,{data:{email:this.email,phone:this.phone,mobilePhone:this.mobilePhone}}).afterClosed().pipe(de(l=>W.IsNotEmpty(l)),ee(l=>this.http.post("/API/Subscription/UpdateBillingData",{Email:l.email,Phone:l.phone,Mobile:l.mobilePhone}).pipe(se(e=>Wt(Ht({},l),{Message:e.Message}))))).subscribe(l=>{this.toastr.success(l.Message,F.Success),this.email=l.email,this.phone=l.phone,this.mobilePhone=l.mobilePhone})}static \u0275fac=function(e){return new(e||n)(f(J),f(E),f(L))};static \u0275cmp=M({type:n,selectors:[["POS-renewal-card"]],inputs:{updateBillingOnPageLoad:[1,"updateBillingOnPageLoad"],lastUnpaidInvoiceDate:"lastUnpaidInvoiceDate",email:"email",phone:"phone",mobilePhone:"mobilePhone",recurringStatus:"recurringStatus"},standalone:!1,decls:40,vars:16,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text","text-capitalize"],[1,"btn-group"],["data-bs-toggle","dropdown",1,"btn","btn-outline-secondary","btn-sm","dropdown-toggle"],[1,"caret"],[1,"dropdown-menu","dropdown-menu-end","cursor","text-dark"],[1,"dropdown-item",3,"click"],[1,"card-body"],[1,"renewal-info","d-flex","justify-content-evenly","align-items-center","text-sm-start","text-center","flex-sm-row","flex-column"],[1,"text-center","invdate-container",2,"flex-grow","1"],[1,"fw-normal"],[1,"fw-normal","sub-title"],[1,"line","d-sm-block","d-none"],[1,"d-flex","flex-column","ps-0","ps-sm-10","emwa-container",2,"flex-grow","2.5"],[1,"mt-sm-4","mt-8"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Renewal"),t(),i(5,"small",2),o(6),t()(),i(7,"div",3)(8,"button",4),h(9,"b",5),t(),i(10,"ul",6)(11,"li")(12,"a",7),g("click",function(){return a.updateBilling()}),o(13,"Update Billing Contact"),t()(),i(14,"li")(15,"a",7),g("click",function(){return a.pause()}),o(16,"Pause Subscription"),t()(),i(17,"li")(18,"a",7),g("click",function(){return a.cancel()}),o(19,"Cancel Renewal"),t()()()()(),i(20,"div",8)(21,"div",9)(22,"div",10)(23,"h3",11),o(24),b(25,"date"),t(),i(26,"h5",12),o(27,"Invoice Date"),t()(),h(28,"div",13),i(29,"div",14)(30,"div")(31,"h3",11),o(32),t(),i(33,"h5",12),o(34,"Billing Email"),t()(),i(35,"div",15)(36,"h3",11),o(37),t(),i(38,"h5",12),o(39),t()()()()()()),e&2&&(s(5),Qe("text-success",a.recurringStatus=="active")("text-danger",a.recurringStatus=="stopped"),s(),x(a.recurringStatus),s(18),x(a.lastUnpaidInvoiceDate=="-"?a.lastUnpaidInvoiceDate:I(25,13,a.lastUnpaidInvoiceDate,"dd MMM yyyy")),s(8),x(a.email??"-"),s(5),Nt("",a.phone," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone),s(2),Nt("",a.phone?"Phone":""," ",a.phone&&a.mobilePhone?"/":""," ",a.mobilePhone?"Mobile Phone":""))},dependencies:[U],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-cancel[_ngcontent-%COMP%]{width:140px}.renewal-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}@media (max-width: 576px){.renewal-info[_ngcontent-%COMP%]{height:180px}}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}@media (max-width: 576px){.invdate-container[_ngcontent-%COMP%], .emwa-container[_ngcontent-%COMP%]{flex-grow:0!important}}@media (max-width: 576px){ #modal_material{width:100%!important}}"]})};var na=n=>({"bg-gradient-warning":n});function oa(n,l){if(n&1&&(i(0,"small",5),o(1),b(2,"date"),b(3,"date"),t()),n&2){let e=d();s(),S("(",I(2,1,e.lastMonthDate,"dd MMM yyyy")+" - "+I(3,4,e.currentDate,"dd MMM yyyy"),")")}}function aa(n,l){if(n&1){let e=v();i(0,"button",13),g("click",function(){_(e);let r=d();return C(r.loadOutlet())}),o(1,"Load"),t()}}function ra(n,l){if(n&1){let e=v();i(0,"button",13),g("click",function(){_(e);let r=d();return C(r.loadMinMax())}),o(1,"Load Min Max Date"),t()}}function la(n,l){n&1&&(i(0,"th",11),o(1,"Min Date"),t())}function sa(n,l){n&1&&(i(0,"th",11),o(1,"Max Date"),t())}function da(n,l){if(n&1&&(i(0,"td",14),o(1),b(2,"date"),t()),n&2){let e=d().$implicit;s(),x(I(2,1,e.MinDate,"dd MMM yyyy"))}}function ca(n,l){if(n&1&&(i(0,"td",14),o(1),b(2,"date"),t()),n&2){let e=d().$implicit;s(),x(I(2,1,e.MaxDate,"dd MMM yyyy"))}}function ma(n,l){if(n&1&&(i(0,"tr",12)(1,"td"),o(2),t(),i(3,"td"),o(4),t(),i(5,"td",14),o(6),b(7,"number"),t(),i(8,"td",14),o(9),b(10,"number"),t(),m(11,da,3,4,"td",14),m(12,ca,3,4,"td",14),t()),n&2){let e=l.$implicit,a=l.$index,r=d();s(2),x(a+1),s(2),S(" ",e.Name," "),s(),fe(R(12,na,(e==null?null:e.OrdersCount)<25||e.OrdersCount==null)),s(),S(" ",y(7,8,e.OrdersCount??0)),s(3),x(y(10,10,e.RegisterCount??1)),s(2),p(r.isLoadMinMaxDate?11:-1),s(),p(r.isLoadMinMaxDate?12:-1)}}var Pt=class n{constructor(l,e){this.outletUsage=l;this.http=e}lastMonthDate;currentDate;outlets;showLoadButton;isLoadMinMaxDate=!1;loadOutlet(){this.outletUsage.loadOutlet()}loadMinMax(){this.http.post("/api/subscription/GetOutletWithMinMax").subscribe(l=>{this.outlets=l.Outlets,this.isLoadMinMaxDate=!0})}static \u0275fac=function(e){return new(e||n)(f(Me),f(E))};static \u0275cmp=M({type:n,selectors:[["POS-outlet-card"]],inputs:{lastMonthDate:"lastMonthDate",currentDate:"currentDate",outlets:"outlets",showLoadButton:"showLoadButton"},standalone:!1,decls:28,vars:9,consts:[[1,"card"],[1,"card-header","d-flex","align-os-center","justify-content-between"],[1,"d-flex","align-items-center"],[1,"fa","fa-location-dot","me-4",2,"font-size","30px"],[1,"d-inline"],[1,"sub-text","d-block"],[1,"btn","btn-sm","btn-outline-secondary"],[1,"card-body","table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","10px"],[1,"text-end",2,"width","120px"],[1,"border"],[1,"btn","btn-sm","btn-outline-secondary",3,"click"],[1,"text-end"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2),h(3,"i",3),i(4,"div")(5,"h3",4),o(6,"Outlets Usage"),t(),m(7,oa,4,7,"small",5),t()(),m(8,aa,2,0,"button",6),m(9,ra,2,0,"button",6),t(),i(10,"div",7)(11,"table",8)(12,"thead",9)(13,"tr")(14,"th",10),o(15,"No"),t(),i(16,"th"),o(17,"Name"),t(),i(18,"th",11),o(19,"Orders"),t(),i(20,"th",11),o(21,"Registers"),t(),m(22,la,2,0,"th",11),m(23,sa,2,0,"th",11),t()(),i(24,"tbody"),V(25,ma,13,14,"tr",12,N),b(27,"sortBy"),t()()()()),e&2&&(s(7),p(a.outlets!=null&&a.outlets.length?7:-1),s(),p(a.showLoadButton?8:-1),s(),p(!a.showLoadButton&&!a.isLoadMinMaxDate?9:-1),s(13),p(a.isLoadMinMaxDate?22:-1),s(),p(a.isLoadMinMaxDate?23:-1),s(2),A(Ee(27,5,a.outlets,"desc","OrdersCount")))},dependencies:[_e,U,st],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{line-height:16px}"]})};function ua(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(r){_(e);let c=d();return T(c.nameForm,r)||(c.nameForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.nameForm)}}function fa(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),x(e.name??"-")}}function _a(n,l){if(n&1){let e=v();i(0,"input",11),D("ngModelChange",function(r){_(e);let c=d();return T(c.npwpForm,r)||(c.npwpForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.npwpForm)}}function Ca(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),x(e.npwp??"-")}}function ba(n,l){if(n&1){let e=v();i(0,"textarea",12),D("ngModelChange",function(r){_(e);let c=d();return T(c.addressForm,r)||(c.addressForm=r),C(r)}),t()}if(n&2){let e=d();w("ngModel",e.addressForm)}}function ga(n,l){if(n&1&&(i(0,"h4",8),o(1),t()),n&2){let e=d();s(),S(" ",e.taxAddress??"-"," ")}}function ha(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"Document Link"),t(),i(3,"h4",8)(4,"a",13),o(5,"view"),t()()()),n&2){let e=d();s(4),u("href",e.documentLink,ge)}}function xa(n,l){if(n&1&&(i(0,"div",9)(1,"h4",6),o(2,"WHT"),t(),i(3,"h4",8),o(4),t()()),n&2){let e=d();s(4),S(" ",e.whtPercentage??"-","% ")}}var It=class n{constructor(l){this.http=l}outletCount;name;npwp;documentLink;whtPercentage;frequency;taxAddress;isEdit=!1;nameForm="";npwpForm="";addressForm="";editData(){this.isEdit?this.http.post("/API/Subscription/UpdateTaxInformation",{TaxID:this.npwpForm,TaxName:this.nameForm,TaxAddress:this.addressForm}).subscribe(()=>{this.isEdit=!1,this.name=this.nameForm,this.npwp=this.npwpForm,this.taxAddress=this.addressForm}):(this.isEdit=!0,this.nameForm=this.name,this.npwpForm=this.npwp,this.addressForm=this.taxAddress)}static \u0275fac=function(e){return new(e||n)(f(E))};static \u0275cmp=M({type:n,selectors:[["POS-tax-card"]],inputs:{outletCount:"outletCount",name:"name",npwp:"npwp",documentLink:"documentLink",whtPercentage:"whtPercentage",frequency:"frequency",taxAddress:"taxAddress"},standalone:!1,decls:27,vars:6,consts:[[1,"card"],[1,"card-header","d-flex","align-items-center","justify-content-between"],[1,"sub-text"],[1,"btn","btn-sm","btn-outline-primary","btn-upgrade",3,"click"],[1,"card-body"],[1,"d-flex","justify-content-between"],[1,"fw-normal","title-form"],["type","text",1,"form-control",2,"width","250px",3,"ngModel"],[1,"text-secondary","fw-normal","user-info"],[1,"d-flex","justify-content-between","mt-8"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModel"],["type","text",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["name","","id","","rows","10",1,"form-control",2,"width","250px",3,"ngModelChange","ngModel"],["target","_blank",3,"href"]],template:function(e,a){e&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),o(4,"Tax Information"),t(),i(5,"small",2),o(6,"PPN 11% + Tax Invoice"),t()(),i(7,"button",3),g("click",function(){return a.editData()}),o(8),t()(),i(9,"div",4)(10,"div",5)(11,"h4",6),o(12,"Full Name"),t(),m(13,ua,1,1,"input",7)(14,fa,2,1,"h4",8),t(),i(15,"div",9)(16,"h4",6),o(17,"NPWP"),t(),m(18,_a,1,1,"input",7)(19,Ca,2,1,"h4",8),t(),i(20,"div",9)(21,"h4",6),o(22,"Tax Address"),t(),m(23,ba,1,1,"textarea",10)(24,ga,2,1,"h4",8),t(),m(25,ha,6,1,"div",9),m(26,xa,5,1,"div",9),t()()),e&2&&(s(8),S(" ",a.isEdit?"Save":"Edit"," "),s(5),p(a.isEdit?13:14),s(5),p(a.isEdit?18:19),s(5),p(a.isEdit?23:24),s(2),p(a.documentLink?25:-1),s(),p(a.whtPercentage?26:-1))},dependencies:[Z,B,j],styles:[".sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.btn-upgrade[_ngcontent-%COMP%]{width:140px}.bill-info[_ngcontent-%COMP%]{border:1px solid #E6E6E6;height:120px}.line[_ngcontent-%COMP%]{width:1px;height:70px;background:#e6e6e6}.sub-title[_ngcontent-%COMP%]{color:#00000080}.user-info[_ngcontent-%COMP%]{max-width:50%}@media (max-width: 576px){.title-form[_ngcontent-%COMP%]{flex-basis:100px;word-break:break-all}}"]})};function va(n,l){if(n&1&&h(0,"POS-tax-card",10),n&2){let e=d();u("name",e.Subscription==null?null:e.Subscription.TaxName)("npwp",e.Subscription==null?null:e.Subscription.TaxID)("outletCount",e.Subscription==null?null:e.Subscription.OutletCount)("documentLink",e.DocumentLink)("whtPercentage",e.WHTPercentage)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("taxAddress",e.Subscription==null?null:e.Subscription.TaxAddress)}}function ya(n,l){if(n&1&&(i(0,"mainpanel-cmp",0)(1,"content")(2,"div",1)(3,"section",2)(4,"div",3)(5,"div",4),h(6,"POS-invoices-card",5)(7,"POS-outlet-card",6),b(8,"async"),b(9,"async"),b(10,"async"),b(11,"async"),t(),i(12,"div",7),h(13,"POS-billing-info-card",8)(14,"POS-renewal-card",9),m(15,va,1,7,"POS-tax-card",10),t()()()()()()),n&2){let e=l,a=d();u("pageData",a.menuData)("hideSearchBox",!0)("hideSearchDropdown",!0),s(6),u("invoices",e.invoices)("WHTPercentage",e.WHTPercentage)("VATEnabled",e.VATEnabled)("subscriptionStatus",e.Subscription==null?null:e.Subscription.SubscriptionStatus)("currency",e.Subscription==null?null:e.Subscription.Currency),s(),u("lastMonthDate",y(8,23,a.from$))("currentDate",y(9,25,a.to$))("outlets",y(10,27,a.outlets$))("showLoadButton",y(11,29,a.showLoadButton$)),s(6),u("subscribedSince",e.Subscription==null?null:e.Subscription.Since)("outlets",e.Subscription==null?null:e.Subscription.OutletCount)("frequency",e.Subscription==null?null:e.Subscription.Frequency)("total",e.Subscription==null?null:e.Subscription.TotalAmount),s(),u("updateBillingOnPageLoad",!(e.Subscription!=null&&e.Subscription.MobilePhone&&(e.Subscription!=null&&e.Subscription.Email)))("lastUnpaidInvoiceDate",e.Subscription==null?null:e.Subscription.NextRecurring)("email",e.Subscription==null?null:e.Subscription.Email)("phone",e.Subscription==null?null:e.Subscription.Phone)("mobilePhone",e.Subscription==null?null:e.Subscription.MobilePhone)("recurringStatus",e.Subscription==null?null:e.Subscription.RecurringStatus),s(),p((e.Subscription==null?null:e.Subscription.Currency)!="USD"?15:-1)}}var Ot=class n{title=we(ni);menuData={H:"My Subscription",N:{SM:[]},T:"My Subscription",U:[]};outlets$;from$;to$;subscriptionData$;lastUnpaidInvoiceDate$;showLoadButton$;constructor(l,e,a,r){let P=this.title.getTitle().split("|")[0]+"| My Subscription";this.title.setTitle(P),this.subscriptionData$=l.subscriptionData$,this.lastUnpaidInvoiceDate$=l.lastUnpaidInvoiceDate$,this.outlets$=a.outlets$,this.showLoadButton$=a.showLoadButton$,this.from$=a.from$,this.to$=a.to$,r.initScript().subscribe()}static \u0275fac=function(e){return new(e||n)(f(le),f(Be),f(Me),f(Ae))};static \u0275cmp=M({type:n,selectors:[["POS-my-subscription-v2"]],standalone:!1,features:[Kt([le,Be,Me])],decls:2,vars:3,consts:[[3,"pageData","hideSearchBox","hideSearchDropdown"],[1,"subs-container"],[1,"content"],[1,"d-flex","flex-sm-row","flex-column",2,"column-gap","20px"],[1,"left-container"],[3,"invoices","WHTPercentage","VATEnabled","subscriptionStatus","currency"],[3,"lastMonthDate","currentDate","outlets","showLoadButton"],[1,"right-container"],[3,"subscribedSince","outlets","frequency","total"],[3,"updateBillingOnPageLoad","lastUnpaidInvoiceDate","email","phone","mobilePhone","recurringStatus"],[3,"name","npwp","outletCount","documentLink","whtPercentage","frequency","taxAddress"]],template:function(e,a){if(e&1&&(m(0,ya,16,31,"mainpanel-cmp",0),b(1,"async")),e&2){let r;p((r=y(1,1,a.subscriptionData$))?0:-1,r)}},dependencies:[X,Mt,wt,Et,Pt,It,ti],styles:[".subs-container[_ngcontent-%COMP%]{padding:18px 20px 0;background:#fafaf9}.subs-container[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{padding-left:15px}.subs-container[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:#00000080;font-size:11px}.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%]{width:60%}.subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:40%}@media (max-width: 576px){.subs-container[_ngcontent-%COMP%] .left-container[_ngcontent-%COMP%], .subs-container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{width:100%}}"]})};function Ma(n,l){if(n&1){let e=v();i(0,"div",14),g("click",function(){_(e);let r=d().$index,c=d(2);return C(c.readMore(r))}),o(1,"read more..."),t()}}function wa(n,l){if(n&1&&(i(0,"tr",10)(1,"td")(2,"b"),o(3),t(),h(4,"div",12),m(5,Ma,2,0,"div",13),t(),i(6,"td"),o(7),b(8,"date"),t(),i(9,"td"),o(10),t()()),n&2){let e=l.$implicit;s(3),x(e.Header),s(),u("innerHTML",e.displayedMessage,G),s(),p(e.showReadMore?5:-1),s(2),x(I(8,5,e.Created,"dd MMM yyyy HH:mm")),s(3),x(e.IsFinished?"Finished":"In Progress")}}function Ta(n,l){if(n&1){let e=v();i(0,"mat-paginator",15),g("page",function(r){_(e);let c=d(2);return C(c.onPaginationChange(r))}),t()}if(n&2){let e=d(2);u("length",e.pagination.listTotal)("pageSize",e.pagination.pageSize)("pageIndex",e.pageData.Filter.PageNumber==0?0:e.pageData.Filter.PageNumber-1)}}function Da(n,l){if(n&1){let e=v();i(0,"mainpanel-cmp",1),g("onSubmit",function(){_(e);let r=d();return C(r.searchFromPageOne())}),i(1,"filters")(2,"div",2)(3,"div",3)(4,"div")(5,"h6"),o(6,"From"),t(),i(7,"datepicker",4),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.From,r)||(c.pageData.Filter.From=r),C(r)}),t()(),i(8,"div")(9,"h6"),o(10,"To"),t(),i(11,"datepicker",5),D("dateChange",function(r){_(e);let c=d();return T(c.pageData.Filter.To,r)||(c.pageData.Filter.To=r),C(r)}),t()()()()(),i(12,"content")(13,"div",6)(14,"table",7)(15,"thead",8)(16,"tr",9)(17,"th"),o(18,"Message"),t(),i(19,"th"),o(20,"Created"),t(),i(21,"th"),o(22,"Status"),t()()(),i(23,"tbody"),V(24,wa,11,8,"tr",10,N),t()(),i(26,"div"),m(27,Ta,1,3,"mat-paginator",11),t()()()()}if(n&2){let e=d();u("pageData",e.menuData)("hideSearchBox",!0),s(7),w("date",e.pageData.Filter.From),s(4),w("date",e.pageData.Filter.To),s(13),A(e.data.Data),s(3),p(e.pagination.listTotal>0?27:-1)}}var kt=class n extends ke{constructor(l,e){super(l,e,"AsyncNotification/Get","AsyncNotification/Loader")}preInitList(){let l=new Date;l.setHours(0,0,0,0);let e=new Date;e.setHours(23,59,59,59),this.pageData.Filter.From=l,this.pageData.Filter.To=e}postInit(l){l.Data.forEach(e=>{let a=e.Body;e.displayedMessage=a.length<=120?a:a.slice(0,120),e.showReadMore=a.length>120})}readMore(l){this.data.Data[l].displayedMessage=this.data.Data[l].Body,this.data.Data[l].showReadMore=!1}static \u0275fac=function(e){return new(e||n)(f(re),f(E))};static \u0275cmp=M({type:n,selectors:[["POS-async-notification"]],standalone:!1,features:[ae],decls:1,vars:1,consts:[[3,"pageData","hideSearchBox"],[3,"onSubmit","pageData","hideSearchBox"],[1,"d-flex"],["container",""],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-5"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light","sticky-top-thead"],[1,"header"],[1,"border-bottom"],[3,"length","pageSize","pageIndex"],[2,"word-break","break-all",3,"innerHTML"],[1,"text-primary","pointer"],[1,"text-primary","pointer",3,"click"],[3,"page","length","pageSize","pageIndex"]],template:function(e,a){e&1&&m(0,Da,28,5,"mainpanel-cmp",0),e&2&&p(a.data?0:-1)},dependencies:[X,at,Fe,U],encapsulation:2})};var Ea=[{path:"Main/My_Profile",component:pt},{path:"Main/My_Subscription",component:Ot},{path:"Main/My_Subscription/V2",component:ht},{path:"Notification/Push",component:St},{path:"Notification/Async",component:kt},{path:"Main/My_Sales",component:ft},{path:"Main/My_Subscription/Choose_your_plan",component:Ct}],Ft=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=ze({type:n});static \u0275inj=Ge({imports:[Vt.forChild(Ea),Vt]})};var Zi=class n{static \u0275fac=function(e){return new(e||n)};static \u0275mod=ze({type:n});static \u0275inj=Ge({providers:[U],imports:[ii,it,di,Ft,yi,xi,rt,ui,wi,mi,Ii,ve,Pi,vi,ci,Vi,Fi,Bi,Di]})};export{Zi as ProfileModule};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-WNZKCNMC.js";import{a as j}from"./chunk-3KSZCJ6T.js";import{a as U,b as G}from"./chunk-CBSYYTXQ.js";import{k as q,l as Z}from"./chunk-BA3BDB5Y.js";import{a as x}from"./chunk-C4WJKF7R.js";import{A as O,b,d as m,g as _,la as M,q as z}from"./chunk-NWSIPELM.js";import{e as B,g as L,k as P,t as V}from"./chunk-RNLSEEMX.js";import{Ba as w,Ha as k,Ja as f,Lc as D,Nb as F,Ob as v,Xc as y,Za as c,ac as H,bb as R,cb as p,d,hb as S,ib as u,jb as g,k as I,la as C,ma as h,na as A,pa as r,sc as N,tb as T}from"./chunk-JYZTRN6N.js";var X=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275cmp=S({type:s,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(t,i){},styles:[`textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0 !important;box-sizing:content-box !important;height:auto !important;overflow:hidden !important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0 !important;box-sizing:content-box !important;height:0 !important}@keyframes cdk-text-field-autofill-start{/*!*/}@keyframes cdk-text-field-autofill-end{/*!*/}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return s})(),J={passive:!0},K=(()=>{class s{_platform=r(_);_ngZone=r(c);_renderer=r(R).createRenderer(null,null);_styleLoader=r(z);_monitoredElements=new Map;constructor(){}monitor(e){if(!this._platform.isBrowser)return I;this._styleLoader.load(X);let t=b(e),i=this._monitoredElements.get(t);if(i)return i.subject;let n=new d,o="cdk-text-field-autofilled",a=l=>{l.animationName==="cdk-text-field-autofill-start"&&!t.classList.contains(o)?(t.classList.add(o),this._ngZone.run(()=>n.next({target:l.target,isAutofilled:!0}))):l.animationName==="cdk-text-field-autofill-end"&&t.classList.contains(o)&&(t.classList.remove(o),this._ngZone.run(()=>n.next({target:l.target,isAutofilled:!1})))},W=this._ngZone.runOutsideAngular(()=>(t.classList.add("cdk-text-field-autofill-monitored"),this._renderer.listen(t,"animationstart",a,J)));return this._monitoredElements.set(t,{subject:n,unlisten:W}),n}stopMonitoring(e){let t=b(e),i=this._monitoredElements.get(t);i&&(i.unlisten(),i.subject.complete(),t.classList.remove("cdk-text-field-autofill-monitored"),t.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(t))}ngOnDestroy(){this._monitoredElements.forEach((e,t)=>this.stopMonitoring(t))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=C({token:s,factory:s.\u0275fac,providedIn:"root"})}return s})();var $=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275mod=u({type:s});static \u0275inj=h({})}return s})();var Q=["button","checkbox","file","hidden","image","radio","range","reset","submit"],ee=new A("MAT_INPUT_CONFIG"),Ne=(()=>{class s{_elementRef=r(f);_platform=r(_);ngControl=r(L,{optional:!0,self:!0});_autofillMonitor=r(K);_ngZone=r(c);_formField=r(Z,{optional:!0});_renderer=r(p);_uid=r(O).getId("mat-input-");_previousNativeValue;_inputValueAccessor;_signalBasedValueAccessor;_previousPlaceholder;_errorStateTracker;_config=r(ee,{optional:!0});_cleanupIosKeyup;_cleanupWebkitWheel;_isServer;_isNativeSelect;_isTextarea;_isInFormField;focused=!1;stateChanges=new d;controlType="mat-input";autofilled=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=m(e),this.focused&&(this.focused=!1,this.stateChanges.next())}_disabled=!1;get id(){return this._id}set id(e){this._id=e||this._uid}_id;placeholder;name;get required(){return this._required??this.ngControl?.control?.hasValidator(B.required)??!1}set required(e){this._required=m(e)}_required;get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&x().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}_type="text";get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}userAriaDescribedBy;get value(){return this._signalBasedValueAccessor?this._signalBasedValueAccessor.value():this._inputValueAccessor.value}set value(e){e!==this.value&&(this._signalBasedValueAccessor?this._signalBasedValueAccessor.value.set(e):this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=m(e)}_readonly=!1;disabledInteractive;get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}_neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(e=>x().has(e));constructor(){let e=r(P,{optional:!0}),t=r(V,{optional:!0}),i=r(U),n=r(j,{optional:!0,self:!0}),o=this._elementRef.nativeElement,a=o.nodeName.toLowerCase();n?w(n.value)?this._signalBasedValueAccessor=n:this._inputValueAccessor=n:this._inputValueAccessor=o,this._previousNativeValue=this.value,this.id=this.id,this._platform.IOS&&this._ngZone.runOutsideAngular(()=>{this._cleanupIosKeyup=this._renderer.listen(o,"keyup",this._iOSKeyupListener)}),this._errorStateTracker=new G(i,this.ngControl,t,e,this.stateChanges),this._isServer=!this._platform.isBrowser,this._isNativeSelect=a==="select",this._isTextarea=a==="textarea",this._isInFormField=!!this._formField,this.disabledInteractive=this._config?.disabledInteractive||!1,this._isNativeSelect&&(this.controlType=o.multiple?"mat-native-select-multiple":"mat-native-select"),this._signalBasedValueAccessor&&D(()=>{this._signalBasedValueAccessor.value(),this.stateChanges.next()})}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._cleanupIosKeyup?.(),this._cleanupWebkitWheel?.()}ngDoCheck(){this.ngControl&&(this.updateErrorState(),this.ngControl.disabled!==null&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}updateErrorState(){this._errorStateTracker.updateErrorState()}_focusChanged(e){if(e!==this.focused){if(!this._isNativeSelect&&e&&this.disabled&&this.disabledInteractive){let t=this._elementRef.nativeElement;t.type==="number"?(t.type="text",t.setSelectionRange(0,0),t.type="number"):t.setSelectionRange(0,0)}this.focused=e,this.stateChanges.next()}}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let t=this._elementRef.nativeElement;this._previousPlaceholder=e,e?t.setAttribute("placeholder",e):t.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Q.indexOf(this._type)>-1}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!this._isNeverEmpty()&&!this._elementRef.nativeElement.value&&!this._isBadInput()&&!this.autofilled}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,t=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&t&&t.label)}else return this.focused&&!this.disabled||!this.empty}get describedByIds(){return this._elementRef.nativeElement.getAttribute("aria-describedby")?.split(" ")||[]}setDescribedByIds(e){let t=this._elementRef.nativeElement;e.length?t.setAttribute("aria-describedby",e.join(" ")):t.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}_iOSKeyupListener=e=>{let t=e.target;!t.value&&t.selectionStart===0&&t.selectionEnd===0&&(t.setSelectionRange(1,1),t.setSelectionRange(0,0))};_getReadonlyAttribute(){return this._isNativeSelect?null:this.readonly||this.disabled&&this.disabledInteractive?"true":null}static \u0275fac=function(t){return new(t||s)};static \u0275dir=g({type:s,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:21,hostBindings:function(t,i){t&1&&v("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),t&2&&(F("id",i.id)("disabled",i.disabled&&!i.disabledInteractive)("required",i.required),T("name",i.name||null)("readonly",i._getReadonlyAttribute())("aria-disabled",i.disabled&&i.disabledInteractive?"true":null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),H("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mat-mdc-input-disabled-interactive",i.disabledInteractive)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly",disabledInteractive:[2,"disabledInteractive","disabledInteractive",y]},exportAs:["matInput"],features:[N([{provide:q,useExisting:s}]),k]})}return s})(),De=(()=>{class s{static \u0275fac=function(t){return new(t||s)};static \u0275mod=u({type:s});static \u0275inj=h({imports:[M,E,E,$,M]})}return s})();export{Ne as a,De as b};
|