@forgeroute/ui 0.5.31 → 0.5.32
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-address-input.mjs +10 -2
- package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +4 -2
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-data-table-core.mjs +21 -7
- package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-form-row.mjs +54 -18
- package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-form-section.mjs +32 -4
- package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-kpi-card.mjs +20 -4
- package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-list-item.mjs +2 -2
- package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-map.mjs +10 -2
- package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-messaging.mjs +30 -6
- package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-payments.mjs +26 -5
- package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-quickbooks.mjs +11 -2
- package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-share-menu.mjs +46 -15
- package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-square.mjs +1 -0
- package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-stripe.mjs +21 -4
- package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-core.d.ts +2 -2
- package/types/forgeroute-ui-data-table-core.d.ts +5 -0
- package/types/forgeroute-ui-form-row.d.ts +14 -0
- package/types/forgeroute-ui-form-section.d.ts +8 -1
- package/types/forgeroute-ui-kpi-card.d.ts +7 -0
- package/types/forgeroute-ui-list-item.d.ts +1 -1
- package/types/forgeroute-ui-share-menu.d.ts +20 -11
- package/types/forgeroute-ui-table-types.d.ts +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-quickbooks.mjs","names":[],"sources":["../../../projects/forgeroute-ui/quickbooks/src/qbo-tokenizer/qbo-tokenizer.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-validation/qbo-validation.ts","../../../projects/forgeroute-ui/quickbooks/src/errors/qbo-errors.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-payment/qbo-payment.component.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-connect/qbo-connect.flow.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-connect/qbo-connect.component.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-method.models.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-body.component.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-method.component.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-hosted-pay/qbo-hosted-pay.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { QboBankAccountType } from '../qbo-validation/qbo-validation';\n\n/** Which Intuit host the tokens endpoint is on. */\nexport type QboEnvironment = 'sandbox' | 'production';\n\n/** The card as Intuit's tokens endpoint takes it (`POST /quickbooks/v4/payments/tokens`, body `{ card }`). Lives only for the duration of one call. */\nexport interface QboCardTokenRequest {\n number: string;\n /** Two digits, `'02'`. */\n expMonth: string;\n /** Four digits, `'2028'`. */\n expYear: string;\n cvc: string;\n name?: string;\n /** `country` is sent only for a non-US postal code (`'CA'`); a US ZIP sends none, as before. */\n address?: { postalCode?: string; country?: string };\n}\n\n/** The bank account as Intuit's tokens endpoint takes it (body `{ bankAccount }`). */\nexport interface QboBankTokenRequest {\n name: string;\n routingNumber: string;\n accountNumber: string;\n accountType: QboBankAccountType;\n}\n\nexport type QboTokenizeRequest = { kind: 'card'; card: QboCardTokenRequest } | { kind: 'bank'; bankAccount: QboBankTokenRequest };\n\nexport interface QboTokenizeContext {\n environment: QboEnvironment;\n /** The `Request-Id` header: a new unique value per call (Intuit uses it to make a repeated call idempotent). */\n requestId: string;\n}\n\n/** One entry of Intuit's `errors` array. Only these four text fields are kept; nothing else of the answer is passed on. */\nexport interface QboTokenError {\n code?: string;\n message?: string;\n detail?: string;\n moreInfo?: string;\n}\n\nexport type QboTokenizeResult =\n | { ok: true; token: string }\n /** `status` is the HTTP status, `0` when the request never got an answer (offline, blocked, CORS). */\n | { ok: false; status: number; errors: QboTokenError[] };\n\n/**\n * Exchanges card or bank-account details for a single-use token by talking to Intuit DIRECTLY from the browser. This is the seam of the card data: the default\n * implementation posts to Intuit and nothing else; a spec replaces it with a fake. It must never log, store or forward the request.\n */\nexport type QboTokenizerFn = (request: QboTokenizeRequest, context: QboTokenizeContext) => Promise<QboTokenizeResult>;\n\n/** How long the tokens call may take before it is aborted (a stalled connection). */\nexport const QBO_TOKENS_TIMEOUT_MS = 30_000;\n\nexport const QBO_TOKENS_PATH = '/quickbooks/v4/payments/tokens';\nexport const QBO_PRODUCTION_ORIGIN = 'https://api.intuit.com';\nexport const QBO_SANDBOX_ORIGIN = 'https://sandbox.api.intuit.com';\n\n/** The tokens endpoint of an environment. */\nexport const qboTokensUrl = (environment: QboEnvironment): string => `${environment === 'production' ? QBO_PRODUCTION_ORIGIN : QBO_SANDBOX_ORIGIN}${QBO_TOKENS_PATH}`;\n\nconst text = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined);\n\n/** The `errors` of an Intuit answer reduced to code / message / detail / moreInfo strings. */\nexport function readQboErrors(body: unknown): QboTokenError[] {\n const list = (body as { errors?: unknown } | null | undefined)?.errors;\n if (!Array.isArray(list)) return [];\n return list.filter(e => !!e && typeof e === 'object').map((e: Record<string, unknown>) => {\n const code = text(e['code']); const message = text(e['message']); const detail = text(e['detail']); const moreInfo = text(e['moreInfo']);\n return { ...(code ? { code } : {}), ...(message ? { message } : {}), ...(detail ? { detail } : {}), ...(moreInfo ? { moreInfo } : {}) };\n });\n}\n\n/**\n * The default tokenizer: one `fetch` POST to Intuit's tokens endpoint (production or sandbox host by `environment`) with `Content-Type: application/json` and a `Request-Id`\n * header. No cookies are sent (`credentials: 'omit'`), no referrer, nothing is cached, and the body is only the card / bank object. The tokens endpoint needs no\n * authorization: the single-use token it answers is only useful to the seller's connected QuickBooks Payments account.\n */\nexport const defaultQboTokenizer: QboTokenizerFn = async (request, context) => {\n const body = JSON.stringify(request.kind === 'card' ? { card: request.card } : { bankAccount: request.bankAccount });\n // A stalled connection must not leave the form locked for ever: after QBO_TOKENS_TIMEOUT_MS the request is aborted and counts as \"no answer\" (status 0).\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), QBO_TOKENS_TIMEOUT_MS);\n try {\n let response: Response;\n try {\n response = await fetch(qboTokensUrl(context.environment), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', Accept: 'application/json', 'Request-Id': context.requestId },\n body,\n mode: 'cors',\n credentials: 'omit',\n cache: 'no-store',\n referrerPolicy: 'no-referrer',\n signal: controller.signal,\n });\n } catch {\n return { ok: false, status: 0, errors: [] };\n }\n let answer: unknown = null;\n try { answer = await response.json(); } catch { answer = null; }\n if (controller.signal.aborted) return { ok: false, status: 0, errors: [] };\n const value = (answer as { value?: unknown } | null)?.value;\n if (response.ok && typeof value === 'string' && value) return { ok: true, token: value };\n return { ok: false, status: response.ok ? 502 : response.status, errors: readQboErrors(answer) };\n } finally {\n clearTimeout(timer);\n }\n};\n\n/** How the tokens are requested. Provide your own to fake Intuit in tests. Defaults to `defaultQboTokenizer`. */\nexport const QBO_TOKENIZER = new InjectionToken<QboTokenizerFn>('QBO_TOKENIZER', { providedIn: 'root', factory: () => defaultQboTokenizer });\n\n/** App-wide defaults for every QuickBooks Payments component, set once with `provideQboPayment`. A value on the component always wins. */\nexport interface QboPaymentDefaults {\n /** `'production'` or `'sandbox'` (default `'sandbox'`: a forgotten setting never talks to the real endpoint). */\n environment?: QboEnvironment;\n}\n\nexport const QBO_PAYMENT_DEFAULTS = new InjectionToken<QboPaymentDefaults>('QBO_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideQboPaymentOptions extends QboPaymentDefaults {\n /** Replaces how the tokens are requested (tests). */\n tokenizer?: QboTokenizerFn;\n}\n\n/**\n * Global defaults for the QuickBooks Payments components:\n *\n * providers: [provideQboPayment({ environment: 'production' })]\n */\nexport function provideQboPayment(options: ProvideQboPaymentOptions = {}): Provider[] {\n const { tokenizer, ...defaults } = options;\n const providers: Provider[] = [{ provide: QBO_PAYMENT_DEFAULTS, useValue: defaults }];\n if (tokenizer) providers.push({ provide: QBO_TOKENIZER, useValue: tokenizer });\n return providers;\n}\n\n/** A new `Request-Id` (a UUID, with a time + random fallback for a browser without `crypto.randomUUID`). */\nexport function newQboRequestId(): string {\n const c = typeof crypto !== 'undefined' ? crypto : undefined;\n return c && 'randomUUID' in c ? c.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;\n}\n","/**\n * Pure validation and formatting helpers of the QuickBooks Payments card / bank-account form. They never log, store or return more than a verdict: a function that\n * answers an \"issue\" answers a short code (`'required'`, `'length'`, `'luhn'`, ...), never the value, and the component turns the code into text.\n */\n\nexport type QboCardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'diners' | 'jcb';\nexport type QboBankAccountType = 'PERSONAL_CHECKING' | 'PERSONAL_SAVINGS' | 'BUSINESS_CHECKING' | 'BUSINESS_SAVINGS';\n\n/** The account types Intuit accepts for a bank-account token (`bankAccount.accountType`). */\nexport const QBO_BANK_ACCOUNT_TYPES: readonly QboBankAccountType[] = ['PERSONAL_CHECKING', 'PERSONAL_SAVINGS', 'BUSINESS_CHECKING', 'BUSINESS_SAVINGS'];\n\nexport const digitsOnly = (value: string | null | undefined): string => (value ?? '').replace(/\\D/g, '');\n\n/** The Luhn checksum of a card number (digits only; an empty string or a non-digit is invalid). */\nexport function luhnValid(value: string): boolean {\n if (!/^\\d+$/.test(value)) return false;\n let sum = 0;\n let double = false;\n for (let i = value.length - 1; i >= 0; i--) {\n let digit = value.charCodeAt(i) - 48;\n if (double) { digit *= 2; if (digit > 9) digit -= 9; }\n sum += digit;\n double = !double;\n }\n return sum % 10 === 0;\n}\n\n/** The brand a card number belongs to by its leading digits (the number may still be incomplete); `null` when unknown. */\nexport function detectCardBrand(value: string): QboCardBrand | null {\n const d = digitsOnly(value);\n if (!d) return null;\n if (/^3[47]/.test(d)) return 'amex';\n if (/^4/.test(d)) return 'visa';\n if (/^(5[1-5]|222[1-9]|22[3-9]\\d|2[3-6]\\d\\d|27[01]\\d|2720)/.test(d)) return 'mastercard';\n if (/^(6011|65|64[4-9]|622)/.test(d)) return 'discover';\n if (/^(30[0-5]|36|38|39)/.test(d)) return 'diners';\n if (/^35(2[89]|[3-8])/.test(d)) return 'jcb';\n return null;\n}\n\n/** The lengths a number of that brand may have (an unknown brand: 13 to 19). */\nexport function cardLengthsFor(brand: QboCardBrand | null): readonly number[] {\n switch (brand) {\n case 'visa': return [13, 16, 19];\n case 'mastercard': return [16];\n case 'amex': return [15];\n case 'discover': return [16, 17, 18, 19];\n case 'diners': return [14, 15, 16, 17, 18, 19];\n case 'jcb': return [16, 17, 18, 19];\n default: return [13, 14, 15, 16, 17, 18, 19];\n }\n}\n\n/** The number grouped for reading: 4-6-5 for American Express, groups of four otherwise. Digits only in, at most 19 digits (15 for Amex). */\nexport function formatCardNumber(value: string): string {\n const brand = detectCardBrand(value);\n const d = digitsOnly(value).slice(0, brand === 'amex' ? 15 : 19);\n if (brand === 'amex') return [d.slice(0, 4), d.slice(4, 10), d.slice(10)].filter(Boolean).join(' ');\n return (d.match(/.{1,4}/g) ?? []).join(' ');\n}\n\n/** `'required'` (empty), `'length'` (digits cannot be a number of that brand) or `'luhn'` (the checksum fails); `null` when the number is plausible. */\nexport function cardNumberIssue(value: string): 'required' | 'length' | 'luhn' | null {\n const d = digitsOnly(value);\n if (!d) return 'required';\n if (!cardLengthsFor(detectCardBrand(d)).includes(d.length)) return 'length';\n return luhnValid(d) ? null : 'luhn';\n}\n\n/** The security code lengths of a brand: 4 for American Express, 3 for the others (an unknown brand: 3 or 4). */\nexport function cvcLengthsFor(brand: QboCardBrand | null): readonly number[] {\n return brand === 'amex' ? [4] : brand ? [3] : [3, 4];\n}\n\nexport function cvcIssue(value: string, brand: QboCardBrand | null): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d+$/.test(raw) && cvcLengthsFor(brand).includes(raw.length) ? null : 'length';\n}\n\n/** Types the expiry as `MM/YY`: digits only, the slash after the month, a first digit 2-9 becomes `0X`. At most `MM/YYYY`. */\nexport function formatExpiry(value: string): string {\n let d = digitsOnly(value).slice(0, 6);\n if (d.length === 1 && d > '1') d = `0${d}`;\n return d.length >= 3 ? `${d.slice(0, 2)}/${d.slice(2)}` : d;\n}\n\n/** `MM/YY`, `MM/YYYY`, `M/YY`, `MMYY` or `MMYYYY` as a month and a four-digit year; `null` when it cannot be read. The month is not range-checked here. */\nexport function parseExpiry(value: string): { month: number; year: number } | null {\n const text = (value ?? '').trim();\n let month: string;\n let year: string;\n if (text.includes('/')) {\n const parts = text.split('/');\n if (parts.length !== 2) return null;\n [month, year] = parts.map(p => p.trim());\n } else {\n if (!/^\\d{4}$|^\\d{6}$/.test(text)) return null;\n month = text.slice(0, 2);\n year = text.slice(2);\n }\n if (!/^\\d{1,2}$/.test(month) || !/^(\\d{2}|\\d{4})$/.test(year)) return null;\n return { month: Number(month), year: year.length === 2 ? 2000 + Number(year) : Number(year) };\n}\n\n/** `'required'`, `'format'` (not `MM/YY`), `'month'` (not 1-12), `'past'` (the card expired: the month is valid through its last day); `null` when fine. */\nexport function expiryIssue(value: string, now: Date = new Date()): 'required' | 'format' | 'month' | 'past' | null {\n if (!(value ?? '').trim()) return 'required';\n const parsed = parseExpiry(value);\n if (!parsed) return 'format';\n if (parsed.month < 1 || parsed.month > 12) return 'month';\n const thisYear = now.getFullYear();\n const thisMonth = now.getMonth() + 1;\n return parsed.year < thisYear || (parsed.year === thisYear && parsed.month < thisMonth) ? 'past' : null;\n}\n\n/**\n * `'required'` (empty) or `'length'` (not exactly 9 digits); `null` when the format is right. There is deliberately NO checksum here: Intuit validates the real number, and a\n * client-side ABA checksum would reject the sandbox / test routing numbers (and a bank's brand-new number) before Intuit ever saw them. Same rule as `ui-bank-account-form`.\n */\nexport function routingIssue(value: string): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d{9}$/.test(raw) ? null : 'length';\n}\n\n/** US bank account numbers are 4 to 17 digits. */\nexport function accountNumberIssue(value: string): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d{4,17}$/.test(raw) ? null : 'length';\n}\n\n/** Where the card's postal code is from: a US ZIP or a Canadian postal code. */\nexport type QboPostalCountry = 'US' | 'CA';\n\n/** A Canadian postal code: `A1A 1A1` / `A1A1A1` (the letters D, F, I, O, Q, U never appear; W and Z not as the first letter). */\nconst CA_POSTAL = /^[ABCEGHJ-NPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ -]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i;\n\n/** A US ZIP (`12345` or `12345-6789` / `123456789`) or, for `country` `'CA'`, a Canadian postal code. Empty is fine unless `required`. */\nexport function postalCodeIssue(value: string, required = false, country: QboPostalCountry = 'US'): 'required' | 'format' | null {\n const raw = (value ?? '').trim();\n if (!raw) return required ? 'required' : null;\n return (country === 'CA' ? CA_POSTAL.test(raw) : /^\\d{5}(-?\\d{4})?$/.test(raw)) ? null : 'format';\n}\n\n/**\n * Replaces every run of 4 or more digits (a card, routing or account number, or a part of one, that an error text might echo) with a mask. A run may hold single spaces or\n * dashes between its digits (`4242 4242`, `011-000-015`); a short number such as an HTTP status (`400`, `401`) or a field index is kept.\n */\nexport function scrubDigits(text: string): string {\n return (text ?? '').replace(/\\d(?:[ -]?\\d)+/g, run => (run.replace(/\\D/g, '').length >= 4 ? '•••' : run));\n}\n","import { UiLabelKey, uiText } from '@forgeroute/ui/core';\nimport { scrubDigits } from '../qbo-validation/qbo-validation';\nimport type { QboTokenError } from '../qbo-tokenizer/qbo-tokenizer';\n\n/**\n * The request field an Intuit validation error is about, read from the error's `detail` / `message` (Intuit names the JSON path, e.g. `card.expMonth`).\n * Order matters: the longer names come first.\n */\nexport const QBO_FIELD_ERROR_KEYS: ReadonlyArray<readonly [needle: string, key: UiLabelKey]> = [\n ['card.number', 'qboErrors.field.cardNumber'],\n ['card.expmonth', 'qboErrors.field.expiry'],\n ['card.expyear', 'qboErrors.field.expiry'],\n ['card.cvc', 'qboErrors.field.cvc'],\n ['postalcode', 'qboErrors.field.postalCode'],\n ['bankaccount.routingnumber', 'qboErrors.field.routing'],\n ['bankaccount.accountnumber', 'qboErrors.field.account'],\n ['bankaccount.accounttype', 'qboErrors.field.accountType'],\n ['bankaccount.name', 'qboErrors.field.holder'],\n];\n\n/** `'friendly'` (default): the field table, then the HTTP status. `'intuit'`: Intuit's own `message` (digits masked), the fallback when there is none. */\nexport type QboErrorDisplay = 'friendly' | 'intuit';\n\nexport interface QboErrorMessageOptions {\n display?: QboErrorDisplay;\n /** Text for single Intuit error codes (`PMT-4000`); wins over the tables. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown in `'intuit'` display when Intuit sent no text (the friendly mode always has a status text). */\n fallback?: string;\n}\n\n/** The text key of an HTTP status of the tokens endpoint. */\nexport function qboStatusKey(status: number): UiLabelKey {\n if (status === 0) return 'qboErrors.status.network';\n if (status === 400 || status === 422) return 'qboErrors.status.invalid';\n if (status === 401 || status === 403) return 'qboErrors.status.notAllowed';\n if (status === 429) return 'qboErrors.status.rateLimited';\n return 'qboErrors.status.unavailable';\n}\n\n/**\n * The text to show the customer for a failed token request. Friendly mode: an override by Intuit code, then the card / bank field the error names, then the status\n * (network, invalid details, not allowed, too many requests, service unavailable). It never echoes a number the customer typed.\n */\nexport function getQboErrorMessage(status: number, errors: readonly QboTokenError[] = [], options: QboErrorMessageOptions = {}): string {\n const first = errors[0];\n if (options.display === 'intuit') return first?.message ? scrubDigits(first.message) : options.fallback ?? uiText('qboErrors.defaultMessage');\n for (const e of errors) {\n if (e.code && options.overrides?.[e.code]) return options.overrides[e.code];\n }\n const haystack = `${first?.detail ?? ''} ${first?.message ?? ''}`.toLowerCase();\n for (const [needle, key] of QBO_FIELD_ERROR_KEYS) {\n if (haystack.includes(needle)) return uiText(key);\n }\n return uiText(qboStatusKey(status));\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, Injector, computed, effect, inject, input, model, output, signal, untracked, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { ButtonComponent, UiLabelsService, uiText } from '@forgeroute/ui/core';\nimport { CheckboxComponent } from '@forgeroute/ui/checkbox';\nimport { FormRowComponent } from '@forgeroute/ui/form-row';\nimport { FormSectionComponent } from '@forgeroute/ui/form-section';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_HOST_SILENCE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentAttemptStatusComponent, createPaymentProtection, type CheckPaymentStatusFn, type PaymentAttempt, type PaymentAttemptOutcome, type PaymentReadiness, type PaymentReadinessResult, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport { PillTabsComponent, type PillTab } from '@forgeroute/ui/pill-tabs';\nimport { SelectComponent, type SelectOption } from '@forgeroute/ui/select';\nimport { TextComponent } from '@forgeroute/ui/text';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { QBO_PAYMENT_DEFAULTS, QBO_TOKENIZER, newQboRequestId, type QboBankTokenRequest, type QboCardTokenRequest, type QboEnvironment, type QboTokenizeRequest, type QboTokenizeResult } from '../qbo-tokenizer/qbo-tokenizer';\nimport {\n QBO_BANK_ACCOUNT_TYPES, accountNumberIssue, cardNumberIssue, cvcIssue, cvcLengthsFor, detectCardBrand, digitsOnly, expiryIssue, formatCardNumber, formatExpiry, parseExpiry, postalCodeIssue, routingIssue, scrubDigits,\n type QboBankAccountType, type QboPostalCountry,\n} from '../qbo-validation/qbo-validation';\nimport { getQboErrorMessage, type QboErrorDisplay, type QboErrorMessageOptions } from '../errors/qbo-errors';\nimport type { QboFailure, QboIntentKind, QboMethod, QboTokenDetails, QboTokenizedEvent } from './qbo-outcomes';\n\n/** The texts of the screen-reader status region. */\nexport interface QboA11yMessages {\n processing: string;\n tokenized: string;\n}\n\n/** The screen-reader messages of the payment form; read on every access, so they follow the app's active language. */\nexport const QBO_A11Y_MESSAGES: Readonly<QboA11yMessages> = {\n get processing() { return uiText('qboPayment.a11y.processing'); },\n get tokenized() { return uiText('qboPayment.a11y.tokenized'); },\n};\n\nlet nextId = 0;\nconst digitsMax = (max: number) => (raw: string): string => digitsOnly(raw).slice(0, max);\nconst zipFormatter = (raw: string): string => raw.replace(/[^\\d-]/g, '').slice(0, 10);\nconst caPostalFormatter = (raw: string): string => raw.toUpperCase().replace(/[^A-Z0-9 -]/g, '').slice(0, 7);\n\n/** What the form needs to know to be tokenized without ever keeping the values: read, sent, forgotten. */\ninterface Dispatched {\n promise: Promise<QboTokenizeResult>;\n details: QboTokenDetails;\n requestId: string;\n}\n\n/**\n * QuickBooks Payments card / bank-account form that tokenizes IN THE BROWSER: the numbers go from this form straight to Intuit's tokens endpoint and never to your\n * backend (or to the payments service). The component collects the fields with the library inputs, validates them (Luhn, expiry, security code length by brand,\n * routing format (9 digits; no ABA checksum), account length, ZIP / Canadian postal code) with inline messages, posts them through the `QBO_TOKENIZER` seam, CLEARS every field (and re-creates the inputs) the moment the\n * request is on its way, and emits `(tokenized)` with the single-use token and the brand / last four, or `(failed)`.\n *\n * <ui-qbo-payment environment=\"production\" [methods]=\"['card', 'ach']\" (tokenized)=\"onToken($event)\" (failed)=\"onFailed($event)\" />\n *\n * Typing a card number into a page of your own still puts that page in PCI DSS SAQ A-EP scope (see docs/quickbooks-payments.md: CSP, no logging, no analytics on the\n * page, autocomplete attributes, never store the values).\n */\n@Component({\n selector: 'ui-qbo-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, CheckboxComponent, FormRowComponent, FormSectionComponent, FormsModule, HintComponent, LiveRegionComponent, PaymentAttemptStatusComponent, PillTabsComponent, SelectComponent, TextComponent, TextInputComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && submitting() ? \"true\" : null' },\n template: `\n <div class=\"qbp\">\n @if (!mountOnly() && showStatus()) {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"allowStartOver()\" [showPaid]=\"showPaid()\" />\n }\n @if (!mountOnly() || a11yMessages()) {\n <ui-live-region data-testid=\"qbo-status\" [message]=\"statusText()\" />\n }\n @if (!mountOnly() && required()) {\n <div class=\"qbp-label\" data-testid=\"qbo-required-label\">{{ label() }}<span class=\"qbp-required\" aria-hidden=\"true\">*</span></div>\n }\n @if (tabs().length > 1) {\n <div class=\"qbp-block\"><ui-pill-tabs [ariaLabel]=\"labels.t('qboPayment.method.group')\" [tabs]=\"tabs()\" [activeKey]=\"method()\" (tabChange)=\"onTab($event)\" /></div>\n }\n @for (key of formKeys(); track key) {\n <div class=\"qbp-form\" role=\"group\" [attr.aria-label]=\"label()\" [attr.data-testid]=\"method() === 'card' ? 'qbo-card-form' : 'qbo-bank-form'\">\n @if (method() === 'card') {\n <ui-form-section>\n <ui-text-input [label]=\"labels.t('qboPayment.card.number')\" [inputTestId]=\"'qbo-card-number'\" placeholder=\"1234 5678 9012 3456\" inputmode=\"numeric\" autocomplete=\"cc-number\"\n [required]=\"true\" [maxlength]=\"23\" [formatter]=\"formatNumber\" [error]=\"numberError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\" [hint]=\"brandHint()\"\n [ngModel]=\"number()\" (ngModelChange)=\"number.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t(requireName() ? 'qboPayment.card.name' : 'qboPayment.card.nameOptional')\" [inputTestId]=\"'qbo-card-name'\" autocomplete=\"cc-name\" [required]=\"requireName()\"\n [maxlength]=\"255\" [showErrors]=\"attempted()\" [disabled]=\"locked()\" [ngModel]=\"cardName()\" (ngModelChange)=\"cardName.set($event ?? ''); edited()\" />\n <ui-form-row>\n <ui-text-input [label]=\"labels.t('qboPayment.card.expiry')\" [inputTestId]=\"'qbo-card-expiry'\" [placeholder]=\"labels.t('qboPayment.card.expiryPlaceholder')\" inputmode=\"numeric\" autocomplete=\"cc-exp\"\n [required]=\"true\" [maxlength]=\"7\" [formatter]=\"formatExpiryText\" [error]=\"expiryError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"expiry()\" (ngModelChange)=\"expiry.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t('qboPayment.card.cvc')\" [inputTestId]=\"'qbo-card-cvc'\" placeholder=\"123\" inputmode=\"numeric\" autocomplete=\"cc-csc\"\n [required]=\"true\" [maxlength]=\"4\" [formatter]=\"cvcFormatter\" [error]=\"cvcError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"cvc()\" (ngModelChange)=\"cvc.set($event ?? ''); edited()\" />\n </ui-form-row>\n <ui-text-input [label]=\"labels.t(requirePostalCode() ? 'qboPayment.card.postal' : 'qboPayment.card.postalOptional')\" [inputTestId]=\"'qbo-card-postal'\" [placeholder]=\"postalPlaceholder()\" [inputmode]=\"postalInputMode()\"\n autocomplete=\"postal-code\" [required]=\"requirePostalCode()\" [maxlength]=\"postalMaxLength()\" [formatter]=\"postalFormatter()\" [error]=\"postalError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"postal()\" (ngModelChange)=\"postal.set($event ?? ''); edited()\" />\n </ui-form-section>\n } @else {\n <ui-form-section>\n <ui-text data-testid=\"qbo-bank-info\" size=\"sm\" tone=\"muted\" [text]=\"labels.t('qboPayment.bank.info')\" />\n <ui-text-input [label]=\"labels.t('qboPayment.bank.holder')\" [inputTestId]=\"'qbo-bank-holder'\" autocomplete=\"name\" [required]=\"true\" [maxlength]=\"255\"\n [showErrors]=\"attempted()\" [disabled]=\"locked()\" [ngModel]=\"holder()\" (ngModelChange)=\"holder.set($event ?? ''); edited()\" />\n <ui-form-row>\n <ui-text-input [label]=\"labels.t('qboPayment.bank.routing')\" [inputTestId]=\"'qbo-bank-routing'\" [placeholder]=\"labels.t('qboPayment.bank.routingPlaceholder')\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"9\" [formatter]=\"routingFormatter\" [error]=\"routingError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"routing()\" (ngModelChange)=\"routing.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t('qboPayment.bank.account')\" [inputTestId]=\"'qbo-bank-account'\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"17\" [formatter]=\"accountFormatter\" [error]=\"accountError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"account()\" (ngModelChange)=\"account.set($event ?? ''); edited()\" />\n </ui-form-row>\n @if (confirmAccountNumber()) {\n <ui-text-input [label]=\"labels.t('qboPayment.bank.confirm')\" [inputTestId]=\"'qbo-bank-confirm'\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"17\" [formatter]=\"accountFormatter\" [error]=\"confirmError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"confirm()\" (ngModelChange)=\"confirm.set($event ?? ''); edited()\" />\n }\n <ui-select [label]=\"labels.t('qboPayment.bank.type')\" data-testid=\"qbo-bank-type\" [options]=\"accountTypeOptions()\" [required]=\"true\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"accountType()\" (ngModelChange)=\"accountType.set($event); edited()\" />\n @if (requireAchConsent()) {\n <ui-checkbox testId=\"qbo-consent\" [label]=\"achConsent()\" [required]=\"true\" [requiredMessage]=\"labels.t('qboPayment.consentRequired')\" [showErrors]=\"attempted()\"\n [disabled]=\"locked()\" [ngModel]=\"consent()\" (ngModelChange)=\"consent.set(!!$event); edited()\" />\n }\n </ui-form-section>\n }\n </div>\n }\n @if (!mountOnly()) {\n <ui-hint class=\"qbp-secure\" data-testid=\"qbo-secure-note\">{{ labels.t('qboPayment.secureNote') }}</ui-hint>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"qbp-block\" [id]=\"errorId\" data-testid=\"qbo-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"qbp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [fullWidth]=\"true\" [loading]=\"submitting()\" [disabled]=\"disabled() || pending() || attempt.locked() || !readiness.ready()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"qbo-submit\" (click)=\"tokenize()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-qbo-payment { display: block; min-width: 0; }\n ui-qbo-payment .qbp { position: relative; }\n ui-qbo-payment .qbp-block { margin-top: 12px; }\n ui-qbo-payment .qbp-label { font-size: 0.875rem; font-weight: 500; color: var(--ui-text, #1e293b); margin-bottom: 6px; }\n ui-qbo-payment .qbp-required { color: var(--ui-danger, #dc2626); margin-left: 2px; }\n ui-qbo-payment .qbp-form { margin-top: 12px; }\n ui-qbo-payment .qbp-secure { margin-top: 12px; }\n /* The submit button fills the row on every screen: a flex column stretches the (inline-flex) ui-button host, and [fullWidth] stretches its button. */\n ui-qbo-payment .qbp-actions { margin-top: 16px; display: flex; flex-direction: column; align-items: stretch; }\n `],\n})\nexport class QboPaymentComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly tokenizer = inject(QBO_TOKENIZER);\n private readonly defaults = inject(QBO_PAYMENT_DEFAULTS);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the fields (and the method switcher when `methods` has two) only. No submit button, secure note, required heading, status text (unless `a11yMessages` is set) or\n * error alert: failures go to `(failed)` only. The host keeps its own button and calls `tokenize()`; the typed values are still read, sent and cleared by it.\n */\n readonly mountOnly = input(false);\n /** `'payment'` takes a payment, `'setup'` keeps the method on file (changes the default button text). */\n readonly mode = input<QboIntentKind>('payment');\n /** The method shown: `'card'` or `'ach'` (a bank account). Two-way. */\n readonly method = model<QboMethod>('card');\n /** The methods the customer may pick between (a switcher is shown for two or more); `null` = only the `method` above. */\n readonly methods = input<readonly QboMethod[] | null>(null);\n /** `'production'` or `'sandbox'` (default: the provider's, else `'sandbox'`). Decides which Intuit host the tokens are requested from. */\n readonly environment = input<QboEnvironment | null>(null);\n /** Pre-fills the name on the card and the account holder; the customer can edit it. */\n readonly cardholderName = input('');\n /** The name on the card is required (default: optional, Intuit does not need it). */\n readonly requireName = input(false);\n /** The postal code is required (default: optional). */\n readonly requirePostalCode = input(false);\n /** Where the card's postal code is from: `'US'` (a ZIP: `12345` or `12345-6789`, the default) or `'CA'` (a Canadian code: `A1A 1A1`). Sent to Intuit as `address.country` only for `'CA'`. */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** Ask for the account number twice (default true). */\n readonly confirmAccountNumber = input(true);\n /** ACH: the authorization checkbox must be ticked (default true: a bank debit needs the account holder's authorization). */\n readonly requireAchConsent = input(true);\n readonly achConsentTextInput = input<string | null>(null, { alias: 'achConsentText' });\n readonly achConsent = computed(() => this.achConsentTextInput() ?? this.labels.t(this.mode() === 'setup' ? 'qboPayment.achConsentSetup' : 'qboPayment.achConsent'));\n\n /** Show the built-in attempt / readiness status block (a payment plugin that embeds this form shows its own and turns this off). */\n readonly showStatus = input(true);\n /** Show the paid state of the attempt status (default true). A form whose host shows its own success notice sets it off while that notice is up. */\n readonly showPaid = input(true);\n\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies for the charge; empty = the component generates one per payment attempt session (see `attemptKeyChange`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (`'succeeded' | 'failed' | 'checking' | 'in_flight' | 'awaiting_verification'` (`'unknown'` = the old name of `'checking'`, still accepted)). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): the form shows the paid state and ignores every submit for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call (its own timeout): the form goes to \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and \"Check again\" engage. */\n readonly hostSilenceMs = input(PAYMENT_HOST_SILENCE_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `tokenize()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still preparing the form: the fields and the button are off. */\n readonly pending = input(false);\n /** Accessible name of the payment form. */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('qboPayment.label'));\n /** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */\n readonly required = input(false);\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). See `getQboErrorMessage`. */\n readonly errorDisplay = input<QboErrorDisplay>('friendly');\n /** Replacement texts by code: Intuit error codes AND the library's own codes (`validation`, `network`, ...). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly errorFallback = input('');\n /** Texts of the screen-reader status region (translate them); missing keys keep the defaults. */\n readonly a11yMessages = input<Partial<QboA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /** The details were tokenized: send `token` to your backend. The typed values are already gone from the form. */\n readonly tokenized = output<QboTokenizedEvent>();\n /** A step failed (validation, or Intuit refused the details). `message` is ready to show. */\n readonly failed = output<QboFailure>();\n /**\n * The payer edited a field (typing, picking the account type, ticking the authorization). The built-in error alert clears itself at the same moment; a host that shows its own decline banner from `(failed)` or from its\n * charge result clears it here, so a stale \"card declined\" never stays next to details the payer is already correcting. Never emitted for changes the form makes itself (clearing after a token, a method switch).\n */\n readonly detailsChange = output<void>();\n /** A step of an attempt started / ended (the synchronous lock). */\n readonly inFlightChange = output<boolean>();\n /** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending`. */\n readonly outcome = output<PaymentAttemptOutcome>();\n /** The attempt key in effect (also on `tokenized`): send it to your backend with the charge. */\n readonly attemptKeyChange = output<string>();\n /** The readiness gate changed: `{ ready, reasons }`. */\n readonly readinessChange = output<PaymentReadinessResult>();\n\n // ── State (the typed values live only in these signals until tokenize() reads and clears them) ──\n readonly submitting = signal(false);\n readonly errorText = signal('');\n private readonly announcement = signal('');\n protected readonly attempted = signal(false);\n private readonly formKey = signal(0);\n protected readonly formKeys = computed(() => [this.formKey()]);\n\n protected readonly number = signal('');\n protected readonly cardName = signal('');\n protected readonly expiry = signal('');\n protected readonly cvc = signal('');\n protected readonly postal = signal('');\n protected readonly holder = signal('');\n protected readonly routing = signal('');\n protected readonly account = signal('');\n protected readonly confirm = signal('');\n protected readonly accountType = signal<QboBankAccountType>('PERSONAL_CHECKING');\n protected readonly consent = signal(false);\n\n protected readonly errorId = `ui-qbo-error-${nextId++}`;\n protected readonly formatNumber = formatCardNumber;\n protected readonly formatExpiryText = formatExpiry;\n protected readonly cvcFormatter = digitsMax(4);\n protected readonly postalFormatter = computed(() => (this.postalCountry() === 'CA' ? caPostalFormatter : zipFormatter));\n protected readonly postalPlaceholder = computed(() => (this.postalCountry() === 'CA' ? 'A1A 1A1' : '94086'));\n protected readonly postalInputMode = computed(() => (this.postalCountry() === 'CA' ? 'text' as const : 'numeric' as const));\n protected readonly postalMaxLength = computed(() => (this.postalCountry() === 'CA' ? 7 : 10));\n protected readonly routingFormatter = digitsMax(9);\n protected readonly accountFormatter = digitsMax(17);\n\n protected readonly tabs = computed((): PillTab[] => {\n const methods = this.methods();\n if (!methods || methods.length < 2) return [];\n return methods.map(m => ({ key: m, label: this.labels.t(m === 'card' ? 'qboPayment.method.card' : 'qboPayment.method.ach') }));\n });\n protected readonly accountTypeOptions = computed((): SelectOption<string>[] => QBO_BANK_ACCOUNT_TYPES.map(value => ({ value, label: this.labels.t(`qboPayment.bank.type.${value}` as const) })));\n protected readonly locked = computed(() => this.disabled() || this.pending() || this.submitting() || this.attempt.locked());\n protected readonly brand = computed(() => detectCardBrand(this.number()));\n protected readonly brandHint = computed(() => { const brand = this.brand(); return brand ? this.labels.t(`qboPayment.brand.${brand}` as const) : ''; });\n protected readonly effectiveSubmitLabel = computed(() => {\n const given = this.submitLabel();\n if (given) return given;\n const setup = this.mode() === 'setup';\n return this.labels.t(this.method() === 'ach' ? (setup ? 'qboPayment.submit.saveBank' : 'qboPayment.submit.payBank') : (setup ? 'qboPayment.submit.saveCard' : 'qboPayment.submit.pay'));\n });\n private readonly messages = computed((): QboA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<QboA11yMessages>;\n return { ...QBO_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => (this.submitting() ? this.messages().processing : this.announcement()));\n private destroyed = false;\n /** The method whose fields are on screen; a change clears the typed values (a card number must not linger in the bank form's state, nor the other way round). */\n private shownMethod: QboMethod | null = null;\n /** The country whose postal rule the typed code was written for; a change empties the code (a ZIP is not a Canadian postal code and the other way round). */\n private shownCountry: QboPostalCountry | null = null;\n\n // ── Inline messages: shown for a non-empty value that is wrong (an empty required field is the input's own \"required\" message) ──\n protected readonly numberError = computed(() => this.numberMessage(false));\n protected readonly expiryError = computed(() => this.expiryMessage(false));\n protected readonly cvcError = computed(() => this.cvcMessage(false));\n protected readonly postalError = computed(() => this.postalMessage(false));\n protected readonly routingError = computed(() => this.routingMessage(false));\n protected readonly accountError = computed(() => this.accountMessage(false));\n protected readonly confirmError = computed(() => this.confirmMessage(false));\n\n /** Called by every field's edit handler: clears the form's own error alert and tells the host. */\n protected edited(): void {\n if (this.errorText()) this.errorText.set('');\n this.detailsChange.emit();\n }\n\n /** The duplicate-payment protection of this form: the synchronous lock, the attempt key, the unknown state. */\n readonly attempt: PaymentAttempt;\n /** The readiness gate: `readiness.ready()` / `readiness.reasons()`. */\n readonly readiness: PaymentReadiness;\n\n constructor() {\n const protection = createPaymentProtection(this, {\n amount: () => null, // the amount is not known to this form (the host charges): the attempt key is derived from payable + method\n method: () => this.method(),\n offlineMidFlight: false, // this form only TOKENIZES: the Intuit call answers or fails by itself, no charge is in flight here\n onOutcome: o => this.outcome.emit(o),\n onInFlightChange: v => this.inFlightChange.emit(v),\n onKeyChange: k => this.attemptKeyChange.emit(k),\n onReadinessChange: r => this.readinessChange.emit(r),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n // Pre-fill from the input (and again when it changes).\n effect(() => { const name = this.cardholderName(); untracked(() => { this.cardName.set(name); this.holder.set(name); }); });\n // Whoever changes the method (the switcher, the host, a payment plugin flipping Card <-> ACH) leaves nothing typed behind.\n effect(() => {\n const method = this.method();\n untracked(() => {\n if (this.shownMethod !== null && this.shownMethod !== method) { this.clearFields(); this.errorText.set(''); }\n this.shownMethod = method;\n });\n });\n effect(() => {\n const country = this.postalCountry();\n untracked(() => {\n if (this.shownCountry !== null && this.shownCountry !== country) this.postal.set('');\n this.shownCountry = country;\n });\n });\n // Destroyed (a closed panel, a navigation): the typed values are wiped, then nothing is emitted or written any more (a late answer from Intuit is dropped).\n inject(DestroyRef).onDestroy(() => { this.clearFields(); this.destroyed = true; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Validates and tokenizes the entered card / bank account (the same as the built-in button). Resolves the event (also emitted as `tokenized`), or `null` after a failure\n * (emitted as `failed`) or when nothing was started (already running, disabled). Never rejects. The typed values are cleared from the form as soon as the request is sent,\n * whatever the answer: after a failure the customer types them again.\n */\n async tokenize(): Promise<QboTokenizedEvent | null> {\n if (this.submitting() || this.disabled() || this.pending()) return null;\n if (this.refusedByProtection()) return null;\n this.attempted.set(true);\n const method = this.method();\n const issue = this.firstIssue(method);\n if (issue) { this.fail({ code: 'validation', message: issue.message, stage: 'validate', field: issue.field }); this.focusField(issue.field); return null; }\n const kind = this.mode();\n const environment = this.environment() ?? this.defaults.environment ?? 'sandbox';\n const begun = this.attempt.begin(); // SYNCHRONOUS lock: the same tick as the click, before any await\n if (!begun.ok) return null;\n const attemptKey = begun.key;\n const payableRef = this.attempt.pinnedRef();\n let handedToHost = false;\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n // Read, send and forget: the request object exists only inside dispatch(); the form is empty before the answer arrives.\n const sent = this.dispatch(method, environment);\n this.clearFields();\n try {\n const result = await sent.promise.catch((): QboTokenizeResult => ({ ok: false, status: 0, errors: [] }));\n if (this.destroyed) return null;\n if (!result.ok) {\n const errors = result.errors.map(e => ({ ...e, ...(e.message ? { message: scrubDigits(e.message) } : {}), ...(e.detail ? { detail: scrubDigits(e.detail) } : {}), ...(e.moreInfo ? { moreInfo: scrubDigits(e.moreInfo) } : {}) }));\n const options: QboErrorMessageOptions = { display: this.errorDisplay(), overrides: this.errorMessages(), ...(this.errorFallback() ? { fallback: this.errorFallback() } : {}) };\n this.fail({ code: errors[0]?.code ?? (result.status === 0 ? 'network' : 'tokenize_failed'), message: getQboErrorMessage(result.status, errors, options), stage: 'tokenize', status: result.status, ...(errors.length ? { errors } : {}) });\n return null;\n }\n const event: QboTokenizedEvent = { token: result.token, method, kind, details: sent.details, requestId: sent.requestId, attemptKey, payableRef };\n this.announcement.set(this.messages().tokenized);\n // A PAYMENT keeps its lock after the token: the host charges now, and until it reports markSucceeded / markFailed / markUnknown / markNotCharged (or the status check decides) a second\n // tokenization or charge is refused. A saved account (mode 'setup') charges nothing, so it unlocks.\n if (kind === 'payment') { handedToHost = true; this.attempt.markPending('token'); }\n this.tokenized.emit(event);\n return event;\n } finally {\n if (!this.destroyed) this.submitting.set(false);\n if (!handedToHost) this.attempt.release(); // the attempt ended before any charge request (validation, tokenization): unlock, the key is kept\n }\n }\n\n /** The host reports that ITS charge call timed out or is ambiguous: the form shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.attempt.markUnknown('host'); }\n\n /** The host reports that the charge succeeded: the form locks for this payable (a success does NOT move the epoch: the same key replays the original payment; the paid lock lasts 24 hours, see `resetPaid()`). */\n markSucceeded(): void { this.attempt.succeed('host'); }\n\n /** The host reports a DEFINITIVE failure of the charge (declined): the form unlocks with a NEW attempt key. */\n markFailed(): void { this.attempt.fail('host'); }\n\n /** The host did not use the token and nothing reached the processor (its call never left, the offline layer refused it): the form unlocks and the attempt key is KEPT. */\n markNotCharged(): void { this.attempt.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.attempt.resetPaid(); }\n\n /** The gate before ANYTHING starts: a paid or unknown payable, offline, or a failed readiness check refuses (nothing is sent, the reason is reported). */\n private refusedByProtection(): boolean {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n this.outcome.emit({ kind: 'refused', attemptKey: this.attempt.key(), reason });\n this.fail({ code: reason, message: this.labels.t(this.readiness.labelKeyFor(reason)), stage: 'validate' });\n return true;\n }\n if (this.attempt.inFlight()) return true; // the host is charging the token of the earlier click: nothing may start (silent, like a double click)\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** After a refused submit the focus goes to the field the message is about (WCAG 2.2: the error is reachable without hunting for it); the inline message is already shown there. */\n private focusField(field: string): void {\n const selector: Record<string, string> = {\n number: 'input[data-testid=\"qbo-card-number\"]', name: 'input[data-testid=\"qbo-card-name\"]', expiry: 'input[data-testid=\"qbo-card-expiry\"]', cvc: 'input[data-testid=\"qbo-card-cvc\"]',\n postalCode: 'input[data-testid=\"qbo-card-postal\"]', holder: 'input[data-testid=\"qbo-bank-holder\"]', routing: 'input[data-testid=\"qbo-bank-routing\"]', account: 'input[data-testid=\"qbo-bank-account\"]',\n confirmAccount: 'input[data-testid=\"qbo-bank-confirm\"]', accountType: '[data-testid=\"qbo-bank-type\"] select', consent: 'input[data-testid=\"qbo-consent\"]',\n };\n const query = selector[field];\n if (!query || this.destroyed) return;\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>(query)?.focus(), { injector: this.injector });\n }\n\n /** Clears every typed value and re-creates the inputs (also what tokenize() does after sending). */\n reset(): void {\n this.clearFields();\n this.errorText.set('');\n this.announcement.set('');\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n /** Builds the Intuit request from the fields and starts it. Everything sensitive stays in this function's scope; only the non-sensitive details leave it. */\n private dispatch(method: QboMethod, environment: QboEnvironment): Dispatched {\n const requestId = newQboRequestId();\n let request: QboTokenizeRequest;\n let details: QboTokenDetails;\n if (method === 'card') {\n const digits = digitsOnly(this.number());\n const expiry = parseExpiry(this.expiry()) as { month: number; year: number };\n const name = this.cardName().trim();\n const postal = this.postal().trim();\n const card: QboCardTokenRequest = {\n number: digits, expMonth: String(expiry.month).padStart(2, '0'), expYear: String(expiry.year), cvc: this.cvc().trim(),\n ...(name ? { name } : {}), ...(postal ? { address: { postalCode: postal, ...(this.postalCountry() === 'CA' ? { country: 'CA' } : {}) } } : {}),\n };\n request = { kind: 'card', card };\n details = { brand: detectCardBrand(digits), last4: digits.slice(-4), expMonth: expiry.month, expYear: expiry.year, accountType: null };\n } else {\n const account = this.account().trim();\n const bankAccount: QboBankTokenRequest = { name: this.holder().trim(), routingNumber: this.routing().trim(), accountNumber: account, accountType: this.accountType() };\n request = { kind: 'bank', bankAccount };\n details = { brand: null, last4: account.slice(-4), expMonth: null, expYear: null, accountType: this.accountType() };\n }\n let promise: Promise<QboTokenizeResult>;\n try { promise = this.tokenizer(request, { environment, requestId }); } catch { promise = Promise.resolve({ ok: false, status: 0, errors: [] }); }\n return { promise, details, requestId };\n }\n\n private clearFields(): void {\n this.number.set(''); this.cvc.set(''); this.expiry.set(''); this.postal.set('');\n this.cardName.set(this.cardholderName()); this.holder.set(this.cardholderName());\n this.routing.set(''); this.account.set(''); this.confirm.set('');\n this.accountType.set('PERSONAL_CHECKING');\n this.consent.set(false);\n this.attempted.set(false);\n this.formKey.update(n => n + 1); // new input elements: no value, no touched state, nothing left in the DOM\n }\n\n private fail(f: QboFailure): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override };\n if (this.destroyed) return;\n this.announcement.set('');\n if (this.showErrors()) this.errorText.set(f.message);\n this.failed.emit(f);\n }\n\n private requiredText(key: Parameters<UiLabelsService['t']>[0]): string { return this.labels.t('qboPayment.err.required', { field: this.labels.t(key) }); }\n\n private numberMessage(forSubmit: boolean): string {\n const issue = cardNumberIssue(this.number());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.number') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.numberLength') : issue === 'luhn' ? this.labels.t('qboPayment.err.numberLuhn') : '';\n }\n private expiryMessage(forSubmit: boolean): string {\n const issue = expiryIssue(this.expiry());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.expiry') : '';\n return issue === 'format' ? this.labels.t('qboPayment.err.expiryFormat') : issue === 'month' ? this.labels.t('qboPayment.err.expiryMonth') : issue === 'past' ? this.labels.t('qboPayment.err.expiryPast') : '';\n }\n private cvcMessage(forSubmit: boolean): string {\n const brand = this.brand();\n const issue = cvcIssue(this.cvc(), brand);\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.cvc') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.cvcLength', { length: cvcLengthsFor(brand).join(` ${this.labels.t('qboPayment.err.or')} `) }) : '';\n }\n private postalMessage(forSubmit: boolean): string {\n const country = this.postalCountry();\n const issue = postalCodeIssue(this.postal(), forSubmit && this.requirePostalCode(), country);\n return issue === 'required' ? this.requiredText('qboPayment.card.postal') : issue === 'format' ? this.labels.t(country === 'CA' ? 'qboPayment.err.postalFormatCa' : 'qboPayment.err.postalFormat') : '';\n }\n private routingMessage(forSubmit: boolean): string {\n const issue = routingIssue(this.routing());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.bank.routing') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.routingLength') : '';\n }\n private accountMessage(forSubmit: boolean): string {\n const issue = accountNumberIssue(this.account());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.bank.account') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.accountLength') : '';\n }\n private confirmMessage(forSubmit: boolean): string {\n if (!this.confirmAccountNumber()) return '';\n const value = this.confirm().trim();\n if (!value) return forSubmit ? this.requiredText('qboPayment.bank.confirm') : '';\n return value !== this.account().trim() ? this.labels.t('qboPayment.err.confirmMismatch') : '';\n }\n\n /** The first thing that stops the form from being tokenized, in the order of the fields. */\n private firstIssue(method: QboMethod): { field: string; message: string } | null {\n const checks: Array<[string, string]> = method === 'card'\n ? [\n ['number', this.numberMessage(true)],\n ['name', this.requireName() && !this.cardName().trim() ? this.requiredText('qboPayment.card.name') : ''],\n ['expiry', this.expiryMessage(true)],\n ['cvc', this.cvcMessage(true)],\n ['postalCode', this.postalMessage(true)],\n ]\n : [\n ['holder', this.holder().trim() ? '' : this.requiredText('qboPayment.bank.holder')],\n ['routing', this.routingMessage(true)],\n ['account', this.accountMessage(true)],\n ['confirmAccount', this.confirmMessage(true)],\n ['accountType', QBO_BANK_ACCOUNT_TYPES.includes(this.accountType()) ? '' : this.requiredText('qboPayment.bank.type')],\n ['consent', this.requireAchConsent() && !this.consent() ? this.labels.t('qboPayment.consentRequired') : ''],\n ];\n const hit = checks.find(([, message]) => !!message);\n return hit ? { field: hit[0], message: hit[1] } : null;\n }\n\n protected onTab(key: string): void {\n if (this.submitting() || this.disabled() || this.pending() || this.attempt.locked() || (key !== 'card' && key !== 'ach')) return;\n this.clearFields(); // nothing typed for the method that is leaving stays in memory\n this.method.set(key);\n this.errorText.set('');\n this.attempted.set(false);\n }\n}\n","import type { DestroyRef, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\n\n/** The state of the seller's QuickBooks Payments connection (the shape of contractor's `GET /integrations/qbo-payments/status`, with the optional names a service may add). */\nexport interface QboConnectStatus {\n connected: boolean;\n /** The integration is switched on for this account (informational). */\n enabled?: boolean;\n /** The QuickBooks company (realm) id. */\n realmId?: string | null;\n companyName?: string | null;\n /** ISO date-time the connection was made. */\n connectedAt?: string | null;\n /** The access token was revoked or expired for good: the seller has to authorize again. */\n needsReconnect?: boolean;\n}\n\n/** What the start call answers: the address of Intuit's authorization page (`authUrl`, or `url`). */\nexport interface QboConnectStart { authUrl?: string; url?: string }\n\n/**\n * What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words each outcome.\n *\n * - `connected`: the connection is live. `source: 'check'` = after \"Check Status\"; `'return'` = the state was read again when the user came back to this tab (`refreshOnReturn`).\n * - `needs-reconnect`: Intuit no longer accepts the saved authorization.\n * - `not-connected`: \"Check Status\" found no connection (the authorization was not finished).\n * - `disconnected`: the connection was removed.\n * - `link-unavailable`: the answer had no https Intuit address; nothing was opened.\n * - `failed`: a call failed (`action` says which); `error` is what it threw.\n */\nexport type QboConnectOutcome =\n | { kind: 'connected'; source: 'check' | 'return' }\n | { kind: 'needs-reconnect'; source: 'check' | 'return' }\n | { kind: 'not-connected' }\n | { kind: 'disconnected' }\n | { kind: 'link-unavailable' }\n | { kind: 'failed'; action: 'start' | 'check' | 'disconnect'; error: unknown };\n\n/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */\nexport interface QboConnectState {\n status: WritableSignal<QboConnectStatus | null>;\n loading: WritableSignal<boolean>;\n}\n\nexport interface QboConnectFlowOptions {\n /** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */\n start: () => (() => Observable<QboConnectStart>) | null;\n getStatus: () => (() => Observable<QboConnectStatus>) | null;\n disconnect: () => (() => Observable<unknown>) | null;\n state: QboConnectState;\n /** Where outcomes go. */\n emit: (outcome: QboConnectOutcome) => void;\n /** The buttons and methods do nothing while this says true (a read-only user). */\n disabled?: () => boolean;\n /** How THIS tab is sent to Intuit when the browser refused the new tab (default `window.location.href = url`). */\n navigate?: (url: string) => void;\n /** Called when Intuit's page was opened in a new tab (the card then offers \"Check Status\"). */\n onOpened?: () => void;\n destroyRef: DestroyRef;\n}\n\n/** Only an https address on Intuit's own domains (`intuit.com`, `quickbooks.com`, or a real subdomain): never `evilintuit.com`, `intuit.com.evil.com`, `http:` or `javascript:`. */\nexport function isQboUrl(url: string | undefined | null): url is string {\n if (!url) return false;\n try {\n const u = new URL(url);\n return u.protocol === 'https:' && ['intuit.com', 'quickbooks.com'].some(d => u.hostname === d || u.hostname.endsWith(`.${d}`));\n } catch { return false; }\n}\n\n/**\n * The QuickBooks Payments (Intuit OAuth) connection as a plain class: start (authorization page in a new tab), \"Check Status\", disconnect, and the \"back from Intuit\" read.\n * `ui-qbo-connect` runs it behind its card; a host that has to start the flow from code creates its own instance over the same state signals.\n * Intuit's page always opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers); only an https Intuit address is\n * opened; a failed call closes the empty tab.\n */\nexport class QboConnectFlow {\n /** An Intuit tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */\n tabOpened = false;\n\n constructor(private readonly o: QboConnectFlowOptions) {}\n\n private get blocked(): boolean { return this.o.state.loading() || !!this.o.disabled?.(); }\n\n /** Asks for the authorization address and opens Intuit's page in a new tab. */\n startConnect(): void {\n const start = this.o.start();\n if (!start || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n start().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: result => {\n this.o.state.loading.set(false);\n this.openQbo(tab, result?.authUrl ?? result?.url);\n },\n error: error => {\n this.closeTab(tab);\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'failed', action: 'start', error });\n },\n });\n }\n\n /** \"Check Status\": reads the state and reports it. */\n check(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.status.set(s);\n this.o.state.loading.set(false);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'check' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'check' });\n else this.o.emit({ kind: 'not-connected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'check', error }); },\n });\n }\n\n /** Removes the connection. The state becomes \"not connected\" only after the call succeeded. */\n disconnect(): void {\n const disconnect = this.o.disconnect();\n if (!disconnect || this.blocked) return;\n this.o.state.loading.set(true);\n disconnect().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: () => {\n this.o.state.status.set({ connected: false });\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'disconnected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'disconnect', error }); },\n });\n }\n\n /** The state read when the user came back to this tab: silent unless a connection is live or needs to be redone. */\n readStatusOnReturn(): void {\n const status = this.o.getStatus();\n if (!status) return;\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.status.set(s);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'return' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'return' });\n },\n error: () => { /* the user can press Check Status; a failed background read says nothing */ },\n });\n }\n\n private openQbo(tab: Window | null, url: string | undefined): void {\n // A blank tab the user already closed (before the answer arrived) cannot take the address: this tab is sent instead, like a refused tab.\n if (isQboUrl(url) && tab && !tab.closed) {\n tab.location.href = url;\n this.tabOpened = true;\n this.o.onOpened?.();\n } else if (isQboUrl(url)) {\n this.navigateCurrentTab(url);\n } else {\n // not an https Intuit address: never navigate to it, close the empty tab and say so\n this.closeTab(tab);\n this.o.emit({ kind: 'link-unavailable' });\n }\n }\n\n /** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */\n openBlankTab(): Window | null {\n const tab = window.open('about:blank', '_blank');\n if (tab) { try { tab.opener = null; } catch { /* cannot be changed: harmless */ } }\n return tab;\n }\n\n /** The browser refused the new tab: Intuit opens in this one. */\n private navigateCurrentTab(url: string): void {\n if (this.o.navigate) this.o.navigate(url);\n else window.location.href = url;\n }\n\n private closeTab(tab: Window | null): void {\n try { tab?.close(); } catch { /* already closed */ }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output, signal } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { QboConnectFlow } from './qbo-connect.flow';\nimport type { QboConnectOutcome, QboConnectStart, QboConnectStatus } from './qbo-connect.flow';\nexport type { QboConnectOutcome, QboConnectStart, QboConnectStatus } from './qbo-connect.flow';\nexport { QboConnectFlow, isQboUrl } from './qbo-connect.flow';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { ButtonComponent, ModalComponent, UiLabelsService, uiText } from '@forgeroute/ui/core';\nimport { DetailCardComponent } from '@forgeroute/ui/detail-card';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { StackComponent } from '@forgeroute/ui/stack';\nimport { TextComponent } from '@forgeroute/ui/text';\n\n/**\n * The default wording of an outcome, for apps that just want a toast: `{ variant, message }`, or null when nothing should be said.\n */\nexport function qboConnectNotice(outcome: QboConnectOutcome): { variant: 'success' | 'info' | 'error'; message: string } | null {\n switch (outcome.kind) {\n case 'connected': return { variant: 'success', message: uiText('qboConnect.noticeConnected') };\n case 'needs-reconnect': return { variant: 'error', message: uiText('qboConnect.noticeReconnect') };\n case 'not-connected': return { variant: 'info', message: uiText('qboConnect.noticeNotConnected') };\n case 'disconnected': return { variant: 'success', message: uiText('qboConnect.noticeDisconnected') };\n case 'link-unavailable': return { variant: 'error', message: uiText('qboConnect.noticeLinkUnavailable') };\n case 'failed': return { variant: 'error', message: uiText(outcome.action === 'start' ? 'qboConnect.failedStart' : outcome.action === 'check' ? 'qboConnect.failedCheck' : 'qboConnect.failedDisconnect') };\n }\n}\n\nlet nextConnectId = 0;\n\n/**\n * \"QuickBooks Payments\": the card where a business connects the QuickBooks Payments account it collects payments into (Intuit OAuth). The host owns the data (its three calls and the\n * status value); the component owns the screen and the flow:\n *\n * - not connected: \"Connect QuickBooks\" (opens Intuit's authorization page in a NEW tab, then offers \"Check Status\");\n * - connected: success with the company and the date, \"Check Status\" and \"Disconnect\" (asks to confirm first);\n * - needs reconnect: warning with \"Reconnect\".\n *\n * The page opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers) and receives the address when it arrives; with the\n * tab refused the address opens in the current tab. Only an https Intuit address is ever opened. A failed call closes the empty tab and is reported, never toasted.\n *\n * <ui-qbo-connect [(status)]=\"status\" [startConnect]=\"start\" [getStatus]=\"getStatus\" [disconnect]=\"disconnect\" [refreshOnReturn]=\"true\" (outcome)=\"onOutcome($event)\" />\n *\n * where `start = () => http.get<QboConnectStart>('/integrations/qbo-payments/connect')`, `getStatus = () => http.get<QboConnectStatus>('/integrations/qbo-payments/status')` and\n * `disconnect = () => http.delete('/integrations/qbo-payments/disconnect')`.\n */\n@Component({\n selector: 'ui-qbo-connect',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, DetailCardComponent, ModalComponent, LiveRegionComponent, StackComponent, TextComponent],\n template: `\n <!-- Persistent live region: present before the state changes, so every new state is announced (and \"Loading\" while a request runs). -->\n <ui-live-region data-testid=\"qbo-connect-live\" [message]=\"liveText()\" />\n @if (bare()) {\n <ng-container *ngTemplateOutlet=\"body\" />\n } @else {\n <ui-detail-card [collapsible]=\"false\" [title]=\"title()\" [headingLevel]=\"3\" data-testid=\"qbo-connect-card\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </ui-detail-card>\n }\n\n <ng-template #body>\n @if (state() === 'none') {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-none\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"startTitle()\" />\n <ui-text size=\"sm\" [text]=\"startText()\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"qbo-connect-start-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabBusy', { label: startLabel() }) }}</span>} @else { {{ startLabel() }}<span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabSr') }}</span>}</ui-button>\n @if (awaiting()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'qboConnect.checking' : 'qboConnect.checkStatus') }}</ui-button>\n }\n </ui-stack>\n </ui-stack>\n } @else if (state() === 'reconnect') {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-reconnect\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <span class=\"qbc-badge\"><ui-badge [label]=\"labels.t('qboConnect.needsReconnect')\" variant=\"red\" data-testid=\"qbo-connect-reconnect-badge\" /></span>\n <ui-text size=\"sm\" [text]=\"labels.t('qboConnect.reconnectText')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"qbo-connect-reconnect-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabBusy', { label: labels.t('qboConnect.reconnect') }) }}</span>} @else { {{ labels.t('qboConnect.reconnect') }}<span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabSr') }}</span>}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n } @else {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-connected\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"labels.t('qboConnect.connected')\" />\n @if (company(); as company) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"qbo-connect-company\" [text]=\"labels.t('qboConnect.companyLine', { company })\" /> }\n @if (connectedOn(); as date) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"qbo-connect-date\" [text]=\"labels.t('qboConnect.connectedOn', { date })\" /> }\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'qboConnect.checking' : 'qboConnect.checkStatus') }}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n }\n </ng-template>\n\n <ui-modal [open]=\"confirming()\" [title]=\"labels.t('qboConnect.disconnectTitle')\" maxWidth=\"440px\" [describedBy]=\"confirmMessageId\" [busy]=\"loading()\" dialogTestId=\"qbo-connect-confirm\" (close)=\"cancelDisconnect()\">\n <p [id]=\"confirmMessageId\" class=\"qbc-confirm\" data-testid=\"qbo-connect-confirm-message\">{{ labels.t('qboConnect.disconnectMessage') }}</p>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-confirm-cancel\" [disabled]=\"loading()\" (click)=\"cancelDisconnect()\">{{ labels.t('common.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"qbo-connect-confirm-accept\" [loading]=\"loading()\" (click)=\"doDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-modal>\n `,\n styles: [`ui-qbo-connect { display: block; min-width: 0; } ui-qbo-connect .qbc-badge { display: flex; } ui-qbo-connect .qbc-confirm { margin: 0; font-size: 0.9375rem; line-height: 1.5; } ui-qbo-connect .qbc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class QboConnectComponent {\n /** Unique per instance: two connect cards on one page must not share the id the dialog's description points at. */\n protected readonly confirmMessageId = `qbc-disconnect-msg-${nextConnectId++}`;\n protected readonly labels = inject(UiLabelsService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The call that answers Intuit's authorization address (`{ authUrl }`). Needed for `start()`. */\n readonly startConnect = input<(() => Observable<QboConnectStart>) | null>(null);\n /** The call that reads the connection's state. Needed for `check()` and `refreshOnReturn`. */\n readonly getStatus = input<(() => Observable<QboConnectStatus>) | null>(null);\n /** The call that removes the connection. Needed for \"Disconnect\". */\n readonly disconnect = input<(() => Observable<unknown>) | null>(null);\n\n /** The connection state (null = not read yet = shown as not connected). Two-way: the component sets it after \"Check Status\" and \"Disconnect\". */\n readonly status = model<QboConnectStatus | null>(null);\n\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('qboConnect.title'));\n /** No card around the content: the text and the buttons sit directly in the host's own card (a setup wizard step). `title` is not shown then. */\n readonly bare = input(false);\n readonly startTitleInput = input<string | null>(null, { alias: 'startTitle' });\n readonly startTitle = computed(() => this.startTitleInput() ?? this.labels.t('qboConnect.startTitle'));\n readonly startTextInput = input<string | null>(null, { alias: 'startText' });\n readonly startText = computed(() => this.startTextInput() ?? this.labels.t('qboConnect.startText'));\n readonly startLabelInput = input<string | null>(null, { alias: 'startLabel' });\n readonly startLabel = computed(() => this.startLabelInput() ?? this.labels.t('qboConnect.startLabel'));\n /** The buttons cannot be pressed (a read-only user). */\n readonly disabled = input(false);\n /** Ask before disconnecting (default true). */\n readonly confirmDisconnect = input(true);\n /** After an Intuit tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `connected` / `needs-reconnect` with source `return`. */\n readonly refreshOnReturn = input(false);\n /** How the current tab is sent to Intuit when the browser refused the new tab (default: `window.location.href = url`). */\n readonly navigateTab = input<((url: string) => void) | null>(null);\n\n /** What happened (see {@link QboConnectOutcome}); the host words it. */\n readonly outcome = output<QboConnectOutcome>();\n\n /** A request is running: the buttons show \"Loading...\" / \"Checking...\" and cannot be pressed again. Two-way, so a host can read it. */\n readonly loading = model(false);\n\n protected readonly awaiting = signal(false);\n protected readonly confirming = signal(false);\n protected readonly state = computed((): 'none' | 'connected' | 'reconnect' => {\n const s = this.status();\n return !s?.connected ? 'none' : s.needsReconnect ? 'reconnect' : 'connected';\n });\n protected readonly company = computed(() => this.status()?.companyName || this.status()?.realmId || '');\n protected readonly connectedOn = computed(() => this.labels.formatDate(this.status()?.connectedAt ?? null, 'mediumDate'));\n /** What the persistent status region says: the current state, plus \"Loading.\" while a request runs. */\n protected readonly liveText = computed(() => {\n const text = this.labels.t(({ none: 'qboConnect.live.none', connected: 'qboConnect.live.connected', reconnect: 'qboConnect.live.reconnect' } as const)[this.state()]);\n return this.loading() ? this.labels.t('qboConnect.live.loading', { text }) : text;\n });\n /** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */\n private acted = false;\n private lastState = this.state();\n private readonly flow = new QboConnectFlow({\n start: () => this.startConnect(),\n getStatus: () => this.getStatus(),\n disconnect: () => this.disconnect(),\n state: { status: this.status, loading: this.loading },\n emit: outcome => this.outcome.emit(outcome),\n disabled: () => this.disabled(),\n navigate: url => this.navigateCurrentTab(url),\n onOpened: () => this.awaiting.set(true),\n destroyRef: this.destroyRef,\n });\n\n constructor() {\n effect(() => {\n const state = this.state();\n if (this.loading()) return;\n const changed = state !== this.lastState;\n this.lastState = state;\n const focusIt = changed && this.acted;\n this.acted = false;\n if (state === 'connected') this.awaiting.set(false);\n if (focusIt) afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.qbc-state')?.focus(), { injector: this.injector });\n });\n if (typeof document !== 'undefined') {\n const onVisible = () => {\n if (document.visibilityState !== 'visible' || !this.flow.tabOpened || !this.refreshOnReturn() || this.loading()) return;\n this.flow.tabOpened = false;\n this.flow.readStatusOnReturn();\n };\n document.addEventListener('visibilitychange', onVisible);\n this.destroyRef.onDestroy(() => document.removeEventListener('visibilitychange', onVisible));\n }\n }\n\n /** Asks for the authorization address and opens Intuit's page in a new tab. */\n start(): void { const run = this.canRun(this.startConnect()); this.flow.startConnect(); this.acted ||= run; }\n\n /** \"Check Status\": reads the state; the card updates and the outcome is reported. */\n check(): void { const run = this.canRun(this.getStatus()); this.flow.check(); this.acted ||= run; }\n\n /** \"Disconnect\": asks for confirmation first (`confirmDisconnect`, default), then removes the connection. */\n askDisconnect(): void {\n if (this.disabled() || this.loading() || !this.disconnect()) return;\n if (this.confirmDisconnect()) this.confirming.set(true);\n else this.doDisconnect();\n }\n\n protected cancelDisconnect(): void { if (!this.loading()) this.confirming.set(false); }\n\n /** Removes the connection (what the confirm's button calls). */\n doDisconnect(): void {\n const run = this.canRun(this.disconnect());\n this.flow.disconnect();\n this.acted ||= run;\n this.confirming.set(false);\n }\n\n /** The flow will really send a request (the host gave the call, nothing is running, the card is not read-only). */\n private canRun(call: unknown): boolean { return !!call && !this.loading() && !this.disabled(); }\n\n /** The browser refused the new tab: Intuit opens in this one (through the host's `navigateTab` when it gave one). */\n protected navigateCurrentTab(url: string): void {\n const navigate = this.navigateTab();\n if (navigate) navigate(url);\n else window.location.href = url;\n }\n}\n","import type { PaymentAllocation } from '@forgeroute/ui/payments';\nimport { uiText } from '@forgeroute/ui/core';\nimport type { QboMethod, QboTokenDetails } from '../qbo-payment/qbo-outcomes';\n\n/** What the host's `createPayment` receives: the entered payment, how it is applied to charges, and the single-use token Intuit gave for the customer's card / bank account. */\nexport interface QboPaymentContext extends PaymentAllocation {\n /** The amount the payer owes (before processing fees), in major units (12.5 = $12.50). */\n amount: number;\n /** The method value that was selected (`'CARD'` / `'ACH'`). */\n paymentMethod: string;\n /** `'card'` or `'ach'` (a bank account). */\n method: QboMethod;\n receivedDate: string;\n notes: string | null;\n /** Intuit's single-use token: send it to your backend (which sends it to the payments service). The card / bank numbers never reach your backend. */\n token: string;\n /** Brand, last four, expiry or account type as far as they apply (never a full number). Intuit's answer has no card funding and no bank name. */\n details: QboTokenDetails;\n /** The `Request-Id` of the tokens call: a good base for the charge's own `Request-Id` (idempotency). */\n requestId: string;\n /**\n * The key of this PAYMENT ATTEMPT: stable across retries after a timeout / offline loss, a reload and a second tab; renewed only after a definitive failure or success. Send it to your\n * backend with the charge (it derives Intuit's `Request-Id` of the charge from it) and answer `checkStatus(attemptKey)` with it.\n */\n attemptKey: string;\n /** The payable of this attempt (the plugin's `payableRef` at the click): the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */\n payableRef: string | null;\n}\n\n/**\n * What the host's `createPayment` answers. `status` is the QuickBooks Payments status: `CAPTURED` / `SUCCEEDED` / `COMPLETED` = paid, `PENDING` / `AUTHORIZED` (and any other\n * non-final value) = submitted and settling (an eCheck takes days), `DECLINED` / `FAILED` / `CANCELLED` / `VOIDED` = not paid (the panel shows `failureMessage` / a default text and\n * the payer types the details again). Fees are optional; when given they are shown as rows under the form.\n */\nexport interface QboPaymentResult {\n paymentId?: string | null;\n status?: string;\n failureMessage?: string;\n processingFee?: number;\n platformFee?: number;\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\n/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the payment exists. Display only. */\nexport interface QboFees {\n processingFee?: number;\n platformFee?: number;\n /** What the payer is charged (amount + fees), shown as \"Total charged\". */\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\nexport interface QboFeeContext {\n amount: number;\n paymentMethod: string;\n method: QboMethod;\n}\n\nexport type QboOutcomeKind = 'paid' | 'processing' | 'failed';\n\nconst PAID = new Set(['CAPTURED', 'SUCCEEDED', 'COMPLETED', 'PAID', 'SETTLED']);\nconst FAILED = new Set(['DECLINED', 'FAILED', 'CANCELLED', 'CANCELED', 'VOIDED', 'REJECTED', 'ERROR']);\n\n/**\n * The QuickBooks Payments status as one outcome. A non-final status (`PENDING`, `AUTHORIZED`, anything unknown) counts as `'processing'`: the payment exists, so the payer is told\n * it was submitted, never \"failed\". No status at all is `'paid'` for a card and `'processing'` for a bank account, which never settles at once.\n */\nexport function qboOutcomeOf(status: string | null | undefined, method: QboMethod = 'card'): QboOutcomeKind {\n const value = (status ?? '').trim().toUpperCase();\n if (!value) return method === 'ach' ? 'processing' : 'paid';\n if (PAID.has(value)) return 'paid';\n if (FAILED.has(value)) return 'failed';\n return 'processing';\n}\n\n/** The method values the plugin takes over by default. */\nexport const QBO_PAYMENT_METHOD_VALUES = ['CARD', 'ACH'] as const;\n\n/** The name of a method in the app's active language (an unknown value is shown as it is). */\nexport const qboMethodLabel = (value: string): string =>\n value === 'CARD' ? uiText('qboPaymentMethod.methodCard') : value === 'ACH' ? uiText('qboPaymentMethod.methodAch') : value;\n\nexport const qboMethodOf = (method: string): QboMethod => (method === 'ACH' ? 'ach' : 'card');\n\n/** The texts of the QuickBooks Payments method; read on every access, so they follow the app's active language. */\nexport const QBO_METHOD_TEXTS = {\n get amountNeeded() { return uiText('qboPaymentMethod.amountNeeded'); },\n get notCompleted() { return uiText('qboPaymentMethod.notCompleted'); },\n get achTitle() { return uiText('qboPaymentMethod.achTitle'); },\n achMessage: (amount: string) => uiText('qboPaymentMethod.achMessage', { amount }),\n get pendingTitle() { return uiText('qboPaymentMethod.pendingTitle'); },\n pendingMessage: (amount: string) => uiText('qboPaymentMethod.pendingMessage', { amount }),\n get receiptNote() { return uiText('qboPaymentMethod.receiptNote'); },\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { ButtonComponent, UiLabelsService } from '@forgeroute/ui/core';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { KpiCardComponent } from '@forgeroute/ui/kpi-card';\nimport { PaymentAttemptStatusComponent, callHost, classifyHostError, isAwaitingVerificationError, isFinalPaymentRefusal, paymentErrorLabelKey, wasQueuedOffline, warnQueuedPayment, createPaymentProtection, hostErrorMessage, type PaymentAttempt, type PaymentAttemptControls, type PaymentAttemptOutcome, type PaymentMethodContext, type PaymentProtectionInputs, type PaymentReadiness } from '@forgeroute/ui/payments';\nimport { formatCurrency } from '@forgeroute/ui/utils';\nimport { QboPaymentComponent } from '../qbo-payment/qbo-payment.component';\nimport type { QboFailure } from '../qbo-payment/qbo-outcomes';\n\nimport type { QboPaymentMethodComponent } from './payment-qbo-method.component';\nimport { QBO_METHOD_TEXTS, qboMethodOf, qboOutcomeOf, type QboFees, type QboPaymentContext, type QboPaymentResult } from './payment-qbo-method.models';\n\n/** The body `ui-qbo-payment-method` hands to the panel: the QuickBooks Payments form, the fee rows and the whole flow (tokenize, host callback, outcome), talking to the panel through `ctx`. */\n@Component({\n selector: 'ui-payment-qbo-body',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, PaymentAttemptStatusComponent, QboPaymentComponent],\n template: `\n <div class=\"pqb\">\n @if (confirmation(); as notice) {\n <ui-alert variant=\"success\" [title]=\"notice.title\" tabindex=\"-1\" class=\"pqb-notice\" data-testid=\"qbo-method-confirmation\">\n <p>{{ notice.message }}</p>\n <p>{{ receiptNote() }}</p>\n </ui-alert>\n } @else {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"config().allowStartOver()\" [showPaid]=\"!confirmation() && !done()\" />\n @if (ctx().amount == null) {\n <ui-hint data-testid=\"qbo-method-amount-needed\">{{ texts.amountNeeded }}</ui-hint>\n }\n @if (estimateError()) {\n <div class=\"pqb-error\">\n <ui-alert variant=\"warning\" data-testid=\"qbo-method-estimate-error\">{{ estimateError() }}\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-method-estimate-retry\" (click)=\"retryEstimate()\">{{ labels.t('common.tryAgain') }}</ui-button>\n </ui-alert>\n </div>\n }\n @if (lastAmount() != null) {\n <ui-qbo-payment #payment mode=\"payment\" [method]=\"qboMethod()\" [environment]=\"config().environment()\" [cardholderName]=\"config().cardholderName()\"\n [requireName]=\"config().requireName()\" [requirePostalCode]=\"config().requirePostalCode()\" [postalCountry]=\"config().postalCountry()\" [requireAchConsent]=\"config().requireAchConsent()\" [showSubmit]=\"false\" [showErrors]=\"false\"\n [showStatus]=\"false\" [offlineOverride]=\"config().offlineOverride()\" [disabled]=\"processing() || done() || attempt.unknown() || attempt.paidLocked()\" [label]=\"labels.t('qboPaymentMethod.paymentDetails')\" (failed)=\"onFailed($event)\" />\n @if (totalCard(); as card) {\n <ui-kpi-card class=\"pqb-total\" data-testid=\"qbo-method-total\" [label]=\"labels.t('qboPaymentMethod.totalCharged')\" [value]=\"card.value\" [subtitle]=\"card.subtitle\" icon=\"dollar\" color=\"blue\" valueColor=\"blue\" />\n }\n @if (feeRows().length) {\n <dl class=\"pqb-fees\" data-testid=\"qbo-method-fees\" [attr.aria-label]=\"labels.t('qboPaymentMethod.paymentTotal')\">\n @for (row of feeRows(); track row.key) {\n <div class=\"pqb-fee\" [attr.data-testid]=\"'qbo-fee-' + row.key\"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div>\n }\n </dl>\n }\n @if (error()) { <div class=\"pqb-error\"><ui-alert variant=\"danger\" data-testid=\"qbo-method-error\">{{ error() }}</ui-alert></div> }\n }\n }\n </div>\n `,\n styles: [`\n ui-payment-qbo-body { display: block; min-width: 0; }\n ui-payment-qbo-body .pqb-error { margin-top: 12px; }\n ui-payment-qbo-body .pqb-total { display: block; margin-top: 16px; }\n ui-payment-qbo-body .pqb-fees { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--ui-psp-border, #e2e8f0); border-radius: 10px; font-size: 0.8125rem; }\n ui-payment-qbo-body .pqb-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ui-psp-muted, #475569); }\n ui-payment-qbo-body .pqb-fee dt, ui-payment-qbo-body .pqb-fee dd { margin: 0; }\n ui-payment-qbo-body .pqb-notice:focus { outline: none; }\n ui-payment-qbo-body .pqb-notice p { margin: 0 0 6px; }\n `],\n})\nexport class PaymentQboBodyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ctx = input.required<PaymentMethodContext>();\n readonly config = input.required<QboPaymentMethodComponent>();\n private readonly payment = viewChild(QboPaymentComponent);\n\n protected readonly texts = QBO_METHOD_TEXTS;\n\n readonly processing = signal(false);\n /** The payment was accepted (the panel was told, or the notice is up): Pay stays off even if the host keeps the panel open. */\n readonly done = signal(false);\n readonly error = signal('');\n /** The service gave an answer a retry cannot change (see `isFinalPaymentRefusal`), for THIS method, payable and amount: the text stays and Pay stays off until one of them changes (then the refusal and its text are cleared for good; it comes back only if the service answers it again). */\n readonly finalRefusal = signal<{ method: string; ref: string | null; amount: number } | null>(null);\n /** Fees from the host's estimate (before the payer pays). */\n readonly estimate = signal<QboFees | null>(null);\n private readonly estimating = signal(false);\n protected readonly estimateError = signal('');\n private readonly estimateTick = signal(0);\n /** Fees the host answered when it created the payment. */\n private readonly resultFees = signal<QboFees | null>(null);\n protected readonly confirmation = signal<{ title: string; message: string } | null>(null);\n /** The last valid amount: the form stays mounted (and keeps the typed card data) while the amount is briefly empty or invalid. */\n protected readonly lastAmount = signal<number | null>(null);\n /** What the attempt was STARTED with (pinned at the click; a later amount edit or method change never changes what is recorded). */\n private payAmount: number | null = null;\n private payMethod: string | null = null;\n /** What the payment that was RECORDED (or accepted) was made with: a late answer of an older attempt is recorded with ITS OWN amount and method, never the newest click's. */\n private doneAmount: number | null = null;\n private doneMethod: string | null = null;\n private estimateRun = 0;\n\n private readonly amountValue = computed(() => this.ctx().amount);\n private readonly methodValue = computed(() => this.ctx().method);\n protected readonly qboMethod = computed(() => qboMethodOf(this.ctx().method));\n private readonly total = computed(() => this.resultFees()?.totalAmount ?? this.estimate()?.totalAmount ?? this.lastAmount() ?? 0);\n protected readonly receiptNote = computed(() => this.config().receiptNote());\n protected readonly feeRows = computed(() => {\n const fees = this.resultFees() ?? this.estimate();\n const amount = this.lastAmount();\n if (!fees || amount == null || (fees.processingFee === undefined && fees.platformFee === undefined)) return [];\n const money = (n: number) => formatCurrency(n, { currency: this.ctx().currency });\n const rows: { key: string; label: string; value: string }[] = [{ key: 'amount', label: this.labels.t('qboPaymentMethod.paymentAmount'), value: money(amount) }];\n if (fees.processingFee !== undefined) rows.push({ key: 'processing', label: `${this.labels.t('qboPaymentMethod.processingFee')}${fees.processingFeeLabel ? ` (${fees.processingFeeLabel})` : ''}`, value: money(fees.processingFee) });\n if (fees.platformFee !== undefined) rows.push({ key: 'platform', label: `${this.labels.t('qboPaymentMethod.platformFee')}${fees.platformFeeLabel ? ` (${fees.platformFeeLabel})` : ''}`, value: money(fees.platformFee) });\n return rows;\n });\n /** The headline figure: what the payer is charged, once fees are known. */\n protected readonly totalCard = computed(() => {\n const fees = this.resultFees() ?? this.estimate();\n if (!fees || this.lastAmount() == null || fees.totalAmount === undefined) return null;\n return { value: formatCurrency(fees.totalAmount, { currency: this.ctx().currency }), subtitle: this.labels.t('qboPaymentMethod.amountPlusFees') };\n });\n\n /** The duplicate-payment protection of this payment (lock, attempt key, unknown state) and its readiness gate, driven by the plugin's inputs. */\n readonly attempt: PaymentAttempt;\n readonly readiness: PaymentReadiness;\n private gone = false;\n\n constructor() {\n // offlineOverride is read once while the readiness gate is constructed, before the inputs are bound: an unset required input counts as \"no override\" until the config arrives.\n const configured = <T>(read: (config: QboPaymentMethodComponent) => T) => computed(() => read(this.config()));\n const inputs: PaymentProtectionInputs = {\n payableRef: configured(c => c.payableRef()), attemptKey: configured(c => c.attemptKey()), checkStatus: configured(c => c.checkStatus()), paid: configured(c => c.paid()), hostPending: configured(c => c.hostPending()),\n statusPollMs: configured(c => c.statusPollMs()), statusPollMaxMs: configured(c => c.statusPollMaxMs()),\n statusCheckTimeoutMs: configured(c => c.statusCheckTimeoutMs()), statusFailGraceMs: configured(c => c.statusFailGraceMs()), readinessCheck: configured(c => c.readinessCheck()),\n readinessTimeoutMs: configured(c => c.readinessTimeoutMs()), readinessEveryMs: configured(c => c.readinessEveryMs()), offlineOverride: computed(() => { try { return this.config().offlineOverride(); } catch { return false; } }),\n };\n const protection = createPaymentProtection(inputs, {\n amount: () => this.ctx().amount,\n method: () => this.ctx().method,\n onOutcome: o => this.onAttemptOutcome(o),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n inject(DestroyRef).onDestroy(() => { this.gone = true; });\n // The host resolves an undecided attempt through the plugin component (markSucceeded / markFailed / markNotCharged / markUnknown), without a status check.\n const controls: PaymentAttemptControls = {\n markUnknown: () => this.attempt.markUnknown('host'),\n markSucceeded: () => this.attempt.succeed('host'),\n markFailed: () => this.attempt.fail('host'),\n resetPaid: () => { this.attempt.resetPaid(); this.done.set(false); this.confirmation.set(null); this.error.set(''); this.ctx().setExclusive(false); },\n markNotCharged: () => { this.attempt.markNotCharged(); this.payment()?.markNotCharged(); this.processing.set(false); this.ctx().setBusy(false); },\n };\n // The controls are handed to the plugin that is bound NOW and taken back from that same one when the binding changes or the body is destroyed. (Reading `this.config()` in a destroy callback threw NG0950 when the body\n // was destroyed before its required config input was ever bound, which aborted the rest of the view's cleanups.)\n effect(onCleanup => {\n const config = this.config();\n untracked(() => config.attachControls(controls));\n onCleanup(() => config.detachControls(controls));\n });\n effect(() => { const amount = this.amountValue(); if (amount != null) untracked(() => this.lastAmount.set(amount)); });\n // A final refusal belongs to the method, payable and amount it was raised for: when one of them changes the refusal and its text are cleared (and stay cleared unless the service answers it again).\n effect(() => {\n const scope = this.finalRefusal();\n if (!scope) return;\n const ctx = this.ctx();\n if (ctx.method !== scope.method || ctx.amount !== scope.amount || this.config().payableRef() !== scope.ref) untracked(() => { this.finalRefusal.set(null); this.error.set(''); });\n });\n // The panel's footer button for this method.\n effect(() => {\n const ctx = this.ctx();\n const processing = this.processing();\n const notice = this.confirmation();\n const estimating = this.estimating();\n const done = this.done();\n const estimateFailed = !!this.estimateError();\n const unknown = this.attempt.unknown();\n const paidLocked = this.attempt.paidLocked();\n const finalRefusal = !!this.finalRefusal();\n const gateReady = this.readiness.ready();\n const label = notice ? this.labels.t('common.done') : ctx.amount != null ? `${this.labels.t('qboPaymentMethod.pay')} ${formatCurrency(this.total(), { currency: ctx.currency })}` : this.labels.t('qboPaymentMethod.pay');\n untracked(() => ctx.setPrimary({\n label, loading: processing && !notice,\n disabled: notice ? done : processing || estimating || estimateFailed || ctx.amount == null || done || unknown || paidLocked || finalRefusal || !gateReady,\n onClick: () => (notice ? this.finish() : void this.pay()),\n }));\n });\n // Estimated fees, debounced (display only).\n effect((onCleanup) => {\n const estimate = this.config().estimateFees();\n const amount = this.amountValue();\n const method = this.methodValue();\n this.estimateTick();\n const run = ++this.estimateRun; // any change makes an answer that is still on its way stale\n untracked(() => { this.estimate.set(null); this.resultFees.set(null); this.estimateError.set(''); });\n if (!estimate || amount == null) { untracked(() => this.estimating.set(false)); return; }\n untracked(() => this.estimating.set(true));\n let hung: ReturnType<typeof setTimeout> | null = null;\n const failure = this.labels.t('qboPaymentMethod.feesFailed');\n const timer = setTimeout(async () => {\n // A hung estimate must not block the user forever: after the timeout \"Try again\" is offered (and Pay stays off when fees are required). A late answer still recovers.\n hung = setTimeout(() => {\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (this.config().feesRequired()) this.estimateError.set(failure);\n }, Math.max(1, this.config().estimateTimeoutMs()));\n let fees: QboFees | null = null;\n try { fees = (await callHost(() => estimate({ amount, paymentMethod: method, method: qboMethodOf(method) }))) ?? null; } catch { fees = null; }\n if (hung) { clearTimeout(hung); hung = null; }\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (fees) { this.estimate.set(fees); this.estimateError.set(''); }\n else { this.estimate.set(null); this.estimateError.set(this.config().feesRequired() ? failure : ''); }\n }, 300);\n onCleanup(() => { clearTimeout(timer); if (hung) clearTimeout(hung); });\n });\n // Another method is another form.\n effect(() => { this.methodValue(); untracked(() => this.error.set('')); });\n // The panel tells us when it is closing or the method changes before this body is removed: an accepted payment whose notice is still up is reported as recorded.\n effect(() => { const ctx = this.ctx(); untracked(() => ctx.onCancel(() => { if (this.confirmation()) this.finish(); })); });\n inject(DestroyRef).onDestroy(() => { this.estimateRun++; });\n }\n\n protected retryEstimate(): void { this.estimateTick.update(n => n + 1); }\n\n protected onFailed(failure: QboFailure): void {\n this.error.set(failure.message); // shown in a role=alert ui-alert: that is the announcement\n this.processing.set(false);\n this.ctx().report('failed', { message: failure.message });\n }\n\n /**\n * Pays: the gate (paid / unknown / not ready / offline: nothing is sent), validates the panel, then ONE attempt under the synchronous lock: the numbers go to Intuit (never to the host),\n * then the payment is created through the host with the attempt key. A timeout, going offline or an ambiguous host error makes the outcome UNKNOWN (locked, \"Checking your payment...\",\n * status check by key); only a definitive refusal unlocks with a new key. The component never retries a charge itself.\n */\n async pay(): Promise<void> {\n const ctx = this.ctx();\n const payment = this.payment();\n if (this.processing() || this.estimating() || this.done() || !payment) return;\n if (this.refused(ctx)) return;\n if (!ctx.validate() || ctx.amount == null) return;\n this.payAmount = ctx.amount;\n this.payMethod = ctx.method;\n const attemptAmount: number = ctx.amount; // captured for THIS attempt: a late answer must not read the fields a newer click overwrote\n const attemptMethod: string = ctx.method;\n const create = this.config().createPayment();\n if (!create) { this.onFailed({ code: 'not_configured', message: this.labels.t('qboPaymentMethod.unavailable'), stage: 'tokenize' }); return; }\n this.error.set('');\n this.processing.set(true);\n ctx.setBusy(true);\n ctx.announce(this.labels.t('qboPaymentMethod.announceProcessing'));\n let finished = false;\n const run = await this.attempt.run<QboPaymentResult | null>(async key => {\n // A LATE answer (the attempt moved on while this call was still running) must not touch the newer attempt's screen, error text, busy state or inner form: every side effect below asks `live()` first.\n const live = (): boolean => this.attempt.isLive(key);\n try {\n // The tokenization starts from the click: the form reads what was typed, sends it to Intuit and empties itself before the answer arrives.\n const event = await payment.tokenize();\n if (!event) return { kind: 'released' }; // the form reported the failure (onFailed): nothing was charged\n if (this.gone) return { kind: 'released', reason: 'destroyed' }; // destroyed before the host call: NOTHING was sent, the marker must not outlive the page\n const request: QboPaymentContext = {\n amount: attemptAmount, paymentMethod: attemptMethod, method: event.method, receivedDate: ctx.receivedDate, notes: ctx.note || null, ...ctx.allocation,\n token: event.token, details: event.details, requestId: event.requestId, attemptKey: key, payableRef: this.attempt.pinnedRef(),\n };\n let result: QboPaymentResult | null | undefined;\n try { result = await callHost(() => create(request)); } catch (err) { // after the panel closed (`this.gone`) the classification still decides and the core writes the records: there is no screen left to touch\n const kind = classifyHostError(err);\n if (kind === 'unknown') return { kind: 'unknown', reason: isAwaitingVerificationError(err) ? 'microdeposits' : 'host_error' }; // the open payment waits for the payer's bank verification: say so, never \"already processed\"\n // The reference / payment-link codes are worded in OUR (translated) words; a final one (the balance changed, the link was paid / ended, the processor cannot do it) keeps the text and turns Pay off instead of looping.\n const labelKey = paymentErrorLabelKey(err);\n const message = labelKey ? this.labels.t(labelKey) : hostErrorMessage(err, this.labels.t('qboPaymentMethod.paymentFailed'));\n if (live() && isFinalPaymentRefusal(err)) this.finalRefusal.set({ method: attemptMethod, ref: this.config().payableRef(), amount: attemptAmount });\n if (kind === 'not_sent') { // the request never left (offline layer): nothing was charged, the key is KEPT and the payer may try again\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (live()) { this.error.set(message); ctx.report('failed', { message }); }\n return { kind: 'failure', reason: 'host_refused' };\n }\n if (wasQueuedOffline(result)) { // the offline layer QUEUED the request instead of sending it (a synthetic 202): no payment exists, the key is KEPT\n warnQueuedPayment();\n const message = this.labels.t('paymentAttempt.queuedOffline');\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (this.gone) return { kind: qboOutcomeOf(result?.status, qboMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' }; // the panel closed meanwhile: the answer is still the payment's outcome (the core records it for the next form of the payable)\n finished = this.afterCreate(result ?? null, ctx, live(), attemptAmount, attemptMethod);\n return { kind: qboOutcomeOf(result?.status, qboMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' };\n } finally { if (live()) payment.markNotCharged(); } // the token was handed to the host: the INNER form's own lock ends with this attempt (never the lock of a NEWER attempt)\n }, { timeoutMs: this.config().paymentTimeoutMs() });\n this.processing.set(false);\n if ('refused' in run && run.refused) { ctx.setBusy(false); return; }\n if (run.kind === 'unknown') return; // stays locked (busy) until the status check, the host or a late answer resolves it\n if (!finished) ctx.setBusy(false);\n }\n\n /** Refuses to start (nothing is sent): a paid payable, an unknown earlier outcome, a failed readiness gate or being offline. Returns true when refused. */\n private refused(ctx: PaymentMethodContext): boolean {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n const message = this.labels.t(this.readiness.labelKeyFor(reason));\n this.error.set(message);\n ctx.report('refused', { message });\n ctx.announce(message);\n return true;\n }\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** The attempt resolved OUTSIDE the click (a status check, the host's `markSucceeded` / `markFailed`, a late answer) or became unknown. */\n private onAttemptOutcome(outcome: PaymentAttemptOutcome): void {\n const ctx = this.ctx();\n if (outcome.kind === 'unknown' && outcome.reason === 'duplicate_suspected') {\n // A SECOND payment of a payable that is already paid: nothing about the lock, the amount or the method changes; the host is told (with the key of the second payment) so it can resolve it.\n const message = this.labels.t('paymentAttempt.duplicate');\n this.error.set(message);\n ctx.report('duplicate_suspected', { message, attemptKey: outcome.attemptKey });\n ctx.announce(message);\n } else if (outcome.kind === 'unknown') {\n this.payAmount = this.attempt.pinnedAmount() ?? this.payAmount; // the amount and method of the attempt that is UNKNOWN (an adopted one included), never a stale earlier one\n this.payMethod = this.attempt.pinnedMethod() ?? this.payMethod;\n const message = this.labels.t(outcome.reason === 'offline' ? 'paymentAttempt.offlineInFlight' : outcome.reason === 'timeout' ? 'paymentAttempt.timeout' : outcome.reason === 'microdeposits' || this.attempt.awaitingVerification() ? 'paymentAttempt.awaitingVerification' : 'paymentAttempt.checking'); // a reload / another tab that adopted a bank verification wait says so too\n ctx.report('unknown', { message });\n ctx.announce(message);\n } else if (outcome.kind === 'refused') {\n const refusedReason = outcome.reason ?? '';\n // `unknown` while a bank verification wait is on is the verification text, never \"Checking your payment...\"\n const refusedKey = refusedReason === 'unknown' && this.attempt.awaitingVerification() ? 'paymentAttempt.awaitingVerification' : this.readiness.labelKeyFor(refusedReason);\n ctx.report('refused', { message: this.labels.t(refusedKey) });\n } else if (outcome.kind === 'succeeded' && outcome.reason === 'other_tab') {\n // Another tab / page load paid this payable: this form only shows the paid lock. Nothing is recorded here (no `paid`, no `complete`): no money moved through THIS form and the amount typed here is not what was paid.\n // A host that wants to reconcile reads the paid attempt's key, amount and method from the report (and from the form's own `(outcome)`).\n ctx.report('paid_elsewhere', { message: this.labels.t('paymentAttempt.paid'), attemptKey: outcome.attemptKey, ...(outcome.method !== undefined ? { paid: { amount: outcome.amount ?? null, method: outcome.method } } : {}) });\n } else if (outcome.kind === 'succeeded' && (outcome.reason === 'status_check' || outcome.reason === 'host') && !this.done()) {\n const paid = { type: 'stripe' as const, paymentMethod: outcome.method ?? this.payMethod ?? ctx.method, amount: outcome.amount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'quickbooks' };\n this.doneAmount = paid.amount;\n this.doneMethod = paid.paymentMethod;\n ctx.report('paid', { result: paid });\n this.done.set(true);\n ctx.setBusy(false);\n ctx.complete(paid);\n } else if (outcome.kind === 'failed') {\n if (outcome.reason === 'status_check' || outcome.reason === 'host') {\n const message = this.labels.t('paymentAttempt.failedAfterCheck');\n this.error.set(message);\n ctx.report('failed', { message });\n }\n this.payment()?.markNotCharged(); // the attempt is decided: the INNER form's lock (kept while the host charged) ends with it, so a NEW attempt can tokenize even when the old request never answers\n ctx.setBusy(false); // also a LATE definitive refusal (the answer came after a timeout): the panel is free again\n }\n }\n\n private afterCreate(result: QboPaymentResult | null, ctx: PaymentMethodContext, live: boolean, amount: number, method: string): boolean {\n if (this.done() || this.confirmation()) return true; // a status check or the host already recorded this payment: report it exactly once\n const money = formatCurrency(amount, { currency: ctx.currency });\n const outcome = qboOutcomeOf(result?.status, qboMethodOf(method));\n if (outcome === 'failed') {\n if (live) { // a late decline of an OLDER attempt says nothing on the newer attempt's screen\n const message = result?.failureMessage || this.texts.notCompleted;\n this.error.set(message);\n ctx.report('failed', { message });\n }\n return false;\n }\n if (live && result && (result.processingFee !== undefined || result.platformFee !== undefined || result.totalAmount !== undefined)) {\n this.resultFees.set({ processingFee: result.processingFee, platformFee: result.platformFee, totalAmount: result.totalAmount, processingFeeLabel: result.processingFeeLabel, platformFeeLabel: result.platformFeeLabel });\n }\n const paid = { type: 'stripe' as const, paymentMethod: method, amount, processor: 'quickbooks' };\n this.doneAmount = amount;\n this.doneMethod = method;\n if (outcome === 'paid') {\n ctx.report('paid', { result: paid });\n this.done.set(true);\n ctx.complete(paid);\n return true;\n }\n ctx.report('processing', { result: paid });\n this.confirmation.set(qboMethodOf(method) === 'ach'\n ? { title: this.texts.achTitle, message: this.texts.achMessage(money) }\n : { title: this.texts.pendingTitle, message: this.texts.pendingMessage(money) });\n ctx.setExclusive(true);\n ctx.setBusy(false);\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.pqb-notice')?.focus(), { injector: this.injector });\n return true;\n }\n\n /** \"Done\" on the submitted notice, or closing the panel while the notice is up: the accepted payment is reported as recorded (once). */\n private finish(): void {\n const ctx = this.ctx();\n if (this.done()) return;\n this.done.set(true);\n ctx.complete({ type: 'stripe', paymentMethod: this.doneMethod ?? this.payMethod ?? ctx.method, amount: this.doneAmount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'quickbooks' });\n }\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, forwardRef, input, viewChild, computed, signal } from '@angular/core';\nimport { PAYMENT_METHOD_PLUGIN, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentMethodPlugin, type CheckPaymentStatusFn, type PaymentAttemptControls, type HostResult, type PaymentMethodBodyContext, type PaymentPluginMethod, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport type { QboEnvironment } from '../qbo-tokenizer/qbo-tokenizer';\nimport type { QboPostalCountry } from '../qbo-validation/qbo-validation';\nimport { PaymentQboBodyComponent } from './payment-qbo-body.component';\nimport { QBO_PAYMENT_METHOD_VALUES, QBO_METHOD_TEXTS, qboMethodLabel, type QboFeeContext, type QboFees, type QboPaymentContext, type QboPaymentResult } from './payment-qbo-method.models';\n\n/**\n * Adds LIVE Card and ACH (QuickBooks Payments) to `ui-payment-side-panel`. Put it inside the panel only for customers who use QuickBooks Payments: its presence replaces the record-only\n * Card / ACH (last 4 digits) with the card / bank-account form that tokenizes in the browser; remove it and the panel is record-only again.\n *\n * <ui-payment-side-panel ...>\n * @if (qboEnabled()) {\n * <ui-qbo-payment-method environment=\"production\" [createPayment]=\"createPayment\" />\n * }\n * </ui-payment-side-panel>\n *\n * The host owns the HTTP: `createPayment(ctx)` receives the single-use token (and the entered amount, date, notes, allocation) and answers the payment result\n * (`{ status, fees... }`). Outcomes arrive as the panel's `outcome` events with kind `'plugin'` and codes `paid`, `processing` and `failed`.\n */\n@Component({\n selector: 'ui-qbo-payment-method',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PaymentQboBodyComponent],\n providers: [{ provide: PAYMENT_METHOD_PLUGIN, useExisting: forwardRef(() => QboPaymentMethodComponent) }],\n host: { style: 'display: none' },\n template: `<ng-template #body let-ctx><ui-payment-qbo-body [ctx]=\"ctx\" [config]=\"self\" /></ng-template>`,\n})\nexport class QboPaymentMethodComponent extends PaymentMethodPlugin {\n protected readonly self = this;\n /** Creates the payment on the host's backend from the token (called when the payer presses Pay, after Intuit tokenized). */\n readonly createPayment = input<((ctx: QboPaymentContext) => HostResult<QboPaymentResult>) | null>(null);\n /** Optional fee preview before paying (display only). */\n readonly estimateFees = input<((ctx: QboFeeContext) => HostResult<QboFees>) | null>(null);\n readonly environment = input<QboEnvironment | null>(null);\n /** Pre-fills the name on the card and the bank account holder. */\n readonly cardholderName = input('');\n readonly requireName = input(false);\n readonly requirePostalCode = input(false);\n /** `'US'` (ZIP, default) or `'CA'` (Canadian postal code) for the card's postal code. */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** ACH: the authorization checkbox must be ticked (default true). */\n readonly requireAchConsent = input(true);\n /** The methods this plugin takes over (default: Card and ACH / Bank Transfer). Pass `[{ value: 'CARD', label: 'Card' }]` for cards only. */\n readonly methodListInput = input<readonly PaymentPluginMethod[] | null>(null, { alias: 'methodList' });\n readonly methodList = computed((): readonly PaymentPluginMethod[] => this.methodListInput() ?? QBO_PAYMENT_METHOD_VALUES.map(value => ({ value, label: qboMethodLabel(value) })));\n /** How long a fee estimate may take before Pay is released and \"Try again\" is offered (ms). */\n readonly estimateTimeoutMs = input(10000);\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies for the charge; empty = the plugin generates one per payment attempt session (it arrives in `createPayment(ctx).attemptKey`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (timeout, offline mid-flight). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): Pay stays locked for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: the plugin goes to \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** How long ONE `createPayment` (tokenize + charge) may take before the outcome counts as unknown (ms). */\n readonly paymentTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n /** The payer covers fees: a rejected or empty estimate keeps Pay off (with \"Try again\") instead of paying without the fee preview. */\n readonly feesRequired = input(false);\n readonly receiptNoteInput = input<string | null>(null, { alias: 'receiptNote' });\n readonly receiptNote = computed((): string => this.receiptNoteInput() ?? QBO_METHOD_TEXTS.receiptNote);\n\n private readonly body = viewChild<TemplateRef<PaymentMethodBodyContext>>('body');\n\n // ── The host resolves an undecided attempt itself (without a status check): the body registers its controls here ──\n private readonly controls = signal<PaymentAttemptControls | null>(null);\n /** @internal The body registers itself. */\n attachControls(controls: PaymentAttemptControls): void { this.controls.set(controls); }\n /** @internal The body leaves. */\n detachControls(controls: PaymentAttemptControls): void { if (this.controls() === controls) this.controls.set(null); }\n /** The host's charge of this payment is ambiguous (its call timed out): the plugin shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.controls()?.markUnknown(); }\n /** The host's charge succeeded: the plugin records it (paid + complete) and locks the payable. */\n markSucceeded(): void { this.controls()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused: the plugin unlocks with a NEW attempt key. */\n markFailed(): void { this.controls()?.markFailed(); }\n /** NOTHING was sent to the processor: the plugin unlocks and the attempt key is KEPT (the backend must still answer the state of an attempt it already holds for that key). */\n markNotCharged(): void { this.controls()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.controls()?.resetPaid(); }\n\n\n readonly methods = this.methodList;\n readonly template = this.body;\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input, output, signal, viewChild, effect, untracked, isDevMode } from '@angular/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_HOST_SILENCE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, type CheckPaymentStatusFn, type PaymentAttemptOutcome, type PaymentReadinessResult, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport { SkeletonComponent } from '@forgeroute/ui/skeleton';\nimport { UiLabelsService } from '@forgeroute/ui/core';\nimport { QboPaymentComponent } from '../qbo-payment/qbo-payment.component';\nimport type { QboFailure, QboIntentKind, QboMethod, QboTokenizedEvent } from '../qbo-payment/qbo-outcomes';\nimport type { QboA11yMessages } from '../qbo-payment/qbo-payment.component';\nimport type { QboErrorDisplay } from '../errors/qbo-errors';\nimport type { QboEnvironment } from '../qbo-tokenizer/qbo-tokenizer';\nimport type { QboPostalCountry } from '../qbo-validation/qbo-validation';\n\n/** Which screen the hosted page shows. */\nexport type QboHostedPayState = 'loading' | 'form' | 'processing' | 'success' | 'expired' | 'used' | 'error';\n\n/**\n * The building block of a public \"pay this link\" page (contractor's `/pay/:token`): the amount summary (title, company, description), the loading / expired / already-paid /\n * success / error screens and, while the link can be paid, the card / bank form that tokenizes IN THE BROWSER (`ui-qbo-payment`). The page itself (route, token, language\n * switch, the request that loads the link and the request that charges it) stays in the app: it sets `state`, sends `(tokenized)`'s token to its backend, then sets `success`\n * or goes back to `form` with an `errorMessage`.\n *\n * <ui-qbo-hosted-pay [state]=\"state()\" [companyName]=\"info()?.companyName\" [amountLabel]=\"info()?.amount\" [description]=\"info()?.description\"\n * [errorMessage]=\"error()\" environment=\"production\" (tokenized)=\"pay($event)\" />\n */\n@Component({\n selector: 'ui-qbo-hosted-pay',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, LiveRegionComponent, QboPaymentComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': 'state() === \"loading\" || state() === \"processing\" ? \"true\" : null' },\n template: `\n <section class=\"qbh\" [attr.aria-label]=\"title()\" data-testid=\"qbo-hosted-pay\">\n <header class=\"qbh-header\">\n <h1 class=\"qbh-title\" data-testid=\"qbo-hosted-title\">{{ title() }}</h1>\n @if (companyName()) { <p class=\"qbh-company\" data-testid=\"qbo-hosted-company\">{{ companyName() }}</p> }\n @if (description()) { <p class=\"qbh-desc\" data-testid=\"qbo-hosted-description\">{{ description() }}</p> }\n </header>\n @if (showForm()) {\n <!-- 'form' and 'processing' are ONE view (the form keeps the typed data and its lock while the host charges the token) -->\n <div class=\"qbh-body\">\n @if (errorMessage() && !localError()) { <ui-alert variant=\"danger\" data-testid=\"qbo-hosted-form-error\">{{ errorMessage() }}</ui-alert> }\n <ui-qbo-payment [mode]=\"mode()\" [environment]=\"environment()\" [methods]=\"methods()\" [method]=\"method()\" [pending]=\"state() === 'processing'\" [submitLabel]=\"submitText()\" [showErrors]=\"false\"\n [label]=\"formLabel()\" [cardholderName]=\"cardholderName()\" [requireName]=\"requireName()\" [requirePostalCode]=\"requirePostalCode()\" [postalCountry]=\"postalCountry()\"\n [confirmAccountNumber]=\"confirmAccountNumber()\" [requireAchConsent]=\"requireAchConsent()\" [achConsentText]=\"achConsentText()\" [errorDisplay]=\"errorDisplay()\" [errorMessages]=\"errorMessages()\"\n [errorFallback]=\"errorFallback()\" [a11yMessages]=\"a11yMessages()\"\n [payableRef]=\"payableRef()\" [attemptKey]=\"attemptKey()\" [checkStatus]=\"checkStatus()\" [paid]=\"paid()\" [hostPending]=\"hostPending()\" [statusPollMs]=\"statusPollMs()\" [statusPollMaxMs]=\"statusPollMaxMs()\" [statusCheckTimeoutMs]=\"statusCheckTimeoutMs()\" [statusFailGraceMs]=\"statusFailGraceMs()\" [hostSilenceMs]=\"hostSilenceMs()\" [allowStartOver]=\"allowStartOver()\" [offlineOverride]=\"offlineOverride()\"\n [readinessCheck]=\"readinessCheck()\" [readinessTimeoutMs]=\"readinessTimeoutMs()\" [readinessEveryMs]=\"readinessEveryMs()\"\n (tokenized)=\"onTokenized($event)\" (failed)=\"onFailed($event)\" (inFlightChange)=\"inFlightChange.emit($event)\" (outcome)=\"outcome.emit($event)\"\n (attemptKeyChange)=\"attemptKeyChange.emit($event)\" (readinessChange)=\"readinessChange.emit($event)\" />\n @if (localError()) { <ui-alert variant=\"danger\" data-testid=\"qbo-hosted-field-error\">{{ localError() }}</ui-alert> }\n </div>\n } @else {\n @switch (state()) {\n @case ('loading') {\n <div class=\"qbh-body\" data-testid=\"qbo-hosted-loading\">\n <ui-live-region data-testid=\"qbo-hosted-loading-status\" [message]=\"labels.t('qboHostedPay.loading')\" />\n <div aria-hidden=\"true\"><ui-skeleton [height]=\"44\" [mb]=\"10\" /><ui-skeleton [height]=\"44\" [mb]=\"10\" /><ui-skeleton [height]=\"44\" width=\"60%\" /></div>\n </div>\n }\n @case ('expired') {\n <ui-alert variant=\"warning\" [title]=\"labels.t('qboHostedPay.expiredTitle')\" data-testid=\"qbo-hosted-expired\">{{ labels.t('qboHostedPay.expired') }}</ui-alert>\n }\n @case ('used') {\n <ui-alert variant=\"success\" [title]=\"labels.t('qboHostedPay.usedTitle')\" data-testid=\"qbo-hosted-used\">{{ labels.t('qboHostedPay.used') }}</ui-alert>\n }\n @case ('success') {\n <ui-alert variant=\"success\" [title]=\"labels.t(effectiveSuccessKind() === 'submitted' ? 'qboHostedPay.submittedTitle' : 'qboHostedPay.successTitle')\" data-testid=\"qbo-hosted-success\">{{ labels.t(effectiveSuccessKind() === 'submitted' ? 'qboHostedPay.submitted' : 'qboHostedPay.success', { amount: amountLabel() }) }}</ui-alert>\n }\n @case ('error') {\n <ui-alert variant=\"danger\" [title]=\"labels.t('qboHostedPay.errorTitle')\" data-testid=\"qbo-hosted-error\">{{ errorMessage() }}</ui-alert>\n }\n @default {\n <!-- a state this screen does not know (cancelled, claimed, an empty string...): never the payment form -->\n <ui-alert variant=\"danger\" [title]=\"labels.t('qboHostedPay.errorTitle')\" data-testid=\"qbo-hosted-error\">{{ errorMessage() || labels.t('qboHostedPay.unavailable') }}</ui-alert>\n }\n }\n }\n <footer class=\"qbh-footer\" data-testid=\"qbo-hosted-footer\">{{ labels.t('qboHostedPay.footer') }}</footer>\n </section>\n `,\n styles: [`\n ui-qbo-hosted-pay { display: block; min-width: 0; }\n ui-qbo-hosted-pay .qbh { max-width: 440px; margin: 0 auto; padding: 24px 16px; }\n ui-qbo-hosted-pay .qbh-header { text-align: center; margin-bottom: 16px; }\n ui-qbo-hosted-pay .qbh-title { overflow-wrap: anywhere; margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--ui-text, #0f172a); }\n ui-qbo-hosted-pay .qbh-company { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 0.9375rem; color: var(--ui-text-muted, #475569); }\n ui-qbo-hosted-pay .qbh-desc { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 0.875rem; color: var(--ui-text-muted, #64748b); }\n ui-qbo-hosted-pay .qbh-body { display: flex; flex-direction: column; gap: 12px; }\n ui-qbo-hosted-pay .qbh-footer { margin-top: 20px; text-align: center; font-size: 0.75rem; color: var(--ui-text-muted, #64748b); }\n `],\n})\nexport class QboHostedPayComponent {\n protected readonly labels = inject(UiLabelsService);\n\n /** Which screen to show. `'form'` / `'processing'` show the payment form (`'processing'` locks it while the host charges the token). */\n readonly state = input<QboHostedPayState>('loading');\n /** The payment form is on screen only for `form` and `processing`; any state this screen does not know shows an error, never the form. */\n protected readonly showForm = computed(() => this.state() === 'form' || this.state() === 'processing');\n readonly companyName = input('');\n /** The amount as the host formats it (`'$125.00'`): used in the title, the button and the success text. */\n readonly amountLabel = input('');\n readonly description = input('');\n /** A message the host words (a failed charge on the form, the load error on the error screen). */\n readonly errorMessage = input('');\n readonly environment = input<QboEnvironment | null>(null);\n readonly methods = input<readonly QboMethod[] | null>(null);\n readonly method = input<QboMethod>('card');\n readonly cardholderName = input('');\n readonly requirePostalCode = input(false);\n /** Passed to the form: the name on the card is required (default: optional). */\n readonly requireName = input(false);\n /** Passed to the form: `'US'` (ZIP, default) or `'CA'` (Canadian postal code). */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** Passed to the form: ask for the bank account number twice (default true). */\n readonly confirmAccountNumber = input(true);\n /** Passed to the form: the wording of the bank authorization checkbox (default: the library text of the active language). */\n readonly achConsentText = input<string | null>(null);\n /** Passed to the form: the bank authorization must be ticked (default true). */\n readonly requireAchConsent = input(true);\n /** Passed to the form: `'payment'` (default) or `'setup'` (button text and authorization wording). */\n readonly mode = input<QboIntentKind>('payment');\n /** Passed to the form: `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). */\n readonly errorDisplay = input<QboErrorDisplay>('friendly');\n /** Passed to the form: replacement texts by Intuit code / library code. */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly errorFallback = input('');\n /** Passed to the form: texts of its screen-reader status region. */\n readonly a11yMessages = input<Partial<QboA11yMessages> | null>(null);\n /** Accessible name of the payment form (default: the library's \"Payment details\"). */\n readonly label = input<string | null>(null);\n protected readonly formLabel = computed(() => this.label() ?? this.labels.t('qboPayment.label'));\n /** `'received'` (a card: the money is taken) or `'submitted'` (a bank transfer: it settles in days). `null` (default) = decided by the method the payer tokenized. */\n readonly successKind = input<'received' | 'submitted' | null>(null);\n private readonly lastMethod = signal<QboMethod | null>(null);\n protected readonly effectiveSuccessKind = computed((): 'received' | 'submitted' => this.successKind() ?? (this.lastMethod() === 'ach' ? 'submitted' : 'received'));\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? (this.amountLabel() ? this.labels.t('qboHostedPay.title', { amount: this.amountLabel() }) : this.labels.t('qboHostedPay.titleNoAmount')));\n protected readonly submitText = computed(() => (this.amountLabel() ? this.labels.t('qboHostedPay.pay', { amount: this.amountLabel() }) : ''));\n\n // ── Duplicate-payment protection and readiness gate: passed to the form (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key (`GET /public/qbo-pay/attempts/{key}`): resolves an UNKNOWN outcome. */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The link is already paid (a reload, the back button): the form shows the paid state and ignores every submit. */\n readonly paid = input(false);\n /** The host's charge call timed out or is ambiguous: the form shows \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and \"Check again\" engage. */\n readonly hostSilenceMs = input(PAYMENT_HOST_SILENCE_MS);\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n readonly inFlightChange = output<boolean>();\n readonly outcome = output<PaymentAttemptOutcome>();\n readonly attemptKeyChange = output<string>();\n readonly readinessChange = output<PaymentReadinessResult>();\n private readonly form = viewChild(QboPaymentComponent);\n\n constructor() {\n // The page says the charge succeeded: settle the form's attempt BEFORE the view swaps the form for the success screen (a component's effect runs before its template is refreshed), so the\n // opaque marker of the attempt is removed and a reopened link is not treated as an undecided payment. An `'error'` state decides nothing (it may be an ambiguous failure).\n effect(() => { if (this.state() === 'success') untracked(() => this.form()?.markSucceeded()); });\n // Development help: the page went back to the form (e.g. with an error message) while the form still waits for the charge to be reported: the payer would see a locked form and no way out.\n effect(() => {\n const state = this.state();\n untracked(() => {\n const attempt = this.form()?.attempt;\n if (isDevMode() && state === 'form' && attempt && (attempt.waitingForHost() || attempt.inFlight())) {\n console.warn('ui-qbo-hosted-pay: state went back to \"form\" while the attempt is still locked: call markFailed() (declined), markNotCharged() (nothing was sent) or markUnknown() on the page first');\n }\n });\n });\n }\n\n /** The host's charge call timed out or is ambiguous: \"Checking your payment...\" and locked (see `checkStatus`). */\n markUnknown(): void { this.form()?.markUnknown(); }\n /** The host's charge succeeded: the form locks for this payable (set `state` to `'success'` as well). */\n markSucceeded(): void { this.form()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused (declined): unlock with a new attempt key. */\n markFailed(): void { this.form()?.markFailed(); }\n /** The host did not use the token and nothing reached the processor (its call never left): unlock, the attempt key is KEPT. */\n markNotCharged(): void { this.form()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.form()?.resetPaid(); }\n\n /** The customer's details were tokenized (inside the browser): send `token` to your backend. */\n readonly tokenized = output<QboTokenizedEvent>();\n /** The form refused the details (validation, or Intuit refused them). The built-in alert of the hosted page shows `message`. */\n readonly failed = output<QboFailure>();\n\n /** The message of the form's last refusal (shown under the form until the next successful tokenization). */\n protected readonly localError = signal('');\n\n protected onFailed(failure: QboFailure): void {\n this.localError.set(failure.message);\n this.failed.emit(failure);\n }\n\n protected onTokenized(event: QboTokenizedEvent): void {\n this.localError.set('');\n this.lastMethod.set(event.method);\n this.tokenized.emit(event);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,wBAAwB;AAErC,MAAa,kBAAkB;AAC/B,MAAa,wBAAwB;AACrC,MAAa,qBAAqB;AAGlC,MAAa,gBAAgB,gBAAwC,GAAG,gBAAgB,eAAe,wBAAwB,qBAAqB;AAEpJ,MAAM,QAAQ,MAAoC,OAAO,MAAM,YAAY,IAAI,IAAI;AAGnF,SAAgB,cAAc,MAAa;CACzC,MAAM,OAAQ,MAAkD;CAChE,IAAI,CAAC,MAAM,QAAQ,IAAI,GAAG,OAAO,CAAA;CACjC,OAAO,KAAK,QAAO,MAAK,CAAC,CAAC,KAAK,OAAO,MAAM,QAAQ,CAAC,CAAC,KAAK,MAA8B;EACvF,MAAM,OAAO,KAAK,EAAE,OAAO;EAAG,MAAM,UAAU,KAAK,EAAE,UAAU;EAAG,MAAM,SAAS,KAAK,EAAE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;EAAA,CAAA;EAAA,gBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,gBAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,kBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,kBAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,iBAAA;EAAA,CAAA;EAAA,MAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,GAAA,iBAAA,mBAAmB,GAAA,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-quickbooks.mjs","names":[],"sources":["../../../projects/forgeroute-ui/quickbooks/src/qbo-tokenizer/qbo-tokenizer.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-validation/qbo-validation.ts","../../../projects/forgeroute-ui/quickbooks/src/errors/qbo-errors.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-payment/qbo-payment.component.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-connect/qbo-connect.flow.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-connect/qbo-connect.component.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-method.models.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-body.component.ts","../../../projects/forgeroute-ui/quickbooks/src/payment-qbo-method/payment-qbo-method.component.ts","../../../projects/forgeroute-ui/quickbooks/src/qbo-hosted-pay/qbo-hosted-pay.component.ts"],"sourcesContent":["import { InjectionToken, type Provider } from '@angular/core';\nimport type { QboBankAccountType } from '../qbo-validation/qbo-validation';\n\n/** Which Intuit host the tokens endpoint is on. */\nexport type QboEnvironment = 'sandbox' | 'production';\n\n/** The card as Intuit's tokens endpoint takes it (`POST /quickbooks/v4/payments/tokens`, body `{ card }`). Lives only for the duration of one call. */\nexport interface QboCardTokenRequest {\n number: string;\n /** Two digits, `'02'`. */\n expMonth: string;\n /** Four digits, `'2028'`. */\n expYear: string;\n cvc: string;\n name?: string;\n /** `country` is sent only for a non-US postal code (`'CA'`); a US ZIP sends none, as before. */\n address?: { postalCode?: string; country?: string };\n}\n\n/** The bank account as Intuit's tokens endpoint takes it (body `{ bankAccount }`). */\nexport interface QboBankTokenRequest {\n name: string;\n routingNumber: string;\n accountNumber: string;\n accountType: QboBankAccountType;\n}\n\nexport type QboTokenizeRequest = { kind: 'card'; card: QboCardTokenRequest } | { kind: 'bank'; bankAccount: QboBankTokenRequest };\n\nexport interface QboTokenizeContext {\n environment: QboEnvironment;\n /** The `Request-Id` header: a new unique value per call (Intuit uses it to make a repeated call idempotent). */\n requestId: string;\n}\n\n/** One entry of Intuit's `errors` array. Only these four text fields are kept; nothing else of the answer is passed on. */\nexport interface QboTokenError {\n code?: string;\n message?: string;\n detail?: string;\n moreInfo?: string;\n}\n\nexport type QboTokenizeResult =\n | { ok: true; token: string }\n /** `status` is the HTTP status, `0` when the request never got an answer (offline, blocked, CORS). */\n | { ok: false; status: number; errors: QboTokenError[] };\n\n/**\n * Exchanges card or bank-account details for a single-use token by talking to Intuit DIRECTLY from the browser. This is the seam of the card data: the default\n * implementation posts to Intuit and nothing else; a spec replaces it with a fake. It must never log, store or forward the request.\n */\nexport type QboTokenizerFn = (request: QboTokenizeRequest, context: QboTokenizeContext) => Promise<QboTokenizeResult>;\n\n/** How long the tokens call may take before it is aborted (a stalled connection). */\nexport const QBO_TOKENS_TIMEOUT_MS = 30_000;\n\nexport const QBO_TOKENS_PATH = '/quickbooks/v4/payments/tokens';\nexport const QBO_PRODUCTION_ORIGIN = 'https://api.intuit.com';\nexport const QBO_SANDBOX_ORIGIN = 'https://sandbox.api.intuit.com';\n\n/** The tokens endpoint of an environment. */\nexport const qboTokensUrl = (environment: QboEnvironment): string => `${environment === 'production' ? QBO_PRODUCTION_ORIGIN : QBO_SANDBOX_ORIGIN}${QBO_TOKENS_PATH}`;\n\nconst text = (v: unknown): string | undefined => (typeof v === 'string' && v ? v : undefined);\n\n/** The `errors` of an Intuit answer reduced to code / message / detail / moreInfo strings. */\nexport function readQboErrors(body: unknown): QboTokenError[] {\n const list = (body as { errors?: unknown } | null | undefined)?.errors;\n if (!Array.isArray(list)) return [];\n return list.filter(e => !!e && typeof e === 'object').map((e: Record<string, unknown>) => {\n const code = text(e['code']); const message = text(e['message']); const detail = text(e['detail']); const moreInfo = text(e['moreInfo']);\n return { ...(code ? { code } : {}), ...(message ? { message } : {}), ...(detail ? { detail } : {}), ...(moreInfo ? { moreInfo } : {}) };\n });\n}\n\n/**\n * The default tokenizer: one `fetch` POST to Intuit's tokens endpoint (production or sandbox host by `environment`) with `Content-Type: application/json` and a `Request-Id`\n * header. No cookies are sent (`credentials: 'omit'`), no referrer, nothing is cached, and the body is only the card / bank object. The tokens endpoint needs no\n * authorization: the single-use token it answers is only useful to the seller's connected QuickBooks Payments account.\n */\nexport const defaultQboTokenizer: QboTokenizerFn = async (request, context) => {\n const body = JSON.stringify(request.kind === 'card' ? { card: request.card } : { bankAccount: request.bankAccount });\n // A stalled connection must not leave the form locked for ever: after QBO_TOKENS_TIMEOUT_MS the request is aborted and counts as \"no answer\" (status 0).\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), QBO_TOKENS_TIMEOUT_MS);\n try {\n let response: Response;\n try {\n response = await fetch(qboTokensUrl(context.environment), {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', Accept: 'application/json', 'Request-Id': context.requestId },\n body,\n mode: 'cors',\n credentials: 'omit',\n cache: 'no-store',\n referrerPolicy: 'no-referrer',\n signal: controller.signal,\n });\n } catch {\n return { ok: false, status: 0, errors: [] };\n }\n let answer: unknown = null;\n try { answer = await response.json(); } catch { answer = null; }\n if (controller.signal.aborted) return { ok: false, status: 0, errors: [] };\n const value = (answer as { value?: unknown } | null)?.value;\n if (response.ok && typeof value === 'string' && value) return { ok: true, token: value };\n return { ok: false, status: response.ok ? 502 : response.status, errors: readQboErrors(answer) };\n } finally {\n clearTimeout(timer);\n }\n};\n\n/** How the tokens are requested. Provide your own to fake Intuit in tests. Defaults to `defaultQboTokenizer`. */\nexport const QBO_TOKENIZER = new InjectionToken<QboTokenizerFn>('QBO_TOKENIZER', { providedIn: 'root', factory: () => defaultQboTokenizer });\n\n/** App-wide defaults for every QuickBooks Payments component, set once with `provideQboPayment`. A value on the component always wins. */\nexport interface QboPaymentDefaults {\n /** `'production'` or `'sandbox'` (default `'sandbox'`: a forgotten setting never talks to the real endpoint). */\n environment?: QboEnvironment;\n}\n\nexport const QBO_PAYMENT_DEFAULTS = new InjectionToken<QboPaymentDefaults>('QBO_PAYMENT_DEFAULTS', { providedIn: 'root', factory: () => ({}) });\n\nexport interface ProvideQboPaymentOptions extends QboPaymentDefaults {\n /** Replaces how the tokens are requested (tests). */\n tokenizer?: QboTokenizerFn;\n}\n\n/**\n * Global defaults for the QuickBooks Payments components:\n *\n * providers: [provideQboPayment({ environment: 'production' })]\n */\nexport function provideQboPayment(options: ProvideQboPaymentOptions = {}): Provider[] {\n const { tokenizer, ...defaults } = options;\n const providers: Provider[] = [{ provide: QBO_PAYMENT_DEFAULTS, useValue: defaults }];\n if (tokenizer) providers.push({ provide: QBO_TOKENIZER, useValue: tokenizer });\n return providers;\n}\n\n/** A new `Request-Id` (a UUID, with a time + random fallback for a browser without `crypto.randomUUID`). */\nexport function newQboRequestId(): string {\n const c = typeof crypto !== 'undefined' ? crypto : undefined;\n return c && 'randomUUID' in c ? c.randomUUID() : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;\n}\n","/**\n * Pure validation and formatting helpers of the QuickBooks Payments card / bank-account form. They never log, store or return more than a verdict: a function that\n * answers an \"issue\" answers a short code (`'required'`, `'length'`, `'luhn'`, ...), never the value, and the component turns the code into text.\n */\n\nexport type QboCardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'diners' | 'jcb';\nexport type QboBankAccountType = 'PERSONAL_CHECKING' | 'PERSONAL_SAVINGS' | 'BUSINESS_CHECKING' | 'BUSINESS_SAVINGS';\n\n/** The account types Intuit accepts for a bank-account token (`bankAccount.accountType`). */\nexport const QBO_BANK_ACCOUNT_TYPES: readonly QboBankAccountType[] = ['PERSONAL_CHECKING', 'PERSONAL_SAVINGS', 'BUSINESS_CHECKING', 'BUSINESS_SAVINGS'];\n\nexport const digitsOnly = (value: string | null | undefined): string => (value ?? '').replace(/\\D/g, '');\n\n/** The Luhn checksum of a card number (digits only; an empty string or a non-digit is invalid). */\nexport function luhnValid(value: string): boolean {\n if (!/^\\d+$/.test(value)) return false;\n let sum = 0;\n let double = false;\n for (let i = value.length - 1; i >= 0; i--) {\n let digit = value.charCodeAt(i) - 48;\n if (double) { digit *= 2; if (digit > 9) digit -= 9; }\n sum += digit;\n double = !double;\n }\n return sum % 10 === 0;\n}\n\n/** The brand a card number belongs to by its leading digits (the number may still be incomplete); `null` when unknown. */\nexport function detectCardBrand(value: string): QboCardBrand | null {\n const d = digitsOnly(value);\n if (!d) return null;\n if (/^3[47]/.test(d)) return 'amex';\n if (/^4/.test(d)) return 'visa';\n if (/^(5[1-5]|222[1-9]|22[3-9]\\d|2[3-6]\\d\\d|27[01]\\d|2720)/.test(d)) return 'mastercard';\n if (/^(6011|65|64[4-9]|622)/.test(d)) return 'discover';\n if (/^(30[0-5]|36|38|39)/.test(d)) return 'diners';\n if (/^35(2[89]|[3-8])/.test(d)) return 'jcb';\n return null;\n}\n\n/** The lengths a number of that brand may have (an unknown brand: 13 to 19). */\nexport function cardLengthsFor(brand: QboCardBrand | null): readonly number[] {\n switch (brand) {\n case 'visa': return [13, 16, 19];\n case 'mastercard': return [16];\n case 'amex': return [15];\n case 'discover': return [16, 17, 18, 19];\n case 'diners': return [14, 15, 16, 17, 18, 19];\n case 'jcb': return [16, 17, 18, 19];\n default: return [13, 14, 15, 16, 17, 18, 19];\n }\n}\n\n/** The number grouped for reading: 4-6-5 for American Express, groups of four otherwise. Digits only in, at most 19 digits (15 for Amex). */\nexport function formatCardNumber(value: string): string {\n const brand = detectCardBrand(value);\n const d = digitsOnly(value).slice(0, brand === 'amex' ? 15 : 19);\n if (brand === 'amex') return [d.slice(0, 4), d.slice(4, 10), d.slice(10)].filter(Boolean).join(' ');\n return (d.match(/.{1,4}/g) ?? []).join(' ');\n}\n\n/** `'required'` (empty), `'length'` (digits cannot be a number of that brand) or `'luhn'` (the checksum fails); `null` when the number is plausible. */\nexport function cardNumberIssue(value: string): 'required' | 'length' | 'luhn' | null {\n const d = digitsOnly(value);\n if (!d) return 'required';\n if (!cardLengthsFor(detectCardBrand(d)).includes(d.length)) return 'length';\n return luhnValid(d) ? null : 'luhn';\n}\n\n/** The security code lengths of a brand: 4 for American Express, 3 for the others (an unknown brand: 3 or 4). */\nexport function cvcLengthsFor(brand: QboCardBrand | null): readonly number[] {\n return brand === 'amex' ? [4] : brand ? [3] : [3, 4];\n}\n\nexport function cvcIssue(value: string, brand: QboCardBrand | null): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d+$/.test(raw) && cvcLengthsFor(brand).includes(raw.length) ? null : 'length';\n}\n\n/** Types the expiry as `MM/YY`: digits only, the slash after the month, a first digit 2-9 becomes `0X`. At most `MM/YYYY`. */\nexport function formatExpiry(value: string): string {\n let d = digitsOnly(value).slice(0, 6);\n if (d.length === 1 && d > '1') d = `0${d}`;\n return d.length >= 3 ? `${d.slice(0, 2)}/${d.slice(2)}` : d;\n}\n\n/** `MM/YY`, `MM/YYYY`, `M/YY`, `MMYY` or `MMYYYY` as a month and a four-digit year; `null` when it cannot be read. The month is not range-checked here. */\nexport function parseExpiry(value: string): { month: number; year: number } | null {\n const text = (value ?? '').trim();\n let month: string;\n let year: string;\n if (text.includes('/')) {\n const parts = text.split('/');\n if (parts.length !== 2) return null;\n [month, year] = parts.map(p => p.trim());\n } else {\n if (!/^\\d{4}$|^\\d{6}$/.test(text)) return null;\n month = text.slice(0, 2);\n year = text.slice(2);\n }\n if (!/^\\d{1,2}$/.test(month) || !/^(\\d{2}|\\d{4})$/.test(year)) return null;\n return { month: Number(month), year: year.length === 2 ? 2000 + Number(year) : Number(year) };\n}\n\n/** `'required'`, `'format'` (not `MM/YY`), `'month'` (not 1-12), `'past'` (the card expired: the month is valid through its last day); `null` when fine. */\nexport function expiryIssue(value: string, now: Date = new Date()): 'required' | 'format' | 'month' | 'past' | null {\n if (!(value ?? '').trim()) return 'required';\n const parsed = parseExpiry(value);\n if (!parsed) return 'format';\n if (parsed.month < 1 || parsed.month > 12) return 'month';\n const thisYear = now.getFullYear();\n const thisMonth = now.getMonth() + 1;\n return parsed.year < thisYear || (parsed.year === thisYear && parsed.month < thisMonth) ? 'past' : null;\n}\n\n/**\n * `'required'` (empty) or `'length'` (not exactly 9 digits); `null` when the format is right. There is deliberately NO checksum here: Intuit validates the real number, and a\n * client-side ABA checksum would reject the sandbox / test routing numbers (and a bank's brand-new number) before Intuit ever saw them. Same rule as `ui-bank-account-form`.\n */\nexport function routingIssue(value: string): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d{9}$/.test(raw) ? null : 'length';\n}\n\n/** US bank account numbers are 4 to 17 digits. */\nexport function accountNumberIssue(value: string): 'required' | 'length' | null {\n const raw = (value ?? '').trim();\n if (!raw) return 'required';\n return /^\\d{4,17}$/.test(raw) ? null : 'length';\n}\n\n/** Where the card's postal code is from: a US ZIP or a Canadian postal code. */\nexport type QboPostalCountry = 'US' | 'CA';\n\n/** A Canadian postal code: `A1A 1A1` / `A1A1A1` (the letters D, F, I, O, Q, U never appear; W and Z not as the first letter). */\nconst CA_POSTAL = /^[ABCEGHJ-NPRSTVXY]\\d[ABCEGHJ-NPRSTV-Z][ -]?\\d[ABCEGHJ-NPRSTV-Z]\\d$/i;\n\n/** A US ZIP (`12345` or `12345-6789` / `123456789`) or, for `country` `'CA'`, a Canadian postal code. Empty is fine unless `required`. */\nexport function postalCodeIssue(value: string, required = false, country: QboPostalCountry = 'US'): 'required' | 'format' | null {\n const raw = (value ?? '').trim();\n if (!raw) return required ? 'required' : null;\n return (country === 'CA' ? CA_POSTAL.test(raw) : /^\\d{5}(-?\\d{4})?$/.test(raw)) ? null : 'format';\n}\n\n/**\n * Replaces every run of 4 or more digits (a card, routing or account number, or a part of one, that an error text might echo) with a mask. A run may hold single spaces or\n * dashes between its digits (`4242 4242`, `011-000-015`); a short number such as an HTTP status (`400`, `401`) or a field index is kept.\n */\nexport function scrubDigits(text: string): string {\n return (text ?? '').replace(/\\d(?:[ -]?\\d)+/g, run => (run.replace(/\\D/g, '').length >= 4 ? '•••' : run));\n}\n","import { UiLabelKey, uiText } from '@forgeroute/ui/core';\nimport { scrubDigits } from '../qbo-validation/qbo-validation';\nimport type { QboTokenError } from '../qbo-tokenizer/qbo-tokenizer';\n\n/**\n * The request field an Intuit validation error is about, read from the error's `detail` / `message` (Intuit names the JSON path, e.g. `card.expMonth`).\n * Order matters: the longer names come first.\n */\nexport const QBO_FIELD_ERROR_KEYS: ReadonlyArray<readonly [needle: string, key: UiLabelKey]> = [\n ['card.number', 'qboErrors.field.cardNumber'],\n ['card.expmonth', 'qboErrors.field.expiry'],\n ['card.expyear', 'qboErrors.field.expiry'],\n ['card.cvc', 'qboErrors.field.cvc'],\n ['postalcode', 'qboErrors.field.postalCode'],\n ['bankaccount.routingnumber', 'qboErrors.field.routing'],\n ['bankaccount.accountnumber', 'qboErrors.field.account'],\n ['bankaccount.accounttype', 'qboErrors.field.accountType'],\n ['bankaccount.name', 'qboErrors.field.holder'],\n];\n\n/** `'friendly'` (default): the field table, then the HTTP status. `'intuit'`: Intuit's own `message` (digits masked), the fallback when there is none. */\nexport type QboErrorDisplay = 'friendly' | 'intuit';\n\nexport interface QboErrorMessageOptions {\n display?: QboErrorDisplay;\n /** Text for single Intuit error codes (`PMT-4000`); wins over the tables. */\n overrides?: Readonly<Record<string, string>> | null;\n /** Shown in `'intuit'` display when Intuit sent no text (the friendly mode always has a status text). */\n fallback?: string;\n}\n\n/** The text key of an HTTP status of the tokens endpoint. */\nexport function qboStatusKey(status: number): UiLabelKey {\n if (status === 0) return 'qboErrors.status.network';\n if (status === 400 || status === 422) return 'qboErrors.status.invalid';\n if (status === 401 || status === 403) return 'qboErrors.status.notAllowed';\n if (status === 429) return 'qboErrors.status.rateLimited';\n return 'qboErrors.status.unavailable';\n}\n\n/**\n * The text to show the customer for a failed token request. Friendly mode: an override by Intuit code, then the card / bank field the error names, then the status\n * (network, invalid details, not allowed, too many requests, service unavailable). It never echoes a number the customer typed.\n */\nexport function getQboErrorMessage(status: number, errors: readonly QboTokenError[] = [], options: QboErrorMessageOptions = {}): string {\n const first = errors[0];\n if (options.display === 'intuit') return first?.message ? scrubDigits(first.message) : options.fallback ?? uiText('qboErrors.defaultMessage');\n for (const e of errors) {\n if (e.code && options.overrides?.[e.code]) return options.overrides[e.code];\n }\n const haystack = `${first?.detail ?? ''} ${first?.message ?? ''}`.toLowerCase();\n for (const [needle, key] of QBO_FIELD_ERROR_KEYS) {\n if (haystack.includes(needle)) return uiText(key);\n }\n return uiText(qboStatusKey(status));\n}\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, afterNextRender, Injector, computed, effect, inject, input, model, output, signal, untracked, ViewEncapsulation } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { ButtonComponent, UiLabelsService, uiText } from '@forgeroute/ui/core';\nimport { CheckboxComponent } from '@forgeroute/ui/checkbox';\nimport { FormRowComponent } from '@forgeroute/ui/form-row';\nimport { FormSectionComponent } from '@forgeroute/ui/form-section';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_HOST_SILENCE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentAttemptStatusComponent, createPaymentProtection, type CheckPaymentStatusFn, type PaymentAttempt, type PaymentAttemptOutcome, type PaymentReadiness, type PaymentReadinessResult, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport { PillTabsComponent, type PillTab } from '@forgeroute/ui/pill-tabs';\nimport { SelectComponent, type SelectOption } from '@forgeroute/ui/select';\nimport { TextComponent } from '@forgeroute/ui/text';\nimport { TextInputComponent } from '@forgeroute/ui/text-input';\nimport { QBO_PAYMENT_DEFAULTS, QBO_TOKENIZER, newQboRequestId, type QboBankTokenRequest, type QboCardTokenRequest, type QboEnvironment, type QboTokenizeRequest, type QboTokenizeResult } from '../qbo-tokenizer/qbo-tokenizer';\nimport {\n QBO_BANK_ACCOUNT_TYPES, accountNumberIssue, cardNumberIssue, cvcIssue, cvcLengthsFor, detectCardBrand, digitsOnly, expiryIssue, formatCardNumber, formatExpiry, parseExpiry, postalCodeIssue, routingIssue, scrubDigits,\n type QboBankAccountType, type QboPostalCountry,\n} from '../qbo-validation/qbo-validation';\nimport { getQboErrorMessage, type QboErrorDisplay, type QboErrorMessageOptions } from '../errors/qbo-errors';\nimport type { QboFailure, QboIntentKind, QboMethod, QboTokenDetails, QboTokenizedEvent } from './qbo-outcomes';\n\n/** The texts of the screen-reader status region. */\nexport interface QboA11yMessages {\n processing: string;\n tokenized: string;\n}\n\n/** The screen-reader messages of the payment form; read on every access, so they follow the app's active language. */\nexport const QBO_A11Y_MESSAGES: Readonly<QboA11yMessages> = {\n get processing() { return uiText('qboPayment.a11y.processing'); },\n get tokenized() { return uiText('qboPayment.a11y.tokenized'); },\n};\n\nlet nextId = 0;\nconst digitsMax = (max: number) => (raw: string): string => digitsOnly(raw).slice(0, max);\nconst zipFormatter = (raw: string): string => raw.replace(/[^\\d-]/g, '').slice(0, 10);\nconst caPostalFormatter = (raw: string): string => raw.toUpperCase().replace(/[^A-Z0-9 -]/g, '').slice(0, 7);\n\n/** What the form needs to know to be tokenized without ever keeping the values: read, sent, forgotten. */\ninterface Dispatched {\n promise: Promise<QboTokenizeResult>;\n details: QboTokenDetails;\n requestId: string;\n}\n\n/**\n * QuickBooks Payments card / bank-account form that tokenizes IN THE BROWSER: the numbers go from this form straight to Intuit's tokens endpoint and never to your\n * backend (or to the payments service). The component collects the fields with the library inputs, validates them (Luhn, expiry, security code length by brand,\n * routing format (9 digits; no ABA checksum), account length, ZIP / Canadian postal code) with inline messages, posts them through the `QBO_TOKENIZER` seam, CLEARS every field (and re-creates the inputs) the moment the\n * request is on its way, and emits `(tokenized)` with the single-use token and the brand / last four, or `(failed)`.\n *\n * <ui-qbo-payment environment=\"production\" [methods]=\"['card', 'ach']\" (tokenized)=\"onToken($event)\" (failed)=\"onFailed($event)\" />\n *\n * Typing a card number into a page of your own still puts that page in PCI DSS SAQ A-EP scope (see docs/quickbooks-payments.md: CSP, no logging, no analytics on the\n * page, autocomplete attributes, never store the values).\n */\n@Component({\n selector: 'ui-qbo-payment',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, CheckboxComponent, FormRowComponent, FormSectionComponent, FormsModule, HintComponent, LiveRegionComponent, PaymentAttemptStatusComponent, PillTabsComponent, SelectComponent, TextComponent, TextInputComponent],\n host: { '[attr.aria-busy]': '!mountOnly() && submitting() ? \"true\" : null' },\n template: `\n <div class=\"qbp\">\n @if (!mountOnly() && showStatus()) {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"allowStartOver()\" [showPaid]=\"showPaid()\" />\n }\n @if (!mountOnly() || a11yMessages()) {\n <ui-live-region data-testid=\"qbo-status\" [message]=\"statusText()\" />\n }\n @if (!mountOnly() && required()) {\n <div class=\"qbp-label\" data-testid=\"qbo-required-label\">{{ label() }}<span class=\"qbp-required\" aria-hidden=\"true\">*</span></div>\n }\n @if (tabs().length > 1) {\n <div class=\"qbp-block\"><ui-pill-tabs [ariaLabel]=\"labels.t('qboPayment.method.group')\" [tabs]=\"tabs()\" [activeKey]=\"method()\" (tabChange)=\"onTab($event)\" /></div>\n }\n @for (key of formKeys(); track key) {\n <div class=\"qbp-form\" role=\"group\" [attr.aria-label]=\"label()\" [attr.data-testid]=\"method() === 'card' ? 'qbo-card-form' : 'qbo-bank-form'\">\n @if (method() === 'card') {\n <ui-form-section>\n <ui-text-input [label]=\"labels.t('qboPayment.card.number')\" [inputTestId]=\"'qbo-card-number'\" placeholder=\"1234 5678 9012 3456\" inputmode=\"numeric\" autocomplete=\"cc-number\"\n [required]=\"true\" [maxlength]=\"23\" [formatter]=\"formatNumber\" [error]=\"numberError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\" [hint]=\"brandHint()\"\n [ngModel]=\"number()\" (ngModelChange)=\"number.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t(requireName() ? 'qboPayment.card.name' : 'qboPayment.card.nameOptional')\" [inputTestId]=\"'qbo-card-name'\" autocomplete=\"cc-name\" [required]=\"requireName()\"\n [maxlength]=\"255\" [showErrors]=\"attempted()\" [disabled]=\"locked()\" [ngModel]=\"cardName()\" (ngModelChange)=\"cardName.set($event ?? ''); edited()\" />\n <ui-form-row>\n <ui-text-input [label]=\"labels.t('qboPayment.card.expiry')\" [inputTestId]=\"'qbo-card-expiry'\" [placeholder]=\"labels.t('qboPayment.card.expiryPlaceholder')\" inputmode=\"numeric\" autocomplete=\"cc-exp\"\n [required]=\"true\" [maxlength]=\"7\" [formatter]=\"formatExpiryText\" [error]=\"expiryError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"expiry()\" (ngModelChange)=\"expiry.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t('qboPayment.card.cvc')\" [inputTestId]=\"'qbo-card-cvc'\" placeholder=\"123\" inputmode=\"numeric\" autocomplete=\"cc-csc\"\n [required]=\"true\" [maxlength]=\"4\" [formatter]=\"cvcFormatter\" [error]=\"cvcError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"cvc()\" (ngModelChange)=\"cvc.set($event ?? ''); edited()\" />\n </ui-form-row>\n <ui-text-input [label]=\"labels.t(requirePostalCode() ? 'qboPayment.card.postal' : 'qboPayment.card.postalOptional')\" [inputTestId]=\"'qbo-card-postal'\" [placeholder]=\"postalPlaceholder()\" [inputmode]=\"postalInputMode()\"\n autocomplete=\"postal-code\" [required]=\"requirePostalCode()\" [maxlength]=\"postalMaxLength()\" [formatter]=\"postalFormatter()\" [error]=\"postalError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"postal()\" (ngModelChange)=\"postal.set($event ?? ''); edited()\" />\n </ui-form-section>\n } @else {\n <ui-form-section>\n <ui-text data-testid=\"qbo-bank-info\" size=\"sm\" tone=\"muted\" [text]=\"labels.t('qboPayment.bank.info')\" />\n <ui-text-input [label]=\"labels.t('qboPayment.bank.holder')\" [inputTestId]=\"'qbo-bank-holder'\" autocomplete=\"name\" [required]=\"true\" [maxlength]=\"255\"\n [showErrors]=\"attempted()\" [disabled]=\"locked()\" [ngModel]=\"holder()\" (ngModelChange)=\"holder.set($event ?? ''); edited()\" />\n <ui-form-row>\n <ui-text-input [label]=\"labels.t('qboPayment.bank.routing')\" [inputTestId]=\"'qbo-bank-routing'\" [placeholder]=\"labels.t('qboPayment.bank.routingPlaceholder')\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"9\" [formatter]=\"routingFormatter\" [error]=\"routingError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"routing()\" (ngModelChange)=\"routing.set($event ?? ''); edited()\" />\n <ui-text-input [label]=\"labels.t('qboPayment.bank.account')\" [inputTestId]=\"'qbo-bank-account'\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"17\" [formatter]=\"accountFormatter\" [error]=\"accountError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"account()\" (ngModelChange)=\"account.set($event ?? ''); edited()\" />\n </ui-form-row>\n @if (confirmAccountNumber()) {\n <ui-text-input [label]=\"labels.t('qboPayment.bank.confirm')\" [inputTestId]=\"'qbo-bank-confirm'\" inputmode=\"numeric\" autocomplete=\"off\"\n [required]=\"true\" [maxlength]=\"17\" [formatter]=\"accountFormatter\" [error]=\"confirmError()\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"confirm()\" (ngModelChange)=\"confirm.set($event ?? ''); edited()\" />\n }\n <ui-select [label]=\"labels.t('qboPayment.bank.type')\" data-testid=\"qbo-bank-type\" [options]=\"accountTypeOptions()\" [required]=\"true\" [showErrors]=\"attempted()\" [disabled]=\"locked()\"\n [ngModel]=\"accountType()\" (ngModelChange)=\"accountType.set($event); edited()\" />\n @if (requireAchConsent()) {\n <ui-checkbox testId=\"qbo-consent\" [label]=\"achConsent()\" [required]=\"true\" [requiredMessage]=\"labels.t('qboPayment.consentRequired')\" [showErrors]=\"attempted()\"\n [disabled]=\"locked()\" [ngModel]=\"consent()\" (ngModelChange)=\"consent.set(!!$event); edited()\" />\n }\n </ui-form-section>\n }\n </div>\n }\n @if (!mountOnly()) {\n <ui-hint class=\"qbp-secure\" data-testid=\"qbo-secure-note\">{{ labels.t('qboPayment.secureNote') }}</ui-hint>\n }\n @if (!mountOnly() && errorText(); as text) {\n <div class=\"qbp-block\" [id]=\"errorId\" data-testid=\"qbo-error\"><ui-alert variant=\"danger\">{{ text }}</ui-alert></div>\n }\n @if (!mountOnly() && showSubmit()) {\n <div class=\"qbp-actions\">\n <ui-button variant=\"primary\" type=\"button\" [fullWidth]=\"true\" [loading]=\"submitting()\" [disabled]=\"disabled() || pending() || attempt.locked() || !readiness.ready()\" [ariaDescribedBy]=\"errorText() ? errorId : undefined\"\n data-testid=\"qbo-submit\" (click)=\"tokenize()\">{{ effectiveSubmitLabel() }}</ui-button>\n </div>\n }\n </div>\n `,\n styles: [`\n ui-qbo-payment { display: block; min-width: 0; }\n ui-qbo-payment .qbp { position: relative; }\n ui-qbo-payment .qbp-block { margin-top: 12px; }\n ui-qbo-payment .qbp-label { font-size: 0.875rem; font-weight: 500; color: var(--ui-text, #1e293b); margin-bottom: 6px; }\n ui-qbo-payment .qbp-required { color: var(--ui-danger, #dc2626); margin-left: 2px; }\n ui-qbo-payment .qbp-form { margin-top: 12px; }\n ui-qbo-payment .qbp-secure { margin-top: 12px; }\n /* The submit button fills the row on every screen: a flex column stretches the (inline-flex) ui-button host, and [fullWidth] stretches its button. */\n ui-qbo-payment .qbp-actions { margin-top: 16px; display: flex; flex-direction: column; align-items: stretch; }\n `],\n})\nexport class QboPaymentComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly tokenizer = inject(QBO_TOKENIZER);\n private readonly defaults = inject(QBO_PAYMENT_DEFAULTS);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n // ── Inputs ─────────────────────────────────────────────────────────────\n /**\n * Mount-only mode: the fields (and the method switcher when `methods` has two) only. No submit button, secure note, required heading, status text (unless `a11yMessages` is set) or\n * error alert: failures go to `(failed)` only. The host keeps its own button and calls `tokenize()`; the typed values are still read, sent and cleared by it.\n */\n readonly mountOnly = input(false);\n /** `'payment'` takes a payment, `'setup'` keeps the method on file (changes the default button text). */\n readonly mode = input<QboIntentKind>('payment');\n /** The method shown: `'card'` or `'ach'` (a bank account). Two-way. */\n readonly method = model<QboMethod>('card');\n /** The methods the customer may pick between (a switcher is shown for two or more); `null` = only the `method` above. */\n readonly methods = input<readonly QboMethod[] | null>(null);\n /** `'production'` or `'sandbox'` (default: the provider's, else `'sandbox'`). Decides which Intuit host the tokens are requested from. */\n readonly environment = input<QboEnvironment | null>(null);\n /** Pre-fills the name on the card and the account holder; the customer can edit it. */\n readonly cardholderName = input('');\n /** The name on the card is required (default: optional, Intuit does not need it). */\n readonly requireName = input(false);\n /** The postal code is required (default: optional). */\n readonly requirePostalCode = input(false);\n /** Where the card's postal code is from: `'US'` (a ZIP: `12345` or `12345-6789`, the default) or `'CA'` (a Canadian code: `A1A 1A1`). Sent to Intuit as `address.country` only for `'CA'`. */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** Ask for the account number twice (default true). */\n readonly confirmAccountNumber = input(true);\n /** ACH: the authorization checkbox must be ticked (default true: a bank debit needs the account holder's authorization). */\n readonly requireAchConsent = input(true);\n readonly achConsentTextInput = input<string | null>(null, { alias: 'achConsentText' });\n readonly achConsent = computed(() => this.achConsentTextInput() ?? this.labels.t(this.mode() === 'setup' ? 'qboPayment.achConsentSetup' : 'qboPayment.achConsent'));\n\n /** Show the built-in attempt / readiness status block (a payment plugin that embeds this form shows its own and turns this off). */\n readonly showStatus = input(true);\n /** Show the paid state of the attempt status (default true). A form whose host shows its own success notice sets it off while that notice is up. */\n readonly showPaid = input(true);\n\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies for the charge; empty = the component generates one per payment attempt session (see `attemptKeyChange`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (`'succeeded' | 'failed' | 'checking' | 'in_flight' | 'awaiting_verification'` (`'unknown'` = the old name of `'checking'`, still accepted)). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): the form shows the paid state and ignores every submit for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call (its own timeout): the form goes to \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and \"Check again\" engage. */\n readonly hostSilenceMs = input(PAYMENT_HOST_SILENCE_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n\n // Presentation\n readonly submitLabel = input('');\n /** Show the built-in submit button; turn off to use your own and call `tokenize()`. */\n readonly showSubmit = input(true);\n readonly disabled = input(false);\n /** The host is still preparing the form: the fields and the button are off. */\n readonly pending = input(false);\n /** Accessible name of the payment form. */\n readonly labelInput = input<string | null>(null, { alias: 'label' });\n readonly label = computed(() => this.labelInput() ?? this.labels.t('qboPayment.label'));\n /** The payment details are required (a required wizard step): a visible heading with a red asterisk is shown above the form. Not shown in `mountOnly` mode. */\n readonly required = input(false);\n /** Show failures in the built-in alert. Turn off when the host shows `(failed)` itself. */\n readonly showErrors = input(true);\n /** `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). See `getQboErrorMessage`. */\n readonly errorDisplay = input<QboErrorDisplay>('friendly');\n /** Replacement texts by code: Intuit error codes AND the library's own codes (`validation`, `network`, ...). */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly errorFallback = input('');\n /** Texts of the screen-reader status region (translate them); missing keys keep the defaults. */\n readonly a11yMessages = input<Partial<QboA11yMessages> | null>(null);\n\n // ── Outputs ────────────────────────────────────────────────────────────\n /** The details were tokenized: send `token` to your backend. The typed values are already gone from the form. */\n readonly tokenized = output<QboTokenizedEvent>();\n /** A step failed (validation, or Intuit refused the details). `message` is ready to show. */\n readonly failed = output<QboFailure>();\n /**\n * The payer edited a field (typing, picking the account type, ticking the authorization). The built-in error alert clears itself at the same moment; a host that shows its own decline banner from `(failed)` or from its\n * charge result clears it here, so a stale \"card declined\" never stays next to details the payer is already correcting. Never emitted for changes the form makes itself (clearing after a token, a method switch).\n */\n readonly detailsChange = output<void>();\n /** A step of an attempt started / ended (the synchronous lock). */\n readonly inFlightChange = output<boolean>();\n /** Unified outcome of a payment attempt: `succeeded`, `failed`, `unknown`, `refused` (with `reason`), `pending`. */\n readonly outcome = output<PaymentAttemptOutcome>();\n /** The attempt key in effect (also on `tokenized`): send it to your backend with the charge. */\n readonly attemptKeyChange = output<string>();\n /** The readiness gate changed: `{ ready, reasons }`. */\n readonly readinessChange = output<PaymentReadinessResult>();\n\n // ── State (the typed values live only in these signals until tokenize() reads and clears them) ──\n readonly submitting = signal(false);\n readonly errorText = signal('');\n private readonly announcement = signal('');\n protected readonly attempted = signal(false);\n private readonly formKey = signal(0);\n protected readonly formKeys = computed(() => [this.formKey()]);\n\n protected readonly number = signal('');\n protected readonly cardName = signal('');\n protected readonly expiry = signal('');\n protected readonly cvc = signal('');\n protected readonly postal = signal('');\n protected readonly holder = signal('');\n protected readonly routing = signal('');\n protected readonly account = signal('');\n protected readonly confirm = signal('');\n protected readonly accountType = signal<QboBankAccountType>('PERSONAL_CHECKING');\n protected readonly consent = signal(false);\n\n protected readonly errorId = `ui-qbo-error-${nextId++}`;\n protected readonly formatNumber = formatCardNumber;\n protected readonly formatExpiryText = formatExpiry;\n protected readonly cvcFormatter = digitsMax(4);\n protected readonly postalFormatter = computed(() => (this.postalCountry() === 'CA' ? caPostalFormatter : zipFormatter));\n protected readonly postalPlaceholder = computed(() => (this.postalCountry() === 'CA' ? 'A1A 1A1' : '94086'));\n protected readonly postalInputMode = computed(() => (this.postalCountry() === 'CA' ? 'text' as const : 'numeric' as const));\n protected readonly postalMaxLength = computed(() => (this.postalCountry() === 'CA' ? 7 : 10));\n protected readonly routingFormatter = digitsMax(9);\n protected readonly accountFormatter = digitsMax(17);\n\n protected readonly tabs = computed((): PillTab[] => {\n const methods = this.methods();\n if (!methods || methods.length < 2) return [];\n return methods.map(m => ({ key: m, label: this.labels.t(m === 'card' ? 'qboPayment.method.card' : 'qboPayment.method.ach') }));\n });\n protected readonly accountTypeOptions = computed((): SelectOption<string>[] => QBO_BANK_ACCOUNT_TYPES.map(value => ({ value, label: this.labels.t(`qboPayment.bank.type.${value}` as const) })));\n protected readonly locked = computed(() => this.disabled() || this.pending() || this.submitting() || this.attempt.locked());\n protected readonly brand = computed(() => detectCardBrand(this.number()));\n protected readonly brandHint = computed(() => { const brand = this.brand(); return brand ? this.labels.t(`qboPayment.brand.${brand}` as const) : ''; });\n protected readonly effectiveSubmitLabel = computed(() => {\n const given = this.submitLabel();\n if (given) return given;\n const setup = this.mode() === 'setup';\n return this.labels.t(this.method() === 'ach' ? (setup ? 'qboPayment.submit.saveBank' : 'qboPayment.submit.payBank') : (setup ? 'qboPayment.submit.saveCard' : 'qboPayment.submit.pay'));\n });\n private readonly messages = computed((): QboA11yMessages => {\n const given = Object.fromEntries(Object.entries(this.a11yMessages() ?? {}).filter(([, text]) => typeof text === 'string')) as Partial<QboA11yMessages>;\n return { ...QBO_A11Y_MESSAGES, ...given };\n });\n protected readonly statusText = computed(() => (this.submitting() ? this.messages().processing : this.announcement()));\n private destroyed = false;\n /** The method whose fields are on screen; a change clears the typed values (a card number must not linger in the bank form's state, nor the other way round). */\n private shownMethod: QboMethod | null = null;\n /** The country whose postal rule the typed code was written for; a change empties the code (a ZIP is not a Canadian postal code and the other way round). */\n private shownCountry: QboPostalCountry | null = null;\n\n // ── Inline messages: shown for a non-empty value that is wrong (an empty required field is the input's own \"required\" message) ──\n protected readonly numberError = computed(() => this.numberMessage(false));\n protected readonly expiryError = computed(() => this.expiryMessage(false));\n protected readonly cvcError = computed(() => this.cvcMessage(false));\n protected readonly postalError = computed(() => this.postalMessage(false));\n protected readonly routingError = computed(() => this.routingMessage(false));\n protected readonly accountError = computed(() => this.accountMessage(false));\n protected readonly confirmError = computed(() => this.confirmMessage(false));\n\n /** Called by every field's edit handler: clears the form's own error alert and tells the host. */\n protected edited(): void {\n if (this.errorText()) this.errorText.set('');\n this.detailsChange.emit();\n }\n\n /** The duplicate-payment protection of this form: the synchronous lock, the attempt key, the unknown state. */\n readonly attempt: PaymentAttempt;\n /** The readiness gate: `readiness.ready()` / `readiness.reasons()`. */\n readonly readiness: PaymentReadiness;\n\n constructor() {\n const protection = createPaymentProtection(this, {\n amount: () => null, // the amount is not known to this form (the host charges): the attempt key is derived from payable + method\n method: () => this.method(),\n offlineMidFlight: false, // this form only TOKENIZES: the Intuit call answers or fails by itself, no charge is in flight here\n onOutcome: o => this.outcome.emit(o),\n onInFlightChange: v => this.inFlightChange.emit(v),\n onKeyChange: k => this.attemptKeyChange.emit(k),\n onReadinessChange: r => this.readinessChange.emit(r),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n // Pre-fill from the input (and again when it changes).\n effect(() => { const name = this.cardholderName(); untracked(() => { this.cardName.set(name); this.holder.set(name); }); });\n // Whoever changes the method (the switcher, the host, a payment plugin flipping Card <-> ACH) leaves nothing typed behind.\n effect(() => {\n const method = this.method();\n untracked(() => {\n if (this.shownMethod !== null && this.shownMethod !== method) { this.clearFields(); this.errorText.set(''); }\n this.shownMethod = method;\n });\n });\n effect(() => {\n const country = this.postalCountry();\n untracked(() => {\n if (this.shownCountry !== null && this.shownCountry !== country) this.postal.set('');\n this.shownCountry = country;\n });\n });\n // Destroyed (a closed panel, a navigation): the typed values are wiped, then nothing is emitted or written any more (a late answer from Intuit is dropped).\n inject(DestroyRef).onDestroy(() => { this.clearFields(); this.destroyed = true; });\n }\n\n // ── Public methods ─────────────────────────────────────────────────────\n\n /**\n * Validates and tokenizes the entered card / bank account (the same as the built-in button). Resolves the event (also emitted as `tokenized`), or `null` after a failure\n * (emitted as `failed`) or when nothing was started (already running, disabled). Never rejects. The typed values are cleared from the form as soon as the request is sent,\n * whatever the answer: after a failure the customer types them again.\n */\n async tokenize(): Promise<QboTokenizedEvent | null> {\n if (this.submitting() || this.disabled() || this.pending()) return null;\n if (this.refusedByProtection()) return null;\n this.attempted.set(true);\n const method = this.method();\n const issue = this.firstIssue(method);\n if (issue) { this.fail({ code: 'validation', message: issue.message, stage: 'validate', field: issue.field }); this.focusField(issue.field); return null; }\n const kind = this.mode();\n const environment = this.environment() ?? this.defaults.environment ?? 'sandbox';\n const begun = this.attempt.begin(); // SYNCHRONOUS lock: the same tick as the click, before any await\n if (!begun.ok) return null;\n const attemptKey = begun.key;\n const payableRef = this.attempt.pinnedRef();\n let handedToHost = false;\n this.submitting.set(true);\n this.errorText.set('');\n this.announcement.set('');\n // Read, send and forget: the request object exists only inside dispatch(); the form is empty before the answer arrives.\n const sent = this.dispatch(method, environment);\n this.clearFields();\n try {\n const result = await sent.promise.catch((): QboTokenizeResult => ({ ok: false, status: 0, errors: [] }));\n if (this.destroyed) return null;\n if (!result.ok) {\n const errors = result.errors.map(e => ({ ...e, ...(e.message ? { message: scrubDigits(e.message) } : {}), ...(e.detail ? { detail: scrubDigits(e.detail) } : {}), ...(e.moreInfo ? { moreInfo: scrubDigits(e.moreInfo) } : {}) }));\n const options: QboErrorMessageOptions = { display: this.errorDisplay(), overrides: this.errorMessages(), ...(this.errorFallback() ? { fallback: this.errorFallback() } : {}) };\n this.fail({ code: errors[0]?.code ?? (result.status === 0 ? 'network' : 'tokenize_failed'), message: getQboErrorMessage(result.status, errors, options), stage: 'tokenize', status: result.status, ...(errors.length ? { errors } : {}) });\n return null;\n }\n const event: QboTokenizedEvent = { token: result.token, method, kind, details: sent.details, requestId: sent.requestId, attemptKey, payableRef };\n this.announcement.set(this.messages().tokenized);\n // A PAYMENT keeps its lock after the token: the host charges now, and until it reports markSucceeded / markFailed / markUnknown / markNotCharged (or the status check decides) a second\n // tokenization or charge is refused. A saved account (mode 'setup') charges nothing, so it unlocks.\n if (kind === 'payment') { handedToHost = true; this.attempt.markPending('token'); }\n this.tokenized.emit(event);\n return event;\n } finally {\n if (!this.destroyed) this.submitting.set(false);\n if (!handedToHost) this.attempt.release(); // the attempt ended before any charge request (validation, tokenization): unlock, the key is kept\n }\n }\n\n /** The host reports that ITS charge call timed out or is ambiguous: the form shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.attempt.markUnknown('host'); }\n\n /** The host reports that the charge succeeded: the form locks for this payable (a success does NOT move the epoch: the same key replays the original payment; the paid lock lasts 24 hours, see `resetPaid()`). */\n markSucceeded(): void { this.attempt.succeed('host'); }\n\n /** The host reports a DEFINITIVE failure of the charge (declined): the form unlocks with a NEW attempt key. */\n markFailed(): void { this.attempt.fail('host'); }\n\n /** The host did not use the token and nothing reached the processor (its call never left, the offline layer refused it): the form unlocks and the attempt key is KEPT. */\n markNotCharged(): void { this.attempt.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.attempt.resetPaid(); }\n\n /** The gate before ANYTHING starts: a paid or unknown payable, offline, or a failed readiness check refuses (nothing is sent, the reason is reported). */\n private refusedByProtection(): boolean {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n this.outcome.emit({ kind: 'refused', attemptKey: this.attempt.key(), reason });\n this.fail({ code: reason, message: this.labels.t(this.readiness.labelKeyFor(reason)), stage: 'validate' });\n return true;\n }\n if (this.attempt.inFlight()) return true; // the host is charging the token of the earlier click: nothing may start (silent, like a double click)\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** After a refused submit the focus goes to the field the message is about (WCAG 2.2: the error is reachable without hunting for it); the inline message is already shown there. */\n private focusField(field: string): void {\n const selector: Record<string, string> = {\n number: 'input[data-testid=\"qbo-card-number\"]', name: 'input[data-testid=\"qbo-card-name\"]', expiry: 'input[data-testid=\"qbo-card-expiry\"]', cvc: 'input[data-testid=\"qbo-card-cvc\"]',\n postalCode: 'input[data-testid=\"qbo-card-postal\"]', holder: 'input[data-testid=\"qbo-bank-holder\"]', routing: 'input[data-testid=\"qbo-bank-routing\"]', account: 'input[data-testid=\"qbo-bank-account\"]',\n confirmAccount: 'input[data-testid=\"qbo-bank-confirm\"]', accountType: '[data-testid=\"qbo-bank-type\"] select', consent: 'input[data-testid=\"qbo-consent\"]',\n };\n const query = selector[field];\n if (!query || this.destroyed) return;\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>(query)?.focus(), { injector: this.injector });\n }\n\n /** Clears every typed value and re-creates the inputs (also what tokenize() does after sending). */\n reset(): void {\n this.clearFields();\n this.errorText.set('');\n this.announcement.set('');\n }\n\n // ── Internals ──────────────────────────────────────────────────────────\n\n /** Builds the Intuit request from the fields and starts it. Everything sensitive stays in this function's scope; only the non-sensitive details leave it. */\n private dispatch(method: QboMethod, environment: QboEnvironment): Dispatched {\n const requestId = newQboRequestId();\n let request: QboTokenizeRequest;\n let details: QboTokenDetails;\n if (method === 'card') {\n const digits = digitsOnly(this.number());\n const expiry = parseExpiry(this.expiry()) as { month: number; year: number };\n const name = this.cardName().trim();\n const postal = this.postal().trim();\n const card: QboCardTokenRequest = {\n number: digits, expMonth: String(expiry.month).padStart(2, '0'), expYear: String(expiry.year), cvc: this.cvc().trim(),\n ...(name ? { name } : {}), ...(postal ? { address: { postalCode: postal, ...(this.postalCountry() === 'CA' ? { country: 'CA' } : {}) } } : {}),\n };\n request = { kind: 'card', card };\n details = { brand: detectCardBrand(digits), last4: digits.slice(-4), expMonth: expiry.month, expYear: expiry.year, accountType: null };\n } else {\n const account = this.account().trim();\n const bankAccount: QboBankTokenRequest = { name: this.holder().trim(), routingNumber: this.routing().trim(), accountNumber: account, accountType: this.accountType() };\n request = { kind: 'bank', bankAccount };\n details = { brand: null, last4: account.slice(-4), expMonth: null, expYear: null, accountType: this.accountType() };\n }\n let promise: Promise<QboTokenizeResult>;\n try { promise = this.tokenizer(request, { environment, requestId }); } catch { promise = Promise.resolve({ ok: false, status: 0, errors: [] }); }\n return { promise, details, requestId };\n }\n\n private clearFields(): void {\n this.number.set(''); this.cvc.set(''); this.expiry.set(''); this.postal.set('');\n this.cardName.set(this.cardholderName()); this.holder.set(this.cardholderName());\n this.routing.set(''); this.account.set(''); this.confirm.set('');\n this.accountType.set('PERSONAL_CHECKING');\n this.consent.set(false);\n this.attempted.set(false);\n this.formKey.update(n => n + 1); // new input elements: no value, no touched state, nothing left in the DOM\n }\n\n private fail(f: QboFailure): void {\n const override = this.errorMessages()?.[f.code];\n if (override) f = { ...f, message: override };\n if (this.destroyed) return;\n this.announcement.set('');\n if (this.showErrors()) this.errorText.set(f.message);\n this.failed.emit(f);\n }\n\n private requiredText(key: Parameters<UiLabelsService['t']>[0]): string { return this.labels.t('qboPayment.err.required', { field: this.labels.t(key) }); }\n\n private numberMessage(forSubmit: boolean): string {\n const issue = cardNumberIssue(this.number());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.number') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.numberLength') : issue === 'luhn' ? this.labels.t('qboPayment.err.numberLuhn') : '';\n }\n private expiryMessage(forSubmit: boolean): string {\n const issue = expiryIssue(this.expiry());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.expiry') : '';\n return issue === 'format' ? this.labels.t('qboPayment.err.expiryFormat') : issue === 'month' ? this.labels.t('qboPayment.err.expiryMonth') : issue === 'past' ? this.labels.t('qboPayment.err.expiryPast') : '';\n }\n private cvcMessage(forSubmit: boolean): string {\n const brand = this.brand();\n const issue = cvcIssue(this.cvc(), brand);\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.card.cvc') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.cvcLength', { length: cvcLengthsFor(brand).join(` ${this.labels.t('qboPayment.err.or')} `) }) : '';\n }\n private postalMessage(forSubmit: boolean): string {\n const country = this.postalCountry();\n const issue = postalCodeIssue(this.postal(), forSubmit && this.requirePostalCode(), country);\n return issue === 'required' ? this.requiredText('qboPayment.card.postal') : issue === 'format' ? this.labels.t(country === 'CA' ? 'qboPayment.err.postalFormatCa' : 'qboPayment.err.postalFormat') : '';\n }\n private routingMessage(forSubmit: boolean): string {\n const issue = routingIssue(this.routing());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.bank.routing') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.routingLength') : '';\n }\n private accountMessage(forSubmit: boolean): string {\n const issue = accountNumberIssue(this.account());\n if (issue === 'required') return forSubmit ? this.requiredText('qboPayment.bank.account') : '';\n return issue === 'length' ? this.labels.t('qboPayment.err.accountLength') : '';\n }\n private confirmMessage(forSubmit: boolean): string {\n if (!this.confirmAccountNumber()) return '';\n const value = this.confirm().trim();\n if (!value) return forSubmit ? this.requiredText('qboPayment.bank.confirm') : '';\n return value !== this.account().trim() ? this.labels.t('qboPayment.err.confirmMismatch') : '';\n }\n\n /** The first thing that stops the form from being tokenized, in the order of the fields. */\n private firstIssue(method: QboMethod): { field: string; message: string } | null {\n const checks: Array<[string, string]> = method === 'card'\n ? [\n ['number', this.numberMessage(true)],\n ['name', this.requireName() && !this.cardName().trim() ? this.requiredText('qboPayment.card.name') : ''],\n ['expiry', this.expiryMessage(true)],\n ['cvc', this.cvcMessage(true)],\n ['postalCode', this.postalMessage(true)],\n ]\n : [\n ['holder', this.holder().trim() ? '' : this.requiredText('qboPayment.bank.holder')],\n ['routing', this.routingMessage(true)],\n ['account', this.accountMessage(true)],\n ['confirmAccount', this.confirmMessage(true)],\n ['accountType', QBO_BANK_ACCOUNT_TYPES.includes(this.accountType()) ? '' : this.requiredText('qboPayment.bank.type')],\n ['consent', this.requireAchConsent() && !this.consent() ? this.labels.t('qboPayment.consentRequired') : ''],\n ];\n const hit = checks.find(([, message]) => !!message);\n return hit ? { field: hit[0], message: hit[1] } : null;\n }\n\n protected onTab(key: string): void {\n if (this.submitting() || this.disabled() || this.pending() || this.attempt.locked() || (key !== 'card' && key !== 'ach')) return;\n this.clearFields(); // nothing typed for the method that is leaving stays in memory\n this.method.set(key);\n this.errorText.set('');\n this.attempted.set(false);\n }\n}\n","import type { DestroyRef, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport type { Observable } from 'rxjs';\n\n/** The state of the seller's QuickBooks Payments connection (the shape of contractor's `GET /integrations/qbo-payments/status`, with the optional names a service may add). */\nexport interface QboConnectStatus {\n connected: boolean;\n /** The integration is switched on for this account (informational). */\n enabled?: boolean;\n /** The QuickBooks company (realm) id. */\n realmId?: string | null;\n companyName?: string | null;\n /** ISO date-time the connection was made. */\n connectedAt?: string | null;\n /** The access token was revoked or expired for good: the seller has to authorize again. */\n needsReconnect?: boolean;\n}\n\n/** What the start call answers: the address of Intuit's authorization page (`authUrl`, or `url`). */\nexport interface QboConnectStart { authUrl?: string; url?: string }\n\n/**\n * What happened after the user pressed a button or the page asked for the state. The flow never shows toasts itself (each app has its own): the host words each outcome.\n *\n * - `connected`: the connection is live. `source: 'check'` = after \"Check Status\"; `'return'` = the state was read again when the user came back to this tab (`refreshOnReturn`).\n * - `needs-reconnect`: Intuit no longer accepts the saved authorization.\n * - `not-connected`: \"Check Status\" found no connection (the authorization was not finished).\n * - `disconnected`: the connection was removed.\n * - `link-unavailable`: the answer had no https Intuit address; nothing was opened.\n * - `failed`: a call failed (`action` says which); `error` is what it threw.\n */\nexport type QboConnectOutcome =\n | { kind: 'connected'; source: 'check' | 'return' }\n | { kind: 'needs-reconnect'; source: 'check' | 'return' }\n | { kind: 'not-connected' }\n | { kind: 'disconnected' }\n | { kind: 'link-unavailable' }\n | { kind: 'failed'; action: 'start' | 'check' | 'disconnect'; error: unknown };\n\n/** The state the flow reads and writes: signals owned by the host (or by the card's two-way models). */\nexport interface QboConnectState {\n status: WritableSignal<QboConnectStatus | null>;\n loading: WritableSignal<boolean>;\n}\n\nexport interface QboConnectFlowOptions {\n /** Read at call time, so a host can swap the call. Null = no call yet (`start()` does nothing). */\n start: () => (() => Observable<QboConnectStart>) | null;\n getStatus: () => (() => Observable<QboConnectStatus>) | null;\n disconnect: () => (() => Observable<unknown>) | null;\n state: QboConnectState;\n /** Where outcomes go. */\n emit: (outcome: QboConnectOutcome) => void;\n /** The buttons and methods do nothing while this says true (a read-only user). */\n disabled?: () => boolean;\n /** How THIS tab is sent to Intuit when the browser refused the new tab (default `window.location.href = url`). */\n navigate?: (url: string) => void;\n /** Called when Intuit's page was opened in a new tab (the card then offers \"Check Status\"). */\n onOpened?: () => void;\n destroyRef: DestroyRef;\n}\n\n/** Only an https address on Intuit's own domains (`intuit.com`, `quickbooks.com`, or a real subdomain): never `evilintuit.com`, `intuit.com.evil.com`, `http:` or `javascript:`. */\nexport function isQboUrl(url: string | undefined | null): url is string {\n if (!url) return false;\n try {\n const u = new URL(url);\n return u.protocol === 'https:' && ['intuit.com', 'quickbooks.com'].some(d => u.hostname === d || u.hostname.endsWith(`.${d}`));\n } catch { return false; }\n}\n\n/**\n * The QuickBooks Payments (Intuit OAuth) connection as a plain class: start (authorization page in a new tab), \"Check Status\", disconnect, and the \"back from Intuit\" read.\n * `ui-qbo-connect` runs it behind its card; a host that has to start the flow from code creates its own instance over the same state signals.\n * Intuit's page always opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers); only an https Intuit address is\n * opened; a failed call closes the empty tab.\n */\nexport class QboConnectFlow {\n /** An Intuit tab was opened: the card reads the state again when the user comes back (`refreshOnReturn`). */\n tabOpened = false;\n\n constructor(private readonly o: QboConnectFlowOptions) {}\n\n private get blocked(): boolean { return this.o.state.loading() || !!this.o.disabled?.(); }\n\n /** Asks for the authorization address and opens Intuit's page in a new tab. */\n startConnect(): void {\n const start = this.o.start();\n if (!start || this.blocked) return;\n this.o.state.loading.set(true);\n const tab = this.openBlankTab();\n start().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: result => {\n this.o.state.loading.set(false);\n this.openQbo(tab, result?.authUrl ?? result?.url);\n },\n error: error => {\n this.closeTab(tab);\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'failed', action: 'start', error });\n },\n });\n }\n\n /** \"Check Status\": reads the state and reports it. */\n check(): void {\n const status = this.o.getStatus();\n if (!status || this.blocked) return;\n this.o.state.loading.set(true);\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.status.set(s);\n this.o.state.loading.set(false);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'check' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'check' });\n else this.o.emit({ kind: 'not-connected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'check', error }); },\n });\n }\n\n /** Removes the connection. The state becomes \"not connected\" only after the call succeeded. */\n disconnect(): void {\n const disconnect = this.o.disconnect();\n if (!disconnect || this.blocked) return;\n this.o.state.loading.set(true);\n disconnect().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: () => {\n this.o.state.status.set({ connected: false });\n this.o.state.loading.set(false);\n this.o.emit({ kind: 'disconnected' });\n },\n error: error => { this.o.state.loading.set(false); this.o.emit({ kind: 'failed', action: 'disconnect', error }); },\n });\n }\n\n /** The state read when the user came back to this tab: silent unless a connection is live or needs to be redone. */\n readStatusOnReturn(): void {\n const status = this.o.getStatus();\n if (!status) return;\n status().pipe(takeUntilDestroyed(this.o.destroyRef)).subscribe({\n next: s => {\n this.o.state.status.set(s);\n if (s.connected && s.needsReconnect) this.o.emit({ kind: 'needs-reconnect', source: 'return' });\n else if (s.connected) this.o.emit({ kind: 'connected', source: 'return' });\n },\n error: () => { /* the user can press Check Status; a failed background read says nothing */ },\n });\n }\n\n private openQbo(tab: Window | null, url: string | undefined): void {\n // A blank tab the user already closed (before the answer arrived) cannot take the address: this tab is sent instead, like a refused tab.\n if (isQboUrl(url) && tab && !tab.closed) {\n tab.location.href = url;\n this.tabOpened = true;\n this.o.onOpened?.();\n } else if (isQboUrl(url)) {\n this.navigateCurrentTab(url);\n } else {\n // not an https Intuit address: never navigate to it, close the empty tab and say so\n this.closeTab(tab);\n this.o.emit({ kind: 'link-unavailable' });\n }\n }\n\n /** The empty tab, opened inside the click and cut from this page (`opener`); null when the browser refused. */\n openBlankTab(): Window | null {\n const tab = window.open('about:blank', '_blank');\n if (tab) { try { tab.opener = null; } catch { /* cannot be changed: harmless */ } }\n return tab;\n }\n\n /** The browser refused the new tab: Intuit opens in this one. */\n private navigateCurrentTab(url: string): void {\n if (this.o.navigate) this.o.navigate(url);\n else window.location.href = url;\n }\n\n private closeTab(tab: Window | null): void {\n try { tab?.close(); } catch { /* already closed */ }\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, model, output, signal } from '@angular/core';\nimport type { Observable } from 'rxjs';\nimport { QboConnectFlow } from './qbo-connect.flow';\nimport type { QboConnectOutcome, QboConnectStart, QboConnectStatus } from './qbo-connect.flow';\nexport type { QboConnectOutcome, QboConnectStart, QboConnectStatus } from './qbo-connect.flow';\nexport { QboConnectFlow, isQboUrl } from './qbo-connect.flow';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { ButtonComponent, ModalComponent, UiLabelsService, uiText } from '@forgeroute/ui/core';\nimport { DetailCardComponent } from '@forgeroute/ui/detail-card';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { StackComponent } from '@forgeroute/ui/stack';\nimport { TextComponent } from '@forgeroute/ui/text';\n\n/**\n * The default wording of an outcome, for apps that just want a toast: `{ variant, message }`, or null when nothing should be said.\n */\nexport function qboConnectNotice(outcome: QboConnectOutcome): { variant: 'success' | 'info' | 'error'; message: string } | null {\n switch (outcome.kind) {\n case 'connected': return { variant: 'success', message: uiText('qboConnect.noticeConnected') };\n case 'needs-reconnect': return { variant: 'error', message: uiText('qboConnect.noticeReconnect') };\n case 'not-connected': return { variant: 'info', message: uiText('qboConnect.noticeNotConnected') };\n case 'disconnected': return { variant: 'success', message: uiText('qboConnect.noticeDisconnected') };\n case 'link-unavailable': return { variant: 'error', message: uiText('qboConnect.noticeLinkUnavailable') };\n case 'failed': return { variant: 'error', message: uiText(outcome.action === 'start' ? 'qboConnect.failedStart' : outcome.action === 'check' ? 'qboConnect.failedCheck' : 'qboConnect.failedDisconnect') };\n }\n}\n\nlet nextConnectId = 0;\n\n/**\n * \"QuickBooks Payments\": the card where a business connects the QuickBooks Payments account it collects payments into (Intuit OAuth). The host owns the data (its three calls and the\n * status value); the component owns the screen and the flow:\n *\n * - not connected: \"Connect QuickBooks\" (opens Intuit's authorization page in a NEW tab, then offers \"Check Status\");\n * - connected: success with the company and the date, \"Check Status\" and \"Disconnect\" (asks to confirm first);\n * - needs reconnect: warning with \"Reconnect\".\n *\n * The page opens in a NEW tab opened inside the click (a tab opened after the request is blocked by popup blockers) and receives the address when it arrives; with the\n * tab refused the address opens in the current tab. Only an https Intuit address is ever opened. A failed call closes the empty tab and is reported, never toasted.\n *\n * <ui-qbo-connect [(status)]=\"status\" [startConnect]=\"start\" [getStatus]=\"getStatus\" [disconnect]=\"disconnect\" [refreshOnReturn]=\"true\" (outcome)=\"onOutcome($event)\" />\n *\n * where `start = () => http.get<QboConnectStart>('/integrations/qbo-payments/connect')`, `getStatus = () => http.get<QboConnectStatus>('/integrations/qbo-payments/status')` and\n * `disconnect = () => http.delete('/integrations/qbo-payments/disconnect')`.\n */\n@Component({\n selector: 'ui-qbo-connect',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, DetailCardComponent, ModalComponent, LiveRegionComponent, StackComponent, TextComponent],\n template: `\n <!-- Persistent live region: present before the state changes, so every new state is announced (and \"Loading\" while a request runs). -->\n <ui-live-region data-testid=\"qbo-connect-live\" [message]=\"liveText()\" />\n @if (bare()) {\n <ng-container *ngTemplateOutlet=\"body\" />\n } @else {\n <ui-detail-card [collapsible]=\"false\" [title]=\"title()\" [headingLevel]=\"3\" data-testid=\"qbo-connect-card\">\n <ng-container *ngTemplateOutlet=\"body\" />\n </ui-detail-card>\n }\n\n <ng-template #body>\n @if (state() === 'none') {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-none\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"startTitle()\" />\n <ui-text size=\"sm\" [text]=\"startText()\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"qbo-connect-start-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabBusy', { label: startLabel() }) }}</span>} @else { {{ startLabel() }}<span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabSr') }}</span>}</ui-button>\n @if (awaiting()) {\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'qboConnect.checking' : 'qboConnect.checkStatus') }}</ui-button>\n }\n </ui-stack>\n </ui-stack>\n } @else if (state() === 'reconnect') {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-reconnect\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <span class=\"qbc-badge\"><ui-badge [label]=\"labels.t('qboConnect.needsReconnect')\" variant=\"red\" data-testid=\"qbo-connect-reconnect-badge\" /></span>\n <ui-text size=\"sm\" [text]=\"labels.t('qboConnect.reconnectText')\" />\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"qbo-connect-reconnect-button\" [disabled]=\"disabled()\" (click)=\"start()\">@if (loading()) {<span aria-hidden=\"true\">{{ labels.t('common.loadingellipsis') }}</span><span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabBusy', { label: labels.t('qboConnect.reconnect') }) }}</span>} @else { {{ labels.t('qboConnect.reconnect') }}<span class=\"qbc-sr\">{{ labels.t('qboConnect.opensInNewTabSr') }}</span>}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n } @else {\n <ui-stack gap=\"sm\" class=\"qbc-state\" tabindex=\"-1\" data-testid=\"qbo-connect-status-connected\" [attr.aria-busy]=\"loading() ? 'true' : null\">\n <ui-text size=\"lg\" weight=\"semibold\" [text]=\"labels.t('qboConnect.connected')\" />\n @if (company(); as company) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"qbo-connect-company\" [text]=\"labels.t('qboConnect.companyLine', { company })\" /> }\n @if (connectedOn(); as date) { <ui-text size=\"sm\" tone=\"muted\" data-testid=\"qbo-connect-date\" [text]=\"labels.t('qboConnect.connectedOn', { date })\" /> }\n <ui-stack direction=\"horizontal\">\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-check-status-button\" [disabled]=\"disabled() || loading()\" (click)=\"check()\">{{ labels.t(loading() ? 'qboConnect.checking' : 'qboConnect.checkStatus') }}</ui-button>\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-disconnect-button\" [disabled]=\"disabled() || loading()\" (click)=\"askDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-stack>\n </ui-stack>\n }\n </ng-template>\n\n <ui-modal [open]=\"confirming()\" [title]=\"labels.t('qboConnect.disconnectTitle')\" maxWidth=\"440px\" [describedBy]=\"confirmMessageId\" [busy]=\"loading()\" dialogTestId=\"qbo-connect-confirm\" (close)=\"cancelDisconnect()\">\n <p [id]=\"confirmMessageId\" class=\"qbc-confirm\" data-testid=\"qbo-connect-confirm-message\">{{ labels.t('qboConnect.disconnectMessage') }}</p>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"qbo-connect-confirm-cancel\" [disabled]=\"loading()\" (click)=\"cancelDisconnect()\">{{ labels.t('common.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"qbo-connect-confirm-accept\" [loading]=\"loading()\" (click)=\"doDisconnect()\">{{ labels.t('qboConnect.disconnect') }}</ui-button>\n </ui-modal>\n `,\n styles: [`ui-qbo-connect { display: block; min-width: 0; } ui-qbo-connect .qbc-badge { display: flex; } ui-qbo-connect .qbc-confirm { margin: 0; font-size: 0.9375rem; line-height: 1.5; } ui-qbo-connect .qbc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }`],\n encapsulation: ViewEncapsulation.None,\n})\nexport class QboConnectComponent {\n /** Unique per instance: two connect cards on one page must not share the id the dialog's description points at. */\n protected readonly confirmMessageId = `qbc-disconnect-msg-${nextConnectId++}`;\n protected readonly labels = inject(UiLabelsService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** The call that answers Intuit's authorization address (`{ authUrl }`). Needed for `start()`. */\n readonly startConnect = input<(() => Observable<QboConnectStart>) | null>(null);\n /** The call that reads the connection's state. Needed for `check()` and `refreshOnReturn`. */\n readonly getStatus = input<(() => Observable<QboConnectStatus>) | null>(null);\n /** The call that removes the connection. Needed for \"Disconnect\". */\n readonly disconnect = input<(() => Observable<unknown>) | null>(null);\n\n /** The connection state (null = not read yet = shown as not connected). Two-way: the component sets it after \"Check Status\" and \"Disconnect\". */\n readonly status = model<QboConnectStatus | null>(null);\n\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? this.labels.t('qboConnect.title'));\n /** No card around the content: the text and the buttons sit directly in the host's own card (a setup wizard step). `title` is not shown then. */\n readonly bare = input(false);\n readonly startTitleInput = input<string | null>(null, { alias: 'startTitle' });\n readonly startTitle = computed(() => this.startTitleInput() ?? this.labels.t('qboConnect.startTitle'));\n readonly startTextInput = input<string | null>(null, { alias: 'startText' });\n readonly startText = computed(() => this.startTextInput() ?? this.labels.t('qboConnect.startText'));\n readonly startLabelInput = input<string | null>(null, { alias: 'startLabel' });\n readonly startLabel = computed(() => this.startLabelInput() ?? this.labels.t('qboConnect.startLabel'));\n /** The buttons cannot be pressed (a read-only user). */\n readonly disabled = input(false);\n /** Ask before disconnecting (default true). */\n readonly confirmDisconnect = input(true);\n /** After an Intuit tab was opened, the state is read again when this tab becomes visible again (the user came back): `(outcome)` then reports `connected` / `needs-reconnect` with source `return`. */\n readonly refreshOnReturn = input(false);\n /** How the current tab is sent to Intuit when the browser refused the new tab (default: `window.location.href = url`). */\n readonly navigateTab = input<((url: string) => void) | null>(null);\n\n /** What happened (see {@link QboConnectOutcome}); the host words it. */\n readonly outcome = output<QboConnectOutcome>();\n\n /** A request is running: the buttons show \"Loading...\" / \"Checking...\" and cannot be pressed again. Two-way, so a host can read it. */\n readonly loading = model(false);\n\n protected readonly awaiting = signal(false);\n protected readonly confirming = signal(false);\n protected readonly state = computed((): 'none' | 'connected' | 'reconnect' => {\n const s = this.status();\n return !s?.connected ? 'none' : s.needsReconnect ? 'reconnect' : 'connected';\n });\n protected readonly company = computed(() => this.status()?.companyName || this.status()?.realmId || '');\n protected readonly connectedOn = computed(() => this.labels.formatDate(this.status()?.connectedAt ?? null, 'mediumDate'));\n /** What the persistent status region says: the current state, plus \"Loading.\" while a request runs. */\n protected readonly liveText = computed(() => {\n const text = this.labels.t(({ none: 'qboConnect.live.none', connected: 'qboConnect.live.connected', reconnect: 'qboConnect.live.reconnect' } as const)[this.state()]);\n return this.loading() ? this.labels.t('qboConnect.live.loading', { text }) : text;\n });\n /** The user pressed a button that started a request: when the screen then changes, focus moves to the new screen (the pressed button is gone). */\n private acted = false;\n private lastState = this.state();\n private readonly flow = new QboConnectFlow({\n start: () => this.startConnect(),\n getStatus: () => this.getStatus(),\n disconnect: () => this.disconnect(),\n state: { status: this.status, loading: this.loading },\n emit: outcome => this.outcome.emit(outcome),\n disabled: () => this.disabled(),\n navigate: url => this.navigateCurrentTab(url),\n onOpened: () => this.awaiting.set(true),\n destroyRef: this.destroyRef,\n });\n\n constructor() {\n effect(() => {\n const state = this.state();\n if (this.loading()) return;\n const changed = state !== this.lastState;\n this.lastState = state;\n const focusIt = changed && this.acted;\n this.acted = false;\n if (state === 'connected') this.awaiting.set(false);\n if (focusIt) afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.qbc-state')?.focus(), { injector: this.injector });\n });\n if (typeof document !== 'undefined') {\n const onVisible = () => {\n if (document.visibilityState !== 'visible' || !this.flow.tabOpened || !this.refreshOnReturn() || this.loading()) return;\n this.flow.tabOpened = false;\n this.flow.readStatusOnReturn();\n };\n document.addEventListener('visibilitychange', onVisible);\n this.destroyRef.onDestroy(() => document.removeEventListener('visibilitychange', onVisible));\n }\n }\n\n /** Asks for the authorization address and opens Intuit's page in a new tab. */\n start(): void { const run = this.canRun(this.startConnect()); this.flow.startConnect(); this.acted ||= run; }\n\n /** \"Check Status\": reads the state; the card updates and the outcome is reported. */\n check(): void { const run = this.canRun(this.getStatus()); this.flow.check(); this.acted ||= run; }\n\n /** \"Disconnect\": asks for confirmation first (`confirmDisconnect`, default), then removes the connection. */\n askDisconnect(): void {\n if (this.disabled() || this.loading() || !this.disconnect()) return;\n if (this.confirmDisconnect()) this.confirming.set(true);\n else this.doDisconnect();\n }\n\n protected cancelDisconnect(): void { if (!this.loading()) this.confirming.set(false); }\n\n /** Removes the connection (what the confirm's button calls). */\n doDisconnect(): void {\n const run = this.canRun(this.disconnect());\n this.flow.disconnect();\n this.acted ||= run;\n this.confirming.set(false);\n }\n\n /** The flow will really send a request (the host gave the call, nothing is running, the card is not read-only). */\n private canRun(call: unknown): boolean { return !!call && !this.loading() && !this.disabled(); }\n\n /** The browser refused the new tab: Intuit opens in this one (through the host's `navigateTab` when it gave one). */\n protected navigateCurrentTab(url: string): void {\n const navigate = this.navigateTab();\n if (navigate) navigate(url);\n else window.location.href = url;\n }\n}\n","import type { PaymentAllocation } from '@forgeroute/ui/payments';\nimport { uiText } from '@forgeroute/ui/core';\nimport type { QboMethod, QboTokenDetails } from '../qbo-payment/qbo-outcomes';\n\n/** What the host's `createPayment` receives: the entered payment, how it is applied to charges, and the single-use token Intuit gave for the customer's card / bank account. */\nexport interface QboPaymentContext extends PaymentAllocation {\n /** The amount the payer owes (before processing fees), in major units (12.5 = $12.50). */\n amount: number;\n /** The method value that was selected (`'CARD'` / `'ACH'`). */\n paymentMethod: string;\n /** `'card'` or `'ach'` (a bank account). */\n method: QboMethod;\n receivedDate: string;\n notes: string | null;\n /** Intuit's single-use token: send it to your backend (which sends it to the payments service). The card / bank numbers never reach your backend. */\n token: string;\n /** Brand, last four, expiry or account type as far as they apply (never a full number). Intuit's answer has no card funding and no bank name. */\n details: QboTokenDetails;\n /** The `Request-Id` of the tokens call: a good base for the charge's own `Request-Id` (idempotency). */\n requestId: string;\n /**\n * The key of this PAYMENT ATTEMPT: stable across retries after a timeout / offline loss, a reload and a second tab; renewed only after a definitive failure or success. Send it to your\n * backend with the charge (it derives Intuit's `Request-Id` of the charge from it) and answer `checkStatus(attemptKey)` with it.\n */\n attemptKey: string;\n /** The payable of this attempt (the plugin's `payableRef` at the click): the backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key. */\n payableRef: string | null;\n}\n\n/**\n * What the host's `createPayment` answers. `status` is the QuickBooks Payments status: `CAPTURED` / `SUCCEEDED` / `COMPLETED` = paid, `PENDING` / `AUTHORIZED` (and any other\n * non-final value) = submitted and settling (an eCheck takes days), `DECLINED` / `FAILED` / `CANCELLED` / `VOIDED` = not paid (the panel shows `failureMessage` / a default text and\n * the payer types the details again). Fees are optional; when given they are shown as rows under the form.\n */\nexport interface QboPaymentResult {\n paymentId?: string | null;\n status?: string;\n failureMessage?: string;\n processingFee?: number;\n platformFee?: number;\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\n/** The fees of a payment, shown before the payer pays (the host's `estimateFees`) or after the payment exists. Display only. */\nexport interface QboFees {\n processingFee?: number;\n platformFee?: number;\n /** What the payer is charged (amount + fees), shown as \"Total charged\". */\n totalAmount?: number;\n processingFeeLabel?: string;\n platformFeeLabel?: string;\n}\n\nexport interface QboFeeContext {\n amount: number;\n paymentMethod: string;\n method: QboMethod;\n}\n\nexport type QboOutcomeKind = 'paid' | 'processing' | 'failed';\n\nconst PAID = new Set(['CAPTURED', 'SUCCEEDED', 'COMPLETED', 'PAID', 'SETTLED']);\nconst FAILED = new Set(['DECLINED', 'FAILED', 'CANCELLED', 'CANCELED', 'VOIDED', 'REJECTED', 'ERROR']);\n\n/**\n * The QuickBooks Payments status as one outcome. A non-final status (`PENDING`, `AUTHORIZED`, anything unknown) counts as `'processing'`: the payment exists, so the payer is told\n * it was submitted, never \"failed\". No status at all is `'paid'` for a card and `'processing'` for a bank account, which never settles at once.\n */\nexport function qboOutcomeOf(status: string | null | undefined, method: QboMethod = 'card'): QboOutcomeKind {\n const value = (status ?? '').trim().toUpperCase();\n if (!value) return method === 'ach' ? 'processing' : 'paid';\n if (PAID.has(value)) return 'paid';\n if (FAILED.has(value)) return 'failed';\n return 'processing';\n}\n\n/** The method values the plugin takes over by default. */\nexport const QBO_PAYMENT_METHOD_VALUES = ['CARD', 'ACH'] as const;\n\n/** The name of a method in the app's active language (an unknown value is shown as it is). */\nexport const qboMethodLabel = (value: string): string =>\n value === 'CARD' ? uiText('qboPaymentMethod.methodCard') : value === 'ACH' ? uiText('qboPaymentMethod.methodAch') : value;\n\nexport const qboMethodOf = (method: string): QboMethod => (method === 'ACH' ? 'ach' : 'card');\n\n/** The texts of the QuickBooks Payments method; read on every access, so they follow the app's active language. */\nexport const QBO_METHOD_TEXTS = {\n get amountNeeded() { return uiText('qboPaymentMethod.amountNeeded'); },\n get notCompleted() { return uiText('qboPaymentMethod.notCompleted'); },\n get achTitle() { return uiText('qboPaymentMethod.achTitle'); },\n achMessage: (amount: string) => uiText('qboPaymentMethod.achMessage', { amount }),\n get pendingTitle() { return uiText('qboPaymentMethod.pendingTitle'); },\n pendingMessage: (amount: string) => uiText('qboPaymentMethod.pendingMessage', { amount }),\n get receiptNote() { return uiText('qboPaymentMethod.receiptNote'); },\n};\n","import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, Injector, ViewEncapsulation, afterNextRender, computed, effect, inject, input, signal, untracked, viewChild } from '@angular/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { ButtonComponent, UiLabelsService } from '@forgeroute/ui/core';\nimport { HintComponent } from '@forgeroute/ui/hint';\nimport { KpiCardComponent } from '@forgeroute/ui/kpi-card';\nimport { PaymentAttemptStatusComponent, callHost, classifyHostError, isAwaitingVerificationError, isFinalPaymentRefusal, paymentErrorLabelKey, wasQueuedOffline, warnQueuedPayment, createPaymentProtection, hostErrorMessage, type PaymentAttempt, type PaymentAttemptControls, type PaymentAttemptOutcome, type PaymentMethodContext, type PaymentProtectionInputs, type PaymentReadiness } from '@forgeroute/ui/payments';\nimport { formatCurrency } from '@forgeroute/ui/utils';\nimport { QboPaymentComponent } from '../qbo-payment/qbo-payment.component';\nimport type { QboFailure } from '../qbo-payment/qbo-outcomes';\n\nimport type { QboPaymentMethodComponent } from './payment-qbo-method.component';\nimport { QBO_METHOD_TEXTS, qboMethodOf, qboOutcomeOf, type QboFees, type QboPaymentContext, type QboPaymentResult } from './payment-qbo-method.models';\n\n/** The body `ui-qbo-payment-method` hands to the panel: the QuickBooks Payments form, the fee rows and the whole flow (tokenize, host callback, outcome), talking to the panel through `ctx`. */\n@Component({\n selector: 'ui-payment-qbo-body',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, ButtonComponent, HintComponent, KpiCardComponent, PaymentAttemptStatusComponent, QboPaymentComponent],\n template: `\n <div class=\"pqb\">\n @if (confirmation(); as notice) {\n <ui-alert variant=\"success\" [title]=\"notice.title\" tabindex=\"-1\" class=\"pqb-notice\" data-testid=\"qbo-method-confirmation\">\n <p>{{ notice.message }}</p>\n <p>{{ receiptNote() }}</p>\n </ui-alert>\n } @else {\n <ui-payment-attempt-status [attempt]=\"attempt\" [readiness]=\"readiness\" [allowStartOver]=\"config().allowStartOver()\" [showPaid]=\"!confirmation() && !done()\" />\n @if (ctx().amount == null) {\n <ui-hint data-testid=\"qbo-method-amount-needed\">{{ texts.amountNeeded }}</ui-hint>\n }\n @if (estimateError()) {\n <div class=\"pqb-error\">\n <ui-alert variant=\"warning\" data-testid=\"qbo-method-estimate-error\">{{ estimateError() }}\n <ui-button variant=\"secondary\" size=\"sm\" data-testid=\"qbo-method-estimate-retry\" (click)=\"retryEstimate()\">{{ labels.t('common.tryAgain') }}</ui-button>\n </ui-alert>\n </div>\n }\n @if (lastAmount() != null) {\n <ui-qbo-payment #payment mode=\"payment\" [method]=\"qboMethod()\" [environment]=\"config().environment()\" [cardholderName]=\"config().cardholderName()\"\n [requireName]=\"config().requireName()\" [requirePostalCode]=\"config().requirePostalCode()\" [postalCountry]=\"config().postalCountry()\" [requireAchConsent]=\"config().requireAchConsent()\" [showSubmit]=\"false\" [showErrors]=\"false\"\n [showStatus]=\"false\" [offlineOverride]=\"config().offlineOverride()\" [disabled]=\"processing() || done() || attempt.unknown() || attempt.paidLocked()\" [label]=\"labels.t('qboPaymentMethod.paymentDetails')\" (failed)=\"onFailed($event)\" />\n @if (totalCard(); as card) {\n <ui-kpi-card class=\"pqb-total\" data-testid=\"qbo-method-total\" [label]=\"labels.t('qboPaymentMethod.totalCharged')\" [value]=\"card.value\" [subtitle]=\"card.subtitle\" icon=\"dollar\" color=\"blue\" valueColor=\"blue\" />\n }\n @if (feeRows().length) {\n <dl class=\"pqb-fees\" data-testid=\"qbo-method-fees\" [attr.aria-label]=\"labels.t('qboPaymentMethod.paymentTotal')\">\n @for (row of feeRows(); track row.key) {\n <div class=\"pqb-fee\" [attr.data-testid]=\"'qbo-fee-' + row.key\"><dt>{{ row.label }}</dt><dd>{{ row.value }}</dd></div>\n }\n </dl>\n }\n @if (error()) { <div class=\"pqb-error\"><ui-alert variant=\"danger\" data-testid=\"qbo-method-error\">{{ error() }}</ui-alert></div> }\n }\n }\n </div>\n `,\n styles: [`\n ui-payment-qbo-body { display: block; min-width: 0; }\n ui-payment-qbo-body .pqb-error { margin-top: 12px; }\n ui-payment-qbo-body .pqb-total { display: block; margin-top: 16px; }\n ui-payment-qbo-body .pqb-fees { margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--ui-psp-border, #e2e8f0); border-radius: 10px; font-size: 0.8125rem; }\n ui-payment-qbo-body .pqb-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ui-psp-muted, #475569); }\n ui-payment-qbo-body .pqb-fee dt, ui-payment-qbo-body .pqb-fee dd { margin: 0; }\n ui-payment-qbo-body .pqb-notice:focus { outline: none; }\n ui-payment-qbo-body .pqb-notice p { margin: 0 0 6px; }\n `],\n})\nexport class PaymentQboBodyComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly injector = inject(Injector);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ctx = input.required<PaymentMethodContext>();\n readonly config = input.required<QboPaymentMethodComponent>();\n private readonly payment = viewChild(QboPaymentComponent);\n\n protected readonly texts = QBO_METHOD_TEXTS;\n\n readonly processing = signal(false);\n /** The payment was accepted (the panel was told, or the notice is up): Pay stays off even if the host keeps the panel open. */\n readonly done = signal(false);\n readonly error = signal('');\n /** The service gave an answer a retry cannot change (see `isFinalPaymentRefusal`), for THIS method, payable and amount: the text stays and Pay stays off until one of them changes (then the refusal and its text are cleared for good; it comes back only if the service answers it again). */\n readonly finalRefusal = signal<{ method: string; ref: string | null; amount: number } | null>(null);\n /** Fees from the host's estimate (before the payer pays). */\n readonly estimate = signal<QboFees | null>(null);\n private readonly estimating = signal(false);\n protected readonly estimateError = signal('');\n private readonly estimateTick = signal(0);\n /** Fees the host answered when it created the payment. */\n private readonly resultFees = signal<QboFees | null>(null);\n protected readonly confirmation = signal<{ title: string; message: string } | null>(null);\n /** The last valid amount: the form stays mounted (and keeps the typed card data) while the amount is briefly empty or invalid. */\n protected readonly lastAmount = signal<number | null>(null);\n /** What the attempt was STARTED with (pinned at the click; a later amount edit or method change never changes what is recorded). */\n private payAmount: number | null = null;\n private payMethod: string | null = null;\n /** What the payment that was RECORDED (or accepted) was made with: a late answer of an older attempt is recorded with ITS OWN amount and method, never the newest click's. */\n private doneAmount: number | null = null;\n private doneMethod: string | null = null;\n private estimateRun = 0;\n\n private readonly amountValue = computed(() => this.ctx().amount);\n private readonly methodValue = computed(() => this.ctx().method);\n protected readonly qboMethod = computed(() => qboMethodOf(this.ctx().method));\n private readonly total = computed(() => this.resultFees()?.totalAmount ?? this.estimate()?.totalAmount ?? this.lastAmount() ?? 0);\n protected readonly receiptNote = computed(() => this.config().receiptNote());\n protected readonly feeRows = computed(() => {\n const fees = this.resultFees() ?? this.estimate();\n const amount = this.lastAmount();\n if (!fees || amount == null || (fees.processingFee === undefined && fees.platformFee === undefined)) return [];\n const money = (n: number) => formatCurrency(n, { currency: this.ctx().currency });\n const rows: { key: string; label: string; value: string }[] = [{ key: 'amount', label: this.labels.t('qboPaymentMethod.paymentAmount'), value: money(amount) }];\n if (fees.processingFee !== undefined) rows.push({ key: 'processing', label: `${this.labels.t('qboPaymentMethod.processingFee')}${fees.processingFeeLabel ? ` (${fees.processingFeeLabel})` : ''}`, value: money(fees.processingFee) });\n if (fees.platformFee !== undefined) rows.push({ key: 'platform', label: `${this.labels.t('qboPaymentMethod.platformFee')}${fees.platformFeeLabel ? ` (${fees.platformFeeLabel})` : ''}`, value: money(fees.platformFee) });\n return rows;\n });\n /** The headline figure: what the payer is charged, once fees are known. */\n protected readonly totalCard = computed(() => {\n const fees = this.resultFees() ?? this.estimate();\n if (!fees || this.lastAmount() == null || fees.totalAmount === undefined) return null;\n return { value: formatCurrency(fees.totalAmount, { currency: this.ctx().currency }), subtitle: this.labels.t('qboPaymentMethod.amountPlusFees') };\n });\n\n /** The duplicate-payment protection of this payment (lock, attempt key, unknown state) and its readiness gate, driven by the plugin's inputs. */\n readonly attempt: PaymentAttempt;\n readonly readiness: PaymentReadiness;\n private gone = false;\n\n constructor() {\n // offlineOverride is read once while the readiness gate is constructed, before the inputs are bound: an unset required input counts as \"no override\" until the config arrives.\n const configured = <T>(read: (config: QboPaymentMethodComponent) => T) => computed(() => read(this.config()));\n const inputs: PaymentProtectionInputs = {\n payableRef: configured(c => c.payableRef()), attemptKey: configured(c => c.attemptKey()), checkStatus: configured(c => c.checkStatus()), paid: configured(c => c.paid()), hostPending: configured(c => c.hostPending()),\n statusPollMs: configured(c => c.statusPollMs()), statusPollMaxMs: configured(c => c.statusPollMaxMs()),\n statusCheckTimeoutMs: configured(c => c.statusCheckTimeoutMs()), statusFailGraceMs: configured(c => c.statusFailGraceMs()), readinessCheck: configured(c => c.readinessCheck()),\n readinessTimeoutMs: configured(c => c.readinessTimeoutMs()), readinessEveryMs: configured(c => c.readinessEveryMs()), offlineOverride: computed(() => { try { return this.config().offlineOverride(); } catch { return false; } }),\n };\n const protection = createPaymentProtection(inputs, {\n amount: () => this.ctx().amount,\n method: () => this.ctx().method,\n onOutcome: o => this.onAttemptOutcome(o),\n });\n this.attempt = protection.attempt;\n this.readiness = protection.readiness;\n inject(DestroyRef).onDestroy(() => { this.gone = true; });\n // The host resolves an undecided attempt through the plugin component (markSucceeded / markFailed / markNotCharged / markUnknown), without a status check.\n const controls: PaymentAttemptControls = {\n markUnknown: () => this.attempt.markUnknown('host'),\n markSucceeded: () => this.attempt.succeed('host'),\n markFailed: () => this.attempt.fail('host'),\n resetPaid: () => { this.attempt.resetPaid(); this.done.set(false); this.confirmation.set(null); this.error.set(''); this.ctx().setExclusive(false); },\n markNotCharged: () => { this.attempt.markNotCharged(); this.payment()?.markNotCharged(); this.processing.set(false); this.ctx().setBusy(false); },\n };\n // The controls are handed to the plugin that is bound NOW and taken back from that same one when the binding changes or the body is destroyed. (Reading `this.config()` in a destroy callback threw NG0950 when the body\n // was destroyed before its required config input was ever bound, which aborted the rest of the view's cleanups.)\n effect(onCleanup => {\n const config = this.config();\n untracked(() => config.attachControls(controls));\n onCleanup(() => config.detachControls(controls));\n });\n effect(() => { const amount = this.amountValue(); if (amount != null) untracked(() => this.lastAmount.set(amount)); });\n // A final refusal belongs to the method, payable and amount it was raised for: when one of them changes the refusal and its text are cleared (and stay cleared unless the service answers it again).\n effect(() => {\n const scope = this.finalRefusal();\n if (!scope) return;\n const ctx = this.ctx();\n if (ctx.method !== scope.method || ctx.amount !== scope.amount || this.config().payableRef() !== scope.ref) untracked(() => { this.finalRefusal.set(null); this.error.set(''); });\n });\n // The panel's footer button for this method.\n effect(() => {\n const ctx = this.ctx();\n const processing = this.processing();\n const notice = this.confirmation();\n const estimating = this.estimating();\n const done = this.done();\n const estimateFailed = !!this.estimateError();\n const unknown = this.attempt.unknown();\n const paidLocked = this.attempt.paidLocked();\n const finalRefusal = !!this.finalRefusal();\n const gateReady = this.readiness.ready();\n const label = notice ? this.labels.t('common.done') : ctx.amount != null ? `${this.labels.t('qboPaymentMethod.pay')} ${formatCurrency(this.total(), { currency: ctx.currency })}` : this.labels.t('qboPaymentMethod.pay');\n untracked(() => ctx.setPrimary({\n label, loading: processing && !notice,\n disabled: notice ? done : processing || estimating || estimateFailed || ctx.amount == null || done || unknown || paidLocked || finalRefusal || !gateReady,\n onClick: () => (notice ? this.finish() : void this.pay()),\n }));\n });\n // Estimated fees, debounced (display only).\n effect((onCleanup) => {\n const estimate = this.config().estimateFees();\n const amount = this.amountValue();\n const method = this.methodValue();\n this.estimateTick();\n const run = ++this.estimateRun; // any change makes an answer that is still on its way stale\n untracked(() => { this.estimate.set(null); this.resultFees.set(null); this.estimateError.set(''); });\n if (!estimate || amount == null) { untracked(() => this.estimating.set(false)); return; }\n untracked(() => this.estimating.set(true));\n let hung: ReturnType<typeof setTimeout> | null = null;\n const failure = this.labels.t('qboPaymentMethod.feesFailed');\n const timer = setTimeout(async () => {\n // A hung estimate must not block the user forever: after the timeout \"Try again\" is offered (and Pay stays off when fees are required). A late answer still recovers.\n hung = setTimeout(() => {\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (this.config().feesRequired()) this.estimateError.set(failure);\n }, Math.max(1, this.config().estimateTimeoutMs()));\n let fees: QboFees | null = null;\n try { fees = (await callHost(() => estimate({ amount, paymentMethod: method, method: qboMethodOf(method) }))) ?? null; } catch { fees = null; }\n if (hung) { clearTimeout(hung); hung = null; }\n if (run !== this.estimateRun) return;\n this.estimating.set(false);\n if (fees) { this.estimate.set(fees); this.estimateError.set(''); }\n else { this.estimate.set(null); this.estimateError.set(this.config().feesRequired() ? failure : ''); }\n }, 300);\n onCleanup(() => { clearTimeout(timer); if (hung) clearTimeout(hung); });\n });\n // Another method is another form.\n effect(() => { this.methodValue(); untracked(() => this.error.set('')); });\n // The panel tells us when it is closing or the method changes before this body is removed: an accepted payment whose notice is still up is reported as recorded.\n effect(() => { const ctx = this.ctx(); untracked(() => ctx.onCancel(() => { if (this.confirmation()) this.finish(); })); });\n inject(DestroyRef).onDestroy(() => { this.estimateRun++; });\n }\n\n protected retryEstimate(): void { this.estimateTick.update(n => n + 1); }\n\n protected onFailed(failure: QboFailure): void {\n this.error.set(failure.message); // shown in a role=alert ui-alert: that is the announcement\n this.processing.set(false);\n this.ctx().report('failed', { message: failure.message });\n }\n\n /**\n * Pays: the gate (paid / unknown / not ready / offline: nothing is sent), validates the panel, then ONE attempt under the synchronous lock: the numbers go to Intuit (never to the host),\n * then the payment is created through the host with the attempt key. A timeout, going offline or an ambiguous host error makes the outcome UNKNOWN (locked, \"Checking your payment...\",\n * status check by key); only a definitive refusal unlocks with a new key. The component never retries a charge itself.\n */\n async pay(): Promise<void> {\n const ctx = this.ctx();\n const payment = this.payment();\n if (this.processing() || this.estimating() || this.done() || !payment) return;\n if (this.refused(ctx)) return;\n if (!ctx.validate() || ctx.amount == null) return;\n this.payAmount = ctx.amount;\n this.payMethod = ctx.method;\n const attemptAmount: number = ctx.amount; // captured for THIS attempt: a late answer must not read the fields a newer click overwrote\n const attemptMethod: string = ctx.method;\n const create = this.config().createPayment();\n if (!create) { this.onFailed({ code: 'not_configured', message: this.labels.t('qboPaymentMethod.unavailable'), stage: 'tokenize' }); return; }\n this.error.set('');\n this.processing.set(true);\n ctx.setBusy(true);\n ctx.announce(this.labels.t('qboPaymentMethod.announceProcessing'));\n let finished = false;\n const run = await this.attempt.run<QboPaymentResult | null>(async key => {\n // A LATE answer (the attempt moved on while this call was still running) must not touch the newer attempt's screen, error text, busy state or inner form: every side effect below asks `live()` first.\n const live = (): boolean => this.attempt.isLive(key);\n try {\n // The tokenization starts from the click: the form reads what was typed, sends it to Intuit and empties itself before the answer arrives.\n const event = await payment.tokenize();\n if (!event) return { kind: 'released' }; // the form reported the failure (onFailed): nothing was charged\n if (this.gone) return { kind: 'released', reason: 'destroyed' }; // destroyed before the host call: NOTHING was sent, the marker must not outlive the page\n const request: QboPaymentContext = {\n amount: attemptAmount, paymentMethod: attemptMethod, method: event.method, receivedDate: ctx.receivedDate, notes: ctx.note || null, ...ctx.allocation,\n token: event.token, details: event.details, requestId: event.requestId, attemptKey: key, payableRef: this.attempt.pinnedRef(),\n };\n let result: QboPaymentResult | null | undefined;\n try { result = await callHost(() => create(request)); } catch (err) { // after the panel closed (`this.gone`) the classification still decides and the core writes the records: there is no screen left to touch\n const kind = classifyHostError(err);\n if (kind === 'unknown') return { kind: 'unknown', reason: isAwaitingVerificationError(err) ? 'microdeposits' : 'host_error' }; // the open payment waits for the payer's bank verification: say so, never \"already processed\"\n // The reference / payment-link codes are worded in OUR (translated) words; a final one (the balance changed, the link was paid / ended, the processor cannot do it) keeps the text and turns Pay off instead of looping.\n const labelKey = paymentErrorLabelKey(err);\n const message = labelKey ? this.labels.t(labelKey) : hostErrorMessage(err, this.labels.t('qboPaymentMethod.paymentFailed'));\n if (live() && isFinalPaymentRefusal(err)) this.finalRefusal.set({ method: attemptMethod, ref: this.config().payableRef(), amount: attemptAmount });\n if (kind === 'not_sent') { // the request never left (offline layer): nothing was charged, the key is KEPT and the payer may try again\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (live()) { this.error.set(message); ctx.report('failed', { message }); }\n return { kind: 'failure', reason: 'host_refused' };\n }\n if (wasQueuedOffline(result)) { // the offline layer QUEUED the request instead of sending it (a synthetic 202): no payment exists, the key is KEPT\n warnQueuedPayment();\n const message = this.labels.t('paymentAttempt.queuedOffline');\n if (live()) { this.error.set(message); ctx.report('refused', { message }); }\n return { kind: 'released', reason: 'not_sent' };\n }\n if (this.gone) return { kind: qboOutcomeOf(result?.status, qboMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' }; // the panel closed meanwhile: the answer is still the payment's outcome (the core records it for the next form of the payable)\n finished = this.afterCreate(result ?? null, ctx, live(), attemptAmount, attemptMethod);\n return { kind: qboOutcomeOf(result?.status, qboMethodOf(attemptMethod)) === 'failed' ? 'failure' : 'success', value: result ?? null, reason: 'created' };\n } finally { if (live()) payment.markNotCharged(); } // the token was handed to the host: the INNER form's own lock ends with this attempt (never the lock of a NEWER attempt)\n }, { timeoutMs: this.config().paymentTimeoutMs() });\n this.processing.set(false);\n if ('refused' in run && run.refused) { ctx.setBusy(false); return; }\n if (run.kind === 'unknown') return; // stays locked (busy) until the status check, the host or a late answer resolves it\n if (!finished) ctx.setBusy(false);\n }\n\n /** Refuses to start (nothing is sent): a paid payable, an unknown earlier outcome, a failed readiness gate or being offline. Returns true when refused. */\n private refused(ctx: PaymentMethodContext): boolean {\n if (!this.readiness.passSync()) {\n const reason = this.readiness.reasons()[0] ?? 'checking';\n const message = this.labels.t(this.readiness.labelKeyFor(reason));\n this.error.set(message);\n ctx.report('refused', { message });\n ctx.announce(message);\n return true;\n }\n if (this.attempt.paidLocked() || this.attempt.unknown()) { this.attempt.begin(); return true; } // refuses and reports `refused`\n return false;\n }\n\n /** The attempt resolved OUTSIDE the click (a status check, the host's `markSucceeded` / `markFailed`, a late answer) or became unknown. */\n private onAttemptOutcome(outcome: PaymentAttemptOutcome): void {\n const ctx = this.ctx();\n if (outcome.kind === 'unknown' && outcome.reason === 'duplicate_suspected') {\n // A SECOND payment of a payable that is already paid: nothing about the lock, the amount or the method changes; the host is told (with the key of the second payment) so it can resolve it.\n const message = this.labels.t('paymentAttempt.duplicate');\n this.error.set(message);\n ctx.report('duplicate_suspected', { message, attemptKey: outcome.attemptKey });\n ctx.announce(message);\n } else if (outcome.kind === 'unknown') {\n this.payAmount = this.attempt.pinnedAmount() ?? this.payAmount; // the amount and method of the attempt that is UNKNOWN (an adopted one included), never a stale earlier one\n this.payMethod = this.attempt.pinnedMethod() ?? this.payMethod;\n const message = this.labels.t(outcome.reason === 'offline' ? 'paymentAttempt.offlineInFlight' : outcome.reason === 'timeout' ? 'paymentAttempt.timeout' : outcome.reason === 'microdeposits' || this.attempt.awaitingVerification() ? 'paymentAttempt.awaitingVerification' : 'paymentAttempt.checking'); // a reload / another tab that adopted a bank verification wait says so too\n ctx.report('unknown', { message });\n ctx.announce(message);\n } else if (outcome.kind === 'refused') {\n const refusedReason = outcome.reason ?? '';\n // `unknown` while a bank verification wait is on is the verification text, never \"Checking your payment...\"\n const refusedKey = refusedReason === 'unknown' && this.attempt.awaitingVerification() ? 'paymentAttempt.awaitingVerification' : this.readiness.labelKeyFor(refusedReason);\n ctx.report('refused', { message: this.labels.t(refusedKey) });\n } else if (outcome.kind === 'succeeded' && outcome.reason === 'other_tab') {\n // Another tab / page load paid this payable: this form only shows the paid lock. Nothing is recorded here (no `paid`, no `complete`): no money moved through THIS form and the amount typed here is not what was paid.\n // A host that wants to reconcile reads the paid attempt's key, amount and method from the report (and from the form's own `(outcome)`).\n ctx.report('paid_elsewhere', { message: this.labels.t('paymentAttempt.paid'), attemptKey: outcome.attemptKey, ...(outcome.method !== undefined ? { paid: { amount: outcome.amount ?? null, method: outcome.method } } : {}) });\n } else if (outcome.kind === 'succeeded' && (outcome.reason === 'status_check' || outcome.reason === 'host') && !this.done()) {\n const paid = { type: 'stripe' as const, paymentMethod: outcome.method ?? this.payMethod ?? ctx.method, amount: outcome.amount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'quickbooks' };\n this.doneAmount = paid.amount;\n this.doneMethod = paid.paymentMethod;\n ctx.report('paid', { result: paid });\n this.done.set(true);\n ctx.setBusy(false);\n ctx.complete(paid);\n } else if (outcome.kind === 'failed') {\n if (outcome.reason === 'status_check' || outcome.reason === 'host') {\n const message = this.labels.t('paymentAttempt.failedAfterCheck');\n this.error.set(message);\n ctx.report('failed', { message });\n }\n this.payment()?.markNotCharged(); // the attempt is decided: the INNER form's lock (kept while the host charged) ends with it, so a NEW attempt can tokenize even when the old request never answers\n ctx.setBusy(false); // also a LATE definitive refusal (the answer came after a timeout): the panel is free again\n }\n }\n\n private afterCreate(result: QboPaymentResult | null, ctx: PaymentMethodContext, live: boolean, amount: number, method: string): boolean {\n if (this.done() || this.confirmation()) return true; // a status check or the host already recorded this payment: report it exactly once\n const money = formatCurrency(amount, { currency: ctx.currency });\n const outcome = qboOutcomeOf(result?.status, qboMethodOf(method));\n if (outcome === 'failed') {\n if (live) { // a late decline of an OLDER attempt says nothing on the newer attempt's screen\n const message = result?.failureMessage || this.texts.notCompleted;\n this.error.set(message);\n ctx.report('failed', { message });\n }\n return false;\n }\n if (live && result && (result.processingFee !== undefined || result.platformFee !== undefined || result.totalAmount !== undefined)) {\n this.resultFees.set({ processingFee: result.processingFee, platformFee: result.platformFee, totalAmount: result.totalAmount, processingFeeLabel: result.processingFeeLabel, platformFeeLabel: result.platformFeeLabel });\n }\n const paid = { type: 'stripe' as const, paymentMethod: method, amount, processor: 'quickbooks' };\n this.doneAmount = amount;\n this.doneMethod = method;\n if (outcome === 'paid') {\n ctx.report('paid', { result: paid });\n this.done.set(true);\n ctx.complete(paid);\n return true;\n }\n ctx.report('processing', { result: paid });\n this.confirmation.set(qboMethodOf(method) === 'ach'\n ? { title: this.texts.achTitle, message: this.texts.achMessage(money) }\n : { title: this.texts.pendingTitle, message: this.texts.pendingMessage(money) });\n ctx.setExclusive(true);\n ctx.setBusy(false);\n afterNextRender(() => this.host.nativeElement.querySelector<HTMLElement>('.pqb-notice')?.focus(), { injector: this.injector });\n return true;\n }\n\n /** \"Done\" on the submitted notice, or closing the panel while the notice is up: the accepted payment is reported as recorded (once). */\n private finish(): void {\n const ctx = this.ctx();\n if (this.done()) return;\n this.done.set(true);\n ctx.complete({ type: 'stripe', paymentMethod: this.doneMethod ?? this.payMethod ?? ctx.method, amount: this.doneAmount ?? this.payAmount ?? ctx.amount ?? this.lastAmount() ?? 0, processor: 'quickbooks' });\n }\n}\n","import { ChangeDetectionStrategy, Component, TemplateRef, forwardRef, input, viewChild, computed, signal } from '@angular/core';\nimport { PAYMENT_METHOD_PLUGIN, PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_REQUEST_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, PaymentMethodPlugin, type CheckPaymentStatusFn, type PaymentAttemptControls, type HostResult, type PaymentMethodBodyContext, type PaymentPluginMethod, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport type { QboEnvironment } from '../qbo-tokenizer/qbo-tokenizer';\nimport type { QboPostalCountry } from '../qbo-validation/qbo-validation';\nimport { PaymentQboBodyComponent } from './payment-qbo-body.component';\nimport { QBO_PAYMENT_METHOD_VALUES, QBO_METHOD_TEXTS, qboMethodLabel, type QboFeeContext, type QboFees, type QboPaymentContext, type QboPaymentResult } from './payment-qbo-method.models';\n\n/**\n * Adds LIVE Card and ACH (QuickBooks Payments) to `ui-payment-side-panel`. Put it inside the panel only for customers who use QuickBooks Payments: its presence replaces the record-only\n * Card / ACH (last 4 digits) with the card / bank-account form that tokenizes in the browser; remove it and the panel is record-only again.\n *\n * <ui-payment-side-panel ...>\n * @if (qboEnabled()) {\n * <ui-qbo-payment-method environment=\"production\" [createPayment]=\"createPayment\" />\n * }\n * </ui-payment-side-panel>\n *\n * The host owns the HTTP: `createPayment(ctx)` receives the single-use token (and the entered amount, date, notes, allocation) and answers the payment result\n * (`{ status, fees... }`). Outcomes arrive as the panel's `outcome` events with kind `'plugin'` and codes `paid`, `processing` and `failed`.\n */\n@Component({\n selector: 'ui-qbo-payment-method',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [PaymentQboBodyComponent],\n providers: [{ provide: PAYMENT_METHOD_PLUGIN, useExisting: forwardRef(() => QboPaymentMethodComponent) }],\n host: { style: 'display: none' },\n template: `<ng-template #body let-ctx><ui-payment-qbo-body [ctx]=\"ctx\" [config]=\"self\" /></ng-template>`,\n})\nexport class QboPaymentMethodComponent extends PaymentMethodPlugin {\n protected readonly self = this;\n /** Creates the payment on the host's backend from the token (called when the payer presses Pay, after Intuit tokenized). */\n readonly createPayment = input<((ctx: QboPaymentContext) => HostResult<QboPaymentResult>) | null>(null);\n /** Optional fee preview before paying (display only). */\n readonly estimateFees = input<((ctx: QboFeeContext) => HostResult<QboFees>) | null>(null);\n readonly environment = input<QboEnvironment | null>(null);\n /** Pre-fills the name on the card and the bank account holder. */\n readonly cardholderName = input('');\n readonly requireName = input(false);\n readonly requirePostalCode = input(false);\n /** `'US'` (ZIP, default) or `'CA'` (Canadian postal code) for the card's postal code. */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** ACH: the authorization checkbox must be ticked (default true). */\n readonly requireAchConsent = input(true);\n /** The methods this plugin takes over (default: Card and ACH / Bank Transfer). Pass `[{ value: 'CARD', label: 'Card' }]` for cards only. */\n readonly methodListInput = input<readonly PaymentPluginMethod[] | null>(null, { alias: 'methodList' });\n readonly methodList = computed((): readonly PaymentPluginMethod[] => this.methodListInput() ?? QBO_PAYMENT_METHOD_VALUES.map(value => ({ value, label: qboMethodLabel(value) })));\n /** How long a fee estimate may take before Pay is released and \"Try again\" is offered (ms). */\n readonly estimateTimeoutMs = input(10000);\n // ── Duplicate-payment protection and readiness gate (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n /** A key the host supplies for the charge; empty = the plugin generates one per payment attempt session (it arrives in `createPayment(ctx).attemptKey`). */\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key: resolves an UNKNOWN outcome (timeout, offline mid-flight). */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The payable is paid (host re-render, back navigation): Pay stays locked for good. */\n readonly paid = input(false);\n /** The host reports an ambiguous result of ITS charge call: the plugin goes to \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** How long ONE `createPayment` (tokenize + charge) may take before the outcome counts as unknown (ms). */\n readonly paymentTimeoutMs = input(PAYMENT_REQUEST_TIMEOUT_MS);\n /** The host's readiness endpoint (`GET /api/payments/ready`): `{ ready, reasons[] }`. */\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n /** The payer covers fees: a rejected or empty estimate keeps Pay off (with \"Try again\") instead of paying without the fee preview. */\n readonly feesRequired = input(false);\n readonly receiptNoteInput = input<string | null>(null, { alias: 'receiptNote' });\n readonly receiptNote = computed((): string => this.receiptNoteInput() ?? QBO_METHOD_TEXTS.receiptNote);\n\n private readonly body = viewChild<TemplateRef<PaymentMethodBodyContext>>('body');\n\n // ── The host resolves an undecided attempt itself (without a status check): the body registers its controls here ──\n private readonly controls = signal<PaymentAttemptControls | null>(null);\n /** @internal The body registers itself. */\n attachControls(controls: PaymentAttemptControls): void { this.controls.set(controls); }\n /** @internal The body leaves. */\n detachControls(controls: PaymentAttemptControls): void { if (this.controls() === controls) this.controls.set(null); }\n /** The host's charge of this payment is ambiguous (its call timed out): the plugin shows \"Checking your payment...\" and stays locked (see `checkStatus`). */\n markUnknown(): void { this.controls()?.markUnknown(); }\n /** The host's charge succeeded: the plugin records it (paid + complete) and locks the payable. */\n markSucceeded(): void { this.controls()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused: the plugin unlocks with a NEW attempt key. */\n markFailed(): void { this.controls()?.markFailed(); }\n /** NOTHING was sent to the processor: the plugin unlocks and the attempt key is KEPT (the backend must still answer the state of an attempt it already holds for that key). */\n markNotCharged(): void { this.controls()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.controls()?.resetPaid(); }\n\n\n readonly methods = this.methodList;\n readonly template = this.body;\n}\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, computed, inject, input, output, signal, viewChild, effect, untracked, isDevMode } from '@angular/core';\nimport { AlertComponent } from '@forgeroute/ui/alert';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { PAYMENT_READINESS_EVERY_MS, PAYMENT_READINESS_TIMEOUT_MS, PAYMENT_STATUS_CHECK_TIMEOUT_MS, PAYMENT_STATUS_FAIL_GRACE_MS, PAYMENT_HOST_SILENCE_MS, PAYMENT_STATUS_POLL_MAX_MS, PAYMENT_STATUS_POLL_MS, type CheckPaymentStatusFn, type PaymentAttemptOutcome, type PaymentReadinessResult, type ReadinessCheckFn } from '@forgeroute/ui/payments';\nimport { SkeletonComponent } from '@forgeroute/ui/skeleton';\nimport { UiLabelsService } from '@forgeroute/ui/core';\nimport { QboPaymentComponent } from '../qbo-payment/qbo-payment.component';\nimport type { QboFailure, QboIntentKind, QboMethod, QboTokenizedEvent } from '../qbo-payment/qbo-outcomes';\nimport type { QboA11yMessages } from '../qbo-payment/qbo-payment.component';\nimport type { QboErrorDisplay } from '../errors/qbo-errors';\nimport type { QboEnvironment } from '../qbo-tokenizer/qbo-tokenizer';\nimport type { QboPostalCountry } from '../qbo-validation/qbo-validation';\n\n/** Which screen the hosted page shows. */\nexport type QboHostedPayState = 'loading' | 'form' | 'processing' | 'success' | 'expired' | 'used' | 'error';\n\n/**\n * The building block of a public \"pay this link\" page (contractor's `/pay/:token`): the amount summary (title, company, description), the loading / expired / already-paid /\n * success / error screens and, while the link can be paid, the card / bank form that tokenizes IN THE BROWSER (`ui-qbo-payment`). The page itself (route, token, language\n * switch, the request that loads the link and the request that charges it) stays in the app: it sets `state`, sends `(tokenized)`'s token to its backend, then sets `success`\n * or goes back to `form` with an `errorMessage`.\n *\n * <ui-qbo-hosted-pay [state]=\"state()\" [companyName]=\"info()?.companyName\" [amountLabel]=\"info()?.amount\" [description]=\"info()?.description\"\n * [errorMessage]=\"error()\" environment=\"production\" (tokenized)=\"pay($event)\" />\n */\n@Component({\n selector: 'ui-qbo-hosted-pay',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AlertComponent, LiveRegionComponent, QboPaymentComponent, SkeletonComponent],\n host: { '[attr.aria-busy]': 'state() === \"loading\" || state() === \"processing\" ? \"true\" : null' },\n template: `\n <section class=\"qbh\" [attr.aria-label]=\"title()\" data-testid=\"qbo-hosted-pay\">\n <header class=\"qbh-header\">\n <h1 class=\"qbh-title\" data-testid=\"qbo-hosted-title\">{{ title() }}</h1>\n @if (companyName()) { <p class=\"qbh-company\" data-testid=\"qbo-hosted-company\">{{ companyName() }}</p> }\n @if (description()) { <p class=\"qbh-desc\" data-testid=\"qbo-hosted-description\">{{ description() }}</p> }\n </header>\n @if (showForm()) {\n <!-- 'form' and 'processing' are ONE view (the form keeps the typed data and its lock while the host charges the token) -->\n <div class=\"qbh-body\">\n @if (errorMessage() && !localError()) { <ui-alert variant=\"danger\" data-testid=\"qbo-hosted-form-error\">{{ errorMessage() }}</ui-alert> }\n <ui-qbo-payment [mode]=\"mode()\" [environment]=\"environment()\" [methods]=\"methods()\" [method]=\"method()\" [pending]=\"state() === 'processing'\" [submitLabel]=\"submitText()\" [showErrors]=\"false\"\n [label]=\"formLabel()\" [cardholderName]=\"cardholderName()\" [requireName]=\"requireName()\" [requirePostalCode]=\"requirePostalCode()\" [postalCountry]=\"postalCountry()\"\n [confirmAccountNumber]=\"confirmAccountNumber()\" [requireAchConsent]=\"requireAchConsent()\" [achConsentText]=\"achConsentText()\" [errorDisplay]=\"errorDisplay()\" [errorMessages]=\"errorMessages()\"\n [errorFallback]=\"errorFallback()\" [a11yMessages]=\"a11yMessages()\"\n [payableRef]=\"payableRef()\" [attemptKey]=\"attemptKey()\" [checkStatus]=\"checkStatus()\" [paid]=\"paid()\" [hostPending]=\"hostPending()\" [statusPollMs]=\"statusPollMs()\" [statusPollMaxMs]=\"statusPollMaxMs()\" [statusCheckTimeoutMs]=\"statusCheckTimeoutMs()\" [statusFailGraceMs]=\"statusFailGraceMs()\" [hostSilenceMs]=\"hostSilenceMs()\" [allowStartOver]=\"allowStartOver()\" [offlineOverride]=\"offlineOverride()\"\n [readinessCheck]=\"readinessCheck()\" [readinessTimeoutMs]=\"readinessTimeoutMs()\" [readinessEveryMs]=\"readinessEveryMs()\"\n (tokenized)=\"onTokenized($event)\" (failed)=\"onFailed($event)\" (inFlightChange)=\"inFlightChange.emit($event)\" (outcome)=\"outcome.emit($event)\"\n (attemptKeyChange)=\"attemptKeyChange.emit($event)\" (readinessChange)=\"readinessChange.emit($event)\" />\n @if (localError()) { <ui-alert variant=\"danger\" data-testid=\"qbo-hosted-field-error\">{{ localError() }}</ui-alert> }\n </div>\n } @else {\n @switch (state()) {\n @case ('loading') {\n <div class=\"qbh-body\" data-testid=\"qbo-hosted-loading\">\n <ui-live-region data-testid=\"qbo-hosted-loading-status\" [message]=\"labels.t('qboHostedPay.loading')\" />\n <div aria-hidden=\"true\"><ui-skeleton [height]=\"44\" [mb]=\"10\" /><ui-skeleton [height]=\"44\" [mb]=\"10\" /><ui-skeleton [height]=\"44\" width=\"60%\" /></div>\n </div>\n }\n @case ('expired') {\n <ui-alert variant=\"warning\" [title]=\"labels.t('qboHostedPay.expiredTitle')\" data-testid=\"qbo-hosted-expired\">{{ labels.t('qboHostedPay.expired') }}</ui-alert>\n }\n @case ('used') {\n <ui-alert variant=\"success\" [title]=\"labels.t('qboHostedPay.usedTitle')\" data-testid=\"qbo-hosted-used\">{{ labels.t('qboHostedPay.used') }}</ui-alert>\n }\n @case ('success') {\n <ui-alert variant=\"success\" [title]=\"labels.t(effectiveSuccessKind() === 'submitted' ? 'qboHostedPay.submittedTitle' : 'qboHostedPay.successTitle')\" data-testid=\"qbo-hosted-success\">{{ labels.t(effectiveSuccessKind() === 'submitted' ? 'qboHostedPay.submitted' : 'qboHostedPay.success', { amount: amountLabel() }) }}</ui-alert>\n }\n @case ('error') {\n <ui-alert variant=\"danger\" [title]=\"labels.t('qboHostedPay.errorTitle')\" data-testid=\"qbo-hosted-error\">{{ errorMessage() }}</ui-alert>\n }\n @default {\n <!-- a state this screen does not know (cancelled, claimed, an empty string...): never the payment form -->\n <ui-alert variant=\"danger\" [title]=\"labels.t('qboHostedPay.errorTitle')\" data-testid=\"qbo-hosted-error\">{{ errorMessage() || labels.t('qboHostedPay.unavailable') }}</ui-alert>\n }\n }\n }\n <footer class=\"qbh-footer\" data-testid=\"qbo-hosted-footer\">{{ labels.t('qboHostedPay.footer') }}</footer>\n </section>\n `,\n styles: [`\n ui-qbo-hosted-pay { display: block; min-width: 0; }\n ui-qbo-hosted-pay .qbh { max-width: 440px; margin: 0 auto; padding: 24px 16px; }\n ui-qbo-hosted-pay .qbh-header { text-align: center; margin-bottom: 16px; }\n ui-qbo-hosted-pay .qbh-title { overflow-wrap: anywhere; margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--ui-text, #0f172a); }\n ui-qbo-hosted-pay .qbh-company { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 0.9375rem; color: var(--ui-text-muted, #475569); }\n ui-qbo-hosted-pay .qbh-desc { overflow-wrap: anywhere; margin: 4px 0 0; font-size: 0.875rem; color: var(--ui-text-muted, #64748b); }\n ui-qbo-hosted-pay .qbh-body { display: flex; flex-direction: column; gap: 12px; }\n ui-qbo-hosted-pay .qbh-footer { margin-top: 20px; text-align: center; font-size: 0.75rem; color: var(--ui-text-muted, #64748b); }\n `],\n})\nexport class QboHostedPayComponent {\n protected readonly labels = inject(UiLabelsService);\n\n /** Which screen to show. `'form'` / `'processing'` show the payment form (`'processing'` locks it while the host charges the token). */\n readonly state = input<QboHostedPayState>('loading');\n /** The payment form is on screen only for `form` and `processing`; any state this screen does not know shows an error, never the form. */\n protected readonly showForm = computed(() => this.state() === 'form' || this.state() === 'processing');\n readonly companyName = input('');\n /** The amount as the host formats it (`'$125.00'`): used in the title, the button and the success text. */\n readonly amountLabel = input('');\n readonly description = input('');\n /** A message the host words (a failed charge on the form, the load error on the error screen). */\n readonly errorMessage = input('');\n readonly environment = input<QboEnvironment | null>(null);\n readonly methods = input<readonly QboMethod[] | null>(null);\n readonly method = input<QboMethod>('card');\n readonly cardholderName = input('');\n readonly requirePostalCode = input(false);\n /** Passed to the form: the name on the card is required (default: optional). */\n readonly requireName = input(false);\n /** Passed to the form: `'US'` (ZIP, default) or `'CA'` (Canadian postal code). */\n readonly postalCountry = input<QboPostalCountry>('US');\n /** Passed to the form: ask for the bank account number twice (default true). */\n readonly confirmAccountNumber = input(true);\n /** Passed to the form: the wording of the bank authorization checkbox (default: the library text of the active language). */\n readonly achConsentText = input<string | null>(null);\n /** Passed to the form: the bank authorization must be ticked (default true). */\n readonly requireAchConsent = input(true);\n /** Passed to the form: `'payment'` (default) or `'setup'` (button text and authorization wording). */\n readonly mode = input<QboIntentKind>('payment');\n /** Passed to the form: `'friendly'` (default) or `'intuit'` (Intuit's own message, digits masked). */\n readonly errorDisplay = input<QboErrorDisplay>('friendly');\n /** Passed to the form: replacement texts by Intuit code / library code. */\n readonly errorMessages = input<Record<string, string> | null>(null);\n readonly errorFallback = input('');\n /** Passed to the form: texts of its screen-reader status region. */\n readonly a11yMessages = input<Partial<QboA11yMessages> | null>(null);\n /** Accessible name of the payment form (default: the library's \"Payment details\"). */\n readonly label = input<string | null>(null);\n protected readonly formLabel = computed(() => this.label() ?? this.labels.t('qboPayment.label'));\n /** `'received'` (a card: the money is taken) or `'submitted'` (a bank transfer: it settles in days). `null` (default) = decided by the method the payer tokenized. */\n readonly successKind = input<'received' | 'submitted' | null>(null);\n private readonly lastMethod = signal<QboMethod | null>(null);\n protected readonly effectiveSuccessKind = computed((): 'received' | 'submitted' => this.successKind() ?? (this.lastMethod() === 'ach' ? 'submitted' : 'received'));\n readonly titleInput = input<string | null>(null, { alias: 'title' });\n readonly title = computed(() => this.titleInput() ?? (this.amountLabel() ? this.labels.t('qboHostedPay.title', { amount: this.amountLabel() }) : this.labels.t('qboHostedPay.titleNoAmount')));\n protected readonly submitText = computed(() => (this.amountLabel() ? this.labels.t('qboHostedPay.pay', { amount: this.amountLabel() }) : ''));\n\n // ── Duplicate-payment protection and readiness gate: passed to the form (docs: \"Duplicate-payment protection\", \"Readiness gate\") ──\n /**\n * The payable this is for (an invoice, a balance, a payment link). While an attempt is undecided its opaque marker (key, amount, method) is stored under it in `localStorage`, so a RELOAD or a\n * SECOND TAB of the same payable starts locked (unknown) with the same attempt key. Without it the protection covers this page instance only. Nothing else is stored.\n */\n readonly payableRef = input<string | null>(null);\n readonly attemptKey = input<string | null>(null);\n /** The host's status check by attempt key (`GET /public/qbo-pay/attempts/{key}`): resolves an UNKNOWN outcome. */\n readonly checkStatus = input<CheckPaymentStatusFn | null>(null);\n /** The link is already paid (a reload, the back button): the form shows the paid state and ignores every submit. */\n readonly paid = input(false);\n /** The host's charge call timed out or is ambiguous: the form shows \"Checking your payment...\" while true. */\n readonly hostPending = input(false);\n readonly statusPollMs = input(PAYMENT_STATUS_POLL_MS);\n readonly statusPollMaxMs = input(PAYMENT_STATUS_POLL_MAX_MS);\n /** A status check slower than this counts as unknown (ms). */\n readonly statusCheckTimeoutMs = input(PAYMENT_STATUS_CHECK_TIMEOUT_MS);\n /** While the attempt's own request is unsettled, a status answer `failed` is ignored for this long (ms). */\n readonly statusFailGraceMs = input(PAYMENT_STATUS_FAIL_GRACE_MS);\n /** Offer \"Start over\" after the status polling window (a new attempt with a NEW key). Turn it on ONLY when your backend allows ONE open or succeeded attempt per payable and answers 409 `payment_in_flight` to a second key: that rule is what makes it safe. */\n readonly allowStartOver = input(false);\n /** Managed environments where `navigator.onLine === false` is a false negative (captive portal, VPN): do not refuse a payment because of the browser's offline flag (default false). */\n readonly offlineOverride = input(false);\n /** A token-only form whose host never reports (markSucceeded / markFailed / markUnknown / markNotCharged) becomes unknown after this long (ms), so the status check and \"Check again\" engage. */\n readonly hostSilenceMs = input(PAYMENT_HOST_SILENCE_MS);\n readonly readinessCheck = input<ReadinessCheckFn | null>(null);\n readonly readinessTimeoutMs = input(PAYMENT_READINESS_TIMEOUT_MS);\n readonly readinessEveryMs = input(PAYMENT_READINESS_EVERY_MS);\n readonly inFlightChange = output<boolean>();\n readonly outcome = output<PaymentAttemptOutcome>();\n readonly attemptKeyChange = output<string>();\n readonly readinessChange = output<PaymentReadinessResult>();\n private readonly form = viewChild(QboPaymentComponent);\n\n constructor() {\n // The page says the charge succeeded: settle the form's attempt BEFORE the view swaps the form for the success screen (a component's effect runs before its template is refreshed), so the\n // opaque marker of the attempt is removed and a reopened link is not treated as an undecided payment. An `'error'` state decides nothing (it may be an ambiguous failure).\n effect(() => { if (this.state() === 'success') untracked(() => this.form()?.markSucceeded()); });\n // Development help: the page went back to the form (e.g. with an error message) while the form still waits for the charge to be reported: the payer would see a locked form and no way out.\n effect(() => {\n const state = this.state();\n untracked(() => {\n const attempt = this.form()?.attempt;\n if (isDevMode() && state === 'form' && attempt && (attempt.waitingForHost() || attempt.inFlight())) {\n console.warn('ui-qbo-hosted-pay: state went back to \"form\" while the attempt is still locked: call markFailed() (declined), markNotCharged() (nothing was sent) or markUnknown() on the page first');\n }\n });\n });\n }\n\n /** The host's charge call timed out or is ambiguous: \"Checking your payment...\" and locked (see `checkStatus`). */\n markUnknown(): void { this.form()?.markUnknown(); }\n /** The host's charge succeeded: the form locks for this payable (set `state` to `'success'` as well). */\n markSucceeded(): void { this.form()?.markSucceeded(); }\n /** The host's charge was DEFINITIVELY refused (declined): unlock with a new attempt key. */\n markFailed(): void { this.form()?.markFailed(); }\n /** The host did not use the token and nothing reached the processor (its call never left): unlock, the attempt key is KEPT. */\n markNotCharged(): void { this.form()?.markNotCharged(); }\n /** The host starts a deliberate SECOND payment of this payable (an explicit \"pay again\" flow): forgets the paid state this form saw, removes the succeeded record and moves the epoch so the next attempt has a NEW key. Does nothing against the host's own `paid` input. */\n resetPaid(): void { this.form()?.resetPaid(); }\n\n /** The customer's details were tokenized (inside the browser): send `token` to your backend. */\n readonly tokenized = output<QboTokenizedEvent>();\n /** The form refused the details (validation, or Intuit refused them). The built-in alert of the hosted page shows `message`. */\n readonly failed = output<QboFailure>();\n\n /** The message of the form's last refusal (shown under the form until the next successful tokenization). */\n protected readonly localError = signal('');\n\n protected onFailed(failure: QboFailure): void {\n this.localError.set(failure.message);\n this.failed.emit(failure);\n }\n\n protected onTokenized(event: QboTokenizedEvent): void {\n this.localError.set('');\n this.lastMethod.set(event.method);\n this.tokenized.emit(event);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,wBAAwB;AAErC,MAAa,kBAAkB;AAC/B,MAAa,wBAAwB;AACrC,MAAa,qBAAqB;AAGlC,MAAa,gBAAgB,gBAAwC,GAAG,gBAAgB,eAAe,wBAAwB,qBAAqB;AAEpJ,MAAM,QAAQ,MAAoC,OAAO,MAAM,YAAY,IAAI,IAAI;AAGnF,SAAgB,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