{"version":3,"file":"Bilingualtextproyectos.Cp4_mLdk.mjs","names":["useState","useRef"],"sources":["https:/framerusercontent.com/modules/myp0eJ0PcWxJ81Sepaz6/NEL8ZFJ8NLJi415X0YFM/Bilingualtextproyectos.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{useLanguage}from\"https://framerusercontent.com/modules/QriWEv2o0RvZgtp6i8Ql/ZlTzxQLTWIGCe9C5pzDO/LanguageContext.js\";const translations={// ===== PROYECTOS — Hero =====\nProyectos:\"Projects\",\"Una colecci\\xf3n de proyectos \\xfanicos, residenciales, de uso mixto y master planning, definidos por la identidad de su destino y nuestro propio ADN. Cada uno es una historia viva creada perdurar y generar valor real.\":\"A collection of unique projects — residential, mixed-use, and master planning — defined by the identity of their destination and our own DNA. Each one is a living story created to endure and generate real value.\",\"Una colecci\\xf3n de proyectos \\xfanicos, residenciales, de uso mixto y master planning, definidos por la identidad de su destino y nuestro propio ADN.\\nCada uno es una historia viva creada perdurar y generar valor real.\":\"A collection of unique projects — residential, mixed-use, and master planning — defined by the identity of their destination and our own DNA.\\nEach one is a living story created to endure and generate real value.\",\"Una colecci\\xf3n de proyectos \\xfanicos, residenciales, de uso mixto y master planning, definidos por la identidad de su destino y nuestro propio ADN.Cada uno es una historia viva creada perdurar y generar valor real.\":\"A collection of unique projects — residential, mixed-use, and master planning — defined by the identity of their destination and our own DNA. Each one is a living story created to endure and generate real value.\",// ===== Navegación / etiquetas compartidas =====\nPROYECTOS:\"PROJECTS\",// ===== Secciones =====\n\"01 - PROYECTOS\":\"01 - PROJECTS\",\"01-PROYECTOS\":\"01-PROJECTS\",Residenciales:\"Residential\",\"02 - PROYECTOS\":\"02 - PROJECTS\",\"02-PROYECTOS\":\"02-PROJECTS\",\"de Uso Mixto\":\"Mixed-Use\",\"03 - PROYECTOS\":\"03 - PROJECTS\",\"03-PROYECTOS\":\"03-PROJECTS\",Masterplans:\"Masterplans\",// ===== Tarjetas de proyecto =====\n\"Ver Proyecto +\":\"View Project +\",// ===== CTA final =====\n\"Construyamos el siguiente lugar al que la gente quiera pertenecer\":\"Let's build the next place people want to belong to\",\"Construyamos el siguiente lugar al que\\nla gente quiera pertenecer\":\"Let's build the next place\\npeople want to belong to\",\"Construyamos el siguiente lugar al quela gente quiera pertenecer\":\"Let's build the next place people want to belong to\",\"Contactar +\":\"Contact +\"};function setTextPreservingStyle(el,newText){const walker=document.createTreeWalker(el,NodeFilter.SHOW_TEXT);let isFirst=true;let node;while(node=walker.nextNode()){if(isFirst){node.nodeValue=newText;isFirst=false;}else{node.nodeValue=\"\";}}}export function withBilingualText(Component){return props=>{const[node,setNode]=useState(null);const originalRef=useRef(null);const{lang}=useLanguage();useEffect(()=>{if(!node)return;if(originalRef.current===null){originalRef.current=node.textContent||\"\";}const original=originalRef.current.trim();const translated=translations[original];const target=lang===\"en\"&&translated?translated:originalRef.current;setTextPreservingStyle(node,target);},[lang,node]);return /*#__PURE__*/_jsx(Component,{...props,ref:setNode});};}\nexport const __FramerMetadata__ = {\"exports\":{\"withBilingualText\":{\"type\":\"reactHoc\",\"name\":\"withBilingualText\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Bilingualtextproyectos.map"],"mappings":"qLAK0Y,SAAS,EAAuB,EAAG,EAAQ,CAAC,IAAM,EAAO,SAAS,iBAAiB,EAAG,WAAW,SAAS,EAAM,EAAQ,GAAS,EAAK,KAAM,EAAK,EAAO,SAAS,GAAM,GAAS,EAAK,UAAU,EAAQ,EAAQ,IAAY,EAAK,UAAU,EAAK,CAAC,SAAgB,EAAkB,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAK,GAASA,EAAS,IAAI,EAAQ,EAAYC,EAAO,IAAI,EAAO,CAAC,QAAM,EAAY,EAAmT,OAAjT,MAAc,CAAC,GAAG,CAAC,EAAK,OAAU,EAAY,UAAU,OAAM,EAAY,QAAQ,EAAK,aAAa,IAAI,IAAM,EAAS,EAAY,QAAQ,KAAK,EAAQ,EAAW,EAAa,GAAgB,EAAO,IAAO,MAAM,EAAW,EAAW,EAAY,QAAQ,EAAuB,EAAK,CAAM,CAAE,EAAE,CAAC,EAAK,CAAI,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAM,IAAI,CAAO,CAAC,CAAE,CAAE,mBALtlC,IAA6C,IAA4H,EAAO,EAAa,CACvO,UAAU,WAAW,uNAA6N,sNAAsN,wNAA8N;uEAAuN,sNAA4N,sNACzlC,UAAU,WACV,iBAAiB,gBAAgB,eAAe,cAAc,cAAc,cAAc,iBAAiB,gBAAgB,eAAe,cAAc,eAAe,YAAY,iBAAiB,gBAAgB,eAAe,cAAc,YAAY,cAC7P,iBAAiB,iBACjB,oEAAoE,sDAAsD,qEAAqE;0BAAuD,mEAAmE,sDAAsD,cAAc,WAAW"}