import{b as n}from"./base64ToBytes-B7rMxzcy.js";const r=navigator.credentials&&typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential;function o(a){const t=a.toJSON(),e=atob(t.response.clientDataJSON);let s;return t.response.attestationObject?s={_:"inputPasskeyResponseRegister",client_data:{_:"dataJSON",data:e},attestation_data:n(t.response.attestationObject)}:s={_:"inputPasskeyResponseLogin",client_data:{_:"dataJSON",data:e},authenticator_data:n(t.response.authenticatorData),signature:n(t.response.signature),user_handle:atob(t.response.userHandle)},s}function d(a){const t=o(a),e=a.toJSON();return{_:"inputPasskeyCredentialPublicKey",id:e.id,raw_id:e.rawId,response:t}}export{r as I,d as g};
//# sourceMappingURL=getInputPasskeyResponse-RiY9Fe0r.js.map
