PageSourceSearch

https://shop.geiger-metzgerei.de/178.9384a19694a538e1.js

js geiger-metzgerei.de collected 2026-10-01 23:54:04 UTC 60,002 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkbutcher=self.webpackChunkbutcher||[]).push([[178],{178:(Ne,I,p)=>{p.r(I),p.d(I,{ShoppingCartModule:()=>ke});var y=p(6895),Q=p(4990),O=p(1692),R=p(2340),t=p(4650),C=p(6817),Z=p(62),N=p(4013),b=p(3265),w=p(9665),A=p(2466),L=p(704);function H(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",14),t._UZ(2,"img",15),t.qZA(),t.BQk())}function Y(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"li")(1,"a",23),t.NdJ("click",function(){const o=t.CHM(e).index,a=t.oxw(3);return t.KtG(a.selectPromo(o))}),t._uU(2),t.ynx(3),t.SDv(4,24),t.BQk(),t.qZA()()}if(2&n){const e=s.$implicit,i=s.index,r=t.oxw(3);t.xp6(1),t.MGl("id","promo",i,""),t.xp6(1),t.hij("",r.formatedPromoText(e),"\xa0")}}function J(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",20)(2,"small"),t._uU(3),t.ALo(4,"translate"),t.qZA()(),t.TgZ(5,"ul",21),t.YNc(6,Y,5,2,"li",22),t.qZA(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,2,"Click on any promo that you want to apply.")),t.xp6(3),t.Q6J("ngForOf",e.promoList)}}function B(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.YNc(1,J,7,4,"ng-container",13),t.TgZ(2,"div",16)(3,"a",17),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.applyPromo())}),t.SDv(4,18),t.qZA(),t._uU(5," \xa0 "),t.TgZ(6,"a",17),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.close(r.cancel))}),t.SDv(7,19),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.promoList.length>0)}}let F=(()=>{class n{constructor(e,i,r,o,a,c,l){this.commonService=e,this.shoppingCartService=i,this.activeModal=r,this.errorHandlerService=o,this.translate=a,this.alertService=c,this.cancel=!1,this.apply=!0,this.localDetails="",this.getPromoLoader=!1,this.promoList=[],this.promoText="",this.selectedPromo="",this.localDetails=this.commonService.localDetails(l)}ngOnInit(){this.selectedPromo="",this.getSettings(this.data)}close(e){let i=this.selectedPromo;e||(i=""),this.activeModal.close({isPromoApplied:e,promoData:i})}getSettings(e){this.getPromoLoader=!0,this.promoList=[],this.shoppingCartService.getPromoList(e).pipe().subscribe(i=>{this.getPromoLoader=!1,1==i.status&&Object.keys(i.data).length>0?this.promoList=i.data:this.close(this.cancel)},i=>{this.close(this.cancel),this.getPromoLoader=!1,this.errorHandlerService.handleError(i)})}selectPromo(e){this.selectedPromo=this.promoList[e],$(".promo-class").removeClass("active"),$("#promo"+e).addClass("active")}applyPromo(){if(""!=this.selectedPromo){let e=!0;"Voucher"==this.selectedPromo.condition&&null!=this.selectedPromo.condition_quantity&&""!=this.selectedPromo.condition_quantity&&(parseFloat(this.data.cart_value)>=parseFloat(this.selectedPromo.condition_quantity)||this.translate.get("invalidPromoAlertMsg",{value:this.selectedPromo.condition_quantity}).subscribe(i=>{this.alertService.popup("error",i),e=!1})),this.close(e?this.apply:this.cancel)}else this.translate.get("Please select promo code.").subscribe(e=>{this.alertService.popup("error",e)})}formatedPromoText(e){return this.shoppingCartService.formatDiscountText(e)}static#t=this.\u0275fac=function(i){return new(i||n)(t.Y36(Z.v),t.Y36(N.F),t.Y36(b.Kz),t.Y36(w.q),t.Y36(A.sK),t.Y36(L.c),t.Y36(t.soG))};static#e=this.\u0275cmp=t.Xpm({type:n,selectors:[["app-propmo-codes"]],inputs:{data:"data"},decls:16,vars:2,consts:function(){let e,i,r,o;return e="Promo-Codes",i="Promo-Code anwenden",r="Abbrechen",o="Rabatt",[[1,"modal-custom-popup"],["role","document",1,"modal-dialog","modal
1-dialog-centered"],[1,"modal-content"],[1,"modal-header"],[1,"modal-prod-name"],e,["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-custom-inner"],[1,"transaction-detail"],[1,"row"],[1,"col-sm-12"],[4,"ngIf"],[1,"d-flex","justify-content-center","content-loader"],["src","../../../assets/images/api-loader.gif"],[1,"avail-form-group"],["href","javascript:void(0);",1,"btn-custom",3,"click"],i,r,[1,"d-flex","justify-content-left",2,"margin-bottom","5px"],[1,"avail-box","promo-box-li"],[4,"ngFor","ngForOf"],["href","javascript:void(0);",1,"promo-class",3,"id","click"],o]},template:function(i,r){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span",4),t.SDv(5,5),t.qZA(),t.TgZ(6,"button",6),t.NdJ("click",function(){return r.close(r.cancel)}),t.TgZ(7,"span",7),t._uU(8,"\xd7"),t.qZA()()(),t.TgZ(9,"div",8)(10,"div",9)(11,"div",10)(12,"div",11)(13,"div",12),t.YNc(14,H,3,0,"ng-container",13),t.YNc(15,B,8,1,"ng-container",13),t.qZA()()()()()()()()),2&i&&(t.xp6(14),t.Q6J("ngIf",1==r.getPromoLoader),t.xp6(1),t.Q6J("ngIf",0==r.getPromoLoader))},dependencies:[y.sg,y.O5,A.X$],styles:[".promo-box-li[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{width:100%!important}"]})}return n})();var f=p(5439),U=p(4819),D=p(4406);function G(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"div",7)(1,"button",8),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.closeModal())}),t._uU(2,"OK"),t.qZA()()}}let j=(()=>{class n{constructor(e){this.activeModal=e,this.htmlMessage="",this.title="Vorbestell-App Demo",this.showOkButton=!1}closeModal(){this.activeModal.close()}static#t=this.\u0275fac=function(i){return new(i||n)(t.Y36(b.Kz))};static#e=this.\u0275cmp=t.Xpm({type:n,selectors:[["app-html-message-modal"]],inputs:{htmlMessage:"htmlMessage",title:"title",showOkButton:"showOkButton"},decls:9,vars:3,consts:[[1,"modal-header"],[1,"modal-title"],["type","button","aria-label","Close",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body","popup-model"],[3,"innerHTML"],["class","modal-footer",4,"ngIf"],[1,"modal-footer"],["type","button",1,"btn","btn-primary","w-100",3,"click"]],template:function(i,r){1&i&&(t.TgZ(0,"div",0)(1,"h4",1),t._uU(2),t.qZA(),t.TgZ(3,"button",2),t.NdJ("click",function(){return r.closeModal()}),t.TgZ(4,"span",3),t._uU(5,"\xd7"),t.qZA()()(),t.TgZ(6,"div",4),t._UZ(7,"div",5),t.qZA(),t.YNc(8,G,3,0,"div",6)),2&i&&(t.xp6(2),t.Oqu(r.title),t.xp6(5),t.Q6J("innerHTML",r.htmlMessage,t.oJD),t.xp6(1),t.Q6J("ngIf",r.showOkButton))},styles:[".popup-model a{color:#007bff;text-decoration:underline;cursor:pointer}.popup-model a:hover{color:#0056b3;text-decoration:underline}\n"],encapsulation:2})}return n})();var X=p(7932),K=p(842),z=p(5237),V=p(900),W=p(3643),tt=p(629),et=p(9406),it=p(7430),nt=p(4459),rt=p(8777),ot=p(2749),T=p(4006),k=p(1282);let at=(()=>{class n{constructor(){this.branchData=""}ngOnInit(){}static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275cmp=t.Xpm({type:n,selectors:[["app-business-address"]],inputs:{branchData:"branchData"},decls:6,vars:2,consts:function(){let e;return e="Gesch\xE4ftsadresse",[[1,"pickup-box"],e,[1,"text-inner"]]},template:function(i,r){1&i&&(t.TgZ(0,"div",0)(1,"h2"),t.SDv(2,1),t.qZA(),t.TgZ(3,"div",2)(4,"p"),t._uU(5),t.qZA()()()),2&i&&(t.xp6(5),t.AsE(" ",r.branchData.name,", ",r.branchData.address," "))}})}return n})();var st=p(1536);function _t(n,s){1&n&&(t.TgZ(0,"div",16),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"Please wait while your order is being processed...")," "))}function ct(n,s){1&n&&(t.TgZ(0,"div",16),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"Please wait verifying your delivery address...")," "))}function lt(n,s){if(1&n&&(t.TgZ(0,"div",13),t._UZ(1,"img",14),t.YNc(2,_t,3,3,"div",15),t.YNc(3,ct,3,3,"div",15),t.qZA()),2&n){const e=t.oxw();
1t.xp6(2),t.Q6J("ngIf",!e.getDeliveryPriceLoader),t.xp6(1),t.Q6J("ngIf",e.getDeliveryPriceLoader)}}function dt(n,s){1&n&&(t.ynx(0),t.TgZ(1,"th",33),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.BQk()),2&n&&(t.xp6(2),t.hij(" ",t.lcZ(3,1,"Total payable")," "))}function gt(n,s){1&n&&(t.ynx(0),t._uU(1,", "),t.BQk())}function pt(n,s){if(1&n&&(t.ynx(0),t._uU(1),t.YNc(2,gt,2,0,"ng-container",12),t.BQk()),2&n){const e=s.$implicit,i=s.index,r=t.oxw(2).$implicit;t.xp6(1),t.hij(" ",e.value," "),t.xp6(1),t.Q6J("ngIf",r.attr.length>i+1)}}function ut(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",45),t.YNc(2,pt,3,2,"ng-container",34),t.qZA(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngForOf",e.attr)}}function mt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",45)(2,"span"),t._uU(3),t.qZA()(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij(" ",e.is_item_wish," ")}}function ht(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",45)(2,"span",46),t._uU(3,"Verf\xfcgbar:"),t.qZA(),t.TgZ(4,"span",47),t._uU(5),t.qZA()(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(5),t.hij(" ",e.range_availability,"")}}function ft(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",45)(2,"span",48),t._uU(3,"Vorlaufzeit:"),t.qZA(),t.TgZ(4,"span",49),t._uU(5),t.qZA()(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(5),t.hij(" ",e.menu_items_buffer_hour," Stunden")}}function Ct(n,s){1&n&&(t.TgZ(0,"div",50),t._UZ(1,"img",51),t.qZA())}function Tt(n,s){1&n&&(t.ynx(0),t._UZ(1,"img",53),t.BQk())}function vt(n,s){if(1&n&&(t.TgZ(0,"strong"),t._uU(1),t.ALo(2,"currencySymbol"),t.qZA()),2&n){const e=t.oxw(2).$implicit,i=t.oxw(3);t.xp6(1),t.AsE("",t.lcZ(2,2,i.localDetails.currencyCode),"",e.total_price_total.toFixed(2),"")}}function yt(n,s){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,Tt,2,0,"ng-container",31),t.YNc(2,vt,3,4,"ng-template",null,52,t.W1O),t.qZA()),2&n){const e=t.MAs(3),i=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",i.priceIsLoading)("ngIfElse",e)}}const P=function(n){return{disabled:n}};function St(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td"),t._UZ(3,"img",35),t.qZA(),t.TgZ(4,"td",24)(5,"strong"),t._uU(6),t.qZA(),t.YNc(7,ut,3,1,"ng-container",12),t.YNc(8,mt,4,1,"ng-container",12),t.YNc(9,ht,6,1,"ng-container",12),t.YNc(10,ft,6,1,"ng-container",12),t.qZA(),t.TgZ(11,"td",26)(12,"div",36)(13,"button",37),t.NdJ("click",function(){const o=t.CHM(e).index,a=t.oxw(3);return t.KtG(a.mangeQty(a.subQtyAction,a.qtyToDesc,o))}),t.qZA(),t._UZ(14,"input",38),t.TgZ(15,"span",39),t._uU(16),t.qZA(),t.TgZ(17,"button",40),t.NdJ("click",function(){const o=t.CHM(e).index,a=t.oxw(3);return t.KtG(a.mangeQty(a.addQtyAction,a.qtyToInc,o))}),t.qZA(),t.YNc(18,Ct,2,0,"div",41),t.qZA()(),t.YNc(19,yt,4,2,"td",42),t.TgZ(20,"td")(21,"a",43),t.NdJ("click",function(){const r=t.CHM(e),o=r.$implicit,a=r.index,c=t.oxw(3);return t.KtG(c.removeItemFromCart(o.unique_cart_id,a,o.id,o.branch.branch_id))}),t._UZ(22,"img",44),t.qZA()()(),t.BQk()}if(2&n){const e=s.$implicit,i=t.oxw(3);t.xp6(3),t.s9C("src",e.imageUrl,t.LSH),t.xp6(3),t.Oqu(e.name),t.xp6(1),t.Q6J("ngIf",e.attr.length>0),t.xp6(1),t.Q6J("ngIf","0"!=e.is_item_wish&&""!=e.item_wish),t.xp6(1),t.Q6J("ngIf",e.range_availability&&""!==e.range_availability.trim()),t.xp6(1),t.Q6J("ngIf",e.menu_items_buffer_hour&&""!==e.menu_items_buffer_hour.trim()&&"00:00"!==e.menu_items_buffer_hour),t.xp6(2),t.Q6J("ngClass",t.VKq(18,P,e.isLoading)),t.xp6(1),t.Q6J("disabled",e.isLoading)("ngClass",t.VKq(20,P,e.isLoading)),t.xp6(1),t.Q6J("value",e.qty),t.xp6(2),t.Oqu(null==e.qtySelected?null:e.qtySelected.quantity_abbreviations),t.xp6(1),t.Q6J("disabled",e.isLoading)("ngClass",t.VKq(22,P,e.isLoading)),t.xp6(1),t.Q6J("ngIf",e.isLoading),t.xp6(1),t.Q6J("ngIf",i.price_visible),t.xp6(2),t.Udp("pointer-events",e.isLoading?"none":"auto"),t.Q6J("ngClass",t.VKq(24,P,e.isLoading))}}function xt(n,s){1&n&&(t.ynx(0),t._UZ(1,"img",53),t.BQk())}function bt(n,s){if(1&n&&(t._uU(0),t.ALo(1,"currencySymbol")),2&n){const e=t.oxw(4);t.AsE(" ",t.lcZ(1,2,e.localDetails.currencyCode),"",e.cartNewTotalPrice.toFixed(2)," ")}}function At(n,s){if(1&n&&(t.TgZ(0,"tr")(1,"td",33)(2,"strong"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t._UZ(5,"br"),t.TgZ(6,"small"),t._uU(7),t.ALo(8,"translate"),t.qZA()(),t.TgZ(9,"td",54),t.YNc(10,xt,2,0,"ng-container",31),t.YNc(11,bt,2,4,"ng-template",null,55,t.W1O),t.qZA()()),2&n){const e=t.MAs(12),i=t.oxw(3);t.xp6(1),t.uIk("colspan",i.orderTotPricTxtColSapn),t.xp6(2),t.Oqu(t.lcZ(4,6,"Total Price")),t.xp6(4),t.Oqu(t.lcZ(8,8,"Incl. Vat")),t.xp6(2),t.uIk("colspan",i.orderTotPricColSapn),t.xp6(1),t.Q6J("ngIf",i.totalPriceIsloading)("ngIfElse",e)}}
1function Pt(n,s){if(1&n&&(t.ynx(0),t.YNc(1,St,23,26,"ng-container",34),t.YNc(2,At,13,10,"tr",12),t.BQk()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.cartItems),t.xp6(1),t.Q6J("ngIf",0==e.cartLoader&&e.cartItems.length>0&&1==e.price_visible)}}function kt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"div")(4,"div",56),t._UZ(5,"img",57),t.qZA()()()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(2),t.uIk("colspan",e.colspanToshow)}}function Mt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"div",58)(4,"p"),t._uU(5),t.ALo(6,"translate"),t.qZA(),t._UZ(7,"br"),t.qZA()()(),t.BQk()),2&n){const e=t.oxw(2);t.xp6(2),t.uIk("colspan",e.colspanToshow),t.xp6(3),t.hij(" ",t.lcZ(6,2,"Currently there is no item in the shopping cart.")," ")}}function It(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",56),t._UZ(2,"img",51),t.qZA(),t.BQk())}const Ot=function(n){return{"active show":n}};function Zt(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"li",69)(2,"a",70),t.NdJ("click",function(){const o=t.CHM(e).index,a=t.oxw(5);return t.KtG(a.managTab(o))}),t._UZ(3,"img",71),t._uU(4),t.ALo(5,"translate"),t.qZA()(),t.BQk()}if(2&n){const e=s.$implicit,i=s.index;t.xp6(2),t.hYB("id","",e.key,"",i,"-tab"),t.Q6J("ngClass",t.VKq(8,Ot,1==e.isSelected)),t.xp6(1),t.MGl("src","../../../assets/images/",e.icon,"",t.LSH),t.s9C("alt",e.icon),t.xp6(1),t.hij("",t.lcZ(5,6,e.value)," ")}}function Nt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"ul",68),t.YNc(2,Zt,6,10,"ng-container",34),t.qZA(),t.BQk()),2&n){const e=t.oxw(4);t.xp6(2),t.Q6J("ngForOf",e.deliveryOptions)}}function wt(n,s){if(1&n&&(t.ynx(0),t.YNc(1,Nt,3,1,"ng-container",12),t.BQk()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",0==e.isLoadDeliveryOption&&e.deliveryOptions.length>0)}}function Lt(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",56),t._UZ(2,"img",57
1),t.qZA(),t.BQk())}function Dt(n,s){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.customer_id,", ")}}function Et(n,s){if(1&n&&(t.ynx(0),t._uU(1),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("",e.additional_information,", ")}}function qt(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",76)(2,"input",77),t.NdJ("ngModelChange",function(r){t.CHM(e);const o=t.oxw(6);return t.KtG(o.selectedAddress=r)})("click",function(){const o=t.CHM(e).index,a=t.oxw(6);return t.KtG(a.makeSelectedDeliveryAddress(o))}),t.qZA(),t.TgZ(3,"label",78)(4,"span"),t._UZ(5,"span"),t.qZA(),t.YNc(6,Dt,2,1,"ng-container",12),t._uU(7),t.YNc(8,Et,2,1,"ng-container",12),t._uU(9),t.qZA()(),t.BQk()}if(2&n){const e=s.$implicit,i=t.oxw(6);t.xp6(2),t.MGl("id","radio",e.id,""),t.Q6J("value",e.id)("ngModel",i.selectedAddress),t.xp6(1),t.MGl("for","radio",e.id,""),t.xp6(3),t.Q6J("ngIf",null!=e.customer_id&&""!=e.customer_id),t.xp6(1),t.AsE("",e.name,", ",e.address1,", "),t.xp6(1),t.Q6J("ngIf",null!=e.additional_information&&""!=e.additional_information),t.xp6(1),t.lnq("",e.postcode," ",e.address2,", ",e.mobile," ")}}function Qt(n,s){if(1&n&&(t.ynx(0),t.YNc(1,qt,10,11,"ng-container",34),t.BQk()),2&n){const e=t.oxw(5);t.xp6(1),t.Q6J("ngForOf",e.addressList)}}function Rt(n,s){1&n&&(t.TgZ(0,"p"),t.SDv(1,79),t.qZA())}function Ht(n,s){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(6);t.xp6(1),t.hij(" ",e.addressErrorMessage," ")}}function $t(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",58),t.YNc(2,Rt,2,0,"p",12),t.YNc(3,Ht,2,1,"p",12),t.qZA(),t.BQk()),2&n){const e=t.oxw(5);t.xp6(2),t.Q6J("ngIf",""==e.addressErrorMessage),t.xp6(1),t.Q6J("ngIf",""!=e.addressErrorMessage)}}function Yt(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",72)(2,"h2"),t._uU(3),t.ALo(4,"translate"),t.TgZ(5,"a",73),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(4);return t.KtG(r.openActionPopup(""))}),t._UZ(6,"i",74),t.qZA()(),t.TgZ(7,"div",75),t.YNc(8,Lt,3,0,"ng-container",12),t.YNc(9,Qt,2,1,"ng-container",12),t.YNc(10,$t,4,2,"ng-container",12),t.qZA()(),t.BQk()}if(2&n){const e=t.oxw(4);t.xp6(3),t.hij(" ",t.lcZ(4,4,"Delivery address")," "),t.xp6(5),t.Q6J("ngIf",1==e.addressListLoader),t.xp6(1),t.Q6J("ngIf",e.addressList.length>0&&0==e.addressListLoader),t.xp6(1),t.Q6J("ngIf",0==e.addressList.length&&0==e.addressListLoader)}}function Jt(n,s){if(1&n&&(t.ynx(0),t._UZ(1,"input",85),t.ALo(2,"translate"),t.ALo(3,"translate"),t.BQk()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.cQ8("placeholder","",t.lcZ(2,4,"Lead time"),": ",e.buffer_hours," ",t.lcZ(3,6,"Hours"),""),t.Q6J("disabled",!0)}}function Bt(n,s){if(1&n&&(t.TgZ(0,"div",86),t._uU(1),t.ALo(2,"translate"),t.ALo(3,"translate"),t.ALo(4,"translate"),t.qZA()),2&n){const e=t.oxw(3).$implicit;t.xp6(1),t.lnq(" ",t.lcZ(2,3,"Please choose")," ",t.lcZ(3,5,e.value)," ",t.lcZ(4,7,"time")," ")}}function Ft(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",56),t._UZ(2,"img",57
1),t.qZA(),t.BQk())}function Ut(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",76)(2,"input",77),t.NdJ("ngModelChange",function(r){t.CHM(e);const o=t.oxw(10);return t.KtG(o.selectedTimeSlot=r)})("click",function(){const o=t.CHM(e).index,a=t.oxw(10);return t.KtG(a.makeTimeSlotSlected(o))}),t.qZA(),t.TgZ(3,"label",78)(4,"span"),t._UZ(5,"span"),t.qZA(),t._uU(6),t.qZA()(),t.BQk()}if(2&n){const e=s.$implicit,i=s.index,r=t.oxw(10);t.xp6(2),t.hYB("id","slotradio",e.id,"",i,""),t.Q6J("value",e)("ngModel",r.selectedTimeSlot),t.xp6(1),t.hYB("for","slotradio",e.id,"",i,""),t.xp6(3),t.AsE("",e.start,"-",e.end,"")}}function Gt(n,s){if(1&n&&(t.ynx(0),t.YNc(1,Ut,7,8,"ng-container",34),t.BQk()),2&n){const e=t.oxw(9);t.xp6(1),t.Q6J("ngForOf",e.timeSlots)}}function jt(n,s){1&n&&(t.TgZ(0,"p"),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"Time slot not found. Please select a date")," "))}function Xt(n,s){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(10);t.xp6(1),t.hij(" ",e.addressErrorMessage," ")}}function Kt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",58),t.YNc(2,jt,3,3,"p",12),t.YNc(3,Xt,2,1,"p",12),t.qZA(),t.BQk()),2&n){const e=t.oxw(9);t.xp6(2),t.Q6J("ngIf",""==e.addressErrorMessage),t.xp6(1),t.Q6J("ngIf",""!=e.addressErrorMessage)}}function zt(n,s){1&n&&(t.TgZ(0,"p"),t.SDv(1,87),t.ALo(2,"translate"),t.qZA()),2&n&&(t.xp6(2),t.pQV(t.lcZ(2,1,"Time slot not found.")),t.QtT(1))}function Vt(n,s){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(10);t.xp6(1),t.hij(" ",e.addressErrorMessage," ")}}function Wt(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",58),t.YNc(2,zt,3,3,"p",12),t.YNc(3,Vt,2,1,"p",12),t.qZA(),t.BQk()),2&n){const e=t.oxw(9);t.xp6(2),t.Q6J("ngIf",""==e.addressErrorMessage),t.xp6(1),t.Q6J("ngIf",""!=e.addressErrorMessage)}}
1function te(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",72)(2,"h2"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",75),t.YNc(6,Ft,3,0,"ng-container",12),t.YNc(7,Gt,2,1,"ng-container",12),t.YNc(8,Kt,4,2,"ng-container",12),t.YNc(9,Wt,4,2,"ng-container",12),t.qZA()(),t.BQk()),2&n){const e=t.oxw(8);t.xp6(3),t.hij(" ",t.lcZ(4,5,"Time slots")," "),t.xp6(3),t.Q6J("ngIf",1==e.timeSlotsLoader),t.xp6(1),t.Q6J("ngIf",e.timeSlots.length>0&&0==e.timeSlotsLoader),t.xp6(1),t.Q6J("ngIf",0==e.timeSlots.length&&0==e.addressListLoader&&""==e.pickup_time),t.xp6(1),t.Q6J("ngIf",0==e.timeSlots.length&&0==e.addressListLoader&&""!=e.pickup_time)}}function ee(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",72)(2,"h2"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",80),t.YNc(6,Jt,4,8,"ng-container",12),t.TgZ(7,"input",81),t.NdJ("ngModelChange",function(r){t.CHM(e);const o=t.oxw(7);return t.KtG(o.pickup_time=r)}),t.ALo(8,"translate"),t.qZA(),t.TgZ(9,"owl-date-time",82,83),t.NdJ("afterPickerClosed",function(){t.CHM(e);const r=t.MAs(10),o=t.oxw(7);return t.KtG(o.dateTimeInput(r))}),t.qZA(),t.YNc(11,Bt,5,9,"div",84),t.qZA()(),t.YNc(12,te,10,7,"ng-container",12),t.BQk()}if(2&n){const e=t.MAs(10),i=t.oxw(2).$implicit,r=t.oxw(5);t.xp6(3),t.hij(" ",t.lcZ(4,13,i.value)," "),t.xp6(3),t.Q6J("ngIf","cool_locker"!=i.key&&"vendingweb"!=i.key),t.xp6(1),t.s9C("placeholder",t.lcZ(8,15,"Desired Time")),t.Q6J("ngModel",r.pickup_time)("min",i.dateTimePickerstartAt)("owlDateTimeTrigger",e)("owlDateTime",e),t.xp6(2),t.Q6J("startAt",r.pickup_time||i.dateTimePickerstartAt)("firstDayOfWeek",1)("pickerType",r.pickerType)("hour12Timer",!1),t.xp6(2),t.Q6J("ngIf",r.submitted&&(""==r.pickup_time||null==r.pickup_time)),t.xp6(1),t.Q6J("ngIf",r.showTimeSlot)}}function ie(n,s){if(1&n&&(t.ynx(0),t.YNc(1,ee,13,17,"ng-container",12),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngIf",1==e.isSelected)}}function ne(n,s){if(1&n&&(t.ynx(0),t.YNc(1,ie,2,1,"ng-container",12),t.BQk()),2&n){const e=s.$implicit;t.xp6(1),t.Q6J("ngIf","shipping"!=e.key)}}function re(n,s){if(1&n&&(t.ynx(0),t.YNc(1,ne,2,1,"ng-container",34),t.BQk()),2&n){const e=t.oxw(4);t.xp6(1),t.Q6J("ngForOf",e.deliveryOptions)}}function oe(n,s){if(1&n&&(t.ynx(0),t.YNc(1,Yt,11,6,"ng-container",12),t.YNc(2,re,2,1,"ng-container",12),t.BQk()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.showAddress),t.xp6(1),t.Q6J("ngIf",e.deliveryOptions.length>0)}}function ae(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",56),t._UZ(2,"img",57
1),t.qZA(),t.BQk())}function se(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"thead")(2,"tr")(3,"th"),t._uU(4,"\xa0"),t.qZA(),t.TgZ(5,"th"),t._uU(6),t.qZA(),t.TgZ(7,"th"),t._uU(8),t.qZA()()(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(6),t.Oqu(e.day),t.xp6(2),t.Oqu(e.timings)}}function _e(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"tbody")(2,"tr")(3,"th"),t._uU(4,"\xa0"),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t._uU(8),t.qZA()()(),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(6),t.Oqu(e.day),t.xp6(2),t.Oqu(e.timings)}}function ce(n,s){if(1&n&&(t.ynx(0),t.YNc(1,se,9,2,"ng-container",12),t.YNc(2,_e,9,2,"ng-container",12),t.BQk()),2&n){const e=s.index;t.xp6(1),t.Q6J("ngIf",0==e),t.xp6(1),t.Q6J("ngIf",e>0)}}function le(n,s){if(1&n&&(t.TgZ(0,"div",72)(1,"h2"),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"div",75)(5,"p"),t.ynx(6),t.TgZ(7,"div",89)(8,"div",21)(9,"table",90),t.YNc(10,ce,3,2,"ng-container",34),t.qZA()()(),t.BQk(),t.qZA()()()),2&n){const e=t.oxw(4);t.xp6(2),t.Oqu(t.lcZ(3,2,"Opening hours")),t.xp6(8),t.Q6J("ngForOf",e.businessHours)}}function de(n,s){if(1&n&&(t.ynx(0),t.YNc(1,le,11,4,"div",88),t.BQk()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("ngIf",e.businessHours.length>0&&0==e.businessHourLoader)}}function ge(n,s){1&n&&t._UZ(0,"div",95)}function pe(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",72)(2,"h2"),t.SDv(3,91),t.qZA(),t.TgZ(4,"div",80)(5,"textarea",92,93),t.NdJ("ngModelChange",function(r){t.CHM(e);const o=t.oxw(3);return t.KtG(o.special_wish=r)}),t.qZA(),t.YNc(7,ge,1,0,"div",94),t.qZA()(),t.BQk()}if(2&n){const e=t.MAs(6),i=t.oxw(3);t.xp6(5),t.Q6J("ngModel",i.special_wish),t.xp6(2),t.Q6J("ngIf",e.invalid&&(e.dirty||e.touched||1==i.submitted))}}function ue(n,s){if(1&n&&(t.TgZ(0,"div",96),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.lnq(" ",e.branchData.name,", ",e.branchData.address," ",t.lcZ(2,3,"doesn't have any delivery option."),". ")}}function me(n,s){if(1&n){const e=t.EpF();t.TgZ(0,"form",59,60),t.NdJ("ngSubmit",function(){t.CHM(e);const r=t.MAs(1),o=t.oxw(2);return t.KtG(o.checkoutProcess(r))}),t.YNc(2,wt,2,1,"ng-container",12),t.TgZ(3,"div",61)(4,"div",62),t.YNc(5,oe,3,2,"ng-container",12),t.YNc(6,ae,3,0,"ng-container",12),t.YNc(7,de,2,1,"ng-container",12),t._UZ(8,"app-business-address",63),t.YNc(9,pe,8,2,"ng-container",12),t.YNc(10,ue,3,5,"div",64),t.TgZ(11,"button",65),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"div",66)(15,"button",28),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.backClicked())}),t.SDv(16,67),t.ALo(17,"translate"),t.qZA()()()()()}if(2&n){const e=t.oxw(2);t.xp6(2),t.Q6J("ngIf",e.authenticated),t.xp6(3),t.Q6J("ngIf",e.authenticated),t.xp6(1),t.Q6J("ngIf",1==e.businessHourLoader),t.xp6(1),t.Q6J("ngIf",e.authenticated),t.xp6(1),t.Q6J("branchData",e.branchData),t.xp6(1),t.Q6J("ngIf",e.authenticated),t.xp6(1),t.Q6J("ngIf",1==e.hideCartOptions),t.xp6(1),t.Q6J("disabled",e.checkoutLoader||1==e.hideCartOptions||1==e.isTimeSlotError),t.xp6(1),t.hij(" ",t.lcZ(13,11,"Order now")," "),t.xp6(2),t.Q6J("ngClass","back-checkout-css-logged-in"),t.xp6(3),t.pQV(t.lcZ(17,13,"Continue shopping")),t.QtT(16)}}function he(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",17)(2,"div",2)(3,"div",18)(4,"div",19)(5,"div",20)(6,"div",21)(7,"table",22)(8,"thead")(9,"tr")(10,"th"),t.SDv(11,23),t.qZA(),t.TgZ(12,"th",24),t.SDv(13,25),t.qZA(),t.TgZ(14,"th",26),t._uU(15),t.ALo(16,"translate"),t.qZA(),t.YNc(17,dt,4,3,"ng-container",12),t.TgZ(18,"th"),t._uU(19,"\xa0"),t.qZA()()(),t.TgZ(20,"tbody"),t.YNc(21,Pt,3,2,"ng-container",12),t.YNc(22,kt,6,1,"ng-container",12),t.YNc(23,Mt,8,4,"ng-container",12),t.qZA()()(),t.TgZ(24,"div",27)(25,"button",28),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.backClicked())}),t.SDv(26,29),t.ALo(27,"translate"),t.qZA()()(),t.TgZ(28,"div",30),t.YNc(29,It,3,0,"ng-container",31),t.YNc(30,me,18,15,"ng-template",null,32,t.W1O),t.qZA()()()()(),t.BQk()}if(2&n){const e=t.MAs(31),i=t.oxw();t.xp6(4),t.Q6J("ngClass",i.deliveryOptions.length>4?"cart-partition":""),t.xp6(11),t.hij(" ",t.lcZ(16,10,"Total quantity")," "),t.xp6(2),t.Q6J("ngIf",i.price_visible),t.xp6(4),t.Q6J("ngIf",0==i.cartLoader&&i.cartItems.length>0),t.xp6(1),t.Q6J("ngIf",1==i.cartLoader),t.xp6(1),t.Q6J("ngIf",0==i.cartLoader&&0==i.cartItems.length),t.xp6(1),t.Q6J("ngClass","back-checkout-css-logged-in"),t.xp6(3),t.pQV(t.lcZ(27,12,"Continue shopping")),t.QtT(26),t.xp6(2),t.Q6J("ngIf",i.isLoadDeliveryOption)("ngIfElse",e)}}
1function fe(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"a",8),t.NdJ("click",function(){t.CHM(e);const r=t.oxw(2);return t.KtG(r.redirectToHome())}),t._UZ(2,"img",103),t.qZA(),t.BQk()}if(2&n){const e=t.oxw(2);t.xp6(2),t.s9C("alt",e.company_detail.name),t.Q6J("src",e.company_detail.logo.path,t.LSH)}}function Ce(n,s){1&n&&(t.ynx(0),t.TgZ(1,"div",56),t._UZ(2,"img",57),t.qZA(),t.BQk())}function Te(n,s){1&n&&(t.ynx(0),t.TgZ(1,"span"),t._UZ(2,"i",104),t.qZA(),t.BQk())}function ve(n,s){1&n&&(t.ynx(0),t.TgZ(1,"span"),t._UZ(2,"i",105),t.qZA(),t.BQk())}function ye(n,s){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"div",17)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",97)(6,"div",98),t.YNc(7,fe,3,2,"ng-container",12),t.YNc(8,Ce,3,0,"ng-container",12),t.qZA(),t.TgZ(9,"div",99),t.YNc(10,Te,3,0,"ng-container",12),t.YNc(11,ve,3,0,"ng-container",12),t.qZA(),t._UZ(12,"p",100),t.TgZ(13,"div",101)(14,"a",102),t.NdJ("click",function(){t.CHM(e);const r=t.oxw();return t.KtG(r.redirectHome())}),t._uU(15),t.ALo(16,"translate"),t.qZA()()()()()()(),t.BQk()}if(2&n){const e=t.oxw();
1t.xp6(7),t.Q6J("ngIf",0==e.loadingLogo&&""!=e.company_detail),t.xp6(1),t.Q6J("ngIf",1==e.loadingLogo),t.xp6(2),t.Q6J("ngIf",1==e.orderStatus),t.xp6(1),t.Q6J("ngIf",0==e.orderStatus),t.xp6(1),t.Q6J("innerHTML",e.orderSatusMessge,t.oJD),t.xp6(3),t.Oqu(t.lcZ(16,6,"Ok"))}}const E=R.N.shopping.cart,xe=[{path:"",redirectTo:E,pathMatch:"full"},{path:E,component:(()=>{class n{constructor(e,i,r,o,a,c,l,g,_,d,u,h,m,v,M,Me,Ie,Oe,Ze){this.errorHandlerService=e,this.modalService=i,this.productsService=r,this.routerService=o,this.cartService=a,this.appServices=c,this._location=l,this.confirmAlert=g,this.translate=_,this.commonService=u,this._authService=h,this.shoppingCartService=m,this.alertService=v,this.userService=M,this.branchSelectionService=Me,this.cartCountService=Ie,this.dateFomate=Oe,this.sessionStorageService=Ze,this.deliveryTypesConst=U.JC,this.special_wish="",this.branch="",this.cat_id="",this.cartSessionItems$=this.cartService.items$,this.branchData="",this.deliveryFlags=null,this.cartItems=[],this.productPlaceholderImg=C.S.productPlaceholderImg,this.qtyToDesc=C.S.qtyToDesc,this.qtyToInc=C.S.qtyToInc,this.addQtyAction=C.S.addQtyAction,this.subQtyAction=C.S.subQtyAction,this.cartLoader=!0,this.localDetails="",this.minProdQtyInGram=C.S.minProdQtyInGram,this.cartTotalPrice=0,this.cartNewTotalPrice=0,this.colspanToshow=6,this.orderTotPricTxtColSapn=5,this.orderTotPricColSapn=1,this.price_visible=!0,this.dateTimePickerstartAt="",this.pickup_time="",this.pickerType="both",this.selectedBranchId="",this.company_id=0,this.cart_id=0,this.coolLockerBufferHour=0,this.deliveryBufferHour=0,this.pickupBufferHour=0,this.smartStoreBufferHours=0,this.vendingwebBufferHour=0,this.totalPriceIsloading=!1,this.isLoadDeliveryOption=!1,this.userDetails="",this.convertMinsToHrsMins=q=>{let S=Math.floor(q/60),x=q%60;return S=S<10?"0"+S:S,x=x<10?"0"+x:x,`${S}:${x}`},this.errorMessage=null,this.productLoader=!1,this.products=[],this.searchQuery="",this.isPromoApplied=!1,this.promoData="",this.formatedDiscountText="",this.quantityDebounceTimers={},this.total_discount_amount=0,this.orderProcessStatusMessage="",this.checkoutLoader=!1,this.orderItems=[{discount:0,orderOptions:[],quantity:3,orderToppings:[],item_wish:"Special wishes comment",total_price:"630.0",orderAttributes:[],menu_item_id:"213"}],this.checkoutOrderData={delivery_postcode:"",delivery_phone:"",orderItem:[],vat_per:0,delivery_state:"",delivery_type:"Pickup",order_delivery_address_id:"0",branch_id:65,delivery_time:"30-Mar-2021 12:40",customer_id:1073,delivery_charge:0,payment_type:"cod",delivery_city:"",total_amount:"630.00",company_id:150,current_order_time:"2021-03-24 10:41:20",delivery_address:"",comments:"Main comment of the order",voucher_id:0,total_discount_amount:0,vat:0,delivery_name:"",locktec_slot_start_time:"",locktec_slot_end_time:""},this.checkoutData={payment_status:"",data:"",delivery_type:"",stripe_account_id:"",payment_type:"",txn_id:""},this.selectedAddressDetail=null,this.submitted=!1,this.deliveryAddVerifyProMessage="",this.businessHours=[],this.businessHoursNe
1w={delivery_hours:[],pick_up_hours:[]},this.businessHourLoader=!1,this.orderSatusMessge="",this.orderStatus=!1,this.showOrderStatus=!1,this.showAddress=!1,this.showTimeSlot=!1,this.deliveryOptions=[{value:"Pick up",key:"pickup",isSelected:!1,icon:"pickup-icon.png",buffer_hours:"",dateTimePickerstartAt:""},{value:"Delivery",key:"delivery",isSelected:!1,icon:"delivery-icon.png",buffer_hours:"",dateTimePickerstartAt:""},{value:"Refrigerator compartment",key:"cool_locker",isSelected:!1,icon:"locker.png",buffer_hours:"",dateTimePickerstartAt:""},{value:"Shipping",key:"shipping",isSelected:!1,icon:"delivery-icon.png",buffer_hours:"",dateTimePickerstartAt:""},{value:"Smart Store",key:"smart_store",isSelected:!1,icon:"smart-store.png",buffer_hours:"",dateTimePickerstartAt:""},{value:"Refrigerator compartment",key:"vendingweb",isSelected:!1,icon:"locker.png",buffer_hours:"",dateTimePickerstartAt:""}],this.hideCartOptions=!1,this.addressListLoader=!1,this.addressList=[],this.addressErrorMessage="",this.selectedAddress="",this.timeSlotsLoader=!1,this.timeSlots=[],this.selectedTimeSlot="",this.isTimeSlotError=!1,this.timeSlotErrorsMsg="",this.getDeliveryPriceErrorMessage="",this.getDeliveryPriceLoader=!1,this.loadingLogo=!1,this.company_detail="",this.localDetails=this.commonService.localDetails(d),f.locale(d)}initDateTimePicker(e,i){let r="";if(["cool_locker","vendingweb"].includes(i)){const c=new Date(new Date);c.setDate(c.getDate()-1),r=f(c).format()}else r=f().add(f.duration(e)).format();return r}backClicked(){this.routerService.redirectToCategory(btoa(this.branch.branch_id))}ngOnInit(){this.submitted=!1,this.showOrderStatus=!1,this.initCart(),this.branchSelectionService.branchId$.subscribe(e=>{e&&(this.selectedBranchId=e,this.getCurrentBranchData(e))})}initCart(){this.isLoadDeliveryOption=!0,this.authenticated=this._authService.isAuthenticated(),this.userDetails=this._authService.getUserDetails(),this.authenticated?(this.getCartItems(),setTimeout(()=>{this.pickerType="both",this.selectedTimeSlot=""},1e3)):this.routerService.redirectSignIn()}getBufferHours(e){this.appServices.getSettings().pipe().subscribe(i=>{if(1==i.status&&i.data.length>0){for(let o=0;o<i.data.length;o++){let a=i.data[o];if(a.id==e){let c=parseFloat(a.pickup_buffer_minutes),l=parseFloat(a.delivery_buffer_minutes),g=parseFloat(a.cool_locker_buffer_minutes),_=parseFloat(a.smart_store_buffer_minutes);this.branchData.pickup_buffer_time=this.convertMinsToHrsMins(c),this.branchData.delivery_buffer_time=this.convertMinsToHrsMins(l),this.branchData.cool_locker_buffer_time=this.convertMinsToHrsMins(g),this.branchData.smart_store_buffer_time=this.convertMinsToHrsMins(_)}}setTimeout(()=>{this.showTabs(0)})}},i=>{console.log("err",i)})}getCartItems(e){this.cartLoader=!0,this.branchSelectionService.branchId$.subscribe(i=>{i&&(this.selectedBranchId=i,this.cartService.getCartItemsFromAPI(i).then(r=>{if(r.data)if(1===r.status){this.coolLockerBufferHour=r.data.cool_locker_buffer_hour||0,this.deliveryBufferHour=r.data.delivery_buffer_hour||0,this.pickupBufferHour=r.data.pickup_buffer_hour||0,this.smartStoreBufferHours=r.data.smart_store_buffer_hours||0,this.vendingwebBufferHour=r.data.vendingweb_buffer_hour||0,this.deliveryOptions=this.deliveryOptions.map(a=>"pickup"===a.key?{...a,buffer_hours:String(this.pickupBufferHour)}:"delivery"===a.key?{...a,buffer_hours:String(this.deliveryBufferHour)}:"cool_locker"===a.key?{...a,buffer_hours:String(this.coolLockerBufferHour)}:"smart_store"===a.key?{...a,buffer_hours:String(this.smartStoreBufferHours)}:"vendingweb"===a.key?{...a,buffer_hours:String(this.vendingwebBufferHour)}:a);const o=r.data.items||[];0==o.length?this.redirectToHome():o.length>0&&r.data.branch_id==i?(this.cartNewTotalPrice=parseFloat(r.data.total_price),this.cart_id=r.data.cart_id,this.cartItems=o.map(a=>{const c=a.attributes||[],g=(c.reduce((d,u)=>d+parseFloat(u.price||"0"),0),c.map(d=>`${d.value}${d.attribute_group_id}`).join(""));return{category_id:a.category_id.toString(),item_wish:a.is_item_wish,is_item_wish:a.is_item_wish,branch:{branch_id:r.data.branch_id},id:a.id,qtySelected:{quantity_value:a.quantity.toString(),quantity_name:"Gramm",quantity_abbreviations:a.unit_quantity},attr:c.map(d=>({value:d.value,status:"1",id:d.attribute_group_id.toString(),price:d.price,calculation_type:d.c
1alculation_type,selected:!0})),qty:a.quantity,is_unit:"g"==a.unit_quantity?"0":"1",unique_cart_id:`${a.menu_item.id}&&36439${g}1`,is_attribute:c.length>0,price:parseFloat(a.unit_price),apply_image:"1",imageUrl:a.menu_item.imageUrl||"../../../assets/images/no-image-cat.jpg",name:a.menu_item.name,price_total:parseFloat((a.price||"0").toString().replace(/,/g,"")),total_price_total:parseFloat((a.price||"0").toString().replace(/,/g,"")),max_limit:a.menu_item.max_limit,min_limit:a.menu_item.min_limit,menu_items_buffer_hour:a.menu_item.menu_items_buffer_hour,range_availability:a.menu_item.range_availability}}),this.branch=this.cartItems[0].branch,this.cat_id=this.cartItems[0].category_id,this.company_id=r.data.company_id,this.cartCountService.updateCartCount(o.length),this.getBranchDetails(),this.cartLoader=!1):(this.cartLoader=!1,this.redirectToHome())}else this.cartLoader=!1,this.redirectToHome();else this.cartLoader=!1,this.redirectToHome();e&&e()}).catch(r=>{this.cartLoader=!1,this.redirectToHome()}))})}calculatePrice(e){let r="1"==e.is_unit?C.S.priceCalculateionTypes:"gram";return this.cartService.calculatePrice(r,e.price,r==C.S.priceCalculateionTypes?1:100,[])}redirectToHome(){this.routerService.redirectHome()}redirectToLogin(){this.routerService.redirectSignIn()}getBranchDetails(){let e=this.branch.branch_id;e||this.redirectToHome(),this.appServices.getBrancDetails({branch_id:e}).pipe().subscribe(r=>{1==r.status&&Object.keys(r.data).length>0?(this.branchData=r.data,this.pickerType="both",this.pickup_time="",this.price_visible="1"==this.branchData.price_visible,this.colspanToshow=1==this.price_visible?6:4,this.mapCartItems(),this.showTabs(0)):this.redirectToHome()},r=>{this.cartLoader=!1,console.log("err",r)})}mapCartItems(){if(this.cartItems.length>0){let e=this.cartItems;this.cartNewTotalPrice=0;for(let i=0;i<e.length;i++){parseInt(this.cartItems[i].qty);let c=[];("0"==e[i].apply_image||""==e[i].imageUrl||null==e[i].imageUrl)&&(e[i].imageUrl=this.productPlaceholderImg),this.cartItems[i].attr.length>0&&1==this.cartItems[i].is_attribute&&(c=this.cartItems[i].attr);let g=this.cartItems[i].total_price_total;this.cartNewTotalPrice+=g,this.cartItems[i].total_price_total=g}this.cartLoader=!1,this.applyPromo()}}removeItemFromCart(e,i,r,o){this.translate.get("removeCartItmAlertMessage").subscribe(a=>{this.confirmAlert.open(a).subscribe(c=>{c&&(this.cartItems.splice(i,1),this.cartCountService.decrementCartCount(),this.updateCartTotalPrice(),this.shoppingCartService.removeCartItem({cart_item_id:r,branch_id:o}).pipe().subscribe(l=>{if(1===l.status&&l.data){const g=l.data;this.cart_id=g.cart_id,this.company_id=g.company_id,this.selectedBranchId=g.branch_id,this.cartItems=(g.items||[]).map(_=>{const d=_.attributes||[],u=d.map(h=>`${h.value}${h.attribute_group_id}`).join("");return{category_id:_.category_id.toString(),item_wish:_.is_item_wish,is_item_wish:_.is_item_wish,branch:{branch_id:g.branch_id},id:_.id,qtySelected:{quantity_value:_.quantity.toString(),quantity_name:"Gramm",quantity_abbreviations:_.unit_quantity},attr:d.map(h=>({value:h.value,status:"1",id:h.attribute_group_id.toString(),price:h.price,calculation_type:h.calculation_type,selected:!0})),qty:_.quantity,is_unit:"g"==_.unit_quantity?"0":"1",unique_cart_id:`${_.menu_item.id}&&36439${u}1`,is_attribute:d.length>0,price:parseFloat(_.unit_price),apply_image:"1",imageUrl:_.menu_item.imageUrl||"../../../assets/images/no-image-cat.jpg",name:_.menu_item.name,price_total:parseFloat((_.price||"0").toString().replace(/,/g,"")),total_price_total:parseFloat((_.price||"0").toString().replace(/,/g,"")),max_limit:_.menu_item.max_limit,min_limit:_.menu_item.min_limit,menu_items_buffer_hour:_.menu_item.menu_items_buffer_hour,range_availability:_.menu_item.range_availability}}),this.cartNewTotalPrice=parseFloat(g.total_price),this.coolLockerBufferHour=g.cool_locker_buffer_hour||0,this.deliveryBufferHour=g.delivery_buffer_hour||0,this.pickupBufferHour=g.pickup_buffer_hour||0,this.smartStoreBufferHours=g.smart_store_buffer_hours||0,this.vendingwebBufferHour=g.vendingweb_buffer_hour||0,this.deliveryOptions=this.deliveryOptions.map(_=>"pickup"===_.key?{..._,buffer_hours:String(this.pickupBufferHour)}:"delivery"===_.key?{..._,buffer_hours:String(this.deliveryBufferHour)}:"cool_locker"===_.key?{..._,buffer_hours:String(this.coolLockerBufferHour)}:"smart_store"===_.key?{..._,buffer_hours:String(this.smartStoreBufferHours)}:"vendingweb"===_.key?{..._,buffer_hours:String(this.vendingwebBufferHour)}:_),this.cartCountService.updateCartCount(this.cartItems.length),0===this.cartItems.length&&this.redirectToHome()}}),0===this.cartItems.length&&this.redirectToHome())})})}mangeQty(e=this.addQtyAction,i,r){this.cartItems[r].priceIsLoading=!0,this.totalPriceIsloading=!0;let a=this.cartItems[r],c=a.unique_cart_id,g="1"==a.is_unit?C.S.priceCalculateionTypes:"gram",_=parseInt(a.qty),d="gram"==g?10:1,u=parseInt(a.min_limit)<1?1:parseInt(a.min_limit),h=parseInt(a.max_limit),m=e==this.addQtyAction?_+d:_-d;return m<u&&m<1||m>h?(this.cartItems[r].priceIsLoading=!1,this.totalPriceIsloading=!1,void this.translate.get("addCartQtyValidationMessage",{MIN_LIMIT:u,MAX_LIMIT:h}).subscribe(v=>{this.alertService.popup("error",v)})):(this.cartItems[r].qty=m,this.cartItems[r].total_price_total=this.cartService.calculatePrice(g,a.price,m,a.attr),this.updateCartTotalPrice(),this.quantityDebounceTimers[c]&&clearTimeout(this.quantityDebounceTimers[c]),void(this.quantityDebounceTimers[c]=setTimeout(()=>{this.addCartFunc(this.cartItems[r],m,r,g),delete this.quantityDebounceTimers[c]},800)))}updateCartTotalPrice(){this.cartNewTotalPrice=0;for(let e=0;e<this.cartItems.length;e++)this.cartNewTotalPrice+=this.cartItems[e].total_price_total||0;this.applyPromo()}refreshCart(){this.getCartItems()}openPromoPopup(){let e=this.cartNewTotalPrice.toFixed(2),i=this.branch.branch_id;if(this.removeDiscount(),""!=e&&""!=i&&null!=e&&null!=i){const r=this.modalService.open(F,{ariaLabelledBy:"exampleModalCenterTitle",centered:!0});r.componentInstance.data={branch_id:i,cart_value:e},r.closed.subscribe(a=>{a&&(this.isPromoApplied=a.isPromoApplied,this.promoData=a.promoData,this.applyPromo())})}}applyPromo(){if(""!=this.promoData&&1==this.isPromoApplied&&(this.formatedDiscountText=this.shoppingCartService.formatDiscountText(this.promoData),"Voucher"==this.promoData.condition))if(null!=this.promoData.condition_quantity&&""!=this.promoData.condition_quantity&&this.cartNewTotalPrice>=parseFloat(this.promoData.condition_quantity)&&""!=this.promoData.offer_quantity&&null!=this.promoData.offer_quantity){if("Percentage"==this.promoData.unit){let e=this.cartNewTotalPrice,r=e*parseFloat(this.promoData.offer_quantity)/100,o=e-r;this.total_discount_amount=r,this.cartNewTotalPrice=o<0?0:o}}else this.removeDiscount()}removeDiscount(){this.promoData="",this.isPromoApplied=!1,this.formatedDiscountText="",this.refreshCart()}checkPromoApplyCondition(e){}goToSingIn(){this.routerService.redirectSignIn()}chageDateLoacle(e,i,r){return f.locale(i),f(e).format(r)}makeSelectedDeliveryAddress(e){this.selectedAddressDetail=this.addressList[e]}makeTimeSlotSlected(e){this.selectedTimeSlot=this.timeSlots[e]}formatedDeliveryAddress(e){let i="",r=null!=e.customer_id&&""!=e.customer_id?e.customer_id+", ":"",o=null!=e.additional_information&&""!=e.additional_information?e.additional_information+", ":"",a=e.name+", ",l=e.postcode+", ";return i=""!=r?r+a:a,i+=e.address1+", ",i+=""!=o?o+l:l,i+=e.address2+", "+e.mobile,i}dateTimeInput(e){let i=e.selected;if(this.pickup_time="",null!=i&&""!=i){this.pickup_time=i;let r=this.getDeliveryType();""==r&&null==r||r!=this.deliveryTypesConst.cool_locker?""==r&&null==r||r!=this.deliveryTypesConst.smart_store?(""!=r||null!=r)&&r==this.deliveryTypesConst.vendingweb&&(r="vendingweb"):r="smart_store":r="locker",this.getLockerTimeSlot(r,this.pickup_time)}
1}getSelectedTimeSlot(e){let i="",r=this.timeSlots;for(let o=0;o<r.length;o++)r[o].id==e&&(i=r[o]);return i}getBusinessHours(e){this.businessHourLoader=!0,this.businessHours=[],this.shoppingCartService.getBusinessHours({branch_id:this.branch.branch_id,delivery_type:e}).pipe().subscribe(r=>{this.businessHourLoader=!1,1===r.status&&Object.keys(r.data).length>0?this.businessHours=r.data:(this.checkoutLoader=!1,this.alertService.popup("error",r.message))},r=>{this.businessHourLoader=!1,this.businessHours=[]})}getCurrentBranchData(e){this.businessHourLoader=!0,this.businessHoursNew={delivery_hours:[],pick_up_hours:[]},this.appServices.getCurrentBranchData({branch_id:e||""}).pipe().subscribe(r=>{this.businessHourLoader=!1,1===r.status&&Object.keys(r.data).length>0?(this.businessHoursNew.delivery_hours=r.data.delivery_hours||[],this.businessHoursNew.pick_up_hours=r.data.pick_up_hours||[],this.deliveryFlags={is_vendingweb:r.data.is_vendingweb,is_delivery:r.data.is_delivery,is_pickup:r.data.is_pickup,is_shipping:r.data.is_shipping,is_cool_locker:r.data.is_cool_locker,is_smart_store:r.data.is_smart_store},this.branchData&&Object.keys(this.branchData).length>0&&this.showTabs(0)):(this.checkoutLoader=!1,this.alertService.popup("error",r.message))},r=>
1{this.businessHourLoader=!1,this.businessHoursNew={delivery_hours:[],pick_up_hours:[]}})}checkoutProcess(e){if(this.cartLoader=!1,this.submitted=!0,!this.authenticated)return void this.goToSingIn();const i=this.getDeliveryType(),r=this.pickup_time;if("Shipping"!==i&&(!r||""===r))return void this.alertService.popup("error","Bitte w\xe4hlen Sie ein Datum aus.");const o="Delivery"===i||"Shipping"===i?this.selectedAddressDetail?.id:null;let a=null,c=null;("Locker"===i||"vendingweb"===i)&&"object"==typeof this.selectedTimeSlot&&(a=this.selectedTimeSlot?.start||null,c=this.selectedTimeSlot?.end||null);const l="Smart Store"===i&&"object"==typeof this.selectedTimeSlot?this.selectedTimeSlot:null;let g=r;g||(g=new Date);let _="YYYY-MM-DD HH:mm";("Locker"===i||"Smart Store"===i||"vendingweb"===i)&&(_="YYYY-MM-DD");let d=f.isMoment(g)?g:f(g);d.isValid()||(d=f());const u=d.locale("en").format(_);this.checkoutLoader=!0;const h={cart_id:this.cart_id?.toString(),branch_id:this.selectedBranchId,payment_type:"COD",delivery_type:"Smart Store"===i?"smart_store":i,comments:(this.special_wish??"").trim(),current_order_time:f(new Date).locale("en").format("YYYY-MM-DD HH:mm:ss"),delivery_time:u,..."Delivery"===i||"Shipping"===i?{order_delivery_address_id:o}:{},..."Locker"===i?{locktec_slot_start_time:a,locktec_slot_end_time:c}:{},..."vendingweb"===i?{vendingweb_slot_start_time:a,vendingweb_slot_end_time:c}:{},..."Smart Store"===i&&l?{slot_type:l.slot_type,smart_store_time:l.start,smart_store_time_id:l.id}:{}};this.shoppingCartService.placeOder(h).pipe().subscribe(m=>{m&&(this.checkoutLoader=!1,this.submitted=!1,1==m.status&&(this.cartCountService.updateCartCount(0),this.showOrderStatus=!0,this.orderStatus=!0,this.cartService.removeCart(),this.orderSatusMessge=m.message,this.fetchingCompanyDetails()))},m=>{if(this.checkoutLoader=!1,404===m.status&&m.error&&m.error.message){const v=this.modalService.open(j,{centered:!0});v.componentInstance.htmlMessage=m.error.message;let M=this.sessionStorageService.getCompanyDetail();v.componentInstance.title=M.name}else this.alertService.popup("error",m.error?.message||"Something went wrong. Please try again.")})}placeOrder(e){this.orderStatus=!1,this.showOrderStatus=!1,this.checkoutData.data=e,this.shoppingCartService.placeOder(this.checkoutData).pipe().subscribe(i=>{this.checkoutLoader=!1,this.submitted=!1,1==i.status?(this.showOrderStatus=!0,this.orderStatus=!0,this.cartService.removeCart(),this.orderSatusMessge=i.message,this.fetchingCompanyDetails()):null!=i.message&&this.alertService.popup("error",i.message.replace("Error:",""))},i=>{this.submitted=!1,this.checkoutLoader=!1,this.errorMessage=null!=i.error.message&&""!=i.error.message?i.error.message:"Something went wrong. Please try after sometime.",this.fetchingCompanyDetails(),this.orderSatusMessge=this.errorMessage})}getDeliveryType(){let e="";for(let i=0;i<this.deliveryOptions.length;i++){let r=this.deliveryOptions[i];r.isSelected&&(e=this.deliveryTypesConst[r.key])}return e}getOrderedItems(){let e=[],i=this.cartItems;if(i.length>0)for(let r=0;r<i.length;r++){let o=i[r],a=o.qty,c=o.total_price_total,l=this.getOrderedAttributes(o.attr);e.push({discount:0,orderOptions:[],quantity:a,orderToppings:[],item_wish:o.is_item_wish,total_price:c,orderAttributes:l,menu_item_id:o.id})}return e}dateFormate(e){return this.dateFomate.dateToIsoString(e)}getOrderedAttributes(e){let i=[];if(e.length>0)for(let r=0;r<e.length;r++){let o=e[r];i.push({attribute_group_id:o.id,price:o.price})}return i}afterPickerClosed(e,i){}managTab(e){this.showAddress=!1,this.showTimeSlot=!1,this.timeSlots=[],this.makeSelectUnSelectTab(!1,-1),this.makeSelectUnSelectTab(!0,e)}makeSelectUnSelectTab(e=!0,i=-1){this.businessHours=[],this.addressErrorMessage="",this.timeSlots=[],this.submitted=!1;let r=this.deliveryOptions;if(this.pickerType="both",this.pickup_time="",this.selectedTimeSlot="",-1==i)for(let o=0;o<r.length;o++)r[o].isSelected=e,r[o].dateTimePickerstartAt=this.initDateTimePicker(r[o].buffer_hours,r[o].key);else{r[i].isSelected=e;let o=r[i].key;"delivery"==o||"shipping"==o||"pickup"==o?(("delivery"==o||"pickup"==o)&&(this.businessHours="delivery"==o?this.businessHoursNe
1w.delivery_hours:this.businessHoursNew.pick_up_hours),("delivery"==o||"shipping"==o)&&(this.showAddress=e,this.getAddresses())):("cool_locker"==o||"smart_store"==o||"vendingweb"==o)&&(1==e&&(this.pickerType="calendar"),this.showTimeSlot=e),("delivery"==o||"pickup"==o)&&(r[i].dateTimePickerstartAt=this.initDateTimePicker(r[i].buffer_hours,o))}this.deliveryOptions=r}showTabs(e=0){this.pickerType="both",this.selectedTimeSlot="",this.pickup_time="",this.submitted=!1,this.addressErrorMessage="";const i=this.deliveryFlags&&Object.keys(this.deliveryFlags).length>0?this.deliveryFlags:this.branchData;let r="1"==String(i?.is_pickup||"0"),o="1"==String(i?.is_delivery||"0"),a="1"==String(i?.is_cool_locker||"0"),c="1"==String(i?.is_shipping||"0"),l="1"==String(i?.is_smart_store||"0"),g="1"==String(i?.is_vendingweb||"0");this.hideCartOptions=!0;let _=this.deliveryOptions,d=[];1==r&&d.push(_[0]),o&&d.push(_[1]),a&&d.push(_[2]),c&&d.push(_[3]),l&&d.push(_[4]),g&&d.push(_[5]),d.length>0?(this.hideCartOptions=!1,this.deliveryOptions=d,this.makeSelectUnSelectTab(!0,e)):this.deliveryOptions=d,this.isLoadDeliveryOption=!1}getAddresses(){this.addressErrorMessage="",this.addressListLoader=!0;let i={user_id:this.userDetails.id};this.addressList=[],this.userService.getUserAddresses(i).pipe().subscribe(r=>{this.addressListLoader=!1,1===r.status&&r.data.length>0?(this.addressList=r.data.sort(),this.selectedAddress=this.addressList[0].id,this.makeSelectedDeliveryAddress(0)):this.addressErrorMessage=r.message},r=>{this.addressListLoader=!1,this.addressErrorMessage=null!=r.error.message&&""!=r.error.message?r.error.message:"Something went wrong. Please try after sometime.",this.errorHandlerService.handleError(r)})}getLockerTimeSlot(e="locker",i){this.isTimeSlotError=!1,this.timeSlotErrorsMsg="",f.locale("en-GB");let r="locker"==e||"vendingweb"==e?f(i).format("DD-MMM-YYYY"):f(i).format("DD-MMM-YYYY HH:mm A");if(this.timeSlotErrorsMsg="",this.timeSlotsLoader=!0,r){let o={data:{branch_id:this.branch.branch_id,company_id:this.branchData.company_id,delivery_time:r,delivery_type:e,total_amount:this.cartNewTotalPrice.toFixed(2)}};this.timeSlots=[],this.shoppingCartService.getLockerTimeSlot(o).pipe().subscribe(a=>{this.timeSlotsLoader=!1,1===a.status?(this.isTimeSlotError=!1,this.timeSlotErrorsMsg="",a.data.length>0&&(this.isTimeSlotError=!1,this.timeSlotErrorsMsg="",this.timeSlots=a.data.sort(),this.makeTimeSlotSlected(0))):(this.alertService.popup("error",a.message),this.isTimeSlotError=!0,this.pickup_time="")},a=>{this.timeSlotsLoader=!1,this.isTimeSlotError=!0,this.alertService.popup("error",null!=a.error.message&&""!=a.error.message?a.error.message:"Something went wrong. Please try after sometime."),this.pickup_time=""})}}getDeliveryPrice(e){return new Promise((i,r)=>{this.shoppingCartService.getDeliveryPrice({post_code:e.postcode,branch_id:this.branch.branch_id,address_postcode:e.postcode,google_address:e.google_address,is_shipping:e.is_shipping}).pipe().subscribe(a=>{i(a)},a=>{r(a)})})}openActionPopup(e=""){const i=this.modalService.open(D.$,{ariaLabelledBy:"exampleModalCenterTitle",centered:!0,size:"lg"});i.componentInstance.data={addressData:e,userDetail:this.userDetails},i.closed.subscribe(a=>{a&&this.getAddresses()})}fetchingCompanyDetails(){this.loadingLogo=!0,this.company_detail="",this.appServices.getSettings().pipe().subscribe(e=>{this.loadingLogo=!1,1==e.status&&Object.keys(e.company_detail).length>0&&(this.company_detail=e.company_detail)},e=>{this.loadingLogo=!1})}redirectHome(){this.routerService.redirectHome()}isCorrectQtySelected(e,i){let r=!1;if(""!=e&&null!=e&&!isNaN(e)&&0!=e&&"0"!=e){let o=e.toString();/^[0-9]{1,10}$/.test(o)&&o.length<=10&&(r=parseInt(o)>=parseInt(i.min_limit)&&parseInt(o)<=parseInt(i.max_limit))}return r||this.translate.get("addCartQtyValidationMessage",{MIN_LIMIT:i.min_limit,MAX_LIMIT:i.max_limit}).subscribe(o=>{this.alertService.popup("error",o)}),r}addCartFunc(e,i,r,o){if(this.authenticated)if(this.isCorrectQtySelected(e.qty,e)){void 0!==r&&(this.cartItems[r].isLoading=!0);let a={menu_item_id:e.unique_cart_id.split("&&")[0],company_id:this.company_id,branch_id:e.branch.branch_id,category_id:e.category_id,unit_quantity:e.qtySelected.quantity_abbreviations,quantities:i||e.qty,is_attribute:e.is_attribute,attribute:e.attr,is_item_wish:e.is_item_wish};this.shoppingCartService.addToCart(a).pipe().subscribe(c=>{void 0!==r&&(this.cartItems[r].isLoading=!1,this.cartItems[r].priceIsLoading=!1,this.totalPriceIsloading=!1),1==c.status&&c.data&&c.data.items?(this.cartItems=c.data.items.map(l
1=>{const g=l.attributes||[],_=g.map(d=>`${d.value}${d.attribute_group_id}`).join("");return{category_id:l.category_id.toString(),item_wish:l.is_item_wish,is_item_wish:l.is_item_wish,branch:{branch_id:c.data.branch_id},id:l.id,qtySelected:{quantity_value:l.quantity.toString(),quantity_name:"Gramm",quantity_abbreviations:l.unit_quantity},attr:g.map(d=>({value:d.value,status:"1",id:d.attribute_group_id.toString(),price:d.price,calculation_type:d.calculation_type,selected:!0})),qty:l.quantity,is_unit:"g"==l.unit_quantity?"0":"1",unique_cart_id:`${l.menu_item.id}&&36439${_}1`,is_attribute:g.length>0,price:parseFloat(l.unit_price),apply_image:"1",imageUrl:l.menu_item.imageUrl||"../../../assets/images/no-image-cat.jpg",name:l.menu_item.name,price_total:parseFloat((l.price||"0").toString().replace(/,/g,"")),total_price_total:parseFloat((l.price||"0").toString().replace(/,/g,"")),max_limit:l.menu_item.max_limit,min_limit:l.menu_item.min_limit,menu_items_buffer_hour:l.menu_item.menu_items_buffer_hour,range_availability:l.menu_item.range_availability}}),this.updateCartTotalPrice()):void 0!==i&&void 0!==r&&void 0!==o&&(this.cartItems[r].qty=i,this.cartItems[r].total_price_total=this.cartService.calculatePrice(o,e.price,i,e.attr),this.updateCartTotalPrice())},c=>{void 0!==r&&(this.cartItems[r].isLoading=!1,this.cartItems[r].priceIsLoading=!1,this.totalPriceIsloading=!1),this.alertService.popup("error",null!=c.error.message&&""!=c.error.message?c.error.message:"Something went wrong. Please try again.")})}else this.routerService.redirectSignIn()}static#t=this.\u0275fac=function(i){return new(i||n)(t.Y36(w.q),t.Y36(b.FF),t.Y36(X.s),t.Y36(K.c),t.Y36(z.N),t.Y36(V.z),t.Y36(y.Ye),t.Y36(W.I),t.Y36(A.sK),t.Y36(t.soG),t.Y36(Z.v),t.Y36(tt.e),t.Y36(N.F),t.Y36(L.c),t.Y36(et.f),t.Y36(it.m),t.Y36(nt.Y),t.Y36(rt.f),t.Y36(ot.u))};static#e=this.\u0275cmp=t.Xpm({type:n,selectors:[["app-cart"]],decls:14,vars:3,consts:function(){let e,i,r,o,a,c,l,g,_,d;return e="Sortiment",i="Einkaufswagen",r="Artikelbild",o="Artikelname",a=" " + "\ufffd0\ufffd" + " ",c="l\xF6schen",l=" " + "\ufffd0\ufffd" + " ",g=" No data found ",_=" " + "\ufffd0\ufffd" + " ",d="Besondere W\xFCnsche?",[["class","loader-old overlay",4,"ngIf"],[1,"breadcrumb-section"],[1,"container"],[1,"row"],[1,"col-12"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],["href","javascript:void(0);",3,"click"],e,["aria-current","page",1,"breadcrumb-item","active"],i,[4,"ngIf"],[1,"loader-old","overlay"],["id","loader","src","../../../assets/images/api-loader.gif"],["class","loader-text",4,"ngIf"],[1,"loader-text"],[1,"inner-page"],[1,"category","category-list"],[1,"cart-list",3,"ngClass"],[1,"table-block"],[1,"table-responsive"],["width","100%","cellspacing","0","cellpadding","0","border","0"],r,["colspan","2"],o,[2,"text-align","center"],[1,"desktop-shoping-btn",3,"ngClass"],["type","button",1,"btn-custom-continue-shopping","checkout-back-btn",2,"height","auto",3,"click"],a,[1,"pickup-sec"],[4,"ngIf","ngIfElse"],["showDeliveryOption",""],[2,"text-align","right"],[4,"ngFor","ngForOf"],[1,"img-holder",3,"src"],[1,"number-input",3,"ngClass"],[3,"disabled","ngClass","click"],["min","0","name","quantity","type","number","disabled","",1,"quantity",3,"value"],[1,"qty-abbre"],[1,"plus",3,"disabled","ngClass","click"],["class","row-loader",4,"ngIf"],["style","text-align: right",4,"ngIf"],["href","javascript:void(0);",1,"delete-icon",3,"ngClass","click"],["src","../../../assets/images/delete.png","alt",c],[1,"itm-attr"],[1,"lead-time-text","verfuegbar-nowrap"],[1,"lead-time-text-sub","verfuegbar-nowrap"],[1,"lead-time-text"],[1,"lead-time-text-sub"],[1,"row-loader"],["src","../../../assets/images/api-loader.gif","alt","Loading"],["showPrice",""],["src","../../../assets/images/api-loader.gif","alt","Loading",2,"height","18px"],[2,"text-align","left","font-weight","bold","width","10% !important"],["showTotalPrice",""],[1,"d-flex","justify-content-center","content-loader"],["src","../../../assets/images/api-loader.gif"],[1,"d-flex","justify-content-center"],["novalidate","",3,"ngSubmit"],["f","ngForm"],["id","myTabContent",1,"tab-content"],["id","cool-locker","role","tabpanel","aria-labelledby","cool-locker-tab",1,"tab-pane","fade","show","active"],[3,"branchData"],["class","gengric-email-error chekcoutError d-flex justify-content-center","style","margin-bottom: 15px",4,"ngIf"],["type","submit",1,"btn-custom","checkout-btn",3,"disabled"],[1,"mobile-shoping-btn",3,"ngClass"],l,["id","myTab","role","tablist",1,"nav","nav-tabs"],[1,"nav-item"],["data-toggle","tab","href","#cool-locker","role","tab","aria-controls","branch2","aria-selected","false",1,"nav-link",3,"ngClass","id","click"],[3,"src","alt"],[1,"pickup-box"],["href","javascript:void(0);","data-toggle","modal","data-target","#exampleModalCenter-3",1,"add-popup-btn",3,"click"],[1,"fas","fa-plus"],[1,"text-inner"],[1,"custom-radio","cart-addresses"],["type","radio","name","radio",3,"id","value","ngModel","ngModelChange","click"],[3,"for"],g,[1,"pickup-inner"],["name","pickup_time","required","",1,"form-control","calender",3,"ngModel","min","owlDateTimeTrigger","placeholder","owlDateTime","ngModelChange"],[3,"startAt","firstDayOfWeek","pickerType","hour12Timer","afterPickerClosed"],["dt2",""],["class","gengric-email-error",4,"ngIf"],["type","text","name","username",1,"form-control","clock",3,"placeholder","disabled"],[1,"gengric-email-error"],_,["class","pickup-box",4,"ngIf"],[1,"table-main-time"],[1,"time-table-inner"],d,["cols","20","name","special_wish","rows","5",1,"form-control",2,"padding","5px",3,"ngModel","ngModelChange"],["special_wishes","ngModel"],["class","gengric-email-error chekcoutError",4,"ngIf"],[1,"gengric-email-error","chekcoutError"],[1,"gengric-email-error","chekcoutError","d-flex","justify-content-center",2,"margin-bottom","15px"],[1,"thanku-section"],[1,"thanku-logo-img"],[1,"thanku-icon-row"],[1,"thanku-text",3,"innerHTML"],[1,"thanku-btn-box"],["href","javascript:void(0);",1,"btn-custom","checkout-back-btn",2,"height","auto",3,"click"],["alt","logo",3,"alt","src"],[1,"fas","fa-check"],[1,"fas","fa-times"]]},template:function(i,r){1&i&&(t.YNc(0,lt,4,2,"div",0),t.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"nav",5)(6,"ol",6)(7,"li",7)(8,"a",8),t.NdJ("click",function(){return r.redirectToHome()}),t.SDv(9,9),t.qZA()(),t.TgZ(10,"li",10),t.SDv(11,11),t.qZA()()()()()()(),t.YNc(12,he,32,14,"ng-container",12),t.YNc(13,ye,17,8,"ng-container",12)),2&i&&(t.Q6J("ngIf",1==r.checkoutLoader),t.xp6(12),t.Q6J("ngIf",0==r.showOrderStatus),t.xp6(1),t.Q6J("ngIf",1==r.showOrderStatus&&0==r.checkoutLoader))},dependencies:[y.mk,y.sg,y.O5,T._Y,T.Fj,T._,T.JJ,T.JL,T.Q7,T.On,T.F,k.sZ,k.BO,k.hV,at,st.GJ,A.X$],styles:[".verfuegbar-nowrap[_ngcontent-%COMP%]{white-space:normal;word-break:break-word;overflow-wrap:break-word}.lead-time-text[_ngcontent-%COMP%]{display:inline;font-size:.75rem;font-weight:600;margin-right:4px}.lead-time-text-sub[_ngcontent-%COMP%]{display:inline;font-size:.75rem;margin-top:0}.back-checkout-css[_ngcontent-%COMP%]{margin-top:20px;
1display:flex;justify-content:space-between;flex-direction:row}.back-checkout-css-logged-in[_ngcontent-%COMP%]{margin-top:20px;display:flex;justify-content:center;flex-direction:row}.no-cart-option-found[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:center}.cart-addresses[_ngcontent-%COMP%]{border-bottom:solid 1px #a1a1a1;padding-bottom:5px;margin-top:5px}.number-input.disabled[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.number-input.disabled[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{cursor:not-allowed}.row-loader[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.row-loader[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:20px;height:20px}.delete-icon.disabled[_ngcontent-%COMP%]{opacity:.6;cursor:not-allowed}.number-input[_ngcontent-%COMP%]{position:relative}"]})}return n})()}];let be=(()=>{class n{static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275mod=t.oAB({type:n});static#i=this.\u0275inj=t.cJS({imports:[O.Bz.forChild(xe),O.Bz]})}return n})();var Ae=p(6858),Pe=p(636);let ke=(()=>{class n{static#t=this.\u0275fac=function(i){return new(i||n)};static#e=this.\u0275mod=t.oAB({type:n});static#i=this.\u0275inj=t.cJS({providers:[D.$,b.Kz],imports:[y.ez,be,T.u5,T.UX,Q.m,Ae.UsersModule,Pe.kb]})}return n})()}}]);

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.