try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="156de8af-1caa-4f08-a43f-412ab9497ccf",e._sentryDebugIdIdentifier="sentry-dbid-156de8af-1caa-4f08-a43f-412ab9497ccf")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6836],{2987:(e,r,t)=>{"use strict";t.d(r,{default:()=>a.a});var l=t(30080),a=t.n(l)},29191:(e,r,t)=>{"use strict";t.d(r,{Zp:()=>c,aR:()=>d,bw:()=>u,wL:()=>f});var l=t(99702),a=t(26294),n=t(6466);let s={default:"bg-white",bordered:"bg-white border border-gray-300",shadow:"bg-white shadow-md border border-gray-300",elevated:"bg-white shadow-lg border border-gray-300"},o={none:"",sm:"p-2",md:"p-4",lg:"p-6"},i={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},c=a.forwardRef(function(e,r){let{children:t,className:a,as:c="div",href:d,onClick:u,variant:f="default",padding:h="md",rounded:m="lg",style:g}=e,x={className:(0,n.QP)("transition-all duration-200",s[f],o[h],i[m],a),...u&&{onClick:u},...d&&{href:d},...g&&{style:g},ref:r};return(0,l.jsx)(c,{...x,children:t})});function d(e){let{children:r,className:t,padding:a="md"}=e;return(0,l.jsx)("div",{className:(0,n.QP)("flex flex-col gap-1",o[a],t),children:r})}function u(e){let{children:r,className:t,padding:a="md",style:s}=e;return(0,l.jsx)("div",{className:(0,n.QP)("flex flex-col gap-2",o[a],t),style:s,children:r})}function f(e){let{children:r,className:t,padding:a="md"}=e;return(0,l.jsx)("div",{className:(0,n.QP)("flex items-center justify-between",o[a],t),children:r})}},30080:(e,r,t)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),!function(e,r){for(var t in r)Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}(r,{default:function(){return i},getImageProps:function(){return o}});let l=t(93971),a=t(19108),n=t(84792),s=l._(t(144));function o(e){let{props:r}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],qualities:[25,50,75,85,100],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,t]of Object.entries(r))void 0===t&&delete r[e];return{props:r}}let i=n.Image},30414:(e,r,t)=>{"use strict";t.d(r,{A:()=>i});var l=t(26294);let a=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)},n=function(){for(var e=arguments.length,r=Array(e),t=0;t!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim()};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,l.forwardRef)((e,r)=>{let{color:t="currentColor",size:a=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:c="",children:d,iconNode:u,...f}=e;return(0,l.createElement)("svg",{ref:r,...s,width:a,height:a,stroke:t,strokeWidth:i?24*Number(o)/Number(a):o,className:n("lucide",c),...!d&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0})(f)&&{"aria-hidden":"true"},...f},[...u.map(e=>{let[r,t]=e;return(0,l.createElement)(r,t)}),...Array.isArray(d)?d:[d]])}),i=(e,r)=>{let t=(0,l.forwardRef)((t,s)=>{let{className:i,...c}=t;return(0,l.createElement)(o,{ref:s,iconNode:r,className:n("lucide-".concat(a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),i),...c})});return t.displayName=a(e),t}},32704:(e,r,t)=>{"use strict";t.d(r,{ReviewCard:()=>d});var l=t(99702),a=t(29191),n=t(2987);let s=(0,t(26294).memo)(function(e){var r;let{author:t}=e;if(!t)return null;let a=null==(r=t.image)?void 0:r.trim(),s=(null==a?void 0:a.startsWith("/"))?a:a?"/".concat(a):void 0;return(0,l.jsxs)("div",{className:"flex items-center flex-shrink-0 h-8 text-center",children:[s&&(0,l.jsx)("div",{className:"w-8 h-8 rounded-full border border-slate-400 overflow-hidden shrink-0",children:(0,l.jsx)(n.default,{src:s,alt:"Avatar of ".concat(t.name),width:32,height:32,sizes:"32px",quality:85,className:"w-full h-full object-cover"})}),(0,l.jsxs)("div",{className:"".concat(s?"ml-2":""," flex flex-col justify-center"),children:[(0,l.jsx)("p",{className:"my-0 text-xs leading-none",children:t.name}),t.description&&(0,l.jsx)("p",{className:"my-0 text-[10px] leading-3 text-muted mt-0.5",children:t.description})]})]})});var o=t(43744),i=t(6466);let c={carousel:{base:"w-52 md:w-72 h-48 cursor-pointer",bordered:"border border-border shadow-sm",borderless:"shadow-none"},books:{base:"w-48 md:w-64 h-40",bordered:"border border-border-strong shadow-md",borderless:"shadow-none"}};function d(e){let{review:r,showRating:t=!1,showBorder:n=!0,variant:d="carousel",className:u,onClick:f}=e,h=c[d],m="".concat(h.base," ").concat(n?h.bordered:h.borderless),g=r.content.length,x=(()=>{let e=Math.max(9,Math.min(16,16-(g-60)/8));return{className:"leading-tight tracking-tight",style:{fontSize:"".concat(e,"px"),lineHeight:"1.1"}}})();return(0,l.jsxs)(a.Zp,{variant:n?"bordered":"default",className:(0,i.QP)(m,"py-4 px-6 flex flex-col gap-3 h-full",u),onClick:f,children:[t&&r.rating&&(0,l.jsxs)("div",{className:"flex items-center justify-center gap-1 flex-shrink-0","aria-label":"Rating: ".concat(r.rating," out of 5 stars"),children:[[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(o.A,{className:"w-5 h-5 ".concat(t{"use strict";t.d(r,{A:()=>l});let l=(0,t(30414).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},57059:(e,r,t)=>{Promise.resolve().then(t.t.bind(t,43231,23)),Promise.resolve().then(t.t.bind(t,84792,23)),Promise.resolve().then(t.bind(t,76739))},76739:(e,r,t)=>{"use strict";t.r(r),t.d(r,{ReviewsCarousel:()=>o});var l=t(99702),a=t(26294),n=t(32704);let s=(0,a.memo)(function(e){var r;let{review:t,showRating:s,showBorder:o,index:i,onCardClick:c}=e,d=(0,a.useCallback)(()=>c(i),[c,i]),u=(0,a.useCallback)(e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c(i))},[c,i]);return(0,l.jsx)("div",{className:"w-52 md:w-72 h-48 shrink-0 flex snap-center","data-index":i,onClick:d,onKeyDown:u,role:"button",tabIndex:0,"aria-label":"Center review ".concat(i+1," of ").concat((null==(r=t.author)?void 0:r.name)||"anonymous"),children:(0,l.jsx)(n.ReviewCard,{review:t,showRating:s,showBorder:o,className:"h-full"})})}),o=(0,a.memo)(function(e){let{reviews:r,showRatings:t,title:n="Some reviews",width:o,height:i,showBorder:c=!0}=e,d=(0,a.useRef)(null),{isDragging:u,handleDragStart:f,handleDragEnd:h,handleDragMove:m}=(e=>{let[r,t]=(0,a.useState)(!1),l=(0,a.useRef)({x:0,scrollLeft:0}),n=(0,a.useCallback)(r=>{var a,n;e.current&&(t(!0),l.current={x:"touches"in r&&r.touches&&r.touches.length>0&&null!=(n=null==(a=r.touches[0])?void 0:a.clientX)?n:r.clientX,scrollLeft:e.current.scrollLeft})},[e]),s=(0,a.useCallback)(()=>{t(!1)},[]),o=(0,a.useCallback)(t=>{var a,n;if(!r||!e.current)return;t.preventDefault();let s="touches"in t&&t.touches&&t.touches.length>0&&null!=(n=null==(a=t.touches[0])?void 0:a.clientX)?n:t.clientX,o=l.current.x-s;e.current.scrollLeft=l.current.scrollLeft+o},[r,e]);return{isDragging:r,handleDragStart:n,handleDragEnd:s,handleDragMove:o}})(d),g=(0,a.useCallback)(e=>{if(d.current){let r=d.current.children[e];r&&r.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})}},[d]),x=(0,a.useCallback)(e=>{if(!d.current)return;let r=d.current;r.scrollLeft;let t=r.clientWidth,l=r.querySelector(".carousel-item");if(!l)return;let a=l.getBoundingClientRect().width,n=(t-a*Math.floor(t/a))/(Math.floor(t/a)-1||1),s=a+n;"ArrowRight"===e.key?r.scrollBy({left:s,behavior:"smooth"}):"ArrowLeft"===e.key&&r.scrollBy({left:-s,behavior:"smooth"})},[]),v=(0,a.useCallback)(e=>r=>{(null==r?void 0:r.currentTarget)&&(null==r?void 0:r.target)&&(r.persist(),e(r))},[]),b=r.length<2,w=r.length<3&&"lg"===o;return(0,l.jsxs)("div",{className:"".concat("sm"===i?"mt-0 mb-0 p-0":"")+" p-4",children:[(0,l.jsx)("h3",{className:"text-xl font-semibold mb-4",children:n}),(0,l.jsx)("div",{className:"w-full relative",children:(0,l.jsx)("div",{className:"relative",onKeyDown:x,role:"region",tabIndex:0,"aria-label":"Reviews carousel - use arrow keys to navigate, or drag to scroll",children:(0,l.jsx)("div",{className:"mx-auto mb-4 relative overflow-x-scroll select-none\n max-w-[280px] sm:max-w-[380px] md:max-w-[420px] ".concat("lg"===o?"lg:max-w-[600px]":"","\n cursor-grab active:cursor-grabbing ").concat(b?"flex justify-center":"","\n scrollbar-hide h-48\n scroll-smooth snap-x snap-mandatory"),ref:d,onMouseDown:v(f),onMouseUp:v(h),onMouseLeave:v(h),onMouseMove:v(m),onTouchStart:v(f),onTouchEnd:v(h),onTouchMove:v(m),role:"region","aria-label":"Reviews carousel - drag to scroll or click on a review to center it","aria-live":"polite",children:(0,l.jsx)("div",{className:"flex space-x-4 md:space-x-6 h-full ".concat(w?"md:justify-center":""),children:r.map((e,r)=>(0,l.jsx)(s,{review:e,showRating:t,showBorder:c,index:r,onCardClick:g},"review-".concat(r)))})})})})]})})}},e=>{e.O(0,[3231,6466,4792,9110,3947,7358],()=>e(e.s=57059)),_N_E=e.O()}]);