PageSourceSearch

https://order.thanjaimess.com/static/js/3326.44ca9a8c.chunk.js

js thanjaimess.com collected 2026-10-04 02:29:02 UTC 50,967 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkmagilhub=self.webpackChunkmagilhub||[]).push([[3326],{22865(e,i,t){t.d(i,{f:()=>s});var n=t(5544),o=t(65043),l=t(83003),d=t(36322),a=t(72948);function s(e){var i,t,s,r;const c=(0,o.useState)(null),u=(0,n.A)(c,2),v=u[0],m=u[1],p=(0,o.useRef)(null),h=(0,o.useRef)(!1),x=(0,d.zy)(),f=(0,l.wA)(),g=(0,l.d4)(e=>{var i;return null===(i=e.loyalty)||void 0===i?void 0:i.appliedReward}),y=(0,l.d4)(e=>{var i;return null===(i=e.order)||void 0===i?void 0:i.currentOrderDetail}),I=(0,l.d4)(e=>e.loyalty),j=null===I||void 0===I?void 0:I.dashboard,N=(null===I||void 0===I||null===(i=I.lookupResult)||void 0===i?void 0:i.loyalty_id)||(null===I||void 0===I||null===(t=I.lookupResult)||void 0===t||null===(s=t.member)||void 0===s?void 0:s.id)||(null===j||void 0===j||null===(r=j.customer)||void 0===r?void 0:r.loyalty_customer_id)||(null===j||void 0===j?void 0:j.loyalty_customer_id)||"",b=(0,l.d4)(e=>{var i,t;return(null===(i=e.restaurant)||void 0===i||null===(t=i.currentRestaurantDetail)||void 0===t?void 0:t.id)||""}),A=(0,o.useCallback)(e=>{p.current&&clearTimeout(p.current),m(e),p.current=setTimeout(()=>{m(null),p.current=null},4e3)},[]);return(0,o.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,o.useEffect)(()=>{if(e>0)return void(h.current=!0);if(!h.current)return;h.current=!1;const i="Rewards removed because your cart is empty";if(g){const e=(null===y||void 0===y?void 0:y.id)||(null===y||void 0===y?void 0:y.orderId)||"",t=g.application_id;e&&t&&f((0,a.hv)({orderId:e,applicationId:t,loyaltyCustomerId:N,locationId:b})),A(i)}else localStorage.getItem("pendingLoyaltyRewards")&&(localStorage.removeItem("pendingLoyaltyRewards"),window.dispatchEvent(new CustomEvent("loyalty:pending-rewards-change")),A(i))},[e]),(0,o.useEffect)(()=>{if(!e){const e=sessionStorage.getItem("pendingRewardRemovedToast");if(e)sessionStorage.removeItem("pendingRewardRemovedToast"),A(e);else{const e=sessionStorage.getItem("pendingCartEmptyToast");e?(sessionStorage.removeItem("pendingCartEmptyToast"),A(e)):localStorage.getItem("pendingLoyaltyRewards")&&(localStorage.removeItem("pendingLoyaltyRewards"),window.dispatchEvent(new CustomEvent("loyalty:pending-rewards-change")),A("Redeemed rewards removed because your cart is empty"))}}},[e,x.key,A]),v}},63326(e,i,t){t.r(i),t.d(i,{default:()=>Y});var n=t(80045),o=t(89379),l=t(5544),d=t(47754),a=t(65043),s=t(97950),r=t(36322),c=(t(77802),t(99727));const u=t.p+"static/media/Imagenavigateicon.a4575fd50a77abba799e135d12266fb6.svg";var v=t(7553),m=t(86453),p=t(74179),h=t(72839),x=t(97162),f=t(93
1691),g=t(50416),y=t(65327),I=t(43903),j=t(29393),N=t(93619),b=t(61697),A=t(37430),C=t(83003),T=t(47120),D=t(16971),S=t(45878),w=t(41918),k=t(1124),E=t(61303),M=t(12054),O=t(96173),R=t(22865),P=t(49367),z=t(17794),F=t(19085),L=t(81799),q=t(5484),U=t(34348),Q=t.n(U),_=t(62501),W=t(32600),V=t(57122),B=t(95868),H=t(131),Z=t(70579);const G=["typeId","optionName","price","modifierOptionId","optionAvailable","typeAvailable","isBase","isSpinnerEnabled"],Y=()=>{var e,i,t,U,Y,J,K,$,X,ee,ie,te,ne,oe,le,de,ae,se,re,ce,ue,ve,me,pe,he,xe,fe,ge,ye,Ie,je,Ne,be,Ae,Ce,Te,De,Se,we,ke,Ee,Me,Oe,Re,Pe,ze,Fe,Le,qe,Ue,Qe,_e,We,Ve,Be,He,Ze,Ge;const Ye=(0,r.Zp)(),Je=(0,C.wA)(),Ke=(0,r.g)(),$e=Ke.itemName,Xe=Ke.categoryId,ei=(0,r.zy)(),ii=(0,a.useRef)(null),ti=(0,C.d4)(e=>e.cart.isCoupon),ni=(0,a.useState)(),oi=(0,l.A)(ni,2),li=oi[0],di=oi[1],ai=(0,a.useState)(!1),si=(0,l.A)(ai,2),ri=si[0],ci=si[1],ui=(0,C.d4)(e=>(0,A.E3)(e.restaurant.appliedCoupons)||{}),vi=(0,a.useState)(0),mi=(0,l.A)(vi,2),pi=mi[0],hi=mi[1],xi=(0,a.useRef)(!1),fi=(0,a.useRef)(null);let gi=(0,r.g)(),yi=gi.merchantType,Ii=gi.merchantSlug,ji=(gi.orderId,gi.eventDate),Ni=(0,r.g)();const bi=(0,z.A)().handleLogout,Ai=(0,C.d4)(e=>e.restaurant),Ci=(0,_.Ri)(L.ir)||"",Ti=localStorage.getItem("CHECKIN_TABLE_ID")||"",Di=(0,C.d4)(e=>{var i;return null===(i=e.persistedState)||void 0===i?void 0:i.eventDate}),Si=ji||Di,wi=JSON.parse(localStorage.getItem("restaurant")||""),ki=(null===Ai||void 0===Ai?void 0:Ai.currentMenuType)||(null===Ni||void 0===Ni?void 0:Ni.menuType)||(null===wi||void 0===wi?void 0:wi.menuType)||"Delivery",Ei=(0,a.useState)(!1),Mi=(0,l.A)(Ei,2),Oi=Mi[0],Ri=Mi[1],Pi=(0,a.useState)(""),zi=(0,l.A)(Pi,2),Fi=zi[0],Li=zi[1],qi=(0,a.useState)(),Ui=(0,l.A)(qi,2),Qi=(Ui[0],Ui[1]),_i=(0,a.useState)(!0),Wi=(0,l.A)(_i,2),Vi=Wi[0],Bi=(Wi[1],(0,a.useState)(!0)),Hi=(0,l.A)(Bi,2),Zi=Hi[0],Gi=(Hi[1],(0,a.useState)([])),Yi=(0,l.A)(Gi,2),Ji=Yi[0],Ki=Yi[1],$i=(0,a.useState)(1),Xi=(0,l.A)($i,2),et=Xi[0],it=Xi[1],tt=(0,a.useState)(!1),nt=(0,l.A)(tt,2),ot=nt[0],lt=nt[1],dt=(0,a.useState)(),at=(0,l.A)(dt,2),st=at[0],rt=at[1],ct=(0,a.useState)(!1),ut=(0,l.A)(ct,2),vt=ut[0],mt=ut[1],pt=(0,a.useState)(!1),ht=(0,l.A)(pt,2),xt=ht[0],ft=ht[1],gt=(0,a.useState)(""),yt=(0,l.A)(gt,2),It=(yt[0],yt[1]),jt=(0,a.useState)(!1),Nt=(0,l.A)(jt,2),bt=Nt[0],At=Nt[1],Ct=(0,a.useState)(!1),Tt=(0,l.A)(Ct,2),Dt=Tt[0],St=Tt[1],wt=(0,a.useState)(!0),kt=(0,l.A)(wt,2),Et=(kt[0],kt[1]),Mt=(0,a.useState)(!1),Ot=(0,l.A)(Mt,2),Rt=Ot[0],Pt=Ot[1],zt=(0,a.useState)(!1),Ft=(0,l.A)(zt,2),Lt=Ft[0],qt=Ft[1],Ut=(0,C.d4)(e=>{var i,t;return null===(i=e.cart)||void 0===i||null===(t=i.cart)||void 0===t?void 0:t.items}),Qt=((0,R.f)(null!==(e=null===Ut||void 0===Ut?void 0:Ut.length)&&void 0!==e?e:0),(0,C.d4)(e=>e.restaurant.currentRestaurantDetail.orderTypes)),_t=(0,C.d4)(e=>e.restaurant.currentRestaurantDetail),Wt=(0,C.d4)(e=>e.restaurant.restaurantOrderTypeId),Vt=!0===(null===_t||void 0===_t||null===(i=_t.uiFeatureFlags)||void 0===i?void 0:i.disableItemInstructions),Bt=(0,C.d4)(e=>e.restaurant.restaurantDetailLoading),Ht=null===_t||void 0===_t?void 0:_t.timeZoneCd,Zt=(0,a.useMemo)(()=>{var e,i;return null===_t||void 0===_t||null===(e=_t.orderTypes)||void 0===e||null===(i=e.find(e=>"P"===(null===e||void 0===e?void 0:e.typeGroup)))||void 0===i?void 0:i.isEnabled},[_t]),Gt=(0,a.useMemo)(()=>{var e,i;return null===_t||void 0===_t||null===(e=_t.orderTypes)||void 0===e||null===(i=e.find(e=>"S"===(null===e||void 0===e?void 0:e.typeGroup)))||void 0===i?void 0:i.isEnabled},[_t]),Yt=(0,C.d4)(e=>{var i;return null===e||void 0===e||null===(i=e.navigation)||void 0===i?void 0:i.isMobile}),Jt=(0,C.d4)(e=>e.restaurant.currentRestaurantDetail.id),Kt=(0,C.d4)(e=>e.cart.isCartViewVisible),$t=(0,C.d4)(e=>e.restaurant.restaurantTableDetails),Xt=(0,C.d4)(e=>e.cart.cartMenuDefaultTax),en=(0,C.d4)(e=>e.cart.cart.items),tn=(0,C.d4)(e=>e.restaurant.restaurantMenuDetails),nn=null===_t||void 0===_t?void 0:_t.country,on=(0,C.d4)(e=>{var i;return null===(i=e.restaurant.exploreMenu)||void 0===i?void 0:i.menu}),ln=(0,C.d4)(e=>e.restaurant.restaurantMenuSuccess),dn=(0,C.d4)(e=>e.cart.isEventDate),an=(0,C.d4)(e=>
1e.restaurant.restaurantMenuDetailLoading),sn=(0,C.d4)(e=>e.scheduler.isClosingWarning),rn=(0,C.d4)(e=>{var i;return null===(i=e.cart)||void 0===i?void 0:i.currentOrderType}),cn=(0,a.useMemo)(()=>{var e;return Qt&&(null===(e=Qt.find(e=>"D"==e.typeGroup))||void 0===e?void 0:e.id)||""},[Qt]),un=(0,a.useMemo)(()=>{var e;return null===_t||void 0===_t||null===(e=_t.orderTypes)||void 0===e?void 0:e.some(e=>"D"===(null===e||void 0===e?void 0:e.typeGroup)&&(null===e||void 0===e?void 0:e.typeName)===ki)},[_t,ki]),vn=(0,a.useMemo)(()=>$t&&$t.length>0&&$t.filter(e=>e.tableId===Ti)[0]||[],[$t]),mn=(0,a.useMemo)(()=>Ti&&Ti.length>0&&(2==_t.dining||3==_t.dining),[_t]),pn=ei.state||{},hn=pn.edit,xn=pn.modifierIds,fn=Boolean(Ti),gn=e=>e&&fn?(0,o.A)((0,o.A)({},e),{},{offerId:null,offerPrice:null,discountValue:null,discountType:null,offerType:null,maxDiscountCap:null,bogoDetails:null}):e,yn=(0,a.useMemo)(()=>{if(!$e)return null;const e=(0,B.H)($e),i=e=>{var i;return null===e||void 0===e||null===(i=e.trim())||void 0===i?void 0:i.toLowerCase().replace(/\s+/g,"-")},t=null===tn||void 0===tn?void 0:tn.find(t=>i((null===t||void 0===t?void 0:t.itemName)||"")===i(e||""));if(t)return gn(t);const n=Array.isArray(on)?on:[];return gn(n.find(t=>i((null===t||void 0===t?void 0:t.itemName)||"")===i(e||"")))},[tn,on,$e,fn]),In=null===yn||void 0===yn?void 0:yn.itemId;(0,a.useEffect)(()=>{Li(""),Je((0,w.aW)(!1)),Et(!0)},[$e]);const jn=null===yn||void 0===yn||null===(t=yn.itemMedia)||void 0===t?void 0:t.filter(e=>(null===e||void 0===e?void 0:e.itemImage)&&(null===e||void 0===e?void 0:e.itemType));(0,a.useEffect)(()=>{xn&&hn&&Ki(Array.isArray(xn)?xn:xn.split(","))},[xn,hn]),(0,a.useEffect)(()=>{var e,i,t;if(hn||null===yn||void 0===yn||null===(e=yn.customization)||void 0===e||!e.length)return;if(!(null!=(null===(i=yn.customization[0])||void 0===i?void 0:i.modifierId)&&Array.isArray(null===(t=yn.customization[0])||void 0===t?void 0:t.options)))return;const n=null===_t||void 0===_t?void 0:_t.timeZoneCd,o=n?Q()().tz(n):Q()(),l=[];yn.customization.forEach(e=>{(e.options||[]).forEach(e=>{(1===e.default||!0===e.default)&&1===e.optionAvailable&&(e=>{if(!e.inactiveUntilTime)return!0;const i=Q()(e.inactiveUntilTime);return!i.isValid()||o.isSameOrAfter(i)})(e)&&(e=>1===e.isVisible||!0===e.isVisible||null==e.isVisible)(e)&&l.push(e.modifierOptionId)})}),Ki(l)},[null===yn||void 0===yn?void 0:yn.customization,hn,null===_t||void 0===_t?void 0:_t.timeZoneCd]),(0,a.useEffect)(()=>{!Si||null!==tn&&void 0!==tn&&tn.length||ln||an?null!==tn&&void 0!==tn&&tn.length||Si||!_t||""===(null===_t||void 0===_t?void 0:_t.id)||an||(mt(!0),Je((0,b.zs)({type:ki||"Delivery",locationId:_t.id,customerId:Ci,searchText:null,visibleTo:"C"}))):(fi.current&&clearTimeout(fi.current),fi.current=setTimeout(()=>{xi.current||(xi.current=!0,mt(!0),Je((0,b.qB)({type:ki,locationId:_t.id,customerId:Ci,searchText:null,visibleTo:"C",eventSlug:Si})))},300))},[_t,ki,Si,dn,ln,an,Je]),(0,a.useEffect)(()=>{an||(xi.current=!1,fi.current&&(clearTimeout(fi.current),fi.current=null))},[an]),(0,a.useEffect)(()=>{null!==_t&&void 0!==_t&&_t.id||!Ii||Je((0,b.y7)(Ii))},[Ii,_t,Je]),(0,a.useEffect)(()=>{!an&&tn&&tn.length>0&&null!==_t&&void 0!==_t&&_t.id&&!yn&&Ye("/notFound")},[an,tn,_t,yn,Ye]);const Nn=(0,a.useCallback)(e=>{var i;return!(null===(i=_t.orderTypes)||void 0===i||!i.some(i=>!Ti&&(0,q.yT)(i.typeName)==(0,q.yT)(e)&&1==i.isEnabled))},[_t]),bn=null===yn||void 0===yn||null===(U=yn.pairedItems)||void 0===U?void 0:U.map(e=>null===e||void 0===e?void 0:e.id),An=null===tn||void 0===tn||null===(Y=tn.filter(e=>{var i;!(null!==e&&void 0!==e&&e.customization)||null===e||void 0===e||null===(i=e.customization)||void 0===i||i.length;return null===bn||void 0===bn?void 0:bn.includes(null===e||void 0===e?void 0:e.itemId)}))||void 0===Y||null===(J=Y.map(gn))||void 0===J?void 0:J.sort((e,i)=>{var t,n,o,l,d,a;return(null!==(t=null===yn||void 0===yn||null===(n=yn.pairedItems)||void 0===n||null===(o=n.find(i=>(null===i||void 0===i?void 0:i.id)===(null===e||void 0===e?void 0:e.itemId)))||void 0===o?void 0:o.sortOrder)&&void 0!==t?t:0)-(null!==(l=null===yn||void 0===yn||null===(d=yn.pairedItems)||void 0===d||null===(a=d.find(e=>(null===e||void 0===e?void 0:e.id)===(null===i||void 0===i?void 0:i.itemId)))||void 0===a?void 0:a.sortOrder)&&void 0!==l?l:0)}),Cn=a.useCallback(e=>{var i,t;const n=null===_t||void 0===_t||null===(i=_t.orderTypes)||void 0===i?void 0:i.filter(i=>(0,q.yT)(i.typeName)===(0,q.yT)(e)&&1==i.isEnabled),o=n&&(null===(t=n[0])||void 0===t?void 0:t.typeGroup);return"P"==o?0==_t.pickupCutOffTimeExceeds:"S"==o&&0==_t.deliveryCutOffTimeExceeds},[_t,ki]),Tn=(0,C.d4)(e=>e.restaurant.getFav.some(e=>(e.itemId,null===yn||void 0===yn||yn.itemId,e.itemId==(null===yn||void 0===yn?void 0:yn.itemId)))),Dn=(0,a.useMemo)(()=>!!yn&&(yn.customization&&yn.customization.length>0),[yn,In]);const Sn=new Date(li).getFullYear()>3e3,wn=null!==(null===yn||void 0===yn?void 0:yn.stockQuantity)&&Number(null===yn||void 0===yn?void 0:yn.stockQuantity)<1||1==(null===yn||void 0===yn?void 0:yn.isCategoryOff),kn=(null===(K=new Date(li))||void 0===K?void 0:K.getFullYear())<3e3&&function(e,i,t){if(!e)return"-";
1const n=new Date(e),o=n.toLocaleString("en-US",{timeZone:t}),l=new Date(o),d=new Date;if((l.getTime()-d.getTime())/864e5>6)return"Temporarily unavailable";const a=n.toLocaleDateString("en-US",{timeZone:t,weekday:"long"}),s=n.toLocaleTimeString("en-US",{timeZone:t,hour:"numeric",minute:"2-digit",hour12:!0});return"Will be available ".concat(a," at ").concat(s)}(li,null!=(null===yn||void 0===yn?void 0:yn.nextAvailableDay)&&(null===yn||void 0===yn||yn.nextAvailableDay),Ht),En=(0,a.useCallback)((e,i)=>"https://storage.googleapis.com/mhp-media/img/"+e+"."+i,[]),Mn=(0,a.useMemo)(()=>{var e,i;return Array.isArray(null===yn||void 0===yn?void 0:yn.customization)&&yn.customization.length>0&&null!=(null===(e=yn.customization[0])||void 0===e?void 0:e.modifierId)&&Array.isArray(null===(i=yn.customization[0])||void 0===i?void 0:i.options)},[null===yn||void 0===yn?void 0:yn.customization]),On=(0,a.useMemo)(()=>{if(null===yn||void 0===yn||!yn.customization||0===Ji.length)return[];const e=null===_t||void 0===_t?void 0:_t.timeZoneCd,i=e?Q()().tz(e):Q()(),t=[];return Mn?yn.customization.forEach(e=>{(e.options||[]).forEach(n=>{Ji.includes(n.modifierOptionId)&&(e=>{if(!e.inactiveUntilTime)return!0;const t=Q()(e.inactiveUntilTime);return!t.isValid()||i.isSameOrAfter(t)})(n)&&(e=>1===e.isVisible||!0===e.isVisible||null==e.isVisible)(n)&&t.push((0,o.A)((0,o.A)({},n),{},{typeId:e.modifierId,quantity:1,type:e.modifierName,modifierName:e.modifierName,minRequired:e.minRequired,maxRequired:e.maxRequired}))})}):yn.customization.forEach(e=>{var i;Ji.includes(e.modifierOptionId)&&t.push((0,o.A)((0,o.A)({},e),{},{quantity:1,modifierName:null!==(i=e.type)&&void 0!==i?i:e.modifierName}))}),t},[null===yn||void 0===yn?void 0:yn.customization,Ji,Mn,null===_t||void 0===_t?void 0:_t.timeZoneCd]),Rn=!(0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!Sn&&(null===yn||void 0===yn||!yn.enable)&&li);(0,a.useEffect)(()=>{var e;if(Xe){if((null===yn||void 0===yn||null===(e=yn.categories)||void 0===e?void 0:e.length)>0){var i,t,n,o;const e=null===yn||void 0===yn||null===(i=yn.categories)||void 0===i?void 0:i.filter(e=>(null===e||void 0===e?void 0:e.categoryId)===Xe||(null===e||void 0===e?void 0:e.subCategoryId)===Xe);var l;if(null!==(t=e[0])&&void 0!==t&&t.inactiveUntil)di(null===(l=e[0])||void 0===l?void 0:l.inactiveUntilTime);else if(null!==(n=e[0])&&void 0!==n&&n.subCategoryId&&null!==(o=e[0])&&void 0!==o&&o.subCategoryInactiveUntil){var d;di(null===(d=e[0])||void 0===d?void 0:d.subCategoryInactiveUntilTime)}else di(null===yn||void 0===yn?void 0:yn.itemUnAvailableUntil)}}else null!==yn&&void 0!==yn&&yn.itemUnAvailableUntil&&di(yn.itemUnAvailableUntil)},[yn]);const Pn=(0,a.useMemo)(()=>{if(Dn&&null!==yn&&void 0!==yn&&yn.customization){if(Mn){const e=null===_t||void 0===_t?void 0:_t.timeZoneCd;e?Q()().tz(e):Q()();return[...yn.customization].filter(e=>1===e.typeAvailable).sort((e,i)=>{var t,n;return(null!==(t=e.sortOrder)&&void 0!==t?t:0)-(null!==(n=i.sortOrder)&&void 0!==n?n:0)}).reduce((e,i)=>{const t=(i.options||[]).filter(e=>1===e.isVisible||!0===e.isVisible||null==e.isVisible).sort((e,i)=>{var t,n;return(null!==(t=e.optionSortOrder)&&void 0!==t?t:0)-(null!==(n=i.optionSortOrder)&&void 0!==n?n:0)}).map(e=>({modifierOptionId:e.modifierOptionId,optionName:e.optionName,price:e.price,inactiveUntil:e.inactiveUntil,optionAvailable:e.optionAvailable,isBase:e.isBase}));return t.length>0&&(e[i.modifierId]={modifierId:i.modifierId,type:i.modifierName,sortOrder:i.sortOrder,minRequired:i.minRequired,maxRequired:i.maxRequired,typeAvailable:i.typeAvailable,options:t}),e},{})}return yn.customization.reduce((e,i)=>{const t=i.typeId,l=i.optionName,d=i.price,a=i.modifierOptionId,s=i.optionAvailable,r=i.typeAvailable,c=i.isBase,u=i.isSpinnerEnabled,v=(0,n.A)(i,G);return 1!==r||1!==s||(e[t]||(e[t]=(0,o.A)((0,o.A)({},v),{},{typeId:t,modifierId:t,options:[]})),e[t].options.push({modifierOptionId:a,optionName:l,price:d,optionAvailable:s,isBase:c,isSpinnerEnabled:u})),e},{})}},[Dn,null===yn||void 0===yn?void 0:yn.customization,Mn,null===_t||void 0===_t?void 0:_t.timeZoneCd]),zn=(0,a.useMemo)(()=>
1{if(!yn)return"0";const e=parseFloat(yn.price),i=null!=yn.offerPrice?parseFloat(yn.offerPrice):null,t=Ci&&null!=i&&Number.isFinite(i)&&i>=0&&i<e?i/e:1;return((e+On.reduce((e,i)=>e+parseFloat(String(i.price))*(Number(i.quantity)||1),0))*t*et).toFixed(2)},[yn,On,et,Ci]),Fn=(0,a.useCallback)(()=>yn&&yn.isDefaultItemTax&&Xt?Xt:(null===yn||void 0===yn?void 0:yn.tax)||[],[yn,Xt]),Ln=()=>{if(null!==yn&&void 0!==yn&&yn.skipCustomization)return!0;if(!Dn||!Pn)return!0;const e={};if(Mn){const i={};yn.customization.forEach(e=>{(e.options||[]).forEach(t=>{i[t.modifierOptionId]=e.modifierId})}),Ji.forEach(t=>{const n=i[t];n&&(e[n]=(e[n]||0)+1)});for(const t in Pn){const i=Pn[t],n=e[t]||0;if(n<i.minRequired)return!1;if(i.maxRequired>0&&n>i.maxRequired)return!1}}else{Ji.forEach(i=>{const t=yn.customization.find(e=>e.modifierOptionId===i);if(t){var n;const i=null!==(n=t.typeId)&&void 0!==n?n:t.modifierId;e[i]=(e[i]||0)+1}});for(const i in Pn){const t=Pn[i],n=e[i]||0;if(n<t.minRequired)return!1;if(t.maxRequired>0&&n>t.maxRequired)return!1}}return!0};(0,a.useEffect)(()=>{ot&&Ln()&&lt(!1)},[Ji,Pn,Dn,ot]),(0,a.useEffect)(()=>{const e=()=>{document.body.classList.remove("no-scroll"),document.documentElement.classList.remove("no-scroll")};return!Yt&&Kt&&(null===Ut||void 0===Ut?void 0:Ut.length)>0?(document.body.classList.add("no-scroll"),document.documentElement.classList.add("no-scroll")):(Yt||!Kt||Ut&&0!==Ut.length||Je((0,w.ss)(!1)),e()),()=>{e()}},[Kt,Ut,Yt]);const qn=(0,C.d4)(e=>e.restaurant.isExploretabActive),Un=()=>{var e;if(!Ln())return void lt(!0);lt(!1);const i=On.reduce((e,i)=>{const t=Math.max(0,Number(i.quantity)||0);for(let n=0;n<t;n+=1)e.push(i.modifierOptionId);return e},[]).sort(),t=i.length>0?i.join(","):"0",n=Number(zn)/Math.max(1,et),o=e=>String((n*e).toFixed(2));if(hn)if(t!==xn){const e=en.findIndex(e=>e.itemId===(null===yn||void 0===yn?void 0:yn.itemId)&&e.modifierIds===t);if(-1!==e){const i=en.findIndex(e=>e.itemId===(null===yn||void 0===yn?void 0:yn.itemId)&&e.modifierIds===xn);Je((0,w.SM)(null===yn||void 0===yn?void 0:yn.itemId,i,!0));const n=en[e],l=et+parseInt(n.quantity);Je((0,w.V2)(null===yn||void 0===yn?void 0:yn.itemId,o(l),!1,l,void 0,void 0,!0,e,null===yn||void 0===yn?void 0:yn.stockQuantity,null===yn||void 0===yn?void 0:yn.alertQuantity,On,t))}else{const e=en.findIndex(e=>e.itemId===(null===yn||void 0===yn?void 0:yn.itemId)&&e.modifierIds===xn);Je((0,w.SM)(null===yn||void 0===yn?void 0:yn.itemId,e,!0));const i={itemId:null===yn||void 0===yn?void 0:yn.itemId,itemName:yn.itemName||"",itemAltName:yn.itemAltName?yn.itemAltName:"",price:yn.price||"",originalPrice:yn.price||"",quantity:et+"",subTotal:zn||"0",comment:Fi,options:Dn?On:[],modifierIds:t,tax:Fn(),availability:yn.availability,is_discount_applied:!1,offer_amount:Number(zn),offer_data:null,stockQuantity:yn.stockQuantity,alertQuantity:yn.alertQuantity};Je((0,w.bR)(i,!0))}}else{const e=en.findIndex(e=>e.itemId===(null===yn||void 0===yn?void 0:yn.itemId)&&e.modifierIds===xn);en[e];Je((0,w.V2)(null===yn||void 0===yn?void 0:yn.itemId,String(parseFloat(zn)),!1,et,void 0,void 0,!1,e,null===yn||void 0===yn?void 0:yn.stockQuantity,null===yn||void 0===yn?void 0:yn.alertQuantity))}else{const e=Dn?null===en||void 0===en?void 0:en.findIndex(e=>(null===e||void 0===e?void 0:e.itemId)===(null===yn||void 0===yn?void 0:yn.itemId)&&(null===e||void 0===e?void 0:e.modifierIds)===t):null===en||void 0===en?void 0:en.findIndex(e=>(null===e||void 0===e?void 0:e.itemId)===(null===yn||void 0===yn?void 0:yn.itemId));if(-1!==e){const i=en[e],n=Dn?et+parseInt(i.quantity):et,l=o(n);Je((0,w.V2)(null===yn||void 0===yn?void 0:yn.itemId,String(parseFloat(l)),!1,n,void 0,void 0,!!Dn,e,null===yn||void 0===yn?void 0:yn.stockQuantity,null===yn||void 0===yn?void 0:yn.alertQuantity,On,t))}else Je((0,w.bR)({itemId:null===yn||void 0===yn?void 0:yn.itemId,itemName:(null===yn||void 0===yn?void 0:yn.itemName)||"",itemAltName:null!==yn&&void 0!==yn&&yn.itemAltName?null===yn||void 0===yn?void 0:yn.itemAltName:"",price:(null===yn||void 0===yn?void 0:yn.price)||"",originalPrice:(null===yn||void 0===yn?void 0:yn.price)||"",quantity:et+"",subTotal:zn||"0",comment:Fi,options:Dn?On:[],modifierIds:t,tax:Fn(),availability:null===yn||void 0===yn?void 0:yn.availability,is_discount_applied:!1,offer_amount:Number(zn),offer_data:null,stockQuantity:null===yn||void 0===yn?void 0:yn.stockQuantity,alertQuantity:null===yn||void 0===yn?void 0:yn.alertQuantity},!0))}!vt&&"fav"!==(null===ei||void 0===ei||null===(e=ei.state)||void 0===e?void 0:e.source)||qn?(Je((0,w.UW)(null===ki||void 0===ki?void 0:ki.toLowerCase())),Ye(-1)):Ye("/restaurant/"+(null===wi||void 0===wi?void 0:wi.location)+"/menu/"+(null===wi||void 0===wi?void 0:wi.menuType))},Qn=Dn&&Object.values(Pn);(0,a.useEffect)(()=>
1{if(hn){const i=en.find(e=>xn?e.itemId===In&&e.modifierIds===xn:e.itemId===In);var e;if(i)it(parseInt(i.quantity)),Li((null===i||void 0===i?void 0:i.comment)||""),null!==(e=i.items)&&void 0!==e&&e.modifierIds&&Ki(i.items.modifierIds.split(","))}else{const e=en.find(e=>e.itemId===In);e&&!Dn&&(it(parseInt(e.quantity)),Li((null===e||void 0===e?void 0:e.comment)||""),null!==e&&void 0!==e&&e.modifierIds&&Ki(e.modifierIds.split(",")))}},[hn,xn,In,en]);const _n=(0,C.d4)(e=>{var i,t;return null===e||void 0===e||null===(i=e.cart)||void 0===i||null===(t=i.cart)||void 0===t?void 0:t.items.findIndex(e=>(e.itemId,null===yn||void 0===yn||yn.itemId,Dn||xn?e.itemId==(null===yn||void 0===yn?void 0:yn.itemId)&&(null===e||void 0===e?void 0:e.modifierIds)===xn:e.itemId==(null===yn||void 0===yn?void 0:yn.itemId)))}),Wn=(0,a.useState)(!1),Vn=(0,l.A)(Wn,2),Bn=Vn[0],Hn=Vn[1],Zn=(0,a.useRef)(null),Gn=()=>{Hn(!0),Zn.current&&clearTimeout(Zn.current),Zn.current=setTimeout(()=>Hn(!1),3e3)},Yn=(0,a.useCallback)(e=>(0,Z.jsx)("div",{className:"restore",children:(0,Z.jsx)(k.A,{setCustomisationItemId:It,itemDetail:e.menuDetail,customizable:!!e.menuDetail.customization,getMenuItemImageURL:En,ItemUpdate:e.ItemUpdate,isRestaurantOpen:null===_t||void 0===_t?void 0:_t.open,isMenuAdd:Nn(ki),cutOffTimeExceeds:Cn(ki),isDineInEnabled:no,isDineInOrder:un,onMaxQtyClick:Gn})}),[_t,Gn]);function Jn(e,i){}const Kn=Number((null===yn||void 0===yn?void 0:yn.maxQty)||0),$n=(0,a.useMemo)(()=>en&&null!==yn&&void 0!==yn&&yn.itemId&&!hn&&Dn?en.filter(e=>e.itemId===yn.itemId).reduce((e,i)=>e+parseInt(i.quantity||"0"),0):0,[en,null===yn||void 0===yn?void 0:yn.itemId,hn,Dn]),Xn=Kn>0&&$n+et>=Kn,eo=Kn>0&&$n+et>Kn;(0,a.useEffect)(()=>()=>{Zn.current&&clearTimeout(Zn.current)},[]);const io=e=>{if(e){if(Xn)return void Gn();it(et+1)}else et>1&&it(et-1)},to=(e,i,t)=>{e.stopPropagation();const n={itemId:[i],locationId:Jt,customerId:Ci};Je("add"==t?(0,b.kq)(n):(0,b.P2)(n))};(0,a.useEffect)(()=>{const e=e=>{const i=e.target;!ii.current||ii.current.contains(i)||i.closest(".cart-header")||i.closest(".cart-container")||i.closest(".customization-popup-overlayZa")||i.closest(".purchase-limit-overlay")||i.closest(".cart-rewards-redeem-modal")||i.closest(".cart-rewards-remove-confirm")||i.closest(".loyalty-enroll-popup")||i.closest(".customization-popup-overlayZa")||!Kt||Je((0,w.ss)(!1))};return Kt&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[Kt,Je]);const no=(0,a.useMemo)(()=>{var e;return null===_t||void 0===_t||null===(e=_t.orderTypes)||void 0===e?void 0:e.some(e=>"D"===(null===e||void 0===e?void 0:e.typeGroup)&&[!0,1,"true","1"].includes(null===e||void 0===e?void 0:e.isEnabled))},[null===_t||void 0===_t?void 0:_t.orderTypes]),oo=(0,a.useMemo)(()=>un?!!no:"delivery"===rn?!!Gt:!!Zt,[un,no,rn,Gt,Zt]),lo=!oo||Boolean(un||mn)&&!no,ao=(0,C.d4)(e=>e.cart.customizationPopUp);if((0,a.useEffect)(()=>{if(window.scrollTo(0,0),yn&&_t){var e,i,t;const n=(null===yn||void 0===yn||null===(e=yn.seoDetails)||void 0===e?void 0:e.metaTitle)||"".concat(null===yn||void 0===yn?void 0:yn.itemName," - ").concat(null===_t||void 0===_t?void 0:_t.branchName),o=(null===yn||void 0===yn||null===(i=yn.seoDetails)||void 0===i?void 0:i.metaDescription)||(null===yn||void 0===yn?void 0:yn.description)||"Order ".concat(null===yn||void 0===yn?void 0:yn.itemName," from ").concat(null===_t||void 0===_t?void 0:_t.branchName,". ").concat((null===yn||void 0===yn?void 0:yn.description)||"Delicious food delivered to your doorstep.");document.title=n;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.setAttribute("name","description"),document.head.appendChild(l)),l.setAttribute("content",o);let d=document.querySelector('link[rel="canonical"]');d||(d=document.createElement("link"),d.setAttribute("rel","canonical"),document.head.appendChild(d)),d.setAttribute("href",(null===yn||void 0===yn||null===(t=yn.seoDetails)||void 0===t?void 0:t.metaCanonical)||window.location.href)}},[yn,_t]),(0,a.useEffect)(()=>{if(!jn||jn.length<=1)return;const e=setInterval(()=>{hi(e=>e===jn.length-1?0:e+1)},3e3);return()=>clearInterval(e)},[jn]),!_t||Bt)return(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsx)("div",{className:Yt?"MenuPageDtails-loading-M":"MenuPageDtails-loading",children:(0,Z.jsx)("img",{src:N,alt:"",className:Yt?"Loaders-img-M":"Loaders-img"})})});const so=(null===yn||void 0===yn?void 0:yn.nutritionInfo)||{},ro=(0,Z.jsxs)(Z.Fragment,{children:[yn&&(0,Z.jsxs)(P.mg,{children:[(0,Z.jsx)("title",{children:(null===yn||void 0===yn||null===($=yn.seoDetails)||void 0===$?void 0:$.metaTitle)||"".concat(null===yn||void 0===yn?void 0:yn.itemName," - ").concat(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{name:"description",content:(null===yn||void 0===yn||null===(X=yn.seoDetails)||void 0===X?void 0:X.metaDescription)||(null===yn||void 0===yn?void 0:yn.description)||"Order ".concat(null===yn||void 0===yn?void 0:yn.itemName," from ").concat(null===_t||void 0===_t?void 0:_t.branchName,". ").concat((null===yn||void 0===yn?void 0:yn.description)||"Delicious food delivered to your doorstep.")}),(0,Z.jsx)("meta",{name:"keywords",content:(null===yn||void 0===yn||null===(ee=yn.seoDetails)||void 0===ee?void 0:ee.metaKeywords)||"".concat(null===yn||void 0===yn?void 0:yn.itemName,", ").concat(null===_t||void 0===_t?void 0:_t.branchName,", food delivery, restaurant, ").concat((null===yn||void 0===yn?void 0:yn.category)||"")}),(0,Z.jsx)("meta",{name:"robots",content:(null===yn||void 0===yn||null===(ie=yn.seoDetails)||void 0===ie?void 0:ie.metaTags)||"index, follow"}),(0,Z.jsx)("meta",{name:"canonical",content:(null===yn||void 0===yn||null===(te=yn.seoDetails)||void 0===te?void 0:te.metaCanonical)||("undefined"!==typeof window?window.location.href:"")}),(0,Z.jsx)("meta",{name:"author",content:(null===yn||void 0===yn||null===(ne=yn.seoDetails)||void 0===ne?void 0:ne.metaAuthor)||(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{name:"image",content:(null===yn||void 0===yn||null===(oe=yn.seoDetails)||void 0===oe?void 0:oe.metaImage)||((null===jn||void 0===jn?void 0:jn.length)>0?En(jn[0].itemImage,(null===(le=jn[0].itemType)||void 0===le?void 0:le.split("/")[1])||""):"")}),(0,Z.jsx)("meta",{property:"og:title",content:(null===yn||void 0===yn||null===(de=yn.seoDetails)||void 0===de?void 0:de.metaTitle)||"".concat(null===yn||void 0===yn?void 0:yn.itemName," - ").concat(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{property:"og:description",content:(null===yn||void 0===yn||null===(ae=yn.seoDetails)||void 0===ae?void 0:ae.metaDescription)||(null===yn||void 0===yn?void 0:yn.description)||"Order ".concat(null===yn||void 0===yn?void 0:yn.itemName," from ").concat(null===_t||void 0===_t?void 0:_t.branchName,". ").concat((null===yn||void 0===yn?void 0:yn.description)||"Delicious food delivered to your doorstep.")}),(0,Z.jsx)("meta",{property:"og:image",content:(null===yn||void 0===yn||null===(se=yn.seoDetails)||void 0===se?void 0:se.metaImage)||((null===jn||void 0===jn?void 0:jn.length)>0?En(jn[0].itemImage,(null===(re=jn[0].itemType)||void 0===re?void 0:re.split("/")[1])||""):"")}),(0,Z.jsx)("meta",{property:"og:type",content:(null===yn||void 0===yn||null===(ce=yn.seoDetails)||void 0===ce?void 0:ce.metaType)||"website"}),(0,Z.jsx)("meta",{property:"og:url",content:"undefined"!==typeof window?window.location.href:""}),(0,Z.jsx)("meta",{property:"og:site_name",content:(null===yn||void 0===yn||null===(ue=yn.seoDetails)||void 0===ue?void 0:ue.metaSiteName)||(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,Z.jsx)("meta",{name:"twitter:title",content:(null===yn||void 0===yn||null===(ve=yn.seoDetails)||void 0===ve?void 0:ve.metaTitle)||"".concat(null===yn||void 0===yn?void 0:yn.itemName," - ").concat(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{name:"twitter:description",content:(null===yn||void 0===yn||null===(me=yn.seoDetails)||void 0===me?void 0:me.metaDescription)||(null===yn||void 0===yn?void 0:yn.description)||"Order ".concat(null===yn||void 0===yn?void 0:yn.itemName," from ").concat(null===_t||void 0===_t?void 0:_t.branchName,". ").concat((null===yn||void 0===yn?void 0:yn.description)||"Delicious food delivered to your doorstep.")}),(0,Z.jsx)("meta",{name:"twitter:image",content:(null===yn||void 0===yn||null===(pe=yn.seoDetails)||void 0===pe?void 0:pe.metaImage)||((null===jn||void 0===jn?void 0:jn.length)>0?En(jn[0].itemImage,(null===(he=jn[0].itemType)||void 0===he?void 0:he.split("/")[1])||""):"")}),yn&&(0,Z.jsx)("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"MenuItem",name:yn.itemName,description:yn.description||"Delicious ".concat(yn.itemName," from ").concat(null===_t||void 0===_t?void 0:_t.branchName),image:jn?En(null===(xe=jn[0])||void 0===xe?void 0:xe.itemImage,(null===(fe=jn[0])||void 0===fe||null===(ge=fe.itemType)||void 0===ge?void 0:ge.split("/")[1])||""):"",offers:{"@type":"Offer",price:yn.price,priceCurrency:"US"===nn?"USD":"INR",availability:yn.enable?"https://schema.org/InStock":"https://schema.org/OutOfStock"},servedAt:{"@type":"Restaurant",name:null===_t||void 0===_t?void 0:_t.branchName,address:null===_t||void 0===_t?void 0:_t.address}})})]},"".concat(null===yn||void 0===yn?void 0:yn.itemId,"-").concat(null===_t||void 0===_t?void 0:_t.id)),!yn&&_t&&(0,Z.jsxs)(P.mg,{children:[(0,Z.jsx)("title",{children:null===_t||void 0===_t?void 0:_t.branchName}),(0,Z.jsx)("meta",{name:"description",content:"Menu items from ".concat(null===_t||void 0===_t?void 0:_t.branchName)}),(0,Z.jsx)("meta",{name:"robots",content:"index, follow"}),(0,Z.jsx)("meta",{name:"canonical",content:"undefined"!==typeof window?window.location.href:""})]}),an?(0,Z.jsx)("div",{className:Yt?"MenuPageDtails-loading-M":"MenuPageDtails-loading",children:(0,Z.jsx)("img",{src:N,alt:"",className:Yt?"Loaders-img-M":"Loaders-img"})}):(0,Z.jsxs)("div",{className:"menuDetailsContainer",children:[(0,Z.jsxs)("div",{className:"fixed-index-header-wrapper",children:[" ",(0,Z.jsx)(d.A,{Switch:!un&&!Ti,currentOrdertypeDetails:st,setCurrentOrdertypeDetails:rt,Logoutfn:()=>bi("noRedirect"),isMobile:Yt,signupPopup:xt,setSignupPopup:ft,menuType:ki,setIsSearchActive:Qi})]}
1),!an&&(0,Z.jsxs)("div",{className:Rn?"menuDetails-show":"menuDetails",children:[(0,Z.jsx)("div",{className:"imageBox",children:(0,Z.jsxs)("div",{className:(null===jn||void 0===jn?void 0:jn.length)>0?Yt?"itemImage-wrapper":"itemImage-wrapper-desktop":"itemNoImage-wrapper",children:[(null===jn||void 0===jn?void 0:jn.length)>1&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("img",{src:u,alt:"",onClick:()=>{jn&&0!==jn.length&&hi(e=>0===e?jn.length-1:e-1)},style:{bottom:Yt?"5px":"7px",left:Yt?"38%":"46.5%",width:Yt?"35px":"40px",height:Yt?"35px":"40px"},className:"itemImage-back-btn"}),(0,Z.jsx)("img",{src:u,alt:"",onClick:()=>{jn&&0!==jn.length&&hi(e=>e===jn.length-1?0:e+1)},style:{bottom:Yt?"5px":"7px",right:Yt?"38%":"46.5%",width:Yt?"35px":"40px",height:Yt?"35px":"40px"},className:"itemImage-front-btn"})]}),(null===jn||void 0===jn?void 0:jn.length)>1&&(0,Z.jsx)("div",{className:"image-skeleton-loader ".concat(Yt?"mobile-sliderchange-dot":""),children:null===jn||void 0===jn?void 0:jn.map((e,i)=>(0,Z.jsx)("div",{style:{width:pi===i?Yt?"30px":"40px":Yt?"7px":"10px",height:Yt?"7px":"10px",borderRadius:"5px",backgroundColor:pi===i?"white":"#C6C6C6",cursor:"pointer"},onClick:()=>hi(i)}))}),(null===jn||void 0===jn?void 0:jn.length)>0&&(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsx)("img",{alt:null===yn||void 0===yn?void 0:yn.itemName,className:"itemImage",src:En((null===(ye=jn[pi])||void 0===ye?void 0:ye.itemImage)||"",(null===(Ie=jn[pi])||void 0===Ie||null===(je=Ie.itemType)||void 0===je?void 0:je.split("/")[1])||""),title:null===yn||void 0===yn?void 0:yn.itemName,style:{cursor:"pointer"},onLoad:()=>Et(!1),onError:()=>Et(!1)})}),(0,Z.jsx)("img",{title:"Back",style:{left:Yt?"10px":"20px"},src:c.A,alt:"backBtn",className:"backBtn",onClick:()=>{Yt&&Je((0,w.rM)({location_id:_t.id,item_ids:en.map(e=>e.itemId),order_type_id:Wt})),vt?Di?(Ye("/restaurant/".concat(null===wi||void 0===wi?void 0:wi.location,"/menu/").concat(null===wi||void 0===wi?void 0:wi.menuType,"/event/").concat(Di)),Je((0,w.aW)(!1))):(Ye(qn?-1:"/restaurant/".concat(null===wi||void 0===wi?void 0:wi.location,"/menu/").concat(null===wi||void 0===wi?void 0:wi.menuType)),Je((0,w.aW)(!1))):(localStorage.setItem("backButtonClicked","true"),Ye(-1),Je((0,w.aW)(!1)))}}),(0,Z.jsxs)(Z.Fragment,{children:[(null===jn||void 0===jn?void 0:jn.length)>0||!Ci||Yt||un&&!Ti?"":(0,Z.jsx)("div",{className:"Heartbtn-image-less",children:Tn?(0,Z.jsx)(T.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"remove")}):(0,Z.jsx)(D.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"add")})}),Ci&&!((null===jn||void 0===jn?void 0:jn.length)>0)||Ci&&!un&&!(un&&!Ti)&&(0,Z.jsx)("div",{className:"Heartbtn",children:Tn?(0,Z.jsx)(T.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"remove")}):(0,Z.jsx)(D.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"add")})}),0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!(Sn||null!==yn&&void 0!==yn&&yn.enable)&&li?"":(0,Z.jsx)(Z.Fragment,{children:!(un&&!Ti)&&!Vt&&(Oi?(0,Z.jsxs)("div",{className:"noteInput-container",children:[(0,Z.jsx)("input",{type:"text",className:"addNotesInput",value:Fi||"",placeholder:"Type Item instructions here",onChange:e=>{Li(e.target.value||""),""===e.target.value&&Je((0,w.YE)(null===yn||void 0===yn?void 0:yn.itemId,_n,!0))},maxLength:25,autoFocus:!0}),(0,Z.jsx)("img",{title:"Open Notes",src:""===Fi?Zi?j.A:I.A:x.A,alt:"openNotes",className:""===Fi?(null===jn||void 0===jn?void 0:jn.length)>0?"openNotes":"noImgNotes":"notesAddedInput",onClick:()=>{var e;Ri(!1),""!==Fi&&(e=Fi,Je((0,w.z1)(yn.itemId,_n,!0,e)))}})]}):""!==Fi?(0,Z.jsx)(f.h,{className:"addNotes",onClick:()=>Ri(!0)}):(0,Z.jsx)(m.h,{className:"addNotes",onClick:()=>Ri(!0)}))})]})]})}),(0,Z.jsxs)("div",{className:Vi?"itemCardWithCustomization":"itemCard",children:[(0,Z.jsx)("div",{className:"itemDetailCard",children:(0,Z.jsx)("div",{className:"item-container ".concat(Zi?"imageless-item-container":""),children:(0,Z.jsxs)("div",{className:Yt?"itemDetailsWrapper":"itemDetailsWrapper-desktop",children:[(0,Z.jsxs)("div",{className:Yt?"itemHeading":"itemHeading-desktop",children:[(0,Z.jsxs)("div",{className:"Details",children:[(0,Z.jsx)("h1",{className:"item-title ".concat(wn?"item-title-width":""," ").concat(li?(null===yn||void 0===yn||null===(Ne=yn.itemName)||void 0===Ne?void 0:Ne.length)<=L.mo?"fit-content-availability":"item-title-width-availability":(null===yn||void 0===yn||null===(be=yn.itemName)||void 0===be?void 0:be.length)<=L.mo?"fit-content":""),children:null===yn||void 0===yn?void 0:yn.itemName}),(0,Z.jsx)("div",{className:"DetailsHeart",children:!((null===jn||void 0===jn?void 0:jn.length)>0)&&Ci&&Yt&&"DineIn"!==ki&&!(un&&!Ti)&&(0,Z.jsx)("div",{className:"Heartbtn",children:T
1n?(0,Z.jsx)(T.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"remove")}):(0,Z.jsx)(D.h,{onClick:e=>to(e,null===yn||void 0===yn?void 0:yn.itemId,"add")})})})]}),!Zi&&(0,Z.jsx)("img",{title:"Favourite",src:y.A,alt:"favourite",className:"itemfavouriteImg"}),!(0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!Sn&&(null===yn||void 0===yn||!yn.enable)&&li||!Cn(ki)&&!Ti&&!Di&&!sn||!oo)&&!Yt&&!(un&&!Ti)&&(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)("div",{className:"quantity-spinner-wrapper",children:[(0,Z.jsxs)("div",{className:"quantity-spinner",children:[(0,Z.jsxs)("p",{className:"spinner-minus",onClick:()=>io(!1),children:[" ","\u2212"," "]}),(0,Z.jsx)("p",{children:(null===et||void 0===et?void 0:et.toString().padStart(2,"0"))||"01"}),(0,Z.jsxs)("p",{className:"spinner-plus".concat(Xn?" spinner-disabled":""),onClick:()=>io(!0),children:[" ","+"," "]})]}),(0,Z.jsx)("div",{className:"add-cart".concat(eo?" add-cart--disabled":""),onClick:()=>{eo?Gn():Un()},children:"Add To Cart"})]})}),!wn&&!li&&Sn&&(0,Z.jsx)("div",{className:"label-message",children:"Temporarily Unavailable"}),wn&&(0,Z.jsx)("div",{className:"label-message",children:"Out of Stock"}),!wn&&li&&!Sn&&(0,Z.jsx)("div",{className:"label-message",children:kn})]}),(0,Z.jsx)("div",{className:"base-price-container",children:(()=>{if(!yn)return null;const e="US"===nn?"$ ":"IN"===nn?"\u20b9 ":"",i=Number(null===yn||void 0===yn?void 0:yn.price),t=Number(null===yn||void 0===yn?void 0:yn.offerPrice);if(!(null!=(null===yn||void 0===yn?void 0:yn.offerPrice)&&i>0&&t>=0&&t<i&&!li&&!Sn&&!wn))return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("span",{className:"base-price-label",children:"Base Price :"}),(0,Z.jsxs)("span",{className:"menuItem-Price",children:[e,parseFloat(String(i||0)).toFixed(2)]})]});const n=null===yn||void 0===yn?void 0:yn.offerType;let o="";return o="FLAT"===n||"FLATFEE"===n?"Up to ".concat(e.trim()).concat(null===yn||void 0===yn?void 0:yn.discountValue," Off"):"Up to ".concat(null===yn||void 0===yn?void 0:yn.discountValue," % Off"),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("span",{className:"base-price-label",children:"Base Price :"}),(0,Z.jsxs)("span",{className:"menuItem-Price original-price-strikethrough",children:[e,i.toFixed(2)]}),(0,Z.jsxs)("span",{className:"menuItem-Price offer-price",children:[e,t.toFixed(2)]}),(0,Z.jsx)("span",{className:"menuItem-OfferBadge",children:o})]})})()}),(null===yn||void 0===yn?void 0:yn.maxQty)&&(0,Z.jsxs)("div",{className:"Limit-container",children:[(0,Z.jsx)("span",{className:"base-price-label",children:"Limit :"}),(0,Z.jsx)("span",{className:"menuItem-Price",children:"Maximum ".concat(String(null===yn||void 0===yn?void 0:yn.maxQty)," per order ")})]}),Dn&&(null===Qn||void 0===Qn?void 0:Qn.length)>0&&(0,Z.jsxs)("div",{className:"customization",children:[(0,Z.jsx)("h3",{className:"customization-title-new",children:"Customize Your Food:"}),ot&&(0,Z.jsx)("div",{className:"customization-requies-text",children:(0,Z.jsx)("p",{className:"rq-text",children:"Please select a required modifier to continue."})}),Dn&&(0,Z.jsx)(g.A,{ModifierOptions:Qn,setSelectedModifierIds:Ki,initialSelectedIds:Ji||[],menuType:ki,itemDetails:yn,tableId:Ti,isModifierSelectionDisabled:lo,isView:!(0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!Sn&&(null===yn||void 0===yn||!yn.enable)&&li)})]}),(null===yn||void 0===yn?void 0:yn.description)&&(0,Z.jsxs)("div",{className:"description-containers",children:[(0,Z.jsx)("h3",{className:"desc-headers",children:"Description:"}),(0,Z.jsx)("p",{className:"description",dangerouslySetInnerHTML:{__html:null===yn||void 0===yn?void 0:yn.description}})]}),Yt&&(0,Z.jsxs)("div",{className:"itemInfo",children:[(null===yn||void 0===yn||null===(Ae=yn.diet)||void 0===Ae?void 0:Ae.length)>0&&(0,Z.jsxs)("div",{className:"foodPrep",children:[(0,Z.jsx)("div",{className:"parentImgWrapper",children:(0,Z.jsx)("img",{title:"Food Preparation",src:h.A,alt:"foodPrep",className:"parentImg"})}),(0,Z.jsxs)("div",{className:"overLap-container",children:[(0,Z.jsx)("h3",{style:{marginTop:"0px"},children:"Food Preparation"}),(0,Z.jsx)("div",{className:"overLap-box",children:null!==yn&&void 0!==yn&&yn.diet?null===yn||void 0===yn?void 0:yn.diet.map(e=>(0,Z.jsxs)("div",{className:"icon-text-container",children:[(0,Z.jsx)(S.h,{className:"foodPrepTick"}),(0,Z.jsx)("span",{children:null===e||void 0===e?void 0:e.name})]},(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.name))):"-"})]})]}),(null===yn||void 0===yn||null===(Ce=yn.allergens)||void 0===Ce?void 0:Ce.length)>0&&(0,Z.jsxs)("div",{className:"allergyInfo-container",children:[(0,Z.jsx)("div",{className:"parentImgWrapper",children:(0,Z.jsx)("img",{title:"Allergy Information",src:h.A,alt:"allergyInfo",className:"parentImg"})}),(0,Z.jsxs)("div",{className:"overLap-container",children:[(0,Z.jsx)("h3",{style:{marginTop:"0px"},children:"Allergy Information"}),(0,Z.jsx)("div",{className:"overLap-box",children:(null===yn||void 0===yn||null===(Te=yn.allergens)||void 0===Te?void 0:Te.length)>0?(0,Z.jsx)("div",{className:"icon-text-container",style:{textAlign:"center"},children:(0,Z.jsx)("span",{className:"allergic-info-text",children:null===yn||void 0===yn||null===(De=yn.allergens)||void 0===De||null===(Se=De.map(e=>null===e||void 0===e?void 0:e.name))||void 0===Se?void 0:Se.join(", ")})}):"-"})]})]}),(null===yn||void 0===yn||null===(we=yn.ingredient)||void 0===we?void 0:we.length)>0&&(0,Z.jsxs)("div",{className:"allergyInfo-container",children:[(0,Z.jsx)("div",{className:"parentImgWrapper",children:(0,Z.jsx)("img",{title:"Ingredients",src:h.A,alt:"allergyInfo",className:"parentImg"})}),(0,Z.jsxs)("div",{className:"overLap-container",style:{marginTop:"0px"},children:[(0,Z.jsx)("h3",{style:{marginTop:"0px"},children:"Ingredients"}),(0,Z.jsx)("ul",{className:"overLap-box ulOverlap",children:null===yn||void 0===yn||null===(ke=yn.ingredient)||void 0===ke?void 0:ke.map(e=>(0,Z.jsx)("div",{className:"icon-text-container",children:(0,Z.jsx)("li",{children:null===e||void 0===e?void 0:e.name})},(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.name)))})]})]}),(0,Z.jsxs)("div",{className:"nutroInfo-container",children:[(0,Z.jsx)("div",{className:"parentImgWrapper",children:(0,Z.jsx)("img",{title:"Ingredients",src:h.A,alt:"allergyInfo",className:"parentImg"})}),(0,Z.jsxs)("div",{className:"overLap-container",style:{marginTop:"0px"},children:[(0,Z.jsxs)("h3",{style:{marginTop:"0px"},children:["Nutritional Information ( ",null!==yn&&void 0!==yn&&null!==(Ee=yn.nutritionInfo)&&void 0!==Ee&&Ee.basis?"(".concat(null===yn||void 0===yn||null===(Me=yn.nutritionInfo)||void 0===Me?void 0:Me.basis,")"):"",")"]}),!(so.calories||so.protein||so.carbs||so.fat)&&(0,Z.jsx)(Z.Fragment,{children:"-"}),(so.calories||so.protein||so.carbs||so.fat)&&(0,Z.jsxs)("ul",{className:"ulOverlap-nutrition",children:[so.calories&&(0,Z.jsxs)("li",{children:[" Calories: ",null!==(Oe=so.calories)&&void 0!==Oe?Oe:"-"]}),so.protein&&(0,Z.jsxs)("li",{children:[" Protein(g): ",null!==(Re=so.protein)&&void 0!==Re?Re:"-"]}),so.carbs&&(0,Z.jsxs)("li",{children:["Carbohydrates(g): ",null!==(Pe=so.carbs)&&void 0!==Pe?Pe:"-"]}),so.fat&&(0,Z.jsxs)("li",{children:["Fat(g): ",null!==(ze=so.fat)&&void 0!==ze?ze:"-"]})]})]})]}),(null===yn||void 0===yn?void 0:yn.specialInstructions)&&(0,Z.jsxs)("div",{className:"specialinstruction-container",children:[(0,Z.jsx)("div",{className:"parentImgWrapper",children:(0,Z.jsx)("img",{title:"Special Instructions",src:h.A,alt:"specialinstruction",className:"parentImg"})}),(0,Z.jsxs)("div",{className:"overLap-container",style:{marginTop:"0px"},children:[(0,Z.jsx)("h3",{style:{marginTop:"0px"},children:"Special Instructions"}),(0,Z.jsx)("div",{className:"overLap-box",children:(0,Z.jsx)("p",{className:"specialinstruction-content",children:null!==yn&&void 0!==yn&&yn.specialInstructions?null===yn||void 0===yn?void 0:yn.specialInstructions:"-"})})]})]})]}),!Yt&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"item-info-desktop",children:an?(0,Z.jsx)("div",{className:"loader-container-desktop",children:(0,Z.jsx)("div",{className:"Loaders"})}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)("div",{className:"indredients infoWrapper",children:[(0,Z.jsx)("h3",{className:"info-header",children:"Ingredients"}),(0,Z.jsx)("ul",{className:"ingredient-list",children:null!==yn&&void 0!==yn&&yn.ingredient?null===yn||void 0===yn?void 0:yn.ingredient.map((e,i)=>(0,Z.jsx)("li",{children:null===e||void 0===e?void 0:e.name},i)):"-"})]}),(0,Z.jsxs)("div",{className:"nutrition infoWrapper",children:[(0,Z.jsxs)("h3",{className:"info-header",children:["Nutritional Information"," ",null!==yn&&void 0!==yn&&null!==(Fe=yn.nutritionInfo)&&void 0!==Fe&&Fe.basis?"(".concat(null===yn||void 0===yn||null===(Le=yn.nutritionInfo)||void 0===Le?void 0:Le.basis,")"):""]}),!(so.calories||so.protein||so.carbs||so.fat)&&(0,Z.jsx)(Z.Fragment,{children:"-"}),(so.calories||so.protein||so.carbs||so.fat)&&(0,Z.jsxs)("ul",{className:"nutrition-list",children:[so.calories&&(0,Z.jsxs)("li",{children:[" Calories: ",null!==(qe=so.calories)&&void 0!==qe?qe:"-"]}),so.protein&&(0,Z.jsxs)("li",{children:[" Protein(g): ",null!==(Ue=so.protein)&&void 0!==Ue?Ue:"-"]}),so.carbs&&(0,Z.jsxs)("li",{children:["Carbohydrates(g): ",null!==(Qe=so.carbs)&&void 0!==Qe?Qe:"-"]}),so.fat&&(0,Z.jsxs)("li",{children:["Fat(g): ",null!==(_e=so.fat)&&void 0!==_e?_e:"-"]})]})]}),(0,Z.jsxs)("div",{className:"foodPrepInfo infoWrapper",children:[(0,Z.jsx)("h3",{className:"info-header",children:"Food Preparation"}),(0,Z.jsx)("div",{className:"foodPrepInfo-list",children:null!==yn&&void 0!==yn&&yn.diet?null===yn||void 0===yn?void 0:yn.diet.map((e,i)=>(0,Z.jsxs)("div",{className:"foodPrepInfo-list-wrapper",children:[(0,Z.jsx)(S.h,{className:"foodPrep-tick"}),(0,Z.jsx)("p",{children:null===e||void 0===e?void 0:e.name},i)]},(null===e||void 0===e?void 0:e.id)||(null===e||void 0===e?void 0:e.name))):"-"})]}),(0,Z.jsxs)("div",{className:"indredients infoWrapper",children:[(0,Z.jsx)("h3",{className:"info-header",children:"Allergy Information"}),(0,Z.jsx)("div",{className:"overLap-box",children:(null===yn||void 0===yn||null===(We=yn.allergens)||void 0===We?void 0:We.length)>0?(0,Z.jsx)("div",{className:"icon-text-container",style:{textAlign:"center"},children:(0,Z.jsx)("span",{className:"allergic-info-text",children:null===yn||void 0===yn||null===(Ve=yn.allergens)||void 0===Ve||null===(Be=Ve.map(e=>null===e||void 0===e?void 0:e.name))||void 0===Be?void 0:Be.join(", ")})}):"-"})]})]})}),(0,Z.jsxs)("div",{className:"specialInstruction-infowrapper",children:[(0,Z.jsx)("h3",{className:"info-header",children:"Special instructions"}),(0,Z.jsx)("p",{className:"special-info-content",children:null!==yn&&void 0!==yn&&yn.specialInstructions?null===yn||void 0===yn?void 0:yn.specialInstructions:"-"})]})]}),!(un&&!Ti)&&(0,Z.jsxs)("div",{className:"bestPair-container-Desktop",children:[(null===An||void 0===An?void 0:An.length)>0&&(null===An||void 0===An?void 0:An.some(e=>!0===e.enable))&&(0,Z.jsx)("h3",{className:Yt?"bestPairHeaders":"bestPairHeaders-desktop",children:"People usually pair with:"}),(0,Z.jsx)("div",{className:"bestPairWrapper",children:null===An||void 0===An?void 0:An.map(e=>(0,Z.jsx)("div",{className:"bestPair",children:(0,Z.jsx)("div",{className:"bestPair-box",children:(0,Z.jsx)(Yn,{menuDetail
1:e,ItemUpdate:Jn},e.itemId)})},null===e||void 0===e?void 0:e.itemId))})]})]})})}),Yt?(0,Z.jsx)("div",{className:0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!(Sn||null!==yn&&void 0!==yn&&yn.enable)&&li||!Cn(ki)&&!Ti||!Yt||un&&!Ti||ao?"":no?"mobile-footer-menu-details":"",children:(0,Z.jsx)(F.A,{})}):(0,Z.jsx)("div",{className:"desktop-footer-container",children:(0,Z.jsx)(M.A,{})})]}),Ti&&!ao&&(0,Z.jsx)("div",{className:"callWaiter-container",children:(0,Z.jsx)(E.A,{openSlider:bt,setOpenSlider:At,isMenuOpen:Dt,dineInOrderId:cn,tableData:vn,restaurantDetails:_t,setIsMenuOpen:St,isContactlessDineInOrder:mn})}),!(0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!Sn&&(null===yn||void 0===yn||!yn.enable)&&li||!Cn(ki)&&!Ti&&!Di&&!sn||!oo)&&Yt&&!(un&&!Ti)&&!ao&&(sn&&Yt&&!xt?(0,s.createPortal)((0,Z.jsx)("div",{className:"spinnerFooter-container-menudetails",style:{bottom:Bn?"30px":"0px"},children:(0,Z.jsx)(p.A,{edit:hn,quantity:et,setQuantity:it,totalPrice:String(zn),onAddToCart:Un,isDineInEnabled:no,maxQtyReached:eo,spinnerMaxReached:Xn,onMaxQtyClick:Gn})}),document.body):(0,Z.jsx)("div",{className:"spinnerFooter-container-menudetails",style:{bottom:Bn?"30px":"0px"},children:(0,Z.jsx)(p.A,{edit:hn,quantity:et,setQuantity:it,totalPrice:String(zn),onAddToCart:Un,maxQtyReached:eo,spinnerMaxReached:Xn,onMaxQtyClick:Gn,isDineInEnabled:no})})),Bn&&(0,Z.jsx)("div",{className:"customization-requies-text-Mobile",children:(0,Z.jsx)("p",{className:"rq-text",children:"Maximum quantity reached"})})]})]}),Kt&&!Yt&&(null===Ut||void 0===Ut?void 0:Ut.length)>0&&(0,Z.jsx)("div",{className:"cart-view-blur-overlay-menuDetails",children:(0,Z.jsx)("div",{className:"cart-container",ref:ii,children:ti?(0,Z.jsx)(W.A,{setShowSuccessPopup:ci}):(0,Z.jsx)(O.default,{})})}),Lt&&(0,Z.jsx)(H.A,{status:"success",isOpen:Lt,tableId:Ti,isBookingConfirmation:!0,onClose:()=>qt(!1)}),(0,Z.jsx)(V.A,{couponDetails:ui,open:ri,onClose:()=>{ci(!1),Yt?Ye(Ti?"/".concat(null===wi||void 0===wi?void 0:wi.merchantType,"/").concat(null===wi||void 0===wi?void 0:wi.location,"/table/").concat(Ti,"/menu/").concat(null===wi||void 0===wi?void 0:wi.menuType,"/contactlessdinein/cart"):"/".concat(yi,"/").concat(Ii,"/cart")):Je((0,w.ss)(!0))}}),Rt&&(null===jn||void 0===jn?void 0:jn.length)>0&&(0,Z.jsx)("div",{className:"image-slider-overlay",style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.9)",zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},onClick:()=>Pt(!1),children:(0,Z.jsxs)("div",{style:{position:"relative",maxWidth:"90%",maxHeight:"90%",display:"flex",alignItems:"center",justifyContent:"center"},onClick:e=>e.stopPropagation(),children:[(0,Z.jsx)("button",{onClick:()=>Pt(!1),style:{position:"absolute",top:"-40px",right:"0",background:"transparent",border:"none",cursor:"pointer",zIndex:1e4,padding:"8px"},children:(0,Z.jsx)("img",{src:v.A,alt:"Close",style:{width:"24px",height:"24px",filter:"brightness(0) invert(1)"}})}),(0,Z.jsx)("img",{src:En((null===(He=jn[0])||void 0===He?void 0:He.itemImage)||"",(null===(Ze=jn[0])||void 0===Ze||null===(Ge=Ze.itemType)||void 0===Ge?void 0:Ge.split("/")[1])||""),alt:null===yn||void 0===yn?void 0:yn.itemName,style:{maxWidth:"100%",maxHeight:"90vh",objectFit:"contain",borderRadius:"8px"}})]})}),Bn&&(0,Z.jsx)("div",{className:"max-qty-banner",children:"Maximum quantity reached11"})]});return!Yt||"undefined"===typeof document||0===(null===_t||void 0===_t?void 0:_t.open)||Sn||wn||!(Sn||null!==yn&&void 0!==yn&&yn.enable||null===yn||void 0===yn)&&yn.itemUnAvailableUntil||!(Cn(ki)||Ti||Di||sn)||!("delivery"===rn?Gt:Zt)||!Yt||un&&!Ti||ao?ro:(0,s.createPortal)(ro,document.body)}}}]);
2//# sourceMappingURL=3326.44ca9a8c.chunk.js.map

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.