1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[61532],{27937:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(71847).A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},61532:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var s=r(95155),l=r(12115),a=r(93499);let i=(0,r(71847).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var n=r(27937);let o={en:{title:"What our customers say",reviews:"reviews"},it:{title:"Cosa dicono i nostri clienti",reviews:"recensioni"},es:{title:"Lo que dicen nuestros clientes",reviews:"rese\xf1as"},fr:{title:"Ce que disent nos clients",reviews:"avis"},de:{title:"Was unsere Kunden sagen",reviews:"Bewertungen"},pt:{title:"O que nossos clientes dizem",reviews:"avalia\xe7\xf5es"}},c={trustpilot:"#00b67a",capterra:"#ff9d28",g2:"#ff492c"},d=["#16D46D","#14B85D","#0D9448","#0EA5E9","#0284C7","#6D87FF","#59589D","#8B5CF6","#F59E0B","#D97706"];function m(e){let{name:t,image:r,size:l="md"}=e,a="sm"===l?"w-8 h-8 text-xs":"w-10 h-10 text-sm";if(r)return(0,s.jsx)("img",{src:r,alt:t,className:`${a} rounded-full object-cover flex-shrink-0`});let i=function(e){let t=e.trim().split(/\s+/);return 1===t.length?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}(t),n=function(e){let t=0;for(let r=0;r<e.length;r++)t=e.charCodeAt(r)+((t<<5)-t);return d[Math.abs(t)%d.length]}(t);return(0,s.jsx)("div",{className:`${a} rounded-full flex items-center justify-center font-semibold text-white flex-shrink-0`,style:{backgroundColor:n},children:i})}let p={trustpilot:{platform:"trustpilot",name:"Trustpilot",rating:null,totalReviews:119,reviewUrl:"https://it.trustpilot.com/evaluate/spoki.it",profileUrl:"https://it.trustpilot.com/review/spoki.it"},capterra:{platform:"capterra",name:"Capterra",rating:4.5,totalReviews:45,reviewUrl:"https://www.capterra.com/reviews/306442/Spoki",profileUrl:"https://www.capterra.com/p/252301/Spoki/"},g2:{platform:"g2",name:"G2",rating:4.8,totalReviews:4,reviewUrl:"https://www.g2.com/products/spoki/reviews#reviews",profileUrl:"https://www.g2.com/products/spoki/reviews"}};function x(e){let{count:t=5,size:r="md"}=e,l={sm:14,md:20,lg:26}[r];return(0,s.jsx)("div",{className:"flex gap-0.5",children:[...Array(t)].map((e,t)=>(0,s.jsxs)("svg",{width:l,height:l,viewBox:"0 0 26 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M12.7519 0L16.1093 8.78716L25.5038 9.26481L18.1842 15.1732L20.633 24.2556L12.7519 19.12L4.87079 24.2556L7.31959 15.1732L-7.62939e-06 9.26481L9.39456 8.78716L12.7519 0Z",fill:`url(#greenStarGrad_${t})`}),(0,s.jsx)("defs",{children:(0,s.jsxs)("linearGradient",{id:`greenStarGrad_${t}`,x1:"0.377",y1:"26.816",x2:"31.145",y2:"12.131",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#16D46D"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#A5FFDB"})]})})]},t))})}function h(e){let{review:t}=e,r=t.platform.charAt(0).toUpperCase()+t.platform.slice(1);return(0,s.jsxs)("div",{className:"bg-white rounded-tr-xl rounded-br-xl rounded-bl-xl px-5 py-6 flex flex-col gap-2 h-full shadow-[0_10px_28px_rgba(25,25,25,0.07)]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,s.jsx)(m,{name:t.author,image:t.profileImage,size:"md"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"font-bold text-[#454545] text-base leading-tight truncate",children:t.author}),t.jobTitle&&(0,s.jsx)("p",{className:"text-xs text-gray-400 leading-tight truncate",children:t.jobTitle})]})]}),(0,s.jsx)(x,{count:5,size:"md"}),(0,s.jsx)("p",{className:"text-[#454545] font-medium text-base leading-normal flex-1 line-clamp-4",children:t.content}),(0,s.jsxs)("p",{className:"text-sm text-gray-400 mt-1",children:[r," ⢠",t.date]})]})}function g(e){let{review:t}=e,r=t.platform.charAt(0).toUpperCase()+t.platform.slice(1);return(0,s.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3 border border-gray-100 h-full flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,s.jsx)(m,{name:t.author,image:t.profileImage,size:"sm"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"font-semibold text-gray-900 text-xs truncate",children:t.author}),(0,s.jsx)(x,{count:5,size:"sm"})]}),t.jobTitle&&(0,s.jsx)("p",{className:"text-[10px] text-gray-400 truncate",children:t.jobTitle})]})]}),(0,s.jsx)("p",{className:"text-gray-600 text-xs leading-relaxed flex-1 line-clamp-3",children:t.content}),(0,s.jsxs)("p",{className:"text-[10px] text-gray-400 mt-1.5",children:[r," ⢠",t.date]})]})}function u(e){let{platformData:t}=e,r=c[t.platform];return(0,s.jsxs)("a",{href:t.profileUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2 bg-white rounded-full border border-gray-200 hover:border-gray-300 hover:shadow-sm transition-all text-sm",children:[(0,s.jsx)("span",{style:{color:r},className:"font-bold text-base",children:t.name}),t.rating&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"#ffb800",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"})}),(0,s.jsx)("span",{className:"font-semibold text-gray-700",children:t.rating}),(0,s.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",t.totalReviews,")"]})]}),(0,s.jsx)(a.A,{size:12,className:"text-gray-400"})]})}function f(e){let{lang:t,variant:r="default",className:d="",showTitle:m=!0,showPlatformBadges:f=!0}=e,[b,w]=(0,l.useState)(p),[j,v]=(0,l.useState)([]),[y,N]=(0,l.useState)(0),[k,C]=(0,l.useState)(!0),A="compact"===r?3:4,z=o[t]||o.en;(0,l.useEffect)(()=>{(async()=>{C(!0);try{let e=await fetch(`/data/nps-reviews/${t}.json`);if(e.ok){let t=await e.json();if(t.platforms?.trustpilot&&w(e=>({...e,trustpilot:{platform:"trustpilot",name:t.platforms.trustpilot.name,rating:t.platforms.trustpilot.overallRating,totalReviews:t.platforms.trustpilot.totalReviews,reviewUrl:t.platforms.trustpilot.reviewUrl,profileUrl:t.platforms.trustpilot.profileUrl}})),t.reviews?.trustpilot){let e=t.reviews.trustpilot.filter(e=>5===e.rating).map(e=>({id:e.id,platform:"trustpilot",author:e.author,jobTitle:e.jobTitle,profileImage:e.profileImage,rating:e.rating,content:e.content,date:e.date}));e.length>0&&v(e)}}}catch(e){console.warn("[CustomerReviewsCarousel] Failed to load reviews:",e)}finally{C(!1)}})()},[t]);let U=j.length,L=(0,l.useCallback)(()=>{U<=A||N(e=>{let t=e-A;return t<0?U+t:t})},[U,A]),D=(0,l.useCallback)(()=>{U<=A||N(e=>(e+A)%U)},[U,A]),$=(()=>
1{if(0===U)return[];if(U<=A)return j;let e=[];for(let t=0;t<A;t++){let r=(y+t)%U;e.push(j[r])}return e})(),_=Math.floor(y/A)%Math.ceil(U/A),M=Math.ceil(U/A);return k?(0,s.jsxs)("div",{className:`animate-pulse ${d}`,children:[(0,s.jsx)("div",{className:"h-8 bg-gray-200 rounded w-1/3 mx-auto mb-8"}),(0,s.jsx)("div",{className:`grid gap-6 ${"compact"===r?"grid-cols-1 sm:grid-cols-3":"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}`,children:[...Array(A)].map((e,t)=>(0,s.jsx)("div",{className:"bg-white rounded-xl h-40"},t))})]}):0===j.length?null:"compact"===r?(0,s.jsxs)("div",{className:`bg-white rounded-2xl p-5 shadow-lg border border-gray-100 ${d}`,children:[m&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mb-4",children:[(0,s.jsx)(x,{count:5,size:"sm"}),(0,s.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:z.title})]}),(0,s.jsxs)("div",{className:"relative",children:[j.length>A&&(0,s.jsx)("button",{type:"button",onClick:L,className:"absolute left-0 top-1/2 -translate-y-1/2 -translate-x-3 z-10 w-8 h-8 flex items-center justify-center rounded-full bg-white shadow-md border border-gray-200 transition-all hover:bg-gray-50 hover:shadow-lg cursor-pointer text-gray-700","aria-label":"Previous reviews",children:(0,s.jsx)(i,{size:18})}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2 px-2",children:$.map(e=>(0,s.jsx)(g,{review:e},e.id))}),j.length>A&&(0,s.jsx)("button",{type:"button",onClick:D,className:"absolute right-0 top-1/2 -translate-y-1/2 translate-x-3 z-10 w-8 h-8 flex items-center justify-center rounded-full bg-white shadow-md border border-gray-200 transition-all hover:bg-gray-50 hover:shadow-lg cursor-pointer text-gray-700","aria-label":"Next reviews",children:(0,s.jsx)(n.A,{size:18})})]}),j.length>A&&(0,s.jsx)("div",{className:"flex justify-center gap-1.5 mt-3",children:Array.from({length:M}).map((e,t)=>(0,s.jsx)("button",{type:"button",onClick:()=>N(t*A),className:"min-w-[44px] min-h-[44px] flex items-center justify-center","aria-label":`Go to page ${t+1}`,children:(0,s.jsx)("span",{className:`block h-2 rounded-full transition-all ${_===t?"bg-green-500 w-4":"bg-gray-300 w-2"}`})},t))}),f&&(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t border-gray-100 flex flex-wrap items-center justify-center gap-3",children:[(0,s.jsxs)("a",{href:b.trustpilot.profileUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-3 py-1.5 bg-white rounded-full border border-gray-200 hover:border-gray-300 hover:shadow-sm transition-all text-sm",children:[(0,s.jsx)("span",{style:{color:c.trustpilot},className:"font-semibold",children:"Trustpilot"}),(0,s.jsx)(a.A,{size:10,className:"text-gray-400"})]}),(0,s.jsx)(u,{platformData:b.capterra}),(0,s.jsx)(u,{platformData:b.g2})]})]}):(0,s.jsxs)("div",{className:d,children:[m&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 mb-12 md:mb-14",children:[(0,s.jsx)(x,{count:5,size:"lg"}),(0,s.jsx)("h2",{className:"font-heading font-bold text-3xl sm:text-4xl md:text-[48px] md:leading-[1.2] text-[#111827] text-center",children:z.title})]}),(0,s.jsxs)("div",{className:"relative",children:[j.length>A&&(0,s.jsx)("button",{type:"button",onClick:L,className:"absolute left-0 top-1/2 -translate-y-1/2 -translate-x-4 z-10 w-10 h-10 flex items-center justify-center rounded-full bg-white shadow-md border border-gray-200 transition-all hover:bg-gray-50 hover:shadow-lg cursor-pointer text-gray-700","aria-label":"Previous reviews",children:(0,s.jsx)(i,{size:20})}),(0,s.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:$.map(e=>(0,s.jsx)(h,{review:e},e.id))}),j.length>A&&(0,s.jsx)("button",{type:"button",onClick:D,className:"absolute right-0 top-1/2 -translate-y-1/2 translate-x-4 z-10 w-10 h-10 flex items-center justify-center rounded-full bg-white shadow-md border border-gray-200 transition-all hover:bg-gray-50 hover:shadow-lg cursor-pointer text-gray-700","aria-label":"Next reviews",children:(0,s.jsx)(n.A,{size:20})})]}),j.length>A&&(0,s.jsx)("div",{className:"flex justify-center gap-1 mt-6",children:Array.from({length:M}).map((e,t)=>(0,s.jsx)("button",{type:"button",onClick:()=>N(t*A),className:"min-w-[44px] min-h-[44px] flex items-center justify-center","aria-label":`Go to page ${t+1}`,children:(0,s.jsx)("span",{className:`block h-2.5 rounded-full transition-all ${_===t?"bg-green-500 w-5":"bg-gray-300 hover:bg-gray-400 w-2.5"}`})},t))}),f&&(0,s.jsxs)("div",{className:"mt-12 md:mt-16 flex flex-wrap items-center justify-center gap-6 md:gap-12",children:[(0,s.jsxs)("a",{href:b.trustpilot.profileUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-5 py-2 bg-white rounded-full border border-gray-200 hover:border-gray-300 hover:shadow-sm transition-all",children:[(0,s.jsx)("span",{style:{color:c.trustpilot},className:"font-bold text-base",children:"Trustpilot"}),(0,s.jsx)(a.A,{size:12,className:"text-gray-400"})]}),(0,s.jsx)(u,{platformData:b.capterra}),(0,s.jsx)(u,{platformData:b.g2})]})]})}},93499:(e,t,r)=>{r.d(t,{A:()=>s});let s=(0,r(71847).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])}}]);
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.