marketplacepos 2.4.9 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,_,a)=>{a.r(_),a.d(_,{LoginModule:()=>I});var f=a(6895),c=a(4006),e=a(4650),d=a(8252),m=a(1318);let b=(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Lazada"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addChannelLazada()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code))}}),o})();var C=a(7185);let x=(()=>{class o{constructor(){}getBrowserName(){const t=window.navigator.userAgent.toLowerCase();switch(!0){case t.indexOf("edge")>-1||t.indexOf("edg")>-1:return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var v=a(8002);const w=["domainAutoFocus"],y=["passAutoFocus"];function Z(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Domain is required "),e.qZA())}function M(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Please enter a valid dealpos domain "),e.qZA())}function O(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,Z,2,0,"p",39),e.YNc(2,M,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(18);e.xp6(1),e.Q6J("ngIf",t.errors.required),e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function P(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Username is required "),e.qZA())}function T(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,P,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(24);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}const A=function(o,r){return{"fa-eye":o,"fa-eye-slash":r}};function k(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"i",40),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.hideShowPassword())}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("ngClass",e.WLB(1,A,"eye-off"==t.passwordIcon,"eye"==t.passwordIcon))}}function U(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Password is required "),e.qZA())}function S(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,U,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function q(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",41),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.redirectForgetPass())}),e._uU(1,"Forgot Password?"),e.qZA()}}const z=[{path:"",component:(()=>{class o{constructor(t,n,i,s,l,u){this.http=t,this._router=n,this.elementRef=i,this.toastr=s,this.checkBrowser=l,this.konversi=u,this.login={Host:"",Username:"",Password:""},this.passwordType="password",this.passwordIcon="eye-off",this.getCookies();var p=JSON.parse(window.localStorage.getItem("user"));let h=new Date;null!=p&&(null!=p.expiredAt?window.localStorage.removeItem("user"):new Date(p.Token.expiredAt)>h&&this._router.navigate(["menu"]))}ngOnInit(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}getCookies(){let t=localStorage.getItem("Authorization");if(null!=t){let n=JSON.parse(t);this.login.Host=n.Host,this.login.Username=n.Username}}setAutoFocusDomain(){this.domainElementRef.nativeElement.focus()}setAutoFocusPass(){this.passElementRef.nativeElement.focus()}DoLogin(){this.http.post("/api/token/Login",this.login).subscribe(t=>{if(null!=t.Token.access_token){window.localStorage.removeItem("user"),window.localStorage.setItem("user",JSON.stringify(t));let n="This user is lack of these following roles :",i=!0,s=!0,l=!0,u=!0,p=this.konversi.GetRoles();null==p.find(g=>"Sell"==g)&&(i=!1,n=`${n} <br/> Sell Create`),null==p.find(g=>"SellEditor"==g)&&(s=!1,n=`${n} <br/> Sell Editor`),null==p.find(g=>"DelC"==g)&&(l=!1,n=`${n} <br/> Delivery Create`),null==p.find(g=>"PayC"==g)&&(u=!1,n=`${n} <br/> Payment Create`),(!i||!s||!l||!u)&&this.toastr.warning(n,"Warning!",{enableHtml:!0}),window.localStorage.removeItem("Intercom"),window.localStorage.setItem("Intercom",JSON.stringify(t.IntercomWidget)),window.localStorage.removeItem("Authorization"),window.localStorage.setItem("Authorization",JSON.stringify({Host:this.login.Host,Username:this.login.Username})),this._router.navigate(t.Channel.length<1?["menu/channel"]:["menu"])}})}redirectForgetPass(){window.location=this.makeForgotPassLink()}makeForgotPassLink(){var t=this.login.Host;return"/"==t[t.length-1]&&(t=t.slice(0,-1)),t.includes("https://")||(t="https://"+t),t+"/ForgotPassword"}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(m.O),e.Y36(d.F0),e.Y36(e.SBq),e.Y36(C._W),e.Y36(x),e.Y36(v.e))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-login"]],viewQuery:function(t,n){if(1&t&&(e.Gf(w,5),e.Gf(y,5)),2&t){let i;e.iGM(i=e.CRH())&&(n.domainElementRef=i.first),e.iGM(i=e.CRH())&&(n.passElementRef=i.first)}},decls:60,vars:9,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["src","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[1,"card"],[1,"card-body"],[1,"card-title"],[1,"ms-2","fw-normal","font-xl","robotoslab"],[1,"mt-10"],[1,"form-label-group"],["type","text","required","","name","Host","id","inputHost","placeholder","POS Domain (xyz.dealpos.com)","pattern","(https:\\/\\/)?\\w+.dealpos(.com|.net|.co.id)(\\/)?",1,"form-control","text-start",3,"ngModel","ngModelChange"],["domainAutoFocus","","domain","ngModel"],["for","inputHost",1,"text-start"],["class","text-danger",4,"ngIf"],["type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["username","ngModel"],["for","inputUsername",1,"text-start"],[1,"form-label-group","mb-5","mb-sm-2"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passAutoFocus","","password","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"row","justify-content-between","align-items-center"],[1,"col-12","col-lg-auto","order-first","order-lg-last"],["href","#",3,"click",4,"ngIf"],[1,"col-12","col-lg-5","order-last","order-lg-last","text-end"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-1rem","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-1rem","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"],["href","#",3,"click"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4,"DealPOS Omnichannel"),e.qZA(),e._UZ(5,"img",4),e.qZA(),e.TgZ(6,"div",5)(7,"h1",6),e._uU(8,"DealPOS X Marketplace"),e.qZA(),e.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"h2",10),e._uU(13,"Sign in"),e.qZA()(),e.TgZ(14,"form",11)(15,"div",12)(16,"input",13,14),e.NdJ("ngModelChange",function(s){return n.login.Host=s}),e.qZA(),e.TgZ(19,"label",15),e._uU(20,"POS Domain (xyz.dealpos.com)"),e.qZA()(),e.YNc(21,O,3,2,"div",16),e.TgZ(22,"div",12)(23,"input",17,18),e.NdJ("ngModelChange",function(s){return n.login.Username=s}),e.qZA(),e.TgZ(25,"label",19),e._uU(26,"Username"),e.qZA()(),e.YNc(27,T,2,1,"div",16),e.TgZ(28,"div",20)(29,"input",21,22),e.NdJ("ngModelChange",function(s){return n.login.Password=s}),e.qZA(),e.TgZ(32,"label",23),e._uU(33,"Password"),e.qZA(),e.YNc(34,k,1,4,"i",24),e.qZA(),e.YNc(35,S,2,1,"div",16),e.TgZ(36,"div",25)(37,"div",26),e.YNc(38,q,2,0,"a",27),e.qZA(),e.TgZ(39,"div",28)(40,"button",29),e.NdJ("click",function(){return n.DoLogin()}),e._uU(41,"Log in"),e.qZA()()()()()()(),e.TgZ(42,"div",30)(43,"p",31),e._uU(44,"Powered by : "),e.qZA(),e.TgZ(45,"a",32),e._UZ(46,"img",33),e.qZA(),e._UZ(47,"br"),e.TgZ(48,"a",34),e._uU(49,"Version 2.4.9"),e.qZA()()()(),e.TgZ(50,"footer",35)(51,"div",25)(52,"div",36)(53,"p",31),e._uU(54,"Powered by : "),e.qZA(),e.TgZ(55,"a",32),e._UZ(56,"img",33),e.qZA()(),e.TgZ(57,"div",37)(58,"a",34),e._uU(59,"Version 2.4.9"),e.qZA()()()()),2&t){const i=e.MAs(18),s=e.MAs(24),l=e.MAs(31);e.xp6(16),e.Q6J("ngModel",n.login.Host),e.xp6(5),e.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),e.xp6(2),e.Q6J("ngModel",n.login.Username),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(2),e.Q6J("type",n.passwordType)("ngModel",n.login.Password),e.xp6(5),e.Q6J("ngIf",""!=n.login.Password&&"edge"!=n.browser),e.xp6(1),e.Q6J("ngIf",l.invalid&&(l.dirty||l.touched)),e.xp6(3),e.Q6J("ngIf",i.valid)}},dependencies:[f.mk,f.O5,c._Y,c.Fj,c.JJ,c.JL,c.Q7,c.c5,c.On,c.F],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}"]}),o})(),data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",t).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Shopee"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your shopID is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addShopee()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"tiktok",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code,this.state=t.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Tiktok"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"div"),e._uU(18," Your State is "),e.TgZ(19,"span",8),e._uU(20),e.qZA()(),e.TgZ(21,"button",9),e.NdJ("click",function(){return n.addChannelTiktok()}),e._UZ(22,"i",10),e._uU(23," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code),e.xp6(4),e.Oqu(n.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"lazada",component:b,data:{title:"Success"}}];let L=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[d.Bz.forChild(z),d.Bz]}),o})(),I=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[f.ez,c.u5,L]}),o})()}}]);
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[369],{9369:(Y,_,a)=>{a.r(_),a.d(_,{LoginModule:()=>I});var f=a(6895),c=a(4006),e=a(4650),d=a(8252),m=a(1318);let b=(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code})}addChannelLazada(){this.http.post("/api/ChannelAdd/AddLazada",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Lazada"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addChannelLazada()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code))}}),o})();var C=a(7185);let x=(()=>{class o{constructor(){}getBrowserName(){const t=window.navigator.userAgent.toLowerCase();switch(!0){case t.indexOf("edge")>-1||t.indexOf("edg")>-1:return"edge";case t.indexOf("opr")>-1:return"opera";case t.indexOf("chrome")>-1:return"chrome";case t.indexOf("trident")>-1:return"ie";case t.indexOf("firefox")>-1:return"firefox";case t.indexOf("safari")>-1:return"safari";default:return"other"}}}return o.\u0275fac=function(t){return new(t||o)},o.\u0275prov=e.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var v=a(8002);const w=["domainAutoFocus"],y=["passAutoFocus"];function Z(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Domain is required "),e.qZA())}function M(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Please enter a valid dealpos domain "),e.qZA())}function O(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,Z,2,0,"p",39),e.YNc(2,M,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(18);e.xp6(1),e.Q6J("ngIf",t.errors.required),e.xp6(1),e.Q6J("ngIf",t.errors.pattern)}}function P(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Username is required "),e.qZA())}function T(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,P,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(24);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}const A=function(o,r){return{"fa-eye":o,"fa-eye-slash":r}};function k(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"i",40),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.hideShowPassword())}),e.qZA()}if(2&o){const t=e.oxw();e.Q6J("ngClass",e.WLB(1,A,"eye-off"==t.passwordIcon,"eye"==t.passwordIcon))}}function U(o,r){1&o&&(e.TgZ(0,"p"),e._uU(1," Password is required "),e.qZA())}function S(o,r){if(1&o&&(e.TgZ(0,"div",38),e.YNc(1,U,2,0,"p",39),e.qZA()),2&o){e.oxw();const t=e.MAs(31);e.xp6(1),e.Q6J("ngIf",t.errors.required)}}function q(o,r){if(1&o){const t=e.EpF();e.TgZ(0,"a",41),e.NdJ("click",function(){e.CHM(t);const i=e.oxw();return e.KtG(i.redirectForgetPass())}),e._uU(1,"Forgot Password?"),e.qZA()}}const z=[{path:"",component:(()=>{class o{constructor(t,n,i,s,l,u){this.http=t,this._router=n,this.elementRef=i,this.toastr=s,this.checkBrowser=l,this.konversi=u,this.login={Host:"",Username:"",Password:""},this.passwordType="password",this.passwordIcon="eye-off",this.getCookies();var p=JSON.parse(window.localStorage.getItem("user"));let h=new Date;null!=p&&(null!=p.expiredAt?window.localStorage.removeItem("user"):new Date(p.Token.expiredAt)>h&&this._router.navigate(["menu"]))}ngOnInit(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="#dfeffc",this.browser=this.checkBrowser.getBrowserName()}ngOnDestroy(){this.elementRef.nativeElement.ownerDocument.body.style.backgroundColor="white"}getCookies(){let t=localStorage.getItem("Authorization");if(null!=t){let n=JSON.parse(t);this.login.Host=n.Host,this.login.Username=n.Username}}setAutoFocusDomain(){this.domainElementRef.nativeElement.focus()}setAutoFocusPass(){this.passElementRef.nativeElement.focus()}DoLogin(){this.http.post("/api/token/Login",this.login).subscribe(t=>{if(null!=t.Token.access_token){window.localStorage.removeItem("user"),window.localStorage.setItem("user",JSON.stringify(t));let n="This user is lack of these following roles :",i=!0,s=!0,l=!0,u=!0,p=this.konversi.GetRoles();null==p.find(g=>"Sell"==g)&&(i=!1,n=`${n} <br/> Sell Create`),null==p.find(g=>"SellEditor"==g)&&(s=!1,n=`${n} <br/> Sell Editor`),null==p.find(g=>"DelC"==g)&&(l=!1,n=`${n} <br/> Delivery Create`),null==p.find(g=>"PayC"==g)&&(u=!1,n=`${n} <br/> Payment Create`),(!i||!s||!l||!u)&&this.toastr.warning(n,"Warning!",{enableHtml:!0}),window.localStorage.removeItem("Intercom"),window.localStorage.setItem("Intercom",JSON.stringify(t.IntercomWidget)),window.localStorage.removeItem("Authorization"),window.localStorage.setItem("Authorization",JSON.stringify({Host:this.login.Host,Username:this.login.Username})),this._router.navigate(t.Channel.length<1?["menu/channel"]:["menu"])}})}redirectForgetPass(){window.location=this.makeForgotPassLink()}makeForgotPassLink(){var t=this.login.Host;return"/"==t[t.length-1]&&(t=t.slice(0,-1)),t.includes("https://")||(t="https://"+t),t+"/ForgotPassword"}hideShowPassword(){this.passwordType="text"===this.passwordType?"password":"text",this.passwordIcon="eye-off"===this.passwordIcon?"eye":"eye-off"}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(m.O),e.Y36(d.F0),e.Y36(e.SBq),e.Y36(C._W),e.Y36(x),e.Y36(v.e))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-login"]],viewQuery:function(t,n){if(1&t&&(e.Gf(w,5),e.Gf(y,5)),2&t){let i;e.iGM(i=e.CRH())&&(n.domainElementRef=i.first),e.iGM(i=e.CRH())&&(n.passElementRef=i.first)}},decls:60,vars:9,consts:[[1,"container"],[1,"row","mt-md-0","align-self-center"],[1,"col-12","col-md-7","text-center"],[1,"big-display","robotoslab","d-none","d-sm-block"],["src","https://res.cloudinary.com/pos/image/upload/v1657855612/Apps/Login/Omnichannel.png","alt","integration-image",1,"img-fluid"],[1,"col-12","col-md-5","order-first","order-md-last","mt-12"],[1,"big-display","text-center","my-5","py-5","robotoslab","d-block","d-sm-none"],[1,"card"],[1,"card-body"],[1,"card-title"],[1,"ms-2","fw-normal","font-xl","robotoslab"],[1,"mt-10"],[1,"form-label-group"],["type","text","required","","name","Host","id","inputHost","placeholder","POS Domain (xyz.dealpos.com)","pattern","(https:\\/\\/)?\\w+.dealpos(.com|.net|.co.id)(\\/)?",1,"form-control","text-start",3,"ngModel","ngModelChange"],["domainAutoFocus","","domain","ngModel"],["for","inputHost",1,"text-start"],["class","text-danger",4,"ngIf"],["type","text","name","Username","id","inputUsername","placeholder","Username","required","",1,"form-control","text-start",3,"ngModel","ngModelChange"],["username","ngModel"],["for","inputUsername",1,"text-start"],[1,"form-label-group","mb-5","mb-sm-2"],["name","Password","id","inputPassword","placeholder","Password","required","",1,"form-control","text-start",3,"type","ngModel","ngModelChange"],["passAutoFocus","","password","ngModel"],["for","inputPassword",1,"text-start"],["class","passwordIcon fas fa-lg",3,"ngClass","click",4,"ngIf"],[1,"row","justify-content-between","align-items-center"],[1,"col-12","col-lg-auto","order-first","order-lg-last"],["href","#",3,"click",4,"ngIf"],[1,"col-12","col-lg-5","order-last","order-lg-last","text-end"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-primary","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"col-12","d-block","d-md-none","text-center"],[1,"pt-1rem","me-3"],["target","_blank","href","https://www.dealpos.com"],["src","https://res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","dealpos-logo",1,"img-fluid"],["target","_blank","href","https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete",1,"pt-1rem","font-italic"],[1,"mx-5","pb-5","mb-5","d-none","d-md-block"],[1,"col-auto","d-inline-flex"],[1,"col-auto"],[1,"text-danger"],[4,"ngIf"],[1,"passwordIcon","fas","fa-lg",3,"ngClass","click"],["href","#",3,"click"]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h1",3),e._uU(4,"DealPOS Omnichannel"),e.qZA(),e._UZ(5,"img",4),e.qZA(),e.TgZ(6,"div",5)(7,"h1",6),e._uU(8,"DealPOS X Marketplace"),e.qZA(),e.TgZ(9,"div",7)(10,"div",8)(11,"div",9)(12,"h2",10),e._uU(13,"Sign in"),e.qZA()(),e.TgZ(14,"form",11)(15,"div",12)(16,"input",13,14),e.NdJ("ngModelChange",function(s){return n.login.Host=s}),e.qZA(),e.TgZ(19,"label",15),e._uU(20,"POS Domain (xyz.dealpos.com)"),e.qZA()(),e.YNc(21,O,3,2,"div",16),e.TgZ(22,"div",12)(23,"input",17,18),e.NdJ("ngModelChange",function(s){return n.login.Username=s}),e.qZA(),e.TgZ(25,"label",19),e._uU(26,"Username"),e.qZA()(),e.YNc(27,T,2,1,"div",16),e.TgZ(28,"div",20)(29,"input",21,22),e.NdJ("ngModelChange",function(s){return n.login.Password=s}),e.qZA(),e.TgZ(32,"label",23),e._uU(33,"Password"),e.qZA(),e.YNc(34,k,1,4,"i",24),e.qZA(),e.YNc(35,S,2,1,"div",16),e.TgZ(36,"div",25)(37,"div",26),e.YNc(38,q,2,0,"a",27),e.qZA(),e.TgZ(39,"div",28)(40,"button",29),e.NdJ("click",function(){return n.DoLogin()}),e._uU(41,"Log in"),e.qZA()()()()()()(),e.TgZ(42,"div",30)(43,"p",31),e._uU(44,"Powered by : "),e.qZA(),e.TgZ(45,"a",32),e._UZ(46,"img",33),e.qZA(),e._UZ(47,"br"),e.TgZ(48,"a",34),e._uU(49,"Version 2.5.0"),e.qZA()()()(),e.TgZ(50,"footer",35)(51,"div",25)(52,"div",36)(53,"p",31),e._uU(54,"Powered by : "),e.qZA(),e.TgZ(55,"a",32),e._UZ(56,"img",33),e.qZA()(),e.TgZ(57,"div",37)(58,"a",34),e._uU(59,"Version 2.5.0"),e.qZA()()()()),2&t){const i=e.MAs(18),s=e.MAs(24),l=e.MAs(31);e.xp6(16),e.Q6J("ngModel",n.login.Host),e.xp6(5),e.Q6J("ngIf",i.invalid&&(i.dirty||i.touched)),e.xp6(2),e.Q6J("ngModel",n.login.Username),e.xp6(4),e.Q6J("ngIf",s.invalid&&(s.dirty||s.touched)),e.xp6(2),e.Q6J("type",n.passwordType)("ngModel",n.login.Password),e.xp6(5),e.Q6J("ngIf",""!=n.login.Password&&"edge"!=n.browser),e.xp6(1),e.Q6J("ngIf",l.invalid&&(l.dirty||l.touched)),e.xp6(3),e.Q6J("ngIf",i.valid)}},dependencies:[f.mk,f.O5,c._Y,c.Fj,c.JJ,c.JL,c.Q7,c.c5,c.On,c.F],styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}"]}),o})(),data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.shopID=t.shop_id,this.code=t.code})}addShopee(){let t={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",t).subscribe(i=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Shopee"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your shopID is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"button",9),e.NdJ("click",function(){return n.addShopee()}),e._UZ(18,"i",10),e._uU(19," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.shopID))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"tiktok",component:(()=>{class o{constructor(t,n,i){this.route=t,this.http=n,this.service=i}ngOnInit(){this.route.queryParams.subscribe(t=>{this.code=t.code,this.state=t.state})}addChannelTiktok(){this.http.post("/api/ChannelAdd/AddTiktok",{Code:this.code}).subscribe(n=>{this.service.navigate(["/menu/channel"])})}}return o.\u0275fac=function(t){return new(t||o)(e.Y36(d.gz),e.Y36(m.O),e.Y36(d.F0))},o.\u0275cmp=e.Xpm({type:o,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container"],[1,"row","d-flex","justify-content-center"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-5",3,"click"],[1,"fas","fa-undo"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"div",6),e._uU(7,"Success !"),e.qZA()(),e.TgZ(8,"div",7)(9,"div"),e._uU(10,"You have successfully authorized "),e.qZA(),e.TgZ(11,"div"),e._uU(12,"DEALPOS to manage your Tiktok"),e.qZA(),e.TgZ(13,"div"),e._uU(14," Your Code is "),e.TgZ(15,"span",8),e._uU(16),e.qZA()(),e.TgZ(17,"div"),e._uU(18," Your State is "),e.TgZ(19,"span",8),e._uU(20),e.qZA()(),e.TgZ(21,"button",9),e.NdJ("click",function(){return n.addChannelTiktok()}),e._UZ(22,"i",10),e._uU(23," Add to my Channel"),e.qZA()()()()()()),2&t&&(e.xp6(16),e.Oqu(n.code),e.xp6(4),e.Oqu(n.state))},styles:[".container[_ngcontent-%COMP%]{position:absolute;max-width:100%}.card[_ngcontent-%COMP%]{margin-bottom:30px;padding-bottom:5px;padding-top:5px}.passwordIcon[_ngcontent-%COMP%]{top:1.8rem;right:.8rem;position:absolute;margin:0 auto!important;cursor:pointer}.big-display[_ngcontent-%COMP%]{font-size:2rem;font-weight:300;line-height:1.2}@media (min-width: 768px){.container[_ngcontent-%COMP%]{max-width:70%;top:50%;left:50%;transform:translate(-50%) translateY(-50%)}.big-display[_ngcontent-%COMP%]{font-size:3rem}}html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{height:100%}body[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:40px;padding-bottom:40px}footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:90%;left:3rem}.pt-1rem[_ngcontent-%COMP%]{padding-top:1rem}.form-label-group[_ngcontent-%COMP%] > label[_ngcontent-%COMP%]{color:#666}.font-xl[_ngcontent-%COMP%]{font-size:x-large}.font125rem[_ngcontent-%COMP%]{font-size:1.25rem}.robotoslab[_ngcontent-%COMP%]{font-family:Roboto Slab}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]}),o})(),data:{title:"Success"}},{path:"lazada",component:b,data:{title:"Success"}}];let L=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[d.Bz.forChild(z),d.Bz]}),o})(),I=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.oAB({type:o}),o.\u0275inj=e.cJS({imports:[f.ez,c.u5,L]}),o})()}}]);