{"version":3,"file":"FetchQuery.BlXLIKoO.mjs","names":[],"sources":["https:/framerusercontent.com/modules/78gvyz17TQU5HX88ZPeF/RZJ9Kq9e3yLHBTqaNty9/FetchQuery.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";export function ReplacePersonalInfo(Component){return props=>{var _props_children_props_children,_props_children_props,_props_children;// Ensure this code only runs in a browser environment\nif(typeof window===\"undefined\"){return /*#__PURE__*/_jsx(Component,{...props});}// Parse the current URL's query string for parameters\nconst urlParams=new URLSearchParams(window.location.search);const firstname=urlParams.get(\"firstname\");const lastname=urlParams.get(\"lastname\");const email=urlParams.get(\"email\");const phone=urlParams.get(\"phone\");// Access the text content of the component's children,\n// which is expected to be a string. This is where we check\n// for placeholders and replace them with values from the URL.\nconst textProps=(_props_children=props.children)===null||_props_children===void 0?void 0:(_props_children_props=_props_children.props)===null||_props_children_props===void 0?void 0:(_props_children_props_children=_props_children_props.children)===null||_props_children_props_children===void 0?void 0:_props_children_props_children.props;if(textProps&&typeof textProps.children===\"string\"){let newText=textProps.children;if(firstname){newText=newText.replace(\"first.name\",firstname);}if(lastname){newText=newText.replace(\"last.name\",lastname);}if(email){newText=newText.replace(\"email.address\",email);}if(phone){newText=newText.replace(\"phone.number\",phone);}textProps.children=newText;}return /*#__PURE__*/_jsx(Component,{...props});};}\nexport const __FramerMetadata__ = {\"exports\":{\"ReplacePersonalInfo\":{\"type\":\"reactHoc\",\"name\":\"ReplacePersonalInfo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FetchQuery.map"],"mappings":"kHAA2C,SAAgB,EAAoB,EAAU,CAAC,MAAO,IAAO,CAAC,IAAmC,EAAsB,EAClK,GAAU,IAAS,OAAa,OAAoB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAC7E,IAAM,EAAU,IAAI,gBAAgB,EAAO,SAAS,MAAM,EAAQ,EAAU,EAAU,IAAI,WAAW,EAAQ,EAAS,EAAU,IAAI,UAAU,EAAQ,EAAM,EAAU,IAAI,OAAO,EAAQ,EAAM,EAAU,IAAI,OAAO,EAG9M,GAAW,EAAgB,EAAM,WAAY,OAAuC,EAAsB,EAAgB,QAAS,KAAvD,IAAK,GAA8H,EAAsB,UAAgG,MAAM,GAAG,GAAW,OAAO,EAAU,UAAW,SAAS,CAAC,IAAI,EAAQ,EAAU,SAAY,IAAW,EAAQ,EAAQ,QAAQ,aAAa,CAAS,GAAM,IAAU,EAAQ,EAAQ,QAAQ,YAAY,CAAQ,GAAM,IAAO,EAAQ,EAAQ,QAAQ,gBAAgB,CAAK,GAAM,IAAO,EAAQ,EAAQ,QAAQ,eAAe,CAAK,GAAG,EAAU,SAAS,CAAQ,CAAC,OAAoB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,CAAE,CAAE,qBALrrB"}