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B,SAAS,eACjCtB,CAAkC,EAE9BuB,EAAmB,SAAS,eAChCxB,CAAiC,EAGnC,GAAI,CAACsB,EACH,MAAM,IAAI,MAAM,+BAA+B,EAGjD,GAAI,CAACC,EACH,MAAM,IAAI,MAAM,8BAA8B,EAGhD,GAAIF,EAAS,CACX,MAAMI,EAAQF,EAAkB,QAAQ,UAAU,EAAI,EACtDD,EAAmB,YAAYG,CAAK,CACtC,SACMD,EAAkB,CACpB,MAAMC,EAAQD,EAAiB,QAAQ,UAAU,EAAI,EACrDF,EAAmB,YAAYG,CAAK,CACtC,MACEH,EAAmB,OAAM,CAG/B,CAEA,MAAM3G,EAAS,MAAMD,EAAS,EAE5BC,EAAO,gCACN,MAAM+D,EAA+B,GAEtC2B,EAAqB1F,CAAM,EAGxB4D,EAAuB,GAG1B,MAAM6C,EAA8B,EAAI,EACxCP,EAA+BlG,CAAM,GAHrC,MAAMyG,EAA8B,EAAK,CAK7C,GAAE","sources":["webpack://django-otp-webauthn/./client/src/types.ts","webpack://django-otp-webauthn/./client/src/utils.ts","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/webAuthnError.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/identifyRegistrationError.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/webAuthnAbortService.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/methods/startRegistration.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/bufferToBase64URLString.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/base64URLStringToBuffer.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/browserSupportsWebAuthn.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/browserSupportsWebAuthnAutofill.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/toPublicKeyCredentialDescriptor.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/isValidDomain.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/identifyAuthenticationError.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/helpers/toAuthenticatorAttachment.js","webpack://django-otp-webauthn/./node_modules/@simplewebauthn/browser/esm/methods/startAuthentication.js","webpack://django-otp-webauthn/./client/src/auth.ts"],"sourcesContent":["export enum StatusEnum {\n  UNKNOWN_ERROR = \"unknown-error\",\n  STATE_ERROR = \"state-error\",\n  SECURITY_ERROR = \"security-error\",\n  GET_OPTIONS_FAILED = \"get-options-failed\",\n  ABORTED = \"aborted\",\n  NOT_ALLOWED_OR_ABORTED = \"not-allowed-or-aborted\",\n  SERVER_ERROR = \"server-error\",\n  SUCCESS = \"success\",\n  BUSY = \"busy\",\n}\n\nexport type State = {\n  buttonDisabled: boolean;\n  buttonLabel: string;\n  /** Text to display in the status field. */\n  status?: string;\n  statusEnum?: StatusEnum;\n  /** Request the focus be returned to the button. */\n  requestFocus?: boolean;\n};\n\nexport type Config = {\n  beginRegistrationUrl: string;\n  completeRegistrationUrl: string;\n  beginAuthenticationUrl: string;\n  completeAuthenticationUrl: string;\n\n  // The selector for the field that is supposed to trigger the autofill UI.\n  autocompleteLoginFieldSelector?: string;\n  // The selector used to find the \"next\" field containing the URL to redirect to\n  nextFieldSelector: string;\n\n  csrfToken: string;\n};\n","import { Config } from \"./types\";\n\n/**\n * Finds the config object in the DOM and deserializes it.\n * @returns Config the config object\n */\nexport async function getConfig(): Promise<Config> {\n  let config: Config | null = null;\n  const configElement = document.getElementById(\n    \"otp_webauthn_config\",\n  ) as HTMLScriptElement;\n\n  if (configElement) {\n    config = JSON.parse(configElement.innerText) as Config;\n    return Object.freeze(config);\n  }\n  throw new Error(\"otp_webauthn_config element not found\");\n}\n\n/**\n * Appends the 'next' query parameter to the base URL if present.\n * The 'next' value is taken from either the input field specified by\n * `nextFieldSelectorQuery` or from the current URL's `next` query parameter.\n */\nexport function buildCompleteAuthenticationUrl(\n  baseUrl: string,\n  nextFieldSelectorQuery: string,\n): string {\n  const nextInput = document.querySelector<HTMLInputElement>(\n    nextFieldSelectorQuery,\n  );\n\n  const nextValue =\n    nextInput?.value || new URLSearchParams(window.location.search).get(\"next\");\n\n  if (nextValue) {\n    const url = new URL(baseUrl, window.location.origin);\n    url.searchParams.set(\"next\", nextValue);\n    return url.toString();\n  }\n\n  return baseUrl;\n}\n","/**\n * A custom Error used to return a more nuanced error detailing _why_ one of the eight documented\n * errors in the spec was raised after calling `navigator.credentials.create()` or\n * `navigator.credentials.get()`:\n *\n * - `AbortError`\n * - `ConstraintError`\n * - `InvalidStateError`\n * - `NotAllowedError`\n * - `NotSupportedError`\n * - `SecurityError`\n * - `TypeError`\n * - `UnknownError`\n *\n * Error messages were determined through investigation of the spec to determine under which\n * scenarios a given error would be raised.\n */\nexport class WebAuthnError extends Error {\n    constructor({ message, code, cause, name, }) {\n        // @ts-ignore: help Rollup understand that `cause` is okay to set\n        super(message, { cause });\n        Object.defineProperty(this, \"code\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n        this.name = name ?? cause.name;\n        this.code = code;\n    }\n}\n","import { isValidDomain } from './isValidDomain.js';\nimport { WebAuthnError } from './webAuthnError.js';\n/**\n * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.create()`\n */\nexport function identifyRegistrationError({ error, options, }) {\n    const { publicKey } = options;\n    if (!publicKey) {\n        throw Error('options was missing required publicKey property');\n    }\n    if (error.name === 'AbortError') {\n        if (options.signal instanceof AbortSignal) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n            return new WebAuthnError({\n                message: 'Registration ceremony was sent an abort signal',\n                code: 'ERROR_CEREMONY_ABORTED',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'ConstraintError') {\n        if (publicKey.authenticatorSelection?.requireResidentKey === true) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 4)\n            return new WebAuthnError({\n                message: 'Discoverable credentials were required but no available authenticator supported it',\n                code: 'ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT',\n                cause: error,\n            });\n        }\n        else if (\n        // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n        options.mediation === 'conditional' &&\n            publicKey.authenticatorSelection?.userVerification === 'required') {\n            // https://w3c.github.io/webauthn/#sctn-createCredential (Step 22.4)\n            return new WebAuthnError({\n                message: 'User verification was required during automatic registration but it could not be performed',\n                code: 'ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE',\n                cause: error,\n            });\n        }\n        else if (publicKey.authenticatorSelection?.userVerification === 'required') {\n            // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 5)\n            return new WebAuthnError({\n                message: 'User verification was required but no available authenticator supported it',\n                code: 'ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'InvalidStateError') {\n        // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 20)\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 3)\n        return new WebAuthnError({\n            message: 'The authenticator was previously registered',\n            code: 'ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED',\n            cause: error,\n        });\n    }\n    else if (error.name === 'NotAllowedError') {\n        /**\n         * Pass the error directly through. Platforms are overloading this error beyond what the spec\n         * defines and we don't want to overwrite potentially useful error messages.\n         */\n        return new WebAuthnError({\n            message: error.message,\n            code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n            cause: error,\n        });\n    }\n    else if (error.name === 'NotSupportedError') {\n        const validPubKeyCredParams = publicKey.pubKeyCredParams.filter((param) => param.type === 'public-key');\n        if (validPubKeyCredParams.length === 0) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 10)\n            return new WebAuthnError({\n                message: 'No entry in pubKeyCredParams was of type \"public-key\"',\n                code: 'ERROR_MALFORMED_PUBKEYCREDPARAMS',\n                cause: error,\n            });\n        }\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 2)\n        return new WebAuthnError({\n            message: 'No available authenticator supported any of the specified pubKeyCredParams algorithms',\n            code: 'ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG',\n            cause: error,\n        });\n    }\n    else if (error.name === 'SecurityError') {\n        const effectiveDomain = globalThis.location.hostname;\n        if (!isValidDomain(effectiveDomain)) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 7)\n            return new WebAuthnError({\n                message: `${globalThis.location.hostname} is an invalid domain`,\n                code: 'ERROR_INVALID_DOMAIN',\n                cause: error,\n            });\n        }\n        else if (publicKey.rp.id !== effectiveDomain) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 8)\n            return new WebAuthnError({\n                message: `The RP ID \"${publicKey.rp.id}\" is invalid for this domain`,\n                code: 'ERROR_INVALID_RP_ID',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'TypeError') {\n        if (publicKey.user.id.byteLength < 1 || publicKey.user.id.byteLength > 64) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 5)\n            return new WebAuthnError({\n                message: 'User ID was not between 1 and 64 characters',\n                code: 'ERROR_INVALID_USER_ID_LENGTH',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'UnknownError') {\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 1)\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-make-cred (Step 8)\n        return new WebAuthnError({\n            message: 'The authenticator was unable to process the specified options, or could not create a new credential',\n            code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n            cause: error,\n        });\n    }\n    return error;\n}\n","class BaseWebAuthnAbortService {\n    constructor() {\n        Object.defineProperty(this, \"controller\", {\n            enumerable: true,\n            configurable: true,\n            writable: true,\n            value: void 0\n        });\n    }\n    createNewAbortSignal() {\n        // Abort any existing calls to navigator.credentials.create() or navigator.credentials.get()\n        if (this.controller) {\n            const abortError = new Error('Cancelling existing WebAuthn API call for new one');\n            abortError.name = 'AbortError';\n            this.controller.abort(abortError);\n        }\n        const newController = new AbortController();\n        this.controller = newController;\n        return newController.signal;\n    }\n    cancelCeremony() {\n        if (this.controller) {\n            const abortError = new Error('Manually cancelling existing WebAuthn API call');\n            abortError.name = 'AbortError';\n            this.controller.abort(abortError);\n            this.controller = undefined;\n        }\n    }\n}\n/**\n * A service singleton to help ensure that only a single WebAuthn ceremony is active at a time.\n *\n * Users of **@simplewebauthn/browser** shouldn't typically need to use this, but it can help e.g.\n * developers building projects that use client-side routing to better control the behavior of\n * their UX in response to router navigation events.\n */\nexport const WebAuthnAbortService = new BaseWebAuthnAbortService();\n","import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString.js';\nimport { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer.js';\nimport { browserSupportsWebAuthn } from '../helpers/browserSupportsWebAuthn.js';\nimport { toPublicKeyCredentialDescriptor } from '../helpers/toPublicKeyCredentialDescriptor.js';\nimport { identifyRegistrationError } from '../helpers/identifyRegistrationError.js';\nimport { WebAuthnAbortService } from '../helpers/webAuthnAbortService.js';\nimport { toAuthenticatorAttachment } from '../helpers/toAuthenticatorAttachment.js';\n/**\n * Begin authenticator \"registration\" via WebAuthn attestation\n *\n * @param optionsJSON Output from **@simplewebauthn/server**'s `generateRegistrationOptions()`\n * @param useAutoRegister (Optional) Try to silently create a passkey with the password manager that the user just signed in with. Defaults to `false`.\n */\nexport async function startRegistration(options) {\n    // @ts-ignore: Intentionally check for old call structure to warn about improper API call\n    if (!options.optionsJSON && options.challenge) {\n        console.warn('startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.');\n        // @ts-ignore: Reassign the options, passed in as a positional argument, to the expected variable\n        options = { optionsJSON: options };\n    }\n    const { optionsJSON, useAutoRegister = false } = options;\n    if (!browserSupportsWebAuthn()) {\n        throw new Error('WebAuthn is not supported in this browser');\n    }\n    // We need to convert some values to Uint8Arrays before passing the credentials to the navigator\n    const publicKey = {\n        ...optionsJSON,\n        challenge: base64URLStringToBuffer(optionsJSON.challenge),\n        user: {\n            ...optionsJSON.user,\n            id: base64URLStringToBuffer(optionsJSON.user.id),\n        },\n        excludeCredentials: optionsJSON.excludeCredentials?.map(toPublicKeyCredentialDescriptor),\n    };\n    // Prepare options for `.create()`\n    const createOptions = {};\n    /**\n     * Try to use conditional create to register a passkey for the user with the password manager\n     * the user just used to authenticate with. The user won't be shown any prominent UI by the\n     * browser.\n     */\n    if (useAutoRegister) {\n        // @ts-ignore: `mediation` doesn't yet exist on CredentialCreationOptions but it's possible as of Sept 2024\n        createOptions.mediation = 'conditional';\n    }\n    // Finalize options\n    createOptions.publicKey = publicKey;\n    // Set up the ability to cancel this request if the user attempts another\n    createOptions.signal = WebAuthnAbortService.createNewAbortSignal();\n    // Wait for the user to complete attestation\n    let credential;\n    try {\n        credential = (await navigator.credentials.create(createOptions));\n    }\n    catch (err) {\n        throw identifyRegistrationError({ error: err, options: createOptions });\n    }\n    if (!credential) {\n        throw new Error('Registration was not completed');\n    }\n    const { id, rawId, response, type } = credential;\n    // Continue to play it safe with `getTransports()` for now, even when L3 types say it's required\n    let transports = undefined;\n    if (typeof response.getTransports === 'function') {\n        transports = response.getTransports();\n    }\n    // L3 says this is required, but browser and webview support are still not guaranteed.\n    let responsePublicKeyAlgorithm = undefined;\n    if (typeof response.getPublicKeyAlgorithm === 'function') {\n        try {\n            responsePublicKeyAlgorithm = response.getPublicKeyAlgorithm();\n        }\n        catch (error) {\n            warnOnBrokenImplementation('getPublicKeyAlgorithm()', error);\n        }\n    }\n    let responsePublicKey = undefined;\n    if (typeof response.getPublicKey === 'function') {\n        try {\n            const _publicKey = response.getPublicKey();\n            if (_publicKey !== null) {\n                responsePublicKey = bufferToBase64URLString(_publicKey);\n            }\n        }\n        catch (error) {\n            warnOnBrokenImplementation('getPublicKey()', error);\n        }\n    }\n    // L3 says this is required, but browser and webview support are still not guaranteed.\n    let responseAuthenticatorData;\n    if (typeof response.getAuthenticatorData === 'function') {\n        try {\n            responseAuthenticatorData = bufferToBase64URLString(response.getAuthenticatorData());\n        }\n        catch (error) {\n            warnOnBrokenImplementation('getAuthenticatorData()', error);\n        }\n    }\n    return {\n        id,\n        rawId: bufferToBase64URLString(rawId),\n        response: {\n            attestationObject: bufferToBase64URLString(response.attestationObject),\n            clientDataJSON: bufferToBase64URLString(response.clientDataJSON),\n            transports,\n            publicKeyAlgorithm: responsePublicKeyAlgorithm,\n            publicKey: responsePublicKey,\n            authenticatorData: responseAuthenticatorData,\n        },\n        type,\n        clientExtensionResults: credential.getClientExtensionResults(),\n        authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment),\n    };\n}\n/**\n * Visibly warn when we detect an issue related to a passkey provider intercepting WebAuthn API\n * calls\n */\nfunction warnOnBrokenImplementation(methodName, cause) {\n    console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${methodName}. You should report this error to them.\\n`, cause);\n}\n","/**\n * Convert the given array buffer into a Base64URL-encoded string. Ideal for converting various\n * credential response ArrayBuffers to string for sending back to the server as JSON.\n *\n * Helper method to compliment `base64URLStringToBuffer`\n */\nexport function bufferToBase64URLString(buffer) {\n    const bytes = new Uint8Array(buffer);\n    let str = '';\n    for (const charCode of bytes) {\n        str += String.fromCharCode(charCode);\n    }\n    const base64String = btoa(str);\n    return base64String.replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=/g, '');\n}\n","/**\n * Convert from a Base64URL-encoded string to an Array Buffer. Best used when converting a\n * credential ID from a JSON string to an ArrayBuffer, like in allowCredentials or\n * excludeCredentials\n *\n * Helper method to compliment `bufferToBase64URLString`\n */\nexport function base64URLStringToBuffer(base64URLString) {\n    // Convert from Base64URL to Base64\n    const base64 = base64URLString.replace(/-/g, '+').replace(/_/g, '/');\n    /**\n     * Pad with '=' until it's a multiple of four\n     * (4 - (85 % 4 = 1) = 3) % 4 = 3 padding\n     * (4 - (86 % 4 = 2) = 2) % 4 = 2 padding\n     * (4 - (87 % 4 = 3) = 1) % 4 = 1 padding\n     * (4 - (88 % 4 = 0) = 4) % 4 = 0 padding\n     */\n    const padLength = (4 - (base64.length % 4)) % 4;\n    const padded = base64.padEnd(base64.length + padLength, '=');\n    // Convert to a binary string\n    const binary = atob(padded);\n    // Convert binary string to buffer\n    const buffer = new ArrayBuffer(binary.length);\n    const bytes = new Uint8Array(buffer);\n    for (let i = 0; i < binary.length; i++) {\n        bytes[i] = binary.charCodeAt(i);\n    }\n    return buffer;\n}\n","/**\n * Determine if the browser is capable of Webauthn\n */\nexport function browserSupportsWebAuthn() {\n    return _browserSupportsWebAuthnInternals.stubThis(globalThis?.PublicKeyCredential !== undefined &&\n        typeof globalThis.PublicKeyCredential === 'function');\n}\n/**\n * Make it possible to stub the return value during testing\n * @ignore Don't include this in docs output\n */\nexport const _browserSupportsWebAuthnInternals = {\n    stubThis: (value) => value,\n};\n","import { browserSupportsWebAuthn } from './browserSupportsWebAuthn.js';\n/**\n * Determine if the browser supports conditional UI, so that WebAuthn credentials can\n * be shown to the user in the browser's typical password autofill popup.\n */\nexport function browserSupportsWebAuthnAutofill() {\n    if (!browserSupportsWebAuthn()) {\n        return _browserSupportsWebAuthnAutofillInternals.stubThis(new Promise((resolve) => resolve(false)));\n    }\n    /**\n     * I don't like the `as unknown` here but there's a `declare var PublicKeyCredential` in\n     * TS' DOM lib that's making it difficult for me to just go `as PublicKeyCredentialFuture` as I\n     * want. I think I'm fine with this for now since it's _supposed_ to be temporary, until TS types\n     * have a chance to catch up.\n     */\n    const globalPublicKeyCredential = globalThis\n        .PublicKeyCredential;\n    if (globalPublicKeyCredential?.isConditionalMediationAvailable === undefined) {\n        return _browserSupportsWebAuthnAutofillInternals.stubThis(new Promise((resolve) => resolve(false)));\n    }\n    return _browserSupportsWebAuthnAutofillInternals.stubThis(globalPublicKeyCredential.isConditionalMediationAvailable());\n}\n// Make it possible to stub the return value during testing\nexport const _browserSupportsWebAuthnAutofillInternals = {\n    stubThis: (value) => value,\n};\n","import { base64URLStringToBuffer } from './base64URLStringToBuffer.js';\nexport function toPublicKeyCredentialDescriptor(descriptor) {\n    const { id } = descriptor;\n    return {\n        ...descriptor,\n        id: base64URLStringToBuffer(id),\n        /**\n         * `descriptor.transports` is an array of our `AuthenticatorTransportFuture` that includes newer\n         * transports that TypeScript's DOM lib is ignorant of. Convince TS that our list of transports\n         * are fine to pass to WebAuthn since browsers will recognize the new value.\n         */\n        transports: descriptor.transports,\n    };\n}\n","/**\n * A simple test to determine if a hostname is a properly-formatted domain name\n *\n * A \"valid domain\" is defined here: https://url.spec.whatwg.org/#valid-domain\n *\n * Regex was originally sourced from here, then remixed to add punycode support:\n * https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s15.html\n */\nexport function isValidDomain(hostname) {\n    return (\n    // Consider localhost valid as well since it's okay wrt Secure Contexts\n    hostname === 'localhost' ||\n        // Support punycode (ACE) or ascii labels and domains\n        /^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(hostname));\n}\n","import { isValidDomain } from './isValidDomain.js';\nimport { WebAuthnError } from './webAuthnError.js';\n/**\n * Attempt to intuit _why_ an error was raised after calling `navigator.credentials.get()`\n */\nexport function identifyAuthenticationError({ error, options, }) {\n    const { publicKey } = options;\n    if (!publicKey) {\n        throw Error('options was missing required publicKey property');\n    }\n    if (error.name === 'AbortError') {\n        if (options.signal instanceof AbortSignal) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-createCredential (Step 16)\n            return new WebAuthnError({\n                message: 'Authentication ceremony was sent an abort signal',\n                code: 'ERROR_CEREMONY_ABORTED',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'NotAllowedError') {\n        /**\n         * Pass the error directly through. Platforms are overloading this error beyond what the spec\n         * defines and we don't want to overwrite potentially useful error messages.\n         */\n        return new WebAuthnError({\n            message: error.message,\n            code: 'ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY',\n            cause: error,\n        });\n    }\n    else if (error.name === 'SecurityError') {\n        const effectiveDomain = globalThis.location.hostname;\n        if (!isValidDomain(effectiveDomain)) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 5)\n            return new WebAuthnError({\n                message: `${globalThis.location.hostname} is an invalid domain`,\n                code: 'ERROR_INVALID_DOMAIN',\n                cause: error,\n            });\n        }\n        else if (publicKey.rpId !== effectiveDomain) {\n            // https://www.w3.org/TR/webauthn-2/#sctn-discover-from-external-source (Step 6)\n            return new WebAuthnError({\n                message: `The RP ID \"${publicKey.rpId}\" is invalid for this domain`,\n                code: 'ERROR_INVALID_RP_ID',\n                cause: error,\n            });\n        }\n    }\n    else if (error.name === 'UnknownError') {\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 1)\n        // https://www.w3.org/TR/webauthn-2/#sctn-op-get-assertion (Step 12)\n        return new WebAuthnError({\n            message: 'The authenticator was unable to process the specified options, or could not create a new assertion signature',\n            code: 'ERROR_AUTHENTICATOR_GENERAL_ERROR',\n            cause: error,\n        });\n    }\n    return error;\n}\n","const attachments = ['cross-platform', 'platform'];\n/**\n * If possible coerce a `string` value into a known `AuthenticatorAttachment`\n */\nexport function toAuthenticatorAttachment(attachment) {\n    if (!attachment) {\n        return;\n    }\n    if (attachments.indexOf(attachment) < 0) {\n        return;\n    }\n    return attachment;\n}\n","import { bufferToBase64URLString } from '../helpers/bufferToBase64URLString.js';\nimport { base64URLStringToBuffer } from '../helpers/base64URLStringToBuffer.js';\nimport { browserSupportsWebAuthn } from '../helpers/browserSupportsWebAuthn.js';\nimport { browserSupportsWebAuthnAutofill } from '../helpers/browserSupportsWebAuthnAutofill.js';\nimport { toPublicKeyCredentialDescriptor } from '../helpers/toPublicKeyCredentialDescriptor.js';\nimport { identifyAuthenticationError } from '../helpers/identifyAuthenticationError.js';\nimport { WebAuthnAbortService } from '../helpers/webAuthnAbortService.js';\nimport { toAuthenticatorAttachment } from '../helpers/toAuthenticatorAttachment.js';\n/**\n * Begin authenticator \"login\" via WebAuthn assertion\n *\n * @param optionsJSON Output from **@simplewebauthn/server**'s `generateAuthenticationOptions()`\n * @param useBrowserAutofill (Optional) Initialize conditional UI to enable logging in via browser autofill prompts. Defaults to `false`.\n * @param verifyBrowserAutofillInput (Optional) Ensure a suitable `<input>` element is present when `useBrowserAutofill` is `true`. Defaults to `true`.\n */\nexport async function startAuthentication(options) {\n    // @ts-ignore: Intentionally check for old call structure to warn about improper API call\n    if (!options.optionsJSON && options.challenge) {\n        console.warn('startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.');\n        // @ts-ignore: Reassign the options, passed in as a positional argument, to the expected variable\n        options = { optionsJSON: options };\n    }\n    const { optionsJSON, useBrowserAutofill = false, verifyBrowserAutofillInput = true, } = options;\n    if (!browserSupportsWebAuthn()) {\n        throw new Error('WebAuthn is not supported in this browser');\n    }\n    // We need to avoid passing empty array to avoid blocking retrieval\n    // of public key\n    let allowCredentials;\n    if (optionsJSON.allowCredentials?.length !== 0) {\n        allowCredentials = optionsJSON.allowCredentials?.map(toPublicKeyCredentialDescriptor);\n    }\n    // We need to convert some values to Uint8Arrays before passing the credentials to the navigator\n    const publicKey = {\n        ...optionsJSON,\n        challenge: base64URLStringToBuffer(optionsJSON.challenge),\n        allowCredentials,\n    };\n    // Prepare options for `.get()`\n    const getOptions = {};\n    /**\n     * Set up the page to prompt the user to select a credential for authentication via the browser's\n     * input autofill mechanism.\n     */\n    if (useBrowserAutofill) {\n        if (!(await browserSupportsWebAuthnAutofill())) {\n            throw Error('Browser does not support WebAuthn autofill');\n        }\n        // Check for an <input> with \"webauthn\" in its `autocomplete` attribute\n        const eligibleInputs = document.querySelectorAll(\"input[autocomplete$='webauthn']\");\n        // WebAuthn autofill requires at least one valid input\n        if (eligibleInputs.length < 1 && verifyBrowserAutofillInput) {\n            throw Error('No <input> with \"webauthn\" as the only or last value in its `autocomplete` attribute was detected');\n        }\n        // `CredentialMediationRequirement` doesn't know about \"conditional\" yet as of\n        // typescript@4.6.3\n        getOptions.mediation = 'conditional';\n        // Conditional UI requires an empty allow list\n        publicKey.allowCredentials = [];\n    }\n    // Finalize options\n    getOptions.publicKey = publicKey;\n    // Set up the ability to cancel this request if the user attempts another\n    getOptions.signal = WebAuthnAbortService.createNewAbortSignal();\n    // Wait for the user to complete assertion\n    let credential;\n    try {\n        credential = (await navigator.credentials.get(getOptions));\n    }\n    catch (err) {\n        throw identifyAuthenticationError({ error: err, options: getOptions });\n    }\n    if (!credential) {\n        throw new Error('Authentication was not completed');\n    }\n    const { id, rawId, response, type } = credential;\n    let userHandle = undefined;\n    if (response.userHandle) {\n        userHandle = bufferToBase64URLString(response.userHandle);\n    }\n    // Convert values to base64 to make it easier to send back to the server\n    return {\n        id,\n        rawId: bufferToBase64URLString(rawId),\n        response: {\n            authenticatorData: bufferToBase64URLString(response.authenticatorData),\n            clientDataJSON: bufferToBase64URLString(response.clientDataJSON),\n            signature: bufferToBase64URLString(response.signature),\n            userHandle,\n        },\n        type,\n        clientExtensionResults: credential.getClientExtensionResults(),\n        authenticatorAttachment: toAuthenticatorAttachment(credential.authenticatorAttachment),\n    };\n}\n","import { State, Config, StatusEnum } from \"./types\";\nimport { getConfig, buildCompleteAuthenticationUrl } from \"./utils\";\nimport {\n  browserSupportsWebAuthn,\n  browserSupportsWebAuthnAutofill,\n  startAuthentication,\n  WebAuthnError,\n} from \"@simplewebauthn/browser\";\n\n/**\n * This function is immediately invoked and sets up the registration button\n */\n(() =>\n  (async function () {\n    const VERIFICATION_BUTTON_ID = \"passkey-verification-button\";\n    const VERIFICATION_STATUS_MESSAGE_ID =\n      \"passkey-verification-status-message\";\n    const VERIFICATION_STATUS_MESSAGE_VISIBLE_CLASS = \"visible\";\n    const VERIFICATION_PLACEHOLDER_ID = \"passkey-verification-placeholder\";\n    const VERIFICATION_FALLBACK_TEMPLATE_ID =\n      \"passkey-verification-unavailable-template\";\n    const VERIFICATION_AVAILABLE_TEMPLATE_ID =\n      \"passkey-verification-available-template\";\n\n    const EVENT_VERIFICATION_START = \"otp_webauthn.verification_start\";\n    const EVENT_VERIFICATION_COMPLETE = \"otp_webauthn.verification_complete\";\n    const EVENT_VERIFICATION_FAILED = \"otp_webauthn.verification_failed\";\n\n    async function setupPasskeyAutofill(config: Config) {\n      if (!config.autocompleteLoginFieldSelector) {\n        return;\n      }\n\n      // Find the login field\n      const loginField = document.querySelector(\n        config.autocompleteLoginFieldSelector,\n      ) as HTMLInputElement;\n\n      if (!loginField) {\n        console.error(\n          `Could not find login field with selector ${config.autocompleteLoginFieldSelector}. WebAuthn autofill cannot continue.`,\n        );\n        return;\n      }\n\n      // Add \"webauthn\" to the autocomplete attribute, necessary for the browser to trigger the autofill UI\n      const originalAutocompleteString =\n        loginField.getAttribute(\"autocomplete\") || \"\";\n      loginField.setAttribute(\n        \"autocomplete\",\n        // Order of the values is important; webauthn must be the last value\n        originalAutocompleteString + \" webauthn\",\n      );\n\n      loginField.dispatchEvent(\n        new CustomEvent(EVENT_VERIFICATION_START, {\n          detail: { fromAutofill: true },\n          bubbles: true,\n        }),\n      );\n\n      // Begin authentication: fetch options and challenge\n      const response = await fetch(config.beginAuthenticationUrl, {\n        method: \"POST\",\n        credentials: \"same-origin\",\n        headers: {\n          \"X-CSRFToken\": config.csrfToken,\n          Accept: \"application/json\",\n        },\n      });\n\n      if (!response.ok) {\n        console.error(\n          \"Unable to fetch options from server. Will not attempt autofill.\",\n        );\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_FAILED, {\n            detail: {\n              fromAutofill: true,\n              response,\n            },\n            bubbles: true,\n          }),\n        );\n        return;\n      }\n\n      let attResp;\n      try {\n        attResp = await startAuthentication({\n          optionsJSON: await response.json(),\n          useBrowserAutofill: true,\n        });\n      } catch (error: unknown) {\n        console.error(\n          \"Got error during the webauthn credential autofill call\",\n          error,\n        );\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_FAILED, {\n            detail: {\n              fromAutofill: true,\n              error,\n            },\n            bubbles: true,\n          }),\n        );\n        return;\n      }\n      // Find out if there is a hidden 'next' field on the page,\n      // or if there is a 'next' query parameter in the URL\n      const completeAuthenticationUrl = buildCompleteAuthenticationUrl(\n        config.completeAuthenticationUrl,\n        config.nextFieldSelector,\n      );\n\n      // Complete\n      const verificationResp = await fetch(completeAuthenticationUrl, {\n        method: \"POST\",\n        headers: {\n          \"Content-Type\": \"application/json\",\n          \"X-CSRFToken\": config.csrfToken,\n        },\n        credentials: \"same-origin\",\n        body: JSON.stringify(attResp),\n      });\n\n      // Check if the verification response is not JSON, which points to a server error\n      if (\n        !verificationResp.headers\n          .get(\"content-type\")\n          ?.includes(\"application/json\")\n      ) {\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_FAILED, {\n            detail: {\n              fromAutofill: true,\n              response: verificationResp,\n            },\n            bubbles: true,\n          }),\n        );\n        alert(gettext(\"Verification failed. A server error occurred.\"));\n        return;\n      }\n\n      // Wait for the results of verification\n      const verificationJSON = await verificationResp.json();\n\n      // Handle failed verification\n      if (!verificationResp.ok && \"detail\" in verificationJSON) {\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_FAILED, {\n            detail: {\n              fromAutofill: true,\n              response: verificationResp,\n            },\n            bubbles: true,\n          }),\n        );\n        alert(verificationJSON.detail);\n        return;\n      }\n\n      // Show UI appropriate for the `verified` status\n      if (verificationJSON && verificationJSON.id) {\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_COMPLETE, {\n            detail: {\n              fromAutofill: true,\n              response: verificationResp,\n            },\n            bubbles: true,\n          }),\n        );\n        // Redirect to the next page\n        if (verificationJSON.redirect_url) {\n          window.location.href = verificationJSON.redirect_url;\n        }\n      } else {\n        loginField.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_FAILED, {\n            detail: {\n              fromAutofill: true,\n              response: verificationResp,\n            },\n            bubbles: true,\n          }),\n        );\n        const msg =\n          verificationJSON.error ||\n          gettext(\"An error occurred during verification.\");\n        alert(msg);\n      }\n    }\n\n    async function setupPasskeyVerificationButton(\n      config: Config,\n    ): Promise<void> {\n      const passkeyVerifyButton = document.getElementById(\n        VERIFICATION_BUTTON_ID,\n      );\n      if (!passkeyVerifyButton) {\n        return;\n      }\n\n      const buttonLabel =\n        passkeyVerifyButton.textContent || gettext(\"Verify with Passkey\");\n\n      passkeyVerifyButton.addEventListener(\"click\", async (_) => {\n        passkeyVerifyButton.dispatchEvent(\n          new CustomEvent(EVENT_VERIFICATION_START, {\n            detail: {\n              fromAutofill: false,\n            },\n            bubbles: true,\n          }),\n        );\n        await setPasskeyVerifyState({\n          buttonDisabled: true,\n          statusEnum: StatusEnum.BUSY,\n          buttonLabel: gettext(\"Verifying...\"),\n        });\n\n        // Begin authentication: fetch options and challenge\n        const response = await fetch(config.beginAuthenticationUrl, {\n          method: \"POST\",\n          credentials: \"same-origin\",\n          headers: {\n            \"X-CSRFToken\": config.csrfToken,\n            Accept: \"application/json\",\n          },\n        });\n\n        if (!response.ok) {\n          await setPasskeyVerifyState({\n            buttonDisabled: false,\n            buttonLabel,\n            requestFocus: true,\n            statusEnum: StatusEnum.GET_OPTIONS_FAILED,\n            status: gettext(\n              \"Verification failed. Could not retrieve parameters from the server.\",\n            ),\n          });\n          passkeyVerifyButton.dispatchEvent(\n            new CustomEvent(EVENT_VERIFICATION_FAILED, {\n              detail: {\n                fromAutofill: false,\n                response,\n              },\n              bubbles: true,\n            }),\n          );\n          return;\n        }\n\n        let attResp;\n\n        try {\n          attResp = await startAuthentication({\n            optionsJSON: await response.json(),\n            useBrowserAutofill: false,\n          });\n        } catch (error: unknown) {\n          if (error instanceof Error || error instanceof WebAuthnError) {\n            console.error(error);\n\n            switch (error.name) {\n              case \"AbortError\":\n                await setPasskeyVerifyState({\n                  buttonDisabled: false,\n                  buttonLabel,\n                  requestFocus: true,\n                  statusEnum: StatusEnum.ABORTED,\n                  status: gettext(\"Verification aborted.\"),\n                });\n                break;\n              case \"NotAllowedError\":\n                await setPasskeyVerifyState({\n                  buttonDisabled: false,\n                  buttonLabel,\n                  requestFocus: true,\n                  statusEnum: StatusEnum.NOT_ALLOWED_OR_ABORTED,\n                  status: gettext(\"Verification canceled or not allowed.\"),\n                });\n                break;\n              default:\n                await setPasskeyVerifyState({\n                  buttonDisabled: false,\n                  buttonLabel,\n                  requestFocus: true,\n                  statusEnum: StatusEnum.UNKNOWN_ERROR,\n                  status: gettext(\n                    \"Verification failed. An unknown error occurred.\",\n                  ),\n                });\n                throw error;\n            }\n            passkeyVerifyButton.dispatchEvent(\n              new CustomEvent(EVENT_VERIFICATION_FAILED, {\n                detail: {\n                  fromAutofill: false,\n                  error,\n                },\n                bubbles: true,\n              }),\n            );\n            return;\n          }\n        }\n\n        await setPasskeyVerifyState({\n          buttonDisabled: true,\n          statusEnum: StatusEnum.BUSY,\n          buttonLabel: gettext(\"Finishing verification...\"),\n        });\n\n        // Find out if there is a hidden 'next' field on the page,\n        // or if there is a 'next' query parameter in the URL\n        const completeAuthenticationUrl = buildCompleteAuthenticationUrl(\n          config.completeAuthenticationUrl,\n          config.nextFieldSelector,\n        );\n\n        // Complete\n        const verificationResp = await fetch(completeAuthenticationUrl, {\n          method: \"POST\",\n          headers: {\n            \"Content-Type\": \"application/json\",\n            \"X-CSRFToken\": config.csrfToken,\n          },\n          credentials: \"same-origin\",\n          body: JSON.stringify(attResp),\n        });\n\n        if (\n          !verificationResp.headers\n            .get(\"content-type\")\n            ?.includes(\"application/json\")\n        ) {\n          await setPasskeyVerifyState({\n            buttonDisabled: false,\n            buttonLabel,\n            requestFocus: true,\n            statusEnum: StatusEnum.SERVER_ERROR,\n            status: gettext(\n              \"Verification failed. An unknown server error occurred.\",\n            ),\n          });\n          passkeyVerifyButton.dispatchEvent(\n            new CustomEvent(EVENT_VERIFICATION_FAILED, {\n              detail: {\n                fromAutofill: false,\n                response: verificationResp,\n              },\n              bubbles: true,\n            }),\n          );\n          return;\n        }\n\n        // Wait for the results of verification\n        const verificationJSON = await verificationResp.json();\n\n        if (!verificationResp.ok) {\n          const msg =\n            verificationJSON.detail ||\n            gettext(\"Verification failed. An unknown error occurred.\");\n          await setPasskeyVerifyState({\n            buttonDisabled: false,\n            buttonLabel,\n            statusEnum: StatusEnum.SERVER_ERROR,\n            requestFocus: true,\n            status: msg,\n          });\n          passkeyVerifyButton.dispatchEvent(\n            new CustomEvent(EVENT_VERIFICATION_FAILED, {\n              detail: {\n                fromAutofill: false,\n                response: verificationResp,\n              },\n              bubbles: true,\n            }),\n          );\n          return;\n        }\n\n        // Show UI appropriate for the `verified` status\n        if (verificationJSON && verificationJSON.id) {\n          await setPasskeyVerifyState({\n            buttonDisabled: false,\n            buttonLabel,\n            statusEnum: StatusEnum.SUCCESS,\n            status: gettext(\"Verification successful!\"),\n          });\n\n          passkeyVerifyButton.dispatchEvent(\n            new CustomEvent(EVENT_VERIFICATION_COMPLETE, {\n              detail: {\n                fromAutofill: false,\n                response: verificationResp,\n                id: verificationJSON.id,\n              },\n              bubbles: true,\n            }),\n          );\n\n          // Redirect to the next page\n          if (verificationJSON.redirect_url) {\n            window.location.href = verificationJSON.redirect_url;\n          }\n        } else {\n          const msg =\n            verificationJSON.error ||\n            gettext(\"An error occurred during verification.\");\n          await setPasskeyVerifyState({\n            buttonDisabled: false,\n            buttonLabel,\n            statusEnum: StatusEnum.SERVER_ERROR,\n            requestFocus: true,\n            status: msg,\n          });\n        }\n      });\n    }\n\n    async function setPasskeyVerifyState(state: State): Promise<void> {\n      const passkeyAuthButton = document.getElementById(\n        VERIFICATION_BUTTON_ID,\n      ) as HTMLButtonElement;\n      if (!passkeyAuthButton) {\n        return;\n      }\n      const passkeyStatusText = document.getElementById(\n        VERIFICATION_STATUS_MESSAGE_ID,\n      ) as HTMLElement;\n\n      passkeyAuthButton.disabled = state.buttonDisabled;\n      passkeyAuthButton.textContent = state.buttonLabel;\n\n      if (state.statusEnum) {\n        passkeyStatusText.setAttribute(\"data-status-enum\", state.statusEnum);\n      } else {\n        passkeyStatusText.removeAttribute(\"data-status-enum\");\n      }\n\n      if (passkeyStatusText) {\n        // If there is a status message, we want to make sure screen readers\n        // announce it to the user for clarity as to what is happening.\n        if (state.status) {\n          passkeyAuthButton.setAttribute(\n            \"aria-describedby\",\n            VERIFICATION_STATUS_MESSAGE_ID,\n          );\n          passkeyStatusText.classList.add(\n            VERIFICATION_STATUS_MESSAGE_VISIBLE_CLASS,\n          );\n          passkeyStatusText.textContent = state.status;\n          passkeyStatusText.setAttribute(\"aria-live\", \"assertive\");\n\n          if (state.requestFocus) {\n            passkeyAuthButton.focus();\n          }\n        } else {\n          passkeyAuthButton.removeAttribute(\"aria-describedby\");\n          passkeyStatusText.removeAttribute(\"aria-live\");\n          passkeyStatusText.classList.remove(\n            VERIFICATION_STATUS_MESSAGE_VISIBLE_CLASS,\n          );\n        }\n      }\n    }\n\n    async function setPasskeyVerificationVisible(\n      visible: boolean,\n    ): Promise<void> {\n      const placeholderElement = document.getElementById(\n        VERIFICATION_PLACEHOLDER_ID,\n      );\n      const availableTemplate = document.getElementById(\n        VERIFICATION_AVAILABLE_TEMPLATE_ID,\n      ) as HTMLTemplateElement;\n      const fallbackTemplate = document.getElementById(\n        VERIFICATION_FALLBACK_TEMPLATE_ID,\n      ) as HTMLTemplateElement;\n\n      if (!placeholderElement) {\n        throw new Error(\"Placeholder element not found\");\n      }\n\n      if (!availableTemplate) {\n        throw new Error(\"Available template not found\");\n      }\n\n      if (visible) {\n        const clone = availableTemplate.content.cloneNode(true);\n        placeholderElement.replaceWith(clone);\n      } else {\n        if (fallbackTemplate) {\n          const clone = fallbackTemplate.content.cloneNode(true);\n          placeholderElement.replaceWith(clone);\n        } else {\n          placeholderElement.remove();\n        }\n      }\n    }\n\n    const config = await getConfig();\n    if (\n      config.autocompleteLoginFieldSelector &&\n      (await browserSupportsWebAuthnAutofill())\n    ) {\n      setupPasskeyAutofill(config);\n    }\n\n    if (!browserSupportsWebAuthn()) {\n      await setPasskeyVerificationVisible(false);\n    } else {\n      await setPasskeyVerificationVisible(true);\n      setupPasskeyVerificationButton(config);\n    }\n  })())();\n"],"names":["StatusEnum","getConfig","config","configElement","buildCompleteAuthenticationUrl","baseUrl","nextFieldSelectorQuery","nextValue","url","WebAuthnError","message","code","cause","name","identifyRegistrationError","error","options","publicKey","identifyRegistrationError_WebAuthnError","param","effectiveDomain","isValidDomain","BaseWebAuthnAbortService","abortError","newController","WebAuthnAbortService","startRegistration","optionsJSON","useAutoRegister","browserSupportsWebAuthn","base64URLStringToBuffer","toPublicKeyCredentialDescriptor","createOptions","startRegistration_WebAuthnAbortService","credential","err","startRegistration_identifyRegistrationError","id","rawId","response","type","transports","responsePublicKeyAlgorithm","warnOnBrokenImplementation","responsePublicKey","_publicKey","bufferToBase64URLString","responseAuthenticatorData","toAuthenticatorAttachment","methodName","bufferToBase64URLString_bufferToBase64URLString","buffer","bytes","str","charCode","base64URLStringToBuffer_base64URLStringToBuffer","base64URLString","base64","padLength","padded","binary","i","browserSupportsWebAuthn_browserSupportsWebAuthn","_browserSupportsWebAuthnInternals","value","browserSupportsWebAuthnAutofill","_browserSupportsWebAuthnAutofillInternals","resolve","globalPublicKeyCredential","toPublicKeyCredentialDescriptor_toPublicKeyCredentialDescriptor","descriptor","isValidDomain_isValidDomain","hostname","identifyAuthenticationError","attachments","toAuthenticatorAttachment_toAuthenticatorAttachment","attachment","startAuthentication","useBrowserAutofill","verifyBrowserAutofillInput","allowCredentials","getOptions","userHandle","VERIFICATION_BUTTON_ID","VERIFICATION_STATUS_MESSAGE_ID","VERIFICATION_STATUS_MESSAGE_VISIBLE_CLASS","VERIFICATION_PLACEHOLDER_ID","VERIFICATION_FALLBACK_TEMPLATE_ID","VERIFICATION_AVAILABLE_TEMPLATE_ID","EVENT_VERIFICATION_START","EVENT_VERIFICATION_COMPLETE","EVENT_VERIFICATION_FAILED","setupPasskeyAutofill","loginField","originalAutocompleteString","attResp","completeAuthenticationUrl","verificationResp","verificationJSON","msg","setupPasskeyVerificationButton","passkeyVerifyButton","buttonLabel","setPasskeyVerifyState","state","passkeyAuthButton","passkeyStatusText","setPasskeyVerificationVisible","visible","placeholderElement","availableTemplate","fallbackTemplate","clone"],"sourceRoot":""}