PageSourceSearch

https://zuri.health/_next/static/chunks/pages/checkout-47c023ba7fcfbdf8.js

js zuri.health collected 2026-09-24 12:09:29 UTC 21,828 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2222],{95338:function(e,a,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout",function(){return s(70581)}])},48357:function(e,a,s){"use strict";var l=s(85893),r=s(39057),t=s(67294);a.Z=e=>{let{error:a,parentShow:s}=e,[i,n]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{(null==a?void 0:a.length)<1&&n(!1)},[a]),i&&(0,l.jsx)("div",{className:"rounded-md bg-red-50 p-4",children:(0,l.jsxs)("div",{className:"flex",children:[(0,l.jsx)("div",{className:"flex-shrink-0 cursor-pointer",children:(0,l.jsx)(r.Z,{onClick:()=>{i?n(!1):i||n(i)},className:"h-5 w-5 text-red-400","aria-hidden":"true"})}),(0,l.jsxs)("div",{className:"ml-3",children:[(0,l.jsx)("h3",{className:"text-sm font-medium text-red-800",children:"There were errors with your submission"}),(0,l.jsx)("div",{className:"mt-2 text-sm text-red-700",children:(0,l.jsx)("ul",{role:"list",className:"list-disc space-y-1 pl-5",children:(null==a?void 0:a.length)>1?null==a?void 0:a.map((e,a)=>(0,l.jsx)("li",{className:"flex justify-start",children:e},a)):(0,l.jsx)("li",{className:"flex justify-start",children:a})})})]})]})})}},70581:function(e,a,s){"use strict";s.r(a),s.d(a,{__N_SSP:function(){return w},default:function(){return checkout}});var l=s(85893),r=s(67294),t=s(25675),i=s.n(t),n={src:"/_next/static/media/paystack.abfacc62.png",height:9,width:52,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAABCAMAAADU3h9xAAAADFBMVEUAGTAAGTMAYIQAyv+VwFxHAAAABHRSTlNtWU2bO7gn/wAAAAlwSFlzAAALEwAACxMBAJqcGAAAAA5JREFUeJxjYGZiAAFGAAAwAAe8xPOnAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:1},d={src:"/_next/static/media/cashondelivery.44102722.png",height:53,width:53,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAMFBMVEVMaXH39/fr6+vu7u7Pz8+2trbV1dXKysrh4eHKysrAwMCdnZ2/v7/k5OTd3d2MjIzCscO1AAAADHRSTlMANAV//ftnGoNKMf6NHvFrAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAL0lEQVR4nGNgwABMjGDAzsDJwsrKwsrLxsDJw83Px8LDxsDOzMzMwczBhawaDBgAGYAAz5pUyCQAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},o={src:"/_next/static/media/insurance.c30221c3.png",height:39,width:39,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAGFBMVEUAAAAAAAAAAAAAAABMaXEAAAAAAAAAAABRTKBAAAAACHRSTlNhgHOPABmhTTE2aCAAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAsSURBVHicTYtRCgAgFMKc9ur+N46iqH0Jc2oHlTYldzKwRMDhG0uZ+J1vPgEVnACXkSVnxgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8};let capitalizeWords=e=>e.split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");var Productname=e=>{let{product:a}=e,s=a.product.name.split(" "),t=s.length>2;return(0,l.jsx)("div",{className:"font-semibold",children:s.map((e,a)=>(0,l.jsxs)(r.Fragment,{children:[capitalizeWords(e),t?(0,l.jsx)("br",{}):null,a!==s.length-1&&" "," "]},a))})},c={src:"/_next/static/media/drug.34ffff07.png",height:123,width:123,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAilBMVEUAw+oBqNsAwOYLf8gjaKUta60AiMYAm9TD8fdfxOULXq1OyfYjpsBBt8Jlm5Yst/A8c6QAZLaaxt8BbbsAuOYAyvAAsOYAltwBuuf99vcAweyP3Pbs5e+X2fEAo9qQ0dx2zt1rzNcA1/g0z9/L2ODm3dtWnNDO2evW5/RloHQAit8rhbBfnYxzsZ5HtH1DAAAAFXRSTlPt7tnu8OvI9f7+uP79/v7+7PD+yPcePg5zAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAS0lEQVR4nB3GRQ6AMAAEwAVa3EmFCu7y/++RMKeBqyTvAuFjmsehj7gDptelDRmgrNn/cGsOnUhA1FGRpSLAdT/vmW8emoqUlJL4A8PqBTy8mZpNAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},Checkout_Cart=function(e){var a,s,t,n,d;let{product:o,onRemove:m,onQuantityChange:u}=e,[x,h]=(0,r.useState)(null==o?void 0:o.quantity);(0,r.useEffect)(()=>{x<0&&h(0)},[x]);let addQuantity=()=>{let e=x+1;h(e),null==u||u(o.product._id,e)},subtractQuantity=()=>{let e=x-1;h(e),null==u||u(o.product._id,e)},removeItem=()=>{null==m||m(o.product._id)};return(0,l.jsxs)("div",{className:"flex flex-row items-center gap-8 px-2 md:px-6",children:[(0,l.jsx)(i(),{src:(null==o?void 0:null===(s=o.product)||void 0===s?void 0:null===(a=s.imageUrl)||void 0===a?void 0:a.length)>0&&(null==o?void 0:null===(n=o.product)||void 0===n?void 0:null===(t=n.imageUrl[0])||void 0===t?void 0:t.imgPath)||(null==o?void 0:null===(d=o.image)||void 0===d?void 0:d.imgPath)||c,alt:"product",width:100,height:100,className:"min-h-0 w-16 min-w-0 shrink-0 md:w-24"}),(0,l.jsxs)("div",{className:"font-primary mt-5 grid grid-cols-2 gap-2 whitespace-normal text-sm md:visible",children:[(0,l.jsx)("button",{onClick:()=>removeItem(),className:"col-span-2 block justify-self-end",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"#EA526F",className:"h-6 w-6",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"})})}),(0,l.jsx)("p",{className:"font-semibold",children:"Product name"}),(0,l.jsx)("div",{className:"contents font-semibold",children:(0,l.jsx)(Productname,{product:o})}),(0,l.jsx)("p",{className:"font-semibold",children:"Quantity"}),(0,l.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(0,l.jsx)("button",{className:"border-1 rounded border border-gray-600",onClick:()=>subtractQuantity(),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"h-4 w-4",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"})})})," ",(0,l.jsxs)("span",{className:"font-bold",children:[" ",x]})," ",(0,l.jsx)("button",{onClick:()=>addQuantity(),className:"border-1 rounded border border-gray-600",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"h-4 w-4",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})})})]}),(0,l.jsx)("p",{className:"font-semibold",children:"unit Price"}),(0,l.jsxs)("span",{className:"font-primary text-sm md:text-sm",children:["KES ",null==o?void 0:o.product.price]}),(0,l.jsx)("p",{className:"font-semibold",children:"Total Price"}),(0,l.jsxs)("span",{className:"font-primary text-sm md:text-sm",children:["KES ",(null==o?void 0:o.product.price)*x]})]})]})},m=s(48357),u=s(96626),x=s(17106),h=s(9473),A=s(78153),b=s(33321),f=s(53181),p=s(
155678),g=s(11163),w=!0,checkout=()=>{var e,a,s;let[t,c]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[j,y]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[C,M]=(0,r.useState)(""),[_,S]=(0,r.useState)(""),[B,E]=(0,r.useState)(""),[P,T]=(0,r.useState)([]),[U,I]=(0,r.useState)(""),[L,O]=(0,r.useState)(!1),[R,K]=(0,r.useState)(""),H=(0,h.I0)(),D=(0,g.useRouter)(),F=(0,h.v9)(e=>e.cart),makeOrder=async()=>{let e;let a=F.products.map(e=>({product_id:e.product._id,quantity:e.quantity}));checkForInputs(t,j,N,C,_,B);try{e="insurance"===R?{name:t,email:j,phone:N,country:"Kenya",insurance:U,details:a,delivery_address:{address:C,hseNumber:_,city:B,state:w},payment_type:R}:{name:t,email:j,phone:N,country:"Kenya",details:a,delivery_address:{address:C,hseNumber:_,city:B,state:w},payment_type:R};let{data:s}=await f.Z.post("".concat(b.T,"/pharmacy/add_zurihealth_direct_pharmacy_order"),e);s&&"online"===R&&(p.Am.success("Order placed successfully"),H((0,A.LL)()),D.push(s.link)),(s&&"cod"===R||"insurance"===R)&&(p.Am.success("Order placed successfully"),D.push("/Success"),H((0,A.LL)()))}catch(e){p.Am.error(e.message)}},checkForInputs=(e,a,s,l,r,t)=>{if(T([]),!e)throw T(e=>[...e,"Name is missing"]),new m.Z("Name is missing");if(!s)throw T(e=>[...e,"Phone number is missing"]),new m.Z("Phone number is missing");if(!a)throw T(e=>[...e,"Email is missing"]),new m.Z("Email is missing");if(!l)throw T(e=>[...e,"Address is missing"]),new m.Z("Address is missing");if(!r)throw T(e=>[...e,"House number is missing"]),new m.Z("House number is missing");if(!t)throw T(e=>[...e,"City is missing"]),new m.Z("City is missing");if(!R)throw T(e=>[...e,"Select a payment method"]),new m.Z("Select a payment method")},[G,z]=(0,r.useState)(!1),[V,W]=(0,r.useState)("");return(0,l.jsx)("section",{className:"h-full w-full md:mb-[200px]",children:(0,l.jsxs)("div",{className:"flex min-h-full flex-col justify-end gap-12 bg-[#eef0f8] pb-4 pt-8 md:-mb-48 ",children:[(0,l.jsx)("div",{className:"2lg:mr-1/6 xl:ml-1/6 font-primary mx-4 self-start text-xl font-semibold text-[#021616] md:ml-[60px] md:w-[274px]  md:text-2xl xl:ml-[178px] ",children:"Checkout"}),(0,l.jsx)("div",{className:"2lg:mr-1/6 2lg:ml-1/6 mx-4 mb-2 flex flex-row items-center gap-20 md:ml-[60px] md:mr-[178px] xl:ml-[178px] ",children:(0,l.jsxs)("div",{className:"2lg:w-2/3 flex w-full flex-col items-start gap-6 md:w-[1400px] md:flex-row",children:[(0,l.jsxs)("div",{className:"2lg:w-1/3 min-w-11/12 mt-px flex w-full flex-col gap-8 md:min-w-[300px]",children:[(0,l.jsxs)("div",{className:"flex h-[277px] shrink-0 flex-col gap-5 rounded bg-[#fafafa] px-8 pb-8 pt-6",children:[(0,l.jsx)("div",{className:"font-primary ml-px h-[8.22%] w-32 self-start text-sm font-semibold text-black/85",children:"Basic Information"}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"name",value:t,onChange:e=>c(e.target.value),className:P.includes("Name is missing")?"h-12 w-full shrink-0 items-start border border-solid border-red-400 bg-white px-4 py-2":"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"First name*"})}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"phone",value:N,onChange:e=>k(e.target.value),className:P.includes("Phone number is missing")?"h-12 w-full shrink-0 items-start border border-solid border-red-400 bg-white px-4 py-2":"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"Phone Number"})}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"email",value:j,onChange:e=>y(e.target.value),className:P.includes("Email is missing")?"h-12 w-full shrink-0 items-start border border-solid border-red-400 bg-white px-4 py-2":"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"E-mail"})})]}),(0,l.jsxs)("div",{className:"flex h-[352px] shrink-0 flex-col justify-center gap-5 rounded bg-[#fafafa] px-6",children:[(0,l.jsx)("div",{className:"font-primary ml-px h-[5.11%] w-32 self-start text-sm font-semibold text-black/85",children:"Delivery Address"}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"address",value:C,onChange:e=>M(e.target.value),className:P.includes("Address is missing")?"h-12 w-full shrink-0 items-start border border-solid border-red-400 bg-white px-4 py-2":"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"Address"})}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"hseNumber",value:_,onCh
1ange:e=>S(e.target.value),className:P.includes("House number is missing")?"h-12 w-full shrink-0 items-start border border-solid border-red-400 bg-white px-4 py-2":"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"House Number / Apartment Name"})}),(0,l.jsx)("div",{className:"flex w-full flex-col",children:(0,l.jsx)("input",{type:"text",name:"city",value:B,onChange:e=>E(e.target.value),className:"h-12 w-full shrink-0 items-start border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",placeholder:"City/Town"})}),(0,l.jsxs)("select",{name:"state",value:w,onChange:e=>v(e.target.value),className:"h-12 w-full shrink-0 items-center border border-solid border-[rgba(130,130,130,0.4)] bg-white px-4 py-2",children:[(0,l.jsx)("option",{value:"",hidden:!0,children:"select a county"}),[{id:1,name:"Mombasa"},{id:2,name:"Kwale"},{id:3,name:"Kilifi"},{id:4,name:"Tana River"},{id:5,name:"Lamu"},{id:6,name:"Taita Mak Taveta"},{id:7,name:"Garissa"},{id:8,name:"Wajir"},{id:9,name:"Mandera"},{id:10,name:"Marsabit"},{id:11,name:"Isiolo"},{id:12,name:"Meru"},{id:13,name:"Tharaka-Nithi"},{id:14,name:"Embu"},{id:15,name:"Kitui"},{id:16,name:"Machakos"},{id:17,name:"Makueni"},{id:18,name:"Nyandarua"},{id:19,name:"Nyeri"},{id:20,name:"Kirinyaga"},{id:21,name:"Murang’a"},{id:22,name:"Kiambu"},{id:23,name:"Turkana"},{id:24,name:"West Pokot"},{id:25,name:"Samburu"},{id:26,name:"Trans-Nzoia"},{id:27,name:"Uasin Gishu"},{id:28,name:"Elgeyo-Marakwet"},{id:29,name:"Nandi"},{id:30,name:"Baringo"},{id:31,name:"Laikipia"},{id:32,name:"Nakuru"},{id:33,name:"Narok"},{id:34,name:"Kajiado"},{id:35,name:"Kericho"},{id:36,name:"Bomet"},{id:37,name:"Kakamega"},{id:38,name:"Vihiga"},{id:39,name:"Bungoma"},{id:40,name:"Busia"},{id:41,name:"Siaya"},{id:42,name:"Kisumu"},{id:43,name:"Homa Bay"},{id:44,name:"Migori"},{id:45,name:"Kisii"},{id:46,name:"Nyamira"},{id:47,name:"Nairobi"}].map(e=>(0,l.jsx)("option",{value:e.name,children:e.name},e.id))]})]})]}),(0,l.jsxs)("div",{className:P.includes("Select a payment method")?"2lg:w-1/3 min-w-11/12 mr-0 mt-px flex w-full  flex-col justify-between border-2 border-red-400 md:mr-1 md:min-w-[220px] md:gap-2 xl:min-w-[300px]":"2lg:w-1/3 min-w-11/12 mr-0 mt-px flex w-full flex-col justify-between  md:mr-1 md:min-w-[240px] md:gap-2 xl:min-w-[300px]",children:[(0,l.jsxs)("div",{className:"flex h-20 shrink-0 flex-row items-center justify-between rounded bg-[#fafafa] pl-6 pr-6",children:[(0,l.jsxs)("div",{className:"flex flex-row items-center  gap-4",children:[(0,l.jsx)("div",{className:"w- flex h-10 shrink-0 flex-col items-center justify-center rounded border border-solid border-[rgba(130,_130,_130,_0.85)] bg-[#f9f9fa]",children:(0,l.jsx)(i(),{src:n,className:"min-h-0 w-12 min-w-0",alt:"paystack"})}),(0,l.jsx)("div",{className:"font-primary h-[41.03%] w-1/2 text-sm font-semibold text-black/85",children:"PayStack"})]}),(0,l.jsx)("input",{type:"checkbox",value:"online",name:"paymentMethod",checked:"online"===R,onChange:e=>K(e.target.value),className:"-ml-8 h-5 w-5 rounded border border-solid border-black/40 bg-white"})]}),(0,l.jsxs)("div",{className:"flex h-20 shrink-0 flex-row items-center justify-between rounded bg-[#fafafa] px-6",children:[(0,l.jsxs)("div",{className:"flex w-1/2 flex-row items-center gap-4",children:[(0,l.jsxs)("div",{className:"relative flex w-16 shrink-0 flex-col items-center px-1",children:[(0,l.jsx)("div",{className:"absolute left-0 top-2 h-10 w-16 rounded border border-solid border-[rgba(130,_130,_130,_0.85)] bg-[#f9f9fa]"}),(0,l.jsx)(i(),{src:d,alt:"cash on delivery",className:"relative min-h-0 w-12 min-w-0"})]}),(0,l.jsx)("div",{className:"font-primary w-3/5 whitespace-nowrap text-sm font-semibold text-black/85 md:text-xs xl:text-sm",children:"Cash On Delivery"})]}),(0,l.jsx)("input",{type:"checkbox",value:"cod",name:"paymentMethod",checked:"cod"===R,onChange:e=>K(e.target.value),className:"h-5 w-5 rounded border border-solid border-black/40 bg-white"})]}),(0,l.jsx)("div",{className:"relative flex flex-col",children:(0,l.jsxs)("div",{className:"relative flex flex-col justify-center gap-10 rounded bg-[#fafafa] px-5 pb-8 pt-6",children:[(0,l.jsxs)("div",{className:"mx-1 flex flex-row items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex flex-row items-center gap-4",children:[(0,l.jsxs)("div",{className:"relative flex w-16 shrink-0 flex-col items-center",children:[(0,l.jsx)(i(),{src:o,alt:"insurance",className:"absolute left-3 top-0 h-10 min-h-0 w-10 min-w-0"}),(0,l.jsx)("div",{className:"relative h-10 w-16 shrink-0 rounded border border-solid border-[rgba(130,_130,_130,_0.85)]"})]}),(0,l.jsx)("div",{className:"font-primary w-1/2 text-sm font-semibold text-black/85",children:"Insurance"})]}),(0,l.jsx)("input",{type:"checkbox",value:"insurance",name:"paymentMethod",checked:"insurance"===R,onChange:e=>K(e.target.value),className:"h-5 w-5 rounded border border-solid border-black/40 bg-white"})]}),"insurance"===R&&(0,l.jsx)("div",{className:"ml-1 flex h-[240px] flex-col gap-0.5 overflow-y-auto md:h-[400px] md:gap-1 ",children:(0,l.jsxs)(u.v,{as:"div",className:"relative",children:[(0,l.jsx)(u.v.Button,{className:"flex  h-12 w-full flex-col items-center justify-center rounded border border-solid border-[rgba(130,130,130,0.4)] bg-white text-center",children:(0,l.jsx)("span",{className:"text-base ",children:U||"Select an insurer"})}),(0,l.jsx)(x.u,{as:r.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:(0,l.jsx)(u.v.Items,{className:"absolute mt-2 w-full rounded border border-gray-200 bg-white shadow-lg",children:(0,l.jsx)("div",{className:"py-1",children:[{value:"CIC",label:"CIC"},{value:"Allianz",label:"Allianz"},{value:"Madison",label:"Madison"},{value:"Britam",label:"Britam"},{value:"Aetna",label:"Aetna"},{value:"Cigna",label:"Cigna"},{value:"NowHealth",label:"Now Health"},{value:"FirstAssurance",label:"First Assurance"},{value:"GAInsurance",label:"GA Insurance"},{value:"KenyaReinsurance",label:"Kenya Reinsurance"},{value:"Pioneer",label:"Pioneer"},{value:"Pacis",label:"Pacis"},{value:"LibertyLifeAssurance",label:"Liberty Life Assurance"},{value:"UAPOldMutual",label:"UAP Old Mutual"},{value:"Sanlam",label:"Sanlam"},{value:"HeritageInsurance",label:"Heritage Insurance"},{value:"JubileeInsurance",label:"Jubilee Insurance"},{value:"AAR",label:"AAR"},{value:"NHIF",label:"NHIF"},{value:"MTIBA",label:"Mtiba"},{value:"PACIFIC",label:"Pacific"},{value:"MSO",label:"MSO"},{value:"MUA",label:"MUA"},{value:"KENBRIGHT",label:"Kenbright"},{value:"SEDGWICK",label:"Sedgwick"},{value:"MTIBA",label:"Mtiba"},{value:"Others",label:"Others"}].map((e,a)=>(0,l.jsx)(u.v.Item,{children:a=>{let{active:s}=a;return(0,l.jsx)("button",{onClick:()=>I(e.value),className:"".concat(s?"bg-gray-100":"bg-white  "," mt-2 block w-full border border-gray-200 px-4 py-2 text-left text-sm text-gray-700"),children:e.value})}},a))})})})]})})]})})]}),(0,l.jsxs)("div",{className:"2lg:w-[700px] min-w-11/12 flex w-full flex-col gap-12 self
1-center bg-[#fafafa] pb-10 pt-6 md:min-w-[340px] xl:min-w-[400px]",children:[(0,l.jsxs)("div",{className:"flex shrink-0 flex-col gap-3 md:h-[676px] ",children:[(0,l.jsx)("div",{className:"mb-1 ml-8 mr-12 flex flex-row items-center justify-center",children:(0,l.jsx)("div",{className:"font-primary w-16 shrink-0 text-lg font-semibold",children:"Products"})}),(0,l.jsx)("div",{className:"mb-1 h-px shrink-0 border-x-0 border-b-0 border-t border-solid border-[rgba(224,_224,_224,_0.1)]"}),(0,l.jsx)("div",{className:"h-[240px] overflow-y-auto md:h-[500px]",children:(null===(e=F.products)||void 0===e?void 0:e.length)>0&&F.products.map((e,a)=>(0,l.jsx)(Checkout_Cart,{product:e,index:a},e._id))}),(0,l.jsxs)("div",{className:"mb-px ml-8 flex w-3/5 flex-row items-center gap-2 self-start",children:[(0,l.jsx)("div",{className:"font-secondary w-[180px] whitespace-nowrap text-base ",children:"Do you have a voucher?"}),(0,l.jsx)("div",{className:"font-secondary w-16 shrink-0 text-sm text-[rgba(130,_130,_130,_0.85)]",children:"(Optional)"})]}),(0,l.jsxs)("div",{className:"mb-3 ml-6 mr-8 flex flex-row items-center gap-2",children:[(0,l.jsx)("input",{type:"text",className:"flex h-12 w-1/2 flex-col items-center justify-center rounded border border-solid border-[rgba(130,130,130,0.4)] bg-white text-center",placeholder:"Enter the code"}),(0,l.jsx)("button",{type:"button",className:"flex h-12 w-1/2 flex-col items-center justify-center rounded bg-[#5bdadd]",children:(0,l.jsx)("div",{className:"font-secondary h-[55.56%] w-2/5 text-lg font-semibold text-white",children:"Redeem"})})]}),(0,l.jsxs)("div",{className:"ml-8 mr-10 flex flex-row items-center justify-between",children:[(0,l.jsx)("div",{className:"font-secondary w-16 shrink-0 text-base font-semibold",children:"Subtotal"}),(0,l.jsx)("div",{className:"font-primary w-12 shrink-0 text-right text-base font-semibold",children:(null===(a=F.products)||void 0===a?void 0:a.length)>0&&F.products.reduceRight((e,a)=>e+a.product.price*a.quantity,0)})]}),(0,l.jsxs)("div",{className:"ml-8 mr-10 flex flex-row items-center justify-between",children:[(0,l.jsx)("div",{className:"font-secondary w-24 shrink-0 whitespace-nowrap text-base font-medium text-[rgba(130,_130,_130,_0.85)]",children:"Delivery Fees"}),(0,l.jsx)("div",{className:"font-primary w-12 shrink-0 text-right text-base font-medium text-[rgba(130,_130,_130,_0.85)]",children:"100.00"})]}),(0,l.jsxs)("div",{className:"ml-8 mr-10 flex flex-row items-center justify-between",children:[(0,l.jsx)("div",{className:"font-secondary w-16 shrink-0 text-base font-semibold",children:"Total"}),(0,l.jsx)("div",{className:"font-primary w-12 shrink-0 text-right text-base font-semibold",children:(null===(s=F.products)||void 0===s?void 0:s.length)>0&&F.products.reduce((e,a)=>e+a.product.price*a.quantity,0)+100})]})]}),(0,l.jsx)("button",{onClick:()=>{makeOrder()},type:"button",className:"mx-8 flex h-12 shrink-0 flex-col items-center rounded bg-[#5bdadd] py-2",children:(0,l.jsx)("div",{className:"font-secondary w-32 whitespace-nowrap text-xl font-semibold text-white",children:"online"===R?"Make Payment":"Place Order"})}),P.length>0&&(0,l.jsx)(m.Z,{error:P})]})]})})]})})}}},function(e){e.O(0,[8244,9774,2888,179],function(){return e(e.s=95338)}),_N_E=e.O()}]);

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.