1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1653,1758,4084],{64084:(e,a,s)=>{"use strict";s.d(a,{$:()=>l,Y:()=>function e(a){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=arguments.length>2?arguments[2]:void 0,t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!window.fbq){t<10&&setTimeout(()=>{e(a,s,l,t+1)},300);return}console.log("FB Track Event:",a,s,l),l?window.fbq("track",a,s,{eventID:l}):window.fbq("track",a,s)}});let l={PAGE_VIEW:"PageView",CONTACT:"Contact",INITIATE_CHECKOUT:"InitiateCheckout",PURCHASE:"Purchase",ADD_TO_CART:"AddToCart",VIEW_CONTENT:"ViewContent"}},51653:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>R});var l=s(95155),t=s(31873),i=s(12115);s(67289),s(98530),s(64799),s(10779);var o=s(14246),r=s(84392),n=s(9757),d=s(95055);let c={src:"/_next/static/media/cb_rider.e66b6d1d.webp"};var m=s(59754),h=s(84761),u=s(93286),v=s(83391),p=s(36417),x=s(31775),g=s(61758),j=s(78416),b=s(27753),y=s(74836),N=s(95983),w=s(41620),f=s(76046),_=s(72301),k=s(82149),A=s(43425);let C=new(s(65417)).S({region:_.p.awsAmplifyEnv.awsRegion,endpoint:_.p.awsAmplifyEnv.endPoint});var S=s(29929),I=s(74117);s(73318);var P=s(23097),L=s(44967),D=s(45608),M=s(64084);I.Ay.initialize("UA-115105611-2");let{getDecryptedData:B,currency:T}=S.t,W=e=>{switch(e){case 1:return"Assigned";case 2:return"Arrived at Location";case 3:return"Picked Up";case 4:return"Reached Destination";case 5:return"Delivered";case 6:return"Rejected";case 7:return"Cancelled";default:return"Order Confirmed"}},R=i.memo(()=>{let e=(0,v.d4)(e=>e.counter.summaryData),a=(0,v.d4)(e=>e.counter.trackingETA),[s,t]=(0,i.useState)(!1),[c,_]=(0,i.useState)([]),S=(0,i.useRef)(null),I=(0,v.wA)(),[R,U]=(0,i.useState)(!1),O={data:null===(el=B(localStorage.getItem("merchantdetails")))||void 0===el?void 0:el.merchantDetails},F=(0,f.useRouter)(),[z,V]=(0,i.useState)(""),[H,J]=(0,i.useState)(!1),[Q,q]=(0,i.useState)(!1),[G,Z]=(0,i.useState)(!1),[K,X]=(0,i.useState)(!1),[$,ee]=(0,i.useState)(!1),[ea,es]=(0,i.useState)(null);var el,et,ei,eo,er,en,ed,ec,em,eh,eu,ev,ep,ex,eg,ej,eb,ey,eN,ew,ef,e_,ek,eA,eC,eS,eI,eP,eL,eD,eM,eB,eT,eW,eR,eE,eU,eO,eF,ez,eY,eV,eH,eJ,eQ,eq,eG,eZ,eK,eX,e$,e0,e1,e2,e4,e3,e6,e8,e9,e5,e7,ae,aa,as,al,at,ai,ao,ar=!0;let an=null!==(at=null===(et=O.data.mobile_numbers_enable_on_website)||void 0===et?void 0:et.indexOf(O.data.mainmobilenumber))&&void 0!==at?at:-1,ad=null==O?void 0:null===(eo=O.data)||void 0===eo?void 0:null===(ei=eo.mobile_numbers_enable_on_website)||void 0===ei?void 0:ei.every(e=>null!=e?""===e.trim():null===e);if(-1!==an){let e=[...O.data.mobile_numbers_enable_on_website],a=e[0];e[0]=e[an],e[an]=a,O.data.mobile_numbers_enable_on_website=e}else ar=!1;function ac(e){var a;return null===(a=document.cookie.split("; ").find(a=>a.startsWith(e+"=")))||void 0===a?void 0:a.split("=")[1]}(0,i.useEffect)(()=>{(async()=>{var e,a,s;let l=null==O?void 0:null===(e=O.data)||void 0===e?void 0:e.merchantid;if(!l)return;let t=localStorage.getItem("sessionId"),i=await y.A.getMerchantS1Categories({merchantID:l,isFromApp:!1},t);(null==i?void 0:null===(a=i.data)||void 0===a?void 0:a.code)===0&&_(null!==(s=i.data.s1Categories)&&void 0!==s?s:[])})()},[]),(0,i.useEffect)(()=>{let e=A.YZ.listen("datastore",e=>{let{payload:a}=e});return(async()=>{let e=B(localStorage.getItem("summary-order-id"));e&&(S.current=C.subscribe({topics:e}).subscribe({next:e=>{console.log("Message received",e),I((0,k.wb)({key:"riderLatLng",value:e.msg})),localStorage.setItem("riderLatLng",JSON.stringify(e.msg))},error:e=>console.log(e),complete:()=>console.log("Done")}))})(),()=>{e(),S.current&&S.current.unsubscribe()}},[]),(0,i.useEffect)(()=>{let e=localStorage.getItem("orderId"),a=B(localStorage.getItem("summary-order-id"));e&&e===a&&(I((0,k.wb)({key:"totalCount",value:0})),localStorage.setItem("totalCount",0),localStorage.removeItem("modifiedData"),localStorage.removeItem("cartData")),ah()},[]);let am=async e=>{try{let a=localStorage.getItem("sessionId");(0,M.Y)(M.$.PURCHASE,{orderId:e},e,()=>{});let s=ac("_fbp"),l=ac("_fbc");await y.A.sendPurchaseEventToServer(a,{orderId:e,fbp:s||"",fbc:l||""})}catch(e){console.log(e)}},ah=async()=>{let e=localStorage.getItem("sessionId"),a=B(localStorage.getItem("summary-order-id")),s=localStorage.getItem("orderId");await y.A.getChannelDetailsv3New(e,{orderId:a}).then(async e=>{var l,t;(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.code)==0?(I((0,k.wb)({key:"summaryData",value:{data:e.data.data,destinationLatlng:e.data.destinationLatlng,originLatlng:e.data.originLatlng}})),localStorage.setItem("summaryData",JSON.stringify(e.data)),q(!0),s&&s===a&&(await am(a),localStorage.removeItem("orderId"))):(0,D.oR)(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.message,{autoClose:500})})},au=e=>{e.startsWith("+91")&&(e=e.replace("+","")),window.open("https://api.whatsapp.com/se
1nd?phone=".concat(e))},av=()=>{F.replace(localStorage.getItem("fullurl")?"/".concat(localStorage.getItem("fullurl")):"/")},ap=(null==e?void 0:null===(er=e.data)||void 0===er?void 0:er.shipment_status)>0&&(null==e?void 0:null===(en=e.data)||void 0===en?void 0:en.shipment_status)<5,ax=(null==e?void 0:null===(ed=e.data)||void 0===ed?void 0:ed.shipment_status)===5,ag=(null==e?void 0:null===(ec=e.data)||void 0===ec?void 0:ec.order_amt_to_be_refund)>0||(null==e?void 0:null===(em=e.data)||void 0===em?void 0:em.isOrderModified),aj=(null==e?void 0:null===(eh=e.data)||void 0===eh?void 0:eh.shipment_status)===7,ab=(null==e?void 0:null===(eu=e.data)||void 0===eu?void 0:eu.is_post_paid_order)&&(null==e?void 0:null===(ev=e.data)||void 0===ev?void 0:ev.PaymentDone)===1&&!(null==e?void 0:null===(ep=e.data)||void 0===ep?void 0:ep.payment_link),ay=(null==e?void 0:null===(ex=e.data)||void 0===ex?void 0:ex.is_post_paid_order)&&(null==e?void 0:null===(eg=e.data)||void 0===eg?void 0:eg.PaymentDone)===1&&!!(null==e?void 0:null===(ej=e.data)||void 0===ej?void 0:ej.payment_link),aN=(null==e?void 0:null===(eb=e.data)||void 0===eb?void 0:eb.is_post_paid_order)&&(null==e?void 0:null===(ey=e.data)||void 0===ey?void 0:ey.PaymentDone)===0,aw=(null==e?void 0:null===(eN=e.data)||void 0===eN?void 0:eN.isPartialCodOrder)===!0,af=Number(null!==(ai=null==e?void 0:null===(ew=e.data)||void 0===ew?void 0:ew.amountPaidOnline)&&void 0!==ai?ai:0),a_=Number(null!==(ao=null==e?void 0:null===(ef=e.data)||void 0===ef?void 0:ef.codDueAmount)&&void 0!==ao?ao:0),ak=aw&&0===af,aA=aw&&af>0&&!(null==e?void 0:null===(e_=e.data)||void 0===e_?void 0:e_.payment_link),aC=aw&&af>0&&!!(null==e?void 0:null===(ek=e.data)||void 0===ek?void 0:ek.payment_link),aS=aw&&ax,aI=i.useMemo(()=>{var a;return((null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.order_summary_bf_modify)||[]).reduce((e,a)=>(e[a.item_name]=a,e),{})},[null==e?void 0:null===(eA=e.data)||void 0===eA?void 0:eA.order_summary_bf_modify]),aP=[null==e?void 0:null===(eC=e.data)||void 0===eC?void 0:eC.addressline1,null==e?void 0:null===(eS=e.data)||void 0===eS?void 0:eS.addressline2,null==e?void 0:null===(eI=e.data)||void 0===eI?void 0:eI.city].filter(Boolean).join(", "),aL=[null==e?void 0:null===(eP=e.data)||void 0===eP?void 0:eP.user_address_line1,null==e?void 0:null===(eL=e.data)||void 0===eL?void 0:eL.user_apartment_or_area,null==e?void 0:null===(eD=e.data)||void 0===eD?void 0:eD.user_address_line2].filter(Boolean).join(", "),aD=(null==e?void 0:e.data)?Number(e.data.full_amount_bf_modify)-Number(e.data.order_total_amount_bf_modify):0;return(0,l.jsxs)("div",{className:"os-root",children:[s&&(0,l.jsx)(w.A,{}),(null===(eM=O.data)||void 0===eM?void 0:eM.homepage_url)&&(null===(eB=O.data)||void 0===eB?void 0:eB.header_footer_exportable)?(0,l.jsx)(r.A,{bundleUrl:O.data.homepage_url,merchantDetails:O.data,fallback:(0,l.jsx)(o.A,{merchantDetails:O.data,s1Categories:c})}):(0,l.jsx)(o.A,{merchantDetails:O.data,s1Categories:c}),(0,l.jsx)("div",{className:"whole-map-container",children:Q&&(0,l.jsxs)("div",{className:"order-summary-container",children:[(0,l.jsxs)("div",{className:"os-page-wrap",children:[(0,l.jsxs)("button",{className:"os-mobile-back",onClick:av,children:[(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})}),"Back"]}),(0,l.jsxs)("div",{className:"os-confirm-header",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"os-confirm-icon-row",children:[(0,l.jsx)("div",{className:"os-confirm-check".concat(ag&&!ax?" os-confirm-check--amber":aj?" os-confirm-check--red":""),children:aj?(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,l.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,l.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):ag&&!ax?(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})}):(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,l.jsx)("span",{className:"os-confirm-label".concat(ag&&!ax?" os-confirm-label--amber":aj?" os-confirm-label--red":""),children:aj?"Order Cancelled":ax?"Order Delivered":ag?"Order Modified":"Order Confirmed"})]}),(0,l.jsx)("h1",{className:"os-confirm-title",children:aj?(0,l.jsxs)(l.Fragment,{children:["Weâre sorry",(null==e?void 0:null===(eT=e.data)||void 0===eT?void 0:eT.user_name)?", ".concat(e.data.user_name,"."):"."]}):ag&&!ax?(0,l.jsxs)(l.Fragment,{children:["Your order has been ",(0,l.jsx)("em",{children:"updated."})]}):(0,l.jsxs)(l.Fragment,{children:["Thank you",(null==e?void 0:null===(eW=e.data)||void 0===eW?void 0:eW.user_name)?", ".concat(e.data.user_name,"."):"."]})}),(null==e?void 0:null===(eR=e.data)||void 0===eR?void 0:eR.orderMsg)&&(0,l.jsx)("p",{className:"os-confirm-subtitle",children:e.data.orderMsg})]}),(0,l.jsxs)("div",{className:"os-confirm-right",children:[(0,l.jsx)("div",{className:"os-order-num-label",children:"Order Number"}),(0,l.jsxs)("div",{className:"os-order-num-val",children:["#",e.data.order_id]}),(0,l.jsx)("div",{className:"os-order-date",children:function(e){let a=new Date(e.replace(" ","T"));if(isNaN(a.getTime()))return"";let s=String(a.getDate()).padStart(2,"0"),l=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][a.getMonth()],t=String(a.getFullYear()).slice(-2),i=a.getHours(),o=String(a.getMinutes()).padStart(2,"0"),r=i>=12?"PM":"AM";return i=i%12||12,"".concat(s," ").concat(l," ").concat(t," \xb7 ").concat(i,":").concat(o).concat(r)}(e.data.order_created_date)})]})]}),ag&&!ax&&(null==e?void 0:null===(eE=e.data)||void 0===eE?void 0:eE.orderModifiedMsg)&&(0,l.jsxs)("div",{className:"os-mod-alert",children:[(0,l.jsx)("div",{className:"os-mod-alert-icon",children:(0,l.jsx)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:(0,l.jsx)("path",{d:"M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"})})}),(0,l.jsxs)("div",{className:"os-mod-alert-body",children:[(0,l.jsx)("div",{className:"os-mod-alert-label",children:"Merchant Update"}),(0,l.jsx)("div",{className:"os-mod-alert-title",children:e.data.orderModifiedMsg})]})]}),ab&&(0,l.jsxs)("div",{className:"os-pay-banner",children:[(0,l.jsx)("div",{className:"os-pay-banner-icon",children:(0,l.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),(0,l.jsxs)("div",{className:"os-pay-banner-body",children:[(0,l.jsx)("div",{className:"os-pay-banner-label",children:"Payment Pending"}),(0,l.jsx)("div",{className:"os-pay-banner-title",children:"Awaiting payment details"}),(0,l.jsx)("div",{className:"os-pay-banner-sub",children:"Your order is confirmed. The merchant will share a payment link shortly."})]})]}),ay&&(0,l.jsxs)("div",{className:"os-pay-banner",children:[(0,l.jsx)("div",{className:"os-pay-banner-icon",children:(0,l.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]})}),(0,l.jsxs)("div",{className:"os-pay-banner-body",children:[(0,l.jsx)("div",{className:"os-pay-banner-label",children:"Payment Requested"}),(0,l.jsx)("div",{className:"os-pay-banner-title",children:"Complete your payment"}),(0,l.jsx)("div",{className:"os-pay-banner-sub",children:"Your order is being held and will be dispatched once payment is received."})]})]}),aN&&(0,l.jsxs)("div",{className:"os-paid-success-banner",children:[(0,l.jsx)("div",{className:"os-paid-success-icon",children:(0,l.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,l.jsxs)("div",{className:"os-paid-success-body",children:[(0,l.jsx)("div",{className:"os-paid-success-label",children:"Payment Confirmed"}),(0,l.jsx)("div",{className:"os-paid-success-text",children:"Your order is now queued for dispatch."})]})]}),ak&&!aS&&a_>0&&(0,l.jsxs)("div",{className:"os-partial-banner",children:[(0,l.jsx)("div",{className:"os-partial-banner-icon",children:(0,l.jsx)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("path",{d:"M6 3h12M6 8h12M6 13l8.5 8M6 13h3a4 4 0 0 0 0-8"})})}),(0,l.jsxs)("div",{className:"os-partial-banner-body",children:[(0,l.jsx)("div",{className:"os-partial-banner-label",children:"Cash on Delivery"}),(0,l.jsxs)("div",{className:"os-partial-banner-title",children:[T(a_)," due at delivery"]}),(0,l.jsx)("div",{className:"os-partial-banner-sub",children:"Pay the full amount in cash or via UPI when your order arrives."})]})]}),aA&&!aS&&a_>0&&(0,l.jsxs)("div",{className:"os-partial-banner",children:[(0,l.jsx)("div",{className:"os-partial-banner-icon",children:(0,l.jsx)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("path",{d:"M6 3h12M6 8h12M6 13l8.5 8M6 13h3a4 4 0 0 0 0-8"})})}),(0,l.jsxs)("div",{className:"os-partial-banner-body",children:[(0,l.jsx)("div",{className:"os-partial-banner-label",children:"Partial Payment"}),(0,l.jsxs)("div",{className:"os-partial-banner-title",children:[T(af)," paid \xb7 ",T(a_)," due at delivery"]}),(0,l.jsx)("div",{className:"os-partial-banner-sub",children:"Your advance has been received online. Pay the remaining balance in cash or via UPI when your order is delivered."}),(0,l.jsx)("div",{className:"os-progress-bar-wrap",children:(0,l.jsx)("div",{className:"os-progress-bar-fill",style:{width:"".concat(Math.min(100,Math.round(af/(Number(null==e?void 0:null===(eU=e.data)||void 0===eU?void 0:eU.orderTotalValue)||1)*100)),"%")}
1})}),(0,l.jsxs)("div",{className:"os-progress-labels",children:[(0,l.jsxs)("span",{className:"os-progress-label",children:[(0,l.jsx)("strong",{children:T(af)})," paid"]}),(0,l.jsxs)("span",{className:"os-progress-label",children:[(0,l.jsx)("strong",{children:T(null==e?void 0:null===(eO=e.data)||void 0===eO?void 0:eO.orderTotalValue)})," total"]})]})]})]}),aC&&a_>0&&!aS&&!aj&&(0,l.jsxs)("div",{className:"os-pay-banner",children:[(0,l.jsx)("div",{className:"os-pay-banner-icon",children:(0,l.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),(0,l.jsxs)("div",{className:"os-pay-banner-body",children:[(0,l.jsx)("div",{className:"os-pay-banner-label",children:"Balance Payment Pending"}),(0,l.jsxs)("div",{className:"os-pay-banner-title",children:[T(a_)," due"]}),(0,l.jsxs)("div",{className:"os-pay-banner-sub",children:[T(af)," already paid online. Pay the balance to begin dispatch."]}),(0,l.jsxs)("div",{className:"os-pay-banner-actions",children:[(0,l.jsxs)("button",{className:"os-pay-securely-btn os-pay-securely-btn--compact",onClick:()=>window.open(e.data.payment_link),children:[(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),"Pay Now"]}),(0,l.jsxs)("div",{className:"os-link-inline",children:[(0,l.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("path",{d:"M10 13a5 5 0 007.07 0l2.83-2.83a5 5 0 00-7.07-7.07l-1.5 1.5"}),(0,l.jsx)("path",{d:"M14 11a5 5 0 00-7.07 0L4.1 13.83a5 5 0 007.07 7.07l1.5-1.5"})]}),(0,l.jsxs)("span",{children:["Also sent to your phone/email \xb7 ",(0,l.jsx)("span",{className:"os-link-inline-url",children:e.data.payment_link})]}),(0,l.jsx)("button",{className:"os-link-inline-copy",onClick:()=>{var a;return null===(a=navigator.clipboard)||void 0===a?void 0:a.writeText(e.data.payment_link)},children:"Copy"})]})]}),(0,l.jsx)("div",{className:"os-progress-bar-wrap",children:(0,l.jsx)("div",{className:"os-progress-bar-fill",style:{width:"".concat(Math.min(100,Math.round(af/(Number(null==e?void 0:null===(eF=e.data)||void 0===eF?void 0:eF.orderTotalValue)||1)*100)),"%")}})}),(0,l.jsxs)("div",{className:"os-progress-labels",children:[(0,l.jsxs)("span",{className:"os-progress-label",children:[(0,l.jsx)("strong",{children:T(af)})," paid"]}),(0,l.jsxs)("span",{className:"os-progress-label",children:[(0,l.jsx)("strong",{children:T(null==e?void 0:null===(ez=e.data)||void 0===ez?void 0:ez.orderTotalValue)})," total"]})]})]})]}),ap&&(0,l.jsxs)("div",{className:"os-map-block",children:[(0,l.jsxs)("div",{className:"os-block-header",children:[(0,l.jsx)("span",{className:"os-block-title",children:"Live Tracking"}),(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[(0,l.jsxs)("span",{className:"os-map-status-pill",children:[(0,l.jsx)("span",{className:"os-pulse-dot"}),W(null==e?void 0:null===(eY=e.data)||void 0===eY?void 0:eY.shipment_status)]}),(0,l.jsx)("span",{className:"os-status-refresh",children:s?(0,l.jsx)(P.A,{size:14,color:"var(--os-warm-gray)"}):(0,l.jsx)(n.g,{onClick:()=>{t(!0),ah().finally(()=>t(!1))},icon:d.lLb})})]})]}),(0,l.jsx)("div",{className:"os-map-canvas-wrap",children:(0,l.jsx)(E,{})}),(a||(null==e?void 0:null===(eV=e.data)||void 0===eV?void 0:eV.riderName))&&(0,l.jsxs)("div",{className:"os-map-footer",children:[a&&(0,l.jsxs)("div",{className:"os-map-footer-cell",children:[(0,l.jsxs)("svg",{className:"os-map-footer-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"os-map-footer-label",children:"Est. Arrival"}),(0,l.jsxs)("div",{className:"os-map-footer-val",children:["~",a," min"]})]})]}),(null==e?void 0:null===(eH=e.data)||void 0===eH?void 0:eH.riderName)&&(0,l.jsxs)("div",{className:"os-map-footer-cell",children:[(0,l.jsx)("svg",{className:"os-map-footer-icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.28h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.83a16 16 0 0 0 6 6l1.27-.95a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7a2 2 0 0 1 1.72 2.02z"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"os-map-footer-label",children:"Agent"}),(0,l.jsxs)("div",{className:"os-map-footer-val",children:[e.data.r
1iderName,e.data.riderMobNo&&(0,l.jsxs)(l.Fragment,{children:[" \xb7 ",(0,l.jsx)("a",{href:"tel:".concat(e.data.riderMobNo),className:"os-map-footer-call",children:"Call"})]})]})]})]})]})]}),(0,l.jsx)(Y,{hasLiveTracking:ap}),(0,l.jsxs)("div",{className:"os-main-grid",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"os-section-block",children:[(0,l.jsxs)("div",{className:"os-section-block-header",children:[(0,l.jsx)("span",{className:"os-section-block-title",children:"Order Details"}),ag?(0,l.jsxs)("span",{className:"os-section-item-count",children:[e.data.order_summary.filter(e=>e.count>0).length," of ",e.data.order_summary.length," items delivering",e.data.order_summary.some(e=>e.count<e.originalCount)&&(0,l.jsxs)("span",{className:"os-mod-section-note",children:[" \xb7 ",e.data.order_summary.filter(e=>e.count<e.originalCount).length," removed"]})]}):(0,l.jsxs)("span",{className:"os-section-item-count",children:[e.data.order_summary_bf_modify.length," items"]})]}),(0,l.jsx)("div",{className:"os-section-block-body",children:ag?e.data.order_summary.map((e,a)=>{var s;let t=0===e.count,i=e.count>0&&e.count<e.originalCount,o=aI[e.item_name]||{};return(0,l.jsxs)("div",{className:"os-order-item".concat(t?" os-item-removed":""),children:[(0,l.jsx)("div",{className:"os-item-img-wrap",children:(null===(s=e.image_url)||void 0===s?void 0:s[0])?(0,L.A)(e.image_url[0])?(0,l.jsx)("video",{src:e.image_url[0],className:"os-item-img",autoPlay:!1,controls:!1,muted:!0,playsInline:!0}):(0,l.jsx)("img",{src:e.image_url[0],className:"os-item-img",alt:"NA"}):(0,l.jsx)("div",{className:"os-item-img-placeholder"})}),(0,l.jsxs)("div",{className:"os-item-body",children:[(0,l.jsx)("div",{className:"os-item-name",children:e.isVariant&&e.parentItemName?e.parentItemName:e.item_name}),e.isVariant&&e.parentItemName&&e.type&&(0,l.jsx)("div",{className:"os-item-attrs",children:(0,l.jsxs)("div",{className:"os-item-attr",children:[(0,l.jsx)("span",{className:"os-item-attr-label",children:e.type}),(0,l.jsx)("span",{className:"os-item-attr-val",children:e.item_name})]})}),(0,l.jsxs)("div",{className:"os-item-qty",children:["Qty: ",(0,l.jsx)("span",{children:t?e.originalCount:e.count})]}),t?(0,l.jsxs)("div",{className:"os-item-removed-badge",children:[(0,l.jsxs)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:[(0,l.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,l.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),"Out of stock â removed"]}):i?(0,l.jsxs)("div",{className:"os-item-partial-badge",children:[(0,l.jsx)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),"Partially available â ",e.count," of ",e.originalCount," delivering"]}):(0,l.jsxs)("div",{className:"os-item-active-badge",children:[(0,l.jsx)("svg",{width:"9",height:"9",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Delivering as scheduled"]})]}),(0,l.jsx)("div",{className:"os-item-price-col",children:t?(0,l.jsx)(l.Fragment,{children:o.discounted_rate?(0,l.jsx)("div",{className:"os-item-price-current os-item-price--struck",children:T(o.discounted_rate)}):(0,l.jsx)("div",{className:"os-item-price-current os-item-price--struck",children:T(o.rate)})}):o.discounted_rate?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"os-item-price-current",children:T(o.discounted_rate)}),(0,l.jsx)("div",{className:"os-item-price-original",children:T(o.rate)})]}):(0,l.jsx)("div",{className:"os-item-price-current",children:T(o.rate||e.rate)})})]},a)}):e.data.order_summary_bf_modify.map((e,a)=>{var s;return(0,l.jsxs)("div",{className:"os-order-item",children:[(0,l.jsx)("div",{className:"os-item-img-wrap",children:(null===(s=e.image_url)||void 0===s?void 0:s[0])?(0,L.A)(e.image_url[0])?(0,l.jsx)("video",{src:e.image_url[0],className:"os-item-img",autoPlay:!1,controls:!1,muted:!0,playsInline:!0}):(0,l.jsx)("img",{src:e.image_url[0],className:"os-item-img",alt:"NA"}):(0,l.jsx)("div",{className:"os-item-img-placeholder"})}),(0,l.jsxs)("div",{className:"os-item-body",children:[(0,l.jsx)("div",{className:"os-item-name",children:e.isVariant&&e.parentItemName?e.parentItemName:e.item_name}),e.isVariant&&e.parentItemName&&e.type&&(0,l.jsx)("div",{style:{display:"flex",gap:14,flexWrap:"wrap",marginBottom:6},children:(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:5,fontSize:10.5,color:"#8A8278"},children:[(0,l.jsx)("span",{style:{textTransform:"uppercase",fontSize:9,letterSpacing:"0.16em"},children:e.type}),(0,l.jsx)("span",{style:{color:"#1C1A17",fontWeight:500},children:e.item_name})]})}),(0,l.jsxs)("div",{className:"os-item-qty",children:["Qty: ",(0,l.jsx)("span",{children:e.count})]})]}),(0,l.jsx)("div",{className:"os-item-price-col",children:T(e.discounted_rate)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"os-item-price-current",children:T(e.discounted_rate)}),(0,l.jsx)("div",{className:"os-item-price-original",children:T(e.rate)})]}):(0,l.jsx)("div",{className:"os-item-price-current",children:T(e.rate)})})]},a)})}),ag&&e.data.order_amt_to_be_refund>0&&(0,l.jsxs)("div",{className:"os-refund-block",children:[(0,l.jsx)("div",{className:"os-refund-icon",children:(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:[(0,l.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,l.jsx)("polyline",{points:"1 20 1 14 7 14"}),(0,l.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]})}),(0,l.jsxs)("div",{className:"os-refund-body",children:[(0,l.jsx)("div",{className:"os-refund-label",children:"Refunded"}),(0,l.jsx)("div",{className:"os-refund-amount",children:T(e.data.order_amt_to_be_refund)}),(0,l.jsx)("div",{className:"os-refund-detail",children:"Refund will be credited to your original payment method (UPI / Card)."}),(0,l.jsxs)("div",{className:"os-refund-eta",children:[(0,l.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]}),"Expected within 5â7 business days"]})]})]})]}),(0,l.jsxs)("div",{className:"os-section-block",children:[(0,l.jsx)("div",{className:"os-section-block-header",children:(0,l.jsx)("span",{className:"os-section-block-title",children:"Delivery Address"})}),(0,l.jsxs)("div",{className:"os-section-block-body",children:[(0,l.jsxs)("div",{className:"os-route-line",children:[(0,l.jsxs)("div",{className:"os-route-point",children:[(0,l.jsxs)("div",{className:"os-route-dot-col",children:[(0,l.jsx)("div",{className:"os-route-dot origin"}),(0,l.jsx)("div",{className:"os-route-dashes"})]}),(0,l.jsxs)("div",{className:"os-route-label",children:[(0,l.jsx)("strong",{children:null==e?void 0:null===(eJ=e.data)||void 0===eJ?void 0:eJ.shopname}),aP]})]}),(0,l.jsxs)("div",{className:"os-route-point",children:[(0,l.jsx)("div",{className:"os-route-dot-col",children:(0,l.jsx)("div",{className:"os-route-dot dest"})}),(0,l.jsxs)("div",{className:"os-route-label",children:[(0,l.jsx)("strong",{children:null==e?void 0:null===(eQ=e.data)||void 0===eQ?void 0:eQ.label}),aL]})]})]}),(0,l.jsxs)("div",{className:"os-address-phone",children:[(0,l.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,l.jsx)("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 8.81 19.79 19.79 0 01.07 2.18 2 2 0 012.06 0h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L6.91 7.1a16 16 0 006 6l.46-.46a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 14.92z"})}),(0,l.jsxs)("a",{href:"tel:+91".concat(null==e?void 0:null===(eq=e.data)||void 0===eq?void 0:eq.mainmobilenumber),className:"os-address-phone-link",children:["+91 ",null==e?void 0:null===(eG=e.data)||void 0===eG?void 0:eG.mainmobilenumber]})]})]})]}),(0,l.jsxs)("div",{className:"os-section-block",children:[(0,l.jsx)("div",{className:"os-section-block-header",children:(0,l.jsx)("span",{className:"os-section-block-title",children:"Payment"})}),(0,l.jsx)("div",{className:"os-section-block-body os-payment-body",children:ak||aA||aC?(0,l.jsxs)(l.Fragment,{children:[af>0&&(0,l.jsxs)("div",{className:"os-payment-row",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),"Advance Paid \xb7 UPI"]}),(0,l.jsxs)("span",{className:"os-payment-pill",children:[(0,l.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),T(af)," Paid"]})]}),(0,l.jsxs)("div",{className:"os-payment-row os-payment-row-last",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),aC?"Balance \xb7 UPI / Card":aA?"Balance at Delivery \xb7 Cash / UPI":"Cash on Delivery \xb7 Pay at delivery"]}),aC?(0,l.jsxs)("span",{className:"os-link-sent-tag",children:[(0,l.jsx)("span",{className:"os-pending-dot"}),"Sent"]}):aS?(0,l.jsxs)("span",{className:"os-payment-pill",children:[(0,l.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Paid"]}):(0,l.jsx)("div",{className:"os-payment-row-val",style:{color:"var(--os-gold-dark)"},children:T(a_)})]})]}):(null==e?void 0:null===(eZ=e.data)||void 0===eZ?void 0:eZ.is_post_paid_order)?ab||ay?(0,l.jsxs)("div",{className:"os-payment-row",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),"Pay Later \xb7 UPI / Card / Net Banking"]}),(0,l.jsxs)("span",{className:"os-payment-pill-pending",children:[(0,l.jsx)("span",{className:"os-pending-dot"}),"Pending"]})]}):aN?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"os-payment-row",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),"Paid \xb7 ",T(null==e?void 0:null===(eK=e.data)||void 0===eK?void 0:eK.amt_to_pay)]}),(0,l.jsxs)("span",{className:"os-payment-pill",children:[(0,l.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Paid"]})]}),(0,l.jsxs)("div",{className:"os-payment-row os-payment-row-last",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),"No payment to delivery partner"]}),(0,l.jsx)("div",{className:"os-payment-row-note",children:"Postpaid"})]})]}):null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"os-payment-row",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("rect",{x:"1",y:"4",width:"22",height:"16",rx:"2"}),(0,l.jsx)("line",{x1:"1",y1:"10",x2:"23",y2:"10"})]}),"Prepaid \xb7 UPI / Card"]}),(null==e?void 0:null===(eX=e.data)||void 0===eX?void 0:eX.PaymentDone)==0&&(0,l.jsxs)("span",{className:"os-payment-pill",children:[(0,l.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"Paid"]})]}),(null==e?void 0:null===(e$=e.data)||void 0===e$?void 0:e$.PaymentDone)==0&&(0,l.jsxs)("div",{className:"os-payment-row os-payment-row-last",children:[(0,l.jsxs)("div",{className:"os-payment-row-label",children:[(0,l.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),"No payment to delivery partner"]}),(0,l.jsx)("div",{className:"os-payment-row-note",children:"Prepaid"})]})]})})]})]}),(0,l.jsxs)("div",{className:"os-sidebar",children:[!(null==e?void 0:null===(e0=e.data)||void 0===e0?void 0:e0.hasUnpricedItem)&&(0,l.jsxs)("div",{className:"os-bill-block",children:[(0,l.jsx)("div",{className:"os-bill-block-header",children:(0,l.jsx)("div",{className:"os-bill-block-title",children:ag?"Updated Bill":"Bill Details"})}),(0,l.jsxs)("div",{className:"os-bill-rows",children:[(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"MRP"}),(0,l.jsx)("span",{className:"os-bill-row-val".concat(aD>0?" os-strike":""),children:T(e.data.full_amount_bf_modify)})]}),aD>0&&(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Savings"}),(0,l.jsxs)("span",{className:"os-bill-row-val os-discount",children:["- ",T(aD)]})]}),(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Subtotal"}),(0,l.jsx)("span",{className:"os-bill-row-val",children:T(e.data.order_total_amount_bf_modify)})]}),(null==e?void 0:null===(e1=e.data)||void 0===e1?void 0:e1.handling_charges)&&(null==e?void 0:null===(e2=e.data)||void 0===e2?void 0:e2.handling_charges)!=="0"&&(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Handling Charges"}),(0,l.jsx)("span",{className:"os-bill-row-val",children:T(e.data.handling_charges)})]}),aw&&Number(null==e?void 0:null===(e4=e.data)||void 0===e4?void 0:e4.codHandlingCharge)>0&&(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"COD Handling Charge"}),(0,l.jsx)("span",{className:"os-bill-row-val",children:T(e.data.codHandlingCharge)})]}),e.data.total_user_logistic_charge_bf_modify&&"null"!==e.data.total_user_logistic_charge_bf_modify&&0!=e.data.total_user_logistic_charge_bf_modify?(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Delivery"}),(0,l.jsx)("span",{className:"os-bill-row-val",children:T(e.data.total_user_logistic_charge_bf_modify)})]}):(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Delivery"}),(0,l.jsx)("span",{className:"os-bill-row-val os-free",children:"Free"})]}),e.data.govt_gst_bf_modify&&"null"!==e.data.govt_gst_bf_modify&&0!=e.data.govt_gst_bf_modify&&(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Taxes"}),(0,l.jsx)("span",{className:"os-bill-row-val",children:T(e.data.govt_gst_bf_modify)})]}),e.data.loyalty_points_used&&0!=e.data.loyalty_points_used?(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Points Redeemed"}),(0,l.jsxs)("span",{className:"os-bill-row-val os-points",children:["- ",T(e.data.loyalty_points_used)]})]}):null,(null==e?void 0:null===(e3=e.data)||void 0===e3?void 0:e3.coupon_discount)&&(null==e?void 0:null===(e6=e.data)||void 0===e6?void 0:e6.coupon_discount)!=0?(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Coupon Discount"}),(0,l.jsxs)("span",{className:"os-bill-row-val os-discount",children:["- ",T(e.data.coupon_discount)]})]}):null,e.data.user_offer_amt&&0!=e.data.user_offer_amt?(0,l.jsxs)("div",{className:"os-bill-row",child
1ren:[(0,l.jsx)("span",{className:"os-bill-row-label",children:null===(e8=e.data)||void 0===e8?void 0:e8.offerText}),(0,l.jsx)("span",{className:"os-bill-row-val os-discount",children:T(e.data.user_offer_amt)})]}):null,(aA||aC)&&!aS&&a_>0&&(0,l.jsxs)("div",{className:"os-bill-row",children:[(0,l.jsx)("span",{className:"os-bill-row-label",children:"Advance Paid"}),(0,l.jsxs)("span",{className:"os-bill-row-val os-discount",children:["- ",T(af)]})]})]}),(0,l.jsxs)("div",{className:"os-bill-total-row",children:[(0,l.jsx)("span",{className:"os-bill-total-label",children:aS?"Amount Paid":ak||aA?0===a_?"Amount Paid":"Payable at Delivery":aC?0===a_?"Amount Paid":"Balance Due":(null==e?void 0:null===(e9=e.data)||void 0===e9?void 0:e9.PaymentDone)==0?"Amount Paid":"Amount to be paid"}),(0,l.jsx)("span",{className:"os-bill-total-val".concat(aC&&a_>0?" os-bill-total-val--due":""),children:aS?T(null==e?void 0:null===(e5=e.data)||void 0===e5?void 0:e5.orderTotalValue,"zero"):ak||aA||aC?0===a_?T(null==e?void 0:null===(e7=e.data)||void 0===e7?void 0:e7.orderTotalValue,"zero"):T(a_,"zero"):T(e.data.amt_to_pay,"zero")})]}),ag&&e.data.order_amt_to_be_refund>0?(0,l.jsxs)("div",{className:"os-bill-savings os-bill-savings--blue",children:[(0,l.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("polyline",{points:"23 4 23 10 17 10"}),(0,l.jsx)("polyline",{points:"1 20 1 14 7 14"}),(0,l.jsx)("path",{d:"M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"})]}),T(e.data.order_amt_to_be_refund)," refunded"]}):aD>0?(0,l.jsxs)("div",{className:"os-bill-savings",children:[(0,l.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),"You saved ",T(aD)," on this order"]}):null,(null==e?void 0:null===(ae=e.data)||void 0===ae?void 0:ae.loyalty_points)?(0,l.jsxs)("div",{className:"os-bill-points-earned",children:[(0,l.jsx)("span",{className:"os-rewards-icon",children:"â¹"}),"You earned ",e.data.loyalty_points," loyalty points"]}):null]}),aC&&(null==e?void 0:null===(aa=e.data)||void 0===aa?void 0:aa.payment_link)&&!aS&&!aj&&(0,l.jsxs)("div",{className:"os-pay-now-card",children:[(0,l.jsx)("div",{className:"os-pay-now-card-header",children:(0,l.jsx)("span",{className:"os-pay-now-card-title",children:"Balance Due"})}),(0,l.jsxs)("div",{className:"os-pay-now-card-body",children:[(0,l.jsxs)("div",{className:"os-pay-amount-row",children:[(0,l.jsx)("span",{className:"os-pay-amount-label",children:"Balance to pay"}),(0,l.jsx)("span",{className:"os-pay-amount-val",children:T(a_)})]}),(0,l.jsxs)("button",{className:"os-pay-securely-btn",onClick:()=>window.open(e.data.payment_link),children:[(0,l.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),"Pay Balance \xb7 ",T(a_)]}),(0,l.jsxs)("div",{className:"os-pay-secure-note",children:[(0,l.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,l.jsx)("path",{d:"M7 11V7a5 5 0 0110 0v4"})]}),"256-bit SSL encrypted \xb7 PCI DSS compliant"]})]})]}),ay&&(0,l.jsxs)("div",{className:"os-pay-now-card",children:[(0,l.jsx)("div",{className:"os-pay-now-card-header",children:(0,l.jsx)("span",{className:"os-pay-now-card-title",children:"Pay Now"})}),(0,l.jsxs)("div",{className:"os-pay-now-card-body",children:[(0,l.jsxs)("div",{className:"os-pay-amount-row",children:[(0,l.jsx)("span",{className:"os-pay-amount-label",children:"Total due"}),(0,l.jsx)("span",{className:"os-pay-amount-val",children:T(e.data.amt_to_pay)})]}),(0,l.jsxs)("button",{className:"os-pay-securely-btn",onClick:()=>window.open(e.data.payment_link),children:[(0,l.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,l.jsx)("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),"Pay Securely \xb7 ",T(e.data.amt_to_pay)]}),(0,l.jsxs)("div",{className:"os-pay-secure-note",children:[(0,l.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,l.jsx)("rect",{x:"3",y:"11",width:"18",height:"11",rx:"2"}),(0,l.jsx)("path",{d:"M7 11V7a5 5 0 0110 0v4"})]}),"256-bit SSL encrypted \xb7 PCI DSS compliant"]})]})]}),(0,l.jsxs)("button",{className:"os-action-btn",onClick:av,children:[(0,l.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("path",{d:"M6 2L3 6v14a2 2 0 002 2h14a2 2 0 002-2V6l-3-4z"}),(0,l.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,l.jsx)("path",{d:"M16 10a4 4 0 01-8 0"})]}),"Continue Shopping"]}),(0,l.jsxs)("div",{className:"os-help-block",children:[(0,l.jsx)("div",{className:"os-help-title",children:"Need Help?"}),(0,l.jsxs)("div",{className:"os-help-items",children:[(null==O?void 0:null===(as=O.data)||void 0===as?void 0:as.mainmobilenumber)&&(0,l.jsxs)("div",{className:"os-help-item",children:[(0,l.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:(0,l.jsx)("path",{d:"M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07A19.5 19.5 0 013.07 8.81 19.79 19.79 0 01.07 2.18 2 2 0 012.06 0h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L6.91 7.1a16 16 0 006 6l.46-.46a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 14.92z"})}),(0,l.jsxs)("span",{children:["Call us at ",(0,l.jsx)("a",{href:"tel:".concat(O.data.mainmobilenumber),children:O.data.mainmobilenumber})]})]}),(null==e?void 0:null===(al=e.data)||void 0===al?void 0:al.merchant_email)&&(0,l.jsxs)("div",{className:"os-help-item",children:[(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),(0,l.jsx)("polyline",{points:"22,6 12,13 2,6"})]}),(0,l.jsxs)("span",{children:["Email ",(0,l.jsx)("a",{href:"mailto:".concat(e.data.merchant_email),children:e.data.merchant_email})]})]}),(0,l.jsxs)("div",{className:"os-help-item cursor-pointer",onClick:()=>window.open("https://chattybao.com/CancellationRefundsReturnExchange","_blank"),children:[(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),(0,l.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),(0,l.jsx)("span",{children:"Return & Exchange Policy"})]})]})]})]})]})]}),(0,l.jsxs)(j.A,{classes:{paper:N.L.botm_dialog},open:R,PaperProps:{sx:[{width:"100%",marginTop:"auto",marginBottom:"0",marginLeft:"0",marginRight:"0",maxHeight:"50%"},N.L.botm_dialog]},onClose:()=>U(!R),children:[(0,l.jsx)("img",{src:null===m.A||void 0===m.A?void 0:m.A.src,className:"call_close_btn",onClick:()=>U(!R),alt:"close"}),(0,l.jsx)("p",{className:"order-modified-header",children:"Order Modified"}),e.data.orderModifiedMsg&&(0,l.jsx)("p",{className:"order-modified-msg",children:e.data.orderModifiedMsg}),(0,l.jsx)(b.A,{className:"os-dialog-content",children:(0,l.jsx)("div",{className:"summary-items-container",children:e.data.order_summary.map((e,a)=>(0,l.jsxs)("div",{className:"summary-items-view ".concat(0===a?"":"item-border-top"),children:[(0,l.jsxs)("div",{className:"summary-image-name-container",children:[(0,l.jsx)("img",{src:e.image_url[0],className:"summary-item-image",alt:"NA"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"summary-normal-font",children:e.item_name}),(0,l.jsxs)("p",{className:"req-qty-text",children:["Req QTY: ",e.originalCount]})]})]}),(0,l.jsx)("div",{className:"count-whole-container",children:(0,l.jsx)("div",{className:"summary-count-container",children:(0,l.jsxs)("p",{className:e.count<e.originalCount?"modified-count-text":"summary-count-text",children:["x ",e.count]})})}),e.discounted_rate?(0,l.jsxs)("div",{className:"summary-price-container",children:[(0,l.jsx)("p",{className:"cut-off-rate",children:T(e.rate)}),(0,l.jsx)("p",{className:"summary-rate",children:T(e.discounted_rate)})]}):(0,l.jsx)("div",{className:"summary-price-container",children:(0,l.jsx)("p",{className:"summary-rate",children:T(e.rate,"zero")})})]},a))})}),(0,l.jsx)(p.A,{children:e.data.refundMsg&&(0,l.jsxs)("div",{className:"refunded-text-container",children:[(0,l.jsx)("p",{className:"refunded-msg",children:e.data.refundMsg}),(0,l.jsx)("img",{src:null===h.A||void 0===h.A?void 0:h.A.src,className:"flower-check",alt:"NA"})]})})]}),(0,l.jsxs)(j.A,{classes:{paper:N.L.botm_dialog},open:H,PaperProps:{sx:[{width:"100%",marginTop:"auto",marginBottom:"0",marginLeft:"0",marginRight:"0"},N.L.botm_dialog]},onClose:()=>J(!H),children:[(0,l.jsx)("img",{src:null===m.A||void 0===m.A?void 0:m.A.src,className:"call_close_btn",onClick:()=>J(!H),alt:"close"}),(0,l.jsx)("p",{className:"call-contact-us-header",children:"Contact"}),(0,l.jsx)(b.A,{className:"os-dialog-content",children:(0,l.jsxs)("div",{className:"call-contact-container",children:[(0,l.jsx)("div",{className:"phone-owner-container",children:(0,l.jsx)("div",{className:"os-contact-phone-container",children:(0,l.jsxs)("a",{className:"os-contact-phone-link",href:"tel:+91".concat(z),children:[(0,l.jsx)("img",{src:null===u.A||void 0===u.A?void 0:u.A.src,className:"os-contact-call-icon",alt:"call"}),(0,l.jsx)("p",{className:"phone_call_text",children:z})]})})}),(0,l.jsx)(x.A,{className:"phone-number-divider"})]})})]}),(0,l.jsxs)(j.A,{classes:{paper:N.L.botm_dialog},open:G,PaperProps:{sx:{width:"100%",marginTop:"auto",marginBottom:"0",marginLeft:"0",marginRight:"0",maxWidth:"480px",borderTopRightRadius:"30px",borderTopLeftRadius:"30px"}},onClose:()=>Z(!1),children:[(0,l.jsx)("img",{src:null===m.A||void 0===m.A?void 0:m.A.src,className:"call_close_btn",onClick:()=>Z(!1),alt:"close"}),(0,l.jsx)("p",{className:"call-contact-us-header",children:"Whatsapp"}),(0,l.jsx)(b.A,{className:"os-dialog-content",children:(0,l.jsxs)("div",{className:"call-contact-container",children:[ad&&(0,l.jsx)("p",{className:"no-contact-number-text",children:"Business has not provided any contact number"}),O.data.mobile_numbers_enable_on_website&&0!==O.data.mobile_numbers_enable_on_website.length&&O.data.mobile_numbers_enable_on_website.map((e,a)=>e?(0,l.jsxs)(i.Fragment,{children:[(0,l.jsxs)("div",{className:"phone-owner-container",children:[(0,l.jsx)("div",{className:"os-contact-phone-container",children:(0,l.jsxs)("div",{onClick:()=>au(e),className:"os-contact-phone-item",children:[(0,l.jsx)("img",{src:null===u.A||void 0===u.A?void 0:u.A.src,className:"os-contact-call-icon",alt:"call"}),(0,l.jsx)("p",{className:"phone_call_text",children:e})]})}),ar&&(0,l.jsx)("p",{className:"business-owner-text",children:"Contact ".concat(a+1)})]}),(0,l.jsx)("div",{hidden:1===O.data.mobile_numbers_enable_on_website.filter(e=>""!==e).length,children:(0,l.jsx)(x.A,{className:"phone-number-divider"})})]},a):null)]})})]}),(0,l.jsxs)(j.A,{open:K,fullScreen:!0,PaperProps:{sx:g.Y.handlingChargesPopupStyle},onClose:()=>X(!1),children:[(0,l.jsx)(b.A,{children:(0,l.jsx)("p",{className:"about-us-content handling-charges-details-text",children:"The charge is levied by the store for packaging & handling your order"})}),(0,l.jsx)("button",{onClick:()=>X(!1),className:"handling-charges-okay-btn",children:"Okay"})]}),(0,l.jsxs)(j.A,{open:$,fullScreen:!0,PaperProps:{sx:g.Y.handlingChargesPopupStyle},onClose:()=>ee(!1),children:[(0,l.jsx)("img",{src:null===m.A||void 0===m.A?void 0:m.A.src,className:"call_close_btn",onClick:()=>ee(!1),alt:"close"}),(0,l.jsx)("p",{className:"call-contact-us-header",children:"Return & Exchange Policy"}),(0,l.jsx)(b.A,{className:"os-dialog-content",children:ea?(0,l.jsx)("div",{style:{padding:"16px"},children:(0,l.jsx)("p",{className:"about-us-content handling-charges-details-text",children:ea.accept_return?"We accept returns within ".concat(ea.return_window," day").concat(ea.return_window>1?"s":""," of delivery. Please ensure the product is unused and in original packaging.").concat(ea.additional_information?" "+ea.additional_information:""):"This store currently does not accept returns. For queries, please contact us directly."})}):(0,l.jsx)("p",{className:"about-us-content handling-charges-details-text",style:{padding:"16px"},children:"Loading policyâ¦"})}),(0,l.jsx)("button",{onClick:()=>ee(!1),className:"handling-charges-okay-btn",children:"Okay"})]})]})})]})}),E=i.memo(()=>{let e=(0,v.d4)(e=>e.counter.summaryData),a=(0,v.d4)(e=>e.counter.riderLatLng),s=(0,v.d4)(e=>e.counter.isDarkMode),[o,r]=(0,i.useState)([]),c=parseFloat(e.originLatlng.latitude),m=parseFloat(e.originLatlng.longitude),h=parseFloat(e.destinationLatlng.latitude),u=parseFloat(e.destinationLatlng.longitude),p=(c+h)/2,x=(m+u)/2;return(0,i.useEffect)(()=>{let e=["".concat(m,",").concat(c)];(null==a?void 0:a.lat)&&e.push("".concat(a.lng,",").concat(a.lat)),e.push("".concat(u,",").concat(h)),fetch("https://router.project-osrm.org/route/v1/driving/".concat(e.join(";"),"?overview=full&geometries=geojson")).then(e=>e.json()).then(e=>{var a,s,l;(null===(l=e.routes)||void 0===l?void 0:null===(s=l[0])||void 0===s?void 0:null===(a=s.geometry)||void 0===a?void 0:a.coordinates)&&r(e.routes[0].geometry.coordinates.map(e=>{let[a,s]=e;return{lat:s,lng:a}}))}).catch(()=>{r([{lat:c,lng:m},{lat:h,lng:u}])})},[null==a?void 0:a.lat,null==a?void 0:a.lng]),(0,l.jsx)(t.c4,{apiKey:_.p.gmapApiKey,children:(0,l.jsxs)(t.T5,{style:g.Y.mapContainerStyle,mapId:_.p.mapId,colorScheme:s?"DARK":"LIGHT",defaultZoom:13,defaultCenter:{lat:p,lng:x},disableDefaultUI:!0,gestureHandling:"greedy",clickableIcons:!1,keyboardShortcuts:!1,children:[(0,l.jsx)(t.J8,{position:{lat:c,lng:m},zIndex:66,children:(0,l.jsxs)("div",{className:"map-marker-container",children:[(0,l.jsx)(n.g,{className:"user-marker",icon:d.Pcr}),(0,l.jsx)("p",{className:"marker-label",children:e.data.shopname})]})}),(0,l.jsx)(O,{}),(0,l.jsx)(t.J8,{position:{lat:h,lng:u},zIndex:66,children:(0,l.jsxs)("div",{className:"map-marker-container",children:[(0,l.jsx)(n.g,{className:"merchant-marker",icon:d.Pcr}),(0,l.jsx)("p",{className:"marker-label",children:e.data.label})]})}),o.length>0&&(0,l.jsx)(U,{path:o})]})})}),U=e=>{let{path:a}=e,s=(0,t.ko)(),l=(0,t.ST)("maps");return(0,i.useEffect)(()=>
1{if(!s||!l||!(null==a?void 0:a.length))return;let e=new l.Polyline({path:a,strokeColor:"#ffffff",strokeOpacity:1,strokeWeight:8,zIndex:9}),t=new l.Polyline({path:a,strokeColor:"#1a73e8",strokeOpacity:1,strokeWeight:5,zIndex:10});return e.setMap(s),t.setMap(s),()=>{e.setMap(null),t.setMap(null)}},[s,l,a]),null},O=i.memo(()=>{let e=(0,v.d4)(e=>e.counter.riderLatLng);return(0,l.jsx)(l.Fragment,{children:(null==e?void 0:e.lat)&&(0,l.jsx)(t.J8,{position:{lat:parseFloat(e.lat),lng:parseFloat(e.lng)},zIndex:99,children:(0,l.jsx)("img",{src:null==c?void 0:c.src,className:"rider-marker",alt:"rider"})})})}),F=[{label:"Placed",threshold:-1},{label:"Confirmed",threshold:1},{label:"Out for Delivery",threshold:3,activeThreshold:2,PendingIcon:()=>(0,l.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("rect",{x:"1",y:"3",width:"15",height:"13",rx:"1"}),(0,l.jsx)("path",{d:"M16 8h4l3 5v3h-7V8z"}),(0,l.jsx)("circle",{cx:"5.5",cy:"18.5",r:"1.5"}),(0,l.jsx)("circle",{cx:"18.5",cy:"18.5",r:"1.5"})]})},{label:"Delivered",threshold:4,PendingIcon:()=>(0,l.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),(0,l.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]})}],z=()=>(0,l.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,l.jsx)("polyline",{points:"20 6 9 17 4 12"})}),Y=e=>{var a,s,t;let{hasLiveTracking:o}=e,[r,c]=(0,i.useState)(""),m=(0,v.wA)(),[h,u]=(0,i.useState)(""),[p,x]=(0,i.useState)(!1),[g,j]=(0,i.useState)(null),[b,N]=(0,i.useState)(!1),w=(0,v.d4)(e=>e.counter.summaryData);(0,i.useEffect)(()=>{let e=JSON.parse(localStorage.getItem("summaryData"));if(null!==e){var a,s,l;u({orderMsg:e.data.orderMsg,orderMsgTitle:e.data.orderMsgTitle,awb_number:null===(a=e.data)||void 0===a?void 0:a.awb_number,tracking_url:null===(s=e.data)||void 0===s?void 0:s.tracking_url,riderName:e.data.riderName,shipment_status:e.data.shipment_status,riderMobNo:e.data.riderMobNo,destinationLatlng:e.destinationLatlng,rider_speed:e.data.rider_speed,delivery_mode:null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.delivery_mode})}},[]);let f=async()=>{let e=JSON.parse(localStorage.getItem("riderLatLng"));(null==e?void 0:e.lat)&&_()};(0,i.useEffect)(()=>{if(3===JSON.parse(localStorage.getItem("summaryData")).data.shipment_status){f();let e=setInterval(f,6e4);return j(e),()=>{clearInterval(e),setInterval(null)}}},[]),(0,i.useEffect)(()=>{let e=!1,a=async()=>{!e&&!document.hidden&&B(localStorage.getItem("summary-order-id"))&&(e=!0,A(),setTimeout(()=>{e=!1},1e3))};return window.addEventListener("focus",a),document.addEventListener("visibilitychange",a),()=>{window.removeEventListener("focus",a),document.removeEventListener("visibilitychange",a)}},[]);let _=()=>{let e=JSON.parse(localStorage.getItem("riderLatLng")),a=JSON.parse(localStorage.getItem("summaryData"));fetch("https://router.project-osrm.org/route/v1/driving/"+encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat)+";"+encodeURIComponent(a.destinationLatlng.longitude)+","+encodeURIComponent(a.destinationLatlng.latitude)+"?overview=false").then(e=>e.json()).then(async e=>{let s=e.routes[0].distance/1e3;if(0!==Number(a.data.rider_speed)){let e=parseFloat(60*s/Number(a.data.rider_speed)).toFixed();c(e),m((0,k.wb)({key:"trackingETA",value:e}))}})},A=async()=>{let e=localStorage.getItem("sessionId"),a=B(localStorage.getItem("summary-order-id"));N(!0),await y.A.getChannelDetailsv3New(e,{orderId:a}).then(async e=>{var a,s,l,t;(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.code)==0?(e.data.data.shipment_status<8&&u({orderMsg:e.data.data.orderMsg,orderMsgTitle:e.data.data.orderMsgTitle,awb_number:e.data.data.awb_number,tracking_url:e.data.data.tracking_url,riderName:e.data.data.riderName,shipment_status:e.data.data.shipment_status,riderMobNo:e.data.data.riderMobNo,delivery_mode:null==e?void 0:null===(l=e.data)||void 0===l?void 0:null===(s=l.data)||void 0===s?void 0:s.delivery_mode}),m((0,k.wb)({key:"summaryData",value:{data:e.data.data,destinationLatlng:e.data.destinationLatlng,originLatlng:e.data.originLatlng}})),e.data.data.refundAmount&&"0"!==e.data.data.refundAmount&&x(!0),3!==e.data.data.shipment_status||g||(f(),j(setInterval(f,6e4)))):(0,D.oR)(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.message,{autoClose:500})}).finally(()=>N(!1))},C=null!==(t=null==w?void 0:null===(a=w.data)||void 0===a?void 0:a.shipment_status)&&void 0!==t?t:null!==(s=null==h?void 0:h.shipment_status)&&void 0!==s?s:0,S=7===C;return p||(null==h?void 0:h.delivery_mode)==0||(null==h?void 0:h.delivery_mode)==1&&(null==h?void 0:h.riderName)&&(null==h||h.riderMobNo),(0,l.jsx)("div",{children:!o&&(0,l.jsxs)("div",{className:"os-status-block",children:[(0,l.jsxs)("div",{className:"os-block-header",children:[(0,l.jsx)("span",{className:"os-block-title",children:"Order Status"}),(0,l.jsx)("span",{className:"os-status-refresh",children:b?(0,l.jsx)(P.A,{size:14,color:"var(--os-warm-gray)"}):(0,l.jsx)(n.g,{onClick:A,icon:d.lLb})})]}),(()=>{let e=S?[F[0],F[1],{label:"Cancelled",cancelled:!0},F[2],F[3]]:F;return(0,l.jsx)("div",{className:"os-status-inner",children:(0,l.jsx)("div",{className:"os-status-steps",children:e.map((a,s)=>{let t=!!a.cancelled,i=S?1:C,o=!t&&(-1===a.threshold||i>=a.threshold),r=!!t||!o&&(null!=a.activeThreshold?i>=a.activeThreshold&&i<a.threshold:i===a.threshold-1);return(0,l.jsxs)("div",{className:"os-status-step",children:[(0,l.jsxs)("div",{className:"os-status-dot-wrap",children:[(0,l.jsx)("div",{className:"os-status-dot ".concat(t?"cancelled":o?"done":r?"active":""),children:t?(0,l.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,l.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,l.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):o||r?(0,l.jsx)(z,{}):a.PendingIcon&&(0,l.jsx)(a.PendingIcon,{})}),s<e.length-1&&(0,l.jsx)("div",{className:"os-status-line ".concat(o?"done":"")})]}),(0,l.jsx)("div",{className:"os-status-step-label ".concat(t?"cancelled":o?"done":r?"active":""),children:a.label})]},s)})})})})()]})})}},44967:(e,a,s)=>{"use strict";s.d(a,{A:()=>l});let l=e=>!!e&&/\.(mp4|mov|avi)$/i.test(e)},29929:(e,a,s)=>{"use strict";s.d(a,{t:()=>r});var l=s(74836),t=s(7478),i=s.n(t);let{apiEncryptionKey:o}=s(72301).p,r={currency:(e,a)=>{if("zero"!==a&&(null==e||0==e))return 0==e?"":e;let s=Number(e);if(isNaN(s))return"";let l=s%1!=0?1:0;return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:l,maximumFractionDigits:l}).format(s).replace(/(\.|,)00$/g,"").replace(/\s/g,"")},calcOffer:(e,a)=>Math.round(100-e/a*100),disallowMinusDecimal:e=>{let a=e.key;console.log("Key",e),"-"===a&&(""===e.target.value||0!==e.target.selectionStart)&&e.preventDefault(),("."===a||"Decimal"===a||"Unidentified"===a)&&(console.log("Unidentified"),e.preventDefault()),(229===e.keyCode||190===e.which)&&(console.log("keycode 229"),e.preventDefault()),"0"===a&&""===e.target.value&&e.preventDefault()},getMerchantDet:async(e,a)=>{let s={merchantId:null==a?void 0:a.merchantid,ulatitude:"16.43",ulongitude:"74.59"};try{var t,i;let a=await l.A.getMerchantDataForCatalogue(s,e);if((null==a?void 0:null===(t=a.data)||void 0===t?void 0:t.code)==0)return r.s
1afeSetItem("merchantdetails",r.getEncryptedText({merchantDetails:null==a?void 0:null===(i=a.data)||void 0===i?void 0:i.merchantDetails})),!0;return console.log("Error"),!1}catch(e){return alert(e.message),!1}},keepStorageKeysOnQuotaError:["sessionId","User"],safeSetItem:(e,a)=>{try{return localStorage.setItem(e,a),!0}catch(s){if((null==s?void 0:s.name)==="QuotaExceededError"||(null==s?void 0:s.code)===22){Object.keys(localStorage).filter(a=>a!==e&&!r.keepStorageKeysOnQuotaError.includes(a)).forEach(e=>localStorage.removeItem(e));try{return localStorage.setItem(e,a),!0}catch(e){return console.error("localStorage quota exceeded even after clearing all non-essential caches:",e),!1}}return console.error(s),!1}},MAX_DATA_URI_LENGTH:1e3,stripLargeDataUris:e=>"string"==typeof e?e.startsWith("data:")&&e.length>r.MAX_DATA_URI_LENGTH?null:e:Array.isArray(e)?e.map(r.stripLargeDataUris):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(e=>{let[a,s]=e;return[a,r.stripLargeDataUris(s)]})):e,getEncryptedText:e=>{try{if(e){let a=r.stripLargeDataUris(e);return i().AES.encrypt(JSON.stringify(a),o).toString()}return null}catch(e){console.error(e)}},getDecryptedData:e=>{try{if(e){let a=i().AES.decrypt(e,o);return JSON.parse(a.toString(i().enc.Utf8))}return null}catch(e){console.error(e)}},encryptApiData:async e=>{try{return{encryptedData:i().AES.encrypt(JSON.stringify(e),o).toString()}}catch(e){console.error(e)}},updateStoredCartFormat:()=>{let e=localStorage.getItem("cartData");if(e)try{let a=JSON.parse(e);Array.isArray(a)&&(localStorage.setItem("cartData",getEncryptedText(a)),console.log("Cart data converted to encrypted format."))}catch(e){console.log("Cart data is already in encrypted format or invalid:",e)}},downloadImage:async e=>{try{let a=await fetch(e,{method:"GET",mode:"cors",cache:"no-cache",headers:{Origin:window.location.origin}}),s=await a.blob(),l=window.URL.createObjectURL(s),t=document.createElement("a");t.href=l;let i=Date.now();t.setAttribute("download","ChattyBao magic ai"+"_".concat(i)),document.body.appendChild(t),t.click(),document.body.removeChild(t),window.URL.revokeObjectURL(l)}catch(s){console.error("Image download failed:",s);let a=document.createElement("a");a.href=e,a.target="_blank",document.body.appendChild(a),a.click(),document.body.removeChild(a)}},scrollLeft:e=>{e.current.scrollBy({left:-250,behavior:"smooth"})},scrollRight:e=>{e.current.scrollBy({left:250,behavior:"smooth"})},isHTMLString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/<\/?[a-z][\s\S]*>/i.test(e)},isIOS:()=>"undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},61758:(e,a,s)=>{"use strict";s.d(a,{Y:()=>l});let l={menuBarStyle:{width:"90%",marginBottom:0,height:"100%",marginRight:"auto",backgroundColor:"var(--merchant-bg-color)"},chattybaoContactTexts:{email:"[email protected]",contactNumber:"8076219166",addressline1:"C-17, Basement, B-3, Guru Nanak Pura,",addressline2:"Laxmi Nagar, New Delhi 110092"},aboutUsPopupStyle:{width:"100%",height:"auto",marginRight:"10%",marginLeft:"10%",overflowY:"hidden"},addToHomePopupStyle:{width:"100vw",height:"100vh",padding:"2rem",overflowY:"hidden"},handlingChargesPopupStyle:{width:"90%",maxWidth:"350px",height:"auto",borderRadius:"10px"},websiteThemeColors:{black:"black",white:"white"},addressPopUpStyle:{width:"100%",marginTop:"auto",marginBottom:"0",marginLeft:"0",marginRight:"0",height:"40%",paddingLeft:"10px",paddingTop:"10px",overflow:"visible"},mapContainerStyle:{height:"100%",width:"100%"},desktopFooterMapContainer:{height:"120px",width:"200px"},toastStyle:{borderRadius:"20px",alignSelf:"center",marginLeft:"3%",marginRight:"3%",verticalAlign:"middle"},userCashbackTermsPage:"https://webadmin.chattybao.com/offer/usercashback",productTncText:"All images are for representation purpose only. While every effort has been made to maintain accurate and up to date product related content, it is recommended to read product labels, batch and manufacturing details along with warnings, and directions before using or consuming a packaged product. For other products or any additional information, please contact the seller and incase you wish to contact the manufacturer, the address mentioned on the product label should be used.",domainNames:["devwebsite.chattybao.co.in","devwebsite.chattybao.com","localhost","localhost:3000","www.chattybao.com","chattybao.com","52.66.23.103:3000","35.154.11.204","35.154.11.204:3000","192.168.1.4:3000","192.168.31.78:3000","10.206.13.119:3000"],requestTimedOutError:"ECONNABORTED",subPaths:["/product","/cid","/rewards","/past-orders"],rewardsInputFieldStyle:{"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:"black",color:"black"},"&:hover fieldset":{borderColor:"black",color:"black"},"&.Mui-focused fieldset":{borderColor:"black",color:"black"}}},rewardsInputFieldTheme:{styleOverrides:{root:{color:"black"},shrink:{color:"black !important"},"&.MuiFormLabel-filled":{transform:"translate(50px, -50px) scale(0.15)"},"&.MuiInputLabel-shrink":{transform:"translate(50px, -50px) scale(0.15)"}}},optionsPopupStyle:{margin:"auto 0 0 0",width:"100%"},previousDatesPopUpStyle:{width:"100%",marginTop:"auto",marginBottom:"0",marginLeft:"0",marginRight:"0",minHeight:"30%",paddingLeft:"10px",paddingTop:"10px",overflow:"visible",borderTopRightRadius:"20px",borderTopLeftRadius:"20px"},previousDateTitleStyle:{m:0,p:0,marginTop:"30px",paddingLeft:"5px"},menuDialogStyle:{"& .MuiDialogContent-root":{overflowY:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#cccccc",borderRadius:"4px"}},width:"70%",maxHeight:"400px",marginRight:"5%",marginLeft:"auto",marginTop:"auto",marginBottom:"80px",backgroundColor:"#3a3a3c",color:"white",borderRadius:"20px",overflow:"hidden",maxWidth:"307px"},menuDialogCenter:{"& .MuiDialogContent-root":{overflowY:"auto",scrollbarWidth:"thin","&::-webkit-scrollbar":{width:"4px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#cccccc",borderRadius:"4px"}},width:"85%",maxHeight:"400px",marginRight:"auto",marginLeft:"auto",marginTop:"auto",marginBottom:"40px",backgroundColor:"#3a3a3c",color:"white",borderRadius:"20px",overflow:"hidden",maxWidth:"307px"},iframe:{"@media only screen and (min-width: 576px)":{maxWidth:"400px"},borderRadius:"10px",height:"400px",overflowY:"hidden"},loginPopUpWithLogo:{"@media only screen and (min-width: 576px)":{maxWidth:"480px"},borderRadius:"10px",height:"480px",overflowY:"hidden"},excludedMessages:["New Order - Accept or Reject","Partner on the way to deliver to customer","Order accepted","Partner allocation rejected, press Chatt
1yBao delivery button again","****** Chat ended ******"],servicesL1Id:"13c59410-737b-11ec-9806-93163a488dc9",preTagStyle:{whiteSpace:"pre-wrap",wordWrap:"break-word"},liveOrdersListStyle:{marginTop:"auto",marginBottom:0,bottom:0,minHeight:"180px",backgroundColor:"white",border:"1px solid #D9D9D9",borderTopLeftRadius:"20px",borderTopRightRadius:"20px",padding:"2px",width:"100%",marginLeft:0,marginRight:0,maxWidth:"480px"},pdDetailsPopUpContent:{padding:0},pdDetailsPopUpCloseContainer:{position:"absolute",right:0,top:0,padding:"5px"},mAppAppStoreLink:"https://apps.apple.com/in/app/chattybao-business/id6449996109",mAppPlayStoreLink:"https://play.google.com/store/apps/details?id=com.goping.merchant",cbYoutubeVideoId:"ukCFHouh6EA",cbYoutubeVideoLink:"https://www.youtube.com/shorts/ukCFHouh6EA",cbYoutubeVideo2Id:"oNNHuZ932GA",cbYoutubeVideo2Link:"https://www.youtube.com/shorts/oNNHuZ932GA",cbReferralLink:"https://refer.chattybao.com/CBBusiness",foodCategoryArray:["3d795333-84ae-11ec-a0d0-795c4aba562b","53b92bc0-b29c-11ed-9c26-392ccd9c96ef","8e827a10-737b-11ec-9806-93163a488dc9","95f732e0-737b-11ec-9806-93163a488dc9","e63842b0-6a53-11ed-930f-439e27ee4387"],policyUpdatedDate:"October 31, 2025",navigationUrls:{about:"/about",contact:"/contact",cart:"/cart",search:"/search?q=",myAccount:"/account",allProducts:"/collections?allProducts=true",collections:"/collections",policyTerms:"/policy?tab=1",policyRefund:"/policy?tab=2",policyPrivacy:"/policy?tab=3"}}},41620:(e,a,s)=>{"use strict";s.d(a,{A:()=>i});var l=s(95155);s(12115),s(9875);var t=s(80926);function i(e){let{text:a=""}=e;return(0,l.jsxs)("div",{className:"spinner-container",children:[(0,l.jsx)(t.A,{color:"var(--merchant-primary)"}),(0,l.jsx)("p",{className:"spinner-text mt-[10px]",children:a})]})}},73318:(e,a,s)=>{"use strict";let l;s.d(a,{$:()=>i.$s,z:()=>l});var t=s(49904),i=s(71479);let{firebaseValues:o}=s(72301).p,r={apiKey:o.apiKey,authDomain:o.authDomain,projectId:o.projectId,storageBucket:o.storageBucket,messagingSenderId:o.messagingSenderId,appId:o.appId,measurementId:o.measurementId};{let e=(0,t.Wp)(r);(async()=>{await (0,i.TT)()?l=(0,i.P5)(e):console.warn("\uD83D\uDEA8 Firebase Analytics not supported in this environment.")})()}},10779:()=>{},64799:()=>{},67289:()=>{},9875:()=>{},93286:(e,a,s)=>{"use strict";s.d(a,{A:()=>l});let l={src:"/_next/static/media/call_btn.6b75c342.webp",height:3125,width:3125,blurDataURL:"data:image/webp;base64,UklGRroAAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSEEAAAAAUscTAAAAAADo/80BAAAAAOr/bwAAAAAAjPIJAAAAAAAR46cCAAAAAAAz8akLXskSAAAy3+/+/8oAAAAMfN7kXQBWUDggUgAAALABAJ0BKggACAACQDglmAJ0APN6/GAA/m0W97ab/y8twhZ7hh8Tdb65+iLZFY/rQ3Erl6u1KP/HSl9RhEmCcZe/Tcu9/cob4zjSkt0PEzDpUAA=",blurWidth:8,blurHeight:8}},84761:(e,a,s)=>{"use strict";s.d(a,{A:()=>l});let l={src:"/_next/static/media/flower_check_fill.8d35f648.webp",height:1e3,width:963,blurDataURL:"data:image/webp;base64,UklGRrYAAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSDwAAAABX2A0YNI0ayTIJm/xAyMi1OU5Jg4UxbZSoaagBTGMYAcjuCYAOdx/bzxLRPQ/zFsJ0AXjwfwbeoCa1wxWUDggVAAAANABAJ0BKggACAACQDglqAJ0APN60VwAAP7YH2ZxQyZcN9kjiiNv2ZZswDZWDSvctd/lADfx10LGx3DCUcIgdm40vW/ip/8pYAPUt/9JkW/xu3YAAA==",blurWidth:8,blurHeight:8}}}]);
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.