/g,">")))})),e}},{}],69:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.injectStylesheet=void 0;var r=t("./validate-selector"),i=t("./filter-style-keys"),o=t("./filter-style-values");function a(t,e,n){var i;void 0===e&&(e={});var s=t+"{";if(function(t){return/^@media\s+/i.test(t)}(t))Object.keys(e).forEach((function(t){r.validateSelector(t)&&(s+=a(t,e[t],n))}));else{i=n(e);var u=o.filterStyleValues(i);Object.keys(u).forEach((function(t){s+=t+":"+u[t]+";"}))}return s+="}"}n.injectStylesheet=function(t,e,n){void 0===t&&(t={}),void 0===e&&(e=[]);var o=0,s=document.createElement("style");document.querySelector("head").appendChild(s);var u=s.sheet;function c(t){return i.filterStyleKeys(t,e,n)}return Object.keys(t).forEach((function(e){if(r.validateSelector(e)){var n=a(e,t[e],c);try{u.insertRule?u.insertRule(n,o):u.addRule(e,n.replace(/^[^{]+/,"").replace(/[{}]/g,""),o),o++}catch(t){if(!(t instanceof SyntaxError||t instanceof DOMException))throw t}}})),s}},{"./filter-style-keys":67,"./filter-style-values":68,"./validate-selector":70}],70:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSelector=void 0,n.validateSelector=function(t){return 0!==t.trim().length&&(!/supports/i.test(t)&&(!/import/i.test(t)&&(!/[{}]/.test(t)&&!/-1}(t)}},{"@braintree/browser-detection/is-android":16,"@braintree/browser-detection/is-chrome":18,"@braintree/browser-detection/is-chrome-os":17,"@braintree/browser-detection/is-ie9":23,"@braintree/browser-detection/is-ios":25}],73:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PatternFormatter=void 0;var r=t("./parse-pattern"),i=t("../is-backspace"),o=function(){function t(t){this.pattern=r.parsePattern(t)}return t.prototype.format=function(t){for(var e=t.value,n=0,r="",i={start:t.selection.start,end:t.selection.end},o=0;oe.length)break;if("string"==typeof a.value)null==s&&r.length!==a.index||(r+=a.value,a.index<=i.start&&i.start++,a.index<=i.end&&i.end++);else for(;n1&&(n.cid=e[1])})),i={f:t.substr(0,32),fp:n,bu:!1,s:O},o.text=JSON.stringify(i)},N.prototype.request=function(t,e){var n=this,i=new p((function(e,i){var o,a,c,l,p,f=Boolean("payment_methods/credit_cards"===t.endpoint&&n.getConfiguration().gatewayConfiguration.creditCards.collectDeviceData);if("graphQLApi"!==t.api&&(t.method?t.endpoint||(o="options.endpoint"):o="options.method"),o)throw new s({type:g.CLIENT_OPTION_REQUIRED.type,code:g.CLIENT_OPTION_REQUIRED.code,message:o+" is required when making a request."});if(a="api"in t?t.api:"clientApi",l={method:t.method,graphQL:n._graphQL,timeout:t.timeout,metadata:n._configuration.analyticsMetadata},"clientApi"===a)c=n._clientApiBaseUrl,l.data=d(n._configuration,t.data);else{if("graphQLApi"!==a)throw new s({type:g.CLIENT_OPTION_INVALID.type,code:g.CLIENT_OPTION_INVALID.code,message:"options.api is invalid."});c=b[n._configuration.gatewayConfiguration.environment],t.endpoint="",l.method="post",l.data=y({clientSdkMetadata:{platform:n._configuration.analyticsMetadata.platform,source:n._configuration.analyticsMetadata.source,integration:n._configuration.analyticsMetadata.integration,sessionId:n._configuration.analyticsMetadata.sessionId,version:E}},t.data),l.headers={Authorization:"Bearer "+((p=n._configuration).authorizationFingerprint||p.authorization),"Braintree-Version":r}}l.url=c+t.endpoint,l.sendAnalyticsEvent=function(t){v.sendEvent(n,t)},n._request(l,(function(t,r,o){var c,l;l=function(t,e){var n;-1===t?n=new s(g.CLIENT_REQUEST_TIMEOUT):401===t?n=new s(g.CLIENT_AUTHORIZATION_INVALID):403===t?n=new s(g.CLIENT_AUTHORIZATION_INSUFFICIENT):429===t?n=new s(g.CLIENT_RATE_LIMITED):t>=500?n=new s(g.CLIENT_GATEWAY_NETWORK):(t<200||t>=400)&&(n=u(e,{type:g.CLIENT_REQUEST_ERROR.type,code:g.CLIENT_REQUEST_ERROR.code,message:g.CLIENT_REQUEST_ERROR.message}));if(n)return n.details=n.details||{},n.details.httpStatus=t,n}(o,t),l?i(l):"graphQLApi"===a&&r.errors?i(u(r.errors,{type:g.CLIENT_GRAPHQL_REQUEST_ERROR.type,code:g.CLIENT_GRAPHQL_REQUEST_ERROR.code,message:g.CLIENT_GRAPHQL_REQUEST_ERROR.message})):(c=y({_httpStatus:o},r),f&&c.creditCards&&c.creditCards.length>0&&(n._findOrCreateFraudnetJSON(c.creditCards[0].nonce),T.loadScript({src:C,forceScriptReload:!0})),e(c))}))}));return"function"==typeof e?(e=h(m(e)),void i.then((function(t){e(null,t,t._httpStatus)})).catch((function(t){var n=t&&t.details&&t.details.httpStatus;e(t,null,n)}))):i},N.prototype.toJSON=function(){return this.getConfiguration()},N.prototype.getVersion=function(){return E},N.prototype.teardown=f((function(){return delete w[this.getConfiguration().authorization],I(this,_(N.prototype)),p.resolve()})),e.exports=N},{"../lib/add-metadata":137,"../lib/analytics":138,"../lib/assets":139,"../lib/assign":140,"../lib/braintree-error":141,"../lib/constants":142,"../lib/convert-methods-to-error":143,"../lib/convert-to-braintree-error":144,"../lib/create-authorization-data":145,"../lib/deferred":147,"../lib/is-verified-domain":152,"../lib/methods":154,"../lib/once":155,"../lib/promise":156,"./constants":91,"./errors":92,"./get-configuration":93,"./request":104,"./request/graphql":102,"@braintree/wrap-promise":33}],91:[function(t,e,n){"use strict";e.exports={BRAINTREE_VERSION:"2018-05-10"}},{}],92:[function(t,e,n){"use strict";var r=t("../lib/braintree-error");e.exports={CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN:{type:r.types.MERCHANT,code:"CLIENT_GATEWAY_CONFIGURATION_INVALID_DOMAIN"},CLIENT_OPTION_REQUIRED:{type:r.types.MERCHANT,code:"CLIENT_OPTION_REQUIRED"},CLIENT_OPTION_INVALID:{type:r.types.MERCHANT,code:"CLIENT_OPTION_INVALID"},CLIENT_MISSING_GATEWAY_CONFIGURATION:{type:r.types.INTERNAL,code:"CLIENT_MISSING_GATEWAY_CONFIGURATION",message:"Missing gatewayConfiguration."},CLIENT_INVALID_AUTHORIZATION:{type:r.types.MERCHANT,code:"CLIENT_INVALID_AUTHORIZATION",message:"Authorization is invalid. Make sure your client token or tokenization key is valid."},CLIENT_GATEWAY_NETWORK:{type:r.types.NETWORK,code:"CLIENT_GATEWAY_NETWORK",message:"Cannot contact the gateway at this time."},CLIENT_REQUEST_TIMEOUT:{type:r.types.NETWORK,code:"CLIENT_REQUEST_TIMEOUT",message:"Request timed out waiting for a reply."},CLIENT_REQUEST_ERROR:{type:r.types.NETWORK,code:"CLIENT_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_GRAPHQL_REQUEST_ERROR:{type:r.types.NETWORK,code:"CLIENT_GRAPHQL_REQUEST_ERROR",message:"There was a problem with your request."},CLIENT_RATE_LIMITED:{type:r.types.MERCHANT,code:"CLIENT_RATE_LIMITED",message:"You are being rate-limited; please try again in a few minutes."},CLIENT_AUTHORIZATION_INSUFFICIENT:{type:r.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INSUFFICIENT",message:"The authorization used has insufficient privileges."},CLIENT_AUTHORIZATION_INVALID:{type:r.types.MERCHANT,code:"CLIENT_AUTHORIZATION_INVALID",message:"Either the client token has expired and a new one should be generated or the tokenization key has been deactivated or deleted."}}},{"../lib/braintree-error":141}],93:[function(t,e,n){"use strict";var r=t("../lib/braintree-error"),i=t("../lib/promise"),o=t("@braintree/wrap-promise"),a=t("./request"),s=t("@braintree/uuid"),u=t("../lib/constants"),c=t("./errors"),l=t("./request/graphql"),d=t("../lib/constants").GRAPHQL_URLS,p=t("../lib/is-date-string-before-or-on"),f=t("./constants").BRAINTREE_VERSION;e.exports={getConfiguration:o((function(t){return new i((function(e,n){var i,o,h,m,y=s(),v={merchantAppId:window.location.host,platform:u.PLATFORM,sdkVersion:u.VERSION,source:u.SOURCE,integration:u.INTEGRATION,integrationType:u.INTEGRATION,sessionId:y};o=t.attrs,h=t.configUrl,o._meta=v,o.braintreeLibraryVersion=u.BRAINTREE_LIBRARY_VERSION,o.configVersion="3",m={url:h,method:"GET",data:o},o.authorizationFingerprint&&t.graphQL?(p(t.graphQL.date,f)&&(m.graphQL=new l({graphQL:{url:t.graphQL.url,features:["configuration"]}})),m.metadata=v):o.tokenizationKey&&(m.graphQL=new l({graphQL:{url:d[t.environment],features:["configuration"]}}),m.metadata=v),a(m,(function(t,a,s){var u;if(t)return u=403===s?c.CLIENT_AUTHORIZATION_INSUFFICIENT:401===s?c.CLIENT_AUTHORIZATION_INVALID:c.CLIENT_GATEWAY_NETWORK,void n(new r({type:u.type,code:u.code,message:u.message,details:{originalError:t}}));i={authorizationType:o.tokenizationKey?"TOKENIZATION_KEY":"CLIENT_TOKEN",authorizationFingerprint:o.authorizationFingerprint,analyticsMetadata:v,gatewayConfiguration:a},e(i)}))}))}))}},{"../lib/braintree-error":141,"../lib/constants":142,"../lib/is-date-string-before-or-on":151,"../lib/promise":156,"./constants":91,"./errors":92,"./request":104,"./request/graphql":102,"@braintree/uuid":29,"@braintree/wrap-promise":33}],94:[function(t,e,n){"use strict";var r=t("../../lib/querystring"),i=t("../../lib/assign").assign,o=t("./prep-body"),a=t("./parse-body"),s=t("./xhr"),u=s.isAvailable,c=t("./graphql/request"),l=t("./default-request");function d(t,e,n){var p,f,h,m,y,v,g,E=t.url,b=t.graphQL,_=t.timeout,I=s.getRequestObject(),T=n,A=Boolean(b&&b.isGraphQLRequest(E,t.data));t.headers=i({"Content-Type":"application/json"},t.headers),E=(h=A?new c(t):new l(t)).getUrl(),m=h.getBody(),y=h.getMethod(),v=h.getHeaders(),"GET"===y&&(E=r.queryify(E,m),m=null),u?I.onreadystatechange=function(){if(4===I.readyState){if(0===I.status&&A)return delete t.graphQL,void d(t,e,n);if(g=a(I.responseText),f=h.adaptResponseBody(g),(p=h.determineStatus(I.status,g))>=400||p<200){if(A&&function(t){var e=!t.data&&t.errors&&t.errors[0]&&t.errors[0].extensions&&t.errors[0].extensions.errorClass;return"UNKNOWN"===e||"INTERNAL"===e}(g))return delete t.graphQL,void d(t,e,n);if(e<1&&function(t){return!t||408===t}(p))return e++,void d(t,e,n);T(f||"error",null,p||500)}else T(null,f,p)}}:(t.headers&&(E=r.queryify(E,v)),I.onload=function(){T(null,a(I.responseText),I.status)},I.onerror=function(){T("error",null,500)},I.onprogress=function(){},I.ontimeout=function(){T("timeout",null,-1)});try{I.open(y,E,!0)}catch(r){if(!A)throw r;return delete t.graphQL,void d(t,e,n)}I.timeout=_,u&&Object.keys(v).forEach((function(t){I.setRequestHeader(t,v[t])}));try{I.send(o(y,m))}catch(t){}}e.exports={request:function(t,e){d(t,0,e)}}},{"../../lib/assign":140,"../../lib/querystring":157,"./default-request":95,"./graphql/request":103,"./parse-body":107,"./prep-body":108,"./xhr":109}],95:[function(t,e,n){"use strict";function r(t){this._url=t.url,this._data=t.data,this._method=t.method,this._headers=t.headers}r.prototype.getUrl=function(){return this._url},r.prototype.getBody=function(){return this._data},r.prototype.getMethod=function(){return this._method},r.prototype.getHeaders=function(){return this._headers},r.prototype.adaptResponseBody=function(t){return t},r.prototype.determineStatus=function(t){return t},e.exports=r},{}],96:[function(t,e,n){"use strict";e.exports=function(){return window.navigator.userAgent}},{}],97:[function(t,e,n){"use strict";var r=t("./error"),i=t("../../../../lib/assign").assign,o={AMERICAN_EXPRESS:"American Express",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",SOLO:"Solo",UK_MAESTRO:"UK Maestro",UNION_PAY:"UnionPay",VISA:"Visa"},a={VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",INTERNATIONAL_MAESTRO:"maestro"},s={VISA:"Visa",MASTERCARD:"MasterCard",DISCOVER:"Discover",AMERICAN_EXPRESS:"American Express"},u={VISA:"visa",MASTERCARD:"mastercard",DISCOVER:"discover",AMERICAN_EXPRESS:"amex"},c={VISA:"visa",MASTERCARD:"master",DISCOVER:"discover",AMERICAN_EXPRESS:"amex",DINERS:"diners",INTERNATIONAL_MAESTRO:"maestro",JCB:"jcb"};function l(t,e){return t.reduce((function(t,n){return e.hasOwnProperty(n)?t.concat(e[n]):t}),[])}e.exports=function(t,e){var n;return n=t.data&&!t.errors?function(t,e){var n,r=t.data.clientConfiguration;n={environment:r.environment.toLowerCase(),clientApiUrl:r.clientApiUrl,assetsUrl:r.assetsUrl,analytics:{url:r.analyticsUrl},merchantId:r.merchantId,venmo:"off"},r.supportedFeatures&&(n.graphQL={url:e._graphQL._config.url,features:r.supportedFeatures.map((function(t){return t.toLowerCase()}))});r.braintreeApi&&(n.braintreeApi=r.braintreeApi);r.applePayWeb&&(n.applePayWeb=r.applePayWeb,n.applePayWeb.supportedNetworks=l(r.applePayWeb.supportedCardBrands,a),delete n.applePayWeb.supportedCardBrands);r.ideal&&(n.ideal=r.ideal);r.kount&&(n.kount={kountMerchantId:r.kount.merchantId});r.creditCard?(n.challenges=r.creditCard.challenges.map((function(t){return t.toLowerCase()})),n.creditCards={supportedCardTypes:l(r.creditCard.supportedCardBrands,o)},n.threeDSecureEnabled=r.creditCard.threeDSecureEnabled,n.threeDSecure=r.creditCard.threeDSecure):(n.challenges=[],n.creditCards={supportedCardTypes:[]},n.threeDSecureEnabled=!1);r.googlePay&&(n.androidPay={displayName:r.googlePay.displayName,enabled:!0,environment:r.googlePay.environment.toLowerCase(),googleAuthorizationFingerprint:r.googlePay.googleAuthorization,paypalClientId:r.googlePay.paypalClientId,supportedNetworks:l(r.googlePay.supportedCardBrands,u)});r.venmo&&(n.payWithVenmo={merchantId:r.venmo.merchantId,accessToken:r.venmo.accessToken,environment:r.venmo.environment.toLowerCase()});r.paypal?(n.paypalEnabled=!0,n.paypal=i({},r.paypal),n.paypal.currencyIsoCode=n.paypal.currencyCode,n.paypal.environment=n.paypal.environment.toLowerCase(),delete n.paypal.currencyCode):n.paypalEnabled=!1;r.unionPay&&(n.unionPay={enabled:!0,merchantAccountId:r.unionPay.merchantAccountId});r.visaCheckout&&(n.visaCheckout={apikey:r.visaCheckout.apiKey,externalClientId:r.visaCheckout.externalClientId,supportedCardTypes:l(r.visaCheckout.supportedCardBrands,s)});r.masterpass&&(n.masterpass={merchantCheckoutId:r.masterpass.merchantCheckoutId,supportedNetworks:l(r.masterpass.supportedCardBrands,c)});r.usBankAccount&&(n.usBankAccount={routeId:r.usBankAccount.routeId,plaid:{publicKey:r.usBankAccount.plaidPublicKey}});return n}(t,e):r(t),n}},{"../../../../lib/assign":140,"./error":99}],98:[function(t,e,n){"use strict";var r=t("./error"),i={AMERICAN_EXPRESS:"American Express",DINERS:"Discover",DISCOVER:"Discover",INTERNATIONAL_MAESTRO:"Maestro",JCB:"JCB",MASTERCARD:"MasterCard",UK_MAESTRO:"Maestro",UNION_PAY:"Union Pay",VISA:"Visa"},o={YES:"Yes",NO:"No",UNKNOWN:"Unknown"},a={PSDTWO:"psd2"};e.exports=function(t){return t.data&&!t.errors?function(t){var e,n,r=t.data.tokenizeCreditCard,s=r.creditCard,u=s.last4?s.last4.substr(2,4):"",c=s.binData;c&&(["commercial","debit","durbinRegulated","healthcare","payroll","prepaid"].forEach((function(t){c[t]?c[t]=o[c[t]]:c[t]="Unknown"})),["issuingBank","countryOfIssuance","productId"].forEach((function(t){c[t]||(c[t]="Unknown")})));e={creditCards:[{binData:c,consumed:!1,description:u?"ending in "+u:"",nonce:r.token,details:{cardholderName:s.cardholderName,expirationMonth:s.expirationMonth,expirationYear:s.expirationYear,bin:s.bin||"",cardType:i[s.brandCode]||"Unknown",lastFour:s.last4||"",lastTwo:u},type:"CreditCard",threeDSecureInfo:null}]},r.authenticationInsight&&(n=r.authenticationInsight.customerAuthenticationRegulationEnvironment,e.creditCards[0].authenticationInsight={regulationEnvironment:a[n]||n.toLowerCase()});return e}(t):r(t)}},{"./error":99}],99:[function(t,e,n){"use strict";function r(t,e,n){var i,o=e.extensions.legacyCode,a=t[0];1!==t.length?(n.forEach((function(t){t.field===a&&(i=t)})),i||(i={field:a,fieldErrors:[]},n.push(i)),r(t.slice(1),e,i.fieldErrors)):n.push({code:o,field:a,message:e.message})}function i(t){return{creditCard:"Credit card is invalid"}[t[0].field]}e.exports=function(t){var e,n=t.errors&&t.errors[0]&&t.errors[0].extensions&&t.errors[0].extensions.errorClass;return e="VALIDATION"===n?function(t){var e=function(t){var e=[];return t.forEach((function(t){t.extensions&&t.extensions.inputPath&&r(t.extensions.inputPath.slice(1),t,e)})),e}(t.errors);if(0===e.length)return{error:{message:t.errors[0].message}};return{error:{message:i(e)},fieldErrors:e}}(t):n?function(t){return{error:{message:t.errors[0].message},fieldErrors:[]}}(t):{error:{message:"There was a problem serving your request"},fieldErrors:[]},e}},{}],100:[function(t,e,n){"use strict";e.exports=function(){return{query:"query ClientConfiguration { clientConfiguration { analyticsUrl environment merchantId assetsUrl clientApiUrl creditCard { supportedCardBrands challenges threeDSecureEnabled threeDSecure { cardinalAuthenticationJWT } } applePayWeb { countryCode currencyCode merchantIdentifier supportedCardBrands } googlePay { displayName supportedCardBrands environment googleAuthorization paypalClientId } ideal { routeId assetsUrl } kount { merchantId } masterpass { merchantCheckoutId supportedCardBrands } paypal { displayName clientId privacyUrl userAgreementUrl assetsUrl environment environmentNoNetwork unvettedMerchant braintreeClientId billingAgreementsEnabled merchantAccountId currencyCode payeeEmail } unionPay { merchantAccountId } usBankAccount { routeId plaidPublicKey } venmo { merchantId accessToken environment } visaCheckout { apiKey externalClientId supportedCardBrands } braintreeApi { accessToken url } supportedFeatures } }",operationName:"ClientConfiguration"}}},{}],101:[function(t,e,n){"use strict";var r=t("../../../../lib/assign").assign;function i(t,e){var n=t.creditCard,i=n&&n.billingAddress,o=n&&n.expirationDate,a=n&&(n.expirationMonth||o&&o.split("/")[0].trim()),s=n&&(n.expirationYear||o&&o.split("/")[1].trim()),u={input:{creditCard:{number:n&&n.number,expirationMonth:a,expirationYear:s,cvv:n&&n.cvv,cardholderName:n&&n.cardholderName},options:{}}};return e.hasAuthenticationInsight&&(u.authenticationInsightInput={merchantAccountId:t.merchantAccountId}),i&&(u.input.creditCard.billingAddress=i),u.input=function(t,e){var n;t.creditCard&&t.creditCard.options&&"boolean"==typeof t.creditCard.options.validate?n=t.creditCard.options.validate:t.authorizationFingerprint&&t.tokenizationKey||t.authorizationFingerprint?n=!0:t.tokenizationKey&&(n=!1);"boolean"==typeof n&&(e.options=r({validate:n},e.options));return e}(t,u.input),u}e.exports=function(t){var e,n,r,o={hasAuthenticationInsight:Boolean(t.authenticationInsight&&t.merchantAccountId)};return{query:(e=o,n=e.hasAuthenticationInsight,r="mutation TokenizeCreditCard($input: TokenizeCreditCardInput!",n&&(r+=", $authenticationInsightInput: AuthenticationInsightInput!"),r+=") { tokenizeCreditCard(input: $input) { token creditCard { bin brandCode last4 cardholderName expirationMonth expirationYear binData { prepaid healthcare debit durbinRegulated commercial payroll issuingBank countryOfIssuance productId } } ",n&&(r+=" authenticationInsight(input: $authenticationInsightInput) { customerAuthenticationRegulationEnvironment }"),r+=" } }"),variables:i(t,o),operationName:"TokenizeCreditCard"}}},{"../../../../lib/assign":140}],102:[function(t,e,n){"use strict";var r=t("../../browser-detection"),i={tokenize_credit_cards:"payment_methods/credit_cards",configuration:"configuration"},o=["creditCard.options.unionPayEnrollment"];function a(t){this._config=t.graphQL}a.prototype.getGraphQLEndpoint=function(){return this._config.url},a.prototype.isGraphQLRequest=function(t,e){var n,a=this.getClientApiPath(t);return!(!this._isGraphQLEnabled()||!a||r.isIe9())&&(n=this._config.features.some((function(t){return i[t]===a})),!function(t){return o.some((function(e){return void 0!==e.split(".").reduce((function(t,e){return t&&t[e]}),t)}))}(e)&&n)},a.prototype.getClientApiPath=function(t){var e,n=t.split("/client_api/v1/");return n.length>1&&(e=n[1].split("?")[0]),e},a.prototype._isGraphQLEnabled=function(){return Boolean(this._config)},e.exports=a},{"../../browser-detection":89}],103:[function(t,e,n){"use strict";var r=t("../../constants").BRAINTREE_VERSION,i=t("../../../lib/assign").assign,o=t("./generators/credit-card-tokenization"),a=t("./adapters/credit-card-tokenization"),s=t("./generators/configuration"),u=t("./adapters/configuration"),c={"payment_methods/credit_cards":o,configuration:s},l={"payment_methods/credit_cards":a,configuration:u};function d(t){var e=t.graphQL.getClientApiPath(t.url);this._graphQL=t.graphQL,this._data=t.data,this._method=t.method,this._headers=t.headers,this._clientSdkMetadata={source:t.metadata.source,integration:t.metadata.integration,sessionId:t.metadata.sessionId},this._sendAnalyticsEvent=t.sendAnalyticsEvent||Function.prototype,this._generator=c[e],this._adapter=l[e],this._sendAnalyticsEvent("graphql.init")}function p(t){var e={};return Object.keys(t).forEach((function(n){var r,i=-1===(r=n).indexOf("_")?r:r.toLowerCase().replace(/(\_\w)/g,(function(t){return t[1].toUpperCase()}));"object"==typeof t[n]?e[i]=p(t[n]):"number"==typeof t[n]?e[i]=String(t[n]):e[i]=t[n]})),e}d.prototype.getUrl=function(){return this._graphQL.getGraphQLEndpoint()},d.prototype.getBody=function(){var t=p(this._data),e=this._generator(t),n=i({clientSdkMetadata:this._clientSdkMetadata},e);return JSON.stringify(n)},d.prototype.getMethod=function(){return"POST"},d.prototype.getHeaders=function(){var t,e;return this._data.authorizationFingerprint?(this._sendAnalyticsEvent("graphql.authorization-fingerprint"),t=this._data.authorizationFingerprint):(this._sendAnalyticsEvent("graphql.tokenization-key"),t=this._data.tokenizationKey),e={Authorization:"Bearer "+t,"Braintree-Version":r},i({},this._headers,e)},d.prototype.adaptResponseBody=function(t){return this._adapter(t,this)},d.prototype.determineStatus=function(t,e){var n,r;return 200===t?(r=e.errors&&e.errors[0]&&e.errors[0].extensions&&e.errors[0].extensions.errorClass,n=e.data&&!e.errors?200:"VALIDATION"===r?422:"AUTHORIZATION"===r?403:"AUTHENTICATION"===r?401:function(t,e){return!t&&e.errors[0].message}(r,e)?403:500):n=t||500,this._sendAnalyticsEvent("graphql.status."+t),this._sendAnalyticsEvent("graphql.determinedStatus."+n),n},e.exports=d},{"../../../lib/assign":140,"../../constants":91,"./adapters/configuration":97,"./adapters/credit-card-tokenization":98,"./generators/configuration":100,"./generators/credit-card-tokenization":101}],104:[function(t,e,n){"use strict";var r,i=t("../../lib/once"),o=t("./jsonp-driver"),a=t("./ajax-driver"),s=t("./get-user-agent"),u=t("./is-http");e.exports=function(t,e){e=i(e||Function.prototype),t.method=(t.method||"GET").toUpperCase(),t.timeout=null==t.timeout?6e4:t.timeout,t.data=t.data||{},null==r&&(r=!(u()&&/MSIE\s(8|9)/.test(s()))),r?a.request(t,e):o.request(t,e)}},{"../../lib/once":155,"./ajax-driver":94,"./get-user-agent":96,"./is-http":105,"./jsonp-driver":106}],105:[function(t,e,n){"use strict";e.exports=function(){return"http:"===window.location.protocol}},{}],106:[function(t,e,n){"use strict";var r,i=t("@braintree/uuid"),o=t("../../lib/querystring"),a={};function s(t){try{delete window[t]}catch(e){window[t]=null}}e.exports={request:function(t,e){var n,u="callback_json_"+i().replace(/-/g,""),c=t.url,l=t.data,d=t.method,p=t.timeout;c=o.queryify(c,l),n=function(t,e){var n=document.createElement("script"),r=!1;return n.src=t,n.async=!0,n.onerror=function(){window[e]({message:"error",status:500})},n.onload=n.onreadystatechange=function(){r||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(r=!0,n.onload=n.onreadystatechange=null)},n}(c=o.queryify(c,{_method:d,callback:u}),u),function(t,e,n){window[n]=function(r){var i=r.status||500,o=null,u=null;delete r.status,i>=400||i<200?o=r:u=r,s(n),function(t){t&&t.parentNode&&t.parentNode.removeChild(t)}(t),clearTimeout(a[n]),e(o,u,i)}}(n,e,u),function(t,e){a[e]=setTimeout((function(){a[e]=null,window[e]({error:"timeout",status:-1}),window[e]=function(){s(e)}}),t)}(p,u),r||(r=document.getElementsByTagName("head")[0]),r.appendChild(n)}}},{"../../lib/querystring":157,"@braintree/uuid":29}],107:[function(t,e,n){"use strict";e.exports=function(t){try{t=JSON.parse(t)}catch(t){}return t}},{}],108:[function(t,e,n){"use strict";e.exports=function(t,e){if("string"!=typeof t)throw new Error("Method must be a string");return"get"!==t.toLowerCase()&&null!=e&&(e="string"==typeof e?e:JSON.stringify(e)),e}},{}],109:[function(t,e,n){"use strict";var r="undefined"!=typeof window&&window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest;e.exports={isAvailable:r,getRequestObject:function(){return r?new window.XMLHttpRequest:new window.XDomainRequest}}},{}],110:[function(t,e,n){"use strict";var r=t("../../lib/braintree-error"),i=t("../shared/errors"),o=t("../shared/constants").allowedAttributes;e.exports=function(t,e){var n;return o.hasOwnProperty(t)?null==e||function(t,e){if("string"===o[t])return"string"==typeof e||"number"==typeof e;if("boolean"===o[t])return"true"===String(e)||"false"===String(e);return!1}(t,e)||(n=new r({type:i.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.type,code:i.HOSTED_FIELDS_ATTRIBUTE_VALUE_NOT_ALLOWED.code,message:'Value "'+e+'" is not allowed for "'+t+'" attribute.'})):n=new r({type:i.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.type,code:i.HOSTED_FIELDS_ATTRIBUTE_NOT_SUPPORTED.code,message:'The "'+t+'" attribute is not supported in Hosted Fields.'}),n}},{"../../lib/braintree-error":141,"../shared/constants":133,"../shared/errors":134}],111:[function(t,e,n){"use strict";e.exports={assembleIFrames:function(t){var e,n,r=[];for(e=0;e0;return"number"in t&&(e.number=t.number.replace(/[-\s]/g,"")),"cvv"in t&&(e.cvv=t.cvv),"expirationMonth"in t&&(e.expiration_month=t.expirationMonth),"expirationYear"in t&&(2===t.expirationYear.length?e.expiration_year="20"+t.expirationYear:e.expiration_year=t.expirationYear),r&&(e.billing_address=n),"cardholderName"in t&&(e.cardholderName=t.cardholderName),e}},{}],126:[function(t,e,n){"use strict";e.exports={getFrameName:function(){return window.name.replace("braintree-hosted-field-","")}}},{}],127:[function(t,e,n){"use strict";var r=t("../../lib/assign").assign,i=t("framebus"),o=t("../../lib/promise"),a=t("../../lib/convert-to-braintree-error"),s=t("./get-frame-name"),u=t("./assemble-iframes"),c=t("../../client/client"),l=t("inject-stylesheet").injectWithAllowlist,d=t("./models/credit-card-form").CreditCardForm,p=t("./components/field-component").FieldComponent,f=t("../../lib/analytics"),h=t("../../lib/braintree-error"),m=t("../shared/constants"),y=t("../shared/browser-detection"),v=t("../shared/errors"),g=m.events,E=m.allowedStyles,b=m.tokenizationErrorCodes,_=t("./format-card-request-data"),I=t("./normalize-card-type"),T=t("../shared/focus-intercept"),A=["company","countryCodeNumeric","countryCodeAlpha2","countryCodeAlpha3","countryName","extendedAddress","locality","region","firstName","lastName","postalCode","streetAddress"];function O(t){var e=document.createDocumentFragment(),n=document.createElement("label"),r=document.createElement("input");return n.setAttribute("aria-hidden",!0),n.setAttribute("for",t+"-autofill-field"),n.textContent=t,r.setAttribute("aria-hidden",!0),r.id=t+"-autofill-field",r.className="autofill-field",r.type="text",r.name=t,r.setAttribute("autocomplete",m.autocompleteMappings[t]),y.isChromeIos()?r.addEventListener("focus",(function(){r.blur()})):r.setAttribute("tabindex",-1),e.appendChild(n),e.appendChild(r),e}function C(t,e){return function(n,i){var s;o.resolve(t).then((function(u){var c,l,d=n.fieldsToTokenize,p=e.isEmpty(d),m=e.invalidFieldKeys(d),y=0===m.length,g=n.authenticationInsight,E=g&&g.merchantAccountId;return p?(i([new h(v.HOSTED_FIELDS_FIELDS_EMPTY)]),o.resolve()):y?(n=n||{},c=function(t,e){var n=r({},e.billingAddress),i=e.cardholderName;Object.keys(n).forEach((function(e){(-1===A.indexOf(e)||t.hasOwnProperty(e))&&delete n[e]})),i&&(n.cardholderName=i);return r({},t,n)}(e.getCardData(d),n),(l=_(c)).options={validate:!0===n.vault},s={_meta:{source:"hosted-fields"},creditCard:l},E&&(s.authenticationInsight=!0,s.merchantAccountId=E),u.request({api:"clientApi",method:"post",endpoint:"payment_methods/credit_cards",data:s}).then((function(e){var n=e.creditCards[0],r={nonce:n.nonce,details:n.details,description:n.description,type:n.type,binData:n.binData};n.authenticationInsight&&(r.authenticationInsight=n.authenticationInsight),f.sendEvent(t,"custom.hosted-fields.tokenization.succeeded"),i([null,r])})).catch((function(e){var n=function(t){var e,n,r,i=t.details&&t.details.httpStatus;if(403===i)e=t;else if(i<500){try{r=(n=h.findRootError(t)).fieldErrors[0].fieldErrors[0].code}catch(t){}b.hasOwnProperty(r)?e=a(n,b[r]):(e=new h(v.HOSTED_FIELDS_FAILED_TOKENIZATION)).details={originalError:t}}else(e=new h(v.HOSTED_FIELDS_TOKENIZATION_NETWORK_ERROR)).details={originalError:t};return e}(e);f.sendEvent(t,"custom.hosted-fields.tokenization.failed"),i([n])}))):(i([new h({type:v.HOSTED_FIELDS_FIELDS_INVALID.type,code:v.HOSTED_FIELDS_FIELDS_INVALID.code,message:v.HOSTED_FIELDS_FIELDS_INVALID.message,details:{invalidFieldKeys:m}})]),o.resolve())}))}}function w(t){var e=new d(t),n=u.assembleIFrames(window.parent),r=new o((function(t){window.bus.emit(g.READY_FOR_CLIENT,(function(e){t(new c(e))}))})).then((function(n){var r,i=t.fields.number;return i&&(i.supportedCardBrands||i.rejectUnsupportedCards)&&(r=function(t,e){var n,r=t.getConfiguration().gatewayConfiguration.creditCards,i=r&&r.supportedCardTypes.map(I);return e=e||{},n=(i=i||[]).reduce((function(t,e){return t[e]=!0,t}),{}),Object.keys(e).forEach((function(t){n[I(t)]=e[t]})),n}(n,i.supportedCardBrands),e.setSupportedCardTypes(r),e.validateField("number")),n}));return n.forEach((function(t){try{t.braintree.hostedFields.initialize(e)}catch(t){}})),f.sendEvent(r,"custom.hosted-fields.load.succeeded"),window.bus.on(g.TOKENIZATION_REQUEST,(function(t,n){C(r,e)(t,n)})),window.cardForm=e,r}e.exports={initialize:function(t){var e,n=s.getFrameName(),r=document.createElement("form");r.setAttribute("novalidate",!0),r.setAttribute("action","#"),r.addEventListener("submit",(function(t){t.preventDefault()})),l(t.configuration.styles,E),e=new p({componentId:location.hash.slice(1,location.hash.length),cardForm:t,type:n}),r.appendChild(e.element),t.configuration.preventAutofill||function(t,e){var n=s.getFrameName(),r={cardholderName:"",number:"",month:"",year:"",cvv:""},i=O("cardholder-name"),o=O("credit-card-number"),a=O("expiration-month"),u=O("expiration-year"),c=O("cvv"),l=i.querySelector("input"),d=o.querySelector("input"),p=a.querySelector("input"),f=u.querySelector("input"),h=c.querySelector("input");t.input.element.addEventListener("input",(function(){l.value="",d.value="",p.value="",f.value="",h.value="",r.cardholderName="",r.number="",r.month="",r.year="",r.cvv=""})),setInterval((function(){var n=l.value,i=d.value,o=p.value,a=f.value,s=h.value;(n&&r.cardholderName!==n||i&&r.number!==i||o&&r.month!==o||a&&r.year!==a||s&&r.cvv!==s)&&(r.cardholderName=n,r.number=i,r.month=o,r.year=a,r.cvv=s,function(t){t.style.position="relative",t.style.position="absolute"}(e),t.input.model._emit("autofill",{cardholderName:n,number:i,expirationMonth:o,expirationYear:a,cvv:s}))}),100),"cardholderName"!==n&&e.appendChild(i);"number"!==n&&e.appendChild(o);"expirationDate"!==n&&"expirationMonth"!==n&&e.appendChild(a);"expirationDate"!==n&&"expirationYear"!==n&&e.appendChild(u);"cvv"!==n&&e.appendChild(c)}(e,r),e.input.model.on("autofill",(function(t){var r;"number"===n||"cvv"===n||"expirationMonth"===n||"expirationYear"===n||"cardholderName"===n?r=t[n]:"expirationDate"===n&&t.expirationMonth&&t.expirationYear&&(r=t.expirationMonth+" / "+t.expirationYear),r&&(e.input.element.value="",e.input.updateModel("value",""),e.input.element.value=r,e.input.updateModel("value",r))})),window.bus.on(g.REMOVE_FOCUS_INTERCEPTS,(function(t){T.destroy(t&&t.id)})),document.body.appendChild(r),function(){var t;if(!window.placeholderShim)return;if(!(t=document.querySelector("input[data-braintree-name]")))return;window.placeholderShim(t)}()},create:function(){var t=location.hash.slice(1,location.hash.length),e=s.getFrameName();window.bus=new i({channel:t}),window.bus.emit(g.FRAME_READY,{field:e},w)},orchestrate:w,createTokenizationHandler:C,autofillHandler:function(t){return function(e){var n,r,i,o,a,u,c;e&&(t.input.element.value||(n=s.getFrameName(),i=e.cardholderName,o=e.number,a=e.month,u=e.year,c=e.cvv,u&&2===u.length&&(u=String((new Date).getFullYear()).substring(0,2)+u),"cardholderName"===n&&i?r=i:"number"===n&&o?r=o:"expirationDate"===n&&a&&u?r=a+" / "+u:"expirationMonth"===n&&a?r=a:"expirationYear"===n&&u?r=u:"cvv"===n&&c&&(r=c),r&&function(t,e){var n=s.getFrameName();t.input.element.value=e,t.input.updateModel("value",e),"number"===n&&t.input.setPattern(e);t.input.shouldMask&&t.input.maskValue(t.input.element.value);r=t.input.element,i=r.getAttribute("placeholder"),i&&(r.setAttribute("placeholder",""),r.setAttribute("placeholder",i));var r,i}(t,r)))}}}},{"../../client/client":90,"../../lib/analytics":138,"../../lib/assign":140,"../../lib/braintree-error":141,"../../lib/convert-to-braintree-error":144,"../../lib/promise":156,"../shared/browser-detection":132,"../shared/constants":133,"../shared/errors":134,"../shared/focus-intercept":135,"./assemble-iframes":111,"./components/field-component":121,"./format-card-request-data":125,"./get-frame-name":126,"./models/credit-card-form":128,"./normalize-card-type":130,framebus:53,"inject-stylesheet":66}],128:[function(t,e,n){"use strict";var r=t("./evented-model"),i=t("../../shared/get-card-types"),o=t("card-validator"),a=t("../compare-possible-card-types"),s=t("../../shared/constants"),u=t("../normalize-card-type"),c=t("../remove-ignorable-characters"),l=s.events,d=s.externalEvents,p=s.allowedFields,f=!1,h=["cardholderName","number","cvv","postalCode","expirationMonth","expirationYear"];function m(t){this._fieldKeys=Object.keys(t.fields).filter((function(t){return p.hasOwnProperty(t)})),this.configuration=t,this.setSupportedCardTypes(t.supportedCardTypes),r.apply(this,arguments),this._fieldKeys.forEach(function(t){var e=b(this,t);this.on("change:"+t+".value",y(this,t)),this.on("change:"+t+".isFocused",v(this,t)),this.on("change:"+t+".isEmpty",E(this,t)),this.on("change:"+t+".isValid",e),this.on("change:"+t+".isPotentiallyValid",e)}.bind(this)),this.on("change:number.value",this._onNumberChange.bind(this)),this.on("change:possibleCardTypes",function(){this.validateField("cvv")}.bind(this)),this.on("change:possibleCardTypes",g(this,"number"))}function y(t,e){return function(){t.set(e+".isEmpty",""===t.get(e+".value")),t.validateField(e)}}function v(t,e){return function(n){f||(f=!0,window.bus.emit(l.CARD_FORM_ENTRY_HAS_BEGUN)),t._fieldKeys.forEach((function(n){n!==e&&t.set(n+".isFocused",!1)})),t.emitEvent(e,n?d.FOCUS:d.BLUR)}}function g(t,e){return function(){t.emitEvent(e,d.CARD_TYPE_CHANGE)}}function E(t,e){return function(){var n=t.get(e+".isEmpty")?d.EMPTY:d.NOT_EMPTY;t.emitEvent(e,n)}}function b(t,e){return function(){t.emitEvent(e,d.VALIDITY_CHANGE)}}function _(t){var e,n,r;return r=(t=t.replace(/[\/\-\s]/g,"")).charAt(0),0===t.length?e=n="":"0"===r||"1"===r?(e=t.slice(0,2),n=t.slice(2)):(e="0"+r,n=t.slice(1)),{month:e,year:n}}m.prototype=Object.create(r.prototype,{constructor:m}),m.prototype.setSupportedCardTypes=function(t){t=t?Object.keys(t).reduce((function(e,n){return t[n]&&e.push(n),e}),[]):i("").map((function(t){return t.type})),this.supportedCardTypes=t.map(u)},m.prototype.resetAttributes=function(){var t=((new Date).getMonth()+1).toString(),e=(new Date).getFullYear().toString();return this._fieldKeys.reduce(function(n,r){var i=this.configuration.fields[r],o=null!=i.select,a=null!=i.placeholder;return n[r]={value:"",isFocused:!1,isValid:!1,isPotentiallyValid:!0},o&&!a&&("expirationMonth"===r?n[r].value=t:"expirationYear"===r&&(n[r].value=e),"expirationMonth"!==r&&"expirationYear"!==r||(n[r].isValid=!0)),n[r].isEmpty=""===n[r].value,n}.bind(this),{possibleCardTypes:this.getCardTypes("")})},m.prototype.emitEvent=function(t,e){var n,r=this.get("possibleCardTypes"),i=this._fieldKeys.reduce(function(t,e){var n=this.get(e);return t[e]={isEmpty:n.isEmpty,isValid:n.isValid,isPotentiallyValid:n.isPotentiallyValid,isFocused:n.isFocused},t}.bind(this),{});n=r.map((function(t){return{niceType:t.niceType,type:t.type,code:t.code,supported:t.supported}})),window.bus.emit(l.INPUT_EVENT,{merchantPayload:{cards:n,emittedBy:t,fields:i},type:e})},m.prototype._onSplitDateChange=function(){var t,e=this.get("expirationMonth.value"),n=this.get("expirationYear.value"),r=o.expirationMonth(e),i=o.expirationYear(n);r.isValid&&i.isValid?(t=o.expirationDate(e+n),this.set("expirationMonth.isValid",t.isValid),this.set("expirationMonth.isPotentiallyValid",t.isPotentiallyValid),this.set("expirationYear.isValid",t.isValid),this.set("expirationYear.isPotentiallyValid",t.isPotentiallyValid)):(this.set("expirationMonth.isValid",r.isValid),this.set("expirationMonth.isPotentiallyValid",r.isPotentiallyValid),this.set("expirationYear.isValid",i.isValid),this.set("expirationYear.isPotentiallyValid",i.isPotentiallyValid))},m.prototype._onNumberChange=function(t,e){var n=this.getCardTypes(t),r=this.get("possibleCardTypes"),i=e.old;a(n,r)||this.set("possibleCardTypes",n),(!i||i.length<6)&&t&&t.length>=6&&window.bus.target({channel:window.bus.channel}).emit(l.BIN_AVAILABLE,t.substr(0,6))},m.prototype.validateField=function(t){var e,n=this.get(t+".value"),r=o[t];e="cvv"===t?this._validateCvv(n,{minLength:this.configuration.fields.cvv&&this.configuration.fields.cvv.minlength}):"postalCode"===t?r(n,{minLength:this.configuration.fields.postalCode&&this.configuration.fields.postalCode.minlength}):"expirationDate"===t?r(_(n)):"number"===t?this._validateNumber(n):r(n),"expirationMonth"===t||"expirationYear"===t?this._onSplitDateChange():(this.set(t+".isValid",e.isValid),this.set(t+".isPotentiallyValid",e.isPotentiallyValid))},m.prototype._validateNumber=function(t){var e,n=o.number(t,{luhnValidateUnionPay:!0,maxLength:this.configuration.fields.number.maxCardLength}),r=n.card;return r&&"mastercard"===r.type&&(r.type="master-card"),(e=this.getCardTypes(t).filter((function(t){return r&&t.type===r.type}))[0])&&!1===Boolean(e.supported)&&(delete n.card,n.isValid=!1,n.isPotentiallyValid=!1),n},m.prototype._validateCvv=function(t,e){var n,r;return r=(e=e||{}).minLength,-1===this._fieldKeys.indexOf("number")?o.cvv(t,r||[3,4]):(n=this.get("possibleCardTypes").map((function(t){return t.code.size})),n=n.filter((function(t,e,n){return n.indexOf(t)===e})),o.cvv(t,n))},m.prototype.getCardData=function(t){var e,n={},r=[];return t=this._filterCustomFieldKeys(t),h.forEach((function(e){-1!==t.indexOf(e)&&r.push(e)})),-1!==t.indexOf("expirationDate")&&(e=_(this.get("expirationDate.value")),n.expirationMonth=e.month,n.expirationYear=e.year),r.reduce(function(t,e){return t[e]=this.get(e+".value"),t}.bind(this),n),n},m.prototype.isEmpty=function(t){return(t=this._filterCustomFieldKeys(t)).every(function(t){return 0===this.get(t).value.length}.bind(this))},m.prototype.invalidFieldKeys=function(t){return(t=this._filterCustomFieldKeys(t)).filter(function(t){return!this.get(t).isValid}.bind(this))},m.prototype.getCardTypes=function(t){return i(c(t)).map(function(t){var e=u(t.type);return t.supported=this.supportedCardTypes.indexOf(e)>=0,t}.bind(this))},m.prototype._resetCardFormHasStartedBeingFilled=function(){f=!1},m.prototype._filterCustomFieldKeys=function(t){return t?t.filter(function(t){return this._fieldKeys.indexOf(t)>-1}.bind(this)):this._fieldKeys},e.exports={CreditCardForm:m}},{"../../shared/constants":133,"../../shared/get-card-types":136,"../compare-possible-card-types":112,"../normalize-card-type":130,"../remove-ignorable-characters":131,"./evented-model":129,"card-validator":40}],129:[function(t,e,n){"use strict";var r=t("@braintree/event-emitter");function i(){r.call(this),this._attributes=this.resetAttributes()}r.createChild(i),i.prototype.get=function(t){var e,n,r,i=this._attributes;if(null==t)return i;for(r=t.split("."),e=0;e-1,i=e[2]===s.BACK||e[2]===s.FORWARD,Boolean(n&&r&&i)))}};e.exports=u},{"./browser-detection":132,"./constants":133,"@braintree/class-list":26}],136:[function(t,e,n){"use strict";var r=t("credit-card-type");e.exports=function(t){var e=r(t);return e.forEach((function(t){"mastercard"===t.type&&(t.type="master-card")})),e}},{"credit-card-type":45}],137:[function(t,e,n){"use strict";var r=t("./create-authorization-data"),i=t("./json-clone"),o=t("./constants");e.exports=function(t,e){var n,a=e?i(e):{},s=r(t.authorization).attrs,u=i(t.analyticsMetadata);for(n in a.braintreeLibraryVersion=o.BRAINTREE_LIBRARY_VERSION,a._meta)a._meta.hasOwnProperty(n)&&(u[n]=a._meta[n]);return a._meta=u,s.tokenizationKey?a.tokenizationKey=s.tokenizationKey:a.authorizationFingerprint=s.authorizationFingerprint,a}},{"./constants":142,"./create-authorization-data":145,"./json-clone":153}],138:[function(t,e,n){"use strict";var r=t("./promise"),i=t("./constants"),o=t("./add-metadata");e.exports={sendEvent:function(t,e,n){var a=Date.now();return r.resolve(t).then((function(t){var r=Date.now(),s=t.getConfiguration(),u=t._request,c=s.gatewayConfiguration.analytics.url,l={analytics:[{kind:i.ANALYTICS_PREFIX+e,isAsync:Math.floor(r/1e3)!==Math.floor(a/1e3),timestamp:a}]};u({url:c,method:"post",data:o(s,l),timeout:i.ANALYTICS_REQUEST_TIMEOUT_MS},n)}))}}},{"./add-metadata":137,"./constants":142,"./promise":156}],139:[function(t,e,n){"use strict";var r=t("@braintree/asset-loader/load-script");e.exports={loadScript:r}},{"@braintree/asset-loader/load-script":3}],140:[function(t,e,n){"use strict";var r="function"==typeof Object.assign?Object.assign:i;function i(t){var e,n,r;for(e=1;e/g,">"):""}},{}],159:[function(t,e,n){"use strict";var r,i=!1;try{r=Object.defineProperty({},"passive",{get:function(){i=!0}}),window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}catch(t){}e.exports=i},{}],160:[function(t,e,n){"use strict";var r="function"==typeof atob?window.atob:i;function i(t){var e,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="";if(!new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$").test(t))throw new Error("Non base64 encoded input passed to window.atob polyfill");a=0;do{e=(63&s.indexOf(t.charAt(a++)))<<2|(i=s.indexOf(t.charAt(a++)))>>4&3,n=(15&i)<<4|(o=s.indexOf(t.charAt(a++)))>>2&15,r=(3&o)<<6|63&s.indexOf(t.charAt(a++)),u+=String.fromCharCode(e)+(n?String.fromCharCode(n):"")+(r?String.fromCharCode(r):"")}while(a