{"version":3,"file":"SoloraSmartText.C7ixUGFi.mjs","names":["_Fragment","React.useState"],"sources":["https:/framerusercontent.com/modules/ryqg6kz8SDnSNp5z82xF/VWu6AeJSHOTMxPdMJkTc/SoloraSmartText.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function SoloraSmartText(props){const{text,highlights,font,textColor,textAlign,lineHeight,highlightColor,underlineColor,glowColor,tooltipBg,tooltipText,tooltipBorder,openInNewTab}=props;const validHighlights=highlights.filter(item=>item.phrase&&item.phrase.trim().length>0);function renderText(content){if(!validHighlights.length)return content;const parts=[];let index=0;let key=0;while(index<content.length){let nearestMatch=null;for(const item of validHighlights){const phrase=item.phrase.trim();const start=content.toLowerCase().indexOf(phrase.toLowerCase(),index);if(start!==-1&&(!nearestMatch||start<nearestMatch.start)){nearestMatch={item,start,end:start+phrase.length};}}if(!nearestMatch){parts.push(content.slice(index));break;}if(nearestMatch.start>index){parts.push(content.slice(index,nearestMatch.start));}const matchedText=content.slice(nearestMatch.start,nearestMatch.end);parts.push(/*#__PURE__*/_jsx(StoryWord,{text:matchedText,tooltip:nearestMatch.item.tooltip,link:nearestMatch.item.link,highlightColor:highlightColor,underlineColor:underlineColor,glowColor:glowColor,tooltipBg:tooltipBg,tooltipText:tooltipText,tooltipBorder:tooltipBorder,openInNewTab:openInNewTab},`story-word-${key++}`));index=nearestMatch.end;}return parts;}return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:`\n            @keyframes soloraStoryUnderline {\n                0% { background-position: 0% 50%; }\n                50% { background-position: 100% 50%; }\n                100% { background-position: 0% 50%; }\n            }\n\n            @keyframes soloraStoryFloat {\n                0%, 100% { transform: translateY(0px); }\n                50% { transform: translateY(-1.5px); }\n            }\n\n            @keyframes soloraTooltipIn {\n                from {\n                    opacity: 0;\n                    transform: translateX(-50%) translateY(4px);\n                }\n                to {\n                    opacity: 1;\n                    transform: translateX(-50%) translateY(0px);\n                }\n            }\n        `}),/*#__PURE__*/_jsx(\"span\",{style:{display:\"block\",width:\"100%\",color:textColor,textAlign,lineHeight,whiteSpace:\"pre-wrap\",overflow:\"visible\",...font},children:renderText(text)})]});}function StoryWord({text,tooltip,link,highlightColor,underlineColor,glowColor,tooltipBg,tooltipText,tooltipBorder,openInNewTab}){const[hovered,setHovered]=React.useState(false);const clickable=Boolean(link);return /*#__PURE__*/_jsxs(\"span\",{onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),onClick:()=>{if(!link)return;if(openInNewTab){window.open(link,\"_blank\",\"noopener,noreferrer\");}else{window.location.href=link;}},style:{position:\"relative\",display:\"inline-block\",color:highlightColor,fontWeight:700,cursor:clickable?\"pointer\":\"default\",textDecoration:\"none\",animation:\"soloraStoryFloat 3.8s ease-in-out infinite\",transition:\"color 0.2s ease, text-shadow 0.2s ease, transform 0.2s ease\",textShadow:hovered?`0 0 18px ${glowColor}`:\"none\",transform:hovered?\"translateY(-1px)\":\"translateY(0px)\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{position:\"relative\",zIndex:2},children:text}),/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:0,right:0,bottom:\"0.06em\",height:\"0.38em\",zIndex:1,borderRadius:999,background:`linear-gradient(90deg, transparent, ${underlineColor}, transparent)`,backgroundSize:\"220% 100%\",animation:\"soloraStoryUnderline 3.4s ease-in-out infinite\",opacity:hovered?.9:.55,transition:\"opacity 0.2s ease, height 0.2s ease\"}}),hovered&&tooltip&&/*#__PURE__*/_jsxs(\"span\",{style:{position:\"absolute\",left:\"50%\",bottom:\"calc(100% + 9px)\",transform:\"translateX(-50%)\",zIndex:50,minWidth:190,maxWidth:280,padding:\"9px 11px\",borderRadius:12,background:tooltipBg,color:tooltipText,border:`1px solid ${tooltipBorder}`,boxShadow:\"0 12px 34px rgba(0,0,0,0.14)\",fontSize:13,fontWeight:500,lineHeight:1.35,textAlign:\"center\",whiteSpace:\"normal\",pointerEvents:\"none\",animation:\"soloraTooltipIn 0.18s ease-out forwards\"},children:[tooltip,/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",left:\"50%\",bottom:-5,width:10,height:10,background:tooltipBg,borderRight:`1px solid ${tooltipBorder}`,borderBottom:`1px solid ${tooltipBorder}`,transform:\"translateX(-50%) rotate(45deg)\"}})]})]});}SoloraSmartText.defaultProps={text:\"We set up Solora's Patient Re-activator to reach out to those past clients with personalized text messages inviting them to come back in. The messages were tailored so they felt personal rather than like a mass blast, and clients could text back to book without having to call during business hours.\",highlights:[{phrase:\"Patient Re-activator\",tooltip:\"See how Solora brings past patients back.\",link:\"/services/patient-reactivator\"}],font:{fontFamily:\"Inter\",fontSize:18,fontWeight:400},textColor:\"#18181B\",textAlign:\"left\",lineHeight:1.7,highlightColor:\"#111827\",underlineColor:\"rgba(92, 225, 180, 0.55)\",glowColor:\"rgba(92, 225, 180, 0.45)\",tooltipBg:\"#111827\",tooltipText:\"#FFFFFF\",tooltipBorder:\"rgba(255,255,255,0.12)\",openInNewTab:false};addPropertyControls(SoloraSmartText,{text:{title:\"Text\",type:ControlType.String,displayTextArea:true},highlights:{title:\"Marked Words\",type:ControlType.Array,control:{type:ControlType.Object,controls:{phrase:{title:\"Word/Phrase\",type:ControlType.String,defaultValue:\"Patient Re-activator\"},tooltip:{title:\"Hover Label\",type:ControlType.String,defaultValue:\"See how Solora brings past patients back.\"},link:{title:\"Link\",type:ControlType.Link,defaultValue:\"/services/patient-reactivator\"}}}},font:{title:\"Font\",type:ControlType.Font,controls:\"extended\"},textColor:{title:\"Text Color\",type:ControlType.Color},textAlign:{title:\"Align\",type:ControlType.Enum,options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"]},lineHeight:{title:\"Line Height\",type:ControlType.Number,min:1,max:2.5,step:.05},highlightColor:{title:\"Marked Text\",type:ControlType.Color},underlineColor:{title:\"Glow Line\",type:ControlType.Color},glowColor:{title:\"Hover Glow\",type:ControlType.Color},tooltipBg:{title:\"Label BG\",type:ControlType.Color},tooltipText:{title:\"Label Text\",type:ControlType.Color},tooltipBorder:{title:\"Label Border\",type:ControlType.Color},openInNewTab:{title:\"New Tab\",type:ControlType.Boolean}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SoloraSmartText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SoloraSmartText.map"],"mappings":"sMAA+J,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,aAAW,OAAK,YAAU,YAAU,aAAW,iBAAe,iBAAe,YAAU,YAAU,cAAY,gBAAc,gBAAc,EAAY,EAAgB,EAAW,OAAO,GAAM,EAAK,QAAQ,EAAK,OAAO,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,SAAS,EAAW,EAAQ,CAAC,GAAG,CAAC,EAAgB,OAAO,OAAO,EAAQ,IAAM,EAAM,CAAC,EAAM,EAAM,EAAM,EAAI,EAAE,KAAM,EAAM,EAAQ,QAAO,CAAC,IAAI,EAAa,KAAK,IAAI,IAAM,KAAQ,EAAgB,CAAC,IAAM,EAAO,EAAK,OAAO,KAAK,EAAQ,EAAM,EAAQ,YAAY,CAAC,CAAC,QAAQ,EAAO,YAAY,EAAE,CAAK,EAAK,IAAQ,KAAK,CAAC,GAAc,EAAM,EAAa,SAAQ,EAAa,CAAC,OAAK,QAAM,IAAI,EAAM,EAAO,MAAM,EAAG,CAAC,GAAG,CAAC,EAAa,CAAC,EAAM,KAAK,EAAQ,MAAM,CAAK,CAAC,EAAE,KAAM,CAAI,EAAa,MAAM,GAAO,EAAM,KAAK,EAAQ,MAAM,EAAM,EAAa,KAAK,CAAC,EAAG,IAAM,EAAY,EAAQ,MAAM,EAAa,MAAM,EAAa,GAAG,EAAE,EAAM,KAAkB,EAAK,EAAU,CAAC,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