try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2c7c27f1-41fc-4e25-9d0e-f0394553fcc8",e._sentryDebugIdIdentifier="sentry-dbid-2c7c27f1-41fc-4e25-9d0e-f0394553fcc8")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8629],{35736:(e,t,r)=>{"use strict";r.d(t,{ReviewsCarousel:()=>c});var o=r(97657),l=r(87085),n=r(36280);let s={SCROLL_AMOUNT:300},a=(0,l.memo)(function(e){let{review:t,showRating:r,isLast:l}=e;return(0,o.jsx)("div",{className:"w-48 md:w-64 shrink-0 ".concat(l?"":"mr-4 md:mr-8"),children:(0,o.jsx)(n.ReviewCard,{review:t,showRating:r})})}),i=(0,l.memo)(function(e){let{direction:t,show:r,onClick:l}=e;return(0,o.jsx)("button",{onClick:l,className:"absolute ".concat(t,"-0 top-0 bottom-0 w-16 bg-transparent\n no-button-style shadow-none focus:ring-0 focus:outline-hidden active:bg-transparent \n border-none focus:border-none outline-hidden\n ").concat(r?"bg-gradient-".concat("left"===t?"to-r":"to-l"," from-white to-transparent"):"pointer-events-none"),"aria-label":"Scroll ".concat(t)})}),c=(0,l.memo)(function(e){let{reviews:t,showRatings:r,title:n="Some reviews",width:c,height:u}=e,d=(0,l.useRef)(null),[m,h]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!0),x=(0,l.useCallback)(()=>{let e=d.current;if(!e)return;let{scrollLeft:t,scrollWidth:r,clientWidth:o}=e;h(t>0),b(t{let t=d.current;if(!t)return;let r="left"===e?-s.SCROLL_AMOUNT:s.SCROLL_AMOUNT;t.scrollBy({left:r,behavior:"smooth"})},[]),{isDragging:v,handleDragStart:g,handleDragEnd:w,handleDragMove:y}=(e=>{let[t,r]=(0,l.useState)(!1),o=(0,l.useRef)({x:0,scrollLeft:0}),n=(0,l.useCallback)(t=>{e.current&&(r(!0),o.current={x:"touches"in t?t.touches[0].clientX:t.clientX,scrollLeft:e.current.scrollLeft})},[e]),s=(0,l.useCallback)(()=>{r(!1)},[]),a=(0,l.useCallback)(r=>{if(!t||!e.current)return;r.preventDefault();let l="touches"in r?r.touches[0].clientX:r.clientX,n=o.current.x-l;e.current.scrollLeft=o.current.scrollLeft+n},[t,e]);return{isDragging:t,handleDragStart:n,handleDragEnd:s,handleDragMove:a}})(d),k=(0,l.useCallback)(e=>{(null==e?void 0:e.currentTarget)&&(null==e?void 0:e.target)&&(e.persist(),y(e))},[y]),j=(0,l.useCallback)(e=>{(null==e?void 0:e.currentTarget)&&(null==e?void 0:e.target)&&(e.persist(),g(e))},[g]),N=(0,l.useCallback)(e=>{(null==e?void 0:e.currentTarget)&&(null==e?void 0:e.target)&&(e.persist(),w())},[w]),C=t.length<2,B=t.length<3&&"lg"===c;return(0,o.jsxs)("section",{className:"".concat("sm"===u?"mt-0 mb-0 p-0":""," section-separator"),children:[(0,o.jsx)("h3",{className:"text-2xl font-bold mb-4",children:n}),(0,o.jsxs)("div",{className:"w-full relative",children:[(0,o.jsx)("div",{className:"mx-auto mb-4 relative overflow-x-auto scrollbar-hide select-none\n max-w-[280px] sm:max-w-[380px] md:max-w-[420px] ".concat("lg"===c?"lg:max-w-[600px]":"","\n cursor-grab active:cursor-grabbing ").concat(C?"flex justify-center":""),ref:d,onScroll:x,onMouseDown:j,onMouseUp:N,onMouseLeave:N,onMouseMove:k,onTouchStart:j,onTouchEnd:N,onTouchMove:k,children:(0,o.jsx)("div",{className:"flex ".concat(B?"md:justify-center":""),children:t.map((e,l)=>(0,o.jsx)(a,{review:e,showRating:r,isLast:l===t.length-1},"review-".concat(l)))})}),(0,o.jsx)(i,{direction:"left",show:m,onClick:()=>p("left")}),(0,o.jsx)(i,{direction:"right",show:f,onClick:()=>p("right")})]})]})})},36280:(e,t,r)=>{"use strict";r.d(t,{ReviewCard:()=>f});var o=r(97657),l=r(77633),n=r(61472),s=r(26342),a=r(87085);let i=(0,a.memo)(function(e){var t;let{author:r}=e;if(!r)return null;let l=null==(t=r.image)?void 0:t.trim(),n=(null==l?void 0:l.startsWith("/"))?l:l?"/".concat(l):void 0;return(0,o.jsxs)("div",{className:"flex mx-auto items-center",children:[n&&(0,o.jsx)("div",{className:"w-8 h-8 rounded-full border border-slate-400 overflow-hidden shrink-0",children:(0,o.jsx)(s.default,{src:n,alt:"Avatar of ".concat(r.name),width:30,height:30,className:"w-full h-full object-cover"})}),(0,o.jsxs)("div",{className:"".concat(n?"ml-2":""),children:[(0,o.jsx)("p",{className:"my-0 text-xs",children:r.name}),r.description&&(0,o.jsx)("p",{className:"my-0 text-[10px] leading-3 text-slate-400",children:r.description})]})]})});var c=r(21471);let u={active:"text-yellow-400 fill-yellow-400",inactive:"text-gray-300",base:"w-5 h-5"},d=(0,a.memo)(function(e){let{rating:t,maxStars:r=5}=e;return(0,o.jsx)("div",{className:"flex mx-auto mb-2",role:"img","aria-label":"".concat(t," out of ").concat(r," stars"),children:Array.from({length:r},(e,r)=>(0,o.jsx)(c.A,{className:"".concat(u.base," ").concat(r{Promise.resolve().then(r.t.bind(r,63330,23)),Promise.resolve().then(r.t.bind(r,2095,23)),Promise.resolve().then(r.bind(r,87590)),Promise.resolve().then(r.bind(r,8342)),Promise.resolve().then(r.bind(r,35736)),Promise.resolve().then(r.bind(r,64650)),Promise.resolve().then(r.bind(r,78664)),Promise.resolve().then(r.bind(r,53144)),Promise.resolve().then(r.bind(r,69857))},64650:(e,t,r)=>{"use strict";r.d(t,{BookImage:()=>n});var o=r(87085),l=r(26342);let n=(0,o.memo)(e=>{let{maxRetries:t=3,retryDelay:r=1e3,priority:n=!1,...s}=e,[a,i]=(0,o.useState)(0),c=a{if(!c||0===a)return;let e=setTimeout(()=>i(0),r);return()=>clearTimeout(e)},[a,r,c]);let u=(0,o.useCallback)(()=>{c&&i(e=>e+1)},[c]);return(0,o.createElement)(l.default,{...s,key:a,onError:u,priority:n,alt:s.alt||"Book cover image"})});n.displayName="BookImage"},65015:(e,t,r)=>{"use strict";r.d(t,{B:()=>b});var o=r(97657),l=r(69267),n=r(50295),s=r(51987),a=r(65566),i=r(631),c=r(53993),u=r(42342),d=r(28630),m=r(87085),h=r(18505);let f="/books/preorder",b=m.memo(e=>{let{book:t,isOpen:r,onOpenChange:b}=e,{sendEvent:x}=(0,h.s)(),p=!!(null==t?void 0:t.title),v=(0,m.useMemo)(()=>{if(!p)return[];let e=[];return(t.amazonLink||f)&&e.push({type:"Paperback",href:t.amazonLink||f}),(t.myStoreLink||f)&&e.push({type:"eBook",href:t.myStoreLink||f}),t.hasAudiobook&&t.myStoreLink&&e.push({type:"Audiobook",href:t.myStoreLink}),t.hasAudible&&t.amazonLink&&e.push({type:"Audible",href:t.amazonLink}),e},[t,p]),g=(0,m.useCallback)(e=>{null==b||b(e)},[b]);if(!p){let e=Error("BuyBookModal: Book or book title is missing");return console.error(e),l.Cp(e),null}if(0===v.length){let e=Error("BuyBookModal: No purchase options available for book: ".concat(t.title));return console.warn(e),l.wd(e.message,{level:"warning"}),null}return(0,o.jsx)(n.Y,{isOpen:r,onOpenChange:g,size:"sm",hideCloseButton:!0,children:(0,o.jsx)(s.g,{className:"pb-0",children:e=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(a.c,{className:"flex flex-col gap-1",children:["Buy ",t.title]}),(0,o.jsx)(i.h,{children:v.map(e=>{let{type:r,href:n}=e;return(0,o.jsxs)(c.T,{as:u.h,href:n,color:"primary",className:"w-full mb-2",isExternal:n.startsWith("http"),"aria-label":"Buy ".concat(r," version of ").concat(t.title),onPress:()=>{try{if(!n)return;x({name:"redirect_to_ext_store_with_intent_to_buy",params:{book_title:t.title,format:r}}),n.startsWith("http")&&window.open(n,"_blank","noopener,noreferrer")}catch(e){console.error("Error handling button press:",e),l.Cp(e)}},children:[r,"Audible"===r&&(0,o.jsx)("span",{className:"text-xs",children:"(only on Amazon.com \uD83C\uDDFA\uD83C\uDDF8)"})]},r)})}),(0,o.jsx)(d.q,{children:(0,o.jsx)(c.T,{color:"primary",variant:"light",onPress:()=>{try{null==e||e()}catch(e){console.error("Error closing modal:",e),l.Cp(e)}},className:"shadow-none text-white","aria-label":"Close purchase options modal",children:"Close"})})]})})})});b.displayName="BuyBookModal"},69857:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var o=r(97657),l=r(77633),n=r(61472);let s=(0,r(80508).default)(()=>Promise.all([r.e(392),r.e(3993),r.e(1618),r.e(6092)]).then(r.bind(r,56092)),{loadableGenerated:{webpack:()=>[56092]},ssr:!1,loading:()=>(0,o.jsx)(l.Z,{className:"w-full",children:(0,o.jsx)(n.U,{className:"flex flex-col items-center p-6",children:(0,o.jsx)("p",{children:"Loading PDF viewer..."})})})});function a(e){let{pdfUrl:t,className:r="",downloadText:l="Download presentation"}=e;return(0,o.jsx)(s,{pdfUrl:t,className:r,downloadText:l})}},78664:(e,t,r)=>{"use strict";r.d(t,{BuyBookButton:()=>c});var o=r(97657),l=r(69267),n=r(31676),s=r(53993),a=r(87085),i=r(65015);let c=(0,a.memo)(e=>{let{book:t,className:r}=e,{isOpen:a,onOpen:c,onOpenChange:u}=(0,n.j)();return t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.T,{color:"primary",onPress:e=>{try{null==c||c()}catch(e){console.error("Error opening modal:",e),l.Cp(e)}},"aria-label":"Buy ".concat(t.title),className:"".concat(r," rounded-lg shadow-lg text-white"),children:"Buy Now"}),(0,o.jsx)(i.B,{book:t,isOpen:a,onOpenChange:u})]}):(!function(){let e="BuyBookButton: No book provided";console.warn(e),l.wd(e,{level:"warning",extra:{component:"BuyBookButton"}})}(),null)});c.displayName="BuyBookButton"}},e=>{e.O(0,[7924,2095,3993,7612,9179,3161,3381,9563,2355,6922,1082,6331,4341,7358],()=>e(e.s=37943)),_N_E=e.O()}]);