{"version":3,"file":"TextFI.ByEtHow0.mjs","names":["__esmMin","init_jsx_runtime","c","addPropertyControls","init_framer_DxfB3JJo","ControlType","decodeEntities","str","ENTITY_REGEX","ENTITIES","entity","ColoredText","decoded","text","regex","parts","lastIndex","match","textColor","init_TextFI"],"sources":["https:/framerusercontent.com/modules/IyBVYjtGH8VDlfmvkElU/t9pNuLQdLXz7px5xXuQA/TextFI.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";// HTML entities that are decoded before rendering.\n// Extend this map if more entities are needed (e.g. \"&amp;\": \"&\").\nconst ENTITIES={\"&nbsp;\":\"\\xa0\",\"&shy;\":\"\\xad\"};const ENTITY_REGEX=new RegExp(Object.keys(ENTITIES).join(\"|\"),\"g\");function decodeEntities(str){return str.replace(ENTITY_REGEX,entity=>ENTITIES[entity]);}export function ColoredText({text=\"\",fontSize=16,fontFamily=\"Poppins\",fontWeight=400,lineHeight=1.5,letterSpacing=0,textAlign=\"left\",textColor=\"#000000\"}){// Decode entities first so they work both in plain text and inside [fi]...[/fi]\nconst decoded=decodeEntities(text);const regex=/\\[fi\\](.*?)\\[\\/fi\\]/g;const parts=[];let lastIndex=0;let match;while((match=regex.exec(decoded))!==null){if(match.index>lastIndex){parts.push(decoded.slice(lastIndex,match.index));}parts.push(/*#__PURE__*/_jsx(\"span\",{style:{color:\"#FE42B4\"},children:match[1]},match.index));lastIndex=match.index+match[0].length;}if(lastIndex<decoded.length){parts.push(decoded.slice(lastIndex));}return /*#__PURE__*/_jsx(\"div\",{style:{fontSize,fontFamily,fontWeight,lineHeight,letterSpacing,textAlign,color:textColor},children:parts});}addPropertyControls(ColoredText,{text:{type:ControlType.String,title:\"Text\",defaultValue:\"Local [fi]IBAN[/fi] in 72 hours\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:16,min:8,max:100},fontFamily:{type:ControlType.String,title:\"Font Family\",defaultValue:\"Inter\"},fontWeight:{type:ControlType.Number,title:\"Font Weight\",defaultValue:400,min:100,max:900,step:100},lineHeight:{type:ControlType.Number,title:\"Line Height\",defaultValue:1.5,min:.5,max:3,step:.1},letterSpacing:{type:ControlType.Number,title:\"Letter Spacing\",defaultValue:0,min:-2,max:10,step:.5},textAlign:{type:ControlType.Enum,title:\"Text Align\",options:[\"left\",\"center\",\"right\",\"justify\"],defaultValue:\"left\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"ColoredText\":{\"type\":\"reactComponent\",\"name\":\"ColoredText\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TextFI.map"],"mappings":"A,6JAEmH,SAASM,EAAe,EAAI,CAAC,OAAOC,EAAI,QAAQC,EAAa,GAAQC,EAASC,EAAO,CAAE,CAAC,SAAgBC,EAAY,CAAC,OAAK,GAAG,WAAS,GAAG,aAAW,UAAU,aAAW,IAAI,aAAW,IAAI,gBAAc,EAAE,YAAU,OAAO,YAAU,WAAW,CACrW,IAAMC,EAAQN,EAAeO,CAAI,EAAQC,EAAM,uBAA6BC,EAAM,CAAC,EAAMC,EAAU,EAAMC,EAAM,MAAO,EAAMH,EAAM,KAAKF,CAAO,KAAK,MAASK,EAAM,MAAMD,GAAWD,EAAM,KAAKH,EAAQ,MAAMI,EAAUC,EAAM,KAAK,CAAC,EAAGF,EAAM,KAAkB,gBAAK,OAAO,CAAC,MAAM,CAAC,MAAM,SAAS,EAAE,SAASE,EAAM,EAAE,EAAEA,EAAM,KAAK,CAAC,EAAE,EAAUA,EAAM,MAAMA,EAAM,EAAE,CAAC,OAA2E,OAAhED,EAAUJ,EAAQ,QAAQG,EAAM,KAAKH,EAAQ,MAAMI,CAAS,CAAC,EAAuB,gBAAK,MAAM,CAAC,MAAM,CAAC,WAAS,aAAW,aAAW,aAAW,gBAAc,YAAU,MAAME,CAAS,EAAE,SAASH,CAAK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