1/*! For license information please see 9115.86a524bb.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[9115],{94(e,t,a){a.r(t),a.d(t,{default:()=>A});var s=a(9379),i=a(5043),r=a(7874),l=a(2626),n=a(5731),o=a(4918),c=a(6174),d=a(1990),m=a(1360),u=a(1419),h=a(3944),x=a(9855),g=a(3046),p=a(2339),v=a(1493),f=a(2603),b=a(416),y=a(2532),j=a(5196),N=a(1842),w=a(579);const _=e=>{var t,a,s;return null!==(t=null!==(a=null!==(s=null===e||void 0===e?void 0:e._id)&&void 0!==s?s:null===e||void 0===e?void 0:e.id)&&void 0!==a?a:null===e||void 0===e?void 0:e.bagcheeId)&&void 0!==t?t:null===e||void 0===e?void 0:e.bagchee_id},A=()=>{const{wishlist:e,toggleWishlist:t,cart:a,addToCart:A,updateQuantity:k}=(0,f._)(),{formatPrice:I}=(0,i.useContext)(b.d),[C,z]=(0,i.useState)(null),M="https://www.bagchee.com/api",{data:T={},isLoading:D}=(0,y.I)({queryKey:["wishlist-details",e.map(_)],queryFn:async()=>{const t={},a=e.map(async e=>{const a=e.bagcheeId||e.bagchee_id||e._id||e.id;if(a)try{var s,i;let n;try{n=await g.A.get("".concat(M,"/product/fetch?bagchee_id=").concat(a))}catch(r){try{n=await g.A.get("".concat(M,"/product/fetch?id=").concat(a))}catch(l){n=await g.A.get("".concat(M,"/product/get/").concat(a))}}if(null!==(s=n)&&void 0!==s&&null!==(i=s.data)&&void 0!==i&&i.status&&n.data.data){const a=Array.isArray(n.data.data)?n.data.data[0]:n.data.data;t[_(e)]=(0,N.RT)(a)}}catch(r){console.error("Error fetching wishlist product ".concat(a,":"),r)}});return await Promise.all(a),t},enabled:e.length>0,staleTime:3e5}),S=async a=>{try{z(a);const s=e.find(e=>_(e)===a);s&&(t(s),p.Ay.success("Removed from wishlist"))}catch(s){console.error("Error removing from wishlist:",s),p.Ay.error("Failed to remove item")}finally{z(null)}},F=e=>{const t="https://www.bagchee.com/api".replace("/api",""),a=e=>"string"===typeof e&&e?e.startsWith("http")?e:"".concat(t).concat(e):"",s=(null===e||void 0===e?void 0:e.defaultImage)||(null===e||void 0===e?void 0:e.default_image);if(s)return a(s);const i=null===e||void 0===e?void 0:e.images;if(Array.isArray(i)&&i.length>0){const e=i[0],t="string"===typeof e?e:(null===e||void 0===e?void 0:e.url)||(null===e||void 0===e?void 0:e.image)||(null===e||void 0===e?void 0:e.src);if(t)return a(t)}return j.gX};return D&&e.length>0?(0,w.jsx)(v.A,{children:(0,w.jsx)("div",{className:"flex items-center justify-center min-h-[400px]",children:(0,w.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-primary"})})}):(0,w.jsx)(v.A,{children:(0,w.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,w.jsxs)("div",{className:"mb-8",children:[(0,w.jsx)("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"My Wishlist"}),(0,w.jsx)("p",{className:"text-gray-600",children:e.length>0?"".concat(e.length," ").concat(1===e.length?"item":"items"," saved"):"No items in your wishlist yet"})]}),0===e.length?(0,w.jsxs)("div",{className:"bg-cream-100 rounded-xl border-2 border-dashed border-gray-200 p-12 text-center",children:[(0,w.jsx)("div",{className:"w-24 h-24 bg-gray-100 rounded-full flex items-center justify-center mx-auto mb-6",children:(0,w.jsx)(o.A,{size:48,className:"text-gray-300"})}),(0,w.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Your wishlist is empty"}),(0,w.jsx)("p",{className:"text-gray-600 mb-6 max-w-md mx-auto",children:"Start adding books you love to your wishlist. They'll be saved here for easy access."}),(0,w.jsxs)(r.N_,{to:"/",className:"inline-flex items-center gap-2 bg-primary text-white px-6 py-3 rounded-lg hover:bg-primary-hover transition-colors font-medium",children:[(0,w.jsx)(d.A,{size:20}),"Browse Books"]})]}):(0,w.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>{const t=_(e),i=T[t]||(0,N.RT)(e),o=i.price||0,d=i.inr_price||0,g=i.real_price&&i.real_price>0?i.real_price:i.price||0,v=I(o,d,g),f=o>0&&i.real_price>0&&i.real_price<o,b=d>0&&f?Math.round(d*o/i.real_price):0,y=f?I(o,b,o):null,z=f?Math.round((o-i.real_price)/o*100):0,M=i.rating||0,D=i.rated_times||0,P=Number(i.availability),R="inactive"===i.stock||Number.isFinite(P)&&P<=0,B=(e=>{var t;const a=Array.isArray(null===e||void 0===e?void 0:e.authors)&&e.authors.length>0?null===(t=e.authors[0])||void 0===t?void 0:t.author:null;if(a)return(a.fullName||"".concat(a.firstName||""," ").concat(a.lastName||"")).trim()||"Unknown Author";const s=null===e||void 0===e?void 0:e.author;return s?"object"===typeof s?(s.fullName||s.name||"".concat(s.first_name||""," ").concat(s.last_name||"")).trim()||"Unknown Author":s:""})(i),O=(E=i.title)?E.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"):"";var E;const W="/books/".concat(i.bagcheeId||i.bagchee_id||i.id||i._id,"/").concat(O),q=a.find(e=>_(e)===t),L=q?q.quantity:0;return(0,w.jsxs)("div",{className:"bg-cream-100 rounded-xl border border-gray-200 hover:shadow-xl transition-all duration-300 p-4 sm:p-5 flex flex-col sm:flex-row gap-5 relative group",children:[(0,w.jsx)(r.N_,{to:W,className:"shrink-0 w-full sm:w-44 bg-cream-100 rounded-lg p-3 border border-gray-100 flex items-center justify-center hover:bg-gray-100 transition-colors",children:(0,w.jsx)("div",{className:"aspect-[3/4] relative w-32 sm:w-full max-w-[130px] mx-auto",children:(0,w.jsx)("img",{src:F(i),alt:i.title,className:"w-full h-full object-contain mix-blend-multiply drop-shadow-sm transition-transform duration-300 group-hover:scale-105",onError:e=>{e.target.src=j.gX}})})}),(0,w.jsxs)("div",{className:"flex-1 flex flex-col",children:[(0,w.jsxs)("div",{className:"flex justify-between items-start gap-4",children:[(0,w.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,w.jsx)(r.N_,{to:W,className:"group/title",children:(0,w.jsx)("h3",{className:"font-bold text-gray-900 text-lg sm:text-xl line-clamp-2 mb-2 group-hover/title:text-primary transition-colors",children:i.title})}),B&&(0,w.jsxs)("p",{className:"text-sm font-medium text-gray-600 mb-3 line-clamp-1",children:["by ",(0,w.jsx)("span",{className:"text-gray-800",children:B})]}),M>0&&(0,w.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,w.jsx)("div",{className:"flex gap-0.5",children:[...Array(5)].map((e,t)=>(0,w.jsx)(h.A,{size:16,className:"".concat(t<Math.floor(M)?"fill-orange-400 text-orange-400":"fill-gray-100 text-gray-200")},t))}),(0,w.jsx)("span",{className:"text-sm font-medium text-gray-700",children:M.toFixed(1)}),(0,w.jsxs)("span",{className:"text-sm text-gray-400",children:["(",D," reviews)"]})]}),(0,w.jsxs)("div",{className:"grid grid-cols-2 gap-3 mt-4 pb-4 border-b border-gray-100",children:[(()=>{const e=(0,N._r)(i);return e?(0,w.jsxs)("div",{className:"flex items-start gap-2",children:[(0,w.jsx)("div",{className:"mt-0.5 text-gray-400 flex-shrink-0",children:(0,w.jsx)(l.A,{size:14})}),(0,w.jsxs)("div",{className:"min-w-0",children:[(0,w.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:"Format"}),(0,w.jsx)("p",{className:"text-sm text-gray-800 font-medium truncate",children:e})]})]}):null})(),i.language&&(0,w.jsxs)("div",{className:"flex items-start gap-2",children:[(0,w.jsx)("div",{className:"mt-0.5 text-gray-400 flex-shrink-0",children:(0,w.jsx)(n.A,{size:14})}),(0,w.jsxs)("div",{className:"min-w-0",children:[(0,w.jsx)("p",{className:"text-xs text-gray-500 font-medium",children:"Language"}),(0,w.jsx)("p",{className:"text-sm text-gray-800 font-medium truncate",children:i.language})]})]})]})]}),(0,w.jsx)("button",{onClick:()=>S(t),disabled:C===t,className:"hidden sm:flex items-center justify-center w-10 h-10 text-gray-400 hover:text-red-500 hover:bg-red-50 rounded-full transition-all flex-shrink-0",title:"Remove from wishlist",children:C===t?(0,w.jsx)("div",{className:"w-5 h-5 border-2 border-red-600 border-t-transparent roun
2ded-full animate-spin"}):(0,w.jsx)(x.A,{size:20})})]}),(0,w.jsxs)("div",{className:"mt-auto pt-4 border-t border-gray-100 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[(0,w.jsxs)("div",{className:"w-full sm:w-auto flex flex-col gap-2",children:[(0,w.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2.5",children:[(0,w.jsx)("span",{className:"text-2xl font-bold text-gray-900",children:v}),f&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("span",{className:"text-base text-gray-400 line-through font-medium",children:y}),z>0&&(0,w.jsxs)("span",{className:"text-xs font-bold text-green-700 bg-green-50 px-2 py-0.5 rounded border border-green-100 w-fit",children:[z,"% OFF"]})]})]}),R?(0,w.jsxs)("span",{className:"text-xs font-medium text-red-600 flex items-center gap-1",children:[(0,w.jsx)("span",{className:"w-1.5 h-1.5 bg-red-600 rounded-full"}),"Out of Stock"]}):(0,w.jsxs)("span",{className:"text-xs font-medium text-green-700 flex items-center gap-1",children:[(0,w.jsx)("span",{className:"w-1.5 h-1.5 bg-green-600 rounded-full"}),"In Stock"]})]}),(0,w.jsxs)("div",{className:"w-full sm:w-auto flex items-center gap-3",children:[(0,w.jsx)("div",{className:"sm:w-48 w-full",children:L>0?(0,w.jsxs)("div",{className:"flex items-center bg-primary text-white rounded-md overflow-hidden shadow-sm w-full justify-center",children:[(0,w.jsx)("button",{onClick:()=>k(t,"dec"),className:"px-3 py-2 hover:bg-primary-dark transition-colors flex items-center justify-center",children:(0,w.jsx)(c.A,{size:16})}),(0,w.jsx)("span",{className:"px-2 font-bold min-w-[20px] text-center text-sm",children:L}),(0,w.jsx)("button",{onClick:()=>k(t,"inc"),disabled:Number.isFinite(P)&&L>=P,className:"px-3 py-2 hover:bg-primary-dark transition-colors flex items-center justify-center disabled:opacity-50",children:(0,w.jsx)(m.A,{size:16})})]}):(0,w.jsxs)("button",{onClick:()=>{R?p.Ay.error("Product is out of stock"):(A((0,s.A)((0,s.A)({},i),{},{bagcheeId:i.bagcheeId||i.bagchee_id||i._id,slug:O})),p.Ay.success("Added to Cart"))},disabled:R,className:"flex items-center gap-2 bg-primary text-white px-4 py-2 rounded-md hover:bg-primary-dark transition-colors disabled:bg-gray-300 w-full justify-center",children:[(0,w.jsx)(u.A,{size:18}),(0,w.jsx)("span",{children:R?"Out of Stock":"Add to Cart"})]})}),(0,w.jsx)("button",{onClick:()=>S(t),disabled:C===t,className:"sm:hidden flex items-center justify-center w-12 h-12 border border-gray-200 text-gray-500 rounded-lg transition-colors",children:C===t?(0,w.jsx)("div",{className:"w-5 h-5 border-2 border-red-600 border-t-transparent rounded-full animate-spin"}):(0,w.jsx)(x.A,{size:20})})]})]})]})]},t)})})]})})}},1360(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},1493(e,t,a){a.d(t,{A:()=>j});var s=a(5043),i=a(7874),r=a(3658),l=a(1990),n=a(4918),o=a(8006),c=a(4459),d=a(3946),m=a(614),u=a(9493),h=a(2983),x=a(8326),g=a(9463),p=a(2339),v=a(3716),f=a(579);const b=e=>{let{className:t=""}=e;return(0,f.jsxs)(i.N_,{to:"/",className:"flex items-center group gap-2 ".concat(t),children:[(0,f.jsxs)("div",{className:"relative",children:[(0,f.jsx)("div",{className:"absolute inset-0 bg-primary rounded-lg opacity-90"}),(0,f.jsx)("img",{src:v,alt:"Bagchee Icon",className:"relative h-10 md:h-12 w-auto object-contain p-1",fetchPriority:"high",decoding:"async"})]}),(0,f.jsxs)("div",{className:"flex flex-col leading-none",children:[(0,f.jsx)("span",{className:"text-xl md:text-2xl tracking-[0.2em] text-black uppercase font-bold",children:"Bagchee"}),(0,f.jsx)("div",{className:"h-[1px] bg-white/80 my-0.5 w-full"})," ",(0,f.jsx)("span",{className:"text-[8px] md:text-[10px] tracking-[0.4em] text-black/80 uppercase font-medium",children:"Books That Stick"})]})]})},y=(0,s.memo)(b),j=e=>{let{children:t}=e;const a=(0,i.Zp)(),v=(0,i.zy)(),[b,j]=(0,s.useState)(!1),[N,w]=(0,s.useState)(!1),[_,A]=(0,s.useState)(null);(0,s.useEffect)(()=>{const e=localStorage.getItem("auth");if(!e)return void a("/login");const t=JSON.parse(e);A(t.userDetails)},[a]),(0,s.useEffect)(()=>{w(!1)},[v.pathname]);const k=()=>{localStorage.removeItem("auth"),p.Ay.success("Logged out successfully"),a("/login")},I=[{icon:r.A,label:"Dashboard",hint:"Overview",path:"/account"},{icon:l.A,label:"Orders",hint:"Track purchases",path:"/account/orders"},{icon:n.A,label:"Wishlist",hint:"Saved books",path:"/account/wishlist"},{icon:o.A,label:"Addresses",hint:"Shipping details",path:"/account/address"},{icon:c.A,label:"Profile",hint:"Personal info",path:"/account/profile"},{icon:d.A,label:"Gift Cards",hint:"Redeem & balance",path:"/account/gift-cards"}];if(!_)return(0,f.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-cream",children:(0,f.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-primary"})});const C=e=>{var t,a;let{isMobile:s=!1}=e;return(0,f.jsxs)("div",{className:"flex flex-col h-full bg-cream-100/95 backdrop-blur-sm",children:[(0,f.jsxs)("div",{className:"p-6 border-b border-gray-200 bg-gradient-to-r from-cream-100/60 to-cream-100/30",children:[s&&(0,f.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,f.jsx)(i.N_,{to:"/",className:"flex items-center",children:(0,f.jsx)(y,{className:"h-8 w-auto"})}),(0,f.jsx)("button",{onClick:()=>w(!1),className:"lg:hidden p-2 hover:bg-cream-100 rounded-lg transition-colors",children:(0,f.jsx)(m.A,{size:20})})]}),!b&&(0,f.jsx)("div",{className:"space-y-4",children:(0,f.jsxs)("div",{className:"flex items-center gap-3",children:[(0,f.jsx)("div",{className:"w-12 h-12 bg-primary/15 rounded-full flex items-center justify-center text-primary font-bold shadow-sm",children:null===(t=_.name)||void 0===t?void 0:t.charAt(0).toUpperCase()}),(0,f.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,f.jsx)("p",{className:"text-sm font-semibold text-text-main truncate",children:_.name}),(0,f.jsx)("p",{className:"text-xs text-text-muted truncate",children:_.email})]})]})}),b&&(0,f.jsx)("div",{className:"w-10 h-10 bg-primary/15 rounded-full flex items-center justify-center text-primary font-bold mx-auto
2shadow-sm",children:null===(a=_.name)||void 0===a?void 0:a.charAt(0).toUpperCase()})]}),(0,f.jsx)("nav",{className:"flex-1 p-4 space-y-1.5 overflow-y-auto",children:I.map(e=>{const t=e.icon,a=v.pathname===e.path;return(0,f.jsxs)(i.N_,{to:e.path,className:"flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 ".concat(a?"bg-primary text-white shadow-md":"text-text-main hover:bg-cream-50 hover:text-primary"),children:[(0,f.jsx)(t,{size:20,className:a?"text-white":"text-text-muted"}),!b&&(0,f.jsxs)("div",{className:"min-w-0",children:[(0,f.jsx)("p",{className:"font-medium leading-tight",children:e.label}),(0,f.jsx)("p",{className:"text-[11px] leading-tight truncate ".concat(a?"text-white/85":"text-text-muted"),children:e.hint})]})]},e.path)})}),(0,f.jsxs)("div",{className:"p-4 border-t border-gray-200 space-y-2 bg-cream-50/30",children:[(0,f.jsxs)(i.N_,{to:"/",className:"flex items-center gap-3 px-4 py-3 w-full rounded-lg text-text-main hover:bg-cream-100 hover:text-primary transition-all duration-200",children:[(0,f.jsx)(r.A,{size:20}),!b&&(0,f.jsx)("span",{className:"font-medium",children:"Back to Website"})]}),(0,f.jsxs)("button",{onClick:k,className:"flex items-center gap-3 px-4 py-3 w-full rounded-lg text-red-600 hover:bg-red-50 transition-all duration-200",children:[(0,f.jsx)(u.A,{size:20}),!b&&(0,f.jsx)("span",{className:"font-medium",children:"Logout"})]})]})]})};return(0,f.jsxs)("div",{className:"min-h-screen bg-cream",children:[(0,f.jsx)("header",{className:"fixed top-0 left-0 right-0 bg-cream-100 border-b border-gray-200 z-40",children:(0,f.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,f.jsx)("div",{className:"lg:hidden",children:(0,f.jsx)("button",{onClick:()=>w(!0),className:"p-2 hover:bg-cream-100 rounded-lg",children:(0,f.jsx)(h.A,{size:24})})}),(0,f.jsx)("div",{className:"hidden lg:block w-10"}),(0,f.jsx)(i.N_,{to:"/",className:"flex items-center",children:(0,f.jsx)(y,{className:"h-8 w-auto"})}),(0,f.jsx)("div",{className:"w-10"})]})}),N&&(0,f.jsx)("div",{className:"fixed inset-0 bg-black/50 z-50 lg:hidden",onClick:()=>w(!1)}),(0,f.jsx)("aside",{className:"fixed top-0 left-0 bottom-0 w-72 bg-cream-100 z-50 transform transition-transform duration-300 lg:hidden ".concat(N?"translate-x-0":"-translate-x-full"),children:(0,f.jsx)(C,{isMobile:!0})}),(0,f.jsxs)("aside",{className:"hidden lg:block fixed top-[61px] left-0 bottom-0 bg-cream-100 border-r border-gray-200 transition-all duration-300 z-30 ".concat(b?"w-20":"w-64"),children:[(0,f.jsx)(C,{}),(0,f.jsx)("button",{onClick:()=>j(!b),className:"absolute -right-3 top-4 w-6 h-6 bg-white border border-gray-200 rounded-full flex items-center justify-center hover:bg-gray-50 shadow-sm",children:b?(0,f.jsx)(x.A,{size:14}):(0,f.jsx)(g.A,{size:14})})]}),(0,f.jsx)("main",{className:"transition-all duration-300 pt-[61px] min-h-screen ".concat(b?"lg:ml-20":"lg:ml-64"),children:(0,f.jsx)("div",{className:"max-w-7xl mx-auto p-4 lg:p-8",children:t})})]})}},1842(e,t,a){a.d(t,{RT:()=>i,_r:()=>n,a:()=>r});var s=a(9379);const i=e=>{var t,a,i,r,l,n,o,c,d,m,u,h,x,g,p,v,f,b,y,j,N,w,_,A,k,I,C,z,M,T,D,S,F,P,R,B,O,E,W,q,L,V,H,K,U,X,G,J,Q,Y,Z,$,ee,te;if(!e||"object"!==typeof e)return e;let ae=e.author||null;if(!ae&&Array.isArray(e.authors)&&e.authors.length>0){var se;const t=null===(se=e.authors[0])||void 0===se?void 0:se.author;if(t){const e=(t.fullName||"").split(" ");ae={name:t.fullName||"",first_name:t.firstName||e[0]||"",last_name:t.lastName||e.slice(1).join(" ")||"",fullName:t.fullName||"",_id:t.id,id:t.id}}}return(0,s.A)((0,s.A)({},e),{},{bagcheeId:e.bagcheeId||e.bagchee_id,bagchee_id:e.bagcheeId||e.bagchee_id,_id:e._id||e.id,id:e.id||e._id,realPrice:null!==(t=null!==(a=e.realPrice)&&void 0!==a?a:e.real_price)&&void 0!==t?t:0,real_price:null!==(i=null!==(r=e.realPrice)&&void 0!==r?r:e.real_price)&&void 0!==i?i:0,inrPrice:null!==(l=null!==(n=e.inrPrice)&&void 0!==n?n:e.inr_price)&&void 0!==l?l:0,inr_price:null!==(o=null!==(c=e.inrPrice)&&void 0!==c?c:e.inr_price)&&void 0!==o?o:0,defaultImage:e.defaultImage||e.default_image||"",default_image:e.defaultImage||e.default_image||"",tocImage:e.tocImage||e.toc_image||"",toc_image:e.tocImage||e.toc_image||"",tocImages:e.tocImages||e.toc_images||[],toc_images:e.tocImages||e.toc_images||[],pubDate:e.pubDate||e.pub_date||"",pub_date:e.pubDate||e.pub_date||"",soldCount:null!==(d=null!==(m=e.soldCount)&&void 0!==m?m:e.sold_count)&&void 0!==d?d:0,sold_count:null!==(u=null!==(h=e.soldCount)&&void 0!==h?h:e.sold_count)&&void 0!==u?u:0,ratedTimes:null!==(x=null!==(g=e.ratedTimes)&&void 0!==g?g:e.rated_times)&&void 0!==x?x:0,rated_times:null!==(p=null!==(v=e.ratedTimes)&&void 0!==v?v:e.rated_times)&&void 0!==p?p:0,rating:null!==(f=e.rating)&&void 0!==f?f:0,weight:e.weight||"",pages:null!==(b=null!==(y=e.pages)&&void 0!==y?y:e.total_pages)&&void 0!==b?b:null,total_pages:null!==(j=null!==(N=e.pages)&&void 0!==N?N:e.total_pages)&&void 0!==j?j:null,pagesDesc:e.pagesDesc||e.pages_desc||"",pages_desc:e.pagesDesc||e.pages_desc||"",shipDays:null!==(w=null!==(_=e.shipDays)&&void 0!==_?_:e.ship_days)&&void 0!==w?w:null,
2ship_days:null!==(A=null!==(k=e.shipDays)&&void 0!==k?k:e.ship_days)&&void 0!==A?A:null,deliverDays:null!==(I=null!==(C=e.deliverDays)&&void 0!==C?C:e.deliver_days)&&void 0!==I?I:null,deliver_days:null!==(z=null!==(M=e.deliverDays)&&void 0!==M?M:e.deliver_days)&&void 0!==z?z:null,metaTitle:e.metaTitle||e.meta_title||"",meta_title:e.metaTitle||e.meta_title||"",metaDescription:e.metaDescription||e.meta_description||"",meta_description:e.metaDescription||e.meta_description||"",metaKeywords:e.metaKeywords||e.meta_keywords||"",meta_keywords:e.metaKeywords||e.meta_keywords||"",aboutAuthorText:e.aboutAuthorText||e.about_author_text||"",about_author_text:e.aboutAuthorText||e.about_author_text||"",tableOfContents:e.tableOfContents||e.table_of_contents||"",table_of_contents:e.tableOfContents||e.table_of_contents||"",criticsNote:e.criticsNote||e.critics_note||"",critics_note:e.criticsNote||e.critics_note||"",isActive:null===(T=null!==(D=e.isActive)&&void 0!==D?D:e.active)||void 0===T||T,active:null===(S=null!==(F=e.isActive)&&void 0!==F?F:e.active)||void 0===S||S,isNewRelease:null!==(P=null!==(R=e.isNewRelease)&&void 0!==R?R:e.new_release)&&void 0!==P&&P,new_release:null!==(B=null!==(O=e.isNewRelease)&&void 0!==O?O:e.new_release)&&void 0!==B&&B,isRecommended:null!==(E=null!==(W=e.isRecommended)&&void 0!==W?W:e.recommended)&&void 0!==E&&E,recommended:null!==(q=null!==(L=e.isRecommended)&&void 0!==L?L:e.recommended)&&void 0!==q&&q,isExclusive:!!(e.isExclusive||e.exclusive||e.exclusiveFor&&"all"!==e.exclusiveFor),exclusive:!!(e.isExclusive||e.exclusive||e.exclusiveFor&&"all"!==e.exclusiveFor),exclusiveFor:e.exclusiveFor||e.exclusive_for||null,exclusive_for:e.exclusiveFor||e.exclusive_for||null,publisherId:null!==(V=null!==(H=e.publisherId)&&void 0!==H?H:e.publisher_id)&&void 0!==V?V:null,publisher_id:null!==(K=null!==(U=e.publisherId)&&void 0!==U?U:e.publisher_id)&&void 0!==K?K:null,seriesId:null!==(X=null!==(G=e.seriesId)&&void 0!==G?G:e.series_id)&&void 0!==X?X:null,series_id:null!==(J=null!==(Q=e.seriesId)&&void 0!==Q?Q:e.series_id)&&void 0!==J?J:null,discountInr:null!==(Y=null!==(Z=e.discountInr)&&void 0!==Z?Z:e.discount_inr)&&void 0!==Y?Y:0,discount_inr:null!==($=null!==(ee=e.discountInr)&&void 0!==ee?ee:e.discount_inr)&&void 0!==$?$:0,categoryId:e.leadingCategoryId||(Array.isArray(e.categories)&&e.categories.length>0?e.categories[0].categoryId||(null===(te=e.categories[0].category)||void 0===te?void 0:te.id):void 0),leadingCategoryId:e.leadingCategoryId,productCategories:Array.isArray(e.categories)?e.categories.map(e=>{const t=e.category||{};return{id:t.id,_id:t.id,title:t.title||"",name:t.title||"",categorytitle:t.title||"",slug:t.slug||""}}).filter(e=>e.title):e.productCategories||[],product_categories:Array.isArray(e.categories)?e.categories.map(e=>{const t=e.category||{};return{id:t.id,_id:t.id,title:t.title||"",name:t.title||"",categorytitle:t.title||"",slug:t.slug||""}}).filter(e=>e.title):e.product_categories||[],productTags:Array.isArray(e.tags)?e.tags.map(e=>{var t;return(null===(t=e.tag)||void 0===t?void 0:t.title)||e.title||e}).filter(Boolean):e.productTags||[],product_tags:Array.isArray(e.tags)?e.tags.map(e=>{var t;return(null===(t=e.tag)||void 0===t?void 0:t.title)||e.title||e}).filter(Boolean):e.product_tags||[],author:ae,series_number:e.series_number||e.seriesNumber||"",seriesNumber:e.seriesNumber||e.series_number||""})},r=e=>Array.isArray(e)?e.map(i):[],l=e=>{const t=(e||"").toString().trim();if(!t)return"";const a=t.toLowerCase();return a.includes("soft")||a.includes("paper")?"Paperback":a.includes("hard")?"Hardcover":t},n=e=>{if(!e||"object"!==typeof e)return"";const t=e.formats||e.product_formats;if(Array.isArray(t)&&t.length){const e=t.map(e=>{var t;return e&&"object"===typeof e?(null===(t=e.format)||void 0===t?void 0:t.title)||e.title||e.name:e}).map(l).filter(Boolean),a=[...new Set(e)];if(a.length)return a.join(", ")}return l(e.binding||"")}},1990(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},2626(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},3658(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]])},3946(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]])},5196(e,t,a){a.d(t,{gX:()=>i,ag:()=>r});const s=a.p+"static/media/no-image.f3304f94cebd58816f43.jpg",i=s,r=function(e){let{width:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||"object"!==typeof e)return"";const a=function(e){let{width:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&"object"===typeof e&&(e=e.defaultImage||e.image||e.picture||""),!e||"string"!==typeof e)return"";if(e.startsWith("http"))return e.includes("res.cloudinary.com")&&e.includes("/upload/")?((e,t)=>
2{const a=t?"f_auto,q_auto,w_".concat(t):"f_auto,q_auto";return e.replace("/upload/","/upload/".concat(a,"/"))})(e,t):e;const a=e.replace(/^\//,"");return a.startsWith("uploads/")?"".concat("https://www.bagchee.com/api","/").concat(a):/^[a-f0-9]+-/i.test(a)?"".concat("https://www.bagchee.com/assets/images/sliders","/").concat(a):""}(e,{width:t});if(a)return a;const s=e.isbn13||e.isbn10;return s?"https://books.google.com/books/content?vid=ISBN".concat(s,"&printsec=frontcover&img=1&zoom=1"):""}},6174(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},9855(e,t,a){a.d(t,{A:()=>s});const s=(0,a(7784).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])}}]); 3//# sourceMappingURL=9115.86a524bb.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.