{"version":3,"file":"GoogleReviewCapsule.BWOUfEMP.mjs","names":[],"sources":["https:/framerusercontent.com/modules/ewz3MgT4cHODTujatG5Y/A5I2f79iMlVLQeAmkpNv/GoogleReviewCapsule.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * Lightweight Google review capsule.\n * Renders synchronously (no scripts, no effects, no scroll/IntersectionObserver\n * gating) so it paints instantly on load — including above the fold and on\n * pages using smooth-scroll libraries like Lenis.\n *\n * Set showContainer=false for a plain, transparent version (no pill, no fill,\n * no shadow) that floats directly on the page.\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 283\n * @framerIntrinsicHeight 43\n */export default function GoogleReviewCapsule(props){const{rating,reviewCount,reviewLabel,starColor,textColor,backgroundColor,borderRadius,showContainer,showGoogleLogo,link,style}=props;const fullStars=Math.floor(rating);const hasHalf=rating-fullStars>=.25&&rating-fullStars<.75;const roundedUp=rating-fullStars>=.75;const trimmedLabel=reviewLabel.trim();const joiner=/^[+\\-)\\]]/.test(trimmedLabel)?\"\":\" \";const reviewText=`${reviewCount.toLocaleString()}${joiner}${trimmedLabel}`;const Star=({fill})=>{// fill: 1 = full, 0.5 = half, 0 = empty\nconst gradId=`g-${Math.random().toString(36).slice(2,8)}`;return /*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 24 24\",style:{display:\"block\",flex:\"none\"},children:[fill===.5&&/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"linearGradient\",{id:gradId,children:[/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:starColor}),/*#__PURE__*/_jsx(\"stop\",{offset:\"50%\",stopColor:\"rgba(0,0,0,0.12)\"})]})}),/*#__PURE__*/_jsx(\"path\",{d:\"M12 2l2.9 6.26 6.88.6-5.2 4.53 1.56 6.73L12 17.27 5.86 20.65l1.56-6.73-5.2-4.53 6.88-.6L12 2z\",fill:fill===1?starColor:fill===.5?`url(#${gradId})`:\"rgba(0,0,0,0.12)\"})]});};const stars=[];for(let i=0;i<5;i++){let fill=0;if(i<fullStars)fill=1;else if(i===fullStars&&hasHalf)fill=.5;else if(i===fullStars&&roundedUp)fill=1;stars.push(/*#__PURE__*/_jsx(Star,{fill:fill},i));}const GoogleG=()=>/*#__PURE__*/_jsxs(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 48 48\",style:{display:\"block\",flex:\"none\"},children:[/*#__PURE__*/_jsx(\"path\",{fill:\"#4285F4\",d:\"M45.12 24.5c0-1.56-.14-3.06-.4-4.5H24v8.51h11.84c-.51 2.75-2.06 5.08-4.39 6.64v5.52h7.11c4.16-3.83 6.56-9.47 6.56-16.17z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#34A853\",d:\"M24 46c5.94 0 10.92-1.97 14.56-5.33l-7.11-5.52c-1.97 1.32-4.49 2.1-7.45 2.1-5.73 0-10.58-3.87-12.31-9.07H4.34v5.7C7.96 41.07 15.4 46 24 46z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#FBBC05\",d:\"M11.69 28.18c-.44-1.32-.69-2.73-.69-4.18s.25-2.86.69-4.18v-5.7H4.34C2.85 17.09 2 20.45 2 24s.85 6.91 2.34 9.88l7.35-5.7z\"}),/*#__PURE__*/_jsx(\"path\",{fill:\"#EA4335\",d:\"M24 10.75c3.23 0 6.13 1.11 8.41 3.29l6.31-6.31C34.91 4.18 29.93 2 24 2 15.4 2 7.96 6.93 4.34 14.12l7.35 5.7c1.73-5.2 6.58-9.07 12.31-9.07z\"})]});const containerStyle=showContainer?{padding:\"8px 16px\",backgroundColor,borderRadius:`${borderRadius}px`,boxShadow:\"0 1px 2px 0 rgba(0,0,0,0.05)\"}:{padding:\"0px\",backgroundColor:\"transparent\"};const content=/*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:\"8px\",...containerStyle,fontFamily:\"Inter, -apple-system, BlinkMacSystemFont, sans-serif\",fontSize:\"14px\",lineHeight:1,color:textColor,width:\"fit-content\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{display:\"inline-flex\",gap:\"1px\"},children:stars}),/*#__PURE__*/_jsx(\"span\",{style:{fontWeight:600,color:textColor},children:rating.toFixed(1)}),/*#__PURE__*/_jsx(\"span\",{style:{width:\"1px\",height:\"16px\",backgroundColor:\"rgba(0,0,0,0.12)\",margin:\"0 2px\"}}),showGoogleLogo&&/*#__PURE__*/_jsx(GoogleG,{}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor},children:reviewText})]});if(link){return /*#__PURE__*/_jsx(\"a\",{href:link,target:\"_blank\",rel:\"noopener noreferrer\",style:{textDecoration:\"none\",width:\"fit-content\"},children:content});}return content;}GoogleReviewCapsule.defaultProps={rating:5,reviewCount:550,reviewLabel:\"+ reviews\",starColor:\"rgb(251, 188, 4)\",textColor:\"rgb(31, 41, 55)\",backgroundColor:\"rgb(255, 255, 255)\",borderRadius:9999,showContainer:true,showGoogleLogo:true,link:\"\"};addPropertyControls(GoogleReviewCapsule,{rating:{type:ControlType.Number,title:\"Rating\",defaultValue:5,min:0,max:5,step:.1,displayStepper:true},reviewCount:{type:ControlType.Number,title:\"Review count\",defaultValue:550,min:0,max:1e5,step:1,displayStepper:true},reviewLabel:{type:ControlType.String,title:\"Label\",defaultValue:\"+ reviews\"},starColor:{type:ControlType.Color,title:\"Star color\",defaultValue:\"rgb(251, 188, 4)\"},textColor:{type:ControlType.Color,title:\"Text color\",defaultValue:\"rgb(31, 41, 55)\"},showContainer:{type:ControlType.Boolean,title:\"Container\",enabledTitle:\"Pill\",disabledTitle:\"Plain\",defaultValue:true},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"rgb(255, 255, 255)\",hidden:props=>!props.showContainer},borderRadius:{type:ControlType.Number,title:\"Corner radius\",defaultValue:9999,min:0,max:9999,step:1,hidden:props=>!props.showContainer},showGoogleLogo:{type:ControlType.Boolean,title:\"Google logo\",defaultValue:true},link:{type:ControlType.Link,title:\"Link\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GoogleReviewCapsule\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"283\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"43\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GoogleReviewCapsule.map"],"mappings":"8JAaG,SAAwB,EAAoB,EAAM,CAAC,GAAK,CAAC,SAAO,cAAY,cAAY,YAAU,YAAU,kBAAgB,eAAa,gBAAc,iBAAe,OAAK,SAAO,EAAY,EAAU,KAAK,MAAM,CAAM,EAAQ,EAAQ,EAAO,GAAW,KAAK,EAAO,EAAU,IAAU,EAAU,EAAO,GAAW,IAAU,EAAa,EAAY,KAAK,EAAQ,EAAO,YAAY,KAAK,CAAY,EAAE,GAAG,IAAU,EAAW,GAAG,EAAY,eAAe,IAAI,IAAS,IAAqB,GAAM,CAAC,UAAQ,CACvf,IAAM,EAAO,KAAK,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,OAAoB,EAAM,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,MAAM,CAAC,QAAQ,QAAQ,KAAK,MAAM,EAAE,SAAS,CAAC,IAAO,IAAiB,EAAK,OAAO,CAAC,SAAsB,EAAM,iBAAiB,CAAC,GAAG,EAAO,SAAS,CAAc,EAAK,OAAO,CAAC,OAAO,MAAM,UAAU,CAAS,CAAC,EAAe,EAAK,OAAO,CAAC,OAAO,MAAM,UAAU,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAe,EAAK,OAAO,CAAC,EAAE,gGAAgG,KAAK,IAAO,EAAE,EAAU,IAAO,GA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