1import{c as h}from"./-00YEiB8.js";import{r as d}from"./_XNWkX2h.js";import{d as g,c,e as s,a1 as w,a2 as b,i as o,p as i,o as l,h as u,bb as _}from"./D1qLZR8X.js";const k=["aria-label"],f="#00B67A",y=g({__name:"SquareStars",props:{rating:{},emptyColour:{default:"#E8E8E8"},size:{default:"micro"},compact:{type:Boolean}},setup(m){const r=m,p=c(()=>h(d(r.rating),0,5)),n=c(()=>r.size==="mini"&&r.compact?{container:"h-[20px] w-[110px]",box:"h-[20px] w-[20px]",star:"h-[12px] w-[12px]"}:r.size==="mini"?{container:"h-[24px] w-[133px]",box:"h-[24px] w-[24px]",star:"h-[14px] w-[14px]"}:{container:"h-[17px] w-[96px]",box:"h-[17px] w-[17px]",star:"h-[11px] w-[11px]"}),x=t=>{const e=p.value;if(e>=t)return{backgroundColor:f};if(e>t-1&&e<t){const a=`${(e-(t-1))*100}%`;return{background:`linear-gradient(to right, ${f} ${a}, ${r.emptyColour} ${a})`}}return{backgroundColor:r.emptyColour}};return(t,e)=>(l(),s("div",{class:i(["inline-flex shrink-0 justify-between",o(n).container]),role:"img","aria-label":`Rating: ${o(p)} out of 5 stars`},[(l(),s(w,null,b(5,a=>u("span",{key:a,class:i(["relative inline-flex shrink-0 items-center justify-center overflow-hidden",o(n).box]),style:_(x(a))},[(l(),s("svg",{class:i(["relative z-[1]",o(n).star]),viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[...e[0]||(e[0]=[u("path",{d:"M12 1.5l2.76 8.59h8.94l-7.23 5.26 2.76 8.59L12 18.68l-7.23 5.26 2.76-8.59-7.23-5.26h8.94L12 1.5Z",fill:"#ffffff"},null,-1)])],2))],6)),64))],10,k))}}),B=Object.assign(y,{__name:"TrustpilotSquareStars"});export{B as default};
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.