1"use strict";(self.webpackChunkroot=self.webpackChunkroot||[]).push([[8740,7464,3726,3432],{36467:(O,E,o)=>{o.d(E,{g:()=>f});var d=o(97582),a=o(5e3),i=o(7628),m=o(45485);let f=(()=>{class u{constructor(l,n,s,e,g){this.ngZone=l,this.context=n,this.dataService=s,this.configService=e,this.platformService=g,console.log("NotificationService constructor")}register(l,n,s){}subscribeTopic(l){}subscribeGlobalTopic(l,n,s){return(0,d.mG)(this,void 0,void 0,function*(){})}hasPermission(l){l(!1)}registerPushToken(l){return(0,d.mG)(this,void 0,void 0,function*(){})}}return u.\u0275fac=function(l){return new(l||u)(a.LFG(a.R0b),a.LFG(i._y),a.LFG(i.Do),a.LFG(i.E4),a.LFG(m.m))},u.\u0275prov=a.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},77147:(O,E,o)=>{o.d(E,{H:()=>s});var d=o(29961),a=o(5e3),i=o(51062),m=o(99826),f=o(76667),u=o(57618),v=o(7894),l=o(15601),n=o(7628);let s=(()=>{class e{constructor(r){this.ref=r.get(a.sBO),this.configService=r.get(n.E4),this.t=r.get(i.sK),this.context=r.get(n.Y_),this.router=r.get(m.F0),this.route=r.get(m.gz),this.routingService=r.get(f.Z),this.dataService=r.get(u.D),this.storeService=r.get(v.d),this.addressService=r.get(d.D),this.systemConfigService=r.get(l.c)}detectChanges(){setTimeout(()=>{this.ref.detectChanges()},10)}setBusy(r){this.context.app.setBusy(r)}getImage(r,p,S=300){var C=null;return r.images&&r.images[p]&&(C=r.images[p].url),C}showAlert(r,p,S=["OK"]){this.context.app.showAlert(r,p,S)}showError(r){this.context.app.showError(r)}showToast(r){this.context.app.showToast(r)}showSnack(r,p,S){this.context.app.showSnack(r,p,S)}loading(r,p=null){this.context.app.loading(r,p)}superloading(r){this.context.app.superloading(r)}isDev(){return this.configService.isDev()}isPrd(){return this.configService.isPrd()}getLangValue(r,p,S=null){S||(S=this.context.contentLang);var C=null;return S&&-1==S.indexOf("en")&&(C=r[p+"_"+S]),C||(C=r[p]),C}isAdmin(){return this.context.admin}}return e.\u0275fac=function(r){return new(r||e)(a.Y36(a.zs3))},e.\u0275cmp=a.Xpm({type:e,selectors:[["ng-component"]],decls:0,vars:0,template:function(r,p){},encapsulation:2}),e})()},87267:(O,E,o)=>{o.d(E,{n:()=>j,U:()=>k});var d=o(7628),a=o(45485),i=o(8744),m=o(74663),f=o(15612),u=o(69808);const v=void 0,n=["en-GB",[["a","p"],["am","pm"],v],[["am","pm"],v,v],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],v,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sept","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],v,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],1,[6,0],["dd/MM/y","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",v,"{1} 'at' {0}",v],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"GBP","\xa3","British Pound",{JPY:["JP\xa5","\xa5"],USD:["US$","$"]},"ltr",function l(x){const t=Math.floor(Math.abs(x)),c=x.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===c?1:5}],s=void 0,g=["zh-Hans",[["\u4e0a\u5348","\u4e0b\u5348"],s,s],s,[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"]],s,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]],s,[["\u516c\u5143\u524d","\u516c\u5143"],s,s],0,[6,0],["y/M/d","y\u5e74M\u6708d\u65e5",s,"y\u5e74M\u6708d\u65e5EEEE"],["HH:mm","HH:mm:ss","z HH:mm:ss","zzzz HH:mm:ss"],["{1} {0}",s,s,s],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"CNY","\xa5","\u4eba\u6c11\u5e01",{AUD:["AU$","$"],BYN:[s,"\u0440."],CNY:["\xa5"],ILR:["ILS"],JPY:["JP\xa5","\xa5"],KRW:["\uffe6","\u20a9"],PHP:[s,"\u20b1"],RUR:[s,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",function e(x){return 5}
1],r=void 0,S=["zh-Hans-HK",[["\u4e0a\u5348","\u4e0b\u5348"],r,r],r,[["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"],["\u661f\u671f\u65e5","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d"],["\u5468\u65e5","\u5468\u4e00","\u5468\u4e8c","\u5468\u4e09","\u5468\u56db","\u5468\u4e94","\u5468\u516d"]],r,[["1","2","3","4","5","6","7","8","9","10","11","12"],["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]],r,[["\u516c\u5143\u524d","\u516c\u5143"],r,r],0,[6,0],["d/M/yy","y\u5e74M\u6708d\u65e5",r,"y\u5e74M\u6708d\u65e5EEEE"],["ah:mm","ah:mm:ss","z ah:mm:ss","zzzz ah:mm:ss"],["{1} {0}",r,r,r],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"HKD","HK$","\u6e2f\u5143",{AUD:["AU$","$"],BYN:[r,"\u0440."],ILR:["ILS"],JPY:["JP\xa5","\xa5"],KRW:["\uffe6","\u20a9"],PHP:[r,"\u20b1"],RUR:[r,"\u0440."],TWD:["NT$"],USD:["US$","$"],XXX:[]},"ltr",function p(x){return 5}];var C=o(5e3),A=o(48966),B=o(57261),W=o(99826),F=o(51062),K=o(49663),U=o(46621),b=o(21865),H=o(93664),J=o(98379),Z=o(57618),Y=o(76667),G=o(7894),w=o(15601),$=o(29961),X=o(32083),V=o(7321),Q=o(36467);let j=(()=>{class x{constructor(t){this.active=!1,this.winWidth=window.innerWidth,this.autoDismissPreLoader=!0,this.offerDateFormatStr="yyyy-MM-dd HH:mm",this.configService=t.get(d.E4),this.ref=t.get(C.sBO),this.route=t.get(W.gz),this.router=t.get(W.F0),this.navParams=new i.t,this.navParams.route=this.route,this.context=t.get(d.Y_),this.dialogCtr=t.get(A.uw),this.snackBar=t.get(B.ux),this.routerLoc=t.get(u.Ye),this.t=t.get(F.sK),this.dataService=t.get(Z.D),this.routingService=t.get(Y.Z),this.coreRoutingService=t.get(f.Z),this.storeService=t.get(G.d),this.dialogService=t.get(d.xA),this.addressService=t.get($.D),this.systemConfigService=t.get(w.c),this.navParams.querys=this.route.snapshot.queryParams,this.navParams.params=this.route.snapshot.params,this.navParams.input=this.coreRoutingService.getAuxInput(),this.member=this.context.member,this.membership=this.context.membership,this.group=this.context.group,this.brand=this.context.brand,this.store=this.context.store,this.court=this.context.court,this.zone=t.get(C.R0b),this.appRef=t.get(C.z2F),this.settingManager=t.get(m.y),this.memberContextManager=t.get(d.VD),this.coreContext=t.get(d._y),this.platformService=t.get(a.m),this.adService=t.get(X.P),this.analyticsService=t.get(d.yD),this.notifyService=t.get(Q.g),(0,u.qS)(S,"zh"),(0,u.qS)(n,"en"),(0,u.qS)(g,"zh-cn")}getNav(t){const c=t.getRootNav();return c&&c.length>0?c[0]:t.getActiveNav("nav")}superloading(t){this.defaultSuperloading(t)}defaultSuperloading(t){t?this.superLoader=this.dialogCtr.open(J.q,{data:{},disableClose:!0}):this.superLoader&&(this.superLoader.close(),this.superLoader=null)}loading(t,c=null){this.context.app.loading(t,c)}setBusy(t){this.context.app.setBusy(t)}ngAfterViewInit(){this.autoDismissPreLoader&&this.dismissPreLoader()}showError(t,c=!0){console.log(t),this.superloading(!1),0==t.status?this.showAlert("",this.t.instant("global.network-error")):401==t.status&&c?(this.memberContextManager.nativeLogout(),this.showAlert(this.t.instant("global.auth-error"),this.t.instant("global.auth-error-msg"),h=>{this.logout()})):this.showAlert(t.status,t.error)}showAlert(t,c,h=(M=>{}),P=!1,_=!1,D={}){const M=this.dialogCtr.open(U.h,Object.assign({data:{title:t,message:c,showCancel:P},disableClose:_},D));return M.afterClosed().subscribe(y=>{switch(y){case"confirm":case"cancel":h&&h(y);break;default:h&&h("bg")}}),M}openDialog(t,c,h,P){return this.dialogCtr.open(t,{data:c,panelClass:h,backdropClass:P})}showToast(t,c=2e3,h="bottom"){this.snackBar.open(t,null,{duration:c,verticalPosition:h})}showSnack(t,c,h){this.snackBar.open(t,c,{duration:5e3}).onAction().subscribe(h)}getUIRefreshInterval(){return 0}onRefreshUI(){console.log("you need to implment onRefreshUI")}startTimer(t){this.timer||(console.log("start timer"),this.timer=setInterval(()=>{this.onRefreshUI()},t))}stopTimer(){this.timer&&(console.log("stop timer"),clearInterval(this.timer),this.timer=null)}ngOnInit(){const t=this.getUIRefreshInterval();t>500&&this.startTimer(t)}ngOnDestroy(){this.stopTimer()}detectChanges(){setTimeout(()=>{this.ref.detectChanges()},10)}back(){this.coreRoutingService.back()}canBack(){return this.coreRoutingService.canBack()}hasMenu(){return this.coreRoutingService.hasMenu()&&!this.settingManager.get("appHideTabbarMenu",!1)}isRoot(){return this.coreRoutingService.isRoot()}
1isTab(){return 1==this.route.snapshot.data.tab}isMenu(){return this.route.snapshot.data&&1==this.route.snapshot.data.menu}showMenu(){console.log("menuClicked"),this.context.app.openDrawer()}clearReuse(){this.router.routeReuseStrategy.clear()}showConfirm(t,c,h={}){const P=h.cancelText?h.cancelText:this.t.instant("buttons.cancel"),_=h.okText?h.okText:this.t.instant("buttons.ok");return this.dialogCtr.open(b.$,{data:{title:t,message:c,cancel:P,ok:_}}).afterClosed()}setContextData(t){if(!t)return;const c=this.context;this.context.directoryData=t;const h=t.brand;!h||(c.brand=h,c.languages=h.languages||["en"],c.language=h.language||"en",c.admin=!1,c.contentLang=c.language,c.country=t.country,c.currency=t.currency,c.crm=t.crm,c.form=t.form,c.config=t.config,c.payments=t.payments,c.agreements=t.agreements,c.save())}loadContext(t,c){if(!this.context.brandId)return;t&&this.superloading(!0);const P={brandId:this.context.brandId,channel:"app",fields:"stores"};this.configService.isPrd()||(P.v=5),this.dataService.get("/api/v1/store/directory.json",P).subscribe(_=>{t&&this.superloading(!1),console.log(_),this.setContextData(_),this.setTheme(_.brand),c&&c(_)},_=>{t&&this.superloading(!1),console.log(_)})}setTheme(t){if(t){const c=document.getElementsByTagName("body")[0];c.classList.forEach(h=>{h.endsWith("-theme")&&c.classList.remove(h)}),c.classList.add(t.handle+"-theme")}}logout(){this.dataService.get("/api/v1/store/logout.json").subscribe({next:()=>{this.context.logout(),this.configService.clearSessionId()},error:c=>{console.log("error",c)}})}isDev(){return 1==this.configService.get("dev")}isPrd(){return 1==this.configService.get("production")}dismissPreLoader(){var t=window;t.dismissPreLoader&&t.dismissPreLoader();try{V.c.hide()}catch(c){}}crmHasFeature(t){return this.context.crm&&this.context.crm.features&&this.context.crm.features.indexOf(t)>=0}trackingScreen(t){try{this.context.app.firebaseAnalyticsService.trackingScreen(t)}catch(c){console.log("JJ: trackingScreen -> error",c)}}trackingEvent(t,c,h,P){try{this.context.app.firebaseAnalyticsService.trackingEvent(t,c,h,P)}catch(_){console.log("JJ: trackingEvent -> error",_)}}getBrandLink(t,c){if(!c)return;let h=this.context.brand&&this.context.brand.links&&this.context.brand.links[t]&&this.context.brand.links[t].url||"";h?c(h):this.loadContext(!0,P=>{let _=this.context.brand&&this.context.brand.links&&this.context.brand.links[t]&&this.context.brand.links[t].url||"";_&&c(_)})}containsBrandLink(t){return this.context.brand&&this.context.brand.links&&this.context.brand.links[t]&&this.context.brand.links[t].url}languageClick(t){var c,h,P,_,D,M,y,T;if(!(null===(h=null===(c=window.aigens)||void 0===c?void 0:c.context)||void 0===h)&&h.userLang&&(window.aigens.context.userLang=t),this.context.userLang===t)return;console.log("set system language to: ",t),this.context.userLang=t,this.context.save(),this.t.use(t),this.configService.setLocale(t);const L={zh:"zh-Hant","zh-cn":"zh-Hans"},I=this.context.userLang;if(document.documentElement.setAttribute("lang",I in L?L[I]:I),null!==(P=this.context)&&void 0!==P&&P.brand)var R=null===(D=null===(_=this.context)||void 0===_?void 0:_.brand)||void 0===D?void 0:D.languages;else null!==(M=this.context)&&void 0!==M&&M.court&&(R=null===(y=this.context.court)||void 0===y?void 0:y.languages);this.notifyService.subscribeGlobalTopic(null===(T=this.context)||void 0===T?void 0:T.brandId,t,R)}goOrdering(){var t,c,h,P,_,D,M,y,T,L;if(this.storeService.isSingleStoreMode())this.storeService.openByod(this.storeService.mode,this.storeService.spot,this.storeService.spotKey);else if(1===(null===(c=null===(t=this.context.brand)||void 0===t?void 0:t.stores)||void 0===c?void 0:c.length))if(1===(null===(P=null===(h=this.context.brand)||void 0===h?void 0:h.stores)||void 0===P?void 0:P.length)&&(this.context.store=this.context.brand.stores[0]),console.log(this.context.store),this.context.store){if(this.storeService.setCurrentStore(this.context.store),!this.storeService.isCurrentStoreOpened())return void(null!==(D=null===(_=null==this?void 0:this.context)||void 0===_?void 0:_.store)&&void 0!==D&&D.closed?this.showAlert(this.t.instant("crm.home.home-page.store-temp-closed-title"),(null===(y=null===(M=this.context)||void 0===M?void 0:M.store)||void 0===y?void 0:y.closedMessage)||""):this.showAlert("",this.t.instant("crm.home.home-page.store-closed-msg")));const I=(0,K.Z)(null===(L=null===(T=this.context)||void 0===T?void 0:T.store)||void 0===L?void 0:L.modes,["dinein","takeaway","pickup"]);if(1==I.length)return void this.storeService.openByod(I[0]);this.dialogCtr.open(H.u,{data:{modes:I}}).afterClosed().subscribe(R=>{R&&this.storeService.openByod(R)})}else this.routingService.goDirectory();else this.routingService.goDirectory()}checkMember(t=!1){}checkRewardDiscountMode(t){var c,h,P,_,D,M,y;let T=this.navParams.get("mode")||"takeaway",L=!(null!==(h=null===(c=null==t?void 0:t.reward)||void 0===c?void 0:c.discount)&&void 0!==h&&h.modes)||(null===(D=null===(_=null===(P=null==t?void 0:t.reward)||void 0===P?void 0:P.discount)||void 0===_?void 0:_.modes)||void 0===D?void 0:D.includes(T));return L||console.log((null==t?void 0:t.reward.name)+" filter offer by mode",T,null===(y=null===(M=null==t?void 0:t.reward)||void 0===M?void 0:M.discount)||void 0===y?void 0:y.modes),L}displayFillProfileAlert(t=null){this.showConfirm("",this.t.instant("crm.reward.need-fill-profile-msg"),{okText:this.t.instant("crm.reward.fill-profile-btn")}).subscribe(c=>{"confirm"==c?this.routingService.goFillProfile():t&&t()})}}return x.\u0275fac=function(t){return new(t||x)(C.Y36(C.zs3))},x.\u0275cmp=C.Xpm({type:x,selectors:[["ng-component"]],decls:0,vars:0,template:function(t,c){},encapsulation:2}),x})();var k=(()=>{return(x=k||(k={})).termsOfUse="byodTc",x.regTermsOfUse="regTc",x.privacyPolicy="privacyPolicy",x.aboutUs="aboutUs",x.memberPrivileges="memberPrivilege",x.surveyApp="surveyApp",k;var x})()},25069:(O,E,o)=>{o.d(E,{W:()=>u});var d=o(5e3),a=o(69808),i=o(25245),m=o(47703),f=o(39165);let u=(()=>{class v{constructor(n){this.location=n,this.backButtonClick=new d.vpe}ngOnInit(){}onBackButtonClick(){this.backButtonClick.emit()}}return v.\u0275fac=function(n){return new(n||v)(d.Y36(a.Ye))},v.\u0275cmp=d.Xpm({type:v,selectors:[["app-back-button"]],outputs:{backButtonClick:"backButtonClick"},decls:3,vars:0,consts:[["mat-icon-button","","appThrottleClick","","type","button",1,"my-back-button",3,"throttleClick"]],template:function(n,s){1&n&&(d.TgZ(0,"button",0),d.NdJ("throttleClick",function(){return s.onBackButtonClick()}
1),d.TgZ(1,"mat-icon"),d._uU(2,"arrow_back_ios"),d.qZA()())},dependencies:[i.Hw,m.lW,f.j],styles:[".my-back-button[_ngcontent-%COMP%]{background:none;border:none}.my-back-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.2rem}.icon-toolbar[_ngcontent-%COMP%]{font-size:1rem}"]}),v})()},46621:(O,E,o)=>{o.d(E,{h:()=>v});var d=o(48966),a=o(5e3),i=o(69808),m=o(47703),f=o(51062);function u(l,n){1&l&&(a.TgZ(0,"button",5),a._uU(1),a.ALo(2,"translate"),a.qZA()),2&l&&(a.xp6(1),a.Oqu(a.lcZ(2,1,"buttons.cancel")))}let v=(()=>{class l{constructor(s,e){this.dialogRef=s,this.input=e}ngOnInit(){console.log("m",this.input.message,this.input.title)}onOkClick(){this.dialogRef.close()}}return l.\u0275fac=function(s){return new(s||l)(a.Y36(d.so),a.Y36(d.WI))},l.\u0275cmp=a.Xpm({type:l,selectors:[["app-alert-dialog"]],decls:10,vars:6,consts:[["matDialogTitle","","data-testid","alertDialogTitle"],["data-testid","alertDialogMessage",1,"alert-msg"],["align","end"],["mat-button","","matDialogClose","cancel","color","primary","data-testid","alert-cancel-button",4,"ngIf"],["mat-button","","matDialogClose","confirm","color","primary","data-testid","alert-confirm-button",1,"confirm"],["mat-button","","matDialogClose","cancel","color","primary","data-testid","alert-cancel-button"]],template:function(s,e){1&s&&(a.TgZ(0,"h2",0),a._uU(1),a.qZA(),a.TgZ(2,"mat-dialog-content")(3,"p",1),a._uU(4),a.qZA()(),a.TgZ(5,"mat-dialog-actions",2),a.YNc(6,u,3,3,"button",3),a.TgZ(7,"button",4),a._uU(8),a.ALo(9,"translate"),a.qZA()()),2&s&&(a.xp6(1),a.Oqu(e.input.title),a.xp6(3),a.Oqu(e.input.message),a.xp6(2),a.Q6J("ngIf",e.input.showCancel),a.xp6(2),a.Oqu(a.lcZ(9,4,"buttons.ok")))},dependencies:[i.O5,d.ZT,d.uh,d.xY,d.H8,m.lW,f.X$],styles:["h2.mat-dialog-title[_ngcontent-%COMP%]{font-size:1.2rem;line-height:1.3em;margin-bottom:0}.mat-dialog-content[_ngcontent-%COMP%]{white-space:pre-line}.mat-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:1rem}.mat-dialog-actions[_ngcontent-%COMP%] .confirm[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}.alert-msg[_ngcontent-%COMP%]{line-height:normal}"]}),l})()},93664:(O,E,o)=>{o.d(E,{u:()=>l});var d=o(77147),a=o(48966),i=o(5e3),m=o(69808),f=o(47703),u=o(51062);
1function v(n,s){if(1&n&&(i.TgZ(0,"button",1),i._uU(1),i.ALo(2,"translate"),i.qZA()),2&n){const e=s.$implicit;i.Q6J("mat-dialog-close",e),i.xp6(1),i.Oqu(i.lcZ(2,2,"modes."+e))}}let l=(()=>{class n extends d.H{constructor(e,g,r){super(e),this.dialogRef=g,this.data=r}ngOnInit(){}ngOnDestroy(){}}return n.\u0275fac=function(e){return new(e||n)(i.Y36(i.zs3),i.Y36(a.so),i.Y36(a.WI))},n.\u0275cmp=i.Xpm({type:n,selectors:[["app-mode-selector"]],features:[i.qOj],decls:5,vars:4,consts:[["mat-flat-button","","color","primary",3,"mat-dialog-close",4,"ngFor","ngForOf"],["mat-flat-button","","color","primary",3,"mat-dialog-close"]],template:function(e,g){1&e&&(i.TgZ(0,"h1"),i._uU(1),i.ALo(2,"translate"),i.qZA(),i.TgZ(3,"div"),i.YNc(4,v,3,4,"button",0),i.qZA()),2&e&&(i.xp6(1),i.Oqu(i.lcZ(2,2,"crm.home.home-page.please-select")),i.xp6(3),i.Q6J("ngForOf",g.data.modes))},dependencies:[m.sg,a.ZT,f.lW,u.X$]}),n})()},98379:(O,E,o)=>{o.d(E,{q:()=>i});var d=o(5e3),a=o(20773);let i=(()=>{class m{constructor(){}ngOnInit(){}}return m.\u0275fac=function(u){return new(u||m)},m.\u0275cmp=d.Xpm({type:m,selectors:[["app-progress-dialog"]],decls:1,vars:0,consts:[["diameter","30"]],template:function(u,v){1&u&&d._UZ(0,"mat-spinner",0)},dependencies:[a.Ou]}),m})()},39165:(O,E,o)=>{o.d(E,{j:()=>m});var d=o(5e3),a=o(35248),i=o(77579);let m=(()=>{class f{constructor(){this.throttleTime=300,this.throttleClick=new d.vpe,this.clicks=new i.x}ngOnInit(){this.subscription=this.clicks.pipe((0,a.p)(this.throttleTime)).subscribe(v=>this.throttleClick.emit(v))}ngOnDestroy(){this.subscription.unsubscribe()}clickEvent(v){v.preventDefault(),v.stopPropagation(),this.clicks.next(v)}}return f.\u0275fac=function(v){return new(v||f)},f.\u0275dir=d.lG2({type:f,selectors:[["","appThrottleClick",""]],hostBindings:function(v,l){1&v&&d.NdJ("click",function(s){return l.clickEvent(s)})},inputs:{throttleTime:"throttleTime"},outputs:{throttleClick:"throttleClick"}}),f})()},29961:(O,E,o)=>{o.d(E,{D:()=>i});var d=o(68755),a=o(5e3);let i=(()=>{class m extends d.b{constructor(u){super(u)}setSelectAdress(u){this.selectAddress_=u}getSelectAddress(){return this.selectAddress_}}return m.\u0275fac=function(u){return new(u||m)(a.LFG(a.zs3))},m.\u0275prov=a.Yz7({token:m,factory:m.\u0275fac,providedIn:"root"}),m})()},57618:(O,E,o)=>{o.d(E,{D:()=>f});var d=o(7628),a=o(54004),i=o(5e3),m=o(40520);let f=(()=>{class u{constructor(l,n,s,e){this.injector=l,this.http=n,this.configs=s,this.context=e,this.aq=new d.V3(l)}get(l,n={}){var s=this.aq;return s.url=l,s.method="get",s.params=n,s.auth(!0).getJson().pipe((0,a.U)(e=>e.data))}getRaw(l,n){var s=this.aq;return s.url=l,s.method="get",s.params=n,s.auth(!0).getJson()}postWithBody(l,n,s=!1){var e=this.aq;return e.url=l,e.method="post",e.body=n,e.auth(!0).getJson().pipe((0,a.U)(g=>s?g:g.data))}put(l,n){var s=this.aq;return s.url=l,s.method="put",s.body=n,s.auth(!0).getJson().pipe((0,a.U)(e=>e.data))}putWithParams(l,n){var s=this.aq;return s.url=l,s.method="put",s.params=n,s.auth(!0).getJson().pipe((0,a.U)(e=>e.data))}postWithParams(l,n){var s=this.aq;return s.url=l,s.method="post",s.params=n,s.auth(!0).getJson().pipe((0,a.U)(e=>e.data))}deleteWithParams(l,n){var s=this.aq;return s.url=l,s.method="delete",s.params=n,s.auth(!0).getJson().pipe((0,a.U)(e=>e.data))}postFile(l,n,s={}){var e=this.aq;return e.url=l,e.method="post",e.file=n,e.params=s,e.auth(!0).getJson()}haveAllFields(l,n){if(!n)return!1;for(let s of l)if(-1==n.indexOf(s))return console.log("context missing field",s),!1;return!0}autoContext(l,n){if(this.haveAllFields(l,this.context.fields))return console.log("context have all fields"),void(n&&n(this.context));var s=window.aigens;if((!s||!s.context)&&this.haveAllFields(l,s.context))return console.log("initjs context have all fields"),Object.assign(this.context,s.context),void(n&&n(this.context));var e=s.context.brandId;e?(console.log("missing fields fetching context",l),this.loadContext(l,e,s.context.storeId,!1,n)):n&&n(null)}loadContext(l,n,s,e,g){var p={brandId:n,locale:this.context.userLang};s&&(p.storeId=s),l&&(p.fields=l.join()),this.get("/api/v1/store/context.json",p).subscribe(S=>{console.log("context",S),this.setContextData(S),g&&g(this.context)},S=>{console.log(S),g&&g(null)})}setContextData(l){if(!l)return;const n=this.context,s=l.brand;s&&(Object.assign(n,l),n.contentLang=n.language,n.brandId=s.id,console.log("saving context",n),n.save())}}return u.\u0275fac=function(l){return new(l||u)(i.LFG(i.zs3),i.LFG(m.eN),i.LFG(d.E4),i.LFG(d._y))},u.\u0275prov=i.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),u})()},7894:(O,E,o)=>{o.d(E,{d:()=>l});var d=o(68755),a=o(87125),i=o(5e3),m=o(7628),f=o(29961),u=o(76667);let v=(()=>{class n extends d.b{constructor(e,g){super(e),this.routingService=g}isNative(){var e,g,r,p,S,C,A,B;return(null===(g=null===(e=this.context)||void 0===e?void 0:e.app)||void 0===g?void 0:g.externalService)&&(null===(S=null===(p=null===(r=this.context)||void 0===r?void 0:r.app)||void 0===p?void 0:p.externalService)||void 0===S?void 0:S.isNative)&&(null===(B=null===(A=null===(C=this.context)||void 0===C?void 0:C.app)||void 0===A?void 0:A.externalService)||void 0===B?void 0:B.isNative())||!1}openByod(e,g){if(console.log("opening byod"),this.isNative())try{this.context.app.orderPlaceService.openUrl(e,g,r=>{r&&r.toAppHistoryPage&&this.routingService.goByodHistoryPage()})}catch(r){window.open(e,"_blank")}else window.location.assign(e)}}return n.\u0275fac=function(e){return new(e||n)(i.LFG(i.zs3),i.LFG(u.Z))},n.\u0275prov=i.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),l=(()=>{class n extends d.b{constructor(e,g,r,p,S){super(e),this.configService=g,this.addressService=r,this.nativeHandleService=p,this.routingService=S,this.useLoginPopup=!1}isSingleStoreMode(){return!(!this.storeId||!this.mode&&!this.spot)&&this.isValidStore(this.storeId,this.mode)}isValidStore(e,g=""){let r;return this.currentStore&&Number(this.currentStore.id)===Number(e)?r=this.currentStore:(r=this.context.brand.stores.find(p=>Number(p.id)===Number(e)),this.setCurrentStore(r)),!!r&&(g.length<=0||this.hasMode(r,g))}setUseLoginPopup(e){this.useLoginPopup=e}getUseLoginPopup(){return this.useLoginPopup}setCurrentStore(e){this.currentStore=e}hasMode(e,g){return e.modes&&e.modes.indexOf(g)>=0}openByod(e="",g="",r=""){var p,S,C,A,B,W,F;if(e&&!this.hasMode(this.currentStore,e))return;let K=this.context.member||{};if("delivery"===e){let b=this.addressService.getSelectAddress()||{},{id:H}=b;if(!H)return void console.log("missing address id");K.address=b}if(!this.nativeHandleService.isNative()){let b=`/store/${this.currentStore.id}`;const H={locale:this.context.userLang};return g.length>0&&(b+=`/spot/${g}`),r.length>0&&(b+=`/key/${r}`),e.length>0&&"byod"!==e&&(b+=`/mode/${e}`),this.systemConfigService.crmSkipByodSplashPage&&(b+="/direct-category-list"),H.sessionToken=this.context.
1isSignedIn()&&this.configService.getSessionId()||"0",this.routingService.navigate(b,{queryParams:H,state:{store:this.currentStore,storeId:this.currentStore.id,sessionToken:this.context.isSignedIn()&&this.configService.getSessionId()||"0",promoType:this.promoType,promoId:this.promoId,member:K,preloader:!0,preLoaderColor:null===(C=null===(S=null===(p=this.context)||void 0===p?void 0:p.brand)||void 0===S?void 0:S.colors)||void 0===C?void 0:C.primary,logoSrc:null===(F=null===(W=null===(B=null===(A=this.context)||void 0===A?void 0:A.brand)||void 0===B?void 0:B.images)||void 0===W?void 0:W.logo)||void 0===F?void 0:F.source,fromStandardCrm:!0,autoNextClick:!0,isApp:!1}}),void this.clearByodPromoItem()}let U=this.configService.getApi()+"/scan?store="+this.currentStore.id+"&page=byod&locale="+this.context.userLang;e.length>0&&"byod"!==e&&(U+="&mode="+e),g.length>0&&(U+="&spot="+g),r.length>0&&(U+="&key="+r),this.configService.getSessionId()&&(!this.context.membership.status||"active"===this.context.membership.status)&&(U+="&session="+this.configService.getSessionId()),this.nativeHandleService.openByod(U,K)}isCurrentStoreOpened(){const e=this.currentStore,g=(new Date).getTime();return!e.closed&&a.yh.isOpeningHours(e,g)}setByodPromoItem(e,g){this.promoType=e,this.promoId=g}clearByodPromoItem(){this.promoType=null,this.promoId=null}}return n.\u0275fac=function(e){return new(e||n)(i.LFG(i.zs3),i.LFG(m.E4),i.LFG(f.D),i.LFG(v),i.LFG(u.Z))},n.\u0275prov=i.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),n})()},97464:(O,E,o)=>{o.d(E,{n:()=>d});class d{constructor(i){this.errorCode="",this.errorCode=i}isErrorState(i,m){const f=!!(i&&i.invalid&&i.touched),u=!!(i&&i.parent&&i.parent.invalid&&i.parent.touched&&i.parent.hasError(this.errorCode));return(f||u)&&i.touched}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.