{"version":3,"file":"submitCardFormAPI.DQ3GC-mI.mjs","names":[],"sources":["https:/framerusercontent.com/modules/rja9HKl79ctc4H8QO392/7VyrQ71dZasd58zjkZCa/submitCardFormAPI.js"],"sourcesContent":["import{API_URLS}from\"https://framerusercontent.com/modules/9pcZFc9SClta2WL9YPpR/GR5NsQAUmNu93ePPUshQ/GlobalConfig.js\";export async function submitCardFormAPI(payload){try{const res=await fetch(API_URLS.CARD_REVEAL,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"Ocp-Apim-Subscription-Key\":\"262cc3925b994b339946afc403d25fe0\"},// credentials: \"include\", // REQUIRED if you want cookies/sessions/auth\nbody:JSON.stringify(payload)});if(!res.ok){const errorData=await res.json();const errorMessage=errorData.message||\"Failed to Submit the Form\";throw new Error(errorMessage);}return await res.json();}catch(err){console.error(\"API call failed:\",err.message||err);throw err;}}export async function generateAnotherCard(payload){try{const res=await fetch(API_URLS.CARD_REVEAL,{method:\"POST\",headers:{\"Content-Type\":\"application/json\",\"Ocp-Apim-Subscription-Key\":\"262cc3925b994b339946afc403d25fe0\"},credentials:\"include\",body:JSON.stringify(payload)});console.log(\"🔍 Response status:\",res.status);if(!res.ok){const errorText=await res.text();console.error(\"❌ API error response:\",errorText);const errorMessage=errorText||\"Failed to Submit the Form\";throw new Error(errorMessage);}return await res.json();}catch(err){console.error(\"🚨 Fetch failed:\",err);throw err;}}\nexport const __FramerMetadata__ = {\"exports\":{\"generateAnotherCard\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"CardRevealPayload\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"submitCardFormAPI\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./submitCardFormAPI.map"],"mappings":"2GAAsH,eAAsB,EAAkB,EAAQ,CAAC,GAAG,CAAC,IAAM,EAAI,MAAM,MAAM,EAAS,YAAY,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,4BAA4B,mCAAmC,CAC/U,KAAK,KAAK,UAAU,EAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,EAAI,GAAG,CAAkC,IAAM,GAAvB,MAAM,EAAI,MAAM,EAA8B,SAAS,4BAA4B,MAAU,MAAM,EAAa,CAAE,OAAO,MAAM,EAAI,MAAM,OAAQ,EAAI,CAAoD,MAAnD,QAAQ,MAAM,mBAAmB,EAAI,SAAS,EAAI,CAAO,GAAM,eAAsB,EAAoB,EAAQ,CAAC,GAAG,CAAC,IAAM,EAAI,MAAM,MAAM,EAAS,YAAY,CAAC,OAAO,OAAO,QAAQ,CAAC,eAAe,mBAAmB,4BAA4B,mCAAmC,CAAC,YAAY,UAAU,KAAK,KAAK,UAAU,EAAQ,CAAC,CAAC,CAA+C,GAA9C,QAAQ,IAAI,sBAAsB,EAAI,OAAO,CAAI,CAAC,EAAI,GAAG,CAAC,IAAM,EAAU,MAAM,EAAI,MAAM,CAAC,QAAQ,MAAM,wBAAwB,EAAU,CAAC,IAAM,EAAa,GAAW,4BAA4B,MAAU,MAAM,EAAa,CAAE,OAAO,MAAM,EAAI,MAAM,OAAQ,EAAI,CAAuC,MAAtC,QAAQ,MAAM,mBAAmB,EAAI,CAAO,oBADhuB"}