1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,35382,e=>{"use strict";var t=e.i(86427),r=e.i(71645),a=e.i(37806),i=e.i(47414);function n(e){let n=(0,i.useConstant)(()=>(0,t.motionValue)(e)),{isStatic:s}=(0,r.useContext)(a.MotionConfigContext);if(s){let[,t]=(0,r.useState)(e);(0,r.useEffect)(()=>n.on("change",t),[])}return n}e.s(["useMotionValue",()=>n])},72328,e=>{"use strict";var t=e.i(71645),r=e.i(22875),a=e.i(96097);function i(){a.hasReducedMotionListener.current||(0,r.initPrefersReducedMotion)();let[e]=(0,t.useState)(a.prefersReducedMotion.current);return e}e.s(["useReducedMotion",()=>i])},10542,58866,e=>{"use strict";let t,r;var a=e.i(86427),i=e.i(65566),n=e.i(71645),s=e.i(60830),l=e.i(36985);function o(e,t){let r,a=()=>{let{currentTime:a}=t,i=(null===a?0:a.value)/100;r!==i&&e(i),r=i};return l.frame.preUpdate(a,!0),()=>(0,l.cancelFrame)(a)}var c=e.i(30551),d=e.i(89026),u=e.i(49652);let m=new WeakMap,f=(e,t,r)=>(a,i)=>i&&i[0]?i[0][e+"Size"]:(0,d.isSVGElement)(a)&&"getBBox"in a?a.getBBox()[t]:a[r],h=f("inline","width","offsetWidth"),g=f("block","height","offsetHeight");function x(e){let{target:t,borderBoxSize:r}=e;m.get(t)?.forEach(e=>{e(t,{get width(){return h(t,r)},get height(){return g(t,r)}})})}function p(e){e.forEach(x)}let b=new Set;var v=e.i(83920),y=e.i(25791);let j=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),w={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function N(e,t,r,a){let i=r[t],{length:n,position:s}=w[t],l=i.current,o=r.time;i.current=e[`scroll${s}`],i.scrollLength=e[`scroll${n}`]-e[`client${n}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=(0,v.progress)(0,i.scrollLength,i.current);let c=a-o;i.velocity=c>50?0:(0,y.velocityPerSecond)(i.current-l,c)}e.i(47167);var k=e.i(44230),C=e.i(15923),S=e.i(76959),M=e.i(72846);let L={start:0,center:.5,end:1};function T(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=0;if(e in L&&(e=L[e]),"string"==typeof e){let t=parseFloat(e);e.endsWith("px")?a=t:e.endsWith("%")?e=t/100:e.endsWith("vw")?a=t/100*document.documentElement.clientWidth:e.endsWith("vh")?a=t/100*document.documentElement.clientHeight:e=t}return"number"==typeof e&&(a=t*e),r+a}let z=[0,0],E=[[0,0],[1,1]],R={x:0,y:0},A=new WeakMap,B=new WeakMap,P=new WeakMap,I=e=>e===document.scrollingElement?window:e;function O(e){let{container:a=document.scrollingElement,...i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a)return s.noop;let n=P.get(a);n||(n=new Set,P.set(a,n));let o=function(e,t,r){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{measure:t=>{!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let a=t;for(;a&&a!==e;)r.x.targetOffset+=a.offsetLeft,r.y.targetOffset+=a.offsetTop,a=a.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight}(e,a.target,r),N(e,"x",r,t),N(e,"y",r,t),r.time=t,(a.offset||a.target)&&function(e,t,r){let{offset:a=E}=r,{target:i=e,axis:n="y"}=r,s="y"===n?"height":"width",l=i!==e?function(e,t){let r={x:0,y:0},a=e;for(;a&&a!==t;)if((0,M.isHTMLElement)(a))r.x+=a.offsetLeft,r.y+=a.offsetTop,a=a.offsetParent;else if("svg"===a.tagName){let e=a.getBoundingClientRect(),t=(a=a.parentElement).getBoundingClientRect();r.x+=e.left-t.left,r.y+=e.top-t.top}else if(a instanceof SVGGraphicsElement){let{x:e,y:t}=a.getBBox();r.x+=e,r.y+=t;let i=null,n=a.parentNode;for(;!i;)"svg"===n.tagName&&(i=n),n=a.parentNode;a=i}else break;return r}(i,e):R,o=i===e?{width:e.scrollWidth,height:e.scrollHeight}:"getBBox"in i&&"svg"!==i.tagName?i.getBBox():{width:i.clientWidth,height:i.clientHeight},c={width:e.clientWidth,height:e.clientHeight};t[n].offset.length=0;let d=!t[n].interpolate,u=a.length;for(let e=0;e<u;e++){let r=function(e,t,r,a){let i=Array.isArray(e)?e:z,n=0;
1return"number"==typeof e?i=[e,e]:"string"==typeof e&&(i=(e=e.trim()).includes(" ")?e.split(" "):[e,L[e]?e:"0"]),(n=T(i[0],r,a))-T(i[1],t)}(a[e],c[s],o[s],l[n]);d||r===t[n].interpolatorOffsets[e]||(d=!0),t[n].offset[e]=r}d&&(t[n].interpolate=(0,k.interpolate)(t[n].offset,(0,C.defaultOffset)(a),{clamp:!1}),t[n].interpolatorOffsets=[...t[n].offset]),t[n].progress=(0,S.clamp)(0,1,t[n].interpolate(t[n].current))}(e,r,a)},notify:()=>t(r)}}(a,e,{time:0,x:j(),y:j()},i);if(n.add(o),!A.has(a)){let e,i=()=>{for(let e of n)e.measure(l.frameData.timestamp);l.frame.preUpdate(s)},s=()=>{for(let e of n)e.notify()},o=()=>l.frame.read(i);A.set(a,o);let c=I(a);window.addEventListener("resize",o,{passive:!0}),a!==document.documentElement&&B.set(a,"function"==typeof a?(b.add(a),r||(r=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};b.forEach(t=>t(e))},window.addEventListener("resize",r)),()=>{b.delete(a),b.size||"function"!=typeof r||(window.removeEventListener("resize",r),r=void 0)}):(t||"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(p)),(e=(0,u.resolveElements)(a)).forEach(e=>{let r=m.get(e);r||(r=new Set,m.set(e,r)),r.add(o),t?.observe(e)}),()=>{e.forEach(e=>{let r=m.get(e);r?.delete(o),r?.size||t?.unobserve(e)})})),c.addEventListener("scroll",o,{passive:!0}),o()}let c=A.get(a);return l.frame.read(c,!1,!0),()=>{(0,l.cancelFrame)(c);let e=P.get(a);if(!e||(e.delete(o),e.size))return;let t=A.get(a);A.delete(a),t&&(I(a).removeEventListener("scroll",t),B.get(a)?.(),window.removeEventListener("resize",t))}}let $=new Map;function F(e){var t;let r,a,{source:i,container:n,...s}=e,{axis:l}=s;i&&(n=i);let o=$.get(n)??new Map;$.set(n,o);let d=s.target??"self",u=o.get(d)??{},m=l+(s.offset??[]).join(",");return u[m]||(u[m]=!s.target&&(0,c.supportsScrollTimeline)()?new ScrollTimeline({source:n,axis:l}):(t={container:n,...s},r={value:0},a=O(e=>{r.value=100*e[t.axis].progress},t),{currentTime:r,cancel:a})),u[m]}var q=e.i(47414),H=e.i(74008);let W=()=>({scrollX:(0,a.motionValue)(0),scrollY:(0,a.motionValue)(0),scrollXProgress:(0,a.motionValue)(0),scrollYProgress:(0,a.motionValue)(0)}),D=e=>!!e&&!e.current;function _(){let{container:e,target:t,...r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(0,q.useConstant)(W),l=(0,n.useRef)(null),c=(0,n.useRef)(!1),d=(0,n.useCallback)(()=>(l.current=function(e){var t,r;let a,{axis:i="y",container:n=document.scrollingElement,...l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n)return s.noop;let c={axis:i,container:n,...l};return"function"==typeof e?(t=e,r=c,2===t.length?O(e=>{t(e[r.axis].progress,e)},r):o(t,F(r))):(a=F(c),e.attachTimeline({timeline:c.target?void 0:a,observe:e=>(e.pause(),o(t=>{e.time=e.iterationDuration*t},a))}))}((e,t)=>{let{x:r,y:i}=t;a.scrollX.set(r.current),a.scrollXProgress.set(r.progress),a.scrollY.set(i.current),a.scrollYProgress.set(i.progress)},{...r,container:e?.current||void 0,target:t?.current||void 0}),()=>{l.current?.()}),[e,t,JSON.stringify(r.offset)]);return(0,H.useIsomorphicLayoutEffect)(()=>{if(c.current=!1,!(D(e)||D(t)))return d();c.current=!0},[d]),(0,n.useEffect)(()=>c.current?((0,i.invariant)(!D(e),"Container ref is defined but not hydrated","use-scroll-ref"),(0,i.invariant)(!D(t),"Target ref is defined but not hydrated","use-scroll-ref"),d()):void 0,[d]),a}function G(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let a=!Array.isArray(t[0]),i=a?0:-1,n=t[0+i],s=t[1+i],l=t[2+i],o=t[3+i],c=(0,k.interpolate)(s,l,o);return a?c(n):c}e.s(["useScroll",()=>_],10542),e.s(["transform",()=>G],58866)},95420,e=>{"use strict";var t=e.i(58866),r=e.i(47414),a=e.i(36985),i=e.i(74008),n=e.i(35382);function s(e,t){let r=(0,n.useMotionValue)(t()),s=()=>r.set(t());return s(),(0,i.useIsomorphicLayoutEffect)(()=>{let t=()=>a.frame.preRender(s,!1,!0),r=e.map(e=>e.on("change",t));return()=>{r.forEach(e=>e()),(0,a.cancelFrame)(s)}}),r}var l=e.i(86427);function o(e,r,a,i){if("function"==typeof e){let t;return l.collectMotionValues.current=[],e(),t=s(l.collectMotionValues.current,e),l.collectMotionValues.current=void 0,t}let n="function"==typeof r?r:(0,t.transform)(r,a,i);
1return Array.isArray(e)?c(e,n):c([e],e=>{let[t]=e;return n(t)})}function c(e,t){let a=(0,r.useConstant)(()=>[]);return s(e,()=>{a.length=0;let r=e.length;for(let t=0;t<r;t++)a[t]=e[t].get();return t(a)})}e.s(["useTransform",()=>o],95420)},6909,e=>{"use strict";var t=e.i(43476),r=e.i(46932),a=e.i(35382),i=e.i(72328),n=e.i(10542),s=e.i(95420),l=e.i(71645),o=e.i(57688),c=e.i(47163),d=e.i(97971);let u=[0,1],m=["0%","20%"];function f(e){let{scrollYProgress:t}=(0,n.useScroll)({target:e,offset:["start start","end start"]}),r=(0,i.useReducedMotion)(),l=(0,s.useTransform)(t,[...u],[...m]),o=(0,a.useMotionValue)("0%");return{scrollYProgress:t,y:r?o:l}}let h={center:"object-center",bottom:"object-bottom",top:"object-top"};function g(e){let{y:a,imageUrl:i,alt:n,overlayClassName:s,imagePosition:l="center"}=e,u=(0,d.getHeroImageUrl)(i),m=null==s,f=h[l];return(0,t.jsxs)(r.motion.div,{className:"absolute inset-0 overflow-hidden",style:{y:a},"aria-hidden":!0,children:[(0,t.jsx)(o.default,{src:u,alt:n,fill:!0,sizes:"100vw",priority:!0,quality:80,className:(0,c.cn)("object-cover will-change-transform",f)}),m?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:(0,c.cn)("absolute inset-0","bg-gradient-to-b from-black/70 via-black/40 to-black/20 dark:from-c4-black/70 dark:via-c4-black/40 dark:to-c4-black/20")}),(0,t.jsx)("div",{className:(0,c.cn)("absolute inset-0","hidden md:block bg-gradient-to-b from-transparent from-[28%] to-[#121212]")})]}):(0,t.jsx)("div",{className:(0,c.cn)("absolute inset-0",s)})]})}function x(e){let{imageUrl:r,alt:a,overlayClassName:i,className:n,sectionRef:s,imagePosition:o="center",children:d}=e,u=(0,l.useRef)(null),m=s??u,{y:h}=f(m);return(0,t.jsxs)("section",{ref:m,className:(0,c.cn)("relative flex items-center justify-center overflow-hidden",n),children:[(0,t.jsx)(g,{y:h,imageUrl:r,alt:a,overlayClassName:i,imagePosition:o}),(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-0 top-0 h-32 bg-gradient-to-b from-c4-black/65 to-transparent z-[1]"}),(0,t.jsx)("div",{className:"relative z-10 w-full",children:d})]})}e.s(["ParallaxHeroBackground",()=>x,"ParallaxHeroBackgroundLayer",()=>g,"useParallaxHeroScroll",()=>f])},65960,e=>{"use strict";let t=(0,e.i(75254).default)("Quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);e.s(["Quote",()=>t],65960)},28088,51804,46657,49210,10620,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(99921),i=e.i(22016),n=e.i(18566),s=e.i(46897),l=e.i(87316),o=e.i(84614),c=e.i(38848);let d=(0,e.i(75254).default)("CalendarCheck",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"m9 16 2 2 4-4",key:"19s6y9"}]]);e.s(["CalendarCheck",()=>d],51804);var u=e.i(31278),m=e.i(47163);let f={full:{badge:"bg-destructive text-destructive-foreground",sidebar:"bg-destructive/10 text-destructive border border-destructive/20",inline:"text-destructive"},limited:{badge:"bg-c4-gold text-white",sidebar:"bg-c4-gold-dark/20 text-primary border border-primary/20",inline:"text-primary"},available:{badge:"border border-white/80 text-white bg-black/60",sidebar:"bg-card border border-primary/30 text-primary",inline:"text-primary"},unknown:{badge:"bg-muted/80 text-muted-foreground border border-border",sidebar:"bg-muted/50 text-muted-foreground border border-border",inline:"text-muted-foreground"}};function h(e){let{spots:r,groupSize:i=0,variant:n,showLive:s=!1,isLoading:l=!1,className:o}=e;if(!(null!=r&&r>=0)&&"badge"===n)return null;let{label:c,status:h}=(0,a.getAvailabilityStatus)(r??-1,i),g=f[h];return"sidebar"===n&&l?(0,t.jsxs)("div",{className:(0,m.cn)("space-y-1",o),children:[(0,t.jsx)("p",{className:"text-xs font-heading tracking-wider uppercase text-muted-foreground",children:"Availability"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-3 px-3 rounded-md bg-muted/50 border border-border",children:[(0,t.jsx)(u.Loader2,{className:"w-4 h-4 animate-spin text-primary shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Checking availabilityâ¦"})]})]}):"badge"===n?(0,t.jsxs)("span",{className:(0,m.cn)("safari-badge inline-flex items-center gap-1.5 shadow-md backdrop-blur-sm transition-transform duration-300",g.badge,o),"aria-label":c,children:[(0,t.jsx)(d,{className:"w-3.5 h-3.5 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{children:"full"===h?"Fully Booked":"limited"===h?`${r} Spots Left`:"unknown"===h?"Check availability":"Available"})]}):"sidebar"===n?(0,t.jsxs)("div",{className:(0,m.cn)("space-y-1",o),children:[(0,t.jsxs)("p",{className:"text-xs font-heading tracking-wider up
1percase text-muted-foreground",children:["Availability",s&&(0,t.jsx)("span",{className:"ml-2 inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-medium bg-primary/15 text-primary",children:"Live"})]}),(0,t.jsxs)("div",{className:(0,m.cn)("flex items-center justify-center gap-2 py-3 px-3 text-sm tracking-wider uppercase rounded-md",g.sidebar),role:"status","aria-live":"polite",children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{children:c})]}),i>0&&(r??-1)>=0&&"unknown"!==h&&(0,t.jsx)("p",{className:"text-center text-base text-muted-foreground",children:"full"===h?`0 of ${i} spots left`:`${r} of ${i} spots left`})]}):(0,t.jsxs)("span",{className:(0,m.cn)("inline-flex items-center gap-1.5",g.inline,o),children:[(0,t.jsx)(d,{className:"w-4 h-4 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{children:c})]})}e.s(["AvailabilityBadge",()=>h],46657);var g=e.i(59031);function x(e){return!e}e.s(["safariShowsGuestCapacity",()=>x],49210);var p=e.i(75747),b=e.i(28231);let v={Premier:"bg-primary text-primary-foreground",Classic:"bg-secondary text-foreground shadow-sm",Cultural:"bg-c4-gold-dark text-c4-cream",Workshop:"bg-muted text-foreground",Hide:"bg-c4-charcoal text-c4-cream border border-primary",Bespoke:"bg-primary text-primary-foreground"},y=(0,r.memo)(function(e){let{image:d,destination:u,title:m,slug:f,date:x,duration:y,price:j,priceCurrency:w="USD",customPriceText:N,availability:k,groupSize:C=0,isPackage:S=!1,guide:M,subtitle:L,categories:T,category:z,variant:E="default"}=e,R=`/safaris/${f}`,A=(0,n.useRouter)(),{isAvailabilityEnabled:B}=(0,p.useFeatureFlags)(),P=!S,I=P&&B()&&null!=k&&k>=0,O=(0,r.useMemo)(()=>T&&T.length>0?(0,g.sortSafariCategoriesForCardDisplay)(T):void 0,[T]),$=M?.name&&"TBA"!==M.name&&(M.guideLink??M.slug)?M.guideLink??`/leaders#${M.slug}`:null,F=(0,r.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),$&&A.push($)},[$,A]),q=null!=j?`${w} ${"ZAR"===w?"R":"$"}${(0,a.formatSafariPriceAmount)(j)}`:null;return(0,t.jsx)(i.default,{href:R,className:"group block h-full",children:(0,t.jsxs)("article",{className:"safari-card h-full flex flex-col min-h-0 overflow-hidden bg-card border border-border/50 dark:border-border hover:border-primary/50 transition-colors duration-200",children:[(0,t.jsxs)("div",{className:"relative aspect-[16/10] overflow-hidden bg-muted dark:bg-c4-charcoal/50",children:[(0,t.jsx)(c.ImageOptimized,{src:d||g.SAFARI_FALLBACK_IMAGE,alt:m,className:"w-full h-full object-cover rounded-t-[15px]",responsive:!0,sizes:{mobile:"100vw",tablet:"50vw",desktop:"33vw",default:"400px"},quality:85,format:"auto",lazy:!0,fetchPriority:"low"}),I&&(0,t.jsx)("div",{className:"absolute top-3 left-3 z-10",children:(0,t.jsx)(h,{spots:k,groupSize:C,variant:"badge",className:"shrink-0 shadow-lg backdrop-blur-sm"})}),M?.name&&"TBA"!==M.name&&(0,t.jsx)("div",{className:"absolute top-3 right-3 z-10",children:(0,t.jsx)(b.TooltipProvider,{delayDuration:300,children:(0,t.jsxs)(b.Tooltip,{children:[(0,t.jsx)(b.TooltipTrigger,{asChild:!0,children:$?(0,t.jsxs)("button",{type:"button",onClick:F,className:"flex items-center gap-1.5 rounded-md bg-black/60 backdrop-blur-sm px-2 py-1 max-w-[160px] hover:bg-black/80 transition-colors cursor-pointer","aria-label":`Guide: ${M.name}`,children:[M.avatar?(0,t.jsx)("img",{src:M.avatar,alt:"",className:"w-5 h-5 rounded-full object-cover flex-shrink-0"}):(0,t.jsx)(o.User,{className:"w-4 h-4 text-white/70 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-white leading-none truncate",children:M.name})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 rounded-md bg-black/60 backdrop-blur-sm px-2 py-1 max-w-[160px] cursor-default",tabIndex:0,"aria-label":`Guide: ${M.name}`,children:[M.avatar?(0,t.jsx)("img",{src:M.avatar,alt:"",className:"w-5 h-5 rounded-full object-cover flex-shrink-0"}):(0,t.jsx)(o.User,{className:"w-4 h-4 text-white/70 flex-shrink-0"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-white leading-none truncate",children:M.name})]})}),(0,t.jsxs)(b.TooltipContent,{side:"top",children:["Guide: ",M.name]})]})})})]}),(0,t.jsxs)("div",{className:"p-6 flex-1 flex flex-col min-h-0 bg-card",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 mb-3",children:O&&O.length>0?(0,t.jsxs)(t.Fragment,{children:[O.slice(0,2).map(e=>(0,t.jsx)("span",{className:`safari-badge text-[10px] px-2 py-1 ${v[e.title]||"bg-primary text-primary-foreground"} shadow-sm`,children:e.title},e.id)),O.length>2&&(0,t.jsxs)("span",{className:"safari-badge text-[10px] px-2 py-1 bg-muted text-foreground shadow-sm",children:["+",O.length-2]})]}):z?(0,t.jsx)("span",{className:`safari-badge text-[10px] px-2 py-1 ${v[z]||"bg-primary text-primary-foreground"} shadow-sm`,children:z}):null}),(0,t.jsx)("h3",{className:"font-heading text-base md:text-lg font-medium tracking-wide mb-2",children:m}),L&&"default"===E&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-4 font-light leading-relaxed line-clamp-2",children:L}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 text-sm text-muted-foreground dark:text-white mt-auto",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.MapPin,{className:"w-4 h-4 text-primary shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:u})]}),x&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.Calendar,{className:"w-4 h-4 text-primary shrink-0"}),(0,t.jsx)("span",{children:x})]})]}),"default"===E&&(N||null!=j||P&&C>0)&&(0,t.jsxs)("div",{className:"mt-4 pt-4 border-t border-border/50 dark:border-border/30 flex justify-between items-end",children:[(N||q)&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground dark:text-white block mb-1",children:"From"}),(0,t.jsx)("span",{className:"font-heading text-xl md:text-2xl font-semibold text-primary",children:N||q||(0,a.formatPrice)(j)})]}),P&&C>0&&(0,t.jsxs)("div",{className:"text-right",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground dark:text-white block mb-1",children:"Group Size"}),(0,t.jsxs)("span",{className:"text-sm text-foreground font-medium",children:["Max ",C]})]})]}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)("span",{className:"block w-full text-center py-3 text-sm font-heading tracking-[0.15em] uppercase border-2 border-white/80 text-white rounded-sm transition-colors duration-200 group-hover:border-white group-hover:bg-white/10",children:"View Safari"})})]})]})})});e.s(["SafariCard",0,y],10620);let j=(0,r.memo)(function(e){let{tour:i}=e,n=(0,a.getDurationDays)(i.startDate,i.endDate),s=(0,r.useMemo)(()=>{let e=i.destinations?Array.from(new Set(i.destinations.map(e=>e.country).filter(e=>"string"==typeof e&&e.length>0))):[];return e.length>0?e.join(", "):i.country},[i.destinations,i.country]),l=i.dateDisplay??(0,a.formatDateRange)(i.startDate,i.endDate),o=(0,r.useMemo)(()=>i.primaryCardGuide?.name?{name:i.primaryCardGuide.name,avatar:i.primaryCardGuide.avatar,specialty:i.primaryCardGuide.specialty,slug:i.primaryCardGuide.slug,guideLink:`/safari-guides/${i.primaryCardGuide.slug}`}:i.photographer?.name&&"TBA"!==i.photographer.name?{name:i.photographer.name,avatar:i.photographer.avatar,specialty:i.photographer.specialty,slug:i.photographer.id||void 0}:void 0,[i.primaryCardGuide,i.photographer?.name,i.photographer?.avatar,i.photographer?.specialty,i.photographer?.id]);return(0,t.jsx)(y,{image:i.heroImage,destination:s,title:i.title,slug:i.slug,date:l,duration:n,price:i.price,priceCurrency:i.priceCurrency,customPriceText:i.useCustomPrice?i.customPriceText??"Price on request":null,availability:i.availability,groupSize:i.groupSize,isPackage:i.isPackage,guide:o,subtitle:i.subtitle,categories:i.categories,category:i.categories?.length?void 0:i.category})});e.s(["TourCard",0,j],28088)},58013,e=>{"use strict";var t=e.i(66027);function r(e){return Math.max(0,e.ClientsPossibleSpots-e.ClientsBooked)}var a=e.i(75747);async function i(e){let t=await fetch("/api/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json().catch(()=>({error:t.statusText}))).error||`Availability failed: ${t.status}`);return t.json()}function n(e){let n=e.filter(Boolean),{isAvailabilityEnabled:s}=(0,a.useFeatureFlags)(),l=n.length>0&&s();return(0,t.useQuery)({queryKey:["availability",n.sort().join(",")],queryFn:async()=>{let e=await i(n),t={},a=new Map;for(let t of e){let e=a.get(t.SafariHeaderId)||[];e.push(t),a.set(t.SafariHeaderId,e)}for(let e of n){let i=a.get(e)||[];t[e]=i.length?Math.max(...i.map(r)):0}
1return t},enabled:l,staleTime:6e4})}e.s(["useAvailability",()=>n],58013)},33911,e=>{"use strict";var t=e.i(43476),r=e.i(46932),a=e.i(71645),i=e.i(49652);let n={some:0,all:1};function s(e){let{root:t,margin:r,amount:s,once:l=!1,initial:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[c,d]=(0,a.useState)(o);return(0,a.useEffect)(()=>{if(!e.current||l&&c)return;let a={root:t&&t.current||void 0,margin:r,amount:s};return function(e,t){let{root:r,margin:a,amount:s="some"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=(0,i.resolveElements)(e),o=new WeakMap,c=new IntersectionObserver(e=>{e.forEach(e=>{let r=o.get(e.target);if(!!r!==e.isIntersecting)if(e.isIntersecting){let r=t(e.target,e);"function"==typeof r?o.set(e.target,r):c.unobserve(e.target)}else"function"==typeof r&&(r(e),o.delete(e.target))})},{root:r,rootMargin:a,threshold:"number"==typeof s?s:n[s]});return l.forEach(e=>c.observe(e)),()=>c.disconnect()}(e.current,()=>(d(!0),l?void 0:()=>d(!1)),a)},[t,e,r,l,s]),c}function l(e){let{children:i,className:n="",delay:l=0,direction:o="up",duration:c=.6,once:d=!0}=e,u=(0,a.useRef)(null),m=s(u,{once:d,margin:"-100px"}),f={up:{y:40,x:0},down:{y:-40,x:0},left:{x:40,y:0},right:{x:-40,y:0},none:{x:0,y:0}},h={opacity:0,...f[o]},g={opacity:+!!m,x:m?0:f[o].x,y:m?0:f[o].y};return(0,t.jsx)(r.motion.div,{ref:u,initial:h,animate:g,transition:{duration:c,delay:l,ease:[.25,.1,.25,1]},className:n,children:i})}function o(e){let{children:i,className:n="",staggerDelay:l=.1}=e,o=(0,a.useRef)(null),c=s(o,{once:!0,margin:"-50px"});return(0,t.jsx)(r.motion.div,{ref:o,initial:"hidden",animate:c?"visible":"hidden",variants:{hidden:{},visible:{transition:{staggerChildren:l}}},className:n,children:i})}function c(e){let{children:a,className:i=""}=e;return(0,t.jsx)(r.motion.div,{variants:{hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.5,ease:[.25,.1,.25,1]}}},className:i,children:a})}e.s(["ScrollReveal",()=>l,"StaggerContainer",()=>o,"StaggerItem",()=>c],33911)},19577,8135,70273,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(46932),i=e.i(88653),n=e.i(73375),s=e.i(63059),l=e.i(65960),o=e.i(67881),c=e.i(83862),d=e.i(31278);function u(e){return[e.location,null!=e.year?String(e.year):null].filter(Boolean).join(" · ")}function m(e,t){var r;let a="manual"===(r=t.dataSource)||"custom"===r?r:"all",i=t.testimonialIds??[];if("custom"===a){var n=t.customItems;if(!n?.length)return[];let e=new Date().toISOString(),r=[];return n.forEach((t,a)=>{let i=(t.quote??"").trim(),n=(t.author??"").trim();if(!i&&!n)return;let s=(t.location??"").trim()||null;r.push({id:`custom-${a}`,quote:i,author:n||"Anonymous",location:s,year:function(e){if(null==e||""===e)return null;let t="number"==typeof e?e:parseInt(String(e),10);return Number.isFinite(t)?t:null}(t.year),safari_id:null,rating:null,photo_url:null,featured:!1,hide_from_auto_query:!1,status:"published",published_at:e,created_at:e,updated_at:e})}),r}if("manual"===a){if(0===i.length)return[];let t=new Map(e.map(e=>[e.id,e]));return i.map(e=>t.get(e)).filter(e=>void 0!==e)}let s=e.filter(e=>!e.hide_from_auto_query);return t.featuredOnly&&(s=s.filter(e=>e.featured)),null!=t.limit&&t.limit>0&&(s=s.slice(0,t.limit)),s}function f(e){let{dataSource:f="all",testimonialIds:h=[],customItems:g=[],featuredOnly:x=!0,limit:p,initialData:b}=e,{data:v,isLoading:y}=(0,c.useTestimonials)(!1,!1,{initialData:b}),[j,w]=(0,r.useState)(0),[N,k]=(0,r.useState)(!0),C=(0,r.useMemo)(()=>m(v||[],{dataSource:f,testimonialIds:h,customItems:g,featuredOnly:x,limit:"all"===f?p:void 0}),[v,f,h,g,x,p]),S=(0,r.useCallback)(()=>{0!==C.length&&w(e=>(e+1)%C.length)},[C.length]),M=(0,r.useCallback)(()=>{0!==C.length&&w(e=>(e-1+C.length)%C.length)},[C.length]);(0,r.useEffect)(()=>{w(0)},[C.length,f,h.join(","),g]),(0,r.useEffect)(()=>{if(!N||C.length<=1)return;let e=setInterval(()=>{S()},6e3);return()=>clearInterval(e)},[N,S,C.length]);let L=()=>{k(!1),setTimeout(()=>k(!0),1e4)};if(y)return(0,t.jsx)("div",{className:"relative max-w-3xl mx-auto min-h-[180px] flex items-center justify-center",children:(0,t.jsx)(d.Loader2,{className:"w-8 h-8 animate-spin text-primary"})});if(0===C.length)return(0,t.jsx)("div",{className:"relative max-w-3xl mx-auto min-h-[100px] flex items-center justify-center px-2",children:(0,t.jsx)("p",{className:"text-center text-muted-foreground safari-text",children:"No testimonials selected"})});let T=C[j],z=u(T);return(0,t.jsxs)("div",{className:"relative max-w-3xl mx-auto",children:[(0,t.jsx)("div",{className:"absolute -top-6 md:-top-8 left-1/2 -translate-x-1/2 z-10",children:(0,t.jsx)(l.Quote,{className:"w-12 h-12 md:w-14 md:h-14 text-primary/30 dark:text-primary/20 fill-primary/10 dark:fill-primary/5"})}),(0,t.jsx)("div",{className:"relative min-h-[160px] flex items-center justify-center px-2 md:px-4",children:(0,t.jsx)(i.AnimatePresence,{mode:"wait",children:(0,t.jsxs)(a.motion.div,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5,ease:[.25,.1,.25,1]},className:"text-center w-full",children:[(0,t.jsxs)("blockquote",{className:"text-base md:text-lg lg:text-xl font-heading tracking-wide leading-relaxed text-foreground mb-6 font-light line-clamp-6",children:["â",T.quote,"â"]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("cite",{className:"text-primary font-heading tracking-[0.15em] text-sm md:text-base block not-italic",children:["â ",T.author]}),z&&(0,t.jsx)("p",{className:"text-muted-foreground text-xs md:text-sm",children:z}),T.safari&&"object"==typeof T.safari&&T.safari.title&&(0,t.jsx)("p",{className:"text-primary/70 dark:text-primary/80 text-xs md:text-sm italic",children:T.safari.title})]})]},j)})}),C.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute top-1/2 -translate-y-1/2 left-0 right-0 flex justify-between pointer-events-none px-0",children:[(0,t.jsx)(o.Button,{variant:"ghost",size:"icon",onClick:()=>{M(),L()},className:"pointer-events-auto h-10 w-10 rounded-full bg-card/80 dark:bg-card/50 hover:bg-card dark:hover:bg-card border-2 border-border/50 dark:border-border hover:border-primary transition-all duration-300 backdrop-blur-sm shadow-md hover:shadow-lg","aria-label":"Previous testimonial",children:(0,t.jsx)(n.ChevronLeft,{className:"h-4 w-4"})}),(0,t.jsx)(o.Button,{variant:"ghost",size:"icon",onClick:()=>{S(),L()},className:"pointer-events-auto h-10 w-10 rounded-full bg-card/80 dark:bg-card/50 hover:bg-card dark:hover:bg-card border-2 border-border/50 dark:border-border hover:border-primary transition-all duration-300 backdrop-blur-sm shadow-md hover:shadow-lg","aria-label":"Next testimonial",children:(0,t.jsx)(s.ChevronRight,{className:"h-4 w-4"})})]}),(0,t.jsx)("div",{className:"flex justify-center gap-2 mt-6",children:C.map((e,r)=>(0,t.jsx)("button",{type:"button",onClick:()=>{w(r),L()},className:"flex min-h-11 min-w-11 items-center justify-center","aria-label":`Go to testimonial ${r+1}`,children:(0,t.jsx)("span",{className:`h-2 rounded-full transition-all duration-300 ${r===j?"bg-primary w-8":"bg-muted-foreground/30 w-2 hover:bg-muted-foreground/50"}`})},r))})]})]})}e.s(["formatTestimonialAttribution",()=>u,"resolveTestimonialsForSection",()=>m],8135),e.s(["TestimonialSlider",()=>f],19577);let h=(0,e.i(75254).default)("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"}]]);e.s(["Star",()=>h],70273)},95797,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(22016),i=e.i(70273),n=e.i(46897),s=e.i(31278),l=e.i(67881),o=e.i(30374),c=e.i(83862),d=e.i(8135),u=e.i(38848),m=e.i(33911),f=e.i(47163);let h="url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g opacity='0.16' fill='none' stroke='%23ffffff' stroke-width='1'><path d='M0 30h120'/><path d='M0 60h120'/><path d='M0 90h120'/><path d='M30 0v120'/><path d='M60 0v120'/><path d='M90 0v120'/></g></svg>\")";function g(e){let{rating:r}=e;if(null==r||r<1)return null;let a=Math.min(5,Math.max(0,Math.round(r)));return(0,t.jsx)("div",{className:"flex items-center gap-0.5","aria-label":`${a} out of 5 stars`,children:Array.from({length:5}).map((e,r)=>(0,t.jsx)(i.Star,{className:(0,f.cn)("w-4 h-4",r<a?"fill-primary text-primary":"fill-muted text-muted-foreground/40")},r))})}let x=(0,r.memo)(function(e){let{testimonial:a,onClick:i}=e,n=(0,r.useRef)(null),[s,l]=(0,r.useState)(!1),o=(0,r.useCallback)(()=>{let e=n.current;e&&l(e.scrollHeight>e.clientHeight+1)},[]);(0,r.useLayoutEffect)(()=>{o()},[a.quote,o]),(0,r.useEffect)(()=>{let e=n.current;if(!e||"undefined"==typeof ResizeObserver)return;let t=new ResizeObserver(()=>o());return t.observe(e),()=>t.disconnect()},[o]);let c=a.safari&&"object"==typeof a.safari&&a.safari.title?a.safari.title:null,m=[(0,d.formatTestimonialAttribution)(a)||null,c].filter(
1Boolean).join(" · ");return(0,t.jsxs)("button",{type:"button",onClick:i,className:"group relative w-full h-full flex flex-col text-left overflow-hidden bg-card rounded-xl border border-border/40 dark:border-border/60 hover:border-primary/40 transition-all duration-300 hover:shadow-md focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:[(0,t.jsx)("div",{className:"h-0.5 w-full bg-gradient-to-r from-primary/60 via-primary to-primary/60"}),(0,t.jsxs)("div",{className:"p-5 md:p-6 flex-1 flex flex-col gap-4",children:[(0,t.jsx)(g,{rating:a.rating}),(0,t.jsx)("blockquote",{ref:n,className:"flex-1 text-sm leading-relaxed text-foreground/90 dark:text-white line-clamp-4",children:a.quote}),s&&(0,t.jsx)("span",{className:"text-sm font-medium text-primary group-hover:underline underline-offset-2 -mt-2",children:"Read more"}),(0,t.jsxs)("div",{className:"flex items-center gap-3 pt-2",children:[a.photo_url&&(0,t.jsx)("div",{className:"relative w-9 h-9 rounded-full overflow-hidden flex-shrink-0 ring-1 ring-primary/20",children:(0,t.jsx)(u.ImageOptimized,{src:a.photo_url,alt:a.author,className:"w-full h-full object-cover",responsive:!0,sizes:{default:"36px"},quality:80,format:"auto",lazy:!0,fetchPriority:"low"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"font-heading font-medium text-sm tracking-wide text-foreground dark:text-white uppercase truncate",children:a.author}),m&&(0,t.jsx)("p",{className:"text-xs text-primary dark:text-white/60 font-medium truncate mt-0.5",children:m})]})]})]})]})});function p(e){let{testimonial:r,open:a,onOpenChange:i}=e;if(!r)return null;let s=r.safari&&"object"==typeof r.safari&&r.safari.title?r.safari.title:null;return(0,t.jsx)(o.Dialog,{open:a,onOpenChange:i,children:(0,t.jsxs)(o.DialogContent,{className:"max-w-lg md:max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,t.jsx)(o.DialogHeader,{children:(0,t.jsxs)(o.DialogTitle,{className:"sr-only",children:["Review by ",r.author]})}),(0,t.jsxs)("div",{className:"space-y-6 pt-2",children:[(0,t.jsx)(g,{rating:r.rating}),(0,t.jsxs)("blockquote",{className:"safari-text-lg text-foreground leading-relaxed",children:['"',r.quote,'"']}),(0,t.jsxs)("div",{className:"flex items-center gap-4 pt-4 border-t border-border",children:[r.photo_url?(0,t.jsx)("div",{className:"relative w-14 h-14 rounded-full overflow-hidden border-2 border-border flex-shrink-0",children:(0,t.jsx)(u.ImageOptimized,{src:r.photo_url,alt:r.author,className:"w-full h-full object-cover",responsive:!0,sizes:{default:"56px"},quality:90,format:"auto",lazy:!0,fetchPriority:"low"})}):(0,t.jsx)("div",{className:"w-14 h-14 rounded-full bg-primary/20 flex items-center justify-center flex-shrink-0",children:(0,t.jsx)("span",{className:"text-primary font-heading text-lg uppercase",children:r.author.charAt(0)})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-heading tracking-wide text-foreground",children:r.author}),r.location||null!=r.year?(0,t.jsxs)("p",{className:"text-sm text-muted-foreground flex items-center gap-1 mt-0.5",children:[(0,t.jsx)(n.MapPin,{className:"w-3.5 h-3.5 flex-shrink-0"}),(0,d.formatTestimonialAttribution)(r)]}):null,s&&(0,t.jsx)("p",{className:"text-sm text-primary/90 italic mt-1",children:s})]})]})]})]})})}function b(e){let{subtitle:r,title:a,description:i,hasBackgroundCard:n,className:s}=e;return(0,t.jsxs)("section",{className:(0,f.cn)("safari-section relative",n?"bg-secondary dark:bg-c4-charcoal":"bg-background dark:bg-background",s),children:[n&&(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 opacity-75 mix-blend-soft-light dark:opacity-75",style:{backgroundImage:h,backgroundSize:"120px 120px"}}),(0,t.jsx)("div",{className:"safari-container relative",children:(0,t.jsxs)(m.ScrollReveal,{children:[(r||a||i)&&(0,t.jsxs)("div",{className:"mb-10 md:mb-14 text-center",children:[r&&(0,t.jsx)("p",{className:"safari-section-eyebrow mb-4",children:r}),a&&(0,t.jsx)("h2",{className:"safari-heading-lg mb-4",children:a}),i&&(0,t.jsx)("p",{className:"safari-text text-muted-foreground max-w-2xl mx-auto",children:i})]}),(0,t.jsx)("p",{className:"text-center text-muted-foreground safari-text py-12",children:"No testimonials selected"})]})})]})}function v(e){let{subtitle:i,title:n,description:o,featuredOnly:u=!1,limit:g,dataSource:v="all",testimonialIds:y=[],customItems:j=[],hasBackgroun
1dCard:w=!1,className:N,flush:k=!1,desktopColumns:C=3,paginationMode:S="load_more",batchSize:M,ctaText:L,ctaLink:T,initialData:z}=e,{data:E,isLoading:R}=(0,c.useTestimonials)(!1,!1,{initialData:z}),[A,B]=(0,r.useState)(null),[P,I]=(0,r.useState)(!1),O=k?"relative w-full px-0":"safari-container relative",$=(0,r.useMemo)(()=>(0,d.resolveTestimonialsForSection)(E||[],{dataSource:v,testimonialIds:y,customItems:j,featuredOnly:u,limit:"all"===v?g:void 0}),[E,v,y,j,u,g]),F="load_more"!==S,q=null!=M&&M>0?M:F?9:6,H=(0,r.useMemo)(()=>j.map(e=>`${e.quote??""}|${e.author??""}|${e.location??""}|${e.year??""}`).join(";;"),[j]),W=(0,r.useMemo)(()=>[v,u,g??"",y.join(","),H,S,q].join("|"),[v,u,g,y,H,S,q]),D=$.length?Math.min(q,$.length):0,[_,G]=(0,r.useState)(D),[V,U]=(0,r.useState)(!1),K=(0,r.useRef)(_);K.current=_;let Q=(0,r.useRef)(!1),X=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{X.current&&(clearTimeout(X.current),X.current=null),G(D),U(!1),Q.current=!1},[W,D]),(0,r.useEffect)(()=>()=>{X.current&&clearTimeout(X.current)},[]);let Y=$.slice(0,_),J=_<$.length,Z=(0,r.useCallback)(()=>{G(e=>{let t=e>0?e:Math.min(q,$.length);return t>=$.length?t:Math.min($.length,t+q)})},[$.length,q]),ee=(0,r.useRef)(null),et=(0,r.useRef)(null),er=(0,r.useRef)($.length);er.current=$.length;let ea=(0,r.useCallback)(()=>{Q.current||K.current>=er.current||(Q.current=!0,U(!0),X.current=setTimeout(()=>{X.current=null,G(e=>{let t=e>0?e:Math.min(q,er.current);return t>=er.current?t:Math.min(er.current,t+q)}),Q.current=!1,U(!1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=ee.current;!e||e.getBoundingClientRect().top<window.innerHeight+200&&ea()})})},150))},[q]);return((0,r.useEffect)(()=>{if(!F||!J){et.current?.disconnect(),et.current=null;return}let e=!1,t=()=>{if(e)return;let r=ee.current;if(!r)return void requestAnimationFrame(t);et.current?.disconnect();let a=new IntersectionObserver(e=>{let t=e[0];t?.isIntersecting&&ea()},{rootMargin:"0px 0px 200px 0px",threshold:0});a.observe(r),et.current=a};return t(),()=>{e=!0,et.current?.disconnect(),et.current=null}},[F,J,W,ea]),R)?(0,t.jsxs)("section",{className:(0,f.cn)("safari-section relative",w?"bg-secondary dark:bg-c4-charcoal":"bg-background dark:bg-background",N),children:[w&&(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 opacity-75 mix-blend-soft-light dark:opacity-75",style:{backgroundImage:h,backgroundSize:"120px 120px"}}),(0,t.jsx)("div",{className:O,children:(0,t.jsx)("div",{className:"flex items-center justify-center py-24",children:(0,t.jsx)(s.Loader2,{className:"w-8 h-8 animate-spin text-primary"})})})]}):Y.length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{className:(0,f.cn)("safari-section relative",w?"bg-secondary":"bg-background dark:bg-background",N),children:[w&&(0,t.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 opacity-75 mix-blend-soft-light",style:{backgroundImage:h,backgroundSize:"120px 120px"}}),(0,t.jsxs)("div",{className:O,children:[(i||n||o)&&(0,t.jsx)(m.ScrollReveal,{children:(0,t.jsxs)("div",{className:"mb-10 md:mb-14 text-center",children:[i&&(0,t.jsx)("p",{className:"safari-section-eyebrow mb-4",children:i}),n&&(0,t.jsx)("h2",{className:"safari-heading-lg mb-4",children:n}),o&&(0,t.jsx)("p",{className:"safari-text text-muted-foreground max-w-2xl mx-auto",children:o})]})}),(0,t.jsx)("div",{className:2===C?"grid grid-cols-1 sm:grid-cols-2 gap-6 md:gap-8":"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 md:gap-8",children:Y.map(e=>(0,t.jsx)("div",{className:"relative",children:(0,t.jsx)(x,{testimonial:e,onClick:()=>{B(e),I(!0)}})},e.id))}),J&&F&&(0,t.jsx)("div",{ref:ee,className:"mt-10 flex justify-center py-4","aria-hidden":!V,children:V&&(0,t.jsx)(s.Loader2,{className:"w-8 h-8 animate-spin text-primary","aria-label":"Loading more testimonials"})}),J&&!F&&(0,t.jsx)("div",{className:"mt-10 flex justify-center",children:(0,t.jsx)(l.Button,{type:"button",variant:"primaryOutline",size:"cta",onClick:Z,children:"Load more testimonials"})}),L?.trim()&&T?.trim()?(0,t.jsx)(m.ScrollReveal,{className:"mt-10 md:mt-12 flex justify-center",children:(0,t.jsx)(l.Button,{variant:"secondaryCta",size:"ctaSm",asChild:!0,children:(0,t.jsx)(a.default,{href:T.trim(),children:L.trim()})})}):null]})]}),(0,t.jsx)(p,{testimonial:A,open:P,onOpenChange:I})]}
1):(0,t.jsx)(b,{subtitle:i,title:n,description:o,hasBackgroundCard:w,className:N})}e.s(["TestimonialListing",()=>v])}]);
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.