PageSourceSearch

https://redribbondelivery.com.ph/build/byod/v/custom/jfcph-master.4.1.304.20260513/9242.45ddc31e455441c9.js

js redribbondelivery.com.ph collected 2026-09-29 21:29:49 UTC 579,595 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkroot=self.webpackChunkroot||[]).push([[9242],{99242:(dn,ut,u)=>{u.r(ut),u.d(ut,{DialogModule:()=>Uu});var g=u(93075),C=u(7628),Y=u(41026),t=u(5e3),_=u(69808),q=u(29025),k=u(61204),Z=u(67322),j=u(77531),M=u(51062);function mn(i,a){if(1&i&&t._UZ(0,"app-img",11),2&i){const e=t.oxw().$implicit;t.Q6J("pw",12)("src","assets/images/flags/"+e.country.toLowerCase()+".svg")}}function gn(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"p",9),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.SelectedCountry(r.code))}),t.YNc(2,mn,1,2,"app-img",10),t._uU(3),t.qZA(),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw();t.xp6(2),t.Q6J("ngIf",n.settingManager.get("orderingCountryCodeDisplayFlag",!1)&&n.codeHasFlag(e.country)),t.xp6(1),t.AsE(" ",e.name," (",e.code,")")}}let Gt=(()=>{class i extends C.nh{constructor(e){super(e),this.countries=[]}ngOnInit(){var e;this.auxInput=this.routingService.getAuxInput(),this.searchForm=new g.cw({countryName:new g.NI("")}),this.countries=null===(e=this.context.form)||void 0===e?void 0:e.brandCountryCodes,this.translateName()}codeHasFlag(e){return Y.f.indexOf(e.toLowerCase())>=0}countryNameChanged(){var e;const n=this.searchForm.get("countryName").value.toUpperCase();this.countries=null===(e=this.context.form)||void 0===e?void 0:e.brandCountryCodes.filter(o=>o.name.toUpperCase().indexOf(n)>-1||o.country.toUpperCase().indexOf(n)>-1||o.code.indexOf(n)>-1)}SelectedCountry(e){this.auxInput.callback(e)}translateName(){var e;(null===(e=this.context.form)||void 0===e?void 0:e.brandCountryCodes).forEach(o=>{const r=`byod.countries.${o.country.toLowerCase()}.name`,l=this.t.instant(r);o.name=l!==r?l:o.name})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-country-phone-number"]],features:[t.qOj],decls:13,vars:13,consts:[[1,"container"],[3,"back","close","title"],[1,"div-content"],[1,"mb-2",3,"formGroup"],["appearance","outline",1,"mb-2","w-full"],[1,"text-sm"],["matInput","","formControlName","countryName","autocomplete","name","data-testid","countryName-field",1,"text-sm",3,"placeholder","ngModelChange"],[1,"countries"],[4,"ngFor","ngForOf"],[1,"country",3,"click"],["constrain","contain","class","country-flags",3,"pw","src",4,"ngIf"],["constrain","contain",1,"country-flags",3,"pw","src"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"form",3)(5,"mat-form-field",4)(6,"mat-label",5),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"input",6),t.NdJ("ngModelChange",function(){return n.countryNameChanged()}),t.ALo(10,"translate"),t.qZA()()(),t.TgZ(11,"div",7),t.YNc(12,gn,4,3,"ng-container",8),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("close",!0)("title",t.lcZ(2,7,"byod.dialogs.country-phone-number-bottom-dialog.select-country")),t.xp6(3),t.Q6J("formGroup",n.searchForm),t.xp6(3),t.Oqu(t.lcZ(8,9,"byod.dialogs.country-phone-number-bottom-dialog.search-country")),t.xp6(2),t.Q6J("placeholder",t.lcZ(10,11,"byod.dialogs.country-phone-number-bottom-dialog.search-placeholder")),t.xp6(3),t.Q6J("ngForOf",n.countries))},dependencies:[_.sg,_.O5,g._Y,g.Fj,g.JJ,g.JL,g.sg,g.u,q.g,k.v,Z.KE,Z.hX,j.Nt,M.X$],styles:["[_nghost-%COMP%]{display:flex;border-radius:.5rem;overflow:hidden;margin:0 auto;background:#fff}.container[_ngcontent-%COMP%]{height:500px}div.div-content[_ngcontent-%COMP%]{position:relative;padding-left:1.5rem;padding-right:1.5rem;padding-top:2rem;height:100%}.country-flags[_ngcontent-%COMP%]{width:25px;margin-right:.5rem}.countries[_ngcontent-%COMP%]{overflow-y:auto;height:60%}.countries[_ngcontent-%COMP%]   .country[_ngcontent-%COMP%]{display:flex;align-items:center;border-bottom:1px solid #efefef;padding-bottom:.5rem;margin-bottom:.5rem}"]}),i})();var N=u(87125),_t=u(99826),pn=u(54968),It=u(78372),un=u(39300),_n=u(17414),fn=u(20322);const hn=["iframeElement"],xn=["contentElement"];let vn=(()=>{class i extends C.H6{constructor(e){super(e),this.iFrameSrc=""}ngOnInit(){var e,n;const o=this.routingService.getAuxInput();this.order=N.Vw.toData(N.KM,o.order),this.iFrameSrc=null===(n=null===(e=this.order)||void 0===e?void 0:e.deliveryTracker)||void 0===n?void 0:n.url}ngOnDestroy(){var e;this.resizeSubscription$&&(null===(e=this.resizeSubscription$)||void 0===e||e.unsubscribe())}setIframeHeight(){var e;const n=this.contentElement.nativeElement.getBoundingClientRect();this.iframeElement.nativeElement.style.height=`${null!==(e=n.height)&&void 0!==e?e:500}px`}ngAfterViewInit(){this.setIframeHeight(),this.resizeObservable$=(0,pn.R)(window,"resize"),this.resizeSubscription$=this.resizeObservable$.pipe((0,It.b)(300)).subscribe(e=>{this.setIframeHeight()})}closeClicked(){this.router.events.pipe((0,un.h)(e=>e instanceof _t.OD),(0,_n.V)(100)).subscribe({next:e=>{console.log("Route changed successfully")},error:()=>{this.routingService.navigateCloseModal()}})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-track-driver-dialog"]],viewQuery:function(e,n){if(1&e&&(t.Gf(hn,5),t.Gf(
1xn,5)),2&e){let o;t.iGM(o=t.CRH())&&(n.iframeElement=o.first),t.iGM(o=t.CRH())&&(n.contentElement=o.first)}},features:[t.qOj],decls:8,vars:7,consts:[[1,"container"],[3,"title","back","closed"],["contentElement",""],["sandbox","allow-scripts allow-same-origin",3,"src"],["iframeElement",""]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("closed",function(){return n.closeClicked()}),t.ALo(2,"translate"),t.qZA(),t.TgZ(3,"main",null,2),t._UZ(5,"iframe",3,4),t.ALo(7,"sanitize"),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,3,"byod.dialogs.track-driver.track-driver"))("back",!1),t.xp6(4),t.Q6J("src",t.lcZ(7,5,n.iFrameSrc),t.uOi))},dependencies:[k.v,M.X$,fn.n],styles:["[_nghost-%COMP%]{display:block;height:100%;background-color:#fff}.container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}main[_ngcontent-%COMP%]{height:100%;flex:1 1 auto;box-sizing:border-box}main[_ngcontent-%COMP%]   iframe[_ngcontent-%COMP%]{width:100%;height:100%}"]}),i})();var ft=u(19757),Cn=u(29331);let ht=(()=>{class i{constructor(e,n){this.directoryContext=e,this.orderFlowManager=n}canActivate(e,n){return!(this.orderFlowManager.isOrderContextSeatsNotConfirmed()||(this.orderFlowManager.isModePickup()?(this.orderFlowManager.showModeSelector("",!1),1):this.orderFlowManager.isMenuFirstFlowAndNotConfirmed()&&this.orderFlowManager.isOrderModeSelectionOnItemClick()&&(this.orderFlowManager.smartShowModeSelector(),1)))}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(ft.D),t.LFG(Cn.x))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var f=u(41777),bn=u(17445),Et=u(63900),S=u(28492),I=u(47703),xt=u(20773),$t=u(85356);function Mn(i,a){1&i&&(t.ynx(0),t.TgZ(1,"div",2),t._UZ(2,"mat-spinner",3),t.qZA(),t.BQk()),2&i&&(t.xp6(2),t.Q6J("diameter",40))}function On(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div"),t._UZ(1,"app-icon",4),t.TgZ(2,"h1"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"button",5),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.continueClicked())}),t._uU(6),t.ALo(7,"translate"),t.qZA()()}if(2&i){const e=t.oxw(2);t.Q6J("@flyInOut",void 0),t.xp6(3),t.hij(" ",t.lcZ(4,4,"pay.components.payment-manual-verification.is-completed-payment")," "),t.xp6(2),t.Q6J("disabled",e.polling),t.xp6(1),t.Oqu(t.lcZ(7,6,"pay.components.payment-manual-verification.done"))}}function yn(i,a){if(1&i&&(t.TgZ(0,"h2",8),t._uU(1),t.ALo(2,"translate"),t.ALo(3,"amDateFormat"),t.qZA()),2&i){const e=t.oxw(3);t.Q6J("@times",e.lastPollingTime)("@timesIn",void 0),t.xp6(1),t.AsE(" ",t.lcZ(2,4,"pay.components.payment-manual-verification.last-checking-time"),": ",t.xi3(3,6,e.lastPollingTime,"HH:mm:ss")," ")}}function Pn(i,a){if(1&i&&(t.TgZ(0,"div")(1,"div",6),t._UZ(2,"mat-spinner",3),t.qZA(),t.TgZ(3,"h1"),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.YNc(6,yn,4,9,"h2",7),t.qZA()),2&i){const e=t.oxw(2);t.Q6J("@flyInOut",void 0),t.xp6(2),t.Q6J("diameter",40),t.xp6(2),t.hij(" ",t.lcZ(5,4,"pay.components.payment-manual-verification.waiting-confirmation")," "),t.xp6(2),t.Q6J("ngIf",e.lastPollingTime)}}function In(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",12),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);
1return t.KtG(o.exit())}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"pay.components.payment-manual-verification.exit")))}function wn(i,a){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"app-icon",9),t.TgZ(2,"h1",10),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"h2"),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.YNc(8,In,3,3,"button",11),t.qZA()),2&i){const e=t.oxw(2);t.Q6J("@flyInOut",void 0),t.xp6(3),t.Oqu(t.lcZ(4,4,"pay.components.payment-manual-verification.payment-failed")),t.xp6(3),t.Oqu(t.lcZ(7,6,"pay.components.payment-manual-verification.please-retry")),t.xp6(2),t.Q6J("ngIf",e.orderFailed)}}function kn(i,a){if(1&i&&(t.TgZ(0,"div",2),t.YNc(1,On,8,8,"div",0),t.YNc(2,Pn,7,6,"div",0),t.YNc(3,wn,9,8,"div",0),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",!e.polling),t.xp6(1),t.Q6J("ngIf",e.polling&&!e.orderFailed),t.xp6(1),t.Q6J("ngIf",e.polling&&e.orderFailed)}}let Tn=(()=>{class i extends C.nh{constructor(e){super(e),this.polling=!1,this.alipayVerifyUrl=null,this.orderFailed=!1,this.active=!1,this.timeoutMs=6e4,this.maxTimeoutMs=9e5,this.period=5e3,this.debug=!1,this.pollingStartDelay=2e4,this.focusListener=()=>{console.log("FOCUS"),this.startPollTime||this.continueClicked()},console.log("PaymentManualVerificationDialogComponent construct"),this.configService.isLocalhost()&&(this.timeoutMs=1e4,this.debug=!0)}getState(){return window.history.state}ngOnInit(){this.alipayVerifyUrl=this.navParams.get("alipayVerifyUrl"),console.log("history state",window.history.state,this.alipayVerifyUrl),setTimeout(()=>{this.active=!0,this.listenFocus()},5e3)}listenFocus(){console.log("listen to focus"),window.addEventListener("focus",this.focusListener,!1)}continueClicked(){var e,n;null===(e=this.timer$)||void 0===e||e.unsubscribe(),this.startPollTime||(this.startPollTime=(new Date).getTime()),this.alipayVerifyUrl?(this.polling=!0,this.dataService.postWithBody(this.alipayVerifyUrl,{}).subscribe({next:o=>{var r,l,c,s,d;this.lastPollingTime=o.time;let m=null==o?void 0:o.data;console.log("PaymentManualVerificationDialogComponent verify",o),this.order=m&&m[0],"paying"===(null===(r=m[0])||void 0===r?void 0:r.status)?this.startPolling():"failed"===(null===(l=m[0])||void 0===l?void 0:l.status)||"cancelled"===(null===(c=m[0])||void 0===c?void 0:c.status)?(null===(s=this.timer$)||void 0===s||s.unsubscribe(),this.orderFailed=!0):null===(d=this.dialogService)||void 0===d||d.submitAuxDialog({order:m[0]})},error:o=>{console.log("verify err callback",o),this.orderFailed=!0}})):null===(n=this.dialogService)||void 0===n||n.showAlert("Waring","verifyUrl null?")}ngOnDestroy(){var e;null===(e=this.timer$)||void 0===e||e.unsubscribe(),window.removeEventListener("focus",this.focusListener),console.log("unlisten focus")}isTimeout(){var n=(new Date).getTime()-this.startPollTime;return console.log("diff",n),n>this.timeoutMs||n>this.maxTimeoutMs}exit(){this.routingService.navigateCloseModal()}startPolling(){var e;this.startPollTime||(this.startPollTime=(new Date).getTime()),this.alipayVerifyUrl?this.timer$=(0,bn.F)(this.period).pipe((0,Et.w)(()=>this.dataService.postWithBody(this.alipayVerifyUrl,{}))).subscribe({next:n=>{var o,r,l,c,s,d,m;this.lastPollingTime=n.time;let p=null==n?void 0:n.data;console.log("PaymentManualVerificationDialogComponent verify",n),this.order=p&&p[0],"paying"===(null===(o=p[0])||void 0===o?void 0:o.status)||("failed"===(null===(r=p[0])||void 0===r?void 0:r.status)||"cancelled"===(null===(l=p[0])||void 0===l?void 0:l.status)?(null===(c=this.timer$)||void 0===c||c.unsubscribe(),this.orderFailed=!0):(null===(s=this.timer$)||void 0===s||s.unsubscribe(),null===(d=this.dialogService)||void 0===d||d.submitAuxDialog({order:p[0]}))),this.isTimeout()&&(null===(m=this.timer$)||void 0===m||m.unsubscribe(),this.orderFailed=!0)},error:n=>{var o;null===(o=this.timer$)||void 0===o||o.unsubscribe(),console.log("verify err callback",n),this.orderFailed=!0}}):null===(e=this.dialogService)||void 0===e||e.showAlert("Waring","verifyUrl null?")}goBack(){var e;null===(e=this.dialogService)||void 0===e||e.submitAuxDialog({})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-payment-manual-verification-dialog"]],features:[t.qOj],decls:2,vars:2,consts:[[4,"ngIf"],["class","top",4,"ngIf"],[1,"top"],[1,"spinner",3,"diameter"],["name","live_help","size","40","source","mat",1,"material-icons-outlined"],["mat-raised-button","","color","primary",1,"mt-6","w-8/12",3,"disabled","click"],[1,"spinner-top"],["class","times-update",4,"ngIf"],[1,"times-update"],["name","feedback","size","40","source","mat",1,"material-icons-outlined"],[1,"payment-msg"],["mat-stroked-button","","color","primary","class","mt-6 w-8/12",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary",1,"mt-6","w-8/12",3,"click"]],template:function(e,n){1&e&&(t.YNc(0,Mn,3,1,"ng-container",0),t.YNc(1,kn,4,3,"div",1)),2&e&&(t.Q6J("ngIf",!n.active),t.xp6(1),t.Q6J("ngIf",n.active))},dependencies:[_.O5,S.o,I.lW,xt.Ou,M.X$,$t.Ek],styles:["[_nghost-%COMP%]{display:block;background-color:#fff;height:100%}app-icon[_ngcontent-%COMP%]{color:#cecece;margin-bottom:1rem}.top[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;align-items:center;padding-top:20%;padding-left:2rem;padding-right:2rem;background:#f1f1f1;min-height:100%}.top[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{text-align:center;display:flex;flex-direction:column;align-items:center}.spinner[_ngcontent-%COMP%]{width:40px;height:40px;
1display:inline-block}.spinner-top[_ngcontent-%COMP%]{margin-bottom:1rem}h1[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.3em;font-weight:400;margin-bottom:1rem}h2[_ngcontent-%COMP%]{line-height:1.3em}.btn-panel[_ngcontent-%COMP%]{display:flex;gap:.5rem}.times-update[_ngcontent-%COMP%]{color:#666}"],data:{animation:[(0,f.X$)("flyInOut",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateX(50%)"}),(0,f.jt)("200ms ease-out",(0,f.oB)({opacity:1,transform:"translateX(0)"}))])]),(0,f.X$)("times",[(0,f.eR)(":increment",[(0,f.oB)({opacity:.5,transform:"translateY(70%)"}),(0,f.jt)("200ms ease",(0,f.oB)({opacity:1,transform:"translateY(0%)"}))])]),(0,f.X$)("timesIn",[(0,f.eR)(":enter",[(0,f.oB)({opacity:.5,transform:"translateY(70%)"}),(0,f.jt)("200ms ease",(0,f.oB)({opacity:1,transform:"translateY(0%)"}))])])]}}),i})();var V=u(45840),J=u(48297),W=u(48966);const Rt=function(i,a){return{"pickup-method-not-selected":i,"pickup-method-selected":a}};function Zn(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",10),t.NdJ("throttleClick",function(){const r=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.pickupMethodClicked(r))}),t._UZ(1,"app-icon",11),t._uU(2),t.ALo(3,"translate"),t.qZA()}if(2&i){const e=a.$implicit,n=t.oxw(3);t.Q6J("ngClass",t.WLB(6,Rt,(null==n.result||null==n.result.method?null:n.result.method.code)!=e.code,(null==n.result||null==n.result.method?null:n.result.method.code)==e.code)),t.xp6(1),t.s9C("name",e.code),t.Q6J("ngClass",t.WLB(9,Rt,(null==n.result||null==n.result.method?null:n.result.method.code)!=e.code,(null==n.result||null==n.result.method?null:n.result.method.code)==e.code)),t.xp6(1),t.hij(" ",t.lcZ(3,4,e.label)," ")}}function An(i,a){if(1&i&&(t.TgZ(0,"mat-dialog-content",6)(1,"div",7)(2,"div",8),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.YNc(5,Zn,4,12,"button",9),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(3),t.hij(" ",t.lcZ(4,2,"byod.dialogs.pickup-method-dialog.choose-pickup-method")," "),t.xp6(2),t.Q6J("ngForOf",e.pickupMethodOptions)}}function Sn(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.pickup-method-dialog.required")," "))}function Dn(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.pickup-method-dialog.required")," "))}function qn(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.pickup-method-dialog.required")," "))}function Qn(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.pickup-method-dialog.required")," "))}function Nn(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-dialog-content")(2,"div",12),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"form",13)(6,"mat-form-field",14)(7,"mat-label"),t._uU(8),t.ALo(9,"translate"),t.qZA(),t._UZ(10,"input",15),t.YNc(11,Sn,3,3,"mat-error",5),t.qZA(),t.TgZ(12,"mat-form-field",14)(13,"mat-label"),t._uU(14),t.ALo(15,"translate"),t.qZA(),t._UZ(16,"input",16),t.YNc(17,Dn,3,3,"mat-error",5),t.qZA(),t.TgZ(18,"mat-form-field",14)(19,"mat-label"),t._uU(20),t.ALo(21,"translate"),t.qZA(),t._UZ(22,"input",17),t.YNc(23,qn,3,3,"mat-error",5),t.qZA(),t.TgZ(24,"mat-form-field",14)(25,"mat-label"),t._uU(26),t.ALo(27,"translate"),t.qZA(),t._UZ(28,"input",18),t.YNc(29,Qn,3,3,"mat-error",5),t.qZA()(),t.TgZ(30,"button",19),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.confirmClicked())}),t._uU(31),t.ALo(32,"translate"),t.qZA()(),t.BQk()}if(2&i){const e=t.oxw(2);t.xp6(3),t.hij(" ",t.lcZ(4,12,"byod.dialogs.pickup-method-dialog.about-vehicle")," "),t.xp6(2),t.Q6J("formGroup",e.formGroup),t.xp6(3),t.Oqu(t.lcZ(9,14,"byod.pages.checkout-page.vehicle-model")),t.xp6(3),t.Q6J("ngIf",e.formGroup.get("vehicle").hasError("required")),t.xp6(3),t.Oqu(t.lcZ(15,16,"byod.pages.checkout-page.license-plate")),t.xp6(3),t.Q6J("ngIf",e.formGroup.get("plate").hasError("required")),t.xp6(3),t.Oqu(t.lcZ(21,18,"byod.pages.checkout-page.vehicle-color")),t.xp6(3),t.Q6J("ngIf",e.formGroup.get("vehicleColor").hasError("required")),t.xp6(3),t.Oqu(t.lcZ(27,20,"byod.pages.checkout-page.remarks")),t.xp6(3),t.Q6J("ngIf",e.formGroup.get("note").hasError("required")),t.xp6(1),t.Q6J("disabled",e.formGroup.invalid),t.xp6(1),t.hij(" ",t.lcZ(32,22,"buttons.confirm")," ")}}function Jn(i,a){if(1&i&&(t.TgZ(0,"div",2),t._UZ(1,"app-sub-bar",3),t.YNc(2,An,6,4,"mat-dialog-content",4),t.YNc(3,Nn,33,24,"ng-container",5),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("back",!1),t.xp6(1),t.Q6J("ngIf",1==e.stage),t.xp6(1),t.Q6J("ngIf",2==e.stage)}}function Un(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-dialog-content",20)(1,"div",21),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"p",22),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.TgZ(7,"p",23),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.TgZ(10,"div",24)(11,"button",25),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.cancelChangePayment())}),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"button",25),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.comfirmChangePayment())}),t._uU(15),t.ALo(16,"translate"),t.qZA()()()}2&i&&(t.xp6(2),t.hij(" ",t.lcZ(3,5,"byod.dialogs.pickup-method-dialog.payment-not-available-title")," "),t.xp6(3),t.Oqu(t.lcZ(6,7,"byod.dialogs.pickup-method-dialog.payment-not-available-msg1")),t.xp6(3),t.Oqu(t.lcZ(9,9,"byod.dialogs.pickup-method-dialog.payment-not-available-msg2")),t.xp6(4),t.hij(" ",t.lcZ(13,11,"byod.dialogs.pickup-method-dialog.stay")," "),t.xp6(3),t.hij(" ",t.lcZ(16,13,"byod.dialogs.pickup-method-dialog.change")," "))}let Fn=(()=>{class i extends C.nh{constructor(e,n,o){super(e),this.orderContext=n,this.formBuilder=o,this.stage=1,this.result={},this.pickupMethodOptions=[]}ngOnInit(){var e,n,o;this.input=this.navParams.input,this.pickupMethodOptions=null===(n=null===(e=this.orderContext.store)||void 0===e?void 0:e.location)||void 0===n?void 0:n.pickupMethod.map(r=>({label:"byod.pickup-method."+r,code:r})),this.createForm(),this.result=(0,V.Z)(this.input.pickupMethod),this.input.stage&&(this.stage=this.input.stage),null!==(o=this.result)&&void 0!==o&&o.info&&this.formGroup.reset(this.result.info)}createForm(){this.formGroup=this.formBuilder.group({vehicle:[null,g.kI.required],plate:[null,g.kI.required],vehicleColor:[null,g.kI.required],note:[null]})}confirmClicked(){this.result.info=this.formGroup.value,this.dialogService.submitAuxDialog({action:"ok",result:this.result})}pickupMethodClicked(e){console.log("pickupMethodClicked",e),this.checkPickupMethodAvailable(e.code)?(this.result.method=e,"curbside"===e.code?this.stage=2:(this.result.info=null,this.dialogService.submitAuxDialog({action:"ok",result:this.result}))):(this.temporaryMethod=e,this.stage=3)}checkPickupMethodAvailable(e){var n;const o=(null===(n=this.input.selectedConfig)||void 0===n?void 0:n.pickupMethod)||[];return 0===o.length||o.includes(e)}comfirmChangePayment(){this.result.method=this.temporaryMethod,"curbside"===this.temporaryMethod.code?this.stage=2:(this.result.info=null,this.dialogService.submitAuxDialog({action:"ok",result:this.result})),this.temporaryMethod=null}cancelChangePayment(){this.stage=1,this.temporaryMethod=null}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ),t.Y36(g.qu))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-pickup-method-dialog"]],features:[t.qOj],decls:2,vars:2,consts:[["class","div-outest",4,"ngIf"],["class","payment-restrict-dialog",4,"ngIf"],[1,"div-outest"],[3,"back"],["class","method-dialog py-0 px-10 pb-6",4,"ngIf"],[4,"ngIf"],[1,"method-dialog","py-0","px-10","pb-6"],[1,"div-method-outer"],[1,"font-bold","text-choose"],["class","btn-pickup-method w-full","mat-flat-button","","appThrottleClick","",3,"ngClass","throttleClick",4,"ngFor","ngForOf"],["mat-flat-button","","appThrottleClick","",1,"btn-pickup-method","w-full",3,"ngClass","throttleClick"],["size","38",1,"flex","mr-3","not-border",3,"name","ngClass"],[1,"font-bold","text-about-veh"],[1,"flex","flex-col",3,"formGroup"],["appearance","outline",1,"input-field"],["formControlName","vehicle","matInput",""],["formControlName","plate","matInput",""],["formControlName","vehicleColor","matInput",""],["formControlName","note","matInput",""],["mat-raised-button","","appThrottleClick","",1,"btn-confirm","w-full",3,"disabled","throttleClick"],[1,"payment-restrict-dialog"],[1,"font-bold","dialog-heading"],[1,"mt-5"],[1,"mt-2"],[1,"flex","justify-center","mt-5","gap-x-8"],["mat-flat-button","","appThrottleClick","",3,"throttleClick"]],template:function(e,n){1&e&&(t.YNc(0,Jn,4,3,"div",0),t.YNc(1,Un,17,15,"mat-dialog-content",1)),2&e&&(t.Q6J("ngIf",1===n.stage||2===n.stage),t.xp6(1),t.Q6J("ngIf",3===n.stage))},dependencies:[_.mk,_.sg,_.O5,g._Y,g.Fj,g.JJ,g.JL,g.sg,g.u,S.o,k.v,J.j,W.xY,I.lW,Z.TO,Z.KE,Z.hX,j.Nt,M.X$],styles:["[_nghost-%COMP%]{max-height:90vh;position:absolute;top:50%;transform:translateY(-50%);width:100%;padding:1rem}.div-outest[_ngcontent-%COMP%]{border-radius:.5rem;overflow:hidden;background:white}.mat-dialog-content[_ngcontent-%COMP%]{background-color:#fff;width:100%;margin:0;padding:1.5rem}
1.payment-restrict-dialog[_ngcontent-%COMP%]   .dialog-heading[_ngcontent-%COMP%]{font-size:1.1rem}.payment-restrict-dialog[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:not(:last-child){background:#E1E1E1}.payment-restrict-dialog[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:last-child{color:var(--P800)}.text-about-veh[_ngcontent-%COMP%]{color:#333;margin-bottom:.75rem}app-icon[_ngcontent-%COMP%]{color:var(--P)}.text-choose[_ngcontent-%COMP%]{font-size:1rem;color:#333;font-weight:700;text-align:center;line-height:normal;padding:0 .5rem;margin-top:.5rem;margin-bottom:1rem}.btn-pickup-method[_ngcontent-%COMP%]{font-size:1rem;padding:.65rem .25rem}.btn-pickup-method[_ngcontent-%COMP%]:not(:last-child){margin-bottom:1.25rem}.btn-pickup-method[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.pickup-method-selected[_ngcontent-%COMP%]{background:var(--P);color:#fff}.pickup-method-not-selected[_ngcontent-%COMP%]{border:1px solid var(--P);color:var(--P800)}.not-border[_ngcontent-%COMP%]{border:none!important}.btn-confirm[_ngcontent-%COMP%]{background:var(--P);color:#fff;font-size:1rem;padding:.25rem}@media not screen and (min-width: 600px){.method-dialog[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}}"]}),i})();var Ln=u(8744),tt=u(6731),Bn=u(27544),Vt=u(77446),lt=u(26688),U=u(90508),Yn=u(86856),et=u(4834),ct=u(81125),wt=u(43954),z=u(25245),nt=u(14623),vt=u(79814),Ht=u(74107),Kt=u(57261),kt=u(47429),Wt=u(15664),it=u(63191),Tt=u(91159),zn=u(70925),Ct=u(77579),jn=u(39646),st=u(68675),dt=u(82722),Zt=u(50226);function Gn(i,a){1&i&&t.Hsn(0)}const En=["*"];let Xt=(()=>{class i{constructor(e){this._elementRef=e}focus(){this._elementRef.nativeElement.focus()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.SBq))},i.\u0275dir=t.lG2({type:i,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]}),i})(),te=(()=>{class i{constructor(e){this.template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["","cdkStepLabel",""]]}),i})(),$n=0;const ee=new t.OlP("STEPPER_GLOBAL_OPTIONS");let At=(()=>{class i{constructor(e,n){this._stepper=e,this.interacted=!1,this.interactedStream=new t.vpe,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=n||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}get editable(){return this._editable}set editable(e){this._editable=(0,it.Ig)(e)}get optional(){return this._optional}set optional(e){this._optional=(0,it.Ig)(e)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(e){this._completedOverride=(0,it.Ig)(e)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(e){this._customError=(0,it.Ig)(e)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){var e;return null!==(e=this._stepperOptions.showError)&&void 0!==e?e:null!=this._customError}}return i.\u0275fac=function(e){return new(e||i)(t.Y36((0,t.Gpc)(()=>St)),t.Y36(ee,8))},i.\u0275cmp=t.Xpm({type:i,selectors:[["cdk-step"]],contentQueries:function(e,n,o){if(1&e&&t.Suo(o,te,5),2&e){let r;t.iGM(r=t.CRH())&&(n.stepLabel=r.first)}},viewQuery:function(e,n){if(1&e&&t.Gf(t.Rgc,7),2&e){let o;t.iGM(o=t.CRH())&&(n.content=o.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[t.TTD],ngContentSelectors:En,decls:1,vars:0,template:function(e,n){1&e&&(t.F$t(),t.YNc(0,Gn,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),i})(),St=(()=>{class i{constructor(e,n,o){this._dir=e,this._changeDetectorRef=n,this._elementRef=o,this._destroyed=new Ct.x,this.steps=new t.n_E,this._sortedHeaders=new t.n_E,this._linear=!1,this._selectedIndex=0,this.selectionChange=new t.vpe,this._orientation="horizontal",this._groupId=$n++}get linear(){return this._linear}set linear(e){this._linear=(0,it.Ig)(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){var n;const o=(0,it.su)(e);this.steps&&this._steps?(this._isValidIndex(o),null===(n=this.selected)||void 0===n||n._markAsInteracted(),this._selectedIndex!==o&&!this._anyControlsInvalidOrPending(o)&&
1(o>=this._selectedIndex||this.steps.toArray()[o].editable)&&this._updateSelectedItemIndex(o)):this._selectedIndex=o}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(e){this.selectedIndex=e&&this.steps?this.steps.toArray().indexOf(e):-1}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===e)}ngAfterContentInit(){this._steps.changes.pipe((0,st.O)(this._steps),(0,dt.R)(this._destroyed)).subscribe(e=>{this.steps.reset(e.filter(n=>n._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,st.O)(this._stepHeader),(0,dt.R)(this._destroyed)).subscribe(e=>{this._sortedHeaders.reset(e.toArray().sort((n,o)=>n._elementRef.nativeElement.compareDocumentPosition(o._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Wt.Em(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,jn.of)()).pipe((0,st.O)(this._layoutDirection()),(0,dt.R)(this._destroyed)).subscribe(e=>this._keyManager.withHorizontalOrientation(e)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(e=>e.reset()),this._stateChanged()}_getStepLabelId(e){return`cdk-step-label-${this._groupId}-${e}`}_getStepContentId(e){return`cdk-step-content-${this._groupId}-${e}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(e){const n=e-this._selectedIndex;return n<0?"rtl"===this._layoutDirection()?"next":"previous":n>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(e,n="number"){const o=this.steps.toArray()[e],r=this._isCurrentStep(e);return o._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(o,r):this._getGuidelineLogic(o,r,n)}_getDefaultIndicatorLogic(e,n){return e._showError()&&e.hasError&&!n?"error":!e.completed||n?"number":e.editable?"edit":"done"}_getGuidelineLogic(e,n,o="number"){return e._showError()&&e.hasError&&!n?"error":e.completed&&!n?"done":e.completed&&n?o:e.editable&&n?"edit":o}_isCurrentStep(e){return this._selectedIndex===e}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(e){const n=this.steps.toArray();this.selectionChange.emit({selectedIndex:e,previouslySelectedIndex:this._selectedIndex,selectedStep:n[e],previouslySelectedStep:n[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(e):this._keyManager.updateActiveItem(e),this._selectedIndex=e,this._stateChanged()}_onKeydown(e){const n=(0,Tt.Vb)(e),o=e.keyCode,r=this._keyManager;null==r.activeItemIndex||n||o!==Tt.L_&&o!==Tt.K5?r.onKeydown(e):(this.selectedIndex=r.activeItemIndex,e.preventDefault())}_anyControlsInvalidOrPending(e){return!!(this._linear&&e>=0)&&this.steps.toArray().slice(0,e).some(n=>{const o=n.stepControl;return(o?o.invalid||o.pending||!n.interacted:!n.completed)&&!n.optional&&!n._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const e=this._elementRef.nativeElement,n=(0,zn.ht)();return e===n||e.contains(n)}_isValidIndex(e){return e>-1&&(!this.steps||e<this.steps.length)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(Zt.Is,8),t.Y36(t.sBO),t.Y36(t.SBq))},i.\u0275dir=t.lG2({type:i,selectors:[["","cdkStepper",""]],contentQueries:function(e,n,o){if(1&e&&(t.Suo(o,At,5),t.Suo(o,Xt,5)),2&e){let r;t.iGM(r=t.CRH())&&(n._steps=r),t.iGM(r=t.CRH())&&(n._stepHeader=r)}},inputs:{linear:"linear",selectedIndex:"selectedIndex",selected:"selected",orientation:"orientation"},outputs:{selectionChange:"selectionChange"},exportAs:["cdkStepper"]}),i})(),Rn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[Zt.vT]}),i})();var Vn=u(50727),ne=u(54004),Dt=u(71884);function Hn(i,a){if(1&i&&t.GkF(0,8),2&i){const e=t.oxw();t.Q6J("ngTemplateOutlet",e.iconOverrides[e.state])("ngTemplateOutletContext",e._getIconContext())}}function Kn(i,a){if(1&i&&(t.TgZ(0,"span",13),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e._getDefaultTextForState(e.state))}}function Wn(i,a){if(1&i&&(t.TgZ(0,"span",14),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e._intl.completedLabel)}}function Xn(i,a){if(1&i&&(t.TgZ(0,"span",14),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e._intl.editableLabel)}}function ti(i,a){if(1&i&&(t.TgZ(0,"mat-icon",13),t._uU(1),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(e._getDefaultTextForState(e.state))}}function ei(i,a){if(1&i&&(t.ynx(0,9),t.YNc(1,Kn,2,1,"span",10),t.YNc(2,Wn,2,1,"span",11),t.YNc(3,Xn,2,1,"span",11),t.YNc(4,ti,2,1,"mat-icon",12),t.BQk()),2&i){const e=t.oxw();t.Q6J("ngSwitch",e.state),t.xp6(1),t.Q6J("ngSwitchCase","number"),t.xp6(1),t.Q6J("ngIf","done"===e.state),t.xp6(1),t.Q6J("ngIf","edit"===e.state)}}function ni(i,a){if(1&i&&(t.TgZ(0,"div",15),t.GkF(1,16),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngTemplateOutlet",e._templateLabel().template)}}function ii(i,a){if(1&i&&(t.TgZ(0,"div",15),t._uU(1),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Oqu(e.label)}}function oi(i,a){if(1&i&&(t.TgZ(0,"div",17),t._uU(1),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Oqu(e._intl.optionalLabel)}}function ri(i,a){if(1&i&&(t.TgZ(0,"div",18),t._uU(1),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function ai(i,a){}function li(i,a){if(1&i&&(t.Hsn(0),t.YNc(1,ai,0,0,"ng-template",0)),2&i){const e=t.oxw();t.xp6(1),t.Q6J("cdkPortalOutlet",e._portal)}}const ci=["*"];function si(i,a){1&i&&t._UZ(0,"div",11)}const ie=function(i,a){return{step:i,i:a}};function di(i,a){if(1&i&&(t.ynx(0),t.GkF(1,9),t.YNc(2,si,1,0,"div",10),t.BQk()),2&i){const e=a.$implicit,n=a.index,o=a.last;t.oxw(2);const r=t.MAs(4);t.xp6(1),t.Q6J("ngTemplateOutlet",r)("ngTemplateOutletContext",t.WLB(3,ie,e,n)),t.xp6(1),t.Q6J("ngIf",!o)}}const oe=function(i){return{animationDuration:i}},re=function(i,a){return{value:i,params:a}};function mi(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("@horizontalStepTransition.done",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r._animationDone.next(o))}),t.GkF(1,13),t.qZA()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw(2);t.ekj("mat-horizontal-stepper-content-inactive",o.selectedIndex!==n),t.Q6J("@horizontalStepTransition",t.WLB(8,re,o._getAnimationDirection(n),t.VKq(6,oe,o._getAnimationDuration())))("id",o._getStepContentId(n)),t.uIk("aria-labelledby",o._getStepLabelId(n)),t.xp6(1),t.Q6J("ngTemplateOutlet",e.content)}}function gi(i,a){if(1&i&&(t.TgZ(0,"div",4)(1,"div",5),t.YNc(2,di,3,6,"ng-container",6),t.qZA(),t.TgZ(3,"div",7),t.YNc(4,mi,2,11,"div",8),t.qZA()()),2&i){const e=t.oxw();
1t.xp6(2),t.Q6J("ngForOf",e.steps),t.xp6(2),t.Q6J("ngForOf",e.steps)}}function pi(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",15),t.GkF(1,9),t.TgZ(2,"div",16)(3,"div",17),t.NdJ("@verticalStepTransition.done",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r._animationDone.next(o))}),t.TgZ(4,"div",18),t.GkF(5,13),t.qZA()()()()}if(2&i){const e=a.$implicit,n=a.index,o=a.last,r=t.oxw(2),l=t.MAs(4);t.xp6(1),t.Q6J("ngTemplateOutlet",l)("ngTemplateOutletContext",t.WLB(10,ie,e,n)),t.xp6(1),t.ekj("mat-stepper-vertical-line",!o),t.xp6(1),t.ekj("mat-vertical-stepper-content-inactive",r.selectedIndex!==n),t.Q6J("@verticalStepTransition",t.WLB(15,re,r._getAnimationDirection(n),t.VKq(13,oe,r._getAnimationDuration())))("id",r._getStepContentId(n)),t.uIk("aria-labelledby",r._getStepLabelId(n)),t.xp6(2),t.Q6J("ngTemplateOutlet",e.content)}}function ui(i,a){if(1&i&&(t.ynx(0),t.YNc(1,pi,6,18,"div",14),t.BQk()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.steps)}}function _i(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-step-header",19),t.NdJ("click",function(){const r=t.CHM(e).step;return t.KtG(r.select())})("keydown",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r._onKeydown(o))}),t.qZA()}if(2&i){const e=a.step,n=a.i,o=t.oxw();t.ekj("mat-horizontal-stepper-header","horizontal"===o.orientation)("mat-vertical-stepper-header","vertical"===o.orientation),t.Q6J("tabIndex",o._getFocusIndex()===n?0:-1)("id",o._getStepLabelId(n))("index",n)("state",o._getIndicatorType(n,e.state))("label",e.stepLabel||e.label)("selected",o.selectedIndex===n)("active",o._stepIsNavigable(n,e))("optional",e.optional)("errorMessage",e.errorMessage)("iconOverrides",o._iconOverrides)("disableRipple",o.disableRipple||!o._stepIsNavigable(n,e))("color",e.color||o.color),t.uIk("aria-posinset",n+1)("aria-setsize",o.steps.length)("aria-controls",o._getStepContentId(n))("aria-selected",o.selectedIndex==n)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null)("aria-disabled",!o._stepIsNavigable(n,e)||null)}}let qt=(()=>{class i extends te{}return i.\u0275fac=function(){let a;return function(n){return(a||(a=t.n5z(i)))(n||i)}}(),i.\u0275dir=t.lG2({type:i,selectors:[["","matStepLabel",""]],features:[t.qOj]}),i})(),bt=(()=>{class i{constructor(){this.changes=new Ct.x,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const hi={provide:bt,deps:[[new t.FiY,new t.tp0,bt]],useFactory:function fi(i){return i||new bt}},xi=(0,U.pj)(class extends Xt{constructor(a){super(a)}},"primary");let ae=(()=>{class i extends xi{constructor(e,n,o,r){super(o),this._intl=e,this._focusMonitor=n,this._intlSubscription=e.changes.subscribe(()=>r.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(e,n){e?this._focusMonitor.focusVia(this._elementRef,e,n):this._elementRef.nativeElement.focus(n)}_stringLabel(){return this.label instanceof qt?null:this.label}_templateLabel(){return this.label instanceof qt?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(e){return"number"==e?`${this.index+1}`:"edit"==e?"create":"error"==e?"warning":e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(bt),t.Y36(Wt.tE),t.Y36(t.SBq),t.Y36(t.sBO))},i.\u0275cmp=t.Xpm({type:i,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[t.qOj],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(e,n){1&e&&(t._UZ(0,"div",0),t.TgZ(1,"div")(2,"div",1),t.YNc(3,Hn,1,2,"ng-container",2),t.YNc(4,ei,5,4,"ng-container",3),t.qZA()(),t.TgZ(5,"div",4),t.YNc(6,ni,2,1,"div",5),t.YNc(7,ii,2,1,"div",5),t.YNc(8,oi,2,1,"div",6),t.YNc(9,ri,2,1,"div",7),t.qZA()),2&e&&(t.Q6J("matRippleTrigger",n._getHostElement())("matRippleDisabled",n.disableRipple),t.xp6(1),t.Gre("mat-step-icon-state-",n.state," mat-step-icon"),t.ekj("mat-step-icon-selected",n.selected),t.xp6(1),t.Q6J("ngSwitch",!(!n.iconOverrides||!n.iconOverrides[n.state])),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(2),t.ekj("mat-step-label-active",n.active)("mat-step-label-selected",n.selected)("mat-step-label-error","error"==n.state),t.xp6(1),t.Q6J("ngIf",n._templateLabel()),t.xp6(1),t.Q6J("ngIf",n._str
1ingLabel()),t.xp6(1),t.Q6J("ngIf",n.optional&&"error"!=n.state),t.xp6(1),t.Q6J("ngIf","error"==n.state))},dependencies:[_.O5,_.tP,_.RF,_.n9,_.ED,z.Hw,U.wG],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional,.mat-step-sub-label-error{font-size:12px}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,changeDetection:0}),i})();const se={horizontalStepTransition:(0,f.X$)("horizontalStepTransition",[(0,f.SB)("previous",(0,f.oB)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),(0,f.SB)("current",(0,f.oB)({transform:"none",visibility:"inherit"})),(0,f.SB)("next",(0,f.oB)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),(0,f.eR)("* => *",(0,f.jt)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),{params:{animationDuration:"500ms"}})]),verticalStepTransition:(0,f.X$)("verticalStepTransition",[(0,f.SB)("previous",(0,f.oB)({height:"0px",visibility:"hidden"})),(0,f.SB)("next",(0,f.oB)({height:"0px",visibility:"hidden"})),(0,f.SB)("current",(0,f.oB)({height:"*",visibility:"inherit"})),(0,f.eR)("* <=> current",(0,f.jt)("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),{params:{animationDuration:"225ms"}})])};let de=(()=>{class i{constructor(e){this.templateRef=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}}),i})(),vi=(()=>{class i{constructor(e){this._template=e}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.Rgc))},i.\u0275dir=t.lG2({type:i,selectors:[["ng-template","matStepContent",""]]}),i})(),me=(()=>{class i extends At{constructor(e,n,o,r){super(e,r),this._errorStateMatcher=n,this._viewContainerRef=o,this._isSelected=Vn.w0.EMPTY}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe((0,Et.w)(()=>this._stepper.selectionChange.pipe((0,ne.U)(e=>e.selectedStep===this),(0,st.O)(this._stepper.selected===this)))).subscribe(e=>{e&&this._lazyContent&&!this._portal&&(this._portal=new kt.UE(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(e,n){return this._errorStateMatcher.isErrorState(e,n)||!!(e&&e.invalid&&this.interacted)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36((0,t.Gpc)(()=>ge)),t.Y36(U.rD,4),t.Y36(t.s_b),t.Y36(ee,8))},i.\u0275cmp=t.Xpm({type:i,selectors:[["mat-step"]],contentQueries:function(e,n,o){if(1&e&&(t.Suo(o,qt,5),t.Suo(o,vi,5)),2&e){let r;t.iGM(r=t.CRH())&&(n.stepLabel=r.first),t.iGM(r=t.CRH())&&(n._lazyContent=r.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[t._Bn([{provide:U.rD,useExisting:i},{provide:At,useExisting:i}]),t.qOj],ngContentSelectors:ci,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(e,n){1&e&&(t.F$t(),t.YNc(0,li,2,1,"ng-template"))},dependencies:[kt.Pl],encapsulation:2,changeDetection:0}),i})(),ge=(()=>{class i extends St{constructor(e,n,o){super(e,n,o),this.steps=new t.n_E,this.animationDone=new t.vpe,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new Ct.x,this._animationDuration="";const r=o.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===r?"vertical":"horizontal"}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e)?e+"ms":e}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:e,templateRef:n})=>this._iconOverrides[e]=n),this.steps.changes.pipe((0,dt.R)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe((0,Dt.x)((e,n)=>e.fromState===n.fromState&&e.toState===n.toState),(0,dt.R)(this._destroyed)).subscribe(e=>{"current"===e.toState&&this.animationDone.emit()})}_stepIsNavigable(e,n){return n.completed||this.selectedIndex===e||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(Zt.Is,8),t.Y36(t.sBO),t.Y36(t.SBq))},i.\u0275cmp=t.Xpm({type:i,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(e,n,o){if(1&e&&(t.Suo(o,me,5),t.Suo(o,de,5)),2&e){let r;t.iGM(r=t.CRH())&&(n._steps=r),t.iGM(r=t.CRH())&&(n._icons=r)}},viewQuery:function(e,n){if(1&e&&t.Gf(ae,5),2&e){let o;t.iGM(o=t.CRH())&&(n._stepHeader=o)}},hostAttrs:["role","tablist"],hostVars:11,hostBindings:function(e,n){2&e&&(t.uIk("aria-orientation",n.orientation),t.ekj("mat-stepper-horizontal","horizontal"===n.orientation)("mat-stepper-vertical","vertical"===n.orientation)("mat-stepper-label-position-end","horizontal"===n.orientation&&"end"==n.labelPosition)("mat-stepper-label-position-bottom","horizontal"===n.orientation&&"bottom"==n.labelPosition)("mat-stepper-header-position-bottom","bottom"===n.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[t._Bn([{provide:St,useExisting:i}]),t.qOj],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(e,n){1&e&&(t.ynx(0,0),t.YNc(1,gi,5,2,"div",1),t.YNc(2,ui,2,1,"ng-container",2),t.BQk(),t.YNc(3,_i,1,23,"ng-template",null,3,t.W1O)),2&e&&(t.Q6J("ngSwitch",n.orientation),t.xp6(1),t.Q6J("ngSwitchCase","horizontal"),t.xp6(1),t.Q6J("ngSwitchCase","vertical"))},dependencies:[_.sg,_.O5,_.tP,_.RF,_.n9,ae],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;
1left:0;border-left-width:1px;border-left-style:solid}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[se.horizontalStepTransition,se.verticalStepTransition]},changeDetection:0}),i})(),Ci=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({providers:[hi,U.rD],imports:[U.BQ,_.ez,kt.eL,I.ot,Rn,z.Ps,U.si,U.BQ]}),i})();var X=u(53251),bi=u(85899),pe=u(15174),Mi=u(89731),Oi=u(79420),yi=u(23730),Mt=u(89071),mt=u(2162),Qt=u(56651),Nt=u(63292);let Jt=(()=>{class i extends Qt.Z{constructor(e){super(e),this.mgitemClick=new t.vpe,this.minusClicked=new t.vpe,this.clickedNoNeed=new t.vpe,this.updateMdBuilder=new t.vpe,this.choiceLimit=0,this.subGroupWithItem={},this.subGroupKey=[],this.menuWithItemCountTypeWeighting=!1,this.noNeed=!1,this.modifierService=e.get(mt.F),this.cd=e.get(t.sBO),this.menuService=e.get(Nt.h),this.menuWithItemCountTypeWeighting=this.cartService.isMenuWithItemCountTypeWeighting()}ngOnInit(){this.currentOrderManager=this.isUnlockItem?this.cartService.unlockCatOrderManager:this.orderManager,this.initData(),this.listenAddGroupItemFinishedAndThenAutoOpenModifierDialog()}ngAfterContentChecked(){this.cd.detectChanges()}initData(){this.proccessData(),this.initMdBuilder(),this.initChoiceLimit(),this.items=this.mergeVarationsItem(this.group),this.hideZeroPrice=this.settingManager.get("menu.hideZeroItemPrice",!1)}mergeVarationsItem(e){var n;let o=[];return null===(n=null==e?void 0:e.items)||void 0===n||n.map(r=>{var l;return(null===(l=null==r?void 0:r.variations)||void 0===l?void 0:l.length)>0?o.push(r,...r.variations):o.push(r)}),o}initMdBuilder(){var e,n;this.mdBuilder=new Mt.u(null===(e=this.currentOrderManager)||void 0===e?void 0:e.getStoreFromActiveManager(),null===(n=this.oibuilder)||void 0===n?void 0:n.build())}initChoiceLimit(){let e=this.oibuilder.getItemGroupIndex_hasSelected(this.group);console.log("oiGroupsIndex",e);let n=this.oibuilder.getChoices(e);console.log("initChoiceLimit",n),this.choiceLimit=n}proccessData(){this.noNeed=this.isNoNeed}_mgitemClick(e){var n;this.menuWithItemCountTypeWeighting&&(null!==(n=this.group)&&void 0!==n&&n.repeat&&!this.oibuilder.isWeightValidForNextAdd(this.group,e,1)||0==this.getQuanlity(this.group,e)&&!this.oibuilder.isWeightValidForNextAdd(this.group,e,1))||(0==this.getQuanlity(this.group,e)?(this.choiceLimit++,this.noNeed=!1,this.cd.detectChanges(),this.mgitemClick.emit(e)):(this.noNeed=!1,this.cd.detectChanges(),this.mgitemClick.emit(e)),this.initMdBuilder())}_minusClicked(e){this.getQuanlity(this.group,e)>1?(console.log("_minusClicked",e),this.minusClicked.emit(e)):(console.log("_minusClicked",e),this.choiceLimit--,this.minusClicked.emit(e)),this.initMdBuilder()}_noNeedClick(e){console.log("_noNeedClick",e,null==e?void 0:e.checked),this.noNeed&&this.clickedNoNeed.emit()}copyNoNeedClick(){this.noNeed=!0,this.clickedNoNeed.emit()}getQuanlity(e,n){var o;return(null===(o=this.oibuilder)||void 0===o?void 0:o.getQuantityInGroup(this.oibuilder.getItemGroupIndex_hasSelected(e),n.id))||0}getCurrentQuantitiesAmount(){var e;let n=0;for(let o of this.group.items)n+=null===(e=this.oibuilder)||void 0===e?void 0:e.getQuantityInGroup(this.oibuilder.getItemGroupIndex_hasSelected(this.group),o.id);return n}isChoiceLimitReached(){return this.choiceLimit==this.group.choiceLimit}isCurrentItemHasModifier(e){var n;return(null===(n=null==e?void 0:e.mgroups)||void 0===n?void 0:n.length)>0}isCompletedItemModifiersByItemId(e){return this.isGroupCompleted_itemMgroups(e)}isGroupCompleted_itemMgroups(e){var n,o,r;let l=null===(o=null===(n=this.mdBuilder)||void 0===n?void 0:n.items)||void 0===o?void 0:o.filter(c=>(null==c?void 0:c.id)===(null==e?void 0:e.id));return null===(r=null==e?void 0:e.mgroups)||void 0===r?void 0:r.every(c=>null==l?void 0:l.every(s=>{var d;return s&&(null===(d=this.modifierService)||void 0===d?void 0:d.isMGroupCompleted(this.mdBuilder,s,c))}))}
1showItemModifiers(e){var n;let o=null===(n=this.oibuilder)||void 0===n?void 0:n.build();console.log("showItemModifiers"),this.dialogService.openAux("order/dialog/item-modifiers",{store:this.currentOrderManager.store,group:this.group,item:e,oibuilder:this.oibuilder,orderItem:o,orderContext:this.orderContext,isEdit:this.isEdit},{autoClose:!1},c=>{var s;console.log("The showItemModifiers was closed",c);const d=this.cartService.orderManager;this.cd.detectChanges(),null!=c&&c.mdBuilder&&(this.mdBuilder=null==c?void 0:c.mdBuilder),console.log("ModifierBuilder showItemModifiers",this.mdBuilder),null===(s=this.updateMdBuilder)||void 0===s||s.emit(this.mdBuilder),console.log("this.oi",null==d?void 0:d.order),this.routingService.navigateCloseModal()})}getDefaultImage(e=!1,n,o){var r;return null===(r=this.menuService)||void 0===r?void 0:r.getDefaultImage(e,n,o)}getItemImg(e){var n,o;return(null==e?void 0:e.getImage("default",200,!1))||this.getDefaultImage(!1,null===(o=null===(n=this.currentOrderManager)||void 0===n?void 0:n.store)||void 0===o?void 0:o.brand,500)}mapSubGroupItem(){this.items.filter(e=>e.group).forEach(e=>{this.subGroupWithItem[e.group]||(this.subGroupWithItem[e.group]=[]),this.subGroupKey.includes(e.group)||this.subGroupKey.push(e.group),this.subGroupWithItem[e.group].push(e)}),this.items=this.items.filter(e=>!e.group),console.log("subGroupWithItem",this.subGroupWithItem)}listenAddGroupItemFinishedAndThenAutoOpenModifierDialog(){var e,n;console.log("this.$GroupItemModifierFinished",this.$UpdateMdbuilderSubject),null===(n=null===(e=this.$UpdateMdbuilderSubject)||void 0===e?void 0:e.pipe())||void 0===n||n.subscribe(o=>{o&&(this.mdBuilder=o)})}isChoiceLimitExist(e){return e.choiceLimit&&0!=e.choiceLimit?e.choiceLimit:e.max}getTotalItemWeightInItemGroup(e,n){var o;return(null===(o=this.oibuilder)||void 0===o?void 0:o.getTotalItemWeightInItemGroup(this.oibuilder.getItemGroupIndex_hasSelected(e),n.id))||0}isItemCanNotBeSelected(e){return this.menuWithItemCountTypeWeighting?e.weighting&&0==this.getTotalItemWeightInItemGroup(this.group,e)&&!this.oibuilder.isWeightValidForNextAdd(this.group,e,1):this.isChoiceLimitReached()&&0==this.getQuanlity(this.group,e)&&this.group.repeat||0==this.getQuanlity(this.group,e)&&this.getCurrentQuantitiesAmount()==this.isChoiceLimitExist(this.group)&&this.group.repeat}isMaxItemReached(e){if(!this.menuWithItemCountTypeWeighting)return this.getQuanlity(this.group,e)>=1&&this.getQuanlity(this.group,e)==e.max;const n=this.getTotalItemWeightInItemGroup(this.group,e),o=this.oibuilder.isWeightValidForNextAdd(this.group,e,1);return n>0&&e.max&&n>=e.max||n>0&&!o}isItemSelected(e){return this.menuWithItemCountTypeWeighting&&e.weighting?this.getTotalItemWeightInItemGroup(this.group,e)>0:this.getQuanlity(this.group,e)>0}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-component"]],inputs:{isEdit:"isEdit",oibuilder:"oibuilder",group:"group",isNoNeed:"isNoNeed",isUnlockItem:"isUnlockItem",$UpdateMdbuilderSubject:"$UpdateMdbuilderSubject"},outputs:{mgitemClick:"mgitemClick",minusClicked:"minusClicked",clickedNoNeed:"clickedNoNeed",updateMdBuilder:"updateMdBuilder"},features:[t.qOj],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();var ue=u(9276),gt=u(2823),D=u(50019),F=u(93985);function Pi(i,a){1&i&&(t.TgZ(0,"span",11),t._uU(1,"radio_button_unchecked"),t.qZA())}function Ii(i,a){1&i&&(t.TgZ(0,"span",12),t._uU(1,"radio_button_checked"),t.qZA())}function wi(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",6),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.copyNoNeedClick())}),t.TgZ(1,"div",7),t.YNc(2,Pi,2,0,"span",8),t.YNc(3,Ii,2,0,"span",9),t.TgZ(4,"h3",10),t._uU(5),t.ALo(6,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",!e.noNeed),t.xp6(1),t.Q6J("ngIf",e.noNeed),t.xp6(2),t.hij(" ",t.lcZ(6,3,"byod.components.mg-item-list.no-need")," ")}}function ki(i,a){1&i&&(t.TgZ(0,"h3",10),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.no-need")," "))}const Ti=function(i){return{selected:i}};function Zi(i,a){if(1&i&&(t.TgZ(0,"mat-list-item",3),t.YNc(1,wi,7,5,"div",4),t.YNc(2,ki,3,3,"h3",5),t.qZA()),2&i){const e=t.oxw();t.Q6J("ngClass",t.VKq(3,Ti,e.noNeed)),t.xp6(1),t.Q6J("ngIf",!e.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",e.orderContext.viewMode)}}function Ai(i,a){1&i&&(t.TgZ(0,"span",31),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij("",t.lcZ(2,1,"byod.components.mg-item-list.max")," "))}function Si(i,a){if(1&i&&(t.TgZ(0,"div",28),t.YNc(1,Ai,3,3,"span",29),t.TgZ(2,"h3",30),t._uU(3),t.qZA()()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();
1t.xp6(1),t.Q6J("ngIf",n.isMaxItemReached(e)),t.xp6(1),t.Q6J("@qtyInOut",n.getQuanlity(n.group,e)),t.xp6(1),t.hij(" ",n.getQuanlity(n.group,e)," ")}}function Di(i,a){if(1&i&&(t.TgZ(0,"div")(1,"h3",30),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("@qtyInOut",n.getQuanlity(n.group,e)),t.xp6(1),t.hij(" ",n.getQuanlity(n.group,e)," ")}}const ot=function(i){return{qty:i}};function qi(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function Qi(i,a){if(1&i&&(t.TgZ(0,"h3",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context)," ")}}function Ni(i,a){1&i&&(t.TgZ(0,"h3",34),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.free"),""))}function Ji(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",35),t.BQk()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("src",n.getItemImg(e))}}function Ui(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"span",20),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw()._minusClicked(r),t.KtG(o.stopPropagation())}),t._uU(3," remove_circle_outline "),t.qZA(),t.YNc(4,Si,4,3,"div",21),t.YNc(5,Di,3,2,"div",14),t.qZA(),t.TgZ(6,"span",22),t._uU(7,"add_circle"),t.qZA(),t.TgZ(8,"h3",23),t._uU(9),t.ALo(10,"i18n"),t.qZA(),t._UZ(11,"app-nutri-grade",24),t.YNc(12,qi,3,6,"h3",25),t.YNc(13,Qi,5,5,"h3",26),t.YNc(14,Ni,3,3,"h3",27),t.YNc(15,Ji,2,1,"ng-container",14),t.BQk()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(2),t.Q6J("@minusBtn",void 0),t.xp6(2),t.Q6J("ngIf",n.getQuanlity(n.group,e)==e.max&&n.getQuanlity(n.group,e)!=n.group.max),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)!=e.max||n.getQuanlity(n.group,e)==n.group.max),t.xp6(4),t.hij(" ",t.xi3(10,9,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",0==(null==e?null:e.price)||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.showItemImg&&!!n.getItemImg(e))}}function Fi(i,a){1&i&&(t.TgZ(0,"span",11),t._uU(1,"radio_button_unchecked"),t.qZA())}function Li(i,a){1&i&&(t.TgZ(0,"span",12),t._uU(1,"radio_button_checked"),t.qZA())}function Bi(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function Yi(i,a){if(1&i&&(t.TgZ(0,"h4",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context),"")}}function zi(i,a){1&i&&(t.TgZ(0,"h4",34),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.free"),""))}function ji(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",35),t.BQk()),2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("src",n.getItemImg(e))}}const _e=function(i,a,e){return{isSoldOut:i,isPreparing:a,"item-has-img":e}};function Gi(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",36),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw()._mgitemClick(r),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",7),t.YNc(2,Fi,2,0,"span",8),t.YNc(3,Li,2,0,"span",9),t.TgZ(4,"div",37)(5,"h3",10),t._uU(6),t.ALo(7,"i18n"),t.qZA(),t._UZ(8,"app-nutri-grade",24),t.qZA(),t.YNc(9,Bi,3,6,"h3",25),t.YNc(10,Yi,5,5,"h4",26),t.YNc(11,zi,3,3,"h4",27),t.YNc(12,ji,2,1,"ng-container",14),t.qZA()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.Q6J("ngClass",t.kEZ(12,_e,n.isSoldout(e),n.isPreparing(e),n.showItemImg&&!!n.getItemImg(e))),t.xp6(2),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>0),t.xp6(3),t.hij(" ",t.xi3(7,9,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",0==(null==e?null:e.price)||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.showItemImg&&!!n.getItemImg(e))}}function Ei(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Ui,16,12,"ng-container",17),t.YNc(2,Gi,13,16,"ng-template",null,18,t.W1O),t.BQk()),2&i){const e=t.MAs(3),n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.group.repeat)("ngIfElse",e)}}function $i(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit;
1t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function Ri(i,a){if(1&i&&(t.TgZ(0,"h3",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context),"")}}function Vi(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",39),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw()._showViewOnlyModifierPopup(r),t.KtG(o.stopPropagation())}),t._UZ(1,"app-icon",40),t.qZA()}}function Hi(i,a){if(1&i&&(t.ynx(0)(1),t.TgZ(2,"h3",10),t._uU(3),t.ALo(4,"i18n"),t.qZA(),t._UZ(5,"app-nutri-grade",24),t.YNc(6,$i,3,6,"h3",25),t.YNc(7,Ri,5,5,"h3",26),t.YNc(8,Vi,2,0,"div",38),t.BQk()()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(3),t.hij(" ",t.xi3(4,5,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.isCurrentItemHasModifier(e))}}function Ki(i,a){1&i&&(t.TgZ(0,"div",41),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.soldout")," "))}function Wi(i,a){1&i&&(t.TgZ(0,"div",42),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.making")," "))}function Xi(i,a){1&i&&t._UZ(0,"mat-divider")}const fe=function(i,a,e,n,o){return{selected:i,"not-select":a,isSoldOut:e,isPreparing:n,"max-item-reached":o}};function to(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-list-item",13),t.NdJ("click",function(o){const l=t.CHM(e).$implicit;return t.oxw()._mgitemClick(l),t.KtG(o.stopPropagation())}),t.YNc(2,Ei,4,2,"ng-container",14),t.YNc(3,Hi,9,8,"ng-container",14),t.YNc(4,Ki,3,3,"div",15),t.YNc(5,Wi,3,3,"div",16),t.qZA(),t.YNc(6,Xi,1,0,"mat-divider",14),t.BQk()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw();t.xp6(1),t.Q6J("ngClass",t.qbA(6,fe,o.isItemSelected(e),o.isItemCanNotBeSelected(e),o.isSoldout(e),o.isPreparing(e),o.isMaxItemReached(e))),t.xp6(1),t.Q6J("ngIf",!o.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",o.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",o.isSoldout(e)),t.xp6(1),t.Q6J("ngIf",o.isPreparing(e)),t.xp6(1),t.Q6J("ngIf",n!==(null==o.items?null:o.items.length)-1)}}const eo=function(i){return{expanded:i}};function no(i,a){if(1&i&&(t.TgZ(0,"div"),t._UZ(1,"app-icon",45),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(1,eo,n.expandState[e]))}}function io(i,a){1&i&&(t.TgZ(0,"span",50),t._uU(1,"add_circle_outline"),t.qZA())}function oo(i,a){1&i&&(t.TgZ(0,"span",22),t._uU(1,"add_circle"),t.qZA())}function ro(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(3).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function ao(i,a){if(1&i&&(t.TgZ(0,"h3",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(2);t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context)," ")}}function lo(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",35),t.BQk()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("src",n.getItemImg(e))}}function co(i,a){1&i&&(t.TgZ(0,"span",31),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij("",t.lcZ(2,1,"byod.components.mg-item-list.max")," "))}function so(i,a){if(1&i&&(t.TgZ(0,"div",28),t.YNc(1,co,3,3,"span",29),t.TgZ(2,"h3",30),t._uU(3),t.qZA()()),2&i){const e=t.oxw(4).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)==e.max),t.xp6(1),t.Q6J("@qtyInOut",n.getQuanlity(n.group,e)),t.xp6(1),t.hij(" x",n.getQuanlity(n.group,e)," ")}}function mo(i,a){if(1&i&&(t.TgZ(0,"div")(1,"h3",30),t._uU(2),t.qZA()()),2&i){const e=t.oxw(4).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("@qtyInOut",n.getQuanlity(n.group,e)),t.xp6(1),t.hij(" x",n.getQuanlity(n.group,e)," ")}}function go(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",51),t.YNc(1,so,4,3,"div",21),t.YNc(2,mo,3,2,"div",14),t.TgZ(3,"span",20),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(3).$implicit;return t.oxw(2)._minusClicked(r),t.KtG(o.stopPropagation())}),t._uU(4," remove_circle_outline "),t.qZA()()}if(2&i){const e=t.oxw(3).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)==e.max&&n.getQuanlity(n.group,e)!=n.group.max),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)!=e.max||n.getQuanlity(n.group,e)==n.group.max),t.xp6(1),t.Q6J("@minusBtn",void 0)}}function po(i,a){if(1&i&&(t.ynx(0),t.YNc(1,io,2,0,"span",47),t.YNc(2,oo,2,0,"span",48),t.TgZ(3,"h3",10),t._uU(4),t.ALo(5,"i18n"),t.qZA(),t._UZ(6,"app-nutri-grade",24),t.YNc(7,ro,3,6,"h3",25),t.YNc(8,ao,5,5,"h3",26),t.YNc(9,lo,2,1,"ng-container",14),t.YNc(10,go,5,3,"div",49),t.BQk()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>0),t.xp6(2),t.hij(" ",t.xi3(5,8,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.showItemImg&&!!n.getItemImg(e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>=1)}}function uo(i,a){1&i&&(t.TgZ(0,"span",11),t._uU(1,"radio_button_unchecked"),t.qZA())}function _o(i,a){1&i&&(t.TgZ(0,"span",12),t._uU(1,"check_circle"),t.qZA())}function fo(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(3).$implicit;
1t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function ho(i,a){if(1&i&&(t.TgZ(0,"h4",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(2);t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context),"")}}function xo(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",35),t.BQk()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("src",n.getItemImg(e))}}function vo(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",36),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw(2)._mgitemClick(r),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",7),t.YNc(2,uo,2,0,"span",8),t.YNc(3,_o,2,0,"span",9),t.TgZ(4,"h3",10),t._uU(5),t.ALo(6,"i18n"),t.qZA(),t._UZ(7,"app-nutri-grade",24),t.YNc(8,fo,3,6,"h3",25),t.YNc(9,ho,5,5,"h4",26),t.YNc(10,xo,2,1,"ng-container",14),t.qZA()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("ngClass",t.kEZ(11,_e,n.isSoldout(e),n.isPreparing(e),n.showItemImg&&!!n.getItemImg(e))),t.xp6(2),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>0),t.xp6(2),t.hij(" ",t.xi3(6,8,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.showItemImg&&!!n.getItemImg(e))}}function Co(i,a){if(1&i&&(t.ynx(0),t.YNc(1,po,11,11,"ng-container",17),t.YNc(2,vo,11,15,"ng-template",null,18,t.W1O),t.BQk()),2&i){const e=t.MAs(3),n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.group.repeat)("ngIfElse",e)}}function bo(i,a){if(1&i&&(t.TgZ(0,"h3",32),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,ot,e.weighting))," ")}}function Mo(i,a){if(1&i&&(t.TgZ(0,"h3",33)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context),"")}}function Oo(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",39),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw(2)._showViewOnlyModifierPopup(r),t.KtG(o.stopPropagation())}),t._UZ(1,"app-icon",40),t.qZA()}}function yo(i,a){if(1&i&&(t.ynx(0)(1),t.TgZ(2,"h3",10),t._uU(3),t.ALo(4,"i18n"),t.qZA(),t._UZ(5,"app-nutri-grade",24),t.YNc(6,bo,3,6,"h3",25),t.YNc(7,Mo,5,5,"h3",26),t.YNc(8,Oo,2,0,"div",38),t.BQk()()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(3),t.hij(" ",t.xi3(4,5,e,n.context.userLang)," "),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.isCurrentItemHasModifier(e))}}function Po(i,a){1&i&&(t.TgZ(0,"div",41),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.soldout")," "))}function Io(i,a){1&i&&(t.TgZ(0,"div",42),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.making")," "))}function wo(i,a){1&i&&t._UZ(0,"mat-divider")}const ko=function(i){return{hidden:i}};function To(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",46)(1,"mat-list-item",13),t.NdJ("click",function(o){const l=t.CHM(e).$implicit;return t.oxw(2)._mgitemClick(l),t.KtG(o.stopPropagation())}),t.YNc(2,Co,4,2,"ng-container",14),t.YNc(3,yo,9,8,"ng-container",14),t.YNc(4,Po,3,3,"div",15),t.YNc(5,Io,3,3,"div",16),t.qZA(),t.YNc(6,wo,1,0,"mat-divider",14),t.qZA()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw().$implicit,r=t.oxw();t.Q6J("ngClass",t.VKq(7,ko,r.collapsibleMode&&!r.expandState[o])),t.xp6(1),t.Q6J("ngClass",t.qbA(9,fe,r.isItemSelected(e),r.isItemCanNotBeSelected(e),r.isSoldout(e),r.isPreparing(e),r.isMaxItemReached(e))),t.xp6(1),t.Q6J("ngIf",!r.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",r.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",r.isSoldout(e)),t.xp6(1),t.Q6J("ngIf",r.isPreparing(e)),t.xp6(1),t.Q6J("ngIf",n!==(null==r.subGroupWithItem[o]?null:r.subGroupWithItem[o].length)-1)}}const Zo=function(i){return{"cursor-pointer":i}};function Ao(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",43),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.collapsibleMode&&l.expandClicked(r))}),t.TgZ(2,"div"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.YNc(5,no,2,3,"div",14),t.qZA(),t.YNc(6,To,7,15,"div",44),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw();
1t.xp6(1),t.Q6J("ngClass",t.VKq(6,Zo,n.collapsibleMode)),t.xp6(2),t.Oqu(t.lcZ(4,4,"tags."+e)),t.xp6(2),t.Q6J("ngIf",n.collapsibleMode),t.xp6(1),t.Q6J("ngForOf",n.subGroupWithItem[e])}}let he=(()=>{class i extends Jt{constructor(e,n,o){super(e),this.injector=e,this.inventoryService=n,this.menuManager=o,this.showViewOnlyModifierPopup=new t.vpe,this.isAutoPickup=!1,this.subGroupWithItem={},this.expandState={},this.soldoutCacheMap={},this.preparingCacheMap={},this.showItemImg=!1}ngOnInit(){super.ngOnInit(),this.mapSubGroupItem(),this.showItemImg=this.settingManager.get("showComboSubItemImage",!1),this.collapsibleMode&&this.subGroupKey.forEach(e=>{const n=this.settingManager.get("itemSubGroupCollapse",!0);this.expandState[e]=!n}),this.invSubs=this.inventoryService.invChange$.subscribe(e=>{this.soldoutCacheMap={},this.preparingCacheMap={},this.menuManager.clearAvailableMap()})}_mgitemClick(e){var n,o;if(!(this.orderContext.viewMode||this.isAutoPickup||this.menuWithItemCountTypeWeighting&&(null!==(n=this.group)&&void 0!==n&&n.repeat&&!this.oibuilder.isWeightValidForNextAdd(this.group,e,1)||0==this.getQuanlity(this.group,e)&&!this.oibuilder.isWeightValidForNextAdd(this.group,e,1)))){if(null!==(o=this.group)&&void 0!==o&&o.repeat){const r=this.getQuanlity(this.group,e);if((null==e?void 0:e.max)&&r>=(null==e?void 0:e.max))return}0==this.getQuanlity(this.group,e)?(this.choiceLimit++,this.noNeed=!1,this.cd.detectChanges(),this.mgitemClick.emit(e)):(this.noNeed=!1,this.cd.detectChanges(),this.mgitemClick.emit(e))}}_minusClicked(e){this.orderContext.viewMode||(this.getQuanlity(this.group,e)>1?(console.log("_minusClicked",e,this.getQuanlity(this.group,e)),e.quantity=0,this.minusClicked.emit(e)):(console.log("_minusClicked",e,this.getQuanlity(this.group,e)),this.choiceLimit--,e.quantity=0,this.minusClicked.emit(e)))}_showViewOnlyModifierPopup(e){this.showViewOnlyModifierPopup.emit(e)}expandClicked(e){this.expandState[e]=!this.expandState[e]}getItemId(e){var n;return null!==(n=e.backendId)&&void 0!==n?n:e.id}isSoldout(e){const n=this.getItemId(e);if(n in this.soldoutCacheMap)return this.soldoutCacheMap[n];const o=this.cartService.isSoldout(e);return this.soldoutCacheMap[n]=o,o}isPreparing(e){const n=this.getItemId(e);if(n in this.preparingCacheMap)return this.preparingCacheMap[n];const o=this.cartService.isPreparing(e);return this.preparingCacheMap[n]=o,o}ngOnDestroy(){var e;null===(e=this.invSubs)||void 0===e||e.unsubscribe()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(ue.V),t.Y36(C._K))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mg-item-list"]],inputs:{collapsibleMode:"collapsibleMode",isAutoPickup:"isAutoPickup"},outputs:{showViewOnlyModifierPopup:"showViewOnlyModifierPopup"},features:[t.qOj],decls:6,vars:3,consts:[[1,"sub-item-choices","bg-white"],["class","sub-item-row no-need-item",3,"ngClass",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"sub-item-row","no-need-item",3,"ngClass"],["class","flex w-full",3,"click",4,"ngIf"],["class","sub-item-name pl-4",4,"ngIf"],[1,"flex","w-full",3,"click"],["data-testid","combo-option",1,"checkbox-text","w-full"],["class","mat-icon material-icons icon-add-outline text-gray-400","data-testid","combo-radio-button",4,"ngIf"],["class","mat-icon material-icons icon-add-filled","data-testid","selected-combo-option",4,"ngIf"],[1,"sub-item-name","pl-4"],["data-testid","combo-radio-button",1,"mat-icon","material-icons","icon-add-outline","text-gray-400"],["data-testid","selected-combo-option",1,"mat-icon","material-icons","icon-add-filled"],[1,"sub-item-row",3,"ngClass","click"],[4,"ngIf"],["class","div-sold-out",4,"ngIf"],["class","div-preparing",4,"ngIf"],[4,"ngIf","ngIfElse"],["singleItem",""],[1,"qty-remove-box"],[1,"mat-icon","material-icons","icon-remove",3,"click"],["class","relative flex justify-center",4,"ngIf"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-filled"],[1,"sub-item-name","pl-2"],["type","simplified","mode","small",3,"item"],["class","sub-item-counts-as-n-items",4,"ngIf"],["class","sub-item-price",4,"ngIf"],["class","sub-item-price free",4,"ngIf"],[1,"relative","flex","justify-center"],["class","max-box absolute",4,"ngIf"],[1,"sub-item-qty"],[1,"max-box","absolute"],[1,"sub-item-counts-as-n-items"],[1,"sub-item-price"],[1,"sub-item-price","free"],[1,"item-img2",3,"src"],[1,"flex","w-full",3,"ngClass","click"],[1,"item-with-nutri-grade"],["class","qty-remove-box justify-end cursor-pointer",3,"click",4,"ngIf"],[1,"qty-remove-box","justify-end","cursor-pointer",3,"click"],["name","chevron_right","source","mat"],[1,"div-sold-out"],[1,"div-preparing"],[1,"flex","justify-between","subgroup-title",3,"ngClass","click"],[3,"ngClass",4,"ngFor","ngForOf"],["name","expand_circle_down","size","18","source","mat",1,"icon-expand","ml-1",3,"ngClass"],[3,"ngClass"],["class","add-btn mat-icon material-icons icon-add-outline text-gray-400","data-testid","icon-add-outline",4,"ngIf"],["class","add-btn mat-icon material-icons icon-add-filled","data-testid","icon-add-outline",4,"ngIf"],["class","qty-remove-box  justify-end",4,"ngIf"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-outline","text-gray-400"],[1,"qty-remove-box","justify-end"]],template:function(e,n){1&e&&(t.TgZ(0,"mat-list",0)(1,"mat-selection-list"),t.YNc(2,Zi,3,5,"mat-list-item",1),t._UZ(3,"mat-divider"),t.YNc(4,to,7,12,"ng-container",2),t.YNc(5,Ao,7,8,"ng-container",2),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngIf",(null==n.group?null:n.group.optional)&&0==n.group.min),t.xp6(2),t.Q6J("ngForOf",n.items),t.xp6(1),t.Q6J("ngForOf",n.subGroupKey))},dependencies:[_.mk,_.sg,_.O5,q.g,S.o,et.d,nt.i$,nt.Tg,nt.Ub,gt.i,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ng
1content-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:0}.mat-list-base[_ngcontent-%COMP%]{padding-top:0}mat-list.sub-item-choices[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}mat-list-item[_ngcontent-%COMP%]{height:auto!important;transition:.3s all ease-in-out}mat-list-item[_ngcontent-%COMP%]  .mat-list-item-content{padding:.8rem 1.5rem!important}mat-list-item[_ngcontent-%COMP%]  .mat-radio-outer-circle{border-color:#9ca3af!important;height:22px!important;width:22px!important}mat-list-item[_ngcontent-%COMP%]  .mat-radio-checked .mat-radio-outer-circle{border-color:var(--P)!important}mat-list-item[_ngcontent-%COMP%]  .mat-radio-inner-circle{background:var(--P)!important;height:22px!important;width:22px!important}mat-list-item[_ngcontent-%COMP%]  .mat-ripple-element{background-color:var(--P)!important}mat-list-item.isSoldOut[_ngcontent-%COMP%]{color:#ccc}mat-list-item.isPreparing[_ngcontent-%COMP%]{color:#ccc}mat-list-item.not-select[_ngcontent-%COMP%]{background:#fafafa;color:#c2c2c2}mat-list-item.not-select[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{color:#c2c2c2!important}mat-list-item.max-item-reached[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{opacity:25%}.sub-item-row[_ngcontent-%COMP%]{font-family:var(--CF0);cursor:pointer}.sub-item-row[_ngcontent-%COMP%]   span.mat-icon[_ngcontent-%COMP%]{color:var(--P)}.sub-item-row[_ngcontent-%COMP%]   .icon-remove[_ngcontent-%COMP%]{color:#858585!important;opacity:1}.sub-item-row[_ngcontent-%COMP%]  .mat-list-item-content{padding:0 1rem!important;min-height:49px}.sub-item-row[_ngcontent-%COMP%]   mat-checkbox.sub-item-checkbox[_ngcontent-%COMP%]  .mat-checkbox-inner-container{height:20px;width:20px;margin:2px}.sub-item-row[_ngcontent-%COMP%]   mat-checkbox.sub-item-checkbox[_ngcontent-%COMP%]  .mat-checkbox-frame{border-radius:100rem!important;background:#fff!important;border-color:#d3d3d3}.sub-item-row[_ngcontent-%COMP%]   mat-checkbox.sub-item-checkbox.mat-checkbox-checked[_ngcontent-%COMP%]  .mat-checkbox-background{border-radius:100rem!important;background:var(--P)}.sub-item-row[_ngcontent-%COMP%]   mat-checkbox.sub-item-checkbox.mat-checkbox-checked[_ngcontent-%COMP%]  .mat-checkbox-background .mat-checkbox-checkmark{padding:.2rem}.sub-item-row[_ngcontent-%COMP%]   div.checkbox-text[_ngcontent-%COMP%]{display:flex;align-items:center}.sub-item-row[_ngcontent-%COMP%]   div.checkbox-text[_ngcontent-%COMP%]   .item-img[_ngcontent-%COMP%]{width:5rem;height:5rem;display:none;margin-left:.5rem}.sub-item-row.selected[_ngcontent-%COMP%], .sub-item-row.max-item-reached[_ngcontent-%COMP%]{box-shadow:inset 5px 0 0 var(--P)}mat-radio-group[_ngcontent-%COMP%], mat-radio-button[_ngcontent-%COMP%]{width:100%}.no-need-item[_ngcontent-%COMP%]     .mat-radio-label-content{padding-left:0!important}.sub-item-name[_ngcontent-%COMP%]{font-weight:500;font-size:14px;color:#333;flex:1 1;line-height:normal;word-wrap:break-word;overflow-wrap:break-word;hyphens:auto;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.sub-item-price[_ngcontent-%COMP%]{font-weight:500;font-size:14px;text-align:left;flex:0 1 auto;margin-left:.5rem;white-space:nowrap;line-height:normal;color:#333}.sub-item-price.free[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:var(--custom-brand-primary-color2);text-transform:uppercase}.sub-item-qty[_ngcontent-%COMP%]{margin-left:.3rem;margin-right:.3rem;font-size:12px;text-align:right;flex:0 0 12.5%;line-height:normal;font-weight:500}.div-sold-out[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%);border:1px solid var(--P);border-radius:.2rem;color:var(--P);padding:.35rem .5rem;background:rgba(255,255,255,.6509803922)}.div-preparing[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%);border:1px solid green;border-radius:.2rem;color:green;padding:.35rem .5rem;background:rgba(255,255,255,.6509803922)}mat-divider[_ngcontent-%COMP%]{margin-left:3.5rem!important;border-color:#ececec}.add-btn[_ngcontent-%COMP%]{cursor:pointer}.qty-remove-box[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:nowrap;flex:0 0 auto;white-space:nowrap}.max-box[_ngcontent-%COMP%]{font-size:.6rem;background:#1bbb8f;color:#fff;padding:1px 5px;border-radius:100rem;top:-12px}@media not screen and (min-width: 601px) and (max-width: 992px){mat-list-item[_ngcontent-%COMP%]  .mat-list-item-content{padding:.8rem 1rem!important}.sub-item-row[_ngcontent-%COMP%]  .mat-list-item-content{min-height:40px}
1.sub-item-name[_ngcontent-%COMP%]{font-weight:500;font-size:12px;color:#333;flex:1 1;line-height:normal;word-wrap:break-word;overflow-wrap:break-word;hyphens:auto;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.sub-item-price[_ngcontent-%COMP%], .sub-item-price.free[_ngcontent-%COMP%]{font-size:12px;font-weight:500}}.subgroup-title[_ngcontent-%COMP%]{padding:.875rem 1.5rem .5rem;font-size:.8rem;background:#f9f9f9;color:#898989}.icon-expand[_ngcontent-%COMP%]{cursor:pointer}.icon-expand.expanded[_ngcontent-%COMP%]{transform:rotate(180deg)}.item-img2[_ngcontent-%COMP%]{width:2rem;height:2rem;margin-left:.5rem}.sub-item-counts-as-n-items[_ngcontent-%COMP%]{font-weight:400;font-size:.8rem}.item-with-nutri-grade[_ngcontent-%COMP%]{display:flex;flex:1 1}.item-with-nutri-grade[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%]{flex:none;padding-right:1.5rem}app-nutri-grade[_ngcontent-%COMP%]{position:relative;z-index:0}"],data:{animation:[(0,f.X$)("minusBtn",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,width:0}),(0,f.jt)("0.3s cubic-bezier(0,.74,.56,1.3)",(0,f.oB)({opacity:1,width:f.l3}))]),(0,f.eR)(":leave",[(0,f.jt)("0.3s ease-in-out",(0,f.oB)({opacity:0,width:0}))])]),(0,f.X$)("qtyInOut",[(0,f.eR)(":increment",[(0,f.oB)({opacity:.5,transform:"scale(1.8)"}),(0,f.jt)("0.3s cubic-bezier(0,.74,.56,1.3)",(0,f.oB)({opacity:1,transform:"scale(1)"}))]),(0,f.eR)(":decrement",[(0,f.oB)({opacity:.5,transform:"scale(1.8)"}),(0,f.jt)("0.3s cubic-bezier(0,.74,.56,1.3)",(0,f.oB)({opacity:1,transform:"scale(1)"}))])])]}}),i})(),xe=(()=>{class i extends C.H6{constructor(e,n){super(e),this.injector=e,this.orderContext=n,this.mgitemClick=new t.vpe,this.minusClicked=new t.vpe,this.clickedNoNeed=new t.vpe,this.showViewOnlyModifierPopup=new t.vpe,this.isAutoPickup=!1}ngOnInit(){console.log("ItemGroupSelectCardComponent",this.group)}_mgitemClick(e){if(console.log("=== item when clicked: ",e,this.oibuilder),e.hasOwnProperty("messageLimit")&&e.messageLimit>0){let n=!1;for(let c=0;c<this.oibuilder.items.length;c++)this.oibuilder.items[c].id==e.id&&(n=!0);if(n)return void this.minusClicked.emit(e);let o="order/dialog/message",r=(0,V.Z)(e);if(this.oibuilder.findIndexByGroups(this.oibuilder.groups,this.group)>=0){const c=this.oibuilder.items.filter(s=>s.id==e.id);c.length>0&&(r=c[0],r.messageLimit=e.messageLimit,r.messageMaxLength=e.messageMaxLength)}this.dialogService.openAux(o,{data:r},{autoClose:!1},c=>{console.log("result after : ",c),this.minusClicked.emit(c),this.mgitemClick.emit(c),this.routingService.navigateCloseModal()})}else this.mgitemClick.emit(e)}_minusClicked(e){this.minusClicked.emit(e)}_clickedNoNeed(){this.clickedNoNeed.emit()}_showViewOnlyModifierPopup(e){this.showViewOnlyModifierPopup.emit(e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-item-group-select-card"]],inputs:{group:"group",isNoNeed:"isNoNeed",oibuilder:"oibuilder",collapsibleMode:"collapsibleMode",isUnlockItem:"isUnlockItem",isAutoPickup:"isAutoPickup"},outputs:{mgitemClick:"mgitemClick",minusClicked:"minusClicked",clickedNoNeed:"clickedNoNeed",showViewOnlyModifierPopup:"showViewOnlyModifierPopup"},features:[t.qOj],decls:1,vars:6,consts:[[3,"group","isNoNeed","oibuilder","isAutoPickup","collapsibleMode","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","showViewOnlyModifierPopup"]],template:function(e,n){1&e&&(t.TgZ(0,"app-mg-item-list",0),t.NdJ("mgitemClick",function(r){return n._mgitemClick(r)})("minusClicked",function(r){return n._minusClicked(r)})("clickedNoNeed",function(){return n._clickedNoNeed()})("showViewOnlyModifierPopup",function(r){return n._showViewOnlyModifierPopup(r)}),t.qZA()),2&e&&t.Q6J("group",n.group)("isNoNeed",n.isNoNeed)("oibuilder",n.oibuilder)("isAutoPickup",n.isAutoPickup)("collapsibleMode",n.collapsibleMode)("isUnlockItem",n.isUnlockItem)},dependencies:[he],data:{animation:[]}}),i})(),ve=(()=>{class i extends Qt.Z{constructor(e){super(e),this.mgitemClick=new t.vpe,this.itemClicked=new t.vpe,this.minusClicked=new t.vpe,this.choiceLimit=0,this.absentIdArr=[],this.modifierService=e.get(mt.F),this.cd=e.get(t.
1sBO),this.menuService=e.get(Nt.h)}ngOnInit(){this.initData()}ngAfterContentChecked(){this.cd.detectChanges()}initData(){this.initClassifyData(),this.initAbSentIdArr(),console.log("absentIdArr",this.absentIdArr)}initAbSentIdArr(){var e,n;null===(n=null===(e=this.mgroup)||void 0===e?void 0:e.items)||void 0===n||n.forEach(o=>{var r;return(null==o?void 0:o.absentId)&&(null===(r=this.absentIdArr)||void 0===r?void 0:r.push(o.absentId))})}initClassifyData(){var e,n;let{classifyItemMap:o,keyValArr:r}=null===(e=this.modifierService)||void 0===e?void 0:e.proccessClassifyData(this.mgroup);this.classifyItemMap=o,this.keyValArr=r,!this.isEdit&&(null===(n=this.classifyItemMap)||void 0===n||n.map(l=>null==l?void 0:l.map(c=>{var s,d;let m=this.getMitemQuanlity(c),p=null==l?void 0:l.find(h=>(null==h?void 0:h.id)===(null==c?void 0:c.absentId));if(!(p&&this.getMitemQuanlity(p)||this.getCurrentQuantityAmount()>=(null===(s=this.mgroup)||void 0===s?void 0:s.max))&&m<(null==c?void 0:c.baseQty))for(let h=0;h<(null==c?void 0:c.baseQty);h++)null===(d=this.mdBuilder)||void 0===d||d.plus(this.item,this.mgroup,c)})))}_mgitemClick(e){this.mgitemClick.emit(e)}_itemClicked(e){this.mgroup.repeat&&this.getCurrentQuantityAmount()==this.mgroup.max||this.isSoldout(e)||this.mgroup.repeat&&this.isChoiceLimitReached()&&this.getCurrentQuantityAmount()==this.mgroup.max||this.mgroup.repeat&&this.isChoiceLimitReached()&&0==this.getMitemQuanlity(e)||this.mgroup.repeat&&0==this.getMitemQuanlity(e)&&this.mdBuilder.orderitem.items.length>1&&this.getCurrentQuantityAmount()==this.mgroup.max||(0==this.getMitemQuanlity(e)?(this.choiceLimit++,this.itemClicked.emit(e)):this.itemClicked.emit(e))}_minusClicked(e){1==this.getMitemQuanlity(e)?(this.choiceLimit--,this.minusClicked.emit(e)):this.minusClicked.emit(e)}isSelected(e){var n;return null===(n=this.modifierService)||void 0===n?void 0:n.isSelected(this.mdBuilder,this.item,this.mgroup,e)}isSoldout(e){var n;return null===(n=this.cartService)||void 0===n?void 0:n.isSoldout(e)}isChoiceLimitReached(){let e=0;for(let n of this.mgroup.items)this.getMitemQuanlity(n)>0&&e++;return this.choiceLimit==this.mgroup.choiceLimit||e==this.mgroup.choiceLimit}getCurrentQuantityAmount(){var e;let n=0;return null===(e=this.classifyItemMap)||void 0===e||e.map(o=>null==o?void 0:o.map(r=>{let l=this.getMitemQuanlity(r);n+=l})),n}getDefaultImage(e=!1,n,o){var r;return null===(r=this.menuService)||void 0===r?void 0:r.getDefaultImage(e,n,o)}getMitemQuanlity(e){var n;return null===(n=this.mdBuilder)||void 0===n?void 0:n.getQuantity(this.item,this.mgroup,e)}isMitemOnSchedule(e){if(e.start&&e.end){const n=this.timeService.getTime();return e.start<n&&n<e.end}return!0}isDisableMitem(e){var n;let l=this.getCurrentQuantityAmount()===(null===(n=this.mgroup)||void 0===n?void 0:n.max),c=!this.isSelected(e);return this.isSoldout(e)||l&&c||this.isChoiceLimitReached()&&c&&this.mgroup.repeat||c&&this.mdBuilder.orderitem.items.length>1&&l||this.isChoiceLimitReached()&&l&&c}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-component"]],inputs:{isEdit:"isEdit",item:"item",mgroup:"mgroup",mdBuilder:"mdBuilder"},outputs:{mgitemClick:"mgitemClick",itemClicked:"itemClicked",minusClicked:"minusClicked"},features:[t.qOj],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();var rt=u(51432);function So(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"p",4),t._uU(2),t.qZA(),t.BQk()),2&i){const e=t.oxw().index,n=t.oxw();t.xp6(2),t.Oqu(n.keyValArr[e])}}function Do(i,a){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"app-img",11),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ratio",1)("src",(null==e?null:e.getImage("default",200,!1))||n.getDefaultImage(!1,null==n.orderContext||null==n.orderContext.store?null:n.orderContext.store.brand,500))}}function qo(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,e,n.context.userLang))}}function Qo(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.xp6(1),t.Oqu(t.xi3(2,1,n.getAbsentItemName(e),n.context.userLang))}}function No(i,a){if(1&i&&(t.TgZ(0,"h5"),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.xp6(1),t.hij(" +",t.Dn7(2,1,t.lcZ(3,5,e)*(n.getMitemQuanlity(e)-e.baseQty),!0,n.context)," ")}}function Jo(i,a){if(1&i&&(t.TgZ(0,"div",12),t.YNc(1,qo,3,4,"h3",3),t.YNc(2,Qo,3,4,"h3",3),t.YNc(3,No,4,7,"h5",3),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.getMitemQuanlity(e)>=e.baseQty||!n.getAbsentItemName(e)),t.xp6(1),t.Q6J("ngIf",0==n.getMitemQuanlity(e)&&n.getAbsentItemName(e)),t.xp6(1),t.Q6J("ngIf",e.price*(n.getMitemQuanlity(e)-e.baseQty)>0)}}function Uo(i,a){if(1&i&&(t.TgZ(0,"h5"),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.xp6(1),t.hij(" +",t.Dn7(2,1,t.lcZ(3,5,e),!0,n.context)," ")}}function Fo(i,a){if(1&i&&(t.TgZ(0,"div",12)(1,"h3"),t._uU(2),t.ALo(3,"i18n"),t.qZA(),t.YNc(4,Uo,4,7,"h5",3),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.xp6(2),t.Oqu(t.xi3(3,2,e,n.context.userLang)),t.xp6(2),t.Q6J("ngIf",0!=e.price)}}function Lo(i,a){1&i&&t._UZ(0,"app-icon",20),2&i&&t.Q6J("size",23)}function Bo(i,a){1&i&&(t.TgZ(0,"h3",21),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.components.mitem-select-list.regular")))}function Yo(i,a){if(1&i&&(t.TgZ(0,"h3",21),t._uU(1),t.qZA()),2&i){const e=t.oxw(4).$implicit,n=t.oxw(3);let o;t.xp6(1),t.hij("x",null!==(o=n.getMitemQuanlity(e)-e.baseQty)&&void 0!==o?o:0,"")}}function zo(i,a){1&i&&t._UZ(0,"app-icon",22),2&i&&t.Q6J("size",23)}function jo(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",13)(1,"div",14),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(3).$implicit;return t.oxw(3)._minusClicked(r),t.KtG(o.stopPropagation())}),t.YNc(2,Lo,1,1,"app-icon",15),t.qZA(),t.TgZ(3,"div",16),t.YNc(4,Bo,3,3,"h3",17),t.YNc(5,Yo,2,1,"h3",17),t.qZA(),t.TgZ(6,"div",18),t.YNc(7,zo,1,1,"app-icon",19),t.qZA()()}if(2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.xp6(2),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat),t.xp6(2),t.Q6J("ngIf",n.getMitemQuanlity(e)==e.baseQty),t.xp6(1),t.Q6J("ngIf",!e.baseQty||n.getMitemQuanlity(e)!=e.baseQty),t.xp6(2),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat)}}function Go(i,a){if(1&i&&(t.ynx(0),t.YNc(1,jo,8,4,"div",9),t.BQk()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat)}}function Eo(i,a){1&i&&(t.TgZ(0,"div",13)(1,"div",23),t._UZ(2,"app-icon",24),t.qZA()()),2&i&&(t.xp6(2),t.Q6J("size",23))}const $o=function(i,a,e){return{selected:i,disabled:a,"no-img":e}};function Ro(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",6),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw(3)._itemClicked(r),t.KtG(o.stopPropagation())}),t.YNc(1,Do,2,2,"div",7),t.YNc(2,Jo,4,3,"div",8),t.YNc(3,Fo,5,5,"div",8),t.YNc(4,Go,2,1,"ng-container",3),t.YNc(5,Eo,3,1,"div",9),t.qZA()}if(2&i){const e=t.oxw().$implicit,n=t.oxw(3);t.Q6J("ngClass",t.kEZ(6,$o,n.isSelected(e),n.isDisableMitem(e),!(null!=e.mgroups&&null!=e.mgroups.item&&e.mgroups.item.images))),t.xp6(1),t.Q6J("ngIf",null==e.mgroups||null==e.mgroups.item?null:e.mgroups.item.images),t.xp6(1),t.Q6J("ngIf",e.baseQty),t.xp6(1),t.Q6J("ngIf",!e.baseQty),t.xp6(1),t.Q6J("ngIf",n.getMitemQuanlity(e)),t.xp6(1),t.Q6J("ngIf",!(e.baseQty>0||null!=n.mgroup&&n.mgroup.repeat)&&n.isSelected(e))}}function Vo(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Ro,6,10,"div",5),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",!(null!=n.absentIdArr&&n.absentIdArr.includes(null==e?null:e.id)))}}function Ho(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Vo,2,1,"ng-container",2),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e)}}function Ko(i,a){if(1&i&&(t.ynx(0),t.YNc(1,So,3,1,"ng-container",3),t.YNc(2,Ho,2,1,"ng-container",3),t.BQk()),2&i){const e=a.$implicit,n=a.index,o=t.oxw();
1t.xp6(1),t.Q6J("ngIf",o.keyValArr&&o.keyValArr[n]),t.xp6(1),t.Q6J("ngIf",e&&e.length>0)}}let Ce=(()=>{class i extends ve{constructor(e){super(e),this.injector=e}ngOnInit(){super.ngOnInit(),console.log("MitemSelectListComponent",this.item)}getAbsentItemName(e){var n;return this.mdBuilder.findAbsentItemByAbsentid(e,null===(n=this.mgroup)||void 0===n?void 0:n.items)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mitem-select-list"]],inputs:{mgroup:"mgroup",mdBuilder:"mdBuilder"},features:[t.qOj],decls:3,vars:1,consts:[["aria-label","Fruit selection",1,"mitem-wrapper"],["chipList",""],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"modifier-sub-group-title"],["class","btn-mitem","matRipple","","data-testid","modifier-option",3,"ngClass","click",4,"ngIf"],["matRipple","","data-testid","modifier-option",1,"btn-mitem",3,"ngClass","click"],["class","mitem-img",4,"ngIf"],["class","btn-mitem-inner",4,"ngIf"],["class","modifier-qty-panel",4,"ngIf"],[1,"mitem-img"],[3,"ratio","src"],[1,"btn-mitem-inner"],[1,"modifier-qty-panel"],[1,"minus-qty-btn","btn-remove",3,"click"],["name","remove","source","mat",3,"size",4,"ngIf"],[1,"modifier-qty"],["class","selected-qty",4,"ngIf"],[1,"minus-qty-btn","btn-add"],["name","add","source","mat",3,"size",4,"ngIf"],["name","remove","source","mat",3,"size"],[1,"selected-qty"],["name","add","source","mat",3,"size"],[1,"minus-check-btn","btn-check"],["name","check","source","mat",3,"size"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0,1),t.YNc(2,Ko,3,2,"ng-container",2),t.qZA()),2&e&&(t.xp6(2),t.Q6J("ngForOf",n.classifyItemMap))},dependencies:[_.mk,_.sg,_.O5,q.g,S.o,U.wG,M.X$,D.G,F.A,rt.y],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:0;padding:0}.btn-mitem[_ngcontent-%COMP%]{display:flex;padding:.5rem 1rem .5rem .5rem;background:#fff;align-items:center;min-height:6rem;border-radius:.5rem;margin-bottom:.5rem}.btn-mitem.selected[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px var(--P)}.btn-mitem.disabled[_ngcontent-%COMP%]{opacity:.5}.btn-mitem.no-img[_ngcontent-%COMP%]{padding-left:1.5rem}.modifier-qty[_ngcontent-%COMP%]{display:flex}.mitem-img[_ngcontent-%COMP%]{flex:0 0 5rem;margin-right:.5rem}.btn-mitem-inner[_ngcontent-%COMP%]{flex:1 1 auto}.btn-mitem-inner[_ngcontent-%COMP%] > h3[_ngcontent-%COMP%]{font-size:1rem;margin-bottom:.3rem;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.btn-mitem-inner[_ngcontent-%COMP%] > h5[_ngcontent-%COMP%]{font-size:1rem;color:var(--P);font-weight:400}.modifier-qty-panel[_ngcontent-%COMP%]{flex:0 0 auto;margin-left:.5rem;display:flex;align-items:center;justify-content:flex-end}.selected-qty[_ngcontent-%COMP%]{width:4.5rem;display:flex;align-items:center;justify-content:center;font-size:1.2rem;font-weight:400}.minus-qty-btn[_ngcontent-%COMP%]{width:1.6rem;height:1.6rem;display:flex;align-items:center;justify-content:center;border-radius:500px}.btn-add[_ngcontent-%COMP%]{color:var(--P)}.minus-check-btn[_ngcontent-%COMP%]{width:1.6rem;height:1.6rem;display:flex;align-items:center;justify-content:center;border-radius:500px;background:var(--P);color:#fff}.btn-mitem-inner[_ngcontent-%COMP%] > h3[_ngcontent-%COMP%]{font-weight:700;color:#333}"]}),i})();function Wo(i,a){1&i&&(t.TgZ(0,"span",11),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" *",t.lcZ(2,1,"byod.dialogs.segment-modifiers-dialog.require")," "))}const Xo=function(i){return{completed:i}};function tr(i,a){if(1&i&&(t.TgZ(0,"div")(1,"div",7)(2,"p",8),t._uU(3),t.qZA(),t._UZ(4,"span",9),t.YNc(5,Wo,3,3,"span",10),t.qZA()()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(3,Xo,n.isGroupCompleted(n.item,e))),t.xp6(2),t.Oqu(null==n.modifierService?null:n.modifierService.getSelectRules(e)),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.min)>0)}}function er(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",4),t.YNc(1,tr,6,5,"div",5),t.TgZ(2,"app-mitem-select-list",6),t.NdJ("itemClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw();return t.KtG(l._itemClicked(l.item,r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw();return t.KtG(l._minusClicked(l.item,r,o))}),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.uIk("data-mg-min",e.min)("data-mg-max",e.max),t.xp6(1),t.Q6J("ngIf",!!n.modifierService.getSelectRules(e)),t.xp6(1),t.Q6J("isEdit",!!n.isEdit)("mgroup",e)("item",n.item)("mdBuilder",n.mdBuilder)}}function nr(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"div",1),t.TgZ(2,"div",2),t.YNc(3,er,3,7,"div",3),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=a.index;t.xp6(1),t.MGl("id","section-",n,""),t.xp6(2),t.Q6J("ngIf",e.items&&e.items.length>0)}}let Ut=(()=>{class i extends C.nh{constructor(e,n){super(e),this.injector=e,this.modifierService=n,this.itemClicked=new t.vpe,this.minusClicked=new t.vpe}ngOnInit(){this.initData()}initData(){console.log("ItemModifiersComponent params",this.store,this.mdBuilder)}isInCurrentGroup(e){var n,o;return(null===(o=null===(n=this.ig)||void 0===n?void 0:n.items)||void 0===o?void 0:o.findIndex(l=>(null==l?void 0:l.id)===(null==e?void 0:e.id)))>=0}
1_minusClicked(e,n,o){console.log("ItemModifiersComponent _minusClicked",e,n,o),this.minusClicked.emit({item:e,group:n,mItem:o})}_itemClicked(e,n,o){console.log("ItemModifiersComponent _itemClicked",e,n,o),this.itemClicked.emit({item:e,group:n,mItem:o})}isGroupCompleted(e,n){return this.modifierService.isMGroupCompleted(this.mdBuilder,e,n)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(mt.F))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-item-modifiers"]],inputs:{isEdit:"isEdit",store:"store",item:"item",mdBuilder:"mdBuilder"},outputs:{itemClicked:"itemClicked",minusClicked:"minusClicked"},features:[t.qOj],decls:1,vars:1,consts:[[4,"ngFor","ngForOf"],[3,"id"],[1,"modifier-choice-outer"],["class","modifier-choices",4,"ngIf"],[1,"modifier-choices"],[4,"ngIf"],[3,"isEdit","mgroup","item","mdBuilder","itemClicked","minusClicked"],[1,"select-n-required",3,"ngClass"],[1,"select-num"],[1,"spacer"],["class","text-required",4,"ngIf"],[1,"text-required"]],template:function(e,n){1&e&&t.YNc(0,nr,4,2,"ng-container",0),2&e&&t.Q6J("ngForOf",null==n.item?null:n.item.mgroups)},dependencies:[_.mk,_.sg,_.O5,Ce,M.X$],styles:["[_nghost-%COMP%]{display:block;background:transparent;height:100%;width:100%;margin:0 auto}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.modifier-choice-outer[_ngcontent-%COMP%]{height:100%;overflow-y:auto;padding:1rem}.modifier-choices[_ngcontent-%COMP%]{padding:1rem}.modifier-choice-outer[_ngcontent-%COMP%]   .modifier-choices[_ngcontent-%COMP%]{padding:0}.select-n-required[_ngcontent-%COMP%]{margin-bottom:.5rem;display:flex;align-items:center;font-weight:400;margin-left:.5rem;margin-right:.5rem}.select-n-required[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.8rem;border-radius:2px;background:#f04141;padding:.2rem .5rem;color:#fff;margin-right:.5rem}.select-n-required[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--P);font-size:.8rem}.select-n-required.completed[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{background:#1bbb8f}"]}),i})();function ir(i,a){1&i&&(t.TgZ(0,"div",9)(1,"span",10),t._uU(2,"check"),t.qZA()())}const or=function(i){return{active:i}};function rr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-grid-tile",3),t.NdJ("click",function(o){return t.CHM(e),t.oxw()._noNeedClick(o),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",4),t._UZ(2,"app-img",5),t.YNc(3,ir,3,0,"div",6),t.qZA(),t.TgZ(4,"div",7)(5,"h3",8),t._uU(6),t.ALo(7,"translate"),t.qZA()()()}if(2&i){const e=t.oxw();t.Q6J("ngClass",t.VKq(6,or,!!e.noNeed)),t.xp6(2),t.Q6J("src",e.getDefaultImage(!1,null==e.orderContext||null==e.orderContext.store?null:e.orderContext.store.brand,500)),t.xp6(1),t.Q6J("ngIf",!!e.noNeed),t.xp6(3),t.hij(" ",t.lcZ(7,4,"byod.components.mg-item-list.no-need")," ")}}function ar(i,a){1&i&&(t.TgZ(0,"div",9)(1,"span",10),t._uU(2,"check"),t.qZA()())}function lr(i,a){1&i&&(t.TgZ(0,"span",23),t._uU(1,"add_circle_outline"),t.qZA())}function cr(i,a){1&i&&(t.TgZ(0,"span",24),t._uU(1,"add_circle"),t.qZA())}function sr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",18)(1,"span",19),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw()._minusClicked(r),t.KtG(o.stopPropagation())}),t._uU(2," remove_circle_outline "),t.qZA(),t.TgZ(3,"h3",20),t._uU(4),t.qZA(),t.YNc(5,lr,2,0,"span",21),t.YNc(6,cr,2,0,"span",22),t.qZA()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(3),t.Q6J("@qtyInOut",n.getQuanlity(n.group,e)),t.xp6(1),t.hij(" ",n.getQuanlity(n.group,e)," "),t.xp6(1),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>=1)}}function dr(i,a){1&i&&(t.TgZ(0,"div",25),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.soldout")," "))}const mr=function(i){return{qty:i}};function gr(i,a){if(1&i&&(t.TgZ(0,"div",26),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,mr,e.weighting))," ")}}function pr(i,a){1&i&&(t.TgZ(0,"span",16),t._uU(1,"+"),t.qZA())}const ur=function(i,a){return{"itemgroup-modifier-all-completed":i,"ai-anime":a}};function _r(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",27)(1,"button",28),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw().showItemModifiers(r),t.KtG(o.stopPropagation())}),t.TgZ(2,"mat-icon",29),t._uU(3,"auto_awesome"),t.qZA(),t._uU(4),t.ALo(5,"translate"),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();
1t.xp6(1),t.Q6J("ngClass",t.WLB(4,ur,n.isCompletedItemModifiersByItemId(e),n.isCompletedItemModifiersByItemId(e))),t.xp6(3),t.hij(" ",t.lcZ(5,2,"byod.components.cart.special-request")," ")}}const fr=function(i,a,e,n){return{selected:i,"not-select":a,isSoldOut:e,"max-item-reached":n}};function hr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-grid-tile",3),t.NdJ("click",function(o){const l=t.CHM(e).$implicit;return t.oxw()._mgitemClick(l),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",4),t._UZ(2,"app-img",5),t.YNc(3,ar,3,0,"div",6),t.YNc(4,sr,7,4,"div",11),t.YNc(5,dr,3,3,"div",12),t.qZA(),t.TgZ(6,"div",7)(7,"h3",8),t._uU(8),t.ALo(9,"i18n"),t.qZA(),t.YNc(10,gr,3,6,"div",13),t.TgZ(11,"div",14),t.YNc(12,pr,2,0,"span",15),t.TgZ(13,"span",16),t._uU(14),t.ALo(15,"priceDisplay"),t.qZA()()(),t.YNc(16,_r,6,7,"div",17),t.qZA()}if(2&i){const e=a.$implicit,n=t.oxw();t.Q6J("ngClass",t.l5B(17,fr,n.isItemSelected(e),n.isItemCanNotBeSelected(e),null==n.cartService?null:n.cartService.isSoldout(e),n.isMaxItemReached(e))),t.xp6(2),t.Q6J("src",e.getImage("default",200,!1)||n.getDefaultImage(!1,null==n.orderContext||null==n.orderContext.store?null:n.orderContext.store.brand,500)),t.xp6(1),t.Q6J("ngIf",!n.group.repeat&&n.getQuanlity(n.group,e)>=1),t.xp6(1),t.Q6J("ngIf",n.group.repeat&&n.getQuanlity(n.group,e)>=1),t.xp6(1),t.Q6J("ngIf",n.cartService.isSoldout(e)),t.xp6(3),t.hij(" ",t.xi3(9,10,e,n.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(2),t.Oqu(t.Dn7(15,13,null==e?null:e.price,!0,n.context)),t.xp6(2),t.Q6J("ngIf",n.isCurrentItemHasModifier(e)&&n.getQuanlity(n.group,e)>=1)}}const xr=function(i){return{"grid3-layout-container":i}};let be=(()=>{class i extends Jt{constructor(e){super(e),this.injector=e,this.cols=2}ngOnInit(){super.ngOnInit(),console.log("MgItemGridComponent group",this.group),console.log("hide zero price? ",this.hideZeroPrice)}getRowHeight(){var e;let n;switch(this.cols){case 2:default:n="4:7";break;case 3:n=null!==(e=this.platformService)&&void 0!==e&&e.isDesktop()?"5:8":"4:7"}return n}_noNeedClick(e){console.log("MgItemGridComponent _noNeedClick",e,null==e?void 0:e.checked),this.noNeed=!0,this.clickedNoNeed.emit()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mg-item-grid"]],inputs:{cols:"cols"},features:[t.qOj],decls:3,vars:7,consts:[[1,"sub-item-container",3,"cols","ngClass","rowHeight"],["class","sub-item-wrapper",3,"ngClass","click",4,"ngIf"],["class","sub-item-wrapper",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"sub-item-wrapper",3,"ngClass","click"],[1,"sub-item-img-box"],[3,"src"],["class","sub-item-check-icon",4,"ngIf"],[1,"item-details"],[1,"sub-item-name"],[1,"sub-item-check-icon"],["data-testid","selected-combo-option",1,"mat-icon","material-icons","icon-add-filled"],["class","qty-remove-box flex-grow justify-end",4,"ngIf"],["class","div-sold-out",4,"ngIf"],["class","sub-item-counts-as-n-items",4,"ngIf"],[1,"sub-item-price-grp"],["class","item-price",4,"ngIf"],[1,"item-price"],["class","modifier-col",4,"ngIf"],[1,"qty-remove-box","flex-grow","justify-end"],[1,"mat-icon","material-icons","icon-remove",3,"click"],[1,"sub-item-qty"],["class","add-btn mat-icon material-icons icon-add-outline text-gray-400","data-testid","icon-add-outline",4,"ngIf"],["class","add-btn mat-icon material-icons icon-add-filled","data-testid","icon-add-outline",4,"ngIf"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-outline","text-gray-400"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-filled"],[1,"div-sold-out"],[1,"sub-item-counts-as-n-items"],[1,"modifier-col"],[1,"modifier-btn",3,"ngClass","click"],[1,"icon-stars"]],template:function(e,n){1&e&&(t.TgZ(0,"mat-grid-list",0),t.YNc(1,rr,8,8,"mat-grid-tile",1),t.YNc(2,hr,17,22,"mat-grid-tile",2),t.qZA()),2&e&&(t.Q6J("cols",n.cols)("ngClass",t.VKq(5,xr,3===n.cols))("rowHeight",n.getRowHeight()),t.xp6(1),t.Q6J("ngIf",(null==n.group?null:n.group.optional)&&0==n.group.min),t.xp6(1),t.Q6J("ngForOf",n.items))},dependencies:[_.mk,_.sg,_.O5,q.g,z.Hw,wt.Il,wt.DX,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block}.sub-item-container[_ngcontent-%COMP%]{margin:.7rem}.sub-item-img-box[_ngcontent-%COMP%]{background:#fff;width:100%;position:relative}.sub-item-img-box[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:100%;overflow:hidden}.sub-item-check-icon[_ngcontent-%COMP%]{position:absolute;top:.5rem;right:.5rem;width:1.3rem;height:1.3rem;background:var(--P);display:flex;align-items:center;justify-content:center;color:var(--PC);border-radius:2rem}.sub-item-check-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:1rem;height:1rem;width:1rem}.qty-remove-box[_ngcontent-%COMP%]{display:flex;align-items:center;position:absolute;bottom:.5rem;right:50%;transform:translate(50%);background:rgba(255,255,255,.1);border-radius:5rem;backdrop-filter:blur(6px)}.qty-remove-box[_ngcontent-%COMP%]   .sub-item-qty[_ngcontent-%COMP%]{margin:0 .5rem}.icon-remove[_ngcontent-%COMP%]{color:#b9b9b9}.add-btn[_ngcontent-%COMP%]{color:var(--P)}.div-sold-out[_ngcontent-%COMP%]{position:absolute;
1left:50%;transform:translate(-50%);border:1px solid var(--P);border-radius:.2rem;color:var(--P);padding:.35rem .5rem;background:rgba(255,255,255,.6509803922);text-align:center;bottom:50%}.modifier-btn[_ngcontent-%COMP%]{border:1px solid #f04141;background:white;font-size:.9rem;padding:.45rem .5rem;border-radius:.2rem;color:#f04141;margin-top:.5rem;display:flex;align-items:center}.modifier-btn[_ngcontent-%COMP%]   .icon-stars[_ngcontent-%COMP%]{font-size:1rem;height:1rem;width:1rem;margin-right:.5rem}.modifier-btn.itemgroup-modifier-all-completed[_ngcontent-%COMP%]{font-family:var(--CF0);background:#1bbb8f;color:#fff;border:1px solid #1bbb8f}.sub-item-wrapper[_ngcontent-%COMP%]  .mat-grid-tile-content{flex-direction:column;display:flex;justify-content:flex-start;align-items:center;padding:.3rem}.sub-item-wrapper.isSoldOut[_ngcontent-%COMP%]{color:#ccc}.sub-item-wrapper.active[_ngcontent-%COMP%]   .sub-item-img-box[_ngcontent-%COMP%]{box-shadow:0 0 0 2px var(--P)}.item-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;text-align:center;font-family:var(--CF0);font-size:.9rem;font-weight:700;color:#333;margin-top:.5rem}.item-details[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{line-height:1.1em;max-height:2.2em;overflow:hidden;margin-bottom:.3rem}.item-details[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%]{color:var(--P800)}@media not screen and (min-width: 600px){.modifier-btn[_ngcontent-%COMP%]   .icon-stars[_ngcontent-%COMP%]{font-size:.8rem;height:.8rem;width:.8rem;margin-right:.25rem}.modifier-btn.itemgroup-modifier-all-completed[_ngcontent-%COMP%]{font-size:.8rem;padding:.15rem .5rem;margin:0;margin-top:.2rem}}.grid3-layout-container[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]{font-size:.8rem}.grid3-layout-container[_ngcontent-%COMP%]   .item-details[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{max-height:unset}.grid3-layout-container[_ngcontent-%COMP%]   .modifier-btn[_ngcontent-%COMP%]{font-size:.7rem}.grid3-layout-container[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%]{line-height:1em;-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;margin-bottom:.25rem}.grid3-layout-container[_ngcontent-%COMP%]   .sub-item-price-grp[_ngcontent-%COMP%]{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:1;overflow:hidden;text-overflow:ellipsis}.sub-item-counts-as-n-items[_ngcontent-%COMP%]{font-size:.8rem;margin-bottom:.3rem}mat-grid-tile.isSoldOut[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-grid-tile.isSoldOut[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%], mat-grid-tile.isSoldOut[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#ccc}mat-grid-tile.isSoldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{opacity:25%}mat-grid-tile.isPreparing[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-grid-tile.isPreparing[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%], mat-grid-tile.isPreparing[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#ccc}mat-grid-tile.not-select[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-grid-tile.not-select[_ngcontent-%COMP%]   .item-price[_ngcontent-%COMP%], mat-grid-tile.not-select[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#c2c2c2}mat-grid-tile.not-select[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{opacity:25%}mat-grid-tile.not-select[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{color:#c2c2c2}mat-grid-tile.max-item-reached[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{opacity:25%}"],data:{animation:[(0,f.X$)("minusBtn",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateX(0%)"}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateX(50%) rotate(0)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:0,transform:"translateX(50%) rotate(0)"}))])]),(0,f.X$)("qtyInOut",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"scale(1.6)"}),(0,f.jt)("0.3s cubic-bezier(0,.74,.56,1.3)",(0,f.oB)({opacity:1,transform:"scale(1)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.3s ease-in-out",(0,f.oB)({opacity:0,transform:"scale(1.6)"}))])])]}}),i})();function vr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-list-item",3)(1,"mat-radio-group",4),t.NdJ("ngModelChange",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.noNeed=o)})("change",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r._noNeedClick(o))}),t.TgZ(2,"mat-radio-button",5)(3,"div",6)(4,"h3",7),t._uU(5),t.ALo(6,"translate"),t.qZA()()()()()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngModel",e.noNeed),t.xp6(1),t.Q6J("value",!0),t.xp6(3),t.hij(" ",t.lcZ(6,3,"byod.components.mg-item-list.no-need")," ")}}const Me=function(i){return{qty:i}};function Cr(i,a){if(1&i&&(t.TgZ(0,"div",20),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,Me,e.weighting))," ")}}const Oe=function(i,a){return{"itemgroup-modifier-all-completed":i,"ai-anime":a}};function br(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",24)(1,"button",25),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(3).$implicit;return t.oxw().showItemModifiers(r),t.KtG(o.stopPropagation())}),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,Oe,n.isCompletedItemModifiersByItemId(e),n.isCompletedItemModifiersByItemId(e))),t.xp6(1),t.hij(" ",t.lcZ(3,2,"byod.components.cart.special-request")," ")}}function Mr(i,a){if(1&i&&(t.TgZ(0,"div",21)(1,"h3",22)(2,"span"),t._uU(3,"+"),t.qZA(),t._uU(4),t.ALo(5,"priceDisplay"),t.qZA(),t.YNc(6,br,4,7,"div",23),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(4),t.hij(" ",t.Dn7(5,2,null==e?null:e.price,!0,n.context)," "),t.xp6(2),t.Q6J("ngIf",n.isCurrentItemHasModifier(e)&&n.getQuanlity(n.group,e)>=1)}}function Or(i,a){1&i&&(t.TgZ(0,"span",31),t._uU(1,"add_circle_outline"),t.qZA())}function yr(i,a){1&i&&(t.TgZ(0,"span",32),t._uU(1,"add_circle_outline"),t.qZA())}function Pr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26)(1,"span",27),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw()._minusClicked(r),t.KtG(o.stopPropagation())}),t._uU(2," remove_circle_outline "),t.qZA(),t.TgZ(3,"h3",28),t._uU(4),t.qZA(),t.YNc(5,Or,2,0,"span",29),t.YNc(6,yr,2,0,"span",30),t.qZA()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.Q6J("@minusBtn",void 0),t.xp6(4),t.hij(" x",n.getQuanlity(n.group,e)," "),t.xp6(1),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>=1)}}function Ir(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",13),t._UZ(2,"app-img",14)(3,"app-nutri-grade",15),t.qZA(),t.TgZ(4,"div",16)(5,"h3",7),t._uU(6),t.ALo(7,"i18n"),t.qZA(),t.YNc(8,Cr,3,6,"div",17),t.YNc(9,Mr,7,6,"div",18),t.qZA(),t.YNc(10,Pr,7,4,"div",19),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(2),t.Q6J("src",(null==e?null:e.getImage("default",200,!1))||n.getDefaultImage(!1,null==n.orderContext||null==n.orderContext.store?null:n.orderContext.store.brand,500)),t.xp6(1),t.Q6J("item",e),t.xp6(3),t.hij(" ",t.xi3(7,6,e,n.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>=1)}}function wr(i,a){if(1&i&&(t.TgZ(0,"div",20),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.components.mg-item-list.counts-as-n-items",t.VKq(4,Me,e.weighting))," ")}}function kr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",24)(1,"button",25),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(3).$implicit;return t.oxw().showItemModifiers(r),t.KtG(o.stopPropagation())}),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&i){const e=t.oxw(3).$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,Oe,n.isCompletedItemModifiersByItemId(e),n.isCompletedItemModifiersByItemId(e))),t.xp6(1),t.hij(" ",t.lcZ(3,2,"byod.components.cart.special-request")," ")}}function Tr(i,a){if(1&i&&(t.TgZ(0,"div",21)(1,"h4",22)(2,"span"),t._uU(3,"+"),t.qZA(),t._uU(4),t.ALo(5,"priceDisplay"),t.qZA(),t.YNc(6,kr,4,7,"div",23),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(4),t.hij(" ",t.Dn7(5,2,null==e?null:e.price,!0,n.context)," "),t.xp6(2),t.Q6J("ngIf",n.isCurrentItemHasModifier(e)&&n.getQuanlity(n.group,e)>=1)}}function Zr(i,a){1&i&&(t.TgZ(0,"span",39),t._uU(1,"radio_button_unchecked"),t.qZA())}function Ar(i,a){1&i&&(t.TgZ(0,"span",40),t._uU(1,"check_circle"),t.qZA())}const Sr=function(i){return{isSoldOut:i}};function Dr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",33),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw()._mgitemClick(r),t.KtG(o.stopPropagation())}
1),t.TgZ(1,"div",34),t._UZ(2,"app-img",14)(3,"app-nutri-grade",35),t.TgZ(4,"div",36)(5,"h3",7),t._uU(6),t.ALo(7,"i18n"),t.qZA(),t.YNc(8,wr,3,6,"div",17),t.YNc(9,Tr,7,6,"div",18),t.qZA(),t.YNc(10,Zr,2,0,"span",37),t.YNc(11,Ar,2,0,"span",38),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("ngClass",t.VKq(11,Sr,null==n.cartService?null:n.cartService.isSoldout(e))),t.xp6(2),t.Q6J("src",e.getImage("default",200,!1)||n.getDefaultImage(!1,null==n.orderContext||null==n.orderContext.store?null:n.orderContext.store.brand,500)),t.xp6(1),t.Q6J("item",e),t.xp6(3),t.hij(" ",t.xi3(7,8,e,n.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",n.menuWithItemCountTypeWeighting&&e.weighting>1),t.xp6(1),t.Q6J("ngIf",(null==e?null:e.price)>0||!n.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",0==n.getQuanlity(n.group,e)),t.xp6(1),t.Q6J("ngIf",n.getQuanlity(n.group,e)>=1)}}function qr(i,a){1&i&&(t.TgZ(0,"div",41),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.components.mg-item-list.soldout")," "))}function Qr(i,a){1&i&&t._UZ(0,"mat-divider")}const Nr=function(i,a,e,n){return{selected:i,"not-select":a,isSoldOut:e,"max-item-reached":n}};function Jr(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-list-item",8),t.NdJ("click",function(o){const l=t.CHM(e).$implicit;return t.oxw()._mgitemClick(l),t.KtG(o.stopPropagation())}),t.YNc(2,Ir,11,9,"ng-container",9),t.YNc(3,Dr,12,13,"ng-template",null,10,t.W1O),t.YNc(5,qr,3,3,"div",11),t.qZA(),t.YNc(6,Qr,1,0,"mat-divider",12),t.BQk()}if(2&i){const e=a.$implicit,n=a.index,o=t.MAs(4),r=t.oxw();
1t.xp6(1),t.Q6J("ngClass",t.l5B(5,Nr,r.isItemSelected(e),r.isItemCanNotBeSelected(e),null==r.cartService?null:r.cartService.isSoldout(e),r.isMaxItemReached(e))),t.xp6(1),t.Q6J("ngIf",r.group.repeat)("ngIfElse",o),t.xp6(3),t.Q6J("ngIf",r.cartService.isSoldout(e)),t.xp6(1),t.Q6J("ngIf",n!==(null==r.items?null:r.items.length)-1)}}let ye=(()=>{class i extends Jt{constructor(e){super(e),this.injector=e}ngOnInit(){super.ngOnInit(),console.log("MgItemListWithImgComponent group",this.group),console.log("hide zero price? ",this.hideZeroPrice)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mg-item-list-with-img"]],features:[t.qOj],decls:5,vars:2,consts:[[1,"sub-item-choices","bg-white"],["class","sub-item-row",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"sub-item-row"],["aria-label","Select an option",3,"ngModel","ngModelChange","change"],[1,"sub-item-checkbox",3,"value"],[1,"checkbox-text"],[1,"sub-item-name"],[1,"sub-item-row",3,"ngClass","click"],[4,"ngIf","ngIfElse"],["singleItem",""],["class","div-sold-out",4,"ngIf"],[4,"ngIf"],[1,"item-img-with-nutri-grade"],[3,"src"],["type","simplified","mode","small",1,"item-nutri-grade",3,"item"],[1,"sub-item-box","not-single"],["class","sub-item-counts-as-n-items",4,"ngIf"],["class","price-modifier-col",4,"ngIf"],["class","qty-remove-box not-single flex-grow justify-end",4,"ngIf"],[1,"sub-item-counts-as-n-items"],[1,"price-modifier-col"],[1,"sub-item-price"],["class","modifier-col",4,"ngIf"],[1,"modifier-col"],[1,"modifier-btn",3,"ngClass","click"],[1,"qty-remove-box","not-single","flex-grow","justify-end"],[1,"mat-icon","material-icons","icon-remove",3,"click"],[1,"sub-item-qty"],["class","add-btn mat-icon material-icons icon-add-outline text-gray-400","data-testid","icon-add-outline",4,"ngIf"],["class","add-btn mat-icon material-icons icon-add-outline","data-testid","icon-add-outline",4,"ngIf"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-outline","text-gray-400"],["data-testid","icon-add-outline",1,"add-btn","mat-icon","material-icons","icon-add-outline"],[1,"flex","w-full",3,"ngClass","click"],["data-testid","combo-option",1,"checkbox-text","w-full"],["type","simplified","mode","small",3,"item"],[1,"sub-item-box"],["class","mat-icon material-icons icon-add-outline text-gray-400","data-testid","combo-radio-button",4,"ngIf"],["class","mat-icon material-icons icon-add-filled","data-testid","selected-combo-option",4,"ngIf"],["data-testid","combo-radio-button",1,"mat-icon","material-icons","icon-add-outline","text-gray-400"],["data-testid","selected-combo-option",1,"mat-icon","material-icons","icon-add-filled"],[1,"div-sold-out"]],template:function(e,n){1&e&&(t.TgZ(0,"mat-list",0)(1,"mat-selection-list"),t.YNc(2,vr,7,5,"mat-list-item",1),t._UZ(3,"mat-divider"),t.YNc(4,Jr,7,10,"ng-container",2),t.qZA()()),2&e&&(t.xp6(2),t.Q6J("ngIf",(null==n.group?null:n.group.optional)&&0==n.group.min),t.xp6(2),t.Q6J("ngForOf",n.items))},dependencies:[_.mk,_.sg,_.O5,g.JJ,g.On,q.g,et.d,nt.i$,nt.Tg,nt.Ub,vt.VQ,vt.U0,gt.i,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:0}.mat-list-base[_ngcontent-%COMP%]{padding-top:0}.sub-item-row[_ngcontent-%COMP%]{height:auto!important;transition:.3s all ease-in-out;cursor:pointer}.sub-item-row[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2.5rem;flex-shrink:0}.sub-item-row[_ngcontent-%COMP%]  .mat-list-item-content{padding:.5rem!important}.sub-item-row.selected[_ngcontent-%COMP%]{background:#fafafa}.sub-item-row.isSoldOut[_ngcontent-%COMP%]{color:#ccc}.sub-item-row.not-select[_ngcontent-%COMP%]{background:rgba(255,255,255,.6);color:#c2c2c2}.sub-item-row.not-select[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{color:#c2c2c2!important}.sub-item-row.max-item-reached[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{opacity:25%}.sub-item-row[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2.5rem}mat-selection-list[_ngcontent-%COMP%]{padding:1rem}
1.checkbox-text[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;font-family:var(--CF0);font-size:.9rem}.checkbox-text[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2.5rem}.checkbox-text[_ngcontent-%COMP%]   h3.sub-item-name[_ngcontent-%COMP%]{margin-left:.5rem;flex:1 1 auto;line-height:1.1em;max-height:2.2em;overflow:hidden}.checkbox-text[_ngcontent-%COMP%]   h4.sub-item-price[_ngcontent-%COMP%]{flex:0 0 20%;text-align:left}.checkbox-text[_ngcontent-%COMP%]   span.icon-add-filled[_ngcontent-%COMP%]{color:var(--P)}.icon-remove[_ngcontent-%COMP%]{color:#c4c4c4}.div-sold-out[_ngcontent-%COMP%]{position:absolute;left:50%;transform:translate(-50%);border:1px solid var(--P);border-radius:.2rem;color:var(--P);padding:.35rem .5rem;background:rgba(255,255,255,.6509803922)}mat-divider[_ngcontent-%COMP%]{margin-left:3.5rem!important;border-color:#ececec}.add-btn[_ngcontent-%COMP%]{cursor:pointer;color:var(--P)}.qty-remove-box[_ngcontent-%COMP%]{display:flex;align-items:center}.modifier-btn[_ngcontent-%COMP%]{border:1px solid #f04141;background:white;font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;color:#f04141}.modifier-btn.itemgroup-modifier-all-completed[_ngcontent-%COMP%]{border-color:#1bbb8f;color:#1bbb8f}.sub-item-box[_ngcontent-%COMP%]{flex:1 1 auto}.sub-item-name[_ngcontent-%COMP%]{margin-bottom:.3rem}.price-modifier-col[_ngcontent-%COMP%]{display:flex;align-items:center;height:1rem}.price-modifier-col[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-right:.5rem}.qty-remove-box.not-single[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{padding:0rem .5rem}.sub-item-choices[_ngcontent-%COMP%]{background:transparent}.mat-list[_ngcontent-%COMP%]{background:transparent!important}.mat-list[_ngcontent-%COMP%]   .mat-list-item[_ngcontent-%COMP%]{border-radius:.5rem;padding:.5rem;margin:.5rem;margin-left:0;margin-right:0;width:auto;background:#fff;overflow:hidden}.mat-list[_ngcontent-%COMP%]   mat-divider[_ngcontent-%COMP%]{display:none}.mat-list[_ngcontent-%COMP%]   .sub-item-row.selected[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 .1rem var(--P);background:#fff}.mat-list[_ngcontent-%COMP%]   h3.sub-item-name[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h4.sub-item-price[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:1rem;color:#333;font-weight:400}.mat-list[_ngcontent-%COMP%]   h3.sub-item-name[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-left:0;font-weight:700}.mat-list[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h4.sub-item-price[_ngcontent-%COMP%], .mat-list[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{flex:0 0 auto;margin-right:1rem;color:var(--P)}.mat-list[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:5rem;margin-right:.5rem}.mat-radio-group[_ngcontent-%COMP%], .mat-radio-group[_ngcontent-%COMP%]   .mat-radio-button[_ngcontent-%COMP%]{width:100%}mat-list-item.isSoldOut[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-list-item.isSoldOut[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%], mat-list-item.isSoldOut[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#ccc}mat-list-item.isSoldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{opacity:25%}mat-list-item.isPreparing[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-list-item.isPreparing[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%], mat-list-item.isPreparing[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#ccc}mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%], mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%], mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]{color:#c2c2c2}mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%], mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%], mat-list-item.not-select[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{color:#c2
1c2c2}mat-list-item.not-select[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{opacity:25%}mat-list-item.max-item-reached[_ngcontent-%COMP%]   .sub-item-name[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%], mat-list-item.max-item-reached[_ngcontent-%COMP%]   .sub-item-price[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%], mat-list-item.max-item-reached[_ngcontent-%COMP%]   .sub-item-counts-as-n-items[_ngcontent-%COMP%]   .add-btn[_ngcontent-%COMP%]{opacity:25%}.sub-item-counts-as-n-items[_ngcontent-%COMP%]{margin-bottom:.3rem;font-size:.8rem}.item-img-with-nutri-grade[_ngcontent-%COMP%]{position:relative}.item-nutri-grade[_ngcontent-%COMP%]{position:absolute;bottom:0;right:0}"],data:{animation:[(0,f.X$)("minusBtn",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateX(50%)"}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateX(0) rotate(0)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:0,transform:"translateX(100%) rotate(0)"}))])])]}}),i})();function Ur(i,a){1&i&&t._UZ(0,"app-icon",13)}function Fr(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.BQk()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(4);t.xp6(1),t.hij(" +",t.Dn7(2,1,t.lcZ(3,5,e),!0,n.context)," ")}}function Lr(i,a){if(1&i&&(t.TgZ(0,"div",14)(1,"h3",15),t._uU(2),t.qZA()()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(4);t.xp6(2),t.hij("x",null==n.mdBuilder?null:n.mdBuilder.getQuantity(n.item,n.mgroup,e),"")}}function Br(i,a){1&i&&t._UZ(0,"app-icon",18),2&i&&t.Q6J("size",12)}function Yr(i,a){if(1&i&&(t.TgZ(0,"div",16),t.YNc(1,Br,1,1,"app-icon",17),t.qZA()),2&i){const e=t.oxw(3).$implicit,n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat)}}const zr=function(i){return{hidden:i}};function jr(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",6),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw(4)._itemClicked(r),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",7),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw(4)._minusClicked(r),t.KtG(o.stopPropagation())}),t.YNc(2,Ur,1,0,"app-icon",8),t.qZA(),t.TgZ(3,"span",9),t._uU(4),t.ALo(5,"i18n"),t.YNc(6,Fr,4,7,"ng-container",1),t.qZA(),t.TgZ(7,"div",10),t.YNc(8,Lr,3,1,"div",11),t.YNc(9,Yr,2,1,"div",12),t.qZA()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(4);t.Q6J("selected",n.isSelected(e))("disabled",n.isDisableMitem(e))("ngClass",t.VKq(11,zr,!n.isMitemOnSchedule(e))),t.xp6(2),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat),t.xp6(2),t.hij("",t.xi3(5,8,e,n.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",0!=e.price),t.xp6(2),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat),t.xp6(1),t.Q6J("ngIf",e.baseQty>0||n.mgroup.repeat)}}function Gr(i,a){if(1&i&&(t.ynx(0),t.YNc(1,jr,10,13,"mat-chip",5),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",!(null!=n.absentIdArr&&n.absentIdArr.includes(null==e?null:e.id)))}}function Er(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Gr,2,1,"ng-container",1),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",n.isShowItem(null==e?null:e.start,null==e?null:e.end))}}function $r(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Er,2,1,"ng-container",4),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",e)}}function Rr(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div"),t.YNc(2,$r,2,1,"ng-container",1),t.qZA(),t.BQk()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("ngIf",e&&e.length>0)}}function Vr(i,a){if(1&i&&(t.TgZ(0,"mat-chip-list",2,3),t.YNc(2,Rr,3,1,"ng-container",4),t.qZA()),2&i){const e=t.oxw();t.Q6J("multiple",!0),t.xp6(2),t.Q6J("ngForOf",e.classifyItemMap)}}function Hr(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"p",19),t._uU(2),t.qZA(),t.BQk()),2&i){const e=t.oxw().index,n=t.oxw(2);t.xp6(2),t.Oqu(n.keyValArr[e])}}function Kr(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(1),t.hij(" +",t.Dn7(2,1,t.lcZ(3,5,e),!0,n.context)," ")}}function Wr(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"li",21),t._uU(2),t.ALo(3,"i18n"),t.YNc(4,Kr,4,7,"ng-container",1),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(4);t.xp6(2),t.hij(" ",t.xi3(3,2,e,n.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",0!=e.price)}}function Xr(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",20),t.YNc(2,Wr,5,5,"ng-container",4),t.qZA(),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",e)}}function ta(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div"),t.YNc(2,Hr,3,1,"ng-container",1),t.YNc(3,Xr,3,1,"ng-container",1),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=a.index,o=t.oxw(2);t.xp6(2),t.Q6J("ngIf",o.keyValArr&&o.keyValArr[n]),t.xp6(1),t.Q6J("ngIf",e&&e.length>0)}}function ea(i,a){if(1&i&&(t.ynx(0),t.YNc(1,ta,4,2,"ng-container",4),t.BQk()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.classifyItemMap)}}let Ft=(()=>{class i extends ve{constructor(e){super(e),this.injector=e}ngOnInit(){super.ngOnInit(),console.log("MgItemListComponent",this.mgroup),this.mgroup.parentItems.forEach(e=>{e.baseQty&&1==this.mgroup.max&&(this.itemClicked.emit(e),this.minusClicked.emit(e))})}isShowItem(e,n){const o=new Date;return!!(void 0===e&&void 0===n||e&&n&&o>=new Date(e)&&o<=new Date(n)||e&&!n&&o>=new Date(e)||!e&&n&&o<=new Date(n))}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-mitem-select-chips"]],features:[t.qOj],decls:2,vars:2,consts:[[3,"multiple",4,"ngIf"],[4,"ngIf"],[3,"multiple"],["chipList",""],[4,"ngFor","ngForOf"],["data-testid","modifier-option",3,"selected","disabled","ngClass","click",4,"ngIf"],["data-testid","modifier-option",3,"selected","disabled","ngClass","click"],[1,"minus-qty-btn",3,"click"],["name","remove","source","mat","class","flex justify-center items-center",4,"ngIf"],[1,"aer80","mx-2"],[1,"modifier-qty-add"],["class","modifier-qty",4,"ngIf"],["class","add-qty-btn",4,"ngIf"],["name","remove","source","mat",1,"flex","justify-center","items-center"],[1,"modifier-qty"],[1,"selected-qty"],[1,"add-qty-btn"],["name","add","source","mat","class","flex justify-center items-center ",3,"size",4,"ngIf"],["name","add","source","mat",1,"flex","justify-center","items-center",3,"size"],[1,"modifier-sub-group-title"],[1,"flex","flex-row","flex-wrap"],[1,"p-1",2,"flex-basis","50%"]],template:function(e,n){1&e&&(t.YNc(0,Vr,3,2,"mat-chip-list",0),t.YNc(1,ea,2,1,"ng-container",1)),2&e&&(t.Q6J("ngIf",!n.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",n.orderContext.viewMode))},dependencies:[_.mk,_.sg,_.O5,S.o,lt.qn,lt.HS,D.G,F.A,rt.y],styles:["h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:0;padding:0}mat-chip-list[_ngcontent-%COMP%]  .mat-chip-list-wrapper{padding-top:.5rem;display:flex;flex-direction:column;align-items:flex-start;margin:0}mat-chip-list[_ngcontent-%COMP%]  .mat-chip-list-wrapper .mat-chip span{-webkit-user-select:none;user-select:none}.modifier-sub-group-title[_ngcontent-%COMP%]{font-size:.825em!important;margin-top:.5rem}.mat-chip-list[_ngcontent-%COMP%]   mat-chip[_ngcontent-%COMP%]{background:#fff;color:var(--P800);border-radius:5px;font-size:.8rem;padding:.75rem 1.25rem;margin-left:0;margin-right:.5rem;height:auto;min-height:40px;text-align:center}.mat-chip-list[_ngcontent-%COMP%]   mat-chip[_ngcontent-%COMP%]   .minus-qty-btn[_ngcontent-%COMP%]{opacity:0;pointer-events:none}.mat-chip-list[_ngcontent-%COMP%]   mat-chip[_ngcontent-%COMP%]   .modifier-qty-add[_ngcontent-%COMP%]{opacity:0}.mat-chip-list[_ngcontent-%COMP%]   mat-chip.mat-chip-selected[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}.mat-chip-list[_ngcontent-%COMP%]   mat-chip.mat-chip-selected[_ngcontent-%COMP%]   .minus-qty-btn[_ngcontent-%COMP%]{opacity:1;background:var(--PC);border-radius:100rem;overflow:hidden;pointer-events:unset}.mat-chip-list[_ngcontent-%COMP%]   mat-chip.mat-chip-selected[_ngcontent-%COMP%]   .minus-qty-btn[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{background:white;color:var(--P);height:22.39px!important;width:22.39px!important}.mat-chip-list[_ngcontent-%COMP%]   mat-chip.mat-chip-selected[_ngcontent-%COMP%]   .modifier-qty-add[_ngcontent-%COMP%]{opacity:1}.selected-qty[_ngcontent-%COMP%]{background:var(--PC);color:var(--P);border-radius:100rem;padding:.3rem;height:1.4rem;width:1.4rem;display:flex;justify-content:center;align-items:center}.modifier-qty-add[_ngcontent-%COMP%]{position:relative}.add-qty-btn[_ngcontent-%COMP%]{position:absolute;right:-5px;bottom:-3px;border-radius:100rem;border:1px solid white;background:var(--P)}.add-qty-btn[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{font-size:.65rem}.mat-chip.mat-standard-chip[_ngcontent-%COMP%]:focus:after{opacity:0}"]}),i})();var Pe=u(36248);let Ot=(()=>{class i extends C.nh{constructor(e){super(e),this.injector=e,this.menuWithItemCountTypeWeighting=!1,this.modifiableItems=[],this.mods=[],this.baseCartService=e.get(Pe.q),this.dialogService=e.get(C.xA),this.t=e.get(M.sK),this.orderContext=e.get(C.yQ),this.cd=e.get(t.
1sBO),this.modifierService=e.get(mt.F),this.input=this.navParams.input,this.menuWithItemCountTypeWeighting=this.baseCartService.isMenuWithItemCountTypeWeighting()}isCompleted(){return this.modifierService.isCompleted(this.modifiableItems,this.mdBuilder)}isMGroupSelected(e,n){return!1}isGroupCompleted(e,n){var o;return null===(o=this.modifierService)||void 0===o?void 0:o.isMGroupCompleted(this.mdBuilder,e,n)}isGroupCompletedIndex(e,n){var o;if(0==(null===(o=this.modifierService)||void 0===o?void 0:o.isMGroupCompleted(this.mdBuilder,e,n))){var r;for(let l of this.modifiableItems)if(l.mgroups.indexOf(n)>=0){r=l.mgroups.indexOf(n);break}return r}return null}minusClicked(e,n,o){this.modifierService.minusClicked(this.mdBuilder,e,n,o),this.mods=this.modifierService.setModSelected(this.mdBuilder)}has(e,n,o){return this.mdBuilder.has(e,n,o)}canAdd(e,n,o){return this.mdBuilder.canAdd(e,n,o)}itemClicked(e,n,o,r=!1){this.isSoldout(o)||(this.modifierService.itemClicked(this.mdBuilder,e,n,o,r),this.mods=this.modifierService.setModSelected(this.mdBuilder),console.log("this.mdBuilder",this.mdBuilder),console.log("this.mods",this.mods))}isSoldout(e){var n;return null===(n=this.baseCartService)||void 0===n?void 0:n.isSoldout(e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-component"]],features:[t.qOj],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})(),Ie=(()=>{class i extends Ot{constructor(e){super(e),this.injector=e,this.updateMdBuilder=new t.vpe}set originItem(e){this._originItem=e,this.initData()}ngOnInit(){}initData(){var e,n,o;console.log("MainItemModifiersComponent params",this.store,this.orderItemBuilder);let r=null===(e=this.orderItemBuilder)||void 0===e?void 0:e.build();console.log("\u7236\u7ec4\u4ef6\u4f20\u8fdb\u6765\u7684 modifierBuilder",this.modifierBuilder),this.mdBuilder=this.modifierBuilder;let l=null===(n=this.mdBuilder)||void 0===n?void 0:n.findItems(r);this.item=null==l?void 0:l.find(c=>{var s;return(null==c?void 0:c.id)===(null===(s=this._originItem)||void 0===s?void 0:s.id)}),this.modifiableItems=[this.item],this.mods=null===(o=this.modifierService)||void 0===o?void 0:o.setModSelected(this.mdBuilder)}itemClicked(e){console.log("MainItemModifiersComponent itemClicked",e);let{item:n,group:o,mItem:r}=e;super.itemClicked(n,o,r),console.log("MainItemModifiersComponent after itemClicked",this.mdBuilder),this.updateMdBuilder.emit(this.mdBuilder)}minusClicked(e){console.log("MainItemModifiersComponent minusClicked",e);let{item:n,group:o,mItem:r}=e;super.minusClicked(n,o,r),this.updateMdBuilder.emit(this.mdBuilder)}isAllGroupCompleted_mgroups(e){var n;return null===(n=null==e?void 0:e.mgroups)||void 0===n?void 0:n.every(o=>this.isGroupCompleted(e,o))}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-main-item-modifiers"]],inputs:{isEdit:"isEdit",orderItemBuilder:"orderItemBuilder",modifierBuilder:["mdBuilder","modifierBuilder"],store:"store",originItem:"originItem"},outputs:{updateMdBuilder:"updateMdBuilder"},features:[t.qOj],decls:2,vars:4,consts:[[1,"main-item-modifiers-component"],[3,"mdBuilder","store","item","isEdit","itemClicked","minusClicked"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-item-modifiers",1),t.NdJ("itemClicked",function(r){return n.itemClicked(r)})("minusClicked",function(r){return n.minusClicked(r)}),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("mdBuilder",n.mdBuilder)("store",n.store)("item",n.item)("isEdit",n.isEdit))},dependencies:[Ut],styles:["[_nghost-%COMP%]{display:block;background:transparent;border-radius:8px;height:100%;width:100%;overflow-y:auto;margin:0 auto}.main-item-modifiers-component[_ngcontent-%COMP%]{height:100%}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.header[_ngcontent-%COMP%]{padding:.5rem 1rem}mat-tab-group[_ngcontent-%COMP%]   .mat-tab-labels[_ngcontent-%COMP%]{padding:0 1rem!important}.modifier-choices[_ngcontent-%COMP%]{padding:0 1rem 1rem}.footer-row[_ngcontent-%COMP%]{padding:1rem!important}}"]}),i})();var na=u(86261),we=u(63125),ia=u(32490);let ke=(()=>{class i extends C.H6{constructor(e,n){super(e),this.browserService=n,this.localeMap={en:"en-US",fr:"fr-FR",ja:"ja-JP",jp:"ja-JP",ko:"ko-KR",ru:"ru-RU",zh:"zh-TW","zh-cn":"zh-CN"},this.orderManager=e.get(C.Km),this.orderContext=e.get(C.yQ),this.adyenService=e.get(we.G)}ngOnInit(){var e;this.initAdyenFormSub$_=null===(e=this.adyenService)||void 0===e?void 0:e.startInitAdyenFormSub$_(n=>{console.log("\u8ba2\u9605\u8005\u64cd\u4f5c callback",n),n&&this.getPaymentConfig()})}getPaymentConfig(){var e,n,o;const l={charge:this.paymentConfig,orders:[this.orderManager.order]},c={storeId:null===(n=null===(e=this.orderManager)||void 0===e?void 0:e.store)||void 0===n?void 0:n.id,session:null===(o=this.configService)||void 0===o?void 0:o.getSessionId()};this.dataService.postWithBody("/api/v1/pay/config.json",l,c).subscribe(s=>{var d,m,p,h,x,v,y,A,L,E,$,R;console.log("getPaymentConfig response",s);let w=this.platformService.getContainer();if(w&&"alipay-cn"==w)(null===(m=null===(d=null==s?void 0:s.data)||void 0===d?void 0:d.paymentMethods)||void 0===m?void 0:m.length)>0&&(s.data.paymentMethods=s.data.paymentMethods.filter(O=>null==O?void 0:O.type.startsWith("alipay"))),(null===(h=null===(p=null==s?void 0:s.data)||void 0===p?void 0:p.storedPaymentMethods)||void 0===h?void 0:h.length)>0&&(s.data.storedPaymentMethods=[]),console.log("only show alipay in alipay miniapp",s);else if(this.platformService.isAliApp()||800001!=this.context.brandId)(null===(R=null===($=null==s?void 0:s.data)||void 0===$?void 0:$.paymentMethods)||void 0===R?void 0:R.length)>0&&(s.data.paymentMethods=s.data.paymentMethods.filter(O=>!(null!=O&&O.type.startsWith("alipay")))),console.log("hide any type alipay paymentMethods, only show alipay in alipay miniapp",s);else{let O=(null===(A=null===(y=null===(v=null===(x=null==window?void 0:window.aigens)||void 0===x?void 0:x.context)||void 0===v?void 0:v.config)||void 0===y?void 0:y.data)||void 0===A?void 0:A.bksgH5FilterPaymentArray)||[];if(console.log("check bksgH5FilterPaymentArray",O),O&&O.length>0&&(null===(E=null===(L=null==s?void 0:s.data)||void 0===L?void 0:L.paymentMethods)||void 0===E?void 0:E.length)>0){let b={paywithgoogle:"googlepay",alipay_wap:"alipay",applepay:"applepay",scheme:"scheme",alipay:"alipay"};s.data.paymentMethods=s.data.paymentMethods.filter(P=>!O.includes(b[null==P?void 0:P.type])),console.log("check response[data].paymentMethods",s.data.paymentMethods)}else s.data.paymentMethods=s.data.paymentMethods.filter(b=>!(null!=b&&b.type.startsWith("alipay"))),console.log("hide any type alipay paymentMethods, only show alipay in alipay miniapp",s);console.log(this.browserService.isAndroid());let T=this.browserService.isAndroid()?"applypay":"paywithgoogle";s.data.paymentMethods=s.data.paymentMethods.filter(b=>(null==b?void 0:b.type)!==T),console.log("check last paymentMethods",s.data.paymentMethods)}this.initAdyenObject(null==s?void 0:s.data)})}ngOnDestroy(){var e;this.adyenService.clearAdyenFrom(),null===(e=this.initAdyenFormSub$_)||void 0===e||e.unsubscribe()}initAdyenObject(e){var n,o,r,l,c,s,d;let m="PRODUCTION";m=this.configService.isPrd()||null!==(n=this.paymentConfig)&&void 0!==n&&n.isPrd?"PRODUCTION":"TEST";const p={paymentMethodsResponse:e,originKey:null!==(o=this.paymentConfig)&&void 0!==o&&o.clientKey?null:this.paymentConfig.key,clientKey:this.paymentConfig.clientKey,locale:this.localeMap[this.t.currentLang],environment:this.getEnvKey(),openFirstPaymentMethod:!1,showPayButton:!0,onSubmit:this.handleAdyenSubmit.bind(this),onCancel:(v,y)=>{console.log("canceled",v),null==y||y.setStatus("ready")},onAdditionalDetails:this.handleAdditionalDetails.bind(this),onError:this.handleAdyenError.bind(this),paymentMethodsConfiguration:{card:{enableStoreDetails:!0},paywithgoogle:Object.assign(Object.assign({},null===(r=null==e?void 0:e.extra)||void 0===r?void 0:r.google),{environment:m}),applepay:Object.assign({},null===(l=null==e?void 0:e.extra)||void 0===l?void 0:l.apple)}};null===(c=this.dialogService_)||void 0===c||c.superloading(!1),console.log("\u4f20\u9012\u7684 loading false");const h=new window.AdyenCheckout(p);let x=null===(s=null==h?void 0:h.create("dropin"))||void 0===s?void 0:s.mount("#dropin-container");null===(d=this.adyenService)||void 0===d||d.setAdyenFrom(x)}getEnvKey(){var e;return"isPrd"in this.paymentConfig?null!==(e=this.paymentConfig)&&void 0!==e&&e.isPrd?"live":"test":this.configService.isPrd()?"live":"test"}handleAdyenSubmit(e,n){console.log("handleAdyenSubmit",e,n),this.paymentConfig.adyenPayload=e.data;var o=Object.assign({},this.paymentConfig);null==n||n.setStatus("loading"),this.postOrder&&this.postOrder({async:!1,charge:o,failCallback:()=>{console.log("adyenPayment post order failed"),null==n||n.setStatus("ready")}})}handleAdditionalDetails(e,n){var o,r,l;console.log("handleAdditionalDetails",null==e?void 0:e.data);let c=null===(o=this.adyenService)||void 0===o?void 0:o.getVerifyUrl();c&&(null==e?void 0:e.data)?(null===(r=this.dialogService)||void 0===r||r.superloading(!0),this.dataService.postWithBody(c,e.data).subscribe(s=>{var d,m,p,h;let x=null==s?void 0:s.data;null===(d=this.dialogService)||void 0===d||d.superloading(!1),console.log("handleAdditionalDetails postWithBody result",s),console.log("handleAdditionalDetails postWithBody orders",x),x.length>0&&(null===(h=null===(p=null===(m=x[0])||void 0===m?void 0:m.payInfo)||void 0===p?void 0:p.paymentsDetails)||void 0===h?void 0:h.action)?(this.orderManager.clearOrderItems(),null==n||n.handleAction(x[0].payInfo.paymentsDetails.action)):this.goDetailHandle(x[0])},s=>{var d,m;null===(d=this.dialogService)||void 0===d||d.superloading(!1),console.log("verify err 
1callback",s),null!=s&&s.url?this.redirectToUrl(s.url):null===(m=this.dialogService)||void 0===m||m.showError(s)})):null===(l=this.dialogService)||void 0===l||l.showAlert("waring","verifyUrl null?")}redirectToUrl(e){!e||(this.orderManager.clearOrderItems(),this.adyenService.clear(),window.location.href=e)}goDetailHandle(e){!e||(this.orderContext.completedOrder=e,this.orderManager.clearOrderItems(),this.orderManager.order=null,this.orderManager.count=0,this.orderManager.member=null,this.orderManager.mode=null,this.orderManager.selectedOffers=[],this.orderManager.promoCode=null,this.orderManager.resetPromoCodes(),this.orderManager.orderContextService.clearPreviousOrder(),this.goDetail(e))}goDetail(e){var n,o,r;this.routingService.navigateBackRootAndForward(`/order/store/${e.storeId}/order/${e.id}`,e.courtId&&this.context.court?{queryParams:{courtId:this.context.courtId},replaceUrl:!0}:this.route.snapshot.queryParams.groupId?{queryParams:{groupId:null===(r=null===(o=null===(n=this.route)||void 0===n?void 0:n.snapshot)||void 0===o?void 0:o.queryParams)||void 0===r?void 0:r.groupId},replaceUrl:!0}:{replaceUrl:!0})}handleAdyenError(e){console.log("handleAdyenError",e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(ia.q))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-adyen-native"]],inputs:{paymentConfig:"paymentConfig",dialogService_:"dialogService_",postOrder:"postOrder"},features:[t.qOj],decls:1,vars:0,consts:[["id","dropin-container",1,"adyen-credit-card"]],template:function(e,n){1&e&&t._UZ(0,"div",0)},styles:["[_nghost-%COMP%]{display:block;overflow-y:auto}"]}),i})(),oa=(()=>{class i extends C.nh{constructor(e,n){super(e),this.adyenService=n,this.title=this.t.instant("payments.adyen")}ngOnInit(){this.input=this.navParams.input,console.log("AdyenPaymentDialogComponent input",this.input),this.initData()}initData(){var e,n,o,r;this.paymentConfig=null===(e=this.input)||void 0===e?void 0:e.paymentConfig,this.response=null===(n=this.input)||void 0===n?void 0:n.response,this.postOrder=null===(o=this.input)||void 0===o?void 0:o.postOrder,this.dialogService=null===(r=this.input)||void 0===r?void 0:r.dialogService}get isShowBackIcon(){return this.adyenService.adyenShowBackIcon}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(we.G))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-adyen-payment-dialog"]],features:[t.qOj],decls:2,vars:6,consts:[[3,"title","back","close"],[3,"paymentConfig","postOrder","dialogService_"]],template:function(e,n){1&e&&t._UZ(0,"app-sub-bar",0)(1,"app-adyen-native",1),2&e&&(t.Q6J("title",n.title)("back",!1)("close",n.isShowBackIcon),t.xp6(1),t.Q6J("paymentConfig",n.paymentConfig)("postOrder",n.postOrder)("dialogService_",n.dialogService))},dependencies:[k.v,ke],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;height:100%;background:white;padding:1rem}"]}),i})();var Q=u(97582),K=u(8137),ra=u(573),aa=u(4200),la=u(34799),ca=u(83394);let sa=(()=>{class i extends C.bQ{constructor(e){super(e)}clearCurrentEditItem(){this.currentEditItem=null}clearTableInfo(){this.tableInfo=null}clearScrollIndex(){this.scrollIndex=null}clearSearchInputValue(){this.searchInputValue=""}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(t.zs3))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var Te=u(6949),G=u(85783);let da=(()=>{class i extends G.T{constructor(e){super(e),this.totalQty=1,this.inventoryManager=e.get(C.h_)}changeTotalQty(e,n=!1){var o;if(n)if("add"===e){this.analyticsService.trackItemDialogAction("add",this.mainItem),console.log("unlockItem unlockCat.max check");let r=null===(o=this.cartService)||void 0===o?void 0:o.unlockItemsMaxAmount;this.canAddUnlockItem(r,this.totalQty)?this.totalQty++:this.showUnlockItemMaxAlert(r)}else this.totalQty>1&&this.totalQty--;else if(this.currentQuantity=this.orderManager.getQuantity(this.mainItem),"add"===e){if(!this.canAddItem(this.mainItem))return;if(this.analyticsService.trackItemDialogAction("add",this.mainItem),console.log(this.mainItem,1),!this.currentOrderManager.checkInventory(this.mainItem,this.totalQty+1+this.currentQuantity)){const r=this.t.instant("byod.components.cart.dialog-insufficient-stock",{stock:this.inventoryManager.getInv(this.mainItem)});return void this.dialogService.showAlert("",r)}this.totalQty++}else if("minus"===e){if(!this.canMinusItem(this.mainItem))return;this.analyticsService.trackItemDialogAction("minus",this.mainItem),this.totalQty--}else if("reset"===e){if(!this.canMinusItem(this.mainItem))return;this.totalQty=1}}canAddItems(e,n=!1){var o,r;return!(!(null==(null===(o=this.itemSelectionOpt)||void 0===o?void 0:o.canModifyQty)||null!==(r=this.itemSelectionOpt)&&void 0!==r&&r.canModifyQty)||!n&&(this.orderManager.checkOrderMaxItem(this.totalQty+1)||this.settingManager.get("
1checkItemMax",!1)&&this.currentOrderManager.checkAddItemMax(e,this.totalQty+1)))}canMinusItem(e,n=!1){var o,r;return!!(null==(null===(o=this.itemSelectionOpt)||void 0===o?void 0:o.canModifyQty)||null!==(r=this.itemSelectionOpt)&&void 0!==r&&r.canModifyQty)&&(n?this.totalQty>1:!(this.totalQty<=1)&&(!this.settingManager.get("checkItemMin",!1)||this.currentOrderManager.getQuantity(e)+this.totalQty>(null==e?void 0:e.min)))}getDefaultItemQty(e,n=!1){var o,r,l,c;return null==(null===(o=this.itemSelectionOpt)||void 0===o?void 0:o.canModifyQty)||null!==(r=this.itemSelectionOpt)&&void 0!==r&&r.canModifyQty?n||!this.settingManager.get("checkItemMin",!1)?1:this.currentOrderManager.getQuantity(e)<(null==e?void 0:e.min)?null==e?void 0:e.min:1:null==(null===(l=this.itemSelectionOpt)||void 0===l?void 0:l.maxQty)?1:null===(c=this.itemSelectionOpt)||void 0===c?void 0:c.maxQty}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-component"]],features:[t.qOj],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();var Ze=u(12919),Ae=u(49663),Lt=u(37228);function ma(i,a){if(1&i&&(t.TgZ(0,"app-animated-thumbnail",5),t._UZ(1,"app-img",6),t.qZA()),2&i){const e=t.oxw();t.Q6J("content",e.item),t.xp6(1),t.Q6J("content",e.item)("icon","image")}}function ga(i,a){if(1&i&&t._UZ(0,"app-img",6),2&i){const e=t.oxw(2);t.Q6J("content",e.item)("icon","image")}}function pa(i,a){if(1&i&&t._UZ(0,"app-img",9),2&i){const e=t.oxw(2);t.Q6J("src",e.itemUrl)("icon","image")("hideEmpty",!0)}}function ua(i,a){if(1&i&&(t.YNc(0,ga,1,2,"app-img",7),t.YNc(1,pa,1,3,"app-img",8)),2&i){const e=t.oxw();t.Q6J("ngIf",e.item.getImage("default",0,!0)),t.xp6(1),t.Q6J("ngIf",!e.item.getImage("default",0,!0)&&null!=e.itemUrl)}}let _a=(()=>{class i{constructor(e,n){this.input=e,this.dialogRef=n}ngOnInit(){var e,n;this.item=null===(e=this.input)||void 0===e?void 0:e.item,this.itemUrl=null===(n=this.input)||void 0===n?void 0:n.itemUrl}closeClicked(){this.dialogRef.close({action:"closed"})}hasVideo(e,n="default"){var o;const r=(null==e?void 0:e.videos)||(null===(o=e[0])||void 0===o?void 0:o.videos);return!(!r||!r[n])}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(W.WI),t.Y36(W.so))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-enlarge-item-image-dialog"]],decls:6,vars:3,consts:[[1,"flex","justify-end","mb-4",3,"click"],[1,"text-white"],["name","cancel","source","mat",1,"flex",3,"size"],[3,"content",4,"ngIf","ngIfElse"],["imageDisplay",""],[3,"content"],["constrain","contain",3,"content","icon"],["constrain","contain",3,"content","icon",4,"ngIf"],[3,"src","icon","hideEmpty",4,"ngIf"],[3,"src","icon","hideEmpty"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0),t.NdJ("click",function(){return n.closeClicked()}),t.TgZ(1,"button",1),t._UZ(2,"app-icon",2),t.qZA()(),t.YNc(3,ma,2,3,"app-animated-thumbnail",3),t.YNc(4,ua,2,2,"ng-template",null,4,t.W1O)),2&e){const o=t.MAs(5);t.xp6(2),t.Q6J("size",30),t.xp6(1),t.Q6J("ngIf",n.hasVideo(n.item))("ngIfElse",o)}},dependencies:[_.O5,q.g,S.o,Lt.r],styles:["[_nghost-%COMP%]{width:100%;padding:1.5rem}  .enlarge-image-modal{height:700px!important;width:700px!important}  .enlarge-image-modal mat-dialog-container{background:transparent;box-shadow:none;padding:0;overflow:hidden;display:flex;align-items:center}@media screen and (min-width: 768px){  app-img .h-img{height:75%!important}}"]}),i})(),at=(()=>{class i extends da{constructor(e){super(e),this.injector=e,this.changed=new t.vpe,this.itemGroup=[],this.isUnlockItem=!1,this.panelDefaultState=!0,this.isClicked=-1,this.editOi=null,this.isRecommend=!1,this.autoPickupGroups=[],this.nonAutoPickupGroups=[],this.displayGroups=[],this.isAutoPickup=!1,this.isAutoPickupHasModifier=!1,this.hideZeroPrice=!1,this.showClose=!0,this.menuWithItemCountTypeWeighting=!1,this.showNutriGrade=!1,this.baseMenuService=e.get(Ze.Z),this.baseCartService=e.get(Pe.q),this.dialogService=e.get(C.xA),this.t=e.get(M.sK),this.orderContext=e.get(C.yQ),this.cd=e.get(t.sBO),this.currentEditDataService=e.get(sa),this.menuManager=e.get(C._K),this.menuWithItemCountTypeWeighting=this.cartService.isMenuWithItemCountTypeWeighting(
1)}ngAfterContentChecked(){this.cd.detectChanges()}initData(){var e,n,o,r,l,c,s,d,m,p,h,x;if(this.input=this.navParams.input||this.currentEditDataService.currentEditItem||{},console.log("BaseComboPage input",this.input),this.editOi=(null===(e=this.input)||void 0===e?void 0:e.editOi)||(null===(n=this.input)||void 0===n?void 0:n.oi),this.isUnlockItem=null===(o=this.input)||void 0===o?void 0:o.isUnlockItem,this.isRecommend=null!==(l=null===(r=this.input)||void 0===r?void 0:r.isRecommend)&&void 0!==l&&l,this.processItemSelectionOpt(),null==(null===(c=this.input)||void 0===c?void 0:c.isUnlockItem)&&(null===(s=this.itemSelectionOpt)||void 0===s?void 0:s.unlockItemMode)&&(this.isUnlockItem=null===(d=this.itemSelectionOpt)||void 0===d?void 0:d.unlockItemMode),this.currentOrderManager=this.isUnlockItem?this.cartService.unlockCatOrderManager:this.cartService.orderManager,this.store=this.currentOrderManager.getStoreFromActiveManager(),this.mainItem=N.Vw.toData(N.ck,null===(m=this.input)||void 0===m?void 0:m.mainItem),this.mainItem.note="",!(null===(p=this.mainItem)||void 0===p)&&p.pgroupId&&(this.mainItem.groups.push(this.mainItem.pgroup),this.mainItem.groupIds.push(this.mainItem.pgroupId)),this.buildMainItemGroups(),this.groups=null===(h=this.mainItem)||void 0===h?void 0:h.groups,this.menuWithItemCountTypeWeighting&&this.groups.forEach(v=>{null!=v.maxItemWeighting&&null==v.minItemWeighting&&(v.minItemWeighting=0)}),this.editOi)console.log("\u7f16\u8f91\u8d2d\u7269\u8f66\u7684comboItem",this.editOi),this.orderItemBuilder=this.baseCartService.createOrderItemBuilderByOrderItem(this.store,this.editOi),this.initNoNeedBtn(),this.baseCartService.flatten(this.category,this.mainItem);else{const v=null===(x=this.input)||void 0===x?void 0:x.mainItemGroup;this.orderItemBuilder=this.baseCartService.createOrderItemBuilderByMainItem(this.store,this.category,v,this.mainItem),this.baseCartService.flatten(this.category,this.mainItem)}this.itemGroup=this.orderItemBuilder.groups,this.totalQty=this.getDefaultItemQty(this.mainItem,this.isUnlockItem),this.handleAutoPickupItem(),this.hideZeroPrice=this.settingManager.get("menu.hideZeroItemPrice",!1),this.handlePreSelectDefaultItem(),this.checkForShowingNutriGradeCodedScale(this.groups)}processItemSelectionOpt(){var e,n;this.itemSelectionOpt=null===(e=this.input)||void 0===e?void 0:e.opt,this.showClose=!(null!==(n=this.itemSelectionOpt)&&void 0!==n&&n.mandatory)}buildMainItemGroups(){var e,n,o,r;let l=null===(e=this.input)||void 0===e?void 0:e.mainItemGroup;this.category=null===(n=this.input)||void 0===n?void 0:n.category;let c=this.category.groups;c=c.filter(s=>(null==l?void 0:l.id)!=s.id),(null===(r=null===(o=this.mainItem)||void 0===o?void 0:o.groups)||void 0===r?void 0:r.length)>0&&(c=this.mainItem.groups),this.mainItem.groups=c.filter(s=>this.menuManager.isAvailableByUserGroup(s))}initNoNeedBtn(){var e;for(let n=0;n<this.groups.length;n++){let o=!1;for(let r=0;r<(null===(e=this.editOi)||void 0===e?void 0:e.groups.length);r++)if(0!==r&&this.groups[n].id===this.editOi.groups[r].id){o=!0;break}o||(this.orderItemBuilder.noNeedConfirm[this.groups[n].id]=!0,this.orderItemBuilder.noNeedConfirmButtonFlag=!0,this.orderItemBuilder.clearItems(n+1),this.orderItemBuilder.build())}}getModifierItemDisplay(e){if(e.quantity>0){let n=e.name;if(e.quantity>1&&"no-receipt"!==e.marker&&(n=n+" x "+e.quantity),"no-receipt"!==e.marker)return n}return null}isCompleted(){return this.baseCartService.isAllCompletedByOiBuilder(this.orderItemBuilder)}isCompletedModifierByAllModifierItem(){var e,n;return null===(n=null===(e=this.orderItemBuilder)||void 0===e?void 0:e.groups)||void 0===n?void 0:n.every(r=>!r||this.isCompletedModifierByCurrentGroup(r))}isCompletedModifierByCurrentGroup(e){return this.baseCartService.isRequiredModifierSelect(this.orderItemBuilder,e)}isCompletedGroupMinMax(e){return this.baseCartService.isCompletedGroupMinMax(this.orderItemBuilder,e)}isAllCompletedByCurrentGroup(e){return this.isCompletedModifierByCurrentGroup(e)&&this.isCompletedGroupMinMax(e)}isShowBottomCustomizeBtn(e){var n;let o=!1;if(e&&e.groups)for(let r=0;r<e.groups.length;r++)if((null===(n=null==e?void 0:e.groups)||void 0===n?void 0:n[r])&&this.isCurrentGroupHasModifier(e.groups[r])){o=!0;break}return o}isCurrentGroupHasModifier(e,n){let o=this.orderItemBuilder.getGroupById(e.id);if(o){let r=this.hasModifier(o.items,this.baseCartService.itemMap);return n&&(n[o.id]=r),r}return!1}currentGroupHasItemRemarkSetting(e){return!!e&&e.items.filter(o=>(null==o?void 0:o.messageLimit)&&o.messageLimit>0).length>0}hasModifier(e,n,o=!1){let r=!1,l=!1;for(let c of e){let s=n[c.id];if(s&&s.mgroups&&s.mgroups.length>0){for(let d of s.mgroups)for(let m of d.items)if(m&&m.name){l=!0;break}if(!o){r=!0;continue}for(let d of s.mgroups)if(d.min&&d.min>0){r=!0;break}}}return r&&l}hasModifierItemGroup(e,n=!1){let o=!1,r=!1;for(let l of e)for(let c of l.items)if(c&&c.name){r=!0;break}if(n){for(let l of e)if(l.min&&l.min>0){o=!0;break}}else o=!0;return o&&r}mgitemClick(e,n){this.baseCartService.isSoldout(n)||this.baseCartService.isPreparing(n)||(console.log("mgitemClick",e,n),this.addClicked(e,n))}clickedNoNeed(e,n){console.log("clickedNoNeed",e,n);const o=this.baseCartService.getGroupIndex(this.orderItemBuilder,e);if(this.orderItemBuilder.noNeedConfirmButtonFlag=!0,null!=e&&e.id&&(this.orderItemBuilder.noNeedConfirm[e.id]=!0),o<0)return;let r=null;if(this.orderItemBuilder.groups[o]&&this.orderItemBuilder.groups[o].items&&this.orderItemBuilder.groups[o].items.length){r=0;for(const c of this.orderItemBuilder.groups[o].items)r+=this.orderItemBuilder.getQuantityInGroup(o,c.id);console.log("check quantities",r)}this.orderItemBuilder.clearItems(o),this.orderItemBuilder.build(),console.log("checking next itemGrp",this.groups,n+1),this.cd.detectChanges()}addClicked(e,n){this.baseCartService.isSoldout(n)||(this.analyticsService.trackItemDialogAction("add",this.mainItem),console.log("base combo group: ",e," oi: ",this.orderItemBuilder),this.baseCartService.add(this.orderItemBuilder,n,e,!1),console.log("orderItemBuilder",this.orderItemBuilder),this.itemGroup=this.orderItemBuilder.groups)}minusClicked(e,n){console.log("minusClicked"),this.checkCanMinus(n,e)&&(this.analyticsService.trackItemDialogAction("minus",this.mainItem),this.baseCartService.discard(this.orderItemBuilder,n,e))}checkCanMinus(e,n){let o=this.baseCartService.getQuantity(this.orderItemBuilder,e,n);return 1!==n.items.length||o>e.min}getDefaultImage(e,n,o){return this.baseMenuService.getDefaultImage(e,n,o)}addToCartClicked(){var e,n,o,r,l,c,s,d,m,p,h,x,v,y,A,L,E,$,R;if(!this.isCompleted()){this.analyticsService.trackItemDialogAction("next",this.mainItem);let w=null;for(const P in this.orderItemBuilder.items)this.orderItemBuilder.items[P].modifier||(w+=this.orderItemBuilder.items[P].quantity);let O=null,T=null;for(const P in this.orderItemBuilder.getOriginGroups())O+=this.orderItemBuilder.getOriginGroups()[P].max,T+=this.orderItemBuilder.getOriginGroups()[P].min;O-=this.orderItemBuilder.getOriginGroups()[0].max,T-=this.orderItemBuilder.getOriginGroups()[0].min;const b=this.checkGroupRequired();for(const P in null===(e=this.orderItemBuilder)||void 0===e?void 0:e.groups)if(0==(null===(o=null===(n=this.orderItemBuilder)||void 0===n?void 0:n.groups[P])||void 0===o?void 0:o.optional)&&(null===(l=null===(r=this.orderItemBuilder)||void 0===r?void 0:r.groups[P])||void 0===l?void 0:l.items.length)<(null===(s=null===(c=this.orderItemBuilder)||void 0===c?void 0:c.groups[P])||void 0===s?void 0:s.min)){let B=0;for(const Fu of null===(m=null===(d=this.orderItemBuilder)||void 0===d?void 0:d.groups[P])||void 0===m?void 0:m.items)B+=Fu.quantity;return B==(null===(h=null===(p=this.orderItemBuilder)||void 0===p?void 0:p.groups[P])||void 0===h?void 0:h.min)&&null==b?void this.showModifier():void this.scrollTo(b)}if(null==b&&!this.isCompletedModifierByAllModifierItem())return void this.showModifier();if(w<O+1&&(0==this.orderItemBuilder.noNeedConfirmButtonFlag||null!=b))return void this.scrollTo(b)}if(this.totalQty<1)this.showQtyAlert();else if(this.groups&&this.groups.length>0){const w=this.orderItemBuilder.build();if(w.note=this.mainItem.note,this.totalQty>0)if(this.editOi){if(this.isGroupCombo()){const O=w.items.filter(P=>P.modifier).map(P=>P.id),T=this.editOi.items.filter(P=>P.modifier).map(P=>P.id);O.length!=T.length||O.length==T.length&&Ae.Z(T,O).length!=O.length?(this.currentOrderManager.addOrderItem(w,this.isRecommend),this.currentOrderManager.minusOrderItem(this.editOi)):this.currentOrderManager.replaceOrderItem(this.editOi,w,this.totalQty)}else if(1===this.totalQty)this.currentOrderManager.replaceOrderItem(this.editOi,w);else{this.currentOrderManager.replaceOrderItem(this.editOi,w);const O=this.orderItemBuilder.build();for(let T=0;T<this.totalQty-1;T++)Te.o.cloneOrderItem(O,!0).combo=!0,this.currentOrderManager.addOrderItem(w,this.isRecommend)}this.analyticsService.trackItemDialogAction("edit",this.mainItem)}else{if(this.isGroupCombo()){let O;const T=w.items.map(b=>b.id);
1if(this.currentOrderManager.getOrder().orderitems.forEach(b=>{const P=b.items.map(B=>B.id);T.length==P.length&&Ae.Z(T,P).length==T.length&&(O=b)}),O){this.mainItem.note&&(O.note=this.mainItem.note);for(let b=0;b<this.totalQty;b++)this.currentOrderManager.addExistingOrderItem(O)}else w.quantity=this.totalQty,this.currentOrderManager.addOrderItem(w,this.isRecommend)}else for(let O=0;O<this.totalQty;O++){let T=Te.o.cloneOrderItem(w,!0);T.combo=!0,T.note=this.mainItem.note,this.currentOrderManager.addOrderItem(T,this.isRecommend)}this.analyticsService.trackItemDialogAction("add_to_cart",this.mainItem)}console.log("this.oi",this.currentOrderManager.order),this.dialogService.submitAuxDialog({}),null!==(x=this.itemSelectionOpt)&&void 0!==x&&x.callbackAfterAddToCart&&this.itemSelectionOpt.callbackAfterAddToCart(this.mainItem,w,this.itemSelectionOpt)}else{if((null===(y=null===(v=this.mainItem)||void 0===v?void 0:v.mgroups)||void 0===y?void 0:y.length)>0){let w=null===(A=this.modifierBuilder)||void 0===A?void 0:A.build();if(this.editOi)console.log("\u7f16\u8f91 Oi comfireClick\uff08\u65b0\uff09",w),console.log("\u7f16\u8f91 Oi comfireClick\uff08\u65e7\uff09",this.editOi),this.currentOrderManager.replaceOrderItem(this.editOi,w);else{let O=this.totalQty;if(O)for(let T=1;T<=O;T++){const b=this.orderItemBuilder.clone().build();b.note=this.mainItem.note,this.currentOrderManager.addOrderItem(b,this.isRecommend)}}}else{const w=null===(L=this.currentOrderManager)||void 0===L?void 0:L.findOrderItem(this.mainItem,!1);let O=this.totalQty,T="coupon"===this.mainItem.type;if(w&&!T)for(let b=0;b<O;b++)this.currentOrderManager.addExistingOrderItem(w);else if(O)for(let b=1;b<=O;b++)this.currentOrderManager.addSingleItem(null===(E=this.input)||void 0===E?void 0:E.category,null===($=this.input)||void 0===$?void 0:$.mainItemGroup,this.mainItem,!1,this.isRecommend)}this.analyticsService.trackItemDialogAction("add_to_cart",this.mainItem),this.dialogService.submitAuxDialog({}),null!==(R=this.itemSelectionOpt)&&void 0!==R&&R.callbackAfterAddToCart&&this.itemSelectionOpt.callbackAfterAddToCart(this.mainItem)}}showNotCompletedAlert(){const e=this.t.instant("byod.dialogs.combo-dialog.select-error");this.t.instant("byod.dialogs.combo-dialog.ok"),this.dialogService.showAlert("",e,o=>{})}showQtyAlert(){this.t.instant("byod.dialogs.combo-dialog.ok"),this.dialogService.showAlert("","QTY must greater than 0",o=>{})}showModifier(){return(0,Q.mG)(this,void 0,void 0,function*(){console.log("AllModifiersDialogComponent");const e=this.orderItemBuilder.build();this.dialogService.openAux("order/dialog/all-modifiers",{store:this.store,orderItem:e,edit:!1},{autoClose:!1},r=>{this.cd.detectChanges(),this.routingService.navigateCloseModal()})})}scrollTo(e){console.log("base combo scroll to",e);var n=document.getElementById("section-"+e);n&&n.scrollIntoView({behavior:"smooth"})}isPreviousIndexEqualstoCurrentIndex(e,n){return e==n}checkGroupRequired(){return this.getIndexUncompletedRequired(this.orderItemBuilder)}getIndexUncompletedRequired(e){let n=this.groups;if(!n||0===n.length)return null;for(let o=0;o<n.length;o++)if(!e.isGroupCompleted(n[o]))return o;return null}getAllItems(e){let n=this.mainItem.groups,o=null,r=0;for(let l=0;l<e-1;l++)o+=n[l].items.length;return 0==n[0].optional&&r++,0!=r?o=o+e-r:o+=e,o}isAutopickupGroup(e){if(!this.settingManager.get("menu.autoPickup",!1))return!1;const o=e.items,r=this.isSubItemMaxEqualtoGroupMax(o,e);return!e.optional&&e.min===e.max&&(r||o.length===e.min&&!e.repeat||1===o.length&&e.repeat)}isSubItemMaxEqualtoGroupMax(e,n){let o=0;for(let r=0;r<e.length;r++)o+=e[r].max;return o===n.max}handleAutoPickupItem(){var e,n,o;if(this.autoPickupGroups=[],this.nonAutoPickupGroups=[],this.isAutoPickup=this.settingManager.get("menu.autoPickup",!1),!this.isAutoPickup)return this.isAutoPickup=!1,void(this.displayGroups=null!==(e=this.mainItem)&&void 0!==e&&e.comboAsAlacarte?[]:null===(n=this.mainItem)||void 0===n?void 0:n.groups);for(const r of this.groups)this.isAutopickupGroup(r)?(this.autoPickupGroups.push(r),this.editOi||(null!==(o=null==r?void 0:r.items)&&void 0!==o?o:[]).forEac
1h(c=>{console.log("auto pick group",r);const s=r.repeat?r.min:1;for(let d=0;d<s;d++)this.addClicked(r,c)})):this.nonAutoPickupGroups.push(r);this.displayGroups=this.nonAutoPickupGroups,this.checkAutoPickupHasModifier()}handlePreSelectDefaultItem(){var e;if(this.settingManager.get("menu.preselectItem",!1)&&!this.editOi)for(const o of this.groups)null!=o&&o.defaultId&&(null!==(e=null==o?void 0:o.items)&&void 0!==e?e:[]).forEach(l=>{if((null==l?void 0:l.id)===(null==o?void 0:o.defaultId)){console.log("preselect default item group",o);const c=o.repeat?o.min:1;for(let s=0;s<c;s++)null!=o&&o.repeat?this.mgitemClick(o,l):this.getQuantity(o,l)||this.mgitemClick(o,l)}})}getQuantity(e,n){var o;let r=null===(o=this.orderItemBuilder)||void 0===o?void 0:o.getQuantityInGroup(this.orderItemBuilder.getItemGroupIndex_hasSelected(e),n.id);return null!=r?r:0}getItemImg(e){var n,o;return(null==e?void 0:e.getImage("default",200,!1))||this.getDefaultImage(!1,null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.store)||void 0===o?void 0:o.brand,500)}isGroupCombo(){var e;return(null===(e=this.itemSelectionOpt)||void 0===e||!e.ignoreGroupCombo)&&this.cartService.isGroupCombo()}isMaxCountItemInGroupReached(e){if(null==e.max)return!1;const n=this.baseCartService.getGItemCountCurrentGroup(this.orderItemBuilder,e);return this.orderItemBuilder.noNeedConfirm[e.id]||n==e.max}enlargeImage(e){this.analyticsService.trackItemDialogAction("enlarge_image",e),e.getImage("default",0,!0)||this.getItemUrl()?this.dialogService.openComponent(_a,{item:e,itemUrl:this.getItemUrl()},{maxWidth:"100vw",maxHeight:"100vh",width:"80%",height:"80%",autoFocus:!1,panelClass:"enlarge-image-modal"}):console.log("Should not able to open image")}getItemUrl(){return this.baseCartService.getItemUrl()}checkAutoPickupHasModifier(){this.isAutoPickupHasModifier=!1;for(let e=0;e<this.autoPickupGroups.length;e++)if(this.isAutoPickup&&this.isAutopickupGroup(this.autoPickupGroups[e])&&this.isCurrentGroupHasModifier(this.autoPickupGroups[e]))return void(this.isAutoPickupHasModifier=!0)}isAllAutoPickupModifierCompleted(){var e,n;return null===(n=null===(e=this.orderItemBuilder)||void 0===e?void 0:e.groups)||void 0===n?void 0:n.every(r=>!r||this.isInAutoPickupGroup(r)&&this.isCompletedModifierByCurrentGroup(r))}isInAutoPickupGroup(e){var n;return(null===(n=this.autoPickupGroups)||void 0===n?void 0:n.filter(o=>o.id==e.id).length)>0}getTagBackGroundColor(e){var n,o;let r=null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.menu)||void 0===o?void 0:o.badges;if(r&&r.length>0){for(let l of r)if((null==l?void 0:l.tag)==e)return(null==l?void 0:l.bgColor)||"#000";return"#000"}return"#000"}getTagImage(e){var n,o;let r=null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.menu)||void 0===o?void 0:o.badges;if(r&&r.length>0)for(let l of r)if((null==l?void 0:l.tag)==e)return null==l?void 0:l.getImage("default",400,!0);return""}checkForShowingNutriGradeCodedScale(e){let n=!1;e.forEach(o=>{o.items.forEach(r=>{r.nutriGrade&&(n=!0)})}),this.showNutriGrade=n}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["ng-component"]],outputs:{changed:"changed"},features:[t.qOj],decls:0,vars:0,template:function(e,n){},encapsulation:2}),i})();var Bt=u(92773);let Yt=(()=>{class i{constructor(){this.remark=new t.vpe}ngOnInit(){}getRemark(){this.remark.emit(this.note)}clearNote(){this.note="",this.remark.emit(this.note)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-write-remark"]],inputs:{note:"note"},outputs:{remark:"remark"},decls:11,vars:10,consts:[[1,"remark-continer"],[1,"flex-a"],["name","message","size","14",1,"msg-icon"],[1,"remark-text"],["rows","6","maxlength","140","matInput","","placeholder","",1,"remark-content",3,"placeholder","ngModel","ngModelChange","input"],[1,"clear-all",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"app-icon",2),t.TgZ(3,"span",3),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"textarea",4),t.NdJ("ngModelChange",function(r){return n.note=r})("input",function(){return n.getRemark()}),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"div",5),t.NdJ("click",function(){return n.clearNote()}),t._uU(9),t.ALo(10,"translate"),t.qZA()()),2&e&&(t.xp6(4),t.Oqu(t.lcZ(5,4,"byod.dialogs.write-remark.remark")),t.xp6(2),t.Q6J("placeholder",t.lcZ(7,6,"byod.dialogs.write-remark.remarkTips"))("ngModel",n.note),t.xp6(3),t.Oqu(t.lcZ(10,8,"byod.dialogs.write-remark.clearAll")))},dependencies:[g.Fj,g.JJ,g.nD,g.On,S.o,j.Nt,M.X$],styles:["[_nghost-%COMP%]{display:block}.remark-continer[_ngcontent-%COMP%]{margin-top:.5rem}.remark-continer[_ngcontent-%COMP%]   .flex-a[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:1.4rem}.remark-continer[_ngcontent-%COMP%]   .msg-icon[_ngcontent-%COMP%]{margin-right:.5rem}.remark-continer[_ngcontent-%COMP%]   .remark-content[_ngcontent-%COMP%]{width:calc(100% - 2.8rem);margin:.5rem 1.4rem 0;height:6rem;padding:1rem;box-sizing:border-box;background:#fff}
1.remark-continer[_ngcontent-%COMP%]   .clear-all[_ngcontent-%COMP%]{text-align:right;margin:.5rem 1.4rem .5rem 0}"]}),i})();var Se=u(36617),fa=u(21963);function ha(i,a){if(1&i&&t.GkF(0,8),2&i){t.oxw();const e=t.MAs(10);t.Q6J("ngTemplateOutlet",e)}}function xa(i,a){1&i&&t._UZ(0,"span",16)}const va=function(i){return{"allCompleted-full-fill":i}};function Ca(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",14),t.NdJ("click",function(o){return t.CHM(e),t.oxw(2).modifierClicked(),t.KtG(o.stopPropagation())}),t.TgZ(2,"h5"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.YNc(5,xa,1,0,"span",15),t.qZA(),t.BQk()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,va,e.isCompletedModifierByAllModifierItem())),t.xp6(2),t.hij(" ",t.lcZ(4,3,"byod.dialogs.combo-dialog.customize")," "),t.xp6(2),t.Q6J("ngIf",!e.isCompletedModifierByAllModifierItem())}}function ba(i,a){if(1&i&&(t.TgZ(0,"p",28),t._uU(1),t.ALo(2,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.gM2(2,1,(null!=e.orderItem&&e.orderItem.total?e.orderItem.total:e.mainItem.price)*e.totalQty,!0,e.context,!0)," ")}}function Ma(i,a){1&i&&t.GkF(0)}function Oa(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",29),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.addToCartClicked())}),t._uU(1),t.ALo(2,"translate"),t.YNc(3,Ma,1,0,"ng-container",12),t.qZA()}if(2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,2,"byod.dialogs.alacarte-dialog.add")," "),t.xp6(2),t.Q6J("ngIf","points"!==e.category.type)}}function ya(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"pointDisplay"),t.BQk()),2&i){const e=t.oxw(4);t.xp6(1),t.hij(" ",t.lcZ(2,1,(null!=e.orderItem&&e.orderItem.points?e.orderItem.points:e.mainItem.points)*e.totalQty)," ")}}function Pa(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",30),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.addToCartClicked())}),t._uU(1),t.ALo(2,"translate"),t.ynx(3),t._uU(4),t.ALo(5,"priceDisplay"),t.BQk(),t.YNc(6,ya,3,3,"ng-container",12),t.qZA()}if(2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.lcZ(2,3,"byod.dialogs.alacarte-dialog.add")," "),t.xp6(3),t.hij(" ",t.gM2(5,5,(null!=e.orderItem&&e.orderItem.total?e.orderItem.total:e.mainItem.price)*e.totalQty,!0,e.context,!0)," "),t.xp6(2),t.Q6J("ngIf","points"===e.category.type)}}const Ia=function(i){return{"delete-add-remove-btn":i}};function wa(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",17),t.ynx(1),t.TgZ(2,"div",18)(3,"div",19)(4,"button",20),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.onClickQuantity("minus",o.isUnlockItem,null,!0))}),t._UZ(5,"app-icon",21),t.qZA(),t.TgZ(6,"h4",22),t._uU(7),t.qZA(),t.TgZ(8,"button",23),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2);return r.onClickQuantity("add",r.isUnlockItem),t.KtG(o.stopPropagation())}),t._UZ(9,"app-icon",24),t.qZA()(),t.YNc(10,ba,3,6,"p",25),t.qZA(),t.BQk(),t.YNc(11,Oa,4,4,"button",26),t.YNc(12,Pa,7,10,"button",27),t.qZA()}if(2&i){const e=t.oxw(2);t.xp6(3),t.Q6J("ngClass",t.VKq(7,Ia,e.isEgiftFlow)),t.xp6(1),t.Q6J("disabled",!e.canMinusItem(e.mainItem,e.isUnlockItem)),t.xp6(3),t.Oqu(e.totalQty),t.xp6(1),t.Q6J("disabled",!e.canAddItems(e.mainItem,e.isUnlockItem)),t.xp6(2),t.Q6J("ngIf",!e.isEgiftFlow),t.xp6(1),t.Q6J("ngIf",!e.isEgiftFlow),t.xp6(1),t.Q6J("ngIf",e.isEgiftFlow)}}const ka=function(i){return{"combo-footer-egift":i}};function Ta(i,a){if(1&i&&(t.TgZ(0,"div",9)(1,"div",10),t._UZ(2,"div",11),t.YNc(3,Ca,6,7,"ng-container",12),t.qZA(),t.YNc(4,wa,13,9,"div",13),t.qZA()),2&i){const e=t.oxw();
1t.Q6J("ngClass",t.VKq(3,ka,e.isEgiftFlow)),t.xp6(3),t.Q6J("ngIf",e.isHasModifier),t.xp6(1),t.Q6J("ngIf",!e.orderContext.viewMode)}}function Za(i,a){if(1&i&&(t.TgZ(0,"div",46)(1,"div",47)(2,"app-animated-thumbnail",48),t._UZ(3,"app-img",49),t.qZA()()()),2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("content",e.mainItem)("autoPlayOnVisible",!0)("autoPlayOnHover",!1),t.xp6(1),t.Q6J("content",e.mainItem)("icon","image")("animate",!0)}}function Aa(i,a){if(1&i&&(t.TgZ(0,"div",46)(1,"div",47),t._UZ(2,"app-img",51),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Q6J("content",e.mainItem)("icon","image")("animate",!0)("pw",300)}}function Sa(i,a){if(1&i&&(t.TgZ(0,"div",46)(1,"div",52),t._UZ(2,"app-img",53),t.qZA()()),2&i){const e=t.oxw(3);t.xp6(2),t.Q6J("src",e.logoUrl)("icon","image")("animate",!0)}}function Da(i,a){if(1&i&&(t.YNc(0,Aa,3,4,"div",50),t.YNc(1,Sa,3,3,"div",50)),2&i){const e=t.oxw(2);t.Q6J("ngIf",null==e.mainItem?null:e.mainItem.getImage("default",400,!0)),t.xp6(1),t.Q6J("ngIf",!(null!=e.mainItem&&e.mainItem.getImage("default",400,!0))&&null!=e.logoUrl)}}function qa(i,a){if(1&i&&(t.TgZ(0,"h3",56),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.gM2(2,1,t.lcZ(3,6,e.mainItem),!0,e.context,!0)," ")}}function Qa(i,a){if(1&i&&t._UZ(0,"app-item-special-price",57),2&i){const e=t.oxw(3);t.Q6J("item",e.mainItem)}}function Na(i,a){if(1&i&&(t.ynx(0),t.YNc(1,qa,4,8,"h3",54),t.YNc(2,Qa,1,1,"app-item-special-price",55),t.BQk()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!(null!=e.mainItem&&e.mainItem.showSpecialPrice)),t.xp6(1),t.Q6J("ngIf",null==e.mainItem?null:e.mainItem.showSpecialPrice)}}function Ja(i,a){if(1&i&&(t.TgZ(0,"h3",56),t._uU(1),t.ALo(2,"pointDisplay"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.lcZ(2,1,e.mainItem.points)," ")}}function Ua(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",63),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("src",n.getTagImage(e))}}const Fa=function(i){return{"background-color":i}};function La(i,a){if(1&i&&(t.TgZ(0,"h6",65),t._uU(1),t.ALo(2,"i18n"),t.ALo(3,"itemTag"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.Q6J("ngStyle",t.VKq(8,Fa,n.getTagBackGroundColor(e))),t.xp6(1),t.hij("",t.Dn7(2,2,t.lcZ(3,6,e),n.context.userLang,"name")," ")}}function Ba(i,a){if(1&i&&t.YNc(0,La,4,10,"h6",64),2&i){const e=t.oxw().$implicit;t.Q6J("ngIf",e)}}function Ya(i,a){if(1&i&&(t.ynx(0,60),t.YNc(1,Ua,2,1,"ng-container",61),t.YNc(2,Ba,1,1,"ng-template",null,62,t.W1O),t.BQk()),2&i){const e=t.MAs(3),n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.settingManager.get("isItemTagImage",!1))("ngIfElse",e)}}function za(i,a){if(1&i&&(t.TgZ(0,"div",58),t.YNc(1,Ya,4,2,"ng-container",59),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",null==e.mainItem?null:e.mainItem.tags)}}function ja(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",66),t._UZ(1,"app-icon",67),t.TgZ(2,"h1",68),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.showNutrition())}),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&i&&(t.xp6(3),t.hij(" ",t.lcZ(4,1,"byod.dialogs.alacarte-dialog.show-nutrition"),""))}function Ga(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-write-remark",69),t.NdJ("remark",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r.getRemark(o))}),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("note",e.mainItem.note)}}function Ea(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-write-remark",69),t.NdJ("remark",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r.getRemark(o))}),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("note",e.editOi.note)}}function $a(i,a){if(1&i&&(t.TgZ(0,"h2",70),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.hij(" ",t.Dn7(2,1,e.mainItem,e.context.userLang,"desc")," ")}}function Ra(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",31),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.enlargeImage(o.mainItem))}),t.YNc(1,Za,4,6,"div",32),t.YNc(2,Da,2,2,"ng-template",null,33,t.W1O),t.qZA(),t.TgZ(4,"div",34)(5,"div",35)(6,"div",36)(7,"div",37)(8,"h1",38),t._uU(9),t.ALo(10,"i18n"),t.qZA(),t.YNc(11,Na,3,2,"ng-container",12),t.YNc(12,Ja,3,3,"h3",39),t.qZA(),t.YNc(13,za,2,1,"div",40),t.qZA(),t.TgZ(14,"div"),t._UZ(15,"app-nutri-grade",41),t.qZA(),t.YNc(16,ja,5,3,"div",42),t.qZA(),t.YNc(17,Ga,1,1,"app-write-remark",43),t.YNc(18,Ea,1,1,"app-write-remark",43),t.TgZ(19,"div",44),t.YNc(20,$a,3,5,"h2",45),t.ALo(21,"i18n"),t.qZA()()}if(2&i){const e=t.MAs(3),n=t.oxw();
1t.xp6(1),t.Q6J("ngIf",n.hasVideo(n.mainItem))("ngIfElse",e),t.xp6(8),t.Oqu(t.xi3(10,11,n.mainItem,n.context.userLang)),t.xp6(2),t.Q6J("ngIf","points"!==n.category.type),t.xp6(1),t.Q6J("ngIf","points"===n.category.type),t.xp6(1),t.Q6J("ngIf",null==n.mainItem?null:n.mainItem.tags),t.xp6(2),t.Q6J("item",n.mainItem),t.xp6(1),t.Q6J("ngIf",n.isShowNutrition),t.xp6(1),t.Q6J("ngIf",n.showItemRemark&&!n.editOi),t.xp6(1),t.Q6J("ngIf",n.showItemRemark&&n.editOi),t.xp6(2),t.Q6J("ngIf",t.Dn7(21,14,n.mainItem,n.context.userLang,"desc"))}}function Va(i,a){if(1&i&&(t.TgZ(0,"div",80)(1,"div",81),t._UZ(2,"app-img",82),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("content",e.mainItem)("icon","image")("animate",!0)}}function Ha(i,a){if(1&i&&(t.TgZ(0,"div",80)(1,"div",83),t._UZ(2,"app-img",53),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("src",e.logoUrl)("icon","image")("animate",!0)}}function Ka(i,a){1&i&&(t.TgZ(0,"h2",84),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.please-fill-out-details"),""))}function Wa(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"titlecase"),t.ALo(3,"translate"),t._UZ(4,"span",95),t.ALo(5,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,2,t.lcZ(3,4,"byod.dialogs.alacarte-dialog.from"))," "),t.xp6(3),t.Q6J("innerHTML",t.lcZ(5,6,"byod.dialogs.alacarte-dialog.require"),t.oJD))}function Xa(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.white-space"),""))}function tl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.white-space"),""))}function el(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",96),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.removeAll())}),t.TgZ(1,"button"),t._uU(2),t.ALo(3,"translate"),t.qZA()()}2&i&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"byod.dialogs.alacarte-dialog.remove-all")))}function nl(i,a){1&i&&(t.TgZ(0,"h2",115),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.egift-vouchers"),""))}function il(i,a){if(1&i&&t._UZ(0,"app-img",121),2&i){const e=t.oxw(3).index,n=t.oxw(3);t.Q6J("content",n.getEgiftCards(e))("ratio",580/360)("pw",580)}}function ol(i,a){if(1&i&&t._UZ(0,"app-img",122),2&i){const e=t.oxw(6);t.Q6J("src",e.logoUrl)("ratio",580/360)("pw",580)}}function rl(i,a){if(1&i&&(t.TgZ(0,"div",116)(1,"div",117),t.YNc(2,il,1,3,"app-img",118),t.YNc(3,ol,1,3,"app-img",119),t.qZA(),t.TgZ(4,"h2",120),t._uU(5),t.qZA()()),2&i){const e=t.oxw(2).index,n=t.oxw(3);let o;t.Q6J("@itemsVert",void 0),t.xp6(2),t.Q6J("ngIf",n.getEgiftCards(e)&&n.hasImage(n.getEgiftCards(e),"giftCardDesign")),t.xp6(1),t.Q6J("ngIf",n.getEgiftCards(e)&&!n.hasImage(n.getEgiftCards(e),"giftCardDesign")),t.xp6(2),t.Oqu(null==(o=n.getEgiftCards(e))?null:o.name)}}function al(i,a){if(1&i&&t._UZ(0,"app-img",126),2&i){const e=t.oxw().$implicit;t.Q6J("content",e)("ratio",580/360)("pw",580)}}function ll(i,a){if(1&i&&t._UZ(0,"app-img",127),2&i){const e=t.oxw(6);t.Q6J("src",e.logoUrl)("ratio",580/360)("pw",580)}}function cl(i,a){1&i&&t._UZ(0,"app-icon",128)}const De=function(i){return{"selected-gift-card":i}};function sl(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",123),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(2).index,c=t.oxw(3);return t.KtG(c.selectEgiftCard(r,l))}),t.YNc(2,al,1,3,"app-img",124),t.YNc(3,ll,1,3,"app-img",125),t.YNc(4,cl,1,0,"app-icon",114),t.qZA(),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw(2).index,o=t.oxw(3);let r,l;t.xp6(1),t.Q6J("ngClass",t.VKq(4,De,(null==(r=o.getEgiftCards(n))?null:r.name)===e.name)),t.xp6(1),t.Q6J("ngIf",e&&o.hasImage(e,"giftCardDesign")),t.xp6(1),t.Q6J("ngIf",e&&!o.hasImage(e,"giftCardDesign")),t.xp6(1),t.Q6J("ngIf",(null==(l=o.getEgiftCards(n))?null:l.name)===e.name)}}function dl(i,a){1&i&&t._UZ(0,"app-icon",128)}function ml(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",108),t.YNc(1,nl,3,3,"h2",109),t.YNc(2,rl,6,4,"div",110),t.TgZ(3,"div",111),t.YNc(4,sl,5,6,"ng-container",112),t.TgZ(5,"div",113),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index,r=t.oxw(3);return t.KtG(r.selectEgiftCard(null,o))}),t.TgZ(6,"h1"),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.YNc(9,dl,1,0,"app-icon",114),t.qZA()()()}if(2&i){const e=t.oxw().index,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.egiftCards.length>0),t.xp6(1),t.Q6J("ngIf",n.getEgiftCards(e)),t.xp6(2),t.Q6J("ngForOf",n.egiftCards),t.xp6(1),t.Q6J("ngClass",t.VKq(8,De,null==n.getEgiftCards(e))),t.xp6(2),t.Oqu(t.lcZ(8,6,"byod.dialogs.alacarte-dialog.egift-no-need")),t.xp6(2),t.Q6J("ngIf",null==n.getEgiftCards(e))}}function gl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.email-hint")," "))}function pl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"titlecase"),t.ALo(3,"translate"),t._UZ(4,"span",95),t.ALo(5,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,2,t.lcZ(3,4,"byod.dialogs.alacarte-dialog.email"))," "),t.xp6(3),t.Q6J("innerHTML",t.lcZ(5,6,"byod.dialogs.alacarte-dialog.require"),t.oJD))}function ul(i,a){if(1&i&&(t.TgZ(0,"div",133)(1,"h2",87),t._uU(2),t.ALo(3,"translate"),t.TgZ(4,"span",88),t._uU(5,"*"),t.qZA(),t.TgZ(6,"p",134),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.ynx(9),t.TgZ(10,"div",135)(11,"mat-form-field",90),t._UZ(12,"input",136),t.ALo(13,"translate"),t.YNc(14,gl,3,3,"mat-error",12),t.YNc(15,pl,6,8,"mat-error",12),t.qZA()(),t.BQk(),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw().index,o=t.oxw(3);t.xp6(2),t.hij(" ",t.lcZ(3,7,"byod.dialogs.alacarte-dialog.email-title")," "),t.xp6(5),t.hij(" ",t.lcZ(8,9,"byod.dialogs.alacarte-dialog.email-description"),""),t.xp6(3),t.Q6J("@itemsVert",void 0),t.xp6(2),t.Q6J("formControlName",e.name)("placeholder",t.lcZ(13,11,"byod.dialogs.alacarte-dialog.email-placeholder")),t.xp6(2),t.Q6J("ngIf",o.getField(n,"email").hasError("noEmojis")||o.getField(n,"email").hasError("email")&&!o.getField(n,"email").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.getField(n,"email").hasError("required"))}}function _l(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.phone-hint")," "))}function fl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"titlecase"),t.ALo(3,"translate"),t._UZ(4,"span",95),t.ALo(5,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,2,t.lcZ(3,4,"byod.dialogs.alacarte-dialog.phone"))," "),t.xp6(3),t.Q6J("innerHTML",t.lcZ(5,6,"byod.dialogs.alacarte-dialog.require"),t.oJD))}function hl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"h2",87),t._uU(2),t.ALo(3,"translate"),t.TgZ(4,"p",88),t._uU(5,"*"),t.qZA()(),t.ynx(6),t.TgZ(7,"div",135)(8,"mat-form-field",90)(9,"input",137),t.NdJ("input",function(){t.CHM(e);const o=t.oxw(2).index,r=t.oxw(3);return t.KtG(r.handlePhoneInput(o))})("blur",function(){t.CHM(e);const o=t.oxw(2).index,r=t.oxw(3);return t.KtG(r.handlePhoneInput(o))}),t.ALo(10,"translate"),t.qZA(),t.YNc(11,_l,3,3,"mat-error",12),t.YNc(12,fl,6,8,"mat-error",12),t.qZA()(),t.BQk(),t.qZA()}if(2&i){const e=t.oxw().$implicit,n=t.oxw().index,o=t.oxw(3);t.xp6(2),t.hij("",t.lcZ(3,6,"byod.dialogs.alacarte-dialog.phone-title")," "),t.xp6(7),t.Q6J("formControlName",e.name)("errorStateMatcher",o.phoneErrorMatcher)("placeholder",t.lcZ(10,8,"byod.dialogs.alacarte-dialog.phone-placeholder")),t.xp6(2),t.Q6J("ngIf",o.getField(n,"phone").hasError("phoneInvalid")&&!o.getField(n,"phone").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.getField(n,"phone").hasError("required"))}}function xl(i,a){if(1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"titlecase"),t.ALo(3,"translate"),t._UZ(4,"span",95),t.ALo(5,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,2,t.lcZ(3,4,"byod.dialogs.alacarte-dialog."+e.name))," "),t.xp6(3),t.Q6J("innerHTML",t.lcZ(5,6,"byod.dialogs.alacarte-dialog.require"),t.oJD)}}function vl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.white-space"),""))}function Cl(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.alacarte-dialog.white-space"),""))}const bl=function(i){return{"char-count-expanded":i}},Ml=function(i){return{count:i}};function Ol(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"h2",87),t._uU(2),t.ALo(3,"translate"),t.TgZ(4,"p",88),t._uU(5,"*"),t.qZA()(),t.TgZ(6,"mat-form-field",138),t.NdJ("keyup",function(){t.CHM(e);const o=t.oxw(2).index,r=t.oxw(3);return t.KtG(r.countInput(o))}),t._UZ(7,"textarea",139),t.ALo(8,"translate"),t.YNc(9,xl,6,8,"mat-error",12),t.YNc(10,vl,3,3,"mat-error",12),t.YNc(11,Cl,3,3,"mat-error",12),t.qZA(),t.TgZ(12,"p",140),t._uU(13),t.ALo(14,"translate"),t.qZA(),t.BQk()}if(2&i){const e=t.oxw().$implicit,n=t.oxw().index,o=t.oxw(3);t.xp6(2),t.hij("",t.lcZ(3,9,"byod.dialogs.alacarte-dialog.message")," "),t.xp6(5),t.Q6J("maxlength",o.charLimit)("formControlName",e.name)("placeholder",t.lcZ(8,11,"byod.dialogs.alacarte-dialog.message-placeholder")),t.xp6(2),t.Q6J("ngIf",o.getField(n,"message").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.getField(n,"message").hasError("empty-or-white-space-only")&&!o.getField(n,"message").hasError("required")),t.xp6(1),t.Q6J("ngIf",o.getField(n,"message").hasError("noEmojis")&&!o.getField(n,"message").hasError("required")),t.xp6(1),t.Q6J("ngClass",t.VKq(16,bl,o.getField(n,"message").hasError("required")&&o.getField(n,"message").touched)),t.xp6(1),t.hij(" ",t.xi3(14,13,"byod.dialogs.alacarte-dialog.character-remaining",t.VKq(18,Ml,o.getCharCount(n)))," ")}}function yl(i,a){if(1&i&&(t.TgZ(0,"div",129),t.ynx(1,130)(2),t.YNc(3,ul,16,13,"div",131),t.BQk(),t.ynx(4),t.YNc(5,hl,13,10,"div",132),t.BQk(),t.YNc(6,Ol,15,20,"ng-container",132),t.BQk(),t.qZA()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngSwitch",e.input),t.xp6(2),t.Q6J("ngSwitchCase","email"),t.xp6(2),t.Q6J("ngSwitchCase","phone"),t.xp6(1),t.Q6J("ngSwitchCase","textarea")}}function Pl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",141),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().index,r=t.oxw(3);return t.KtG(r.onClickQuantity("minus",r.isUnlockItem,o))}),t.TgZ(1,"button"),t._uU(2),t.ALo(3,"translate"),t.qZA()()}2&i&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"byod.dialogs.alacarte-dialog.remove-recipient")))}function Il(i,a){if(1&i){const e=t.EpF();t.ynx(0,97),t.TgZ(1,"div",98)(2,"mat-accordion")(3,"mat-expansion-panel",99),t.
1NdJ("opened",function(){const r=t.CHM(e).index,l=t.oxw(3);return t.KtG(l.onPanelOpen(r))})("closed",function(){const r=t.CHM(e).index,l=t.oxw(3);return t.KtG(l.onPanelClose(r))}),t.TgZ(4,"mat-expansion-panel-header",100)(5,"mat-panel-title",101),t._uU(6),t.ALo(7,"translate"),t.qZA()(),t.TgZ(8,"div",102),t.YNc(9,ml,10,10,"div",103),t.TgZ(10,"div",104)(11,"div",105),t.YNc(12,yl,7,4,"div",106),t.qZA()(),t.YNc(13,Pl,4,3,"div",107),t.qZA()()()(),t.BQk()}if(2&i){const e=a.index,n=t.oxw(3);t.Q6J("formGroupName",e),t.xp6(3),t.Q6J("expanded",e===n.expandedPanelIndex),t.xp6(3),t.AsE(" ",t.lcZ(7,7,"byod.dialogs.alacarte-dialog.recipient")," ",e+1," "),t.xp6(3),t.Q6J("ngIf",n.egiftCards.length>0),t.xp6(3),t.Q6J("ngForOf",n.egiftFields),t.xp6(1),t.Q6J("ngIf",n.getFields().controls.length>1)}}function wl(i,a){if(1&i&&(t.TgZ(0,"form",85)(1,"div",86)(2,"h2",87),t._uU(3),t.ALo(4,"translate"),t.TgZ(5,"p",88),t._uU(6,"*"),t.qZA()(),t.TgZ(7,"p",89),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.TgZ(10,"mat-form-field",90),t._UZ(11,"input",91),t.ALo(12,"translate"),t.YNc(13,Wa,6,8,"mat-error",12),t.YNc(14,Xa,3,3,"mat-error",12),t.YNc(15,tl,3,3,"mat-error",12),t.qZA()(),t.YNc(16,el,4,3,"div",92),t.TgZ(17,"div",93),t.YNc(18,Il,14,9,"ng-container",94),t.qZA()()),2&i){const e=t.oxw(2);t.Q6J("formGroup",e.egiftForm),t.xp6(3),t.hij("",t.lcZ(4,10,"byod.dialogs.alacarte-dialog.sender-title")," "),t.xp6(5),t.Oqu(t.lcZ(9,12,"byod.dialogs.alacarte-dialog.sender-
1description")),t.xp6(3),t.Q6J("placeholder",t.lcZ(12,14,"byod.dialogs.alacarte-dialog.sender-title"))("maxlength",e.senderCharLimit),t.xp6(2),t.Q6J("ngIf",e.egiftForm.get("from").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.egiftForm.get("from").hasError("whitespace")&&!e.egiftForm.get("from").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.egiftForm.get("from").hasError("noEmojis")&&!e.egiftForm.get("from").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.getFields().controls.length>1),t.xp6(2),t.Q6J("ngForOf",e.getFields().controls)}}function kl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",142)(1,"button",143),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.addRecipient())}),t._UZ(2,"app-icon",144),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&i&&(t.xp6(3),t.hij(" ",t.lcZ(4,1,"byod.dialogs.alacarte-dialog.add-another-recipient")," "))}function Tl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",71)(1,"div",72)(2,"div",73)(3,"h1"),t._uU(4),t.qZA(),t.TgZ(5,"p",74),t._uU(6),t.qZA()(),t.TgZ(7,"div",75)(8,"div",31),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.enlargeImage(o.mainItem))}),t.YNc(9,Va,3,3,"div",76),t.YNc(10,Ha,3,3,"div",76),t.qZA()()(),t.YNc(11,Ka,3,3,"h2",77),t.YNc(12,wl,19,16,"form",78),t.YNc(13,kl,5,3,"div",79),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(4),t.Oqu(e.mainItem.name),t.xp6(2),t.Oqu(e.mainItem.desc),t.xp6(3),t.Q6J("ngIf",null==e.mainItem?null:e.mainItem.getImage("default",400,!0)),t.xp6(1),t.Q6J("ngIf",!(null!=e.mainItem&&e.mainItem.getImage("default",400,!0))&&null!=e.logoUrl),t.xp6(1),t.Q6J("ngIf",e.egiftCards.length>0),t.xp6(1),t.Q6J("ngIf",e.egiftFields.length>0),t.xp6(1),t.Q6J("ngIf",!e.egiftForm.invalid)}}const Zl=function(i){return{withImg:i}};let qe=(()=>{class i extends at{constructor(e,n,o,r,l,c,s,d){super(e),this.menuService=n,this.dialogService=o,this.t=r,this.orderContext=l,this.inventoryManager=c,this.cd=s,this.formBuilder=d,this.isUnlockItem=!1,this.isHasModifier=!1,this.modified=!1,this.modifierShown=!1,this.showBack=history.state.auxDepth>1,this.selectedEgiftCard=null,this.charCount=[],this.senderCharLimit=14,this.isSameRecipient=!1,this.isEgiftFlow=!1,this.isShowNutrition=!1,this.panelOpenState=!1,this.expandedPanelIndex=0,this.phoneErrorMatcher=new ca.n("phoneInvalid"),this.phoneMap=(0,ra.Z)((0,aa.Z)(la.YQ),(m,p)=>"+"+p),this.showItemRemark=this.settingManager.get("showItemRemark",!1)}ngOnInit(){var e,n,o,r,l,c,s,d;this.logoUrl=this.getItemUrl(),this.initData(),this.mode=this.navParams.get("mode")||this.orderContext.mode,this.mainItemType=null===(e=this.mainItem)||void 0===e?void 0:e.type,this.isEgiftFlow=this.context.store.features.indexOf("coupon-customize-recipient")>1&&"web"===this.mode&&"coupon"===this.mainItemType;let m=(new Date).getDate();this.orderManager.store&&(m=this.baseCartService.convertNowDateToStoreTimeZone(this.orderManager.store.timezone)),this.isHasModifier=this.hasModifierItemGroup(null===(n=this.mainItem)||void 0===n?void 0:n.mgroups),this.isEgiftFlow&&this.initEgiftData(),this.prefilledValueMap={},console.log("main: ",this.mainItem),((null===(o=this.mainItem)||void 0===o?void 0:o.nutrients)&&(null===(l=null===(r=this.mainItem)||void 0===r?void 0:r.nutrients)||void 0===l?void 0:l.length)>0||(null===(c=this.mainItem)||void 0===c?void 0:c.allergy)&&(null===(d=null===(s=this.mainItem)||void 0===s?void 0:s.allergy)||void 0===d?void 0:d.length)>0)&&(this.isShowNutrition=!0)}getRemark(e){this.editOi?this.editOi.note=e:this.mainItem.note=e}ngAfterContentChecked(){this.cd.detectChanges()}initData(){var e,n;super.initData(),this.category=null===(e=this.input)||void 0===e?void 0:e.category,this.mainItemGroup=null===(n=this.input)||void 0===n?void 0:n.mainItemGroup}initEgiftData(){var e,n,o,r,l;this.input=this.navParams.input;const c=null===(e=this.input)||void 0===e?void 0:e.custom;this.egiftCards=this.context.store.couponTemplates;const s=this.settingManager.get("coupon",[]);this.defaultIsSameRecipient=null!==(n=s.defaultSameReceipient)&&void 0!==n&&n,this.deliveryEmail=-1!==s.deliveryMethods.indexOf("email"),this.deliverySms=-1!==s.deliveryMethods.indexOf("sms"),this.selectedDeliveryType=null!==(o=s.defaultDeliveryMethod)&&void 0!==o?o:"email",this.selectedDeliveryType=1==s.deliveryMethods.length?s.deliveryMethods[0]:this.selectedDeliveryType,this.selectedDeliveryType=null!=(null==c?void 0:c.messageType)?c.messageType:this.selectedDeliveryType,this.selectedDeliveryType="sms"===this.selectedDeliveryType?"phone":this.selectedDeliveryType,this.charLimit=null!==(l=null===(r=this.mainItem)||void 0===r?void 0:r.messageMaxLength)&&void 0!==l?l:160,this.charCount.push(this.charLimit),this.egiftFields=(0,V.Z)(this.context.form.egiftFields)||[],this.egiftForm=this.generateForm()}generateForm(){var e,n;let o=[g.kI.required];o.push(this.noWhiteSpaceValidator,K.emojiValidator);const r=(null===(n=null===(e=this.input)||void 0===e?void 0:e.custom)||void 0===n?void 0:n.fromName)||"",l={from:new g.NI(r,o),egiftGroups:this.formBuilder.array([this.createEgiftGroup()])};return this.formBuilder.group(l)}createEgiftGroup(){var e;const n={},r=null===(e=this.input)||void 0===e?void 0:e.custom;return this.egiftFields.forEach(l=>{var c,d,m;const p=[];let h="";if(null!=l&&l.required&&p.push(g.kI.required),"message"===(null==l?void 0:l.name)&&(p.push(K.emojiValidator,K.isEmptyOrWhiteSpaceValidator),h=(null==r?void 0:r.message)||""),"phone"===(null==l?void 0:l.input)){const A=(null===(c=null==r?void 0:r.recipient)||void 0===c?void 0:c.phone)||null;null==r?void 0:r.recipient,n[null==l?void 0:l.name]=new g.NI(A,p)}else if("email"===(null==l?void 0:l.input)){const A=(null===(d=null==r?void 0:r.recipient)||void 0===d?void 0:d.email)||null;p.push(g.kI.email,K.emojiValidator,K.emailValidator),n[null==l?void 0:l.name]=new g.NI(A,p)}else"from"!=(null==l?void 0:l.name)&&(p.push(K.emojiValidator),n[null==l?void 0:l.name]=new g.NI(h,p));const x=null!==(m=null==r?void 0:r.selectedEgiftCard)&&void 0!==m?m:null;n.selectedEgiftCards=new g.NI(x,null),n.charCount=new g.NI(null!=r&&r.message?this.charLimit-r.message[0].length:null,null)}),this.formBuilder.group(n)}noWhiteSpaceValidator(e){return 0!==(e.value||"").trim().length?null:{whitespace:!0}}onChangeIsSameAllEmail(e){this.isSameRecipient=e.checked}removeAll(){this.resetAndRestoreFields(),this.changeTotalQty("reset",this.isUnlockItem)}onClickDeliveryType(e){this.dialogService.showConfirm(this.t.instant("byod.dialogs.alacarte-dialog.reset-warning-title"),this.t.instant("byod.dialogs.alacarte-dialog.reset-warning-message"),{callback:n=>{"OK"===n&&(this.selectedDeliveryType=e,this.isSameRecipient=this.defaultIsSameRecipient,this.addField(),this.resetFields(),this.egiftForm=this.generateForm())}})}addToCartClicked(){var e,n,o;
1if(this.isEgiftFlow&&this.egiftForm.invalid)return this.egiftForm.markAllAsTouched(),void this.scrollToFirstInvalidControl();if(this.currentQuantity=this.orderManager.getQuantity(this.mainItem),!this.currentOrderManager.checkInventory(this.mainItem,this.totalQty+this.currentQuantity)){const l=this.t.instant("byod.components.cart.dialog-insufficient-stock",{stock:this.inventoryManager.getInv(this.mainItem)});return void this.dialogService.showAlert("",l)}let r=null===(e=this.currentOrderManager)||void 0===e?void 0:e.findOrderItem(this.mainItem,!1);if(this.modified&&(r=null),this.isHasModifier&&(this.orderItem||(this.orderItem=null!=r?r:this.orderItemBuilder.build(),null===(n=this.orderItemBuilder)||void 0===n||n.autoAddAbsentItem()),!this.isCompletedModifierByAllModifierItem()||!this.modifierShown&&this.settingManager.get("menu.alwaysPromptModifier",!1)))this.modifierClicked();else{if(this.orderItem){this.orderItem.note=this.mainItem.note;let l=this.totalQty;if(l){r?this.currentOrderManager.addExistingOrderItem(this.orderItem):this.currentOrderManager.addOrderItem(this.orderItem,this.isRecommend);for(let c=1;c<l;c++)this.currentOrderManager.addExistingOrderItem(this.orderItem)}}else{let l=this.totalQty,c="coupon"===this.mainItem.type;if(r&&!c){r.note=this.mainItem.note;for(let s=0;s<l;s++)this.currentOrderManager.addExistingOrderItem(r)}else if(l)for(let s=1;s<=l;s++)this.isEgiftFlow?this.submitEgiftData(s):this.currentOrderManager.addSingleItem(this.category,this.mainItemGroup,this.mainItem,!1,this.isRecommend)}this.dialogService.submitAuxDialog({}),null!==(o=this.itemSelectionOpt)&&void 0!==o&&o.callbackAfterAddToCart&&this.itemSelectionOpt.callbackAfterAddToCart(this.mainItem,this.orderItem,this.itemSelectionOpt)}}getDefaultImage(e,n,o){return this.menuService.getDefaultImage(e,n,o)}getTagBackGroundColor(e){var n,o;let r=null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.menu)||void 0===o?void 0:o.badges;if(r&&r.length>0){for(let l of r)if(l.tag==e)return l.bgColor||"#000";return"#000"}return"#000"}modifierClicked(){var e;this.modifierShown=!0;let n=null!==(e=this.orderItem)&&void 0!==e?e:this.orderItemBuilder.build();this.modifier(n,this.isUnlockItem)}modifier(e,n=!1){return(0,Q.mG)(this,void 0,void 0,function*(){this.dialogService.openAux("order/dialog/all-modifiers",{store:this.currentOrderManager.store,orderItem:e,edit:!1,callback:l=>{let c=null==l?void 0:l.orderItem;c&&this.currentOrderManager.addOrderItem(c,this.isRecommend)}},{autoClose:!1},l=>{this.orderItem=l.orderItem,this.modified=!0,this.routingService.navigateCloseModal()})})}showNutrition(){this.dialogService.openAux("order/dialog/nutrition-facts",this.mainItem)}enlargeImage(e){this.platformService.isDesktop()&&super.enlargeImage(e)}selectEgiftCard(e,n){this.selectedEgiftCard=e,this.getFields().at(n).patchValue({selectedEgiftCards:e})}getEgiftCards(e){return this.getField(e,"selectedEgiftCards").value}countInput(e){var n;let o=null===(n=this.getField(e,"message"))||void 0===n?void 0:n.value;this.getFields().at(e).patchValue({charCount:this.charLimit-(null==o?void 0:o.length)})}getCharCount(e){return null==this.getField(e,"charCount").value?this.charLimit:this.getField(e,"charCount").value}
1onClickQuantity(e,n,o=null,r=!1){this.isEgiftFlow&&("add"!==e||this.isSameRecipient?this.removeField(o):this.addField()),this.changeTotalQty(e,n)}getFields(){return this.egiftForm.get("egiftGroups")}getField(e,n){var o,r,l,c;return null===(c=null===(l=null===(r=null===(o=this.getFields())||void 0===o?void 0:o.controls)||void 0===r?void 0:r[e])||void 0===l?void 0:l.controls)||void 0===c?void 0:c[n]}newField(e=null,n=null,o=this.selectedDeliveryType,r=!0){var l,c;return this.formBuilder.group(Object.assign(Object.assign({},"email"===o&&{email:new g.NI(null!==e?e:"",r?[g.kI.required,K.emailValidator]:[K.emailValidator])}),"phone"===o&&{countryCode:new g.NI(null!=n?n:null===(c=null===(l=this.context)||void 0===l?void 0:l.form)||void 0===c?void 0:c.countryCode,r?[g.kI.required]:[]),phone:new g.NI(null!==e?e:"",r?[g.kI.required]:[])}))}addRecipient(){this.addField(),this.changeTotalQty("add",this.isUnlockItem),this.expandedPanelIndex=this.getFields().controls.length-1}addField(){this.charCount.push(this.charLimit);const e=this.createEgiftGroup();e.reset(),this.egiftForm.get("egiftGroups").push(e)}onPanelOpen(e){this.expandedPanelIndex=e}onPanelClose(e){this.expandedPanelIndex===e&&(this.expandedPanelIndex=null)}removeField(e){this.getFields().removeAt(e)}resetFields(){for(let e=1;e<this.totalQty;e++)this.addField()}resetAndRestoreFields(){this.getFields().clear(),this.addField()}handlePhoneInput(e){var n;const o=this.getField(e,"phone").value,r=null===(n=this.context.form)||void 0===n?void 0:n.countryCode;!1===(0,K.isPhoneValid)(o,this.phoneMap[r])&&this.getField(e,"phone").setErrors({phoneInvalid:!0})}submitEgiftData(e=0){var n,o,r;const l=this.isSameRecipient?0:e-1;if(this.mainItem.custom=Object.assign(Object.assign(Object.assign({messageType:"email,sms",fromName:this.egiftForm.get("from").value,isEgiftFlow:!0},this.getField(l,"message").value&&{message:[this.getField(l,"message").value]}),this.getField(l,"selectedEgiftCards").value&&{selectedEgiftCard:this.getField(l,"selectedEgiftCards").value,giftCardDesignUrl:null===(o=null===(n=this.getField(l,"selectedEgiftCards").value)||void 0===n?void 0:n.images.giftCardDesign)||void 0===o?void 0:o.url}),{recipient:{email:this.getField(l,"email").value,phone:this.getField(l,"phone").value,countryCode:null===(r=this.context.form)||void 0===r?void 0:r.countryCode}}),this.editOi)if(1==e){const c=this.orderManager.createOrderItem(this.category,this.mainItemGroup,this.mainItem);this.orderManager.replaceOrderItem(this.editOi,c)}else this.currentOrderManager.addSingleItem(this.category,this.mainItemGroup,this.mainItem,!1);else this.currentOrderManager.addSingleItem(this.category,this.mainItemGroup,this.mainItem,!1)}scrollToFirstInvalidControl(){setTimeout(()=>{const e=this.findFirstInvalidControl();e&&(e.scrollIntoView({behavior:"smooth"}),e.querySelector("input")?e.querySelector("input").focus():e.querySelector("textarea")&&e.querySelector("textarea").focus())},10)}findFirstInvalidControl(){const e=document.querySelectorAll(".mat-form-field.ng-invalid");for(let n=0;n<e.length;n++){const o=e[n];if(o.querySelector("mat-error"))return o}return null}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(Nt.h),t.Y36(C.xA),t.Y36(M.sK),t.Y36(C.yQ),t.Y36(C.h_),t.Y36(t.sBO),t.Y36(g.qu))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-alacarte-dialog"]],features:[t.qOj],decls:11,vars:12,consts:[[3,"title","back","closeBackBehaviour","close"],[1,"div-content","flex","flex-col","flex-grow"],["main","",1,"upper-content","flex-grow"],[1,"item-info",3,"ngClass"],[3,"ngTemplateOutlet",4,"ngIf","ngIfElse"],["class","combo-footer",3,"ngClass",4,"ngIf"],["normalFlow",""],["egift",""],[3,"ngTemplateOutlet"],[1,"combo-footer",3,"ngClass"],[1,"select-panel","flex"],[1,"div-spacer"],[4,"ngIf"],["class","qty-cart-btn flex",4,"ngIf"],["data-testid","item-customize-button",1,"customize-btn",3,"ngClass","click"],["class","customize-dot",4,"ngIf"],[1,"customize-dot"],[1,"qty-cart-btn","flex"],[1,"footer-left"],[1,"items-center","panel-add-remove",3,"ngClass"],["mat-button","","data-testid","remove-qty-button",1,"qty-button","btn-remove","flex","justify-center",3,"disabled","click"],["name","remove","size","16","source","mat",1,"flex"],["data-testid","qty-text",1,"qty-text"],["mat-button","","data-testid","add-qty-button",1,"qty-button","btn-add","flex","justify-center",3,"disabled","click"],["name","add","size","16","source","mat",1,"flex"],["class","footer-price",4,"ngIf"],["mat-button","","appThrottleClick","","class","footer-right inline-ft-btn key-button saveOrder-button item-grid-checkout-btn","data-testid","add-item-to-cart-button",3,"throttleClick",4,"ngIf"],["mat-button","","appThrottleClick","","form","egiftForm","class","footer-right inline-ft-btn key-button saveOrder-button item-grid-checkout-btn font-bold","type","submit","data-testid","add-item-to-cart-button",3,"throttleClick",4,"ngIf"],[1,"footer-price"],["mat-button","","appThrottleClick","","data-testid","add-item-to-cart-button",1,"footer-right","inline-ft-btn","key-button","saveOrder-button","item-grid-checkout-btn",3,"throttleClick"],["mat-button","","appThrottleClick","","form","egiftForm","type","submit","data-testid","add-item-to-cart-button",1,"footer-right","inline-ft-btn","key-button","saveOrder-button","item-grid-checkout-btn","font-bold",3,"throttleClick"],[3,"click"],["class","div-item-img flex justify-center",4,"ngIf","ngIfElse"],["imageDisplay",""],[1,"div-padding"],[1,"flex","div-item-info"],[1,"title-left"],[1,"title-row","price-row"],[1,"title-text"],["class","price-text ","data-testid","item-detail-price",4,"ngIf"],["class","tag-grp flex",4,"ngIf"],["type","full-horizontal",3,"item"],["class","title-right flex nutrients",4,"ngIf"],["class","remark-components",3,"note","remark",4,"ngIf"],[1,"flex","div-description"],["class","description-text",4,"ngIf"],[1,"div-item-img","flex","justify-center"],[1,"div-app-img"],[1,"head-img",3,"content","autoPlayOnVisible","autoPlayOnHover"],[3,"content","icon","animate"],["class","div-item-img flex justify-center",4,"ngIf"],[1,"head-img",3,"content","icon","animate","pw"],[1,"div-app-img","div-theme-logo"],[1,"img",3,"src","icon","animate"],["class","price-text","data-testid","item-detail-price",4,"ngIf"],[3,"item",4,"ngIf"],["data-testid","item-detail-price",1,"price-text"],[3,"item"],[1,"tag-grp","flex"],["class","w-full flex flex-row flex-wrap",4,"ngFor","ngForOf"],[1,"w-full","flex","flex-row","flex-wrap"],[4,"ngIf","ngIfElse"],["itemTagText",""],[3,"src"],["class","food-tag text-white mr-1 mt-1",3,"ngStyle",4,"ngIf"],[1,"food-tag","text-white","mr-1","mt-1",3,"ngStyle"],[1,"title-right","flex","nutrients"],["name","info","size","17",1,"mr-1"],[1,"show-nutrition","whitespace-nowrap","cursor-pointer",3,"click"],[1,"remark-components",3,"note","remark"],[1,"description-text"],[1,"div-egift-outer"],[1,"div-top-detail"],[1,"item-info-container"],[1,"mb-2","
1item-desc"],[1,"item-img-container"],["class","div-egift-item-img flex justify-center",4,"ngIf"],["class","input-title",4,"ngIf"],["id","egiftForm","class","egift-form pt-4",3,"formGroup",4,"ngIf"],["class","add-recipient-section",4,"ngIf"],[1,"div-egift-item-img","flex","justify-center"],[1,"div-title-img"],[1,"head-img",3,"content","icon","animate"],[1,"div-title-img","div-theme-logo"],[1,"input-title"],["id","egiftForm",1,"egift-form","pt-4",3,"formGroup"],[1,"input-sender"],[1,"input-field-title"],[1,"input-field-required"],[1,"input-field-description"],["appearance","fill",1,"input-field"],["matInput","","formControlName","from",3,"placeholder","maxlength"],["class","div-remove-all-recipient",3,"click",4,"ngIf"],["formArrayName","egiftGroups"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"innerHTML"],[1,"div-remove-all-recipient",3,"click"],[3,"formGroupName"],[1,"accordion-section"],[1,"expansion-style","mat-elevation-z0",3,"expanded","opened","closed"],[1,"expansion-header"],[1,"expansion-title"],[1,"div-mid-content"],["class","div-card-design",4,"ngIf"],[1,"div-select-input"],[1,"details-input-body"],["class","input-wrapper",4,"ngFor","ngForOf"],["class","div-remove-recipient",3,"click",4,"ngIf"],[1,"div-card-design"],["class","design-question",4,"ngIf"],["class","egift-selected-card",4,"ngIf"],[1,"egift-card-choices"],[4,"ngFor","ngForOf"],[1,"div-thumbnail-img","no-need","egift-cards-img-container",3,"ngClass","click"],["source","mat","name","check_circle","class","selected-gift-card-icon","size","20",4,"ngIf"],[1,"design-question"],[1,"egift-selected-card"],[1,"div-preview-img"],["imgName","giftCardDesign","constrain","contain","class","img-preview",3,"content","ratio","pw",4,"ngIf"],["constrain","contain","class","img-preview",3,"src","ratio","pw",4,"ngIf"],[1,"selected-card-name"],["imgName","giftCardDesign","constrain","contain",1,"img-preview",3,"content","ratio","pw"],["constrain","contain",1,"img-preview",3,"src","ratio","pw"],[1,"div-thumbnail-img","egift-cards-img-container",3,"ngClass","click"],["imgName","giftCardDesign","constrain","contain","class","img-thumbnail",3,"content","ratio","pw",4,"ngIf"],["constrain","contain","class","img-thumbnail",3,"src","ratio","pw",4,"ngIf"],["imgName","giftCardDesign","constrain","contain",1,"img-thumbnail",3,"content","ratio","pw"],["constrain","contain",1,"img-thumbnail",3,"src","ratio","pw"],["source","mat","name","check_circle","size","20",1,"selected-gift-card-icon"],[1,"input-wrapper"],[3,"ngSwitch"],["class","email-input-box",4,"ngSwitchCase"],[4,"ngSwitchCase"],[1,"email-input-box"],[1,"email-input-field-description"],[1,"flex"],["matInput","","type","email",3,"formControlName","placeholder"],["matInput","","type","tel",3,"formControlName","errorStateMatcher","placeholder","input","blur"],["appearance","fill",1,"input-field",3,"keyup"],["matInput","",3,"maxlength","formControlName","placeholder"],[1,"char-count",3,"ngClass"],[1,"div-remove-recipient",3,"click"],[1,"add-recipient-section"],["mat-flat-button","",1,"add-recipient-button",3,"click"],["name","add_circle","size","25","source","mat"]],template:function(e,n){if(1&e&&(t._UZ(0,"app-sub-bar",0),t.ALo(1,"translate"),t.TgZ(2,"div",1)(3,"div",2)(4,"div",3),t.YNc(5,ha,1,1,"ng-container",4),t.qZA()(),t.YNc(6,Ta,5,5,"div",5),t.qZA(),t.YNc(7,Ra,22,18,"ng-template",null,6,t.W1O),t.YNc(9,Tl,14,7,"ng-template",null,7,t.W1O)),2&e){const o=t.MAs(8);t.Q6J("title",n.isEgiftFlow?t.lcZ(1,8,"byod.dialogs.alacarte-dialog.select-item"):"")("back",!1)("closeBackBehaviour",n.isUnlockItem)("close",n.showClose),t.xp6(4),t.Q6J("ngClass",t.VKq(10,Zl,null==n.mainItem?null:n.mainItem.getImage("default",400,!0))),t.xp6(1),t.Q6J("ngIf",n.isEgiftFlow)("ngIfElse",o),t.xp6(1),t.Q6J("ngIf",!n.orderContext.viewMode||n.orderContext.viewMode&&n.isHasModifier)}},dependencies:[_.mk,_.sg,_.O5,_.tP,_.PC,_.RF,_.n9,g._Y,g.Fj,g.JJ,g.JL,g.nD,g.sg,g.u,g.x0,g.CE,Bt.P,q.g,S.o,Lt.r,k.v,J.j,ct.pp,ct.ib,ct.yz,ct.yK,I.lW,Z.TO,Z.KE,j.Nt,gt.i,Yt,_.rS,M.X$,Se.E,D.G,F.A,rt.y,fa.R],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column;background:#fff;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}@media screen and (max-height: 600px) and (min-width: 1000px){[_nghost-%COMP%]{transform:scale(.75)}}app-sub-bar[_ngcontent-%COMP%] {box-shadow:0 4px 26px #0000000d}span[_ngcontent-%COMP%], h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ng
1content-%COMP%], .div-item-img[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}div.div-content[_ngcontent-%COMP%]{position:relative;height:calc(100% - 64px)!important}div.combo-footer[_ngcontent-%COMP%]{background:#fff;padding:1rem 8rem;flex:0 0 auto;box-shadow:0 4px 26px #0000000d;z-index:1}div.combo-footer[_ngcontent-%COMP%]   .div-spacer[_ngcontent-%COMP%]{flex-grow:1}div.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);padding-top:.5rem;padding-bottom:.5rem;font-size:1rem;line-height:26px}div.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper{display:flex;width:100%}div.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.left-spacer{flex:1 0 25%}div.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.text-addtocart{justify-content:center;flex:1 0 50%;font-size:1rem}div.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.addtocart-price{display:flex;justify-content:flex-end;flex:1 0 25%;font-size:1rem}.footer-price[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:24px;font-weight:600;line-height:32px;color:var(--P);margin-left:2rem;margin-right:2rem}div.combo-footer-egift[_ngcontent-%COMP%]{padding:.8rem 4rem}div.combo-footer-egift[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]{flex:0}.item-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;min-height:0vh;max-height:80vh}.item-info[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-weight:400;margin:0!important;line-height:1em}.item-desc[_ngcontent-%COMP%]{font-size:.7rem;line-height:1.1em;-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:5;overflow:hidden;text-overflow:ellipsis;color:#8d8d8d;flex-shrink:0}.div-item-img[_ngcontent-%COMP%]{margin-top:2rem}.item-info-container[_ngcontent-%COMP%]{width:70%;padding-right:.5rem}.item-img-container[_ngcontent-%COMP%]{width:30%}.div-img[_ngcontent-%COMP%]{width:50%;overflow:hidden;display:block;margin-left:auto;margin-right:auto}.div-title-img[_ngcontent-%COMP%]{width:70%;overflow:hidden;box-shadow:.15rem .15rem .5rem #00000026;display:block;margin-left:auto;margin-right:auto}.div-app-img[_ngcontent-%COMP%]{width:100%;border-radius:10px;overflow:hidden;min-width:300px;max-width:300px}.div-app-img.div-theme-logo[_ngcontent-%COMP%]{padding:2.75rem;background:#f8f8f8}.div-padding[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:300px;max-width:300px;margin-top:1rem;padding:3rem 1.5rem 1rem}.title-left[_ngcontent-%COMP%]{width:100%}.title-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.title-text[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:21px;font-family:var(--CF1)}.description-text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:18px;color:gray;margin-top:.5rem}.text-sm[_ngcontent-%COMP%]{font-family:var(--CF0)}.span-underline[_ngcontent-%COMP%]{background:var(--P);height:2px;width:4.1rem;display:block;margin-top:.3rem}.title-right[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:#333;transform:translateY(-1px)}.nutrients[_ngcontent-%COMP%]{border:1px solid #1bbb8f;padding:.2rem .5rem .1rem;border-radius:5px;color:#1bbb8f}.nutrients[_ngcontent-%COMP%]   .show-nutrition[_ngcontent-%COMP%]{font-size:.875rem;line-height:1rem}.tag-grp[_ngcontent-%COMP%]{margin-top:.4rem}.tag-grp[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2rem}.tag-grp[_ngcontent-%COMP%]   .food-tag[_ngcontent-%COMP%]{padding:.2rem .6rem;font-size:.8rem;margin-right:.1rem;border-radius:.175rem}.desc-text[_ngcontent-%COMP%]{margin-top:.5rem;font-size:.85rem;line-height:1.2em}.div-item-info[_ngcontent-%COMP%]{width:100%;justify-content:flex-start}.div-price[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:flex-end}.price-text[_ngcontent-%COMP%]{color:var(--P);font-size:16px;font-weight:600;font-family:var(--CF2);white-space:nowrap}.icon-remove[_ngcontent-%COMP%], .icon-add[_ngcontent-%COMP%]{font-size:1.8rem;color:var(--P);display:flex}.icon-remove[_ngcontent-%COMP%]{color:#c4c4c4}.qty-cart-btn[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.footer-left[_ngcontent-%COMP%]{display:flex;align-items:center;flex:2}.footer-right[_ngcontent-%COMP%]{display:flex;flex:0;background:var(--P);color:var(--PC);font-family:var(--CF0);align-items:center;flex-grow:1;justify-content:center;border-radius:.2rem;padding-top:.5rem;padding-bottom:.5rem;font-size:14px;font-weight:500;line-height:26px;text-transform:uppercase;cursor:pointer}.panel-add-remove[_ngcontent-%COMP%]{display:flex;margin-left:-1rem}.delete-add-remove-btn[_ngcontent-%COMP%]{display:none;margin-left:-1rem}.btn-add[_ngcontent-%COMP%]{min-width:24px;height:24px;min-width:unset;border-radius:20px;border:solid 1px var(--P);color:#fff;background-color:var(--P);padding:.2rem .3rem 0rem;margin-left:10px;margin-right:10px}.btn-remove[_ngcontent-%COMP%]{min-width:24px;height:24px;min-width:unset;border-radius:20px;border:solid 1px var(--P);color:var(--P);background-color:#fff;padding:.2rem .3rem 0rem;margin-left:10px;margin-right:10px}.upper-content[_ngcontent-%COMP%]{position:relative;flex:1 20 auto;background-color:#f9f9f9;overflow:auto;border-bottom:1px solid #ebebeb}.lower-content[_ngcontent-%COMP%]{padding:.8rem 1rem;padding-left:0;box-shadow:0 -3px 15px #0000000f;position:absolute;bottom:0;width:100%;background:#fff}.char-count[_ngcontent-%COMP%]{margin-top:-2rem;font-size:.8rem;color:#909090;text-align:right}.char-count-expanded[_ngcontent-%COMP%]{margin-top:-.5rem}.initial-field[_ngcontent-%COMP%]{margin-bottom:-1.5rem}.input-checkbox[_ngcontent-%COMP%]{margin-bottom:1.5rem}.hide-field[_ngcontent-%COMP%]{display:none!important}.selected-delivery-type[_ngcontent-%COMP%], .selected-gift-card[_ngcontent-%COMP%]{border:1px solid var(--P);border-radius:4px}.selected-gift-card.no-need[_ngcontent-%COMP%]{border:none}.input-field[_ngcontent-%COMP%] {width:100%}.input-field[_ngcontent-%COMP%]  input{caret-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-wrapper{margin-bottom:1rem;font-size:1rem;line-height:1.2em}.input-field[_ngcontent-%COMP%]  .mat-form-field-flex{background:rgba(0,0,0,.04);border-radius:5px}.input-field[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-label{color:#888}.input-field[_ngcontent-%COMP%]  .mat-form-field-underline{background-color:#333;display:none}.input-field[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field[_ngcontent-%COMP%]  .mat-error{color:var(--W)}.input-field[_ngcontent-%COMP%]  .mat-select-value-text, .input-field[_ngcontent-%COMP%]  .mat-select-arrow{color:#333}.input-field[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.55rem)}.input-field[_ngcontent-%COMP%]  .mat-form-field-infix{width:auto;border-top:0}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-label{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-ripple{background-color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-form-field-required-marker{color:#333}.input-field.mat-form-field.mat-focused[_ngcontent-%COMP%]  .mat-input-element{color:#333}.input-checkbox[_ngcontent-%COMP%]  .mat-checkbox-label{white-space:normal;line-height:1.3em;font-size:.8rem}.input-checkbox[_ngcontent-%COMP%]  .mat-checkbox-frame{border-color:#888}.input-checkbox[_ngcontent-%COMP%]  .mat-checkbox-inner-container{margin-top:.1rem}.input-checkbox.mat-checkbox-checked[_ngcontent-%COMP%]     .mat-checkbox-background{background-color:var(--P)}  .mat-checkbox.mat-accent .mat-checkbox-checkmark .mat-checkbox-checkmark-path, .mat-checkbox.mat-accent[_ng
1content-%COMP%]   .mat-checkbox-checkmark[_ngcontent-%COMP%]   .mat-checkbox-checkmark-path[_ngcontent-%COMP%]{stroke:var(--PC)!important}.country-code[_ngcontent-%COMP%]{display:flex;align-items:flex-start;flex-wrap:wrap;width:100%}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{width:5rem}.country-code[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){flex:1 1 8rem;width:8rem;margin:0 0 0 .5rem}.country-code[_ngcontent-%COMP%]  .mat-select-value{transform:translateY(-.5rem)}.selected-gift-card-icon[_ngcontent-%COMP%]{color:var(--P800);position:absolute;top:-.5rem;right:-.6rem;background:white;border-radius:100rem}.trash-button[_ngcontent-%COMP%]{height:60.69px;color:#6e6e6e}div.div-egift-outer[_ngcontent-%COMP%]{width:100%}div.div-egift-outer[_ngcontent-%COMP%]   .div-top-detail[_ngcontent-%COMP%]{display:flex;justify-content:space-between;background:#fff;border:1px solid #E73F2B;border-radius:8px;padding:1rem 1.5rem;margin:1rem;box-sizing:content-box;flex:0 0 auto}div.div-egift-outer[_ngcontent-%COMP%]   .div-top-detail[_ngcontent-%COMP%]   .item-info-container[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-top:1.5rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-mid-content[_ngcontent-%COMP%]{padding:1.5rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .design-question[_ngcontent-%COMP%]{font-weight:700;font-size:12px}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .egift-selected-card[_ngcontent-%COMP%]{margin-top:2rem;margin-bottom:2.5rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .div-preview-img[_ngcontent-%COMP%]{justify-content:center;display:flex}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .div-preview-img[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{background:white;width:100%;max-width:23rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .selected-card-name[_ngcontent-%COMP%]{margin-top:.75rem;text-align:center;font-weight:400;font-size:14px}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .egift-card-choices[_ngcontent-%COMP%]{display:flex;column-gap:.5rem;flex-direction:row;margin-top:1rem;margin-bottom:1rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .div-thumbnail-img[_ngcontent-%COMP%]{flex-basis:20%;position:relative}div.div-egift-outer[_ngcontent-%COMP%]   .div-card-design[_ngcontent-%COMP%]   .div-thumbnail-img[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{border-radius:4px;overflow:hidden}div.div-egift-outer[_ngcontent-%COMP%]   .div-remove-recipient[_ngcontent-%COMP%]{text-align:right}div.div-egift-outer[_ngcontent-%COMP%]   .div-remove-recipient[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#ef3f2b;text-transform:uppercase}div.div-egift-outer[_ngcontent-%COMP%]   .div-remove-recipient[_ngcontent-%COMP%]:hover{cursor:default}div.div-egift-outer[_ngcontent-%COMP%]   .div-remove-all-recipient[_ngcontent-%COMP%]{text-align:right;margin-left:1rem;margin-right:1rem}div.div-egift-outer[_ngcontent-%COMP%]   .div-remove-all-recipient[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#ef3f2b;text-transform:uppercase}div.div-egift-outer[_ngcontent-%COMP%]   .no-need[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{height:100%;display:flex;justify-content:center;align-items:center;border:1px solid #b3b3b3;border-radius:4px;color:#b3b3b3;font-size:.875rem}div.div-egift-outer[_ngcontent-%COMP%]   .no-need.selected-gift-card[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{border:1px solid var(--P);color:#333}div.div-egift-outer[_ngcontent-%COMP%]   .delivery-types[_ngcontent-%COMP%]{display:flex;flex-direction:column;column-gap:1rem;margin-top:2.5rem}div.div-egift-outer[_ngcontent-%COMP%]   .delivery-types[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-weight:700;font-size:.9rem}div.div-egift-outer[_ngcontent-%COMP%]   .delivery-types[_ngcontent-%COMP%]   div.buttons-row[_ngcontent-%COMP%]{display:flex;column-gap:1rem;margin-top:1rem}div.div-egift-outer[_ngcontent-%COMP%]   .delivery-types[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border:1px solid #b3b3b3;color:#b3b3b3}div.div-egift-outer[_ngcontent-%COMP%]   .delivery-types[_ngcontent-%COMP%]   .selected-delivery-type[_ngcontent-%COMP%]{border:1px solid var(--P);color:#333}div.div-egift-outer[_ngcontent-%COMP%]   .selected-icon[_ngcontent-%COMP%]{color:var(--P800);position:absolute;top:-.6rem;right:-.7rem;background:white;border-radius:100rem}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]{margin-top:2.5rem}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .email-input-box[_ngcontent-%COMP%]   .input-field-title[_ngcontent-%COMP%]{display:inline;position:relative}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .email-input-box[_ngcontent-%COMP%]   .email-input-field-description[_ngcontent-%COMP%]{display:inline;color:gray;font-style:italic;font-size:.6rem}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-weight:700;font-size:.9rem}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .input-field-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;display:flex}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .input-field-required[_ngcontent-%COMP%]{color:red}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .input-field-description[_ngcontent-%COMP%]{font-size:8px;font-weight:400;font-style:italic;color:#aaa8a8}div.div-egift-outer[_ngcontent-%COMP%]   .details-input-body[_ngcontent-%COMP%]   .input-wrapper[_ngcontent-%COMP%]   textarea[_ngcontent-%COMP%]{height:72px;resize:none}div.div-egift-outer[_ngcontent-%COMP%]   form.egift-form[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]:first-child{margin-top:1rem}div.div-egift-outer[_ngcontent-%COMP%]   form.egift-form[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   .mat-form-field[_ngcontent-%COMP%]{margin-top:0rem}div.div-egift-outer[_ngcontent-%COMP%]   form.egift-form[_ngcontent-%COMP%]   .input-sender[_ngcontent-%COMP%]   .input-field[_ngcontent-%COMP%]:not(.mat-form-field-invalid)     .mat-form-field-wrapper{margin-bottom:4px;padding-bottom:0}.remark-components[_ngcontent-%COMP%]     .remark-content{background:#fafafa!important}.input-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500;color:#333;margin-left:1rem;margin-right:1rem}.input-sender[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.input-sender[_ngcontent-%COMP%]   .input-field-title[_ngcontent-%COMP%]{font-size:12px;font-weight:600;margin-top:.5rem;display:flex}.input-sender[_ngcontent-%COMP%]   .input-field-required[_ngcontent-%COMP%]{color:red}.input-sender[_ngcontent-%COMP%]   .input-field-description[_ngcontent-%COMP%]{font-size:8px;font-weight:400;font-style:italic;color:#aaa8a8;margin-top:.5rem;margin-bottom:.5rem}.accordion-section[_ngcontent-%COMP%]{margin:1rem;box-shadow:none}.accordion-section[_ngcontent-%COMP%]   .expansion-style[_ngcontent-%COMP%]{border:solid 1px #ECECEC}.accordion-section[_ngcontent-%COMP%]   .expansion-style[_ngcontent-%COMP%]     .mat-expansion-panel-content .mat-expansion-panel-body{padding:0 15px}.accordion-section[_ngcontent-%COMP%]   .expansion-header[_ngcontent-%COMP%]{border-bottom:solid 1px #ECECEC}.accordion-section[_ngcontent-%COMP%]   .expansion-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#e73f2b}.add-recipient-section[_ngcontent-%COMP%]{margin:1rem}.add-recipient-button[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;border:dashed 1px #E73F2B;color:#e73f2b;padding:1rem}.add-recipient-button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:.5rem}.saveOrder-button.mat-button-disabled[_ngcontent-%COMP%]{background-color:rgba(var(--palette-foreground-disabled-button),var(--palette-foreground-disabled-button-alpha))}.mat-expansion-panel-header[_ngcontent-%COMP%]  .mat-expansion-indicator:after{border-color:#e73f2b}@media not screen and (min-width: 600px){div.div-content[_ngcontent-%COMP%]{height:calc(100% - 56px)!important}.div-item-img[_ngcontent-%COMP%]{margin-top:0!important}.div-item-img[_ngcontent-%COMP%]     img{border-radius:8px}.div-app-img[_ngcontent-%COMP%]{width:100vw;overflow:unset;box-shadow:unset!important;margin-top:1rem}.div-img[_ngcontent-%COMP%], .div-title-img[_ngcontent-%COMP%]{width:100%;border-radius:0;overflow:unset;box-shadow:unset!important}.div-theme-logo[_ngcontent-%COMP%]{padding:4rem!important}.email-form[_ngcontent-%COMP%]{width:80%}div.div-egift-outer[_ngcontent-%COMP%]   .div-mid-content[_ngcontent-%COMP%]{padding:1rem}}@media only screen and (max-width: 600px){div.combo-footer[_ngcontent-%COMP%]{background:#fff;padding:1rem;flex:0 0 auto;box-shadow:0 4px 26px #0000000d;z-index:1}.footer-left[_ngcontent-%COMP%]{justify-content:space-evenly}.panel-add-remove[_ngcontent-%COMP%]{margin-left:0;width:100%}.footer-price[_ngcontent-%COMP%]{width:100%;justify-content:end;margin:0}.qty-cart-btn[_ngcontent-%COMP%]{flex-direction:column}.footer-right[_ngcontent-%COMP%]{margin-top:1rem}}"],data:{animation:[(0,f.X$)("itemsVert",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateY(-5%)"}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateY(0%)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:0,transform:"translateY(-5%)"}))])])]}}),i})();var pt=u(54729);function Al(i,a){if(1&i&&(t.TgZ(0,"div",17)(1,"p"),t._uU(2),t.ALo(3,"i18n"),t.qZA(),t._UZ(4,"app-icon",18),t.TgZ(5,"span"),t._uU(6),t.ALo(7,"i18n"),t.qZA()()),2&i){const e=t.oxw(2).$implicit,n=t.oxw().$implicit,o=t.oxw();
1t.xp6(2),t.Oqu(t.xi3(3,2,n,o.context.userLang)),t.xp6(4),t.Oqu(t.xi3(7,5,e,o.context.userLang))}}const Qe=function(i){return{completed:i}};function Sl(i,a){if(1&i&&(t.TgZ(0,"p",19),t._uU(1),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("ngClass",t.VKq(2,Qe,n.isChoiceLimitAllowed())),t.xp6(1),t.hij(" ",null==n.modifierService?null:n.modifierService.getChoiceLimitRules(e)," ")}}function Dl(i,a){if(1&i&&(t.TgZ(0,"p",20),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw().$implicit,o=t.oxw();t.Q6J("ngClass",t.VKq(4,Qe,o.isGroupCompleted(n,e))),t.xp6(1),t.hij(" *",t.lcZ(2,2,"byod.dialogs.all-modifiers-dialog.require")," ")}}const ql=function(i){return{"modifier-selected":i}},Ql=function(i,a){return{completed:i,"shake-anime":a}};function Nl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",10),t.YNc(1,Al,8,8,"div",11),t.TgZ(2,"div",12)(3,"p",13),t._uU(4),t.qZA(),t.YNc(5,Sl,2,4,"p",14),t.YNc(6,Dl,3,6,"p",15),t.qZA(),t.TgZ(7,"app-mitem-select-chips",16),t.NdJ("itemClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw();return t.KtG(c.itemClicked(l,r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw();return t.KtG(c.minusClicked(l,r,o))}),t.qZA()()}if(2&i){const e=t.oxw(),n=e.$implicit,o=e.index,r=t.oxw(),l=r.$implicit,c=r.index,s=t.oxw();t.uIk("data-mg-min",n.min)("data-mg-max",n.max),t.xp6(1),t.Q6J("ngIf",!s.hideModIgName),t.xp6(1),t.Q6J("ngClass",t.VKq(12,ql,s.isMGroupSelected(l,n))),t.xp6(1),t.Q6J("ngClass",t.WLB(14,Ql,s.isGroupCompleted(l,n),s.transition&&s.isIndex(s.currentIndex,s.findingIndex(c,o)))),t.xp6(1),t.hij(" ",null==s.modifierService?null:s.modifierService.getSelectRules(n)," "),t.xp6(1),t.Q6J("ngIf",n.choiceLimit),t.xp6(1),t.Q6J("ngIf",n.min>0),t.xp6(1),t.Q6J("isEdit",!(null==s.input||!s.input.editOi))("mgroup",n)("item",l)("mdBuilder",s.mdBuilder)}}function Jl(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",7),t._UZ(2,"div",8),t.YNc(3,Nl,8,17,"div",9),t.qZA(),t._UZ(4,"mat-divider"),t.BQk()),2&i){const e=a.$implicit,n=a.index,o=t.oxw().index,r=t.oxw();
1t.xp6(2),t.MGl("id","section-",r.findingIndex(o,n),""),t.xp6(1),t.Q6J("ngIf",e.items&&e.items.length>0)}}function Ul(i,a){if(1&i&&(t.TgZ(0,"div"),t.YNc(1,Jl,5,2,"ng-container",6),t.qZA()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngForOf",e.mgroups)}}const Fl=function(i,a){return{completed:i,incomplete:a}};function Ll(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",21)(1,"button",22),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.confirmClicked())}),t._uU(2),t.ALo(3,"translate"),t.qZA()()}if(2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,Fl,e.isCompleted(),!e.isCompleted())),t.xp6(1),t.hij(" ",t.lcZ(3,2,e.isCompleted()?"byod.dialogs.all-modifiers-dialog.confirm":"byod.dialogs.combo-dialog.next")," ")}}let Ne=(()=>{class i extends Ot{constructor(e,n){var o;super(e),this.cartService=n,this.hideModIgName=!1,this.hideModIgName=null===(o=this.settingManager)||void 0===o?void 0:o.get("menu.hideModIgName",!1)}ngOnInit(){this.showItemRemark=this.settingManager.get("showItemRemark",!1),this.initData()}initData(){var e,n,o,r,l,c,s,d,m;this.store=null!==(n=null===(e=this.input)||void 0===e?void 0:e.store)&&void 0!==n?n:this.orderContext.store;let p=null;null!==(o=this.input)&&void 0!==o&&o.editOi?(p=C.oV.cloneOrderItem(null===(r=this.input)||void 0===r?void 0:r.editOi,!0),p.quantity=1):!(null===(l=this.input)||void 0===l)&&l.orderItem&&(p=null===(c=this.input)||void 0===c?void 0:c.orderItem),this.mdBuilder=new Mt.u(this.store,p);const h=this.mdBuilder.findItems(p);this.modifiableItems=h,this.itemSelectionOpt=null===(s=this.input)||void 0===s?void 0:s.opt,this.note=null===(d=this.input.editOi)||void 0===d?void 0:d.note,this.currentOrderManager=(null===(m=this.itemSelectionOpt)||void 0===m?void 0:m.unlockItemMode)?this.cartService.unlockCatOrderManager:this.cartService.orderManager}getRemark(e){this.note=e}findingIndex(e,n){var o=0;for(let r=0;r<e;r++)o+=this.modifiableItems[r].mgroups.length;return o+n}confirmClicked(){var e,n,o,r;if(console.log("confirmClicked"),!this.isCompleted())return void this.scrollTo();const l=this.mdBuilder.build();l.note=this.note,this.input.edit?(null===(e=this.currentOrderManager)||void 0===e||e.addOrderItem(l),null===(n=this.currentOrderManager)||void 0===n||n.minusOrderItem(null===(o=this.input)||void 0===o?void 0:o.editOi)):null===(r=this.currentOrderManager)||void 0===r||r.refreshOrderItem(l),this.dialogService.submitAuxDialog({orderItem:l})}scrollTo(){var e=null;for(let o of this.modifiableItems){for(let r of o.mgroups){if(0==this.isGroupCompleted(o,r)){for(let l=0;l<this.modifiableItems.indexOf(o);l++)e+=this.modifiableItems[l].mgroups.length;e+=this.isGroupCompletedIndex(o,r)}if(null!=e)break}if(null!=e)break}var n=document.getElementById("section-"+e);n&&n.scrollIntoView({behavior:"smooth"}),this.currentIndex=e,setTimeout(()=>{this.transition=!0},875),this.transition=!1}isIndex(e,n){return e==n}isChoiceLimitAllowed(){return this.mods.length>0||this.mdBuilder.orderitem.items.length>1}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(pt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-all-modifiers-dialog"]],viewQuery:function(e,n){if(1&e&&t.Gf(tt.N7,5),2&e){let o;t.iGM(o=t.CRH())&&(n.viewPort=o.first)}},features:[t.qOj],decls:7,vars:7,consts:[[1,"modifier-box"],[3,"back","title","closeBackBehaviour"],[1,"div-outtest"],["itemSize","100",1,"vscroll"],[4,"cdkVirtualFor","cdkVirtualForOf"],["class","footer-row flex justify-center",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"modifier-div"],[3,"id"],["class","sub-item-grp",4,"ngIf"],[1,"sub-item-grp"],["class","sub-item-path flex items-center",4,"ngIf"],[1,"select-n-required","flex","items-center",3,"ngClass"],[1,"select-num","flex","items-center","leading-none",3,"ngClass"],["class","select-num",3,"ngClass",4,"ngIf"],["class","text-required",3,"ngClass",4,"ngIf"],[1,"mt-4",3,"isEdit","mgroup","item","mdBuilder","itemClicked","minusClicked"],[1,"sub-item-path","flex","items-center"],["name","arrow_right","size","20","source","mat"],[1,"select-num",3,"ngClass"],[1,"text-required",3,"ngClass"],[1,"footer-row","flex","justify-center"],["mat-flat-button","","appThrottleClick","","data-testid","modifier-add-to-cart-button",3,"ngClass","throttleClick"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"cdk-virtual-scroll-viewport",3),t.YNc(5,Ul,2,1,"div",4),t.qZA()(),t.YNc(6,Ll,4,7,"div",5),t.qZA()),2&e&&(t.xp6(1),t.Q6J("back",!1)("title",t.lcZ(2,5,"byod.dialogs.all-modifiers-dialog.select-modifiers"))("closeBackBehaviour",!0),t.xp6(4),t.Q6J("cdkVirtualForOf",n.modifiableItems),t.xp6(1),t.Q6J("ngIf",!n.orderContext.viewMode))},dependencies:[_.mk,_.sg,_.O5,S.o,k.v,J.j,et.d,I.lW,tt.xd,tt.x0,tt.N7,Ft,M.X$,D.G],styles:["[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}p[_ngcontent-%COMP%], h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ng
1content-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%]{margin:0;padding:0}.modifier-box[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}  .cdk-virtual-scroll-content-wrapper .modifier-div app-icon,   .cdk-virtual-scroll-content-wrapper .modifier-div p,   .cdk-virtual-scroll-content-wrapper .modifier-div span{-webkit-user-select:none;user-select:none}div.div-outtest[_ngcontent-%COMP%]{background:#f5f5f5;display:flex;flex-direction:column;flex:1 1 auto;overflow-y:auto}div.cust-header[_ngcontent-%COMP%]{border-bottom:2px solid var(--P);background:#fafafa;padding:.5rem 1rem}.sub-item-grp[_ngcontent-%COMP%]{padding:1rem 1.5rem}.sub-item-grp[_ngcontent-%COMP%]   .sub-item-path[_ngcontent-%COMP%]{font-size:.95rem;font-weight:700;flex-wrap:wrap;align-items:center;line-height:normal}.vscroll[_ngcontent-%COMP%]{height:100%;width:100%}.select-n-required[_ngcontent-%COMP%]{margin-top:.35rem}.select-n-required[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin-right:.5rem}.select-n-required[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-n-required[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#f04141;font-size:.65rem}.select-n-required[_ngcontent-%COMP%]   .completed.select-num[_ngcontent-%COMP%]{background:#1bbb8f!important}.select-n-required[_ngcontent-%COMP%]   .completed.text-required[_ngcontent-%COMP%]{color:gray!important}mat-divider[_ngcontent-%COMP%]{margin:0 1rem;border-top-color:#dcdcdc}.footer-row[_ngcontent-%COMP%]{padding:1rem 1.5rem;background:#fff}.footer-row[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{text-transform:uppercase;width:100%;background:var(--P);color:var(--PC);padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px}.footer-row[_ngcontent-%COMP%]   button.completed[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}.shake-anime[_ngcontent-%COMP%]{animation:hori-shake .5s ease-in-out}@keyframes hori-shake{0%,to{transform:translateZ(0)}20%,60%{transform:translate3d(-10px,0,0)}40%,80%{transform:translate3d(10px,0,0)}}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.sub-item-grp[_ngcontent-%COMP%]{padding:1rem!important}.footer-row[_ngcontent-%COMP%]{padding:1rem}}"]}),i})();function Bl(i,a){if(1&i&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.hij(" ","#"+e.order.orderNo,"")}}function Yl(i,a){if(1&i&&(t.TgZ(0,"div",5),t._UZ(1,"qrcode",6),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("qrdata",e.qrData)("width",300)("errorCorrectionLevel","M")("elementType","img")}}let zl=(()=>{class i extends C.nh{constructor(e){super(e),this.injector=e,this.qrData='{"language":"en","uuid":"dca5c20a-976f-4c57-b59c-8c13e6669835"}'}ngOnInit(){this.input=this.navParams.input,console.log("ByodQrcodeDialogComponent input",this.input),this.initData()}initData(){var e,n;this.order=null===(e=this.input)||void 0===e?void 0:e.order,this.qrData=null===(n=this.order)||void 0===n?void 0:n.qrcode,this.qrCodeTitle=this.t.instant("byod.pages.byod-qrcode-dialog.qr-code-title")}closeClicked(){this.routingService.navigateCloseAllModal()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-byod-qrcode-dialog"]],features:[t.qOj],decls:7,vars:5,consts:[[3,"back","close"],[1,"content"],[1,"instruct-text"],[4,"ngIf"],["class","qr-code-wrapper",4,"ngIf"],[1,"qr-code-wrapper"],[3,"qrdata","width","errorCorrectionLevel","elementType"]],template:function(e,n){1&e&&(t._UZ(0,"app-sub-bar",0),t.TgZ(1,"div",1)(2,"div",2)(3,"h1"),t._uU(4),t.qZA(),t.YNc(5,Bl,2,1,"p",3),t.qZA(),t.YNc(6,Yl,2,4,"div",4),t.qZA()),2&e&&(t.Q6J("back",!0)("close",!1),t.xp6(4),t.Oqu(n.qrCodeTitle),t.xp6(1),t.Q6J("ngIf",n.order.orderNo),t.xp6(1),t.Q6J("ngIf",n.qrData))},dependencies:[_.O5,k.v,pe.V],styles:[".content[_ngcontent-%COMP%]{padding:1rem 1rem 4rem;display:flex;align-items:center;background:white;flex-direction:column;border-radius:0 0 .5rem .5rem;height:65%}.instruct-text[_ngcontent-%COMP%]{text-align:center}.instruct-text[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.3rem;font-weight:400}.instruct-text[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:1.5rem 0 0;font-size:1.1rem;color:#858585}@media not screen and (min-width: 600px){.content[_ngcontent-%COMP%]{height:100%;border-radius:0;padding:2rem 1rem}}"]}),i})();var Je=u(49933);function jl(i,a){if(1&i&&t._UZ(0,"app-img",27),2&i){const e=t.oxw(2);t.Q6J("content",e.mainItem)("icon","image")("animate",!0)}}function Gl(i,a){if(1&i&&(t.TgZ(0,"app-animated-thumbnail",25),t.YNc(1,jl,1,3,"app-img",26),t.qZA()),2&i){const e=t.oxw();t.Q6J("content",e.mainItem),t.xp6(1),t.Q6J("ngIf",e.mainItem.getImage("default",500,!0))}}function El(i,a){if(1&i&&t._UZ(0,"app-img",30),2&i){const e=t.oxw(2);t.Q6J("pw",300)("content",e.mainItem)("icon","image")("animate",!0)}}function $l(i,a){if(1&i&&t._UZ(0,"app-img",31),2&i){const e=t.oxw(2);t.Q6J("src",e.itemUrl)("icon","image")("animate",!0)("hideEmpty",!0)}}
1function Rl(i,a){if(1&i&&(t.YNc(0,El,1,4,"app-img",28),t.YNc(1,$l,1,4,"app-img",29)),2&i){const e=t.oxw();t.Q6J("ngIf",e.mainItem.getImage("default",500,!0)),t.xp6(1),t.Q6J("ngIf",!e.mainItem.getImage("default",500,!0)&&null!=e.itemUrl)}}function Vl(i,a){1&i&&t._UZ(0,"app-nutri-grade",32)}function Hl(i,a){if(1&i&&(t.TgZ(0,"h4",33),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.hij(" ",t.gM2(2,1,t.lcZ(3,6,e.mainItem),!0,e.context,!0)," ")}}function Kl(i,a){if(1&i&&(t.TgZ(0,"div",34),t._UZ(1,"app-item-special-price",35),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("item",e.mainItem)}}function Wl(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",36),t._UZ(1,"app-icon",37),t.TgZ(2,"a",38),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.showNutrition())}),t._uU(3),t.ALo(4,"translate"),t.qZA()()}2&i&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"byod.dialogs.combo-dialog.show-nutrition")))}function Xl(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",44),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("src",n.getTagImage(e))}}const tc=function(i){return{"background-color":i}};function ec(i,a){if(1&i&&(t.TgZ(0,"h6",46),t._uU(1),t.ALo(2,"i18n"),t.ALo(3,"itemTag"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("ngStyle",t.VKq(8,tc,n.getTagBackGroundColor(e))),t.xp6(1),t.Oqu(t.Dn7(2,2,t.lcZ(3,6,e),n.context.userLang,"name"))}}function nc(i,a){if(1&i&&t.YNc(0,ec,4,10,"h6",45),2&i){const e=t.oxw().$implicit;t.Q6J("ngIf",e)}}function ic(i,a){if(1&i&&(t.ynx(0,41),t.YNc(1,Xl,2,1,"ng-container",42),t.YNc(2,nc,1,1,"ng-template",null,43,t.W1O),t.BQk()),2&i){const e=t.MAs(3),n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",n.settingManager.get("isItemTagImage",!1))("ngIfElse",e)}}function oc(i,a){if(1&i&&(t.TgZ(0,"div",39),t.YNc(1,ic,4,2,"ng-container",40),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",null==e.mainItem?null:e.mainItem.tags)}}function rc(i,a){if(1&i&&(t.TgZ(0,"h2",47),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.hij(" ",t.Dn7(2,1,e.mainItem,e.context.userLang,"desc")," ")}}function ac(i,a){if(1&i&&(t.TgZ(0,"h2",63),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij("",t.xi3(2,1,e,n.context.userLang)," ")}}function lc(i,a){1&i&&(t.TgZ(0,"h6",68),t._uU(1," * "),t.qZA())}function cc(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select-max")," "))}function sc(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select"),""))}function dc(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"strong"),t._uU(2),t.qZA(),t.TgZ(3,"strong"),t._uU(4,"\xa0-"),t.qZA(),t.BQk()),2&i){const e=t.oxw(3).$implicit;t.xp6(2),t.hij("\xa0",e.min,"")}}function mc(i,a){if(1&i&&(t.ynx(0),t.YNc(1,lc,2,0,"h6",65),t.TgZ(2,"div",66),t.YNc(3,cc,3,3,"ng-container",57),t.YNc(4,sc,3,3,"ng-container",57),t.TgZ(5,"span",67),t.YNc(6,dc,5,1,"ng-container",57),t.TgZ(7,"strong"),t._uU(8),t.qZA()(),t._uU(9),t.ALo(10,"translate"),t.qZA(),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngIf",0!=e.min),t.xp6(2),t.Q6J("ngIf",null==e?null:e.optional),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.optional)),t.xp6(2),t.Q6J("ngIf",e.min!=e.max),t.xp6(2),t.hij("\xa0",e.max,"\xa0"),t.xp6(1),t.hij("",t.lcZ(10,6,"byod.dialogs.combo-dialog.items")," ")}}function gc(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select-max")," "))}function pc(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select"),""))}function uc(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"strong"),t._uU(2),t.qZA(),t.TgZ(3,"strong"),t._uU(4,"\xa0-"),t.qZA(),t.BQk()),2&i){const e=t.oxw(3).$implicit;let n;
1t.xp6(2),t.hij("\xa0",null!==(n=e.minItemWeighting)&&void 0!==n?n:0,"")}}function _c(i,a){1&i&&(t.TgZ(0,"h6",71),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" *",t.lcZ(2,1,"byod.dialogs.combo-dialog.require")," "))}function fc(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",69),t.YNc(2,gc,3,3,"ng-container",57),t.YNc(3,pc,3,3,"ng-container",57),t.TgZ(4,"span",67),t.YNc(5,uc,5,1,"ng-container",57),t.TgZ(6,"strong"),t._uU(7),t.qZA()(),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.YNc(10,_c,3,3,"h6",70),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(2),t.Q6J("ngIf",null==e?null:e.optional),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.optional)),t.xp6(2),t.Q6J("ngIf",e.minItemWeighting!=e.maxItemWeighting),t.xp6(2),t.hij("\xa0",e.maxItemWeighting,"\xa0"),t.xp6(1),t.hij("",t.lcZ(9,6,"byod.dialogs.combo-dialog.items")," "),t.xp6(2),t.Q6J("ngIf",0!=e.minItemWeighting)}}const hc=function(i,a,e,n,o,r){return{"completed-item-modifier":i,"missing-item-modifier":a,"all-completed-item-group":e,"shake-anime":n,"completed-itemgroup-min-max":o,"missing-itemgroup-min-max":r}};function xc(i,a){if(1&i&&(t.TgZ(0,"div",64),t.YNc(1,mc,11,8,"ng-container",57),t.YNc(2,fc,11,8,"ng-container",57),t.qZA()),2&i){const e=t.oxw(),n=e.$implicit,o=e.index,r=t.oxw();t.Q6J("ngClass",t.HTZ(3,hc,r.isCompletedModifierByCurrentGroup(n),!r.isCompletedModifierByCurrentGroup(n),r.isAllCompletedByCurrentGroup(n),r.transition&&r.isPreviousIndexEqualstoCurrentIndex(r.currentIndex,o+1),r.isCompletedGroupMinMax(n),!r.isCompletedGroupMinMax(n))),t.xp6(1),t.Q6J("ngIf",!r.menuWithItemCountTypeWeighting),t.xp6(1),t.Q6J("ngIf",r.menuWithItemCountTypeWeighting&&n.maxItemWeighting>0)}}function vc(i,a){1&i&&t._UZ(0,"span",75)}const Ue=function(i,a){return{"itemgroup-modifier-all-completed":i,"ai-anime":a}};function Cc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",72)(1,"button",73),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw().showModifierPopup(r),t.KtG(o.stopPropagation())}),t._uU(2),t.ALo(3,"translate"),t.YNc(4,vc,1,0,"span",74),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(5,Ue,n.isCompletedModifierByCurrentGroup(e),!n.isCompletedModifierByCurrentGroup(e))),t.xp6(1),t.hij(" ",t.lcZ(3,3,"byod.dialogs.combo-dialog.modifier")," "),t.xp6(2),t.Q6J("ngIf",!n.isCompletedModifierByCurrentGroup(e))}}function bc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",76)(1,"button",73),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw().$implicit;return t.oxw().showRemarkDialog(r),t.KtG(o.stopPropagation())}),t._uU(2),t.ALo(3,"translate"),t._UZ(4,"span",75),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(4,Ue,n.isCompletedModifierByCurrentGroup(e),!n.isCompletedModifierByCurrentGroup(e))),t.xp6(1),t.hij(" ",t.lcZ(3,2,"byod.dialogs.combo-dialog.edit-message")," ")}}function Mc(i,a){if(1&i&&(t.TgZ(0,"div")(1,"h6",77),t._uU(2),t.ALo(3,"translate"),t.ALo(4,"translate"),t.qZA()()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(2),t.lnq(" ",t.lcZ(3,3,"byod.dialogs.combo-dialog.selected")," ",n.orderItemBuilder.getTotalWeightOfAllSelectedItemsInItemGroup(e)," ",t.lcZ(4,5,"byod.dialogs.combo-dialog.items")," ")}}const Oc=function(i){return{expanded:i}};function yc(i,a){if(1&i&&(t.TgZ(0,"div",78),t._UZ(1,"app-icon",79),t.qZA()),2&i){const e=t.oxw().index,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(1,Oc,n.expandState[e]))}}function Pc(i,a){1&i&&(t.TgZ(0,"div",80)(1,"div",81),t._UZ(2,"app-icon",82),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"translate"),t.qZA()()()),2&i&&(t.xp6(4),t.Oqu(t.lcZ(5,1,"byod.dialogs.combo-dialog.served-with")))}function Ic(i,a){if(1&i&&(t.TgZ(0,"li"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=a.$implicit,n=t.oxw(3);t.xp6(1),t.hij(" ",t.xi3(2,1,e,n.context.userLang)," ")}}function wc(i,a){if(1&i&&(t.TgZ(0,"ul",83),t.YNc(1,Ic,3,4,"li",22),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngForOf",n.mapSelectedItems[e.id])}}function kc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-item-group-select-card",87),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2),l=r.index,c=r.$implicit,s=t.oxw();return t.KtG(s.mgitemClickCustom(l,c,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw();return t.KtG(c.clickedNoNeed(r,l))}
1)("showViewOnlyModifierPopup",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.showViewOnlyModifierPopup(r,o))}),t.qZA()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.Q6J("group",e)("oibuilder",n.orderItemBuilder)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("collapsibleMode",n.collapsibleMode)("isUnlockItem",n.isUnlockItem)}}function Tc(i,a){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(3).$implicit,o=t.oxw();t.xp6(1),t.hij("x ",o.getQuantity(n,e),"")}}function Zc(i,a){if(1&i&&(t.TgZ(0,"h3",98)(1,"span"),t._uU(2,"+"),t.qZA(),t._uU(3),t.ALo(4,"priceDisplay"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(3),t.hij(" ",t.Dn7(4,1,null==e?null:e.price,!0,n.context)," ")}}function Ac(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"div",99)(2,"app-img",100),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(2),t.Q6J("src",n.getItemImg(e))}}const Sc=function(i){return{"item-has-img":i}};function Dc(i,a){if(1&i&&(t.TgZ(0,"div",89)(1,"div",90)(2,"div",91)(3,"div",92)(4,"span",93),t._uU(5,"done"),t.qZA()(),t.TgZ(6,"h3",94),t._uU(7),t.ALo(8,"i18n"),t.qZA(),t._UZ(9,"app-nutri-grade",95),t.YNc(10,Tc,2,1,"span",57),t._UZ(11,"div",96),t.YNc(12,Zc,5,5,"h3",97),t.YNc(13,Ac,3,1,"ng-container",57),t.qZA()()()),2&i){const e=a.$implicit,n=t.oxw(3).$implicit,o=t.oxw();t.Q6J("ngClass",t.VKq(9,Sc,!!o.getItemImg(e))),t.xp6(7),t.Oqu(t.xi3(8,6,e,o.context.userLang)),t.xp6(2),t.Q6J("item",e),t.xp6(1),t.Q6J("ngIf",o.getQuantity(n,e)>1),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.price)>0||!o.hideZeroPrice),t.xp6(1),t.Q6J("ngIf",!!o.getItemImg(e))}}function qc(i,a){if(1&i&&t.YNc(0,Dc,14,11,"div",88),2&i){const e=t.oxw(2).$implicit;t.Q6J("ngForOf",e.items)}}function Qc(i,a){if(1&i&&(t.TgZ(0,"div",84)(1,"div"),t.YNc(2,kc,1,5,"app-item-group-select-card",85),t.YNc(3,qc,1,1,"ng-template",null,86,t.W1O),t.qZA()()),2&i){const e=t.oxw().$implicit,n=t.MAs(16),o=t.oxw();t.Q6J("@.disabled",!o.collapsibleMode),t.xp6(1),t.Q6J("@expandTrigger",void 0),t.xp6(1),t.Q6J("ngIf",!o.isAutopickupGroup(e))("ngIfElse",n)}}function Nc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",102)(1,"div",103)(2,"app-item-group-select-card",104),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2),l=r.index,c=r.$implicit,s=t.oxw();return t.KtG(s.mgitemClickCustom(l,c,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw();return t.KtG(c.clickedNoNeed(r,l))})("showViewOnlyModifierPopup",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw();return t.KtG(l.showViewOnlyModifierPopup(r,o))}),t.qZA()()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(2),t.Q6J("group",e)("isAutoPickup",!0)("oibuilder",n.orderItemBuilder)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("collapsibleMode",n.collapsibleMode)("isUnlockItem",n.isUnlockItem)}}function Jc(i,a){if(1&i&&t.YNc(0,Nc,3,6,"div",101),2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("ngIf",n.isAutopickupGroup(e)&&n.isAutoPickup&&(null==n.autoPickupGroups?null:n.autoPickupGroups.length)>0)}}const Uc=function(i,a){return{"div-sub-item-grp-collapsible":i,"set-sub-item-grp-mt":a}};function Fc(i,a){if(1&i){const e=t.EpF();t.ynx(0),t._UZ(1,"div",48),t.TgZ(2,"div",49),t.NdJ("click",function(){const r=t.CHM(e).index,l=t.oxw();return t.KtG(l.collapsibleMode&&l.expandClicked(r))}),t.TgZ(3,"div",50)(4,"div",51)(5,"div",52),t.YNc(6,ac,3,4,"h2",53),t.YNc(7,xc,3,10,"div",54),t.qZA(),t.YNc(8,Cc,5,8,"div",55),t.YNc(9,bc,5,7,"div",56),t.YNc(10,Mc,5,7,"div",57),t.YNc(11,yc,2,3,"div",58),t.qZA(),t.YNc(12,Pc,6,3,"div",59),t.YNc(13,wc,2,1,"ul",60),t.qZA()(),t.YNc(14,Qc,5,4,"div",61),t.YNc(15,Jc,1,1,"ng-template",null,62,t.W1O),t.BQk()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw();t.xp6(1),t.MGl("id","section-",n,""),t.xp6(1),t.Q6J("ngClass",t.WLB(11,Uc,o.collapsibleMode,o.showServedWith(e))),t.xp6(4),t.Q6J("ngIf",!o.hideIgName),t.xp6(1),t.Q6J("ngIf",!o.isAutopickupGroup(e)),t.xp6(1),t.Q6J("ngIf",o.isCurrentGroupHasModifier(e)),t.xp6(1),t.Q6J("ngIf",o.currentGroupHasItemRemarkSetting(e)&&o.isEditMsgCompleted(e)),t.xp6(1),t.Q6J("ngIf",o.menuWithItemCountTypeWeighting&&o.orderItemBuilder.getTotalWeightOfAllSelectedItemsInItemGroup(e)>0),t.xp6(1),t.Q6J("ngIf",o.collapsibleMode),t.xp6(1),t.Q6J("ngIf",o.showServedWith(e)),t.xp6(1),t.Q6J("ngIf",o.mapSelectedItems[e.id]),t.xp6(1),t.Q6J("ngIf",!(o.collapsibleMode&&!o.expandState[n]))}}function Lc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-write-remark",105),t.NdJ("remark",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.getRemark(o))}),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("note",e.mainItem.note)}}function Bc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-write-remark",105),t.NdJ("remark",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.getRemark(o))}),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("note",e.editOi.note)}}function Yc(i,a){1&i&&t._UZ(0,"span",113)}const zc=function(i){return{"allCompleted-full-fill":i}};function jc(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",110)(2,"h5",111),t.NdJ("click",function(o){return t.CHM(e),t.oxw(2).modifierClicked(),t.KtG(o.stopPropagation())}),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.YNc(5,Yc,1,0,"span",112),t.qZA(),t.BQk()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(5,zc,e.isCompletedModifierByAllModifierItem())),t.xp6(2),t.hij(" ",t.lcZ(4,3,"byod.dialogs.combo-dialog.customize")," "),t.xp6(2),t.Q6J("ngIf",!e.isCompletedModifierByAllModifierItem())}}function Gc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",114),t.ynx(1),t.TgZ(2,"div",115)(3,"div",116)(4,"button",117),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2);return r.changeTotalQty("minus",r.isUnlockItem),t.KtG(o.stopPropagation())}),t._UZ(5,"app-icon",118),t.qZA(),t.TgZ(6,"h4",119),t._uU(7),t.qZA(),t.TgZ(8,"button",120),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2);return r.changeTotalQty("add",r.isUnlockItem),t.KtG(o.stopPropagation())}),t._UZ(9,"app-icon",121),t.qZA()(),t.TgZ(10,"div",122),t._uU(11),t.ALo(12,"priceDisplay"),t.qZA()(),t.BQk(),t.TgZ(13,"button",123),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.addToCartClicked())}),t.TgZ(14,"div",124),t._uU(15),t.ALo(16,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(4),t.Q6J("disabled",!e.canMinusItem(e.mainItem,e.isUnlockItem)),t.uIk("role","button"),t.xp6(3),t.Oqu(e.totalQty),t.xp6(1),t.Q6J("disabled",!e.canAddItems(e.mainItem,e.isUnlockItem)),t.uIk("role","button"),t.xp6(3),t.hij(" ",t.Dn7(12,7,(null==e.currentOi?null:e.currentOi.total)*e.totalQty,!0,e.context)," "),t.xp6(4),t.hij(" ",t.lcZ(16,11,e.isCompleted()?e.editOi?"byod.dialogs.combo-dialog.confirm-edit":"byod.dialogs.combo-dialog.add":"byod.dialogs.combo-dialog.next")," ")}}function Ec(i,a){if(1&i&&(t.TgZ(0,"div",106)(1,"div",107),t._UZ(2,"div",108),t.YNc(3,jc,6,7,"ng-container",57),t.qZA(),t.YNc(4,Gc,17,13,"div",109),t.qZA()),2&i){const e=t.oxw();
1t.xp6(3),t.Q6J("ngIf",!!e.isShowBottomCustomizeBtn(e.orderItemBuilder)),t.xp6(1),t.Q6J("ngIf",!e.orderContext.viewMode)}}const $c=function(){return{}},Rc=function(){return{position:"relative"}};let Fe=(()=>{class i extends at{constructor(e){var n;super(e),this.injector=e,this.showBack=history.state.auxDepth>1,this.groupCombo=!1,this.hideIgName=!1,this.collapsibleMode=!1,this.expandState=[],this.mapSelectedItems={},this.defaultCollapseAllSubItemGroup=!1,this.showItemRemark=!1,this.isShowNutrition=!1,this.hideIgName=null===(n=this.settingManager)||void 0===n?void 0:n.get("menu.hideIgName",!1),this.showItemRemark=this.settingManager.get("showItemRemark",!1)}ngOnInit(){var e,n,o,r,l,c,s;this.collapsibleMode=this.settingManager.get("singlePageComboCollapsible",!1),this.initData();let d=!0;if(this.groups=this.groups.filter(m=>{var p;const h=null===(p=null==m?void 0:m.items)||void 0===p?void 0:p.filter(x=>!this.cartService.isSoldout(x)).length;return(null==m?void 0:m.min)>0&&h<=0&&(d=!1),(null==m?void 0:m.min)>0||h>0}),this.collapsibleMode){this.defaultCollapseAllSubItemGroup=this.settingManager.get("defaultCollapseAllSubItemGroup",!1);for(const m of this.groups){this.updateSelectedItems(m);let p=!0;this.editOi||(p=!this.defaultCollapseAllSubItemGroup),this.isAllCompletedByCurrentGroup(m)&&(null===(e=this.mapSelectedItems[m.id])||void 0===e?void 0:e.length)>0&&(p=!1),this.expandState.push(p)}}this.itemUrl=this.getItemUrl(),this.editOi&&(this.totalQty=this.editOi.quantity),this.groupCombo=this.isGroupCombo(),((null===(n=this.mainItem)||void 0===n?void 0:n.nutrients)&&(null===(r=null===(o=this.mainItem)||void 0===o?void 0:o.nutrients)||void 0===r?void 0:r.length)>0||(null===(l=this.mainItem)||void 0===l?void 0:l.allergy)&&(null===(s=null===(c=this.mainItem)||void 0===c?void 0:c.allergy)||void 0===s?void 0:s.length)>0)&&(this.isShowNutrition=!0)}ngAfterViewInit(){super.ngAfterViewInit()}getRemark(e){this.editOi?this.editOi.note=e:this.mainItem.note=e}modifierClicked(){return(0,Q.mG)(this,void 0,void 0,function*(){console.log("AllModifiersDialogComponent");const e=this.orderItemBuilder.build();var n={store:this.currentOrderManager.store,orderItem:e,edit:!1};this.analyticsService.trackItemDialogAction("click_modifier",this.mainItem),this.dialogService.openAux("order/dialog/all-modifiers",n,{autoClose:!1},r=>{this.routingService.navigateCloseModal()})})}showModifierPopup(e){return(0,Q.mG)(this,void 0,void 0,function*(){let n=this.orderItemBuilder.build(),o={store:this.store,group:e,orderItem:n,orderContext:this.orderContext};this.analyticsService.trackItemDialogAction("click_item_modifier",this.mainItem),this.dialogService.openAux("order/dialog/segment-modifiers",o,{autoClose:!1},l=>{console.log("The SegmentModifiersDialogComponent was closed",l),this.cd.detectChanges(),this.routingService.navigateCloseModal()})})}showViewOnlyModifierPopup(e,n){return(0,Q.mG)(this,void 0,void 0,function*(){console.log("SegmentModifiersDialogComponent"),this.dialogService.openAux("order/dialog/segment-modifiers",{store:this.orderContext.store,group:e,item:n,orderContext:this.orderContext},{autoClose:!1},l=>{this.routingService.navigateCloseModal()})})}showRemarkDialog(e){return(0,Q.mG)(this,void 0,void 0,function*(){let n;for(let c=0;c<e.items.length;c++)e.items[c].messageLimit>0&&e.items[c].messageMaxLength>0&&(n=e.items[c]);let o=(0,V.Z)(n);if(this.orderItemBuilder.findIndexByGroups(this.orderItemBuilder.groups,e)>=0){const c=this.orderItemBuilder.items.filter(s=>s.id==n.id);c.length>0&&(o=c[0],o.messageLimit=n.messageLimit,o.messageMaxLength=n.messageMaxLength)}this.dialogService.openAux("order/dialog/message",{data:o},{autoClose:!1},c=>{this.minusClicked(e,c),this.mgitemClick(e,c),this.routingService.navigateCloseModal()})})}isEditMsgCompleted(e){var n;const o=this.orderItemBuilder.findIndexByGroups(this.orderItemBuilder.groups,e);if(o>=0)for(let r=0;r<this.orderItemBuilder.groups[o].items.length;r++)if(null!==(n=this.orderItemBuilder.groups[o].items[r].custom)&&void 0!==n&&n.message)return!0;return!1}get currentOi(){var e;return null===(e=this.orderItemBuilder)||void 0===e?void 0:e.build()}showNutrition(){var e;this.dialogService.openAux("order/dialog/nutrition-facts",null!==(e=this.mainItem)&&void 0!==e?e:this.currentOi.items[0])}scrollTo(e){const n=e;this.collapsibleMode&&!this.expandState[n]&&this.expandClicked(n),super.scrollTo(n)}expandClicked(e){this.expandState[e]=!this.expandState[e],this.analyticsService.trackItemDialogAction(this.expandState[e]?"click_expand":"click_collapse",this.mainItem)}mgitemClickCustom(e,n,o){this.mgitemClick(n,o),this.updateSelectedItems(n),this.updateExpandState(e,n)}clickedNoNeed(e,n){super.clickedNoNeed(e,n),this.updateSelectedItems(e),this.updateExpandState(n,e)}
1minusClicked(e,n){super.minusClicked(e,n),this.updateSelectedItems(e)}showServedWith(e){var n;return this.isAutopickupGroup(e)&&this.isAutoPickup&&(null===(n=this.autoPickupGroups)||void 0===n?void 0:n.length)>0}updateExpandState(e,n){this.collapsibleMode&&this.isMaxCountItemInGroupReached(n)&&(this.expandState[e]=!1)}updateSelectedItems(e){var n,o;if(this.collapsibleMode){this.mapSelectedItems[e.id]=[];for(const r of e.items){if(null!==(o=null===(n=this.orderItemBuilder)||void 0===n?void 0:n.noNeedConfirm)&&void 0!==o&&o[null==e?void 0:e.id]){this.mapSelectedItems[e.id].push({name:this.t.instant("byod.components.mg-item-list.no-need")});break}this.getQuantity(e,r)>0&&this.mapSelectedItems[e.id].push(r)}}}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-combo-dialog"]],features:[t.qOj],decls:30,vars:27,consts:[[1,"combo-container"],[3,"back","closeBackBehaviour","close"],[1,"div-combo-container"],[1,"div-top-detail","flex"],[1,"right-img",3,"click"],[1,"img-box"],[3,"content",4,"ngIf","ngIfElse"],["imageDisplay",""],["type","color-coded-scale","item","default","class","content-nutri-grade",4,"ngIf"],[1,"left-info","flex","flex-col","w-full",3,"ngClass"],[1,"div-info","flex-grow"],[1,"title-price-container"],[1,"title-text"],[1,"div-price"],["class","price-text",4,"ngIf"],["class","item-special-price",4,"ngIf"],[1,"flex","nutrients-container"],["class","nutrients",4,"ngIf"],["class","tag-grp flex",4,"ngIf"],["class","description-text",4,"ngIf"],[1,"content-bg"],[1,"content-upper",3,"ngStyle"],[4,"ngFor","ngForOf"],[3,"note","remark",4,"ngIf"],["class","combo-footer",4,"ngIf"],[3,"content"],[3,"content","icon","animate",4,"ngIf"],[3,"content","icon","animate"],[3,"pw","content","icon","animate",4,"ngIf"],[3,"src","icon","animate","hideEmpty",4,"ngIf"],[3,"pw","content","icon","animate"],[3,"src","icon","animate","hideEmpty"],["type","color-coded-scale","item","default",1,"content-nutri-grade"],[1,"price-text"],[1,"item-special-price"],[3,"item"],[1,"nutrients"],["name","info","size","18",1,"mr-1"],[1,"whitespace-nowrap","text-sm","cursor-pointer",3,"click"],[1,"tag-grp","flex"],["class","w-full flex flex-row flex-wrap",4,"ngFor","ngForOf"],[1,"w-full","flex","flex-row","flex-wrap"],[4,"ngIf","ngIfElse"],["itemTagText",""],[3,"src"],["class","food-tag text-white mr-1 mt-1",3,"ngStyle",4,"ngIf"],[1,"food-tag","text-white","mr-1","mt-1",3,"ngStyle"],[1,"description-text"],[3,"id"],[1,"div-sub-item-grp",3,"ngClass","click"],[1,"step-name-select"],[1,"group-name-n-modifier","flex","justify-between","items-center"],[1,"name-n-select","row-lower","flex","items-center"],["class","sub-item-grp-name col-left",4,"ngIf"],["class","select-n-required flex",3,"ngClass",4,"ngIf"],["class","modifier-col ml-2",4,"ngIf"],["class","modifier-col",4,"ngIf"],[4,"ngIf"],["class","div-expand-icon-outer",4,"ngIf"],["class","auto-pu-left",4,"ngIf"],["class","item-selected",4,"ngIf"],["class","item-group",4,"ngIf"],["autoPickupItems",""],[1,"sub-item-grp-name","col-left"],[1,"select-n-required","flex",3,"ngClass"],["class","text-required",4,"ngIf"],[1,"tag-pls-select","flex","items-center"],[1,"request-num-text"],[1,"text-required"],[1,"tag-pls-select","flex","items-center","px-1"],["class","text-required ml-2 text-xs flex items-center",4,"ngIf"],[1,"text-required","ml-2","text-xs","flex","items-center"],[1,"modifier-col","ml-2"],[1,"modifier-btn",3,"ngClass","click"],["class","dot-modifier ai-anime",4,"ngIf"],[1,"dot-modifier","ai-anime"],[1,"modifier-col"],[1,"selected-n-items"],[1,"div-expand-icon-outer"],["name","expand_circle_down","size","18","source","mat",1,"icon-expand",3,"ngClass"],[1,"auto-pu-left"],[1,"div-served-with"],["name","task_alt","source","mat","size","14",1,"flex"],[1,"item-selected"],[1,"item-group"],[3,"group","oibuilder","isNoNeed","collapsibleMode","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","showViewOnlyModifierPopup",4,"ngIf","ngIfElse"],["autoSelect",""],[3,"group","oibuilder","isNoNeed","collapsibleMode","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","showViewOnl
1yModifierPopup"],["class","auto-select-box",3,"ngClass",4,"ngFor","ngForOf"],[1,"auto-select-box",3,"ngClass"],[1,"auto-select-items"],[1,"selected-item"],[1,"tick-icon"],[1,"material-icons"],[1,"selected-item__name"],["type","simplified","mode","small",3,"item"],[1,"auto-select-subItem-spacer"],["class","auto-select-subItem-price",4,"ngIf"],[1,"auto-select-subItem-price"],[1,"spacer"],[1,"auto-select-item-img",3,"src"],["class","auto-pickup-items",4,"ngIf"],[1,"auto-pickup-items"],[1,""],[3,"group","isAutoPickup","oibuilder","isNoNeed","collapsibleMode","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","showViewOnlyModifierPopup"],[3,"note","remark"],[1,"combo-footer"],[1,"select-panel","flex"],[1,"div-spacer"],["class","qty-cart-btn flex",4,"ngIf"],["data-testid","combo-customize-button",1,"customize-btn",3,"ngClass"],[3,"click"],["class","customize-dot",4,"ngIf"],[1,"customize-dot"],[1,"qty-cart-btn","flex"],[1,"footer-left"],[1,"flex","items-center"],["mat-button","",1,"qty-button","btn-remove",3,"disabled","click"],["name","remove","size","16","source","mat",1,"flex"],[1,"qty-text"],["mat-button","",1,"qty-button","btn-add",3,"disabled","click"],["name","add","size","16","source","mat",1,"flex"],[1,"addtocart-price"],["appThrottleClick","","mat-flat-button","","data-testid","combo-add-button",1,"completed","add-to-cart-btn","footer-right","inline-ft-btn","key-button","saveOrder-button","item-grid-checkout-btn","w-full",3,"throttleClick"],["clas","flex text-addtocart"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.TgZ(2,"div",2)(3,"div",3)(4,"div",4),t.NdJ("click",function(){return n.enlargeImage(n.mainItem)}),t.TgZ(5,"div",5),t.YNc(6,Gl,2,2,"app-animated-thumbnail",6),t.YNc(7,Rl,2,2,"ng-template",null,7,t.W1O),t.qZA(),t.YNc(9,Vl,1,0,"app-nutri-grade",8),t.qZA(),t.TgZ(10,"div",9)(11,"div",10)(12,"div",11)(13,"h1",12),t._uU(14),t.ALo(15,"i18n"),t.qZA(),t.TgZ(16,"div",13),t.YNc(17,Hl,4,8,"h4",14),t.YNc(18,Kl,2,1,"div",15),t.qZA()(),t.TgZ(19,"div",16),t.YNc(20,Wl,5,3,"div",17),t.qZA(),t.YNc(21,oc,2,1,"div",18),t.YNc(22,rc,3,5,"h2",19),t.ALo(23,"i18n"),t.qZA()()(),t.TgZ(24,"div",20)(25,"div",21),t.YNc(26,Fc,17,14,"ng-container",22),t.YNc(27,Lc,1,1,"app-write-remark",23),t.YNc(28,Bc,1,1,"app-write-remark",23),t.qZA()()(),t.YNc(29,Ec,5,2,"div",24),t.qZA()),2&e){const o=t.MAs(8);t.xp6(1),t.Q6J("back",n.showBack)("closeBackBehaviour",n.isUnlockItem)("close",n.showClose),t.xp6(5),t.Q6J("ngIf",n.hasVideo(n.mainItem))("ngIfElse",o),t.xp6(3),t.Q6J("ngIf",n.showNutriGrade),t.xp6(1),t.Q6J("ngClass",t.DdM(25,$c)),t.xp6(4),t.Oqu(t.xi3(15,18,n.mainItem,n.context.userLang)),t.xp6(3),t.Q6J("ngIf",!(null!=n.mainItem&&n.mainItem.showSpecialPrice)),t.xp6(1),t.Q6J("ngIf",null==n.mainItem?null:n.mainItem.showSpecialPrice),t.xp6(2),t.Q6J("ngIf",n.isShowNutrition),t.xp6(1),t.Q6J("ngIf",null==n.mainItem?null:n.mainItem.tags),t.xp6(1),t.Q6J("ngIf",t.Dn7(23,21,n.mainItem,n.context.userLang,"desc")),t.xp6(3),t.Q6J("ngStyle",t.DdM(26,Rc)),t.xp6(1),t.Q6J("ngForOf",n.groups),t.xp6(1),t.Q6J("ngIf",n.showItemRemark&&!n.editOi),t.xp6(1),t.Q6J("ngIf",n.showItemRemark&&n.editOi),t.xp6(1),t.Q6J("ngIf",!n.orderContext.viewMode||n.orderContext.viewMode&&!!n.isShowBottomCustomizeBtn(n.orderItemBuilder))}},dependencies:[_.mk,_.sg,_.O5,_.PC,Bt.P,q.g,S.o,Lt.r,k.v,J.j,I.lW,gt.i,xe,Yt,M.X$,Se.E,D.G,F.A,rt.y],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%]{margin:0;padding:0}.div-combo-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:2rem 4rem;min-height:0vh;max-height:100%}.img-box[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:center center;min-width:320px;max-width:320px;min-height:320px;max-height:320px}.img-box[_ngcontent-%COMP%]:before{content:"";display:block}.img-box[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:cover;object-position:center;position:absolute;top:0;left:0;bottom:0!important;right:0;color:#fff;text-align:center;width:100%}.tag-grp[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2rem}.tag-grp[_ngcontent-%COMP%]   .food-tag[_ngcontent-%COMP%]{padding:.2rem .6rem;font-size:.8rem;margin-right:.1rem;border-radius:.175rem}.vscroll[_ngcontent-%COMP%]{height:100%;width:100%}.combo-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;-ms-overflow-style:none;scrollbar-width:none;overflow-y:scroll}div[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}.content-bg[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;flex:1 1 auto;overflow:hidden;padding-bottom:6rem}.content-upper[_ngcontent-%COMP%]{overflow-y:auto;flex:1 1 auto;height:100%}.div-top-detail[_ngcontent-%COMP%]{box-sizing:border-box;box-sizing:content-box;flex:0 0 auto;flex-direction:column;justify-self:center;overflow:auto}.div-top-detail[_ngcontent-%COMP%]   .img-box[_ngcontent-%COMP%]{width:100%}.div-top-detail[_ngcontent-%COMP%]   .div-info[_ngcontent-%COMP%]{margin-top:1rem;min-width:320px;max-width:320px}.div-top-detail[_ngcontent-%COMP%]   .title-price-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.div-top-detail[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{display:flex;align-items:flex-end;font-size:16px;font-weight:600;line-height:21px;color:#333;flex:1;margin-right:.5rem}.div-top-detail[_ngcontent-%COMP%]   .description-text[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:18px;color:gray}.div-top-detail[_ngcontent-%COMP%]   .price-text[_ngcontent-%COMP%]{color:var(--P800);font-weight:600;font-size:16px}.div-top-detail[_ngcontent-%COMP%]   .desc-text[_ngcontent-%COMP%]{line-height:1.1em;white-space:pre-wrap}.step-name-select[_ngcontent-%COMP%]{width:100%;border-bottom:none!important;display:flex;flex-direction:column;justify-content:flex-end}.step-name-select[_ngcontent-%COMP%]   .col-right[_ngcontent-%COMP%]{flex-wrap:wrap}.step-name-select[_ngcontent-%COMP%]   .tag-pls-select[_ngcontent-%COMP%]{color:#fff;font-size:8px;font-weight:500;border:1px solid #f04141;background:#f04141;padding:.2rem .3rem;border-radius:20px;height:11px;margin-left:.25rem}.step-name-select[_ngcontent-%COMP%]   .completed-itemgroup-min-max[_ngcontent-%COMP%]   .tag-pls-select[_ngcontent-%COMP%]{background:#1bbb8f;border:1px solid #1bbb8f}.step-name-select[_ngcontent-%COMP%]   .completed-itemgroup-min-max[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#888}.step-name-select[_ngcontent-%COMP%]   .group-weighting[_ngcontent-%COMP%]{background:#1bbb8f;color:#fff;border:1px solid #1bbb8f;font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;height:17px}.step-name-select[_ngcontent-%COMP%]   .test[_ngcontent-%COMP%]   .tag-pls-select[_ngcontent-%COMP%]{background:#2b1bbb;border:1px solid #1bbb8f}.step-name-select[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:#ec2227;margin-left:.25rem;margin-right:.25rem}.step-name-select[_ngcontent-%COMP%]   .modifier-btn[_ngcontent-%COMP%]{border:1px solid #f04141;background:white;font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;color:#f04141}.step-name-select[_ngcontent-%COMP%]   .modifier-btn.itemgroup-modifier-all-completed[_ngcontent-%COMP%]{border-color:#1bbb8f;color:#1bbb8f}.step-name-select[_ngcontent-%COMP%]   .step-no[_ngcontent-%COMP%]{margin-bottom:.4rem;height:.8rem}.step-name-select[_ngcontent-%COMP%]   .step-no[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{background:var(--P300);color:var(--PC300);display:flex;align-items:center;padding:.5rem .3rem;font-size:.6rem}.step-name-select[_ngcontent-%COMP%]   .step-triangle[_ngcontent-%COMP%]{width:0px;height:0px;border-top:8px solid transparent;
1border-bottom:8px solid transparent;border-right:6px solid var(--P300)}.step-name-select[_ngcontent-%COMP%]   .step-text[_ngcontent-%COMP%]{line-height:normal;font-size:.6rem}.step-name-select[_ngcontent-%COMP%]   h2.sub-item-grp-name[_ngcontent-%COMP%]{font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.step-name-select[_ngcontent-%COMP%]   ul.item-selected[_ngcontent-%COMP%]{padding:.25rem 0rem .5rem;color:#333;font-size:.8rem;display:flex;flex-wrap:wrap;column-gap:2rem;list-style-type:none!important;margin-left:0!important}.step-name-select[_ngcontent-%COMP%]   ul.item-selected[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:.25rem}.step-name-select[_ngcontent-%COMP%]   ul.item-selected[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{content:"\\2022";color:var(--P);display:inline-block;width:.75em}.item-group[_ngcontent-%COMP%]{overflow:hidden}.modifier-col[_ngcontent-%COMP%]{flex:0 0 auto}.div-expand-icon-outer[_ngcontent-%COMP%]{margin-left:.5rem}.name-n-select[_ngcontent-%COMP%]{flex:1 1 auto;line-height:2rem}.select-n-required[_ngcontent-%COMP%]{display:flex;align-items:center;flex:0 0 auto}.auto-select-box[_ngcontent-%COMP%]{padding:0 1.5rem}.auto-select-box[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:.9rem}.auto-select-box.item-has-img[_ngcontent-%COMP%]   .selected-item[_ngcontent-%COMP%]{align-items:center}.auto-select-items[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin:.5rem 0 1rem;align-items:flex-start;justify-content:flex-start}.auto-select-items[_ngcontent-%COMP%]   .selected-item__name[_ngcontent-%COMP%]{width:100%}.selected-item[_ngcontent-%COMP%]{width:calc(50% - 1rem);flex:1 1 calc(50% - 1rem);display:flex;flex-direction:row;margin:.2rem 0}.selected-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:.9rem;text-transform:capitalize;font-weight:400;margin-left:.3rem;line-height:1.5em;color:#818181}.selected-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.9rem;line-height:1.5em;margin-left:.3rem;color:#818181}.selected-item[_ngcontent-%COMP%]   app-img.auto-select-item-img[_ngcontent-%COMP%]{width:5rem;height:5rem;display:none;margin-left:.5rem}.tick-icon[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;background:#19c376;color:var(--PC);border-radius:500px;padding:.5rem}.tick-icon[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:700;margin-left:0;color:#fff}.combo-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;background:#fff;padding:1rem 8rem;flex:0 0 auto;box-shadow:0 4px 26px #0000000d;z-index:1;border-top:solid .5rem #f1f1f1}.combo-footer[_ngcontent-%COMP%]   .addtocart-price[_ngcontent-%COMP%]{display:flex;font-size:24px;font-weight:600;line-height:32px;color:var(--P)}.combo-footer[_ngcontent-%COMP%]   .div-spacer[_ngcontent-%COMP%]{flex-grow:1}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]{flex:1;background:var(--P);color:var(--PC);padding-top:.5rem;padding-bottom:.5rem;font-size:1rem;line-height:26px}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn.not-completed[_ngcontent-%COMP%]{background:#f3f4f7;color:#c6c6c6}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper{display:flex;width:100%;justify-content:center}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper .left-spacer{flex:1 0 25%}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper .text-addtocart{justify-content:center;flex:1 0 50%;font-size:1rem}.combo-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper .addtocart-price{display:flex;font-size:24px;font-weight:600;line-height:32px;color:var(--P)}.auto-pickup-items[_ngcontent-%COMP%]{justify-content:space-between;margin-top:.25rem;margin-bottom:.5rem;align-items:center}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]{padding:0 1rem 1rem}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:.7rem;line-height:1em;padding:.3rem;color:var(--P)}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:.3rem}.div-sub-item-grp[_ngcontent-%COMP%]{position:sticky;top:0;z-index:1;border-bottom:none!important;background:#ffffff;padding:0 1rem .4rem;display:flex;align-items:flex-end;min-height:50px}.set-sub-item-grp-mt[_ngcontent-%COMP%]{margin-top:.5rem}.item-group[_ngcontent-%COMP%]:last-of-type{margin-bottom:20px}.qty-text[_ngcontent-%COMP%]{line-height:normal;font-size:14px;font-weight:500;color:#333}.qty-cart-btn[_ngcontent-%COMP%]   .footer-left[_ngcontent-%COMP%]{display:flex;align-items:center;flex:3}.btn-add[_ngcontent-%COMP%]{min-width:24px;height:24px;min-width:unset;border-radius:20px;border:solid 1px var(--P);color:#fff;background-color:var(--P);padding:.1rem .2rem;margin-left:10px;margin-right:10px}.btn-remove[_ngcontent-%COMP%]{min-width:24px;height:24px;min-width:unset;border-radius:20px;border:solid 1px var(--P);color:var(--P);background-color:#fff;padding:.1rem .2rem;margin-left:10px;margin-right:10px}.shake-anime[_ngcontent-%COMP%]{animation:hori-shake .5s ease-in-out}@keyframes hori-shake{0%,to{transform:translateZ(0)}20%,60%{transform:translate3d(-10px,0,0)}40%,80%{transform:translate3d(10px,0,0)}}.nutrients-container[_ngcontent-%COMP%]{margin-top:.5rem}.nutrients-container[_ngcontent-%COMP%]   .nutrients[_ngcontent-%COMP%]{border:1px solid #1bbb8f;padding-left:.5rem;padding-right:.5rem;border-radius:5px;color:#1bbb8f}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.div-sub-item-grp[_ngcontent-%COMP%]{min-height:42px}.addtocart-price[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--P)}.title-text[_ngcontent-%COMP%]{font-size:1.1rem}.div-top-detail[_ngcontent-%COMP%]{border-radius:10px}.div-top-detail[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{font-size:14px;font-weight:600}.div-top-detail[_ngcontent-%COMP%]   .description-text[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:18px}.div-top-detail[_ngcontent-%COMP%]   .price-text[_ngcontent-%COMP%]{font-weight:600;font-size:14px}.div-sub-item-grp[_ngcontent-%COMP%]{padding:0 1rem .2rem}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper{justify-content:center}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper .left-spacer{display:none}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper .addtocart-price{flex:unset!important;margin-left:2rem;font-size:24px;font-weight:600;line-height:32px;color:var(--P)}.auto-select-box[_ngcontent-%COMP%]{padding:0 1.1rem}.auto-select-items[_ngcontent-%COMP%]{margin-bottom:1.5rem}.auto-select-subItem-spacer[_ngcontent-%COMP%]{flex:1 1 0}.selected-item[_ngcontent-%COMP%]{width:100%;flex:1 1 100%}.selected-item[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin-left:.5rem}.left-info[_ngcontent-%COMP%]{flex:0 0 65%}.right-img[_ngcontent-%COMP%]{display:flex;justify-content:center}}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}ul[_ngcontent-%COMP%]{display:grid;grid-template-columns:1.5fr 1fr;margin-left:1.25rem;margin-top:.25rem;line-height:150%;list-style-type:disc!important}@media not screen and (min-width: 375px){.text-addtocart[_ngcontent-%COMP%]{white-space:pre-line}}.icon-expand[_ngcontent-%COMP%]{color:var(--P);cursor:pointer;transform:rotate(0);transition:transform .3s ease-in-out}.icon-expand.expanded[_ngcontent-%COMP%]{transform:rotate(180deg)}.div-sub-item-grp-collapsible[_ngcontent-%COMP%]{height:auto;cursor:pointer;padding-top:.3rem}.div-sub-item-grp-collapsible[_ngcontent-%COMP%]:active{background:#e9e9e9}.qty-button[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none}@media screen and (max-width: 299px){.qty-button[_ngcontent-%COMP%]{min-width:40px;padding:0}}.item-special-price[_ngcontent-%COMP%]{padding-top:.5rem}.auto-pu-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:.4rem}.auto-pu-left[_ngcontent-%COMP%]   .div-served-with[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:.15rem;background:#b7b7b7;color:#fff;font-size:.7rem;padding:.2rem .3rem;border-radius:.2rem;width:fit-content}.auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]{font-size:.8rem}.auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]   .default-details[_ngcontent-%COMP%]{line-height:1.2em}.auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]:not(:last-child):after{content:","}.selected-n-items[_ngcontent-%COMP%]{color:var(--PC);border:1px solid var(--P);background:var(--P);font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;height:17px}.content-nutri-grade[_ngcontent-%COMP%]{padding-top:.5rem}@media only screen and (max-width: 600px){.div-combo-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:none;gap:10px;padding:1rem}.div-top-detail[_ngcontent-%COMP%]{min-height:25vh}.img-box[_ngcontent-%COMP%]{min-width:250px;max-width:250px;min-height:250px;max-height:250px}.combo-footer[_ngcontent-%COMP%]{position:absolute;bottom:0;width:100%;background:#fff;padding:.5rem 1rem;flex:0 0 auto;box-shadow:0 4px 26px #0000000d;z-index:1}.combo-footer[_ngcontent-%COMP%]   .addtocart-price[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--P)}.footer-left[_ngcontent-%COMP%]{justify-content:space-between}.panel-add-remove[_ngcontent-%COMP%]{margin-left:0;width:100%}.footer-price[_ngcontent-%COMP%]{width:100%;justify-content:end;margin:0}.qty-cart-btn[_ngcontent-%COMP%]{flex-direction:column}.footer-right[_ngcontent-%COMP%]{margin-top:.3rem}}'],data:{animation:[Je.U7]}}),i})();var Le=u(15612);let Be=(()=>{class i{constructor(e,n,o,r,l){this.dialogService=e,this.matDialog=n,this.routingService=r,this.route=l,console.log("byod dialog root constructor"),e.setDialogController(n),e.setSnackBar(o)}ngOnInit(){}ngAfterViewInit(){}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(C.xA),t.Y36(W.uw),t.Y36(Kt.ux),t.Y36(Le.Z),t.Y36(_t.gz))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-root"]],decls:1,vars:0,template:function(e,n){1&e&&t._UZ(0,"router-outlet")},dependencies:[_t.lC],styles:["[_nghost-%COMP%]{display:block;height:100%}"]}),i})();function Vc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-tab",11),t.ALo(1,"i18n"),t.TgZ(2,"app-item-modifiers",12),t.NdJ("itemClicked",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.itemClicked(o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.minusClicked(o))}),t.qZA()()}if(2&i){const e=a.$implicit,n=t.oxw();t.Q6J("label",t.xi3(1,5,e,n.context.userLang)),t.xp6(2),t.Q6J("mdBuilder",n.mdBuilder)("store",n.store)("item",e)("isEdit",n.isEdit)}}function Hc(i,a){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.TgZ(2,"i"),t._uU(3,","),t.qZA()()),2&i){const e=t.oxw().$implicit,n=t.oxw();
1t.xp6(1),t.hij("",n.modifierService.getModifierItemDisplay(e)," ")}}function Kc(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Hc,4,1,"span",13),t.BQk()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e)}}let Wc=(()=>{class i extends Ot{constructor(e){super(e),this.injector=e}ngOnInit(){this.initData()}ngAfterContentChecked(){this.cd.detectChanges()}initData(){var e,n,o,r,l,c,s;this.input=this.navParams.input,console.log("ItemModifiersDialogComponent input",this.input),this.ig=this.input.group,this.item=null===(e=this.input)||void 0===e?void 0:e.item,this.store=null===(n=this.input)||void 0===n?void 0:n.store,this.orderContext=null===(o=this.input)||void 0===o?void 0:o.orderContext,this.oibuilder=null===(r=this.input)||void 0===r?void 0:r.oibuilder,this.isEdit=null===(l=this.input)||void 0===l?void 0:l.isEdit;let d=null===(c=this.oibuilder)||void 0===c?void 0:c.build();this.mdBuilder=new Mt.u(this.store,d);let m=this.mdBuilder.findItems(d);m=null==m?void 0:m.filter(p=>{var h;return(null==p?void 0:p.id)===(null===(h=this.item)||void 0===h?void 0:h.id)}),this.modifiableItems=m,this.mods=null===(s=this.modifierService)||void 0===s?void 0:s.setModSelected(this.mdBuilder)}confirmClicked(){this.isCompleted()?(this.mdBuilder.build(),this.dialogService.submitAuxDialog({mdBuilder:this.mdBuilder})):this.scrollTo()}closeDialog(){this.dialogService.submitAuxDialog()}itemClicked(e){console.log("ItemModifiersDialogComponent itemClicked",e);let{item:n,group:o,mItem:r}=e;super.itemClicked(n,o,r)}minusClicked(e){console.log("ItemModifiersDialogComponent minusClicked",e);let{item:n,group:o,mItem:r}=e;super.minusClicked(n,o,r)}updateMdBuilder(e){console.log("ItemModifiersDialogComponent updateMdBuilder",e)}scrollTo(){let e=null;for(const o of this.modifiableItems){for(const r of o.mgroups)if(0==this.isGroupCompleted(o,r)&&(this.selected=this.modifiableItems.indexOf(o),e=this.isGroupCompletedIndex(o,r)),null!=e)break;if(null!=e)break}const n=document.getElementById("section-"+e);n&&n.scrollIntoView({behavior:"smooth"})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-item-modifiers-dialog"]],features:[t.qOj],decls:18,vars:10,consts:[[1,"items-modifiers"],[1,"header","flex","items-center"],[1,"spacer"],[1,"nav-title"],["mat-icon-button","",3,"click"],[3,"selectedIndex","selectedIndexChange"],[3,"label",4,"ngFor","ngForOf"],[1,"hidden"],[4,"ngFor","ngForOf"],[1,"footer-row","flex","justify-center","py-4","px-6"],["mat-flat-button","",1,"w-full","btn-confirm",3,"click"],[3,"label"],[3,"mdBuilder","store","item","isEdit","itemClicked","minusClicked"],[4,"ngIf"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"
1span",2),t.TgZ(3,"span",3),t._uU(4),t.ALo(5,"i18n"),t.qZA(),t.TgZ(6,"button",4),t.NdJ("click",function(){return n.closeDialog()}),t.TgZ(7,"mat-icon"),t._uU(8,"close"),t.qZA()()(),t.TgZ(9,"mat-tab-group",5),t.NdJ("selectedIndexChange",function(r){return n.selected=r}),t.YNc(10,Vc,3,8,"mat-tab",6),t.qZA(),t.TgZ(11,"div",7),t.YNc(12,Kc,2,1,"ng-container",8),t.qZA(),t.TgZ(13,"div",9)(14,"button",10),t.NdJ("click",function(){return n.confirmClicked()}),t.TgZ(15,"p"),t._uU(16),t.ALo(17,"translate"),t.qZA()()()()),2&e&&(t.xp6(4),t.hij("",t.xi3(5,5,n.ig,n.context.userLang)," "),t.xp6(5),t.Q6J("selectedIndex",n.selected),t.xp6(1),t.Q6J("ngForOf",n.modifiableItems),t.xp6(2),t.Q6J("ngForOf",n.mods),t.xp6(4),t.hij(" ",t.lcZ(17,8,n.isCompleted()?"byod.dialogs.segment-modifiers-dialog.confirm":"byod.dialogs.segment-modifiers-dialog.next")," "))},dependencies:[_.sg,_.O5,z.Hw,X.SP,X.uX,I.lW,Ut,M.X$,D.G],styles:["[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}.items-modifiers[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.header[_ngcontent-%COMP%]{background:#fff;padding:.5rem 1.5rem}.header[_ngcontent-%COMP%]   .spacer[_ngcontent-%COMP%]{width:40px}.header[_ngcontent-%COMP%]   .nav-title[_ngcontent-%COMP%]{flex-grow:1;text-align:center;font-weight:700;color:var(--P800);font-size:1.1rem}.header[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--P800)}.select-n-required[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{margin:0;font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-n-required[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#f04141;margin-left:.5rem;font-size:.65rem}.select-n-required.completed[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{background:#1bbb8f!important}.select-n-required.completed[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:gray!important}mat-tab-group[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-header{overflow-x:auto!important}mat-tab-group[_ngcontent-%COMP%]  .mat-ink-bar{display:block!important}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-labels{padding:0 1.5rem}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-label-content{margin-right:1rem}.modifier-choices[_ngcontent-%COMP%]{padding:0 1.5rem}.footer-row[_ngcontent-%COMP%]{background:#fff}.footer-row[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);text-transform:uppercase;width:100%;padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px}.mat-tab-group[_ngcontent-%COMP%]  .mat-tab-body-content{height:auto}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.header[_ngcontent-%COMP%]{padding:.5rem 1rem}mat-tab-group[_ngcontent-%COMP%]   .mat-tab-labels[_ngcontent-%COMP%]{padding:0 1rem!important}.modifier-choices[_ngcontent-%COMP%]{padding:0 1rem 1rem}.footer-row[_ngcontent-%COMP%]{padding:1rem!important}}"]}),i})();function Xc(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.KtG(o.message="")}),t._UZ(1,"app-icon",16),t.qZA()}}function ts(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",11)(2,"mat-form-field",12)(3,"mat-label"),t._uU(4),t.qZA(),t.TgZ(5,"input",13),t.NdJ("ngModelChange",function(o){const l=t.CHM(e).$implicit;return t.KtG(l.message=o)}),t.qZA(),t.YNc(6,Xc,2,0,"button",14),t.qZA()(),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw();t.xp6(2),t.Q6J("floatLabel",n.floatLabelControl),t.xp6(2),t.Oqu(e.placeholder),t.xp6(1),t.Q6J("ngModel",e.message),t.uIk("maxLength",n.input.data.messageMaxLength),t.xp6(1),t.Q6J("ngIf",e.message)}}const es=function(i){return{"allCompleted-full-fill":i}};function ns(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",17),t.NdJ("throttleClick",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.confirmClicked(o.input.data))}),t.TgZ(1,"div",18),t._uU(2," Confirm "),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("ngClass",t.VKq(2,es,e.isLineCompleted()))("disabled",!e.isLineCompleted())}}const is=function(){return{show:!0}};let Ye=(()=>{class i extends at{constructor(e,n){super(e),this.injector=e,this.cartService=n,this.Message="Item Message",this.subtitleText="Please enter your message",this.lineNumber="line",this.floatLabelControl="auto"}ngOnInit(){this.initData()}initData(){this.input=this.navParams.input,this.msgLimit=this.input.data.messageLimit,this.numSequence(this.input.data.messageLimit),console.log("Item remark input",this.input)}numSequence(e){var n,o,r,l,c,s;let d=[];if(null!==(r=null===(o=null===(n=this.input)||void 0===n?void 0:n.data)||void 0===o?void 0:o.custom)&&void 0!==r&&r.message)for(let m=1;m<e+1;m++)d.push({placeholder:"line "+m,message:null===(s=null===(c=null===(l=this.input)||void 0===l?void 0:l.data)||void 0===c?void 0:c.custom)||void 0===s?void 0:s.message[m-1]});else for(let m=1;m<e+1;m++)d.push({placeholder:"line "+m,message:""});this.lineMsg=d,console.log("line msg remark input",this.lineMsg)}isLineCompleted(){let e;return this.lineMsg.map(n=>{n.message&&(e=!0)}),!!e}confirmClicked(e){const o={message:this.lineMsg.map(r=>r.message).filter(r=>r&&""!=r.trim())};console.log("item model msg formatted: ",e,"msg: ",o),e.custom=o,this.dialogService.submitAuxDialog(e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(pt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-item-remark-dialog"]],features:[t.qOj],decls:15,vars:7,consts:[[1,"remark-container"],[3,"title"],[1,"p-4","h-full","mb-16"],[1,"title-text","py-1"],[1,"mb-2","mt-6","subtitle-text"],["itemSize","50",1,"h-full","w-full"],[4,"ngFor","ngForOf"],[1,"remark-footer"],[1,"qty-cart-btn","flex"],[3,"ngTemplateOutletContext","ngTemplateOutlet"],["selfie",""],[1,"pb-1"],["appearance","fill",1,"w-full","capitalize",3,"floatLabel"],["matInput","","type","text",3,"ngModel","ngModelChange"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click",4,"ngIf"],["matSuffix","","mat-icon-button","","aria-label","Clear",3,"click"],["name","clear","size","16","source","mat"],["appThrottleClick","","mat-flat-button","",1,"customize-btn","ewrwer","footer-right","inline-ft-btn","key-button","saveOrder-button","item-grid-checkout-btn","w-full",3,"ngClass","disabled","throttleClick"],["clas","flex text-addtocart"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.TgZ(2,"div",2)(3,"div",3)(4,"p"),t._uU(5),t.qZA()(),t.TgZ(6,"div",4),t._uU(7),t.qZA(),t.TgZ(8,"cdk-virtual-scroll-viewport",5),t.YNc(9,ts,7,5,"ng-container",6),t.qZA()(),t.TgZ(10,"div",7)(11,"div",8),t.ynx(12),t.YNc(13,ns,3,4,"ng-template",9,10,t.W1O),t.BQk(),t.qZA()()()),2&e){const o=t.MAs(14);t.xp6(1),t.Q6J("title",n.Message),t.xp6(4),t.Oqu(n.input.data.name),t.xp6(2),t.Oqu(n.subtitleText),t.xp6(2),t.Q6J("ngForOf",n.lineMsg),t.xp6(4),t.Q6J("ngTemplateOutletContext",t.DdM(6,is))("ngTemplateOutlet",o)}},dependencies:[_.mk,_.sg,_.O5,_.tP,g.Fj,g.JJ,g.On,S.o,k.v,J.j,I.lW,Z.KE,Z.hX,Z.R9,j.Nt,tt.xd,tt.N7],styles:['.remark-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;-ms-overflow-style:none;scrollbar-width:none;margin:2px;background:#fff}[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ng
1content-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%]{margin:0;padding:0}.img-box[_ngcontent-%COMP%]{position:relative;overflow:hidden;background:transparent;background-size:cover;background-repeat:no-repeat;background-position:center center}.img-box[_ngcontent-%COMP%]:before{content:"";display:block}.img-box[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{object-fit:cover;object-position:center;position:absolute;top:0;left:0;bottom:0!important;right:0;color:#fff;text-align:center;width:100%}.vscroll[_ngcontent-%COMP%]{height:100%;width:100%}.combo-container[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;-ms-overflow-style:none;scrollbar-width:none;overflow-y:scroll}div[_ngcontent-%COMP%]::-webkit-scrollbar{display:none}div.content-bg[_ngcontent-%COMP%]{background:#f9f9f9;display:flex;flex-direction:column;height:100%;flex:1 1 auto;overflow:hidden}div.content-upper[_ngcontent-%COMP%]{overflow-y:auto;flex:1 1 auto}  .mat-icon-button{line-height:20px}div.div-top-detail[_ngcontent-%COMP%]{background:#fff;border-top:1px solid #eee;border-bottom:1px solid #eee;box-shadow:1px 1px 9px #0000000d;padding:1rem 1.5rem}div.div-top-detail[_ngcontent-%COMP%]   .img-box[_ngcontent-%COMP%]{width:7rem;border-radius:0 5px 0 2.5rem;box-shadow:.15rem .15rem .3rem #00000026}div.div-top-detail[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{font-size:1.25rem}div.div-top-detail[_ngcontent-%COMP%]   .price-text[_ngcontent-%COMP%]{color:var(--P800);font-weight:400;font-size:1.1rem}div.step-name-select[_ngcontent-%COMP%]{position:sticky;top:-1px;z-index:1;border-bottom:none!important;background:#fafafa;margin:.5rem 1.5rem;display:flex;flex-direction:column;justify-content:flex-end}div.step-name-select[_ngcontent-%COMP%]   .col-right[_ngcontent-%COMP%]{flex-wrap:wrap}div.step-name-select[_ngcontent-%COMP%]   .tag-pls-select[_ngcontent-%COMP%]{color:#fff;border:1px solid #f04141;background:#f04141;font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;height:17px}div.step-name-select[_ngcontent-%COMP%]   .completed-itemgroup-min-max[_ngcontent-%COMP%]   .tag-pls-select[_ngcontent-%COMP%]{background:#1bbb8f;border:1px solid #1bbb8f}div.step-name-select[_ngcontent-%COMP%]   .completed-itemgroup-min-max[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#888}div.step-name-select[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#f04141}div.step-name-select[_ngcontent-%COMP%]   .modifier-btn[_ngcontent-%COMP%]{border:1px solid #f04141;background:white;font-size:.6rem;padding:.2rem .5rem;border-radius:.2rem;color:#f04141}div.step-name-select[_ngcontent-%COMP%]   .modifier-btn.itemgroup-modifier-all-completed[_ngcontent-%COMP%]{border-color:#1bbb8f;color:#1bbb8f}div.step-name-select[_ngcontent-%COMP%]   div.step-no[_ngcontent-%COMP%]{margin-bottom:.4rem;height:.8rem}div.step-name-select[_ngcontent-%COMP%]   div.step-no[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{background:var(--P300);color:var(--PC300);display:flex;align-items:center;padding:.15rem .3rem;font-size:.6rem!important}div.step-name-select[_ngcontent-%COMP%]   div.step-triangle[_ngcontent-%COMP%]{width:0px;height:0px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:5px solid var(--P300)}div.step-name-select[_ngcontent-%COMP%]   h2.sub-item-grp-name[_ngcontent-%COMP%]{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.modifier-col[_ngcontent-%COMP%]{height:17px}div.remark-footer[_ngcontent-%COMP%]{background:#fff;padding:.8rem 1rem;flex:0 0 auto;box-shadow:0 -3px 8px #86868612;z-index:1}div.remark-footer[_ngcontent-%COMP%]   .customize-btn[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);padding-top:.5rem;padding-bottom:.5rem;font-size:1rem;line-height:26px}div.remark-footer[_ngcontent-%COMP%]   .div-spacer[_ngcontent-%COMP%]{flex-grow:1}div.remark-footer[_ngcontent-%COMP%]   .customize-dot[_ngcontent-%COMP%]{width:.5rem;height:.5rem;background:#f04141;border-radius:100rem;position:absolute;top:-4px;right:-5px}div.remark-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);padding-top:.5rem;padding-bottom:.5rem;font-size:1rem;line-height:26px}div.remark-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper{display:flex;width:100%;justify-content:center}div.remark-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.left-spacer{flex:1 0 25%}div.remark-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.text-addtocart{justify-content:center;flex:1 0 50%;font-size:1rem}div.remark-footer[_ngcontent-%COMP%]   .add-to-cart-btn[_ngcontent-%COMP%]     .mat-button-wrapper div.addtocart-price{display:flex;justify-content:flex-end;flex:1 0 25%;font-size:1rem}.qty-cart-btn[_ngcontent-%COMP%]{margin-top:.5rem}.qty-cart-btn[_ngcontent-%COMP%]   .btn-remove[_ngcontent-%COMP%]{color:#c4c4c4;padding-left:0;min-width:unset}.qty-cart-btn[_ngcontent-%COMP%]   .btn-add[_ngcontent-%COMP%]{color:var(--P)}.title-text[_ngcontent-%COMP%]{color:var(--P800);font-weight:700;font-size:1rem;border-bottom:2px solid var(--P800)}.subtitle-text[_ngcontent-%COMP%]{font-weight:400;font-size:1rem}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.title-text[_ngcontent-%COMP%]{font-size:1.1rem}.div-top-detail[_ngcontent-%COMP%]   .img-box[_ngcontent-%COMP%]{width:6rem!important}div.step-name-select[_ngcontent-%COMP%]{margin:1rem 1rem .5rem}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper{justify-content:center}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper .left-spacer{display:none}.add-to-cart-btn[_ngcontent-%COMP%]  .mat-button-wrapper .addtocart-price{flex:unset!important;margin-left:.5rem}}@media not screen and (min-width: 375px){.text-addtocart[_ngcontent-%COMP%]{white-space:pre-line}}']}),i})();
1const os=["MultiStepper"],rs=["ScrollContent"];function as(i,a){if(1&i&&(t.TgZ(0,"div",26)(1,"div",27),t._UZ(2,"app-img",28),t.qZA()()),2&i){const e=t.oxw();t.xp6(2),t.s9C("src",(null==e.baseItem?null:e.baseItem.getImage("default",360,!0))||e.getDefaultImage(!1,e.store.brand,500)),t.Q6J("ratio",4/3)}}function ls(i,a){if(1&i&&(t.TgZ(0,"h2",29),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Oqu(t.Dn7(2,1,e.baseItem,e.context.userLang,"desc"))}}function cs(i,a){if(1&i&&(t.TgZ(0,"p",42),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij(" ",t.Dn7(2,1,e,n.context.userLang,"desc")," ")}}function ss(i,a){if(1&i&&(t.TgZ(0,"h5",43),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij(" ",t.Dn7(2,1,t.lcZ(3,5,e),!0,n.context)," ")}}function ds(i,a){1&i&&t._UZ(0,"app-icon",44)}const ms=function(i,a){return{isSoldOut:i,selected:a}};function gs(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",30),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(!l.isSoldout(r)&&l.clickVariationsItem(r))}),t.TgZ(2,"div",31)(3,"div",32)(4,"h3"),t._uU(5),t.ALo(6,"translate"),t.qZA()()(),t.TgZ(7,"div",27),t._UZ(8,"app-img",33)(9,"app-nutri-grade",34),t.qZA(),t.TgZ(10,"div",35)(11,"h3",36),t._uU(12),t.ALo(13,"i18n"),t.qZA(),t.YNc(14,cs,3,5,"p",37),t._UZ(15,"span",38),t.YNc(16,ss,4,7,"h5",39),t.qZA(),t.TgZ(17,"div",40),t.YNc(18,ds,1,0,"app-icon",41),t.qZA()(),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.WLB(14,ms,n.isSoldout(e),(null==e?null:e.id)===(null==n.mainItem?null:n.mainItem.id))),t.xp6(4),t.Oqu(t.lcZ(6,9,"byod.components.mg-item-list.soldout")),t.xp6(3),t.Q6J("content",e)("ratio",1),t.xp6(1),t.Q6J("item",e),t.xp6(3),t.Oqu(t.xi3(13,11,e,n.context.userLang)),t.xp6(2),t.Q6J("ngIf",null==e?null:e.desc),t.xp6(2),t.Q6J("ngIf",!n.hideZeroPrice),t.xp6(2),t.Q6J("ngIf",(null==e?null:e.id)===(null==n.mainItem?null:n.mainItem.id))}}function ps(i,a){1&i&&(t.TgZ(0,"div"),t._UZ(1,"app-nutri-grade",47),t.qZA())}function us(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-step",45),t.NdJ("interacted",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.beforeNextSteper(o))}),t.YNc(1,ps,2,0,"div",16),t.TgZ(2,"app-main-item-modifiers",46),t.NdJ("updateMdBuilder",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.updateMdBuilder(o))}),t.qZA()()}if(2&i){const e=t.oxw();t.Q6J("completed",e.isMainItemModStepCompleted()),t.xp6(1),t.Q6J("ngIf",e.checkMGroup(null==e.mainItem||null==e.mainItem.mgroups?null:e.mainItem.mgroups[0].items)),t.xp6(1),t.Q6J("orderItemBuilder",e.orderItemBuilder)("mdBuilder",e.modifierBuilder)("isEdit",!!e.editOi)("store",e.store)("originItem",e.mainItem)}}function _s(i,a){1&i&&(t.TgZ(0,"div"),t._UZ(1,"app-nutri-grade",47),t.qZA())}function fs(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select-max")," "))}function hs(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select"),""))}function xs(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"strong"),t._uU(2),t.qZA(),t.TgZ(3,"strong"),t._uU(4,"\xa0-"),t.qZA(),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(2),t.hij("\xa0",e.min,"")}}function vs(i,a){1&i&&(t.TgZ(0,"h6",60),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" *",t.lcZ(2,1,"byod.dialogs.combo-dialog.require")," "))}const ze=function(i){return{completed:i}},je=function(i){return{itemCount:i}};function Cs(i,a){if(1&i&&(t.TgZ(0,"h6",61),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("ngClass",t.VKq(5,ze,n.isCompletedGroupMinMax(e))),t.xp6(1),t.hij(" ",t.xi3(2,2,"byod.dialogs.combo-dialog.selected-items",t.VKq(7,je,n.getGItemCount(e)))," ")}}function bs(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",56),t.YNc(2,fs,3,3,"ng-container",16),t.YNc(3,hs,3,3,"ng-container",16),t.TgZ(4,"span",57),t.YNc(5,xs,5,1,"ng-container",16),t.TgZ(6,"strong"),t._uU(7),t.qZA()(),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.YNc(10,vs,3,3,"h6",58),t._UZ(11,"span",38),t.YNc(12,Cs,3,9,"h6",59),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(2),t.Q6J("ngIf",null==e?null:e.optional),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.optional)),t.xp6(2),t.Q6J("ngIf",e.min!=e.max),t.xp6(2),t.hij("\xa0",e.max,"\xa0"),t.xp6(1),t.hij("",t.lcZ(9,7,"byod.dialogs.combo-dialog.
1items")," "),t.xp6(2),t.Q6J("ngIf",0!=e.min),t.xp6(2),t.Q6J("ngIf",n.getGItemCount(e)>0)}}function Ms(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select-max")," "))}function Os(i,a){1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.combo-dialog.please-select"),""))}function ys(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"strong"),t._uU(2),t.qZA(),t.TgZ(3,"strong"),t._uU(4,"\xa0-"),t.qZA(),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(2),t.hij("\xa0",e.minItemWeighting,"")}}function Ps(i,a){1&i&&(t.TgZ(0,"h6",60),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" *",t.lcZ(2,1,"byod.dialogs.combo-dialog.require")," "))}function Is(i,a){if(1&i&&(t.TgZ(0,"h6",61),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("ngClass",t.VKq(5,ze,n.isCompletedGroupMinMax(e))),t.xp6(1),t.hij(" ",t.xi3(2,2,"byod.dialogs.combo-dialog.selected-items",t.VKq(7,je,n.orderItemBuilder.getTotalWeightOfAllSelectedItemsInItemGroup(e)))," ")}}function ws(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",56),t.YNc(2,Ms,3,3,"ng-container",16),t.YNc(3,Os,3,3,"ng-container",16),t.TgZ(4,"span",57),t.YNc(5,ys,5,1,"ng-container",16),t.TgZ(6,"strong"),t._uU(7),t.qZA()(),t._uU(8),t.ALo(9,"translate"),t.qZA(),t.YNc(10,Ps,3,3,"h6",58),t._UZ(11,"span",38),t.YNc(12,Is,3,9,"h6",59),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(2),t.Q6J("ngIf",null==e?null:e.optional),t.xp6(1),t.Q6J("ngIf",!(null!=e&&e.optional)),t.xp6(2),t.Q6J("ngIf",e.minItemWeighting!=e.maxItemWeighting),t.xp6(2),t.hij("\xa0",e.maxItemWeighting,"\xa0"),t.xp6(1),t.hij("",t.lcZ(9,7,"byod.dialogs.combo-dialog.items")," "),t.xp6(2),t.Q6J("ngIf",0!=e.minItemWeighting),t.xp6(2),t.Q6J("ngIf",n.orderItemBuilder.getTotalWeightOfAllSelectedItemsInItemGroup(e)>0)}}function ks(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"app-mg-item-list-with-img",64),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.mgitemClick(r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(2);return t.KtG(c.clickedNoNeed(r,l))})("updateMdBuilder",function(o){t.CHM(e);const r=t.oxw(4);return t.KtG(r.updateMdBuilder(o))}),t.qZA(),t.BQk()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("group",e)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("oibuilder",n.orderItemBuilder)("$UpdateMdbuilderSubject",n.$GroupItemModifierFinished)("isUnlockItem",n.isUnlockItem)}}function Ts(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-mg-item-grid",65),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.mgitemClick(r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(2);return t.KtG(c.clickedNoNeed(r,l))})("updateMdBuilder",function(o){t.CHM(e);const r=t.oxw(4);return t.KtG(r.updateMdBuilder(o))}),t.qZA()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.Q6J("group",e)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("oibuilder",n.orderItemBuilder)("cols",2)("$UpdateMdbuilderSubject",n.$GroupItemModifierFinished)("isUnlockItem",n.isUnlockItem)}}function Zs(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",62),t.YNc(2,ks,2,5,"ng-container",54),t.YNc(3,Ts,1,6,"ng-template",null,63,t.W1O),t.qZA(),t.BQk()),2&i){const e=t.MAs(4),n=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",(null==n||null==n.items?null:n.items.length)>4)("ngIfElse",e)}}function As(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",62)(1,"app-mg-item-list-with-img",64),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.mgitemClick(r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(2);return t.KtG(c.clickedNoNeed(r,l))})("updateMdBuilder",function(o){t.CHM(e);const r=t.oxw(4);return t.KtG(r.updateMdBuilder(o))}),t.qZA()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("group",e)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("oibuilder",n.orderItemBuilder)("$UpdateMdbuilderSubject",n.$GroupItemModifierFinis
1hed)("isUnlockItem",n.isUnlockItem)}}function Ss(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",62)(1,"app-mg-item-grid",65),t.NdJ("mgitemClick",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.mgitemClick(r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw(2).$implicit,l=t.oxw(2);return t.KtG(l.minusClicked(r,o))})("clickedNoNeed",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(2);return t.KtG(c.clickedNoNeed(r,l))})("updateMdBuilder",function(o){t.CHM(e);const r=t.oxw(4);return t.KtG(r.updateMdBuilder(o))}),t.qZA()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("group",e)("isNoNeed",null==n.orderItemBuilder||null==n.orderItemBuilder.noNeedConfirm?null:n.orderItemBuilder.noNeedConfirm[null==e?null:e.id])("oibuilder",n.orderItemBuilder)("cols",n.getCols())("$UpdateMdbuilderSubject",n.$GroupItemModifierFinished)("isUnlockItem",n.isUnlockItem)}}function Ds(i,a){if(1&i&&(t.YNc(0,As,2,5,"div",66),t.YNc(1,Ss,2,6,"div",66)),2&i){const e=t.oxw(3);t.Q6J("ngIf",e.comboStepsShowList),t.xp6(1),t.Q6J("ngIf",!e.comboStepsShowList)}}const qs=function(i,a,e,n,o){return{"completed-item-modifier":i,"missing-item-modifier":a,"all-completed-item-group":e,"completed-itemgroup-min-max":n,"missing-itemgroup-min-max":o}};function Qs(i,a){if(1&i&&(t.TgZ(0,"mat-step",49),t.YNc(1,_s,2,0,"div",16),t.TgZ(2,"div",50)(3,"div",51)(4,"h2",52),t._uU(5),t.ALo(6,"i18n"),t.qZA(),t.TgZ(7,"div",53),t.YNc(8,bs,13,9,"ng-container",16),t.YNc(9,ws,13,9,"ng-container",16),t.qZA()(),t.YNc(10,Zs,5,2,"ng-container",54),t.YNc(11,Ds,2,2,"ng-template",null,55,t.W1O),t.qZA()()),2&i){const e=a.$implicit,n=a.index,o=t.MAs(12),r=t.oxw(2);t.Q6J("completed",r.isStepCompleted(e,n)),t.xp6(1),t.Q6J("ngIf",r.checkGroup(null==r.mainItem||null==r.mainItem.groups?null:r.mainItem.groups[0].items)),t.xp6(4),t.Oqu(t.xi3(6,8,e,r.context.userLang)),t.xp6(2),t.Q6J("ngClass",t.qbA(11,qs,r.isCompletedModifierByCurrentGroup(e),!r.isCompletedModifierByCurrentGroup(e),r.isAllCompletedByCurrentGroup(e),r.isCompletedGroupMinMax(e),!r.isCompletedGroupMinMax(e))),t.xp6(1),t.Q6J("ngIf",!r.menuWithItemCountTypeWeighting),t.xp6(1),t.Q6J("ngIf",r.menuWithItemCountTypeWeighting&&e.maxItemWeighting>0),t.xp6(1),t.Q6J("ngIf",r.showLayoutByGItemsLength())("ngIfElse",o)}}function Ns(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Qs,13,17,"mat-step",48),t.BQk()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.displayGroups)}}function Js(i,a){1&i&&(t.TgZ(0,"mat-icon"),t._uU(1,"warning"),t.qZA())}function Us(i,a){1&i&&(t.TgZ(0,"mat-icon"),t._uU(1,"forum"),t.qZA())}function Fs(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-write-remark",67),t.NdJ("remark",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.getRemark(o))}),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("note",e.mainItem.note)}}function Ls(i,a){1&i&&(t.TgZ(0,"span"),t._uU(1,", "),t.qZA())}function Bs(i,a){if(1&i&&(t.TgZ(0,"span",77),t._uU(1),t.ALo(2,"i18n"),t.YNc(3,Ls,2,0,"span",16),t.qZA()),2&i){const e=a.$implicit,n=a.index,o=t.oxw().$implicit,r=t.oxw(2);t.xp6(1),t.hij(" ",t.xi3(2,2,e,r.context.userLang)," "),t.xp6(2),t.Q6J("ngIf",(null==o||null==o.items?null:o.items.length)>1&&n<(null==o||null==o.items?null:o.items.length)-1)}}function Ys(i,a){if(1&i&&(t.TgZ(0,"div",75),t.YNc(1,Bs,4,5,"span",76),t.qZA()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.items)}}const zs=function(i){return{"auto-pickup-items-mod-completed":i}};function js(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",78)(1,"button",79),t.NdJ("click",function(o){return t.CHM(e),t.oxw(2).modifierClicked(),t.KtG(o.stopPropagation())}),t._UZ(2,"app-icon",80),t.TgZ(3,"span",81),t._uU(4),t.ALo(5,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(4,zs,e.isAllAutoPickupModifierCompleted())),t.xp6(3),t.Oqu(t.lcZ(5,2,"byod.dialogs.combo-dialog.modify"))}}function Gs(i,a){if(1&i&&(t.TgZ(0,"div",68)(1,"div",69)(2,"div",70),t._UZ(3,"app-icon",71),t.TgZ(4,"span"),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"div",72),t.YNc(8,Ys,2,1,"div",73),t.qZA()(),t.YNc(9,js,6,6,"div",74),t.qZA()),2&i){const e=t.oxw();
1t.xp6(5),t.Oqu(t.lcZ(6,3,"byod.dialogs.combo-dialog.served-with")),t.xp6(3),t.Q6J("ngForOf",e.autoPickupGroups),t.xp6(1),t.Q6J("ngIf",e.isAutoPickupHasModifier)}}function Es(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",82)(2,"button",83),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw();return r.changeTotalQty("minus",r.isUnlockItem),t.KtG(o.stopPropagation())}),t.TgZ(3,"span",84),t._uU(4,"remove"),t.qZA()(),t.TgZ(5,"span",85),t._uU(6),t.qZA(),t.TgZ(7,"button",86),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw();return r.changeTotalQty("add",r.isUnlockItem),t.KtG(o.stopPropagation())}),t.TgZ(8,"span",84),t._uU(9,"add"),t.qZA()()(),t.BQk()}if(2&i){const e=t.oxw();t.xp6(2),t.Q6J("disabled",!e.canMinusItem(e.mainItem,e.isUnlockItem)),t.xp6(4),t.Oqu(e.totalQty),t.xp6(1),t.Q6J("disabled",!e.canAddItems(e.mainItem,e.isUnlockItem))}}const $s=function(i){return{hideStepHeader:i}},Rs=function(i){return{"current-step-not-completed":i}};let Vs=(()=>{class i extends at{constructor(e,n,o,r,l){super(e),this.injector=e,this.inventoryService=n,this.baseMenuService=o,this.modifierService=r,this.menuManager=l,this.title="",this.isLinear=!1,this.rippleColor="red",this.editOi=null,this.isUnlockItem=!1,this.first=!0,this.comboStepsShowGrid3=!1,this.comboStepsShowGrid2=!1,this.comboStepsShowList=!1,this.soldoutCacheMap={},this.showNutriGrade=!1,this.$GroupItemModifierFinished=new Ct.x}ngOnInit(){this.hideZeroPrice=this.settingManager.get("menu.hideZeroItemPrice",!1),this.initData(),this.showItemRemark=this.settingManager.get("showItemRemark",!1),this.invSubs=this.inventoryService.invChange$.subscribe(e=>{this.soldoutCacheMap={}})}ngOnDestroy(){var e;null===(e=this.invSubs)||void 0===e||e.unsubscribe()}getRemark(e){var n,o,r;this.mainItem.note=e,this.comboStepsShowList=null===(n=null==this?void 0:this.settingManager)||void 0===n?void 0:n.get("comboStepsShowList",!1),this.comboStepsShowGrid2=null===(o=null==this?void 0:this.settingManager)||void 0===o?void 0:o.get("comboStepsShowGrid2",!1),this.comboStepsShowGrid3=null===(r=null==this?void 0:this.settingManager)||void 0===r?void 0:r.get("comboStepsShowGrid3",!1)}initData(){var e,n,o,r,l,c,s,d,m;this.input=this.navParams.input||{},console.log("MultiStepsPageItemDialogComponent input",this.input),this.baseItem=null===(e=this.input)||void 0===e?void 0:e.baseItem,this.variationsItems=null===(n=this.input)||void 0===n?void 0:n.variationsItems,this.store=this.orderContext.store,this.editOi=(null===(o=this.input)||void 0===o?void 0:o.editOi)||(null===(r=this.input)||void 0===r?void 0:r.oi),this.processItemSelectionOpt(),this.isUnlockItem=null===(l=this.input)||void 0===l?void 0:l.isUnlockItem,this.currentOrderManager=this.isUnlockItem?this.cartService.unlockCatOrderManager:this.cartService.orderManager,(null===(c=this.variationsItems)||void 0===c?void 0:c.length)>1||(this.mainItem=N.Vw.toData(N.ck,this.baseItem),this.buildMainItemGroups(),this.groups=null===(s=this.mainItem)||void 0===s?void 0:s.groups,this.first=!0,this.initOrderBuilder(),this.first=!1),this.mainItem.note=null===(m=null===(d=null==this?void 0:this.input)||void 0===d?void 0:d.editOi)||void 0===m?void 0:m.note,this.initTitle(),this.menuWithItemCountTypeWeighting&&this.groups.forEach(p=>{null!=p.maxItemWeighting&&null==p.minItemWeighting&&(p.minItemWeighting=0)})}initTitle(){let e="byod.dialogs.combo-dialog."+(this.isAllAlaCarte()?"select-size":"select-combo");this.title=this.t.instant(e)}isAllAlaCarte(){var e;return null===(e=this.variationsItems)||void 0===e?void 0:e.every(n=>{var o;return 0===(null===(o=null==n?void 0:n.groups)||void 0===o?void 0:o.length)})}initOrderBuilder(){var e,n,o,r,l,c;if(this.editOi)console.log("MultiStepsPageItemDialogComponent \u7f16\u8f91\u8d2d\u7269\u8f66\u7684comboItem",this.editOi),this.orderItemBuilder=this.baseCartService.createOrderItemBuilderByOrderItem(this.store,this.editOi),this.mainItem_builder=this.mainItem,this.initNoNeedBtn(),this.baseCartService.flatten(this.category,this.mainItem);else{let s=null===(e=this.input)||void 0===e?void 0:e.category,d=null===(n=this.input)||void 0===n?void 0:n.mainItemGroup;this.orderItemBuilder=this.baseCartService.createOrderItemBuilderByMainItem(this.store,s,d,this.mainItem),this.baseCartService.flatten(s,this.mainItem),this.mainItem_builder=N.Dd.getMainItem(null===(o=this.orderItemBuilder)||void 0===o?void 0:o.build())}this.totalQty=this.getDefaultItemQty(this.mainItem),console.log("MultiStepsPageItemDialogComponent initOrderBuilder() orderItemBuilder",this.orderItemBuilder),console.log("MultiStepsPageItemDialogComponent initOrderBuilder() mainItem",this.mainItem,null===(r=this.mainItem)||void 0===r?void 0:r.addTime),console.log("MultiStepsPageItemDialogComponent initOrderBuilder() mainItem_builder",this.mainItem_builder,null===(l=this.mainItem_builder)||void 0===l?void 0:l.addTime),this.modifierBuilder=new C.uH(this.store,null===(c=this.orderItemBuilder)||void 0===c?void 0:c.build()),this.handleAutoPickupItem(),this.handlePreSelectDefaultItem()}getItemId(e){var n,o;return null!==(o=null!==(n=null==e?void 0:e.backendId)&&void 0!==n?n:null==e?void 0:e.id)&&void 0!==o?o:""}isSoldout(e){const n=this.getItemId(e);
1if(n in this.soldoutCacheMap)return this.soldoutCacheMap[n];let o=this.cartService.convertNowDateToStoreTimeZone(this.store.timezone);const r=this.inventoryManager.isSoldout(e);let l=!this.menuManager.isAvailableCombo(this.store,this.input.category,e,this.orderManager.isTakeout(),o,this.orderManager.mode);const c=r||l;return this.soldoutCacheMap[n]=c,c}modifierClicked(){console.log("AllModifiersDialogComponent");const e=this.orderItemBuilder.build();var n={store:this.currentOrderManager.store,orderItem:e,edit:!1};this.analyticsService.trackItemDialogAction("click_modifier",this.mainItem),this.dialogService.openAux("order/dialog/all-modifiers",n,{autoClose:!1},r=>{this.routingService.navigateCloseModal()})}showModifierPopup(e){}getDefaultImage(e,n,o){return this.baseMenuService.getDefaultImage(e,n,o)}clickVariationsItem(e){var n;e&&(null===(n=this.mainItem)||void 0===n?void 0:n.id)!==(null==e?void 0:e.id)&&(this.mainItem=e,this.groups=null==e?void 0:e.groups,this.initOrderBuilder())}isShowMainItemModifierStep(){var e,n;return(null===(n=null===(e=this.mainItem)||void 0===e?void 0:e.mgroups)||void 0===n?void 0:n.length)>0}isShowSubGroupSteps(){var e;return(null===(e=this.displayGroups)||void 0===e?void 0:e.length)>0}beforeNextSteper(e){}nextStepper(){var e,n,o,r,l;let c=this.stepper.selectedIndex;null===(e=this.stepper)||void 0===e||e.next(),this.stepContentScrollToTop();try{console.log("MultiStepsPageItemDialogComponent nextStepper",this.orderItemBuilder),null===(n=this.modifierBuilder)||void 0===n||n.build();const d=null===(o=this.orderItemBuilder)||void 0===o?void 0:o.build();c+1===(null===(l=null===(r=this.stepper)||void 0===r?void 0:r.steps)||void 0===l?void 0:l.length)&&(this.isCompleted()?(console.log("\u914d\u7f6e\u5b8c\u6210\uff0c\u53ef\u4ee5\u52a0\u5165\u8d2d\u7269\u8f66"),this.addToCartClicked()):this.isAllAutoPickupModifierCompleted()||this.oiHasModifier(d)&&this.modifierClicked())}catch(d){}}oiHasModifier(e){var n;return(null===(n=C.uH.findItems(this.store,e))||void 0===n?void 0:n.length)>0}isCanAddToCart(){var e,n,o;let r=null===(e=this.stepper)||void 0===e?void 0:e.selectedIndex;return this.isCompleted()&&r+1===(null===(o=null===(n=this.stepper)||void 0===n?void 0:n.steps)||void 0===o?void 0:o.length)}stepContentScrollToTop(){var e,n;null===(n=null===(e=this.content)||void 0===e?void 0:e.nativeElement)||void 0===n||n.scrollTo({top:0,left:0})}updateMdBuilder(e){var n,o;console.log("MultiStepsPageItemDialogComponent \u6536\u5230\u901a\u77e5 updateMdBuilder",e,this.orderItemBuilder,this.modifierBuilder),this.modifierBuilder=e,null===(n=this.modifierBuilder)||void 0===n||n.build(),null===(o=this.orderItemBuilder)||void 0===o||o.build(),console.log("after build()")}isStepCompleted(e,n){var o;let r=n+(this.isShowMainItemModifierStep()?2:1);return this.isGroupCompleted_currentSubGroup(e)&&(null===(o=this.stepper)||void 0===o?void 0:o.selectedIndex)>=r}isGroupCompleted_currentSubGroup(e){var n;let o=null===(n=this.orderItemBuilder)||void 0===n?void 0:n.isGroupCompleted(e),r=this.isCompletedModifierByCurrentGroup(e);return o&&r}isMainItemModStepCompleted(){var e;return this.isGroupCompleted_itemMgroups(this.mainItem,this.mainItem_builder)&&(null===(e=this.stepper)||void 0===e?void 0:e.selectedIndex)>=1}isGroupCompleted_itemMgroups(e,n){var o;return null===(o=null==e?void 0:e.mgroups)||void 0===o?void 0:o.every(r=>this.modifierService.isMGroupCompleted(this.modifierBuilder,n,r))}isNeedSelectModifiers_MainItemMgroups(e){var n;return null===(n=null==e?void 0:e.mgroups)||void 0===n?void 0:n.some(o=>{var r;return!(null!==(r=this.modifierService)&&void 0!==r&&r.isMGroupCompleted(this.modifierBuilder,e,o))})}mgitemClick(e,n){this.addClicked(e,n)}addClicked(e,n){this.baseCartService.isSoldout(n)||(this.baseCartService.add(this.orderItemBuilder,n,e,!1,()=>{var o;console.log("MultiStepsPageItemDialogComponent handle current item modifiers"),!this.first&&(null===(o=this.cartService)||void 0===o?void 0:o.isCurrentItemHasRequiredModifier(n))&&this.autoShowItemModifiers(e,n)}),this.itemGroup=this.orderItemBuilder.groups)}autoShowItemModifiers(e,n){var o;let r=null===(o=this.orderItemBuilder)||void 0===o?void 0:o.build();console.log("showItemModifiers"),this.dialogService.openAux("order/dialog/item-modifiers",{store:this.orderManager.store,group:e,item:n,oibuilder:this.orderItemBuilder,orderItem:r,orderContext:this.orderContext,isEdit:!!this.editOi},{autoClose:!1},s=>{null!=s&&s.mdBuilder&&(this.modifierBuilder=null==s?void 0:s.mdBuilder,this.$GroupItemModifierFinis
1hed.next(null==s?void 0:s.mdBuilder)),this.routingService.navigateCloseModal()})}get currentOi(){var e;return null===(e=this.orderItemBuilder)||void 0===e?void 0:e.build()}stepperBacked(){var e;null===(e=this.stepper)||void 0===e||e.previous()}isShowBackIcon(){var e,n,o;return(null===(n=null===(e=this.stepper)||void 0===e?void 0:e.steps)||void 0===n?void 0:n.length)>=2&&(null===(o=this.stepper)||void 0===o?void 0:o.selectedIndex)>=1}isShowStepHeader(){return this.orderItemBuilder&&(this.isShowMainItemModifierStep()||this.isShowSubGroupSteps())}isCurrentStepCompleted(){var e,n,o,r,l;let c=this.isShowMainItemModifierStep();if(0===(null===(e=this.stepper)||void 0===e?void 0:e.selectedIndex))return!0;if(1===(null===(n=this.stepper)||void 0===n?void 0:n.selectedIndex)&&c)return this.isMainItemModStepCompleted();let s=c?(null===(o=this.stepper)||void 0===o?void 0:o.selectedIndex)-2:(null===(r=this.stepper)||void 0===r?void 0:r.selectedIndex)-1,d=null===(l=this.groups)||void 0===l?void 0:l[s];return this.isStepCompleted(d,s)}getGItemCount(e){var n;return null===(n=this.cartService)||void 0===n?void 0:n.getGItemCountCurrentGroup(this.orderItemBuilder,e)}getCols(){return!this.comboStepsShowGrid2&&this.comboStepsShowGrid3?3:2}showLayoutByGItemsLength(){return!(this.comboStepsShowList||this.comboStepsShowGrid2||this.comboStepsShowGrid3)}checkGroup(e){return e.some(n=>"nutriGrade"in n)}checkMGroup(e){return e.some(n=>"nutriGrade"in n)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(ue.V),t.Y36(Ze.Z),t.Y36(mt.F),t.Y36(C._K))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-multi-steps-page-item-dialog"]],viewQuery:function(e,n){if(1&e&&(t.Gf(os,5),t.Gf(rs,5)),2&e){let o;t.iGM(o=t.CRH())&&(n.stepper=o.first),t.iGM(o=t.CRH())&&(n.content=o.first)}},features:[t.qOj],decls:38,vars:30,consts:[[1,"multi-steps-container"],[3,"back","closeBackBehaviour","backed"],[1,"multi-steps-box"],["ScrollContent",""],["linear","true",3,"ngClass"],["MultiStepper",""],[1,"main-item-scroll"],["class","main-item-img",4,"ngIf"],[1,"base-item-mes-box"],[1,"base-item-title-text"],["class","",4,"ngIf"],["type","color-coded-scale",1,"multi-step-nutri-grade-variations",3,"item"],[1,"combo-inner"],[1,"selection-box"],[4,"ngFor","ngForOf"],[3,"completed","interacted",4,"ngIf"],[4,"ngIf"],["matStepperIcon","warning"],["matStepperIcon","chat"],[3,"note","remark",4,"ngIf"],[1,"combo-footer"],["class","auto-pickup-items",4,"ngIf"],[1,"combo-button-footer"],["appThrottleClick","","mat-flat-button","","data-testid","combo-add-button",1,"btn-submit",3,"ngClass","throttleClick"],["clas","text-addtocart"],[1,"addtocart-price"],[1,"main-item-img"],[1,"item-img"],[3,"ratio","src"],[1,""],["matRipple","","data-testid","variations-item",1,"btn-combo",3,"ngClass","click"],[1,"div-soldout"],[1,"soldout-border"],[3,"content","ratio"],["type","simplified","mode","small",1,"multi-step-nutri-grade-simplified",3,"item"],[1,"btn-combo-inner"],[1,"title-text"],["class","desc-text",4,"ngIf"],[1,"spacer"],["class","price-text","data-testid","variations-price",4,"ngIf"],[1,"add-qty-box"],["name","check_circle","size","28","source","mat",4,"ngIf"],[1,"desc-text"],["data-testid","variations-price",1,"price-text"],["name","check_circle","size","28","source","mat"],[3,"completed","interacted"],[3,"orderItemBuilder","mdBuilder","isEdit","store","originItem","updateMdBuilder"],["type","color-coded-scale","item","default",1,"multi-step-nutri-grade"],[3,"completed",4,"ngFor","ngForOf"],[3,"completed"],[1,"lower"],[1,"sub-item-grp","sticky-test"],[1,"sub-item-grp-name"],[1,"select-n-required",3,"ngClass"],[4,"ngIf","ngIfElse"],["otherLayouts",""],[1,"tag-pls-select"],[1,"request-num-text"],["class","text-required",4,"ngIf"],["class","text-required selected-counter",3,"ngClass",4,"ngIf"],[1,"text-required"],[1,"text-required","selected-counter",3,"ngClass"],[1,"content"],["gItemGrid2",""],[3,"group","isNoNeed","oibuilder","$UpdateMdbuilderSubject","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","updateMdBuilder"],[3,"group","isNoNeed","oibuilder","cols","$UpdateMdbuilderSubject","isUnlockItem","mgitemClick","minusClicked","clickedNoNeed","updateMdBuilder"],["class","content",4,"ngIf"],[3,"note","remark"],[1,"auto-pickup-items"],[1,"auto-pu-left"],[1,"div-served-with"],["name","task_alt","source","mat","size","14",1,"flex"],[1,"div-default-loop","flex"],["class","default-item-box mr-1",4,"ngFor","ngForOf"],["class","auto-pu-right",4,"ngIf"],[1,"default-item-box","mr-1"],["class","default-details",4,"ngFor","ngForOf"],[1,"default-details"],[1,"auto-pu-right"],["mat-stroked-button","",3,"ngClass","click"],["name","auto_awesome","source","mat","size","14",1,"flex"],[1,"text-modify"],[1,"footer-qty-panel"],["mat-icon-button","",1,"qty-button","btn-remove",3,"disabled","click"],[1,"material-icons"],[1,"qty-text"],["mat-icon-button","",1,"qty-button","btn-add",3,"disabled","click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("backed",function(){return n.stepperBacked()}),t.qZA(),t.TgZ(2,"div",2,3)(4,"mat-horizontal-stepper",4,5)(6,"mat-step")(7,"div",6),t.YNc(8,as,3,2,"div",7),t.TgZ(9,"div",8)(10,"div")(11,"h1",9),t._uU(12),t.ALo(13,"i18n"),t.qZA(),t.YNc(14,ls,3,5,"h2",10),t.qZA(),t._UZ(15,"mat-divider"),t.qZA(),t._UZ(16,"app-nutri-grade",11),t.TgZ(17,"div",12)(18,"div",13),t.YNc(19,gs,19,17,"ng-container",14),t.qZA()()()(),t.YNc(20,us,3,7,"mat-step",15),t.YNc(21,Ns,2,1,"ng-container",16),t.YNc(22,Js,2,0,"ng-template",17),t.YNc(23,Us,2,0,"ng-template",18),t.qZA(),t.YNc(24,Fs,1,1,"app-write-remark",19),t.qZA(),t.TgZ(25,"div",20),t.YNc(26,Gs,10,5,"div",21),t.TgZ(27,"div",22),t.YNc(28,Es,10,3,"ng-container",16),t.TgZ(29,"button",23),t.NdJ("throttleClick",function(){return n.nextStepper()}),t.TgZ(30,"span",24),t._uU(31),t.ALo(32,"translate"),t.qZA(),t.TgZ(33,"span"),t._uU(34," - "),t.qZA(),t.TgZ(35,"span",25),t._uU(36),t.ALo(37,"priceDisplay"),t.qZA()()()()()),2&e&&(t.xp6(1),t.Q6J("back",n.isShowBackIcon())("closeBackBehaviour",n.isUnlockItem),t.xp6(3),t.Q6J("ngClass",t.VKq(26,$s,!n.isShowStepHeader())),t.xp6(4),t.Q6J("ngIf",(null==n.baseItem?null:n.baseItem.getImage("default",360,!0))||n.getDefaultImage(!1,n.store.brand,500)),t.xp6(4),t.Oqu(t.Dn7(13,16,n.baseItem,n.context.userLang,"title")),t.xp6(2),t.Q6J("ngIf",null==n.baseItem?null:n.baseItem.desc),t.xp6(2),t.Q6J("item",n.baseItem),t.xp6(3),t.Q6J("ngForOf",n.variationsItems),t.xp6(1),t.Q6J("ngIf",n.isShowMainItemModifierStep()&&n.mainItem),t.xp6(1),t.Q6J("ngIf",n.isShowSubGroupSteps()&&n.displayGroups),t.xp6(3),t.Q6J("ngIf",n.showItemRemark),t.xp6(2),t.Q6J("ngIf",n.isAutoPickup&&(null==n.autoPickupGroups?null:n.autoPickupGroups.length)>0),t.xp6(2),t.Q6J("ngIf",!n.editOi),t.xp6(1),t.Q6J("ngClass",t.VKq(28,Rs,n.mainItem&&!n.isCurrentStepCompleted())),t.xp6(2),t.hij(" ",t.lcZ(32,20,n.isCanAddToCart()?"byod.dialogs.combo-dialog.add":"buttons.continue")," "),t.xp6(5),t.hij(" ",t.Dn7(37,22,(null==n.currentOi?null:n.currentOi.total)*n.totalQty,!0,n.context)," "))},dependencies:[_.mk,_.sg,_.O5,q.g,S.o,k.v,J.j,et.d,z.Hw,I.lW,me,ge,de,U.wG,gt.i,Ie,ye,be,Yt,M.X$,D.G,F.A,rt.y],styles:['[_nghost-%COMP%]{display:block;background:#f9f9f9;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}.main-item-scroll[_ngcontent-%COMP%]{height:100%;overflow-y:auto}.multi-steps-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.multi-steps-box[_ngcontent-%COMP%]{flex:1 1;overflow-y:auto}mat-horizontal-stepper[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#f9f9f9}mat-horizontal-stepper.hideStepHeader[_ngcontent-%COMP%]  .mat-horizontal-stepper-header-container{display:none}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-horizontal-stepper-header-container{position:sticky;top:0;z-index:100;background:#fff;display:flex;align-items:center;justify-content:flex-start;flex-shrink:0;padding:1rem;overflow:auto}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-horizontal-stepper-header-container:before, mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-horizontal-stepper-header-container:after{flex:1 1 auto;content:"";display:inline-block}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header{display:flex;height:auto;overflow:hidden;align-items:center;padding:0;flex:0 0 30px;width:30px;min-width:30px}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header .mat-step-icon{margin:0}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=false] .mat-step-icon{background:var(--P)}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=false]~.mat-stepper-horizontal-line{border-color:var(--P)}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=true] .mat-step-icon{background:transparent;box-shadow:inset 0 0 0 2px var(--P);color:var(--P)}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=true]~.mat-stepper-horizontal-line{border-color:#e1e1e1}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=false][aria-disabled=true] .mat-step-icon{background:#e1e1e1;box-shadow:none;color:var(--PC)}mat-horizontal-stepper[_ngcontent-%COMP%]  mat-step-header[aria-selected=false][aria-disabled=true]~.mat-stepper-horizontal-line{border-color:#e1e1e1}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-step-icon{height:30px;width:30px}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-stepper-horizontal-line{min-width:20px;max-width:50px;border-top-width:3px;margin:0;flex:1 1 auto;border-color:#e1e1e1}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-step-icon-content>span{font-weight:700}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-horizontal-content-container{display:flex;flex-direction:column;padding:0;height:100%;z-index:99;transform:translateY(-1px)}mat-horizontal-stepper[_ngcontent-%COMP%]  .mat-horizontal-stepper-content[aria-expanded=true]{height:100%}.sub-item-grp[_ngcontent-%COMP%]{padding:1rem 1rem .5rem}.sub-item-grp.sticky-test[_ngcontent-%COMP%]{background:#f9f9f9;position:sticky;z-index:1000;top:0}
1.sub-item-grp-name[_ngcontent-%COMP%]{font-family:var(--CF1);color:var(--P);letter-spacing:.2px;font-size:1.2rem}.select-n-required[_ngcontent-%COMP%]{display:flex;font-family:var(--CF0);font-size:.9rem;align-items:center;margin-top:.2rem}.tag-pls-select[_ngcontent-%COMP%]{font-family:var(--CF0);color:var(--P300);font-size:.9rem;flex:0 0 auto;line-height:1.3em;margin-right:.5rem}.text-required[_ngcontent-%COMP%], .selected-counter[_ngcontent-%COMP%]{background:#f04141;color:#fff;font-size:.7rem;padding:.2rem .5rem;border-radius:2px;line-height:1.1em;flex:0 0 auto}.text-required.completed[_ngcontent-%COMP%], .selected-counter.completed[_ngcontent-%COMP%]{background:#1bbb8f}.combo-footer[_ngcontent-%COMP%]{align-items:center;background:#fff;box-shadow:0 0 .2rem #0000001a;padding:.5rem 1rem}.auto-pickup-items[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-top:.25rem;margin-bottom:.5rem;align-items:center}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]{display:flex;flex-direction:column;row-gap:.4rem}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]   .div-served-with[_ngcontent-%COMP%]{display:flex;align-items:center;column-gap:.15rem;background:#b7b7b7;color:#fff;font-size:.7rem;padding:.2rem .3rem;border-radius:.2rem;width:fit-content}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]{font-size:.8rem}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]   .default-details[_ngcontent-%COMP%]{line-height:1.2em}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-left[_ngcontent-%COMP%]   .default-item-box[_ngcontent-%COMP%]:not(:last-child):after{content:","}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:.7rem;line-height:1em;padding:.3rem;color:var(--P)}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center}.auto-pickup-items[_ngcontent-%COMP%]   .auto-pu-right[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:.3rem}.footer-qty-panel[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:.5rem}.btn-submit[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);flex:1 1 auto;font-size:1rem;line-height:2.5rem}.btn-submit.current-step-not-completed[_ngcontent-%COMP%]{background:#b1b1b1}.qty-text[_ngcontent-%COMP%]{width:2rem;display:flex;align-items:center;justify-content:center;color:#333}.btn-add[_ngcontent-%COMP%]{color:var(--P)}.base-item-title-text[_ngcontent-%COMP%]{text-align:center;font-size:1.8rem;font-family:var(--CF1);font-weight:700;margin-bottom:1.5rem;color:var(--P);letter-spacing:1px}.base-item-mes-box[_ngcontent-%COMP%]{padding:1.5rem 1rem}.base-item-mes-box[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{padding-bottom:.5rem;color:#333}.combo-inner[_ngcontent-%COMP%]{padding:1rem;padding-top:0}.variations-items-title-text[_ngcontent-%COMP%]{font-size:1.2rem;font-family:var(--CF1);font-weight:700;line-height:1.3em;margin-bottom:.5rem}.btn-combo[_ngcontent-%COMP%]{display:flex;border-bottom:.5rem;margin-bottom:.5rem;background:#fff;border-radius:.8rem;padding:1rem;align-items:stretch;position:relative;overflow:hidden}.btn-combo.selected[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px var(--P)}.btn-combo.isSoldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:flex}.btn-combo[_ngcontent-%COMP%]   .item-img[_ngcontent-%COMP%]{flex:0 0 6rem;display:flex;align-items:center;justify-content:center;margin-right:.5rem;position:relative}.btn-combo[_ngcontent-%COMP%]   .item-img[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:100%}.btn-combo[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{margin-left:.5rem;display:flex;align-items:center;justify-content:center;width:2rem}.btn-combo[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--P)}.btn-combo[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:none;position:absolute;
1left:0;top:0;right:0;bottom:0!important;background:rgba(255,255,255,.9);align-items:center;justify-content:center;z-index:100;font-size:1.5rem;font-weight:400;font-family:var(--CF1);color:var(--P)}.spacer[_ngcontent-%COMP%]{flex:1 1 auto}.btn-combo-inner[_ngcontent-%COMP%]{flex:1 1;font-weight:400;display:flex;flex-direction:column}.btn-combo-inner[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:#333}.btn-combo-inner[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.4rem;font-family:var(--CF1);color:var(--P);line-height:1.1em;margin-bottom:.5rem}.btn-combo-inner[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:1rem;color:var(--P)}.lower[_ngcontent-%COMP%]{overflow-y:auto;height:inherit;position:relative;display:flex;flex-direction:column}div.mat-horizontal-content-container[_ngcontent-%COMP%], div.mat-horizontal-stepper-content[_ngcontent-%COMP%]{height:100%}.remark-continer[_ngcontent-%COMP%]{margin-top:.5rem}.remark-continer[_ngcontent-%COMP%]   .flex-a[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:1.4rem}.remark-continer[_ngcontent-%COMP%]   .msg-icon[_ngcontent-%COMP%]{margin-right:.5rem}.remark-continer[_ngcontent-%COMP%]   .remark-content[_ngcontent-%COMP%]{width:calc(100% - 2.8rem);margin:.5rem 1.4rem 0;height:6rem;padding:1rem;box-sizing:border-box;background:#fff}.remark-continer[_ngcontent-%COMP%]   .clear-all[_ngcontent-%COMP%]{text-align:right;margin:.5rem 1.4rem .5rem 0}.multi-step-nutri-grade[_ngcontent-%COMP%]{display:flex;justify-content:center;padding-top:.5rem;padding-bottom:.5rem;background-color:#fff}.multi-step-nutri-grade-variations[_ngcontent-%COMP%]{display:flex;justify-content:end;padding-top:.2rem;padding-bottom:.5rem;padding-right:1rem}.item-with-nutri-grade[_ngcontent-%COMP%]{display:flex}.multi-step-nutri-grade-simplified[_ngcontent-%COMP%]{position:absolute;bottom:.2rem;left:3rem}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}}.combo-button-footer[_ngcontent-%COMP%]{display:flex}']}),i})();function Hs(i,a){if(1&i&&(t.TgZ(0,"h2",11),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Oqu(t.Dn7(2,1,e.selectedItem,e.context.userLang,"desc"))}}const Ge=function(i){return{"selected-view":i}};function Ks(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.switchView("nutrients"))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(4,Ge,"nutrients"===e.view)),t.xp6(1),t.hij(" ",t.lcZ(2,2,"byod.dialogs.nutrition-facts-dialog.nutrients")," ")}}function Ws(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",16),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.switchView("allergy"))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(4,Ge,"allergy"===e.view)),t.xp6(1),t.hij(" ",t.lcZ(2,2,"byod.dialogs.nutrition-facts-dialog.allergy")," ")}}function Xs(i,a){if(1&i&&(t.TgZ(0,"div",12),t.YNc(1,Ks,3,6,"button",13),t.YNc(2,Ws,3,6,"button",14),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.isShowNutrients),t.xp6(1),t.Q6J("ngIf",e.isShowAllergens)}}function td(i,a){if(1&i&&(t.TgZ(0,"div",23)(1,"div",24)(2,"p"),t._uU(3),t.ALo(4,"i18n"),t.qZA()(),t.TgZ(5,"div",25)(6,"p"),t._uU(7),t.qZA()()()),2&i){const e=a.$implicit,n=t.oxw(2);t.xp6(3),t.Oqu(t.Dn7(4,3,e,n.context.userLang,"name")),t.xp6(4),t.AsE("",e.value,"",e.unit,"")}}function ed(i,a){if(1&i&&(t.TgZ(0,"div",17)(1,"div",18)(2,"h1",19),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"p"),t._uU(6),t.ALo(7,"translate"),t.qZA(),t._UZ(8,"span",20),t.qZA(),t.TgZ(9,"div",21),t.YNc(10,td,8,7,"div",22),t.qZA()()),2&i){const e=t.oxw();
1t.xp6(3),t.Oqu(t.lcZ(4,3,"byod.dialogs.nutrition-facts-dialog.nutrition-title")),t.xp6(3),t.Oqu(t.lcZ(7,5,"byod.dialogs.nutrition-facts-dialog.nutrition-subtitle")),t.xp6(4),t.Q6J("ngForOf",e.nutrients)}}function nd(i,a){1&i&&(t.TgZ(0,"div")(1,"div",26)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()()()),2&i&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"byod.dialogs.nutrition-facts-dialog.no-nutrients")))}function id(i,a){if(1&i&&(t.TgZ(0,"div",29)(1,"div",30)(2,"p"),t._uU(3),t.ALo(4,"i18n"),t.qZA()()()),2&i){const e=a.$implicit,n=t.oxw(2);t.xp6(3),t.hij(" ",t.Dn7(4,1,e,n.context.userLang,"name")," ")}}function od(i,a){if(1&i&&(t.TgZ(0,"div",17)(1,"div",18)(2,"h1",19),t._uU(3),t.ALo(4,"translate"),t.qZA(),t._UZ(5,"span",20),t.qZA(),t.TgZ(6,"div",27),t.YNc(7,id,5,5,"div",28),t.qZA()()),2&i){const e=t.oxw();t.xp6(3),t.Oqu(t.lcZ(4,2,"byod.dialogs.nutrition-facts-dialog.allergy-title")),t.xp6(4),t.Q6J("ngForOf",e.allergies)}}function rd(i,a){1&i&&(t.TgZ(0,"div")(1,"div",26)(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()()()),2&i&&(t.xp6(3),t.Oqu(t.lcZ(4,1,"byod.dialogs.nutrition-facts-dialog.no-allergy")))}let ad=(()=>{class i extends at{constructor(){super(...arguments),this.isShowNutrients=!1,this.isShowAllergens=!1,this.view="nutrients",this.allergies=[],this.nutrients=[]}ngOnInit(){var e;this.input=this.navParams.input,this.selectedItem=this.input;const n=this.selectedItem.nutrients;console.log("nutrients",n,!this.isEmptyObject(n)),n&&n.length>0&&!this.isEmptyObject(n)&&(this.nutrients=n,this.isShowNutrients=!0),this.selectedItem.allergy&&(null===(e=this.selectedItem.allergy)||void 0===e?void 0:e.length)>0&&(this.getAllergies(),this.isShowAllergens=!0,this.isShowNutrients||(this.view="allergy"))}switchView(e){this.view=e}getAllergies(){const n=this.orderContext.menu.badges.filter(l=>"allergy"===l.type),o=n&&n;this.selectedItem.allergy.forEach(l=>{const c=o.filter(s=>s.tag===l);c&&c.length>0&&this.allergies.push(c[0])})}isEmptyObject(e){let n=!1;return null==e||e.forEach(o=>{var r;0===(null===(r=Object.keys(o))||void 0===r?void 0:r.length)&&(n=!0)}),n}}return i.\u0275fac=function(){let a;return function(n){return(a||(a=t.n5z(i)))(n||i)}}(),i.\u0275cmp=t.Xpm({type:i,selectors:[["app-nutrition-facts-dialog"]],features:[t.qOj],decls:14,vars:13,consts:[[3,"title"],[1,"h-full","overflow-y-auto"],[1,"border-bottom","px-6","pt-4"],[1,"div-item-img","flex","justify-center"],[1,"div-item-app-img"],[3,"content","icon","animate"],[1,"text-sm","mb-4","mt-5"],["class","text-center",4,"ngIf"],["class","view-button",4,"ngIf"],["class","px-10 pt-10 pt-6",4,"ngIf"],[4,"ngIf"],[1,"text-center"],[1,"view-button"],["mat-button","","class","nutrients-button",3,"ngClass","click",4,"ngIf"],["mat-button","","class","allergy-button",3,"ngClass","click",4,"ngIf"],["mat-button","",1,"nutrients-button",3,"ngClass","click"],["mat-button","",1,"allergy-button",3,"ngClass","click"],[1,"px-10","pt-10","pt-6"],[1,"text-center","div-nutri-title"],[1,"text-nutri-value","font-bold","mb-2"],[1,"span-underline"],[1,"py-6","flex","flex-col","justify-center","items-center"],["class","flex items-center justify-center detail-row",4,"ngFor","ngForOf"],[1,"flex","items-center","justify-center","detail-row"],[1,"w-1/2","text-right","font-bold","pr-6","nutri-element"],[1,"w-1/2","info-unit"],[1,"text-center","p-8"],[1,"py-6","detail-row-allergy"],["class","allergy-elements",4,"ngFor","ngForOf"],[1,"allergy-elements"],[1,"font-bold","allergy-element"]],template:function(e,n){1&e&&(t._UZ(0,"app-sub-bar",0),t.ALo(1,"i18n"),t.TgZ(2,"div",1)(3,"div",2)(4,"div",3)(5,"div",4),t._UZ(6,"app-img",5),t.qZA()(),t.TgZ(7,"div",6),t.YNc(8,Hs,3,5,"h2",7),t.qZA()(),t.YNc(9,Xs,3,2,"div",8),t.YNc(10,ed,11,7,"div",9),t.YNc(11,nd,5,3,"div",10),t.YNc(12,od,8,4,"div",9),t.YNc(13,rd,5,3,"div",10),t.qZA()),2&e&&(t.Q6J("title",t.xi3(1,10,n.selectedItem,n.context.userLang)),t.xp6(6),t.Q6J("content",n.selectedItem)("icon","image")("animate",!0),t.xp6(2),t.Q6J("ngIf",null==n.selectedItem?null:n.selectedItem.desc),t.xp6(1),t.Q6J("ngIf",n.isShowAllergens||n.isShowNutrients),t.xp6(1),t.Q6J("ngIf",n.isShowNutrients&&"nutrients"===n.view),t.xp6(1),t.Q6J("ngIf",!n.isShowNutrients&&"nutrients"===n.view),t.xp6(1),t.Q6J("ngIf",n.isShowAllergens&&"allergy"===n.view),t.xp6(1),t.Q6J("ngIf",!n.isShowAllergens&&"allergy"===n.view))},dependencies:[_.mk,_.sg,_.O5,q.g,k.v,I.lW,M.X$,D.G],styles:["[_nghost-%COMP%]{height:100%;display:flex;flex-direction:column;background:#fff;overflow:hidden;margin:0 auto}.border-bottom[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb}.div-item-app-img[_ngcontent-%COMP%]{width:40%;border-radius:0 0 0 5rem;overflow:hidden;box-shadow:.15rem .15rem .5rem #00000026}.div-nutri-title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center}.div-nutri-title[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{font-size:1.25rem;margin-bottom:.45rem}.div-nutri-title[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.825rem;color:#6a6a6a}.div-nutri-title[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{background:var(--P);display:block;height:.1rem;width:15%;margin-top:.5rem}.detail-row[_ngcontent-%COMP%]{margin:0 0 .25rem;width:100%;max-width:400px}.nutri-element[_ngcontent-%COMP%]{color:var(--P800);background:#fff;padding:.5rem;margin-right:.5rem}.info-unit[_ngcontent-%COMP%]{color:#333;background:#f5f5f5;padding:.4rem .5rem;margin-left:.5rem;border-radius:2rem;text-align:center}.view-button[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:1rem;align-items:center;padding:1rem}.nutrients-button[_ngcontent-%COMP%], .allergy-button[_ngcontent-%COMP%]{border:1px solid;padding:.3rem 2rem;width:100%}.nutrients-button.selected-view[_ngcontent-%COMP%], .allergy-button.selected-view[_ngcontent-%COMP%]{border:1px solid var(--P);background:var(--P);color:var(--AC)}.detail-row-allergy[_ngcontent-%COMP%]{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;display:flex}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]{width:100%;justify-content:flex-start;flex-basis:33.333%;padding-top:.5rem;padding-bottom:.5rem}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]   .allergy-element[_ngcontent-%COMP%]{font-size:1rem;display:flex;align-items:center;justify-content:center;height:100%}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]   .allergy-element[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:2rem;margin-right:.6rem;flex-shrink:0}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]   .allergy-element[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;text-align:center}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]   .allergy-element[_ngcontent-%COMP%]   .icon[_ngcontent-%COMP%]{border:1px solid #e0e0ee;border-radius:10px;color:#e0e0ee;margin-right:.5rem}@media not screen and (min-width: 600px){.div-app-img[_ngcontent-%COMP%]{width:50vw;overflow:unset}.div-item-app-img[_ngcontent-%COMP%]{border-radius:0 0 0 2rem;width:60%!important}.detail-row-allergy[_ngcontent-%COMP%]   .allergy-elements[_ngcontent-%COMP%]{flex-basis:50%}}"]}),i})();var Ee=u(40520),zt=u(47423);const ld=(0,zt.fo)("Filesystem",{web:()=>u.e(3195).then(u.bind(u,53195)).then(i=>new i.FilesystemWeb)});var jt=u(40190),$e=u(26388);let cd=(()=>{class i{constructor(){}isAvailable(){return!0}getPhoto(e){return(0,Q.mG)(this,void 0,void 0,function*(){return $e.V1.getPhoto({allowEditing:!1,resultType:$e.dk.Uri,promptLabelHeader:e.header||"Photo",promptLabelCancel:e.cancel||"Cancel",promptLabelPhoto:e.fromPhoto||"From Photos",promptLabelPicture:e.takePicture||"Take Picture"})})}compressAccurately(e,n,o,r=.5){return(0,Q.mG)(this,void 0,void 0,function*(){if(!(e instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");const l=Object.assign({size:o});if(l.size=Number(l.size),Number.isNaN(l.size)||1024*l.size>e.size)return e;l.accuracy=.95;const c_max=l.size*(2-l.accuracy)*1024,c_accurate=1024*l.size,c_min=l.size*l.accuracy*1024,s=.75;let m,d=r||.5;const p=[null,null];for(let x=1;x<=7&&(m=yield this.compressorImage(n,d),m);x++){console.log(x,m);const v=m.length*s;if(7===x){(c_max<v||c_min>v)&&(m=[m,...p].filter(y=>y).sort((y,A)=>Math.abs(y.length*s-c_accurate)-Math.abs(A.length*s-c_accurate))[0]);break}if(c_max<v)p[1]=m,d-=Math.pow(.5,x+1);else{if(!(c_min>v))break;p[0]=m,d+=Math.pow(.5,x+1)}}if(!m)return null;const h=yield this.dataURLtoFile(m,"image/jpeg");return h.size>e.size?e:h})}canvastoDataURL(e,n=.92,o="image/jpeg"){return(0,Q.mG)(this,void 0,void 0,function*(){return this.checkImageType(o)||(o="image/jpeg"),e.toDataURL(o,n)})}compressorImage(e,n){return(0,Q.mG)(this,void 0,void 0,function*(){const o=new Image;return o.src=e,new Promise((r,l)=>{o.onload=()=>{const c=document.createElement("canvas"),s=c.getContext("2d"),d=o.width,m=o.height;let p="";c.width=d,c.height=m,s.drawImage(o,0,0,d,m),p=c.toDataURL("image/jpeg",n),p&&(null==p?void 0:p.includes("data:image/"))?r(p):r(null)},o.onerror=c=>{r(null)}})})}dataURLtoFile(e,n){return(0,Q.mG)(this,void 0,void 0,function*(){const o=e.split(",");let r=o[0].match(/:(.*?);/)[1];const l=atob(o[1]);let c=l.length;const s=new Uint8Array(c);for(;c--;)s[c]=l.charCodeAt(c);return this.checkImageType(n)&&(r=n),new Blob([s],{type:r})})}checkImageType(e){return["image/png","image/jpeg"].some(n=>n===e)}filetoDataURL(e){return new Promise(n=>{const o=new FileReader;o.onloadend=r=>n(r.target.result),o.readAsDataURL(e)})}dataURLtoImage(e){return new Promise((n,o)=>{const r=new Image;r.onload=()=>n(r),r.onerror=()=>o(new Error("dataURLtoImage(): dataURL is illegal")),r.src=e})}imagetoCanvas(e,n){return(0,Q.mG)(this,void 0,void 0,function*(){const o=Object.assign({},n),r=document.createElement("canvas");let c,s;r.getContext("2d");for(const d in o)Object.prototype.hasOwnProperty.call(o,d)&&(o[d]=Number(o[d]));return s=o.width||o.height*e.width/e.height||e.width,c=o.height||o.width*e.height/e.width||e.height,r.height=c,r.width=s,r})}convertToJpg(e,n){const o=new Image;return o.src=e,new Promise((r,l)=>{o.onload=()=>{const c=document.createElement("canvas"),s=c.getContext("2d"),d=o.width,m=o.height;let p="";c.width=d,c.height=m,s.drawImage(o,0,0,d,m),p=c.toDataURL("image/jpeg",n),p&&(null==p?void 0:p.includes("data:image/"))?r(p):r(null)},o.onerror=c=>{r(null)}})}createImageDataFromRasters(e,n,o){const c=document.createElement("canvas").getContext("2d").createImageData(n,o),s=c.data;for(let d=0;d<e.length;d++)s[d]=e[d];return c}drawImageDataOnCanvas(e){const n=document.createElement("canvas"),o=n.getContext("2d");return o.clearRect(0,0,n.width,n.height),n.width=e.width,n.height=e.height,o.putImageData(e,0,0),n.toDataURL("image/jpeg")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var sd=u(65882),Re=u(51625);function dd(i,a){if(1&i&&(t.TgZ(0,"div",8),t._UZ(1,"p",9),t.ALo(2,"safeHtml"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("innerHTML",t.lcZ(2,1,e.policy.body),t.oJD)}}function md(i,a){1&i&&(t.TgZ(0,"h3",23),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.card")," "))}const gd=function(i){return{number:i}};function pd(i,a){if(1&i&&(t.TgZ(0,"h3",23),t._uU(1),t.ALo(2,"translate"),t.ALo(3,"number"),t.qZA()),2&i){const e=t.oxw().index;t.xp6(1),t.hij(" ",t.xi3(2,1,"byod.dialogs.ph-discount-dialog.card-no",t.VKq(7,gd,t.xi3(3,4,e+1,"2.0-0")))," ")}}function ud(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.required"),""))}function _d(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.required"),""))}function fd(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.white-space"),""))}function hd(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.required"),""))}function xd(i,a){1&i&&(t.TgZ(0,"mat-error"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.white-space")," "))}const vd=function(i){return{role:i}};function Cd(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"mat-form-field",19)(2,"mat-label"),t._uU(3),t.ALo(4,"translate"),t.ALo(5,"translate"),t.qZA(),t._UZ(6,"input",24),t.YNc(7,_d,3,3,"mat-error",5),t.YNc(8,fd,3,3,"mat-error",5),t.qZA(),t.TgZ(9,"mat-form-field",19)(10,"mat-label"),t._uU(11),t.ALo(12,"translate"),t.qZA(),t._UZ(13,"input",25),t.YNc(14,hd,3,3,"mat-error",5),t.YNc(15,xd,3,3,"mat-error",5),t.qZA(),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(3),t.Oqu(t.xi3(4,6,"byod.dialogs.ph-discount-dialog.card-name",t.VKq(13,vd,t.lcZ(5,9,"elder"===e.get("role").value?"byod.dialogs.ph-discount-dialog.senior-citizen":"byod.dialogs.ph-discount-dialog.pwd")))),t.xp6(4),t.Q6J("ngIf",e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("whitespace")&&!e.get("number").hasError("required")),t.xp6(3),t.Oqu(t.lcZ(12,11,"byod.dialogs.ph-discount-dialog.old-card-id")),t.xp6(3),t.Q6J("ngIf",e.get("number").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("number").hasError("whitespace")&&!e.get("number").hasError("required"))}}function bd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26),t._UZ(1,"mat-divider",27),t.TgZ(2,"div",28)(3,"button",29),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(3);return t.KtG(o.addNewCardField())}),t._UZ(4,"app-icon",30),t.TgZ(5,"h5"),t._uU(6),t.ALo(7,"translate"),t.qZA()()()()}2&i&&(t.Q6J("@addBtn",void 0),t.xp6(6),t.Oqu(t.lcZ(7,2,"byod.dialogs.ph-discount-dialog.add-another-card")))}function Md(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",11)(1,"div",12)(2,"div",13)(3,"div",14),t._UZ(4,"app-icon",15),t.YNc(5,md,3,3,"h3",16),t.YNc(6,pd,4,9,"h3",16),t.qZA(),t.TgZ(7,"button",17),t.NdJ("click",function(){const r=t.CHM(e).index,l=t.oxw(2);return t.KtG(l.deleteCardField(r))}),t.ALo(8,"translate"),t._UZ(9,"app-icon",18),t.qZA()(),t.TgZ(10,"mat-form-field",19)(11,"mat-label"),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"mat-select",20),t.NdJ("selectionChange",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.sortingDiscounts())}),t.TgZ(15,"mat-option",21),t._uU(16),t.ALo(17,"translate"),t.qZA(),t.TgZ(18,"mat-option",21),t._uU(19),t.ALo(20,"translate"),t.qZA()(),t.YNc(21,ud,3,3,"mat-error",5),t.qZA(),t.YNc(22,Cd,16,15,"ng-container",5),t.qZA(),t.YNc(23,bd,8,4,"div",22),t.qZA()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw(2);t.Q6J("@card",void 0),t.xp6(1),t.Q6J("formGroupName",n),t.xp6(4),t.Q6J("ngIf",1==o.maxApplication),t.xp6(1),t.Q6J("ngIf",!o.discounts||o.maxApplication>1),t.xp6(1),t.uIk("aria-label",t.lcZ(8,15,"byod.dialogs.ph-discount-dialog.delete-card")),t.xp6(5),t.Oqu(t.lcZ(13,17,"byod.dialogs.ph-discount-dialog.select-role")),t.xp6(3),t.Q6J("value","elder")("disabled",o.shouldDisableRole("elder",n)),t.xp6(1),t.hij(" ",t.lcZ(17,19,"byod.dialogs.ph-discount-dialog.senior-citizen")," "),t.xp6(2),t.Q6J("value","disability")("disabled",o.shouldDisableRole("disability",n)),t.xp6(1),t.hij(" ",t.lcZ(20,21,"byod.dialogs.ph-discount-dialog.pwd")," "),t.xp6(2),t.Q6J("ngIf",e.get("role").hasError("required")),t.xp6(1),t.Q6J("ngIf",e.get("role").valid),t.xp6(1),t.Q6J("ngIf",e.valid&&n+1===o.cards.controls.length&&(o.cards.value.length<o.maxApplication||o.maxApplication<0))}}function Od(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Md,24,23,"div",10),t.BQk()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.cards.controls)}}function yd(i,a){if(1&i&&(t.TgZ(0,"div",51),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",e.get("name").value?e.get("name").value:t.lcZ(2,1,null!=n&&null!=n.conditions[0]&&null!=n.conditions[0].demos&&n.conditions[0].demos.includes("elder")?"byod.dialogs.ph-discount-dialog.senior-discount":"byod.dialogs.ph-discount-dialog.person-with-disability")," ")}}function Pd(i,a){if(1&i&&(t.TgZ(0,"div",51),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=t.oxw(),n=e.$implicit,o=e.index,r=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",n.get("name").value?n.get("name").value:t.lcZ(2,1,null!=r&&null!=r.conditions[0]&&null!=r.conditions[0].demos&&r.conditions[0].demos.includes("elder")?"byod.dialogs.ph-discount-dialog.senior-discount":"byod.dialogs.ph-discount-dialog.person-with-disability")+" "+(o+1)," ")}}function Id(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.required")))}function wd(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.emoji-and-other-characters")))}function kd(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.emoji-and-other-characters")))}function Td(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.white-space"),""))}function Zd(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.required")))}function Ad(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.emoji-and-other-characters")))}function Sd(i,a){1&i&&(t.TgZ(0,"div",52),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.white-space"),""))}function Dd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",57),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(4);return t.KtG(c.clickUploadValid(r,l))}),t.TgZ(1,"div",58),t._UZ(2,"app-icon",59),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",60)(7,"div")(8,"span"),t._uU(9),t.ALo(10,"translate"),t.qZA(),t._UZ(11,"br"),t.TgZ(12,"span"),t._uU(13),t.ALo(14,"translate"),t.qZA()(),t.TgZ(15,"div",61),t._uU(16),t.ALo(17,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(6);t.xp6(4),t.Oqu(t.lcZ(5,5,"byod.dialogs.ph-discount-dialog.upload-image-tips")),t.xp6(5),t.Oqu(t.lcZ(10,7,"byod.dialogs.ph-discount-dialog.list-of-ids")),t.xp6(4),t.Oqu(t.lcZ(14,9,"byod.dialogs.ph-discount-dialog.ids-list")),t.xp6(3),t.AsE(" ",t.lcZ(17,11,"byod.dialogs.ph-discount-dialog.maximum-file-size"),": ",e.photoSizeLimit," MB ")}}function qd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",62)(1,"div",63),t._uU(2,"Uploading..."),t.qZA(),t.TgZ(3,"div",64)(4,"div",65),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2).index,r=t.oxw(4);return t.KtG(r.cancelUpload(o))}),t._uU(5,"CANCEL"),t.qZA()()()}}function Qd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",66)(1,"div",67),t._UZ(2,"app-icon",68),t.TgZ(3,"div"),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.TgZ(6,"div",69),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(4);return t.KtG(c.removeUploaded(r,l))}),t._UZ(7,"app-icon",70),t.qZA()()}2&i&&(t.xp6(4),t.Oqu(t.lcZ(5,1,"byod.dialogs.ph-discount-dialog.image-uploaded")))}function Nd(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",53)(2,"mat-label")(3,"span"),t._uU(4,"*"),t.qZA()()(),t.YNc(5,Dd,18,13,"div",54),t.YNc(6,qd,6,0,"div",55),t.YNc(7,Qd,8,3,"div",56),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(5),t.Q6J("ngIf","unUpload"===e.get("uploadStatus").value||"cancleUpload"===e.get("uploadStatus").value),t.xp6(1),t.Q6J("ngIf","uploading"===e.get("uploadStatus").value),t.xp6(1),t.Q6J("ngIf","uploaded"===e.get("uploadStatus").value)}}function Jd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"span",69),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(4);return t.KtG(c.clearFormData(r,l))}),t._uU(1,"CLEAR"),t.qZA()}}function Ud(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"span",69),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2),r=o.$implicit,l=o.index,c=t.oxw(4);return t.KtG(c.removeSkill(r,l))}),t._uU(1,"REMOVE"),t.qZA()}}function Fd(i,a){if(1&i&&(t.TgZ(0,"div",71),t.YNc(1,Jd,2,0,"span",72),t.YNc(2,Ud,2,0,"span",72),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(4);t.xp6(1),t.Q6J("ngIf",e.get("number").value||e.get("name").value),t.xp6(1),t.Q6J("ngIf",n.cards.controls.length>1)}}const Ld=function(i){return{"hide-border-bottom":i}},Bd=function(i){return{changeRoute:i}},Yd=function(i){return{"hide-card-controls":i}},Ve=function(i){return{"error-class":i}}
1,He=function(i){return{"error-input":i}},zd=function(){return{name:"Senior Citizen"}},jd=function(){return{name:"PWD"}};function Gd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",39)(1,"div",40),t.NdJ("click",function(){const o=t.CHM(e),r=o.$implicit,l=o.index,c=t.oxw(4);return t.KtG(c.hideCardContent(r,l))}),t.YNc(2,yd,3,3,"div",41),t.YNc(3,Pd,3,3,"div",41),t._UZ(4,"app-icon",42),t.qZA(),t.TgZ(5,"div",43)(6,"div",44)(7,"div",45)(8,"mat-label",46),t._uU(9),t.ALo(10,"translate"),t.TgZ(11,"span"),t._uU(12,"*"),t.qZA()(),t._UZ(13,"input",47),t.YNc(14,Id,3,3,"div",48),t.YNc(15,wd,3,3,"div",48),t.YNc(16,kd,3,3,"div",48),t.YNc(17,Td,3,3,"div",48),t.qZA(),t.TgZ(18,"div",45)(19,"mat-label",46),t._uU(20),t.ALo(21,"translate"),t.ALo(22,"translate"),t.TgZ(23,"span"),t._uU(24,"*"),t.qZA()(),t._UZ(25,"input",49),t.YNc(26,Zd,3,3,"div",48),t.YNc(27,Ad,3,3,"div",48),t.YNc(28,Sd,3,3,"div",48),t.qZA()(),t.YNc(29,Nd,8,3,"ng-container",5),t.YNc(30,Fd,3,2,"div",50),t.qZA()()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw(2).$implicit,r=t.oxw(2);t.Q6J("formGroupName",n)("@card",void 0),t.xp6(1),t.Q6J("ngClass",t.VKq(32,Ld,!e.get("iShow").value)),t.xp6(1),t.Q6J("ngIf",1===r.maxApplication),t.xp6(1),t.Q6J("ngIf",r.maxApplication>1),t.xp6(1),t.Q6J("ngClass",t.VKq(34,Bd,!e.get("iShow").value)),t.xp6(1),t.Q6J("ngClass",t.VKq(36,Yd,!e.get("iShow").value))("@card",void 0),t.xp6(2),t.Q6J("ngClass",t.VKq(38,Ve,e.get("name").hasError("required")&&e.get("name").touched||e.get("number").hasError("required")&&e.get("number").touched)),t.xp6(2),t.Oqu(t.lcZ(10,24,"byod.dialogs.ph-discount-dialog.full-name")),t.xp6(4),t.Q6J("ngClass",t.VKq(40,He,e.get("name").hasError("required")&&e.get("name").touched)),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("required")&&e.get("name").touched),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("emojiAndOtherCharacters")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("nameHaveNumberCharacters")),t.xp6(1),t.Q6J("ngIf",e.get("name").hasError("whitespace")&&!e.get("name").hasError("required")),t.xp6(1),t.Q6J("ngClass",t.VKq(42,Ve,e.get("name").hasError("required")&&e.get("name").touched||e.get("number").hasError("required")&&e.get("number").touched)),t.xp6(2),t.hij(" ",null!=o&&null!=o.conditions[0]&&null!=o.conditions[0].demos&&o.conditions[0].demos.includes("elder")?t.xi3(21,26,"byod.dialogs.ph-discount-dialog.card-id",t.DdM(44,zd)):t.xi3(22,29,"byod.dialogs.ph-discount-dialog.card-id",t.DdM(45,jd))," "),t.xp6(5),t.Q6J("ngClass",t.VKq(46,He,e.get("number").hasError("required")&&e.get("number").touched))("placeholder","Enter "+("elder"===r.selectedRole?"SC":"PWD")+" ID number"),t.xp6(1),t.Q6J("ngIf",e.get("number").hasError("required")&&e.get("number").touched),t.xp6(1),t.Q6J("ngIf",e.get("number").hasError("emojiAndOtherCharacters")),t.xp6(1),t.Q6J("ngIf",e.get("number").hasError("whitespace")&&!e.get("number").hasError("required")),t.xp6(1),t.Q6J("ngIf",r.isShowUploadImage()),t.xp6(1),t.Q6J("ngIf",e.get("number").value||e.get("name").value||r.cards.controls.length>1)}}function Ed(i,a){1&i&&(t.TgZ(0,"div",73),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"byod.dialogs.ph-discount-dialog.maximum-discount-reached")))}function $d(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",74)(2,"button",29),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(4);return t.KtG(o.addNewCardField())}),t._UZ(3,"app-icon",30),t.TgZ(4,"h5"),t._uU(5),t.ALo(6,"translate"),t.qZA()()(),t.BQk()}2&i&&(t.xp6(1),t.Q6J("@addBtn",void 0),t.xp6(4),t.Oqu(t.lcZ(6,2,"byod.dialogs.ph-discount-dialog.add-another-card")))}function Rd(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Gd,31,48,"div",37),t.YNc(2,Ed,3,3,"div",38),t.YNc(3,$d,7,4,"ng-container",5),t.BQk()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("ngForOf",e.cards.controls),t.xp6(1),t.Q6J("ngIf",e.isMaximumDiscount&&"takeaway"===e.orderContext.mode&&!e.phDiscountForm.invalid),t.xp6(1),t.Q6J("ngIf",e.showAddAnotherCard&&!e.isMaximumDiscount&&!e.phDiscountForm.invalid)}}function Vd(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",33)(1,"div",13)(2,"div",14),t._UZ(3,"app-icon",15),t.TgZ(4,"h3",34),t._uU(5),t.ALo(6,"translate"),t.qZA()(),t.TgZ(7,"mat-radio-button",35),t.NdJ("click",function(o){const l=t.CHM(e).$implicit,c=t.oxw(2);return t.KtG(c.selectRoleFun(o,l))}),t.qZA()(),t.YNc(8,Rd,4,3,"ng-container",5),t.ynx(9),t._UZ(10,"div",36),t.BQk(),t.qZA()}if(2&i){const e=a.$implicit,n=t.oxw(2);t.xp6(5),t.hij(" ",t.lcZ(6,6,null!=e&&null!=e.conditions[0]&&null!=e.conditions[0].demos&&e.conditions[0].demos.includes("elder")?"byod.dialogs.ph-discount-dialog.senior-citizen":"byod.dialogs.ph-discount-dialog.pwd")," "),t.xp6(2),t.Q6J("id",e.name)("value",null==e.conditions[0]?null:e.conditions[0].demos[0])("checked",(null==e.conditions[0]?null:e.conditions[0].demos[0])===n.selectedRole)("disabled",(null==e.conditions[0]?null:e.conditions[0].demos[0])!==n.selectedRole),t.xp6(1),t.Q6J("ngIf",null==e||null==e.conditions[0]||null==e.conditions[0].demos?null:e.conditions[0].demos.includes(n.selectedRole))}}function Hd(i,a){if(1&i&&(t.TgZ(0,"div",31),t.YNc(1,Vd,11,8,"div",32),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.discounts)}}function Kd(i,a){1&i&&(t.TgZ(0,"div",79),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.Q6J("@cardError",void 0),t.xp6(1),t.hij(" ",t.lcZ(2,2,"byod.dialogs.ph-discount-dialog.card-duplicated"),""))}function Wd(i,a){1&i&&(t.TgZ(0,"span"),t._uU(1," , "),t.qZA())}function Xd(i,a){1&i&&(t.TgZ(0,"span",86),t._uU(1," & "),t.qZA())}function tm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",83)(1,"span",84),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.agreementClicked([r]))}),t._uU(2),t.ALo(3,"i18n"),t.qZA(),t.YNc(4,Wd,2,0,"span",5),t.YNc(5,Xd,2,0,"span",85),t.qZA()}if(2&i){const e=a.$implicit,n=a.index,o=t.oxw(3);t.xp6(2),t.Oqu(t.Dn7(3,3,e,o.context.userLang,"title")),t.xp6(2),t.Q6J("ngIf",n<o.passiveAgreement.length-1&&n!=o.passiveAgreement.length-2),t.xp6(1),t.Q6J("ngIf",n==o.passiveAgreement.length-2)}}const em=function(i){return{"brand-name-long":i}};function nm(i,a){if(1&i&&(t.TgZ(0,"div",80)(1,"div",81),t._uU(2),t.ALo(3,"translate"),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t.YNc(6,tm,6,7,"div",82),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.VKq(6,em,(null==e.context.brand.name?null:e.context.brand.name.length)>20)),t.xp6(1),t.Oqu(t.lcZ(3,4,"byod.dialogs.ph-discount-dialog.tnc-message")),t.xp6(3),t.hij("",e.context.brand.name,"'s"),t.xp6(1),t.Q6J("ngForOf",e.passiveAgreement)}}function im(i,a){if(1&i&&(t.TgZ(0,"div",75),t.YNc(1,Kd,3,4,"div",76),t.TgZ(2,"button",77),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.YNc(5,nm,7,8,"div",78),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.phDiscountForm.hasError("idDuplicated")),t.xp6(1),t.Q6J("disabled",e.phDiscountForm.invalid&&!e.formEmpty()),t.xp6(1),t.hij("",t.lcZ(4,4,"buttons.confirm")," "),t.xp6(2),t.Q6J("ngIf",e.passiveAgreement.length>0)}}function om(i,a){1&i&&(t.TgZ(0,"div",79),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.Q6J("@cardError",void 0),t.xp6(1),t.hij(" ",t.lcZ(2,2,"byod.dialogs.ph-discount-dialog.card-duplicated"),""))}function rm(i,a){if(1&i&&(t.TgZ(0,"div",75),t.YNc(1,om,3,4,"div",76),t.TgZ(2,"button",77),t._uU(3),t.ALo(4,"translate"),t.qZA()()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.phDiscountForm.hasError("idDuplicated")),t.xp6(1),t.Q6J("disabled",e.phDiscountForm.invalid&&!e.formEmpty()),t.xp6(1),t.hij("",t.lcZ(4,3,"buttons.confirm")," ")}}let Ke=(()=>{class i extends G.T{constructor(e,n,o,r,l){super(e),this.injector=e,this.fb=n,this.phDiscountCardService=o,this.photoService=r,this.agreementService=l,this.selectedRole="",this.discounts=[],this.selectedDiscount={},this.isMaximumDiscount=!1,this.photoSizeLimit=2,this.passiveAgreement=[],this.activeAgreement=[],this.passiveTickAgreement=[],this.paymayaCardactiveAgreement=[],this.isChangeCradRole=!1,this.isConfigNewLogic=!1,this.isConfigNewLogic=this.settingManager.get("SC_PWD.isUseNewLogic",!1)||!1,this.phDiscountForm=this.fb.group({cards:this.fb.array(this.initCardsForm())},{validators:[this.cardIdValidator]}),"dinein"!==this.phDiscountCardService.orderManager.mode&&(this.phDiscountCardService.groupSize=30),this.checkGroupSize(),this.selectedRole=this.phDiscountCardService.getPhcardRole(),this.getArticles(),this.agreementSorting(),this.sortingDiscounts()}agreementSorting(){this.passiveAgreement=this.agreementService.agreementSorting("identity","passive",this.orderContext.mode),this.activeAgreement=this.agreementService.agreementSorting("identity","active",this.orderContext.mode),this.passiveTickAgreement=this.agreementService.agreementSorting("identity","passiveTick",this.orderContext.mode),this.processAgreementTick(this.passiveTickAgreement),this.paymayaCardactiveAgreement=this.agreementService.agreementSorting("tokenize-card","active",this.orderContext.mode);const e=this.agreementService.sessionSorting(this.activeAgreement,"identity");console.log(e)}processAgreementTick(e=[]){}agreementClicked(e){this.agreementService.showAgreement(e,"identity",!0)}sortingDiscounts(){var e,n,o,r,l,c,s,d,m;if(this.isConfigNewLogic){const p=null===(e=this.context)||void 0===e?void 0:e.discounts,h=null===(n=this.orderContext)||void 0===n?void 0:n.mode;p.forEach((x,v)=>{var y,A,L,E,$,R,w;if(((null===(y=null==x?void 0:x.enabledStoreIds)||void 0===y?void 0:y.includes(this.orderContext.store.id))||0==(null==x?void 0:x.enabledStoreIds.length))&&((null===(A=x.modes)||void 0===A?void 0:A.includes(h))||0===(null===(L=x.modes)||void 0===L?void 0:L.length)||null===x.modes)){const O=this.discounts.findIndex(b=>{var P,B;return null===(B=null===(P=b.conditions[0])||void 0===P?void 0:P.demos)||void 0===B?void 0:B.includes("elder")}),T=this.discounts.findIndex(b=>{var P,B;return null===(B=null===(P=b.conditions[0])||void 0===P?void 0:P.demos)||void 0===B?void 0:B.includes("disability")});if((null===($=null===(E=x.conditions[0])||void 0===E?void 0:E.demos)||void 0===$?void 0:$.includes("elder"))&&-1===O){const b=(0,V.Z)(x);b.name=this.t.instant("byod.dialogs.ph-discount-dialog.senior-citizen"),b.desc=this.t.instant("byod.dialogs.ph-discount-dialog.senior-citizen"),b.conditions[0].demos=["elder"],b.sort=1,this.discounts.push(b)}if((null===(w=null===(R=null==x?void 0:x.conditions[0])||void 0===R?void 0:R.demos)||void 0===w?void 0:w.includes("disability"))&&-1===T){const b=(0,V.Z)(x);b.name=this.t.instant("byod.dialogs.ph-discount-dialog.pwd"),b.desc=this.t.instant("byod.dialogs.ph-discount-dialog.pwd"),b.conditions[0].demos=["disability"],b.sort=2,this.discounts.push(b)}}}),this.discounts=this.discounts.sort((x,v)=>x.sort-v.sort)}else this.discounts=null===(r=null===(o=this.context)||void 0===o?void 0:o.discounts)||void 0===r?void 0:r.filter(p=>{var h,x,v,y,A;return((null===(x=null===(h=null==p?void 0:p.conditions[0])||void 0===h?void 0:h.demos)||void 0===x?void 0:x.includes("elder"))||(null===(y=null===(v=null==p?void 0:p.conditions[0])||void 0===v?void 0:v.demos)||void 0===y?void 0:y.includes("disability")))&&((null===(A=null==p?void 0:p.enabledStoreIds)||void 0===A?void 0:A.includes(this.orderContext.store.id))||0==(null==p?void 0:p.enabledStoreIds.length))}),this.discounts=this.discounts.sort((p,h)=>h.priority-p.priority);this.discounts=this.discounts.sort((p,h)=>h.priority-p.priority),this.selectedDiscount=this.selectedRole||(null===(l=this.cards)||void 0===l?void 0:l.value[0].role)?this.discounts.find(p=>p.conditions[0].demos.includes(this.cards.value[0].role)):this.discounts[0],this.maxApplication=null!==(m=null===(d=null===(s=null===(c=this.selectedDiscount)||void 0===c?void 0:c.benefits)||void 0===s?void 0:s[0])||void 0===d?void 0:d.max)&&void 0!==m?m:-1}selectRoleFun(e,n){var o,r;(null===(o=n.conditions[0])||void 0===o?void 0:o.demos[0])!==this.selectedRole&&(this.selectedRole&&this.checkCardsVal()?this.dialogService.showConfirmCancle(this.t.instant("byod.dialogs.ph-discount-dialog.confirmation"),this.t.instant("byod.dialogs.ph-discount-dialog.remove-discounts",{card:this.t.instant("elder"===this.selectedRole?"byod.dialogs.ph-discount-dialog.senior-discount":"byod.dialogs.ph-discount-dialog.person-with-disability")}),{cancelText:this.t.instant("byod.dialogs.ph-discount-dialog.cancel"),okText:this.t.instant("byod.dialogs.ph-discount-dialog.proceed"),panelClass:"custom-modalbox",callback:l=>{var c,s;"OK"===l&&(this.selectedRole=(null===(c=n.conditions[0])||void 0===c?void 0:c.demos[0])||"",this.selectedDiscount=n,this.maxApplication=null!==(s=this.selectedDiscount.benefits[0].max)&&void 0!==s?s:-1,this.phDiscountCardService.hasPhCard()&&(this.isChangeCradRole=!0),this.phDiscountCardService.clearPhCards(),this.phDiscountForm=this.fb.group({cards:this.fb.array(this.initCardsForm())},{validators:[this.cardIdValidator]}),this.checkGroupSize())}}):(this.selectedRole=(null===(r=n.conditions[0])||void 0===r?void 0:r.demos[0])||"",this.selectedDiscount=n,this.cards.controls.forEac
1h((l,c)=>{l.patchValue({role:this.selectedRole})})))}checkCardsVal(){return!!(this.cards.at(0).get("name").value||this.cards.at(0).get("number").value||this.cards.at(0).get("imageId").value)}hideCardContent(e,n){this.cards.at(n).patchValue({iShow:!e.get("iShow").value})}clearFormData(e,n){this.cards.at(n).patchValue({name:"",number:"",imageId:"",uploadStatus:"unUpload"})}removeSkill(e,n){this.cards.removeAt(n),this.cards.controls.length<=0&&(this.addNewCardField(),this.selectedRole=""),this.cards.at(this.cards.controls.length-1).patchValue({iShow:!0})}removeUploaded(e,n){this.cards.at(n).patchValue({imageId:"",uploadStatus:"unUpload"})}cancelUpload(e){this.cards.at(e).patchValue({imageId:"",uploadStatus:"cancleUpload"})}get showAddAnotherCard(){var e,n;let o=!0;const r=null===(n=null===(e=this.cards)||void 0===e?void 0:e.controls)||void 0===n?void 0:n.length;if(0===r||this.maxApplication<=r)return!1;const l=this.cards.at(r-1).getRawValue()||{};return Object.keys(l).forEach(c=>{this.isShowUploadImage()?(""===l[c]||null===l[c])&&(o=!1):(!l.name||!l.number)&&(o=!1)}),o}compressorImage(e,n=.9){return(0,Q.mG)(this,void 0,void 0,function*(){const o=new Image;return o.src=e,new Promise((r,l)=>{o.onload=()=>{const c=document.createElement("canvas"),s=c.getContext("2d"),d=o.width,m=o.height;let p="";c.width=d,c.height=m,s.drawImage(o,0,0,d,m),p=c.toDataURL("image/jpeg",n),atob(p.split(",")[1]),console.log(p),p?r(p):l(e)}})})}clickUploadValid(e,n){var o,r,l;return(0,Q.mG)(this,void 0,void 0,function*(){if(!this.photoService.isAvailable())return;this.dialogService.superloading(!0);let c=null;try{c=yield this.photoService.getPhoto({header:this.t.instant("byod.dialogs.ph-discount-dialog.get-photo-header"),cancel:this.t.instant("byod.dialogs.ph-discount-dialog.get-photo-cancle"),fromPhoto:this.t.instant("byod.dialogs.ph-discount-dialog.get-photo-select"),takePicture:this.t.instant("byod.dialogs.ph-discount-dialog.get-photo-picture")})}catch(v){if((null===(o=null==v?void 0:v.message)||void 0===o?void 0:o.includes("Error loading image"))||(null===(r=null==v?void 0:v.errorMessage)||void 0===r?void 0:r.includes("Error loading image")))return this.dialogService.showAlert(this.t.instant("byod.dialogs.ph-discount-dialog.invalid-image"),this.t.instant("byod.dialogs.ph-discount-dialog.error-loading-image")),this.dialogService.superloading(!1)}if(!c)return this.dialogService.superloading(!1);const s=zt.dV.isNativePlatform()?null==c?void 0:c.path:null==c?void 0:c.webPath;if(!s)return this.dialogService.superloading(!1);console.log("imageUrl",s);let d=s;if("pdf"===(null==c?void 0:c.format))return this.dialogService.showAlert(this.t.instant("byod.dialogs.ph-discount-dialog.invalid-file-type"),this.t.instant("byod.dialogs.ph-discount-dialog.upload-image-type")),this.dialogService.superloading(!1);if(zt.dV.isNativePlatform()){const v=yield ld.readFile({path:s});if(null==v||!v.data)return this.dialogService.superloading(!1);d=null!==(l=null==v?void 0:v.data)&&void 0!==l&&l.includes("base64")?null==v?void 0:v.data:`data:image/${null==c?void 0:c.format};base64,${null==v?void 0:v.data}`}else{if("tiff"===(null==c?void 0:c.format)||"heic"===(null==c?void 0:c.format)||"pdf"===(null==c?void 0:c.format))return this.dialogService.showAlert(this.t.instant("byod.dialogs.ph-discount-dialog.invalid-file-type"),this.t.instant("byod.dialogs.ph-discount-dialog.upload-image-type")),this.dialogService.superloading(!1);"jpeg"!==(null==c?void 0:c.format)&&(d=yield this.photoService.convertToJpg(d,1))}if(!d)return this.dialogService.showAlert(this.t.instant("byod.dialogs.ph-discount-dialog.invalid-image"),this.t.instant("byod.dialogs.ph-discount-dialog.error-loading-image")),this.dialogService.superloading(!1);console.log("blobUrl",d);try{var m=yield(yield fetch(d)).blob();console.log("blob",m)}catch(v){return this.dialogService.showError(v),this.dialogService.superloading(!1)}const p=1024*Number(this.photoSizeLimit)*1024;if(Number(null==m?void 0:m.size)>p){let v=.5;const y=yield this.photoService.compressAccurately(m,d,1024*Number(this.photoSizeLimit)*.95,v);if(y&&(m=y),Number(null==m?void 0:m.size)>p)return this.dialogService.showAlert(this.t.instant("byod.dialogs.ph-discount-dialog.file-exceeds-maximum-size"),this.t.instant("byod.dialogs.ph-discount-dialog.upload-file-nomore-than")+` ${this.photoSizeLimit} MB`,()=>{},!1,!1,{panelClass:"file-exceeds-maximum"}),this.dialogService.superloading(!1)}this.cards.at(n).patchValue({uploadStatus:"uploading"}),e.patchValue({progress:1});let h=setInterval(()=>{e.patchValue({seconds:e.get("seconds").value+1})},1e3);const x=this.context.brandId;this.dialogService.superloading(!1),this.dataService.postFile("/api/v1/identify/image.json",m,{brandId:x}).subscribe(v=>{var y,A;if("cancleUpload"!==e.get("uploadStatus").value&&(v.type===Ee.dt.UploadProgress&&e.patchValue({progress:Math.round(98*v.loaded/v.total)}),v.type===Ee.dt.Response)){let L=(null===(A=null===(y=v.body)||void 0===y?void 0:y.data)||void 0===A?void 0:A.imageId)||"";e.patchValue({imageId:L||"",uploadStatus:"uploaded",progress:Math.round(100*v.loaded/v.total)})}},v=>{504===v.status?this.dialogService.showAlert("",this.t.instant("global.network-error")):this.dialogService.showError(v),this.removeUploaded(e,n),clearInterval(h),e.patchValue({seconds:1})},()=>{clearInterval(h),e.patchValue({seconds:1})})})}getImageFromId(e){return new Promise((n,o)=>{this.dataService.getRaw(`/api/v1/identify/image/${e}.json`,{brandId:this.context.brandId},!0).subscribe(r=>{n(r)},r=>{o(r)})})}
1getArticles(){var e,n,o;const r="/api/v1/store/article.json",l={storeId:this.context.storeId||(null===(o=null===(n=null===(e=this.route)||void 0===e?void 0:e.snapshot)||void 0===n?void 0:n.params)||void 0===o?void 0:o.storeId)};this.dataService.get(r,l,!0).subscribe(c=>{var s,d,m;const p=c.filter(h=>h.trigger.includes("country-policy"));if(0==p.length){const h={brandId:this.context.brandId||(null===(m=null===(d=null===(s=this.route)||void 0===s?void 0:s.snapshot)||void 0===d?void 0:d.params)||void 0===m?void 0:m.brandId)};this.dataService.get(r,h,!0).subscribe(x=>{const v=x.filter(y=>y.trigger.includes("country-policy"));this.policy=v[0]},x=>{console.log(x)})}else this.policy=p[0]},c=>{console.log(c)})}get cards(){return this.phDiscountForm.get("cards")}getFormError(e,n){}initCardsForm(){const e=this.phDiscountCardService.getPhCards();return e&&e.length>0?e.map(n=>this.createCardFormGroup(null==n?void 0:n.role,null==n?void 0:n.name,null==n?void 0:n.number,null==n?void 0:n.imageId)):[this.createCardFormGroup()]}createCardFormGroup(e=this.selectedRole,n="",o="",r=""){return this.fb.group(this.isConfigNewLogic?{role:[e,[g.kI.required]],name:[n,[g.kI.required,this.noWhiteSpaceValidator,this.noEmojiAndOtherCharacters,this.noNumberFromName]],number:[o,[g.kI.required,this.noWhiteSpaceValidator,this.noEmojiAndOtherCharacters]],imageId:this.isShowUploadImage()?[r,[g.kI.required,this.noWhiteSpaceValidator]]:[],iShow:[!0],uploadStatus:[r?"uploaded":"unUpload"],progress:[0],seconds:[1]}:{role:[e,[g.kI.required]],name:[n,[g.kI.required,this.noWhiteSpaceValidatorOld]],number:[o,[g.kI.required,this.noWhiteSpaceValidatorOld]]})}noWhiteSpaceValidator(e){var n;let r=!(0===(e.value||"").trim().length);const l=null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.split("");return" "===(null==l?void 0:l[0])&&(r=!1),r?null:{whitespace:!0}}noWhiteSpaceValidatorOld(e){const o=!(0===(e.value||"").trim().length);return console.log(11111,o),o?null:{whitespace:!0}}noEmojiAndOtherCharacters(e){var n,o;let c=!0;return null!=e&&e.value&&(/[^a-zA-Z0-9\u4e00-\u9fa5\s.]/g.test(null===(n=e.value)||void 0===n?void 0:n.trim())&&(c=!1),/[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi.test(null===(o=e.value)||void 0===o?void 0:o.trim())&&(c=!1)),c?null:{emojiAndOtherCharacters:!0}}noNumberFromName(e){var n;let r=!0;return null!=e&&e.value&&(/^[\u4e00-\u9fa5A-Za-z\s./-]+$/.test(null===(n=e.value)||void 0===n?void 0:n.trim())||(r=!1)),r?null:{nameHaveNumberCharacters:!0}}checkNameSpaces(e){let n=e.split("");return" "===n[0]||" "===n[n.length-1]}addNewCardField(){var e;if(this.isConfigNewLogic){if(this.cards.value.length>=this.selectedDiscount.benefits[0].max)return void this.dialogService.showAlert("",this.t.instant("byod.dialogs.ph-discount-dialog.maximum-limit"));this.hideFrontCardContent(),this.cards.push(this.createCardFormGroup()),this.checkGroupSize()}else{if(this.cards.value.length>=(null===(e=this.discounts[0])||void 0===e?void 0:e.benefits[0].max))return void this.dialogService.showAlert("",this.t.instant("byod.dialogs.ph-discount-dialog.maximum-limit"));this.cards.push(this.createCardFormGroup()),this.selectedRole=this.cards.at(0).get("role").value,this.checkGroupSize()}}hideFrontCardContent(){this.cards.controls.forEach((e,n)=>{e.patchValue({iShow:!1})})}deleteCardField(e){this.cards.removeAt(e),this.checkGroupSize(),this.cards.controls.length<=0&&(this.addNewCardField(),this.selectedRole="")}cardIdValidator(e){var n,o;const r=null!==(o=null===(n=e.get("cards"))||void 0===n?void 0:n.value)&&void 0!==o?o:[],l=[];return r.some(s=>l.indexOf(s.number)>=0||(l.push(s.number),!1))?{idDuplicated:!0}:null}isShowUploadImage(){return this.isConfigNewLogic&&this.settingManager.get("SC_PWD.showUploadImage",!1)}shouldDisableRole(e,n){return(0!==n||this.cards.controls.length>1)&&this.selectedRole!==e}handleCardsSubmit(){if(this.formEmpty())return this.phDiscountCardService.clearPhCards(),void this.dialogService.submitAuxDialog({cards:{}});this.phDiscountCardService.setPhCards(this.cards.value),this.dialogService.submitAuxDialog({cards:this.cards.value})}formEmpty(){var e,n,o;return 1===(null===(n=null===(e=this.cards)||void 0===e?void 0:e.controls)||void 0===n?void 0:n.length)&&(null===(o=this.cards.at(0).get("role").value)||void 0===o?void 0:o.length)<=0}ngOnInit(){this.phDiscountForm.valueChanges.subscribe(()=>
1{(this.phDiscountForm.valid||this.phDiscountForm.invalid)&&this.checkGroupSize()}),this.photoSizeLimit=this.settingManager.get("SC_PWD.maximumFileSize",2)||2}closed(){var e;if(this.isChangeCradRole){const n=this.routingService.getAuxProfile();null!==(e=null==n?void 0:n.input)&&void 0!==e&&e.callback&&setTimeout(()=>{null==n||n.input.callback({cards:{}})},20)}this.routingService.navigateCloseAllModal()}checkGroupSize(){this.isMaximumDiscount=this.cards.value.length>=this.phDiscountCardService.groupSize}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(g.qu),t.Y36(jt.O),t.Y36(cd),t.Y36(sd.f))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-ph-discount-dialog"]],features:[t.qOj],decls:10,vars:11,consts:[[1,"container","h-full","flex","flex-col"],[3,"title","back","customCloseLogic","closed"],[1,"flex","flex-col","flex-grow",3,"formGroup","submit"],["formArrayName","cards",1,"flex-grow","h-full","overflow-y-auto","overflow-x-hidden"],["class","discount-article",4,"ngIf"],[4,"ngIf"],["class","role-list-card",4,"ngIf"],["class","div-btn-confirm",4,"ngIf"],[1,"discount-article"],[3,"innerHTML"],["class","flex flex-col items-center div-one-card ",4,"ngFor","ngForOf"],[1,"flex","flex-col","items-center","div-one-card"],[1,"mobile:px-4","desktop:px-6","w-full",3,"formGroupName"],[1,"card-title-bin","flex","items-center","justify-between"],[1,"flex","items-center"],["name","badge","size","18","source","mat",1,"flex","icon-id","mr-2"],["class","card-no",4,"ngIf"],["mat-icon-button","","type","button",1,"flex","justify-center","items-center",3,"click"],["name","delete_outline","size","18","source","mat",1,"flex","icon-bin"],["appearance","outline"],["formControlName","role",3,"selectionChange"],[3,"value","disabled"],["class","div-line-add w-full pb-12",4,"ngIf"],[1,"card-no"],["matInput","","formControlName","name"],["matInput","","formControlName","number"],[1,"div-line-add","w-full","pb-12"],[1,"item-divider"],[1,"div-add-card","mobile:px-4","desktop:px-6","w-full"],["mat-stroked-button","","type","button",1,"btn-add-card","w-full",3,"click"],["name","add_circle_outline","size","25","source","mat",1,"flex"],[1,"role-list-card"],["class","mobile:px-4 desktop:px-6 w-full role-item-card",4,"ngFor","ngForOf"],[1,"mobile:px-4","desktop:px-6","w-full","role-item-card"],[1,"card-discount-name"],[3,"id","value","checked","disabled","click"],[1,"line"],["class","card-content-container",3,"formGroupName",4,"ngFor","ngForOf"],["class","max-discount",4,"ngIf"],[1,"card-content-container",3,"formGroupName"],[1,"card-header-title","flex","flex-center","items-center",3,"ngClass","click"],["class","card-title-name",4,"ngIf"],["name","keyboard_arrow_down","size","18","source","mat",1,"flex","icon-id",3,"ngClass"],[1,"card-content",3,"ngClass"],[1,"name-with-id","flex","flex-center","items-center"],[1,"label-with-name",3,"ngClass"],[1,"mat-label"],["maxlength","80","formControlName","name","placeholder","Enter full name",1,"card-input",3,"ngClass"],["class","error-required",4,"ngIf"],["formControlName","number",1,"card-input",3,"ngClass","placeholder"],["class","clear-width-remove flex items-center",4,"ngIf"],[1,"card-title-name"],[1,"error-required"],[1,"upload-image-required"],["class","upload-validID-container",3,"click",4,"ngIf"],["class","uploading-valid-div",4,"ngIf"],["class","uploaded-valid-success",4,"ngIf"],[1,"upload-validID-container",3,"click"],[1,"upload-div","flex","items-center"],["name","cloud_upload","size","26","source","mat",1,"flex","icon-id","mb-2"],[1,"upload-tips","flex","items-center"],[1,"mt-2"],[1,"uploading-valid-div"],[1,"title"],[1,"time-remaining","flex","items-center"],[1,"cancel-btn",3,"click"],[1,"uploaded-valid-success"],[1,"image-with-text","flex","items-center"],["name","attach_file","size","20","source","mat",1,"flex","link-icon"],[3,"click"],["name","clear","size","20","source","mat",1,"flex","icon-id"],[1,"clear-width-remove","flex","items-center"],[3,"click",4,"ngIf"],[1,"max-discount"],[1,"add-anoter-card"],[1,"div-btn-confirm"],["class","card-duplicated-error",4,"ngIf"],["mat-flat-button","","color","primary","type","submit",1,"w-full",3,"disabled"],["class","tips justify-center flex tnc-line","data-testid","checkout-passive-tnc",4,"ngIf"],[1,"card-dupl
1icated-error"],["data-testid","checkout-passive-tnc",1,"tips","justify-center","flex","tnc-line"],[1,"tnc-message",3,"ngClass"],["class","agreement-content","data-testid","checkout-passive-tnc-link",4,"ngFor","ngForOf"],["data-testid","checkout-passive-tnc-link",1,"agreement-content"],[1,"tnc-link",3,"click"],["class","tnc-and",4,"ngIf"],[1,"tnc-and"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("closed",function(){return n.closed()}),t.ALo(2,"translate"),t.qZA(),t.TgZ(3,"form",2),t.NdJ("submit",function(){return n.handleCardsSubmit()}),t.TgZ(4,"div",3),t.YNc(5,dd,3,3,"div",4),t.YNc(6,Od,2,1,"ng-container",5),t.YNc(7,Hd,2,1,"div",6),t.qZA(),t.YNc(8,im,6,6,"div",7),t.YNc(9,rm,5,5,"div",7),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,9,"byod.dialogs.ph-discount-dialog.pwd-sc-discount"))("back",!1)("customCloseLogic",!0),t.xp6(2),t.Q6J("formGroup",n.phDiscountForm),t.xp6(2),t.Q6J("ngIf",null==n.policy?null:n.policy.body),t.xp6(1),t.Q6J("ngIf",!n.isConfigNewLogic),t.xp6(1),t.Q6J("ngIf",n.isConfigNewLogic),t.xp6(1),t.Q6J("ngIf",n.isConfigNewLogic),t.xp6(1),t.Q6J("ngIf",!n.isConfigNewLogic))},dependencies:[_.mk,_.sg,_.O5,g._Y,g.Fj,g.JJ,g.JL,g.nD,g.sg,g.u,g.x0,g.CE,S.o,k.v,et.d,I.lW,vt.U0,Z.TO,Z.KE,Z.hX,Ht.gD,U.ey,j.Nt,_.JJ,M.X$,D.G,Re.z],styles:['[_nghost-%COMP%]{display:block;height:100%}.mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-radio-button[_ngcontent-%COMP%],   .mat-radio-disabled .mat-radio-label{cursor:pointer!important}.container[_ngcontent-%COMP%]{background:white}form[_ngcontent-%COMP%]{height:calc(100% - 56px)}.tnc-link[_ngcontent-%COMP%]{cursor:pointer}  .file-exceeds-maximum .alert-msg{padding-right:20px}mat-radio-button[_ngcontent-%COMP%]  .mat-radio-outer-circle{border-color:var(--P)!important}mat-radio-button[_ngcontent-%COMP%]  .mat-radio-inner-circle{background-color:var(--P)!important}.div-one-card[_ngcontent-%COMP%]{overflow-y:hidden}.tips-top-card[_ngcontent-%COMP%]{padding:.8rem 1rem}.tips-top-card[_ngcontent-%COMP%]   .tips-content[_ngcontent-%COMP%]{border-radius:.5rem;padding:.8rem 1rem;background:#EDFFF2;color:#017923;border:1px solid #017923;font-size:1rem;line-height:1.5rem;font-style:normal;font-weight:400;display:flex;align-items:center}.discount-article[_ngcontent-%COMP%]{font-size:.875rem;line-height:normal;margin:1rem;padding:1rem 1.25rem;color:#333;background:var(--P50);border-radius:.5rem;color:var(--P800);border:1px solid var(--P)}div.card-title-bin[_ngcontent-%COMP%]{height:3.5rem;line-height:2.5rem;position:relative}div.card-title-bin[_ngcontent-%COMP%]   app-icon.icon-id[_ngcontent-%COMP%]{color:var(--P800)}div.card-title-bin[_ngcontent-%COMP%]   .card-discount-name[_ngcontent-%COMP%]{font-style:normal;font-weight:500;font-size:1rem}div.card-title-bin[_ngcontent-%COMP%]   h3.card-no[_ngcontent-%COMP%]{font-weight:700;text-transform:uppercase;color:#333;font-size:1rem}div.card-title-bin[_ngcontent-%COMP%]   app-icon.icon-bin[_ngcontent-%COMP%]{color:gray}.line[_ngcontent-%COMP%]{position:relative}.line[_ngcontent-%COMP%]:after{content:"";width:200%;height:1px;border-bottom:1px solid #E1E1E1;transform-origin:0;transform:scale(.5);position:absolute;left:0;bottom:0}.role-item-card[_ngcontent-%COMP%]{padding:0 1rem}.role-item-card[_ngcontent-%COMP%]:last-child   .line[_ngcontent-%COMP%]:after{border:0}div.card-content-container[_ngcontent-%COMP%]{border:1px solid #ECECEC;border-radius:4px;margin:.63rem 0}div.card-content-container[_ngcontent-%COMP%]     .mat-radio-label-content{display:none}div.card-content-container[_ngcontent-%COMP%]   .card-header-title[_ngcontent-%COMP%]{min-height:48px;padding:.85rem 1rem;justify-content:space-between;border-bottom:1px solid #ECECEC;cursor:pointer}div.card-content-container[_ngcontent-%COMP%]   .card-header-title[_ngcontent-%COMP%]   .card-title-name[_ng
1content-%COMP%]{color:#000;font-weight:500;font-size:14px;flex:1;width:100%;overflow:hidden;word-break:break-all}div.card-content-container[_ngcontent-%COMP%]   .card-header-title[_ngcontent-%COMP%]   .icon-id[_ngcontent-%COMP%]{color:var(--P800);transition:all .5s}div.card-content-container[_ngcontent-%COMP%]   .card-header-title[_ngcontent-%COMP%]   .changeRoute[_ngcontent-%COMP%]{transform:rotate(180deg);transition:all .5s}div.card-content-container[_ngcontent-%COMP%]   .hide-border-bottom[_ngcontent-%COMP%]{border-bottom:0}div.card-content-container[_ngcontent-%COMP%]   .hide-card-controls[_ngcontent-%COMP%]{display:none}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]{background:#FCFCFC;border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:1rem}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .name-with-id[_ngcontent-%COMP%]{width:100%;justify-content:space-between;margin-bottom:.63rem}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .label-with-name[_ngcontent-%COMP%]{width:calc(50% - 5px);position:relative;margin-bottom:0;transition:all .3s}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .label-with-name[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#eb5757}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .label-with-name[_ngcontent-%COMP%]   .error-required[_ngcontent-%COMP%]{color:#e73f2b;font-size:10px;line-height:15px;position:absolute;left:0;bottom:-20px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .error-class[_ngcontent-%COMP%]{margin-bottom:20px;transition:all .3s}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .mat-label[_ngcontent-%COMP%]{line-height:18px;font-size:12px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .card-input[_ngcontent-%COMP%]{background:#fff;border:1px solid #D1D1D1;border-radius:4px;height:48px;padding:.75rem 1rem;width:100%;margin-top:5px;font-size:13px;font-weight:400}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .error-input[_ngcontent-%COMP%]{border:1px solid #E73F2B}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .card-input[_ngcontent-%COMP%]:focus{border:1px solid transparent!important;outline:1px solid #419343!important}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .card-input[_ngcontent-%COMP%]::-webkit-input-placeholder, div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .card-input[_ngcontent-%COMP%]::-moz-placeholder, div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .card-input[_ngcontent-%COMP%]::-ms-input-placeholder{color:#e0e0e0;font-size:13px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-input-placeholder{color:#e0e0e0;font-size:13px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-image-required[_ngcontent-%COMP%]{text-align:right;width:100%}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-image-required[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#eb5757;font-size:12px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]{border:1px dashed #E0E0E0;border-radius:4px;background:#fff;padding:1rem;font-size:.75rem;cursor:pointer}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]   .upload-div[_ngcontent-%COMP%]{flex-direction:column;justify-content:center;text-align:center;padding-bottom:.63rem;position:relative}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]   .upload-div[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{line-height:1.15rem;padding:0 1.15rem;font-weight:400;color:#333}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]   .icon-id[_ngcontent-%COMP%]{color:var(--P800)}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]   .upload-div[_ngcontent-%COMP%]:after{content:"";position:absolute;
1left:0;bottom:0;height:1px;width:200%;transform:scale(.5);border-bottom:1px solid #E1E1E1;transform-origin:0}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .upload-validID-container[_ngcontent-%COMP%]   .upload-tips[_ngcontent-%COMP%]{flex-direction:column;justify-content:center;text-align:center;padding-top:.63rem;color:#828282;line-height:1.15rem;font-weight:400}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]{border:1px solid #E0E0E0;border-radius:8px;background:#fff;padding:1rem;display:flex;align-items:center}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:.75rem;color:#333;line-height:1.15rem}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .progress[_ngcontent-%COMP%]{margin:.63rem 0}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .progress[_ngcontent-%COMP%]     .mat-progress-bar{height:8px;border-radius:4px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .time-remaining[_ngcontent-%COMP%]{width:100%;font-size:10px;color:#828282;justify-content:flex-end}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .time-remaining[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:#178d1d}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploading-valid-div[_ngcontent-%COMP%]   .time-remaining[_ngcontent-%COMP%]   .cancel-btn[_ngcontent-%COMP%]{color:#eb5757;font-size:.75rem;cursor:pointer}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploaded-valid-success[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border:1px solid #E0E0E0;height:49px;border-radius:8px;background:#fff}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploaded-valid-success[_ngcontent-%COMP%]   .image-with-text[_ngcontent-%COMP%]   .link-icon[_ngcontent-%COMP%]{color:#bebebe;margin-right:5px}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .uploaded-valid-success[_ngcontent-%COMP%]   .icon-id[_ngcontent-%COMP%]{color:#e73f2b;cursor:pointer}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .clear-width-remove[_ngcontent-%COMP%]{margin-top:.63rem;justify-content:flex-end}div.card-content-container[_ngcontent-%COMP%]   .card-content[_ngcontent-%COMP%]   .clear-width-remove[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-left:1.25rem;color:#eb5757;font-size:.75rem;line-height:1.5rem;cursor:pointer}.add-anoter-card[_ngcontent-%COMP%]{margin-top:1.25rem;margin-bottom:.63rem}.add-anoter-card[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]{border:1px solid var(--P800)!important;color:var(--P800);font-size:.85rem}.add-anoter-card[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-anoter-card[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--P800);margin-right:.5rem}.add-anoter-card[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{color:var(--P800);font-size:.85rem}@media screen and (min-width: 600px){.add-anoter-card[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.add-anoter-card[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:169px!important}}div.div-line-add[_ngcontent-%COMP%]   mat-divider[_ngcontent-%COMP%]{margin-bottom:1.5rem}div.div-line-add[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]{border:1px dashed lightgrey!important;color:var(--P800);height:3.5rem}div.div-line-add[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center}div.div-line-add[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{color:var(--P800);margin-right:.5rem}div.div-line-add[_ngcontent-%COMP%]   button.btn-add-card[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{color:var(--P800);font-size:1rem}div.div-btn-confirm[_ngcontent-%COMP%]{padding:.8rem 1rem!important;border-top:none!important;box-shadow:0 3px .63rem #0003!important}div.div-btn-confirm[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px;text-transform:uppercase}div.div-btn-confirm[_ngcontent-%COMP%]   .tips[_ngcontent-%COMP%]{flex-direction:column;font-size:14px;color:#333;text-align:center;word-break:break-word;line-height:20px;margin:5px 0}div.div-btn-confirm[_ngcontent-%COMP%]   .tips[_ngcontent-%COMP%]   .agreement-content[_ngcontent-%COMP%]{margin-left:5px}div.div-btn-confirm[_ngcontent-%COMP%]   .tips[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{color:var(--P800)}div.div-btn-confirm[_ngcontent-%COMP%]   .tnc-message[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;white-space:nowrap;overflow:hidden}div.div-btn-confirm[_ngcontent-%COMP%]   .tnc-message[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-left:5px;color:#333}@media screen and (max-width: 599px){div.div-btn-confirm[_ngcontent-%COMP%]   .tips[_ngcontent-%COMP%]{flex-direction:column}}div.div-add-card[_ngcontent-%COMP%]{animation:bottomin .5s ease-in-out}
1.card-duplicated-error[_ngcontent-%COMP%]{text-align:center;margin:.5rem 0;color:var(--W);font-weight:500}@media screen and (max-width: 599px){.card-discount-name[_ngcontent-%COMP%]{font-weight:700!important}.brand-name-long[_ngcontent-%COMP%]{flex-direction:column}}.discount-info[_ngcontent-%COMP%]{margin:1rem 0;padding:0rem 1.25rem}.discount-info[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:1rem 0;font-size:14px;font-weight:500;line-height:22px;text-align:left;color:#595959}.max-discount[_ngcontent-%COMP%]{color:#d83420;font-family:var(--CF0);font-size:16px;font-weight:600;line-height:24px;text-align:center;margin:1rem 0}'],data:{animation:[(0,f.X$)("cardError",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateY(-1em)"}),(0,f.jt)("0.2s ease-out",(0,f.oB)({opacity:1,transform:"translateY(0)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.2s ease-out",(0,f.oB)({opacity:0,transform:"translateY(-1em)"}))])]),(0,f.X$)("card",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateY(-50px)",height:0}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateY(0)",height:f.l3}))]),(0,f.eR)(":leave",[(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:0,transform:"translateY(-50px)",height:0}))])]),(0,f.X$)("addBtn",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateY(100%)"}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateY(0)"}))])])]}}),i})();function am(i,a){if(1&i&&(t.TgZ(0,"span",10),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.hij("",t.xi3(2,1,e.ig,e.context.userLang)," ")}}function lm(i,a){if(1&i&&(t.TgZ(0,"div",20)(1,"p"),t._uU(2),t.ALo(3,"i18n"),t.qZA(),t._UZ(4,"app-icon",21),t.TgZ(5,"span"),t._uU(6),t.ALo(7,"i18n"),t.qZA()()),2&i){const e=t.oxw(2).$implicit,n=t.oxw().$implicit,o=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,2,n,o.context.userLang)),t.xp6(4),t.Oqu(t.xi3(7,5,e,o.context.userLang))}}function cm(i,a){1&i&&(t.TgZ(0,"span",25),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij("*",t.lcZ(2,1,"byod.dialogs.segment-modifiers-dialog.require"),""))}const sm=function(i,a,e){return{"modifier-selected":i,completed:a,"shake-anime":e}};function dm(i,a){if(1&i&&(t.TgZ(0,"div")(1,"div",22)(2,"p",23),t._uU(3),t.qZA(),t.YNc(4,cm,3,3,"span",24),t.qZA()()),2&i){const e=t.oxw(2),n=e.$implicit,o=e.index,r=t.oxw().$implicit,l=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.kEZ(3,sm,l.isMGroupSelected(r,n),l.isGroupCompleted(r,n),l.transition&&l.isIndex(l.currentIndex,o)&&l.selectedTab==l.modifiableItems.indexOf(r))),t.xp6(2),t.hij(" ",null==l.modifierService?null:l.modifierService.getSelectRules(n),""),t.xp6(1),t.Q6J("ngIf",n.min>0)}}function mm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",17),t.YNc(1,lm,8,8,"div",18),t.YNc(2,dm,5,7,"div",6),t.TgZ(3,"app-mitem-select-chips",19),t.NdJ("itemClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.itemClicked(l,r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.minusClicked(l,r,o))}),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw().$implicit,o=t.oxw(2);t.uIk("data-mg-min",e.min)("data-mg-max",e.max),t.xp6(1),t.Q6J("ngIf",!o.hideModIgName),t.xp6(1),t.Q6J("ngIf",!!o.modifierService.getSelectRules(e)),t.xp6(1),t.Q6J("isEdit",!(null==o.input||!o.input.editOi))("mgroup",e)("item",n)("mdBuilder",o.mdBuilder)}}function gm(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",14),t._UZ(2,"div",15),t.YNc(3,mm,4,8,"div",16),t.qZA(),t._UZ(4,"mat-divider"),t.BQk()),2&i){const e=a.$implicit,n=a.index;t.xp6(2),t.MGl("id","section-",n,""),t.xp6(1),t.Q6J("ngIf",e.items&&e.items.length>0)}}function pm(i,a){if(1&i&&(t.TgZ(0,"mat-tab",13),t.ALo(1,"i18n"),t.YNc(2,gm,5,2,"ng-container",8),t.qZA()),2&i){const e=a.$implicit,n=t.oxw(2);t.Q6J("label",t.xi3(1,2,e,n.context.userLang)),t.xp6(2),t.Q6J("ngForOf",e.mgroups)}}function um(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-tab-group",11),t.NdJ("selectedIndexChange",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.selectedTab=o)}),t.YNc(1,pm,3,5,"mat-tab",12),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("selectedIndex",e.selectedTab),t.xp6(1),t.Q6J("ngForOf",e.modifiableItems)}}function _m(i,a){1&i&&(t.TgZ(0,"span",25),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij("*",t.lcZ(2,1,"byod.dialogs.segment-modifiers-dialog.require"),""))}const fm=function(i,a){return{"modifier-selected":i,completed:a}};function hm(i,a){if(1&i&&(t.TgZ(0,"div")(1,"div",22)(2,"p",23),t._uU(3),t.qZA(),t.YNc(4,_m,3,3,"span",24),t.qZA()()),2&i){const e=t.oxw(2).$implicit,n=t.oxw().$implicit,o=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(3,fm,o.isMGroupSelected(n,e),o.isGroupCompleted(n,e))),t.xp6(2),t.hij(" ",null==o.modifierService?null:o.modifierService.getSelectRules(e),""),t.xp6(1),t.Q6J("ngIf",e.min>0)}}function xm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",17)(1,"div",20)(2,"p"),t._uU(3),t.ALo(4,"i18n"),t.qZA(),t._UZ(5,"app-icon",21),t.TgZ(6,"span"),t._uU(7),t.ALo(8,"i18n"),t.qZA()(),t.YNc(9,hm,5,6,"div",6),t.TgZ(10,"app-mitem-select-chips",19),t.NdJ("itemClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.itemClicked(l,r,o))})("minusClicked",function(o){t.CHM(e);const r=t.oxw().$implicit,l=t.oxw().$implicit,c=t.oxw(2);return t.KtG(c.minusClicked(l,r,o))}),t.qZA()()}if(2&i){const e=t.oxw().$implicit,n=t.oxw().$implicit,o=t.oxw(2);t.uIk("data-mg-min",e.min)("data-mg-max",e.max),t.xp6(3),t.Oqu(t.xi3(4,9,n,o.context.userLang)),t.xp6(4),t.Oqu(t.xi3(8,12,e,o.context.userLang)),t.xp6(2),t.Q6J("ngIf",!!o.modifierService.getSelectRules(e)),t.xp6(1),t.Q6J("isEdit",!(null==o.input||!o.input.editOi))("mgroup",e)("item",n)("mdBuilder",o.mdBuilder)}}function vm(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",14),t.YNc(2,xm,11,15,"div",16),t.qZA(),t._UZ(3,"mat-divider"),t.BQk()),2&i){const e=a.$implicit;t.xp6(2),t.Q6J("ngIf",e.items&&e.items.length>0)}}function Cm(i,a){if(1&i&&(t.TgZ(0,"mat-tab",13),t.ALo(1,"i18n"),t.YNc(2,vm,4,1,"ng-container",8),t.qZA()),2&i){const e=a.$implicit,n=t.oxw(2);t.Q6J("label",t.xi3(1,2,e,n.context.userLang)),t.xp6(2),t.Q6J("ngForOf",null==e?null:e.mgroups)}}function bm(i,a){if(1&i&&(t.TgZ(0,"mat-tab-group"),t.YNc(1,Cm,3,5,"mat-tab",12),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.viewOnlyItems)}}function Mm(i,a){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.TgZ(2,"i"),t._uU(3,","),t.qZA()()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij("",n.modifierService.getModifierItemDisplay(e)," ")}}function Om(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Mm,4,1,"span",6),t.BQk()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e)}}function ym(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26)(1,"button",27),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.confirmClicked())}),t.TgZ(2,"p"),t._uU(3),t.ALo(4,"translate"),t.qZA()()()}if(2&i){const e=t.oxw();t.xp6(3),t.hij(" ",t.lcZ(4,1,e.isCompleted()?"byod.dialogs.segment-modifiers-dialog.confirm":"byod.dialogs.segment-modifiers-dialog.next")," ")}}let We=(()=>{class i extends Ot{constructor(e){var n;super(e),this.injector=e,this.transition=!1,this.viewOnlyItems=[],this.hideModIgName=!1,this.hideModIgName=null===(n=this.settingManager)||void 0===n?void 0:n.get("menu.hideModIgName",!1)}ngOnInit(){this.initData()}ngAfterContentChecked(){this.cd.detectChanges()}initData(){var e,n,o,r,l;if(this.input=this.navParams.input,console.log("SegmentModifiersDialogComponent input",this.input),this.ig=this.input.group,this.store=null===(e=this.input)||void 0===e?void 0:e.store,this.orderContext=null===(n=this.input)||void 0===n?void 0:n.orderContext,this.orderContext.viewMode)this.viewOnlyItems.push(null===(o=this.input)||void 0===o?void 0:o.item);else{const c=null===(r=this.input)||void 0===r?void 0:r.orderItem;c.groups=c.groups.filter(d=>d.id==this.ig.id),this.mdBuilder=new Mt.u(this.store,c);let s=this.mdBuilder.findItems(c);s=s.filter(d=>this.isInCurrentGroup(d)),this.modifiableItems=s,this.mods=null===(l=this.modifierService)||void 0===l?void 0:l.setModSelected(this.mdBuilder)}}isInCurrentGroup(e){var n,o;return(null===(o=null===(n=this.ig)||void 0===n?void 0:n.items)||void 0===o?void 0:o.findIndex(l=>(null==l?void 0:l.id)===(null==e?void 0:e.id)))>=0}confirmClicked(){if(!this.isCompleted())return void this.scrollTo();const e=this.mdBuilder.build();this.dialogService.submitAuxDialog({orderItem:e})}scrollTo(){var e=null;for(let o of this.modifiableItems){for(let r of o.mgroups)if(0==this.isGroupCompleted(o,r)&&(this.selectedTab=this.modifiableItems.indexOf(o),e=this.isGroupCompletedIndex(o,r)),null!=e)break;if(null!=e)break}var n=document.getElementById("section-"+e);n&&n.scrollIntoView({behavior:"smooth"}),this.currentIndex=e,setTimeout(()=>{this.transition=!0},875),this.transition=!1}isIndex(e,n){return e==n}closeDialog(){this.dialogService.submitAuxDialog()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-segment-modifiers-dialog"]],features:[t.qOj],decls:12,vars:5,consts:[[1,"items-modifiers"],[1,"header","flex","items-center"],[1,"spacer"],["class","nav-title",4,"ngIf"],["mat-icon-button","",3,"click"],[3,"selectedIndex","selectedIndexChange",4,"ngIf"],[4,"ngIf"],[1,"hidden"],[4,"ngFor","ngForOf"],["class","footer-row flex justify-center py-4 px-6",4,"ngIf"],[1,"nav-title"],[3,"selectedIndex","selectedIndexChange"],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[1,"modifier-div"],[3,"id"],["class","bg-gray-100 modifier-choices mt-4",4,"ngIf"],[1,"bg-gray-100","modifier-choices","mt-4"],["class","sub-item-path flex items-center",4,"ngIf"],[3,"isEdit","mgroup","item","mdBuilder","itemClicked","minusClicked"],[1,"sub-item-path","flex","items-center"],["name","arrow_right","size","20","source","mat"],[1,"select-n-required","flex","items-center",3,"ngClass"],[1,"select-num","flex","items-center","leading-none"],["class","text-required ",4,"ngIf"],[1,"text-required"],[1,"footer-row","flex","justify-center","py-4","px-6"],["mat-flat-button","",1,"w-full","btn-confirm",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"
1span",2),t.YNc(3,am,3,4,"span",3),t.TgZ(4,"button",4),t.NdJ("click",function(){return n.closeDialog()}),t.TgZ(5,"mat-icon"),t._uU(6,"close"),t.qZA()()(),t.YNc(7,um,2,2,"mat-tab-group",5),t.YNc(8,bm,2,1,"mat-tab-group",6),t.TgZ(9,"div",7),t.YNc(10,Om,2,1,"ng-container",8),t.qZA(),t.YNc(11,ym,5,3,"div",9),t.qZA()),2&e&&(t.xp6(3),t.Q6J("ngIf",!n.hideModIgName),t.xp6(4),t.Q6J("ngIf",!n.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",n.orderContext.viewMode),t.xp6(2),t.Q6J("ngForOf",n.mods),t.xp6(1),t.Q6J("ngIf",!n.orderContext.viewMode))},dependencies:[_.mk,_.sg,_.O5,S.o,et.d,z.Hw,X.SP,X.uX,I.lW,Ft,M.X$,D.G],styles:["[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}.items-modifiers[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.header[_ngcontent-%COMP%]{background:#fff;padding:.5rem 1.5rem}.header[_ngcontent-%COMP%]   .spacer[_ngcontent-%COMP%]{width:40px}.header[_ngcontent-%COMP%]   .nav-title[_ngcontent-%COMP%]{flex-grow:1;text-align:center;font-weight:700;color:var(--P800);font-size:1.1rem}.header[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:var(--P800)}.sub-item-grp[_ngcontent-%COMP%]{padding:1rem 1.5rem}.sub-item-grp[_ngcontent-%COMP%]   .sub-item-path[_ngcontent-%COMP%]{font-size:.95rem;font-weight:700;flex-wrap:wrap;align-items:center;line-height:normal}.select-n-required[_ngcontent-%COMP%]{margin-top:.1rem}.select-n-required[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{margin:0;font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-n-required[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:#f04141;margin-left:.5rem;font-size:.65rem}.select-n-required.completed[_ngcontent-%COMP%]   .select-num[_ngcontent-%COMP%]{background:#1bbb8f!important}.select-n-required.completed[_ngcontent-%COMP%]   .text-required[_ngcontent-%COMP%]{color:gray!important}mat-tab-group[_ngcontent-%COMP%]{flex:1 1 auto;overflow-y:auto}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-header{overflow-x:auto!important}mat-tab-group[_ngcontent-%COMP%]  .mat-ink-bar{display:block!important}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-label{overflow:hidden!important}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-label-content{margin:0 1.5rem}.modifier-choices[_ngcontent-%COMP%]{padding:1rem 1.5rem}.footer-row[_ngcontent-%COMP%]{background:#fff}.footer-row[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);text-transform:uppercase;width:100%;padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px}.shake-anime[_ngcontent-%COMP%]{animation:hori-shake .5s ease-in-out}@keyframes hori-shake{0%,to{transform:translateZ(0)}20%,60%{transform:translate3d(-10px,0,0)}40%,80%{transform:translate3d(10px,0,0)}}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.header[_ngcontent-%COMP%]{padding:.5rem 1rem}mat-tab-group[_ngcontent-%COMP%]  .mat-tab-label-content{margin:0 1rem!important}.mat-tab-label-content[_ngcontent-%COMP%]{margin:0 1rem}.modifier-choices[_ngcontent-%COMP%]{padding:0 1rem 1rem}.footer-row[_ngcontent-%COMP%]{padding:1rem!important}}"]}),i})(),Xe=(()=>{class i{constructor(e){this.directoryContext=e}ngOnInit(){}get getSelectedTime(){var e,n;return null===(n=null===(e=this.directoryContext)||void 0===e?void 0:e.state)||void 0===n?void 0:n.humanScheduleTime}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(ft.D))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-select-time-dialog"]],decls:0,vars:0,template:function(e,n){},styles:["[_nghost-%COMP%]{display:block}"]}),i})();function Pm(i,a){1&i&&(t.ynx(0),t.TgZ(1,"div",5),t._UZ(2,"iframe",6),t.qZA(),t.BQk())}function Im(i,a){1&i&&(t.ynx(0),t._UZ(1,"div",7),t.BQk())}function wm(i,a){if(1&i&&(t._UZ(0,"h3",11),t.ALo(1,"safeHtml")),2&i){const e=t.oxw(2);t.Q6J("innerHTML",t.lcZ(1,1,null==e.agreement?null:e.agreement.title),t.oJD)}}
1function km(i,a){if(1&i&&(t._UZ(0,"div",12),t.ALo(1,"safeHtml")),2&i){const e=t.oxw(2);t.Q6J("innerHTML",t.lcZ(1,1,null==e.agreement?null:e.agreement.body),t.oJD)}}function Tm(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",8),t.YNc(2,wm,2,3,"h3",9),t.YNc(3,km,2,3,"div",10),t.qZA(),t.BQk()),2&i){const e=t.oxw();t.xp6(2),t.Q6J("ngIf",null==e.agreement?null:e.agreement.title),t.xp6(1),t.Q6J("ngIf",null==e.agreement?null:e.agreement.body)}}function Zm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"mat-checkbox",15),t.NdJ("ngModelChange",function(o){t.CHM(e);const r=t.oxw(2);return t.KtG(r.marketing=o)}),t.TgZ(2,"div",16)(3,"h3",17),t._uU(4),t.ALo(5,"translate"),t.qZA()()()()}if(2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngModel",e.marketing),t.xp6(3),t.hij(" ",t.xi3(5,2,"byod.dialogs.tnc-dialog.agree-text",e.textParams)," ")}}function Am(i,a){1&i&&(t.TgZ(0,"div",18)(1,"button",19),t._uU(2),t.ALo(3,"translate"),t.qZA()()),2&i&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"byod.dialogs.tnc-dialog.confirm")," "))}function Sm(i,a){if(1&i&&(t.TgZ(0,"div",13),t.YNc(1,Zm,6,5,"div",3),t.YNc(2,Am,4,3,"div",14),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.needToAgreeMarketing),t.xp6(1),t.Q6J("ngIf",!e.isFAQ)}}let tn=(()=>{class i extends C.nh{constructor(e){super(e),this.injector=e,this.isOffline=!1,this.isAgree=!1,this.marketing=!0,this.needToAgreeMarketing=!1,this.hideFooter=!1,this.textParams={},this.isFAQ=!1,this.isIframe=!1,this.isPDF=!1,this.isHTML=!1,this.isBodyText=!1}ngOnInit(){this.input=this.navParams.input,console.log("TncDialogComponent input",this.input),this.initData(),this.initLayoutByAgreement()}initData(){this.tncUrl=this.input.tncUrl,this.isFAQ=this.input.isFAQ,this.needToAgreeMarketing=this.input.needToAgreeMarketing,this.dismissBtnHandler=this.input.dismissBtnHandler,this.hideFooter=this.input.hideFooter,this.fbHandler=this.input.fbHandler,this.textParams.name=this.input.textParams,this.agreement=this.input.agreement,this.isIframe=!!this.tncUrl&&!this.agreement}ngAfterViewInit(){this.loadContentApi()}initLayoutByAgreement(){"PDF"===(this.agreement&&this.agreement.mime)?this.isPDF=!0:this.isBodyText=!0}loadContentApi(e){!this.isOffline&&this.tncUrl&&document.getElementById("iframe").setAttribute("src",this.tncUrl)}clickMarketing(){this.marketing=!this.marketing}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-tnc-dialog"]],features:[t.qOj],decls:11,vars:4,consts:[[1,"title"],["mat-icon-button","","mat-dialog-close",""],[1,"content"],[4,"ngIf"],["class","footer",4,"ngIf"],[1,"iframe-box"],["id","iframe","frameborder","0",2,"height","100%","width","100%"],[1,"PDF-TC"],[1,"HTML-TC"],[3,"innerHTML",4,"ngIf"],["class","HTML-TC-Body",3,"innerHTML",4,"ngIf"],[3,"innerHTML"],[1,"HTML-TC-Body",3,"innerHTML"],[1,"footer"],["class","btn-box ion-text-center",4,"ngIf"],[3,"ngModel","ngModelChange"],[1,"checkbox-text"],[1,"sub-item-name","pl-4"],[1,"btn-box","ion-text-center"],["mat-button","","mat-dialog-close","",1,"btn-confirm"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"span"),t._uU(2,"tnc-dialog works!"),t.qZA(),t.TgZ(3,"button",1)(4,"mat-icon"),t._uU(5,"close"),t.qZA()()(),t.TgZ(6,"div",2),t.YNc(7,Pm,3,0,"ng-container",3),t.YNc(8,Im,2,0,"ng-container",3),t.YNc(9,Tm,4,2,"ng-container",3),t.qZA(),t.YNc(10,Sm,3,2,"div",4)),2&e&&(t.xp6(7),t.Q6J("ngIf",n.isIframe),t.xp6(1),t.Q6J("ngIf",n.isPDF),t.xp6(1),t.Q6J("ngIf",n.isBodyText),t.xp6(1),t.Q6J("ngIf",!n.hideFooter))},dependencies:[_.O5,g.JJ,g.On,W.ZT,z.Hw,I.lW,Vt.oG,M.X$,Re.z],styles:["[_nghost-%COMP%]{display:block}.btn-confirm[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}"]}),i})();function Dm(i,a){if(1&i&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Oqu(t.Dn7(2,1,null==e.offer?null:e.offer.reward,e.context.userLang,"hint"))}}function qm(i,a){1&i&&t._UZ(0,"app-icon",15)}function Qm(i,a){1&i&&t._UZ(0,"app-icon",16)}function Nm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",11)(1,"button",12),t.NdJ("click",function(o){return t.CHM(e),t.oxw().showDetailsClicked(),t.KtG(o.stopPropagation())}),t._uU(2),t.ALo(3,"translate"),t.YNc(4,qm,1,0,"app-icon",13),t.YNc(5,Qm,1,0,"app-icon",14),t.qZA()()}if(2&i){const e=t.oxw();t.xp6(2),t.hij(" ",t.lcZ(3,3,e.expanded?"byod.dialogs.use-reward-dialog.hide-details":"byod.dialogs.use-reward-dialog.show-details")," "),t.xp6(2),t.Q6J("ngIf",!e.expanded),t.xp6(1),t.Q6J("ngIf",e.expanded)}}function Jm(i,a){1&i&&(t.TgZ(0,"div",23)(1,"span"),t._uU(2),t.ALo(3,"translate"),t.qZA()()),2&i&&(t.xp6(2),t.Oqu(t.lcZ(3,1,"byod.dialogs.use-reward-dialog.select")))}function Um(i,a){1&i&&(t.TgZ(0,"div",24),t._UZ(1,"app-icon",25),t.qZA())}function Fm(i,a){if(1&i&&(t.TgZ(0,"div",20),t.YNc(1,Jm,4,3,"div",21),t.YNc(2,Um,2,0,"div",22),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",!e.selected),t.xp6(1),t.Q6J("ngIf",e.selected)}}function Lm(i,a){1&i&&(t.TgZ(0,"div",26),t._UZ(1,"app-icon",27),t.qZA())}function Bm(i,a){if(1&i&&(t.TgZ(0,"div",17),t.YNc(1,Fm,3,2,"div",18),t.YNc(2,Lm,2,0,"div",19),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf","available"===e.offerType),t.xp6(1),t.Q6J("ngIf","used"===e.offerType)}}function Ym(i,a){if(1&i&&(t._UZ(0,"div",28),t.ALo(1,"i18n")),2&i){const e=t.oxw();t.Q6J("@fadeInTrigger",void 0)("innerHTML",t.Dn7(1,2,null==e.offer?null:e.offer.reward,e.context.userLang,"desc"),t.oJD)}}const zm=function(i,a,e){return{selected:i,used:a,unavailable:e}};let jm=(()=>{class i extends Qt.Z{constructor(e){super(e),this.offer=null,this.offerType="available",this.selected=!1,this.selectClicked=new t.vpe,this.expanded=!1}ngOnInit(){}showDetailsClicked(){this.expanded=!this.expanded}offerSelectClicked(){this.selectClicked.emit()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-offer-card"]],inputs:{offer:"offer",offerType:"offerType",selected:"selected"},outputs:{selectClicked:"selectClicked"},features:[t.qOj],decls:15,vars:23,consts:[["appThrottleClick","",1,"reward-card-box",3,"ngClass","throttleClick"],[1,"fixed-panel"],[1,"reward-img",3,"content","ratio","pw","hideEmpty"],["data-testid","reward-info",1,"reward-info"],[1,"font-bold","reward-name"],["class","reward-desc",4,"ngIf"],[1,"reward-date"],["class","details-btn",4,"ngIf"],["class","select-box",4,"ngIf"],["class","expand-panel",3,"innerHTML",4,"ngIf"],[1,"reward-desc"],[1,"details-btn"],["mat-flat-button","",3,"click"],["name","expand_more","size","16","source","mat",4,"ngIf"],["name","expand_less","size","16","source","mat",4,"ngIf"],["name","expand_more","size","16","source","mat"],["name","expand_less","size","16","source","mat"],[1,"select-box"],["class","select-btn",4,"ngIf"],["class","used-box",4,"ngIf"],[1,"select-btn"],["class","div-select",4,"ngIf"],["class","div-selected",4,"ngIf"],[1,"div-select"],[1,"div-selected"],["name","close","size","20","source","mat"],[1,"used-box"],["name","check","size","20","source","mat"],[1,"expand-panel",3,"innerHTML"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t.NdJ("throttleClick",function(){return n.offerSelectClicked()}),t.TgZ(1,"div",1),t._UZ(2,"app-img",2),t.TgZ(3,"div",3)(4,"div",4),t._uU(5),t.ALo(6,"i18n"),t.qZA(),t.YNc(7,Dm,3,5,"div",5),t.TgZ(8,"div",6),t._uU(9),t.ALo(10,"translate"),t.ALo(11,"date"),t.qZA(),t.YNc(12,Nm,6,5,"div",7),t.qZA(),t.YNc(13,Bm,3,2,"div",8),t.qZA(),t.YNc(14,Ym,2,6,"div",9),t.qZA()),2&e&&(t.Q6J("ngClass",t.kEZ(19,zm,n.selected,"used"===n.offerType,"unavailable"===n.offerType)),t.xp6(2),t.Q6J("content",null==n.offer?null:n.offer.reward)("ratio",1)("pw",200)("hideEmpty",!0),t.xp6(3),t.Oqu(t.xi3(6,12,null==n.offer?null:n.offer.reward,n.context.userLang)),t.xp6(2),t.Q6J("ngIf",null==n.offer||null==n.offer.reward?null:n.offer.reward.hint),t.xp6(2),t.AsE("",t.lcZ(10,15,"byod.dialogs.use-reward-dialog.valid-until")," ",t.lcZ(11,17,n.offer.expire),""),t.xp6(3),t.Q6J("ngIf",null==n.offer||null==n.offer.reward?null:n.offer.reward.desc),t.xp6(1),t.Q6J("ngIf","unavailable"!==n.offerType),t.xp6(1),t.Q6J("ngIf",n.expanded))},dependencies:[_.mk,_.O5,J.j,q.g,S.o,I.lW,_.uU,M.X$,D.G],styles:["[_nghost-%COMP%]{display:block;background:#fff;margin-bottom:.5rem}.reward-img[_ngcontent-%COMP%]{width:4rem}.expand-panel[_ngcontent-%COMP%]{overflow:hidden;font-size:.8rem;margin-bottom:0;font-weight:400;color:#b3b3b3;white-space:pre-wrap;line-height:1.2em;letter-spacing:.1px;margin-top:.5rem}.reward-card-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;background:#fff;margin-bottom:.5rem;padding:1rem .6rem .5rem;border-radius:6px}.reward-card-box.selected[_ngcontent-%COMP%]{box-shadow:inset 0 0 0 2px var(--P300)}.reward-card-box.used[_ngcontent-%COMP%]{opacity:.7}.reward-card-box.unavailable[_ngcontent-%COMP%]{opacity:.4}.fixed-panel[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:.5rem}.used-box[_ngcontent-%COMP%]{background:#00c96e;color:#fff;border-radius:3rem;width:1.5rem;height:1.5rem;padding:.1rem}.reward-name[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;margin-bottom:.1rem}.reward-date[_ngcontent-%COMP%]{font-size:.7rem;color:#707070}.reward-info[_ngcontent-%COMP%]{margin-left:.5rem;flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;height:4rem}.details-btn[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;align-items:flex-end}.details-btn[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding:0;line-height:1.1em;text-decoration:underline;color:#939393;font-size:.8rem}.select-box[_ngcontent-%COMP%]{flex:0 0 15%;width:15%;min-width:3.45rem}.div-select[_ngcontent-%COMP%]{border:1px solid var(--P);padding:.2rem .3rem;font-size:.8rem;color:var(--P);font-weight:700;border-radius:2px;text-align:center;align-items:center}.div-select[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{line-height:1.2em}.div-selected[_ngcontent-%COMP%]{padding:.2rem .3rem;font-size:.8rem;color:#8b8b8b;font-weight:700;border-radius:2px;display:flex;align-items:center;justify-content:center}"],data:{animation:[Je.h7]}}),i})();function Gm(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-offer-card",11),t.NdJ("selectClicked",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.offerSelectClicked(r))}),t.qZA()}if(2&i){const e=a.$implicit,n=t.oxw();t.Q6J("offer",e)("selected",n.isCurrentOffer(e.id))}}function Em(i,a){1&i&&t._UZ(0,"app-offer-card",12),2&i&&t.Q6J("offer",a.$implicit)}const $m=function(i){return{"btn-disabled":i}};let Rm=(()=>{class i extends G.T{constructor(e){super(e),this.isMultiOffer=!1,this.offerSelectMap={},this.idToOfferMap={},this.currentOfferId=null}ngOnInit(){this.input=this.navParams.input,this.isMultiOffer=this.settingManager.get("isMultiOffer",!1),this.initData()}initData(){var e,n,o,r;this.availableOffers=null!==(e=this.input.availableOffers)&&void 0!==e?e:[],this.unavailableOffers=null!==(n=this.input.unavailableOffers)&&void 0!==n?n:[],this.availableOffers.forEac
1h(l=>{this.idToOfferMap[l.id]=l}),this.selectedOffers=null!==(o=[...this.input.selectedOffers])&&void 0!==o?o:[],this.selectedOffers.forEach(l=>{this.offerSelectMap[l.id]=!0}),this.isMultiOffer?this.availableOffers=this.availableOffers.filter(l=>!this.offerSelectMap[l.id]):this.selectedOffers.length>0&&(this.currentOfferId=null===(r=this.selectedOffers[0])||void 0===r?void 0:r.id)}clearAllClicked(){this.offerSelectMap={},this.currentOfferId=null}offerSelectClicked(e){this.currentOfferId=this.currentOfferId===e.id?null:e.id}offerRemoveClicked(e){this.offerSelectMap[e.id]=!1}offerRemoveUndo(e){this.offerSelectMap[e.id]=!0}hasOfferSelected(e){var n;return null!==(n=this.offerSelectMap[e])&&void 0!==n&&n}isCurrentOffer(e){return e===this.currentOfferId}getSelectedOfferList(){if(this.isMultiOffer){const e=[];for(const n in this.offerSelectMap)this.offerSelectMap[n]&&e.push(this.idToOfferMap[n]);return this.currentOfferId&&e.push(this.idToOfferMap[this.currentOfferId]),e}return this.currentOfferId?[this.idToOfferMap[this.currentOfferId]]:[]}confirmClicked(){this.dialogService.submitAuxDialog({selectedOffers:this.getSelectedOfferList()})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-use-reward-dialog"]],features:[t.qOj],decls:17,vars:17,consts:[[1,"container","h-full","flex","flex-col"],[3,"title","back"],[1,"flex-grow","content-upper"],[1,"div-top-info","flex","items-center","justify-between"],[1,"top-left","flex"],[1,"bold"],[1,"num-chip"],["offerType","available",3,"offer","selected","selectClicked",4,"ngFor","ngForOf"],["offerType","unavailable",3,"offer",4,"ngFor","ngForOf"],[1,"footer"],["appThrottleClick","","mat-flat-button","","data-testid","confirm-use-reward-button",1,"confirm-btn",3,"disabled","ngClass","throttleClick"],["offerType","available",3,"offer","selected","selectClicked"],["offerType","unavailable",3,"offer"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"div",3)(5,"div",4)(6,"h3",5),t._uU(7),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"div",6),t._uU(10),t.qZA()()(),t.YNc(11,Gm,1,2,"app-offer-card",7),t.YNc(12,Em,1,1,"app-offer-card",8),t.qZA(),t.TgZ(13,"div",9)(14,"button",10),t.NdJ("throttleClick",function(){return n.confirmClicked()}),t._uU(15),t.ALo(16,"translate"),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,9,"byod.dialogs.use-reward-dialog.select-reward"))("back",!1),t.xp6(6),t.Oqu(t.lcZ(8,11,"byod.dialogs.use-reward-dialog.available")),t.xp6(3),t.Oqu(n.availableOffers.length),t.xp6(1),t.Q6J("ngForOf",n.availableOffers),t.xp6(1),t.Q6J("ngForOf",n.unavailableOffers),t.xp6(2),t.Q6J("disabled",!n.currentOfferId)("ngClass",t.VKq(15,$m,!n.currentOfferId)),t.xp6(1),t.Oqu(t.lcZ(16,13,"buttons.confirm")))},dependencies:[_.mk,_.sg,jm,k.v,J.j,I.lW,M.X$],styles:["[_nghost-%COMP%]{display:block;height:100%;background:#f5f5f5;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}.mat-form-field[_ngcontent-%COMP%]{width:100%}.content-upper[_ngcontent-%COMP%]{padding:0 1.25rem;flex:1 1 auto;overflow-y:scroll}.div-top-info[_ngcontent-%COMP%]{margin:1rem 0}.offer-box[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;margin-bottom:.875rem;background-color:#fff;box-shadow:0 0 3px #00000036;border-radius:.25rem}.offer-box.selected[_ngcontent-%COMP%]{box-shadow:0 0 3px #00000036,inset 5px 0 var(--P);box-shadow:0 0 3px #00000036,inset 0 0 0 2px var(--P)}.offer-box.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.5}.offer-box.deleted[_ngcontent-%COMP%]{opacity:.5}.num-chip[_ngcontent-%COMP%]{background:var(--P);color:var(--PC);width:1rem;height:1rem;padding:.25rem;font-size:.75rem;border-radius:.15rem;display:flex;align-items:center;justify-content:center;text-align:center;margin-left:.2rem}.btn-clear-all[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center}.reward-name[_ngcontent-%COMP%]{color:var(--P800)}.reward-desc[_ngcontent-%COMP%]{font-size:.8rem;color:#333;margin-top:.4rem}.reward-date[_ngcontent-%COMP%]{font-size:.8rem;color:#5e5e5e;margin-top:.4rem}.footer[_ngcontent-%COMP%]{display:flex;flex:0 0 auto}.confirm-btn[_ngcontent-%COMP%]{width:100%;margin:1rem;background:var(--P);color:var(--PC);line-height:36px;padding:.25rem 0!important;font-size:1rem!important}.confirm-btn.btn-disabled[_ngcontent-%COMP%]{background:#d9d9d9;color:#fff}"]}),i})();function Vm(i,a){if(1&i&&(t.TgZ(0,"h2",18),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();
1t.xp6(1),t.hij(" ",t.Dn7(2,1,e,n.context.userLang,"desc")," ")}}function Hm(i,a){if(1&i&&(t.TgZ(0,"h3",19),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"itemPrice"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(1),t.hij(" ",t.gM2(2,1,t.lcZ(3,6,e),!0,n.context,!0)," ")}}function Km(i,a){if(1&i&&(t.TgZ(0,"div",20),t._UZ(1,"app-item-special-price",21),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("item",e)}}function Wm(i,a){1&i&&t._UZ(0,"app-icon",22)}function Xm(i,a){1&i&&t._UZ(0,"app-icon",23)}function tg(i,a){if(1&i&&(t.TgZ(0,"div",24),t._UZ(1,"app-img",25),t.qZA()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("content",e)}}const eg=function(i){return{soldOut:i}};function ng(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",4),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(!l.isSoldOut(r)&&l.clickVariationsItem(r))}),t.TgZ(2,"div",5)(3,"div",6)(4,"div",7)(5,"h3"),t._uU(6),t.ALo(7,"translate"),t.qZA()()(),t.TgZ(8,"div",8)(9,"h1",9),t._uU(10),t.ALo(11,"i18n"),t.qZA(),t.YNc(12,Vm,3,5,"h2",10),t.qZA(),t.TgZ(13,"div",11),t.YNc(14,Hm,4,8,"h3",12),t.YNc(15,Km,2,1,"div",13),t.TgZ(16,"div",14),t.YNc(17,Wm,1,0,"app-icon",15),t.YNc(18,Xm,1,0,"app-icon",16),t.qZA()()(),t.YNc(19,tg,2,1,"div",17),t.qZA(),t.BQk()}if(2&i){const e=a.$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngClass",t.VKq(14,eg,n.isSoldOut(e))),t.xp6(5),t.Oqu(t.lcZ(7,9,"byod.components.mg-item-list.soldout")),t.xp6(4),t.Oqu(t.xi3(11,11,e,n.context.userLang)),t.xp6(2),t.Q6J("ngIf",null==e?null:e.desc),t.xp6(2),t.Q6J("ngIf",!(null!=e&&e.showSpecialPrice)),t.xp6(1),t.Q6J("ngIf",null==e?null:e.showSpecialPrice),t.xp6(2),t.Q6J("ngIf",!n.orderContext.viewMode),t.xp6(1),t.Q6J("ngIf",n.orderContext.viewMode&&n.isCombo(e)),t.xp6(1),t.Q6J("ngIf",n.hasImage(e))}}let en=(()=>{class i extends C.nh{constructor(e,n,o,r,l,c,s){super(e),this.injector=e,this.orderContext=n,this.cartService=o,this.dialogService=r,this.t=l,this.menuManager=c,this.orderManager=s,this.showBack=history.state.auxDepth>1,console.log("VariationsItemsDialogComponent constructor")}ngOnInit(){this.initData()}initData(){var e,n,o,r;this.input=this.navParams.input,console.log("VariationsItemsDialogComponent INPUT",this.input),this.group=null===(e=this.input)||void 0===e?void 0:e.group,this.store=null===(n=this.input)||void 0===n?void 0:n.store,this.variationsItems=null===(o=this.input)||void 0===o?void 0:o.variationsItems,this.category=null===(r=this.input)||void 0===r?void 0:r.category}clickVariationsItem(e){this.orderContext.viewMode&&!this.isCombo(e)||this.confirmClicked(e)}confirmClicked(e){console.log("confirmClicked"),this.dialogService.submitAuxDialog({item:e})}isCombo(e){var n;return N.ck.isSet(null===(n=this.input)||void 0===n?void 0:n.category,e)}isSoldOut(e){const n=this.cartService.convertNowDateToStoreTimeZone(this.orderContext.store.timezone),o=!this.menuManager.isAvailableCombo(this.orderContext.store,this.category,e,this.orderManager.isTakeout(),n,this.orderManager.mode);return this.cartService.isSoldout(e)||o}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ),t.Y36(pt.N),t.Y36(C.xA),t.Y36(M.sK),t.Y36(C._K),t.Y36(C.Km))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-variations-items-dialog"]],features:[t.qOj],decls:5,vars:5,consts:[[1,"variations-dialog"],[3,"title","back"],[1,"selection-box"],[4,"ngFor","ngForOf"],["data-testid","variations-item",1,"item-row","flex","bg-white","cursor-pointer","hover-dim-scl",3,"ngClass","click"],[1,"left-col","flex","flex-col","item-info"],[1,"div-soldout","absolute"],[1,"soldout-border"],[1,"div-item-detail","flex-grow"],[1,"title-text"],["class","desc-text",4,"ngIf"],[1,"div-price","flex","items-center"],["class","price-text flex-grow","data-testid","variations-price",4,"ngIf"],["class","flex-grow item-special-price",4,"ngIf"],[1,"add-qty-box"],["name","add","size","20","source","mat",4,"ngIf"],["name","chevron_right","size","20","source","mat",4,"ngIf"],["class","right-col item-img",4,"ngIf"],[1,"desc-text"],["data-testid","variations-price",1,"price-text","flex-grow"],[1,"flex-grow","item-special-price"],[3,"item"],["name","add","size","20","source","mat"],["name","chevron_right","size","20","source","mat"],[1,"right-col","item-img"],[3,"content"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2),t.YNc(4,ng,20,16,"ng-container",3),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,3,"byod.dialogs.variations-dialog.select-variation"))("back",
1n.showBack),t.xp6(3),t.Q6J("ngForOf",n.variationsItems))},dependencies:[_.mk,_.sg,_.O5,Bt.P,q.g,S.o,k.v,M.X$,D.G,F.A,rt.y],styles:["[_nghost-%COMP%]{display:block;background:#f5f5f5;border-radius:8px;height:100%;width:100%;overflow:hidden;margin:0 auto;padding-bottom:calc(constant(safe-area-inset-bottom)/2);padding-bottom:calc(env(safe-area-inset-bottom)/2)}h1[_ngcontent-%COMP%], h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%], h4[_ngcontent-%COMP%], h5[_ngcontent-%COMP%], h6[_ngcontent-%COMP%], span[_ngcontent-%COMP%], p[_ngcontent-%COMP%]{margin:0;padding:0}.div-soldout[_ngcontent-%COMP%]{display:none;z-index:1}.div-price[_ngcontent-%COMP%]{padding-top:1rem}.soldOut[_ngcontent-%COMP%]   .item-info[_ngcontent-%COMP%]{opacity:.5}.soldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{filter:grayscale(80%);filter:opacity(.5)}.soldOut[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{opacity:0}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:block;top:0;right:0;left:0;bottom:0!important;display:flex;justify-content:center;align-items:center}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   div.soldout-border[_ngcontent-%COMP%]{border:1px solid #ff6060;border-radius:.2rem .2rem .2rem .8rem;background:none;overflow:hidden}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#ff6060;font-weight:700;padding:.5rem;font-size:.9rem;text-transform:uppercase;background:rgba(255,255,255,.3882352941)}.item-row[_ngcontent-%COMP%]{position:relative;overflow:visible!important;flex:0 0 8rem;margin:1rem 0rem}.price-text[_ngcontent-%COMP%]{color:var(--P);font-weight:400;font-size:1rem}div.left-col[_ngcontent-%COMP%]{width:100%;padding:1rem}div.left-col[_ngcontent-%COMP%]   .title-text[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.1em;max-height:2.2em;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}div.left-col[_ngcontent-%COMP%]   .desc-text[_ngcontent-%COMP%]{font-size:.75rem;line-height:normal;margin-top:.3rem;color:#888;-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.right-col[_ngcontent-%COMP%]{flex:0 0 130px;position:relative;display:flex;flex-direction:column;justify-content:flex-start}.right-col[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{overflow:hidden;position:absolute;width:100%;background:#f1f1f1;border-radius:0 3px 0 2.3rem}.selection-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow-y:auto;margin:1rem 1.5rem;margin-bottom:0;flex:1 1 auto}.variations-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden;height:100%}.add-qty-box[_ngcontent-%COMP%]{color:var(--P);padding:0;min-width:30px;height:30px;min-width:unset;border-radius:20px;color:#fff;background-color:var(--P);padding:.3rem}.add-qty-box[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:flex-end}.add-qty-box[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.add-qty-box[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;justify-content:center;font-size:1.2rem}.add-qty-box[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], .add-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:1rem;color:var(--P)}.add-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}@media not screen and (min-width: 840px){[_nghost-%COMP%]{height:100%;border-radius:0}.selection-box[_ngcontent-%COMP%]{margin:1rem}.left-col[_ngcontent-%COMP%]{padding-right:.5rem!important}.right-col[_ngcontent-%COMP%]{flex:0 0 7rem}.item-row[_ngcontent-%COMP%]{flex:0 0 110px;border-radius:5px;height:100%}}.item-special-price[_ngcontent-%COMP%]{padding-top:.5rem}"]}),i})();var ig=u(12426);function og(i,a){}function rg(i,a){1&i&&t.YNc(0,og,0,0,"ng-template")}const ag=function(i,a,e){return{$implicit:i,filters:a,key:e}};function lg(i,a){if(1&i&&(t.ynx(0),t.YNc(1,rg,1,0,null,10),t.BQk()),2&i){const e=a.$implicit;t.oxw();const n=t.MAs(13);t.xp6(1),t.Q6J("ngTemplateOutlet",n)("ngTemplateOutletContext",t.kEZ(2,ag,e.value.question,e.value.filters,e.key))}}function cg(i,a){1&i&&(t.TgZ(0,"h1",11),t._uU(1,"You have selected"),t.qZA())}function sg(i,a){}function dg(i,a){1&i&&t.YNc(0,sg,0,0,"ng-template")}function mg(i,a){if(1&i&&t._UZ(0,"app-img",20),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.Q6J("locale",n.context.userLang)("src",n.tags[e].getImage("default",400,!0))}}function gg(i,a){if(1&i&&(t.ynx(0),t.YNc(1,mg,1,2,"app-img",19),t.TgZ(2,"p"),t._uU(3),t.ALo(4,"i18n"),t.qZA(),t.BQk()),2&i){const e=t.oxw().$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.hasImage(n.tags[e])),t.xp6(2),t.Oqu(t.Dn7(4,2,n.tags[e],n.context.userLang,"name"))}}function pg(i,a){if(1&i&&t._uU(0),2&i){const e=t.oxw().$implicit;t.hij(" ",e," ")}}const ug=function(i){return{selected:i}};function _g(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"button",16),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(2).key,c=t.oxw();return t.KtG(c.onSelectFilter(l,r))}),t.YNc(2,gg,5,6,"ng-container",17),t.YNc(3,pg,1,1,"ng-template",null,18,t.W1O),t.qZA(),t.BQk()}if(2&i){const e=a.$implicit,n=t.MAs(4),o=t.oxw(2).key,r=t.oxw();
1t.xp6(1),t.Q6J("ngClass",t.VKq(3,ug,r.selectedFilters[o]===e)),t.xp6(1),t.Q6J("ngIf",r.tags[e])("ngIfElse",n)}}const fg=function(i){return{hasFilterSelected:i}};function hg(i,a){if(1&i&&(t.TgZ(0,"div",13)(1,"h1"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"h4",14),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.TgZ(7,"div",15),t.YNc(8,_g,5,5,"ng-container",3),t.qZA()()),2&i){const e=t.oxw(),n=e.$implicit,o=e.key,r=e.filters,l=t.oxw();let c;t.xp6(2),t.Oqu(t.lcZ(3,4,null!==(c=n)&&void 0!==c?c:"byod.dialogs.variations-filter-dialog.filter-header-fallback")),t.xp6(2),t.Q6J("ngClass",t.VKq(8,fg,l.selectedFilters[o])),t.xp6(1),t.hij(" ",t.lcZ(6,6,"byod.dialogs.variations-filter-dialog.choose-one"),""),t.xp6(3),t.Q6J("ngForOf",r)}}function xg(i,a){1&i&&t.YNc(0,hg,9,10,"div",12),2&i&&t.Q6J("ngIf",a.filters.length>0)}function vg(i,a){if(1&i&&t._UZ(0,"app-img",32),2&i){const e=t.oxw(3);t.Q6J("content",e.selectedItem)}}function Cg(i,a){if(1&i&&t._UZ(0,"app-img",33),2&i){const e=t.oxw(3);t.Q6J("src",e.logoUrl)}}function bg(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.Dn7(2,1,e.selectedItem,e.context.userLang,"title")," ")}}function Mg(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.Dn7(2,1,e.selectedItem,e.context.userLang,"name")," ")}}function Og(i,a){if(1&i&&t._UZ(0,"app-img",37),2&i){const e=t.oxw(3).$implicit,n=t.oxw(3);t.Q6J("locale",n.context.userLang)("src",n.tags[e.value].getImage("default",400,!0))}}function yg(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Og,1,2,"app-img",36),t._uU(2),t.ALo(3,"i18n"),t.BQk()),2&i){const e=t.oxw(2).$implicit,n=t.oxw(3);t.xp6(1),t.Q6J("ngIf",n.hasImage(n.tags[e.value])),t.xp6(1),t.hij(" ",t.Dn7(3,2,n.tags[e.value],n.context.userLang,"name")," ")}}function Pg(i,a){if(1&i&&t._uU(0),2&i){const e=t.oxw(2).$implicit;t.hij(" ",e.value," ")}}function Ig(i,a){if(1&i&&(t.TgZ(0,"div",35),t.YNc(1,yg,4,6,"ng-container",17),t.YNc(2,Pg,1,1,"ng-template",null,18,t.W1O),t.qZA()),2&i){const e=t.MAs(3),n=t.oxw().$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("ngIf",o.tags[n.value])("ngIfElse",e)}}function wg(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Ig,4,2,"div",34),t.BQk()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e.value)}}function kg(i,a){if(1&i&&(t.TgZ(0,"p",38),t._uU(1),t.ALo(2,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.gM2(2,1,e.selectedItem.originalPrice,!0,e.context,!0)," ")}}function Tg(i,a){if(1&i&&(t.TgZ(0,"p",39),t._uU(1),t.ALo(2,"priceDisplay"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(" ",t.gM2(2,1,e.selectedItem.price,!0,e.context,!0)," ")}}function Zg(i,a){if(1&i&&(t.TgZ(0,"p",39),t._uU(1),t.ALo(2,"priceDisplay"),t.ALo(3,"translate"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.AsE(" ",t.gM2(2,2,e.selectedItem.minPrice,!0,e.context,!0)," ",t.lcZ(3,7,"byod.components.item-card.up")," ")}}function Ag(i,a){if(1&i&&(t.TgZ(0,"div",22)(1,"div",23),t.YNc(2,vg,1,1,"app-img",24),t.YNc(3,Cg,1,1,"app-img",25),t.qZA(),t.TgZ(4,"div",26),t.YNc(5,bg,3,5,"h3",27),t.YNc(6,Mg,3,5,"h3",27),t.TgZ(7,"div",28)(8,"div",29),t.YNc(9,wg,2,1,"ng-container",3),t.ALo(10,"keyvalue"),t.qZA()(),t.YNc(11,kg,3,6,"p",30),t.YNc(12,Tg,3,6,"p",31),t.YNc(13,Zg,4,9,"p",31),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",e.hasImage(e.selectedItem)),t.xp6(1),t.Q6J("ngIf",!e.hasImage(e.selectedItem)&&null!==e.logoUrl),t.xp6(2),t.Q6J("ngIf",e.selectedItem.title),t.xp6(1),t.Q6J("ngIf",!e.selectedItem.title),t.xp6(3),t.Q6J("ngForOf",t.lcZ(10,8,e.selectedFilters)),t.xp6(2),t.Q6J("ngIf",e.selectedItem.originalPrice),t.xp6(1),t.Q6J("ngIf",!e.selectedItem.minPrice&&!e.selectedItem.originalPrice),t.xp6(1),t.Q6J("ngIf",e.selectedItem.minPrice&&!e.selectedItem.originalPrice)}}function Sg(i,a){if(1&i&&t.YNc(0,Ag,14,10,"div",21),2&i){const e=t.oxw();t.Q6J("ngIf",e.selectedItem)}}let nn=(()=>{class i extends C.nh{constructor(e,n,o,r,l,c,s){super(e),this.injector=e,this.orderContext=n,this.cartService=o,this.dialogService=r,this.t=l,this.menuManager=c,this.orderManager=s,this.showBack=history.state.auxDepth>1,this.itemFilters=[],this.selectedItemHasNull=!0}ngOnInit(){this.initData()}initData(){var e,n,o;this.input=this.navParams.input,this.ig=null===(e=this.input)||void 0===e?void 0:e.mainItemGroup,this.variationsItems=null===(n=this.input)||void 0===n?void 0:n.variationsItems,this.category=null===(o=this.input)||void 0===o?void 0:o.category,this.itemGroupFilters=this.getItemGroupFilters(this.ig),this.itemFilters=this.getItemFilters(this.variationsItems),this.validFilters=this.getFilters(this.itemGroupFilters),this.logoUrl=this.getItemUrl(),this.tags=this.getTags()}onSelectFilter(e,n){const o=this.variationsItems.filter(l=>l.filters.includes(n)),r=this.getItemFilters(o);this.itemGroupFilters[e].filters=this.getValidFilters(this.itemGroupFilters[e].filters,r),this.selectedFilters[e]=n,this.getItem()}confirmClicked(){if(this.selectedItemHasNull)return null;this.isSoldOut(this.selectedItem)||this.orderContext.viewMode&&!this.isCombo(this.selectedItem)||this.dialogService.submitAuxDialog({item:this.selectedItem})}getTags(){const e=this.orderContext.menu.badges.filter(o=>"variation-filter"===o.type);let n={};return e.map(o=>{n=Object.assign(Object.assign({},n),{[o.tag]:o})}),n}getItemFilters(e){var n;const o=[];for(let r=0;r<(null==e?void 0:e.length);r++)o.push(...null===(n=e[r])||void 0===n?void 0:n.filters);return o}
1getItem(){let e=[];if(Object.keys(this.selectedFilters).map(o=>(this.selectedItemHasNull=null===this.selectedFilters[o],e.push(this.selectedFilters[o]))),this.selectedItemHasNull)return null;const n=this.variationsItems.filter(o=>e.every(r=>o.filters.includes(r)));return this.selectedItem=(null==n?void 0:n.length)>0?n[0]:null}getItemGroupFilters(e){const n=Object.keys(e).filter(r=>r.includes("filters"));let o={};for(let r=0;r<(null==n?void 0:n.length);r++){const l=Object.keys(e).filter(c=>c.match(new RegExp(`^filter${0===r?"":r+1}$`)))[0];o=Object.assign(Object.assign({},o),{[n[r]]:{question:e[l],filters:e[n[r]]}})}return o}getFilters(e){let n={};return Object.keys(e).forEach(o=>{this.selectedFilters=Object.assign(Object.assign({},this.selectedFilters),{[o]:null}),n=Object.assign(Object.assign({},n),{[o]:{question:e[o].question,filters:this.getValidFilters(e[o].filters,this.itemFilters)}})}),n}getValidFilters(e,n){const o=[...e];if(0===(null==o?void 0:o.length)||0===(null==n?void 0:n.length))return[];let r=0;for(;r<o.length;)n.some(l=>o[r]===l)?++r:o.splice(r,1);return o}getItemUrl(){return this.cartService.getItemUrl()}isCombo(e){var n;return ig.c.isSet(null===(n=this.input)||void 0===n?void 0:n.category,e)}isSoldOut(e){const n=this.cartService.convertNowDateToStoreTimeZone(this.orderContext.store.timezone),o=!this.menuManager.isAvailableCombo(this.orderContext.store,this.category,e,this.orderManager.isTakeout(),n,this.orderManager.mode);return this.cartService.isSoldout(e)||o}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ),t.Y36(pt.N),t.Y36(C.xA),t.Y36(M.sK),t.Y36(C._K),t.Y36(C.Km))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-filter-variations"]],features:[t.qOj],decls:16,vars:13,consts:[[1,"variations-dialog"],[3,"title","back"],[1,"selection-box"],[4,"ngFor","ngForOf"],[1,"footer"],["class","selected-text-header mb-2",4,"ngIf"],[4,"ngTemplateOutlet"],["mat-flat-button","",1,"select-item-btn",3,"disabled","click"],["filterQuestionContainer",""],["itemCard",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"selected-text-header","mb-2"],["class","inner-variation-filter",4,"ngIf"],[1,"inner-variation-filter"],[1,"badge",3,"ngClass"],[1,"wrapper-items"],["mat-flat-button","",1,"btn-filter",3,"ngClass","click"],[4,"ngIf","ngIfElse"],["noTag",""],[3,"locale","src",4,"ngIf"],[3,"locale","src"],["class","item-block-container",4,"ngIf"],[1,"item-block-container"],[1,"item-image"],["class","img",3,"content",4,"ngIf"],["class","img",3,"src",4,"ngIf"],[1,"item-title"],[4,"ngIf"],[1,"selected-item-container"],[1,"selected-item-body"],["data-testid","item-original-price","class","original-price-text",4,"ngIf"],["class","member-tier-price","data-testid","item-price",4,"ngIf"],[1,"img",3,"content"],[1,"img",3,"src"],["class","selectedItem mr-2",4,"ngIf"],[1,"selectedItem","mr-2"],["class","img",3,"locale","src",4,"ngIf"],[1,"img",3,"locale","src"],["data-testid","item-original-price",1,"original-price-text"],["data-testid","item-price",1,"member-tier-price"]],template:function(e,n){if(1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2),t.YNc(4,lg,2,6,"ng-container",3),t.ALo(5,"keyvalue"),t.qZA(),t.TgZ(6,"div",4),t.YNc(7,cg,2,0,"h1",5),t.YNc(8,dg,1,0,null,6),t.TgZ(9,"button",7),t.NdJ("click",function(){return n.confirmClicked()}),t._uU(10),t.ALo(11,"translate"),t.qZA()()(),t.YNc(12,xg,1,1,"ng-template",null,8,t.W1O),t.YNc(14,Sg,1,1,"ng-template",null,9,t.W1O)),2&e){const o=t.MAs(15);t.xp6(1),t.Q6J("title",t.lcZ(2,7,"byod.dialogs.variations-filter-dialog.select-variation"))("back",n.showBack),t.xp6(3),t.Q6J("ngForOf",t.lcZ(5,9,n.validFilters)),t.xp6(3),t.Q6J("ngIf",n.selectedItem),t.xp6(1),t.Q6J("ngTemplateOutlet",o),t.xp6(1),t.Q6J("disabled",n.selectedItemHasNull),t.xp6(1),t.Oqu(t.lcZ(11,11,"byod.dialogs.variations-filter-dialog.confirm"))}},dependencies:[_.mk,_.sg,_.O5,_.tP,q.g,k.v,I.lW,_.Nd,M.X$,D.G,F.A],styles:[".variations-dialog[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%;max-height:100%;flex-wrap:nowrap;margin-left:auto;margin-right:auto;background-color:#fff}.selection-box[_ngcontent-%COMP%]{flex:1 1 auto;position:relative;overflow-x:hidden;overflow-y:auto;padding:1.5rem 2rem;background:#f4f4f4}.badge[_ngcontent-%COMP%]{background-color:var(--W);border-radius:4px;padding:.2rem;display:inline-flex;align-items:center;margin-top:.5rem;color:#fff;font-size:.6rem}.badge.hasFilterSelected[_ngcontent-%COMP%]{background-color:#1bbb8f}.btn-filter[_ngcontent-%COMP%]{padding:.5rem;text-transform:capitalize;border-radius:.5rem}.btn-filter.selected[_ngcontent-%COMP%]{border:2px solid var(--P);font-weight:700}.btn-filter[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;height:100%}.btn-filter[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{width:100%}.btn-filter[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{white-space:pre-wrap;line-height:1.3em;font-size:.9rem;margin:.8rem 0 .5rem}.wrapper-items[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:.5rem;margin-top:1rem}
1.inner-variation-filter[_ngcontent-%COMP%]{padding-bottom:1rem;margin-bottom:1rem}.footer[_ngcontent-%COMP%]{padding:1rem;flex:0 0 auto;z-index:1;box-shadow:0 3px 10px #0003;background-color:#fff}.footer[_ngcontent-%COMP%]   .selected-text-header[_ngcontent-%COMP%]{font-size:.8rem;font-weight:700}.footer[_ngcontent-%COMP%]   .selected-item-container[_ngcontent-%COMP%]{padding-top:.3rem;flex-grow:1}.footer[_ngcontent-%COMP%]   .selected-item-container[_ngcontent-%COMP%]   .selected-item-body[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center}.footer[_ngcontent-%COMP%]   .selected-item-container[_ngcontent-%COMP%]   .selectedItem[_ngcontent-%COMP%]{display:flex;font-size:.8rem;align-items:center;border-radius:100px;background:#f1f1f1;padding:.2rem .5rem}.footer[_ngcontent-%COMP%]   .selected-item-container[_ngcontent-%COMP%]   .selectedItem[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:.9rem;margin-right:.2rem}.footer[_ngcontent-%COMP%]   .item-block-container[_ngcontent-%COMP%]{display:flex;margin-bottom:1rem;border-radius:4px}.footer[_ngcontent-%COMP%]   .item-block-container[_ngcontent-%COMP%]   .item-title[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:inherit;width:70%;padding-left:.5rem}.footer[_ngcontent-%COMP%]   .item-block-container[_ngcontent-%COMP%]   .item-title[_ngcontent-%COMP%]   .member-tier-price[_ngcontent-%COMP%]{color:var(--P);font-weight:700;font-size:1rem}.footer[_ngcontent-%COMP%]   .item-block-container[_ngcontent-%COMP%]   .item-image[_ngcontent-%COMP%]{width:5rem}.footer[_ngcontent-%COMP%]   .select-item-btn[_ngcontent-%COMP%]{width:100%;background-color:var(--P);color:#fff;text-transform:uppercase}.footer[_ngcontent-%COMP%]   .select-item-btn[_ngcontent-%COMP%]:disabled{background-color:rgba(var(--palette-background-disabled-button),var(--palette-background-disabled-button-alpha));color:rgba(var(--palette-background-disabled-button),var(--palette-background-disabled-button-alpha))}@media not screen and (min-width: 600px){.wrapper-items[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr}.btn-filter[_ngcontent-%COMP%]{border-radius:.4rem}}"]}),i})();var yt=u(91079),on=u(97782);function Dg(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"app-icon",14),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.clearSearchKeyword())}),t.qZA()}2&i&&t.Q6J("size",12)}function qg(i,a){if(1&i&&(t.TgZ(0,"mat-option",15),t._UZ(1,"app-icon",16),t.TgZ(2,"div",17),t._uU(3),t.qZA()()),2&i){const e=a.$implicit;t.Q6J("value",e),t.xp6(3),t.hij(" ",e," ")}}function Qg(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"mat-chip",24),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.recentSearchKeywordClicked(r))}),t._uU(1),t.qZA()}if(2&i){const e=a.$implicit;t.xp6(1),t.hij("",e," ")}}function Ng(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",19)(2,"h3",20),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",21),t.NdJ("click",function(){t.CHM(e);const o=t.oxw(2);return t.KtG(o.clearAllRecentSearchItems())}),t._UZ(6,"app-icon",22),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"mat-chip-list"),t.YNc(10,Qg,2,1,"mat-chip",23),t.qZA(),t.BQk()}if(2&i){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,4,"byod.dialogs.search-item-dialog.search-history")),t.xp6(3),t.Q6J("size",15),t.xp6(1),t.hij(" ",t.lcZ(8,6,"byod.dialogs.search-item-dialog.clear-all")," "),t.xp6(3),t.Q6J("ngForOf",e.recentSearchKeywords)}}function Jg(i,a){if(1&i&&(t.TgZ(0,"div"),t.YNc(1,Ng,11,8,"ng-container",18),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.recentSearchKeywords.length>0)}}function Ug(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",36)(1,"app-item-card",37),t.NdJ("itemClicked",function(){const r=t.CHM(e).$implicit,l=t.oxw().$implicit,c=t.oxw(3);return t.KtG(c.itemClicked(l.catObj,l.catObj.groups[0],r.itemObj,"add"))})("removeClicked",function(){const r=t.CHM(e).$implicit,l=t.oxw().$implicit,c=t.oxw(3);return t.KtG(c.itemClicked(l.catObj,l.catObj.groups[0],r.itemObj,"remove"))}),t.qZA()()}if(2&i){const e=a.$implicit,n=t.oxw().$implicit,o=t.oxw(3);t.xp6(1),t.Q6J("item",e.itemObj)("category",n.catObj)("quantity",o.getItemQuantity(e.itemObj))("selected",o.checkSelected(n.catObj,e.itemObj))("soldout",null==o.cartService?null:o.cartService.isSoldout(e.itemObj))}}function Fg(i,a){if(1&i&&(t.TgZ(0,"div",33)(1,"div",34),t._uU(2),t.qZA(),t.YNc(3,Ug,2,5,"div",35),t.qZA()),2&i){const e=a.$implicit;t.xp6(2),t.Oqu(e.catObj.name),t.xp6(1),t.Q6J("ngForOf",e.items)}}function Lg(i,a){if(1&i&&(t.TgZ(0,"div",28)(1,"div",29)(2,"h3",30),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"h3",31),t._uU(6),t.qZA()(),t.YNc(7,Fg,4,2,"div",32),t.qZA()),2&i){const e=t.oxw(2);t.xp6(3),t.AsE(" ",e.searchResultsTotal," ",t.lcZ(4,4,"byod.dialogs.search-item-dialog.results")," - "),t.xp6(3),t.hij('"',e.fControl.value,'"'),t.xp6(1),t.Q6J("ngForOf",e.searchResults)}}function Bg(i,a){if(1&i&&(t.TgZ(0,"div",38),t._UZ(1,"app-icon",39),t.TgZ(2,"p",40),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"p",41),t._uU(6),t.qZA(),t.TgZ(7,"p",42),t._uU(8),t.ALo(9,"translate"),t.qZA()()),2&i){const e=t.oxw(2);t.xp6(3),t.hij(" ",t.lcZ(4,3,"byod.dialogs.search-item-dialog.no-match-warning")," "),t.xp6(3),t.hij(' "',e.fControl.value,'" '),t.xp6(2),t.hij(" ",t.lcZ(9,5,"byod.dialogs.search-item-dialog.no-match-2-warning")," ")}}function Yg(i,a){if(1&i&&(t.TgZ(0,"div",25),t.YNc(1,Lg,8,6,"div",26),t.YNc(2,Bg,10,7,"div",27),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.searchResults.length>0),t.xp6(1),t.Q6J("ngIf",0==e.searchResults.length)}}var Pt=(()=>{return(i=Pt||(Pt={}))[i.moreChoices=1]="moreChoices",i[i.searchResult=2]="searchResult",i[i.searchItem=3]="searchItem",Pt;var i})();let zg=(()=>{class i extends G.T{constructor(e,n,o,r,l,c,s){super(c),this.orderContext=e,this.menuManager=n,this.storageService=o,this.directoryContext=r,this.context=l,this.injector=c,this.cartService=s,this.recentSearchKeywords=[],this.dsSearchItems=[],this.searchResults=[],this.searchResultsTotal=0,this.showType=Pt.moreChoices,this.categories=[],this.fControl=new g.NI,this.itemNameOptions=[],this.useFuzzyQuery=!0}ngOnInit(){this.categories=this.orderContext.availableCategories,this.categories&&this.parseCat(this.categories),this.loadRecentSearch(),this.filteredItemNameOptions=this.fControl.valueChanges.pipe((0,It.b)(500),(0,Dt.x)(),(0,st.O)(""),(0,ne.U)(e=>{if(e.trim().length>=1){const n=null==e?void 0:e.toLowerCase();return this.itemNameOptions.filter(o=>null==o?void 0:o.toLowerCase().includes(n))}return[]})),this.searchSubs$=this.fControl.valueChanges.pipe((0,It.b)(500),(0,Dt.x)()).subscribe(e=>{this.onSearch()})}ngOnDestroy(){super.ngOnDestroy(),this.searchSubs$&&this.searchSubs$.unsubscribe()}getRecentSearchStorageKey(){return this.orderContext.storeId+".recentSearch"}loadRecentSearch(){this.storageService.getStorage(this.getRecentSearchStorageKey()).then(e=>{this.recentSearchKeywords=null!=e?e:[]})}saveRecentSearch(e){this.recentSearchKeywords.includes(e)||(this.recentSearchKeywords.push(e),this.storageService.setStorage(this.getRecentSearchStorageKey(),this.recentSearchKeywords))}clearAllRecentSearchItems(){this.recentSearchKeywords=[],this.storageService.setStorage(this.getRecentSearchStorageKey(),[])}onSearch(){var e;const n=this.fControl.value.trim();if(this.showType=2,!n)return void(this.showType=1);let o=null==n?void 0:n.toLowerCase(),r=0;const l=[];this.useFuzzyQuery&&(o=null!==(e=null==n?void 0:n.toLowerCase().split(" "))&&void 0!==e?e:[]),this.dsSearchItems.forEach(c=>{const s=c.items.filter(d=>{var m,p;return this.useFuzzyQuery?null==o?void 0:o.every(h=>{var x;return d.name.toLowerCase().includes(h)||this.hasExactKeyword(null===(x=d.desc)||void 0===x?void 0:x.toLowerCase(),h)}):(null===(m=d.name)||void 0===m?void 0:m.toLowerCase().includes(o))||(null===(p=d.desc)||void 0===p?void 0:p.toLowerCase().includes(o))}).filter(d=>this.menuManager.isAvailableItem(this.orderContext.store,c.catObj,c.catObj.groups[0],d.itemObj,"takeaway"===this.orderContext.mode,this.directoryContext.getUnixTime(),this.orderContext.mode));if(s.length>0){const d={};d.catObj=c.catObj,d.items=s,l.push(d),r+=s.length}}),this.searchResults=l,this.searchResultsTotal=r}clearSearchKeyword(){this.fControl.setValue("")}parseCat(e){const n=new Set;this.itemNameOptions.length=0,e.forEach((o,r)=>{const l={},c=[];if(o&&this.objectHasAttributeWithPath(o,"groups[0].items")){const s=N.BW.getPublishedItemsWithMap(o.id,o.groups[0],0);s instanceof Array&&s.forEach((d,m)=>{const p={};p.itemId=d.id,p.itemIndex=m,p.name=d["name_"+this.context.userLang]||d.name,p.desc=d["desc_"+this.context.userLang]||d.desc;const h=N.Vw.toData(N.ck,d);h.variations=[],h.minPrice=0,p.itemObj=h,c.push(p),n.add(d.name)})}l.categoryId=o.id,l.items=c,l.categoryIndex=r,l.catObj=o,this.dsSearchItems.push(l)}),this.itemNameOptions=Array.from(n).sort()}objectHasAttributeWithPath(e,n){if(!e||!n)return!1;let o=e;const r=n.includes(".");if(r||!r&&n.includes("[")){const l=[];r?l.push(...n.split(".")):l.push(n);for(const c of l)if(c.includes("[")){const s=c.split("[")[0],d=parseInt(c.split("[")[1].replace("[","").replace("]",""));if(isNaN(d)||!o.hasOwnProperty(s)||!(o[s]instanceof Array)||o[s].length<=d)return!1;o=o[s][d]}else{if(!o.hasOwnProperty(c))return!1;o=o[c]}return void 0!==o&&null!=o}return!!e.hasOwnProperty(n)&&e[n]}itemClicked(e,n,o,r){this.itemSelected({category:e,itemgroup:n,item:o,type:r})}recentSearchKeywordClicked(e){this.fControl.setValue(e)}keywordOptionSelected(e){this.saveRecentSearch(e)}confirmSearch(e){const n=this.fControl.value.trim();!n||(this.saveRecentSearch(n),this.autocomplete.closePanel())}isFromSearchItemFlow(){return!0}escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}hasExactKeyword(e,n){const o=this.escapeRegex(n);return new RegExp(`(^|\\s)${o}($|\\s)`,"i").test(e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(C.yQ),t.Y36(C._K),t.Y36(C.V1),t.Y36(ft.D),t.Y36(C._y),t.Y36(t.zs3),t.Y36(pt.N))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-search-item-dialog"]],viewQuery:function(e,n){if(1&e&&t.Gf(yt.ZL,5),2&e){let o;t.iGM(o=t.CRH())&&(n.autocomplete=o.first)}},features:[t.qOj],decls:18,vars:16,consts:[[3,"title","back"],[1,"container","flex","flex-col"],[1,"flex","flex-col"],["appearance","outline"],["matPrefix",""],[1,"icon-input"],["matInput","","type","text",3,"formControl","matAutocomplete","placeholder","keypress"],["matSuffix","","class","cursor-pointer","name","clear","source","mat","class","btn-clear-input flex",3,"size","click",4,"ngIf"],[1,"keyword-suggestion",3,"optionSelected"],["autocomplete","matAutocomplete"],["class","",3,"value",4,"ngFor","ngForOf"],[1,"div-result-outer","h-full","overflow-y-hidden",3,"ngSwitch"],[4,"ngSwitchCase"],["class","h-full",4,"ngSwitchCase"],["matSuffix","","name","clear","source","mat",1,"btn-clear-input","flex",3,"size","click"],[1,"",3,"value"],["name","search","size","18","source","mat",1,"flex","mr-1"],[1,"commodity-name"],[4,"ngIf"],[1,"flex","justify-between","mt2","mb-4"],[1,"text-search-history","font-bold"],[1,"text-xs","cursor-pointer","flex","items-center","div-clear-history",3,"click"],["name","clear","source","mat",3,"size"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"h-full"],["class","search-result-container h-full overflow-y-auto",4,"ngIf"],["class","flex flex-col items-center text-center",4,"ngIf"],[1,"search-result-container","h-full","overflow-y-auto"],[1,"div-result-no","flex"],[1,""],[1,"font-bold","for-keyword"],["class","py-3 ",4,"ngFor","ngForOf"],[1,"py-3"],[1,"font-bold"],["class","my-5 item-card-container",4,"ngFor","ngForOf"],[1,"my-5","item-card-container"],[1,"item-card","ml-0",3,"item","category","quantity","selected","soldout","itemClicked","removeClicked"],[1,"flex","flex-col","items-center","text-center"],["name","search_off","size","150","source","mat",1,"flex","mr-1","mt-2","text-gray-200"],[1,"text-no-match"],[1,"keyword-cant-find"],[1,"text-check-spell"]],template:function(e,n){if(1&e&&(t._UZ(0,"app-sub-bar",0),t.ALo(1,"translate"),t.TgZ(2,"div",1)(3,"div",2)(4,"mat-form-field",3)(5,"span",4)(6,"mat-icon",5),t._uU(7,"search"),t.qZA()(),t.TgZ(8,"input",6),t.NdJ("keypress",function(r){return 13==r.charCode?n.c
1onfirmSearch(r):null}),t.ALo(9,"translate"),t.qZA(),t.YNc(10,Dg,1,1,"app-icon",7),t.qZA(),t.TgZ(11,"mat-autocomplete",8,9),t.NdJ("optionSelected",function(r){return n.keywordOptionSelected(r.option.value)}),t.YNc(13,qg,4,2,"mat-option",10),t.ALo(14,"async"),t.qZA()(),t.TgZ(15,"div",11),t.YNc(16,Jg,2,1,"div",12),t.YNc(17,Yg,3,2,"div",13),t.qZA()()),2&e){const o=t.MAs(12);t.s9C("title",t.lcZ(1,10,"byod.dialogs.search-item-dialog.search-item")),t.Q6J("back",!1),t.xp6(8),t.s9C("placeholder",t.lcZ(9,12,"byod.dialogs.search-item-dialog.search-fave-item")),t.Q6J("formControl",n.fControl)("matAutocomplete",o),t.xp6(2),t.Q6J("ngIf",(null==n.fControl.value?null:n.fControl.value.length)>0),t.xp6(3),t.Q6J("ngForOf",t.lcZ(14,14,n.filteredItemNameOptions)),t.xp6(2),t.Q6J("ngSwitch",n.showType),t.xp6(1),t.Q6J("ngSwitchCase",1),t.xp6(1),t.Q6J("ngSwitchCase",2)}},dependencies:[_.sg,_.O5,_.RF,_.n9,g.Fj,g.JJ,g.oH,on.E,S.o,k.v,z.Hw,lt.qn,lt.HS,Z.KE,Z.qo,Z.R9,U.ey,j.Nt,yt.XC,yt.ZL,_.Ov,M.X$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background:white;height:100%;width:100%;overflow:hidden;margin:0 auto}.container[_ngcontent-%COMP%]{padding:1rem;height:100%;overflow-y:hidden;background:#f9f9f9}  .mat-form-field-outline-start{background-color:#fff!important}  .mat-form-field-outline-gap{background-color:#fff!important}  .mat-form-field-outline-end{background-color:#fff!important}.item-search-result[_ngcontent-%COMP%], .item-recent-search[_ngcontent-%COMP%]{border-bottom:1px solid #eee;cursor:pointer}mat-form-field[_ngcontent-%COMP%]  .mat-form-field-prefix{margin-right:.3rem}mat-form-field[_ngcontent-%COMP%]  .mat-form-field-infix{font-weight:300;transform:translateY(-3px)}mat-form-field[_ngcontent-%COMP%]   .icon-input[_ngcontent-%COMP%]{color:var(--P800)}mat-form-field[_ngcontent-%COMP%]   .btn-clear-input[_ngcontent-%COMP%]{background:#d2d2d2;border-radius:100rem;color:#fff;justify-content:center;align-items:center;height:.85rem!important;width:.85rem;transform:translateY(-6px)}.div-result-no[_ngcontent-%COMP%]{color:#909090;font-size:.9rem}.div-result-no[_ngcontent-%COMP%]   .for-keyword[_ngcontent-%COMP%]{margin-left:.3rem}.item-card[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}.item-card-container[_ngcontent-%COMP%]{position:relative}mat-option[_ngcontent-%COMP%]  .mat-option-text{display:flex;align-items:center}.commodity-name[_ngcontent-%COMP%]{white-space:pre-line;line-height:normal}.text-no-match[_ngcontent-%COMP%]{margin-top:1.5rem;color:#333;font-size:1.2rem;line-height:1.3em}.keyword-cant-find[_ngcontent-%COMP%]{font-weight:700;line-height:1.3em;font-size:1.25rem;color:var(--P800)}.text-check-spell[_ngcontent-%COMP%]{color:gray;margin-top:1rem;font-size:.9rem}.text-search-history[_ngcontent-%COMP%]{color:var(--P800)}.div-clear-history[_ngcontent-%COMP%]{color:#6a6a6a}mat-chip-list[_ngcontent-%COMP%]  .mat-chip-list-wrapper{width:100%}mat-chip-list[_ngcontent-%COMP%]   mat-chip[_ngcontent-%COMP%]{margin-bottom:.5rem!important;background:#ededed!important;justify-content:center;min-width:3.5rem;color:#333!important}@media not screen and (min-width: 600px){.item-card[_ngcontent-%COMP%]{min-height:110px}}"]}),i})();var jg=u(95893),Gg=u(7567),Eg=u(69745);const $g=function(i){return{disable:i}};function Rg(i,a){if(1&i&&(t._UZ(0,"input",13),t.ALo(1,"formTranslate")),2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("formControlName",null==e?null:e.name)("ngClass",t.VKq(11,$g,!(null!=e&&e.editable)))("placeholder",t.gM2(1,6,e.example,n.context.userLang,"example","addressFields"))("readonly",!(null!=e&&e.editable))("required",null==e?null:e.required)("type",null==e?null:e.input)}}function Vg(i,a){if(1&i&&(t._UZ(0,"input",14),t.ALo(1,"formTranslate")),2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("formControlName",null==e?null:e.name)("placeholder",t.gM2(1,2,e,n.context.userLang,"example","addressFields"))}}function Hg(i,a){if(1&i&&(t.TgZ(0,"mat-error",15),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i){const e=a.$implicit,n=t.oxw().$implicit,o=t.oxw();
1t.xp6(1),t.hij(" ",o.addressForm.get(null==n?null:n.name).hasError(e.type)?t.lcZ(2,1,"directory.pages.delivery-add-address-page.required"):""," ")}}function Kg(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"mat-form-field",9)(2,"mat-label"),t._uU(3),t.ALo(4,"formTranslate"),t.qZA(),t.YNc(5,Rg,2,13,"input",10),t.YNc(6,Vg,2,7,"input",11),t.YNc(7,Hg,3,3,"mat-error",12),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw();t.xp6(3),t.Oqu(t.gM2(4,4,e,n.context.userLang,"title","addressFields")),t.xp6(2),t.Q6J("ngIf",!(null!=e&&e.options)),t.xp6(1),t.Q6J("ngIf",null==e?null:e.options),t.xp6(1),t.Q6J("ngForOf",n.addressFormMessages[null==e?null:e.name])}}function Wg(i,a){1&i&&(t.TgZ(0,"mat-icon"),t._UZ(1,"mat-spinner",16),t.qZA())}let Xg=(()=>{class i extends C.nh{constructor(e,n,o,r,l){super(e),this.directoryContext=n,this.formBuilder=o,this.directoryService=r,this.directoryContextManager=l,this.showBack=history.state.auxDepth>1,this.addressFields=[],this.confirmInProgress=!1}ngOnInit(){const e=this.settingManager.get("form.addressFields",null);this.useFullAddress=(null==e?void 0:e.filter(n=>"line"===n.name).length)>0,this.addressSettings=null==e?void 0:e.filter(n=>this.useFullAddress?"note"===n.name:!n.autofill&&null!=n.name),this.selectedAddress=this.directoryContext.state.deliveryAddress,this.getFields()}getFields(){var e;const n={},o={};null===(e=this.addressSettings)||void 0===e||e.forEach(r=>{if(r.required||"note"===r.name){const l=this.selectedAddress[null==r?void 0:r.name]||""!==this.selectedAddress[null==r?void 0:r.name];if(console.log("abc isFound",l,null==r?void 0:r.name,this.selectedAddress[null==r?void 0:r.name]),!l||"note"===r.name){const c=r,s=new g.NI(""),d=[];c.editable=!0,"note"===c.name?s.setValue(this.selectedAddress[c.name]):s.addValidators(g.kI.compose([g.kI.required])),d.push({type:"required",message:""}),o[r.name]=d,this.addressFields.push(r),n[r.name]=s}}}),this.addressForm=this.formBuilder.group(n),this.addressFormMessages=o}onConfirm(){const e=this.compileFormValue(),n=this.selectedAddress.id;this.confirmInProgress=!0,this.directoryService.editAddress(e,n).subscribe({next:r=>{r&&this.directoryService.getSavedAddress(!1).subscribe({next:()=>{this.directoryContextManager.setSelectedMode(this.directoryContext.DELIVERY),this.directoryContextManager.setSelectedDeliveryAddress(r),this.directoryContextManager.setSelectedStoreId(this.store),this.directoryContextManager.setFinalState(),this.confirmInProgress=!1,this.routingService.navigateCloseAllModal()},error:l=>{this.confirmInProgress=!1,this.dialogService.showError(l)}})},error:r=>{this.confirmInProgress=!1,this.dialogService.showError(r)}})}compileFormValue(){var e;const n=this.selectedAddress;return this.addressSettings.forEach(o=>{void 0!==this.selectedAddress[o.name]&&(n[o.name]=this.selectedAddress[o.name]),void 0!==this.addressForm.value[o.name]&&(n[o.name]=this.addressForm.value[o.name])}),n.geocode=this.useFullAddress,n.brandId=null===(e=this.context)||void 0===e?void 0:e.brandId,n}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(ft.D),t.Y36(g.qu),t.Y36(jg.Q),t.Y36(Gg.o))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-address-details"]],features:[t.qOj],decls:13,vars:11,consts:[[1,"container"],[3,"back"],[1,"div-content"],[1,"text-center","text-xl","font-bold"],[1,"form-flex-col","mt-5",3,"formGroup"],["hi","",1,"flex","flex-col","mb-5","address-details"],[4,"ngFor","ngForOf"],["mat-raised-button","","type","button","data-testid","confirm-address-input-button",1,"btn-submit","text-lg","uppercase",3,"disabled","click"],[4,"ngIf"],["appearance","outline",1,"form-field"],["data-testid","address-info-input-field","matInput","",3,"formControlName","ngClass","placeholder","readonly","required","type",4,"ngIf"],["matInput","","type","text",3,"formControlName","placeholder",4,"ngIf"],["class","error-message",4,"ngFor","ngForOf"],["data-testid","address-info-input-field","matInput","",3,"formControlName","ngClass","placeholder","readonly","required","type"],["matInput","","type","text",3,"formControlName","placeholder"],[1,"error-message"],["color","accent","diameter","20"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.TgZ(2,"div",2)(3,"h1",3),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"form",4)(7,"div",5),t.YNc(8,Kg,8,9,"ng-container",6),t.TgZ(9,"button",7),t.NdJ("click",function(){return n.onConfirm()}),t._uU(10),t.ALo(11,"translate"),t.YNc(12,Wg,2,0,"mat-icon",8),t.qZA()()()()()),2&e&&(t.xp6(1),t.Q6J("back",n.showBack),t.xp6(3),t.Oqu(t.lcZ(5,7,"byod.dialogs.address-detail
1s-dialog.title")),t.xp6(2),t.Q6J("formGroup",n.addressForm),t.xp6(2),t.Q6J("ngForOf",n.addressFields),t.xp6(1),t.Q6J("disabled",n.confirmInProgress),t.xp6(1),t.hij("",t.lcZ(11,9,"byod.dialogs.address-details-dialog.confirm")," "),t.xp6(2),t.Q6J("ngIf",n.confirmInProgress))},dependencies:[_.mk,_.sg,_.O5,g._Y,g.Fj,g.JJ,g.JL,g.Q7,g.sg,g.u,k.v,z.Hw,I.lW,xt.Ou,Z.TO,Z.KE,Z.hX,j.Nt,M.X$,Eg.l],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background:#fff;overflow:hidden;margin:0 auto}div.div-content[_ngcontent-%COMP%]{position:relative;height:calc(100% - 64px)!important}.address-details[_ngcontent-%COMP%]{padding:0 1.5rem}.btn-submit[_ngcontent-%COMP%]{background:var(--P);width:100%;color:var(--PC);height:3rem}.form-field[_ngcontent-%COMP%]{width:100%}"]}),i})(),tp=(()=>{class i extends C.nh{constructor(e){super(e)}ngOnInit(){var e;this.auxInput=this.routingService.getAuxInput(),this.storeId=null===(e=this.auxInput)||void 0===e?void 0:e.storeId,this.inputTableForm=new g.cw({tableNo:new g.NI("",[g.kI.required])})}onSubmit(){const e=this.inputTableForm.get("tableNo").value;this.availableSpot(this.storeId,e).subscribe({next:o=>void 0===o.find(r=>r.name===e)?this.inputTableForm.get("tableNo").setErrors({required:!0}):this.dialogService.submitAuxDialog({spot:e})})}onCancel(){return this.dialogService.submitAuxDialog({back:!0})}availableSpot(e,n){const r=this.configService.getDeviceId(),l={};return l.storeId=e,l.spot=n,l.deviceId=r,l.check=!0,this.dataService.get("/api/v1/menu/spot.json",l)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-input-table-dialog"]],features:[t.qOj],decls:20,vars:19,consts:[[1,"container"],[3,"back","close","title"],[1,"div-content"],[3,"formGroup"],["appearance","outline",1,"form-field","input-table"],["formControlName","tableNo","matInput","","type","text",3,"placeholder"],[1,"error-message"],[1,"mr-1",3,"inline"],[1,"flex","btn-actions"],["mat-stroked-button","","type","button","data-testid","cancel-table-input-button",1,"btn-cancel","text-lg","uppercase",3,"click"],["mat-flat-button","","type","button","data-testid","confirm-table-input-button",1,"btn-submit","text-lg","uppercase",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"form",3)(5,"mat-form-field",4),t._UZ(6,"input",5),t.ALo(7,"translate"),t.TgZ(8,"mat-error",6)(9,"mat-icon",7),t._uU(10,"warning"),t.qZA(),t._uU(11),t.ALo(12,"translate"),t.qZA()(),t.TgZ(13,"div",8)(14,"button",9),t.NdJ("click",function(){return n.onCancel()}),t._uU(15),t.ALo(16,"translate"),t.qZA(),t.TgZ(17,"button",10),t.NdJ("click",function(){return n.onSubmit()}),t._uU(18),t.ALo(19,"translate"),t.qZA()()()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("close",!1)("title",t.lcZ(2,9,"byod.dialogs.input-table-no-dialog.title")),t.xp6(3),t.Q6J("formGroup",n.inputTableForm),t.xp6(2),t.Q6J("placeholder",t.lcZ(7,11,"byod.dialogs.input-table-no-dialog.placeholder")),t.xp6(3),t.Q6J("inline",!0),t.xp6(2),t.hij(" ",t.lcZ(12,13,"byod.dialogs.input-table-no-dialog.error-input")," "),t.xp6(4),t.hij("",t.lcZ(16,15,"byod.dialogs.input-table-no-dialog.cancel")," "),t.xp6(3),t.hij("",t.lcZ(19,17,"byod.dialogs.input-table-no-dialog.confirm")," "))},dependencies:[g._Y,g.Fj,g.JJ,g.JL,g.sg,g.u,k.v,z.Hw,I.lW,Z.TO,Z.KE,j.Nt,M.X$],styles:["[_nghost-%COMP%]{display:flex;border-radius:.5rem;overflow:hidden;margin:0 auto;background:#fff}div.div-content[_ngcontent-%COMP%]{position:relative;padding-left:1.5rem;padding-right:1.5rem;padding-top:2rem}.form-field[_ngcontent-%COMP%]{width:100%;margin-bottom:1.25rem}.form-field[_ngcontent-%COMP%]  mat-error{align-items:center;display:flex}.btn-actions[_ngcontent-%COMP%]{width:100%;margin-bottom:1rem;column-gap:1rem}.btn-actions[_ngcontent-%COMP%]   .btn-submit[_ngcontent-%COMP%]{background:var(--P);width:100%;color:var(--PC);height:3rem}.btn-actions[_ngcontent-%COMP%]   .btn-cancel[_ngcontent-%COMP%]{width:100%;height:3rem;color:gray}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}}"]}),i})();var ep=u(74663);function np(i,a){1&i&&(t.TgZ(0,"mat-icon",12),t._UZ(1,"mat-spinner",13),t.qZA())}const ip=function(i){return{maxValue:i}};let op=(()=>{class i{constructor(e,n,o,r,l,c,s){this.orderContext=e,this.orderManager=n,this.routingService=o,this.dataService=r,this.dialogService=l,this.t=c,this.settingManager=s,this.showBack=history.state.auxDepth>1,this.loading=!1}ngOnInit(){this.auxInput=this.routingService.getAuxInput(),this.seatForm=new g.cw({seatNo:new g.NI("",[g.kI.required])}),this.inputSeatsMaxValue=this.settingManager.get("inputSeatsMaxValue",20)}updateSeat(){var e;if(this.seats=this.seatForm.get("seatNo").value,!this.isValidSeats(this.seats)||this.seatForm.invali
1d)return this.seatForm.get("seatNo").setErrors({wrongFormat:!0});this.orderContext.seats=parseInt(this.seats.toString()),this.orderManager.order.seats=this.orderContext.seats;const n="byod.dialogs.input-seat-dialog.seats-number-updated",o=this;return"byod"===this.orderManager.mode||"prekiosk"===this.orderManager.mode||(null===(e=this.orderContext)||void 0===e?void 0:e.isPreKiosk())||"preorder"===this.orderManager.mode?(this.loading=!0,this.editHeadCount().subscribe({next:l=>(o.loading=!1,o.routingService.navigateCloseModal(),o.dialogService.showToast(o.t.instant(n))),error(l){return o.loading=!1,o.orderContext.seats=0,o.orderManager.order.seats=0,o.dialogService.showError(l),this.seatForm.get("seatNo").setErrors({wrongFormat:!0})}})):(o.routingService.navigateCloseModal(),o.dialogService.showToast(o.t.instant(n)))}isValidSeats(e){return!(!e&&0!==e)&&(!isNaN(e)&&e%1==0&&e>0&&e<=this.inputSeatsMaxValue)}editHeadCount(){let n={action:"edit"};return n.name=parseInt(this.auxInput.spot),n.seats=this.seats,n.storeId=this.auxInput.storeId,this.dataService.putWithParams("/api/v1/menu/spot.json",n)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(C.yQ),t.Y36(C.Km),t.Y36(Le.Z),t.Y36(C.Do),t.Y36(C.xA),t.Y36(M.sK),t.Y36(ep.y))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-input-seats-dialog"]],decls:21,vars:24,consts:[[1,"container"],[3,"back","close","title"],[1,"div-content"],[1,"text-center","mb-3"],[3,"formGroup"],["appearance","outline",1,"seat-input","form-field"],["matInput","","formControlName","seatNo","type","number","data-testid","address-info-input-field",3,"min","max","placeholder"],[1,"error-message"],["inline","true",1,"mr-1"],[1,"action-button"],["mat-flat-button","","type","button","data-testid","confirm-address-input-button",1,"btn-submit","text-lg","uppercase",3,"click"],["inline","true",4,"ngIf"],["inline","true"],["color","accent","diameter","20"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"h2",3),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.TgZ(7,"form",4)(8,"mat-form-field",5),t._UZ(9,"input",6),t.ALo(10,"translate"),t.TgZ(11,"mat-error",7)(12,"mat-icon",8),t._uU(13,"warning_outline"),t.qZA(),t._uU(14),t.ALo(15,"translate"),t.qZA()(),t.TgZ(16,"div",9)(17,"button",10),t.NdJ("click",function(){return n.updateSeat()}),t._uU(18),t.ALo(19,"translate"),t.YNc(20,np,2,0,"mat-icon",11),t.qZA()()()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("close",!1)("title",t.lcZ(2,11,"byod.dialogs.input-seat-dialog.title")),t.xp6(4),t.Oqu(t.lcZ(6,13,"byod.dialogs.input-seat-dialog.subtitle")),t.xp6(2),t.Q6J("formGroup",n.seatForm),t.xp6(2),t.Q6J("min",1)("max",n.inputSeatsMaxValue)("placeholder",t.xi3(10,15,"byod.dialogs.input-seat-dialog.input-seat-placeholder",t.VKq(22,ip,n.inputSeatsMaxValue))),t.xp6(5),t.hij("",t.lcZ(15,18,"byod.dialogs.input-seat-dialog.error-input-seat")," "),t.xp6(4),t.hij(" ",t.lcZ(19,20,"byod.dialogs.input-seat-dialog.confirm")," "),t.xp6(2),t.Q6J("ngIf",n.loading))},dependencies:[_.O5,g._Y,g.Fj,g.wV,g.JJ,g.JL,g.qQ,g.Fd,g.sg,g.u,k.v,z.Hw,I.lW,xt.Ou,Z.TO,Z.KE,j.Nt,M.X$],styles:["[_nghost-%COMP%]{display:flex;overflow:hidden;margin:0 auto;height:100%;background:#fff}div.div-content[_ngcontent-%COMP%]{position:relative;padding-left:1.5rem;padding-right:1.5rem;display:flex;flex-direction:column;padding-top:2rem}.seat-input[_ngcontent-%COMP%]{width:100%;margin-bottom:1.25rem}.seat-input[_ngcontent-%COMP%]  mat-error{align-items:center;display:flex}.seat-input[_ngcontent-%COMP%]  .mat-icon.mat-icon-inline{width:1em!important}.action-button[_ngcontent-%COMP%]{width:100%;margin-bottom:1rem;column-gap:1rem}.action-button[_ngcontent-%COMP%]   .btn-submit[_ngcontent-%COMP%]{background:var(--P);width:100%;color:var(--PC);height:3rem}.action-button[_ngcontent-%COMP%]   .btn-cancel[_ngcontent-%COMP%]{width:100%;height:3rem;color:gray}"]}),i})();var rp=u(92410);function ap(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",4)(1,"app-item-card",5),t.NdJ("itemClicked",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.itemClicked(l.category,l.itemGroup,r,"add",!0))})("removeClicked",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.itemClicked(l.category,l.itemGroup,r,"remove"))}),t.qZA()()}if(2&i){const e=a.$implicit,n=t.oxw();
1t.xp6(1),t.Q6J("item",e)("category",n.category)("quantity",n.getItemQuantity(e))("selected",n.checkSelected(n.category,e))("soldout",null==n.cartService?null:n.cartService.isSoldout(e))}}let lp=(()=>{class i extends G.T{constructor(e){super(e),this.injector=e}ngOnInit(){this.input=this.navParams.input,this.upsellItems=this.input.items,this.category=this.input.category,this.itemGroup=this.input.itemGroup}itemClicked(e,n,o,r,l=!1){this.itemSelected({category:e,itemgroup:n,item:o,type:r,isRecommend:l})}isCloseAllDialogAfterAddToCart(){return!1}checkoutClicked(){this.dialogService.submitAuxDialog({})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-upsell-item-dialog"]],features:[t.qOj],decls:5,vars:6,consts:[[3,"title","back","closeBackBehaviour"],[1,"container","flex","flex-col","overflow-y-auto"],["class","item-card-container my-5",4,"ngFor","ngForOf"],[1,"action",3,"checkout"],[1,"item-card-container","my-5"],[1,"item-card","ml-0",3,"item","category","quantity","selected","soldout","itemClicked","removeClicked"]],template:function(e,n){1&e&&(t._UZ(0,"app-sub-bar",0),t.ALo(1,"translate"),t.TgZ(2,"div",1),t.YNc(3,ap,2,5,"div",2),t.qZA(),t.TgZ(4,"app-cart-action",3),t.NdJ("checkout",function(){return n.checkoutClicked()}),t.qZA()),2&e&&(t.s9C("title",t.lcZ(1,4,"byod.components.cart.suggest")),t.Q6J("back",!1)("closeBackBehaviour",!0),t.xp6(3),t.Q6J("ngForOf",n.upsellItems))},dependencies:[_.sg,on.E,rp.L,k.v,M.X$],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;background:white;height:100%;width:100%;overflow:hidden;margin:0 auto}.item-card-container[_ngcontent-%COMP%]{position:relative}.item-card[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}@media not screen and (min-width: 600px){.item-card[_ngcontent-%COMP%]{min-height:110px}}.container[_ngcontent-%COMP%]{padding:1rem;height:100%;overflow-y:hidden;background:#f9f9f9}"]}),i})(),cp=(()=>{class i extends C.nh{constructor(e){super(e)}ngOnInit(){var e;this.auxInput=this.routingService.getAuxInput(),this.storeId=null===(e=this.auxInput)||void 0===e?void 0:e.storeId,this.inputTableForm=new g.cw({tableCode:new g.NI("",[g.kI.required])})}onSubmit(){var e;const n=this.inputTableForm.get("tableCode").value;if(null==n||!n.trim())return void this.inputTableForm.get("tableCode").setErrors({required:!0});const r={};r.storeId=this.storeId,r.code=this.inputTableForm.get("tableCode").value,r.groupId=null===(e=this.context)||void 0===e?void 0:e.groupId,this.dataService.get("/api/v1/menu/spot.json",r).subscribe({next:l=>{if((null==l?void 0:l.length)>0){const d=`/order/store/${this.storeId}/mode/byod?spot=${l[0].name}&key=${l[0].session}`;let m=this.getQueryParams();m=m?"&"+m:"",window.location.href=location.origin+d+m}else this.inputTableForm.get("tableCode").setErrors({required:!0})}})}onCancel(){this.routingService.navigateCloseModal()}getQueryParams(){const e=this.route.snapshot.queryParams;if(!e)return"";const n=[];for(const o in e)n.push(o+"="+e[o]);return n.join("&")}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-input-table-code-dialog"]],features:[t.qOj],decls:20,vars:19,consts:[[1,"container"],[3,"back","close","title"],[1,"div-content"],[3,"formGroup"],["appearance","outline",1,"form-field"],["formControlName","tableCode","matInput","","type","text",3,"placeholder"],[1,"error-message"],[1,"mr-1",3,"inline"],[1,"flex","btn-actions"],["mat-raised-button","","type","button",1,"btn-cancel","text-lg","uppercase",3,"click"],["appThrottleClick","","mat-raised-button","","type","button",1,"btn-submit","text-lg","uppercase",3,"throttleClick"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2)(4,"form",3)(5,"mat-form-field",4),t._UZ(6,"input",5),t.ALo(7,"translate"),t.TgZ(8,"mat-error",6)(9,"mat-icon",7),t._uU(10,"warning"),t.qZA(),t._uU(11),t.ALo(12,"translate"),t.qZA()(),t.TgZ(13,"div",8)(14,"button",9),t.NdJ("click",function(){return n.onCancel()}),t._uU(15),t.ALo(16,"translate"),t.qZA(),t.TgZ(17,"button",10),t.NdJ("throttleClick",function(){return n.onSubmit()}),t._uU(18),t.ALo(19,"translate"),t.qZA()()()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("close",!1)("title",t.lcZ(2,9,"byod.dialogs.input-table-code-dialog.title")),t.xp6(3),t.Q6J("formGroup",n.inputTableForm),t.xp6(2),t.Q6J("placeholder",t.lcZ(7,11,"byod.dialogs.input-table-code-dialog.placeholder")),t.xp6(3),t.Q6J("inline",!0),t.xp6(2),t.hij(" ",t.lcZ(12,13,"byod.dialogs.input-table-code-dialog.error-input")," "),t.xp6(4),t.hij(" ",t.lcZ(16,15,"byod.dialogs.input-table-code-dialog.cancel")," "),t.xp6(3),t.hij(" ",t.lcZ(19,17,"byod.dialogs.input-table-code-dialog.confirm")," "))},dependencies:[g._Y,g.Fj,g.JJ,g.JL,g.sg,g.u,k.v,J.j,z.Hw,I.lW,Z.TO,Z.KE,j.Nt,M.X$],styles:["[_nghost-%COMP%]{display:flex;align-items:center;overflow:hidden;margin:0 auto;background:#fff}div.div-content[_ngcontent-%COMP%]{position:relative;padding-left:1rem;padding-right:1rem;height:calc(100% - 64px)!important}.form-field[_ngcontent-%COMP%]{width:100%}.btn-actions[_ngcontent-%COMP%]{width:100%;margin-bottom:1rem}.btn-actions[_ngcontent-%COMP%]   .btn-submit[_ngcontent-%COMP%]{width:100%;background-color:var(--P);color:var(--PC);padding-bottom:1rem;padding-top:1rem}.btn-actions[_ngcontent-%COMP%]   .btn-cancel[_ngcontent-%COMP%]{width:100%;padding-bottom:1rem;padding-top:1rem;margin-right:.5rem}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%}}"]}),i})(),sp=(()=>{class i extends C.nh{constructor(e){super(e),this.injector=e,this.message="byod.pages.checkout-page.quick-reg-create-password-confirm",this.cancelText="byod.pages.checkout-page.skip",this.okText="byod.pages.checkout-page.create-password"}ngOnInit(){this.navParams.get("isRegistered")&&(this.message="byod.pages.checkout-page.quick-reg-input-password-confirm",this.cancelText="byod.pages.checkout-page.checkout",this.okText="byod.pages.checkout-page.input-password")}yesClicked(){this.dialogService.submitAuxDialog({action:"stay"})}noClicked(){this.dialogService.submitAuxDialog({action:"continue"})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-quick-reg-confirm-dialog"]],features:[t.qOj],decls:11,vars:9,consts:[[1,"container"],[1,"p-4"],[1,"flex","justify-center"],["mat-button","","color","dark","appThrottleClick","",3,"throttleClick"],["mat-button","","color","primary","appThrottleClick","",3,"throttleClick"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"h3",1),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"div",2)(5,"button",3),t.
1NdJ("throttleClick",function(){return n.noClicked()}),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"button",4),t.NdJ("throttleClick",function(){return n.yesClicked()}),t._uU(9),t.ALo(10,"translate"),t.qZA()()()),2&e&&(t.xp6(2),t.hij(" ",t.lcZ(3,3,n.message)," "),t.xp6(4),t.hij(" ",t.lcZ(7,5,n.cancelText)," "),t.xp6(3),t.hij(" ",t.lcZ(10,7,n.okText)," "))},dependencies:[J.j,I.lW,M.X$],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:100%;align-items:center;justify-content:center;padding:0 16px}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden;background:white}@media not screen and (min-width: 840px){[_nghost-%COMP%]{min-width:unset}}"]}),i})();function dp(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",5),t.NdJ("throttleClick",function(){const r=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.pickupPointClicked(r))}),t._UZ(1,"app-icon",6),t.TgZ(2,"span",7),t._uU(3),t.ALo(4,"i18n"),t.qZA()()}if(2&i){const e=a.$implicit,n=t.oxw();t.xp6(3),t.Oqu(t.xi3(4,1,e,n.context.userLang))}}let mp=(()=>{class i extends C.nh{constructor(e,n){super(e),this.orderContext=n,this.result={},this.pickupPointOptions=[]}ngOnInit(){var e,n;this.input=this.navParams.input,this.pickupPointOptions=null===(n=null===(e=this.orderContext.store)||void 0===e?void 0:e.location)||void 0===n?void 0:n.pickupPoints}pickupPointClicked(e){this.dialogService.submitAuxDialog({action:"ok",result:e})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-pickup-point-dialog"]],features:[t.qOj],decls:7,vars:5,consts:[[1,"div-outest"],[3,"back"],[1,"dialog","py-0","px-10","pb-6"],[1,"font-bold","text-choose"],["class","btn-pickup-point w-full pickup-point-not-selected","mat-flat-button","","appThrottleClick","",3,"throttleClick",4,"ngFor","ngForOf"],["mat-flat-button","","appThrottleClick","",1,"btn-pickup-point","w-full","pickup-point-not-selected",3,"throttleClick"],["name","pickup_point","size","38",1,"flex","mr-3","not-border","pickup-point-not-selected"],[1,"pickup-location"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.TgZ(2,"mat-dialog-content",2)(3,"div",3),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.YNc(6,dp,5,4,"button",4),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("back",!1),t.xp6(3),t.hij(" ",t.lcZ(5,3,"byod.dialogs.pickup-point-dialog.choose-pickup-point")," "),t.xp6(2),t.Q6J("ngForOf",n.pickupPointOptions))},dependencies:[_.sg,S.o,k.v,J.j,W.xY,I.lW,M.X$,D.G],styles:["[_nghost-%COMP%]{max-height:90vh;position:absolute;top:50%;transform:translateY(-50%);width:100%;padding:1rem}.div-outest[_ngcontent-%COMP%]{border-radius:.5rem;overflow:hidden;background:white}.mat-dialog-content[_ngcontent-%COMP%]{background-color:#fff;width:100%;margin:0;padding:1.5rem}app-icon[_ngcontent-%COMP%]{color:var(--P)}.text-choose[_ngcontent-%COMP%]{font-size:1.1rem;color:#333;font-weight:700;text-align:center;line-height:normal;padding:0 .5rem;margin-bottom:1.5rem}.btn-pickup-point[_ngcontent-%COMP%]{font-size:1rem;padding:.65rem 2rem;display:flex;justify-content:center}.btn-pickup-point[_ngcontent-%COMP%]:not(:last-child){margin-bottom:1.25rem}.btn-pickup-point[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.btn-pickup-point[_ngcontent-%COMP%]   .pickup-location[_ngcontent-%COMP%]{white-space:pre-line;line-height:normal}.pickup-point-selected[_ngcontent-%COMP%]{background:var(--P);color:#fff}.pickup-point-not-selected[_ngcontent-%COMP%]{border:1px solid var(--P);color:var(--P800)}.not-border[_ngcontent-%COMP%]{border:none!important}@media not screen and (min-width: 600px){.dialog[_ngcontent-%COMP%]{padding-left:1.5rem!important;padding-right:1.5rem!important}}"]}),i})();var gp=u(47114),pp=u(47467),up=u(45485),_p=u(67481);function fp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",15),t._UZ(2,"app-img",16),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(4);t.xp6(2),t.Q6J("src",n.getPaymentIconWithPath(e))}}function hp(i,a){if(1&i&&(t.ynx(0),t.YNc(1,fp,3,1,"ng-container",14),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.iconName)}}function xp(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,"pay.components."+(null==e?null:e.paymentDesc1))," ")}}function vp(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,"pay.components."+(null==e?null:e.paymentDesc2))," ")}}const rn=function(i){return{"waring-color":i}};function Cp(i,a){if(1&i&&(t.TgZ(0,"span",17),t.YNc(1,xp,3,3,"ng-container",10),t.TgZ(2,"i",18),t._uU(3),t.qZA(),t.YNc(4,vp,3,3,"ng-container",10),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null==e?null:e.paymentDesc1),t.xp6(1),t.Q6J("ngClass",t.VKq(6,rn,!n.checkCanPayByEwalletBalance())),t.xp6(1),t.lnq(" ",null==n.ewalletService?null:n.ewalletService.getMember
1EwallectCurrency()," ",null==n.ewalletService?null:n.ewalletService.getMemberEwallectCurrencySign()," ",null==n.ewalletService?null:n.ewalletService.getDisplayEwalletNumber()," "),t.xp6(1),t.Q6J("ngIf",null==e?null:e.paymentDesc2)}}function bp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"span",22),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,"pay.components."+(null==e?null:e.btnName)),"")}}function Mp(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("throttleClick",function(o){t.CHM(e);const r=t.oxw().$implicit;return null!=r&&r.btnCallback&&(null==r||r.btnCallback()),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",20),t._UZ(2,"app-icon",21),t.qZA(),t.YNc(3,bp,4,3,"ng-container",10),t.qZA()}if(2&i){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("ngIf",null==e?null:e.iconName)}}const an=function(i,a){return{"payment-selected":i,"gray-bg-color":a}};function Op(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",7)(1,"div",8),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.paymentSelected(r))}),t.TgZ(2,"div",9),t.YNc(3,hp,2,1,"ng-container",10),t.TgZ(4,"span",11),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.YNc(7,Cp,5,8,"span",12),t.qZA(),t.YNc(8,Mp,4,1,"button",13),t.qZA()()}if(2&i){const e=a.$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(7,an,(null==n.selectedConfig?null:n.selectedConfig.id)==e.id&&(null==n.selectedConfig?null:n.selectedConfig.sub)===(null==e?null:e.sub),n.selectedConfig&&(null==n.selectedConfig?null:n.selectedConfig.id)!==(null==e?null:e.id))),t.xp6(2),t.Q6J("ngIf",null==e?null:e.iconName),t.xp6(2),t.hij(" ",t.lcZ(6,5,"payments."+e.name)," "),t.xp6(2),t.Q6J("ngIf",null==e?null:e.paymentDesc1),t.xp6(1),t.Q6J("ngIf",null==e?null:e.button)}}function yp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",28),t._UZ(2,"app-img",16),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(5);t.xp6(2),t.Q6J("src",n.getPaymentIconWithPath(e))}}function Pp(i,a){if(1&i&&(t.ynx(0),t.YNc(1,yp,3,1,"ng-container",14),t.BQk()),2&i){const e=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",null==e.selectedConfig?null:e.selectedConfig.iconName)}}const ln=function(i){return{"sub-method-selected":i}};function Ip(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.subPaymentSelected(r))}),t.TgZ(1,"div",27)(2,"div",9),t.YNc(3,Pp,2,1,"ng-container",10),t.TgZ(4,"span",11),t._uU(5),t.qZA()()()()}if(2&i){const e=a.$implicit,n=t.oxw(3);t.Q6J("ngClass",t.VKq(3,ln,e===n.selectedSubPayment)),t.xp6(3),t.Q6J("ngIf",null==n.selectedConfig?null:n.selectedConfig.iconName),t.xp6(2),t.hij(" ",e,"")}}function wp(i,a){if(1&i&&(t.TgZ(0,"div",23),t._UZ(1,"hr",24),t.YNc(2,Ip,6,5,"div",25),t.qZA()),2&i){const e=t.oxw(2);t.Q6J("@itemsVert",void 0),t.xp6(2),t.Q6J("ngForOf",e.getSubPaymentLabel(e.selectedConfig))}}function kp(i,a){if(1&i&&(t.TgZ(0,"div",4),t.YNc(1,Op,9,10,"div",5),t.YNc(2,wp,3,2,"div",6),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.supportedConfigs),t.xp6(1),t.Q6J("ngIf",null==e.selectedConfig?null:e.selectedConfig.label)}}function Tp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",33),t._UZ(2,"app-img",16),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(4);t.xp6(2),t.Q6J("src",n.getPaymentIconWithPath(e))}}function Zp(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Tp,3,1,"ng-container",14),t.BQk()),2&i){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.iconName)}}function Ap(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,"pay.components."+(null==e?null:e.paymentDesc1))," ")}}function Sp(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"translate"),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,"pay.components."+(null==e?null:e.paymentDesc2))," ")}}function Dp(i,a){if(1&i&&(t.TgZ(0,"span",17),t.YNc(1,Ap,3,3,"ng-container",10),t.TgZ(2,"i",18),t._uU(3),t.qZA(),t.YNc(4,Sp,3,3,"ng-container",10),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null==e?null:e.paymentDesc1),t.xp6(1),t.Q6J("ngClass",t.VKq(6,rn,!n.checkCanPayByEwalletBalance())),t.xp6(1),t.lnq(" ",null==n.ewalletService?null:n.ewalletService.getMemberEwallectCurrency()," ",null==n.ewalletService?null:n.ewalletService.getMemberEwallectCurrencySign()," ",null==n.ewalletService?null:n.ewalletService.getDisplayEwalletNumber()," "),t.xp6(1),t.Q6J("ngIf",null==e?null:e.paymentDesc2)}}function qp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"span",22),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,"pay.components."+(null==e?null:e.btnName)),"")}}function Qp(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("throttleClick",function(o){t.CHM(e);const r=t.oxw().$implicit;return null!=r&&r.btnCallback&&(null==r||r.btnCallback()),t.KtG(o.stopPropagation())}),t.TgZ(1,"div",20),t._UZ(2,"app-icon",21),t.qZA(),t.YNc(3,qp,4,3,"ng-container",10),t.qZA()}if(2&i){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("ngIf",null==e?null:e.iconName)}}function Np(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div")(1,"div",31),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.paymentSelected(r))}),t.TgZ(2,"div",32),t.YNc(3,Zp,2,1,"ng-container",10),t.TgZ(4,"span",11),t._uU(5),t.ALo(6,"translate"),t.qZA(),t.YNc(7,Dp,5,8,"span",12),t.YNc(8,Qp,4,1,"button",13),t.qZA()()()}if(2&i){const e=a.$implicit,n=t.oxw(2);t.xp6(1),t.Q6J("ngClass",t.WLB(7,an,(null==n.selectedConfig?null:n.selectedConfig.id)==e.id&&(null==n.selectedConfig?null:n.selectedConfig.sub)===(null==e?null:e.sub),n.selectedConfig&&(null==n.selectedConfig?null:n.selectedConfig.id)!==(null==e?null:e.id))),t.xp6(2),t.Q6J("ngIf",null==e?null:e.iconName),t.xp6(2),t.hij(" ",t.lcZ(6,5,"payments."+e.name)," "),t.xp6(2),t.Q6J("ngIf",null==e?null:e.paymentDesc1),t.xp6(1),t.Q6J("ngIf",null==e?null:e.button)}}function Jp(i,a){if(1&i&&(t.ynx(0),t.TgZ(1,"div",38),t._UZ(2,"app-img",16),t.qZA(),t.BQk()),2&i){const e=a.$implicit,n=t.oxw(5);t.xp6(2),t.Q6J("src",n.getPaymentIconWithPath(e))}}function Up(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Jp,3,1,"ng-container",14),t.BQk()),2&i){const e=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",null==e.selectedConfig?null:e.selectedConfig.iconName)}}function Fp(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26),t.NdJ("click",function(){const r=t.CHM(e).$implicit,l=t.oxw(3);return t.KtG(l.subPaymentSelected(r))}),t.TgZ(1,"div",37)(2,"div",32),t.YNc(3,Up,2,1,"ng-container",10),t.TgZ(4,"span",11),t._uU(5),t.qZA()()()()}if(2&i){const e=a.$implicit,n=t.oxw(3);t.Q6J("ngClass",t.VKq(3,ln,e===n.selectedSubPayment)),t.xp6(3),t.Q6J("ngIf",null==n.selectedConfig?null:n.selectedConfig.iconName),t.xp6(2),t.Oqu(e)}}function Lp(i,a){if(1&i&&(t.TgZ(0,"div",34),t._UZ(1,"hr",35),t.TgZ(2,"div",36),t.YNc(3,Fp,6,5,"div",25),t.qZA()()),2&i){const e=t.oxw(2);t.Q6J("@itemsVert",void 0),t.xp6(3),t.Q6J("ngForOf",e.getSubPaymentLabel(e.selectedConfig))}}function Bp(i,a){if(1&i&&(t.TgZ(0,"div",4)(1,"div",29),t.YNc(2,Np,9,10,"div",14),t.qZA(),t.YNc(3,Lp,4,2,"div",30),t.qZA()),2&i){const e=t.oxw();
1t.xp6(2),t.Q6J("ngForOf",e.supportedConfigs),t.xp6(1),t.Q6J("ngIf",null==e.selectedConfig?null:e.selectedConfig.label)}}let Yp=(()=>{class i extends C.nh{constructor(e,n,o,r,l,c){super(e),this.injector=e,this.orderContext=n,this.paymentManager=o,this.orderManager=r,this.platformService=l,this.ewalletService=c}ngOnInit(){this.initPayments();const e=this.routingService.getAuxInput();this.overrideMode=null==e?void 0:e.overrideMode}initPayments(){return(0,Q.mG)(this,void 0,void 0,function*(){const e=this.orderContext.payments;this.supportedConfigs=yield this.paymentManager.getSupportedPayments(e,this.orderContext.mode,null),this.crmEwalletHandle()})}crmEwalletHandle(){var e,n,o;if(gp.Z.hasFeature(null===(e=this.context)||void 0===e?void 0:e.crm,"ecredit")&&this.isMember(null===(n=this.context)||void 0===n?void 0:n.member)){console.log("PaymentSelectorDialogComponent init ewallet paymentObj");const r=this.paymentManager.initEwalletPayment();null===(o=this.supportedConfigs)||void 0===o||o.unshift(r)}}isMember(e){return!(!e||e.guest)}getPaymentIconWithPath(e){return this.paymentManager.getPaymentIconWithPath(e)}paymentSelected(e){var n;this.selectedConfig=e,this.analyticsService.trackSelectedPaymentMethod(null==e?void 0:e.method,null==e?void 0:e.gateway,null===(n=this.orderManager)||void 0===n?void 0:n.order),e.label||(this.setPreselectPayment(this.selectedConfig,null),this.goToCheckoutPage())}subPaymentMethodSelected(e){this.selectedSubPayment=e,this.goToCheckoutPage()}getSubPaymentLabel(e){return null!=e&&e.label?e.label.split(",").map(n=>n.trim()):[]}subPaymentSelected(e){this.setPreselectPayment(this.selectedConfig,e),this.goToCheckoutPage()}goToCheckoutPage(){this.routingService.navigate(`/order/store/${this.orderContext.storeId}/checkout`,{queryParams:Object.assign({back:!0},this.overrideMode&&{overrideMode:this.overrideMode})})}setPreselectPayment(e,n){this.paymentManager.preSelectPayment={config:e,subPayment:n}}checkCanPayByEwalletBalance(){var e;return null===(e=this.orderContext)||void 0===e?void 0:e.checkCanPayByEwalletBalance()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(C.yQ),t.Y36(pp.A),t.Y36(C.Km),t.Y36(up.m),t.Y36(_p.A))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-payment-selector-dialog"]],features:[t.qOj],decls:6,vars:6,consts:[[1,"container"],[3,"title","back"],[1,"content-bg"],["class","content",4,"ngIf"],[1,"content"],["class","choice-row",4,"ngFor","ngForOf"],["class","sub-payment-grp",4,"ngIf"],[1,"choice-row"],[1,"method-select","flex","justify-center",3,"ngClass","click"],[1,"method-row"],[4,"ngIf"],[1,"payment-text"],["class","payment-desc",4,"ngIf"],["mat-icon-button","","class","payment-top-up-btn","appThrottleClick","",3,"throttleClick",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"payment-logo","test-11111"],["constrain","contain",3,"src"],[1,"payment-desc"],[1,"font-bold",3,"ngClass"],["mat-icon-button","","appThrottleClick","",1,"payment-top-up-btn",3,"throttleClick"],[1,"div-arrow-up"],["name","arrow_upward","source","mat",1,"flex"],[1,"text-topup"],[1,"sub-payment-grp"],[1,"hr-line-mb"],["class","sub-method-row",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"sub-method-row",3,"ngClass","click"],[1,"method-select","flex","justify-center"],[1,"payment-logo","test-222"],[1,"flex","flex-wrap","justify-center","method-grp"],["class","sub-methods test2436",4,"ngIf"],[1,"method-box","flex","justify-center",3,"ngClass","click"],[1,"icon-desc"],[1,"payment-logo","test-333"],[1,"sub-methods","test2436"],[1,"hr-line"],[1,"flex","flex-wrap","justify-center","sub-method-grp"],[1,"method-box","flex","justify-center"],[1,"payment-logo","test-444"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2),t.YNc(4,kp,3,2,"div",3),t.YNc(5,Bp,4,2,"div",3),t.qZA()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,4,"byod.dialogs.payment-selector-dialog.payment-method")),t.Q6J("back",!1),t.xp6(3),t.Q6J("ngIf",n.platformService.isMobile()),t.xp6(1),t.Q6J("ngIf",n.platformService.isDesktop()||n.platformService.isTablet()))},dependencies:[_.mk,_.sg,_.O5,q.g,S.o,k.v,J.j,I.lW,M.X$],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;height:auto;width:100%;overflow:hidden;margin:0 auto;border-radius:.5rem}.btn-submit[_ngcontent-%COMP%]{background:var(--P);width:100%;color:var(--PC);height:3rem}.container[_ngcontent-%COMP%]{height:auto;max-height:100%;display:flex;flex-direction:column;overflow:hidden;background:white}div.content-bg[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;flex:1 1 auto;overflow:hidden}.gray-bg-color[_ngcontent-%COMP%]{opacity:.5}div.content[_ngcontent-%COMP%]{overflow-y:auto;padding:1.5rem 1.5rem 3rem;display:flex;flex-direction:column;row-gap:1rem}div.footer[_ngcontent-%COMP%]{padding:1rem 1.5rem;flex:0 0 auto;box-shadow:0 -3px 8px #86868612;z-index:1}  .mat-spinner circle{stroke:var(--P)!important}@media not screen and (min-width: 600px){[_nghost-%COMP%]{height:100%;border-radius:0}.container[_ngcontent-%COMP%]{border-radius:.5rem;margin:2rem}div.content[_ngcontent-%COMP%]{padding:0 0rem 1rem!important;align-items:center;overflow-x:hidden}.choice-row[_ngcontent-%COMP%]{width:102%}.payment-selected[_ngcontent-%COMP%]{box-shadow:0 0 1px var(--P50),0 0 0 1px var(--P100) inset;background:var(--P50);padding:.7rem}}.method-select[_ngcontent-%COMP%]   .method-row[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.method-select[_ngcontent-%COMP%]   .method-row.method-selected[_ngcontent-%COMP%]   .select-radio[_ngcontent-%COMP%]{border:1px solid var(--P)}.method-select[_ngcontent-%COMP%]   .method-row.method-selected[_ngcontent-%COMP%]   .select-radio[_ngcontent-%COMP%]   .selected-radio[_ngcontent-%COMP%]{background:var(--P)}.method-select[_ngcontent-%COMP%]   .method-row[_ngcontent-%COMP%]:not(.method-selected):hover   .select-radio[_ngcontent-%COMP%]{border:1px solid #4e4e4e}.method-select[_ngcontent-%COMP%]   .method-row[_ngcontent-%COMP%]   .payment-text[_ngcontent-%COMP%]{font-weight:400;color:#333;font-size:.875rem}.method-select[_ngcontent-%COMP%]   .method-row[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:.5rem}.method-select[_ngcontent-%COMP%]   .sub-methods[_ngcontent-%COMP%]{margin-left:2rem;overflow:hidden}.method-select[_ngcontent-%COMP%]   .sub-method-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;padding:.3rem 0;cursor:pointer}.method-select[_ngcontent-%COMP%]   .sub-method-row.sub-method-selected[_ngcontent-%COMP%]   .select-radio[_ngcontent-%COMP%]{border:1px solid var(--P)}.method-select[_ngcontent-%COMP%]   .sub-method-row.sub-method-selected[_ngcontent-%COMP%]   .select-radio[_ngcontent-%COMP%]   .selected-radio[_ngcontent-%COMP%]{background:var(--P)}.method-select[_ngcontent-%COMP%]   .sub-method-row[_ngcontent-%COMP%]:not(.sub-method-selected):hover   .select-radio[_ngcontent-%COMP%]{border:1px solid #4e4e4e}.method-select[_ngcontent-%COMP%]   .sub-method-row[_ngcontent-%COMP%]   .payment-sub-type[_ngcontent-%COMP%]{font-weight:400;color:#333;font-size:.875rem}.method-select[_ngcontent-%COMP%]   .payment-logo[_ngcontent-%COMP%]{width:30px;height:30px;margin-right:.5rem;flex-shrink:0}.selected-payment[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:.5rem}.selected-payment[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.875rem;margin-left:.2rem}.method-grp[_ngcontent-%COMP%], .sub-method-grp[_ngcontent-%COMP%]{column-gap:2rem;row-gap:1.75rem}.method-box[_ngcontent-%COMP%]{min-width:150px;padding:.75rem 1.75rem;box-shadow:1px 1px 5px #0000001a;border-radius:.4rem}.method-box[_ngcontent-%COMP%]   .icon-desc[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.method-box[_ngcontent-%COMP%]   .payment-logo[_ngcontent-%COMP%]{width:2.8rem;height:2.8rem;margin:auto}.method-box[_ngcontent-%COMP%]   .payment-text[_ngcontent-%COMP%]{font-weight:400;color:#333;font-size:.875rem}.sub-payment-grp[_ngcontent-%COMP%]{row-gap:1rem;display:flex;align-items:center;flex-direction:column;width:100%}.payment-selected[_ngcontent-%COMP%]{box-shadow:1px 1px 10px var(--P50),0 0 0 2px var(--P100) inset}.sub-methods[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.hr-line[_ngcontent-%COMP%]{margin:1.5rem 0 2.25rem;width:90%;border-color:#eee}.hr-line-mb[_ngcontent-%COMP%]{margin:.75rem 0 .5rem;width:75%;border-color:#eee}.payment-desc[_ngcontent-%COMP%]{margin-left:.2rem;font-size:.8rem}.payment-desc[_ngcontent-%COMP%]   .waring-color[_ngcontent-%COMP%]{color:red}.payment-top-up-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:var(--P800);color:#fff;border-radius:2rem;margin-left:.5rem;font-size:10px;width:auto;padding:.35rem .5rem;height:unset!important}.payment-top-up-btn[_ngcontent-%COMP%]   .div-arrow-up[_ngcontent-%COMP%]{background:var(--PC);color:var(--P);border-radius:100rem}.payment-top-up-btn[_ngcontent-%COMP%]   .div-arrow-up[_ngcontent-%COMP%]   app-icon[_ngcontent-%COMP%]{margin-right:0}.payment-top-up-btn[_ngcontent-%COMP%]   .text-topup[_ngcontent-%COMP%]{margin-left:.15rem;line-height:1em}.payment-top-up-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;justify-items:center;align-items:center}.payment-top-up-btn[_ngcontent-%COMP%]  .mat-icon-button{height:unset!important}"],data:{animation:[(0,f.X$)("itemsVert",[(0,f.eR)(":enter",[(0,f.oB)({opacity:0,transform:"translateY(-5%)"}),(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:1,transform:"translateY(0%)"}))]),(0,f.eR)(":leave",[(0,f.jt)("0.5s ease-in-out",(0,f.oB)({opacity:0,transform:"translateY(-5%)"}))])])]}}),i})();var zp=u(61856),jp=u(25086),Gp=u(8300),Ep=u(58144);function $p(i,a){if(1&i&&(t.TgZ(0,"div",5),t._UZ(1,"app-icon",6),t._uU(2),t.ALo(3,"i18n"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(2),t.hij(" ",t.xi3(3,1,e.unlockStore,e.context.userLang),"\n")}}const Rp=function(i){return{satisfy:i}};function Vp(i,a){if(1&i&&(t.TgZ(0,"p",7),t._uU(1),t.qZA()),2&i){const e=t.oxw();t.Q6J("ngClass",t.VKq(2,Rp,e.getUnlockManagerAmount()>=e.min)),t.xp6(1),t.Oqu(e.displayTitle)}}function Hp(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.ALo(3,"i18n"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(1),t.Oqu(t.Dn7(2,1,e,n.context.userLang,n.isParent?"title":t.xi3(3,5,"name",n.context.userLang)))}}function Kp(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(1),t.Oqu(t.Dn7(2,1,e,n.context.userLang,"name"))}}const Wp=function(i){return{"background-color":i}};function Xp(i,a){if(1&i&&(t.TgZ(0,"div",25)(1,"span"),t._uU(2),t.qZA()()),2&i){const e=a.$implicit,n=t.oxw(4);t.Q6J("ngStyle",t.VKq(2,Wp,n.getTagBackGroundColor(e))),t.xp6(2),t.Oqu(e)}}function tu(i,a){if(1&i&&(t.TgZ(0,"div",23),t.YNc(1,Xp,3,4,"div",24),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("ngForOf",e.tags)}}function eu(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",26)(1,"button",27),t.NdJ("click",function(o){t.CHM(e);const r=t.oxw(2).$implicit;return t.oxw().removeUnlockItemclicked(r),t.KtG(o.stopPropagation())}),t.TgZ(2,"span",28),t._uU(3,"remove"),t.qZA()(),t.TgZ(4,"h4",29),t._uU(5),t.qZA(),t.TgZ(6,"button",30)(7,"span",28),t._uU(8,"add"),t.qZA()()()}if(2&i){const e=t.oxw(2).$implicit,n=t.oxw();t.xp6(5),t.Oqu(n.getQuantity(e))}}function nu(i,a){if(1&i&&(t.TgZ(0,"div",31),t._UZ(1,"app-img",32)(2,"div",33),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("content",e)}}const iu=function(i,a){return{selected:i,soldOut:a}};function ou(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",10),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit,r=t.oxw();return t.KtG(r.itemclicked(o))}),t.TgZ(1,"div",11)(2,"div",12)(3,"h3"),t._uU(4),t.ALo(5,"translate"),t.qZA()()(),t.TgZ(6,"div",13)(7,"div",14),t.YNc(8,Hp,4,8,"h3",15),t.YNc(9,Kp,3,5,"h3",15),t.qZA(),t.YNc(10,tu,2,1,"div",16),t.TgZ(11,"div",17)(12,"span"),t._uU(13),t.ALo(14,"i18n"),t.qZA()(),t.TgZ(15,"div",18)(16,"div",19)(17,"p",20),t._uU(18),t.ALo(19,"priceDisplay"),t.qZA()(),t.YNc(20,eu,9,1,"div",21),t.qZA()(),t.YNc(21,nu,3,1,"div",22),t.qZA()}if(2&i){const e=t.oxw().$implicit,n=t.oxw();t.Q6J("ngClass",t.WLB(19,iu,!!n.getQuantity(e),n.isSoldout(e))),t.xp6(4),t.Oqu(t.lcZ(5,9,"byod.components.mg-item-list.soldout")),t.xp6(4),t.Q6J("ngIf",e.title),t.xp6(1),t.Q6J("ngIf",!e.title),t.xp6(1),t.Q6J("ngIf",e.tags&&e.tags.length>0),t.xp6(3),t.Oqu(t.Dn7(14,11,e,n.context.userLang,"desc")),t.xp6(5),t.hij(" ",t.Dn7(19,15,e.price,!0,n.context)," "),t.xp6(2),t.Q6J("ngIf",!!n.getQuantity(e)),t.xp6(1),t.Q6J("ngIf",null==e.images?null:e.images.default)}}function ru(i,a){if(1&i&&(t.TgZ(0,"div",8),t.YNc(1,ou,22,22,"div",9),t.qZA()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e)}}let au=(()=>{class i extends G.T{constructor(e){super(e),this.injector=e,this.selected=!1}ngOnChanges(e){this.unlock&&this.initData()}ngOnInit(){}initData(){var e,n;this.unlockCat=this.unlock.category,this.max=this.unlock.max,this.min=this.unlock.min,this.unlockDiscount=this.unlock.unlockDiscount,this.unlockStore=this.unlock.store,this.om=null===(n=null===(e=this.cartService)||void 0===e?void 0:e.unlockCatOrderManager)||void 0===n?void 0:n.getManagers().find(o=>{var r;return o.store.id==(null===(r=this.unlockStore)||void 0===r?void 0:r.id)}),this.max&&(this.min?(this.min>this.max&&(this.min=this.max),this.displayTitle=this.t.instant("byod.dialogs.unlock-dialog.chooseTo",{max:this.max,min:this.min})):this.displayTitle=this.t.instant("byod.dialogs.unlock-dialog.chooseAtMost",{max:this.max})),console.log("unlockDiscount init = ",this.unlockDiscount,this.min,this.max)}itemclicked(e){var n,o;if(this.cartService.unlockCatOrderManager.switchManager(this.unlockStore.id),this.cartService.unlockItemsMaxAmount=this.max,this.cartService.unlockCatCurrent=this.unlockCat,console.log("unlock item clicked",this.cartService.unlockCatOrderManager),!this.canAddUnlockItem(this.max))return void this.showUnlockItemMaxAlert(this.max);let r={category:this.unlockCat,itemgroup:null===(o=null===(n=this.unlockCat)||void 0===n?void 0:n.groups)||void 0===o?void 0:o[0],item:e};super.itemSelected(r)}getTagBackGroundColor(e){var n,o;let r=null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.menu)||void 0===o?void 0:o.badges;if(r&&r.length>0){for(let l of r)if(l.tag==e)return l.bgColor||"#000";return"#000"}return"#000"}getQuantity(e){var n;return null===(n=this.om)||void 0===n?void 0:n.getQuantity(e)}isSoldout(e){var n;return null===(n=this.cartService)||void 0===n?void 0:n.isSoldout(e)}removeUnlockItemclicked(e){var n;this.cartService.unlockCatOrderManager.switchManager(this.unlockStore.id),console.log("removeUnlockItemclicked",this.cartService.unlockCatOrderManager);let o=this.getQuantity(e);if(this.isComboItem(e,this.unlockCat)){const r=this.t.instant("byod.dialogs.unlock-dialog.removemessage");this.dialogService.showAlert("",r,l=>{var c;if("confirm"===l)for(let s=0;s<o;s++)null===(c=this.cartService.unlockCatOrderManager)||void 0===c||c.minusUnlockItem(e)},!0)}else null===(n=this.cartService.unlockCatOrderManager)||void 0===n||n.minusUnlockItem(e)}isComboItem(e,n){return N.ck.isSet(n,e)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-unlock-category-item-list"]],inputs:{unlock:"unlock"},features:[t.qOj,t.TTD],decls:6,vars:5,consts:[["class","mb-2 font-bold",4,"ngIf"],[1,"select-num","
1inline-flex"],[3,"ngClass",4,"ngIf"],[1,"unlock-list"],["class","div-one-item my-5",4,"ngFor","ngForOf"],[1,"mb-2","font-bold"],["name","store","size","16",1,"mr-2","font-bold"],[3,"ngClass"],[1,"div-one-item","my-5"],["class","item-container relative","data-testid","item-card",3,"ngClass","click",4,"ngIf"],["data-testid","item-card",1,"item-container","relative",3,"ngClass","click"],[1,"div-soldout","absolute"],[1,"soldout-border"],[1,"item-info","flex"],["data-testid","unlock-item-name",1,"item-name"],[4,"ngIf"],["class","item-tags-container",4,"ngIf"],[1,"item-desc"],[1,"price-qty"],[1,"price-box"],["data-testid","item-price"],["class","qty-col flex items-center ",4,"ngIf"],["class","item-img-col spacing",4,"ngIf"],[1,"item-tags-container"],["class","item-tag",3,"ngStyle",4,"ngFor","ngForOf"],[1,"item-tag",3,"ngStyle"],[1,"qty-col","flex","items-center"],["mat-button","","data-testid","cart-remove-button",1,"qty-button","remove",3,"click"],[1,"material-icons"],[1,"qty-text"],["mat-button","","data-testid","cart-add-button",1,"qty-button","add"],[1,"item-img-col","spacing"],[1,"img",3,"content"],[1,"add-qty-box"]],template:function(e,n){1&e&&(t.YNc(0,$p,4,4,"div",0),t.TgZ(1,"div",1),t.YNc(2,Vp,2,4,"p",2),t.qZA(),t.TgZ(3,"div",3),t.YNc(4,ru,2,1,"div",4),t.ALo(5,"removeItemVariations"),t.qZA()),2&e&&(t.Q6J("ngIf",n.orderManager.multi),t.xp6(2),t.Q6J("ngIf",n.max),t.xp6(2),t.Q6J("ngForOf",t.lcZ(5,3,null==n.unlockCat||null==n.unlockCat.groups||null==n.unlockCat.groups[0]?null:n.unlockCat.groups[0].items)))},dependencies:[_.mk,_.sg,_.O5,_.PC,q.g,S.o,I.lW,M.X$,D.G,Ep.K,F.A],styles:["[_nghost-%COMP%]{display:block;background:white;height:100%}.item-container[_ngcontent-%COMP%]{display:flex;width:100%;border-radius:5px;background:white}.item-container.selected[_ngcontent-%COMP%]{border-left:5px solid var(--P)}.div-soldout[_ngcontent-%COMP%]{display:none;z-index:1}.soldOut[_ngcontent-%COMP%]   .item-info[_ngcontent-%COMP%]{opacity:.5}.soldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{filter:grayscale(80%);filter:opacity(.5)}.soldOut[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{opacity:0}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:block;inset:0;display:flex;justify-content:center;align-items:center}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   div.soldout-border[_ngcontent-%COMP%]{border:1px solid #ff6060;border-radius:.2rem .2rem .2rem .8rem;background:none;overflow:hidden;margin-bottom:1.25rem}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#ff6060;font-weight:700;padding:.5rem;font-size:.9rem;text-transform:uppercase;background:rgba(255,255,255,.3882352941)}.div-scroll-list[_ngcontent-%COMP%]{padding:1rem;overflow-y:auto;background:white}.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}.select-num[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-num[_ngcontent-%COMP%]   p.satisfy[_ngcontent-%COMP%]{background:#1bbb8f}.item-info[_ngcontent-%COMP%]{width:100%;padding:.7rem .5rem .25rem 1rem;flex-direction:column;overflow:hidden}.item-name[_ngcontent-%COMP%]{margin-bottom:.1rem;flex-grow:1}.item-name[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.1em;max-height:2.2em;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.item-desc[_ngcontent-%COMP%]{font-size:.7rem;line-height:1.1em;color:#8d8d8d;max-height:2.2em;overflow:hidden}.price-qty[_ngcontent-%COMP%]{flex:0 1 auto;display:flex;align-items:center;justify-content:space-between}.price-box[_ngcontent-%COMP%]{flex-shrink:0;height:36px;display:flex;align-items:center}.price-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--P);font-weight:700;font-size:1rem}.qty-col[_ngcontent-%COMP%]   .remove[_ngcontent-%COMP%]{color:#c4c4c4}.item-img-col[_ngcontent-%COMP%]{flex:0 0 150px;margin:0 .8rem 0 .75rem;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:150px;border-radius:0 3px 0 2.3rem;overflow:hidden;box-shadow:.15rem .15rem .3rem #00000026;background:#f5f5f5;position:absolute;top:-9px}.add-qty-box[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;margin:.3rem 0;align-items:center}
1.add-qty-box[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;justify-content:center;font-size:1.2rem}.add-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:1rem;color:var(--P)}.add-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.remove-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:0;color:#c4c4c4}.remove-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.remove-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.item-tags-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.item-tag[_ngcontent-%COMP%]{display:flex;padding:.2rem .6rem;color:#fff;margin:.1rem}.item-tag[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400}@media not screen and (min-width: 768px){.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{min-height:110px}.item-img-col[_ngcontent-%COMP%]{justify-content:flex-start;margin-left:0;flex:0 0 110px}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:110px}.add-qty-box[_ngcontent-%COMP%]{position:absolute;bottom:.4em;left:-7em}.add-btn[_ngcontent-%COMP%]{min-width:20px;height:20px}.add-btn[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:1.4rem!important}}.div-footer-button[_ngcontent-%COMP%]{padding:1rem}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;height:42px;justify-content:center;flex:1 0 50%;font-size:1rem;background:var(--P);color:#fff}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{background:#dcdcdc}"]}),i})();function lu(i,a){if(1&i&&(t.ynx(0),t._UZ(1,"app-img",15),t.BQk()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("content",e.category)}}const cu=function(i,a){return{"selected-cat":i,"unselected-cat":a}};function su(i,a){if(1&i&&(t.TgZ(0,"div",13),t.YNc(1,lu,2,1,"ng-container",2),t.TgZ(2,"span",14),t._uU(3),t.ALo(4,"i18n"),t.qZA()()),2&i){const e=t.oxw(),n=e.index,o=e.$implicit,r=t.oxw(2);t.Q6J("ngClass",t.WLB(6,cu,n==r.selectedIndex,n!=r.selectedIndex)),t.xp6(1),t.Q6J("ngIf",null==o.category.images?null:o.category.images.default),t.xp6(2),t.Oqu(t.xi3(4,3,o.category,r.context.userLang))}}function du(i,a){1&i&&(t.TgZ(0,"mat-tab",11),t.YNc(1,su,5,9,"ng-template",12),t.qZA())}function mu(i,a){if(1&i){const e=t.EpF();t.ynx(0),t.TgZ(1,"mat-tab-group",8,9),t.NdJ("focusChange",function(o){t.CHM(e);const r=t.oxw();return t.KtG(r.onTabChanged(o))}),t.YNc(3,du,2,0,"mat-tab",10),t.qZA(),t.BQk()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("disableRipple",!0),t.xp6(2),t.Q6J("ngForOf",e.unlocks)}}function gu(i,a){if(1&i&&(t.TgZ(0,"div",16),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Oqu(t.xi3(2,1,null==e.unlocks[0]?null:e.unlocks[0].category,e.context.userLang))}}function pu(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"priceDisplay"),t.BQk()),2&i){const e=t.oxw();t.xp6(1),t.hij(" ",t.Dn7(2,1,e.getTotal(),!0,e.context)," ")}}let uu=(()=>{class i extends G.T{constructor(e){super(e),this.injector=e,this.selectedIndex=0,this.unlocks=[],this.initialUnlockCartEmptyState=!0,this.isCheckoutPageSelectUnlock=!0,this.isMultiOffer=!1}ngOnInit(){this.input=this.navParams.input,console.log("UnlockItemDialogComponent input",this.input),this.initData()}initData(){var e,n,o;this.unlocks=null===(e=this.input)||void 0===e?void 0:e.unlocks,this.selectedUnlock=this.unlocks[0],this.initialUnlockCartEmptyState=null===(n=this.cartService.unlockCatOrderManager)||void 0===n?void 0:n.isEmpty(),this.isMultiOffer=this.settingManager.get("isMultiOffer",!1),this.isCheckoutPageSelectUnlock=null===(o=this.input)||void 0===o?void 0:o.isCheckoutPageSelectUnlock}dismissDialog(){const e=this.t.instant("byod.dialogs.unlock-dialog.dismiss-unlock-alert");this.dialogService.showAlert("",e,n=>{var o;if("confirm"===n){const r=null===(o=this.cartService.unlockCatOrderManager)||void 0===o?void 0:o.isEmpty();let l=!1;(this.isMultiOffer&&r&&r==this.initialUnlockCartEmptyState||!this.isMultiOffer)&&(l=!0),this.dialogService.submitAuxDialog({unlockItemChanged:!1,handlePromoCodesOrOffer:l})}},!0)}checkIfHideCloseBtn(){return!this.unlocks.some(e=>e.min>=1)||this.isCheckoutPageSelectUnlock}addToCartClicked(){var e,n,o;const{unlockCatOrderManager:r}=this.cartService;if(console.log("addToCartClicked",r),this.orderManager.multi)this.unlocks.forEach(l=>{const c=this.orderManager.findOm(l.store.id),s=this.cartService.getKeyOfDiscountWithOffer(l.unlockDiscount.id,l.offerId);null==c||c.removeUnlockByDiscountId(s)}),null===(e=null==r?void 0:r.getOrder().subs)||void 0===e||e.forEach(l=>{const c=l.orderitems||[];this.orderManager.switchManager(l.storeId),c.forEach(s=>{var d,m;const p=V.Z(s),h=this.unlocks.find(v=>v.category.id==p.categoryId);p.unlockDiscountConditionType=null===(d=this.cartService)||void 0===d?void 0:d.getUnlockTypeByDiscount(h.unlockDiscount);let x=null===(m=h.unlockDiscount)||void 0===m?void 0:m.id;null!=h.offerId&&(p.offerId=h.offerId,x=this.cartService.getKeyOfDiscountWithOffer(x,p.offerId)),this.orderManager.addOrderItem(p,!1,x)})}),this.dialogService.submitAuxDialog({unlockItemChanged:!0});else{const l=(null===(n=null==r?void 0:r.getOrder())||void 0===n?void 0:n.orderitems)||[];this.unlocks.forEach(c=>{var s;const d=this.cartService.getKeyOfDiscountWithOffer(c.unlockDiscount.id,c.offerId);null===(s=this.orderManager)||void 0===s||s.removeUnlockByDiscountId(d)}),l.length>0?(l.forEach(c=>{var s,d;const m=V.Z(c),p=this.unlocks.find(x=>x.category.id==m.categoryId);m.unlockDiscountConditionType=null===(s=this.cartService)||void 0===s?void 0:s.getUnlockTypeByDiscount(p.unlockDiscount);let h=null===(d=p.unlockDiscount)||void 0===d?void 0:d.id;null!=p.offerId&&(m.offerId=p.offerId,h=this.cartService.getKeyOfDiscountWithOffer(h,m.offerId)),this.orderManager.addOrderItem(m,!1,h)}),console.log("this.orderManager.order= ",null===(o=this.orderManager.order)||void 0===o?void 0:o.orderitems),this.dialogService.submitAuxDialog({unlockItemChanged:!0})):this.dialogService.submitAuxDialog({unlockItemChanged:!0})}}getTotal(){var e,n;return null===(n=null===(e=this.cartService)||void 0===e?void 0:e.unlockCatOrderManager)||void 0===n?void 0:n.order.total}ableConfirmBtn(){let e=!0;return this.unlocks.forEach(n=>{var o;if(n.min>0){const r=V.Z(null===(o=this.cartService.unlockCatOrderManager)||void 0===o?void 0:o.getOrder());r&&(r.orderitems=r.orderitems.filter(l=>l.category.id==n.category.id),N.KM.getCount(r)<n.min&&(e=!1))}}),e}onTabChanged(e){this.selectedIndex=e.index,this.selectedUnlock=this.unlocks[e.index]}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-unlock-category-dialog"]],features:[t.qOj],decls:12,vars:14,consts:[[1,"h-full","flex","flex-col"],["data-testid","unlock-cat-name",3,"title","back","close","closeBackBehaviour","backed"],[4,"ngIf"],[1,"div-scroll-list","h-full"],["class","mb-2",4,"ngIf"],[3,"unlock"],[1,"div-footer-button"],["mat-button","","appThrottleClick","","data-testid","add-unlock-to-cart-button",1,"footer-right","inline-ft-btn","key-button","item-grid-checkout-btn",3,"disabled","throttleClick"],["mat-stretch-tabs","","animationDuration","0ms",1,"tab-group",3,"disableRipple","focusChange"],["tabGroup",""],["class","tab-bar",4,"ngFor","ngForOf"],[1,"tab-bar"],["mat-tab-label",""],[1,"inline-flex","items-center","rounded-full","h-8","btn-tab",3,"ngClass"],[1,"px-1","text-sm","tab-button"],[1,"max-w-none","w-8","h-8","object-cover","rounded-full",3,"content"],[1,"mb-2"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("backed",function(){return n.dismissDialog()}),t.ALo(2,"translate"),t.qZA(),t.YNc(3,mu,4,2,"ng-container",2),t.TgZ(4,"div",3),t.YNc(5,gu,3,4,"div",4),t._UZ(6,"app-unlock-category-item-list",5),t.qZA(),t.TgZ(7,"div",6)(8,"button",7),t.NdJ("throttleClick",function(){return n.addToCartClicked()}),t._uU(9),t.ALo(10,"translate"),t.YNc(11,pu,3,5,"ng-container",2),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,10,"byod.dialogs.unlock-dialog.title"))("back",!1)("close",n.checkIfHideCloseBtn())("closeBackBehaviour",!0),t.xp6(2),t.Q6J("ngIf",(null==n.unlocks?null:n.unlocks.length)>1),t.xp6(2),t.Q6J("ngIf",1==(null==n.unlocks?null:n.unlocks.length)),t.xp6(1),t.Q6J("unlock",
1n.selectedUnlock),t.xp6(2),t.Q6J("disabled",!n.ableConfirmBtn()),t.xp6(1),t.hij(" ",t.lcZ(10,12,"byod.dialogs.unlock-dialog.confirm")," "),t.xp6(2),t.Q6J("ngIf",n.getTotal()))},dependencies:[_.mk,_.sg,_.O5,q.g,k.v,J.j,X.SP,X.uD,X.uX,I.lW,au,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block;background:white;height:100%}.item-container[_ngcontent-%COMP%]{display:flex;width:100%;border-radius:5px;background:white}.item-container.selected[_ngcontent-%COMP%]{border-left:5px solid var(--P)}.div-soldout[_ngcontent-%COMP%]{display:none;z-index:1}.soldOut[_ngcontent-%COMP%]   .item-info[_ngcontent-%COMP%]{opacity:.5}.soldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{filter:grayscale(80%);filter:opacity(.5)}.soldOut[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{opacity:0}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:block;inset:0;display:flex;justify-content:center;align-items:center}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   div.soldout-border[_ngcontent-%COMP%]{border:1px solid #ff6060;border-radius:.2rem .2rem .2rem .8rem;background:none;overflow:hidden;margin-bottom:1.25rem}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#ff6060;font-weight:700;padding:.5rem;font-size:.9rem;text-transform:uppercase;background:rgba(255,255,255,.3882352941)}.div-scroll-list[_ngcontent-%COMP%]{padding:1rem;overflow-y:auto;background:white}.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}.select-num[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-num[_ngcontent-%COMP%]   p.satisfy[_ngcontent-%COMP%]{background:#1bbb8f}.item-info[_ngcontent-%COMP%]{width:100%;padding:.7rem .5rem .25rem 1rem;flex-direction:column;overflow:hidden}.item-name[_ngcontent-%COMP%]{margin-bottom:.1rem;flex-grow:1}.item-name[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.1em;max-height:2.2em;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.item-desc[_ngcontent-%COMP%]{font-size:.7rem;line-height:1.1em;color:#8d8d8d;max-height:2.2em;overflow:hidden}.price-qty[_ngcontent-%COMP%]{flex:0 1 auto;display:flex;align-items:center;justify-content:space-between}.price-box[_ngcontent-%COMP%]{flex-shrink:0;height:36px;display:flex;align-items:center}.price-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--P);font-weight:700;font-size:1rem}.qty-col[_ngcontent-%COMP%]   .remove[_ngcontent-%COMP%]{color:#c4c4c4}.item-img-col[_ngcontent-%COMP%]{flex:0 0 150px;margin:0 .8rem 0 .75rem;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:150px;border-radius:0 3px 0 2.3rem;overflow:hidden;box-shadow:.15rem .15rem .3rem #00000026;background:#f5f5f5;position:absolute;top:-9px}.add-qty-box[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;margin:.3rem 0;align-items:center}.add-qty-box[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;justify-content:center;font-size:1.2rem}.add-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:1rem;color:var(--P)}.add-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.remove-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:0;color:#c4c4c4}.remove-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.remove-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.item-tags-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.item-tag[_ngcontent-%COMP%]{display:flex;padding:.2rem .6rem;color:#fff;margin:.1rem}.item-tag[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400}@media not screen and (min-width: 768px){.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{min-height:110px}.item-img-col[_ngcontent-%COMP%]{justify-content:flex-start;margin-left:0;flex:0 0 110px}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:110px}.add-qty-box[_ngcontent-%COMP%]{position:absolute;bottom:.4em;left:-7em}.add-btn[_ngcontent-%COMP%]{min-width:20px;height:20px}.add-btn[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:1.4rem!important}}.div-footer-button[_ngcontent-%COMP%]{padding:1rem}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;height:42px;justify-content:center;flex:1 0 50%;font-size:1rem;background:var(--P);color:#fff}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{background:#dcdcdc}  .mat-tab-header{overflow-x:scroll!important;padding-left:1rem}  .mat-tab-header::-webkit-scrollbar{display:none}  .mat-tab-label{overflow:visible!important;flex-basis:auto!important;padding:0 4px!important;min-width:0!important}  .mat-tab-label-container{overflow:visible!important}  .mat-tab-label-active{opacity:1!important}  .mat-ink-bar{display:none}.selected-cat[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}.selected-cat[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-right:.25rem}.mat-tab-group[_ngcontent-%COMP%]{box-shadow:none}@media not screen and (min-width: 1130px){  .mat-tab-header-pagination{dis
1play:none!important}}"]}),i})();var _u=u(74249);function fu(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.ALo(3,"i18n"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(t.Dn7(2,1,e.item,e.context.userLang,e.isParent?"title":t.xi3(3,5,"name",e.context.userLang)))}}function hu(i,a){if(1&i&&(t.TgZ(0,"h3"),t._uU(1),t.ALo(2,"i18n"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(t.Dn7(2,1,e.item,e.context.userLang,"name"))}}const xu=function(i){return{"background-color":i}};function vu(i,a){if(1&i&&(t.TgZ(0,"div",15)(1,"span"),t._uU(2),t.qZA()()),2&i){const e=a.$implicit,n=t.oxw(3);t.Q6J("ngStyle",t.VKq(2,xu,n.getTagBackGroundColor(e))),t.xp6(2),t.Oqu(e)}}function Cu(i,a){if(1&i&&(t.TgZ(0,"div",13),t.YNc(1,vu,3,4,"div",14),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.item.tags)}}function bu(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.BQk()),2&i){const e=t.oxw(2);t.xp6(1),t.hij(" x ",e.getQuantity(e.item)," ")}}function Mu(i,a){if(1&i&&(t.TgZ(0,"div",16),t._UZ(1,"app-img",17)(2,"div",18),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("content",e.item)}}const Ou=function(i,a){return{selected:i,soldOut:a}};function yu(i,a){if(1&i){const e=t.EpF();t.TgZ(0,"div",2),t.NdJ("click",function(){t.CHM(e);const o=t.oxw();return t.KtG(o.itemCanClicked&&o.itemclicked(o.item))}),t.TgZ(1,"div",3)(2,"div",4)(3,"h3"),t._uU(4),t.ALo(5,"translate"),t.qZA()()(),t.TgZ(6,"div",5)(7,"div",6),t.YNc(8,fu,4,8,"h3",7),t.YNc(9,hu,3,5,"h3",7),t.qZA(),t.YNc(10,Cu,2,1,"div",8),t.TgZ(11,"div",9)(12,"span"),t._uU(13),t.ALo(14,"i18n"),t.qZA()(),t.TgZ(15,"div",10)(16,"div",11)(17,"p"),t._uU(18),t.ALo(19,"priceDisplay"),t.qZA()(),t.YNc(20,bu,2,1,"ng-container",7),t.qZA()(),t.YNc(21,Mu,3,1,"div",12),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("ngClass",t.WLB(19,Ou,e.unlock.fulfilled,e.isSoldout(e.item))),t.xp6(4),t.Oqu(t.lcZ(5,9,"byod.components.mg-item-list.soldout")),t.xp6(4),t.Q6J("ngIf",e.item.title),t.xp6(1),t.Q6J("ngIf",!e.item.title),t.xp6(1),t.Q6J("ngIf",e.item.tags&&e.item.tags.length>0),t.xp6(3),t.Oqu(t.Dn7(14,11,e.item,e.context.userLang,"desc")),t.xp6(5),t.hij(" ",t.Dn7(19,15,e.item.price,!0,e.context)," "),t.xp6(2),t.Q6J("ngIf",!e.itemCanClicked),t.xp6(1),t.Q6J("ngIf",null==e.item.images?null:e.item.images.default)}}let Pu=(()=>{class i extends G.T{constructor(e){super(e),this.injector=e,this.selected=!1,this.itemCanClicked=!0,this.isComboItem=!1}ngOnChanges(e){this.unlock&&this.initData()}ngOnInit(){console.log("unlockItemCard == ",this.unlock)}initData(){var e,n;this.unlockCat=this.unlock.category,this.max=this.unlock.max,this.min=this.unlock.min,this.unlockDiscount=this.unlock.unlockDiscount,this.unlockStore=this.unlock.store,this.item=this.unlock.item,this.itemGroup=this.unlock.itemGroup,this.isComboItem=N.ck.isSet(this.unlockCat,this.item),this.om=null===(n=null===(e=this.cartService)||void 0===e?void 0:e.unlockCatOrderManager)||void 0===n?void 0:n.getManagers().find(o=>{var r;return o.store.id==(null===(r=this.unlockStore)||void 0===r?void 0:r.id)}),console.log("unlockDiscount init = ",this.unlockDiscount,this.min,this.max),setTimeout(()=>{this.unlock.canAddDirectly&&(this.cartService.addUnlockItemDirectlyToUnlockOrderManager(this.unlock),this.cartService.unlockItemsMaxAmount=this.max,this.cartService.unlockCatCurrent=this.unlockCat,this.itemCanClicked=!1,this.unlock.fulfilled=!0)})}itemclicked(e){var n;if(this.unlock.fulfilled)console.log("edit unlock item = ",this.refOi),this.cartService.unlockCatOrderManager.switchManager(this.unlockStore.id),this.cartService.unlockItemEditHandle(this.refOi,this.getItemSelectionOpt());else{this.cartService.unlockCatOrderManager.switchManager(this.unlockStore.id),this.cartService.unlockItemsMaxAmount=this.max,this.cartService.unlockCatCurrent=this.unlockCat;
1const o={category:this.unlockCat,itemgroup:null===(n=this.unlock)||void 0===n?void 0:n.itemGroup,item:e,opt:this.getItemSelectionOpt()};super.itemSelected(o)}}getTagBackGroundColor(e){var n,o;let r=null===(o=null===(n=this.orderContext)||void 0===n?void 0:n.menu)||void 0===o?void 0:o.badges;if(r&&r.length>0){for(let l of r)if(l.tag==e)return l.bgColor||"#000";return"#000"}return"#000"}getQuantity(e){var n;return null===(n=this.om)||void 0===n?void 0:n.getQuantity(e)}isSoldout(e){var n;return null===(n=this.cartService)||void 0===n?void 0:n.isSoldout(e)}getItemSelectionOpt(){return{mandatory:!0,canModifyQty:!1,maxQty:this.max,unlockItemMode:!0,callbackAfterAddToCart:(n,o,r)=>{console.log("result after addToCart = ",n,o,r),this.refOi=o,this.isComboItem&&(this.refOi.combo=this.isComboItem),this.unlock.fulfilled=!0}}}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-unlock-item-card"]],inputs:{unlock:"unlock"},features:[t.qOj,t.TTD],decls:2,vars:1,consts:[[1,"div-one-item","my-5"],["class","item-container relative",3,"ngClass","click",4,"ngIf"],[1,"item-container","relative",3,"ngClass","click"],[1,"div-soldout","absolute"],[1,"soldout-border"],[1,"item-info","flex"],[1,"item-name"],[4,"ngIf"],["class","item-tags-container",4,"ngIf"],[1,"item-desc"],[1,"price-qty"],[1,"price-box"],["class","item-img-col spacing",4,"ngIf"],[1,"item-tags-container"],["class","item-tag",3,"ngStyle",4,"ngFor","ngForOf"],[1,"item-tag",3,"ngStyle"],[1,"item-img-col","spacing"],[1,"img",3,"content"],[1,"add-qty-box"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t.YNc(1,yu,22,22,"div",1),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",n.item))},dependencies:[_.mk,_.sg,_.O5,_.PC,q.g,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block;background:white;height:100%}.item-container[_ngcontent-%COMP%]{display:flex;width:100%;border-radius:5px;background:white}.item-container.selected[_ngcontent-%COMP%]{border-left:5px solid var(--P)}.div-soldout[_ngcontent-%COMP%]{display:none;z-index:1}.soldOut[_ngcontent-%COMP%]   .item-info[_ngcontent-%COMP%]{opacity:.5}.soldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{filter:grayscale(80%);filter:opacity(.5)}.soldOut[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{opacity:0}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:block;inset:0;display:flex;justify-content:center;align-items:center}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   div.soldout-border[_ngcontent-%COMP%]{border:1px solid #ff6060;border-radius:.2rem .2rem .2rem .8rem;background:none;overflow:hidden;margin-bottom:1.25rem}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#ff6060;font-weight:700;padding:.5rem;font-size:.9rem;text-transform:uppercase;background:rgba(255,255,255,.3882352941)}.div-scroll-list[_ngcontent-%COMP%]{padding:1rem;overflow-y:auto;background:white}.div-one-item[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}.select-num[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-num[_ngcontent-%COMP%]   p.satisfy[_ngcontent-%COMP%]{background:#1bbb8f}.item-info[_ngcontent-%COMP%]{width:100%;padding:.7rem .5rem .25rem 1rem;flex-direction:column;overflow:hidden}.item-name[_ngcontent-%COMP%]{margin-bottom:.1rem;flex-grow:1}.item-name[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.1em;max-height:2.2em;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.item-desc[_ngcontent-%COMP%]{font-size:.7rem;line-height:1.1em;color:#8d8d8d;max-height:2.2em;overflow:hidden}.price-qty[_ngcontent-%COMP%]{flex:0 1 auto;display:flex;align-items:center;justify-content:space-between}.price-box[_ngcontent-%COMP%]{flex-shrink:0;height:36px;display:flex;align-items:center}.price-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--P);font-weight:700;font-size:1rem}.qty-col[_ngcontent-%COMP%]   .remove[_ngcontent-%COMP%]{color:#c4c4c4}.item-img-col[_ngcontent-%COMP%]{flex:0 0 150px;margin:0 .8rem 0 .75rem;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:150px;border-radius:0 3px 0 2.3rem;overflow:hidden;box-shadow:.15rem .15rem .3rem #00000026;background:#f5f5f5;position:absolute;top:-9px}.add-qty-box[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;margin:.3rem 0;align-items:center}
1.add-qty-box[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;justify-content:center;font-size:1.2rem}.add-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:1rem;color:var(--P)}.add-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.remove-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:0;color:#c4c4c4}.remove-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.remove-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.item-tags-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.item-tag[_ngcontent-%COMP%]{display:flex;padding:.2rem .6rem;color:#fff;margin:.1rem}.item-tag[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400}@media not screen and (min-width: 768px){.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{min-height:110px}.item-img-col[_ngcontent-%COMP%]{justify-content:flex-start;margin-left:0;flex:0 0 110px}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:110px}.add-qty-box[_ngcontent-%COMP%]{position:absolute;bottom:.4em;left:-7em}.add-btn[_ngcontent-%COMP%]{min-width:20px;height:20px}.add-btn[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:1.4rem!important}}.div-footer-button[_ngcontent-%COMP%]{padding:1rem}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;height:42px;justify-content:center;flex:1 0 50%;font-size:1rem;background:var(--P);color:#fff}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{background:#dcdcdc}"]}),i})();function Iu(i,a){if(1&i&&(t.TgZ(0,"div",9),t._UZ(1,"app-icon",10),t._uU(2),t.ALo(3,"i18n"),t.qZA()),2&i){const e=t.oxw().$implicit,n=t.oxw();t.xp6(2),t.hij(" ",t.xi3(3,1,e.store,n.context.userLang)," ")}}function wu(i,a){if(1&i&&(t.TgZ(0,"div",11),t._UZ(1,"app-unlock-item-card",12),t.qZA()),2&i){const e=a.$implicit;t.xp6(1),t.Q6J("unlock",e)}}function ku(i,a){if(1&i&&(t.ynx(0),t.YNc(1,Iu,4,4,"div",7),t.YNc(2,wu,2,1,"div",8),t.BQk()),2&i){const e=a.$implicit,n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.orderManager.multi),t.xp6(1),t.Q6J("ngForOf",e.unlocks)}}function Tu(i,a){if(1&i&&(t.ynx(0),t._uU(1),t.ALo(2,"priceDisplay"),t.BQk()),2&i){const e=t.oxw();
1t.xp6(1),t.hij(" ",t.Dn7(2,1,e.getTotal(),!0,e.context)," ")}}let Zu=(()=>{class i extends G.T{constructor(e,n){super(e),this.injector=e,this.unlockItemHandlerService=n,this.unlocks=[],this.unlocksByStore=[]}ngOnInit(){this.input=this.navParams.input,console.log("UnlockItemDialogComponent input = ",this.input),this.initData()}initData(){var e;this.unlocks=null===(e=this.input)||void 0===e?void 0:e.unlocks,this.unlocks.forEach(n=>{const o=this.unlocksByStore.find(r=>r.store.id==n.store.id);o?o.unlocks.push(n):this.unlocksByStore.push({store:n.store,unlocks:[n]})})}dismissDialog(){const e=this.t.instant("byod.dialogs.unlock-dialog.dismiss-unlock-alert");this.dialogService.showAlert("",e,n=>{"confirm"===n&&this.dialogService.submitAuxDialog({unlockItemChanged:!1})},!0)}addToCartClicked(){const e=this.unlockItemHandlerService.moveOrderItemFromUnlockManagerToOrderManager(this.unlocks);this.dialogService.submitAuxDialog(e)}getTotal(){var e,n;return null===(n=null===(e=this.cartService)||void 0===e?void 0:e.unlockCatOrderManager)||void 0===n?void 0:n.order.total}ableConfirmBtn(){return this.unlocks.every(e=>e.fulfilled)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(_u.x))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-unlock-item-dialog"]],features:[t.qOj],decls:10,vars:11,consts:[[1,"h-full","flex","flex-col"],[3,"title","back","close"],[1,"div-scroll-list","h-full"],[4,"ngFor","ngForOf"],[1,"div-footer-button"],["mat-button","","appThrottleClick","",1,"footer-right","inline-ft-btn","key-button","item-grid-checkout-btn",3,"disabled","throttleClick"],[4,"ngIf"],["class","mb-2 font-bold",4,"ngIf"],["class","unlock-list",4,"ngFor","ngForOf"],[1,"mb-2","font-bold"],["name","store","size","16",1,"mr-2","font-bold"],[1,"unlock-list"],[3,"unlock"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"div",2),t.YNc(4,ku,3,2,"ng-container",3),t.qZA(),t.TgZ(5,"div",4)(6,"button",5),t.NdJ("throttleClick",function(){return n.addToCartClicked()}),t._uU(7),t.ALo(8,"translate"),t.YNc(9,Tu,3,5,"ng-container",6),t.qZA()()()),2&e&&(t.xp6(1),t.s9C("title",t.lcZ(2,7,"byod.dialogs.unlock-item-dialog.unlocked-item")),t.Q6J("back",!1)("close",!1),t.xp6(3),t.Q6J("ngForOf",n.unlocksByStore),t.xp6(2),t.Q6J("disabled",!n.ableConfirmBtn()),t.xp6(1),t.hij(" ",t.lcZ(8,9,"byod.dialogs.unlock-item-dialog.confirm")," "),t.xp6(2),t.Q6J("ngIf",n.getTotal()))},dependencies:[_.sg,_.O5,S.o,k.v,J.j,I.lW,Pu,M.X$,D.G,F.A],styles:["[_nghost-%COMP%]{display:block;background:white;height:100%}.item-container[_ngcontent-%COMP%]{display:flex;width:100%;border-radius:5px;background:white}.item-container.selected[_ngcontent-%COMP%]{border-left:5px solid var(--P)}.div-soldout[_ngcontent-%COMP%]{display:none;z-index:1}.soldOut[_ngcontent-%COMP%]   .item-info[_ngcontent-%COMP%]{opacity:.5}.soldOut[_ngcontent-%COMP%]   app-img[_ngcontent-%COMP%]{filter:grayscale(80%);filter:opacity(.5)}.soldOut[_ngcontent-%COMP%]   .add-qty-box[_ngcontent-%COMP%]{opacity:0}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]{display:block;inset:0;display:flex;justify-content:center;align-items:center}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   div.soldout-border[_ngcontent-%COMP%]{border:1px solid #ff6060;border-radius:.2rem .2rem .2rem .8rem;background:none;overflow:hidden;margin-bottom:1.25rem}.soldOut[_ngcontent-%COMP%]   .div-soldout[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{color:#ff6060;font-weight:700;padding:.5rem;font-size:.9rem;text-transform:uppercase;background:rgba(255,255,255,.3882352941)}.div-scroll-list[_ngcontent-%COMP%]{padding:1rem;overflow-y:auto;background:white}.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{display:flex;cursor:pointer;min-height:150px;background-color:#fff;width:100%;box-shadow:1.83341px 2.75011px 10.0837px #0000000d;border-radius:5px;margin-left:4px;margin-right:4px}.select-num[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{font-size:.6rem;background:#f04141;color:#fff;border-radius:2px;padding:.35rem .3rem}.select-num[_ngcontent-%COMP%]   p.satisfy[_ngcontent-%COMP%]{background:#1bbb8f}.item-info[_ngcontent-%COMP%]{width:100%;padding:.7rem .5rem .25rem 1rem;flex-direction:column;overflow:hidden}
1.item-name[_ngcontent-%COMP%]{margin-bottom:.1rem;flex-grow:1}.item-name[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:1.1rem;line-height:1.1em;max-height:2.2em;font-family:var(--CF1);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.item-desc[_ngcontent-%COMP%]{font-size:.7rem;line-height:1.1em;color:#8d8d8d;max-height:2.2em;overflow:hidden}.price-qty[_ngcontent-%COMP%]{flex:0 1 auto;display:flex;align-items:center;justify-content:space-between}.price-box[_ngcontent-%COMP%]{flex-shrink:0;height:36px;display:flex;align-items:center}.price-box[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--P);font-weight:700;font-size:1rem}.qty-col[_ngcontent-%COMP%]   .remove[_ngcontent-%COMP%]{color:#c4c4c4}.item-img-col[_ngcontent-%COMP%]{flex:0 0 150px;margin:0 .8rem 0 .75rem;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:150px;border-radius:0 3px 0 2.3rem;overflow:hidden;box-shadow:.15rem .15rem .3rem #00000026;background:#f5f5f5;position:absolute;top:-9px}.add-qty-box[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;margin:.3rem 0;align-items:center}.add-qty-box[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;justify-content:center;font-size:1.2rem}.add-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:1rem;color:var(--P)}.add-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.add-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.remove-btn[_ngcontent-%COMP%]{padding:0;min-width:30px;height:30px;border-radius:0;color:#c4c4c4}.remove-btn[_ngcontent-%COMP%]  .mat-button-wrapper{display:flex;align-items:center;justify-content:center}.remove-btn[_ngcontent-%COMP%]   span.material-icons[_ngcontent-%COMP%]{font-size:1.8rem}.item-tags-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.item-tag[_ngcontent-%COMP%]{display:flex;padding:.2rem .6rem;color:#fff;margin:.1rem}.item-tag[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:.8rem;font-weight:400}@media not screen and (min-width: 768px){.unlock-list[_ngcontent-%COMP%]   .div-one-item[_ngcontent-%COMP%]{min-height:110px}.item-img-col[_ngcontent-%COMP%]{justify-content:flex-start;margin-left:0;flex:0 0 110px}.item-img-col[_ngcontent-%COMP%]   .img[_ngcontent-%COMP%]{width:110px}.add-qty-box[_ngcontent-%COMP%]{position:absolute;bottom:.4em;left:-7em}.add-btn[_ngcontent-%COMP%]{min-width:20px;height:20px}.add-btn[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:1.4rem!important}}.div-footer-button[_ngcontent-%COMP%]{padding:1rem}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{width:100%;height:42px;justify-content:center;flex:1 0 50%;font-size:1rem;background:var(--P);color:#fff}.div-footer-button[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:disabled{background:#dcdcdc}  .mat-tab-header{overflow-x:scroll!important;padding-left:1rem}  .mat-tab-header::-webkit-scrollbar{display:none}  .mat-tab-label{overflow:visible!important;flex-basis:auto!important;padding:0 4px!important;min-width:0!important}  .mat-tab-label-container{overflow:visible!important}  .mat-tab-label-active{opacity:1!important}  .mat-ink-bar{display:none}.selected-cat[_ngcontent-%COMP%]{background:var(--P);color:var(--PC)}.selected-cat[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-right:.25rem}.mat-tab-group[_ngcontent-%COMP%]{box-shadow:none}@media not screen and (min-width: 1130px){  .mat-tab-header-pagination{display:none!important}}"]}),i})(),Au=(()=>{class i extends at{constructor(e){super(e),this.injector=e}ngOnInit(){this.note=this.navParams.get("note")||""}confirm(){this.dialogService.submitAuxDialog(this.note)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-remark"]],features:[t.qOj],decls:12,vars:13,consts:[[1,"remark-container"],[3,"title"],["rows","6","maxlength","140",1,"remark-content",3,"placeholder","ngModel","ngModelChange"],[1,"clear-all"],[3,"click"],["mat-raised-button","",1,"confirm",3,"click"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"app-sub-bar",1),t.ALo(2,"translate"),t.TgZ(3,"textarea",2),t.NdJ("ngModelChange",function(r){return n.note=r}),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",3)(6,"span",4),t.NdJ("click",function(){return n.note=""}),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"button",5),t.NdJ("click",function(){return n.confirm()}),t._uU(10),t.ALo(11,"translate"),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("title",t.lcZ(2,5,"byod.dialogs.write-remark.remark")),t.xp6(2),t.Q6J("placeholder",t.lcZ(4,7,"byod.dialogs.write-remark.remarkTips"))("ngModel",n.note),t.xp6(4),t.Oqu(t.lcZ(8,9,"byod.dialogs.write-remark.clearAll")),t.xp6(3),t.hij(" ",t.lcZ(11,11,"byod.dialogs.write-remark.confirm")," "))},dependencies:[g.Fj,g.JJ,g.nD,g.On,k.v,I.lW,M.X$],styles:["[_nghost-%COMP%]{display:block}  .mat-form-field{width:100%}.remark-container[_ngcontent-%COMP%]{height:100vh;background:#fff}.remark-content[_ngcontent-%COMP%]{display:block;width:calc(100% - 3.2rem);margin:1rem auto 0;border:1px solid var(--P);padding:1rem;box-sizing:border-box;border-radius:4px}.confirm[_ngcontent-%COMP%]{color:#fff;border-radius:.15rem;background:var(--P);width:90%;position:fixed;bottom:2rem;left:5%;padding:.25rem;box-sizing:border-box}
1.clear-all[_ngcontent-%COMP%]{float:right;margin:1.6rem}"]}),i})();var Su=u(40983);let cn=(()=>{class i extends G.T{constructor(e,n,o){super(e),this.injector=e,this.fb=n,this.phDiscountCardService=o,this.discountRole=this.phDiscountCardService.getPhcardRole()}handleDeleteConfirmation(e){this.dialogService.submitAuxDialog({confirm:e})}closed(){this.routingService.navigateCloseAllModal()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(g.qu),t.Y36(jt.O))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-ph-discount-delete-confirmation-dialog"]],features:[t.qOj],decls:19,vars:16,consts:[[1,"container","h-full","flex","flex-col"],[3,"back","customCloseLogic","closed"],["left","",1,"sb-title","font-bold"],[1,"confirmation-container","flex-grow","h-full","overflow-y-auto","overflow-x-hidden"],[1,"confirmation-text"],[1,"button-confirmation"],[1,"div-btn-proceed"],["mat-flat-button","","color","primary",1,"w-full",3,"click"],[1,"div-btn-cancel"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("closed",function(){return n.closed()}),t.TgZ(2,"span",2),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"div",3)(6,"div",4),t._uU(7),t.ALo(8,"translate"),t.ALo(9,"translate"),t.qZA()(),t.TgZ(10,"div",5)(11,"div",6)(12,"button",7),t.NdJ("click",function(){return n.handleDeleteConfirmation(!0)}),t._uU(13),t.ALo(14,"translate"),t.qZA()(),t.TgZ(15,"div",8)(16,"button",7),t.NdJ("click",function(){return n.handleDeleteConfirmation(!1)}),t._uU(17),t.ALo(18,"translate"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("customCloseLogic",!0),t.xp6(2),t.hij(" ",t.lcZ(4,6,"byod.dialogs.ph-discount-dialog.confirmation")," "),t.xp6(4),t.Oqu("elder"===n.discountRole?t.lcZ(8,8,"byod.dialogs.ph-discount-dialog.senior-citizen-delete"):t.lcZ(9,10,"byod.dialogs.ph-discount-dialog.pwd-delete")),t.xp6(6),t.hij("",t.lcZ(14,12,"buttons.proceed")," "),t.xp6(4),t.hij("",t.lcZ(18,14,"buttons.cancel")," "))},dependencies:[k.v,I.lW,M.X$],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;margin:0 auto;position:absolute;width:1rem;min-width:580px;bottom:40%;left:50%;padding:1rem;transform:translate(-50%)}  app-sub-bar div.div-button{justify-content:flex-start!important}  app-sub-bar div.header{background:#fff!important;font-family:var(--CF0)!important;border-top-left-radius:10px;border-top-right-radius:10px}  app-sub-bar .sb-title{line-height:2rem!important}.container[_ngcontent-%COMP%]{border-radius:10px;background:white}.confirmation-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;padding:1rem}div.div-btn-proceed[_ngcontent-%COMP%]{padding:.4rem 1rem!important;width:100%}div.div-btn-proceed[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #FB743D;background:#FB743D;padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px;color:#fff;text-transform:capitalize}.button-confirmation[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%}div.div-btn-cancel[_ngcontent-%COMP%]{padding:.4rem 1rem 1rem!important;width:100%}div.div-btn-cancel[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #FB743D;background:white;padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px;color:var(--P800);text-transform:capitalize}.confirmation-text[_ngcontent-%COMP%]{white-space:pre-wrap;width:1rem;min-width:12rem;margin:1rem 0;text-align:center}@media screen and (max-width: 599px){[_nghost-%COMP%]{min-width:380px}}"]}),i})();const Du=function(i){return{seats:i}};function qu(i,a){if(1&i&&(t.TgZ(0,"div",10)(1,"span"),t._uU(2,"!"),t.qZA(),t._uU(3),t.ALo(4,"translate"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(3),t.hij(" ",t.xi3(4,1,"byod.dialogs.ph-discount-dialog.discount-diningin-max-person",t.VKq(4,Du,e.cardSize)),"")}}const Qu=function(i){return{"error-input":i}};let sn=(()=>{class i extends G.T{constructor(e,n,o){super(e),this.injector=e,this.fb=n,this.phDiscountCardService=o,this.groupSize=this.phDiscountCardService.groupSize,this.cardSize=this.phDiscountCardService.getPhCardsAmount(),this.phDiscountDiningInForm=this.fb.group({groupSize:[null!==this.groupSize?this.groupSize:"",[g.kI.required,g.kI.min(1)]]})}onInputChange(e){var n;const o=e.target.value;(o<1||isNaN(o))&&(null===(n=this.phDiscountDiningInForm.get("groupSize"))||void 0===n||n.setValue(null))}handleGroupSizeSubmit(){this.dialogService.submitAuxDialog({groupSize:this.phDiscountDiningInForm.value.groupSize})}closed(){this.routingService.navigateCloseAllModal()}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(t.zs3),t.Y36(g.qu),t.Y36(jt.O))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-ph-discount-dining-in-dialog"]],features:[t.qOj],decls:19,vars:20,consts:[[1,"container","h-full","flex","flex-col"],[3,"back","customCloseLogic","closed"],["left","",1,"sb-title-dining-in","font-bold"],[1,"flex","flex-col","flex-grow",3,"formGroup","ngSubmit"],[1,"groupsize-container","flex-grow","h-full","overflow-y-auto","overflow-x-hidden"],[1,"mat-label"],["type","number","min","1","formControlName","groupSize",1,"groupsize-input",3,"ngClass","placeholder","input"],["class","error-required dining-error",4,"ngIf"],[1,"div-btn-proceed"],["mat-flat-button","","color","primary","type","submit",1,"w-full",3,"disabled"],[1,"error-required","dining-error"]],template:function(e,n){1&e&&(t.TgZ(0,"div",0)(1,"app-sub-bar",1),t.NdJ("closed",function(){return n.closed()}),t.TgZ(2,"span",2),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"form",3),t.NdJ("ngSubmit",function(){return n.handleGroupSizeSubmit()}),t.TgZ(6,"div",4)(7,"mat-label",5),t._uU(8),t.ALo(9,"translate"),t.TgZ(10,"span"),t._uU(11," *"),t.qZA()(),t.TgZ(12,"input",6),t.NdJ("input",function(r){return n.onInputChange(r)}),t.ALo(13,"translate"),t.qZA(),t.YNc(14,qu,5,6,"div",7),t.qZA(),t.TgZ(15,"div",8)(16,"button",9),t._uU(17),t.ALo(18,"translate"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("back",!1)("customCloseLogic",!0),t.xp6(2),t.hij(" ",t.lcZ(4,10,"byod.dialogs.ph-discount-dialog.ph-discount-diningin")," "),t.xp6(2),t.Q6J("formGroup",n.phDiscountDiningInForm),t.xp6(3),t.Oqu(t.lcZ(9,12,"byod.dialogs.ph-discount-dialog.enter-quantity")),t.xp6(4),t.Q6J("ngClass",t.VKq(18,Qu,n.phDiscountDiningInForm.get("groupSize").hasError("required")&&n.phDiscountDiningInForm.get("groupSize").touched||0!==n.groupSize&&n.phDiscountDiningInForm.get("groupSize").value<n.cardSize))("placeholder",t.lcZ(13,14,"byod.dialogs.ph-discount-dialog.eg-quantity")),t.xp6(2),t.Q6J("ngIf",n.phDiscountDiningInForm.get("groupSize").value<n.cardSize),t.xp6(2),t.Q6J("disabled",n.phDiscountDiningInForm.invalid||0!==n.groupSize&&n.phDiscountDiningInForm.get("groupSize").value<n.cardSize),t.xp6(1),t.hij("",t.lcZ(18,16,"byod.dialogs.ph-discount-dialog.proceed")," "))},dependencies:[_.mk,_.O5,g._Y,g.Fj,g.wV,g.JJ,g.JL,g.qQ,g.sg,g.u,k.v,I.lW,Z.hX,M.X$],styles:["[_nghost-%COMP%]{display:flex;justify-content:center;align-items:center;position:absolute;width:100%;bottom:40%;padding:1rem}  app-sub-bar div.div-button{justify-content:flex-start!important}  app-sub-bar div.header{background:#fff!important;border-top-left-radius:10px;border-top-right-radius:10px}  app-sub-bar .sb-title-dining-in{font-family:var(--CF0)!important;line-height:2rem}.mat-form-field[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%]{border-radius:10px;background:white}form[_ngcontent-%COMP%]{height:calc(100% - 56px)}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]{padding:1rem}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input[_ngcontent-%COMP%]{background:#fff;border:1px solid #D1D1D1;border-radius:4px;height:48px;padding:.75rem .5rem;width:100%;margin-top:5px;font-size:13px;font-weight:400}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{margin-left:2px;color:#eb5757}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .error-required[_ngcontent-%COMP%]{color:#e73f2b;font-size:10px;line-height:15px}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .mat-label[_ngcontent-%COMP%]{color:#595959;line-height:24px;font-size:12px}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .error-input[_ngcontent-%COMP%]{border:1px solid #E73F2B}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input[_ngcontent-%COMP%]:focus{border:1px solid transparent;outline:2px solid #FB743D}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input.error-input[_ngcontent-%COMP%]:focus{border:1px solid transparent;outline:2px solid #E73F2B}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .error-required.dining-error[_ngcontent-%COMP%]{margin-top:.3rem;font-size:12px}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .error-required.dining-error[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:16px;font-weight:900}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input[_ngcontent-%COMP%]::-webkit-input-placeholder, form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input[_ngcontent-%COMP%]::-moz-placeholder, form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   .groupsize-input[_ngcontent-%COMP%]::-ms-input-placeholder{color:#e0e0e0;font-size:16px}form[_ngcontent-%COMP%]   .groupsize-container[_ngcontent-%COMP%]   [_ngcontent-%COMP%]::-webkit-input-placeholder{color:#e0e0e0;font-size:16px}div.div-btn-proceed[_ngcontent-%COMP%]{padding:.8rem 1rem!important;border-top:none!important;box-shadow:0 3px .63rem #0003!important}div.div-btn-proceed[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{padding-top:.5rem;padding-bottom:.5rem;font-size:1.1rem;line-height:26px;color:#fff;text-transform:capitalize}div.div-btn-proceed[_ngcontent-%COMP%]   button.mat-flat-button[_ngcontent-%COMP%]:disabled{color:#d9d9d9;background:#BABABA;cursor:not-allowed}"]}),i})();const Nu=[Be,Fe,We,Ne,en,tn,qe,Xe,Ke,Ye,zp.v,jp.l,Gp.q,nn,Gt,cn,sn],Ju=[{path:"",component:Be,children:[{path:"variations",component:en,canActivate:[ht],data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Variations"}},{path:"filter-variations",component:nn,canActivate:[ht],data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Filter-Variations"}},{path:"multi-steps-combo",component:Vs,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Combo"}},{path:"alacarte",component:qe,canActivate:[ht],data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Single"}},{path:"all-modifiers",component:Ne,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Modifiers"}},{path:"segment-modifiers",component:We,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Modifiers"}},{path:"item-modifiers",component:Wc,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Modifiers"}},{path:"tnc",component:tn,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1}},{path:"changeTime",component:Xe,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"TC"}},{path:"combo",component:Fe,canActivate:[ht],data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Combo"}},{path:"unlock",component:uu,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Unlock"}},{path:"ph-discount-delete-confirmation-dialog",component:cn,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"PHDiscountDiningIn"}},{path:"ph-discount-dining-in",component:sn,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"PHDiscountDiningIn"}},{path:"ph-discount",component:Ke,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"PHDiscount"}},{path:"message",component:Ye,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"ItemRemark"}},{path:"nutrition-facts",component:ad,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Nutrition"}},{path:"byod-qrcode",component:zl,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"OrderQR"}},{path:"use-reward",component:Rm,data:{reuse:!1,auth:!0,entry:!1,checkpoint:!1,screen:"UseReward"}},{path:"adyen-payment",component:oa,data:{reuse:!1,auth:!0,entry:!1,checkpoint:!1,screen:"AdyenPayment"}},{path:"payment-manual-verification",component:Tn,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"PaymentVerification"}},{path:"pickup-method",component:Fn,data:{reuse:!1,auth:!0,entry:!1,checkpoint:!1,screen:"PickupMethod"}},{path:"search-item",component:zg,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"SearchItem"}}
1,{path:"address-details",component:Xg,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"AddressDetails"}},{path:"input-seats",component:op,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"InputSeats"}},{path:"upsell",component:lp,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"Upsell"}},{path:"input-table-no",component:tp,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"InputTableNo"}},{path:"input-table-code",component:cp,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"InputTableCode"}},{path:"track-driver",component:vn,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"TrackDriver"}},{path:"quick-registration",component:sp,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"QuickRegistrationConfirm"}},{path:"payment-selector",component:Yp,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"PaymentSelector"}},{path:"pickup-point",component:mp,data:{reuse:!1,auth:!0,entry:!1,checkpoint:!1,screen:"PickupPoint"}},{path:"country-phone-number",component:Gt,data:{reuse:!1,auth:!1,entry:!1,checkpoint:!1,screen:"CountryPhoneNumber"}},{path:"unlock-item",component:Zu,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"UnlockItem"}},{path:"remark",component:Au,data:{reuse:!0,auth:!1,entry:!1,checkpoint:!1,screen:"RemarkDialogComponent"}}]}];let Uu=(()=>{class i{static getComponent(e){for(let n of Nu)if(e===n.name)return n;return null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({providers:[Ln.t,_.JJ,{provide:C.xA,useClass:na.U}
1],imports:[_.ez,g.u5,g.UX,_t.Bz.forChild(Ju),M.aw,$t._G,yi.ByodModule,Mi.W,Oi.G,C.d4,et.t,nt.ie,ct.To,Bn.g,W.Is,z.Ps,wt.N6,X.Nh,bi.Cv,lt.Hi,I.ot,Vt.p9,W.Is,Kt.ZX,vt.Fk,xt.Cq,Z.lN,Ht.LD,j.c,U.XK,Yn.FA,tt.Cl,pe.N,Ci,U.si,yt.Bb,Su.a]}),i})()},83394:(dn,ut,u)=>{u.d(ut,{n:()=>g});class g{constructor(Y){this.errorCode="",this.errorCode=Y}isErrorState(Y,t){const _=!!(Y&&Y.invalid&&Y.touched),q=!!(Y&&Y.parent&&Y.parent.invalid&&Y.parent.touched&&Y.parent.hasError(this.errorCode));return(_||q)&&Y.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.