@forgeroute/ui 0.4.17 → 0.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/forgeroute-ui-messaging.mjs +11 -7
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +6 -4
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui.mjs +375 -94
- package/fesm2022/forgeroute-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui.d.ts +114 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-stripe.mjs","names":[],"sources":["../../../projects/forgeroute-ui/stripe/src/stripe-loader/stripe-loader.ts","../../../projects/forgeroute-ui/stripe/src/errors/stripe-errors.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-outcomes.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-actions.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-appearance.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-payment.component.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.models.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { StripeLike, StripeLoadOptions } from './stripe-types';\n\n/**\n * Loads Stripe.js: `loader(publishableKey, options)` resolves the `Stripe` object (or `null` when it could not be created).\n * It is called exactly like `loadStripe(key, options)` from `@stripe/stripe-js`: the second argument is `undefined` unless a Connect\n * account / locale / other option is set.\n */\nexport type StripeLoaderFn = (publishableKey: string, options?: StripeLoadOptions) => Promise<StripeLike | null>;\n\n/** The dynamic import of the Stripe SDK, behind an object so a spec can replace it (internal: not part of the public API). */\nexport const sdkImporter: { load: () => Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }> } = {\n load: () => import('@stripe/stripe-js') as unknown as Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }>,\n};\n\n/**\n * The default loader. `@stripe/stripe-js` is imported lazily (a dynamic import), so the Stripe SDK is only downloaded when a\n * payment form is actually shown, and it is an optional peer dependency of the library.\n */\nexport const defaultStripeLoader: StripeLoaderFn = async (publishableKey, options) => {\n const sdk = await sdkImporter.load();\n const stripe = options === undefined ? await sdk.loadStripe(publishableKey) : await sdk.loadStripe(publishableKey, options as never);\n return stripe as unknown as StripeLike | null;\n};\n\n/** How Stripe.js is loaded. Provide your own to fake Stripe in tests or to load it differently. Defaults to `defaultStripeLoader`. */\nexport const STRIPE_LOADER = new InjectionToken<StripeLoaderFn>('STRIPE_LOADER', { providedIn: 'root', factory: () => defaultStripeLoader });\n\n/** App-wide defaults for every `ui-stripe-payment`, set once with `provideStripePayment`. A value on the component always wins. */\nexport interface StripePaymentDefaults {\n /** The publishable key (`pk_...`), used when the component has no `publishableKey` of its own. */\n publishableKey?: string;\n /** Stripe.js locale (`'en'`, `'es'`, ...): passed to `loadStripe` as `{ locale }`. */\n locale?: string;\n}\n\nexport const STRIPE_PAYMENT_DEFAULTS = new InjectionToken<StripePaymentDefaults>('STRIPE_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideStripePaymentOptions extends StripePaymentDefaults {\n /** Replaces how Stripe.js is loaded (tests, a self-hosted loader). */\n loader?: StripeLoaderFn;\n}\n\n/**\n * Global defaults for the Stripe components:\n *\n * providers: [provideStripePayment({ publishableKey: environment.stripePublishableKey, locale: 'en' })]\n */\nexport function provideStripePayment(options: ProvideStripePaymentOptions = {}): Provider[] {\n const { loader, ...defaults } = options;\n const providers: Provider[] = [{ provide: STRIPE_PAYMENT_DEFAULTS, useValue: defaults }];\n if (loader) providers.push({ provide: STRIPE_LOADER, useValue: loader });\n return providers;\n}\n\n/** `loadStripe`'s second argument for a Connect account / locale / extra options; `undefined` when there is nothing to pass (like the apps do today). */\nexport function buildLoadOptions(stripeAccount: string | null | undefined, locale: string | null | undefined, extra?: StripeLoadOptions | null): StripeLoadOptions | undefined {\n const options: StripeLoadOptions = { ...(extra ?? {}) };\n if (locale) options.locale = locale;\n if (stripeAccount) options.stripeAccount = stripeAccount;\n return Object.keys(options).length ? options : undefined;\n}\n","import type { StripeErrorLike } from '../stripe-loader/stripe-types';\n\n/**\n * Plain-language text for the Stripe decline / error codes (https://docs.stripe.com/declines/codes). One table for every app; an app can replace single entries\n * with the `errorMessages` input of `ui-stripe-payment` (or the `overrides` option of `getStripeErrorMessage`).\n */\nexport const STRIPE_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n // Card issue codes\n stolen_card: 'This card has been reported as stolen. Please use a different payment method.',\n lost_card: 'This card has been reported as lost. Please use a different payment method.',\n card_declined: 'Your card was declined. Please contact your bank or use a different card.',\n generic_decline: 'Your card was declined. Please contact your bank or try a different card.',\n insufficient_funds: 'Your card has insufficient funds. Please use a different card or add funds to your account.',\n do_not_honor: 'Your bank has declined this transaction. Please contact your bank or use a different card.',\n card_not_supported: 'This card does not support this type of purchase. Please use a different card.',\n currency_not_supported: 'This card does not support the requested currency. Please use a different card.',\n duplicate_transaction: 'A duplicate transaction was detected. Please wait a few minutes before trying again.',\n expired_card: 'Your card has expired. Please use a different card.',\n incorrect_cvc: 'The security code (CVC) is incorrect. Please check and try again.',\n incorrect_number: 'The card number is incorrect. Please check and try again.',\n invalid_cvc: 'The security code (CVC) is invalid. Please check and try again.',\n invalid_expiry_month: 'The expiration month is invalid. Please check and try again.',\n invalid_expiry_year: 'The expiration year is invalid. Please check and try again.',\n invalid_number: 'The card number is invalid. Please check and try again.',\n processing_error: 'An error occurred while processing your card. Please try again.',\n incorrect_zip: 'The ZIP/postal code is incorrect. Please check and try again.',\n card_velocity_exceeded: 'You have exceeded the balance or credit limit on your card. Please contact your bank.',\n withdrawal_count_limit_exceeded: 'You have exceeded the allowed number of transactions. Please try again later or use a different card.',\n // Authentication codes\n authentication_required: 'This card requires authentication. Please try again and complete the verification step.',\n // Fraud codes\n fraudulent: 'This transaction has been flagged by your bank. Please contact your bank or use a different card.',\n merchant_blacklist: 'This card cannot be used for this transaction. Please use a different card.',\n pickup_card: 'This card cannot be used. Please contact your bank or use a different card.',\n restricted_card: 'This card has restrictions that prevent this transaction. Please contact your bank or use a different card.',\n security_violation: 'This card has been flagged for a security violation. Please contact your bank.',\n // Account codes\n issuer_not_available: 'Your card issuer could not be reached. Please try again later.',\n new_account_information_available: 'Your card details have changed. Please update your card information and try again.',\n try_again_later: 'Your card issuer is temporarily unable to process this transaction. Please try again later.',\n reenter_transaction: 'The transaction could not be processed. Please try again.',\n // Limit codes\n approve_with_id: 'The payment cannot be authorized. Please contact your bank.',\n call_issuer: 'Your bank has declined this transaction. Please call your bank for more information.',\n do_not_try_again: 'Your bank has permanently declined this card. Please use a different payment method.',\n no_action_taken: 'Your bank could not process this transaction. Please contact your bank.',\n not_permitted: 'This transaction is not permitted on this card. Please contact your bank or use a different card.',\n revocation_of_all_authorizations: 'All authorizations have been revoked for this card. Please contact your bank.',\n revocation_of_authorization: 'The authorization for this card has been revoked. Please contact your bank.',\n stop_payment_order: 'Your bank has stopped this payment. Please contact your bank.',\n // Test mode\n testmode_decline: 'This is a test decline. No real charge was attempted.',\n // ACH\n bank_account_declined: 'Your bank account could not be used. Please try a different account.',\n debit_not_authorized: 'The debit was not authorized. Please contact your bank.',\n // Payment / setup intent state errors\n payment_intent_unexpected_state: 'This payment has already been processed. Please refresh the page and try again.',\n payment_intent_authentication_failure: 'Payment authentication failed. Please try again.',\n payment_intent_incompatible_payment_method: 'This payment method is not compatible. Please use a different payment method.',\n payment_intent_payment_attempt_failed: 'The payment attempt failed. Please try again or use a different payment method.',\n payment_method_unactivated: 'This payment method is not activated. Please use a different payment method.',\n payment_method_unexpected_state: 'There was an issue with your payment method. Please try again.',\n setup_intent_unexpected_state: 'This payment setup has already been completed. Please refresh the page.',\n amount_too_small: 'The payment amount is too small to process. Please contact the business.',\n amount_too_large: 'The payment amount exceeds the maximum allowed. Please contact the business.',\n balance_insufficient: 'Insufficient balance to complete this payment. Please use a different payment method.',\n resource_missing: 'The payment session has expired. Please refresh the page and try again.',\n};\n\n/** Text for the Stripe error types that are about Stripe or the connection, never about the customer's input (Stripe's own text there is technical). */\nexport const STRIPE_TECHNICAL_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n api_connection_error: 'We could not reach the payment service. Please check your connection and try again.',\n rate_limit_error: 'Too many requests. Please wait a moment and try again.',\n api_error: 'Something went wrong while processing the payment. Please try again.',\n authentication_error: 'Something went wrong while processing the payment. Please try again.',\n invalid_request_error: 'Something went wrong while processing the payment. Please try again.',\n};\n\nexport const STRIPE_DEFAULT_ERROR_MESSAGE = 'Payment failed. Please try again.';\nexport const STRIPE_ALREADY_PROCESSED_MESSAGE = 'This payment has already been processed. Please refresh the page and try again.';\nexport const STRIPE_SESSION_EXPIRED_MESSAGE = 'Your payment session has expired. Please refresh the page and try again.';\n\nexport type StripeErrorDisplay = 'friendly' | 'table' | 'stripe';\n\nexport interface StripeErrorMessageOptions {\n /**\n * `'friendly'` (default): the table above first, then Stripe's own text for card / validation errors (customer-facing) and plain text for technical errors.\n * `'table'`: the table, then Stripe's own `message` for EVERYTHING else, technical errors included (what the cremo payment flows show today).\n * `'stripe'`: Stripe's own `message` untouched (what the apps that show `error.message` do), the fallback when there is none.\n */\n display?: StripeErrorDisplay;\n /** Text for single codes; wins over the table. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown when there is nothing better. */\n fallback?: string;\n}\n\n/**\n * The text to show the customer for a Stripe.js error.\n * Friendly mode order: decline_code, code, the two technical Stripe messages (\"already succeeded\" / \"previously confirmed\", \"expired\"),\n * technical error types, Stripe's own message, the fallback. Table mode is the same without the technical error types.\n */\nexport function getStripeErrorMessage(error: StripeErrorLike | null | undefined, options: StripeErrorMessageOptions = {}): string {\n const fallback = options.fallback ?? STRIPE_DEFAULT_ERROR_MESSAGE;\n if (!error) return fallback;\n if (options.display === 'stripe') return error.message || fallback;\n const table = { ...STRIPE_ERROR_MESSAGES, ...(options.overrides ?? {}) };\n if (error.decline_code && table[error.decline_code]) return table[error.decline_code];\n if (error.code && table[error.code]) return table[error.code];\n const message = error.message;\n if (message) {\n if (message.includes('already succeeded') || message.includes('previously confirmed')) return options.overrides?.['payment_intent_unexpected_state'] ?? STRIPE_ALREADY_PROCESSED_MESSAGE;\n if (message.includes('expired')) return STRIPE_SESSION_EXPIRED_MESSAGE;\n }\n const technical = options.display === 'table' || !error.type ? undefined : STRIPE_TECHNICAL_ERROR_MESSAGES[error.type];\n if (technical) return technical;\n return message || fallback;\n}\n","import { getStripeErrorMessage, type StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport type { StripeErrorLike, StripeIntentLike } from '../stripe-loader/stripe-types';\n\nexport type StripeIntentKind = 'setup' | 'payment';\n\n/**\n * What happened, in one word:\n * - `succeeded`: the intent succeeded (card charged / method saved).\n * - `processing`: the payment was accepted and is settling (a bank debit takes days).\n * - `requires_verification`: a bank account was entered by number; Stripe sent micro-deposits and the customer has to verify them (see `verification`).\n * - `requires_action`: the intent still needs the customer to do something else (3D Secure, a redirect-less next action).\n * - `requires_capture`: the payment is authorized and waits for the host to capture it (`captureMethod: 'manual'`).\n * - `requires_payment_method`: Stripe sends the intent back for a new payment method (the payment failed).\n * - `canceled` / `unknown`: any other status.\n */\nexport type StripeOutcome = 'succeeded' | 'processing' | 'requires_verification' | 'requires_action' | 'requires_capture' | 'requires_payment_method' | 'canceled' | 'unknown';\n\n/** What the customer has to do to verify a bank account (`next_action.verify_with_microdeposits`). */\nexport interface StripeVerification {\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `null` when Stripe did not say. */\n type: 'amounts' | 'descriptor_code' | null;\n /** When the deposits should have arrived: Unix seconds as Stripe sends it, and the same instant as an ISO string. `null` when unknown. */\n arrivalDate: number | null;\n arrivalDateIso: string | null;\n /** Stripe's own page where the customer can verify (https), or `null`. */\n hostedVerificationUrl: string | null;\n}\n\n/** The normalised result of a confirmation (or of `handleReturn`). */\nexport interface StripeConfirmedEvent {\n kind: StripeIntentKind;\n /** Stripe's own `status` of the intent. */\n status: string;\n outcome: StripeOutcome;\n /** The intent exactly as Stripe.js returned it. */\n intent: StripeIntentLike;\n setupIntent?: StripeIntentLike;\n paymentIntent?: StripeIntentLike;\n intentId: string;\n /** The payment method of the intent as an id (`pm_...`), whether Stripe sent it as a string or an object; `null` when there is none. */\n paymentMethodId: string | null;\n /** Set when `outcome` is `requires_verification`. */\n verification: StripeVerification | null;\n /** The 3D Secure step (`stripe.handleCardAction`) ran before this result (`autoHandleCardAction` / `handleNextAction`). Hosts use it for their post-3DS wording. */\n actionHandled: boolean;\n}\n\n/** Why a flow stopped. */\nexport type StripeFailureStage = 'load' | 'submit' | 'intent' | 'confirm' | 'action' | 'result' | 'verify' | 'return';\n\n/** A failure: `message` is what to show the customer; `stripeMessage` is Stripe's own text. */\nexport interface StripeFailure {\n code: string;\n message: string;\n stripeMessage: string;\n declineCode?: string;\n type?: string;\n stage: StripeFailureStage;\n /** The Stripe error as returned, when there was one. */\n error?: StripeErrorLike;\n /** True when the failure happened in or after the 3D Secure step. */\n actionHandled?: boolean;\n /** Stripe's status of the intent when the failure is about the intent's status (`requires_payment_method`, `canceled`, ...). */\n status?: string;\n}\n\n/** The payment method type the Payment Element currently shows (`'card'`, `'us_bank_account'`, ...) and its completeness. */\nexport interface StripeElementChange {\n complete: boolean;\n empty: boolean;\n /** The selected payment method type, `null` when Stripe did not send one. */\n type: string | null;\n /** Stripe's own validation message for the form, when it shows one. */\n errorMessage: string | null;\n}\n\nexport const MSG_NOT_INITIALIZED = 'Payment system not initialized';\nexport const MSG_INTENT_FAILED = 'Failed to create payment intent';\nexport const MSG_NOT_COMPLETED = 'Payment was not completed';\nexport const MSG_REQUIRES_PAYMENT_METHOD = 'Payment failed. Please try a different payment method.';\nexport const MSG_NO_PAYMENT_METHOD = 'No payment method returned from Stripe';\nexport const MSG_AUTH_FAILED = 'Payment authentication failed';\nexport const MSG_AUTH_NOT_COMPLETED = 'Payment authentication was not completed';\nexport const MSG_KEY_MISSING = 'A Stripe publishable key is required';\nexport const MSG_LOAD_FAILED = 'Failed to load Stripe';\n\nexport function paymentMethodIdOf(intent: StripeIntentLike | null | undefined): string | null {\n const pm = intent?.payment_method;\n if (!pm) return null;\n return typeof pm === 'string' ? pm : pm.id || null;\n}\n\n/** The micro-deposit verification of an intent whose `next_action` is `verify_with_microdeposits`, else `null`. */\nexport function verificationOf(intent: StripeIntentLike | null | undefined): StripeVerification | null {\n const action = intent?.next_action;\n if (action?.type !== 'verify_with_microdeposits') return null;\n const details = action.verify_with_microdeposits ?? {};\n const arrival = typeof details.arrival_date === 'number' ? details.arrival_date : null;\n const type = details.microdeposit_type === 'amounts' || details.microdeposit_type === 'descriptor_code' ? details.microdeposit_type : null;\n const url = typeof details.hosted_verification_url === 'string' && details.hosted_verification_url ? details.hosted_verification_url : null;\n return { type, arrivalDate: arrival, arrivalDateIso: arrival === null ? null : new Date(arrival * 1000).toISOString(), hostedVerificationUrl: url };\n}\n\n/** Stripe's intent `status` (and `next_action`) as one `StripeOutcome`. */\nexport function outcomeOf(intent: StripeIntentLike): StripeOutcome {\n switch (intent.status) {\n case 'succeeded': return 'succeeded';\n case 'processing': return 'processing';\n case 'requires_capture': return 'requires_capture';\n case 'requires_action': return intent.next_action?.type === 'verify_with_microdeposits' ? 'requires_verification' : 'requires_action';\n case 'requires_payment_method': return 'requires_payment_method';\n case 'canceled': return 'canceled';\n default: return 'unknown';\n }\n}\n\nexport function normalizeIntent(kind: StripeIntentKind, intent: StripeIntentLike): StripeConfirmedEvent {\n const outcome = outcomeOf(intent);\n return {\n kind,\n status: intent.status,\n outcome,\n intent,\n ...(kind === 'setup' ? { setupIntent: intent } : { paymentIntent: intent }),\n intentId: intent.id,\n paymentMethodId: paymentMethodIdOf(intent),\n verification: outcome === 'requires_verification' ? verificationOf(intent) : null,\n actionHandled: false,\n };\n}\n\n/** A failure from a Stripe error, with the text to show chosen by `display` (see `getStripeErrorMessage`). */\nexport function failureFromError(error: StripeErrorLike | null | undefined, stage: StripeFailureStage, options: StripeErrorMessageOptions = {}): StripeFailure {\n return {\n code: error?.code || error?.type || 'unknown_error',\n message: getStripeErrorMessage(error, options),\n stripeMessage: error?.message ?? '',\n ...(error?.decline_code ? { declineCode: error.decline_code } : {}),\n ...(error?.type ? { type: error.type } : {}),\n stage,\n ...(error ? { error } : {}),\n };\n}\n\n/** A failure that is not a Stripe error (our own text). */\nexport function failure(code: string, message: string, stage: StripeFailureStage, stripeMessage = ''): StripeFailure {\n return { code, message, stripeMessage, stage };\n}\n\n/** An error thrown by a host callback or a request: its own `error.error.message` (HTTP body), `message`, else the fallback. */\nexport function messageOfThrown(err: unknown, fallback: string): string {\n const e = err as { error?: { message?: unknown }; message?: unknown } | null | undefined;\n if (typeof e?.error?.message === 'string' && e.error.message) return e.error.message;\n if (typeof e?.message === 'string' && e.message) return e.message;\n return fallback;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeLike, StripeLoadOptions } from '../stripe-loader/stripe-types';\nimport {\n failure, failureFromError, messageOfThrown, normalizeIntent, MSG_KEY_MISSING, MSG_LOAD_FAILED,\n type StripeConfirmedEvent, type StripeFailure, type StripeIntentKind, type StripeOutcome,\n} from './stripe-outcomes';\nimport type { StripeConfirmResult, StripeIntentLike } from '../stripe-loader/stripe-types';\n\n/** The Stripe object with `confirmUsBankAccountSetup`, for an app that keeps its own routing-number form (contractor). Use it as the type argument of `StripePaymentService.load`. */\nexport interface StripeLikeWithBankSetup extends StripeLike {\n confirmUsBankAccountSetup(clientSecret: string, data?: Record<string, unknown>): Promise<StripeConfirmResult<StripeIntentLike>>;\n}\n\n/** What `stripe.verifyMicrodepositsFor*` takes: the two deposit amounts in cents, or the 6-character code of the one deposit. */\nexport type MicrodepositVerifyData = { amounts: number[] } | { descriptor_code: string };\n\nexport interface StripeMicrodepositResult {\n /** The intent is verified (`processing` or `succeeded`). */\n ok: boolean;\n outcome: StripeOutcome | null;\n intent: StripeIntentLike | null;\n /** Set when `ok` is false. `message` is Stripe's own text (customer-facing for a wrong amount / code) or ours. */\n failure: StripeFailure | null;\n}\n\n/** What Stripe appends to the return URL after a redirect (`payment_intent_client_secret` / `setup_intent_client_secret`, `redirect_status`). */\nexport interface StripeReturnParams {\n kind: StripeIntentKind;\n clientSecret: string;\n redirectStatus: string | null;\n}\n\n/** Reads the intent Stripe returned the customer with from a query string (`location.search`); `null` when there is none. */\nexport function readStripeReturnParams(search: string): StripeReturnParams | null {\n const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);\n const payment = params.get('payment_intent_client_secret');\n const setup = params.get('setup_intent_client_secret');\n const kind: StripeIntentKind | null = payment ? 'payment' : setup ? 'setup' : null;\n if (!kind) return null;\n return { kind, clientSecret: (payment ?? setup) as string, redirectStatus: params.get('redirect_status') };\n}\n\nexport const MSG_VERIFY_FAILED = 'Verification failed';\nexport const MSG_VERIFY_THROWN = 'Verification failed. Please check the code and try again.';\nexport const MSG_RETURN_FAILED = 'We could not check the status of this payment. Please contact support before trying again.';\n\n/**\n * Verifies a bank account with micro-deposits through Stripe.js (`verifyMicrodepositsForPayment` / `verifyMicrodepositsForSetup`), the way the public\n * \"verify your bank\" pages do it with the intent's client secret. The result is `ok` once the intent is `processing` or `succeeded`.\n */\nexport async function verifyMicrodeposits(stripe: StripeLike, flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n const call = flow === 'payment' ? stripe.verifyMicrodepositsForPayment : stripe.verifyMicrodepositsForSetup;\n if (typeof call !== 'function') return { ok: false, outcome: null, intent: null, failure: failure('unsupported', MSG_VERIFY_FAILED, 'verify') };\n try {\n const result = await call.call(stripe, clientSecret, data as Record<string, unknown>);\n if (result.error) return { ok: false, outcome: null, intent: null, failure: failureFromError(result.error, 'verify', { display: 'stripe', fallback: MSG_VERIFY_FAILED }) };\n const intent = (flow === 'payment' ? result.paymentIntent : result.setupIntent) ?? null;\n const event = intent ? normalizeIntent(flow, intent) : null;\n if (event && (event.outcome === 'processing' || event.outcome === 'succeeded')) return { ok: true, outcome: event.outcome, intent, failure: null };\n return { ok: false, outcome: event?.outcome ?? null, intent, failure: failure('verification_incomplete', MSG_VERIFY_FAILED, 'verify') };\n } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('verification_failed', messageOfThrown(err, MSG_VERIFY_THROWN), 'verify', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeReturnResult {\n event: StripeConfirmedEvent | null;\n failure: StripeFailure | null;\n}\n\n/** Retrieves the intent after Stripe redirected the customer back (`retrievePaymentIntent` / `retrieveSetupIntent`) and normalises it. */\nexport async function retrieveIntent(stripe: StripeLike, kind: StripeIntentKind, clientSecret: string): Promise<StripeReturnResult> {\n const call = kind === 'payment' ? stripe.retrievePaymentIntent : stripe.retrieveSetupIntent;\n if (typeof call !== 'function') return { event: null, failure: failure('unsupported', MSG_RETURN_FAILED, 'return') };\n try {\n const result = await call.call(stripe, clientSecret);\n if (result.error) return { event: null, failure: failureFromError(result.error, 'return') };\n const intent = kind === 'payment' ? result.paymentIntent : result.setupIntent;\n if (!intent) return { event: null, failure: failure('no_intent', MSG_RETURN_FAILED, 'return') };\n return { event: normalizeIntent(kind, intent), failure: null };\n } catch (err) {\n return { event: null, failure: failure('return_failed', MSG_RETURN_FAILED, 'return', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeConnection {\n publishableKey?: string | null;\n /** A Stripe Connect account id. */\n stripeAccount?: string | null;\n locale?: string | null;\n /** Further `loadStripe` options. */\n options?: StripeLoadOptions | null;\n}\n\nexport interface HandleReturnOptions extends StripeConnection {\n /** The client secret from the return URL. Default: read from `search`. */\n clientSecret?: string;\n /** Which kind of intent `clientSecret` belongs to (default: from the URL parameter name, else `'payment'`). */\n kind?: StripeIntentKind;\n /** The query string to read the return parameters from. Default: `window.location.search`. */\n search?: string;\n}\n\n/**\n * Stripe.js without a component: loads Stripe like `ui-stripe-payment` does, verifies micro-deposits and checks the intent after a redirect.\n * For pages that only verify a bank account (the \"verify your bank\" link) or only land on the `returnUrl`.\n */\n@Injectable({ providedIn: 'root' })\nexport class StripePaymentService {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n\n /** Loads Stripe.js (`loadStripe(key, options)`). Pass a type for methods the library does not use: `load<StripeLikeWithBankSetup>(...)` (contractor's `confirmUsBankAccountSetup`). Throws when the key is missing or Stripe could not be created. */\n async load<T extends StripeLike = StripeLike>(connection: StripeConnection = {}): Promise<T> {\n const key = connection.publishableKey || this.defaults.publishableKey;\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, buildLoadOptions(connection.stripeAccount, connection.locale ?? this.defaults.locale, connection.options));\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe as T;\n }\n\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('payment', clientSecret, data, connection);\n }\n\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('setup', clientSecret, data, connection);\n }\n\n /** The intent the customer returned with, normalised. `{ event: null, failure: null }` when the URL carries no intent. */\n async handleReturn(options: HandleReturnOptions = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? (typeof window === 'undefined' ? '' : window.location.search));\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? 'payment';\n let stripe: StripeLike;\n try { stripe = await this.load(options); } catch (err) { return { event: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return retrieveIntent(stripe, kind, clientSecret);\n }\n\n private async verify(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.load(connection); } catch (err) { return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n}\n","/**\n * The Payment Element `appearance` for the page's own look: Stripe's variables read from CSS custom properties at runtime, so one set of\n * tokens styles the page and the payment form, in light and dark.\n *\n * :root { --ui-stripe-color-primary: #0d9488; --ui-stripe-border-radius: 8px; }\n *\n * Variables read (all optional; a missing one is left out so Stripe's default stays): `--ui-stripe-color-primary`, `--ui-stripe-color-background`,\n * `--ui-stripe-color-text`, `--ui-stripe-color-danger`, `--ui-stripe-font-family`, `--ui-stripe-border-radius`, `--ui-stripe-font-size-base`.\n * The theme is `night` when the page is dark (`data-theme=\"dark\"`, or the system is dark and `data-theme` is not `light`), else `stripe`.\n */\nexport interface StripeAppearance {\n theme?: 'stripe' | 'night' | 'flat';\n variables?: Record<string, string>;\n rules?: Record<string, Record<string, string>>;\n labels?: 'above' | 'floating';\n disableAnimations?: boolean;\n}\n\nconst TOKENS: readonly (readonly [string, string])[] = [\n ['--ui-stripe-color-primary', 'colorPrimary'],\n ['--ui-stripe-color-background', 'colorBackground'],\n ['--ui-stripe-color-text', 'colorText'],\n ['--ui-stripe-color-danger', 'colorDanger'],\n ['--ui-stripe-font-family', 'fontFamily'],\n ['--ui-stripe-border-radius', 'borderRadius'],\n ['--ui-stripe-font-size-base', 'fontSizeBase'],\n];\n\n/** True when the page is in dark mode: `data-theme=\"dark\"` on the root, or the system prefers dark and the root is not forced to `light`. */\nexport function isDarkPage(doc: Document): boolean {\n const root = doc.documentElement;\n const forced = root.getAttribute('data-theme');\n if (forced === 'dark') return true;\n if (forced === 'light') return false;\n try { return !!doc.defaultView?.matchMedia?.('(prefers-color-scheme: dark)').matches; } catch { return false; }\n}\n\n/** Builds the appearance from the tokens in effect on `element` (default: the document root). */\nexport function readStripeAppearance(doc: Document, element: Element = doc.documentElement): StripeAppearance {\n const view = doc.defaultView;\n const variables: Record<string, string> = {};\n if (view) {\n const style = view.getComputedStyle(element);\n for (const [token, variable] of TOKENS) {\n const value = style.getPropertyValue(token).trim();\n if (value) variables[variable] = value;\n }\n }\n return { theme: isDarkPage(doc) ? 'night' : 'stripe', ...(Object.keys(variables).length ? { variables } : {}) };\n}\n","import {\n ChangeDetectionStrategy, Component, DestroyRef, ElementRef, PLATFORM_ID, computed, effect, inject, input, output, signal, untracked, viewChild,\n} from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AlertComponent, ButtonComponent, SkeletonComponent } from '@forgeroute/ui';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeElementsLike, StripeLike, StripeLoadOptions, StripePaymentElementLike } from '../stripe-loader/stripe-types';\nimport type { StripeErrorDisplay, StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport { STRIPE_DEFAULT_ERROR_MESSAGE } from '../errors/stripe-errors';\nimport {\n MSG_AUTH_FAILED, MSG_AUTH_NOT_COMPLETED, MSG_KEY_MISSING, MSG_INTENT_FAILED, MSG_LOAD_FAILED, MSG_NOT_COMPLETED, MSG_NOT_INITIALIZED, MSG_NO_PAYMENT_METHOD,\n MSG_REQUIRES_PAYMENT_METHOD, failure, failureFromError, messageOfThrown, normalizeIntent,\n type StripeConfirmedEvent, type StripeElementChange, type StripeFailure, type StripeFailureStage, type StripeIntentKind,\n} from './stripe-outcomes';\nimport { readStripeReturnParams, retrieveIntent, verifyMicrodeposits, type MicrodepositVerifyData, type StripeMicrodepositResult, type StripeReturnResult } from './stripe-actions';\nimport { readStripeAppearance, type StripeAppearance } from './stripe-appearance';\n\n/** The texts of the screen-reader status region. */\nexport interface StripeA11yMessages {\n loading: string;\n savingMethod: string;\n processingPayment: string;\n methodSaved: string;\n paymentReceived: string;\n paymentProcessing: string;\n paymentAuthorized: string;\n verificationNeeded: string;\n actionRequired: string;\n}\n\nexport const STRIPE_A11Y_MESSAGES: Readonly<StripeA11yMessages> = {\n loading: 'Loading payment form',\n savingMethod: 'Saving payment method',\n processingPayment: 'Processing payment',\n methodSaved: 'Payment method saved',\n paymentReceived: 'Payment received',\n paymentProcessing: 'Payment is processing',\n paymentAuthorized: 'Payment authorized',\n verificationNeeded: 'Bank account added. It needs to be verified with small deposits.',\n actionRequired: 'Further action is required to complete the payment',\n};\n\n/** The exact text shown while the bank-account tab is selected. */\nexport const STRIPE_ACH_NOTICE = 'Signing in to your bank account lets you pay right away. Entering your routing and account numbers instead requires verification with two small deposits, which typically take a couple of days to arrive in your account.';\n\n/**\n * \"Deferred intent\" Elements: the form is shown first, the PaymentIntent / SetupIntent is created on the host's backend when the customer submits.\n * Maps to `stripe.elements({ mode, amount, currency, setup_future_usage, payment_method_types, ... })`.\n */\nexport interface StripeDeferredIntent {\n /** Default: the component's `mode`. */\n mode?: 'payment' | 'setup' | 'subscription';\n /** Smallest currency unit (cents). Changing it later calls `elements.update({ amount })` (no re-init). */\n amount?: number;\n currency: string;\n setupFutureUsage?: 'on_session' | 'off_session';\n captureMethod?: 'automatic' | 'automatic_async' | 'manual';\n onBehalfOf?: string;\n}\n\n/** Called on submit in deferred mode: create the intent on your backend and resolve its client secret (or `{ clientSecret }`). */\nexport type StripeCreateIntentFn = (context: { mode: StripeIntentKind }) => Promise<string | { clientSecret: string }>;\n\nexport interface StripeBillingDetails {\n name?: string;\n email?: string;\n phone?: string;\n address?: Record<string, string | null | undefined>;\n}\n\n/**\n * The live Stripe.js objects of a form, handed to the host by `(stripeReady)`: the host's own code can call `stripe.confirmPayment({ elements, ... })`,\n * `elements.submit()`, `elements.update()`, `elements.fetchUpdates()` and `paymentElement.update()` with its own arguments.\n */\nexport interface StripeReadyEvent {\n stripe: StripeLike;\n elements: StripeElementsLike;\n paymentElement: StripePaymentElementLike;\n}\n\nlet nextId = 0;\nconst jsonEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n\n/**\n * Stripe Payment Element: saves a payment method (`mode=\"setup\"`, a SetupIntent) or takes a payment (`mode=\"payment\"`, a PaymentIntent).\n *\n * The host app creates the intent on its backend and passes the `clientSecret` (or, for a deferred intent, `[deferred]` + `[createIntent]`).\n * Stripe.js is loaded lazily through `@stripe/stripe-js` (an optional peer dependency); nothing of Stripe is in the library's static imports.\n *\n * <ui-stripe-payment mode=\"setup\" [publishableKey]=\"key\" [clientSecret]=\"secret()\" submitLabel=\"Save card\"\n * (confirmed)=\"onSaved($event)\" (failed)=\"onFailed($event)\" />\n *\n * Every Stripe.js call and option reproduces what the CRM apps do today; see docs/stripe.md (\"Parity with the existing app implementations\").\n */\n@Component({\n selector: 'ui-stripe-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AlertComponent, ButtonComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && (loading() || submitting()) ? \"true\" : null' },\n template: `\n <div class=\"sp\">\n @if (!mountOnly() || a11yMessages()) {\n <div class=\"sp-sr\" role=\"status\" aria-live=\"polite\" data-testid=\"stripe-status\">{{ statusText() }}</div>\n }\n @if (!mountOnly() && (loading() || pending())) {\n <div class=\"sp-skeleton\" data-testid=\"stripe-skeleton\" aria-hidden=\"true\">\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" width=\"60%\" />\n </div>\n }\n @if (!mountOnly() && loadErrorText(); as text) {\n <div class=\"sp-block\" data-testid=\"stripe-load-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n <div #mount class=\"sp-mount\" [attr.id]=\"mountId() || null\" [class]=\"mountClass()\" [class.sp-mount--hidden]=\"mountHidden()\" [attr.aria-hidden]=\"mountHidden() ? 'true' : null\" [attr.inert]=\"mountHidden() ? '' : null\"\n [attr.role]=\"mountOnly() ? null : 'group'\" [attr.aria-label]=\"mountOnly() ? null : label()\" data-testid=\"stripe-mount\"></div>\n @if (!mountOnly() && achNoticeVisible()) {\n <div class=\"sp-block\" [attr.data-testid]=\"achNoticeTestId()\"><ui-alert variant=\"info\">{{ achNotice() }}</ui-alert></div>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"sp-block\" [id]=\"errorId\" data-testid=\"stripe-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"sp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [loading]=\"submitting()\" [disabled]=\"submitDisabled()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"stripe-submit\" (click)=\"confirm()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n :host { display: block; min-width: 0; }\n .sp-sr {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .sp-block { margin-top: 12px; }\n .sp-actions { margin-top: 16px; display: flex; justify-content: flex-end; }\n .sp { position: relative; }\n /* While loading the form is kept laid out (so Stripe can measure it and open Apple Pay / Link / the bank login) but invisible and untouchable. */\n .sp-mount--hidden { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }\n /* Phones: the button fills the row. ui-button's host is inline-flex and its inner button is content-sized, so the inner .btn is stretched (ui-button has no host width hook). */\n @media (max-width: 480px) {\n .sp-actions { display: block; }\n .sp-actions ui-button { display: flex; }\n .sp-actions ::ng-deep .btn { width: 100%; }\n }\n `],\n})\nexport class StripePaymentComponent {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the component only mounts the Payment Element. No submit button, skeleton, status text (unless `a11yMessages` is set), bank notice or error\n * alert; it never submits, confirms or updates by itself; load failures go to `(loadError)` only. The host keeps its own confirm code and calls Stripe.js with the\n * objects from `(stripeReady)`. `mountId` / `mountClass` still apply, and `(ready)`, `(elementChange)`, `(paymentMethodTypeChange)` still emit.\n */\n readonly mountOnly = input(false);\n /** `'setup'` saves a payment method (`confirmSetup`), `'payment'` takes a payment (`confirmPayment`). */\n readonly mode = input<StripeIntentKind>('payment');\n /** The publishable key (`pk_...`). Falls back to `provideStripePayment({ publishableKey })`. */\n readonly publishableKey = input<string | null>(null);\n /** The client secret of the SetupIntent / PaymentIntent your backend created. Changing it re-creates the form. */\n readonly clientSecret = input<string | null>(null);\n /** Deferred intent: show the form first, create the intent on submit with `createIntent`. Used instead of `clientSecret`. */\n readonly deferred = input<StripeDeferredIntent | null>(null);\n /** Creates the intent on submit (deferred mode) and resolves its client secret. */\n readonly createIntent = input<StripeCreateIntentFn | null>(null);\n /** A Stripe Connect account id (`acct_...`): `loadStripe(key, { stripeAccount })`. */\n readonly stripeAccount = input<string | null>(null);\n /** Stripe.js locale. */\n readonly locale = input<string | null>(null);\n /** Further `loadStripe` options. */\n readonly stripeOptions = input<StripeLoadOptions | null>(null);\n /** Payment method types for a DEFERRED intent (`elements({ payment_method_types })`). With a client secret the intent decides, nothing is passed. */\n readonly paymentMethodTypes = input<string[] | null>(null);\n /** Extra `stripe.elements()` options, merged last. */\n readonly elementsOptions = input<Record<string, unknown> | null>(null);\n\n // Payment Element options (`elements.create('payment', ...)`): only the ones that are set are passed.\n /** `'tabs'` (default), `'accordion'`, an object, or `null` to pass no layout. */\n readonly layout = input<string | Record<string, unknown> | null>('tabs');\n readonly paymentMethodOrder = input<string[] | null>(null);\n /** `{ applePay: 'never', googlePay: 'never' }` hides the wallets. */\n readonly wallets = input<Record<string, string> | null>(null);\n /** `{ billingDetails: { email: 'never', phone: 'never', address: 'auto' } }` etc. */\n readonly fields = input<Record<string, unknown> | null>(null);\n /** Pre-filled values: `{ billingDetails: { name, email, address: { country: 'US' } } }`. A later change updates the element in place. */\n readonly defaultValues = input<Record<string, unknown> | null>(null);\n readonly business = input<{ name: string } | null>(null);\n readonly terms = input<Record<string, string> | null>(null);\n /** Extra Payment Element options, merged last (readOnly, fields, ...). */\n readonly paymentElementOptions = input<Record<string, unknown> | null>(null);\n /** The Elements appearance. */\n readonly appearance = input<StripeAppearance | null>(null);\n /** Derive the appearance from the `--ui-stripe-*` CSS tokens (light / dark) when no `appearance` is set. */\n readonly appearanceFromTokens = input(false);\n\n // Confirmation\n /** Where Stripe sends the customer back after a redirect. Unset = the current page (`window.location.href`); `null` = pass no `return_url`. */\n readonly returnUrl = input<string | null | undefined>(undefined);\n /** Billing details sent on confirm (`confirmParams.payment_method_data.billing_details`), needed for fields hidden with `'never'`. */\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n /** Extra `confirmParams`, merged last. */\n readonly confirmParams = input<Record<string, unknown> | null>(null);\n /** `'if_required'` (default) keeps the customer on the page unless the method needs a redirect. */\n readonly redirect = input<'if_required' | 'always'>('if_required');\n /** Call `elements.submit()` before confirming. Unset = automatic: yes for a deferred intent (Stripe requires it), no with a client secret. */\n readonly submitBeforeConfirm = input<boolean | null>(null);\n /** After a payment comes back `requires_action` (not a bank verification), run `stripe.handleCardAction` (3D Secure) before reporting. */\n readonly autoHandleCardAction = input(false);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `confirm()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still creating the intent: show the loading skeleton. */\n readonly pending = input(false);\n /** Accessible name of the payment form. */\n readonly label = input('Payment details');\n /** The `id` of the element container (an app's e2e selector such as `#payment-element`). */\n readonly mountId = input('');\n /** Extra CSS classes on the element container. */\n readonly mountClass = input('');\n /** Show the bank-account notice while that tab is selected. */\n readonly showAchNotice = input(true);\n readonly achNotice = input(STRIPE_ACH_NOTICE);\n /** The `data-testid` of the notice (an app's existing e2e selector, e.g. `ach-setup-notice`). */\n readonly achNoticeTestId = input('stripe-ach-notice');\n /** The payment method type the host shows before Stripe reports one (cremo: `'card'`); `paymentMethodTypeChange` fires only when the reported type differs from it (or from the last report). */\n readonly initialPaymentMethodType = input('card');\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default), `'table'` (table text, else Stripe's own message: the cremo payment flows) or `'stripe'` (Stripe's own message). See `getStripeErrorMessage`. */\n readonly errorDisplay = input<StripeErrorDisplay>('friendly');\n /** Different error display for single steps (e.g. `{ submit: 'stripe', action: 'stripe' }`: raw Stripe text for the validation and 3DS steps, `errorDisplay` for the rest). */\n readonly errorDisplayByStage = input<Partial<Record<StripeFailureStage, StripeErrorDisplay>> | null>(null);\n /** The text when Stripe sends an error with no message (default: \"Payment failed. Please try again.\"). */\n readonly errorFallback = input('');\n /** The same per step (Settings: `{ submit: 'Failed to submit payment information', confirm: 'Failed to confirm payment method' }`); wins over `errorFallback`. */\n readonly errorFallbackByStage = input<Partial<Record<StripeFailureStage, string>> | null>(null);\n /** Replacement texts by code: Stripe error codes AND the library's own failure codes (`not_initialized`, `no_payment_method`, `requires_payment_method`, `not_completed`, `authentication_failed`, ...). `{status}` in a text becomes Stripe's status of the intent (\"Unexpected payment status: {status}\"). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly loadErrorMessage = input('Failed to load the payment form. Please try again.');\n /** Texts of the screen-reader status region (translate them); missing keys keep the English defaults. */\n readonly a11yMessages = input<Partial<StripeA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /**\n * The live Stripe.js objects, emitted once each time the Elements are created: right after `elements.create('payment')` and `mount()` succeeded, before `(ready)`\n * (the moment the old inline code had `this.stripe` / `this.elements` / `this.paymentElement` assigned). `null` is emitted when they go away (the form is re-created for new\n * inputs, or `destroyElements()`): drop your references. Destroying the component itself emits nothing (the host owns that moment).\n */\n readonly stripeReady = output<StripeReadyEvent | null>();\n /** The Payment Element finished loading. */\n readonly ready = output<void>();\n /** The customer picked another payment method type (`'card'`, `'us_bank_account'`, ...). */\n readonly paymentMethodTypeChange = output<string>();\n /** Every change of the form: completeness and the selected type. */\n readonly elementChange = output<StripeElementChange>();\n /** The intent was confirmed (succeeded, processing, needs bank verification, or needs a further action). */\n readonly confirmed = output<StripeConfirmedEvent>();\n /** A step failed (validation, intent creation, confirmation). `message` is ready to show. */\n readonly failed = output<StripeFailure>();\n /** Stripe.js or the Payment Element could not be loaded. */\n readonly loadError = output<StripeFailure>();\n\n // ── State ──────────────────────────────────────────────────────────────\n readonly loading = signal(false);\n readonly isReady = signal(false);\n readonly submitting = signal(false);\n readonly complete = signal(false);\n /** The selected payment method type, `null` until Stripe reports one. */\n readonly selectedType = signal<string | null>(null);\n readonly errorText = signal('');\n readonly loadErrorText = signal('');\n private readonly announcement = signal('');\n\n protected readonly errorId = `ui-stripe-error-${nextId++}`;\n private readonly mountRef = viewChild<ElementRef<HTMLElement>>('mount');\n\n protected readonly mountHidden = computed(() => !this.mountOnly() && (this.loading() || this.pending() || !!this.loadErrorText()));\n protected readonly achNoticeVisible = computed(() => this.showAchNotice() && this.selectedType() === 'us_bank_account');\n protected readonly effectiveSubmitLabel = computed(() => this.submitLabel() || (this.mode() === 'setup' ? 'Save payment method' : 'Pay'));\n protected readonly submitDisabled = computed(() => this.disabled() || this.loading() || this.pending() || !this.isReady() || !!this.loadErrorText());\n private readonly messages = computed((): StripeA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<StripeA11yMessages>;\n return { ...STRIPE_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => {\n if (this.loading()) return this.messages().loading;\n if (this.submitting()) return this.mode() === 'setup' ? this.messages().savingMethod : this.messages().processingPayment;\n return this.announcement();\n });\n\n /** How `loadStripe` is called: key + options. Re-creates everything when it changes. */\n private readonly connection = computed(() => {\n const key = this.publishableKey() || this.defaults.publishableKey || '';\n return { key, options: buildLoadOptions(this.stripeAccount(), this.locale() ?? this.defaults.locale, this.stripeOptions()) };\n }, { equal: jsonEqual });\n\n /** The `stripe.elements()` options without the deferred amount (that one is updated in place); `null` while there is no intent to show. */\n private readonly elementsConfig = computed((): Record<string, unknown> | null => {\n const secret = this.clientSecret();\n const deferred = this.deferred();\n let options: Record<string, unknown>;\n if (secret) {\n options = { clientSecret: secret };\n } else if (deferred) {\n options = {\n mode: deferred.mode ?? this.mode(),\n currency: deferred.currency,\n ...(deferred.setupFutureUsage ? { setup_future_usage: deferred.setupFutureUsage } : {}),\n ...(deferred.captureMethod ? { capture_method: deferred.captureMethod } : {}),\n ...(deferred.onBehalfOf ? { on_behalf_of: deferred.onBehalfOf } : {}),\n ...(this.paymentMethodTypes() ? { payment_method_types: this.paymentMethodTypes() } : {}),\n };\n } else {\n return null;\n }\n const appearance = this.appearance();\n if (appearance) options['appearance'] = appearance;\n return { ...options, ...(this.elementsOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n /** The Payment Element options that need a new element when they change (default values and read-only are updated in place). */\n private readonly elementConfig = computed(() => {\n const options: Record<string, unknown> = {};\n const layout = this.layout();\n if (layout) options['layout'] = layout;\n if (this.paymentMethodOrder()) options['paymentMethodOrder'] = this.paymentMethodOrder();\n if (this.wallets()) options['wallets'] = this.wallets();\n if (this.fields()) options['fields'] = this.fields();\n if (this.business()) options['business'] = this.business();\n if (this.terms()) options['terms'] = this.terms();\n return { ...options, ...(this.paymentElementOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n private stripe: StripeLike | null = null;\n private stripeSignature = '';\n private elements: StripeElementsLike | null = null;\n private element: StripePaymentElementLike | null = null;\n private generation = 0;\n private lastType: string | null = null;\n private lastAmount: number | undefined;\n private lastFailure: StripeFailure | null = null;\n private destroyed = false;\n /** What the element was last given, so a change made while it loaded is applied once it is ready. */\n private appliedDefaultValues = '';\n private appliedDisabled = false;\n\n constructor() {\n effect(() => {\n const mount = this.mountRef();\n const connection = this.connection();\n const elements = this.elementsConfig();\n const element = this.elementConfig();\n if (!mount) return;\n untracked(() => { void this.init(mount.nativeElement, connection, elements, element); });\n });\n // The deferred amount changes without a new form (a fee shown for the other payment method): elements.update({ amount }).\n effect(() => {\n const amount = this.deferred()?.amount;\n untracked(() => {\n if (!this.mountOnly() && amount !== undefined && this.lastAmount !== undefined && amount !== this.lastAmount && this.elements?.update) this.elements.update({ amount });\n this.lastAmount = amount;\n });\n });\n effect(() => {\n const defaultValues = this.defaultValues();\n untracked(() => this.applyDefaultValues(defaultValues));\n });\n effect(() => {\n const disabled = this.disabled();\n untracked(() => this.applyDisabled(disabled));\n });\n inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.generation++; this.disposeElements(); this.stripe = null; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Submits the form: `elements.submit()` (when required), the deferred intent, then `confirmSetup` / `confirmPayment`.\n * Resolves the normalised result (also emitted as `confirmed`), or `null` after a failure (emitted as `failed`) or when nothing was started\n * (already submitting, or disabled). Never rejects: anything Stripe.js throws becomes a `failed` event.\n *\n * `useExistingIntent`: the intent already exists (a retry after a failed attempt, or one created earlier): no `elements.submit()`, no `createIntent`,\n * and `confirmPayment` / `confirmSetup` is called WITHOUT a client secret, exactly like cremo's intake retry. Pass `clientSecret` (the one you stored) to send it.\n */\n async confirm(options: { useExistingIntent?: boolean; clientSecret?: string } = {}): Promise<StripeConfirmedEvent | null> {\n if (this.submitting() || this.disabled()) return null;\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'submit')); return null; }\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n let stage: StripeFailureStage = 'submit';\n try {\n const mode = this.mode();\n const existing = options.useExistingIntent === true;\n const deferred = !existing && !this.clientSecret() && !!this.deferred();\n if (!existing && (this.submitBeforeConfirm() ?? deferred)) {\n const { error } = await elements.submit();\n if (error) { this.fail(failureFromError(error, 'submit', this.errorOptions('submit'))); return null; }\n }\n let secret: string | undefined = existing ? options.clientSecret : undefined;\n if (deferred) {\n stage = 'intent';\n const create = this.createIntent();\n if (!create) { this.fail(failure('no_intent_factory', MSG_INTENT_FAILED, 'intent')); return null; }\n try {\n const created = await create({ mode });\n secret = typeof created === 'string' ? created : created?.clientSecret;\n } catch (err) {\n this.fail(failure('intent_creation_failed', messageOfThrown(err, STRIPE_DEFAULT_ERROR_MESSAGE), 'intent', messageOfThrown(err, '')));\n return null;\n }\n if (!secret) { this.fail(failure('intent_creation_failed', MSG_INTENT_FAILED, 'intent')); return null; }\n }\n stage = 'confirm';\n const confirmParams = this.buildConfirmParams();\n const params: Record<string, unknown> = {\n elements,\n ...(secret ? { clientSecret: secret } : {}),\n ...(confirmParams ? { confirmParams } : {}),\n redirect: this.redirect(),\n };\n const result = mode === 'setup' ? await stripe.confirmSetup(params) : await stripe.confirmPayment(params);\n if (result.error) { this.fail(failureFromError(result.error, 'confirm', this.errorOptions('confirm'))); return null; }\n const intent = mode === 'setup' ? result.setupIntent : result.paymentIntent;\n if (!intent) {\n this.fail(failure('not_completed', mode === 'setup' ? 'Payment method setup was incomplete. Please try again.' : MSG_NOT_COMPLETED, 'result'));\n return null;\n }\n let event = normalizeIntent(mode, intent);\n if (mode === 'setup' && !event.paymentMethodId) { this.fail(failure('no_payment_method', MSG_NO_PAYMENT_METHOD, 'result')); return null; }\n if (mode === 'payment' && event.outcome === 'requires_action' && this.autoHandleCardAction()) {\n stage = 'action';\n const handled = await this.runCardAction(stripe, intent.client_secret);\n if (!handled) return null;\n event = handled;\n }\n return this.finish(event);\n } catch (err) {\n this.fail(this.thrownFailure(err, stage));\n return null;\n } finally {\n this.submitting.set(false);\n }\n }\n\n /**\n * Runs `stripe.handleCardAction(clientSecret)` (3D Secure) for a payment that came back `requires_action`, and reports the result like `confirm()`.\n * Use it when `autoHandleCardAction` is off and the host handles `outcome: 'requires_action'` itself.\n */\n async handleNextAction(clientSecret: string): Promise<StripeConfirmedEvent | null> {\n if (this.submitting()) return null;\n const stripe = this.stripe;\n if (!stripe) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'action')); return null; }\n this.submitting.set(true);\n this.errorText.set('');\n try {\n const handled = await this.runCardAction(stripe, clientSecret);\n return handled ? this.finish(handled) : null;\n } catch (err) {\n this.fail(this.thrownFailure(err, 'action'));\n return null;\n } finally {\n this.submitting.set(false);\n }\n }\n\n /**\n * `elements.fetchUpdates()`: after your backend changed the amount of the intent this form was created with (cremo intake: fees differ per payment method),\n * so the form shows the new amount. Resolves `null` when it worked, else the failure (returned only, not emitted: the host decides, cremo ignores it).\n */\n async fetchUpdates(): Promise<StripeFailure | null> {\n const elements = this.elements;\n if (!elements?.fetchUpdates) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.fetchUpdates();\n return error ? failureFromError(error, 'confirm', this.errorOptions('confirm')) : null;\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /** `elements.update(options)`: change the deferred amount, appearance or locale without re-creating the form. */\n updateElements(options: Record<string, unknown>): void { this.elements?.update?.(options); }\n\n /** `paymentElement.update(options)`. */\n updatePaymentElement(options: Record<string, unknown>): void { this.element?.update?.(options); }\n\n /** Removes the Payment Element (host teardown on cancel). The component re-creates it when its inputs change. */\n destroyElements(): void { this.disposeElements(); this.isReady.set(false); }\n\n /** Verify a bank account with the two micro-deposit amounts / the descriptor code of a PaymentIntent (the public \"verify your bank\" page). */\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('payment', clientSecret, data);\n }\n\n /** Same for a SetupIntent. */\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('setup', clientSecret, data);\n }\n\n /**\n * After Stripe redirected the customer back to `returnUrl`: retrieves the intent (client secret from the URL by default) and reports it like `confirm()`\n * (`confirmed` for succeeded / processing / needs verification / needs action, `failed` otherwise). `{ event: null, failure: null }` when the URL has no intent.\n */\n async handleReturn(options: { clientSecret?: string; kind?: StripeIntentKind; search?: string } = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? this.doc.defaultView?.location.search ?? '');\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? this.mode();\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n const f = failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, ''));\n this.fail(f);\n return { event: null, failure: f };\n }\n const result = await retrieveIntent(stripe, kind, clientSecret);\n if (result.failure) { this.fail(result.failure); return result; }\n if (result.event && !this.finish(result.event, true)) return { event: null, failure: this.lastFailure };\n return result;\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n private errorOptions(stage: StripeFailureStage): StripeErrorMessageOptions {\n return {\n display: this.errorDisplayByStage()?.[stage] ?? this.errorDisplay(),\n overrides: this.errorMessages(),\n ...(this.errorFallbackByStage()?.[stage] || this.errorFallback() ? { fallback: this.errorFallbackByStage()?.[stage] || this.errorFallback() } : {}),\n };\n }\n\n /** Something Stripe.js threw (an IntegrationError, a network failure) as a failure, with the text chosen like any Stripe error. */\n private thrownFailure(err: unknown, stage: StripeFailureStage): StripeFailure {\n const e = err as { code?: unknown; type?: unknown; decline_code?: unknown; message?: unknown } | null | undefined;\n const error = {\n ...(typeof e?.code === 'string' ? { code: e.code } : {}),\n ...(typeof e?.type === 'string' ? { type: e.type } : {}),\n ...(typeof e?.decline_code === 'string' ? { decline_code: e.decline_code } : {}),\n ...(typeof e?.message === 'string' && e.message ? { message: e.message } : {}),\n };\n const code = stage === 'submit' ? 'submit_failed' : stage === 'action' ? 'action_failed' : 'confirm_failed';\n const { error: _raw, ...failed } = failureFromError(error, stage, this.errorOptions(stage));\n return { ...failed, code: error.code ?? code, ...(stage === 'action' ? { actionHandled: true } : {}) };\n }\n\n private buildConfirmParams(): Record<string, unknown> | null {\n const params: Record<string, unknown> = {};\n const returnUrl = this.returnUrl();\n if (returnUrl !== null) params['return_url'] = returnUrl ?? this.doc.defaultView?.location.href ?? '';\n const billing = this.billingDetails();\n if (billing) params['payment_method_data'] = { billing_details: billing };\n Object.assign(params, this.confirmParams() ?? {});\n return Object.keys(params).length ? params : null;\n }\n\n private fail(f: StripeFailure): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override.split('{status}').join(f.status ?? '') };\n this.lastFailure = f;\n if (this.destroyed) return;\n if (this.showErrors()) this.errorText.set(f.message);\n this.announcement.set('');\n this.failed.emit(f);\n }\n\n private finish(event: StripeConfirmedEvent, fromReturn = false): StripeConfirmedEvent | null {\n const acted = { ...(event.actionHandled ? { actionHandled: true } : {}), status: event.status };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('requires_payment_method', MSG_REQUIRES_PAYMENT_METHOD, fromReturn ? 'return' : 'result'), ...acted });\n return null;\n }\n if (event.outcome === 'canceled' || event.outcome === 'unknown') {\n this.fail({ ...failure('not_completed', MSG_NOT_COMPLETED, fromReturn ? 'return' : 'result'), ...acted });\n return null;\n }\n if (this.destroyed) return event;\n this.announcement.set(this.announce(event));\n this.confirmed.emit(event);\n return event;\n }\n\n private announce(event: StripeConfirmedEvent): string {\n const m = this.messages();\n switch (event.outcome) {\n case 'succeeded': return event.kind === 'setup' ? m.methodSaved : m.paymentReceived;\n case 'processing': return m.paymentProcessing;\n case 'requires_capture': return m.paymentAuthorized;\n case 'requires_verification': return m.verificationNeeded;\n default: return m.actionRequired;\n }\n }\n\n private async runCardAction(stripe: StripeLike, clientSecret: string | null | undefined): Promise<StripeConfirmedEvent | null> {\n const acted = { actionHandled: true };\n if (!stripe.handleCardAction || !clientSecret) { this.fail({ ...failure('action_unavailable', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }); return null; }\n const { error, paymentIntent } = await stripe.handleCardAction(clientSecret);\n if (error) { this.fail({ ...failureFromError(error, 'action', { ...this.errorOptions('action'), fallback: MSG_AUTH_FAILED }), ...acted }); return null; }\n if (!paymentIntent) { this.fail({ ...failure('action_incomplete', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }); return null; }\n const event = { ...normalizeIntent('payment', paymentIntent), ...acted };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('authentication_failed', 'Payment authentication failed. Please try a different payment method.', 'action'), ...acted, status: event.status });\n return null;\n }\n return event;\n }\n\n private async ensureStripe(): Promise<StripeLike> {\n if (this.stripe) return this.stripe;\n const { key, options } = this.connection();\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, options);\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe;\n }\n\n private async verifyWith(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) };\n }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n\n private disposeElements(): void {\n const element = this.element;\n this.element = null;\n this.elements = null;\n this.lastType = null;\n this.selectedType.set(null);\n this.complete.set(false);\n if (element) {\n try { element.destroy(); } catch { /* already gone */ }\n if (!this.destroyed) this.stripeReady.emit(null);\n }\n }\n\n private loadFailed(message: string, stripeMessage: string): void {\n this.loading.set(false);\n this.isReady.set(false);\n this.loadErrorText.set(this.loadErrorMessage());\n this.loadError.emit(failure('load_error', message, 'load', stripeMessage));\n }\n\n private async init(\n container: HTMLElement,\n connection: { key: string; options: StripeLoadOptions | undefined },\n elementsConfig: Record<string, unknown> | null,\n elementConfig: Record<string, unknown>,\n ): Promise<void> {\n const generation = ++this.generation;\n this.disposeElements();\n this.isReady.set(false);\n this.errorText.set('');\n this.loadErrorText.set('');\n this.announcement.set('');\n if (!this.isBrowser || !elementsConfig) { this.loading.set(false); return; }\n if (!connection.key) { this.loadFailed(MSG_KEY_MISSING, ''); return; }\n this.loading.set(true);\n try {\n const signature = JSON.stringify(connection);\n if (!this.stripe || this.stripeSignature !== signature) {\n this.stripe = null;\n const stripe = await this.loader(connection.key, connection.options);\n if (generation !== this.generation) return;\n if (!stripe) { this.loadFailed(MSG_LOAD_FAILED, ''); return; }\n this.stripe = stripe;\n this.stripeSignature = signature;\n }\n const options: Record<string, unknown> = { ...elementsConfig };\n const deferred = this.deferred();\n if (!options['clientSecret'] && deferred?.amount !== undefined && options['amount'] === undefined) options['amount'] = deferred.amount;\n this.lastAmount = deferred?.amount;\n if (this.appearanceFromTokens() && !options['appearance']) options['appearance'] = readStripeAppearance(this.doc, this.host.nativeElement);\n const elements = this.stripe.elements(options);\n const elementOptions: Record<string, unknown> = { ...elementConfig };\n const defaultValues = this.defaultValues();\n if (defaultValues) elementOptions['defaultValues'] = defaultValues;\n if (this.disabled() && !this.mountOnly()) elementOptions['readOnly'] = true;\n this.appliedDefaultValues = JSON.stringify(defaultValues ?? null);\n this.appliedDisabled = this.disabled();\n const element = elements.create('payment', elementOptions);\n this.elements = elements;\n this.element = element;\n element.on('change', (event) => { if (generation === this.generation) this.onChange(event); });\n element.on('ready', () => {\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.isReady.set(true);\n // Changes made while the element loaded (a customer name typed, the form disabled) are applied now.\n if (!this.mountOnly()) {\n this.applyDefaultValues(this.defaultValues());\n this.applyDisabled(this.disabled());\n }\n this.ready.emit();\n });\n element.on('loaderror', (event) => {\n if (generation !== this.generation) return;\n const message = event?.error?.message || MSG_LOAD_FAILED;\n this.loadFailed(message, event?.error?.message ?? '');\n });\n element.mount(container);\n this.stripeReady.emit({ stripe: this.stripe, elements, paymentElement: element });\n } catch (err) {\n if (generation !== this.generation) return;\n this.loadFailed(messageOfThrown(err, MSG_LOAD_FAILED), messageOfThrown(err, ''));\n }\n }\n\n private applyDefaultValues(defaultValues: Record<string, unknown> | null): void {\n const signature = JSON.stringify(defaultValues ?? null);\n if (this.mountOnly() || !this.element?.update || !this.isReady() || signature === this.appliedDefaultValues) return;\n this.appliedDefaultValues = signature;\n this.element.update({ defaultValues: defaultValues ?? {} });\n }\n\n private applyDisabled(disabled: boolean): void {\n if (this.mountOnly() || !this.element?.update || !this.isReady() || disabled === this.appliedDisabled) return;\n this.appliedDisabled = disabled;\n this.element.update({ readOnly: disabled });\n }\n\n private onChange(event: { complete?: boolean; empty?: boolean; value?: { type?: string }; error?: { message?: string } } | null | undefined): void {\n const type = event?.value?.type ?? null;\n const complete = !!event?.complete;\n this.complete.set(complete);\n if (type) this.selectedType.set(type);\n this.elementChange.emit({ complete, empty: !!event?.empty, type, errorMessage: event?.error?.message ?? null });\n if (type && type !== (this.lastType ?? this.initialPaymentMethodType())) this.paymentMethodTypeChange.emit(type);\n if (type) this.lastType = type;\n }\n}\n","/** How a bank account added with micro-deposits is verified: two deposit amounts, the code of one deposit, or the bank is still confirming it. */\nexport type MicrodepositType = 'amounts' | 'descriptor_code' | 'processing';\n\n/** The text of the pending-verification card, in one place for the component and its tests. */\nexport const MICRODEPOSIT_COPY = {\n title: 'Bank account waiting for verification',\n processingTitle: 'Bank account being confirmed',\n processing: 'Your bank is confirming this account; this usually takes up to a few business days. We will email you when it is ready.',\n cannotPay: \"Until then this account can't be used to pay invoices.\",\n readOnly: 'An administrator of your organization can finish the verification.',\n keepsActive: 'Your current payment method stays active until the new bank account is verified.',\n cancelTitle: 'Cancel verification',\n verifyLabel: 'Verify bank account',\n cancelBase: 'Cancel the verification of this bank account? It will not be saved as a payment method and you can add it again later.',\n cancelKeepsActive: ' Your current payment method stays active.',\n cancelNoOther: ' You have no other payment method saved.',\n tooManyAttempts: 'Too many failed attempts. Please try again later or contact support.',\n codeRequired: 'Enter the 6-character code.',\n} as const;\n\n/** \"June 5, 2026\" in UTC: the arrival date is a calendar day. Empty for no / an invalid date. */\nexport function microdepositArrivalText(iso: string | null | undefined): string {\n if (!iso) return '';\n const date = new Date(iso);\n return Number.isNaN(date.getTime()) ? '' : date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric', timeZone: 'UTC' });\n}\n\n/** Amounts: two whole numbers of cents from 1 to 99 (Stripe's micro-deposits are 1 to 99 cents). Empty text = nothing to say yet. */\nexport function depositAmountError(value: unknown): string {\n if (value === '' || value === null || value === undefined) return '';\n const n = Number(value);\n if (!Number.isInteger(n)) return 'Enter whole cents, for example 32.';\n if (n < 1 || n > 99) return 'Enter a number of cents from 1 to 99.';\n return '';\n}\n\n/** The code as sent to Stripe: trimmed, upper case. */\nexport const normalizeDescriptorCode = (value: string | null | undefined): string => (value ?? '').trim().toUpperCase();\n\n/** The descriptor code: 6 letters or numbers; with `requireSmPrefix` (Stripe's codes look like SMXXXX) it must start with \"SM\". Empty = nothing to say yet. */\nexport function descriptorCodeError(value: string | null | undefined, requireSmPrefix = false): string {\n const code = normalizeDescriptorCode(value);\n if (!code) return '';\n if (!/^[A-Z0-9]{6}$/.test(code)) return 'The code has 6 letters or numbers.';\n if (requireSmPrefix && !/^SM[A-Z0-9]{4}$/.test(code)) return 'Descriptor code must start with \"SM\" followed by 4 characters (e.g., SMXXXX)';\n return '';\n}\n\n/** Only an https link is offered as Stripe's hosted verification page. */\nexport function safeHostedUrl(url: string | null | undefined): string | null {\n return /^https:\\/\\//.test(url ?? '') ? (url as string) : null;\n}\n\n/** What `(verify)` emits: the two amounts in cents, or the code. */\nexport type MicrodepositVerifyEvent = { amounts: [number, number] } | { descriptorCode: string };\n\n/** Who started a pending verification, from the point of view of the user looking at it (a partner page): this user, the partner, or somebody else. */\nexport type MicrodepositStartedBy = 'you' | 'partner' | 'other' | '';\n\nexport interface MicrodepositStepsContext {\n type: Exclude<MicrodepositType, 'processing'>;\n /** ISO timestamp of the day the deposits should arrive. */\n arrivalDate?: string | null;\n /** Set when the user looks at ANOTHER party's account (a crematory looking at a partner): \"{partner}'s account\", \"Ask {partner} for ...\". */\n partnerName?: string;\n /** The user cannot finish it (no form on the card). */\n readOnly?: boolean;\n /** Read-only: who started it. */\n startedBy?: MicrodepositStartedBy;\n /** Read-only: replaces ONLY the middle sentence (\"An administrator of your organization can finish the verification.\" by default). */\n readOnlyText?: string;\n}\n\nconst arrivalClause = (iso: string | null | undefined): string => {\n const text = microdepositArrivalText(iso);\n return text ? ` (by ${text})` : '';\n};\n\n/**\n * The explanation under the bank account: the deposits clause, then what to do (or, with no form, who can finish it), then\n * \"Until then this account can't be used to pay invoices.\" The exact strings of the cremo Settings / Partners cards.\n */\nexport function microdepositStepsText(ctx: MicrodepositStepsContext): string {\n const partner = ctx.partnerName ?? '';\n const holder = partner ? `${partner}'s account` : 'your account';\n const clause = arrivalClause(ctx.arrivalDate);\n const deposits = ctx.type === 'descriptor_code'\n ? `Stripe sent one small deposit to ${holder}${clause}, with a description that starts with SM followed by a 6-character code. `\n : `Stripe sent two small deposits to ${holder}; they appear in 1-2 business days${clause}, with the description SMXXXX. `;\n if (ctx.readOnly) {\n const who = ctx.readOnlyText\n ?? (ctx.startedBy === 'partner' ? `This bank account was started by ${partner}; it can be finished by them.`\n : ctx.startedBy === 'other' ? 'This bank account was started by another crematory; it can be finished by them.'\n : partner ? `${partner} or the crematory that set it up can finish the verification.`\n : MICRODEPOSIT_COPY.readOnly);\n return `${deposits}${who} ${MICRODEPOSIT_COPY.cannotPay}`;\n }\n const enter = ctx.type === 'descriptor_code'\n ? (partner ? `Ask ${partner} for the code and enter it below to finish. ` : 'When it arrives, enter that code below to finish. ')\n : (partner ? `Ask ${partner} for the two deposit amounts and enter them below to finish. ` : 'When they arrive, enter the two amounts below to finish. ');\n return `${deposits}${enter}${MICRODEPOSIT_COPY.cannotPay}`;\n}\n\n/** While the bank is still confirming the account. */\nexport function microdepositProcessingText(partnerName = ''): string {\n return partnerName ? `${partnerName}'s bank is confirming this account; this usually takes up to a few business days. We will email you when it is ready.` : MICRODEPOSIT_COPY.processing;\n}\n\n/** The note under the steps when a payment method is already saved. */\nexport function microdepositKeepsActiveText(partnerName = ''): string {\n return partnerName ? `${partnerName}'s current payment method stays active until the new bank account is verified.` : MICRODEPOSIT_COPY.keepsActive;\n}\n\n/** The message of the cancel confirm: the saved method stays active only when one is saved. */\nexport function microdepositCancelMessage(options: { partnerName?: string; hasSavedMethod?: boolean } = {}): string {\n const partner = options.partnerName ?? '';\n if (partner) return `${MICRODEPOSIT_COPY.cancelBase} ${options.hasSavedMethod ? `${partner}'s current payment method stays active.` : `${partner} has no other payment method saved.`}`;\n return MICRODEPOSIT_COPY.cancelBase + (options.hasSavedMethod ? MICRODEPOSIT_COPY.cancelKeepsActive : MICRODEPOSIT_COPY.cancelNoOther);\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent,\n} from '@forgeroute/ui';\nimport { StripePaymentService, type StripeMicrodepositResult } from '../stripe-payment/stripe-actions';\nimport type { StripeIntentKind } from '../stripe-payment/stripe-outcomes';\nimport {\n MICRODEPOSIT_COPY, depositAmountError, descriptorCodeError, microdepositStepsText, normalizeDescriptorCode, safeHostedUrl,\n type MicrodepositType, type MicrodepositVerifyEvent,\n} from './microdeposit-verify.models';\n\n/**\n * \"Bank account waiting for verification\": explains the steps in plain words, takes the two deposit amounts (or the 6-character code),\n * links to Stripe's own verification page, and lets the user cancel. Read-only users see the card but no form and no buttons.\n *\n * Two ways to verify, same screen:\n * - Host verifies (default): `(verify)` emits `{ amounts: [a, b] }` or `{ descriptorCode }`; the host calls its backend and shows\n * `[verifying]` / `[errorText]` (your API owns the rules and the attempts).\n * - Stripe.js verifies (public \"verify your bank\" page): pass `[clientSecret]` (+ `[publishableKey]`, `[stripeAccount]`, `[flow]`); the component calls\n * `verifyMicrodepositsForPayment/Setup` itself, counts failed attempts (`[maxAttempts]`) and emits `(verified)`.\n *\n * <ui-microdeposit-verify type=\"amounts\" bankName=\"Chase\" last4=\"6789\" arrivalDate=\"2026-06-05T00:00:00Z\"\n * [verifying]=\"busy()\" [errorText]=\"error()\" (verify)=\"verify($event)\" (cancelVerification)=\"cancel()\" />\n */\n@Component({\n selector: 'ui-microdeposit-verify',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent],\n template: `\n <div data-testid=\"bank-pending-card\">\n <ui-form-section [label]=\"heading()\">\n <ui-alert variant=\"info\" data-testid=\"bank-pending-alert\">\n <div data-testid=\"bank-pending-summary\">\n @if (bankLine(); as line) { <strong data-testid=\"bank-pending-bank\">{{ line }}</strong> }\n <ui-badge label=\"Pending\" variant=\"yellow\" data-testid=\"bank-pending-badge\" />\n </div>\n @if (stepsText().trim()) {\n <ui-text size=\"sm\" [text]=\"stepsText()\" data-testid=\"bank-pending-steps\" />\n } @else if (isProcessing()) {\n <ui-text size=\"sm\" [text]=\"copy.processing\" data-testid=\"bank-pending-steps\" />\n } @else {\n <ui-text size=\"sm\" data-testid=\"bank-pending-steps\" [text]=\"defaultSteps()\" />\n }\n @if (hasSavedMethod()) {\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"keepsActiveText() || copy.keepsActive\" data-testid=\"bank-pending-keeps-active\" />\n }\n <!-- Finishing the verification on Stripe's page saves the payment method (a write): never offered to a read-only user -->\n @if (!formHidden() && !hideHostedLink() && safeUrl(); as url) {\n <div><ui-button variant=\"link\" size=\"sm\" [href]=\"url\" target=\"_blank\" data-testid=\"bank-hosted-link\">Open Stripe's verification page</ui-button></div>\n }\n </ui-alert>\n\n @if (!formHidden() && !isProcessing()) {\n @if (type() === 'descriptor_code') {\n <ui-text-input label=\"Verification code\" hint=\"6 letters or numbers from the deposit description\" [maxlength]=\"6\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? codeError() : ''\" data-testid=\"bank-code-input\" [ngModel]=\"code()\" (ngModelChange)=\"code.set($event)\" />\n } @else {\n <ui-form-row data-testid=\"bank-amounts-row\">\n <ui-text-input label=\"First deposit (cents)\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(first()) : ''\" data-testid=\"bank-amount-first\" [ngModel]=\"first()\" (ngModelChange)=\"first.set($event)\" />\n <ui-text-input label=\"Second deposit (cents)\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(second()) : ''\" data-testid=\"bank-amount-second\" [ngModel]=\"second()\" (ngModelChange)=\"second.set($event)\" />\n </ui-form-row>\n }\n @if (shownError(); as text) {\n <ui-alert variant=\"danger\" data-testid=\"bank-verify-error\">{{ text }}</ui-alert>\n }\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"bank-verify-button\" [loading]=\"busy()\" [disabled]=\"busy() || cancelling()\" (click)=\"verify()\">{{ verifyLabel() || copy.verifyLabel }}</ui-button>\n }\n\n @if (!formHidden() && allowCancel()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-button\" [disabled]=\"busy() || cancelling()\" (click)=\"showCancelConfirm.set(true)\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n }\n </ui-form-section>\n\n <ui-modal [open]=\"showCancelConfirm()\" [title]=\"cancelLabel() || copy.cancelTitle\" maxWidth=\"460px\" (close)=\"showCancelConfirm.set(false)\">\n <ui-text size=\"sm\" data-testid=\"bank-cancel-message\" [text]=\"cancelMessage()\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-keep\" (click)=\"showCancelConfirm.set(false)\">Keep waiting</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"bank-cancel-confirm\" [loading]=\"cancelling()\" (click)=\"confirmCancel()\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n </ui-modal>\n </div>\n `,\n})\nexport class MicrodepositVerifyComponent {\n private readonly service = inject(StripePaymentService);\n\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `'processing'` (the bank is still confirming; nothing to enter). */\n readonly type = input<MicrodepositType>('amounts');\n readonly bankName = input('');\n readonly last4 = input('');\n /** The day the deposits should have arrived (ISO timestamp); empty when unknown. See `StripeVerification.arrivalDateIso`. */\n readonly arrivalDate = input<string | null>(null);\n /** Stripe's own verification page; only an https link is shown. */\n readonly hostedVerificationUrl = input<string | null>(null);\n /** Read-only users see the card with `readOnlyText` but no form, link or buttons. */\n readonly readOnly = input(false);\n /** Show the card as plain status: no form, link or buttons, and the steps text is yours (`stepsText`). For a page where someone else finishes the verification. */\n readonly statusOnly = input(false);\n /** Replaces the card heading (default: \"Bank account waiting for verification\" / \"Bank account being confirmed\"). */\n readonly title = input('');\n /** Replaces the whole steps text (the sentences about the deposits and what to enter). Use it for wording the library cannot know (a partner's name, who started it). */\n readonly stepsText = input('');\n /** Read-only / status-only: replaces ONLY the middle sentence of the steps text (the deposits clause before it and \"Until then this account can't be used ...\" after it stay). */\n readonly readOnlyText = input<string>(MICRODEPOSIT_COPY.readOnly);\n /** Hide Stripe's hosted-page link even for users who could use it. */\n readonly hideHostedLink = input(false);\n readonly cancelLabel = input('');\n readonly verifyLabel = input('');\n /** Replaces \"Your current payment method stays active until the new bank account is verified.\" */\n readonly keepsActiveText = input('');\n /** Replaces the cancel confirm's message. */\n readonly cancelMessageText = input('');\n /** A payment method is already saved (it stays active until the new bank account is verified). */\n readonly hasSavedMethod = input(false);\n /** Host mode: the host's verify request is running. */\n readonly verifying = input(false);\n /** Host mode: the host's cancel request is running. */\n readonly cancelling = input(false);\n /** Host mode: the verification failed; shown above the button. */\n readonly errorText = input('');\n /** Offer \"Cancel verification\" (with its confirm). */\n readonly allowCancel = input(true);\n /** Descriptor codes must look like Stripe's (`SMXXXX`). */\n readonly requireSmPrefix = input(false);\n\n // Stripe.js mode (set `clientSecret`)\n readonly clientSecret = input<string | null>(null);\n readonly publishableKey = input<string | null>(null);\n readonly stripeAccount = input<string | null>(null);\n /** Which kind of intent `clientSecret` belongs to. */\n readonly flow = input<StripeIntentKind>('payment');\n /** Stripe.js mode: stop sending after this many failed attempts (0 = no limit here). */\n readonly maxAttempts = input(0);\n\n /** Host mode: the amounts / code to verify. */\n readonly verify$ = output<MicrodepositVerifyEvent>({ alias: 'verify' });\n /** The user confirmed cancelling the verification. */\n readonly cancelVerification = output<void>();\n /** Stripe.js mode: the bank account is verified. */\n readonly verified = output<StripeMicrodepositResult>();\n /** Stripe.js mode: a verification attempt failed (the text is already shown). */\n readonly verifyFailed = output<StripeMicrodepositResult>();\n\n readonly copy = MICRODEPOSIT_COPY;\n readonly first = signal<string | number>('');\n readonly second = signal<string | number>('');\n readonly code = signal('');\n readonly touched = signal(false);\n readonly showCancelConfirm = signal(false);\n private readonly stripeBusy = signal(false);\n private readonly stripeError = signal('');\n private failedAttempts = 0;\n\n readonly formHidden = computed(() => this.readOnly() || this.statusOnly());\n readonly heading = computed(() => this.title() || (this.isProcessing() ? this.copy.processingTitle : this.copy.title));\n /** \"Chase ····6789\"; nothing when neither the bank nor the last 4 digits are known. */\n readonly bankLine = computed(() => {\n const bank = this.bankName().trim();\n const last4 = this.last4().trim();\n if (!bank && !last4) return '';\n return `${bank || 'Bank account'}${last4 ? ` ····${last4}` : ''}`;\n });\n readonly busy = computed(() => this.verifying() || this.stripeBusy());\n readonly shownError = computed(() => this.stripeError() || this.errorText());\n readonly isProcessing = computed(() => this.type() === 'processing');\n readonly safeUrl = computed(() => safeHostedUrl(this.hostedVerificationUrl()));\n /** The built-in steps text: deposits clause + what to do, or with no form the `readOnlyText` sentence, + \"Until then this account can't be used to pay invoices.\" */\n readonly defaultSteps = computed(() => microdepositStepsText({\n type: this.type() === 'descriptor_code' ? 'descriptor_code' : 'amounts',\n arrivalDate: this.arrivalDate(),\n readOnly: this.formHidden(),\n readOnlyText: this.readOnlyText(),\n }));\n readonly amountError = depositAmountError;\n readonly codeError = computed(() => (this.code().trim() ? descriptorCodeError(this.code(), this.requireSmPrefix()) : this.copy.codeRequired));\n readonly hasInvalid = computed(() => this.type() === 'descriptor_code'\n ? !!this.codeError()\n : !!depositAmountError(this.first()) || !!depositAmountError(this.second()) || this.first() === '' || this.second() === '' || this.first() === null || this.second() === null);\n /** The cancel confirm tells the truth: the saved method stays active only when one is saved. */\n readonly cancelMessage = computed(() => this.cancelMessageText() || this.copy.cancelBase + (this.hasSavedMethod() ? this.copy.cancelKeepsActive : this.copy.cancelNoOther));\n\n async verify(): Promise<void> {\n if (this.busy()) return;\n this.touched.set(true);\n if (this.hasInvalid()) return;\n const secret = this.clientSecret();\n if (!secret) {\n this.verify$.emit(this.type() === 'descriptor_code'\n ? { descriptorCode: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] });\n return;\n }\n const max = this.maxAttempts();\n if (max > 0 && this.failedAttempts >= max) { this.stripeError.set(this.copy.tooManyAttempts); return; }\n this.stripeBusy.set(true);\n this.stripeError.set('');\n const data = this.type() === 'descriptor_code'\n ? { descriptor_code: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] };\n const connection = { publishableKey: this.publishableKey(), stripeAccount: this.stripeAccount() };\n const result = this.flow() === 'setup'\n ? await this.service.verifyMicrodepositsForSetup(secret, data, connection)\n : await this.service.verifyMicrodepositsForPayment(secret, data, connection);\n this.stripeBusy.set(false);\n if (result.ok) { this.verified.emit(result); return; }\n this.failedAttempts++;\n const message = result.failure?.message ?? 'Verification failed';\n const remaining = max - this.failedAttempts;\n this.stripeError.set(max > 0 && remaining > 0 ? `${message} (${remaining} attempt${remaining === 1 ? '' : 's'} remaining)` : message);\n this.verifyFailed.emit(result);\n }\n\n confirmCancel(): void {\n if (this.cancelling()) return;\n this.showCancelConfirm.set(false);\n this.cancelVerification.emit();\n }\n}\n"],"mappings":";;;;;;AAWA,MAAa,cAA2G,EACtH,YAAY,OAAO,qBACpB;AAMD,MAAa,sBAAsC,OAAO,gBAAgB,YAAW;CACnF,MAAM,MAAM,MAAM,YAAY,KAAI;CAElC,OADe,YAAY,SAAY,MAAM,IAAI,WAAW,cAAc,IAAI,MAAM,IAAI,WAAW,gBAAgB,OAAgB;AAErI;AAGA,MAAa,gBAAgB,IAAI,eAA+B,iBAAiB;CAAE,YAAY;CAAQ,eAAe;AAAmB,CAAE;AAU3I,MAAa,0BAA0B,IAAI,eAAsC,2BAA2B;CAAE,YAAY;CAAQ,gBAAgB,CAAA;AAAG,CAAE;AAYvJ,SAAgB,qBAAqB,UAAuC,CAAA,GAAE;CAC5E,MAAM,EAAE,QAAQ,GAAG,aAAa;CAChC,MAAM,YAAwB,CAAC;EAAE,SAAS;EAAyB,UAAU;CAAQ,CAAE;CACvF,IAAI,QAAQ,UAAU,KAAK;EAAE,SAAS;EAAe,UAAU;CAAM,CAAE;CACvE,OAAO;AACT;AAGA,SAAgB,iBAAiB,eAA0C,QAAmC,OAAgC;CAC5I,MAAM,UAA6B,EAAE,GAAI,SAAS,CAAA,EAAG;CACrD,IAAI,QAAQ,QAAQ,SAAS;CAC7B,IAAI,eAAe,QAAQ,gBAAgB;CAC3C,OAAO,OAAO,KAAK,OAAO,CAAC,CAAC,SAAS,UAAU;AACjD;ACvDA,MAAa,wBAA0D;CAErE,aAAa;CACb,WAAW;CACX,eAAe;CACf,iBAAiB;CACjB,oBAAoB;CACpB,cAAc;CACd,oBAAoB;CACpB,wBAAw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IAAA;KAAA,MAAA;KAAA,MAAE;KAAoB,UAAA;KAAA,QAAA,CAAA,SAAA,SAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAc,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,OAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAa,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAkB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAwDtJ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA2B,YAAA,CAAA;EA5DvC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,YAAY;GACZ,iBAAiB,wBAAwB;GACzC,SAAS;IAAC;IAAa;IAAgB;IAAgB;IAAiB;IAAkB;IAAsB;IAAgB;IAAe;GAAkB;GACjK,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsDX,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-stripe.mjs","names":[],"sources":["../../../projects/forgeroute-ui/stripe/src/stripe-loader/stripe-loader.ts","../../../projects/forgeroute-ui/stripe/src/errors/stripe-errors.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-outcomes.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-actions.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-appearance.ts","../../../projects/forgeroute-ui/stripe/src/stripe-payment/stripe-payment.component.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.models.ts","../../../projects/forgeroute-ui/stripe/src/microdeposit-verify/microdeposit-verify.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { StripeLike, StripeLoadOptions } from './stripe-types';\n\n/**\n * Loads Stripe.js: `loader(publishableKey, options)` resolves the `Stripe` object (or `null` when it could not be created).\n * It is called exactly like `loadStripe(key, options)` from `@stripe/stripe-js`: the second argument is `undefined` unless a Connect\n * account / locale / other option is set.\n */\nexport type StripeLoaderFn = (publishableKey: string, options?: StripeLoadOptions) => Promise<StripeLike | null>;\n\n/** The dynamic import of the Stripe SDK, behind an object so a spec can replace it (internal: not part of the public API). */\nexport const sdkImporter: { load: () => Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }> } = {\n load: () => import('@stripe/stripe-js') as unknown as Promise<{ loadStripe: (key: string, options?: never) => Promise<unknown> }>,\n};\n\n/**\n * The default loader. `@stripe/stripe-js` is imported lazily (a dynamic import), so the Stripe SDK is only downloaded when a\n * payment form is actually shown, and it is an optional peer dependency of the library.\n */\nexport const defaultStripeLoader: StripeLoaderFn = async (publishableKey, options) => {\n const sdk = await sdkImporter.load();\n const stripe = options === undefined ? await sdk.loadStripe(publishableKey) : await sdk.loadStripe(publishableKey, options as never);\n return stripe as unknown as StripeLike | null;\n};\n\n/** How Stripe.js is loaded. Provide your own to fake Stripe in tests or to load it differently. Defaults to `defaultStripeLoader`. */\nexport const STRIPE_LOADER = new InjectionToken<StripeLoaderFn>('STRIPE_LOADER', { providedIn: 'root', factory: () => defaultStripeLoader });\n\n/** App-wide defaults for every `ui-stripe-payment`, set once with `provideStripePayment`. A value on the component always wins. */\nexport interface StripePaymentDefaults {\n /** The publishable key (`pk_...`), used when the component has no `publishableKey` of its own. */\n publishableKey?: string;\n /** Stripe.js locale (`'en'`, `'es'`, ...): passed to `loadStripe` as `{ locale }`. */\n locale?: string;\n}\n\nexport const STRIPE_PAYMENT_DEFAULTS = new InjectionToken<StripePaymentDefaults>('STRIPE_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideStripePaymentOptions extends StripePaymentDefaults {\n /** Replaces how Stripe.js is loaded (tests, a self-hosted loader). */\n loader?: StripeLoaderFn;\n}\n\n/**\n * Global defaults for the Stripe components:\n *\n * providers: [provideStripePayment({ publishableKey: environment.stripePublishableKey, locale: 'en' })]\n */\nexport function provideStripePayment(options: ProvideStripePaymentOptions = {}): Provider[] {\n const { loader, ...defaults } = options;\n const providers: Provider[] = [{ provide: STRIPE_PAYMENT_DEFAULTS, useValue: defaults }];\n if (loader) providers.push({ provide: STRIPE_LOADER, useValue: loader });\n return providers;\n}\n\n/** `loadStripe`'s second argument for a Connect account / locale / extra options; `undefined` when there is nothing to pass (like the apps do today). */\nexport function buildLoadOptions(stripeAccount: string | null | undefined, locale: string | null | undefined, extra?: StripeLoadOptions | null): StripeLoadOptions | undefined {\n const options: StripeLoadOptions = { ...(extra ?? {}) };\n if (locale) options.locale = locale;\n if (stripeAccount) options.stripeAccount = stripeAccount;\n return Object.keys(options).length ? options : undefined;\n}\n","import type { StripeErrorLike } from '../stripe-loader/stripe-types';\n\n/**\n * Plain-language text for the Stripe decline / error codes (https://docs.stripe.com/declines/codes). One table for every app; an app can replace single entries\n * with the `errorMessages` input of `ui-stripe-payment` (or the `overrides` option of `getStripeErrorMessage`).\n */\nexport const STRIPE_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n // Card issue codes\n stolen_card: 'This card has been reported as stolen. Please use a different payment method.',\n lost_card: 'This card has been reported as lost. Please use a different payment method.',\n card_declined: 'Your card was declined. Please contact your bank or use a different card.',\n generic_decline: 'Your card was declined. Please contact your bank or try a different card.',\n insufficient_funds: 'Your card has insufficient funds. Please use a different card or add funds to your account.',\n do_not_honor: 'Your bank has declined this transaction. Please contact your bank or use a different card.',\n card_not_supported: 'This card does not support this type of purchase. Please use a different card.',\n currency_not_supported: 'This card does not support the requested currency. Please use a different card.',\n duplicate_transaction: 'A duplicate transaction was detected. Please wait a few minutes before trying again.',\n expired_card: 'Your card has expired. Please use a different card.',\n incorrect_cvc: 'The security code (CVC) is incorrect. Please check and try again.',\n incorrect_number: 'The card number is incorrect. Please check and try again.',\n invalid_cvc: 'The security code (CVC) is invalid. Please check and try again.',\n invalid_expiry_month: 'The expiration month is invalid. Please check and try again.',\n invalid_expiry_year: 'The expiration year is invalid. Please check and try again.',\n invalid_number: 'The card number is invalid. Please check and try again.',\n processing_error: 'An error occurred while processing your card. Please try again.',\n incorrect_zip: 'The ZIP/postal code is incorrect. Please check and try again.',\n card_velocity_exceeded: 'You have exceeded the balance or credit limit on your card. Please contact your bank.',\n withdrawal_count_limit_exceeded: 'You have exceeded the allowed number of transactions. Please try again later or use a different card.',\n // Authentication codes\n authentication_required: 'This card requires authentication. Please try again and complete the verification step.',\n // Fraud codes\n fraudulent: 'This transaction has been flagged by your bank. Please contact your bank or use a different card.',\n merchant_blacklist: 'This card cannot be used for this transaction. Please use a different card.',\n pickup_card: 'This card cannot be used. Please contact your bank or use a different card.',\n restricted_card: 'This card has restrictions that prevent this transaction. Please contact your bank or use a different card.',\n security_violation: 'This card has been flagged for a security violation. Please contact your bank.',\n // Account codes\n issuer_not_available: 'Your card issuer could not be reached. Please try again later.',\n new_account_information_available: 'Your card details have changed. Please update your card information and try again.',\n try_again_later: 'Your card issuer is temporarily unable to process this transaction. Please try again later.',\n reenter_transaction: 'The transaction could not be processed. Please try again.',\n // Limit codes\n approve_with_id: 'The payment cannot be authorized. Please contact your bank.',\n call_issuer: 'Your bank has declined this transaction. Please call your bank for more information.',\n do_not_try_again: 'Your bank has permanently declined this card. Please use a different payment method.',\n no_action_taken: 'Your bank could not process this transaction. Please contact your bank.',\n not_permitted: 'This transaction is not permitted on this card. Please contact your bank or use a different card.',\n revocation_of_all_authorizations: 'All authorizations have been revoked for this card. Please contact your bank.',\n revocation_of_authorization: 'The authorization for this card has been revoked. Please contact your bank.',\n stop_payment_order: 'Your bank has stopped this payment. Please contact your bank.',\n // Test mode\n testmode_decline: 'This is a test decline. No real charge was attempted.',\n // ACH\n bank_account_declined: 'Your bank account could not be used. Please try a different account.',\n debit_not_authorized: 'The debit was not authorized. Please contact your bank.',\n // Payment / setup intent state errors\n payment_intent_unexpected_state: 'This payment has already been processed. Please refresh the page and try again.',\n payment_intent_authentication_failure: 'Payment authentication failed. Please try again.',\n payment_intent_incompatible_payment_method: 'This payment method is not compatible. Please use a different payment method.',\n payment_intent_payment_attempt_failed: 'The payment attempt failed. Please try again or use a different payment method.',\n payment_method_unactivated: 'This payment method is not activated. Please use a different payment method.',\n payment_method_unexpected_state: 'There was an issue with your payment method. Please try again.',\n setup_intent_unexpected_state: 'This payment setup has already been completed. Please refresh the page.',\n amount_too_small: 'The payment amount is too small to process. Please contact the business.',\n amount_too_large: 'The payment amount exceeds the maximum allowed. Please contact the business.',\n balance_insufficient: 'Insufficient balance to complete this payment. Please use a different payment method.',\n resource_missing: 'The payment session has expired. Please refresh the page and try again.',\n};\n\n/** Text for the Stripe error types that are about Stripe or the connection, never about the customer's input (Stripe's own text there is technical). */\nexport const STRIPE_TECHNICAL_ERROR_MESSAGES: Readonly<Record<string, string>> = {\n api_connection_error: 'We could not reach the payment service. Please check your connection and try again.',\n rate_limit_error: 'Too many requests. Please wait a moment and try again.',\n api_error: 'Something went wrong while processing the payment. Please try again.',\n authentication_error: 'Something went wrong while processing the payment. Please try again.',\n invalid_request_error: 'Something went wrong while processing the payment. Please try again.',\n};\n\nexport const STRIPE_DEFAULT_ERROR_MESSAGE = 'Payment failed. Please try again.';\nexport const STRIPE_ALREADY_PROCESSED_MESSAGE = 'This payment has already been processed. Please refresh the page and try again.';\nexport const STRIPE_SESSION_EXPIRED_MESSAGE = 'Your payment session has expired. Please refresh the page and try again.';\n\nexport type StripeErrorDisplay = 'friendly' | 'table' | 'stripe';\n\nexport interface StripeErrorMessageOptions {\n /**\n * `'friendly'` (default): the table above first, then Stripe's own text for card / validation errors (customer-facing) and plain text for technical errors.\n * `'table'`: the table, then Stripe's own `message` for EVERYTHING else, technical errors included (what the cremo payment flows show today).\n * `'stripe'`: Stripe's own `message` untouched (what the apps that show `error.message` do), the fallback when there is none.\n */\n display?: StripeErrorDisplay;\n /** Text for single codes; wins over the table. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown when there is nothing better. */\n fallback?: string;\n}\n\n/**\n * The text to show the customer for a Stripe.js error.\n * Friendly mode order: decline_code, code, the two technical Stripe messages (\"already succeeded\" / \"previously confirmed\", \"expired\"),\n * technical error types, Stripe's own message, the fallback. Table mode is the same without the technical error types.\n */\nexport function getStripeErrorMessage(error: StripeErrorLike | null | undefined, options: StripeErrorMessageOptions = {}): string {\n const fallback = options.fallback ?? STRIPE_DEFAULT_ERROR_MESSAGE;\n if (!error) return fallback;\n if (options.display === 'stripe') return error.message || fallback;\n const table = { ...STRIPE_ERROR_MESSAGES, ...(options.overrides ?? {}) };\n if (error.decline_code && table[error.decline_code]) return table[error.decline_code];\n if (error.code && table[error.code]) return table[error.code];\n const message = error.message;\n if (message) {\n if (message.includes('already succeeded') || message.includes('previously confirmed')) return options.overrides?.['payment_intent_unexpected_state'] ?? STRIPE_ALREADY_PROCESSED_MESSAGE;\n if (message.includes('expired')) return STRIPE_SESSION_EXPIRED_MESSAGE;\n }\n const technical = options.display === 'table' || !error.type ? undefined : STRIPE_TECHNICAL_ERROR_MESSAGES[error.type];\n if (technical) return technical;\n return message || fallback;\n}\n","import { getStripeErrorMessage, type StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport type { StripeErrorLike, StripeIntentLike } from '../stripe-loader/stripe-types';\n\nexport type StripeIntentKind = 'setup' | 'payment';\n\n/**\n * What happened, in one word:\n * - `succeeded`: the intent succeeded (card charged / method saved).\n * - `processing`: the payment was accepted and is settling (a bank debit takes days).\n * - `requires_verification`: a bank account was entered by number; Stripe sent micro-deposits and the customer has to verify them (see `verification`).\n * - `requires_action`: the intent still needs the customer to do something else (3D Secure, a redirect-less next action).\n * - `requires_capture`: the payment is authorized and waits for the host to capture it (`captureMethod: 'manual'`).\n * - `requires_payment_method`: Stripe sends the intent back for a new payment method (the payment failed).\n * - `canceled` / `unknown`: any other status.\n */\nexport type StripeOutcome = 'succeeded' | 'processing' | 'requires_verification' | 'requires_action' | 'requires_capture' | 'requires_payment_method' | 'canceled' | 'unknown';\n\n/** What the customer has to do to verify a bank account (`next_action.verify_with_microdeposits`). */\nexport interface StripeVerification {\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `null` when Stripe did not say. */\n type: 'amounts' | 'descriptor_code' | null;\n /** When the deposits should have arrived: Unix seconds as Stripe sends it, and the same instant as an ISO string. `null` when unknown. */\n arrivalDate: number | null;\n arrivalDateIso: string | null;\n /** Stripe's own page where the customer can verify (https), or `null`. */\n hostedVerificationUrl: string | null;\n}\n\n/** The normalised result of a confirmation (or of `handleReturn`). */\nexport interface StripeConfirmedEvent {\n kind: StripeIntentKind;\n /** Stripe's own `status` of the intent. */\n status: string;\n outcome: StripeOutcome;\n /** The intent exactly as Stripe.js returned it. */\n intent: StripeIntentLike;\n setupIntent?: StripeIntentLike;\n paymentIntent?: StripeIntentLike;\n intentId: string;\n /** The payment method of the intent as an id (`pm_...`), whether Stripe sent it as a string or an object; `null` when there is none. */\n paymentMethodId: string | null;\n /** Set when `outcome` is `requires_verification`. */\n verification: StripeVerification | null;\n /** The 3D Secure step (`stripe.handleCardAction`) ran before this result (`autoHandleCardAction` / `handleNextAction`). Hosts use it for their post-3DS wording. */\n actionHandled: boolean;\n}\n\n/** Why a flow stopped. */\nexport type StripeFailureStage = 'load' | 'submit' | 'intent' | 'confirm' | 'action' | 'result' | 'verify' | 'return';\n\n/** A failure: `message` is what to show the customer; `stripeMessage` is Stripe's own text. */\nexport interface StripeFailure {\n code: string;\n message: string;\n stripeMessage: string;\n declineCode?: string;\n type?: string;\n stage: StripeFailureStage;\n /** The Stripe error as returned, when there was one. */\n error?: StripeErrorLike;\n /** True when the failure happened in or after the 3D Secure step. */\n actionHandled?: boolean;\n /** Stripe's status of the intent when the failure is about the intent's status (`requires_payment_method`, `canceled`, ...). */\n status?: string;\n}\n\n/** The payment method type the Payment Element currently shows (`'card'`, `'us_bank_account'`, ...) and its completeness. */\nexport interface StripeElementChange {\n complete: boolean;\n empty: boolean;\n /** The selected payment method type, `null` when Stripe did not send one. */\n type: string | null;\n /** Stripe's own validation message for the form, when it shows one. */\n errorMessage: string | null;\n}\n\nexport const MSG_NOT_INITIALIZED = 'Payment system not initialized';\nexport const MSG_INTENT_FAILED = 'Failed to create payment intent';\nexport const MSG_NOT_COMPLETED = 'Payment was not completed';\nexport const MSG_REQUIRES_PAYMENT_METHOD = 'Payment failed. Please try a different payment method.';\nexport const MSG_NO_PAYMENT_METHOD = 'No payment method returned from Stripe';\nexport const MSG_AUTH_FAILED = 'Payment authentication failed';\nexport const MSG_AUTH_NOT_COMPLETED = 'Payment authentication was not completed';\nexport const MSG_KEY_MISSING = 'A Stripe publishable key is required';\nexport const MSG_LOAD_FAILED = 'Failed to load Stripe';\n\nexport function paymentMethodIdOf(intent: StripeIntentLike | null | undefined): string | null {\n const pm = intent?.payment_method;\n if (!pm) return null;\n return typeof pm === 'string' ? pm : pm.id || null;\n}\n\n/** The micro-deposit verification of an intent whose `next_action` is `verify_with_microdeposits`, else `null`. */\nexport function verificationOf(intent: StripeIntentLike | null | undefined): StripeVerification | null {\n const action = intent?.next_action;\n if (action?.type !== 'verify_with_microdeposits') return null;\n const details = action.verify_with_microdeposits ?? {};\n const arrival = typeof details.arrival_date === 'number' ? details.arrival_date : null;\n const type = details.microdeposit_type === 'amounts' || details.microdeposit_type === 'descriptor_code' ? details.microdeposit_type : null;\n const url = typeof details.hosted_verification_url === 'string' && details.hosted_verification_url ? details.hosted_verification_url : null;\n return { type, arrivalDate: arrival, arrivalDateIso: arrival === null ? null : new Date(arrival * 1000).toISOString(), hostedVerificationUrl: url };\n}\n\n/** Stripe's intent `status` (and `next_action`) as one `StripeOutcome`. */\nexport function outcomeOf(intent: StripeIntentLike): StripeOutcome {\n switch (intent.status) {\n case 'succeeded': return 'succeeded';\n case 'processing': return 'processing';\n case 'requires_capture': return 'requires_capture';\n case 'requires_action': return intent.next_action?.type === 'verify_with_microdeposits' ? 'requires_verification' : 'requires_action';\n case 'requires_payment_method': return 'requires_payment_method';\n case 'canceled': return 'canceled';\n default: return 'unknown';\n }\n}\n\nexport function normalizeIntent(kind: StripeIntentKind, intent: StripeIntentLike): StripeConfirmedEvent {\n const outcome = outcomeOf(intent);\n return {\n kind,\n status: intent.status,\n outcome,\n intent,\n ...(kind === 'setup' ? { setupIntent: intent } : { paymentIntent: intent }),\n intentId: intent.id,\n paymentMethodId: paymentMethodIdOf(intent),\n verification: outcome === 'requires_verification' ? verificationOf(intent) : null,\n actionHandled: false,\n };\n}\n\n/** A failure from a Stripe error, with the text to show chosen by `display` (see `getStripeErrorMessage`). */\nexport function failureFromError(error: StripeErrorLike | null | undefined, stage: StripeFailureStage, options: StripeErrorMessageOptions = {}): StripeFailure {\n return {\n code: error?.code || error?.type || 'unknown_error',\n message: getStripeErrorMessage(error, options),\n stripeMessage: error?.message ?? '',\n ...(error?.decline_code ? { declineCode: error.decline_code } : {}),\n ...(error?.type ? { type: error.type } : {}),\n stage,\n ...(error ? { error } : {}),\n };\n}\n\n/** A failure that is not a Stripe error (our own text). */\nexport function failure(code: string, message: string, stage: StripeFailureStage, stripeMessage = ''): StripeFailure {\n return { code, message, stripeMessage, stage };\n}\n\n/** An error thrown by a host callback or a request: its own `error.error.message` (HTTP body), `message`, else the fallback. */\nexport function messageOfThrown(err: unknown, fallback: string): string {\n const e = err as { error?: { message?: unknown }; message?: unknown } | null | undefined;\n if (typeof e?.error?.message === 'string' && e.error.message) return e.error.message;\n if (typeof e?.message === 'string' && e.message) return e.message;\n return fallback;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeLike, StripeLoadOptions } from '../stripe-loader/stripe-types';\nimport {\n failure, failureFromError, messageOfThrown, normalizeIntent, MSG_KEY_MISSING, MSG_LOAD_FAILED,\n type StripeConfirmedEvent, type StripeFailure, type StripeIntentKind, type StripeOutcome,\n} from './stripe-outcomes';\nimport type { StripeConfirmResult, StripeIntentLike } from '../stripe-loader/stripe-types';\n\n/** The Stripe object with `confirmUsBankAccountSetup`, for an app that keeps its own routing-number form (contractor). Use it as the type argument of `StripePaymentService.load`. */\nexport interface StripeLikeWithBankSetup extends StripeLike {\n confirmUsBankAccountSetup(clientSecret: string, data?: Record<string, unknown>): Promise<StripeConfirmResult<StripeIntentLike>>;\n}\n\n/** What `stripe.verifyMicrodepositsFor*` takes: the two deposit amounts in cents, or the 6-character code of the one deposit. */\nexport type MicrodepositVerifyData = { amounts: number[] } | { descriptor_code: string };\n\nexport interface StripeMicrodepositResult {\n /** The intent is verified (`processing` or `succeeded`). */\n ok: boolean;\n outcome: StripeOutcome | null;\n intent: StripeIntentLike | null;\n /** Set when `ok` is false. `message` is Stripe's own text (customer-facing for a wrong amount / code) or ours. */\n failure: StripeFailure | null;\n}\n\n/** What Stripe appends to the return URL after a redirect (`payment_intent_client_secret` / `setup_intent_client_secret`, `redirect_status`). */\nexport interface StripeReturnParams {\n kind: StripeIntentKind;\n clientSecret: string;\n redirectStatus: string | null;\n}\n\n/** Reads the intent Stripe returned the customer with from a query string (`location.search`); `null` when there is none. */\nexport function readStripeReturnParams(search: string): StripeReturnParams | null {\n const params = new URLSearchParams(search.startsWith('?') ? search.slice(1) : search);\n const payment = params.get('payment_intent_client_secret');\n const setup = params.get('setup_intent_client_secret');\n const kind: StripeIntentKind | null = payment ? 'payment' : setup ? 'setup' : null;\n if (!kind) return null;\n return { kind, clientSecret: (payment ?? setup) as string, redirectStatus: params.get('redirect_status') };\n}\n\nexport const MSG_VERIFY_FAILED = 'Verification failed';\nexport const MSG_VERIFY_THROWN = 'Verification failed. Please check the code and try again.';\nexport const MSG_RETURN_FAILED = 'We could not check the status of this payment. Please contact support before trying again.';\n\n/**\n * Verifies a bank account with micro-deposits through Stripe.js (`verifyMicrodepositsForPayment` / `verifyMicrodepositsForSetup`), the way the public\n * \"verify your bank\" pages do it with the intent's client secret. The result is `ok` once the intent is `processing` or `succeeded`.\n */\nexport async function verifyMicrodeposits(stripe: StripeLike, flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n const call = flow === 'payment' ? stripe.verifyMicrodepositsForPayment : stripe.verifyMicrodepositsForSetup;\n if (typeof call !== 'function') return { ok: false, outcome: null, intent: null, failure: failure('unsupported', MSG_VERIFY_FAILED, 'verify') };\n try {\n const result = await call.call(stripe, clientSecret, data as Record<string, unknown>);\n if (result.error) return { ok: false, outcome: null, intent: null, failure: failureFromError(result.error, 'verify', { display: 'stripe', fallback: MSG_VERIFY_FAILED }) };\n const intent = (flow === 'payment' ? result.paymentIntent : result.setupIntent) ?? null;\n const event = intent ? normalizeIntent(flow, intent) : null;\n if (event && (event.outcome === 'processing' || event.outcome === 'succeeded')) return { ok: true, outcome: event.outcome, intent, failure: null };\n return { ok: false, outcome: event?.outcome ?? null, intent, failure: failure('verification_incomplete', MSG_VERIFY_FAILED, 'verify') };\n } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('verification_failed', messageOfThrown(err, MSG_VERIFY_THROWN), 'verify', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeReturnResult {\n event: StripeConfirmedEvent | null;\n failure: StripeFailure | null;\n}\n\n/** Retrieves the intent after Stripe redirected the customer back (`retrievePaymentIntent` / `retrieveSetupIntent`) and normalises it. */\nexport async function retrieveIntent(stripe: StripeLike, kind: StripeIntentKind, clientSecret: string): Promise<StripeReturnResult> {\n const call = kind === 'payment' ? stripe.retrievePaymentIntent : stripe.retrieveSetupIntent;\n if (typeof call !== 'function') return { event: null, failure: failure('unsupported', MSG_RETURN_FAILED, 'return') };\n try {\n const result = await call.call(stripe, clientSecret);\n if (result.error) return { event: null, failure: failureFromError(result.error, 'return') };\n const intent = kind === 'payment' ? result.paymentIntent : result.setupIntent;\n if (!intent) return { event: null, failure: failure('no_intent', MSG_RETURN_FAILED, 'return') };\n return { event: normalizeIntent(kind, intent), failure: null };\n } catch (err) {\n return { event: null, failure: failure('return_failed', MSG_RETURN_FAILED, 'return', messageOfThrown(err, '')) };\n }\n}\n\nexport interface StripeConnection {\n publishableKey?: string | null;\n /** A Stripe Connect account id. */\n stripeAccount?: string | null;\n locale?: string | null;\n /** Further `loadStripe` options. */\n options?: StripeLoadOptions | null;\n}\n\nexport interface HandleReturnOptions extends StripeConnection {\n /** The client secret from the return URL. Default: read from `search`. */\n clientSecret?: string;\n /** Which kind of intent `clientSecret` belongs to (default: from the URL parameter name, else `'payment'`). */\n kind?: StripeIntentKind;\n /** The query string to read the return parameters from. Default: `window.location.search`. */\n search?: string;\n}\n\n/**\n * Stripe.js without a component: loads Stripe like `ui-stripe-payment` does, verifies micro-deposits and checks the intent after a redirect.\n * For pages that only verify a bank account (the \"verify your bank\" link) or only land on the `returnUrl`.\n */\n@Injectable({ providedIn: 'root' })\nexport class StripePaymentService {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n\n /** Loads Stripe.js (`loadStripe(key, options)`). Pass a type for methods the library does not use: `load<StripeLikeWithBankSetup>(...)` (contractor's `confirmUsBankAccountSetup`). Throws when the key is missing or Stripe could not be created. */\n async load<T extends StripeLike = StripeLike>(connection: StripeConnection = {}): Promise<T> {\n const key = connection.publishableKey || this.defaults.publishableKey;\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, buildLoadOptions(connection.stripeAccount, connection.locale ?? this.defaults.locale, connection.options));\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe as T;\n }\n\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('payment', clientSecret, data, connection);\n }\n\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection = {}): Promise<StripeMicrodepositResult> {\n return this.verify('setup', clientSecret, data, connection);\n }\n\n /** The intent the customer returned with, normalised. `{ event: null, failure: null }` when the URL carries no intent. */\n async handleReturn(options: HandleReturnOptions = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? (typeof window === 'undefined' ? '' : window.location.search));\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? 'payment';\n let stripe: StripeLike;\n try { stripe = await this.load(options); } catch (err) { return { event: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return retrieveIntent(stripe, kind, clientSecret);\n }\n\n private async verify(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData, connection: StripeConnection): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.load(connection); } catch (err) { return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) }; }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n}\n","/**\n * The Payment Element `appearance` for the page's own look: Stripe's variables read from CSS custom properties at runtime, so one set of\n * tokens styles the page and the payment form, in light and dark.\n *\n * :root { --ui-stripe-color-primary: #0d9488; --ui-stripe-border-radius: 8px; }\n *\n * Variables read (all optional; a missing one is left out so Stripe's default stays): `--ui-stripe-color-primary`, `--ui-stripe-color-background`,\n * `--ui-stripe-color-text`, `--ui-stripe-color-danger`, `--ui-stripe-font-family`, `--ui-stripe-border-radius`, `--ui-stripe-font-size-base`.\n * The theme is `night` when the page is dark (`data-theme=\"dark\"`, or the system is dark and `data-theme` is not `light`), else `stripe`.\n */\nexport interface StripeAppearance {\n theme?: 'stripe' | 'night' | 'flat';\n variables?: Record<string, string>;\n rules?: Record<string, Record<string, string>>;\n labels?: 'above' | 'floating';\n disableAnimations?: boolean;\n}\n\nconst TOKENS: readonly (readonly [string, string])[] = [\n ['--ui-stripe-color-primary', 'colorPrimary'],\n ['--ui-stripe-color-background', 'colorBackground'],\n ['--ui-stripe-color-text', 'colorText'],\n ['--ui-stripe-color-danger', 'colorDanger'],\n ['--ui-stripe-font-family', 'fontFamily'],\n ['--ui-stripe-border-radius', 'borderRadius'],\n ['--ui-stripe-font-size-base', 'fontSizeBase'],\n];\n\n/** True when the page is in dark mode: `data-theme=\"dark\"` on the root, or the system prefers dark and the root is not forced to `light`. */\nexport function isDarkPage(doc: Document): boolean {\n const root = doc.documentElement;\n const forced = root.getAttribute('data-theme');\n if (forced === 'dark') return true;\n if (forced === 'light') return false;\n try { return !!doc.defaultView?.matchMedia?.('(prefers-color-scheme: dark)').matches; } catch { return false; }\n}\n\n/** Builds the appearance from the tokens in effect on `element` (default: the document root). */\nexport function readStripeAppearance(doc: Document, element: Element = doc.documentElement): StripeAppearance {\n const view = doc.defaultView;\n const variables: Record<string, string> = {};\n if (view) {\n const style = view.getComputedStyle(element);\n for (const [token, variable] of TOKENS) {\n const value = style.getPropertyValue(token).trim();\n if (value) variables[variable] = value;\n }\n }\n return { theme: isDarkPage(doc) ? 'night' : 'stripe', ...(Object.keys(variables).length ? { variables } : {}) };\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, PLATFORM_ID, computed, effect, inject, input, output, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { AlertComponent, ButtonComponent, SkeletonComponent } from '@forgeroute/ui';\nimport { STRIPE_LOADER, STRIPE_PAYMENT_DEFAULTS, buildLoadOptions } from '../stripe-loader/stripe-loader';\nimport type { StripeElementsLike, StripeLike, StripeLoadOptions, StripePaymentElementLike } from '../stripe-loader/stripe-types';\nimport type { StripeErrorDisplay, StripeErrorMessageOptions } from '../errors/stripe-errors';\nimport { STRIPE_DEFAULT_ERROR_MESSAGE } from '../errors/stripe-errors';\nimport {\n MSG_AUTH_FAILED, MSG_AUTH_NOT_COMPLETED, MSG_KEY_MISSING, MSG_INTENT_FAILED, MSG_LOAD_FAILED, MSG_NOT_COMPLETED, MSG_NOT_INITIALIZED, MSG_NO_PAYMENT_METHOD,\n MSG_REQUIRES_PAYMENT_METHOD, failure, failureFromError, messageOfThrown, normalizeIntent,\n type StripeConfirmedEvent, type StripeElementChange, type StripeFailure, type StripeFailureStage, type StripeIntentKind,\n} from './stripe-outcomes';\nimport { readStripeReturnParams, retrieveIntent, verifyMicrodeposits, type MicrodepositVerifyData, type StripeMicrodepositResult, type StripeReturnResult } from './stripe-actions';\nimport { readStripeAppearance, type StripeAppearance } from './stripe-appearance';\n\n/** The texts of the screen-reader status region. */\nexport interface StripeA11yMessages {\n loading: string;\n savingMethod: string;\n processingPayment: string;\n methodSaved: string;\n paymentReceived: string;\n paymentProcessing: string;\n paymentAuthorized: string;\n verificationNeeded: string;\n actionRequired: string;\n}\n\nexport const STRIPE_A11Y_MESSAGES: Readonly<StripeA11yMessages> = {\n loading: 'Loading payment form',\n savingMethod: 'Saving payment method',\n processingPayment: 'Processing payment',\n methodSaved: 'Payment method saved',\n paymentReceived: 'Payment received',\n paymentProcessing: 'Payment is processing',\n paymentAuthorized: 'Payment authorized',\n verificationNeeded: 'Bank account added. It needs to be verified with small deposits.',\n actionRequired: 'Further action is required to complete the payment',\n};\n\n/** The exact text shown while the bank-account tab is selected. */\nexport const STRIPE_ACH_NOTICE = 'Signing in to your bank account lets you pay right away. Entering your routing and account numbers instead requires verification with two small deposits, which typically take a couple of days to arrive in your account.';\n\n/**\n * \"Deferred intent\" Elements: the form is shown first, the PaymentIntent / SetupIntent is created on the host's backend when the customer submits.\n * Maps to `stripe.elements({ mode, amount, currency, setup_future_usage, payment_method_types, ... })`.\n */\nexport interface StripeDeferredIntent {\n /** Default: the component's `mode`. */\n mode?: 'payment' | 'setup' | 'subscription';\n /** Smallest currency unit (cents). Changing it later calls `elements.update({ amount })` (no re-init). */\n amount?: number;\n currency: string;\n setupFutureUsage?: 'on_session' | 'off_session';\n captureMethod?: 'automatic' | 'automatic_async' | 'manual';\n onBehalfOf?: string;\n}\n\n/** Called on submit in deferred mode: create the intent on your backend and resolve its client secret (or `{ clientSecret }`). */\nexport type StripeCreateIntentFn = (context: { mode: StripeIntentKind }) => Promise<string | { clientSecret: string }>;\n\nexport interface StripeBillingDetails {\n name?: string;\n email?: string;\n phone?: string;\n address?: Record<string, string | null | undefined>;\n}\n\n/**\n * The live Stripe.js objects of a form, handed to the host by `(stripeReady)`: the host's own code can call `stripe.confirmPayment({ elements, ... })`,\n * `elements.submit()`, `elements.update()`, `elements.fetchUpdates()` and `paymentElement.update()` with its own arguments.\n */\nexport interface StripeReadyEvent {\n stripe: StripeLike;\n elements: StripeElementsLike;\n paymentElement: StripePaymentElementLike;\n}\n\nlet nextId = 0;\nconst jsonEqual = (a: unknown, b: unknown): boolean => JSON.stringify(a) === JSON.stringify(b);\n\n/**\n * Stripe Payment Element: saves a payment method (`mode=\"setup\"`, a SetupIntent) or takes a payment (`mode=\"payment\"`, a PaymentIntent).\n *\n * The host app creates the intent on its backend and passes the `clientSecret` (or, for a deferred intent, `[deferred]` + `[createIntent]`).\n * Stripe.js is loaded lazily through `@stripe/stripe-js` (an optional peer dependency); nothing of Stripe is in the library's static imports.\n *\n * <ui-stripe-payment mode=\"setup\" [publishableKey]=\"key\" [clientSecret]=\"secret()\" submitLabel=\"Save card\"\n * (confirmed)=\"onSaved($event)\" (failed)=\"onFailed($event)\" />\n *\n * Every Stripe.js call and option reproduces what the CRM apps do today; see docs/stripe.md (\"Parity with the existing app implementations\").\n */\n@Component({\n selector: 'ui-stripe-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && (loading() || submitting()) ? \"true\" : null' },\n template: `\n <div class=\"sp\">\n @if (!mountOnly() || a11yMessages()) {\n <div class=\"sp-sr\" role=\"status\" aria-live=\"polite\" data-testid=\"stripe-status\">{{ statusText() }}</div>\n }\n @if (!mountOnly() && (loading() || pending())) {\n <div class=\"sp-skeleton\" data-testid=\"stripe-skeleton\" aria-hidden=\"true\">\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" [mb]=\"10\" />\n <ui-skeleton [height]=\"44\" width=\"60%\" />\n </div>\n }\n @if (!mountOnly() && loadErrorText(); as text) {\n <div class=\"sp-block\" data-testid=\"stripe-load-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n <div #mount class=\"sp-mount\" [attr.id]=\"mountId() || null\" [class]=\"mountClass()\" [class.sp-mount--hidden]=\"mountHidden()\" [attr.aria-hidden]=\"mountHidden() ? 'true' : null\" [attr.inert]=\"mountHidden() ? '' : null\"\n [attr.role]=\"mountOnly() ? null : 'group'\" [attr.aria-label]=\"mountOnly() ? null : label()\" data-testid=\"stripe-mount\"></div>\n @if (!mountOnly() && achNoticeVisible()) {\n <div class=\"sp-block\" [attr.data-testid]=\"achNoticeTestId()\"><ui-alert variant=\"info\">{{ achNotice() }}</ui-alert></div>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"sp-block\" [id]=\"errorId\" data-testid=\"stripe-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"sp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [loading]=\"submitting()\" [disabled]=\"submitDisabled()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"stripe-submit\" (click)=\"confirm()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-stripe-payment { display: block; min-width: 0; }\n ui-stripe-payment .sp-sr {\n position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;\n clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;\n }\n .sp-block { margin-top: 12px; }\n .sp-actions { margin-top: 16px; display: flex; justify-content: flex-end; }\n ui-stripe-payment .sp { position: relative; }\n /* While loading the form is kept laid out (so Stripe can measure it and open Apple Pay / Link / the bank login) but invisible and untouchable. */\n .sp-mount--hidden { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }\n /* Phones: the button fills the row. ui-button's host is inline-flex and its inner button is content-sized, so the inner .btn is stretched (ui-button has no host width hook). */\n @media (max-width: 480px) {\n .sp-actions { display: block; }\n .sp-actions ui-button { display: flex; }\n ui-stripe-payment .sp-actions .btn { width: 100%; }\n }\n `],\n})\nexport class StripePaymentComponent {\n private readonly loader = inject(STRIPE_LOADER);\n private readonly defaults = inject(STRIPE_PAYMENT_DEFAULTS);\n private readonly doc = inject(DOCUMENT);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the component only mounts the Payment Element. No submit button, skeleton, status text (unless `a11yMessages` is set), bank notice or error\n * alert; it never submits, confirms or updates by itself; load failures go to `(loadError)` only. The host keeps its own confirm code and calls Stripe.js with the\n * objects from `(stripeReady)`. `mountId` / `mountClass` still apply, and `(ready)`, `(elementChange)`, `(paymentMethodTypeChange)` still emit.\n */\n readonly mountOnly = input(false);\n /** `'setup'` saves a payment method (`confirmSetup`), `'payment'` takes a payment (`confirmPayment`). */\n readonly mode = input<StripeIntentKind>('payment');\n /** The publishable key (`pk_...`). Falls back to `provideStripePayment({ publishableKey })`. */\n readonly publishableKey = input<string | null>(null);\n /** The client secret of the SetupIntent / PaymentIntent your backend created. Changing it re-creates the form. */\n readonly clientSecret = input<string | null>(null);\n /** Deferred intent: show the form first, create the intent on submit with `createIntent`. Used instead of `clientSecret`. */\n readonly deferred = input<StripeDeferredIntent | null>(null);\n /** Creates the intent on submit (deferred mode) and resolves its client secret. */\n readonly createIntent = input<StripeCreateIntentFn | null>(null);\n /** A Stripe Connect account id (`acct_...`): `loadStripe(key, { stripeAccount })`. */\n readonly stripeAccount = input<string | null>(null);\n /** Stripe.js locale. */\n readonly locale = input<string | null>(null);\n /** Further `loadStripe` options. */\n readonly stripeOptions = input<StripeLoadOptions | null>(null);\n /** Payment method types for a DEFERRED intent (`elements({ payment_method_types })`). With a client secret the intent decides, nothing is passed. */\n readonly paymentMethodTypes = input<string[] | null>(null);\n /** Extra `stripe.elements()` options, merged last. */\n readonly elementsOptions = input<Record<string, unknown> | null>(null);\n\n // Payment Element options (`elements.create('payment', ...)`): only the ones that are set are passed.\n /** `'tabs'` (default), `'accordion'`, an object, or `null` to pass no layout. */\n readonly layout = input<string | Record<string, unknown> | null>('tabs');\n readonly paymentMethodOrder = input<string[] | null>(null);\n /** `{ applePay: 'never', googlePay: 'never' }` hides the wallets. */\n readonly wallets = input<Record<string, string> | null>(null);\n /** `{ billingDetails: { email: 'never', phone: 'never', address: 'auto' } }` etc. */\n readonly fields = input<Record<string, unknown> | null>(null);\n /** Pre-filled values: `{ billingDetails: { name, email, address: { country: 'US' } } }`. A later change updates the element in place. */\n readonly defaultValues = input<Record<string, unknown> | null>(null);\n readonly business = input<{ name: string } | null>(null);\n readonly terms = input<Record<string, string> | null>(null);\n /** Extra Payment Element options, merged last (readOnly, fields, ...). */\n readonly paymentElementOptions = input<Record<string, unknown> | null>(null);\n /** The Elements appearance. */\n readonly appearance = input<StripeAppearance | null>(null);\n /** Derive the appearance from the `--ui-stripe-*` CSS tokens (light / dark) when no `appearance` is set. */\n readonly appearanceFromTokens = input(false);\n\n // Confirmation\n /** Where Stripe sends the customer back after a redirect. Unset = the current page (`window.location.href`); `null` = pass no `return_url`. */\n readonly returnUrl = input<string | null | undefined>(undefined);\n /** Billing details sent on confirm (`confirmParams.payment_method_data.billing_details`), needed for fields hidden with `'never'`. */\n readonly billingDetails = input<StripeBillingDetails | null>(null);\n /** Extra `confirmParams`, merged last. */\n readonly confirmParams = input<Record<string, unknown> | null>(null);\n /** `'if_required'` (default) keeps the customer on the page unless the method needs a redirect. */\n readonly redirect = input<'if_required' | 'always'>('if_required');\n /** Call `elements.submit()` before confirming. Unset = automatic: yes for a deferred intent (Stripe requires it), no with a client secret. */\n readonly submitBeforeConfirm = input<boolean | null>(null);\n /** After a payment comes back `requires_action` (not a bank verification), run `stripe.handleCardAction` (3D Secure) before reporting. */\n readonly autoHandleCardAction = input(false);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `confirm()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still creating the intent: show the loading skeleton. */\n readonly pending = input(false);\n /** Accessible name of the payment form. */\n readonly label = input('Payment details');\n /** The `id` of the element container (an app's e2e selector such as `#payment-element`). */\n readonly mountId = input('');\n /** Extra CSS classes on the element container. */\n readonly mountClass = input('');\n /** Show the bank-account notice while that tab is selected. */\n readonly showAchNotice = input(true);\n readonly achNotice = input(STRIPE_ACH_NOTICE);\n /** The `data-testid` of the notice (an app's existing e2e selector, e.g. `ach-setup-notice`). */\n readonly achNoticeTestId = input('stripe-ach-notice');\n /** The payment method type the host shows before Stripe reports one (cremo: `'card'`); `paymentMethodTypeChange` fires only when the reported type differs from it (or from the last report). */\n readonly initialPaymentMethodType = input('card');\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default), `'table'` (table text, else Stripe's own message: the cremo payment flows) or `'stripe'` (Stripe's own message). See `getStripeErrorMessage`. */\n readonly errorDisplay = input<StripeErrorDisplay>('friendly');\n /** Different error display for single steps (e.g. `{ submit: 'stripe', action: 'stripe' }`: raw Stripe text for the validation and 3DS steps, `errorDisplay` for the rest). */\n readonly errorDisplayByStage = input<Partial<Record<StripeFailureStage, StripeErrorDisplay>> | null>(null);\n /** The text when Stripe sends an error with no message (default: \"Payment failed. Please try again.\"). */\n readonly errorFallback = input('');\n /** The same per step (Settings: `{ submit: 'Failed to submit payment information', confirm: 'Failed to confirm payment method' }`); wins over `errorFallback`. */\n readonly errorFallbackByStage = input<Partial<Record<StripeFailureStage, string>> | null>(null);\n /** Replacement texts by code: Stripe error codes AND the library's own failure codes (`not_initialized`, `no_payment_method`, `requires_payment_method`, `not_completed`, `authentication_failed`, ...). `{status}` in a text becomes Stripe's status of the intent (\"Unexpected payment status: {status}\"). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly loadErrorMessage = input('Failed to load the payment form. Please try again.');\n /** Texts of the screen-reader status region (translate them); missing keys keep the English defaults. */\n readonly a11yMessages = input<Partial<StripeA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /**\n * The live Stripe.js objects, emitted once each time the Elements are created: right after `elements.create('payment')` and `mount()` succeeded, before `(ready)`\n * (the moment the old inline code had `this.stripe` / `this.elements` / `this.paymentElement` assigned). `null` is emitted when they go away (the form is re-created for new\n * inputs, or `destroyElements()`): drop your references. Destroying the component itself emits nothing (the host owns that moment).\n */\n readonly stripeReady = output<StripeReadyEvent | null>();\n /** The Payment Element finished loading. */\n readonly ready = output<void>();\n /** The customer picked another payment method type (`'card'`, `'us_bank_account'`, ...). */\n readonly paymentMethodTypeChange = output<string>();\n /** Every change of the form: completeness and the selected type. */\n readonly elementChange = output<StripeElementChange>();\n /** The intent was confirmed (succeeded, processing, needs bank verification, or needs a further action). */\n readonly confirmed = output<StripeConfirmedEvent>();\n /** A step failed (validation, intent creation, confirmation). `message` is ready to show. */\n readonly failed = output<StripeFailure>();\n /** Stripe.js or the Payment Element could not be loaded. */\n readonly loadError = output<StripeFailure>();\n\n // ── State ──────────────────────────────────────────────────────────────\n readonly loading = signal(false);\n readonly isReady = signal(false);\n readonly submitting = signal(false);\n readonly complete = signal(false);\n /** The selected payment method type, `null` until Stripe reports one. */\n readonly selectedType = signal<string | null>(null);\n readonly errorText = signal('');\n readonly loadErrorText = signal('');\n private readonly announcement = signal('');\n\n protected readonly errorId = `ui-stripe-error-${nextId++}`;\n private readonly mountRef = viewChild<ElementRef<HTMLElement>>('mount');\n\n protected readonly mountHidden = computed(() => !this.mountOnly() && (this.loading() || this.pending() || !!this.loadErrorText()));\n protected readonly achNoticeVisible = computed(() => this.showAchNotice() && this.selectedType() === 'us_bank_account');\n protected readonly effectiveSubmitLabel = computed(() => this.submitLabel() || (this.mode() === 'setup' ? 'Save payment method' : 'Pay'));\n protected readonly submitDisabled = computed(() => this.disabled() || this.loading() || this.pending() || !this.isReady() || !!this.loadErrorText());\n private readonly messages = computed((): StripeA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<StripeA11yMessages>;\n return { ...STRIPE_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => {\n if (this.loading()) return this.messages().loading;\n if (this.submitting()) return this.mode() === 'setup' ? this.messages().savingMethod : this.messages().processingPayment;\n return this.announcement();\n });\n\n /** How `loadStripe` is called: key + options. Re-creates everything when it changes. */\n private readonly connection = computed(() => {\n const key = this.publishableKey() || this.defaults.publishableKey || '';\n return { key, options: buildLoadOptions(this.stripeAccount(), this.locale() ?? this.defaults.locale, this.stripeOptions()) };\n }, { equal: jsonEqual });\n\n /** The `stripe.elements()` options without the deferred amount (that one is updated in place); `null` while there is no intent to show. */\n private readonly elementsConfig = computed((): Record<string, unknown> | null => {\n const secret = this.clientSecret();\n const deferred = this.deferred();\n let options: Record<string, unknown>;\n if (secret) {\n options = { clientSecret: secret };\n } else if (deferred) {\n options = {\n mode: deferred.mode ?? this.mode(),\n currency: deferred.currency,\n ...(deferred.setupFutureUsage ? { setup_future_usage: deferred.setupFutureUsage } : {}),\n ...(deferred.captureMethod ? { capture_method: deferred.captureMethod } : {}),\n ...(deferred.onBehalfOf ? { on_behalf_of: deferred.onBehalfOf } : {}),\n ...(this.paymentMethodTypes() ? { payment_method_types: this.paymentMethodTypes() } : {}),\n };\n } else {\n return null;\n }\n const appearance = this.appearance();\n if (appearance) options['appearance'] = appearance;\n return { ...options, ...(this.elementsOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n /** The Payment Element options that need a new element when they change (default values and read-only are updated in place). */\n private readonly elementConfig = computed(() => {\n const options: Record<string, unknown> = {};\n const layout = this.layout();\n if (layout) options['layout'] = layout;\n if (this.paymentMethodOrder()) options['paymentMethodOrder'] = this.paymentMethodOrder();\n if (this.wallets()) options['wallets'] = this.wallets();\n if (this.fields()) options['fields'] = this.fields();\n if (this.business()) options['business'] = this.business();\n if (this.terms()) options['terms'] = this.terms();\n return { ...options, ...(this.paymentElementOptions() ?? {}) };\n }, { equal: jsonEqual });\n\n private stripe: StripeLike | null = null;\n private stripeSignature = '';\n private elements: StripeElementsLike | null = null;\n private element: StripePaymentElementLike | null = null;\n private generation = 0;\n private lastType: string | null = null;\n private lastAmount: number | undefined;\n private lastFailure: StripeFailure | null = null;\n private destroyed = false;\n /** What the element was last given, so a change made while it loaded is applied once it is ready. */\n private appliedDefaultValues = '';\n private appliedDisabled = false;\n\n constructor() {\n effect(() => {\n const mount = this.mountRef();\n const connection = this.connection();\n const elements = this.elementsConfig();\n const element = this.elementConfig();\n if (!mount) return;\n untracked(() => { void this.init(mount.nativeElement, connection, elements, element); });\n });\n // The deferred amount changes without a new form (a fee shown for the other payment method): elements.update({ amount }).\n effect(() => {\n const amount = this.deferred()?.amount;\n untracked(() => {\n if (!this.mountOnly() && amount !== undefined && this.lastAmount !== undefined && amount !== this.lastAmount && this.elements?.update) this.elements.update({ amount });\n this.lastAmount = amount;\n });\n });\n effect(() => {\n const defaultValues = this.defaultValues();\n untracked(() => this.applyDefaultValues(defaultValues));\n });\n effect(() => {\n const disabled = this.disabled();\n untracked(() => this.applyDisabled(disabled));\n });\n inject(DestroyRef).onDestroy(() => { this.destroyed = true; this.generation++; this.disposeElements(); this.stripe = null; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Submits the form: `elements.submit()` (when required), the deferred intent, then `confirmSetup` / `confirmPayment`.\n * Resolves the normalised result (also emitted as `confirmed`), or `null` after a failure (emitted as `failed`) or when nothing was started\n * (already submitting, or disabled). Never rejects: anything Stripe.js throws becomes a `failed` event.\n *\n * `useExistingIntent`: the intent already exists (a retry after a failed attempt, or one created earlier): no `elements.submit()`, no `createIntent`,\n * and `confirmPayment` / `confirmSetup` is called WITHOUT a client secret, exactly like cremo's intake retry. Pass `clientSecret` (the one you stored) to send it.\n */\n async confirm(options: { useExistingIntent?: boolean; clientSecret?: string } = {}): Promise<StripeConfirmedEvent | null> {\n if (this.submitting() || this.disabled()) return null;\n const stripe = this.stripe;\n const elements = this.elements;\n if (!stripe || !elements) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'submit')); return null; }\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n let stage: StripeFailureStage = 'submit';\n try {\n const mode = this.mode();\n const existing = options.useExistingIntent === true;\n const deferred = !existing && !this.clientSecret() && !!this.deferred();\n if (!existing && (this.submitBeforeConfirm() ?? deferred)) {\n const { error } = await elements.submit();\n if (error) { this.fail(failureFromError(error, 'submit', this.errorOptions('submit'))); return null; }\n }\n let secret: string | undefined = existing ? options.clientSecret : undefined;\n if (deferred) {\n stage = 'intent';\n const create = this.createIntent();\n if (!create) { this.fail(failure('no_intent_factory', MSG_INTENT_FAILED, 'intent')); return null; }\n try {\n const created = await create({ mode });\n secret = typeof created === 'string' ? created : created?.clientSecret;\n } catch (err) {\n this.fail(failure('intent_creation_failed', messageOfThrown(err, STRIPE_DEFAULT_ERROR_MESSAGE), 'intent', messageOfThrown(err, '')));\n return null;\n }\n if (!secret) { this.fail(failure('intent_creation_failed', MSG_INTENT_FAILED, 'intent')); return null; }\n }\n stage = 'confirm';\n const confirmParams = this.buildConfirmParams();\n const params: Record<string, unknown> = {\n elements,\n ...(secret ? { clientSecret: secret } : {}),\n ...(confirmParams ? { confirmParams } : {}),\n redirect: this.redirect(),\n };\n const result = mode === 'setup' ? await stripe.confirmSetup(params) : await stripe.confirmPayment(params);\n if (result.error) { this.fail(failureFromError(result.error, 'confirm', this.errorOptions('confirm'))); return null; }\n const intent = mode === 'setup' ? result.setupIntent : result.paymentIntent;\n if (!intent) {\n this.fail(failure('not_completed', mode === 'setup' ? 'Payment method setup was incomplete. Please try again.' : MSG_NOT_COMPLETED, 'result'));\n return null;\n }\n let event = normalizeIntent(mode, intent);\n if (mode === 'setup' && !event.paymentMethodId) { this.fail(failure('no_payment_method', MSG_NO_PAYMENT_METHOD, 'result')); return null; }\n if (mode === 'payment' && event.outcome === 'requires_action' && this.autoHandleCardAction()) {\n stage = 'action';\n const handled = await this.runCardAction(stripe, intent.client_secret);\n if (!handled) return null;\n event = handled;\n }\n return this.finish(event);\n } catch (err) {\n this.fail(this.thrownFailure(err, stage));\n return null;\n } finally {\n this.submitting.set(false);\n }\n }\n\n /**\n * Runs `stripe.handleCardAction(clientSecret)` (3D Secure) for a payment that came back `requires_action`, and reports the result like `confirm()`.\n * Use it when `autoHandleCardAction` is off and the host handles `outcome: 'requires_action'` itself.\n */\n async handleNextAction(clientSecret: string): Promise<StripeConfirmedEvent | null> {\n if (this.submitting()) return null;\n const stripe = this.stripe;\n if (!stripe) { this.fail(failure('not_initialized', MSG_NOT_INITIALIZED, 'action')); return null; }\n this.submitting.set(true);\n this.errorText.set('');\n try {\n const handled = await this.runCardAction(stripe, clientSecret);\n return handled ? this.finish(handled) : null;\n } catch (err) {\n this.fail(this.thrownFailure(err, 'action'));\n return null;\n } finally {\n this.submitting.set(false);\n }\n }\n\n /**\n * `elements.fetchUpdates()`: after your backend changed the amount of the intent this form was created with (cremo intake: fees differ per payment method),\n * so the form shows the new amount. Resolves `null` when it worked, else the failure (returned only, not emitted: the host decides, cremo ignores it).\n */\n async fetchUpdates(): Promise<StripeFailure | null> {\n const elements = this.elements;\n if (!elements?.fetchUpdates) return failure('not_initialized', MSG_NOT_INITIALIZED, 'submit');\n try {\n const { error } = await elements.fetchUpdates();\n return error ? failureFromError(error, 'confirm', this.errorOptions('confirm')) : null;\n } catch (err) {\n return this.thrownFailure(err, 'confirm');\n }\n }\n\n /** `elements.update(options)`: change the deferred amount, appearance or locale without re-creating the form. */\n updateElements(options: Record<string, unknown>): void { this.elements?.update?.(options); }\n\n /** `paymentElement.update(options)`. */\n updatePaymentElement(options: Record<string, unknown>): void { this.element?.update?.(options); }\n\n /** Removes the Payment Element (host teardown on cancel). The component re-creates it when its inputs change. */\n destroyElements(): void { this.disposeElements(); this.isReady.set(false); }\n\n /** Verify a bank account with the two micro-deposit amounts / the descriptor code of a PaymentIntent (the public \"verify your bank\" page). */\n async verifyMicrodepositsForPayment(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('payment', clientSecret, data);\n }\n\n /** Same for a SetupIntent. */\n async verifyMicrodepositsForSetup(clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n return this.verifyWith('setup', clientSecret, data);\n }\n\n /**\n * After Stripe redirected the customer back to `returnUrl`: retrieves the intent (client secret from the URL by default) and reports it like `confirm()`\n * (`confirmed` for succeeded / processing / needs verification / needs action, `failed` otherwise). `{ event: null, failure: null }` when the URL has no intent.\n */\n async handleReturn(options: { clientSecret?: string; kind?: StripeIntentKind; search?: string } = {}): Promise<StripeReturnResult> {\n const fromUrl = options.clientSecret ? null : readStripeReturnParams(options.search ?? this.doc.defaultView?.location.search ?? '');\n const clientSecret = options.clientSecret ?? fromUrl?.clientSecret;\n if (!clientSecret) return { event: null, failure: null };\n const kind = options.kind ?? fromUrl?.kind ?? this.mode();\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n const f = failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, ''));\n this.fail(f);\n return { event: null, failure: f };\n }\n const result = await retrieveIntent(stripe, kind, clientSecret);\n if (result.failure) { this.fail(result.failure); return result; }\n if (result.event && !this.finish(result.event, true)) return { event: null, failure: this.lastFailure };\n return result;\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n private errorOptions(stage: StripeFailureStage): StripeErrorMessageOptions {\n return {\n display: this.errorDisplayByStage()?.[stage] ?? this.errorDisplay(),\n overrides: this.errorMessages(),\n ...(this.errorFallbackByStage()?.[stage] || this.errorFallback() ? { fallback: this.errorFallbackByStage()?.[stage] || this.errorFallback() } : {}),\n };\n }\n\n /** Something Stripe.js threw (an IntegrationError, a network failure) as a failure, with the text chosen like any Stripe error. */\n private thrownFailure(err: unknown, stage: StripeFailureStage): StripeFailure {\n const e = err as { code?: unknown; type?: unknown; decline_code?: unknown; message?: unknown } | null | undefined;\n const error = {\n ...(typeof e?.code === 'string' ? { code: e.code } : {}),\n ...(typeof e?.type === 'string' ? { type: e.type } : {}),\n ...(typeof e?.decline_code === 'string' ? { decline_code: e.decline_code } : {}),\n ...(typeof e?.message === 'string' && e.message ? { message: e.message } : {}),\n };\n const code = stage === 'submit' ? 'submit_failed' : stage === 'action' ? 'action_failed' : 'confirm_failed';\n const { error: _raw, ...failed } = failureFromError(error, stage, this.errorOptions(stage));\n return { ...failed, code: error.code ?? code, ...(stage === 'action' ? { actionHandled: true } : {}) };\n }\n\n private buildConfirmParams(): Record<string, unknown> | null {\n const params: Record<string, unknown> = {};\n const returnUrl = this.returnUrl();\n if (returnUrl !== null) params['return_url'] = returnUrl ?? this.doc.defaultView?.location.href ?? '';\n const billing = this.billingDetails();\n if (billing) params['payment_method_data'] = { billing_details: billing };\n Object.assign(params, this.confirmParams() ?? {});\n return Object.keys(params).length ? params : null;\n }\n\n private fail(f: StripeFailure): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override.split('{status}').join(f.status ?? '') };\n this.lastFailure = f;\n if (this.destroyed) return;\n if (this.showErrors()) this.errorText.set(f.message);\n this.announcement.set('');\n this.failed.emit(f);\n }\n\n private finish(event: StripeConfirmedEvent, fromReturn = false): StripeConfirmedEvent | null {\n const acted = { ...(event.actionHandled ? { actionHandled: true } : {}), status: event.status };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('requires_payment_method', MSG_REQUIRES_PAYMENT_METHOD, fromReturn ? 'return' : 'result'), ...acted });\n return null;\n }\n if (event.outcome === 'canceled' || event.outcome === 'unknown') {\n this.fail({ ...failure('not_completed', MSG_NOT_COMPLETED, fromReturn ? 'return' : 'result'), ...acted });\n return null;\n }\n if (this.destroyed) return event;\n this.announcement.set(this.announce(event));\n this.confirmed.emit(event);\n return event;\n }\n\n private announce(event: StripeConfirmedEvent): string {\n const m = this.messages();\n switch (event.outcome) {\n case 'succeeded': return event.kind === 'setup' ? m.methodSaved : m.paymentReceived;\n case 'processing': return m.paymentProcessing;\n case 'requires_capture': return m.paymentAuthorized;\n case 'requires_verification': return m.verificationNeeded;\n default: return m.actionRequired;\n }\n }\n\n private async runCardAction(stripe: StripeLike, clientSecret: string | null | undefined): Promise<StripeConfirmedEvent | null> {\n const acted = { actionHandled: true };\n if (!stripe.handleCardAction || !clientSecret) { this.fail({ ...failure('action_unavailable', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }); return null; }\n const { error, paymentIntent } = await stripe.handleCardAction(clientSecret);\n if (error) { this.fail({ ...failureFromError(error, 'action', { ...this.errorOptions('action'), fallback: MSG_AUTH_FAILED }), ...acted }); return null; }\n if (!paymentIntent) { this.fail({ ...failure('action_incomplete', MSG_AUTH_NOT_COMPLETED, 'action'), ...acted }); return null; }\n const event = { ...normalizeIntent('payment', paymentIntent), ...acted };\n if (event.outcome === 'requires_payment_method') {\n this.fail({ ...failure('authentication_failed', 'Payment authentication failed. Please try a different payment method.', 'action'), ...acted, status: event.status });\n return null;\n }\n return event;\n }\n\n private async ensureStripe(): Promise<StripeLike> {\n if (this.stripe) return this.stripe;\n const { key, options } = this.connection();\n if (!key) throw new Error(MSG_KEY_MISSING);\n const stripe = await this.loader(key, options);\n if (!stripe) throw new Error(MSG_LOAD_FAILED);\n return stripe;\n }\n\n private async verifyWith(flow: StripeIntentKind, clientSecret: string, data: MicrodepositVerifyData): Promise<StripeMicrodepositResult> {\n let stripe: StripeLike;\n try { stripe = await this.ensureStripe(); } catch (err) {\n return { ok: false, outcome: null, intent: null, failure: failure('load_error', messageOfThrown(err, MSG_LOAD_FAILED), 'load', messageOfThrown(err, '')) };\n }\n return verifyMicrodeposits(stripe, flow, clientSecret, data);\n }\n\n private disposeElements(): void {\n const element = this.element;\n this.element = null;\n this.elements = null;\n this.lastType = null;\n this.selectedType.set(null);\n this.complete.set(false);\n if (element) {\n try { element.destroy(); } catch { /* already gone */ }\n if (!this.destroyed) this.stripeReady.emit(null);\n }\n }\n\n private loadFailed(message: string, stripeMessage: string): void {\n this.loading.set(false);\n this.isReady.set(false);\n this.loadErrorText.set(this.loadErrorMessage());\n this.loadError.emit(failure('load_error', message, 'load', stripeMessage));\n }\n\n private async init(\n container: HTMLElement,\n connection: { key: string; options: StripeLoadOptions | undefined },\n elementsConfig: Record<string, unknown> | null,\n elementConfig: Record<string, unknown>,\n ): Promise<void> {\n const generation = ++this.generation;\n this.disposeElements();\n this.isReady.set(false);\n this.errorText.set('');\n this.loadErrorText.set('');\n this.announcement.set('');\n if (!this.isBrowser || !elementsConfig) { this.loading.set(false); return; }\n if (!connection.key) { this.loadFailed(MSG_KEY_MISSING, ''); return; }\n this.loading.set(true);\n try {\n const signature = JSON.stringify(connection);\n if (!this.stripe || this.stripeSignature !== signature) {\n this.stripe = null;\n const stripe = await this.loader(connection.key, connection.options);\n if (generation !== this.generation) return;\n if (!stripe) { this.loadFailed(MSG_LOAD_FAILED, ''); return; }\n this.stripe = stripe;\n this.stripeSignature = signature;\n }\n const options: Record<string, unknown> = { ...elementsConfig };\n const deferred = this.deferred();\n if (!options['clientSecret'] && deferred?.amount !== undefined && options['amount'] === undefined) options['amount'] = deferred.amount;\n this.lastAmount = deferred?.amount;\n if (this.appearanceFromTokens() && !options['appearance']) options['appearance'] = readStripeAppearance(this.doc, this.host.nativeElement);\n const elements = this.stripe.elements(options);\n const elementOptions: Record<string, unknown> = { ...elementConfig };\n const defaultValues = this.defaultValues();\n if (defaultValues) elementOptions['defaultValues'] = defaultValues;\n if (this.disabled() && !this.mountOnly()) elementOptions['readOnly'] = true;\n this.appliedDefaultValues = JSON.stringify(defaultValues ?? null);\n this.appliedDisabled = this.disabled();\n const element = elements.create('payment', elementOptions);\n this.elements = elements;\n this.element = element;\n element.on('change', (event) => { if (generation === this.generation) this.onChange(event); });\n element.on('ready', () => {\n if (generation !== this.generation) return;\n this.loading.set(false);\n this.isReady.set(true);\n // Changes made while the element loaded (a customer name typed, the form disabled) are applied now.\n if (!this.mountOnly()) {\n this.applyDefaultValues(this.defaultValues());\n this.applyDisabled(this.disabled());\n }\n this.ready.emit();\n });\n element.on('loaderror', (event) => {\n if (generation !== this.generation) return;\n const message = event?.error?.message || MSG_LOAD_FAILED;\n this.loadFailed(message, event?.error?.message ?? '');\n });\n element.mount(container);\n this.stripeReady.emit({ stripe: this.stripe, elements, paymentElement: element });\n } catch (err) {\n if (generation !== this.generation) return;\n this.loadFailed(messageOfThrown(err, MSG_LOAD_FAILED), messageOfThrown(err, ''));\n }\n }\n\n private applyDefaultValues(defaultValues: Record<string, unknown> | null): void {\n const signature = JSON.stringify(defaultValues ?? null);\n if (this.mountOnly() || !this.element?.update || !this.isReady() || signature === this.appliedDefaultValues) return;\n this.appliedDefaultValues = signature;\n this.element.update({ defaultValues: defaultValues ?? {} });\n }\n\n private applyDisabled(disabled: boolean): void {\n if (this.mountOnly() || !this.element?.update || !this.isReady() || disabled === this.appliedDisabled) return;\n this.appliedDisabled = disabled;\n this.element.update({ readOnly: disabled });\n }\n\n private onChange(event: { complete?: boolean; empty?: boolean; value?: { type?: string }; error?: { message?: string } } | null | undefined): void {\n const type = event?.value?.type ?? null;\n const complete = !!event?.complete;\n this.complete.set(complete);\n if (type) this.selectedType.set(type);\n this.elementChange.emit({ complete, empty: !!event?.empty, type, errorMessage: event?.error?.message ?? null });\n if (type && type !== (this.lastType ?? this.initialPaymentMethodType())) this.paymentMethodTypeChange.emit(type);\n if (type) this.lastType = type;\n }\n}\n","/** How a bank account added with micro-deposits is verified: two deposit amounts, the code of one deposit, or the bank is still confirming it. */\nexport type MicrodepositType = 'amounts' | 'descriptor_code' | 'processing';\n\n/** The text of the pending-verification card, in one place for the component and its tests. */\nexport const MICRODEPOSIT_COPY = {\n title: 'Bank account waiting for verification',\n processingTitle: 'Bank account being confirmed',\n processing: 'Your bank is confirming this account; this usually takes up to a few business days. We will email you when it is ready.',\n cannotPay: \"Until then this account can't be used to pay invoices.\",\n readOnly: 'An administrator of your organization can finish the verification.',\n keepsActive: 'Your current payment method stays active until the new bank account is verified.',\n cancelTitle: 'Cancel verification',\n verifyLabel: 'Verify bank account',\n cancelBase: 'Cancel the verification of this bank account? It will not be saved as a payment method and you can add it again later.',\n cancelKeepsActive: ' Your current payment method stays active.',\n cancelNoOther: ' You have no other payment method saved.',\n tooManyAttempts: 'Too many failed attempts. Please try again later or contact support.',\n codeRequired: 'Enter the 6-character code.',\n} as const;\n\n/** \"June 5, 2026\" in UTC: the arrival date is a calendar day. Empty for no / an invalid date. */\nexport function microdepositArrivalText(iso: string | null | undefined): string {\n if (!iso) return '';\n const date = new Date(iso);\n return Number.isNaN(date.getTime()) ? '' : date.toLocaleDateString('en-US', { month: 'long', day: 'numeric', year: 'numeric', timeZone: 'UTC' });\n}\n\n/** Amounts: two whole numbers of cents from 1 to 99 (Stripe's micro-deposits are 1 to 99 cents). Empty text = nothing to say yet. */\nexport function depositAmountError(value: unknown): string {\n if (value === '' || value === null || value === undefined) return '';\n const n = Number(value);\n if (!Number.isInteger(n)) return 'Enter whole cents, for example 32.';\n if (n < 1 || n > 99) return 'Enter a number of cents from 1 to 99.';\n return '';\n}\n\n/** The code as sent to Stripe: trimmed, upper case. */\nexport const normalizeDescriptorCode = (value: string | null | undefined): string => (value ?? '').trim().toUpperCase();\n\n/** The descriptor code: 6 letters or numbers; with `requireSmPrefix` (Stripe's codes look like SMXXXX) it must start with \"SM\". Empty = nothing to say yet. */\nexport function descriptorCodeError(value: string | null | undefined, requireSmPrefix = false): string {\n const code = normalizeDescriptorCode(value);\n if (!code) return '';\n if (!/^[A-Z0-9]{6}$/.test(code)) return 'The code has 6 letters or numbers.';\n if (requireSmPrefix && !/^SM[A-Z0-9]{4}$/.test(code)) return 'Descriptor code must start with \"SM\" followed by 4 characters (e.g., SMXXXX)';\n return '';\n}\n\n/** Only an https link is offered as Stripe's hosted verification page. */\nexport function safeHostedUrl(url: string | null | undefined): string | null {\n return /^https:\\/\\//.test(url ?? '') ? (url as string) : null;\n}\n\n/** What `(verify)` emits: the two amounts in cents, or the code. */\nexport type MicrodepositVerifyEvent = { amounts: [number, number] } | { descriptorCode: string };\n\n/** Who started a pending verification, from the point of view of the user looking at it (a partner page): this user, the partner, or somebody else. */\nexport type MicrodepositStartedBy = 'you' | 'partner' | 'other' | '';\n\nexport interface MicrodepositStepsContext {\n type: Exclude<MicrodepositType, 'processing'>;\n /** ISO timestamp of the day the deposits should arrive. */\n arrivalDate?: string | null;\n /** Set when the user looks at ANOTHER party's account (a crematory looking at a partner): \"{partner}'s account\", \"Ask {partner} for ...\". */\n partnerName?: string;\n /** The user cannot finish it (no form on the card). */\n readOnly?: boolean;\n /** Read-only: who started it. */\n startedBy?: MicrodepositStartedBy;\n /** Read-only: replaces ONLY the middle sentence (\"An administrator of your organization can finish the verification.\" by default). */\n readOnlyText?: string;\n}\n\nconst arrivalClause = (iso: string | null | undefined): string => {\n const text = microdepositArrivalText(iso);\n return text ? ` (by ${text})` : '';\n};\n\n/**\n * The explanation under the bank account: the deposits clause, then what to do (or, with no form, who can finish it), then\n * \"Until then this account can't be used to pay invoices.\" The exact strings of the cremo Settings / Partners cards.\n */\nexport function microdepositStepsText(ctx: MicrodepositStepsContext): string {\n const partner = ctx.partnerName ?? '';\n const holder = partner ? `${partner}'s account` : 'your account';\n const clause = arrivalClause(ctx.arrivalDate);\n const deposits = ctx.type === 'descriptor_code'\n ? `Stripe sent one small deposit to ${holder}${clause}, with a description that starts with SM followed by a 6-character code. `\n : `Stripe sent two small deposits to ${holder}; they appear in 1-2 business days${clause}, with the description SMXXXX. `;\n if (ctx.readOnly) {\n const who = ctx.readOnlyText\n ?? (ctx.startedBy === 'partner' ? `This bank account was started by ${partner}; it can be finished by them.`\n : ctx.startedBy === 'other' ? 'This bank account was started by another crematory; it can be finished by them.'\n : partner ? `${partner} or the crematory that set it up can finish the verification.`\n : MICRODEPOSIT_COPY.readOnly);\n return `${deposits}${who} ${MICRODEPOSIT_COPY.cannotPay}`;\n }\n const enter = ctx.type === 'descriptor_code'\n ? (partner ? `Ask ${partner} for the code and enter it below to finish. ` : 'When it arrives, enter that code below to finish. ')\n : (partner ? `Ask ${partner} for the two deposit amounts and enter them below to finish. ` : 'When they arrive, enter the two amounts below to finish. ');\n return `${deposits}${enter}${MICRODEPOSIT_COPY.cannotPay}`;\n}\n\n/** While the bank is still confirming the account. */\nexport function microdepositProcessingText(partnerName = ''): string {\n return partnerName ? `${partnerName}'s bank is confirming this account; this usually takes up to a few business days. We will email you when it is ready.` : MICRODEPOSIT_COPY.processing;\n}\n\n/** The note under the steps when a payment method is already saved. */\nexport function microdepositKeepsActiveText(partnerName = ''): string {\n return partnerName ? `${partnerName}'s current payment method stays active until the new bank account is verified.` : MICRODEPOSIT_COPY.keepsActive;\n}\n\n/** The message of the cancel confirm: the saved method stays active only when one is saved. */\nexport function microdepositCancelMessage(options: { partnerName?: string; hasSavedMethod?: boolean } = {}): string {\n const partner = options.partnerName ?? '';\n if (partner) return `${MICRODEPOSIT_COPY.cancelBase} ${options.hasSavedMethod ? `${partner}'s current payment method stays active.` : `${partner} has no other payment method saved.`}`;\n return MICRODEPOSIT_COPY.cancelBase + (options.hasSavedMethod ? MICRODEPOSIT_COPY.cancelKeepsActive : MICRODEPOSIT_COPY.cancelNoOther);\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input, output, signal } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport {\n AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent,\n} from '@forgeroute/ui';\nimport { StripePaymentService, type StripeMicrodepositResult } from '../stripe-payment/stripe-actions';\nimport type { StripeIntentKind } from '../stripe-payment/stripe-outcomes';\nimport {\n MICRODEPOSIT_COPY, depositAmountError, descriptorCodeError, microdepositStepsText, normalizeDescriptorCode, safeHostedUrl,\n type MicrodepositType, type MicrodepositVerifyEvent,\n} from './microdeposit-verify.models';\n\n/**\n * \"Bank account waiting for verification\": explains the steps in plain words, takes the two deposit amounts (or the 6-character code),\n * links to Stripe's own verification page, and lets the user cancel. Read-only users see the card but no form and no buttons.\n *\n * Two ways to verify, same screen:\n * - Host verifies (default): `(verify)` emits `{ amounts: [a, b] }` or `{ descriptorCode }`; the host calls its backend and shows\n * `[verifying]` / `[errorText]` (your API owns the rules and the attempts).\n * - Stripe.js verifies (public \"verify your bank\" page): pass `[clientSecret]` (+ `[publishableKey]`, `[stripeAccount]`, `[flow]`); the component calls\n * `verifyMicrodepositsForPayment/Setup` itself, counts failed attempts (`[maxAttempts]`) and emits `(verified)`.\n *\n * <ui-microdeposit-verify type=\"amounts\" bankName=\"Chase\" last4=\"6789\" arrivalDate=\"2026-06-05T00:00:00Z\"\n * [verifying]=\"busy()\" [errorText]=\"error()\" (verify)=\"verify($event)\" (cancelVerification)=\"cancel()\" />\n */\n@Component({\n selector: 'ui-microdeposit-verify',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, AlertComponent, BadgeComponent, ButtonComponent, FormRowComponent, FormSectionComponent, ModalComponent, TextComponent, TextInputComponent],\n template: `\n <div data-testid=\"bank-pending-card\">\n <ui-form-section [label]=\"heading()\">\n <ui-alert variant=\"info\" data-testid=\"bank-pending-alert\">\n <div data-testid=\"bank-pending-summary\">\n @if (bankLine(); as line) { <strong data-testid=\"bank-pending-bank\">{{ line }}</strong> }\n <ui-badge label=\"Pending\" variant=\"yellow\" data-testid=\"bank-pending-badge\" />\n </div>\n @if (stepsText().trim()) {\n <ui-text size=\"sm\" [text]=\"stepsText()\" data-testid=\"bank-pending-steps\" />\n } @else if (isProcessing()) {\n <ui-text size=\"sm\" [text]=\"copy.processing\" data-testid=\"bank-pending-steps\" />\n } @else {\n <ui-text size=\"sm\" data-testid=\"bank-pending-steps\" [text]=\"defaultSteps()\" />\n }\n @if (hasSavedMethod()) {\n <ui-text size=\"sm\" tone=\"muted\" [text]=\"keepsActiveText() || copy.keepsActive\" data-testid=\"bank-pending-keeps-active\" />\n }\n <!-- Finishing the verification on Stripe's page saves the payment method (a write): never offered to a read-only user -->\n @if (!formHidden() && !hideHostedLink() && safeUrl(); as url) {\n <div><ui-button variant=\"link\" size=\"sm\" [href]=\"url\" target=\"_blank\" data-testid=\"bank-hosted-link\">Open Stripe's verification page</ui-button></div>\n }\n </ui-alert>\n\n @if (!formHidden() && !isProcessing()) {\n @if (type() === 'descriptor_code') {\n <ui-text-input label=\"Verification code\" hint=\"6 letters or numbers from the deposit description\" [maxlength]=\"6\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? codeError() : ''\" data-testid=\"bank-code-input\" [ngModel]=\"code()\" (ngModelChange)=\"code.set($event)\" />\n } @else {\n <ui-form-row data-testid=\"bank-amounts-row\">\n <ui-text-input label=\"First deposit (cents)\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(first()) : ''\" data-testid=\"bank-amount-first\" [ngModel]=\"first()\" (ngModelChange)=\"first.set($event)\" />\n <ui-text-input label=\"Second deposit (cents)\" type=\"number\" [min]=\"1\" [max]=\"99\" [maxDecimals]=\"0\" [required]=\"true\" [showErrors]=\"touched()\"\n [error]=\"touched() ? amountError(second()) : ''\" data-testid=\"bank-amount-second\" [ngModel]=\"second()\" (ngModelChange)=\"second.set($event)\" />\n </ui-form-row>\n }\n @if (shownError(); as text) {\n <ui-alert variant=\"danger\" data-testid=\"bank-verify-error\">{{ text }}</ui-alert>\n }\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"bank-verify-button\" [loading]=\"busy()\" [disabled]=\"busy() || cancelling()\" (click)=\"verify()\">{{ verifyLabel() || copy.verifyLabel }}</ui-button>\n }\n\n @if (!formHidden() && allowCancel()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-button\" [disabled]=\"busy() || cancelling()\" (click)=\"showCancelConfirm.set(true)\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n }\n </ui-form-section>\n\n <ui-modal [open]=\"showCancelConfirm()\" [title]=\"cancelLabel() || copy.cancelTitle\" maxWidth=\"460px\" (close)=\"showCancelConfirm.set(false)\">\n <ui-text size=\"sm\" data-testid=\"bank-cancel-message\" [text]=\"cancelMessage()\" />\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"bank-cancel-keep\" (click)=\"showCancelConfirm.set(false)\">Keep waiting</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"bank-cancel-confirm\" [loading]=\"cancelling()\" (click)=\"confirmCancel()\">{{ cancelLabel() || copy.cancelTitle }}</ui-button>\n </ui-modal>\n </div>\n `,\n})\nexport class MicrodepositVerifyComponent {\n private readonly service = inject(StripePaymentService);\n\n /** `'amounts'` (two deposits), `'descriptor_code'` (one deposit with a code) or `'processing'` (the bank is still confirming; nothing to enter). */\n readonly type = input<MicrodepositType>('amounts');\n readonly bankName = input('');\n readonly last4 = input('');\n /** The day the deposits should have arrived (ISO timestamp); empty when unknown. See `StripeVerification.arrivalDateIso`. */\n readonly arrivalDate = input<string | null>(null);\n /** Stripe's own verification page; only an https link is shown. */\n readonly hostedVerificationUrl = input<string | null>(null);\n /** Read-only users see the card with `readOnlyText` but no form, link or buttons. */\n readonly readOnly = input(false);\n /** Show the card as plain status: no form, link or buttons, and the steps text is yours (`stepsText`). For a page where someone else finishes the verification. */\n readonly statusOnly = input(false);\n /** Replaces the card heading (default: \"Bank account waiting for verification\" / \"Bank account being confirmed\"). */\n readonly title = input('');\n /** Replaces the whole steps text (the sentences about the deposits and what to enter). Use it for wording the library cannot know (a partner's name, who started it). */\n readonly stepsText = input('');\n /** Read-only / status-only: replaces ONLY the middle sentence of the steps text (the deposits clause before it and \"Until then this account can't be used ...\" after it stay). */\n readonly readOnlyText = input<string>(MICRODEPOSIT_COPY.readOnly);\n /** Hide Stripe's hosted-page link even for users who could use it. */\n readonly hideHostedLink = input(false);\n readonly cancelLabel = input('');\n readonly verifyLabel = input('');\n /** Replaces \"Your current payment method stays active until the new bank account is verified.\" */\n readonly keepsActiveText = input('');\n /** Replaces the cancel confirm's message. */\n readonly cancelMessageText = input('');\n /** A payment method is already saved (it stays active until the new bank account is verified). */\n readonly hasSavedMethod = input(false);\n /** Host mode: the host's verify request is running. */\n readonly verifying = input(false);\n /** Host mode: the host's cancel request is running. */\n readonly cancelling = input(false);\n /** Host mode: the verification failed; shown above the button. */\n readonly errorText = input('');\n /** Offer \"Cancel verification\" (with its confirm). */\n readonly allowCancel = input(true);\n /** Descriptor codes must look like Stripe's (`SMXXXX`). */\n readonly requireSmPrefix = input(false);\n\n // Stripe.js mode (set `clientSecret`)\n readonly clientSecret = input<string | null>(null);\n readonly publishableKey = input<string | null>(null);\n readonly stripeAccount = input<string | null>(null);\n /** Which kind of intent `clientSecret` belongs to. */\n readonly flow = input<StripeIntentKind>('payment');\n /** Stripe.js mode: stop sending after this many failed attempts (0 = no limit here). */\n readonly maxAttempts = input(0);\n\n /** Host mode: the amounts / code to verify. */\n readonly verify$ = output<MicrodepositVerifyEvent>({ alias: 'verify' });\n /** The user confirmed cancelling the verification. */\n readonly cancelVerification = output<void>();\n /** Stripe.js mode: the bank account is verified. */\n readonly verified = output<StripeMicrodepositResult>();\n /** Stripe.js mode: a verification attempt failed (the text is already shown). */\n readonly verifyFailed = output<StripeMicrodepositResult>();\n\n readonly copy = MICRODEPOSIT_COPY;\n readonly first = signal<string | number>('');\n readonly second = signal<string | number>('');\n readonly code = signal('');\n readonly touched = signal(false);\n readonly showCancelConfirm = signal(false);\n private readonly stripeBusy = signal(false);\n private readonly stripeError = signal('');\n private failedAttempts = 0;\n\n readonly formHidden = computed(() => this.readOnly() || this.statusOnly());\n readonly heading = computed(() => this.title() || (this.isProcessing() ? this.copy.processingTitle : this.copy.title));\n /** \"Chase ····6789\"; nothing when neither the bank nor the last 4 digits are known. */\n readonly bankLine = computed(() => {\n const bank = this.bankName().trim();\n const last4 = this.last4().trim();\n if (!bank && !last4) return '';\n return `${bank || 'Bank account'}${last4 ? ` ····${last4}` : ''}`;\n });\n readonly busy = computed(() => this.verifying() || this.stripeBusy());\n readonly shownError = computed(() => this.stripeError() || this.errorText());\n readonly isProcessing = computed(() => this.type() === 'processing');\n readonly safeUrl = computed(() => safeHostedUrl(this.hostedVerificationUrl()));\n /** The built-in steps text: deposits clause + what to do, or with no form the `readOnlyText` sentence, + \"Until then this account can't be used to pay invoices.\" */\n readonly defaultSteps = computed(() => microdepositStepsText({\n type: this.type() === 'descriptor_code' ? 'descriptor_code' : 'amounts',\n arrivalDate: this.arrivalDate(),\n readOnly: this.formHidden(),\n readOnlyText: this.readOnlyText(),\n }));\n readonly amountError = depositAmountError;\n readonly codeError = computed(() => (this.code().trim() ? descriptorCodeError(this.code(), this.requireSmPrefix()) : this.copy.codeRequired));\n readonly hasInvalid = computed(() => this.type() === 'descriptor_code'\n ? !!this.codeError()\n : !!depositAmountError(this.first()) || !!depositAmountError(this.second()) || this.first() === '' || this.second() === '' || this.first() === null || this.second() === null);\n /** The cancel confirm tells the truth: the saved method stays active only when one is saved. */\n readonly cancelMessage = computed(() => this.cancelMessageText() || this.copy.cancelBase + (this.hasSavedMethod() ? this.copy.cancelKeepsActive : this.copy.cancelNoOther));\n\n async verify(): Promise<void> {\n if (this.busy()) return;\n this.touched.set(true);\n if (this.hasInvalid()) return;\n const secret = this.clientSecret();\n if (!secret) {\n this.verify$.emit(this.type() === 'descriptor_code'\n ? { descriptorCode: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] });\n return;\n }\n const max = this.maxAttempts();\n if (max > 0 && this.failedAttempts >= max) { this.stripeError.set(this.copy.tooManyAttempts); return; }\n this.stripeBusy.set(true);\n this.stripeError.set('');\n const data = this.type() === 'descriptor_code'\n ? { descriptor_code: normalizeDescriptorCode(this.code()) }\n : { amounts: [Number(this.first()), Number(this.second())] };\n const connection = { publishableKey: this.publishableKey(), stripeAccount: this.stripeAccount() };\n const result = this.flow() === 'setup'\n ? await this.service.verifyMicrodepositsForSetup(secret, data, connection)\n : await this.service.verifyMicrodepositsForPayment(secret, data, connection);\n this.stripeBusy.set(false);\n if (result.ok) { this.verified.emit(result); return; }\n this.failedAttempts++;\n const message = result.failure?.message ?? 'Verification failed';\n const remaining = max - this.failedAttempts;\n this.stripeError.set(max > 0 && remaining > 0 ? `${message} (${remaining} attempt${remaining === 1 ? '' : 's'} remaining)` : message);\n this.verifyFailed.emit(result);\n }\n\n confirmCancel(): void {\n if (this.cancelling()) return;\n this.showCancelConfirm.set(false);\n this.cancelVerification.emit();\n }\n}\n"],"mappings":";;;;;;AAWA,MAAa,cAA2G,EACtH,YAAY,OAAO,qBACpB;AAMD,MAAa,sBAAsC,OAAO,gBAAgB,YAAW;CACnF,MAAM,MAAM,MAAM,YAAY,KAAI;CAElC,OADe,YAAY,SAAY,MAAM,IAAI,WAAW,cAAc,IAAI,MAAM,IAAI,WAAW,gBAAgB,OAAgB;AAErI;AAGA,MAAa,gBAAgB,IAAI,eAA+B,iBAAiB;CAAE,YAAY;CAAQ,eAAe;AAAmB,CAAE;AAU3I,MAAa,0BAA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