{"version":3,"file":"LocalFAQSchema.B_Cqs2bM.mjs","names":["useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/I2FypMT7pkUN6OTF7zML/xzg3yV6CRusiCNfF9O5l/LocalFAQSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function LocalFAQSchema(props){const parseMainEntity=useCallback(input=>{const validateMainEntity=value=>{if(!Array.isArray(value)||value.length===0)return null;const hasOnlyObjects=value.every(item=>item&&typeof item===\"object\"&&!Array.isArray(item));return hasOnlyObjects?value:null;};try{const direct=JSON.parse(input);const validatedDirect=validateMainEntity(direct);if(validatedDirect)return validatedDirect;}catch(_error){// Continue to base64 fallback\n}try{if(typeof globalThis===\"undefined\"||typeof globalThis.atob!==\"function\"){return null;}const decodedBinary=globalThis.atob(input);const percentEncoded=decodedBinary.split(\"\").map(char=>`%${char.charCodeAt(0).toString(16).padStart(2,\"0\")}`).join(\"\");const decodedUtf8=decodeURIComponent(percentEncoded);const decodedJson=JSON.parse(decodedUtf8);return validateMainEntity(decodedJson);}catch(_error){return null;}},[]);const scriptContent=useMemo(()=>{const parsed=parseMainEntity(props.data);if(!parsed)return null;const schema={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:parsed};return JSON.stringify(schema);},[props.data,parseMainEntity]);if(!scriptContent)return null;return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"},\"aria-hidden\":\"true\",children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:scriptContent}})});}addPropertyControls(LocalFAQSchema,{data:{type:ControlType.String,title:\"Data\",displayTextArea:true,defaultValue:'[{\"@type\":\"Question\",\"name\":\"R\\xe9parez-vous les \\xe9crans iPhone ?\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"Oui, nous rempla\\xe7ons les \\xe9crans iPhone rapidement avec garantie.\"}}]'}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LocalFAQSchema\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocalFAQSchema.map"],"mappings":"iLAGG,SAAwB,EAAe,EAAM,CAAC,IAAM,EAAgBA,EAAY,GAAO,CAAC,IAAM,EAAmB,GAAW,CAAC,MAAM,QAAQ,CAAK,GAAG,EAAM,SAAS,EAAS,KAA0B,EAAM,MAAM,GAAM,GAAM,OAAO,GAAO,UAAU,CAAC,MAAM,QAAQ,CAAI,CAAuB,EAAE,EAAM,KAAO,GAAG,CAAgC,IAAM,EAAgB,EAAxC,KAAK,MAAM,CAAqD,CAAC,EAAE,GAAG,EAAgB,OAAO,CAAgB,MAAc,CAC7b,CAAC,GAAG,CAAC,GAAG,OAAO,WAAa,KAAa,OAAO,WAAW,MAAO,WAAY,OAAO,KAAiD,IAAM,EAA7B,WAAW,KAAK,CAAwC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,GAAM,IAAI,EAAK,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE,EAAiG,OAAO,EAA/B,KAAK,MAA1D,mBAAmB,CAAuD,CAAuC,CAAC,CAAE,MAAc,CAAC,OAAO,IAAK,CAAC,EAAE,CAAC,CAAC,EAAQ,EAAcC,MAAY,CAAC,IAAM,EAAO,EAAgB,EAAM,IAAI,EAA4G,OAAtG,EAA6G,KAAK,UAAU,CAA3F,WAAW,qBAAqB,QAAQ,UAAU,WAAW,CAAmC,CAAC,EAApH,IAAsH,EAAE,CAAC,EAAM,KAAK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