PageSourceSearch

https://easyalgos.ai/_nuxt/SUm0JcQX.js

js easyalgos.ai collected 2026-10-05 11:59:27 UTC 9,302 bytes, 1 lines download raw bytes

1import{d as H,D as V,G as C,r as A,o as F,n as _,w as B,j as Z,e as n,l as q,c as a,F as x,p as t,v as c,f as u,C as k,ac as r,u as o,m as y,s as $,k as b,q as z,N as D}from"./NKdCMmkX.js";import{u as T}from"./BN-sRQQq.js";import{r as S}from"./WYjRdMux.js";const j={key:0,class:"w-fit flex flex-wrap items-center justify-center gap-4 overflow-hidden mx-auto p-2 tablet:p-3 font-rubik text-[#3DFFBF] text-sm leading-4.25 font-medium"},E={class:"flex items-center gap-4"},W={class:"hidden text-white tablet:block"},K={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},O={id:"squareMaskGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},P=["id"],R=["fill"],U=["fill"],J={class:"flex items-center gap-2"},Q={class:"text-white"},X={key:0,class:"hidden text-[#3DFFBF] tablet:block"},Y={class:"tablet:pl-2"},I={key:1,class:"bg-white w-fit flex flex-wrap items-center justify-center gap-4 overflow-hidden mx-auto font-rubik text-[#141414] text-xs leading-[15px] font-bold rounded-full ring-2 ring-[#F0F0FA] px-3 py-2 tablet-md:px-6 tablet-md:py-3"},tt={class:"flex items-center gap-0.5"},et={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},it={id:"squareMaskGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},lt=["id"],st=["fill"],nt=["fill"],at={class:"hidden tablet:flex items-center gap-3"},ot={key:0},rt={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dt={id:"squareMaskGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%"},ct=["id"],ut=["fill"],ft=["fill"],ht={key:0},mt={key:0},gt=!0,v=5,xt=H({__name:"Widget",props:{componentName:{type:String,required:!0},width:{type:String,default:"24px"},height:{type:String,default:"24px"},type:{type:String,default:"trustpilot"},activeColor:{type:String,default:"#00B67A"},unActiveColor:{type:String,default:"#DCDCE6"},score:{type:[Number,String],default:0},variant:{type:String,default:"default"}},setup(e){const m=e,{t:G}=V(),{widgetStatus:M}=T(),g=C(()=>{const s=M.value;if(!s)return"";const l=S(s);return l?G(l):s}),p=C(()=>{switch(m.activeColor){case"#FFC700":default:return"1"}}),h=A(Array.from({length:v},()=>[null,null]));F(()=>{_(()=>{L()})});function L(){for(let s=1;s<=v;++s){let l=null;+m.score>=s?l=1:l=s-+m.score<1?+m.score-Math.trunc(+m.score):0,_(()=>{N({id:s,percent:l})})}}function N({id:s,percent:l}){var w,i;const f=h.value[s-1];f&&((w=f[0])==null||w.setAttribute("offset",l.toString()),(i=f[1])==null||i.setAttribute("offset",(1-l).toString()))}return B(()=>m.score,()=>{_(()=>{L()})},{immediate:!0}),(s,l)=>{const f=z,w=D;return n(),Z(w,null,{default:q(()=>[gt?(n(),a(x,{key:0},[e.variant==="auth"?(n(),a("div",j,[t("div",E,[t("span",W,c(s.$t("landing_widget_component.customers_review")),1),t("div",{class:u(["flex items-center gap-0.5",{}])},[(n(),a(x,null,k(v,i=>t("div",{key:i,class:u(["widget__svg-container",{}]),style:r(`filter: brightness(${o(p)}); width: ${e.width}; height: ${e.height};`)},[(n(),a("svg",K,[t("defs",null,[t("linearGradient",O,[t("stop",{offset:"0%",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4)]),t("linearGradient",{id:`square_stars_fillGradient_${i}_${e.componentName}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[t("stop",{ref_for:!0,ref:d=>o(h)[i-1][0]=d,offset:"0",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4),t("stop",{ref_for:!0,ref:d=>o(h)[i-1][1]=d,offset:"0",class:"unActiveColor",style:r(`stop-color: ${e.unActiveColor}; stop-opacity: 1`)},null,4)],8,P),l[0]||(l[0]=t("mask",{id:"mask",x:"0",y:"0",width:"24",height:"24"},[t("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#squareMaskGradient)"})],-1))]),t("path",{d:"M24 0H0V24H24V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,R),t("path",{d:"M0 0H24V24H0V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,U),l[1]||(l[1]=t("path",{d:"M11.5232 15.691L15.2008 14.7103L16.6718 19.3686L11.5232 15.691ZM19.8591 9.8069H13.4845L11.5232 3.9228L9.5619 9.8069H3.4325L8.5811 13.4845L6.6198 19.3686L11.7684 15.691L14.9556 13.4845L19.8591 9.8069Z",fill:"white"},null,-1))]))],4)),64))])]),t("div",J,[t("p",Q,[$(c(e.score)+" ",1),t("span",null,c(s.$t("landing_widget_component.out_of_5")),1)]),o(g)?(n(),a("p",X,c(o(g)),1)):y("",!0)]),t("div",Y,[b(f,{src:"/icons/trustpilot_white_logo.svg",width:"98",height:"24",alt:s.$t("landing_widget_component.trustpilot_logo_alt"),quality:"100",loading:"lazy",class:"w-[84px] h-5 tablet:w-[98px] tablet:h-6"},null,8,["alt"])])])):e.variant==="default-white"?(n(),a("div",I,[b(f,{src:"/icons/trustpilot_black_logo.svg",width:"99",height:"24",alt:s.$t("landing_widget_component.trustpilot_logo_alt"),quality:"100",loading:"lazy",class:"w-[86px] h-[21px] tablet:w-[99px] tablet:h-6"},null,8,["alt"]),t("div",tt,[(n(),a(x,null,k(v,i=>t("div",{key:i,class:u(["widget__svg-container",{}]),style:r(`filter: brightness(${o(p)}); width: ${e.width}; height: ${e.height};`)},[(n(),a("svg",et,[t("defs",null,[t("linearGradient",it,[t("stop",{offset:"0%",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4)]),t("linearGradient",{id:`square_stars_fillGradient_${i}_${e.componentName}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[t("stop",{ref_for:!0,ref:d=>o(h)[i-1][0]=d,offset:"0",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4),t("stop",{ref_for:!0,ref:d=>o(h)[i-1][1]=d,offset:"0",class:"unActiveColor",style:r(`stop-color: ${e.unActiveColor}; stop-opacity: 1`)},null,4)],8,lt),l[2]||(l[2]=t("mask",{id:"mask",x:"0",y:"0",width:"24",height:"24"},[t("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#squareMaskGradient)"})],-1))]),t("path",{d:"M24 0H0V24H24V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,st),t("path",{d:"M0 0H24V24H0V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,nt),l[3]||(l[3]=t("path",{d:"M11.5232 15.691L15.2008 14.7103L16.6718 19.3686L11.5232 15.691ZM19.8591 9.8069H13.4845L11.5232 3.9228L9.5619 9.8069H3.4325L8.5811 13.4845L6.6198 19.3686L11.7684 15.691L14.9556 13.4845L19.8591 9.8069Z",fill:"white"},null,-1))]))],4)),64))]),t("div",at,[o(g)?(n(),a("p",ot,c(o(g)),1)):y("",!0),t("p",null,[$(c(e.score)+" ",1),t("span",null,c(s.$t("landing_widget_component.out_of_5")),1)])])])):(n(),a("div",{key:2,class:u(["w-fit flex items-center gap-4 overflow-hidden mx-auto py-2 tablet:py-2.5",{"rounded-[.625rem] px-3 bg-[#455088]":e.variant==="default","px-4 flex-wrap justify-center":e.variant==="short","!px-3 !py-2 !bg-[#455088] !rounded-[.625rem] !m-0":e.variant==="minimized"}])},[t("div",{class:u(["flex items-center gap-4",{"flex-wrap justify-center":e.variant==="short"}])},[b(f,{src:e.variant==="default"||e.variant==="minimized"?"/icons/trustpilot_white_logo.svg":"/icons/trustpilot_black_logo.svg",width:"86",height:"21",alt:s.$t("landing_widget_component.trustpilot_logo_alt"),quality:"100",loading:"lazy",class:u(["w-[5.375rem] h-[1.3125rem] tablet:w-[6.1875rem] tablet:h-6",{"!w-[5.375rem] !h-[1.3125rem]":e.variant==="minimized"}])},null,8,["src","alt","class"]),t("div",{class:u(["flex items-center gap-0.5",{"1!gap-[0px]":e.variant==="minimized"}])},[(n(),a(x,null,k(v,i=>t("div",{key:i,class:u(["widget__svg-container",{"!scale-[.83] m-[-2px]":e.variant==="minimized"}]),style:r(`filter: brightness(${o(p)}); width: ${e.width}; height: ${e.height};`)},[(n(),a("svg",rt,[t("defs",null,[t("linearGradient",dt,[t("stop",{offset:"0%",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4)]),t("linearGradient",{id:`square_stars_fillGradient_${i}_${e.componentName}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[t("stop",{ref_for:!0,ref:d=>o(h)[i-1][0]=d,offset:"0",class:"activeColor",style:r(`stop-color: ${e.activeColor}; stop-opacity: 1`)},null,4),t("stop",{ref_for:!0,ref:d=>o(h)[i-1][1]=d,offset:"0",class:"unActiveColor",style:r(`stop-color: ${e.unActiveColor}; stop-opacity: 1`)},null,4)],8,ct),l[4]||(l[4]=t("mask",{id:"mask",x:"0",y:"0",width:"24",height:"24"},[t("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#squareMaskGradient)"})],-1))]),t("path",{d:"M24 0H0V24H24V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,ut),t("path",{d:"M0 0H24V24H0V0Z",fill:`url(#square_stars_fillGradient_${i}_${e.componentName})`,mask:"url(#squareMaskGradient)"},null,8,ft),l[5]||(l[5]=t("path",{d:"M11.5232 15.691L15.2008 14.7103L16.6718 19.3686L11.5232 15.691ZM19.8591 9.8069H13.4845L11.5232 3.9228L9.5619 9.8069H3.4325L8.5811 13.4845L6.6198 19.3686L11.7684 15.691L14.9556 13.4845L19.8591 9.8069Z",fill:"white"},null,-1))]))],6)),64))],2)],2),e.score&&e.variant!=="minimized"?(n(),a("div",{key:0,class:u(["items-center gap-3 font-inter font-bold text-xs leading-3",{"text-white hidden tablet:flex":e.variant==="default","text-[#0B1125] flex":e.variant==="short"}])},[e.variant==="default"&&o(g)?(n(),a("p",ht,c(o(g)),1)):y("",!0),t("p",null,[$(c(e.score)+" ",1),e.variant==="default"?(n(),a("span",mt,c(s.$t("landing_widget_component.out_of_5")),1)):y("",!0)])],2)):y("",!0)],2))],64)):y("",!0)]),_:1})}}});
1export{xt as _};

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.