PageSourceSearch

https://geetapress.org/_next/static/chunks/07rso4630a4n8.js

js geetapress.org collected 2026-10-09 05:11:36 UTC 64,686 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,563548,e=>{"use strict";var t=e.i(9884),i=e.i(722511),l=e.i(126489);let s={binding:e=>1===e?"Hardbound":2===e?"Paperback":String(e),edition:e=>t.PRODUCT_EDITIONS?.en?.[e]??String(e)};function n(e){return Array.isArray(e)?e:[]}function r(e,t){return t?String(e.id)===String(t):!0===e.isCurrent}function a(e,t){return(Number(e.position)||0)-(Number(t.position)||0)}function o(e){return e?e.id&&String(e.id)||e.slug&&String(e.slug)||(0,i.displayLabel)(e.title).toLowerCase():""}function d(e,t,s){return{id:String(e.id),code:String(e.code??""),label:(0,i.displayLabel)(e.label)||`Vol ${t+1}`,href:(0,l.getProductDetailHref)(e),isCurrent:r(e,s)}}function c(e,t){let i=[...n(e)].sort(a),l=i.find(e=>r(e,t));if(!l)return{current:null,rows:[]};let s=o(l.language),d=s?i.filter(e=>o(e.language)===s):[l];return{current:l,rows:d}}let u=[{attribute:"bookSize",label:"SF.PDP.ATTR_SIZE"},{attribute:"bindings",label:"SF.PDP.ATTR_BINDING"},{attribute:"edition",label:"SF.PDP.ATTR_EDITION"}];function m(e,t){let l=e[t];if(null==l)return null;if("bookSize"===t)return(0,i.displayLabel)(l)||null;let s=Number(l);return Number.isFinite(s)?String(s):null}e.s(["BINDING_HARDBOUND",0,1,"BINDING_PAPERBACK",0,2,"countEditions",0,function(e){let t=n(e),i=new Set;for(let e of t){let t=o(e.language);t&&i.add(t)}return{editions:t.length,languages:i.size}},"deriveAttributeRows",0,function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s,{current:r,rows:a}=c(e,t);if(!r||a.length<2)return[];let o=[];for(let{attribute:e,label:t}of u){let s=new Map;for(let t of a){let i=m(t,e);if(null==i)continue;let l=s.get(i);l?l.push(t):s.set(i,[t])}if(s.size<2)continue;let d=m(r,e),c=(0,i.displayLabel)(r.label),u=[];for(let[t,r]of s){let s=r.find(e=>(0,i.displayLabel)(e.label)===c)??r[0];u.push({...function(e,t,i){if("bookSize"===e){let e;return{label:((e=t.indexOf("("))>0?t.slice(0,e):t).trim()||t,title:t}}let l="bindings"===e?i.binding(Number(t)):i.edition(Number(t));return{label:l,title:l}}(e,t,n),href:(0,l.getProductDetailHref)(s),isCurrent:t===d})}o.push({attribute:e,label:t,options:u})}return o},"deriveLanguageOptions",0,function(e,t){let l=[...n(e)].sort(a),s=new Map;for(let e of l){let t=o(e.language);if(!t)continue;let i=s.get(t);i?i.push(e):s.set(t,[e])}let r=[];for(let[e,l]of s){let s=l.map((e,i)=>d(e,i,t));r.push({key:e,label:(0,i.displayLabel)(l[0].language?.title),href:s[0].href,isCurrent:s.some(e=>e.isCurrent),volumeCount:l.length,volumes:s})}return[...r.filter(e=>e.isCurrent),...r.filter(e=>!e.isCurrent)]},"deriveSetSummary",0,function(e,t){let i=Array.isArray(e?.sets)?e.sets:[],l=i.find(e=>e?.setProduct&&String(e.setProduct.id)!==String(t));if(l)return{kind:"member",set:l};let s=i.find(e=>!e?.setProduct&&Array.isArray(e?.members)&&e.members.length>=2);if(s)return{kind:"volumes",members:[...s.members].sort(a)};let n=e?.contents;return Array.isArray(n)&&n.length>0?{kind:"contents",members:[...n].sort(a)}:null},"deriveVolumes",0,function(e,t){let{rows:i}=c(e,t);return i.length<2?[]:i.map((e,i)=>d(e,i,t))},"editionSiblings",0,function(e){let t=n(e?.relations?.editions);return t.length>=2?t:[]},"hasRelations",0,function(e){let t=e?.relations;return!!t&&!!(n(t.editions).length>=2||Array.isArray(t.sets)&&t.sets.length>0||Array.isArray(t.contents)&&t.contents.length>0)},"pageCountText",0,function(e){let t=Number(e);return Number.isFinite(t)&&t>0?String(Math.floor(t)):""}])},890064,e=>{"use strict";var t=e.i(552795),i=e.i(454681),l=e.i(232906),s=e.i(508520),n=e.i(647163),r=e.i(291303),a=e.i(468714);let o="inline-flex items-center justify-center rounded-lg border px-4 py-1.5 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gold focus-visible:ring-offset-2",d="border-maroon bg-maroon text-white",c="border-gold-tan/50 bg-white text-ink hover:border-gold hover:bg-surface-cream";e.s(["LinkedOptionRow",0,function(e){let{options:u,selectLabel:m,hint:h,className:f}
1=e,g=(0,i.useRouter)(),x=(0,r.useCurrentLocale)(),p=u.find(e=>e.isCurrent);return(0,t.jsxs)("div",{className:(0,n.cn)("min-w-0",f),children:[(0,t.jsx)("div",{className:"hidden flex-wrap gap-2 sm:flex",children:u.map(e=>(0,t.jsxs)(s.default,{href:e.href,title:e.title,"aria-current":e.isCurrent?"page":void 0,className:(0,n.cn)(o,e.isCurrent?d:c),children:[e.label,e.sub?(0,t.jsx)("span",{className:"ml-1.5 text-[11px] font-normal opacity-75",children:e.sub}):null]},e.key))}),(0,t.jsxs)("div",{className:"sm:hidden",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("select",{"aria-label":m,value:p?.key??"",onChange:e=>{let t=u.find(t=>t.key===e.target.value);t&&!t.isCurrent&&g.push((0,a.localizeHref)(t.href,x))},className:"h-12 w-full appearance-none rounded-xl border-[1.5px] border-gold-tan/50 bg-white pl-3.5 pr-10 text-[15px] font-semibold text-ink focus-visible:border-gold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gold/30",children:[p?null:(0,t.jsx)("option",{value:"",disabled:!0,children:m}),u.map(e=>(0,t.jsx)("option",{value:e.key,children:e.selectText??e.label},e.key))]}),(0,t.jsx)(l.ChevronDown,{"aria-hidden":!0,className:"pointer-events-none absolute right-3.5 top-1/2 size-4 -translate-y-1/2 text-maroon"})]}),h?(0,t.jsx)("p",{className:"mt-1.5 text-xs text-ink-muted",children:h}):null]})]})},"PILL_ACTIVE",0,d,"PILL_BASE",0,o,"PILL_IDLE",0,c])},678278,e=>{"use strict";var t=e.i(552795),i=e.i(191614),l=e.i(9884),s=e.i(291303),n=e.i(563548),r=e.i(890064);function a(e){let{editions:a,currentId:o="",className:d}=e,c=(0,s.useI18n)(),u=(0,s.useCurrentLocale)(),m=i.useMemo(()=>{let e=Array.isArray(a)&&a.length>=2?a:[];return e.length?(0,n.deriveAttributeRows)(e,o,{binding:e=>e===n.BINDING_HARDBOUND?c("SF.PDP.BINDING_HARDBOUND"):e===n.BINDING_PAPERBACK?c("SF.PDP.BINDING_PAPERBACK"):String(e),edition:e=>l.PRODUCT_EDITIONS?.[u]?.[e]??l.PRODUCT_EDITIONS?.en?.[e]??String(e)}):[]},[a,o,u,c]);return m.length?(0,t.jsxs)("div",{className:d,children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-semibold text-ink",children:c("SF.PDP.ALSO_AVAILABLE")}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-y-2.5 sm:grid-cols-[72px_minmax(0,1fr)] sm:items-center sm:gap-x-2",children:m.map(e=>{let l=c(e.label);return(0,t.jsxs)(i.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-ink-muted",children:l}),(0,t.jsx)(r.LinkedOptionRow,{selectLabel:l,options:e.options.map(t=>({key:`${e.attribute}:${t.title}`,label:t.label,title:t.title!==t.label?t.title:void 0,selectText:t.isCurrent?`${t.title} \xb7 ${c("SF.PDP.THIS_EDITION")}`:t.title,href:t.href,isCurrent:t.isCurrent}))})]},e.attribute)})})]}):null}e.s(["ProductAlsoAvailable",0,a,"default",0,a])},408335,e=>{"use strict";var t=e.i(191614),i=t,l=e.i(734947);let s=(e,t)=>!("u"<typeof Element)&&t instanceof Element&&t.tagName.toUpperCase()===e,n=e=>s("DIV",e)||s("SPAN",e),r=e=>e.complete&&0!==e.naturalHeight,a=/url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/,o=e=>{if(null!==e){if(s("IMG",e))return""===e.currentSrc?void 0:e.currentSrc;else if(n(e)){let{backgroundImage:t}=window.getComputedStyle(e);if(""!==t)return a.exec(t)?.[1]}}},d=e=>{if(null==e)return{};if(!s("SVG",e))return{height:e.offsetHeight,left:e.offsetLeft,width:e.offsetWidth,top:e.offsetTop};{let{parentElement:t}=e,i=e.getBoundingClientRect();if(null==t)return{height:i.height,left:i.left,width:i.width,top:i.top};{let e=t.getBoundingClientRect();return{height:i.height,left:e.left-i.left,top:e.top-i.top,width:i.width}}}},c=e=>{let{height:t,offset:i,width:l}=e;return Math.min((window.innerWidth-2*i)/l,(window.innerHeight-2*i)/t)},u=e=>{let{containerHeight:t,containerWidth:i,hasScalableSrc:l,offset:s,targetHeight:n,targetWidth:r}=e;return 0===t||0===i?1:l||0===n||0===r?c({height:t,offset:s,width:i}):(e=>{let{containerHeight:t,containerWidth:i,offset:l,targetHeight:s,targetWidth:n}=e,r=c({height:s,offset:l,width:n}),a=n>s?n/i:s/t;return r>1?a:r*a})({containerHeight:t,containerWidth:i,offset:s,targetHeight:n,targetWidth:r})},m=(e,t)=>{let i=parseFloat(e);return e.endsWith("%")?t*i/100:i},h=e=>{let{containerHeight:t,containerLeft:i,containerTop:l,containerWidth:s,hasScalableSrc:n,offset:r,position:a,targetHeight:o,targetWidth:d,visibleHeight:c,visibleWidth:h}=e,[f="50%",g="50%"]=a.split(" "),x=m(f,s-h),p=m(g,t-c),b=u({containerHeight:c,containerWidth:h,hasScalableSrc:n,offset:r,targetHeight:o,targetWidth:d});return{top:l+p,left:i+x,width:h*b,height:c*b,initialTransform:`translate(0,0) scale(${1/b})`}},f=e=>
1{let{fallback:t,natural:i}=e;return void 0!==i&&0!==i?i:t},g=/\.svg$/i,x=["img","svg",'[role="img"]',"[data-zoom]"].map(e=>`${e}:not([aria-hidden="true"])`).join(","),p={overflow:"",position:"",top:"",width:""};function b(e){e.preventDefault()}function v(e){return i.default.createElement(S,{...e})}class S extends i.default.Component{constructor(){super(...arguments),this.state={id:"",isZoomImgLoaded:!1,loadedImgEl:void 0,modalState:"UNLOADED",shouldRefresh:!1,styleGhost:{}},this.refContent=i.default.createRef(),this.refDialog=i.default.createRef(),this.refModalContent=i.default.createRef(),this.refModalImg=i.default.createRef(),this.refWrap=i.default.createRef(),this.imgEl=null,this.isScaling=!1,this.prevBodyAttrs=p,this.prevScrollY=0,this.styleModalImg={},this.handleModalStateChange=e=>{let{state:{modalState:t}}=this;"LOADING"!==e&&"LOADING"===t?(this.isScaling=!1,this.loadZoomImg(),window.addEventListener("resize",this.handleResize,{passive:!0}),window.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),window.addEventListener("touchmove",this.handleTouchMove,{passive:!0}),window.addEventListener("touchend",this.handleTouchEnd,{passive:!0}),window.addEventListener("touchcancel",this.handleTouchCancel,{passive:!0}),document.addEventListener("keydown",this.handleKeyDown,!0)):"LOADED"!==e&&"LOADED"===t?window.addEventListener("wheel",this.handleWheel,{passive:!0}):"UNLOADING"!==e&&"UNLOADING"===t?(this.ensureImgTransitionEnd(),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("touchcancel",this.handleTouchCancel),document.removeEventListener("keydown",this.handleKeyDown,!0)):"UNLOADED"!==e&&"UNLOADED"===t&&(this.bodyScrollEnable(),window.removeEventListener("resize",this.handleResize),this.refDialog.current?.close())},this.setId=()=>{let e=()=>Math.random().toString(16).slice(-4);this.setState({id:e()+e()+e()})},this.setAndTrackImg=()=>{let{refContent:{current:e}}=this;null!=e&&(this.imgEl=e.querySelector(x),null!==this.imgEl?(this.contentNotFoundChangeObserver?.disconnect(),this.imgEl.addEventListener("load",this.handleImgLoad),this.imgEl.addEventListener("click",this.handleZoom),null==this.state.loadedImgEl&&this.handleImgLoad(),this.imgElResizeObserver=new ResizeObserver(e=>{let[t]=e;t?.target!==void 0&&(this.imgEl=t.target,this.setState({styleGhost:d(this.imgEl)}))}),this.imgElResizeObserver.observe(this.imgEl),null==this.contentChangeObserver&&(this.contentChangeObserver=new MutationObserver(()=>{this.setState({styleGhost:d(this.imgEl)})}),this.contentChangeObserver.observe(e,{attributes:!0,childList:!0,subtree:!0}))):null==this.contentNotFoundChangeObserver&&(this.contentNotFoundChangeObserver=new MutationObserver(this.setAndTrackImg),this.contentNotFoundChangeObserver.observe(e,{childList:!0,subtree:!0})))},this.handleIfZoomChanged=e=>{let{props:{isZoomed:t}}=this;!e&&t?this.zoom():e&&!t&&this.unzoom()},this.handleImgLoad=()=>{let e=o(this.imgEl);if(null==e||""===e)return;let t=new Image,{imgEl:i}=this;if(s("IMG",i)){let{sizes:e,srcset:l,crossOrigin:s}=i;t.sizes=e,t.srcset=l,t.crossOrigin=s}t.src=e;let l=()=>{this.setState({loadedImgEl:t,styleGhost:d(this.imgEl)})};t.decode().then(l).catch(()=>{r(t)?l():t.onload=l})},this.handleZoom=e=>{!0!==this.props.isDisabled&&this.hasImage()&&this.props.onZoomChange?.(!0,{event:e})},this.handleUnzoom=e=>{!0!==this.props.isDisabled&&this.props.onZoomChange?.(!1,{event:e})},this.handleBtnUnzoomClick=e=>{e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e)},this.handleDialogClick=e=>{(e.target===this.refModalContent.current||e.target===this.refModalImg.current)&&(e.stopPropagation(),this.handleUnzoom(e))},this.handleDialogClose=e=>{e.stopPropagation(),this.handleUnzoom(e)},this.handleKeyDown=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.handleUnzoom(e))},this.handleWheel=e=>{e.ctrlKey||this.isScaling||(window.visualViewport?.scale??1)>1||(e.stopPropagation(),queueMicrotask(()=>{this.handleUnzoom(e)}))},this.handleTouchStart=e=>{if(e.touches.length>1){this.isScaling=!0;return}let{changedTouches:t}=e,[i]=t;if(1===t.length&&void 0!==i){let{screenY:e}=i;this.touchYStart=e}}
1,this.handleTouchMove=e=>{let t=window.visualViewport?.scale??1,{changedTouches:i}=e,[l]=i;if(this.props.canSwipeToUnzoom&&!this.isScaling&&t<=1&&null!=this.touchYStart&&void 0!==l){let{screenY:t}=l;this.touchYEnd=t,Math.abs(Math.max(this.touchYStart,this.touchYEnd)-Math.min(this.touchYStart,this.touchYEnd))>this.props.swipeToUnzoomThreshold&&(this.touchYStart=void 0,this.touchYEnd=void 0,this.handleUnzoom(e))}},this.handleTouchEnd=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleTouchCancel=()=>{this.touchYStart=void 0,this.touchYEnd=void 0},this.handleResize=()=>{this.setState({shouldRefresh:!0})},this.hasImage=()=>null!==this.imgEl&&(void 0!==this.state.loadedImgEl||s("SVG",this.imgEl))&&"none"!==window.getComputedStyle(this.imgEl).display,this.zoom=()=>{this.bodyScrollDisable(),this.refDialog.current?.showModal(),this.setState({modalState:"LOADING"})},this.unzoom=()=>{this.setState({modalState:"UNLOADING"})},this.handleImgTransitionEnd=()=>{clearTimeout(this.timeoutTransitionEnd),"LOADING"===this.state.modalState?this.setState({modalState:"LOADED"}):"UNLOADING"===this.state.modalState&&this.setState({shouldRefresh:!1,modalState:"UNLOADED"})},this.ensureImgTransitionEnd=()=>
1{if(null!==this.refModalImg.current){let{transitionDuration:e}=window.getComputedStyle(this.refModalImg.current),t=parseFloat(e);if(0!==t&&!Number.isNaN(t)){let i=t*(e.endsWith("ms")?1:1e3)+50;this.timeoutTransitionEnd=setTimeout(this.handleImgTransitionEnd,i)}}},this.bodyScrollDisable=()=>{let e=document.body.style;this.prevBodyAttrs={overflow:e.overflow,position:e.position,top:e.top,width:e.width};let t=window.scrollY;this.prevScrollY=t;let i=document.body.clientWidth;e.overflow="hidden",e.position="fixed",e.top=`-${t}px`,e.width=`${i}px`},this.bodyScrollEnable=()=>{let e=document.body.style,t=this.prevBodyAttrs;e.width=t.width,e.position=t.position,e.top=t.top,e.overflow=t.overflow,window.scrollTo({left:0,top:this.prevScrollY,behavior:"instant"}),this.prevBodyAttrs=p,this.prevScrollY=0},this.loadZoomImg=()=>{let{props:{zoomImg:e}}=this;if(null==e)return;let{src:t}=e;if(void 0!==t&&""!==t){let i=new Image;i.sizes=e.sizes??"",i.srcset=e.srcSet??"",i.crossOrigin=e.crossOrigin??void 0,i.src=t;let l=()=>{this.setState({isZoomImgLoaded:!0})};i.decode().then(l).catch(()=>{r(i)?l():i.onload=l})}},this.UNSAFE_handleSvg=()=>{let{imgEl:e,refModalImg:t,styleModalImg:i}=this;if(s("SVG",e)){let l=e.cloneNode(!0);(e=>{let t="-zoom",i=["clip-path","fill","mask","marker-start","marker-mid","marker-end"],l=new Map;if(e.hasAttribute("id")){let{id:i}=e,s=i+t;l.set(i,s),e.id=s}e.querySelectorAll("[id]").forEach(e=>{let{id:i}=e,s=i+t;l.set(i,s),e.id=s});let s=i.map(e=>`[${e}]`).join(", ");e.querySelectorAll(s).forEach(e=>{for(let t of i){let i=e.getAttribute(t);if(i?.startsWith("url(#")===!0){let s=i.slice(5,-1),n=l.get(s);void 0!==n&&e.setAttribute(t,`url(#${n})`)}}}),e.querySelectorAll("style").forEach(e=>{let{textContent:t}=e;if(""!==t){let i=t;l.forEach((e,t)=>{i=i.replaceAll(`#${t}`,`#${e}`)}),i!==t&&(e.textContent=i)}})})(l),l.style.width=`${i.width??0}px`,l.style.height=`${i.height??0}px`,l.addEventListener("click",this.handleUnzoom),t.current?.firstChild?.remove(),t.current?.appendChild(l)}}}render(){let{handleBtnUnzoomClick:e,handleDialogClick:t,handleDialogClose:r,handleUnzoom:a,handleZoom:d,imgEl:c,props:{a11yNameButtonUnzoom:x,a11yNameButtonZoom:p,children:v,classDialog:S,IconUnzoom:N,IconZoom:P,wrapElement:j,ZoomContent:E,zoomImg:w,zoomMargin:y},refContent:T,refDialog:D,refModalContent:I,refModalImg:C,refWrap:L,state:{id:O,isZoomImgLoaded:A,loadedImgEl:k,modalState:_,shouldRefresh:F,styleGhost:R}}=this,U=`rmiz-modal-${O}`,z=`rmiz-modal-img-${O}`,M=n(c),B=s("IMG",c),G=s("SVG",c),H=(e=>{if(null!==e)if(s("IMG",e))return e.alt;else return e.getAttribute("aria-label")??void 0})(c),$=o(c),Y=B?c.sizes:void 0,V=B?c.srcset:void 0,W=B?c.crossOrigin:void 0,K=w?.src!==void 0&&""!==w.src,Z=this.hasImage(),q=void 0!==H&&""!==H?`${p}: ${H}`:p,Q="LOADING"===_||"LOADED"===_,J=Z?"found":"not-found",X="UNLOADED"===_||"UNLOADING"===_?"hidden":"visible";this.styleModalImg=Z&&null!==c?(e=>{let{hasZoomImg:t,imgSrc:i,isSvg:l,isZoomed:s,loadedImgEl:r,offset:a,shouldRefresh:o,targetEl:d}=e,c=(e=>{let{hasZoomImg:t,imgSrc:i,isSvg:l}=e;return l||i?.slice(0,18)==="data:image/svg+xml"||t||void 0!==i&&g.test(i)})({hasZoomImg:t,imgSrc:i,isSvg:l}),x=d.getBoundingClientRect(),p=window.getComputedStyle(d),b=null!=r&&n(d),v=null!=r&&!b,S=f({fallback:x.height,natural:r?.naturalHeight}),N=f({fallback:x.width,natural:r?.naturalWidth}),{height:P,left:j,top:E,width:w}=x,y=b?(e=>{let{backgroundPosition:t,backgroundSize:i,containerHeight:l,containerLeft:s,containerTop:n,containerWidth:r,hasScalableSrc:a,offset:o,targetHeight:d,targetWidth:c}=e,u={containerHeight:l,containerLeft:s,containerTop:n,containerWidth:r,hasScalableSrc:a,offset:o,position:t,targetHeight:d,targetWidth:c};if("cover"===i||"contain"===i){let e=r/c,t=l/d,s="cover"===i?Math.max(e,t):Math.min(e,t);return h({...u,visibleWidth:c*s,visibleHeight:d*s})}{if("auto"===i)return h({...u,visibleWidth:c,visibleHeight:d});let[e="50%",t="50%"]=i.split(" "),s=Math.min(m(e,r)/c,m(t,l)/d);return h({...u,visibleWidth:c*s,visibleHeight:d*s})}})({backgroundPosition:p.backgroundPosition,backgroundSize:p.backgroundSize,containerHeight:P,containerLeft:j,containerTop:E,containerWidth:w,hasScalableSrc:c,offset:a,targetHeight:S,targetWidth:N}):v?(e=>{let{containerHeight:t,containerLeft:i,containerTop:l,containerWidth:s,hasScalableSrc:n,objectFit:r,objectPosition:a,offset:o,targetHeight:d,targetWidth:c}=e,m=r;"scale-down"===m&&(m=c<=s&&d<=t?"none":"contain");let f={containerHeight:t,containerLeft:i,containerTop:l,containerWidth:s,hasScalableSrc:n,offset:o,position:a,targetHeight:d,targetWidth:c};if("cover"===m||"contain"===m){let e=s/c,i=t/d,l="cover"===m?Math.max(e,i):Math.min(e,i);return h({...f,visibleWidth:c*l,visibleHeight:d*l})}{if("none"===m)return h({...f,visibleWidth:c,visibleHeight:d});let e=Math.max(s/c,t/d),r=u({containerHeight:d*e,containerWidth:c*e,hasScalableSrc:n,offset:o,targetHeight:d,targetWidth:c});return{top:l,left:i,width:s*r,height:t*r,initialTransform:`translate(0,0) scale(${1/r})`}}})({containerHeight:P,containerLeft:j,containerTop:E,containerWidth:w,hasScalableSrc:c,objectFit:p.objectFit,objectPosition:p.objectPosition,offset:a,targetHeight:S,targetWidth:N}):(e=>{let{containerHeight:t,containerLeft:i,containerTop:l,containerWidth:s,hasScalableSrc:n,offset:r,targetHeight:a,targetWidth:o}=e,d=u({containerHeight:t,containerWidth:s,hasScalableSrc:n,offset:r,targetHeight:a,targetWidth:o});return{top:l,left:i,width:s*d,height:t*d,initialTransform:`translate(0,0) scale(${1/d})`}})({containerHeight:P,containerLeft:j,containerTop:E,containerWidth:w,hasScalableSrc:c,offset:a,targetHeight:S,targetWidth:N}
1),T={top:y.top,left:y.left,width:y.width,height:y.height,transform:(e=>{let{height:t,initialTransform:i,isZoomed:l,left:s,top:n,userTransform:r,width:a}=e,o="";if("none"!==r&&""!==r){let e=a/2,i=t/2;o=`translate(${e}px,${i}px) ${r} translate(${-e}px,${-i}px)`}if(!l)return""===o?i:`${i} ${o}`;let d=window.innerWidth/2,c=window.innerHeight/2,u=`translate(${d-(s+a/2)}px,${c-(n+t/2)}px) scale(1)`;return""===o?u:`${u} ${o}`})({...y,isZoomed:s,userTransform:p.transform})};return s&&o&&(T.transitionDuration="0.01ms"),T})({hasZoomImg:K,imgSrc:$,isSvg:G,isZoomed:Q,loadedImgEl:k,offset:y,shouldRefresh:F,targetEl:c}):{};let ee=null;if(Z){let t=B||M?i.default.createElement("img",{alt:H,crossOrigin:W,sizes:Y,src:$,srcSet:V,...A&&"LOADED"===_?w:{},"data-rmiz-modal-img":"",height:this.styleModalImg.height??void 0,id:z,onTransitionEnd:this.handleImgTransitionEnd,ref:C,style:this.styleModalImg,width:this.styleModalImg.width??void 0}):G?i.default.createElement("div",{"data-rmiz-modal-img":!0,onTransitionEnd:this.handleImgTransitionEnd,ref:C,style:this.styleModalImg}):null,l=i.default.createElement("button",{"aria-label":x,"data-rmiz-btn-unzoom":"",onClick:e,type:"button"},i.default.createElement(N,null));ee=null==E?i.default.createElement(i.default.Fragment,null,t,l):i.default.createElement(E,{buttonUnzoom:l,modalState:_,img:t,isZoomImgLoaded:A,onUnzoom:a})}return i.default.createElement(j,{"aria-owns":U,"data-rmiz":"",ref:L},i.default.createElement(j,{"data-rmiz-content":J,ref:T,style:{visibility:"UNLOADED"===_?"visible":"hidden"}},v),Z&&i.default.createElement(j,{"data-rmiz-ghost":"",style:R},i.default.createElement("button",{"aria-label":q,"data-rmiz-btn-zoom":"",onClick:d,type:"button"},i.default.createElement(P,null))),Z&&l.default.createPortal(i.default.createElement("dialog",{"aria-labelledby":z,"aria-modal":"true",className:S,"data-rmiz-modal":"",id:U,onClick:t,onClose:r,onCancel:b,ref:D,role:"dialog"},i.default.createElement("div",{"data-rmiz-modal-overlay":X}),i.default.createElement("div",{"data-rmiz-modal-content":"",ref:I},ee)),function(){let e=document.querySelector("[data-rmiz-portal]");if(null!=e)return e;let t=document.createElement("div");return t.setAttribute("data-rmiz-portal",""),document.body.appendChild(t),t}()))}componentDidMount(){this.setId(),this.setAndTrackImg(),this.handleImgLoad(),this.UNSAFE_handleSvg()}componentWillUnmount(){"UNLOADED"!==this.state.modalState&&this.bodyScrollEnable(),this.contentChangeObserver?.disconnect(),this.contentNotFoundChangeObserver?.disconnect(),this.imgElResizeObserver?.disconnect(),this.imgEl?.removeEventListener("load",this.handleImgLoad),this.imgEl?.removeEventListener("click",this.handleZoom),clearTimeout(this.timeoutTransitionEnd),window.removeEventListener("wheel",this.handleWheel),window.removeEventListener("touchstart",this.handleTouchStart),window.removeEventListener("touchmove",this.handleTouchMove),window.removeEventListener("touchend",this.handleTouchEnd),window.removeEventListener("touchcancel",this.handleTouchCancel),window.removeEventListener("resize",this.handleResize),document.removeEventListener("keydown",this.handleKeyDown,!0)}componentDidUpdate(e,t){this.handleModalStateChange(t.modalState),this.UNSAFE_handleSvg(),this.handleIfZoomChanged(e.isZoomed)}}S.defaultProps={a11yNameButtonUnzoom:"Minimize image",a11yNameButtonZoom:"Expand image",canSwipeToUnzoom:!0,IconUnzoom:function(){return i.default.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-unzoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},i.default.createElement("path",{d:"M 14.144531 1.148438 L 9 6.292969 L 9 3 L 8 3 L 8 8 L 13 8 L 13 7 L 9.707031 7 L 14.855469 1.851563 Z M 8 8 L 3 8 L 3 9 L 6.292969 9 L 1.148438 14.144531 L 1.851563 14.855469 L 7 9.707031 L 7 13 L 8 13 Z"}))},IconZoom:function(){return i.default.createElement("svg",{"aria-hidden":"true","data-rmiz-btn-zoom-icon":!0,fill:"currentColor",focusable:"false",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},i.default.createElement("path",{d:"M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z"}))},isDisabled:!1,swipeToUnzoomThreshold:10,wrapElement:"div",zoomMargin:0},e.s(["default",0,function(e){let{onZoomChange:i,...l}=e,[s,n]=t.default.useState(!1),r=t.default.useCallback((e,t)=>{let{event:l}=t;n(e),i?.(e,{event:l})},[i]);return t.default.createElement(v,{...l,isZoomed:s,onZoomChange:r})}],408335)},268363,92309,e=>{"use strict";var t=e.i(322808);function i(e){let t=Number(e);return Number.isFinite(t)?t:0}function l(e){let i=Number(e?.productType);return i===t.PRODUCT_TYPE.BOTH?[t.PRODUCT_TYPE.PHYSICAL]:i===t.PRODUCT_TYPE.EBOOK?[t.PRODUCT_TYPE.EBOOK]:i===t.PRODUCT_TYPE.PHYSICAL?[t.PRODUCT_TYPE.PHYSICAL]:[]}function s(e){return Number(e)===t.PRODUCT_TYPE.EBOOK}function n(e){let t=Number(e?.stock);return Number.isFinite(t)&&t>0?Math.floor(t):0}function r(e){if(e?.rating===void 0||e?.rating===null)return null;let t=Number(e.rating);return!Number.isFinite(t)||t<=0||t>5?null:t}function a(e){let t=e?.code;if("string"==typeof t&&t.trim())return t.trim();let i=e?.sku;return"string"==typeof i&&i.trim()?i.trim():""}e.s(["defaultFormatSelection",0,function(e){let t=l(e);return 1===t.length?t[0]:null},"exceedsStock",0,function(e,i,l){return!s(l)&&Number(e?.productType)!==t.PRODUCT_TYPE.EBOOK&&e?.stock!==void 0&&e?.stock!==null&&i>n(e)},"isEbookFormat",0,s,"resolveDisplayPrice",0,function(e,t){let l=s(t),n=i(l?e?.ebookPrice:e?.price),r=l?0:i(e?.mrp),a=r>n?r:void 0;return{price:n,mrp:a,save:a?a-n:0}},"resolveFormatOptions",0,l,"resolveMaxQuantity",0,function(e,t){return s(t)?1:Math.max(1,n(e))},"resolveRating",0,r,"resolveSku",0,a,"resolveStockCount",0,n,"showsCartActions",0,function(e){let i=Number(e?.productType);return i===t.PRODUCT_TYPE.PHYSICAL||i===t.PRODUCT_TYPE.BOTH}
1,"showsQtyStepper",0,function(e){return n(e)>0&&Number(e?.productType)===t.PRODUCT_TYPE.PHYSICAL},"showsReadAction",0,function(e){let i=Number(e?.productType);return i===t.PRODUCT_TYPE.EBOOK||i===t.PRODUCT_TYPE.BOTH},"stripHtmlToText",0,function(e){return e?e.replace(/<[^>]*>/g," ").replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/\s+/g," ").trim():""}],268363);var o=e.i(552795),d=e.i(191614),c=e.i(464719),u=e.i(157183),m=e.i(901754),h=e.i(131726),f=e.i(408335);e.i(422568);var g=e.i(119581),x=e.i(29331),p=e.i(679852),b=e.i(9884),v=e.i(647163),S=e.i(291303),N=e.i(441740),P=e.i(390124),j=e.i(508520),E=e.i(722511),w=e.i(717754),y=e.i(563548);function T(e){return/^(https?:|\/|data:)/i.test(e)||/\.(webp|png|jpe?g|gif|svg|avif)(\?|$)/i.test(e)}function D(e){let{product:i,className:l}=e,s=(0,S.useI18n)(),n=(0,S.useCurrentLocale)(),D=d.useMemo(()=>(Array.isArray(i?.description)?i.description:[]).filter(e=>"string"==typeof e&&!!e.trim()&&T(e.trim())),[i]),I=d.useMemo(()=>{let e=(Array.isArray(i?.description)?i.description:[]).filter(e=>"string"==typeof e&&!!e.trim()&&!T(e.trim())&&/<[a-z][\s\S]*>/i.test(e));return[i?.shortDescription?.trim()||"",...e].filter(Boolean)},[i]),C=r(i),L=a(i),O=d.useMemo(()=>(0,y.deriveLanguageOptions)((0,y.editionSiblings)(i),String(i?.id||i?._id||"")).filter(e=>!e.isCurrent),[i]),A=`/authors/${i?.author?.slug||i?.author?.id||i?.author?._id}`,k=`/buybooks?category=${i?.category?.slug||i?.category?.id||i?.category?._id}`,_=i?.bindings,F=i?.edition,R=i?.weight,U=(0,w.isBookProduct)(i),z=[];i?.author?.name&&z.push({label:s("common.AUTHOR"),value:(0,o.jsx)(u.default,{"aria-label":"author-detail",href:A,className:"text-maroon hover:underline",children:i.author.name})}),i?.category?.title&&z.push({label:s("common.CATEGORY"),value:(0,o.jsx)(u.default,{"aria-label":"category-view",href:k,className:"text-maroon hover:underline",children:i.category.title})}),(0,E.displayLabel)(i?.language?.title)&&z.push({label:s("common.LANGUAGE"),value:(0,E.displayLabel)(i.language.title)}),L&&z.push({label:s("common.CODE"),value:L}),U&&i?.pageCount&&z.push({label:s("common.NUMBER_OF_PAGES"),value:i.pageCount}),i?.bookSize&&z.push({label:s("common.BOOK_SIZE"),value:String(i.bookSize)}),U&&null!=_&&Number.isFinite(Number(_))&&z.push({label:s("SF.PDP.SPEC_BINDING"),value:s(1===Number(_)?"SF.PDP.BINDING_HARD":"SF.PDP.BINDING_PAPER")}),U&&null!=F&&b.PRODUCT_EDITIONS?.[n]?.[Number(F)]&&z.push({label:s("common.EDITION_TYPE"),value:b.PRODUCT_EDITIONS[n][Number(F)]}),Number(R)>0&&z.push({label:s("SF.PDP.SPEC_WEIGHT"),value:`${R} g`}),Number(i?.price)>0&&z.push({label:s(U?"common.HARD_BOUND_MRP":"common.PRICE"),value:`₹ ${i.price}`}),Number(i?.ebookPrice)>0&&z.push({label:s("common.EBOOK_MRP"),value:`₹ ${i.ebookPrice}`});let M=[];U&&i?.pageCount&&M.push(`${i.pageCount} ${s("common.PAGES")}`),(0,E.displayLabel)(i?.language?.title)&&M.push(`${s("common.LANGUAGE")}: ${(0,E.displayLabel)(i.language.title)}`),U&&null!=_&&Number.isFinite(Number(_))&&M.push(s(1===Number(_)?"SF.PDP.HIGHLIGHT_HARD_BOUND":"SF.PDP.HIGHLIGHT_PAPER_BOUND")),M.push(s("SF.PDP.HIGHLIGHT_AUTHENTIC"));let B=I.length>0||D.length>0;return(0,o.jsx)("section",{className:(0,v.cn)("w-full",l),children:(0,o.jsxs)(p.SfTabs,{defaultValue:"description",children:[(0,o.jsxs)(p.SfTabsList,{className:"flex-wrap justify-start gap-6 sm:justify-center sm:gap-8",children:[(0,o.jsx)(p.SfTabsTrigger,{value:"description",children:s("SF.PDP.TAB_DESCRIPTION")}),(0,o.jsx)(p.SfTabsTrigger,{value:"additional",children:s("SF.PDP.TAB_ADDITIONAL")}),(0,o.jsx)(p.SfTabsTrigger,{value:"reviews",children:s("SF.PDP.TAB_REVIEWS")})]}),(0,o.jsx)(p.SfTabsContent,{value:"description",children:(0,o.jsxs)("div",{className:"mx-auto max-w-3xl",children:[O.length?(0,o.jsxs)("p",{className:"mb-5 rounded-r-xl border-l-4 border-gold bg-surface-bone px-4 py-3 text-sm leading-6 text-ink",children:[(0,o.jsx)("span",{className:"font-semibold text-ink-brown",children:s("SF.PDP.ALSO_AVAILABLE_IN")})," ",O.map((e,t)=>(0,o.jsxs)(d.Fragment,{children:[t>0?", ":null,(0,o.jsx)(j.default,{href:e.href,className:"font-semibold text-maroon underline underline-offset-[3px] hover:text-maroon-dark",children:e.label})]},e.key))]}):null,I.map((e,t)=>(0,o.jsx)("div",{className:"prose prose-sm max-w-none text-ink [&_a]:text-maroon [&_a]:underline [&_h1]:text-lg [&_h2]:text-base [&_img]:rounded-xl [&_li]:my-1 [&_p]:mb-4 [&_p]:leading-7",dangerouslySetInnerHTML:{__html:e}},`desc-html-${t}`)),(0,o.jsx)("ul",{className:"mt-6 flex flex-col gap-3",children:M.map(e=>(0,o.jsxs)("li",{className:"flex items-start gap-3 text-sm text-ink",children:[(0,o.jsx)(m.CheckCircle2,{className:"mt-0.5 size-5 shrink-0 text-green-700","aria-hidden":!0}),(0,o.jsx)("span",{children:e})]},e))}),D.length?(0,o.jsx)("div",{className:"mt-8 flex flex-col items-center gap-8",children:D.map((e,l)=>(0,o.jsx)(f.default,{children:(0,o.jsx)(c.default,{alt:i?.altDescription||i?.title||"Product description",src:(0,N.resolveCdnMediaUrl)(e),width:800,height:800,unoptimized:(0,P.shouldUnoptimizeNextImage)(e),className:"h-auto w-full rounded-xl",onError:e=>{e.currentTarget.src=(0,N.resolveCdnMediaUrl)(t.DEFAULT_IMAGES.PRODUCT)}})},`${e}-${l}`))}):null,B?null:(0,o.jsx)("p",{className:"text-sm text-ink-muted",children:s("SF.PDP.NO_DESCRIPTION")})]})}),(0,o.jsx)(p.SfTabsContent,{value:"additional",children:(0,o.jsx)("div",{className:"mx-auto max-w-3xl",children:(0,o.jsx)("dl",{className:"divide-y divide-gold-tan/30 overflow-hidden rounded-xl border border-gold-tan/30",children:z.map(e=>(0,o.jsxs)("div",{className:"grid grid-cols-1 gap-1 px-4 py-3 text-sm even:bg-surface-cream/60 sm:grid-cols-3 sm:gap-4",children:[(0,o.jsx)("dt",{className:"font-semibold text-ink",children:e.label}),(0,o.jsx)("dd",{className:"text-ink-muted sm:col-span-2",children:e.value})]},e.label))})})}),(0,o.jsx)(p.SfTabsContent,{value:"reviews",children:(0,o.jsxs)("div",{className:"mx-auto max-w-3xl",children:[null!=C?(0,o.jsxs)("div",{className:"mb-6 flex items-center gap-3 rounded-xl border border-gold-tan/30 bg-surface-cream/60 px-4 py-3",children:[(0,o.jsx)("span",{className:"text-2xl font-bold text-maroon",children:C.toFixed(1)}),(0,o.jsx)(x.SfRatingStars,{value:C})]}):null,(0,o.jsx)(g.SfEmptyState,{icon:h.MessageSquare,title:s("SF.PDP.NO_REVIEWS_TITLE"),description:s("SF.PDP.NO_REVIEWS_BODY")})]})})]})})}e.s(["ProductDetailTabs",0,D,"default",0,D],92309)},192686,e=>{"use strict";var t=e.i(552795),i=e.i(464719),l=e.i(647163),s=e.i(441740),n=e.i(322808),r=e.i(390124);e.s(["RelationCover",0,function(e){let{image:a,title:o,width:d=40,className:c}=e,u=(0,s.resolveCdnMediaUrl)(a||n.DEFAULT_IMAGES.PRODUCT);return(0,t.jsx)("div",{className:(0,l.cn)("relative shrink-0 overflow-hidden rounded-md bg-surface-cream",c),style:{width:d,height:Math.round(4*d/3)},children:(0,t.jsx)(i.default,{src:u,alt:o||"",fill:!0,sizes:`${d}px`,className:"object-cover",unoptimized:(0,r.shouldUnoptimizeNextImage)(u),onError:e=>{e.currentTarget.srcset=n.DEFAULT_IMAGES.PRODUCT,e.currentTarget.src=n.DEFAULT_IMAGES.PRODUCT}})})}])},936937,553278,e=>{"use strict";
1var t=e.i(552795),i=e.i(508520);e.i(422568);var l=e.i(182753),s=e.i(647163),n=e.i(291303);function r(e){let{rows:r,className:a}=e,o=(0,n.useI18n)();return!r?.length||r.length<2?null:(0,t.jsx)("div",{className:(0,s.cn)("overflow-x-auto rounded-xl border border-gold-tan/40",a),children:(0,t.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,t.jsx)("thead",{className:"bg-surface-cream text-xs uppercase text-ink-muted",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("SF.PDP.COL_EDITION")}),(0,t.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("SF.PDP.COL_LANGUAGE")}),(0,t.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("SF.PDP.COL_PAGES")}),(0,t.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("SF.PDP.COL_CODE")}),(0,t.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("SF.PDP.COL_PRICE")})]})}),(0,t.jsx)("tbody",{children:r.map(e=>(0,t.jsxs)("tr",{"aria-current":e.isCurrent?"page":void 0,className:(0,s.cn)("border-t border-gold-tan/30",e.isCurrent&&"bg-surface-bone"),children:[(0,t.jsx)("td",{className:"px-3 py-2",children:e.isCurrent?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold text-ink",children:e.title})," ",(0,t.jsxs)("span",{className:"text-xs text-ink-muted",children:["(",o("SF.PDP.THIS_PAGE"),")"]})]}):(0,t.jsx)(i.default,{href:e.href,className:"font-medium text-maroon hover:underline",children:e.title})}),(0,t.jsx)("td",{className:"px-3 py-2 text-ink-muted",children:e.language||"—"}),(0,t.jsx)("td",{className:"px-3 py-2 text-ink-muted",children:e.pageCount||"—"}),(0,t.jsx)("td",{className:"px-3 py-2 font-mono text-ink-muted",children:e.code||"—"}),(0,t.jsx)("td",{className:"px-3 py-2 font-semibold text-ink",children:null!=e.price&&Number.isFinite(e.price)?(0,l.formatINR)(e.price):"—"})]},e.id))})]})})}e.s(["ProductEditionTable",0,r],936937);var a=e.i(191614),o=e.i(722511),d=e.i(126489),c=e.i(563548),u=e.i(513706),m=e.i(192686);function h(e){let{editions:h,currentId:f="",className:g}=e,x=(0,n.useI18n)(),[p,b]=a.useState(!1),v=a.useMemo(()=>[...h].sort((e,t)=>(Number(e.position)||0)-(Number(t.position)||0)).map(e=>({id:String(e.id),title:(0,u.splitProductTitle)(e.title).primary||(0,o.displayLabel)(e.title),href:(0,d.getProductDetailHref)(e),language:(0,o.displayLabel)(e.language?.title),pageCount:(0,c.pageCountText)(e.pageCount),code:e.code?String(e.code):"",price:null!=e.price&&Number.isFinite(Number(e.price))?Number(e.price):null,image:e.image,isCurrent:f?String(e.id)===String(f):!0===e.isCurrent})),[h,f]);if(v.length<2)return null;let S=(0,c.countEditions)(h),N=Math.max(0,v.length-4),P=p?v:v.slice(0,4);return(0,t.jsxs)("section",{className:(0,s.cn)("mt-8 overflow-hidden rounded-xl border border-gold-tan/40",g),children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1 bg-surface-cream px-4 py-3",children:[(0,t.jsx)("h2",{className:"text-sm font-bold text-ink",children:x("SF.PDP.ALL_EDITIONS")}),(0,t.jsxs)("span",{className:"text-[13px] text-ink-muted",children:[x("SF.PDP.EDITIONS_COUNT",{count:S.editions})," ·"," ",x("SF.PDP.LANGUAGES_COUNT",{count:S.languages})]})]}),(0,t.jsx)("div",{className:"hidden sm:block",children:(0,t.jsx)(r,{rows:v,className:"rounded-none border-0 border-t border-gold-tan/30"})}),(0,t.jsxs)("ul",{className:"flex flex-col gap-2 border-t border-gold-tan/30 p-3 sm:hidden",children:[P.map(e=>{let n=[e.code?x("SF.PDP.CODE_LABEL",{code:e.code}):"",(0,c.pageCountText)(e.pageCount)?x("SF.PDP.PAGES_SHORT",{count:(0,c.pageCountText)(e.pageCount)}):"",null!=e.price?(0,l.formatINR)(e.price):"",e.isCurrent?x("SF.PDP.THIS_PAGE"):""].filter(Boolean),r=[e.title,e.language].filter(Boolean).join(" · ");return(0,t.jsxs)("li",{"aria-current":e.isCurrent?"page":void 0,className:(0,s.cn)("flex items-center gap-3 rounded-xl border border-gold-tan/25 px-3 py-2.5",e.isCurrent?"bg-surface-bone":"bg-white"),children:[(0,t.jsx)(m.RelationCover,{image:e.image,title:e.title,width:40}),(0,t.jsxs)("div",{className:"min-w-0",children:[e.isCurrent?(0,t.jsx)("p",{className:"line-clamp-2 text-sm font-semibold text-ink",children:r}):(0,t.jsx)(i.default,{href:e.href,className:"line-clamp-2 text-sm font-semibold text-maroon hover:underline",children:r}),n.length?(0,t.jsx)("p",{className:"text-[13px] text-ink-muted",children:n.join(" · ")}):null]})]},e.id)}),N>0?(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button","aria-expanded":p,onClick:()=>b(e=>!e),className:"px-1 py-2 text-[13px] font-semibold text-maroon hover:underline",children:p?x("SF.PDP.FEWER_EDITIONS"):x("SF.PDP.MORE_EDITIONS",{count:N})})}):null]})]})}e.s(["ProductEditionsBlock",0,h,"default",0,h],553278)},409809,e=>{"use strict";var t=e.i(552795),i=e.i(191614),l=e.i(464719),s=e.i(408335),n=e.i(647163),r=e.i(441740),a=e.i(322808),o=e.i(390124);function d(e){return e===a.DEFAULT_IMAGES.PRODUCT?e:(0,r.resolve
1CdnMediaUrl)(e)}function c(e){e.srcset="",e.src=a.DEFAULT_IMAGES.PRODUCT}function u(e,t,i){return Array.isArray(e)?e[t]||e[0]||i||"Product image":e||i||"Product image"}function m(e){let{images:r,altImage:m,title:h,className:f}=e,g=i.useMemo(()=>(0,o.normalizeProductImagesArray)(r),[r]),[x,p]=i.useState(0),[b,v]=i.useState(g);b!==g&&(v(g),p(0));let S=x<g.length?x:0,N=g[S]||a.DEFAULT_IMAGES.PRODUCT;return(0,t.jsxs)("div",{className:(0,n.cn)("flex w-full flex-col gap-4",f),children:[(0,t.jsx)("div",{className:"overflow-hidden rounded-2xl bg-surface-bone p-4 shadow-card sm:p-8",children:(0,t.jsx)("div",{className:"mx-auto flex aspect-square w-full max-w-[460px] items-center justify-center",children:(0,t.jsx)(s.default,{children:(0,t.jsx)(l.default,{src:d(N),alt:u(m,S,h),width:460,height:460,priority:!0,sizes:"(max-width: 640px) 92vw, (max-width: 1024px) 50vw, 460px",className:"mx-auto h-auto max-h-full w-auto max-w-full object-contain",unoptimized:(0,o.shouldUnoptimizeNextImage)(N),onError:e=>{c(e.currentTarget)}},N)})})}),g.length>1?(0,t.jsx)("div",{className:"flex flex-wrap gap-3",role:"group","aria-label":"Product images",children:g.map((e,i)=>{let s=e||a.DEFAULT_IMAGES.PRODUCT,r=i===S;return(0,t.jsx)("button",{type:"button","aria-label":`Product image ${i+1}`,"aria-pressed":r,onClick:()=>p(i),className:(0,n.cn)("relative size-16 shrink-0 overflow-hidden rounded-xl border bg-white transition-colors sm:size-20",r?"border-maroon shadow-card":"border-gold-tan/40 hover:border-gold"),children:(0,t.jsx)(l.default,{src:d(s),alt:u(m,i,h),fill:!0,sizes:"80px",className:"object-cover",unoptimized:(0,o.shouldUnoptimizeNextImage)(s),onError:e=>{c(e.currentTarget)}})},`${s}-${i}`)})}):null]})}e.s(["ProductGallery",0,m,"default",0,m])},384178,e=>{"use strict";var t=e.i(552795),i=e.i(191614),l=e.i(508520);e.i(422568);var s=e.i(598155),n=e.i(316780),r=e.i(182753),a=e.i(647163),o=e.i(291303),d=e.i(722511),c=e.i(126489),u=e.i(563548),m=e.i(513706),h=e.i(890064),f=e.i(192686);function g(e){return null!=e&&Number.isFinite(Number(e))&&Number(e)>0?(0,r.formatINR)(Number(e)):""}function x(e){let{relations:r,currentId:x="",className:p}=e,b=(0,o.useI18n)(),v=i.useMemo(()=>(0,u.deriveSetSummary)(r,x),[r,x]),S=i.useMemo(()=>{let e=new Map;for(let t of r?.editions??[]){let i=(0,d.displayLabel)(t.language?.title);i&&e.set(String(t.id),i)}return e},[r]);if(!v)return null;if("member"===v.kind){let{set:e}=v,i=e.setProduct,r=g(i.price),o=r?b("SF.PDP.SET_SUMMARY",{count:e.members.length,code:i.code,price:r}):b("SF.PDP.SET_SUMMARY_NO_PRICE",{count:e.members.length,code:i.code});return(0,t.jsxs)(n.SfCard,{className:(0,a.cn)("flex flex-wrap items-center gap-3.5 bg-surface-cream px-4 py-3.5 shadow-none sm:flex-nowrap",p),children:[(0,t.jsx)(f.RelationCover,{image:i.image,title:i.title,width:54,className:"rounded-lg"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"text-[11px] font-bold uppercase tracking-[0.14em] text-gold-deep",children:b("SF.PDP.SET_PART_OF")}),(0,t.jsx)("p",{className:"text-[15px] font-semibold text-ink",children:(0,m.splitProductTitle)(e.title||i.title).primary}),(0,t.jsx)("p",{className:"text-[13px] text-ink-muted",children:o})]}),(0,t.jsx)(s.SfButton,{asChild:!0,variant:"outline",size:"sm",className:"h-9 w-full px-4 text-[13px] sm:w-auto",children:(0,t.jsxs)(l.default,{href:(0,c.getProductDetailHref)(i),children:[b("SF.PDP.SET_VIEW")," →"]})})]})}return"contents"===v.kind?(0,t.jsxs)("div",{className:p,children:[(0,t.jsxs)("h3",{className:"mb-3 text-sm font-semibold text-ink",children:[b("SF.PDP.SET_CONTAINS"),(0,t.jsxs)("span",{className:"font-normal text-ink-muted",children:[" ","· ",b("SF.PDP.BOOKS_COUNT",{count:v.members.length})]})]}),(0,t.jsx)("ul",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:v.members.map(e=>{let i=[S.get(String(e.id)),e.code?b("SF.PDP.CODE_LABEL",{code:e.code}):"",g(e.price)].filter(Boolean);return(0,t.jsx)("li",{children:(0,t.jsxs)(n.SfCard,{className:"flex items-center gap-3 px-3 py-2.5 shadow-none",children:[(0,t.jsx)(f.RelationCover,{image:e.image,title:e.title,width:40}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)(l.default,{href:(0,c.getProductDetailHref)(e),className:"line-clamp-2 text-sm font-semibold text-maroon hover:underline",children:(0,m.splitProductTitle)(e.title).primary||(0,d.displayLabel)(e.title)}),i.length?(0,t.jsx)("p",{className:"text-[13px] text-ink-muted",children:i.join(" · ")}):null]})]})},e.id)})})]}):(0,t.jsxs)("div",{className:p,children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-semibold text-ink",children:b("SF.PDP.OTHER_VOLUMES")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:v.members.map((e,i)=>{let s=(0,d.displayLabel)(e.label)||b("SF.PDP.VOL_N",{n:i+1}),n=x?String(e.id)===String(x):e.isCurrent;return(0,t.jsxs)(l.default,{href:(0,c.getProductDetailHref)(e),"aria-current":n?"page":void 0,className:(0,a.cn)(h.PILL_BASE,n?h.PILL_ACTIVE:h.PILL_IDLE),children:[s,e.code?(0,t.jsxs)("span",{className:"ml-1.5 text-[11px] font-normal opacity-75",children:["· ",e.code]}):null]},e.id)})})]})}e.s(["ProductSetBlock",0,x,"default",0,x])},296448,e=>{"use strict";var t=e.i(552795);
1let i=(0,e.i(162659).default)("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var l=e.i(936835),s=e.i(61983),n=e.i(647163),r=e.i(291303);function a(e){let{className:a}=e,o=(0,r.useI18n)(),d=[{icon:s.Truck,title:o("SF.PDP.TRUST_SHIPPING_TITLE"),body:o("SF.PDP.TRUST_SHIPPING_BODY")},{icon:i,title:o("SF.PDP.TRUST_PAYMENT_TITLE"),body:o("SF.PDP.TRUST_PAYMENT_BODY")},{icon:l.Headphones,title:o("SF.PDP.TRUST_SUPPORT_TITLE"),body:o("SF.PDP.TRUST_SUPPORT_BODY")}];return(0,t.jsx)("div",{className:(0,n.cn)("grid grid-cols-1 gap-6 border-y border-gold-tan/30 py-8 sm:grid-cols-3",a),children:d.map(e=>{let{icon:i,title:l,body:s}=e;return(0,t.jsxs)("div",{className:"flex items-center justify-center gap-3",children:[(0,t.jsx)("span",{className:"flex size-11 shrink-0 items-center justify-center rounded-full bg-surface-bone text-maroon",children:(0,t.jsx)(i,{className:"size-5","aria-hidden":!0})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-bold text-ink",children:l}),(0,t.jsx)("p",{className:"text-xs text-ink-muted",children:s})]})]},l)})})}e.s(["ProductTrustStrip",0,a,"default",0,a],296448)},165708,e=>{"use strict";var t=e.i(552795),i=e.i(191614),l=e.i(508520),s=e.i(647163),n=e.i(291303),r=e.i(322808),a=e.i(722511),o=e.i(563548),d=e.i(890064);function c(e){let{language:c,editions:u,currentId:m="",formats:h,selectedFormat:f,onSelectFormat:g,showFormatHint:x=!1,className:p}=e,b=(0,n.useI18n)(),v=i.useMemo(()=>Array.isArray(u)&&u.length>=2?u:[],[u]),S=i.useMemo(()=>(0,o.deriveLanguageOptions)(v,m),[v,m]),N=i.useMemo(()=>(0,o.deriveVolumes)(v,m),[v,m]),P=e=>Number(e)===r.PRODUCT_TYPE.EBOOK?b("SF.PDP.FORMAT_EBOOK"):b("SF.PDP.FORMAT_PRINT"),j=(0,a.displayLabel)(c?.title),E=S.map(e=>{let t=e.volumeCount>1,i=t?b("SF.PDP.VOLS_SHORT",{count:e.volumeCount}):"",l=e.volumes.find(e=>e.isCurrent),s=e.isCurrent?[e.label,t&&l?`— ${l.label}`:"",`\xb7 ${b("SF.PDP.THIS_EDITION")}`].filter(Boolean).join(" "):t?`${e.label} (${i})`:e.label;return{key:e.key,label:e.label,sub:i||void 0,selectText:s,href:e.href,isCurrent:e.isCurrent}});return(0,t.jsxs)("div",{className:(0,s.cn)("flex flex-col gap-5",p),children:[E.length?(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2 text-sm font-semibold text-ink",children:[b("common.LANGUAGE"),E.length>1?(0,t.jsxs)("span",{className:"font-normal text-ink-muted",children:[" ","·"," ",b("SF.PDP.LANGUAGE_AVAILABLE_IN",{count:E.length})]}):null]}),(0,t.jsx)(d.LinkedOptionRow,{options:E,selectLabel:b("SF.PDP.LANGUAGE_SELECT_LABEL"),hint:b("SF.PDP.LANGUAGE_SELECT_HINT")}),N.length>1?(0,t.jsxs)("p",{className:"mt-2.5 text-[13px] text-ink-muted",children:[b("SF.PDP.EDITION_IN_VOLUMES",{count:N.length})," ",N.map((e,s)=>(0,t.jsxs)(i.Fragment,{children:[s>0?" · ":null,e.isCurrent?(0,t.jsxs)("b",{className:"font-semibold text-ink",children:[e.label," (",e.code,")"]}):(0,t.jsxs)(l.default,{href:e.href,className:"text-maroon hover:underline",children:[e.label," (",e.code,") →"]})]},e.id))]}):null]}):j?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-semibold text-ink",children:b("common.LANGUAGE")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,t.jsx)("span",{"aria-current":"true",className:(0,s.cn)(d.PILL_BASE,d.PILL_ACTIVE),children:j})})]}):null,h.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-semibold text-ink",children:b("SF.PDP.FORMAT")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:h.map(e=>{if(1===h.length)return(0,t.jsx)("span",{"aria-current":"true",className:(0,s.cn)(d.PILL_BASE,d.PILL_ACTIVE),children:P(e)},e);let i=Number(f)===Number(e);return(0,t.jsx)("button",{type:"button","aria-pressed":i,onClick:()=>g(e),className:(0,s.cn)(d.PILL_BASE,i?d.PILL_ACTIVE:d.PILL_IDLE),children:P(e)},e)})}),x?(0,t.jsx)("p",{className:"mt-2 text-xs text-ink-muted",children:b("SF.PDP.FORMAT_HELP")}):null]}):null]})}e.s(["ProductVariantPills",0,c,"default",0,c])},599462,e=>{"use strict";var t=e.i(552795),i=e.i(191614),l=e.i(157183),s=e.i(454681),n=e.i(875931),r=e.i(754031),a=e.i(906467),o=e.i(155579),d=e.i(630803),c=e.i(172320),u=e.i(822297),m=e.i(614541),h=e.i(749868),f=e.i(464719),g=e.i(329232);function x(e){let{videoId:l,title:s,className:n="",iframeClassName:r="",variant:a="sidebar"}=e,[o,d]=(0,i.useState)(!1),c=`https://img.youtube.com/vi/${l}/mqdefault.jpg`;return o?(0,t.jsx)("iframe",{width:"100%",height:"hero"===a?645:void 0,src:`https://www.youtube.com/embed/${l}?rel=0`,title:s,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,className:"hero"===a?`rounded-3xl h-[300px] w-full lg:h-[645px] ${r}`:`aspect-video min-h-[200px] w-full rounded-xl border border-black/5 shadow-sm ${r}`}):(0,t.jsxs)("button",{type:"button",onClick:()=>d(!0),className:`group relative block w-full overflow-hidden rounded bg-black/5 text-left shadow-inner ring-1 ring-black/5 transition hover:ring-2 hover:ring-custom-20/40 focu
1s:outline-none focus-visible:ring-2 focus-visible:ring-custom-20 ${n}`,children:[(0,t.jsx)("span",{className:"hero"===a?"relative block h-[300px] w-full lg:h-[645px]":"relative block aspect-video w-full min-h-[140px]",children:(0,t.jsx)(f.default,{src:c,alt:"",fill:!0,unoptimized:!0,className:"object-cover transition duration-300 group-hover:scale-[1.02]",sizes:"(max-width: 1024px) 100vw, 645px"})}),(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-gradient-to-t from-black/50 via-black/15 to-transparent"}),(0,t.jsx)("span",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"flex h-14 w-14 items-center justify-center rounded-full bg-white/95 text-custom-20 shadow-lg ring-2 ring-white/80 transition group-hover:scale-110 group-hover:bg-white",children:(0,t.jsx)(g.Play,{className:"h-7 w-7 text-custom-20",strokeWidth:2.25,"aria-hidden":!0})})}),(0,t.jsxs)("span",{className:"sr-only",children:["Play video: ",s]})]})}var p=e.i(225806),b=e.i(291303);function v(e){let{items:i}=e,l=(0,b.useI18n)(),s=Array.isArray(i)?i.filter(e=>e?.videoId):[];return s.length?(0,t.jsxs)("section",{className:"relative my-10 overflow-hidden rounded-2xl border border-[#E8E8E8] bg-gradient-to-br from-[#faf8f5] via-white to-white px-4 py-8 shadow-sm sm:px-6 sm:py-10","aria-labelledby":"product-youtube-heading",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute -right-16 -top-16 h-48 w-48 rounded-full bg-custom-20/10 blur-3xl","aria-hidden":!0}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-3",children:[(0,t.jsx)("span",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-custom-20/15 text-custom-20 shadow-sm ring-1 ring-custom-20/20",children:(0,t.jsx)(p.Video,{className:"h-5 w-5",strokeWidth:2})}),(0,t.jsx)("h2",{id:"product-youtube-heading",className:"border-b-2 border-custom-20/80 pb-1 text-[18px] font-bold leading-tight text-dark-100 sm:text-[20px] lg:text-[22px]",children:l("VIDEO.VIDEOS")})]}),(0,t.jsx)("div",{className:"mt-8 grid grid-cols-1 gap-6 sm:grid-cols-2 sm:gap-7",children:s.map((e,i)=>(0,t.jsxs)("article",{className:"group flex flex-col overflow-hidden rounded-2xl border border-[#E8E8E8] bg-white/90 p-4 shadow-md ring-1 ring-black/[0.03] transition duration-200 hover:-translate-y-0.5 hover:border-custom-20/25 hover:shadow-lg",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-start gap-2",children:[(0,t.jsx)("span",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-[#1E1205]/5 text-[10px] font-bold text-dark-100","aria-hidden":!0,children:i+1}),(0,t.jsx)("h3",{className:"line-clamp-3 min-h-[2.75rem] flex-1 text-left text-sm font-semibold leading-snug text-[#1E1205] lg:text-[15px]",children:e.title||"Video"})]}),(0,t.jsx)("div",{className:"mt-3 flex-1",children:(0,t.jsx)(x,{videoId:e.videoId,title:e.title||"YouTube video",variant:"sidebar",className:"rounded-xl"})})]},e.videoId+e.url))})]})]}):null}e.i(353803);var S=e.i(14862),N=e.i(58791),P=e.i(424598);e.i(422568);var j=e.i(296288),E=e.i(519885),w=e.i(598155),y=e.i(783481),T=e.i(182753),D=e.i(534258),I=e.i(29331),C=e.i(630374),L=e.i(174117),O=e.i(647163),A=e.i(793025);let k=/^[a-fA-F0-9]{24}$/;var _=e.i(120358),F=e.i(424377),R=e.i(352672),U=e.i(722511),z=e.i(390124),M=e.i(819480),B=e.i(513706),G=e.i(268363),H=e.i(717754),$=e.i(563548),Y=e.i(803748);let V=function(){return(0,t.jsxs)(y.SfContainer,{className:"py-8 sm:py-10",children:[(0,t.jsx)(Y.SfSkeleton,{className:"h-4 w-64"}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-8 lg:grid-cols-2 lg:gap-14",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(Y.SfSkeleton,{className:"aspect-square w-full rounded-2xl"}),(0,t.jsx)("div",{className:"flex gap-3",children:Array.from({length:4}).map((e,i)=>(0,t.jsx)(Y.SfSkeleton,{className:"size-16 rounded-xl sm:size-20"},i))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)(Y.SfSkeleton,{className:"h-4 w-32"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-8 w-full"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-8 w-2/3"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-6 w-40"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-9 w-52"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-20 w-full"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-10 w-64"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-10 w-64"}),(0,t.jsxs)("div",{className:"mt-2 flex gap-3",children:[(0,t.jsx)(Y.SfSkeleton,{className:"h-11 w-32"}),(0,t.jsx)(Y.SfSkeleton,{className:"h-11 w-32"}),(0,t.jsx)(Y.SfSkeleton,{className:"size-11 rounded-full"})]})]})]})]})};var W=e.i(936937),K=e.i(126489);function Z(e){let{productId:i}=e,{data:l}=(0,_.useFetch)(A.default.client.getRelatedProduct,{method:"POST",body:JSON.stringify({id:i})},{start:!!i,dep:[i]});if(!Array.isArray(l)||l.length<2)return null;let s=l.slice(0,8).map(e=>({id:String(e.id||e._id),title:(0,U.displayLabel)(e.title),href:(0,K.getProductDetailHref)(e),language:(0,U.displayLabel)(e.language?.t
1itle),pageCount:(0,$.pageCountText)(e.pageCount),code:e.code?String(e.code):"",price:Number(e.price)||0}));return(0,t.jsx)(W.ProductEditionTable,{rows:s,className:"mt-8"})}var q=e.i(678278),Q=e.i(92309),J=e.i(553278),X=e.i(409809),ee=e.i(384178),et=e.i(296448),ei=e.i(165708);function el(e){let f,{params:g,initialProduct:x,initialLocale:p,initialSlugDecoded:Y}=e,W=(0,b.useI18n)(),K=(0,b.useCurrentLocale)(),el=(0,s.useRouter)(),es=(0,s.useParams)(),{data:en}=(0,n.useSession)(),{isSubscribed:er}=(0,R.useUserStore)(),ea="string"==typeof es?.slug&&es.slug||(Array.isArray(es?.slug)?es.slug[0]:"")||g?.slug||"",eo=ea?function(e){try{return decodeURIComponent(e)}catch{return e}}(ea):"",ed=i.useMemo(()=>!!eo&&(void 0===p&&void 0===Y&&void 0===x||null==x||null!=p&&K!==p||null!=Y&&eo!==Y),[eo,x,p,Y,K]),{data:ec,isLoading:eu,error:em}=(0,_.useFetch)(A.default.client.getProduct,{method:"post",body:JSON.stringify("string"==typeof(f=eo.trim())&&k.test(f.trim())?{id:f}:{slug:f})},{start:!!eo&&ed,dep:[eo,K],token:en?.token||"",initialData:ed?void 0:x??void 0,clearBeforeFetch:ed}),eh=i.useMemo(()=>ec?function(e){let t=(0,z.normalizeProductImagesArray)(e.images),i=String(e.title??e.name??""),l=e.slug??e.urlSlug,s=String(e.code??e.sku??""),n=e.id??e._id,r=e._id??e.id,a=e.category;if(a&&"object"==typeof a){let e=a;a={...e,id:String(e.id??e._id??""),title:String(e.title??e.name??"")}}let o=e.author;if(o&&"object"==typeof o){let e=o;o={...e,id:String(e.id??e._id??""),name:String(e.name??e.title??"")}}let d=e.language;if(d&&"object"==typeof d){let e=d;d={...e,id:String(e.id??e._id??""),title:(0,U.displayLabel)(e.title)||(0,U.displayLabel)(e.name)||(0,U.displayLabel)(e.hi)}}let c=e.subCategory;if(c&&"object"==typeof c){let e=c;c={...e,id:String(e.id??e._id??""),title:String(e.title??e.name??"")}}return{...e,title:i,slug:l,code:s,id:n,_id:r,images:t,category:a,author:o,language:d,subCategory:c}}(ec):null,[ec]),{productId:ef,isWishlisted:eg,isAddingToCart:ex,isTogglingWishlist:ep,isOutOfStock:eb,needsFormatChoice:ev,showExternalPaymentRedirect:eS,setShowExternalPaymentRedirect:eN,addToCart:eP,buyNow:ej,toggleWishlist:eE}=(0,F.useProductActions)(eh,{loginRef:`/product/${eo}`}),[ew,ey]=i.useState(1),[eT,eD]=i.useState(()=>(0,G.defaultFormatSelection)(eh)),[eI,eC]=i.useState(!1),[eL,eO]=i.useState([]),[eA,ek]=i.useState(!1),[e_,eF]=i.useState(ef);e_!==ef&&(eF(ef),ey(1),eD((0,G.defaultFormatSelection)(eh)));let eR=i.useMemo(()=>(0,G.resolveFormatOptions)(eh),[eh]),eU=(0,G.resolveDisplayPrice)(eh,eT),ez=(0,G.resolveRating)(eh),eM=(0,G.resolveSku)(eh),eB=(0,G.resolveStockCount)(eh),eG=(0,G.exceedsStock)(eh,ew,eT),eH=(0,G.isEbookFormat)(eT),e$=(0,G.resolveMaxQuantity)(eh,eT),eY=(0,G.stripHtmlToText)(eh?.shortDescription),eV=()=>null!=eT?[eT]:void 0,eW=async()=>{try{let e=await (0,M.default)({url:A.default.client.checkEbookReadStatus,body:{productId:eh?.id||eh?._id},token:en?.token});return e?.data?.isAccessiable||!1}catch{return!1}},eK=async()=>{if(!en?.token)return el.push(`/auth/login?ref=/product/${eo}`);if(parseInt(eh?.ebookPrice||"0")){let e=await eW();if(!e&&!er)return ek(!0);if(er)return el.push(`/reader/${eh?.ebook}?ref=/product/${eh?.id||eh?._id}`);if(!e)return eN(!0)}return eh?.pdf?el.push(`/viewer/${eh?.id||eh?._id}`):eh?.ebook?el.push(`/reader/${eh.ebook}?ref=/product/${eh?.slug||eh?.id||eh?._id}`):(0,L.toast)({title:"Something went wrong",duration:3e3})};if(!eo)return(0,t.jsxs)("main",{className:"sf",children:[(0,t.jsx)(y.SfContainer,{children:(0,t.jsx)(E.SfBreadcrumb,{items:(0,E.sfTrail)(W("common.HOME"),{label:W("SF.BOOKS"),href:"/buybooks"},{label:W("SF.PDP.NOT_FOUND_TITLE")}),className:"pt-6"})}),(0,t.jsxs)(y.SfContainer,{className:"flex min-h-[60vh] flex-col items-center justify-center gap-4 pb-16 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-maroon",children:W("SF.PDP.INVALID_TITLE")}),(0,t.jsx)("p",{className:"max-w-lg text-sm text-ink-muted",children:W("SF.PDP.INVALID_BODY")}),(0,t.jsx)(w.SfButton,{asChild:!0,variant:"primary",children:(0,t.jsx)(l.default,{href:"/",children:W("SF.PDP.GO_HOME")})})]})]});if(eu)return(0,t.jsxs)("main",{className:"sf",children:[(0,t.jsx)(y.SfContainer,{children:(0,t.jsx)(E.SfBreadcrumb,{items:(0,E.sfTrail)(W("common.HOME"),{label:W("SF.BOOKS"),href:"/buybooks"}),className:"pt-6"})}),(0,t.jsx)(V,{})]});if(!eh)return(0,t.jsxs)("main",{className:"sf",children:[(0,t.jsx)(y.SfContainer,{children:(0,t.jsx)(E.SfBreadcrumb,{items:(0,E.sfTrail)(W("common.HOME"),{label:W("SF.BOOKS"),href:"/buybooks"}
1,{label:W("SF.PDP.NOT_FOUND_TITLE")}),className:"pt-6"})}),(0,t.jsxs)(y.SfContainer,{className:"flex min-h-[60vh] flex-col items-center justify-center gap-4 pb-16 text-center",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-maroon sm:text-3xl",children:W("SF.PDP.NOT_FOUND_TITLE")}),(0,t.jsx)("p",{className:"max-w-lg text-sm text-ink-muted",children:W("SF.PDP.NOT_FOUND_BODY")}),em?(0,t.jsx)("p",{className:"max-w-xl break-words text-xs text-rust",children:String(em)}):null,(0,t.jsx)(w.SfButton,{asChild:!0,variant:"primary",children:(0,t.jsx)(l.default,{href:"/",children:W("SF.PDP.GO_HOME")})})]})]});let eZ=!eH&&(0,G.showsCartActions)(eh)&&eB<=0,eq=ex||eZ||eG,eQ=`/buybooks?category=${eh?.category?.slug||eh?.category?.id||eh?.category?._id}`,eJ=(0,B.splitProductTitle)(eh?.title),eX=(0,B.productTitleMeta)(eh?.title,eh?.language?.title),e0=String(eh?.id||eh?._id||""),e1=(0,$.editionSiblings)(eh);return(0,t.jsxs)("main",{className:"sf",children:[(0,t.jsxs)(y.SfContainer,{className:"py-6 sm:py-8",children:[(0,t.jsx)(E.SfBreadcrumb,{items:(0,E.sfTrail)(W("common.HOME"),{label:W("SF.BOOKS"),href:"/buybooks"},!!eh?.category?.title&&{label:eh.category.title,href:eQ},{label:(0,B.splitProductTitle)(eh?.title).primary})}),(0,t.jsxs)("div",{className:"mt-6 grid grid-cols-1 gap-8 lg:grid-cols-2 lg:gap-14",children:[(0,t.jsx)(X.default,{images:eh?.images,altImage:eh?.altImage,title:eh?.title}),(0,t.jsxs)("div",{className:"flex flex-col",children:[eh?.category?.title?(0,t.jsx)(l.default,{"aria-label":"category-view",href:eQ,className:"text-xs font-semibold uppercase tracking-[0.14em] text-gold-deep hover:text-maroon",children:eh.category.title}):null,(0,t.jsx)("h1",{className:"mt-2 text-2xl font-bold leading-tight text-ink sm:text-3xl",children:eJ.primary}),eX.length?(0,t.jsx)("p",{className:"mt-2 text-sm text-ink-muted",children:eX.join(" · ")}):null,eh?.subTitle?(0,t.jsx)("p",{className:"mt-1 text-sm text-ink-muted",children:eh.subTitle}):null,(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,t.jsx)(S.SfProductBadges,{product:eh}),(0,G.showsReadAction)(eh)?(0,t.jsx)(j.SfBadge,{variant:"gold",children:W("SF.PDP.READ_INSTANTLY")}):null,(0,G.showsCartActions)(eh)?(0,t.jsx)(j.SfBadge,{variant:eB>0?"successSoft":"danger",children:W(eB>0?"common.IN_STOCK":"common.OUT_OF_STOCK")}):null]}),null!=ez?(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,t.jsx)(I.SfRatingStars,{value:ez}),(0,t.jsx)("span",{className:"text-sm font-semibold text-ink",children:ez.toFixed(1)})]}):null,(0,t.jsx)(T.SfPrice,{className:"mt-4",size:"lg",price:eU.price,mrp:eU.mrp,showSave:!0}),(0,t.jsx)(P.DeliveryEstimateHint,{className:"mt-2",allowPinEntry:!0}),eh?.lifetimeCopiesSold?(0,t.jsxs)("p",{className:"mt-2 text-sm font-semibold text-maroon",children:["Over ",Number(eh.lifetimeCopiesSold).toLocaleString("en-IN")," ","copies in print"]}):null,eY?(0,t.jsx)("p",{className:"mt-4 line-clamp-3 text-sm leading-6 text-ink-muted",children:eY}):null,(0,t.jsx)(ei.default,{className:"mt-6",language:eh?.language,editions:e1,currentId:e0,formats:eR,selectedFormat:eT,onSelectFormat:eD,showFormatHint:ev&&null==eT}),(0,t.jsx)(q.default,{className:"mt-5",editions:e1,currentId:e0}),(0,t.jsx)(ee.default,{className:"mt-5",relations:eh?.relations,currentId:e0}),(0,t.jsxs)("div",{className:"mt-6 flex flex-wrap items-center gap-3",children:[(0,G.showsQtyStepper)(eh)?(0,t.jsx)(D.SfQtyStepper,{value:ew,onChange:ey,min:1,max:e$,className:"h-11"}):null,(0,G.showsCartActions)(eh)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.SfButton,{"aria-label":"Buynow",variant:"gold",size:"lg",disabled:eb||eG,onClick:()=>{if(ev&&null==eT)return eC(!0);ej({formats:eV()})},children:W("common.BUY_NOW")}),(0,t.jsxs)(w.SfButton,{"aria-label":"add-to-cart",variant:"primary",size:"lg",disabled:eq,onClick:()=>{if(ev&&null==eT)return eC(!0);eP({quantity:ew,formats:eV()})},children:[(0,t.jsx)(a.ShoppingCart,{className:"size-4","aria-hidden":!0}),W("common.ADD_TO_CART")]})]}):null,(0,G.showsReadAction)(eh)?(0,t.jsxs)(w.SfButton,{"aria-label":"read-book",variant:"outline",size:"lg",onClick:()=>void eK(),children:[(0,t.jsx)(o.BookOpen,{className:"size-4","aria-hidden":!0}),W("common.READ_BOOK")]}):null,(0,t.jsx)("button",{type:"button","aria-label":"Wishlist","aria-pressed":eg,disabled:ep,onClick:()=>void eE(),className:"flex size-11 items-center justify-center rounded-full border border-gold-tan/60 bg-white text-maroon transition-colors hover:border-maroon hover:bg-surface-cream disabled:opacity-60",children:(0,t.jsx)(r.Heart,{className:(0,O.cn)("size-5",eg&&"fill-current"),"aria-hidden":!0})})]}),(0,t.jsxs)("div",{className:"mt-7 flex flex-col gap-3 border-t border-gold-tan/30 pt-5 text-sm",children:[eM?(0,t.jsxs)("p",{className:"text-ink-muted",children:[(0,t.jsxs)("span",{className:"font-semibold text-ink",children:[W("SF.PDP.SKU"),":"]})," ",eM]}):null,eh?.tags?.length?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"font-semibold text-ink",children:[W("SF.PDP.TAGS"),":"]}),eh.tags.map((e,i)=>(0,t.jsx)(j.SfBadge,{variant:"cream",children:e||""},`${e}-${i}`))]}):null,(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{className:"font-semibold text-ink",children:[W("common.SHARE"),":"]}),(0,t.jsx)(c.RWebShare,{data:{text:eh?.title,url:window.location.href,title:"Gita press"},children:(0,t.jsx)("button",{type:"button","aria-label":"share",className:"flex size-9 items-center justify-center rounded-full bg-surface-bone text-maroon transition-colors hover:bg-gold-sand",children:(0,t.jsx)(d.Share2,{className:"size-4","aria-hidden":!0})})})]})]})]})]})]}),(0,t.jsxs)(y.SfContainer,{className:"py-8 sm:py-10",children:[(0,t.jsx)(Q.default,{product:eh}),e1.length?(0,t.jsx)(J.default,{editions:e1,currentId:e0}):(0,H.isBookProduct)(eh)&&!(0,$.hasRelations)(eh)?(0,t.jsx)(Z,{productId:eh?.id||eh?._id}):null]}),(0,t.jsx)(y.SfContainer,{children:(0,t.jsx)(v,{items:eh?.youtubeShorts??[]})}),(0,t.jsx)(N.SfProductRow,{title:W("SF.PDP.RELATED_TITLE"),accent:W("SF.PDP.RELATED_ACCENT"),eyebrow:W("SF.PDP.RELATED_EYEBROW"),url:A.default.client.getRelatedProduct,productId:eh?.id,method:"POST"}),(0,t.jsx)(N.SfProductRow,{title:W("common.BROWSING_HISTORY"),url:A.default.client.bestSeller}),(0,t.jsx)(y.SfContainer,{className:"pb-12 pt-4",children:(0,t.jsx)(et.default,{})}),(0,t.jsx)(C.Dialog,{open:eI,onOpenChange:()=>{eC(!1),eO([])},modal:!0,children:(0,t.jsx)(u.default,{count:ew,updateselectedFormat:e=>{let t=e?.target?.checked,i=e?.target?.value,l=[...eL];t?l.push(i):l=l.filter(e=>e!=i),eO(Array.from(new Set(l)))},data:eh,fontSize:12,buyNow:()=>{eC(!1),ej({formats:eL}),eO([])},addToCart:()=>{eC(!1),eP({quantity:ew,formats:eL}),eO([])},selectedFormat:eL})}),(0,t.jsx)(C.Dialog,{open:eA,onOpenChange:()=>ek(!1),children:(0,t.jsx)(m.default,{})}),(0,t.jsx)(h.ExternalPaymentRedirectDialog,{open:eS,onOpenChange:eN})]})}e.s(["ProductDetailPage",0,el,"default",0,el],599462)}]);

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.