stripe-decline-codes 0.1.0 → 0.2.0

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":["../src/data/decline-codes.ts","../src/index.ts"],"sourcesContent":["import type { DeclineCode, DeclineCodeInfo } from '../types';\n\n/**\n * Stripe API documentation version for decline codes\n * Last updated: 2024-12\n * Reference: https://docs.stripe.com/declines/codes\n */\nexport const DOC_VERSION = '2024-12-18';\n\n/**\n * Complete database of Stripe decline codes with descriptions and recommended actions\n * Includes English and Japanese translations\n */\nexport const DECLINE_CODES: Record<DeclineCode, DeclineCodeInfo> = {\n approve_with_id: {\n description: 'The payment cannot be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: '支払いは承認できません。',\n nextUserAction:\n 'もう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n call_issuer: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n card_not_supported: {\n description: 'The card does not support this type of purchase.',\n nextSteps:\n 'The customer needs to contact their card issuer to make sure their card can be used to make this type of purchase.',\n nextUserAction:\n 'Your card issuer may not support this type of purchase, please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードはこのタイプの購入をサポートしません。',\n nextUserAction:\n 'カード発行者はこのタイプの購入をサポートしていない可能性があります。詳細については、カード発行会社にお問い合わせください。',\n },\n },\n },\n card_velocity_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'このカードの残高またはクレジット制限を超えました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n currency_not_supported: {\n description: 'The card does not support the specified currency.',\n nextSteps:\n 'The customer needs to check with the issuer whether the card can be used for the type of currency specified.',\n nextUserAction:\n 'Please contact your card issuer to verify this type of currency can be used for this payment.',\n translations: {\n ja: {\n description: 'カードは指定された通貨をサポートしていません。',\n nextUserAction:\n 'この支払いにこのタイプの通貨が使用できることを確認するには、カード発行会社に連絡してください。',\n },\n },\n },\n do_not_honor: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n do_not_try_again: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n duplicate_transaction: {\n description:\n 'A transaction with identical amount and credit card information was submitted very recently.',\n nextSteps: 'Check to see if a recent payment already exists.',\n nextUserAction: 'Check to see if a recent payment already exists.',\n translations: {\n ja: {\n description: 'ごく最近、同一の金額とクレジットカード情報を使用した取引が送信されました。',\n nextUserAction: '最近の支払いが既に存在するかどうかを確認してください。',\n },\n },\n },\n expired_card: {\n description: 'The card has expired.',\n nextSteps: 'The customer should use another card.',\n nextUserAction: 'Please use another card.',\n translations: {\n ja: {\n description: 'カードは期限切れです。',\n nextUserAction: '別のカードを使用してください。',\n },\n },\n },\n fraudulent: {\n description: 'The payment has been declined as Stripe suspects it is fraudulent.',\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described below.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: '不正と思われるため、支払いは拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n generic_decline: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n incorrect_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'カード番号が正しくありません。',\n nextUserAction:\n 'カード番号を確認してもう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n incorrect_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction:\n 'Please check your card numbers and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'CVC番号が正しくありません。',\n nextUserAction:\n 'CSC番号を確認してもう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n incorrect_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction:\n 'Please check your PIN and try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'PINコードが正しくありません。',\n nextUserAction:\n 'PINコードを確認してもう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n incorrect_zip: {\n description: 'The ZIP/postal code is incorrect.',\n nextSteps: 'The customer should try again using the correct billing ZIP/postal code.',\n nextUserAction: 'Please try again using the correct ZIP/postal code.',\n translations: {\n ja: {\n description: '郵便番号が正しくありません。',\n nextUserAction: '正しい郵便番号を使用してもう一度お試しください。',\n },\n },\n },\n insufficient_funds: {\n description: 'The card has insufficient funds to complete the purchase.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please try again using an alternative payment method.',\n translations: {\n ja: {\n description: 'カードの購入に必要な資金が不足しています。',\n nextUserAction: '別のお支払い方法を使用してもう一度お試しください。',\n },\n },\n },\n invalid_account: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps:\n 'The customer needs to contact their card issuer to check that the card is working correctly.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カード、またはカードが接続されているアカウントが無効です。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n invalid_amount: {\n description: 'The payment amount is invalid, or exceeds the amount that is allowed.',\n nextSteps:\n 'If the amount appears to be correct, the customer needs to check with their card issuer that they can make purchases of that amount.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: '支払い金額が無効であるか、許可されている金額を超えています。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n invalid_cvc: {\n description: 'The CVC number is incorrect.',\n nextSteps: 'The customer should try again using the correct CVC.',\n nextUserAction: 'Please try again using the correct CVC.',\n translations: {\n ja: {\n description: 'CVC番号が正しくありません。',\n nextUserAction: '正しいCVCを使用してもう一度やり直してください。',\n },\n },\n },\n invalid_expiry_year: {\n description: 'The expiration year invalid.',\n nextSteps: 'The customer should try again using the correct expiration date.',\n nextUserAction: 'Please try again using the correct expiration date.',\n translations: {\n ja: {\n description: '有効期限が無効です。',\n nextUserAction: '正しい有効期限を入力してもう一度お試しください。',\n },\n },\n },\n invalid_number: {\n description: 'The card number is incorrect.',\n nextSteps: 'The customer should try again using the correct card number.',\n nextUserAction: 'Please try again using the correct card number.',\n translations: {\n ja: {\n description: 'カード番号が正しくありません。',\n nextUserAction: '正しいカード番号を使用してもう一度やり直してください。',\n },\n },\n },\n invalid_pin: {\n description:\n 'The PIN entered is incorrect. This decline code only applies to payments made with a card reader.',\n nextSteps: 'The customer should try again using the correct PIN.',\n nextUserAction: 'Please try again using the correct card PIN.',\n translations: {\n ja: {\n description: 'PINコードが正しくありません。',\n nextUserAction: '正しいPINコードを使用してもう一度やり直してください。',\n },\n },\n },\n issuer_not_available: {\n description: 'The card issuer could not be reached, so the payment could not be authorized.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'カード発行者に連絡できなかったため、支払いを承認できませんでした。',\n nextUserAction:\n 'もう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n lost_card: {\n description: 'The payment has been declined because the card is reported lost.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n merchant_blacklist: {\n description:\n \"The payment has been declined because it matches a value on the Stripe user's blocklist.\",\n nextSteps:\n 'Do not report more detailed information to your customer. Instead, present as you would the generic_decline described above.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n new_account_information_available: {\n description: 'The card, or account the card is connected to, is invalid.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カード、またはカードが接続されているアカウントが無効です。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n no_action_taken: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n not_permitted: {\n description: 'The payment is not permitted.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: '支払いは許可されていません。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n pickup_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'カードでこの支払いを行うことはできません(紛失または盗難にあったと報告されている可能性があります)。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n pin_try_exceeded: {\n description: 'The allowable number of PIN tries has been exceeded.',\n nextSteps: 'The customer must use another card or method of payment.',\n nextUserAction: 'Please use another card or method of payment.',\n translations: {\n ja: {\n description: 'PIN試行回数の上限を超えました。',\n nextUserAction: '別のカードまたはお支払い方法をご利用ください。',\n },\n },\n },\n processing_error: {\n description: 'An error occurred while processing the card.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, try again later.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'カードの処理中にエラーが発生しました。',\n nextUserAction:\n 'もう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n reenter_transaction: {\n description: 'The payment could not be processed by the issuer for an unknown reason.',\n nextSteps:\n 'The payment should be attempted again. If it still cannot be processed, the customer needs to contact their card issuer.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: '原因不明のため、発行者が支払いを処理できませんでした。',\n nextUserAction:\n 'もう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n restricted_card: {\n description:\n 'The card cannot be used to make this payment (it is possible it has been reported lost or stolen).',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description:\n 'カードでこの支払いを行うことはできません(紛失または盗難にあったと報告されている可能性があります)。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n revocation_of_all_authorizations: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n revocation_of_authorization: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n security_violation: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n service_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n stolen_card: {\n description: 'The payment has been declined because the card is reported stolen.',\n nextSteps:\n 'The specific reason for the decline should not be reported to the customer. Instead, it needs to be presented as a generic decline.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n stop_payment_order: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer should contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n testmode_decline: {\n description: 'A Stripe test card number was used.',\n nextSteps: 'A genuine card must be used to make a payment.',\n nextUserAction: 'A genuine card must be used to make a payment.',\n translations: {\n ja: {\n description: 'Stripeテストカード番号を使用しました。',\n nextUserAction: '支払いには本物のカードを使用する必要があります。',\n },\n },\n },\n transaction_not_allowed: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps: 'The customer needs to contact their card issuer for more information.',\n nextUserAction: 'Please contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction: '詳しくはカード発行会社にお問い合わせください。',\n },\n },\n },\n try_again_later: {\n description: 'The card has been declined for an unknown reason.',\n nextSteps:\n 'Ask the customer to attempt the payment again. If subsequent payments are declined, the customer should contact their card issuer for more information.',\n nextUserAction:\n 'Please try again. If it still cannot be processed, the please contact your card issuer.',\n translations: {\n ja: {\n description: 'カードは未知の理由で拒否されました。',\n nextUserAction:\n 'もう一度やり直してください。それでも処理できない場合は、カード発行会社にお問い合わせください。',\n },\n },\n },\n withdrawal_count_limit_exceeded: {\n description: 'The customer has exceeded the balance or credit limit available on their card.',\n nextSteps: 'The customer should use an alternative payment method.',\n nextUserAction: 'Please use another card or contact your card issuer for more information.',\n translations: {\n ja: {\n description: 'このカードの残高またはクレジット制限を超えました。',\n nextUserAction: '別のカードを使用するか、カード発行会社にお問い合わせください。',\n },\n },\n },\n};\n","import { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\nimport type { DeclineCode, DeclineCodeResult, Locale } from './types';\n\n/**\n * Get decline code information with description and recommended actions\n *\n * @param declineCode - The Stripe decline code to look up\n * @returns Object containing the decline code information and documentation version\n *\n * @example\n * ```ts\n * const result = getDeclineDescription('insufficient_funds');\n * console.log(result.code.description);\n * // => \"The card has insufficient funds to complete the purchase.\"\n * console.log(result.code.nextUserAction);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function getDeclineDescription(declineCode?: string): DeclineCodeResult {\n if (!declineCode || !isValidDeclineCode(declineCode)) {\n return {\n docVersion: DOC_VERSION,\n code: {},\n };\n }\n\n const code = DECLINE_CODES[declineCode];\n return {\n docVersion: DOC_VERSION,\n code,\n };\n}\n\n/**\n * Get localized decline code message for end users\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @returns User-facing message in the specified locale, or undefined if not found\n *\n * @example\n * ```ts\n * const message = getDeclineMessage('insufficient_funds', 'ja');\n * console.log(message);\n * // => \"別のお支払い方法を使用してもう一度お試しください。\"\n * ```\n */\nexport function getDeclineMessage(declineCode: string, locale: Locale = 'en'): string | undefined {\n if (!isValidDeclineCode(declineCode)) {\n return undefined;\n }\n\n const codeInfo = DECLINE_CODES[declineCode];\n\n if (locale === 'en') {\n return codeInfo.nextUserAction;\n }\n\n return codeInfo.translations?.[locale]?.nextUserAction;\n}\n\n/**\n * Get all available decline codes\n *\n * @returns Array of all supported decline code strings\n *\n * @example\n * ```ts\n * const codes = getAllDeclineCodes();\n * console.log(codes.length); // => 44\n * console.log(codes.includes('insufficient_funds')); // => true\n * ```\n */\nexport function getAllDeclineCodes(): DeclineCode[] {\n return Object.keys(DECLINE_CODES) as DeclineCode[];\n}\n\n/**\n * Check if a decline code is valid\n *\n * @param code - The code to validate\n * @returns True if the code exists in the database\n *\n * @example\n * ```ts\n * isValidDeclineCode('insufficient_funds'); // => true\n * isValidDeclineCode('invalid_code'); // => false\n * ```\n */\nexport function isValidDeclineCode(code: string): code is DeclineCode {\n return code in DECLINE_CODES;\n}\n\n/**\n * Get the documentation version for the decline codes data\n *\n * @returns The Stripe API documentation version string\n *\n * @example\n * ```ts\n * const version = getDocVersion();\n * console.log(version); // => \"2024-12-18\"\n * ```\n */\nexport function getDocVersion(): string {\n return DOC_VERSION;\n}\n\n/**\n * Format a decline message with custom template variables\n *\n * @param declineCode - The Stripe decline code\n * @param locale - The locale to use (default: 'en')\n * @param variables - Optional variables to replace in the message template\n * @returns Formatted user-facing message with variables replaced\n *\n * @example\n * ```ts\n * const message = formatDeclineMessage('insufficient_funds', 'en', {\n * merchantName: 'Acme Store',\n * supportEmail: 'support@acme.com'\n * });\n * console.log(message);\n * // => \"Please try again using an alternative payment method.\"\n * ```\n */\nexport function formatDeclineMessage(\n declineCode: string,\n locale: Locale = 'en',\n variables?: Record<string, string>,\n): string | undefined {\n const baseMessage = getDeclineMessage(declineCode, locale);\n\n if (!baseMessage) {\n return undefined;\n }\n\n if (!variables) {\n return baseMessage;\n }\n\n // Replace variables in the format {{variableName}}\n let formattedMessage = baseMessage;\n for (const [key, value] of Object.entries(variables)) {\n const placeholder = new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, 'g');\n formattedMessage = formattedMessage.replace(placeholder, value);\n }\n\n return formattedMessage;\n}\n\n// Export data for advanced use cases\nexport { DECLINE_CODES, DOC_VERSION } from './data/decline-codes';\n// Export types\nexport type {\n DeclineCode,\n DeclineCodeInfo,\n DeclineCodeResult,\n Locale,\n Translation,\n} from './types';\n"],"names":["DOC_VERSION","DECLINE_CODES","getDeclineDescription","declineCode","isValidDeclineCode","code","getDeclineMessage","locale","codeInfo","getAllDeclineCodes","getDocVersion","formatDeclineMessage","variables","baseMessage","formattedMessage","key","value","placeholder"],"mappings":"AAOO,MAAMA,IAAc,cAMdC,IAAsD;AAAA,EACjE,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,WACE;AAAA,IACF,gBACE;AAAA,IACF,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA,QACb,gBACE;AAAA,MAAA;AAAA,IACJ;AAAA,EACF;AAAA,EAEF,aAAa;AAAA,IACX,aAAa;AAAA,IACb,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,cAAc;AAAA,MACZ,IAAI;AAAA,QACF,aAAa;AAAA,QACb,gBAAgB;AAAA,MAAA;AAAA,IAClB;AAAA,EACF;AAAA,EAEF,oBAAoB;AAAA,IAClB,aAAa;AAA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