PageSourceSearch

https://www.blockfloete.eu/_next/static/chunks/399.d34720b4b15f4239.js

js blockfloete.eu collected 2026-09-28 13:56:07 UTC 163,415 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4f9e8b32-8aae-4d34-89a6-bd47ff3984ed",e._sentryDebugIdIdentifier="sentry-dbid-4f9e8b32-8aae-4d34-89a6-bd47ff3984ed")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[399],{5399:(e,t,a)=>{let s,i,r,o,n,l,c,p,u,h,g,m,x,v,y;a.r(t),a.d(t,{SingleWrap:()=>e_,default:()=>eb});var f=a(7876),j=a(4232),_=a(2735),b=a(9156),N=a(875),k=a(194);class w extends j.Component{componentDidMount(){this.loadedDone()}loadedDone(){let e=this.state.response;var t=e.id;this.state.inputValueQuantity[t]=1;var a=0;a=1===parseInt(e.offered,10)?parseFloat(e.price-e.price*e.offeredDiscount/100):parseFloat(e.price),this.state.inputValuePrice[t]=a.toFixed(2),this.state.inputValuePriceHold[t]=a.toFixed(2),this.setState({inputValueQuantity:this.state.inputValueQuantity,inputValuePrice:this.state.inputValuePrice,inputValuePriceHold:this.state.inputValuePriceHold});var s=JSON.parse(window.appStorage.getItem("foodCartData"));s=s?s.length:0,N.A.cartNotification(s)}showhidedesc(e){var t=document.getElementsByClassName("description less "+e),a=void 0!==t[0]&&k.A.hasClass(t[0],e),s="";!0===a&&(s=document.getElementsByClassName("showdescMore"),k.A.addClass(s[0],"on"),k.A.removeClass(t[0],"less")),!1===a&&(t=document.getElementsByClassName("description "+e),s=document.getElementsByClassName("showdescMore"),k.A.addClass(t[0],"less"),k.A.removeClass(s[0],"on"))}thisSlideChange(e){var t=this.state.response;if(void 0===e){var a=void 0!==document.getElementsByClassName("description less "+t.id)[0],s=document.getElementsByClassName("showdescMore");!0===a&&k.A.removeClass(s[0],"on"),!1===a&&k.A.addClass(s[0],"on")}var i=+(t.description.length>0);this.setState({activeProductId:t.id,activeProductCatid:t.catId,activeProductDescription:i})}setQuntity(e){let t=e.currentTarget.getAttribute("data-id"),a=e.currentTarget.getAttribute("data-type"),s=this.state.inputValueQuantity;"sub"===a?s[t]-=1:s[t]+=1,s[t]<1&&(s[t]=1),this.setState({inputValueQuantity:s})}changeCustomData(e){var t=this,a=t.state.response,s=a.id,i=t.state.inputValuePriceHold[s],r="";a.customOption.forEach(function(e,o){var n=a.customSelect[o],l="";e.row.forEach(function(e,a){if(n&&n.length>0){for(var r=0;r<n.length;r++)if(parseInt(n[r],10)===parseInt(a,10)){var o=e.row_price;"p"===e.row_pricetype&&(i=parseFloat(i)+parseFloat(o)),"m"===e.row_pricetype&&(i=parseFloat(i)-parseFloat(o)),t.state.inputValuePrice[s]=i.toFixed(2);var c=e.row_title;l=l+c+", ",t.setState({inputValuePrice:t.state.inputValuePrice})}}}),""!==l&&(l=l.slice(0,-1),r=r+e.title+" : "+l+" | ")}),t.state.inputValueCustomBind[s]=r.slice(0,-2),t.setState({inputValueCustomBind:t.state.inputValueCustomBind})}foodcourtAddToCartProduct(e){var t=this;window.pageData.languageSetting;var a=e.target.getAttribute("data-productId");let s=document.getElementById("quantity").value;var i=t.state.response;if(""===s||!Number(s))return N.A.alert(window.pageData.languageSetting.Product_Quantity_should_be_greater_than_Zero),!1;if(!1===t.validcart(a,0))return window.preloader(!1),!1;if(!(0,_.sU)(i,s))return!1;var r=t.state.inputValueCustomBind[a],o=t.state.inputValuePrice[a];(0,_.bE)(t.state.response,t.state.vendorDetail.id,parseInt(s),r,o,function(e){t.props.addToCartDone(),window.backPopup()}),window.backPopup()}validcart(e,t){var a=this.props.page.languageSetting,s=this.state.response,i=0,r="";if(s.customOption.map(function(e,t){var a=s.customSelect?s.customSelect[t]:[];"1"===e.req&&(a?a.length<=0&&(r=e.title,i=1):(r=e.title,i=1))}),1===i)return N.A.alert(a.please_select_required_option+" "+r),!1}validatedCart(){var e=this.state.response,t=0;return e.customOption.map(function(a,s){var i=e.customSelect?e.customSelect[s]:[];"1"===a.req&&(i?i.length<=0&&(t=1):t=1)}),1!==t}selectTopping(e){let t=this,a=e.currentTarget,s=parseInt(a.getAttribute("data-index")),i=parseInt(a.getAttribute("data-row")),r=this.state.response;r.customSelect||(r.customSelect=[]),r.customSelect[s]||(r.customSelect[s]=[]);let o=r.customOption[s];"option"===o.option_box?r.customSelect[s].length&&i===r.customSelect[s][0]?r.customSelect[s]=[]:r.customSelect[s]=[i]:parseInt(o.option_max)===r.customSelect[s].length?-1===r.customSelect[s].indexOf(i)||r.customSelect[s].splice(r.customSelect[s].indexOf(i),1):-1===r.customSelect[s].indexOf(i)?r.customSelect[s].push(i):r.customSelect[s].splice(r.customSelect[s].indexOf(i),1),t.setState({response:r},function(){t.changeCustomData()})}render(){var e=this,t=e.props.page;e.props.index;var a=t.languageSetting,s=t.styleAndNavigation,i={color:s.button[3],background:s.button[2],width:"110px","text-align":"center"};if(!e.state.response)return(0,f.jsx)(_.wq,{});let r=e.state.response;var o="";("Veg"===r.foodType||"Non-Veg"===r.foodType)&&(o=(0,f.jsx)("span",{className:"icon appyicon-veg-nonveg",style:{color:"Veg"===r.foodType?"green":"Non-Veg"===r.foodType?"red":"",fontSize:"22px"}}));var n="",l="";(0,_.qz)(r.offered)&&(0,_.qz)(r.offeredDiscount)?n=(0,f.jsxs)("p",{children:[(0,f.jsx)("str
1ike",{children:N.A.currencyFomatterStore(e.props.data,r.price,r.currency)}),(0,f.jsx)("b",{children:(0,f.jsxs)("span",{id:"productPrice",children:[" ",(0,f.jsx)("b",{style:{color:s.activeColor},children:N.A.currencyFomatterStore(e.props.data,e.state.inputValuePrice[r.id],r.currency)})," ",null!==r.offeredDiscount?"("+r.offeredDiscount+"%)":""]})})]}):(l="0.00"===r.price||"0"===r.price?" priceShowHide":"",n=(0,f.jsxs)("p",{className:"price "+l,children:[" ",(0,f.jsxs)("span",{id:"productPrice",price:r.price,children:[N.A.currencyFomatterStore(e.props.data,e.state.inputValuePrice[r.id],r.currency)," "]})," "]}));var c="/images/no-image.jpg";r.productImage.forEach(function(e){"image"===e.type&&(c=e.url)});var p=(0,f.jsxs)("a",{className:"add-cart",style:{color:s.button[3],background:s.button[2]},"data-productId":r.id,"data-index":0,"data-orderOutofstock":r.orderOutofstock,id:"addtocartid",onClick:e.foodcourtAddToCartProduct,children:[(0,f.jsx)("i",{className:"icon-cart"})," ",a.add_to_order]});return(0,_.qz)(r.orderOutofstock)&&!(0,_.qz)(r.quantity)&&(p=(0,f.jsxs)("a",{className:"addtoCartbtn appyicon-blocked-cart",style:i,children:[" ",(0,f.jsx)("i",{className:"icon-cart"})," ",a.add_to_order]})),(0,_.qz)(r.availablefororder)||(p=(0,f.jsxs)("a",{className:"addtoCartbtn appyicon-blocked-cart",style:i,children:[" ",(0,f.jsx)("i",{className:"icon-cart"})," ",a.add_to_order]})),e.validatedCart()||(p=(0,f.jsxs)("a",{className:"add-cart disabled",style:{color:s.button[3],background:s.button[2]},children:[" ",(0,f.jsx)("i",{className:"icon-cart"})," ",a.add_to_order]})),(0,f.jsxs)("div",{className:"product-details-poupu hideImageAll-".concat(s.hideImage),style:{backgroundColor:"#fff"},children:[(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"X"}),(0,f.jsxs)("div",{className:"scroll-area",children:[(0,f.jsxs)("div",{className:"name-details",children:[(0,f.jsx)(b._V,{ratio:"1x1",src:c}),(0,f.jsxs)("div",{className:"name",children:[o,(0,f.jsx)("span",{className:"p-name",children:(0,f.jsxs)("b",{children:[" ",r.name]})}),n,(0,f.jsx)("span",{className:"content",dangerouslySetInnerHTML:{__html:r.description}}),(0,f.jsxs)("span",{className:"cart-btn",children:[(0,f.jsx)("a",{className:"cstm-btn",onClick:e.setQuntity,"data-id":r.id,"data-type":"sub",children:"-"}),(0,f.jsx)("input",{type:"text",id:"quantity",value:e.state.inputValueQuantity[r.id],className:"edit-value qtyFle ".concat(s.content[1]),readOnly:!0}),(0,f.jsx)("a",{className:"cstm-btn right",onClick:e.setQuntity,"data-id":r.id,"data-type":"add",children:"+"})]})]}),(0,f.jsxs)("div",{className:"quantity",children:[(0,f.jsx)("strong",{children:a.quantity_food}),(0,f.jsxs)("sapn",{children:["(",r.weightValue,")"]})]})]}),(0,f.jsx)("div",{className:"custum-area",children:r.customOption.map(function(t,a){let s=[];return r.customSelect&&r.customSelect[a]&&(s=r.customSelect[a]),(0,f.jsxs)("div",{className:"toppings ".concat(t.option_box),children:[(0,f.jsxs)("strong",{children:[t.title," ","1"===t.req?" *":""]}),(0,f.jsx)("span",{children:(0,f.jsx)("ul",{children:t.row.map(function(t,i){let o="";return -1!==s.indexOf(i)&&(o="on"),(0,f.jsxs)("li",{children:[(0,f.jsxs)("label",{className:o,"data-index":a,"data-row":i,onClick:e.selectTopping,children:[" ",t.row_title]}),(0,f.jsxs)("sapn",{className:"right",children:[" ",N.A.currencyFomatterStore(e.props.data,t.row_price.toFixed(2),r.currency)]})]})})})})]})})})]}),(0,f.jsx)("div",{className:"btn-cont",children:p})]})}constructor(e){super(e),this.state={activeProductId:"",activeProductCatid:"",activeProductDescription:"",activeProductPrice:"",inputValueQuantity:[],inputValuePrice:[],inputValuePriceHold:[],inputValueCustomBind:[],response:e.response.productDetail,vendorDetail:e.response.vendorDetail,toppings:[]},this.thisSlideChange=this.thisSlideChange.bind(this),this.showhidedesc=this.showhidedesc.bind(this),this.setQuntity=this.setQuntity.bind(this),this.changeCustomData=this.changeCustomData.bind(this),this.foodcourtAddToCartProduct=this.foodcourtAddToCartProduct.bind(this),this.validcart=this.validcart.bind(this),this.loadedDone=this.loadedDone.bind(this),this.selectTopping=this.selectTopping.bind(this)}}class C extends j.Component{componentDidMount(){var e=this;e.props.allCartData?e.getconfigurationfoodSettings():(0,_.Sw)(e.props.page).then(function(t){let a=t.configurationFoodCourt,s=t.foodCartData,i=t.vendorDetails;e.setState({configurationFoodCourt:a,foodCartData:s,vendorDetails:i},function(){e.props.next&&setTimeout(function(t){e.createFoodTip()},1e3),e.getconfigurationfoodSettings()})})}componentWillReceiveProps(e){let t=this;e.allCartData&&this.setState({configurationFoodCourt:e.allCartData.configurationFoodCourt,foodCartData:e.allCartData.foodCartData,vendorDetails:e.allCartData.vendorDetails},function(){t.getconfigurationfoodSettings()}),e.deliveryDetails&&this.setState({deliveryDetails:e.deliveryDetails},function(){t.getconfigurationfoodSettings()})}createFoodTip(e){let t=this;if(t.props.page.setting.is_tip_allowed&&t.state.foodCartData&&t.state.foodCartData.length&&window.noUiSlider){let e=t.rootRef.current;var a=e?e.querySelector(".tipAmountSlider"):null;a&&(window.noUiSlider.create(a,{start:[0],step:1,connect:!0,range:{min:0,max:100}}),a.noUiSlider.on("update",function(e,a){let s=t.state.configurationFoodCourt;e[0]=parseFloat(e[0]);var i=parseFloat(t.state.cartCalculation.subtotal)*parseFloat(e[0]/100);s.tipAmountValue=t.roundValue(i),t.setState({configurationFoodCourt:s},function(){t.getconfigurationfoodSettings()})}))}}getconfigurationfoodSettings(){if(!this.state.foodCartData.length)return!1;let e=this.state.configurationFoodCourt,t=this.state.foodCartData,a=this.state.vendorDetails,s={subtotal:0,discountPrice:0,couponDiscount:0,taxPrice:0,miscTax:0,tipAmountValue:0,vendordiscount:0,deliveryPrice:0,grandtotal:0,currency:"",deliveryRate:"",storeAddressDelivery:"",data:[{key:"subtotal",text:"subtotal_food"},{key:"discountPrice",text:"discount_food"},{key:"couponDiscount",text:"coupon_food"}
1,{key:"taxPrice",text:"tax_food"},{key:"miscTax",text:"",data:[]},{key:"vendordiscount",text:"restaurant_discount"},{key:"tipAmountValue",text:"tip_food"},{key:"deliveryPrice",text:"shipping_food"},{key:"grandtotal",text:"grand_total_food"}]};if(t.forEach(function(e){s.subtotal=parseFloat(s.subtotal)+parseFloat(e.inputValuePrice*e.inputValueQuantity),s.currency=e.currency}),s.grandtotal=s.subtotal,a.vendor_discount&&(s.vendordiscount=parseFloat(s.subtotal*parseFloat(a.vendor_discount)/100),s.grandtotal=s.grandtotal-s.vendordiscount),this.props.next){var i=e.discount,r=e.tax,o=e.miscTax;let t=0;i.forEach(function(e){let a=!1;"="===e.discountRule?s.subtotal===parseFloat(e.totalAmount)&&(a=!0):">="===e.discountRule&&s.subtotal>=parseFloat(e.totalAmount)&&(a=!0),a&&("Flat"===e.discountType?parseFloat(e.discountPrice)>parseFloat(s.subtotal)?t+=s.subtotal:t+=parseFloat(e.discountPrice):t+=parseFloat(s.subtotal)*parseFloat(e.discountPrice)/100)}),s.discountPrice=t,s.grandtotal=s.grandtotal-s.discountPrice,e.couponActualDiscount&&("percentage"===e.couponType?s.couponDiscount=parseFloat(s.subtotal)*parseFloat(e.couponActualDiscount)/100:s.couponDiscount=parseFloat(e.couponActualDiscount)),s.grandtotal=s.grandtotal-s.couponDiscount;let a=0;r.forEach(function(e){let t=!1;"="===e.taxRule?parseFloat(s.subtotal)===parseFloat(e.totalAmount)&&(t=!0):">="===e.taxRule&&parseFloat(s.subtotal)>=parseFloat(e.totalAmount)&&(t=!0),t&&("Flat"===e.taxRate?a+=parseFloat(e.taxPrice):a+=parseFloat(s.subtotal)*parseFloat(e.taxPrice)/100)}),s.taxPrice=a,s.grandtotal=s.grandtotal+s.taxPrice;let l=0;if(o.forEach(function(e){let t=0;t="Flat"===e.taxRate?parseFloat(e.taxAmount):parseFloat(s.subtotal)*parseFloat(e.taxAmount)/100,s.data[4].data.push({text:e.taxType,amount:t}),l+=t}),s.miscTax=l,s.grandtotal=s.grandtotal+s.miscTax,this.state.deliveryDetails){let e=this.state.deliveryDetails;for(var n in e)s[n]=e[n];s.grandtotal=s.grandtotal+s.deliveryPrice}e.tipAmountValue&&(s.tipAmountValue=parseFloat(e.tipAmountValue),"pickup"!==this.state.deliveryDetails.paymentMethodType&&(s.grandtotal=s.grandtotal+parseFloat(e.tipAmountValue)))}localStorage.setItem("cartCalculation",JSON.stringify(s)),this.setState({cartCalculation:s})}roundValue(e){return parseFloat(e).toFixed(2)}updateCart(e){var t=e.target.getAttribute("data-index"),a=e.target.getAttribute("data-typeAction"),s=JSON.parse(localStorage.getItem("foodCartData"));if("delete"===a){for(var i=0;i<=s.length;i++)parseInt(t,10)===parseInt(i,10)&&s.splice(i,1);this.setState({foodCartData:s}),s=JSON.stringify(s),localStorage.setItem("foodCartData",s),this.getconfigurationfoodSettings();var r=JSON.parse(localStorage.getItem("foodCartData"));r=void 0===r?0:r.length,N.A.cartNotification(r)}}setQuntity(e,t){var a=this;if(a.props.allCartData)a.props.setQuntity(e,t);else{let i=!1;if(a.props.next&&a.state.foodCartData&&1===a.state.foodCartData.length&&1===a.state.foodCartData[0].inputValueQuantity&&"sub"===t&&(i=!0),i)N.A.confirmation(s.are_you_sure_want_to_delete_the_card,"",s.dir_remove,s.cancel_social_network,function(){let s=_.Td.setQuntity(a.props.page,e,t);a.setState({foodCartData:s},function(){a.props.cartUpdate&&(console.log(s),a.props.cartUpdate(s)),a.getconfigurationfoodSettings()})},function(e){});else{let s=_.Td.setQuntity(a.props.page,e,t);a.setState({foodCartData:s},function(){a.getconfigurationfoodSettings()})}}}setValueCoupon(e){this.setState({couponCode:e.target.value})}
1removeCoupon(e){var t=this;t.state.configurationFoodCourt.couponActualDiscount=void 0,t.state.configurationFoodCourt.couponType=void 0,t.setState({couponCode:e.target.value},function(){t.getconfigurationfoodSettings()}),t.setState({couponCode:""})}AppyCouponFun(){var e=this,t=e.state.couponCode,a=e.props.page.languageSetting,s=JSON.parse(localStorage.getItem("vendordata"));s=s.id,(0,_.$X)(e.props.page.config,{method:"foodCoupon",appId:e.props.page.appid,couponCode:t,vendorId:s},function(t){"success"===t.status?(N.A.alert(a.Coupon_Applied),e.state.configurationFoodCourt.couponActualDiscount=t.coupon.couponDiscount,e.state.configurationFoodCourt.couponType=t.coupon.discountType,e.setState({configurationFoodCourt:e.state.configurationFoodCourt}),e.getconfigurationfoodSettings()):N.A.alert(a.coupon_not_valid_food)})}minimumCartValue(e){var t=window.currencySymbol(this.state.cartCalculation.currency);if(parseFloat(this.state.cartCalculation.subtotal)<parseFloat(this.state.configurationFoodCourt.otherRules.shipmentMinorder))try{return N.A.alert(this.props.page.languageSetting.minimum_amount_should_be+" "+t+this.state.configurationFoodCourt.otherRules.shipmentMinorder,""),!1}catch(e){console.log("error",e)}else N.A.routerMove(this.props.page,"billing-form")}render(){var e=this,t=e.props.page,a=t.languageSetting,s=t.styleAndNavigation,i="/images/cart.png";let r="",o="food-court-wrapper";e.props.type&&(o="order-section show top-0");let n=(0,f.jsx)("div",{className:"btn-cont",children:(0,f.jsxs)("a",{onClick:this.minimumCartValue,className:s.button[0]+" "+s.button[1],style:{color:s.button[3],background:s.button[2]},children:[a.continue_food," "]})}),l="",c={};if(e.props.next&&(n=(0,f.jsx)("div",{className:"btn-cont",children:(0,f.jsxs)("a",{onClick:e.props.next,className:s.button[0]+" "+s.button[1],style:{color:s.button[3],background:s.button[2]},children:[a.checkout_food," "]})})),e.props.next){n=(0,f.jsx)("div",{className:"btn-cont",children:(0,f.jsxs)("a",{onClick:e.props.next,className:s.button[0]+" "+s.button[1],style:{color:s.button[3],background:s.button[2]},children:[a.checkout_food," "]})});let t=(0,f.jsx)("a",{className:"bold",onClick:e.AppyCouponFun,children:a.apply_food}),i=(0,f.jsx)("input",{className:"input-control",type:"text",placeholder:a.enter_your_coupon_code_if_you_have_one_food,id:"couponCode",name:"couponCode",value:e.state.couponCode,onChange:e.setValueCoupon});e.state.configurationFoodCourt.couponActualDiscount&&(t=(0,f.jsx)("a",{className:"bold",onClick:e.removeCoupon,children:a.dir_remove}),i=(0,f.jsx)("input",{className:"input-control",type:"text",placeholder:a.enter_your_coupon_code_if_you_have_one_food,id:"couponCode",name:"couponCode",value:e.state.couponCode,readOnly:!0})),l=(0,f.jsxs)("div",{className:"offers",children:[(0,f.jsx)("i",{className:"appyslim-ecommerce-discount-coupon"}),i,t]}),c={},e.state.deliveryDetails&&"pickup"===e.state.deliveryDetails.paymentMethodType&&(c={display:"none"})}let p="";if(e.state.foodCartData.length){p=e.state.foodCartData.map(function(t,a){let i={"background-image":"url(/images/no-image.jpg)"};t.productImage&&t.productImage.forEach(function(e){(0,_.qz)(e.mainImage)&&"image"===e.type&&(i={"background-image":"url("+e.url+")"})});var r="";void 0!==t.inputValueCustomBind&&""!==t.inputValueCustomBind&&(r=(0,f.jsx)("small",{className:"addons active-color",children:t.inputValueCustomBind.split("|").join(",")}));var o=parseFloat(t.inputValuePrice*t.inputValueQuantity).toFixed(2);return(0,f.jsxs)("li",{children:[(0,f.jsx)("a",{"data-productId":t.id,"data-index":a,"data-typeAction":"delete",onClick:e.updateCart,className:"delete",style:{background:s.button[2],color:s.button[3]},children:"X"}),(0,f.jsx)("span",{className:"img-view",children:(0,f.jsx)("img",{src:"/images/image-1x1.png",style:i})}),(0,f.jsxs)("span",{className:"product-details",children:[(0,f.jsx)("span",{className:"cat-icon veg"}),(0,f.jsx)("span",{className:"product-name",children:t.name}),(0,f.jsxs)("span",{className:"price",children:[(0,f.jsx)("i",{className:""})," ",N.A.currencyFomatterStore(e.props.data,o,t.currency)]})]}),(0,f.jsx)("span",{className:"customize",children:(0,f.jsxs)("span",{className:"cart-btn",children:[(0,f.jsx)("a",{className:"cstm-btn",onClick:()=>e.setQuntity(a,"sub"),"data-type":"sub",value:t.inputValueQuantity,"data-productId":t.id,"data-i":a,children:"-"}),(0,f.jsx)("input",{type:"text",className:"edit-value",value:t.inputValueQuantity}),(0,f.jsx)("a",{className:"cstm-btn right",onClick:()=>e.setQuntity(a,"add"),"data-type":"add",value:t.inputValueQuantity,"data-productId":t.id,"data-i":a,children:"+"})]})}),r]})}),p=(0,f.jsx)("ul",{children:p});let i="",u=e.state.cartCalculation;u&&(i=u.data.map(function(i){let r=(0,f.jsx)("span",{style:{float:"right"},children:N.A.currencyFomatterStore(e.props.data,parseFloat(u[i.key]).toFixed(2),u.currency)}),o="";if("couponDiscount"===i.key&&(o=(0,f.jsx)("a",{className:"remove-coupon",onClick:e.removeCoupon,style:{color:s.activeColor,display:"none"},children:a.dir_remove})),"tipAmountValue"===i.key)if(!e.props.next)return null;else if(parseInt(t.setting.is_tip_allowed,10))return(0,f.jsxs)("li",{style:c,children:[a[i.text]," ",r,(0,f.jsx)("div",{id:"tipAmountSlider",className:"tipAmountSlider",style:{margin:"33px 0 20px 0"}})]});else return null;if("miscTax"===i.key)if(i.data)return i.data.map(function(t){return(0,f.jsxs)("li",{className:i.key,children:[t.text," ",(0,f.jsx)("span",{style:{float:"right"},children:N.A.currencyFomatterStore(e.props.data,parseFloat(t.amount).toFixed(2),u.currency)})]})});else return null;return u[i.key]?(0,f.jsxs)("li",{className:i.key,children:[a[i.text]," ",o," ",r]}):null})),r=(0,f.jsxs)("div",{className:o,ref:e.props.type?e.rootRef:null,children:[(0,f.jsx)("h4",{className:"title-heading ".concat(s.heading[0]," ").concat(s.heading[1]),children:a.My_Orders_food}),(0,f.jsxs)("small",{className:"total-items",children:[" ",e.state.foodCartData.length," ",a.items_mcom]}),(0,f.jsxs)("div",{className:"product-list cart-view",children:[p,(0,f.jsx)("div",{className:"price-details",children:(0,f.jsxs)("div",{className:"left-pan",children:[(0,f.jsx)("h4",{className:"".concat(s.heading[0]," ").concat(s.heading[1]),style:{color:s.heading[2]},children:a.payment_details_food}),(0,f.jsx)("ul",{children:i})]})}),l,n]})]})}else r=e.props.type?(0,f.jsxs)("div",{className:"".concat(o," no-bg"),ref:e.rootRef,children:[(0,f.jsx)("strong",{className:"empty-cart ".concat(s.heading[0]," ").concat(s.heading[1]),children:a.your_cart_is_empty_food}),(0,f.jsx)("div",{className:"error-cart",children:(0,f.jsx)("img",{src:"/images/image-1x1.png",style:{backgroundImage:"url("+i+")"}})})]}):(0,f.jsx)("div",{className:"".concat(o," no-bg"),children:(0,f.jsxs)("div",{className:"error-cart",children:[(0,f.jsx)("img",{src:"/images/image-4x1.png",style:{backgroundImage:"url("+i+")",minHeight:"240px"}}),(0,f.jsx)(b.YU,{page:this.props.page,className:"paynowbtn popupToPage "+s.button[0]+" "+s.button[1],style:{color:s.button[3],background:s.button[2]},children:a.continue_shopping_food})]})});return e.props.type?r:(0,f.jsxs)("div",{className:"food-court-page",ref:e.rootRef,children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:a.cart_food,url:"viewcart"}}),r]})}constructor(e){super(e);let t=[],a=[],i=null;e.allCartData&&(t=e.allCartData.configurationFoodCourt,a=e.allCartData.foodCartData,i=e.allCartData.vendorDetails);let r=null;e.deliveryDetails&&(r=e.deliveryDetails),s=e.page.languageSetting,this.state={configurationFoodCourt:t,foodCartData:a,vendorDetails:i,cartCalculation:null,couponCode:"",couponResponce:[],deliveryDetails:r},this.rootRef=j.createRef(),this.getconfigurationfoodSettings=this.getconfigurationfoodSettings.bind(this),this.updateCart=this.updateCart.bind(this),this.setQuntity=this.setQuntity.bind(this),this.setValueCoupon=this.setValueCoupon.bind(this),this.Ap
1pyCouponFun=this.AppyCouponFun.bind(this),this.roundValue=this.roundValue.bind(this),this.createFoodTip=this.createFoodTip.bind(this),this.removeCoupon=this.removeCoupon.bind(this),this.minimumCartValue=this.minimumCartValue.bind(this)}}class D extends j.Component{loadAllCategories(){let e=this,t={method:"categoryDetail",appId:e.props.page.appid,vendorId:e.props.category,lang:e.props.page.lang},a=[];(0,_.$X)(e.props.page.config,t,function(t){t.categoryData&&(t.categoryData.forEach(e=>{parseInt(e.parent_id)||a.push(e)}),t.categoryData.forEach(e=>{parseInt(e.parent_id)&&a.forEach(function(t){e.parent_id===t.id&&(t.categories||(t.categories=[]),t.categories.push(e))})})),e.setState({allCategories:a},function(){let t=e.rootRef.current;t&&t.querySelectorAll(".catogary-list a")[0]&&t.querySelectorAll(".catogary-list a")[0].click()})})}componentDidMount(){let e=this;(0,_.Sw)(e.props.page).then(function(t){e.setState({allCartData:t})}),this.loadData(this.props),this.loadAllCategories()}searchFood(e){this.setState({text:e.currentTarget.value.trim()}),13===e.keyCode&&N.A.routerMove(this.props.page,this.props.category,"food-search?text="+this.state.text)}loadData(e){let t=this;(0,_.bQ)(e.page.config,"vendor",{appId:e.page.appid,vendorId:e.category}).then(function(a){let s=null;a.vendorList&&a.vendorList.list&&(s=a.vendorList.list),(0,_.bQ)(e.page.config,"rootCategory",{appId:e.page.appid,vendorId:e.category,lang:e.page.lang}).then(function(a){a.categoryList&&(s.data=a.categoryList);let i="restaurant-open";e.page.setting.advance_booking||k.A.GetOpenCloseVendor(s,t.props.page)||(i="restaurant-closed"),t.setState({data:s,isOpen:i})})})}loadCategory(e){let t=this,a=t.props.page,s=t.state.data;t.state.allCategories;let i=t.state.allProductList,r=[];(0,_.bQ)(a.config,"category",{catId:e.id,appId:a.appid,lang:a.lang,page:1,pageNo:1,vendorId:s.id}).then(function(a){a.productList&&(a.productList.sort((e,t)=>e.name.localeCompare(t.name)),a.productList.forEach(function(e){-1===r.indexOf(e.catId)&&(r.push(e.catId),i[e.catId]=[]),i[e.catId].push(e)})),t.setState({allProductList:i,activeCategory:e});let s=t.rootRef.current;if(s&&s.querySelectorAll(".catogary-list li")&&s.querySelectorAll(".catogary-list li").length){s.querySelectorAll(".catogary-list li").forEach(function(e,t){e.classList.remove("active")}),s.querySelectorAll(".tab-details .product-list").forEach(function(e,t){e.classList.remove("active")});let t=s.querySelector(".catogary-list li[data-id='"+e.id+"']"),a=s.querySelector(".tab-details .product-list[data-id='"+e.id+"']");t&&(t.classList.add("active"),a.classList.add("active"))}})}productDetail(e){let t=this;(0,_.Z_)(t.props.page,t.props.category,function(a){(0,_.EM)(t.props.category,e.catId,e.id,t.props.page,function(e){N.A.domRender((0,f.jsx)(w,{data:t.props.data,page:t.props.page,response:{productDetail:e,vendorDetail:a},addToCartDone:t.addToCartDone}),window.createPopup())})})}setQuntity(e,t,a){let s=this,i=this.state.allCartData;a&&_.Td.checkCustom(a)?_.Td.openCustom(s.props.page,a,t,s.productDetail,function(e){i.foodCartData=e,s.setState({allCartData:i})}):(i.foodCartData=_.Td.setQuntity(s.props.page,e,t),s.setState({allCartData:i}))}addToCartDone(e){let t=this;(0,_.Sw)(t.props.page).then(function(e){t.setState({allCartData:e})})}getProductList(e){let t=this,{foodType:a}=t.state,s=null;return this.state.allProductList[e]&&this.state.allProductList[e].length&&(s=this.state.allProductList[e].filter(function(e){return""===a||a===e.foodType}).map(function(e){return(0,f.jsx)(_.B8,{data:e,appData:t.props.data,vendorId:t.props.category,category:t.state.subCategory,page:t.props.page,productDetail:t.productDetail,setQuntity:t.setQuntity,foodCartData:t.state.allCartData.foodCartData,addToCartDone:t.addToCartDone})})),s}searchMenu(e){let t=e.currentTarget.value.trim().toLowerCase(),a=e.currentTarget.getAttribute("data-id"),s=document.querySelector(".product-list[data-id='"+a+"']");if(""===t)s.querySelectorAll(".product-li").forEach(function(e){e.style.display="inline-flex"}),s.querySelectorAll(".pt-5").forEach(function(e){e.style.display="block"}),s.querySelector(".not-found").style.display="none";else{s.querySelectorAll(".pt-5").forEach(function(e){e.style.display="none"});let e=!1;s.querySelectorAll(".product-li").forEach(function(a){a.querySelector(".product-name")&&(-1===a.querySelector(".product-name").innerText.toLowerCase().indexOf(t)?a.style.display="none":(a.style.display="inline-flex",e=!0))}),e?s.querySelector(".not-found").style.display="none":s.querySelector(".not-found").style.display="block"}}changeFilterType(e){this.setState({foodType:e})}render(){var e=this;if(!e.state.data)return(0,f.jsx)(_.wq,{preloader:!0});var t=e.props.page;let a=t.languageSetting;var s=t.styleAndNavigation,i=e.state.data;let r=(0,f.jsx)(b.$D,{}),o="";""===o&&(o=(0,f.jsx)(b.$D,{}));let n="hide-cat";i.data&&i.data.length&&(n="",r=i.data.map(function(t){return(0,f.jsx)("li",{children:(0,f.jsx)("a",{onClick:()=>e.loadCategory(i.id,t.id),children:t.name})})}));let l="";e.state.allCategories&&(e.state.allCategories.length&&(r=e.state.allCategories.map(function(t){return(0,f.jsx)("li",{"data-id":t.id,children:(0,f.jsx)("a",{onClick:()=>
1e.loadCategory(t),children:t.name})})})),r=(0,f.jsx)("ul",{className:"catogary-list sticky",children:r}),l=e.state.allCategories.map(function(t){let i="",r=!0,o="";e.getProductList(t.id)&&(o=e.getProductList(t.id),r=!1),t.categories&&t.categories.length&&(i=t.categories.map(function(t){return e.getProductList(t.id)?(r=!1,(0,f.jsxs)("div",{className:"sub-product-view",children:[(0,f.jsx)("p",{className:"pt-5",children:t.name}),(0,f.jsx)("ul",{className:"open",children:e.getProductList(t.id)})]})):null}));let n="active";return r?(r={display:"block"},n="no-data"):r={display:"none"},(0,f.jsxs)("div",{className:"product-list done ".concat(n),"data-id":t.id,children:[(0,f.jsxs)("div",{className:"indicator",children:[(0,f.jsx)("span",{className:"icon-down-open up"}),(0,f.jsx)("span",{className:"icon-down-open down"})]}),(0,f.jsxs)("strong",{className:"fixed-sticky ".concat(s.heading[0]," ").concat(s.heading[1]),children:[(0,f.jsx)("b",{className:"p-name",onClick:()=>e.loadCategory(t),children:t.name}),(0,f.jsxs)("div",{className:"search-section",children:[(0,f.jsx)("i",{className:"icon-search"}),(0,f.jsx)("input",{placeholder:a.search_food,onInput:e.searchMenu,"data-id":t.id})]}),(0,f.jsx)("div",{className:"filter_by_name ".concat(s.content[1]),children:[{key:"",text:a.All},{key:"Veg",text:a.Veg_Only},{key:"Non-Veg",text:a.Non_Veg_Only}].map(function(t){let a="";return t.key===e.state.foodType&&(a="on"),(0,f.jsx)("label",{className:"type-filter ".concat(a),onClick:()=>e.changeFilterType(t.key),children:t.text})})})]}),(0,f.jsxs)("div",{className:"product-view",children:[(0,f.jsx)("ul",{className:"open",children:o}),i,(0,f.jsx)("div",{className:"not-found",style:r,children:(0,f.jsx)(b.$D,{})})]})]})}));let c=(0,f.jsx)(_.NP,{data:e.props.data,page:e.props.page,vendorDetail:i}),p=(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:t,category:i.id+"-details",children:a.overview?a.overview:"Overview"})});0===t.setting.vendorDetailsPage&&(p="");let u="food-court-page",h="food-court-wrapper bgTransparent",g=(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:i.name,url:i.id},image:i.shareImage}),m={},x=s.pageBgColor;"2"===s.layout&&(x="",u="wrapper",h="container",m={background:s.pageBgColor,borderRadius:"20px 20px 0 0"},g=(0,f.jsx)("div",{className:"container",children:(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:i.name,url:i.id},image:i.shareImage})}));let v="no-cart";return(0,_.mH)()&&(v="yes-cart"),(0,f.jsxs)("div",{className:"".concat(u," ").concat(e.state.isOpen," ").concat(v," ").concat(e.props.data.appData.homeImageDisplay),ref:this.rootRef,children:[g,(0,f.jsxs)("div",{className:"food-Order",style:{background:x},children:[c,(0,f.jsxs)("ul",{className:"tabs-view sticky",children:[p,(0,f.jsx)("li",{className:"on",children:(0,f.jsx)(b.YU,{page:t,category:i.id,children:a.order_online?a.order_online:"Order Online"})}),(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:t,category:i.id,subcategory:"reviews",children:a.user_review_food})})]}),(0,f.jsxs)("div",{className:h,style:m,children:[(0,f.jsx)("div",{className:"details-cont",children:(0,f.jsxs)("div",{className:"tab-details ".concat(n),children:[r,l]})}),(0,f.jsx)("div",{className:"order-section sticky",children:e.state.allCartData?(0,f.jsx)(C,{page:e.props.page,data:e.props.data,type:!0,allCartData:e.state.allCartData,setQuntity:e.setQuntity}):null})]})]})]})}constructor(e){super(e),this.state={data:e.response,productList:[],text:"",allCategories:[],activeCategory:{},allCartData:{vendorDetails:null,foodCartData:[],configurationFoodCourt:null},allProductList:{},isOpen:"restaurant-open",foodType:""},this.rootRef=j.createRef(),this.loadData=this.loadData.bind(this),this.searchFood=this.searchFood.bind(this),this.loadCategory=this.loadCategory.bind(this),this.productDetail=this.productDetail.bind(this),this.loadAllCategories=this.loadAllCategories.bind(this),this.getProductList=this.getProductList.bind(this),this.setQuntity=this.setQuntity.bind(this),this.addToCartDone=this.addToCartDone.bind(this),this.changeFilterType=this.changeFilterType.bind(this)}}class S extends j.Component{componentDidMount(){this.loadData(this.props)}loadData(e){let t=this,a=t.state.vendorDetail;
1(0,_.cw)(e.page,function(e){e.length&&e.forEach(e=>{a.id==e&&(a.favoriteList=1,t.setState({vendorDetail:a}))})})}foodcourtAddRemoveWishlist(e){var t=this,a=t.props.page,s=a.languageSetting;let i=t.state.vendorDetail;var r=i.id,o=e.target.getAttribute("data-wishlisttype");if(!N.A.getUser().email)return N.A.redirectLogin(a,t.props.category),!1;var n=k.A.getLoginEmail();(0,_.$X)(t.props.page.config,{method:"addVendorFavourite",appId:t.props.page.appid,email:n,vendorId:r,vendorlistType:o},function(e){"added"==e.msg?(i.favoriteList=1,N.A.alert(i.name+" "+s.added_to_your_favorite_list)):(i.favoriteList=0,N.A.alert(i.name+" "+s.removed_from_your_favorite_list)),t.setState({vendorDetail:i})})}openGallery(e){}shareContent(){let e=this.state.vendorDetail;N.A.shareContent(e.name,e.name,window.location.href)}render(){var e=this;if(!e.state.vendorDetail)return(0,f.jsx)(_.wq,{preloader:!0});var t=e.props.page,a=e.state.vendorDetail,s=t.languageSetting,i=t.styleAndNavigation,r="";e.state.vendorDetail&&(r=(0,f.jsx)(_.NP,{data:e.props.data,page:e.props.page,vendorDetail:e.state.vendorDetail}));var o="",n={"background-image":"url(/images/no-image.jpg)"};a.imgList&&a.imgList.map(function(s){return"video"===s.type?o="video"===s.type?(0,f.jsxs)("div",{className:"swiper-slide",onClick:()=>e.openGallery(t.image),children:[(0,f.jsx)("img",{src:"/images/image-2x1.png",className:"swiper-lazy",alt:"abc"}),(0,f.jsx)("div",{className:"video-icon icon-play-circle2-1"})]}):(0,f.jsxs)("div",{className:"swiper-slide",onClick:()=>e.openGallery(t.image),children:[(0,f.jsx)("img",{src:"/images/image-2x1.png",className:"swiper-lazy",style:{backgroundImage:"url(http://img.youtube.com/vi/{{youtubeID name}}/default.jpg)"},alt:"abc"}),(0,f.jsx)("div",{className:"video-icon icon-play-circle2-1"}),(0,f.jsx)("div",{className:"preloader"})]}):(n={"background-image":"url("+s.name+")"},s.name,o=(0,f.jsxs)(b.YU,{page:t,category:a.id,children:[" ",(0,f.jsx)("li",{className:"dashboard-image",style:n,children:(0,f.jsx)("img",{src:"/images/image-2x1.png",alt:a.name})})," "]})),(0,f.jsx)("div",{className:"swiper-slide",children:o})});t.setting.share_restra&&e.shareContent;a.favoriteList,e.foodcourtAddRemoveWishlist;var l=k.A.configArrayFilter(a.configList,"delivery_min_duration");l=void 0!==l?l+" "+s.var_minutes:"",i.subheading[0],i.subheading[1],i.subheading[2],s.payment_method_food,k.A.andsymbolhelper(a.payment_method[0],a.payment_method[1],s);var c=k.A.configArrayFilter(a.configList,"pickup_min_duration");c&&(c=(0,f.jsxs)("li",{children:[(0,f.jsxs)("span",{className:i.subheading[0]+" "+i.subheading[1],style:{color:i.subheading[2]},children:[s.time_to_pickup," "]}),(0,f.jsx)("span",{className:"box",children:c+" "+s.var_minutes})]}));let p=(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:t,category:a.id,subcategory:"reviews",children:s.user_review_food})});0===t.setting.review_onOff&&(p="");let u="food-court-page",h="food-court-wrapper bgTransparent",g=(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:a.name,url:a.id+"-details"},image:a.shareImage}),m={},x=i.pageBgColor;"2"===i.layout&&(x="",u="wrapper",h="container",m={background:i.pageBgColor,borderRadius:"20px 20px 0 0"},g=(0,f.jsx)("div",{className:"container",children:(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:a.name,url:a.id+"-details"},image:a.shareImage})}));var v=(0,f.jsxs)("section",{className:"food-Order",style:{backgroundColor:x},children:[r,(0,f.jsxs)("ul",{className:"tabs-view sticky",children:[(0,f.jsx)("li",{className:"on",children:(0,f.jsx)(b.YU,{page:t,category:a.id+"-details",children:s.overview?s.overview:"Overview"})}),(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:t,category:a.id,children:s.order_online?s.order_online:"Order Online"})}),p]}),(0,f.jsxs)("div",{className:h,style:m,children:[(0,f.jsx)("div",{className:"details-cont",children:(0,f.jsx)("div",{className:"about-review",children:(0,f.jsx)("div",{className:"tabset",children:(0,f.jsx)("div",{className:"tab-panels",children:(0,f.jsx)("section",{id:"overview",className:"tab-panel active",children:(0,f.jsxs)("div",{className:"about-restaurant",children:[(0,f.jsx)("strong",{children:s.about_restaurant}),(0,f.jsx)("p",{className:"scroll-view",dangerouslySetInnerHTML:{__html:a.description}})]})})})})})}),(0,f.jsx)("div",{className:"order-section sticky",children:(0,f.jsx)(C,{page:e.props.page,data:e.props.data,t
1ype:!0})})]})]});let y="no-cart";return(0,_.mH)()&&(y="yes-cart"),(0,f.jsxs)("div",{className:"".concat(u," ").concat(y),children:[g,v]})}constructor(e){super(e),this.state={vendorDetail:e.response},this.foodcourtAddRemoveWishlist=this.foodcourtAddRemoveWishlist.bind(this),this.loadData=this.loadData.bind(this),this.shareContent=this.shareContent.bind(this)}}class A extends j.Component{render(){var e=this.props.page,t=e.languageSetting;let a=t.Terms_and_Conditions;if("privacy_policy"===this.props.type&&(a=t.privacy_policy_food),!this.state.response)return(0,f.jsx)(_.wq,{title:a});var s=e.styleAndNavigation;s.heading[2],s.heading[0],s.heading[1],this.state.response.id;var i="";return i=this.state.response.req?(0,f.jsx)("div",{className:"food-court-wrapper",children:(0,f.jsx)("div",{children:(0,f.jsx)("span",{dangerouslySetInnerHTML:{__html:this.state.response.req}})})}):(0,f.jsx)(b.$D,{}),(0,f.jsxs)("div",{className:"food-court-page",children:[(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:a,url:this.props.category}}),i]})}constructor(e){super(e),this.state={response:e.response}}}class V extends j.Component{componentDidMount(){this.rootRef.current&&N.A.createSlidePage(this.rootRef.current)}render(){var e=this.props.page;if(!this.state.orderDetails)return(0,f.jsx)(_.wq,{});var t=void 0!==this.state.orderDetails?this.state.orderDetails:[],a=e.languageSetting,s=e.styleAndNavigation,i=void 0!==t?this.state.chatRoom[t.vendorId]:[];e.pageTitle=(0,f.jsxs)("div",{className:"topHeader",children:[a.My_Orders_food," ",(0,f.jsx)("span",{className:"locate",children:(0,f.jsxs)("span",{style:{color:s.headerBarTextColor,textTransform:"uppercase"},children:[a.order_id_food," #",t.orderId]})})]});var r="",o="";"Cancelled"===t.status&&(o=(0,f.jsxs)("div",{className:"messageTrackingWp",children:[(0,f.jsx)("h2",{children:a.foodcourt_cancelled}),(0,f.jsx)("p",{children:t.comments_if_cancel})]}));var n="";if("Pending"===t.status){var l="";l="pickup"!==t.orderType?(0,f.jsxs)("div",{className:"processing",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}):(0,f.jsxs)("div",{className:"processing picUpTrack",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}),n=(0,f.jsxs)("div",{className:"ns-stepper approved mt10",data:"1",children:[(0,f.jsxs)("div",{className:"discussed",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.order_accepted}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4 icon-ok-4"})]}),(0,f.jsxs)("div",{className:"approved",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.in_the_kitchen}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}),l,(0,f.jsxs)("div",{className:"complete",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.enjoy_the_meal}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]})]})}var c="";if("Processing"===t.status){var p="";p="pickup"!==t.orderType?(0,f.jsxs)("div",{className:"processing",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}):(0,f.jsxs)("div",{className:"processing picUpTrack",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}),c=(0,f.jsxs)("div",{className:"ns-stepper approved mt10",data:"2",children:[(0,f.jsxs)("div",{className:"discussed",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.order_accepted}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4 icon-ok-4"})]}),(0,f.jsxs)("div",{className:"approved",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.in_the_kitchen}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}),p,(0,f.jsxs)("div",{className:"complete",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.enjoy_the_meal}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]})]})}var u="";if("pickup"!==t.orderType&&"In Transit"===t.status){var h="";h="pickup"!==t.orderType?(0,f.jsxs)("div",{className:"processing mapviewtrack",children:[(0,f.jsx)("span",{onClick:()=>N.A.openNative("call",i.storecontactus.contactus_phone),className:1===
1parseInt(e.setting.delivery_boy_on_off,10)?"callIcon iconz-phone1":""}),(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}):(0,f.jsxs)("div",{className:"processing picUpTrack",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}),u=(0,f.jsxs)("div",{className:"ns-stepper approved mt10",data:"3",children:[(0,f.jsxs)("div",{className:"discussed",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.order_accepted}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4 icon-ok-4"})]}),(0,f.jsxs)("div",{className:"approved",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.in_the_kitchen}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}),h,(0,f.jsxs)("div",{className:"complete",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.enjoy_the_meal}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]})]})}var g="";"Complete"===t.status&&(h="pickup"!==t.orderType?(0,f.jsxs)("div",{className:"processing",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}):(0,f.jsxs)("div",{className:"processing picUpTrack",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.on_the_way}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})," "]}),g=(0,f.jsxs)("div",{children:[(0,f.jsxs)("div",{className:"ns-stepper approved mt10",data:"4",children:[(0,f.jsxs)("div",{className:"discussed",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.order_accepted}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4 icon-ok-4"})]}),(0,f.jsxs)("div",{className:"approved",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.in_the_kitchen}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]}),h,(0,f.jsxs)("div",{className:"complete",children:[(0,f.jsx)("span",{className:"stepper-title",children:a.enjoy_the_meal}),(0,f.jsx)("span",{className:"stepper-point icon-ok-4"})]})]}),(0,f.jsx)("ul",{className:"myOrderTracking",children:(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:this.props.page,category:"my-orders",subcategory:this.state.orderDetails.orderId,listing:"post-review",className:"viewItem pull-left "+s.button[0]+" "+s.button[1],style:{color:s.button[3],background:s.button[2]},children:a.post_review_food})})})]}));var m="";m="pickup"!==t.orderType?"Complete"!==t.status?(0,f.jsx)("p",{children:a.delivery_time_food}):(0,f.jsx)("p",{children:a.Delivered_time}):"Complete"!==t.status?(0,f.jsx)("p",{children:a.Pickup_time_food}):(0,f.jsx)("p",{children:a.Delivered_time});var x="";if(void 0!==i){var v="",y="",j="",w="";void 0!==i.storecontactus.contactus_phone&&(v=(0,f.jsx)("span",{onClick:()=>N.A.openNative("call",i.storecontactus.contactus_phone),children:(0,f.jsx)("i",{className:"iconz-phone1"})})),void 0!==i.storecontactus.contactus_email&&(y=(0,f.jsx)("span",{children:(0,f.jsxs)("a",{style:{color:s.iconColor},href:"mailto:"+i.storecontactus.contactus_email,children:[" ",(0,f.jsx)("i",{className:"icon-email"})]})})),void 0!==i.storecontactus.contactus_smsno&&(j=(0,f.jsx)("span",{children:(0,f.jsxs)("a",{style:{color:s.iconColor},href:"sms:"+i.storecontactus.contactus_smsno,children:[" ",(0,f.jsx)("i",{className:"icon-mobile-2",children:" "})]})})),void 0!==i.storecontactus.contactus_websiteurl&&(w=(0,f.jsx)("span",{children:(0,f.jsxs)("a",{target:"_blank",style:{color:s.iconColor},href:i.storecontactus.contactus_websiteurl,children:[" ",(0,f.jsx)("i",{className:"icon-globe-3"})]})})),x=(0,f.jsxs)("div",{children:[v," ",y,"  ",j," ",w]})}var C="";return C=(0,f.jsx)("div",{className:"toolbar blackPan",children:(0,f.jsx)("div",{className:"toolbar-inner toolbar-bottom",style:{backgroundColor:s.button[2],color:s.button[3]},children:(0,f.jsxs)("div",{className:"innerbottomPan "+s.button[0]+" "+s.button[1],children:[(0,f.jsx)("time",{children:"Complete"!==t.status?t.deliveryPickupTime:k.A.delivertimefoodcourt(t.orderLastUpdateDate)}),m,x]})})}),r=(0,f.jsxs)("div",{className:"orderTracking",children:[o,n,c,u,g]}),(0,f.jsx)("div",{ref:this.rootRef,className:"slide-popup-show ".concat(s.content[0]," ").concat(s.content[1]," content-").concat(s.content[3]," heading-").concat(s.heading[3]),style:{color:s.menu[2],background:s.menu[0]},children:(0,f.jsxs)("div",{className:"slide-popup-wrap slide-popup-food",children:[(0,f.jsxs)("h1",{className:"topHeader",children:[(0,f.jsx)("a",{className:"close link icon-cancel",onClick:()=>window.backPopup(),style:{color:s.settingPage.settingPageContent}}),a.track_my_order,(0,f.jsx)("span",{className:"locate",children:(0,f.jsxs)("span",{style:{color:s.headerBarTextColor,textTransform:"uppercase"},children:[a.order_id_food," #",t.orderId]})})]}),r,C]})})}constructor(e){super(e),e.orderDetails?this.state={orderDetails:e.orderDetails,productDetails:e.productDetails,chatRoom:e.chatRoom}:this.state={orderDetails:e.response.orderDetails,productDetails:e.response.productDetails,chatRoom:e.response.chatRoom},this.rootRef=j.createRef()}}class I extends j.Component{componentDidMount(){let e=this,t=e.state.orderDetails;(0,_.$X)(e.props.page.config,{method:"reviewDetail",appId:e.props.page.a
1ppid,orderId:t.orderId,emailId:e.props.page.config.email,vendorId:t.vendorId},function(t){"success"===t.status&&(console.log("success",t),e.setState({reviewId:t.list.id})),"update"===t.status&&(console.log("update",t),e.setState({reviewId:t.list.id}))})}getrating(e){var t=e.target.getAttribute("data-alt");let a=this.state.reviewValue;if(a.reviewRating=t,this.setState({reviewValue:this.state.reviewValue}),parseInt(t,10)>1)for(var s=1;s<=parseInt(t,10);s++)document.getElementById("rat"+s).src="/images/star-on-big.png";if(5>parseInt(t,10)){t=parseInt(t,10)+1;for(var i=parseInt(t,10);i<=5;i++)document.getElementById("rat"+i).src="/images/star-off-big.png"}this.setState({reviewValue:a})}setValue(e){var t=e.target.getAttribute("data-id"),a=e.target.value;this.state.reviewValue[t]=a,this.setState({reviewValue:this.state.reviewValue})}checkAllValue(e){let t=0,a=this.state.reviewValue;return(""!==a.comentInputTxt&&t++,""!==a.InputTitle&&t++,""!==a.reviewRating&&t++,3===t)?"":"disabled"}submitReview(e){var t=this,a=t.props.page.languageSetting;if(void 0===t.state.reviewValue.reviewRating)return N.A.alert(a.please_add_your_review_rating),!1;if(void 0===t.state.reviewValue.InputTitle)return N.A.alert(a.please_review_food),!1;if(void 0===t.state.reviewValue.comentInputTxt)return N.A.alert(a.please_enter_review_food),!1;var s=t.state.response,i="";t.state.reviewId&&(i=t.state.reviewId);var r=s.id;(0,_.$X)(t.props.page.config,{method:"addReview",appId:t.props.page.appid,email:k.A.getLoginEmail(),productId:r,title:t.state.reviewValue.InputTitle,review:t.state.reviewValue.comentInputTxt,rating:t.state.reviewValue.reviewRating,vendorId:t.state.orderDetails.vendorId,reviewId:i,status:window.pageData.setting.review_auto_approval},function(e){"success"===e.status&&(0===t.props.page.setting.review_auto_approval?N.A.alert(a.hyp_Rating_and_Comment_alert_with_review):N.A.alert(a.your_review_successfuly_food),window.backPopup())})}render(){var e=this.props.page,t=e.languageSetting,a=e.styleAndNavigation;return(0,f.jsx)("div",{className:"food-court-wrapper popup-review",children:(0,f.jsxs)("div",{className:"review-page",children:[(0,f.jsx)("a",{onClick:()=>window.backPopup(),className:"close",children:"X"}),(0,f.jsx)("h2",{className:a.heading[0]+" "+a.heading[1],style:{color:a.heading[2]},children:t.write_a_review_food}),(0,f.jsxs)("div",{className:"post-review",children:[(0,f.jsx)("div",{className:"rating",children:(0,f.jsxs)("b",{style:{cursor:"pointer",width:"100px"},children:[(0,f.jsx)("img",{src:"/images/star-off-big.png",id:"rat1","data-alt":"1",alt:"1",title:"bad","data-id":"rat1",onClick:this.getrating}),"\xa0",(0,f.jsx)("img",{src:"/images/star-off-big.png",id:"rat2","data-alt":"2",alt:"2",title:"poor","data-id":"rat2",onClick:this.getrating}),"\xa0",(0,f.jsx)("img",{src:"/images/star-off-big.png",id:"rat3","data-alt":"3",alt:"3",title:"regular","data-id":"rat3",onClick:this.getrating}),"\xa0",(0,f.jsx)("img",{src:"/images/star-off-big.png",id:"rat4","data-alt":"4",alt:"4",title:"good","data-id":"rat4",onClick:this.getrating}),"\xa0",(0,f.jsx)("img",{src:"/images/star-off-big.png",id:"rat5","data-alt":"5",alt:"5",title:"gorgeous","data-id":"rat5",onClick:this.getrating}),(0,f.jsx)("input",{type:"hidden",name:"score"})]})}),(0,f.jsxs)("div",{className:"input-cont",children:[(0,f.jsx)("label",{children:this.props.page.languageSetting.review_title_food}),(0,f.jsx)("input",{placeholder:this.props.page.languageSetting.review_title_food,value:this.state.reviewValue.InputTitle,"data-id":"InputTitle",id:"InputTitle",type:"text",onChange:this.setValue})]}),(0,f.jsxs)("div",{className:"input-cont",children:[(0,f.jsx)("label",{children:t.write_a_review_food}),(0,f.jsx)("textarea",{id:"comentInputTxt","data-id":"comentInputTxt",placeholder:t.please_enter_the_review_text_food,onChange:this.setValue,value:this.state.reviewValue.comentInputTxt,placeholder:"Write a Review"})]}),(0,f.jsx)("a",{value:t.post_review_food,onClick:this.submitReview,type:"button",className:"".concat(a.button[0]," ").concat(a.button[1]," ").concat(this.checkAllValue()),style:{color:a.button[3],background:a.button[2]},children:t.post_review_food})]})]})})}constructor(e){super(e),this.state={reviewValue:{comentInputTxt:"",InputTitle:"",reviewRating:""},orderDetails:e.response.orderDetails,productDetails:e.response.productDetails,chatRoom:e.response.chatRoom,response:e.response,reviewId:e.response.response},this.getrating=this.getrating.bind(this),this.setValue=this.setValue.bind(this),this.submitReview=this.submitReview.bind(this),this.checkAllValue=this.checkAllValue.bind(this)}}class P extends j.Component{componentDidMount(){let e=this,t=e.props.page;(0,_.Z_)(t,e.props.response.orderDetails.vendorId,function(t){e.setState({vendorData:t})})}reviewPopup(e){N.A.domRender((0,f.jsx)(I,{page:e.props.page,data:e.props.data,response:e.props.response,category:e.props.category,subCategory:e.props.subCategory}),window.createPopup())}render(){var e=this,t=e.props.page,a=e.state.vendorData;if(!e.state.vendorData||(e.props.data,!e.state.orderDetails))return(0,f.jsx)(_.wq,{});var s=e.state.orderDetails,i=e.state.productDetails,r=t.languageSetting,o=t.styleAndNavigation;let n="";i.productList&&(n=i.productList.map(function(e){return(0,f.jsxs)("li",{children:[(0,f.jsxs)("span",{className:"product-details",children:[(0,f.jsx)("span",{className:"cat-icon veg"}),(0,f.jsx)("span",{className:"product-name",children:e.productName}),(0,f.jsxs)("span",{className:"price",children:[(0,f.jsx)("i",{className:""}),(0,f.jsxs)("price",{children:["$ ",e.price]})]})]}),(0,f.jsx)("span",{className:"customize img",children:(0,f.jsxs)("span",{className:"customize img",style:{"text-align":"right"},children:[(0,f.jsx)("span",{children:r.quantity_food}),(0,f.jsx)("b",{children:e.quantity})]})}),(0,f.jsx)("p",{className:"active-color",children:e.custom_option})]})}));let l="",c="",p="",u="";s.shipping&&(s.shipping.phone&&(u=(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.phone_food}),(0,f.jsx)("span",{children:s.shipping.phone})]})),s.shipping.address&&(l=(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.shipped_to}),(0,f.jsxs)("span",{children:[s.shipping.name," ",s.shipping.address," ",s.shipping.city,",",s.shipping.country," ",s.shipping.zip,", ",s.shipping.phone]}
1)]}),c=(0,f.jsxs)("h3",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:[r.shipping_address_food," "]}),p=(0,f.jsx)("li",{className:"full",children:(0,f.jsx)("label",{className:"targetRadio other",children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:s.shipping.name}),s.shipping.address," ",(0,f.jsx)("br",{}),s.shipping.phone]})})})));let h="";s.billing&&(h=(0,f.jsx)("li",{className:"full",children:(0,f.jsx)("label",{className:"targetRadio other",children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:s.billing.name}),s.billing.address," ",(0,f.jsx)("br",{}),s.billing.phone]})})}));var g=(0,f.jsxs)("span",{children:[" ",k.A.cusinelisthelper(a.cousinList)," "]}),m=(0,f.jsx)("a",{onClick:()=>(0,_.jk)(a.id),children:(0,f.jsxs)("span",{className:"box",style:{color:e.props.page.styleAndNavigation.content[2]},children:[" ",k.A.GetOpenCloseVendorText2(a,e.props.page)," "]})});let x=[{key:"subtotal",text:"subtotal_food"},{key:"vendorDiscount",text:"restaurant_discount"},{key:"discount",text:"discount_food"},{key:"coupon",text:"coupon_food"},{key:"tax",text:"tax_food"},{key:"misctax",text:"Misc"},{key:"tip",text:"Tip"},{key:"delivery",text:"Delivery_Charge"},{key:"gtotal",text:"grand_total_food"}].map(function(t){let a="";if("gtotal"===t.key&&(a="bold"),"misctax"===t.key)if(s.misctax.length)return s.misctax.map(function(t){return(0,f.jsxs)("li",{children:[(0,f.jsx)("span",{className:"left",children:r.misc}),(0,f.jsx)("span",{className:"right",children:(0,f.jsx)("price",{children:N.A.currencyFomatterStore(e.props.data,parseFloat(t.tax).toFixed(2),s.currency)})})]})});else return null;return s[t.key]?(0,f.jsxs)("li",{className:a,children:[(0,f.jsx)("span",{className:"left",children:r[t.text]}),(0,f.jsx)("span",{className:"right",children:(0,f.jsx)("price",{children:N.A.currencyFomatterStore(e.props.data,parseFloat(s[t.key]).toFixed(2),s.currency)})})]}):null}),v="";"Pending"===s.status&&(v="pending"),"Cancelled"===s.status&&(v="cancelled"),"Processing"===s.status&&(v="processing"),"In Transit"===s.status&&(v="in-transit"),"Complete"===s.status&&(v="complete");let y=(0,f.jsxs)("div",{className:"rating",children:[(0,f.jsx)("p",{className:"stars-blank",children:(0,f.jsx)("p",{className:"stars-color",style:{width:20*a.rating+"px"}})}),(0,f.jsxs)("b",{children:[" ",a.totalRatingCount," ",r.user_review_food]})]});(0===a.rating||0===t.setting.review_onOff)&&(y="");let j=k.A.configArrayFilter(a.configList,"store_mobile"),b=(0,f.jsxs)("a",{style:{background:o.button[2],color:o.button[3]},onClick:()=>N.A.openNative("call",j),children:[" ",r.Call]});"Complete"===s.status&&(b=(0,f.jsx)("a",{page:e.props.page,onClick:()=>e.reviewPopup(e),style:{background:o.button[2],color:o.button[3]},children:r.post_review_food})),0===t.setting.review_onOff&&(b="");let w=s.deliveryPickupTime,C=r.estimated_delivery_time_foodcourt;"Complete"===s.status&&(C=r.delivered,w=s.orderLastUpdateDate);let D=(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.on_the_way}),(0,f.jsx)("small",{children:s.trackingDate})]}),S="";"pickup"===s.orderType&&(D="",C=r.enjoy_the_meal,S=(0,f.jsxs)("div",{children:[(0,f.jsx)("h3",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:r.pickup_location_foodcourt}),(0,f.jsx)("ul",{className:"delivery-list",children:(0,f.jsx)("li",{children:s.vendoraddress})})]}));let A=(0,f.jsxs)("ul",{children:[(0,f.jsxs)("li",{className:"active",children:[(0,f.jsx)("strong",{children:r.order_accepted}),(0,f.jsx)("small",{children:s.orderDate})]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.in_the_kitchen}),(0,f.jsx)("small",{children:s.orderDate})]}),D,(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:C}),(0,f.jsx)("small",{children:w})]})]});return"Cancelled"===s.status&&(A=(0,f.jsxs)("ul",{children:[(0,f.jsxs)("li",{className:"active",children:[(0,f.jsx)("strong",{children:r.order_accepted}),(0,f.jsx)("small",{children:s.orderDate})]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.HYPERSTORE_ORDER_CANCELLED}),(0,f.jsx)("small",{children:w})]})]})),(0,f.jsxs)("div",{className:"food-court-page DDD",children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:r.My_Orders_food,url:"my-orders"},subcategory:{text:a.name,url:s.orderId}}),(0,f.jsxs)("div",{className:"food-court-wrapper",children:[(0,f.jsxs)("div",{className:"pull-leftpan tracking",children:[(0,f.jsxs)("div",{className:"tracking-details",children:[(0,f.jsx)("h3",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:(0,f.jsx)("b",{children:a.name})}),y,(0,f.jsxs)("p",{className:"store-time",style:{color:o.content[2]},children:[" ",(0,f.jsxs)("b",{children:[1===k.A.getStoreTime2(a,e.props.page)?r.fc_open:r.closed,"."]})," ",r.Opens," ",(0,f.jsxs)("smal",{children:[" @",m]})]}),(0,f.jsx)("p",{className:"cousin-list",children:g})]}),(0,f.jsxs)("div",{className:"order-detail-tracking",children:[(0,f.jsx)("strong",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:r.order_detail_food}),(0,f.jsxs)("ul",{children:[(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.pos_home}),(0,f.jsx)("span",{children:s.paymentMethod})]}),u,l,(0,f.jsxs)("li",{children:[(0,f.jsx)("strong",{children:r.date}),(0,f.jsx)("span",{children:s.orderDate})]})]})]}),(0,f.jsxs)("div",{className:"tracking-status",children:[(0,f.jsx)("p",{children:(0,f.jsx)("b",{children:r.instructions_foodorder})}),(0,f.jsx)("p",{className:"pb-20",children:s.pickupComment}),(0,f.jsx)("strong",{children:r.track_my_order}),(0,f.jsxs)("p",{children:[(0,f.jsx)("b",{children:r.order_id_food}),":",s.orderId]}),(0,f.jsxs)("div",{className:"tracking-process ".concat(v),children:[A,(0,f.jsx)("div",{className:"help-section",children:(0,f.jsx)("div",{className:"btn-cont secondary",children:b})})]})]}),c,(0,f.jsx)("ul",{className:"delivery-list",children:p}),S,(0,f.jsx)("h3",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:r.billing_address_food}),(0,f.jsx)("ul",{className:"delivery-list",children:h})]}),(0,f.jsxs)("div",{className:"order-section show active",children:[(0,f.jsx)("h4",{className:"".concat(o.heading[0]," ").concat(o.heading[1]),children:r.my_order}),(0,f.jsxs)("span",{className:"item",children:[" ",i.productList.length," ",r.items_mcom]}),(0,f.jsxs)("div",{className:"product-list",children:[(0,f.jsx)("ul",{children:n}),(0,f.jsx)("ul",{className:"order-details",children:x})]})]})]})]})}constructor(e){super(e),e.orderDetails?(this.state={orderDetails:e.orderDetails,productDetails:e.productDetails,vendorData:null},this.reviewPopup=this.reviewPopup.bind(this)):this.state={orderDetails:e.response.orderDetails,productDetails:e.response.productDetails,vendorData:null}}}class L extends j.Component{componentDidMount(){}render(){var e=this.props.data,t=(this.props.index,e.deliveryPickupTime.split(" "));void 0===t[1]||t[1];"Pending"!==e.status?(e.orderId,e.status):e.orderId;var a=e.orderDate;e.vendorImg&&(e.vendorName,e.vendorImg.name);let s=e.productDetails.map(function(e){return(0,f.jsxs)("small",{children:[e.pname+" x "+e.qty,","]})}),r=e.status;return"Pending"===r?r=i.pending:"Processing"===r?r=i.processing:"In Transit"===r?r=i.in_transit:"Complete"===r&&(r=i.complete),(0,f.jsx)("li",{children:(0,f.jsxs)(b.YU,{page:this.props.page,category:"my-orders",subcategory:e.orderId,children:[(0,f.jsxs)("span",{className:"order-title",children:[(0,f.jsxs)("span",{className:"title-left",children:["  ",i.order_id_food," - ",(0,f.jsxs)("b",{children:["#",e.orderId]})]}),(0,f.jsxs)("small",{className:"title-right",children:["  ",a]})]}),(0,f.jsxs)("span",{className:"order-details",children:[(0,f.jsx)("strong",{children:e.vendorName}),(0,f.jsx)("span",{className:"addons",children:s}),(0,f.jsxs)("span",{className:"order-status",children:[i.status,": ",(0,f.jsx)("b",{className:"active-color",children:r})]})]})]})})}constructor(...e){super(...e),this.clickHandler=e=>{e.preventDefault(),"track-order"===e.currentTarget.getAttribute("data-type")&&this.props.ordertrack(this.props.data),"order-details"===e.currentTarget.getAttribute("data-type")&&this.props.detail(this.props.data)}}}class T extends j.Component{componentDidMount(){N.A.redirectLogin(this.props.page,"my-orders")}gotoOrderDetail(e){var t=this;window.preloader(!0),(0,_.$X)(t.props.page.config,{method:"foodOrderProductDetail",appId:t.props.page.a
1ppid,orderId:e.orderId,emailId:k.A.getLoginEmail(),lang:window.data.appData.lang,vendorId:e.vendorId},function(a){window.preloader(!1),N.A.domRender((0,f.jsx)(P,{data:window.data,page:window.pageData,productDetails:a,orderDetails:e,chatRoom:t.state.chatRoom}),window.createPopup())})}showTabs(e){var t=this.rootRef.current;t&&t.querySelectorAll(".foodTabView").forEach(function(a,s){s===e?(a.style.display="block",t.querySelectorAll(".foodTabs div")[s].classList.add("active")):(a.style.display="none",t.querySelectorAll(".foodTabs div")[s].classList.remove("active"))})}ordertrack(e){N.A.domRender((0,f.jsx)(V,{page:window.pageData,orderDetails:e,chatRoom:this.state.chatRoom}),window.createPopup())}render(){var e=this,t=e.props.page;if(i=t.languageSetting,t.styleAndNavigation,!e.state.orderList)return(0,f.jsx)(_.wq,{title:i.My_Orders_food});var a=e.state.orderList,s="",r=0,o="",n=0,l="";return a.length>0?(0===(o=a.map(function(t,a){return"Complete"!==t.status&&"Cancelled"!==t.status?(r++,(0,f.jsx)(L,{page:e.props.page,appData:e.props.data,data:t,index:a,ordertrack:e.ordertrack,detail:e.gotoOrderDetail},a)):null}))&&(o=(0,f.jsx)(b.$D,{})),l=a.map(function(t,a){return"Complete"===t.status||"Cancelled"===t.status?(n++,(0,f.jsx)(L,{page:e.props.page,appData:e.props.data,data:t,checked:!0,index:a,ordertrack:e.ordertrack,detail:e.gotoOrderDetail},a)):null}),s=(0,f.jsx)("div",{children:(0,f.jsxs)("ul",{className:"foodTabView",children:[o,l]})})):s=(0,f.jsxs)("div",{className:"msg-container",children:[" ",(0,f.jsx)("div",{className:"msg-code",children:(0,f.jsx)("span",{className:"icon appyicon-no-data"})})]}),(0,f.jsxs)("div",{className:"food-court-page",ref:this.rootRef,children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:e.props.page.languageSetting.My_Orders_food,url:"my-orders"}}),(0,f.jsx)("div",{className:"food-court-wrapper my-orders",children:s})]})}constructor(e){super(e),this.state={orderList:e.response.orderList,chatRoom:e.response.chatRoom},this.rootRef=j.createRef(),this.ordertrack=this.ordertrack.bind(this),this.gotoOrderDetail=this.gotoOrderDetail.bind(this),this.showTabs=this.showTabs.bind(this)}}class F extends j.Component{componentDidMount(){let e=this.rootRef.current;e&&e.parentElement&&e.parentElement.classList.add("foodcourt-address-popup"),window.config.geolocation.latitude&&this.getPlusCode(window.config.geolocation.latitude,window.config.geolocation.longitude,window.config.currentAddress)}getPlusCode(e,t,a){let s=this;N.A.getPlusCodeAddress(e,t,function(i){let r={latitude:e,longitude:t,plusCodeAddress:i.address,address:a,code:i.plusCode},o=s.rootRef.current;o&&o.querySelector("#locationSearch")&&(o.querySelector("#locationSearch").value=a),s.setState({location:r,results:[]},function(){s.createMap()})})}createMap(){let e=this,t=this.state.location;N.A.loadMap(function(){let a=e.rootRef.current;if(!a)return;let s=new window.google.maps.Map(a.querySelector("#map-area"),{zoom:4,center:new window.google.maps.LatLng(t.latitude,t.longitude),mapTypeId:window.google.maps.MapTypeId.ROADMAP,scrollwheel:!0,disableDefaultUI:!0});var i,r=new window.google.maps.InfoWindow;i=new window.google.maps.Marker({position:new window.google.maps.LatLng(t.latitude,t.longitude),title:window.config.currentAddress,map:s,draggable:!0}),window.google.maps.event.addListener(i,"dragend",function(){new window.google.maps.Geocoder().geocode({latLng:i.getPosition()},function(t){if(t&&t.length>0&&i){i.setTitle(t[0].formatted_address),e.setState({location:{latitude:t[0].geometry.location.lat(),longitude:t[0].geometry.location.lng(),address:t[0].formatted_address}});let a=e.rootRef.current;a&&a.querySelector("#locationSearch")&&(a.querySelector("#locationSearch").value=t[0].formatted_address)}})}),window.google.maps.event.addListener(s,"click",function(t){e.setState({location:{latitude:t.latLng.lat(),longitude:t.latLng.lng(),address:t.formatted_address}})}),window.google.maps.event.addListener(i,"click",function(){var e="";e+='<div class="infowindow-content"><a>'+t.address+"</a><br /></div>",r.setContent(e),r.open(s,i)})})}saveData(){this.props.callback(this.state.location),window.backPopup()}searchLocation(e){var t=this,a=e.currentTarget.value;a.trim().length>2&&N.A.locationSearchNewApi(a,function(e){var a=[];e.predictions.forEach(function(e,t){a.push({address:e.description,reference:e.reference})}),t.setState({results:a})})}addItemAlertrealestae(e,t){var a=this;N.A.locationReference(t.reference,function(t){console.log("responseData",t),a.getPlusCode(t.lattitude,t.longitude,e)})}render(){let e=this,t="",a=r.search_for_your_location;return e.state.results.length&&(t=e.state.results.map(function(t,a){return(0,f.jsx)("li",{"data-reference":t.reference,onClick:()=>e.addItemAlertrealestae(t.address,t),children:t.address})}),t=(0,f.jsx)("div",{className:"listData",id:"reallocationlists",children:(0,f.jsx)("ul",{id:"weatherListrealestate",children:t})})),(0,f.jsx)("div",{className:"foodcourt-address pluscode",ref:this.rootRef,children:(0,f.jsxs)("div",{className:"foodcourt-address-form",children:[(0,f.jsxs)("h2",{className:o.heading[0]+" "+o.heading[1],style:{color:o.heading[2]},children:[a," ",(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"X"})]}),(0,f.jsxs)("div",{className:"locationDiv",children:[(0,f.jsx)("input",{type:"text",id:"locationSearch",placeholder:r.search_for_your_location,onInput:e.searchLocation}),t]}),(0,f.jsx)("div",{id:"map-area",style:{"max-height":"300px"}}),(0,f.jsx)("button",{onClick:this.saveData,children:r.done_food})]})})}constructor(e){super(e),r=this.props.data.languageSetting,o=this.props.data.styleAndNavigation,this.state={results:[],location:{latitude:window.config.geolocation.latitude,longitude:window.config.geolocation.longitude,address:window.config.currentAddress,code:""}},this.rootRef=j.createRef(),this.createMap=this.createMap.bind(this),this.searchLocation=this.searchLocation.bind(this),this.addItemAlertrealestae=this.addItemAlertrealestae.bind(this),this.getPlusCode=this.getPlusCode.bind(this),this.saveData=this.saveData.bind(this)}}let R=[{key:"name",text:"name_food",text2:"please_enter_name_food"},{key:"email",text:"ENTER_EMAILID",text2:"please_enter_email_food"}
1,{key:"phone",text:"ENTER_PHONE_NO",text2:"please_enter_telephone_food"},{key:"address",text:"address_food",text2:"please_enter_address_food"},{key:"zip",text:"pincode_foodcourt",text2:"please_enter_zip_mcom"},{key:"pluscode",text:"pincode_foodcourt",text2:"please_enter_zip_mcom"}];class O extends j.Component{componentDidMount(){let e=this.rootRef.current;if(!e)return;e.parentElement&&e.parentElement.classList.add("foodcourt-address-popup");let t=this.state.data;R.forEach(function(a){e.querySelector("#"+a.key)&&t[a.key]&&(e.querySelector("#"+a.key).value=t[a.key])})}saveAddress(){let e=this.props.page,t=this.state.data,a="";t._id&&(a=t._id);let s={method:"addAddress",appId:e.appid,userId:e.config.userid,isDefault:"0",addressId:a,cache:!1},i=this.rootRef.current;i&&(R.forEach(function(e){document.querySelector("#"+e.key)&&(t[e.key]=i.querySelector("#"+e.key).value.trim(),s[e.key]=i.querySelector("#"+e.key).value.trim())}),(0,_.$X)(e.config,s,function(e){}),this.props.saveAddress(t))}getPlusAddress(e){let t=this;N.A.domRender((0,f.jsx)(F,{data:window.pageData,callback:function(e){let a=t.rootRef.current;a&&a.querySelector("textarea")&&(a.querySelector("textarea").value=e.address)}}),window.createPopup())}render(){let e=this,t=n.add_address;return(0,f.jsxs)("div",{className:"foodcourt-address",ref:this.rootRef,children:[(0,f.jsx)("style",{children:"\n		#pluscode {\n			display:none;\n		}\n		"}),(0,f.jsxs)("div",{className:"foodcourt-address-form",children:[(0,f.jsxs)("h2",{className:l.heading[0]+" "+l.heading[1],style:{color:l.heading[2]},children:[t," ",(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"X"})]}),(0,f.jsx)("ul",{children:R.map(function(t){return"address"===t.key?(0,f.jsxs)("li",{style:{position:"relative"},children:[(0,f.jsx)("label",{className:t.key,children:n[t.text]+" *"}),(0,f.jsx)("textarea",{id:t.key,name:t.key}),(0,f.jsx)("button",{style:{position:"absolute",bottom:"5px"},onClick:e.getPlusAddress,className:"icon-location"})]}):(0,f.jsxs)("li",{children:[(0,f.jsx)("label",{className:t.key,children:n[t.text]+" *"}),(0,f.jsx)("input",{type:"text",id:t.key,name:t.key})]})})}),(0,f.jsx)("button",{onClick:this.saveAddress,children:n.dir_save_btn})]})]})}constructor(e){super(e),n=e.page.languageSetting,l=e.page.styleAndNavigation;let t={};e.address&&(t=e.address),this.state={data:t},this.rootRef=j.createRef(),this.saveAddress=this.saveAddress.bind(this),this.getPlusAddress=this.getPlusAddress.bind(this)}}class M extends j.Component{componentDidMount(){let e=this,t=e.props.page;N.A.redirectLogin(t,"saved-address")&&(0,_.$f)(t,function(t){e.setState({data:t})})}addressUpdate(e){let t=this,a=t.state.data,s=null;null!==e&&a[e]&&(s=a[e]),N.A.domRender((0,f.jsx)(O,{data:t.props.data,page:t.props.page,address:s,saveAddress:function(i){s?a[e]=i:a.push(i),t.setState({data:a},function(){window.backPopup()})}}),window.createPopup())}selectAddress(e){"popup"===this.props.type&&this.props.saveAddress(this.state.data[e])}deleteAddress(e){let t=this,a=t.props.page,s=t.state.data;(0,_.$X)(a.config,{method:"deleteAddress",appId:a.appid,userId:a.config.userid,addressId:s[e]._id,cache:!1},function(a){s.splice(e,1),t.setState({data:s})})}render(){let e=this;c.billing_address_food,"shipping"===e.props.type&&c.shipping_address_food,"contact"===e.props.type&&c.contact_information_food;let t=e.state.data.map(function(t,a){return(0,f.jsxs)("li",{children:[(0,f.jsx)("label",{className:"targetRadio other",onClick:()=>e.selectAddress(a),children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:t.name}),t.email,", ",t.phone," ",(0,f.jsx)("br",{}),t.address,", ",(0,f.jsx)("br",{}),t.zip]})}),(0,f.jsxs)("div",{className:"pull-right rightActionSide",children:[(0,f.jsx)("a",{className:"product-remove-btn","data-type":"shiping",onClick:()=>e.addressUpdate(a),children:c.edit_food}),(0,f.jsx)("a",{className:"product-remove-btn remove-btn",style:{color:p.button[3],background:p.button[2]},onClick:()=>e.deleteAddress(a),children:"X"})]})]})});return(t=(0,f.jsxs)("ul",{className:"delivery-list",children:[t,(0,f.jsx)("li",{onClick:()=>e.addressUpdate(),children:(0,f.jsxs)("label",{className:"targetRadio other add-address",children:[(0,f.jsx)("span",{className:"icon-plus-3"}),(0,f.jsxs)("p",{children:["+ ",c.add_new_address]})]})})]}),"popup"===this.props.type)?(0,f.jsx)("div",{className:"foodcourt-address",children:(0,f.jsxs)("div",{className:"foodcourt-address-form",children:[(0,f.jsxs)("h2",{className:p.heading[0]+" "+p.heading[1],style:{color:p.heading[2]},children:[c.select_address," ",(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"X"})]}),t]})}):(0,f.jsxs)("div",{className:"food-court-page",children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:c.saved_address,url:"saved-address"}}),(0,f.jsx)("div",{className:"food-court-wrapper",children:t})]})}constructor(e){super(e),c=e.page.languageSetting,p=e.page.styleAndNavigation,this.state={data:[]},this.addressUpdate=this.addressUpdate.bind(this),this.selectAddress=this.selectAddress.bind(this)}}function E(e){return(e=e.toString().match(/^([01]\d|2[0-3])(:)([0-5]\d)(:[0-5]\d)?$/)||[e]).length>1&&((e=e.slice(1))[5]=12>+e[0]?" AM":" PM",e[0]=e[0]%12||12),e.join("")}var q=new Date,U=q.getDate(),B=q.getMonth()+1,Q=q.getFullYear();U<10&&(U="0"+U),B<10&&(B="0"+B);var H=Q+"/"+B+"/"+U;let z=0,Y,J,W=function(e,t){if(new Date(t.deliveryDate).toLocaleDateString()!==new Date().toLocaleDateString())return!1;let a=new Date(t.deliveryDate+" "+t.deliveryTime),s=new Date,i=45;"pickup"===t.paymentMethodType&&e.pickupMinDuration&&parseInt(e.pickupMinDuration)&&(i=parseInt(e.pickupMinDuration)+1),"delivery"===t.paymentMethodType&&e.deliveryMinDuration&&parseInt(e.deliveryMinDuration)&&(i=parseInt(e.deliveryMinDuration)+1),s.setMinutes(s.getMinutes()+i),(s=s.toLocaleTimeString("en-GB").split(":")).pop();let r=new Date;return r.setHours(s[0]),r.setMinutes(s[1]),r.setSeconds(0),console.log(a,r),
1!(a>r)&&a.toLocaleString()!=r.toLocaleString()&&s.join(":")},G=function(e,t,a){let s=parseInt(t.preferredDeliveryTimeReq);if(2===s)if(!e.setting.allow_restra_delivery_pickup)return 2;else{let e=1,t=1;return(a.configList.forEach(function(a){"disable_delivery"===a.ConfigKey&&(0,_.qz)(a.ConfigValue)&&(e=0),"disable_pickup"===a.ConfigKey&&(0,_.qz)(a.ConfigValue)&&(t=0)}),t&&e)?2:+!!e}return 1*(1===s)};class X extends j.Component{deliveryTime(e){this.setState({deliveryTime:e}),"asap"===e&&this.calculateTime()}timePicker(e){let t=this,a=e.currentTarget,s=t.state[window.$(a).attr("data-type")],i=!0;z&&(i=!1),N.A.timePicker(e,i,function(e){s.time=a.value,"asapValue"===window.$(a).attr("data-type")?t.setState({asapValue:s}):t.setState({shipingValuePickup:s})})}timePicker2(e){let t=this,a=e.currentTarget,s=t.state.shipingValuePickup;t.state[window.$(a).attr("data-type")];let i=!0;z&&(i=!1),N.A.timePicker(e,i,function(e){s.time=a.value,t.setState({shipingValuePickup:s})})}setShipping(e){this.setState({isShipping:e.currentTarget.checked})}loadData(){var e=this;(0,_.Sw)(e.props.page).then(function(t){let a=t.configurationFoodCourt,s=t.foodCartData,i=t.vendorDetails;var r=[];r.iconOk="icon-ok-4",r.checkbox=1;let o=null;localStorage.getItem("cartCalculation")&&(o=JSON.parse(localStorage.getItem("cartCalculation"))),e.setState({configurationFoodCourt:a,foodCartData:s,vendorDetails:i,asapArray:r,cartCalculation:o,isCheckDelivery:G(e.props.page,a.otherRules,i)},function(){(0,_.$f)(e.props.page,function(t){t&&t.length?e.setState({allAddress:t,billingValue:t[0],shipingValue:t[0],pickupBillingAddress:t[0]},function(){0!==e.state.isCheckDelivery&&e.getDitanceCalculation(t[0]),e.loadedDone()}):e.loadedDone()})})})}loadedDone(){let e=this.rootRef.current;if(!e)return;let t=e.querySelector(".newsTand-MobileTab");t&&t.querySelectorAll("a")[0]&&t.querySelectorAll("a")[0].click(),this.calculateTime(),this.setCalendar()}componentDidMount(){N.A.redirectLogin(this.props.page,"billing-form")&&(this.loadData(),k.A.homeRedirect(),N.A.openLocationPopup())}
1setCalendar(){let e=this;if(e.props.page.setting.advance_booking){let t=e.rootRef.current;t&&t.querySelector(".datetime1")&&window.$(t.querySelector(".datetime1")).datepicker({dateFormat:"yy/mm/dd",minDate:0,maxDate:"6D",onSelect:function(t,a){let s=e.state[window.$(this).attr("data-type")];s.date=t,"asapValue"===window.$(this).attr("data-type")?e.setState({asapValue:s}):e.setState({shipingValuePickup:s})}})}}componentDidUpdate(){this.setCalendar()}calculateTime(){let e=this.state.configurationFoodCourt.otherRules,t=this.state.asapValue,a=this.state.shipingValuePickup;var s=new Date,i=s.getHours(),r=s.getMinutes(),o=i+Math.trunc((r+=1)/60),n=r%60,l=o+":"+n,c=o+n,p=new Date,u=p.getDate(),h=p.getMonth()+1,g=p.getFullYear();u<10&&(u="0"+u),h<10&&(h="0"+h),t.date=g+"/"+h+"/"+u,a.date=g+"/"+h+"/"+u;var m="",x="",v="",y="",f="",j="";"0"==e.preferredDeliveryTimeReq?(x=i+Math.trunc((m=r+parseInt(e.pickupMinDuration?e.pickupMinDuration:45))/60),v=m%60,v=this.twoDigitValue(v),x>=24&&v>0&&(x=Math.trunc(m/60)),a.time=c=x+":"+v):"1"==e.preferredDeliveryTimeReq?(f=i+Math.trunc((y=r+parseInt(e.deliveryMinDuration))/60),j=y%60,j=this.twoDigitValue(j),f>=24&&j>0&&(f=Math.trunc(j/60)),l=f+":"+j,z?t.time=E(l):t.time=l):"2"==e.preferredDeliveryTimeReq&&(x=i+Math.trunc((m=r+parseInt(e.pickupMinDuration))/60),v=m%60,v=this.twoDigitValue(v),x>=24&&v>0&&(x=Math.trunc(m/60)),c=x+":"+v,f=i+Math.trunc((y=r+parseInt(e.deliveryMinDuration))/60),j=y%60,j=this.twoDigitValue(j),f>=24&&j>0&&(f=Math.trunc(j/60)),l=f+":"+j,z?t.time=E(l):t.time=l,a.time=c),void 0!==e.storeAddress&&0===parseInt(e.storeAddress.length,10)&&(a.pickAddress=e.storeAddress[0]),this.setState({asapValue:t,shipingValuePickup:a})}twoDigitValue(e){return -1!==[0,1,2,3,4,5,6,7,8,9].indexOf(e)&&(e="0"+e),e}convertToJSON(e){if("billing"===e)if(!Array.isArray(this.state.billingValue))return this.state.billingValue;else var t=Object.keys(this.state.billingValue);else if("shipping"===e)if(!Array.isArray(this.state.shipingValue))return this.state.shipingValue;else var t=Object.keys(this.state.shipingValue);for(var a={},s=0;s<t.length;s++)a[t[s]]=this.state.billingValue[t[s]];return a}resetInstruction(){var e=document.querySelectorAll(".foodRadioList li label");e&&e.forEach(function(e){e.classList.remove("on")}),localStorage.setItem("instructionsFoodCourt",""),this.setState({instructionsFoodCourt:""})}valueSet(e){var t=e.target.getAttribute("data-input"),a=e.target.getAttribute("data-value"),s=e.target.getAttribute("data-billingShiplingValue"),i=e.target.value;if("billingValue"===s){this.state.billingValue[t]=i,this.setState({billingValue:this.state.billingValue});var r=this.convertToJSON("billing");window.localStorage.setItem("billingValue",JSON.stringify(r))}if("shipingValue"===s){this.state.shipingValue[t]=i,this.setState({shipingValue:this.state.shipingValue});var o=this.convertToJSON("shipping");window.localStorage.setItem("shipingValue",JSON.stringify(o))}"instructions"===s&&(document.querySelectorAll(".foodRadioList li label").forEach(function(e){e.classList.remove("on")}),e.currentTarget.classList.add("on"),a?(localStorage.setItem("instructionsFoodCourt",a),this.setState({instructionsFoodCourt:a}),document.getElementById("instruction").classList.contains("show")&&(document.getElementById("instruction").classList.remove("show"),document.getElementById("instruction").value="")):(document.getElementById("InstructionsTab").classList.add("on"),localStorage.setItem("instructionsFoodCourt",i),this.setState({instructionsFoodCourt:i}))),"shipingValuePickup"===s&&(this.state.shipingValuePickup[t]=i,this.setState({shipingValuePickup:this.state.shipingValuePickup})),"asapValue"===s&&(this.state.asapValue[t]=i,this.setState({asapValue:this.state.asapValue})),"asapValue"===s&&(this.state.asapValue[t]=i,this.setState({asapValue:this.state.asapValue}))}shiplingcheck(e){if(e.target.getAttribute("data-value"))this.state.shipingValue.shippingCheckbox="",this.state.shipingValue.iconOk="",this.setState({shipingValue:this.state.shipingValue});else{var t=this.state.billingValue;this.state.shipingValue.name=t.name,this.state.shipingValue.address=t.address,this.state.shipingValue.city=t.city,this.state.shipingValue.state=t.state,this.state.shipingValue.country=t.country,this.state.shipingValue.zip=t.zip,this.state.shipingValue.phone=t.phone,this.state.shipingValue.shippingCheckbox=1,this.state.shipingValue.iconOk="icon-ok-4",this.setState({shipingValue:this.state.shipingValue})}}to24Hour(e){var t=/([10]?\d):([0-5]\d) ([ap]m)/i.exec(e);return null==t?null:("pm"===t[3].toLowerCase()&&"12"!==t[1]?t[1]=""+(12+ +t[1]):"am"===t[3].toLowerCase()&&"12"===t[1]&&(t[1]="00"),t[1]+":"+t[2])}foodcourtercePayment(){var e=this,t=e.props.page,a=t.languageSetting;let s=e.state.deliveryDetails,i="0";var r=e.state.DeliveryActivePu;let o=e.state.asapValue,n=e.state.shipingValuePickup;if(!e.state.allAddress.length)return N.A.alert(a.please_select_a_billing_address),!1;if("delivery"===r&&"0"===e.state.checkDeliveryLocation)return N.A.alert(a.please_change_address),!1;let l=e.state.configurationFoodCourt.otherRules;var c="",p=new Date,u=p.getHours()+":"+p.getMinutes(),h=window.dateFormat(p,"YYYY/MM/dd"),g=p.getMinutes();g+=1;var m=h.split("/"),x=new Date(h+" "+u),v="",y="",f="",j="",b="",w=[];if(e.props.page.setting.mandatry_description_mandatry&&!e.state.instructionsFoo
1dCourt)return"delivery"===r?N.A.alert(a.please_select_at_least_one_instruction):N.A.alert(a.instruction_cannot_be_black),!1;if("delivery"===r){var w=[];if(Date.parse(h+" "+u)>Date.parse(o.date+" "+o.time))return N.A.alert(a.delivery_time_diff_prefer_time),!1;if("asap"===e.state.deliveryTime){let e=new Date;e.setMinutes(e.getMinutes()+(parseInt(l.deliveryMinDuration)+1)),(e=e.toLocaleTimeString("en-GB").split(":")).pop(),console.log(e.join(":"),o.time),o.time=e.join(":")}S=g+parseInt(l.deliveryMinDuration);var C=o.time,D=new Date(o.date+" "+C);if(""===C||""===D)return void N.A.alert(a.preferred_delivery_time_food);if(w.deliveryTime=C,w.deliveryDate=D,u=(p=new Date).getHours()+":"+p.getMinutes(),(h=window.dateFormat(p,"YYYY/MM/dd")).split("/"),x=new Date(h+" "+u),v=D,o.date===H){if(Date.parse(v)-Date.parse(x)<0)return void N.A.alert(a.preferred_delivery_time_food)}else if(o.date<H)return void N.A.alert(a.preferred_delivery_time_food);var S=1e3*parseInt(l.deliveryMinDuration)*60,A=Math.floor(Date.parse(v)%36e5/6e4),V=Math.ceil((v.getTime()-p.getTime())/864e5);if(o.date===H);else if(0==t.setting.advance_booking&&A<S)return void N.A.alert(a.customer_time_food+" "+l.deliveryMinDuration+" "+a.your_delivery_store_food);else if(1==parseInt(t.setting.advance_booking)&&parseInt(V)>7&&A<S)return N.A.alert(a.your_delivery_store_food),!1;if(!k.A.getStoreTime2(e.state.vendorDetails,o.time,o.date))return N.A.alert(a.this_time_order_will_not_be_accepted),!1}if("pickup"===r){var I=e.state.shipingValuePickup;if(e.state.configurationFoodCourt.otherRules.storeAddress.length>1&&void 0===n.pickAddress)return N.A.alert(a.store_address),!1;if(!n.time||!n.date)return N.A.alert(a.Please_pickup_food),!1;w.pickupTime=n.time,w.pickupDate=n.date.replace("-","/"),w.pickupDate=w.pickupDate.replace("-","/");var P=n.time;if(n.date,w.Instruction=n.pickInstructionFood,c=1e3*parseInt(e.state.configurationFoodCourt.otherRules.pickupMinDuration)*60,u=(p=new Date).getHours()+":"+p.getMinutes(),(h=window.dateFormat(p,"YYYY/MM/dd")).split("/"),x=new Date(h+" "+u),v=new Date(h+" "+e.to24Hour(n.time)),w.pickupDate===H){if(Date.parse(v)-Date.parse(x)<0)return N.A.alert(a.Please_pickup_food),!1}else if(Date.parse(w.pickupDate)<Date.parse(H))return N.A.alert(a.Please_pickup_food),!1;if(Date.parse(w.pickupDate)===Date.parse(H)){if(Date.parse(v)-Date.parse(x)<Date.parse(c))return N.A.alert(a.Please_pickup_food+" "+e.state.configurationFoodCourt.otherRules.pickupMinDuration+" "+a.minutes_food),!1}else if(Date.parse(v)<Date.parse(c))return N.A.alert(a.Please_pickup_food+" "+e.state.configurationFoodCourt.otherRules.pickupMinDuration+" "+a.minutes_food),!1;if(!k.A.getStoreTime2(e.state.vendorDetails,P,n.date))return N.A.alert(a.your_pickup_store_food),!1;if(1===parseInt(n.checkbox,10)&&1===parseInt(e.state.configurationFoodCourt.otherRules.apply_online_payment_at_pickup,10)){if(y=I.name,I.email,f=I.phone,j=I.address,bcity=I.city,bstate=I.state,b=I.zip,bcountry=I.country,null===y||""===y||void 0===y)return N.A.alert(a.please_enter_name_food),!1;if(null===f||""===f||!1===k.A.validatePhone(f)||void 0===f)return N.A.alert(a.please_enter_telephone_food),!1;if(null===j||""===j||void 0===j)return N.A.alert(a.please_enter_address_food),!1;else if(null===b||""===b||void 0===b)return N.A.alert(a.Please_enter_zip_socialapp),!1}if(!k.A.getLoginEmail())return N.A.redirectLogin(e.props.page,e.props.category),!1}var L=window.currencySymbol(e.state.cartCalculation.currency);if(parseFloat(e.state.cartCalculation.subtotal)<parseFloat(e.state.configurationFoodCourt.otherRules.shipmentMinorder)&&"delivery"===r)try{return N.A.alert(a.minimum_amount_should_be+" "+L+e.state.configurationFoodCourt.otherRules.shipmentMinorder,""),!1}catch(e){console.log("error",e)}if(parseFloat(e.state.cartCalculation.subtotal)<parseFloat(e.state.configurationFoodCourt.otherRules.shipmentMinorder)&&"pickup"===r&&1===parseInt(e.state.configurationFoodCourt.otherRules.min_order_apply,10))try{return N.A.alert(a.minimum_amount_should_be+" "+L+e.state.configurationFoodCourt.otherRules.shipmentMinorder),!1}catch(e){console.log("error",e)}e.state.billingValue.countryCode=e.state.billingValue.country,e.state.billingValue.deliveryFrom=e.state.configurationFoodCourt.otherRules.storeAddress[0],e.state.billingValue.date=h,e.state.billingValue.time=u,e.state.shipingValue.countryCode=e.state.shipingValue.country,e.state.shipingValue.deliveryFrom=e.state.configurationFoodCourt.otherRules.storeAddress[0],e.state.shipingValue.email=e.state.billingValue.email,e.state.shipingValue.name=e.state.shipingValue.name?e.state.shipingValue.name:e.state.billingValue.name,e.state.shipingValue.address=e.state.shipingValue.address?e.state.shipingValue.address:e.state.billingValue.address,e.state.shipingValue.city=e.state.shipingValue.city?e.state.shipingValue.city:e.state.billingValue.city,e.state.shipingValue.state=e.state.shipingValue.state?e.state.shipingValue.state:e.state.billingValue.state,e.state.shipingValue.country=e.state.shipingValue.country?e.state.shipingValue.country:e.state.billingValue.country,e.state.shipingValue.zip=e.state.shipingValue.zip?e.state.shipingValue.zip:e.state.billingValue.zip,e.state.shipingValue.phone=e.state.shipingValue.phone?e.state.shipingValue.phone:e.state.billingValue.phone,e.state.shipingValue.date=h,e.state.shipingValue.time=u;var T=e.convertToJSON("billing"),F=e.convertToJSON("shipping");if(localStorage.setItem("billingValue",JSON.stringify(T)),localStorage.setItem("shipingValue",JSON.stringify(F)),"pickup"===r){n.countryCode=e.state.shipingValue.country,n.deliveryFrom=e.state.configurationFoodCourt.otherRules.storeAddress.length>1?n.pickAddress:e.state.configurationFoodCourt.otherRules.storeAddress[0],n.email=e.state.billingValue.email,window.localStorage.setItem("shipingValue",JSON.stringify(n)),e.state.billingValue.deliveryFrom=e.state.configurationFoodCourt.otherRules.storeAddress.length>1?n.pickAddress:e.state.configurationFoodCourt.otherRules.storeAddress[0];var T=e.convertToJSON("billing");window.localStorage.setItem("billingValue",JSON.stringify(T)),s.deliveryTime=n.time,s.deliveryDate=n.date,s.paymentMethodType="pickup",s.onlinePaymentAtPickup=0,(0,_.qz)(e.state.configurationFoodCourt.otherRules.apply_online_payment_at_pickup)&&(s.onlinePaymentAtPickup=1),i="1"}"delivery"===r&&(s.deliveryTime=o.time,s.deliveryDate=o.date,s.paymentMethodType="delivery",i="1"),e.state.contactInfo.id||(e.state.contactInfo.id="",window.localStorage.setItem("userid",e.state.contactInfo.id)),e.state.contactInfo.name||(e.state.contactInfo.name=e.state.billingValue.name,window.localStorage.setItem("username",e.state.contactInfo.name)),e.state.contactInfo.email||(e.state.contactInfo.email=e.state.billingValue.email,window.localStorage.setItem("email",e.state.contactInfo.email)),e.state.contactInfo.phone||(e.state.contactInfo.phone=e.state.billingValue.phone,window.localStorage.setItem("phone",e.state.contactInfo.phone));let R=W(l,s);R?N.A.confirmation("".concat(a.your_pickup_time_change," ").concat(R," ").concat(a.do_you_want_to_continue),"",a.ok_mcom,a.cancel_social_network,function(){return"delivery"!==r||(o.time=R,s.deliveryTime=R,k.A.getStoreTime2(e.state.vendorDetails,o.time,o.date))?"pickup"!==r||(n.time=R,s.deliveryTime=R,k.A.getStoreTime2(e.state.vendorDetails,n.time,n.date))?void e.setState({checkDeliveryLocation:i,deliveryDetails:s,asapValue:o,shipingValuePickup:n},function(){"1"===i&&e.paymentPage()}):(N.A.alert(a.your_pickup_store_food),!1):(N.A.alert(a.this_time_order_will_not_be_accepted),!1)},function(){}):e.setState({checkDeliveryLocation:i,deliveryDetails:s},function(){"1"===i&&e.paymentPage()})}ActiveTabDeliveryPu(e){var t=e.currentTarget.getAttribute("data-type");let a=this.state.deliveryDetails;a.deliveryPrice=0,a.deliveryRate="",a.paymentMethodType=t,this.setState({DeliveryActivePu:t,deliveryDetails:a}),"delivery"===t&&this.state.shipingValue&&this.state.shipingValue.address&&this.getDitanceCalculation(this.state.shipingValue),localStorage.setItem("paymentMethodType",t);let s=this.rootRef.current;if(s){let e=s.querySelector(".newsTand-MobileTab");e&&e.querySelectorAll("a").forEach(function(e){e.classList.remove("active")})}
1e.currentTarget.classList.add("active"),this.resetInstruction()}asapCheck(e){var t=e.target.getAttribute("data-input");"asapCheckbox"===t&&(1===parseInt(this.state.asapValue.checkbox)?(this.state.asapValue.checkbox=0,this.state.asapValue.iconOk=""):(this.state.asapValue.checkbox=1,this.state.asapValue.iconOk="icon-ok-4"),this.setState({asapValue:this.state.asapValue})),"shipingValuePickupCheckbox"===t&&(1===parseInt(this.state.shipingValuePickup.checkbox)?(this.state.shipingValuePickup.checkbox=0,this.state.shipingValuePickup.iconOk=""):(this.state.shipingValuePickup.checkbox=1,this.state.shipingValuePickup.iconOk="icon-ok-4"),this.setState({shipingValuePickup:this.state.shipingValuePickup}))}getDitanceCalculation(e){let t=this,a=t.props.page,s=a.languageSetting,i=t.state.configurationFoodCourt.otherRules,r=i.storeAddress[0],o=e.address,n=i.maxDeliveryUnit,l=i.maxDeliveryDistance,c="https://maps.googleapis.com/maps/api/distancematrix/json?origins="+r.replace(/ /g,"+")+"&destinations="+o.replace(/ /g,"+")+"&units="+n+"&mode=DRIVING&key="+window.data.googlePlacesApiKey,p=t.state.deliveryDetails,u={distance:0,deliveryPrice:0,type:"Fixed",maxDistance:0};(0,_.$X)(a.config,{method:"getDistanceUser",appId:a.appid,url:c,cache:!1},function(e){let a=null;if((e=JSON.parse(e)).rows&&e.rows[0].elements&&"OK"===e.rows[0].elements[0].status&&(a=e.rows[0].elements[0]),a){p.deliveryPrice=0,p.deliveryRate="",p.storeAddressDelivery=r;var i=parseFloat(a.distance.value/1e3);if("miles"===n&&(l=parseFloat(1.60934*l),i=.621371*parseFloat(i)),""===l&&(l=1e4),u.maxDistance=l,u.distance=i,console.log(i=Math.round(parseFloat(i)),n),parseFloat(i)<=parseFloat(l)){let e=t.state.configurationFoodCourt.delivery,a=t.state.cartCalculation;if(e.length){var o=(e=e[0]).delivery_charges,c=e.distance_is_less_then,h=e.is_delivery_free,g=e.total_amount_is_greater,m=e.delivery_type;if("1"===h&&(a.subtotal>=parseFloat(g)||i<=parseFloat(c)))p.deliveryPrice=0,t.setState({checkDeliveryLocation:"1",deliveryDetails:p});else if("fixed"===m)p.deliveryPrice=parseFloat(o),p.deliveryRate=m,t.setState({checkDeliveryLocation:"1",deliveryDetails:p});else if("distance"===m){var x=e.charges_per_unit;if(x){u.distancePrice=parseInt((x=JSON.parse(x))[0].distancePrice),u.type=x[0].distancefixper;for(var v=0,y=0,f=0;f<x.length;f++){var j="",_="",b="";if(y=x[0].distanceto,"Fixed"==x[f].distancefixper){if(y=x[f].distancefixper,j=parseInt(x[f].distancefrom),b=x[f].distanceto,_=parseInt(x[f].distanceto),parseFloat(j)<=parseFloat(i)&&parseFloat(i)<=parseFloat(_)||">"===b){v=parseFloat(x[f].distancePrice).toFixed(2),u.distancePrice=parseInt(x[f].distancePrice),u.type=x[f].distancefixper;break}}else if(j=parseInt(x[f].distancefrom),_=parseInt(x[f].distanceto),b=x[f].distanceto,i>=y&&">"!=y&&"Fixed"!=y){var k="";if(parseFloat(j)<=parseFloat(i)&&parseFloat(i)<=parseFloat(_)){k=parseFloat(i).toFixed(2)-parseFloat(x[0].distanceto).toFixed(2),v=parseFloat(x[f].distancePrice).toFixed(2),v=parseFloat(k).toFixed(2)*parseFloat(v).toFixed(2),u.distancePrice=parseInt(x[f].distancePrice),u.type=x[f].distancefixper;break}if(">"===b){v=parseFloat(x[f].distancePrice).toFixed(2),v=parseFloat(k=parseFloat(i).toFixed(2)-parseFloat(x[0].distanceto).toFixed(2)).toFixed(2)*parseFloat(v).toFixed(2),u.distancePrice=parseInt(x[f].distancePrice),u.type=x[f].distancefixper;break}}else{v=0;break}}}else v=0;u.distance&&(p.deliveryPrice=parseFloat(v="Fixed"===u.type?parseInt(u.distancePrice):parseInt(u.distancePrice)*i),p.deliveryRate=m,t.setState({checkDeliveryLocation:"1",deliveryDetails:p,deliverySlot:u}))}}else p.deliveryPrice=0,p.deliveryRate="",t.setState({checkDeliveryLocation:"1",deliveryDetails:p})}else p.deliveryPrice=0,p.deliveryRate="",t.setState({checkDeliveryLocation:"0",deliveryDetails:p}),N.A.alert(s.delivery_is_location_food)}else p.deliveryPrice=0,p.deliveryRate="",t.setState({checkDeliveryLocation:"0",deliveryDetails:p}),N.A.alert(s.delivery_is_location_food)})}addressUpdate(e){let t=this,a=e.currentTarget.getAttribute("data-type");N.A.domRender((0,f.jsx)(M,{data:this.props.data,page:this.props.page,type:"popup",saveAddress:function(e){"shiping"===a?t.setState({shipingValue:e},function(){t.getDitanceCalculation(e),window.backPopup()}):"shipingValuePickup"===a?t.setState({billingValue:e,pickupBillingAddress:e},function(){window.backPopup()}):t.setState({billingValue:e},function(){window.backPopup()})}}),window.createPopup())}addAddress(e){let t=this,a=e.currentTarget.getAttribute("data-type");N.A.domRender((0,f.jsx)(O,{data:t.props.data,page:t.props.page,address:null,saveAddress:function(e){let s=t.state.allAddress;s.push(e),console.log(a,e,t.state.isShipping),t.state.isShipping?"billingValue"===a?t.setState({billingValue:e,allAddress:s},function(){window.backPopup()}):"shipingValuePickup"===a?t.setState({pickupBillingAddress:e,allAddress:s},function(){window.backPopup()}):t.setState({shipingValue:e,allAddress:s},function(){t.getDitanceCalculation(e),window.backPopup()}):t.setState({billingValue:e,shipingValue:e,allAddress:s},function(){t.getDitanceCalculation(e),window.backPopup()})}}),window.createPopup())}paymentPage(){let e=this,t=[],a=e.state.cartCalculation,s=a.currency;[{key:"subtotal",text:"subtotal_food"},{key:"discountPrice",text:"discount_food"},{key:"couponDiscount",text:"coupon_food"}
1,{key:"taxPrice",text:"tax_food"},{key:"miscTax",text:""},{key:"vendordiscount",text:"restaurant_discount"},{key:"tipAmountValue",text:"tip_food"},{key:"deliveryPrice",text:"shipping_food"},{key:"grandtotal",text:"grand_total_food"}].forEach(function(i){(0,_.Et)(a[i.key])&&t.push({key:Y[i.text],value:N.A.currencyFomatterStore(e.props.data,a[i.key],s)})}),N.A.routerMove(e.props.page,"payments")}cartUpdate(e){this.setState({foodCartData:e})}instructionToggle(e){for(var t=document.querySelectorAll(".foodRadioList li label"),a=0;a<t.length;a++)t[a].classList.remove("on");e.currentTarget.classList.add("on"),document.getElementById("instruction").classList.toggle("show")}render(){var e=this;if(e.props.page,!e.state.cartCalculation)return(0,f.jsx)(_.wq,{title:Y.checkout_food});if(!e.state.foodCartData.length)return(0,f.jsxs)("div",{className:"food-court-page",ref:this.rootRef,children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:Y.checkout_food,url:"billing-form"}}),(0,f.jsx)("div",{className:"food-court-wrapper no-bg",children:(0,f.jsxs)("div",{className:"error-cart",children:[(0,f.jsx)("img",{src:"/images/image-4x1.png",style:{backgroundImage:"url(/images/cart.png)",minHeight:"240px"}}),(0,f.jsx)(b.YU,{page:this.props.page,className:"paynowbtn popupToPage "+J.button[0]+" "+J.button[1],style:{color:J.button[3],background:J.button[2]},children:Y.continue_shopping_food})]})})]});let t={borderColor:J.borderColor,color:J.content[2]},a=e.state.vendorDetail;var s="";let i="",r="",o="";e.props.page.delivery_on_till_closing_time&&(o=(0,f.jsx)(b.YU,{page:e.props.page,category:a.id,subcategory:"store-timings",className:"view-store "+J.button[0]+" "+J.button[1],style:{color:J.button[3],background:J.button[2]},children:Y.view_storetime_food})),"later"===e.state.deliveryTime?i=(0,f.jsx)("div",{id:"later",children:(0,f.jsxs)("ul",{className:"input-control",children:[(0,f.jsxs)("li",{children:[(0,f.jsx)("i",{className:"icon-calendar-inv"}),(0,f.jsx)("input",{name:"deliveryDate",id:"dDate",type:"text",placeholder:"Preferred Delivery Time:-",readOnly:!0,className:"datetime1 "+J.content[0]+" "+J.content[1],style:t,defaultValue:e.state.asapValue.date,"data-type":"asapValue",readOnly:!0})]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("i",{className:"icon-clock-4"}),(0,f.jsx)("input",{type:"text",name:"deliveryTime",id:"dTime",placeholder:Y.preferred_deliverytime_Text_food,className:J.content[0]+" "+J.content[1],style:t,defaultValue:e.state.asapValue.time,"data-type":"asapValue",onClick:e.timePicker,readOnly:!0})]})]})}):r=(0,f.jsxs)("small",{children:[window.pageData.languageSetting.estimated_delivery_time_foodcourt," ",e.state.configurationFoodCourt.otherRules.deliveryMinDuration," ",window.pageData.languageSetting.filter_minutes]}),s=(0,f.jsxs)("div",{className:"",id:"deliveryTimececk",children:[(0,f.jsx)("style",{children:""}),(0,f.jsxs)("div",{className:"radio-list ".concat(e.state.deliveryTime),children:[(0,f.jsxs)("label",{className:"radio-cont","data-type":"asap",onClick:()=>e.deliveryTime("asap"),children:[Y.as_soon_as_possible,(0,f.jsx)("br",{}),r]}),(0,f.jsxs)("label",{className:"radio-cont","data-type":"later",onClick:()=>e.deliveryTime("later"),children:[" ",Y.later]}),i]}),o]}),e.props.page.setting.advance_booking&&!k.A.GetOpenCloseVendor(e.state.vendorDetails,e.props.page)&&(s=(0,f.jsxs)("div",{className:"",id:"deliveryTimececk",children:[(0,f.jsx)("style",{children:""}),(0,f.jsxs)("div",{className:"radio-list later",children:[(0,f.jsxs)("label",{className:"radio-cont on","data-type":"later",onClick:()=>e.deliveryTime("later"),children:[" ",Y.later]}),(0,f.jsx)("div",{id:"later",children:(0,f.jsxs)("ul",{className:"input-control",children:[(0,f.jsxs)("li",{children:[(0,f.jsx)("i",{className:"icon-calendar-inv"}),(0,f.jsx)("input",{name:"deliveryDate",id:"dDate",type:"text",placeholder:"Preferred Delivery Time:-",readOnly:!0,className:"datetime1 "+J.content[0]+" "+J.content[1],style:t,defaultValue:e.state.asapValue.date,"data-type":"asapValue",readOnly:!0})]}),(0,f.jsxs)("li",{children:[(0,f.jsx)("i",{className:"icon-clock-4"}),(0,f.jsx)("input",{type:"text",name:"deliveryTime",id:"dTime",placeholder:Y.preferred_deliverytime_Text_food,className:J.content[0]+" "+J.content[1],style:t,defaultValue:e.state.asapValue.time,"data-type":"asapValue",onClick:e.timePicker,readOnly:!0})]})]})})]}),o]}));var n=(0,f.jsxs)("div",{children:[(0,f.jsx)("h2",{className:J.heading[0]+" "+J.heading[1],style:{color:J.heading[2]},children:Y.time_your_order}),s]}),l="",c="";if(("0"==e.state.configurationFoodCourt.otherRules.preferredDeliveryTimeReq||"2"==e.state.configurationFoodCourt.otherRules.preferredDeliveryTimeReq)&&"pickup"===e.state.DeliveryActivePu){var p="";void 0!==e.state.configurationFoodCourt.otherRules.storeAddress&&e.state.configurationFoodCourt.otherRules.storeAddress.length>1&&(p=e.state.configurationFoodCourt.otherRules.storeAddress.map(function(e,t){return(0,f.jsx)("option",{value:e,children:e})}),p=(0,f.jsxs)("select",{id:"pickAddress","data-input":"pickAddress",value:e.state.shipingValuePickup.pickAddress,"data-billingShiplingValue":"shipingValuePickup",onChange:e.valueSet,children:[(0,f.jsx)("option",{value:"",selected:"selected",children:Y.Please_select_address_food}),p]}));var u="";J.button[0],J.button[1],J.button[3],J.button[2],e.state.shipingValuePickup.iconOk,e.asapCheck,e.state.shipingValuePickup.checkbox,Y.billing_address_food;let s={};1===parseInt(e.state.shipingValuePickup.checkbox,10)&&(s={});let i=e.state.pickupBillingAddress;u=(0,f.jsxs)("li",{children:[(0,f.jsx)("label",{className:"targetRadio other",children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:i.name}),i.phone,(0,f.jsx)("br",{}),i.email,"  ",(0,f.jsx)("br",{}),i.address,", ",(0,f.jsx)("br",{}),i.zip]})}),(0,f.jsxs)("div",{className:"pull-right rightActionSide",children:[(0,f.jsx)("a",{className:"product-remove-btn","data-type":"shipingValuePickup",onClick:e.addressUpdate,children:Y.HYPERSTORE_CHANGE}),(0,f.jsxs)("a",{className:"product-btn clearR",style:{background:"rgb(7, 142, 231)",color:"rgb(255, 255, 255)"},onClick:e.addAddress,"data-type":"shipingValuePickup",children:["+ ",Y.add_new_address]})]})]}),0===e.state.allAddress.length&&(u=(0,f.jsx)("li",{onClick:e.addAddress,"data-type":"shipingValuePickup",children:(0,f.jsxs)("label",{className:"targetRadio other add-address",children:[(0,f.jsx)("span",{className:"icon-plus-3"}),(0,f.jsxs)("p",{children:["+ ",Y.add_new_address]})]})}));let r="";e.props.page.delivery_on_till_closing_time&&(r=(0,f.jsxs)(b.YU,{page:e.props.page,category:a.id,subcategory:"store-timings",className:"view-store "+J.button[0]+" "+J.button[1],style:{color:J.button[3],background:J.button[2]},children:[Y.view_storetime_food," "]}));var h=(0,f.jsx)("input",{id:"totalDeliveryETA",type:"text",name:"pickCurrentTime",placeholder:Y.Pickup_time_food,className:J.content[0]+" "+J.content[1],style:t,value:e.state.shipingValuePickup.time,"data-input":"time","data-billingShiplingValue":"shipingValuePickup",onChange:e.valueSet}),g=(0,f.jsx)("input",{name:"pickCurrentDate",id:"pickupDate",type:"text",readOnly:!0,className:"datetime1 "+J.content[0]+" "+J.content[1],style:t,value:e.state.shipingValuePickup.date,"data-type":"shipingValuePickup",readOnly:!0});h=(0,f.jsx)("input",{id:"totalDeliveryETA",type:"text",name:"pickCurrentTime",placeholder:Y.Pickup_time_food,className:J.content[0]+" "+J.content[1],style:t,value:e.state.shipingValuePickup.time,"data-input":"time","data-billingShiplingValue":"shipingValuePickup",onClick:e.timePicker2,readOnly:!0}),c=(0,f.jsxs)("div",{className:"billing-address pickup-cont",id:"picup",children:[(0,f.jsx)("h2",{style:{color:J.heading[2]},children:Y.date_time_pick}),(0,f.jsxs)("div",{className:"pos-rel",children:[(0,f.jsx)("i",{className:"icon-calendar-inv"}),p,g]}),(0,f.jsxs)("div",{className:"timeInput pos-rel",children:[(0,f.jsx)("i",{className:"icon-clock-4"}),h]}),r,(0,f.jsxs)("div",{className:"block-row",children:[(0,f.jsxs)("label",{className:"hd-lable",children:[Y.pickup_instructions,"*"]}),(0,f.jsx)("div",{className:"billing-address",id:"InstructionsTab",children:(0,f.jsx)("textarea",{placeholder:Y.instructions_foodorder,id:"instruction",style:{borderColor:J.borderColor,color:J.content[2],display:"block"},className:"comments  "+J.content[0]+" "+J.content[1],value:e.state.shipingValuePickup.pickInstructionFood,"data-input":"instructionsFoo
1dCourt","data-billingShiplingValue":"instructions",onInput:e.valueSet})})]}),(0,f.jsx)("strong",{className:"".concat(J.heading[0]," ").concat(J.heading[1]),children:Y.billing_address_food}),(0,f.jsx)("ul",{className:"delivery-list",style:s,children:u})]})}if(("1"==e.state.configurationFoodCourt.otherRules.preferredDeliveryTimeReq||"2"==e.state.configurationFoodCourt.otherRules.preferredDeliveryTimeReq)&&"delivery"===e.state.DeliveryActivePu){let t=e.state.billingValue,a=e.state.shipingValue,s={display:"none"};e.state.isShipping&&(s={});let i=(0,f.jsxs)("li",{children:[(0,f.jsx)("label",{className:"targetRadio other",children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:a.name}),a.phone,(0,f.jsx)("br",{}),a.email,"  ",(0,f.jsx)("br",{}),a.address,", ",(0,f.jsx)("br",{}),a.zip]})}),(0,f.jsxs)("div",{className:"pull-right rightActionSide",children:[(0,f.jsx)("a",{className:"product-remove-btn","data-type":"shiping",onClick:e.addressUpdate,children:Y.HYPERSTORE_CHANGE}),(0,f.jsxs)("a",{className:"product-btn clearR",style:{background:"rgb(7, 142, 231)",color:"rgb(255, 255, 255)"},onClick:e.addAddress,"data-type":"billingValue",children:["+ ",Y.add_new_address]})]})]});0===e.state.allAddress.length&&(i=(0,f.jsx)("li",{onClick:e.addAddress,"data-type":"shipingValue",children:(0,f.jsxs)("label",{className:"targetRadio other add-address",children:[(0,f.jsx)("span",{className:"icon-plus-3"}),(0,f.jsxs)("p",{children:["+ ",Y.add_new_address]})]})}));let r=(0,f.jsxs)("li",{children:[(0,f.jsx)("label",{className:"targetRadio other",children:(0,f.jsxs)("span",{className:"label-text",children:[(0,f.jsx)("strong",{children:t.name}),t.phone,(0,f.jsx)("br",{}),t.email,"  ",(0,f.jsx)("br",{}),t.address,", ",(0,f.jsx)("br",{}),t.zip]})}),(0,f.jsxs)("div",{className:"pull-right rightActionSide",children:[(0,f.jsx)("a",{className:"product-remove-btn","data-type":"billing",onClick:e.addressUpdate,children:Y.HYPERSTORE_CHANGE}),(0,f.jsxs)("a",{className:"product-btn clearR",style:{background:"rgb(7, 142, 231)",color:"rgb(255, 255, 255)"},onClick:e.addAddress,"data-type":"billingValue",children:["+ ",Y.add_new_address]})]})]});0===e.state.allAddress.length&&(r=(0,f.jsx)("li",{onClick:e.addAddress,"data-type":"billingValue",children:(0,f.jsxs)("label",{className:"targetRadio other add-address",children:[(0,f.jsx)("span",{className:"icon-plus-3"}),(0,f.jsxs)("p",{children:["+ ",Y.add_new_address]})]})})),l=(0,f.jsxs)("div",{className:"tabs-wrap",children:[(0,f.jsx)("strong",{className:"".concat(J.heading[0]," ").concat(J.heading[1]),children:Y.shipping_address_food}),(0,f.jsxs)("ul",{className:"delivery-list",children:[i,(0,f.jsxs)("li",{className:"check",children:[(0,f.jsx)("input",{type:"checkbox",id:"shippingCheckbox",onClick:e.setShipping,defaultChecked:e.state.isShipping})," ",Y.billing_address_different]})]}),(0,f.jsx)("strong",{className:"".concat(J.heading[0]," ").concat(J.heading[1]),style:s,children:Y.billing_address_food}),(0,f.jsx)("ul",{className:"delivery-list",style:s,children:r}),(0,f.jsxs)("div",{className:"block-row",children:[(0,f.jsxs)("label",{className:"hd-lable",children:[Y.delivery_instructions,"*"]}),(0,f.jsxs)("ul",{className:"foodRadioList",children:[(0,f.jsx)("li",{children:(0,f.jsx)("label",{className:"targetRadio","data-value":Y.contactless_delivery_at_the_door,"data-billingShiplingValue":"instructions",onClick:e.valueSet,children:Y.contactless_delivery_at_the_door})}),(0,f.jsx)("li",{children:(0,f.jsx)("label",{className:"targetRadio","data-value":Y.contactless_delivery_to_guard,"data-billingShiplingValue":"instructions",onClick:e.valueSet,children:Y.contactless_delivery_to_guard})}),(0,f.jsx)("li",{children:(0,f.jsx)("label",{className:"targetRadio","data-value":Y.hand_me_the_order,"data-billingShiplingValue":"instructions",onClick:e.valueSet,children:Y.hand_me_the_order})}),(0,f.jsx)("li",{children:(0,f.jsx)("label",{id:"instructionLab",className:"targetRadio","data-value":"","data-billingShiplingValue":"",onClick:e.instructionToggle,children:Y.additional_instructions})})]})]}),(0,f.jsx)("div",{className:"billing-address",id:"InstructionsTab",children:(0,f.jsx)("textarea",{name:"instructionsText","data-billingShiplingValue":"instructions",placeholder:Y.additional_instructions,id:"instruction",className:"autoScroll","data-input":"instructionsText",onCh
1ange:e.valueSet})}),n]})}let m="";return null!==e.state.isCheckDelivery&&(m=2===e.state.isCheckDelivery?(0,f.jsxs)("div",{className:"newsTand-MobileTab",children:[(0,f.jsx)("div",{className:"tabViewall",children:(0,f.jsx)("a",{className:"deliveryClass",onClick:e.ActiveTabDeliveryPu,"data-type":"delivery",children:Y.delivery_food})}),(0,f.jsx)("div",{className:"tabmyCollection",children:(0,f.jsxs)("a",{className:"pickupClass",onClick:e.ActiveTabDeliveryPu,"data-type":"pickup",children:[" ",Y.pickup_food]})})]}):1===e.state.isCheckDelivery?(0,f.jsx)("div",{className:"newsTand-MobileTab",children:(0,f.jsx)("div",{className:"tabViewall",style:{width:"100%"},children:(0,f.jsx)("a",{className:"deliveryClass",onClick:e.ActiveTabDeliveryPu,"data-type":"delivery",children:Y.delivery_food})})}):(0,f.jsx)("div",{className:"newsTand-MobileTab",children:(0,f.jsx)("div",{className:"tabmyCollection",style:{width:"100%"},children:(0,f.jsxs)("a",{className:"pickupClass",onClick:e.ActiveTabDeliveryPu,"data-type":"pickup",children:[" ",Y.pickup_food]})})})),(0,f.jsxs)("div",{className:"food-court-page",ref:this.rootRef,children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page,category:{text:Y.checkout_food,url:"billing-form"}}),(0,f.jsxs)("div",{className:"food-court-wrapper",children:[(0,f.jsxs)("div",{className:"pull-leftpan",children:[m,l,c]}),(0,f.jsx)(C,{page:e.props.page,data:e.props.data,type:!0,next:this.foodcourtercePayment,deliveryDetails:e.state.deliveryDetails,cartUpdate:e.cartUpdate})]})]})}constructor(e){super(e),this.state={foodCartDataCount:null,shipingValuePickup:{},contactInfo:{},DeliveryActivePu:"delivery",asapValue:{},checkDeliveryLocation:"0",deliveryTime:"asap",instructionsFoodCourt:null,billingValue:{},shipingValue:{},pickupBillingAddress:{},isShipping:"",allAddress:[],configurationFoodCourt:null,foodCartData:[],vendorDetails:null,deliveryDetails:{deliveryPrice:0,deliveryRate:"",storeAddressDelivery:""},deliverySlot:null},e.page.setting.twelve_hours&&(z=e.page.setting.twelve_hours),Y=e.page.languageSetting,J=e.page.styleAndNavigation,this.rootRef=j.createRef(),this.valueSet=this.valueSet.bind(this),this.shiplingcheck=this.shiplingcheck.bind(this),this.foodcourtercePayment=this.foodcourtercePayment.bind(this),this.ActiveTabDeliveryPu=this.ActiveTabDeliveryPu.bind(this),this.asapCheck=this.asapCheck.bind(this),this.twoDigitValue=this.twoDigitValue.bind(this),this.calculateTime=this.calculateTime.bind(this),this.to24Hour=this.to24Hour.bind(this),this.convertToJSON=this.convertToJSON.bind(this),this.loadData=this.loadData.bind(this),this.loadedDone=this.loadedDone.bind(this),this.timePicker=this.timePicker.bind(this),this.deliveryTime=this.deliveryTime.bind(this),this.addressUpdate=this.addressUpdate.bind(this),this.setShipping=this.setShipping.bind(this),this.paymentPage=this.paymentPage.bind(this),this.addAddress=this.addAddress.bind(this),this.getDitanceCalculation=this.getDitanceCalculation.bind(this),this.cartUpdate=this.cartUpdate.bind(this),this.timePicker2=this.timePicker2.bind(this),this.setCalendar=this.setCalendar.bind(this),this.resetInstruction=this.resetInstruction.bind(this)}}class K extends j.Component{ClearHistryHomePage(){localStorage.removeItem("foodCartData"),localStorage.removeItem("billingValue"),localStorage.removeItem("shipingValue"),localStorage.removeItem("cartCalculation"),localStorage.removeItem("wishList"),localStorage.removeItem("instructionsFoodCourt"),localStorage.removeItem("MethodLabelcc"),localStorage.removeItem("MethodLabelcc_phone"),localStorage.removeItem("MethodLabelcod"),localStorage.removeItem("MethodLabelpaypal"),localStorage.removeItem("MethodLabelpickup"),localStorage.removeItem("MethodLabelstripe"),localStorage.removeItem("MethodLabelcc"),localStorage.removeItem("orderId")}componentDidMount(){let e=this;(0,_.D$)().then(function(t){t.cartCalculation?e.setState({paymentMethodlabel:t.paymentMethodlabel,orderId:t.orderId,billingValue:t.billingValue,shipingValue:t.shipingValue,cartCalculation:t.cartCalculation},function(){let t=e.rootRef.current;t&&t.querySelector(".track-order")&&t.querySelector(".track-order").addEventListener("click",e.gotoOrderDetail),e.ClearHistryHomePage(),N.A.cart
1Notification(0)}):k.A.homeRedirect()})}gotoOrderDetail(e){let t=this;e.preventDefault(),window.preloader(!0),(0,_.f1)(t.props.page,t.state.orderId,function(e,a,s){window.preloader(!1),N.A.domRender((0,f.jsx)(V,{page:t.props.page,chatRoom:s,orderDetails:a}),window.createPopup())})}render(){var e=this.props.page,t=e.styleAndNavigation,a=e.languageSetting;return this.state.paymentMethodlabel?(0,f.jsxs)("div",{className:"food-court-page",ref:this.rootRef,children:[(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:a.Thanks,url:"thanks"}}),(0,f.jsx)("div",{className:"food-court-wrapper",children:(0,f.jsxs)("div",{className:"thanks-page",children:[(0,f.jsx)("img",{src:"/images/image-3x1.png",style:{backgroundImage:"url(/images/thanks.png)"}}),(0,f.jsx)("h4",{className:t.heading[0]+" "+t.heading[1],children:a.congratulations}),(0,f.jsx)("p",{children:a.Thank_you_order_food}),(0,f.jsx)("div",{className:"btn-cont",children:(0,f.jsx)(b.YU,{page:this.props.page,category:"my-orders",children:a.view_order})})]})})]}):(0,f.jsxs)("div",{className:"food-court-page",ref:this.rootRef,children:[(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:a.Thanks,url:"thanks"}}),(0,f.jsx)("div",{className:"mcomContainer",children:(0,f.jsx)("div",{className:"temp-preloader",children:(0,f.jsx)("img",{src:"/images/preloader.gif",alt:""})})})]})}constructor(e){super(e),this.state={cartCalculation:[],paymentMethodlabel:null,orderId:null,billingValue:[],shipingValue:[]},this.rootRef=j.createRef(),this.ClearHistryHomePage=this.ClearHistryHomePage.bind(this),this.gotoOrderDetail=this.gotoOrderDetail.bind(this)}}class Z extends j.Component{ClearHistryHomePage(){localStorage.removeItem("foodCartData"),localStorage.removeItem("billingValue"),localStorage.removeItem("shipingValue"),localStorage.removeItem("cartCalculation"),localStorage.removeItem("wishList"),localStorage.removeItem("instructionsFoodCourt"),localStorage.removeItem("MethodLabelcc"),localStorage.removeItem("MethodLabelcc_phone"),localStorage.removeItem("MethodLabelcod"),localStorage.removeItem("MethodLabelpaypal"),localStorage.removeItem("MethodLabelpickup"),localStorage.removeItem("MethodLabelstripe"),localStorage.removeItem("MethodLabelcc"),localStorage.removeItem("orderId")}componentDidMount(){let e=this;(0,_.D$)().then(function(t){t.cartCalculation?e.setState({paymentMethodlabel:t.paymentMethodlabel,orderId:t.orderId,billingValue:t.billingValue,shipingValue:t.shipingValue,cartCalculation:t.cartCalculation},function(){e.ClearHistryHomePage(),N.A.cartNotification(0)}):k.A.homeRedirect()})}render(){var e=this.props.page,t=e.styleAndNavigation,a=e.languageSetting;let s=this.state.orderId,i=this.state.paymentMethodlabel,r=(0,f.jsx)("div",{className:"temp-preloader",children:(0,f.jsx)("img",{src:"/images/preloader.gif",alt:""})});return this.state.paymentMethodlabel&&(r=(0,f.jsxs)("section",{className:"food-Order orer-confirm",style:{paddingBottom:"80px"},children:[(0,f.jsx)("div",{className:"detail-outer",children:(0,f.jsx)("h3",{className:"order-heading  "+t.subheading[0]+" "+t.subheading[1],style:{color:t.subheading[2],borderColor:t.borderColor},children:a.order_confirmation})}),(0,f.jsxs)("div",{className:"discription",children:[a.order_placed_success_msg_but_payment_fail," "]}),(0,f.jsx)("div",{className:"detail-outer",children:(0,f.jsxs)("h3",{className:"order-heading",style:{borderColor:t.borderColor},children:[a.order_id_food," : ",s,(0,f.jsx)("br",{}),a.payment_method_food," : ",i]})}),(0,f.jsx)(b.YU,{className:"checkout "+t.button[0]+" "+t.button[1],style:{color:t.button[3],background:t.button[2]},page:this.props.page,children:a.continue_shopping_food})]})),(0,f.jsxs)("div",{className:"food-court-page",children:[(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:a.Thanks,url:"fail"}}),(0,f.jsx)("div",{className:"mcomContainer",children:r})]})}constructor(e){super(e),this.state={cartCalculation:[],paymentMethodlabel:null,orderId:null,billingValue:[],shipingValue:[]},this.ClearHistryHomePage=this.ClearHistryHomePage.bind(this)}}var ee=a(3789);class et extends j.Component{render(){var e=this.props.page,t=e.languageSetting,a=this.state.vendorDetail;if(!this.state.reviewList)return(0,f.jsx)(_.wq,{title:t.users_reviews_food});var s=e.styleAndNavigation,i="",r="";this.state.reviewList.reviewList&&this.state.reviewList.reviewList.length?(i=this.state.reviewList.reviewList.map(function(e,t){var a="/images/no-image.jpg";return""!==e.profileImage&&(a=e.profileImage),(0,f.jsxs)("div",{className:"reviewBox",children:[(0,f.jsx)("div",{className:"customer-image",children:(0,f.jsx)("img",{src:a,alt:"img",className:"profileImage"})}),(0,f.jsxs)("div",{className:"customer-detail",children:[(0,f.jsx)("h3",{children:e.userName}),(0,f.jsx)("h4",{children:" 1 Reviews. 17 Followers"}),(0,f.jsx)("div",{className:"rating",children:(0,f.jsx)("p",{className:"stars-blank",children:(0,f.jsx)("p",{className:"stars-color",style:{width:20*e.rating+"px"}})})})]}),(0,f.jsxs)("div",{className:"customer-msg",children:[(0,f.jsx)("h4",{className:"title",children:e.title}),(0,f.jsx)("p",{children:e.review})]}),(0,f.jsxs)("div",{className:"product-img",children:[(0,f.jsx)("div",{className:"imgBox",children:(0,f.jsx)("img",{src:"https://i0.wp.com/images-prod.healthline.com/hlcmsresource/images/AN_images/healthy-eating-ingredients-1296x728-header.jpg?w=1155&h=1528"})}),(0,f.jsx)("div",{className:"imgBox",children:(0,f.jsx)("img",{src:"https://i0.wp.com/images-prod.healthline.com/hlcmsresource/images/AN_images/healthy-eating-ingredients-1296x728-header.jpg?w=1155&h=1528"})})]})]})}),r=(0,f.jsxs)("div",{className:"reviews-cont",children:[(0,f.jsx)("h2",{className:s.heading[0]+" "+s.heading[1],style:{color:s.heading[2]},children:t.users_reviews_food}),i]})):r=(0,f.jsxs)("div",{className:"error-code",children:[(0,f.jsx)("span",{className:"icon appyicon-chat-bubble"}),(0,f.jsx)("b",{children:t.no_reviews_available_food})]});let o=(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:e,category:a.id+"-details",children:t.overview?t.overview:"Overview"})});0===e.setting.vendorDetailsPage&&(o="");let n=(0,f.jsx)("li",{className:"on",children:(0,f.jsx)(b.YU,{page:e,category:a.id,subcategory:"reviews",children:t.user_review_food})});0===e.setting.review_onOff&&(n="");let l="food-court-page",c="food-court-wrapper bgTransparent",p=(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:this.state.vendorDetail.name,url:this.state.vendorDetail.id},subcategory:{text:t.user_review_food,url:"reviews"},image:this.state.vendorDetail.shareImage}),u={},h=s.pageBgColor;"2"===s.layout&&(h="",l="wrapper",c="container",u={background:s.pageBgColor,borderRadius:"20px 20px 0 0"},p=(0,f.jsx)("div",{className:"container",children:(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page,category:{text:this.state.vendorDetail.name,url:this.state.vendorDetail.id},subcategory:{text:t.user_review_food,url:"reviews"},image:this.state.vendorDetail.shareImage})}));let g="no-cart";return(0,_.mH)()&&(g="yes-cart"),(0,f.jsxs)("div",{className:"".concat(l," ").concat(g),children:[p,(0,f.jsxs)("div",{className:"food-Order",style:{background:h},children:[(0,f.jsx)(_.NP,{data:this.props.data,page:this.props.page,vendorDetail:this.state.vendorDetail}),(0,f.jsxs)("ul",{className:"tabs-view sticky",children:[o,(0,f.jsx)("li",{children:(0,f.jsx)(b.YU,{page:e,category:a.id,children:t.order_online?t.order_online:"Order Online"})}),n]}),(0,f.jsxs)("div",{className:c,style:u,children:[(0,f.jsx)("div",{className:"details-cont",children:(0,f.jsx)("div",{className:"about-review",children:(0,f.jsx)("div",{className:"tabset",children:(0,f.jsx)("div",{className:"tab-panels",children:(0,f.jsx)("section",{id:"review",className:"tab-panel active",children:(0,f.jsx)("div",{className:"review-restaurant",children:r})})})})})}),(0,f.jsx)("div",{className:"order-section sticky",children:(0,f.jsx)(C,{page:this.props.page,data:this.props.data,t
1ype:!0})})]})]})]})}constructor(e){super(e),this.state={vendorDetail:e.response.vendorDetail,reviewList:e.response.reviewList}}}var ea=a(9740),es=a(2450);class ei extends j.Component{componentDidMount(){let e=this;var t=localStorage.getItem("billingValue"),a=JSON.parse(localStorage.getItem("shipingValue"));a.billShip="Shipping",a=JSON.stringify(a);var s=[],i=JSON.parse(localStorage.getItem("cartCalculation"));for(var r in i)s[r]=i[r];s.vendordata=JSON.parse(localStorage.getItem("vendordata"));var o=void 0!==s.deliveryTime&&s.deliveryTime?s.deliveryTime:"",n=void 0!==s.deliveryDate&&s.deliveryDate?s.deliveryDate:"";"pickup"===s.payType&&(o=s.pickupTime);var l=new Date(n);o=(n=l.getMonth()+1+"/"+l.getDate()+"/"+l.getFullYear())+" "+o;var c=parseFloat(s.grandtotal);c=c.toFixed(2);var p=parseFloat(s.deliveryPrice?s.deliveryPrice:0).toFixed(2),u=parseFloat(s.discountPrice?s.discountPrice:0).toFixed(2);parseFloat(s.vendordiscount?s.vendordiscount:0).toFixed(2);var h=parseFloat(s.taxPrice?s.taxPrice:0).toFixed(2),g=parseFloat(s.tipAmountValue?s.tipAmountValue:0).toFixed(2),m=s.currency,x=parseFloat(s.couponDiscount?s.couponDiscount:0).toFixed(2),v=window.config.geolocation?window.config.geolocation.latitude:"",y=window.config.geolocation?window.config.geolocation.longitude:"";parseFloat(s.subtotal?s.subtotal:0).toFixed(2);var f=[];s.data.forEach(e=>{"miscTax"===e.key&&e.data.forEach(function(e){f.push({currency:s.currency,tax:e.amount,taxAmount:e.amount,taxType:e.text})})});var j=JSON.parse(localStorage.getItem("foodCartData"));if(j.length>0)for(var _=0;_<j.length;_++){var b=j[_];s.push({productId:b.id,name:b.name,price:b.inputValuePrice,qty:b.inputValueQuantity,description:b.description,currency:b.currency,custom_option:b.inputValueCustomBind})}var w={id:N.A.getUser().userid,name:N.A.getUser().username,email:N.A.getUser().email,phone:N.A.getUser().phone},C=new Date().getTime();C=k.A.randomFixedInteger(6);var D="AP"+s.vendordata.id+C,S={discount:u,delivery:p,tax:h,total:c,coupon:x,tip:g},A=Math.round(new Date/1e3),V=k.A.getTimeZoneFoodCourt(),I="delivery";"pickup"===s.paymentMethodType&&(I="pickup");var P=localStorage.getItem("instructionsFoodCourt"),L={paymentId:"",paymentMethod:"online",paymentStatus:"processing",orderDate:A,gmtTime:"GMT"+V,paymentMethodLabel:"online",orderType:I,deliveryPickupTime:o,cust_lat:v,cust_long:y,deviceType:window.pageData.config.device,deviceId:window.pageData.config.deviceId,deviceToken:window.pageData.config.deviceId},T={method:"foodOrder",lang:e.props.data.appData.lang,appId:e.props.page.appid,appName:e.props.data.appData.appName,appAdminName:N.A.getSecretData().ownerName,userData:w,orderId:D,discount:S,productDetails:s,payment:L,currency:m,billingData:JSON.parse(t),shippingData:JSON.parse(a),pickupComment:P||"",miscTax:f,deliveryPickupTime:o};localStorage.setItem("orderId",D),(0,ea.b)(e.props.page,e.props.data,"foodcourt",function(i){let r=[],o=JSON.parse(localStorage.cartCalculation);"pickup"===o.paymentMethodType?o.onlinePaymentAtPickup?i.paymentDetails.forEach(function(e){"cod"!==e.key&&r.push(e)}):(i.paymentDetails.forEach(function(e){"pu"===e.key&&r.push(e)}),r.length||(r=[JSON.parse('{"label":"Pickup","key":"pu","icon_url":"https://www.appexecutable.com/webservices/CommonPaymentGateway/pu/img/pu.png","method_name":"getPuForm","credentials":{"api_url":"/webservices/CommonPaymentGateway/pu/pu.php","success_url":"/webservices/CommonPaymentGateway/pu/response.php?method=success","cancel_url":"/webservices/CommonPaymentGateway/pu/response.php?method=cancel","failure_url":"/webservices/CommonPaymentGateway/pu/response.php?method=failure","notify_url":"/webservices/CommonPaymentGateway/pu/response.php?method=notify"}}')])):i.paymentDetails.forEach(function(e){"pu"!==e.key&&r.push(e)}),i.paymentDetails=r,e.setState({paymentData:i,postData:T,productDetails:s,billingData:t,shippingData:a})})}render(){var e=this.props.page;if(!this.state.paymentData)return(0,f.jsx)("div",{children:"Loading"});localStorage.setItem("pageUrl",this.props.page.pageUrl),localStorage.setItem("paymentPageData",JSON.stringify(this.props.page));var t=this.state.productDetails;e.languageSetting;
1var a={method:"foodOrder",appId:this.props.data.appData.appId,appName:this.state.postData.appName,appAdminName:this.state.postData.appAdminName,store_email:t.vendordata.identifire_list_new.store_email,store_mobile:t.vendordata.identifire_list_new.store_mobile,address:t.vendordata.address,vendorId:t.vendordata.id,vendorName:t.vendordata.name,lang:this.state.postData.lang,userData:this.state.postData.userData,orderId:this.state.postData.orderId,discount:this.state.postData.discount,productDetails:this.state.postData.productDetails,payment:this.state.postData.payment,currency:this.state.postData.currency,billingData:this.state.postData.billingData,shippingData:this.state.postData.shippingData,pickupComment:this.state.postData.pickupComment,miscTax:this.state.postData.miscTax};return(0,f.jsx)(es.i,{page:this.props.page,data:this.props.data,paymentDetails:this.state.paymentData,pageName:"foodcourt",file:"FoodCourt.php",postData:a})}constructor(e){super(e),e.data,e.page,this.state={paymentDetails:null,paymentData:null,postData:null,productDetails:null}}}class er extends j.Component{componentDidMount(){if(this.props.type){this.filterTabs(0);let e=this.rootRef.current;e&&e.classList.add("popup-filter")}}valueSet(e){let t=e.currentTarget,a=this.state.data,s=t.getAttribute("data-value"),i=t.getAttribute("data-type");"cuisines"===i?a[i].length?-1===a[i].indexOf(s)?a[i].push(s):a[i].splice(a[i].indexOf(s),1):a[i].push(s):""===a[i]?a[i]=s:a[i]===s?a[i]="":a[i]=s,this.setState({data:a}),this.props.callback("filter",a)}filterTabs(e){d;let t=this.rootRef.current;t&&(t.querySelectorAll(".prouct-widget").forEach(e=>{e.style.display="none"}),t.querySelectorAll(".product-widget")[e]&&(t.querySelectorAll(".product-widget")[e].style.display="block"))}resetFilter(){let e={cuisines:[],time:"",price:"",service:""};this.setState({data:e}),this.props.callback("filter",e),window.backPopup()}setAccordion(e){let t=e.currentTarget.parentElement;t.classList.contains("accordion-off")?t.classList.remove("accordion-off"):t.classList.add("accordion-off")}render(){let e=this,t=e.props.page.languageSetting,a=e.props.page.styleAndNavigation,s="";
1e.props.cusinListWithAdmin&&e.props.cusinListWithAdmin.list&&(s=e.props.cusinListWithAdmin.list.map(function(t){let a="";return -1!==e.state.data.cuisines.indexOf(t.cuisine_id)&&(a="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":"cuisines","data-value":t.cuisine_id,className:a,children:t.cuisine_name},t.cuisine_id)}));let i="",r="",o="";return"filter"===e.props.type&&(i=(0,f.jsx)("div",{className:"filter-tabs",children:[t.filter_page_cuisine,t.food_for,t.delivery_time_food,t.filter_page_min_order].map(function(t,a){return(0,f.jsx)("a",{onClick:()=>e.filterTabs(a),children:t})})}),r=(0,f.jsx)("div",{className:"filter-reset-tab",children:(0,f.jsxs)("ul",{className:"filter-cstm-tab",children:[(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"#",onClick:()=>e.resetFilter(),children:[" ",t.fc_reset]})}),(0,f.jsx)("li",{children:(0,f.jsxs)("a",{href:"#",onClick:()=>window.backPopup(),children:[" ",t.apply_food]})})]})}),o=(0,f.jsxs)("div",{className:"filter-header",children:[(0,f.jsx)("h4",{children:t.Filter}),(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"X"})]})),"sort"===e.props.type&&(i=(0,f.jsx)("div",{className:"filter-tabs",children:[t.filter_page_cuisine,t.food_for,t.delivery_time_food,t.filter_page_min_order].map(function(t,a){return(0,f.jsx)("a",{onClick:()=>e.filterTabs(a),children:t})})})),(0,f.jsxs)("div",{className:"sidebar-left",ref:this.rootRef,children:[o,i,r,(0,f.jsx)("strong",{className:"filter-heading",children:t.Filter}),(0,f.jsx)("a",{className:"reset-btn",onClick:e.resetFilter,children:t.HYPERSTORE_CLEAR_ALL}),(0,f.jsxs)("div",{className:"product-widget",children:[(0,f.jsx)("h4",{className:"".concat(a.heading[0]," ").concat(a.heading[1]),onClick:e.setAccordion,children:t.filter_page_cuisine}),(0,f.jsxs)("div",{className:"indicator",children:[(0,f.jsx)("span",{className:"icon-down-open up"}),(0,f.jsx)("span",{className:"icon-down-open down"})]}),(0,f.jsx)("ul",{children:s})]}),(0,f.jsxs)("div",{className:"product-widget",children:[(0,f.jsx)("h4",{className:"".concat(a.heading[0]," ").concat(a.heading[1]),onClick:e.setAccordion,children:t.food_for}),(0,f.jsxs)("div",{className:"indicator",children:[(0,f.jsx)("span",{className:"icon-down-open up"}),(0,f.jsx)("span",{className:"icon-down-open down"})]}),(0,f.jsx)("ul",{children:[{key:"disable_delivery",text:"delivery_food"},{key:"disable_pickup",text:"pickup_food"}].map(function(a){let s="";return e.state.data.service===a.key&&(s="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":"service","data-value":a.key,className:s,children:t[a.text]},a.key)})})]}),(0,f.jsxs)("div",{className:"product-widget",children:[(0,f.jsx)("h4",{className:"".concat(a.heading[0]," ").concat(a.heading[1]),onClick:e.setAccordion,children:t.delivery_time_food}),(0,f.jsxs)("div",{className:"indicator",children:[(0,f.jsx)("span",{className:"icon-down-open up"}),(0,f.jsx)("span",{className:"icon-down-open down"})]}),(0,f.jsx)("ul",{children:["15","30","45","60"].map(function(t){let a="";return e.state.data.time===t&&(a="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":"time","data-value":t,className:a,children:t},t)})})]}),(0,f.jsxs)("div",{className:"product-widget",children:[(0,f.jsx)("h4",{className:"".concat(a.heading[0]," ").concat(a.heading[1]),onClick:e.setAccordion,children:t.filter_page_min_order}),(0,f.jsxs)("div",{className:"indicator",children:[(0,f.jsx)("span",{className:"icon-down-open up"}),(0,f.jsx)("span",{className:"icon-down-open down"})]}),(0,f.jsx)("ul",{children:["10","30","50"].map(function(t){let a="";return e.state.data.price===t&&(a="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":"price","data-value":t,className:a,children:"<"+t},t)})})]})]})}constructor(e){super(e);let t={cuisines:[],time:"",price:"",service:""};e.filter&&(t=e.filter),this.state={data:t},this.rootRef=j.createRef(),this.valueSet=this.valueSet.bind(this),this.filterTabs=this.filterTabs.bind(this),this.resetFilter=this.resetFilter.bind(this)}}let eo=1;class en extends j.Component{onTextChange(e){this.setState({search:e.currentTarget.value})}filterPopup(e){"sort"===e?N.A.domRender((0,f.jsx)(_.XV,{page:this.props.page,callback:this.callback,type:e,sort:this.state.sort}),window.createPopup()):N.A.domRender((0,f.jsx)(er,{page:this.props.page,cusinListWithAdm
1in:this.state.cusinListWithAdmin,callback:this.callback,type:e,filter:this.state.filter}),window.createPopup())}componentDidMount(){var e;let t=this,a=t.props.page.languageSetting;this.loadData(this.props);let s=document.createElement("div");s.setAttribute("class","sidebar-left mobile-tab"),null==(e=document.querySelector(".app-container"))||e.appendChild(s),N.A.domRender((0,f.jsxs)("ul",{className:"cstm-tab",children:[(0,f.jsx)("li",{className:"sort-tab",onClick:()=>t.filterPopup("sort"),children:(0,f.jsxs)("a",{children:[(0,f.jsx)("i",{className:"icon icon-exchange-1"})," ",a.Short_By," "]})}),(0,f.jsx)("li",{className:"filter-tab",onClick:()=>t.filterPopup("filter"),children:(0,f.jsxs)("a",{children:[(0,f.jsx)("i",{className:"icon iconz-filter"})," Filter By"]})})]}),s)}componentWillReceiveProps(e){this.loadData(e)}loadData(e){let t=this;if(e.category&&"wishlist"===e.category&&N.A.redirectLogin(e.page,"wishlist"),!t.state.cusinListWithAdmin){let e={method:"cusinListWithAdmin",appId:t.props.page.appid};(0,_.$X)(t.props.page.config,e,function(e){t.setState({cusinListWithAdm
1in:e.cuisineList},function(){})})}}loadmorevendor(e){var t=this;eo++,(0,_.cf)(t.props.page,eo,function(e){t.setState({hideLoad:e.hideLoad,vendorList:[...t.state.vendorList,...e.vendorList],vendorListBackup:[...t.state.vendorListBackup,...e.vendorList],LoadPageNumber:eo})})}callback(e,t){let a=this.state.filter,s=this.state.sort;"filter"===e&&(a=t),"sort"===e&&(s=t);let i=JSON.parse(JSON.stringify(this.state.vendorListBackup)),r=i,o=!1;a.cuisines.length&&(r=r.filter(function(e){let t=!1;return a.cuisines.forEach(function(a){-1!==JSON.stringify(e.cousinList).indexOf(a)&&(t=!0)}),t}),o=!0),""!==a.time&&(r=r.filter(function(e){let t=!1;return e.configList.forEach(function(e){"delivery_min_duration"===e.ConfigKey&&parseInt(a.time)>=parseInt(e.ConfigValue)&&(t=!0)}),t}),o=!0),""!==a.service&&(r=r.filter(function(e){let t=!1;return e.configList.forEach(function(e){"disable_pickup"!==a.service||"disable_pickup"!==e.ConfigKey||parseInt(e.ConfigValue)||(t=!0),"disable_delivery"!==a.service||"disable_delivery"!==e.ConfigKey||parseInt(e.ConfigValue)||(t=!0)}),t}),o=!0),""!==a.price&&(r=r.filter(function(e){if(parseInt(e.min_order)<=parseInt(a.price))return!0}),o=!0),o?i=""===s?r:this.sortData(s,r):""!==s&&(i=this.sortData(s,i)),this.setState({vendorList:i,filter:a,sort:s})}sortData(e,t){let a=this;return"price_low_to_high"===e?t=t.sort(function(e,t){return parseFloat(e.min_order)-parseFloat(t.min_order)}):"price_low_to_high"===e?t=t.sort(function(e,t){return parseFloat(t.min_order)-parseFloat(e.min_order)}):"AZ"===e?t=t.sort(a.sort_by("name",!1,function(e){return e.toUpperCase()})):"ZA"===e?t=t.sort(a.sort_by("name",!0,function(e){return e.toUpperCase()})):"rating"===e?t=t.sort(function(e,t){return parseFloat(t.rating)-parseFloat(e.rating)}):"open_restra"===e||"close_restra"===e?(t.forEach(function(e){e.isOpen=k.A.GetOpenCloseVendor(e,a.props.page)}),t="open_restra"===e?t.sort(function(e,t){return parseFloat(t.isOpen)-parseFloat(e.isOpen)}):t.sort(function(e,t){return parseFloat(e.isOpen)-parseFloat(t.isOpen)})):"distance"===e&&(t=t.sort(function(e,t){return parseFloat(e.distance)-parseFloat(t.distance)})),t}sort_by(e,t,a){var s=a?function(t){return a(t[e])}:function(t){return t[e]};return t=t?-1:1,function(e,a){return e=s(e),a=s(a),t*((e>a)-(a>e))}}donebt(e){var t="";"Cuisine"===this.props.pagefilterKey&&(t=this.state.selectCusin),"Filter"===this.props.pagefilterKey&&(t=[{ETD:this.state.ETD},{MOA:this.state.MOA}]),"Sort"===this.props.pagefilterKey&&(t=e.target.getAttribute("data-sort")),this.props.callback(t,this.props.pagefilterKey),window.backPopup()}render(){if(!this.state.vendorList)return(0,f.jsx)(_.wq,{preloader:!0});var e=g.button[0],t=g.button[1],a=g.button[2],s=g.button[3],i=(0,f.jsxs)("div",{className:"msg-container",children:[" ",(0,f.jsx)("div",{className:"msg-code",children:(0,f.jsx)("span",{className:"icon appyicon-no-data"})})]}),r="",o="no-filter";(0,_.qz)(h.setting.advanceFilter)&&(o="yes-filter");let n=(0,f.jsx)(_.Gd,{page:this.props.page,className:"full"});this.state.category&&(n=""),this.state.vendorList&&(this.state.vendorList.length?(i=this.state.vendorList.map(function(e,t){return"2"===h.styleAndNavigation.layout?(0,f.jsx)(_.n7,{page:h,appData:u,data:e,index:t},t):(0,f.jsx)(_.Fy,{page:h,appData:u,data:e,index:t},t)}),i=(0,f.jsx)("section",{className:"food-Order",children:(0,f.jsx)("ul",{className:(h.setting.vendorDetailsPage,"productList"),children:i})})):n="",this.state.hideLoad&&(r=(0,f.jsx)("li",{className:"loadmore",onClick:this.loadmorevendor,children:(0,f.jsxs)("a",{className:"addtoCartbtn "+e+" "+t,style:{color:s,background:a,margin:"0px auto",display:"table"},children:["   ",m.show_more_social_network,"  "]})})));let l=(0,f.jsxs)("div",{className:"top-widget",children:[(0,f.jsx)("div",{className:"searchbar-overlay"}),(0,f.jsx)(_.XV,{page:h,callback:this.callback,sort:this.state.sort}),n]}),c=(0,f.jsx)(_.Qp,{data:this.props.data,page:this.props.page}
1),p=(0,f.jsx)(er,{page:this.props.page,cusinListWithAdmin:this.state.cusinListWithAdmin,callback:this.callback,filter:this.state.filter}),x="";if(this.props.category){x="full-width";let e="";"search"===this.props.category&&(e=m.search_food,p="",l=""),"location-search"===this.props.category&&(e="Location Search",p="",l=""),"offers"===this.props.category&&(e=m.offers_mcom,p="",l=""),"wishlist"===this.props.category&&(e=m.fc_favorite,p="",l=""),"near-me"===this.props.category&&(e=m.near_by_restaurants,x=""),c=(0,f.jsx)(_.Qp,{data:u,page:h,category:{text:e,url:this.props.category}})}return(0,f.jsxs)("div",{className:"food-court-page",children:[c,(0,f.jsxs)("div",{className:"food-court-wrapper ".concat(o," ").concat(x),children:[p,(0,f.jsx)("div",{className:"sidebar-right",children:(0,f.jsxs)("div",{className:"food_main_content",children:[l,i,r]})})]})]})}constructor(e){super(e),u=e.data,g=(h=e.page).styleAndNavigation,m=h.languageSetting;let t=!0,a=[];a=e.category?e.response:e.page.vendorList,console.log("props.response",e.response,e.page.vendorList),a&&a.length<10&&(t=!1),this.state={activeClassesSerchbt:"",vendorList:a,vendorListBackup:a,searchpopupval:u.languageSetting.sortby_food,loaderwait:"yes",cusinListWithAdm
1in:null,selectCusin:[],LoadPageNumber:1,hideLoad:t,category:null,text:"",filter:{cuisines:[],time:"",price:"",service:""},sort:""},this.onTextChange=this.onTextChange.bind(this),this.callback=this.callback.bind(this),this.loadmorevendor=this.loadmorevendor.bind(this),this.loadData=this.loadData.bind(this),this.sortData=this.sortData.bind(this),this.filterPopup=this.filterPopup.bind(this),this.donebt=this.donebt.bind(this),eo=1}}class el extends j.Component{componentDidMount(){let e=this,t=e.props.page;this.loadData(this.props);let a={method:"trendingAndPopular",appId:t.appid,latitude:t.geolocation.latitude,longitude:t.geolocation.longitude};(0,_.$X)(t.config,a,function(t){let a=[];t.popular&&t.popular.vendorList&&t.popular.vendorList.list&&(a=t.popular.vendorList.list);let s=[];t.trending&&t.trending.vendorList&&t.trending.vendorList.list&&(s=t.trending.vendorList.list),e.setState({popular:a,trending:s})}),this.initSwiper()}initSwiper(){let e=this.sliderRef.current;!this.swiper&&e&&window.Swiper&&e.querySelector(".swiper-slide")&&(this.swiper=new window.Swiper(e,{slidesPerView:"auto",spaceBetween:0,watchOverflow:!0,navigation:{nextEl:this.nextRef.current,prevEl:this.prevRef.current}}))}componentDidUpdate(){this.swiper?this.swiper.update():this.initSwiper()}componentWillUnmount(){this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null)}componentWillReceiveProps(e){let t=e.category?e.response:e.page.vendorList;t&&t!==this.state.vendorList&&this.setState({vendorList:t,vendorListBackup:t}),this.loadData(e)}loadData(e){let t=this;if(e.category&&"wishlist"===e.category&&N.A.redirectLogin(e.page,"wishlist"),!t.state.cusinListWithAdm
1in){let e={method:"cusinListWithAdmin",appId:t.props.page.appid};(0,_.$X)(t.props.page.config,e,function(e){t.setState({cusinListWithAdmin:e.cuisineList},function(){})})}}searchLocation(e){var t=this;e.currentTarget.value.trim().length>2?N.A.locationSearch(e.currentTarget.value.trim(),function(e){var a=[];e.predictions.forEach(function(e,t){a.push({address:e.description,reference:e.reference})}),t.setState({locations:a})}):t.setState({locations:[]})}getLocationReference(e){N.A.setLocationData(e.reference,function(e){N.A.locationCookie(null,e),N.A.routerMove(v,"location-search")})}render(){var e=this,t=v.styleAndNavigation;let{locations:a}=e.state;var s=(0,f.jsxs)("div",{className:"msg-container",children:[" ",(0,f.jsx)("div",{className:"msg-code",children:(0,f.jsx)("span",{className:"icon appyicon-no-data"})})]});e.state.vendorList&&e.state.vendorList.length&&(s=e.state.vendorList.map(function(t,a){return(0,f.jsx)(_.n7,{slider:!0,page:e.props.page,appData:e.props.data,data:t,index:a},a)}),s=(0,f.jsx)("ul",{className:"product_list swiper-wrapper",children:s}));let i=[{key:null,text:y.Main_Menu,icon:"icon-indent-left",type:""},{key:"viewcart",text:y.cart_food,icon:"icon-cart",type:"login"}];N.A.getUser().email&&(i.push({key:"offers",text:y.fc_offered,icon:"iconz-gift",type:""}),i.push({key:"wishlist",text:y.fc_favorite,icon:"iconz-star",type:"login"}),i.push({key:"saved-address",text:y.saved_address,icon:"iconz-cart-in",type:"login"}),i.push({key:"my-orders",text:y.My_Orders_food,icon:"iconz-cart-in",type:"login"})),v.cmsPage.terms_and_conditions&&i.push({key:"terms-and-conditions",text:y.Terms_and_Conditions,icon:"iconz-newspaper",type:"terms"}),v.cmsPage.privacy_policy&&i.push({key:"privacy-policy",text:y.privacy_policy_food,icon:"icon-book-2",type:"privacy"});let r="";return a.length&&(r=a.map(function(t,a){return(0,f.jsx)("li",{onClick:()=>e.getLocationReference(t),children:t.address})}),r=(0,f.jsx)("ul",{className:"ldMeYz",children:r})),(0,f.jsxs)("div",{className:"wrapper landing-page",children:[(0,f.jsx)(_.Qp,{data:x,page:v}),v.landingData.content.map(function(a,i){if(a&&"no"===a.sectionShow)return null;if(0===i){let s="";return"yes"===a.enableSearch&&(s=(0,f.jsxs)("div",{className:"fd_search",children:[(0,f.jsx)("i",{className:"appyicon-geo-location",style:{color:t.iconColor}}),(0,f.jsx)("input",{type:"search",id:"searchLocation",placeholder:y.search_for_your_location,onInput:e.searchLocation,style:{color:t.content[2]}}),(0,f.jsx)("a",{className:"search_btn appyslim-ui-search",style:{backgroundColor:t.button[2],color:t.button[3]}}),r]})),(0,f.jsxs)("div",{className:"row-2",children:[(0,f.jsx)("div",{className:"container",children:(0,_.B)(e.props.page)}),(0,f.jsx)(b._V,{ratio:"2x1",src:a.pageImage,className:"img-style pull_left isFoodDesktop"}),(0,f.jsx)(b._V,{ratio:"1x1",src:a.pageImage,className:"img-style pull_left isFoodMobile"}),(0,f.jsxs)("div",{className:"header_position",children:[(0,f.jsxs)("div",{className:"container",children:[(0,f.jsx)("h2",{className:t.heading[0]+" "+t.heading[1],style:{color:t.heading[2]},children:(0,f.jsx)("span",{children:a.pageTitle})}),(0,f.jsx)("p",{children:a.pageDesc}),s]}),(0,f.jsx)("div",{className:"container",children:(0,f.jsxs)("div",{className:"btn_position",style:{display:"none"},children:[(0,f.jsx)("a",{className:"btn mr-15",children:"Fast Delivery"}),(0,f.jsx)("a",{className:"btn",children:"Quality Food"})]})})]})]})}if(1!==i)return(0,f.jsx)("div",{className:"row-2 fast_delivery",children:(0,f.jsxs)("div",{className:"container row_container",children:[(0,f.jsx)("div",{className:"img_wrapper w-55 pr-60",children:(0,f.jsx)(b._V,{ratio:"2x1",src:a.pageImage})}),(0,f.jsxs)("div",{className:"content_wrapper w-45",children:[(0,f.jsx)("h2",{className:t.heading[0]+" "+t.heading[1],style:{color:t.heading[2]},children:(0,f.jsx)("span",{children:a.pageTitle})}),(0,f.jsx)("p",{children:a.pageDesc})]})]})});{let i="";if("yes"===a.enableListing)return i=(0,f.jsxs)("div",{className:"item_list w-60  swiper-container homeSwiper",ref:e.sliderRef,children:[s,(0,f.jsx)("div",{className:"swiper-button-prev",ref:e.prevRef}),(0,f.jsx)("div",{className:"swiper-button-next",ref:e.nextRef})]}),(0,f.jsx)("div",{className:"row-2 multiple_list",children:(0,f.jsxs)("div",{className:"container row_container multi_restaurant",children:[(0,f.jsxs)("div",{className:"content_wrapper w-40 pr-40",children:[(0,f.jsx)("h2",{className:t.heading[0]+" "+t.heading[1],style:{color:t.heading[2]},children:(0,f.jsx)("span",{children:a.pageTitle})}),(0,f.jsx)("p",{children:a.pageDesc}),(0,f.jsxs)(b.YU,{page:v,category:"location-search",className:"btn mt-24 link-btn",style:{color:t.activeColor},children:[y.Explore_Restaurants," ",(0,f.jsx)("i",{className:"icon-right-open-1"})]})]}),i]})})}}),(0,f.jsx)("div",{className:"discount_info",style:{display:"none"},children:(0,f.jsx)("div",{className:"row-2 discount_container",children:(0,f.jsxs)("div",{className:"discount_inner",children:[(0,f.jsx)("h3",{children:"Enter your Email & get"}),(0,f.jsxs)("div",{className:"price_discount",children:["20%",(0,f.jsx)("span",{children:"OFF"})]}),(0,f.jsx)("p",{children:"Your first purchase"}),(0,f.jsx)("input",{type:"search",placeholder:"Enter your Email address "}),(0,f.jsx)("a",{className:"btn btn_center",children:"GET CODE"})]})})})]})}constructor(e){super(e),x=e.data,y=(v=e.page).languageSetting;let t=!0,a=[];(a=e.category?e.response:e.page.vendorList).length<10&&(t=!1),this.state={vendorList:a,vendorListBackup:a,cusinListWithAdm
1in:null,hideLoad:t,category:null,trending:[],popular:[],locations:[]},this.loadData=this.loadData.bind(this),this.searchLocation=this.searchLocation.bind(this),this.getLocationReference=this.getLocationReference.bind(this),this.sliderRef=j.createRef(),this.nextRef=j.createRef(),this.prevRef=j.createRef(),this.swiper=null}}class ec extends j.Component{componentDidMount(){let e=this,t=e.props.page;this.loadData(this.props);let a={method:"trendingAndPopular",appId:t.appid,latitude:t.geolocation.latitude,longitude:t.geolocation.longitude};(0,_.$X)(t.config,a,function(t){let a=[];t.popular&&t.popular.vendorList&&t.popular.vendorList.list&&(a=t.popular.vendorList.list);let s=[];t.trending&&t.trending.vendorList&&t.trending.vendorList.list&&(s=t.trending.vendorList.list),e.setState({popular:a,trending:s})})}componentWillReceiveProps(e){let t=e.category?e.response:e.page.vendorList;t&&t!==this.state.vendorList&&this.setState({vendorList:t,vendorListBackup:t}),this.loadData(e)}loadData(e){let t=this;if(e.category&&"wishlist"===e.category&&N.A.redirectLogin(e.page,"wishlist"),!t.state.cusinListWithAdm
1in){let e={method:"cusinListWithAdmin",appId:t.props.page.appid};(0,_.$X)(t.props.page.config,e,function(e){t.setState({cusinListWithAdmin:e.cuisineList},function(){})})}}render(){var e=this,t=e.props.page;if(!e.state.vendorList)return(0,f.jsx)(_.wq,{preloader:!0});t.styleAndNavigation;var a=t.languageSetting,s=(0,f.jsxs)("div",{className:"msg-container",children:[" ",(0,f.jsx)("div",{className:"msg-code",children:(0,f.jsx)("span",{className:"icon appyicon-no-data"})})]});if(e.props.home&&e.props.page.landingData&&"yes"===e.props.page.landingData.page_show)return(0,f.jsx)(el,{data:e.props.data,page:e.props.page});e.state.vendorList&&e.state.vendorList.length&&(s=e.state.vendorList.map(function(t,a){return a>3?null:(0,f.jsx)(_.Fy,{page:e.props.page,appData:e.props.data,data:t,index:a},a)}),s=(0,f.jsxs)("section",{className:"food-Order",children:[(0,f.jsx)("h2",{className:"title",children:a.near_by_restaurants}),(0,f.jsx)(b.YU,{className:"top-right",page:e.props.page,category:"near-me",children:a.show_more_social_network}),(0,f.jsx)("ul",{className:"productList",children:s})]}));let i="";e.state.popular&&e.state.popular.length&&(i=e.state.popular.map(function(t,a){return a>3?null:(0,f.jsx)(_.Fy,{page:e.props.page,appData:e.props.data,data:t,index:a},a)}),i=(0,f.jsxs)("section",{className:"food-Order",children:[(0,f.jsx)("h2",{className:"title",children:a.popular_restaurants}),(0,f.jsx)("ul",{className:"productList",children:i})]}));let r="";return e.state.trending&&e.state.trending.length&&(r=e.state.trending.map(function(t,a){return a>3?null:(0,f.jsx)(_.Fy,{page:e.props.page,appData:e.props.data,data:t,index:a},a)}),r=(0,f.jsxs)("section",{className:"food-Order",children:[(0,f.jsx)("h2",{className:"title",children:a.trending_restaurants}),(0,f.jsx)("ul",{className:"productList",children:r})]})),(0,f.jsxs)("div",{className:"food-court-page",children:[(0,f.jsx)(_.Qp,{data:e.props.data,page:e.props.page}),(0,f.jsx)("div",{className:"food-court-wrapper full-width",children:(0,f.jsxs)("div",{className:"sidebar-right",children:[(0,f.jsxs)("div",{className:"top-widget",children:[(0,f.jsx)(_.Gd,{page:e.props.page}),(0,_.B)(e.props.page)]}),(0,f.jsxs)("div",{className:"food_main_content",children:[s,i,r]})]})})]})}constructor(e){super(e),this.props.data;let t=!0,a=[];(a=e.category?e.response:e.page.vendorList).length<10&&(t=!1),this.state={vendorList:a,vendorListBackup:a,cusinListWithAdm
1in:null,hideLoad:t,category:null,trending:[],popular:[]},this.loadData=this.loadData.bind(this)}}let ed,ep,eu,eh,eg=1,em,ex=[{key:"sort",text:"Short_By",icon:"appyslim-arrows-line-arrows-up-down",data:[{key:"AZ",text:"a_z"},{key:"ZA",text:"z_a"},{key:"rating",text:"rating_dir"},{key:"open_restra",text:"fc_open"},{key:"close_restra",text:"closed"},{key:"distance",text:"Distance"}]},{key:"cuisines",text:"filter_page_cuisine",icon:"appyslim-seo-conversion",data:[]},{key:"service",text:"food_for",icon:"appyslim-seo-conversion",data:[{key:"disable_delivery",text:"delivery_food",icon:"appyslim-transport-small-bike"},{key:"disable_pickup",text:"pickup_food",icon:"appyslim-ecommerce-box-delivered"}]},{key:"price",text:"filter_page_min_order",icon:"appyslim-seo-conversion",data:["10","30","50"]},{key:"time",text:"delivery_time_food",icon:"appyslim-health-stopwatch",data:["15","30","45","60"]}],ev=function(e,t){let a={text:"",url:t};return e.dishes.forEach(function(e){t.replace("-type","")===e.id&&(a.text=e.category_name)}),a},ey=function(e){return JSON.stringify({cuisines:[],time:"",price:"",service:"",sort:""})!==JSON.stringify(e)};class ef extends j.Component{componentDidMount(){$("#tabs").tabs().addClass("ui-tabs-vertical ui-helper-clearfix"),$("#tabs li").removeClass("ui-corner-top").addClass("ui-corner-left")}valueSet(e){let t=e.currentTarget,a=this.state.data,s=t.getAttribute("data-value"),i=t.getAttribute("data-type");"cuisines"===i?a[i].length?-1===a[i].indexOf(s)?a[i].push(s):a[i].splice(a[i].indexOf(s),1):a[i].push(s):""===a[i]?a[i]=s:a[i]===s?a[i]="":a[i]=s,this.setState({data:a})}resetFilter(){this.setState({data:{cuisines:[],time:"",price:"",service:"",sort:""}})}submit(){this.props.type&&N.A.routerMove(ep,"location-search"),this.props.callback(this.state.data),window.backPopup()}render(){let e=this,t=e.props.page.languageSetting,a=e.props.page.styleAndNavigation,s="";
1return e.props.cusinListWithAdmin&&e.props.cusinListWithAdmin.list&&(s=e.props.cusinListWithAdmin.list.map(function(t){let a="";return -1!==e.state.data.cuisines.indexOf(t.cuisine_id)&&(a="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":"cuisines","data-value":t.cuisine_id,className:a,children:t.cuisine_name},t.cuisine_id)})),(0,f.jsxs)("div",{id:"myModal",className:"modalPWA filterModel filterNewTab",children:[(0,f.jsxs)("div",{className:"modal-header",children:[(0,f.jsx)("h2",{className:"".concat(a.heading[0]," ").concat(a.heading[1]),style:{color:a.heading[2]},children:t.Filter}),(0,f.jsx)("a",{className:"close",onClick:()=>window.backPopup(),children:"\xd7"})]}),(0,f.jsx)("div",{className:"modal-body",children:(0,f.jsxs)("div",{id:"tabs",children:[(0,f.jsx)("ul",{children:ex.map(function(e,a){return(0,f.jsx)("li",{children:(0,f.jsx)("a",{href:"#tabs-".concat(a),children:t[e.text]?t[e.text]:e.text})})})}),ex.map(function(a,i){let r=a.data.map(function(s){if("service"===a.key||"sort"===a.key){let i="";if(e.state.data[a.key]===s.key&&(i="on"),t[s.text])return(0,f.jsx)("li",{onClick:e.valueSet,"data-type":a.key,"data-value":s.key,className:i,children:t[s.text]},s.key)}else{let t="";return e.state.data[a.key]===s&&(t="on"),(0,f.jsx)("li",{onClick:e.valueSet,"data-type":a.key,"data-value":s,className:t,children:"<"+s},s)}});return"cuisines"===a.key&&(r=s),(0,f.jsx)("div",{id:"tabs-".concat(i),children:(0,f.jsx)("div",{className:"product-widget",children:(0,f.jsx)("ul",{children:r})})})})]})}),(0,f.jsx)("div",{className:"modal-footer",children:(0,f.jsx)("a",{className:"model-btn",onClick:e.submit,children:t.submit_food})})]})}constructor(e){super(e),this.state={data:e.data},this.valueSet=this.valueSet.bind(this),this.resetFilter=this.resetFilter.bind(this),this.submit=this.submit.bind(this)}}class ej extends j.Component{componentDidMount(){let e=this,t=e.props.page;this.loadData(this.props),document.querySelector(".app-container")&&(em=N.A.setScrollingData(document.querySelector(".app-container"),function(){eg++,(0,_.cf)(t,eg,function(t){10===t.vendorList.length?em.scrolling=!0:em.scrolling=!1,e.setState({vendorListBackup:[...e.state.vendorListBackup,...t.vendorList]},function(){e.callback()})})}));let a=(0,_.cR)();if(e.setState({filter:a},function(){e.callback();let t=e.rootRef.current;t&&t.querySelector(".filter_tab")&&t.querySelector(".filter_tab").setAttribute("data-size",ey(a))}
1),(0,_.$_)(t,function(t){e.setState({cusinListWithAdmin:t})}),window.appStorage.addressData){let t=JSON.parse(window.appStorage.addressData);e.setState({addressData:t},function(){let a=e.rootRef.current;a&&a.querySelector("#searchLocation")&&(a.querySelector("#searchLocation").value=t.currentAddress)})}new window.Swiper(".categorySwiper",{slidesPerView:4,spaceBetween:24,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{640:{slidesPerView:1},767:{slidesPerView:2},991:{slidesPerView:3}}})}componentWillReceiveProps(e){this.loadData(e)}loadData(e){e.category&&"wishlist"===e.category&&N.A.redirectLogin(e.page,"wishlist")}filterNew(){let e=this,{cusinListWithAdmin:t,filter:a}=e.state;N.A.domRender((0,f.jsx)(ef,{page:ep,cusinListWithAdmin:t,callback:function(t){(0,_.cR)(t),e.setState({filter:t},function(){e.callback()})},data:a,type:e.props.home}),window.createPopup())}callback(){let{filter:e}=this.state,t=JSON.parse(JSON.stringify(this.state.vendorListBackup)),a=t,s=!1;e.cuisines&&e.cuisines.length&&(a=a.filter(function(t){let a=!1;return e.cuisines.forEach(function(e){-1!==JSON.stringify(t.cousinList).indexOf(e)&&(a=!0)}),a}),s=!0),""!==e.time&&(a=a.filter(function(t){let a=!1;return t.configList.forEach(function(t){"delivery_min_duration"===t.ConfigKey&&parseInt(e.time)>=parseInt(t.ConfigValue)&&(a=!0)}),a}),s=!0),""!==e.service&&(a=a.filter(function(t){let a=!1;return t.configList.forEach(function(t){"disable_pickup"!==e.service||"disable_pickup"!==t.ConfigKey||parseInt(t.ConfigValue)||(a=!0),"disable_delivery"!==e.service||"disable_delivery"!==t.ConfigKey||parseInt(t.ConfigValue)||(a=!0)}),a}),s=!0),""!==e.price&&(a=a.filter(function(t){if(parseInt(t.min_order)<=parseInt(e.price))return!0}),s=!0),s?t=""===e.sort?a:this.sortData(e.sort,a):""!==e.sort&&(t=this.sortData(e.sort,t)),this.setState({vendorList:t})}sortData(e,t){let a=this;return"price_low_to_high"===e?t=t.sort(function(e,t){return parseFloat(e.min_order)-parseFloat(t.min_order)}):"price_low_to_high"===e?t=t.sort(function(e,t){return parseFloat(t.min_order)-parseFloat(e.min_order)}):"AZ"===e?t=t.sort(a.sort_by("name",!1,function(e){return e.toUpperCase()})):"ZA"===e?t=t.sort(a.sort_by("name",!0,function(e){return e.toUpperCase()})):"rating"===e?t=t.sort(function(e,t){return parseFloat(t.rating)-parseFloat(e.rating)}):"open_restra"===e||"close_restra"===e?(t.forEach(function(e){e.isOpen=k.A.GetOpenCloseVendor(e,a.props.page)}),t="open_restra"===e?t.sort(function(e,t){return parseFloat(t.isOpen)-parseFloat(e.isOpen)}):t.sort(function(e,t){return parseFloat(e.isOpen)-parseFloat(t.isOpen)})):"distance"===e&&(t=t.sort(function(e,t){return parseFloat(e.distance)-parseFloat(t.distance)})),t}sort_by(e,t,a){var s=a?function(t){return a(t[e])}:function(t){return t[e]};return t=t?-1:1,function(e,a){return e=s(e),a=s(a),t*((e>a)-(a>e))}}searchLocation(e){var t=this;e.currentTarget.value.trim().length>2?N.A.locationSearch(e.currentTarget.value.trim(),function(e){var a=[];e.predictions.forEach(function(e,t){a.push({address:e.description,reference:e.reference})}),t.setState({locations:a})}):t.setState({locations:[]})}getLocationReference(e){let t=this;N.A.setLocationData(e.reference,function(e){N.A.locationCookie(null,e),t.setState({addressData:e},function(){t.callback(),t.setState({locations:[]});let a=t.rootRef.current;a&&a.querySelector("#searchLocation")&&(a.querySelector("#searchLocation").value=e.currentAddress)})})}searchKeywords(e){let t=e.currentTarget.value.trim().toLowerCase();if(t.length>
12){let{vendorList:e,cusinListWithAdmin:a}=this.state,s=a.list.filter(function(e){return -1!==e.cuisine_name.toLowerCase().indexOf(t)}).map(function(e){return{type:"cuisine",text:e.cuisine_name,id:e.cuisine_id,image:"/images/no-image.jpg"}}),i=ep.dishes.filter(function(e){return -1!==e.category_name.toLowerCase().indexOf(t)}).map(function(e){return{type:"dish",text:e.category_name,id:e.id,image:e.pwa_category_image}}),r=e.filter(function(e){return -1!==e.name.toLowerCase().indexOf(t)}).map(function(e){let t="/images/no-image.jpg";return e.imgList.forEach(function(e){"image"===e.type&&e.main_image&&(t=e.name)}),{type:"vendor",text:e.name,id:e.id,address:e.address,image:t}});this.setState({keywords:[...s,...i,...r]})}else this.setState({keywords:[]})}updateFilter(e,t){let a=this,{filter:s}=a.state;"cuisines"===e?s[e].splice(t,1):s[e]="",(0,_.cR)(s),a.setState({filter:s},function(){a.callback()})}setCuisine(e){let t=this,{filter:a}=t.state;a.cuisines=[e.id];let s=t.rootRef.current;s&&s.querySelectorAll(".search_container input")[1]&&(s.querySelectorAll(".search_container input")[1].value=""),(0,_.cR)(a),t.setState({filter:a,keywords:[]},function(){t.callback()})}
1render(){let e=this,{vendorList:t,filter:a,cusinListWithAdmin:s,locations:i,keywords:r,dishesShow:o}=e.state,{category:n}=e.props;if(e.props.home&&e.props.page.landingData&&"yes"===e.props.page.landingData.page_show)return(0,f.jsx)(el,{data:e.props.data,page:e.props.page});let l=(0,f.jsx)(b.bM,{});t.length&&(l=t.map(function(e,t){return(0,f.jsx)(_.n7,{page:ep,appData:ed,data:e,index:t},t)}));let c="";i.length&&(c=i.map(function(t,a){return(0,f.jsx)("li",{onClick:()=>e.getLocationReference(t),children:t.address})}),c=(0,f.jsx)("ul",{className:"ldMeYz",children:c}));let p="";r.length&&(p=r.map(function(t,a){return"cuisine"===t.type?(0,f.jsx)("li",{children:(0,f.jsxs)("a",{onClick:()=>e.setCuisine(t),children:[(0,f.jsx)(b._V,{ratio:"1x1",src:t.image}),(0,f.jsxs)("p",{children:[(0,f.jsx)("b",{children:t.text}),(0,f.jsx)("span",{children:eh.filter_page_cuisine})]})]})}):"dish"===t.type?(0,f.jsx)("li",{children:(0,f.jsxs)(b.YU,{page:ep,category:t.id+"-type",children:[(0,f.jsx)(b._V,{ratio:"1x1",src:t.image}),(0,f.jsxs)("p",{children:[(0,f.jsx)("b",{children:t.text}),(0,f.jsx)("span",{children:eh.Dish})]})]})}):(0,f.jsx)("li",{children:(0,f.jsxs)(b.YU,{page:ep,category:t.id,children:[(0,f.jsx)(b._V,{ratio:"1x1",src:t.image}),(0,f.jsxs)("p",{children:[(0,f.jsx)("b",{children:t.text}),(0,f.jsx)("span",{children:t.address})]})]})})}),p=(0,f.jsx)("ul",{className:"search_cuisine",children:p}));let u="filter-yes",h="search-yes",g=null,m=(0,f.jsx)(_.Qp,{data:ed,page:ep});n&&(g={category:n,text:""},"search"===n&&(g.text=eh.search_food),"offers"===n&&(g.text=eh.offers_mcom),"wishlist"===n&&(g.text=eh.fc_favorite),"location-search"===n?g.text=eh.search_food:(u="filter-no",h="search-no"),-1!==n.indexOf("-type")&&(g=ev(ep,n)),m=(0,f.jsx)(_.Qp,{data:ed,page:ep,category:g}));let x=(0,f.jsxs)("div",{className:"row-2 swiper-container categorySwiper",children:[(0,f.jsx)("h1",{children:eh.Looking_for_Something_Specific}),(0,f.jsx)("ul",{className:"product_list mt-24 swiper-wrapper ",children:ep.dishes.map(function(e){return e.haveData?(0,f.jsxs)("li",{className:"swiper-slide",children:[(0,f.jsx)("div",{className:"product-snap",children:(0,f.jsx)(b._V,{ratio:"1x1",src:e.pwa_category_image,className:"img-style pull_left"})}),(0,f.jsx)("div",{className:"product-info",children:(0,f.jsx)("h4",{children:e.category_name})}),(0,f.jsx)(b.YU,{className:"click-area",page:ep,category:e.id+"-type"})]}):null})})]});return o||(x=""),(0,f.jsxs)("div",{className:"wrapper layout-2 ".concat(u," ").concat(h),ref:this.rootRef,children:[(0,f.jsx)("div",{className:"container",children:m}),(0,f.jsx)("div",{className:"header_container",children:(0,f.jsxs)("div",{className:"container",children:[(0,f.jsxs)("div",{className:"food_header mb-60",children:[(0,f.jsxs)("div",{className:"search_container",children:[(0,f.jsxs)("div",{className:"element_bar w-40",children:[(0,f.jsx)("i",{className:"icon-location",style:{color:eu.iconColor}}),(0,f.jsx)("input",{type:"search",id:"searchLocation",placeholder:eh.search_for_your_location,onInput:e.searchLocation,style:{color:eu.content[2]}}),c]}),(0,f.jsxs)("div",{className:"element_bar",style:{position:"relative"},children:[(0,f.jsx)("input",{type:"search",placeholder:"Search for restaurant, cuisine or a dish",onInput:e.searchKeywords,style:{color:eu.content[2]}}),(0,f.jsx)("a",{href:"#",className:"search_btn appyslim-ui-search",style:{color:eu.iconColor}}),p]})]}),(0,f.jsx)("ul",{className:"action_nav",children:(0,f.jsx)("li",{children:(0,_.B)(e.props.page)})})]}),x]})}),(0,f.jsx)("div",{className:"filter_container",children:(0,f.jsxs)("div",{className:"container flex",children:[(0,f.jsx)("div",{className:"rest_title "+eu.title[0]+" "+eu.title[1],style:{color:eu.title[3]},children:(0,f.jsxs)("span",{children:[(0,f.jsx)("i",{className:"icon-location"}),t.length," Restaurants"]})}),(0,f.jsx)("div",{className:"filter_row",children:(0,f.jsx)("a",{className:"filter_btn appyslim-ui-settings",onClick:e.filterNew})}),(0,f.jsx)("ul",{className:"filter_tab","data-size":ey(a),children:ex.map(function(t){if("cuisines"===t.key)return s.list.map(function(s){return -1!==a.cuisines.indexOf(s.cuisine_id)?(0,f.jsx)("li",{onClick:()=>e.updateFilter(t.key,a.cuisines.indexOf(s.cuisine_id)),children:(0,f.jsxs)("a",{children:[s.cuisine_name," ",(0,f.jsx)("span",{children:"\xd7"})]})}):null});if("service"===t.key||"sort"===t.key)return t.data.map(function(s){return s.key===a[t.key]?(0,f.jsx)("li",{onClick:()=>e.updateFilter(t.key),children:(0,f.jsxs)("a",{className:t.icon,
1children:[eh[s.text]," ",(0,f.jsx)("span",{children:"\xd7"})]})}):null});if(a[t.key]){let s="";return"price"===t.key&&(s="".concat(a[t.key])),"time"===t.key&&(s="".concat(a[t.key]," ").concat(eh.filter_minutes)),(0,f.jsx)("li",{onClick:()=>e.updateFilter(t.key),children:(0,f.jsxs)("a",{className:t.icon,children:[s," ",(0,f.jsx)("span",{children:"\xd7"})]})})}return null})})]})}),(0,f.jsx)("div",{className:"row-2",children:(0,f.jsx)("div",{className:"container",children:(0,f.jsx)("ul",{className:"product_list product_4 mt-40 mb-40",children:l})})})]})}constructor(e){super(e),ed=e.data,eu=(ep=e.page).styleAndNavigation,eh=ep.languageSetting;let t=!1;e.home&&(t=!0);let a=[];a=e.category?e.response:ep.vendorList,this.state={vendorList:a,vendorListBackup:a,hideLoad:!0,category:null,cusinListWithAdmin:{list:[]},trending:[],popular:[],filter:(0,_.cR)(),locations:[],keywords:[],addressData:{},dishesShow:t},this.rootRef=j.createRef(),this.loadData=this.loadData.bind(this),this.filterNew=this.filterNew.bind(this),this.callback=this.callback.bind(this),this.sortData=this.sortData.bind(this),this.searchLocation=this.searchLocation.bind(this),this.searchKeywords=this.searchKeywords.bind(this),this.getLocationReference=this.getLocationReference.bind(this),this.updateFilter=this.updateFilter.bind(this),this.setCuisine=this.setCuisine.bind(this),eg=1}}class e_ extends j.Component{componentWillReceiveProps(e){this.setState({category:e.category,subCategory:e.subCategory,detail:e.detail,response:e.response})}render(){let e="",{data:t,page:a}=this.props,{response:s,category:i,subCategory:r}=this.state;return r?"my-orders"===i?(r.indexOf("-details"),e=(0,f.jsx)(P,{page:a,data:t,response:s,category:i,subCategory:r})):e="reviews"===r?(0,f.jsx)(et,{page:a,data:t,response:s,category:i,subCategory:r}):"store-timings"===r?(0,f.jsx)(ee.A,{page:a,data:t,response:s,category:i,subCategory:r}):(0,f.jsx)("div",{children:lang.not_found}):e=i?"saved-address"===i?(0,f.jsx)(M,{page:a,data:t,response:s,category:i}):"payments"===i?(0,f.jsx)(ei,{page:a,data:t,response:s,category:i}):"billing-form"===i?(0,f.jsx)(X,{page:a,data:t,response:s,category:i}):"thanks"===i?(0,f.jsx)(K,{page:a,data:t}):"fail"===i?(0,f.jsx)(Z,{page:a,data:t}):"privacy-policy"===i?(0,f.jsx)(A,{page:a,data:t,response:s,category:i,type:"privacy_policy"}):"terms-and-conditions"===i?(0,f.jsx)(A,{page:a,data:t,response:s,category:i,type:"terms_and_conditions"}):"my-orders"===i?(0,f.jsx)(T,{page:a,data:t,response:s,category:i}):"viewcart"===i?(0,f.jsx)(C,{page:a,data:t}):"search"===i||"location-search"===i||"offers"===i||"wishlist"===i||"popular"===i||"trending"===i||"near-me"===i?"2"===a.styleAndNavigation.layout?(0,f.jsx)(ej,{page:a,data:t,response:s,category:i}):(0,f.jsx)(en,{page:a,data:t,response:s,category:i}):-1!==i.indexOf("-type")?(0,f.jsx)(ej,{page:a,data:t,response:s,category:i}):-1!==i.indexOf("-details")?(0,f.jsx)(S,{page:a,data:t,response:s,category:i}):(0,f.jsx)(D,{page:a,data:t,response:s,category:i}):"2"===a.styleAndNavigation.layout?(0,f.jsx)(ej,{page:a,data:t,home:!0}):(0,f.jsx)(ec,{page:a,data:t,home:!0}),e}constructor(e){super(e),this.state={category:e.category,subCategory:e.subCategory,detail:e.detail,response:e.response}}}let eb=e_}}]);

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.