UNPKG

@adyen/adyen-web

Version:

[![npm](https://img.shields.io/npm/v/@adyen/adyen-web.svg)](https://www.npmjs.com/package/@adyen/adyen-web)

3 lines (2 loc) 1.02 kB
import{SF_FIELDS_MAP as e,ENCRYPTED_SECURITY_CODE as t,GIFT_CARD as r,ENCRYPTED_SECURITY_CODE_3_DIGITS as n,ENCRYPTED_SECURITY_CODE_4_DIGITS as c}from"../constants.js";function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=(a,i,u,s)=>{const l=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e}({},a),f={};switch(u){case"ach":case r:break;default:if(s===t)f[n]=i.get("creditCard.securityCode.contextualText.3digits"),f[c]=i.get("creditCard.securityCode.contextualText.4digits");else{const t=`creditCard.${e[s]}.contextualText`,r=i.get(t);r!==t&&(f[s]=r)}}return Object.keys(f).length&&(l.contextualTexts=f),l};export{a as default}; //# sourceMappingURL=addContextTranslations.js.map