UNPKG

@paypal/react-paypal-js

Version:
18 lines (17 loc) 21.8 kB
/*! * react-paypal-js v9.2.0 (2026-04-27T17:34:47.479Z) * Copyright 2020-present, PayPal, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import e,{createContext as t,useContext as n,useRef as r,Component as o,useState as a,useEffect as i,useReducer as c}from"react";var l,u,s;!function(e){e.INITIAL="initial",e.PENDING="pending",e.REJECTED="rejected",e.RESOLVED="resolved"}(l||(l={})),function(e){e.LOADING_STATUS="setLoadingStatus",e.RESET_OPTIONS="resetOptions",e.SET_BRAINTREE_INSTANCE="braintreeInstance"}(u||(u={})),function(e){e.NUMBER="number",e.CVV="cvv",e.EXPIRATION_DATE="expirationDate",e.EXPIRATION_MONTH="expirationMonth",e.EXPIRATION_YEAR="expirationYear",e.POSTAL_CODE="postalCode"}(s||(s={}));var d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},d(e,t)};var p=function(){return p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},p.apply(this,arguments)};function f(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function v(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var m="data-react-paypal-script-id",h="dataClientToken",y="dataJsSdkLibrary",E="react-paypal-js",P="dataNamespace",b="dataSdkIntegrationSource",g="dataUserIdToken",N="Failed to load the PayPal JS SDK script.",w="3.117.0",O="https://js.braintreegateway.com/web/".concat(w,"/js/client.min.js"),S="https://js.braintreegateway.com/web/".concat(w,"/js/paypal-checkout.min.js"),I="paypal";function A(e){return void 0===e&&(e=I),window[e]}function T(e){var t=e.reactComponentName,n=e.sdkComponentKey,r=e.sdkRequestedComponents,o=void 0===r?"":r,a=e.sdkDataNamespace,i=void 0===a?I:a,c=n.charAt(0).toUpperCase().concat(n.substring(1)),l="Unable to render <".concat(t," /> because window.").concat(i,".").concat(c," is undefined."),u="string"==typeof o?o:o.join(",");if(!u.includes(n)){var s=[u,n].filter(Boolean).join();l+="\nTo fix the issue, add '".concat(n,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(s,"'}}>`.")}return l}function C(e){var t=e,n=m;t[n];var r=f(t,[n+""]);return"react-paypal-js-".concat(function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].charCodeAt(0)*n;e[n+1]&&(r+=e[n+1].charCodeAt(0)*(n-1)),t+=String.fromCharCode(97+Math.abs(r)%26)}return t}(JSON.stringify(r)))}function F(e){var t=self.document.querySelector("script[".concat(m,'="').concat(e,'"]'));(null==t?void 0:t.parentNode)&&t.parentNode.removeChild(t)}function R(e,t){var n,r;switch(t.type){case u.LOADING_STATUS:return"object"==typeof t.value?p(p({},e),{loadingStatus:t.value.state,loadingStatusErrorMessage:t.value.message}):p(p({},e),{loadingStatus:t.value});case u.RESET_OPTIONS:return F(e.options[m]),p(p({},e),{loadingStatus:l.PENDING,options:p(p((n={},n[b]=E,n),t.value),(r={},r[m]="".concat(C(t.value)),r))});case u.SET_BRAINTREE_INSTANCE:return p(p({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var k=t(null);function j(e){if("function"==typeof(null==e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw new Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}function D(){var e=j(n(k));return[p(p({},e),{isInitial:e.loadingStatus===l.INITIAL,isPending:e.loadingStatus===l.PENDING,isResolved:e.loadingStatus===l.RESOLVED,isRejected:e.loadingStatus===l.REJECTED}),e.dispatch]}function x(){var e=function(e){var t,n;if(!(null===(t=null==e?void 0:e.options)||void 0===t?void 0:t[h])&&!(null===(n=null==e?void 0:e.options)||void 0===n?void 0:n[g]))throw new Error("Invalid authorization data. Use dataClientToken or dataUserIdToken to authorize.");return e}(j(n(k)));return[e,e.dispatch]}var B=t({});function L(){return n(B)}function _(e){var t=r(new Proxy({},{get:function(e,t,n){return"function"==typeof e[t]?function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e[t].apply(e,n)}:Reflect.get(e,t,n)}}));return t.current=Object.assign(t.current,e),t.current}var U=function(e){function t(t){var n=e.call(this,t)||this;return n.state={hasError:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.getDerivedStateFromError=function(){return{hasError:!0}},t.prototype.componentDidCatch=function(e,t){console.error("Error in PayPalButtons component:",e,t),"function"==typeof this.props.onError&&this.props.onError({message:e.message,name:e.name,stack:e.stack,componentStack:t.componentStack})},t.prototype.render=function(){return this.state.hasError?null:this.props.children},t}(o),M=function(t){var n,o=t.className,c=void 0===o?"":o,l=t.disabled,u=void 0!==l&&l,s=t.children,d=t.forceReRender,m=void 0===d?[]:d,h=f(t,["className","disabled","children","forceReRender"]),y=u?{opacity:.38}:{},E="".concat(c," ").concat(u?"paypal-buttons-disabled":"").trim(),b=r(null),g=r(null),N=_(h),w=D()[0],O=w.isResolved,S=w.options,I=a(null),C=I[0],F=I[1],R=a(!0),k=R[0],j=R[1],x=a(null)[1];function B(){null!==g.current&&g.current.close().catch(function(){})}return(null===(n=g.current)||void 0===n?void 0:n.updateProps)&&g.current.updateProps({message:h.message}),i(function(){if(!1===O)return B;var e=A(S.dataNamespace);if(void 0===e||void 0===e.Buttons)return x(function(){throw new Error(T({reactComponentName:H.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:S.components,sdkDataNamespace:S[P]}))}),B;try{g.current=e.Buttons(p(p({},N),{onInit:function(e,t){F(t),"function"==typeof h.onInit&&h.onInit(e,t)}}))}catch(e){return x(function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(e))})}return!1===g.current.isEligible()?(j(!1),B):b.current?(g.current.render(b.current).catch(function(e){null!==b.current&&0!==b.current.children.length&&x(function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(e))})}),B):B},v(v([O],m,!0),[h.fundingSource],!1)),i(function(){null!==C&&(!0===u?C.disable().catch(function(){}):C.enable().catch(function(){}))},[u,C]),e.createElement(e.Fragment,null,k?e.createElement("div",{ref:b,style:y,className:E}):s)};M.displayName="PayPalButtons";var H=function(t){return e.createElement(U,{onError:t.onError},e.createElement(M,p({},t)))};function G(e){var t=Object.prototype.hasOwnProperty.call(e,"sdkBaseUrl")?e.sdkBaseUrl:void 0,n=e.environment;e.sdkBaseUrl;var r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["environment","sdkBaseUrl"]),o=t||function(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}(n),a=r,i=Object.keys(a).filter(function(e){return void 0!==a[e]&&null!==a[e]&&""!==a[e]}).reduce(function(e,t){var n,r=a[t].toString();return n=function(e,t){return(t?"-":"")+e.toLowerCase()},"data"===(t=t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,n)).substring(0,4)||"crossorigin"===t?e.attributes[t]=r:e.queryParams[t]=r,e},{queryParams:{},attributes:{}}),c=i.queryParams,l=i.attributes;return c["merchant-id"]&&-1!==c["merchant-id"].indexOf(",")&&(l["data-merchant-id"]=c["merchant-id"],c["merchant-id"]="*"),{url:"".concat(o,"?").concat(V(c)),attributes:l}}function V(e){var t="";return Object.keys(e).forEach(function(n){0!==t.length&&(t+="&"),t+=n+"="+e[n]}),t}function Y(e,t){void 0===t&&(t={});var n=document.createElement("script");return n.src=e,Object.keys(t).forEach(function(e){n.setAttribute(e,t[e]),"data-csp-nonce"===e&&n.setAttribute("nonce",t["data-csp-nonce"])}),n}function q(e,t){if(void 0===t&&(t=Promise),K(e,t),"undefined"==typeof document)return t.resolve(null);var n=G(e),r=n.url,o=n.attributes,a=o["data-namespace"]||"paypal",i=z(a);return o["data-js-sdk-library"]||(o["data-js-sdk-library"]="paypal-js"),function(e,t){var n=document.querySelector('script[src="'.concat(e,'"]'));if(null===n)return null;var r=Y(e,t),o=n.cloneNode();if(delete o.dataset.uidAuto,Object.keys(o.dataset).length!==Object.keys(r.dataset).length)return null;var a=!0;return Object.keys(o.dataset).forEach(function(e){o.dataset[e]!==r.dataset[e]&&(a=!1)}),a?n:null}(r,o)&&i?t.resolve(i):X({url:r,attributes:o},t).then(function(){var e=z(a);if(e)return e;throw new Error("The window.".concat(a," global variable is not available."))})}function X(e,t){void 0===t&&(t=Promise),K(e,t);var n=e.url,r=e.attributes;if("string"!=typeof n||0===n.length)throw new Error("Invalid url.");if(void 0!==r&&"object"!=typeof r)throw new Error("Expected attributes to be an object.");return new t(function(e,t){if("undefined"==typeof document)return e();!function(e){var t=e.url,n=e.attributes,r=e.onSuccess,o=e.onError,a=Y(t,n);a.onerror=o,a.onload=r,document.head.insertBefore(a,document.head.firstElementChild)}({url:n,attributes:r,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(n,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.'));return t(e)}})})}function z(e){return window[e]}function K(e,t){if("object"!=typeof e||null===e)throw new Error("Expected an options object.");var n=e.environment;if(n&&"production"!==n&&"sandbox"!==n)throw new Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==t&&"function"!=typeof t)throw new Error("Expected PromisePonyfill to be a function.")}H.displayName="PayPalButtons","function"==typeof SuppressedError&&SuppressedError;var J=function(e){return e&&function(e){var t,n;if("function"!=typeof(null===(t=null==e?void 0:e.client)||void 0===t?void 0:t.create)&&"function"!=typeof(null===(n=null==e?void 0:e.paypalCheckout)||void 0===n?void 0:n.create))throw new Error("The braintreeNamespace property is not a valid BraintreeNamespace type.");return!0}(e)?Promise.resolve(e):Promise.all([X({url:O}),X({url:S})]).then(function(){return void 0===e&&(e="braintree"),window[e];var e})},Z=function(t){var n=t.className,r=void 0===n?"":n,o=t.disabled,c=void 0!==o&&o,l=t.children,s=t.forceReRender,d=void 0===s?[]:s,v=t.braintreeNamespace,m=t.merchantAccountId,y=f(t,["className","disabled","children","forceReRender","braintreeNamespace","merchantAccountId"]),E=a(null)[1],P=x(),b=P[0],w=P[1];return i(function(){J(v).then(function(e){var t=b.options[g],n=b.options[h];return e.client.create({authorization:t||n}).then(function(t){var n=m?{merchantAccountId:m}:{};return e.paypalCheckout.create(p(p({},n),{client:t}))}).then(function(e){w({type:u.SET_BRAINTREE_INSTANCE,value:e})})}).catch(function(e){E(function(){throw new Error("".concat(N," ").concat(e))})})},[b.options]),e.createElement(e.Fragment,null,b.braintreePayPalCheckoutInstance&&e.createElement(H,p({className:r,disabled:c,forceReRender:d},function(e,t){var n=e.createOrder,r=e.createBillingAgreement,o=e.onApprove;return"function"==typeof n&&(e.createOrder=function(e,r){return n(e,p(p({},r),{braintree:t}))}),"function"==typeof r&&(e.createBillingAgreement=function(e,n){return r(e,p(p({},n),{braintree:t}))}),"function"==typeof o&&(e.onApprove=function(e,n){return o(e,p(p({},n),{braintree:t}))}),p({},e)}(y,b.braintreePayPalCheckoutInstance)),l))},W=function(t){var n=t.className,o=void 0===n?"":n,c=t.children,l=f(t,["className","children"]),u=D()[0],s=u.isResolved,d=u.options,v=r(null),m=a(!0),h=m[0],y=m[1],E=a(null)[1];return i(function(){if(!1!==s){var e=A(d[P]);if(void 0===e||void 0===e.Marks)return E(function(){throw new Error(T({reactComponentName:W.displayName,sdkComponentKey:"marks",sdkRequestedComponents:d.components,sdkDataNamespace:d[P]}))});!function(e){var t=v.current;if(!t||!e.isEligible())return y(!1);t.firstChild&&t.removeChild(t.firstChild),e.render(t).catch(function(e){null!==t&&0!==t.children.length&&E(function(){throw new Error("Failed to render <PayPalMarks /> component. ".concat(e))})})}(e.Marks(p({},l)))}},[s,l.fundingSource]),e.createElement(e.Fragment,null,h?e.createElement("div",{ref:v,className:o}):c)};W.displayName="PayPalMarks";var Q=function(t){var n=t.className,o=void 0===n?"":n,c=t.forceReRender,l=void 0===c?[]:c,u=f(t,["className","forceReRender"]),s=D()[0],d=s.isResolved,m=s.options,h=r(null),y=r(null),E=a(null)[1];return i(function(){if(!1!==d){var e=A(m[P]);if(void 0===e||void 0===e.Messages)return E(function(){throw new Error(T({reactComponentName:Q.displayName,sdkComponentKey:"messages",sdkRequestedComponents:m.components,sdkDataNamespace:m[P]}))});y.current=e.Messages(p({},u)),y.current.render(h.current).catch(function(e){null!==h.current&&0!==h.current.children.length&&E(function(){throw new Error("Failed to render <PayPalMessages /> component. ".concat(e))})})}},v([d],l,!0)),e.createElement("div",{ref:h,className:o})};Q.displayName="PayPalMessages";var $=function(t){var n,r=t.options,o=void 0===r?{clientId:"test"}:r,a=t.children,s=t.deferLoading,d=void 0!==s&&s,f=c(R,{options:p(p({},o),(n={},n[y]=E,n[b]=E,n[m]="".concat(C(o)),n)),loadingStatus:d?l.INITIAL:l.PENDING}),v=f[0],h=f[1];return i(function(){if(!1===d&&v.loadingStatus===l.INITIAL)return h({type:u.LOADING_STATUS,value:l.PENDING});if(v.loadingStatus===l.PENDING){var e=!0;return q(v.options).then(function(){e&&h({type:u.LOADING_STATUS,value:l.RESOLVED})}).catch(function(t){console.error("".concat(N," ").concat(t)),e&&h({type:u.LOADING_STATUS,value:{state:l.REJECTED,message:String(t)}})}),function(){e=!1}}},[v.options,d,v.loadingStatus]),e.createElement(k.Provider,{value:p(p({},v),{dispatch:h})},a)},ee=function(e){if(!e.includes(s.NUMBER)||!e.includes(s.CVV)||function(e){return!e.includes(s.EXPIRATION_DATE)&&!e.includes(s.EXPIRATION_MONTH)&&!e.includes(s.EXPIRATION_YEAR)}(e))throw new Error("To use HostedFields you must use it with at least 3 children with types: [number, cvv, expirationDate] includes")},te=function(e){ee(e),function(e){if(e.length!==new Set(e).size)throw new Error("Cannot use duplicate HostedFields as children")}(e)},ne=function(t){var n=t.styles,o=t.createOrder,c=t.notEligibleError,u=t.children,s=t.installments,d=x()[0],f=d.options,v=d.loadingStatus,m=a(!0),h=m[0],y=m[1],E=a(),b=E[0],g=E[1],N=a(null)[1],w=r(null),O=r(),S=function(e){void 0===e&&(e={});var t=r(e);return[t,function(e){t.current=p(p({},t.current),e)}]}(),T=S[0],C=S[1];return i(function(){var e;if(te(Object.keys(T.current)),v===l.RESOLVED){if(O.current=A(f[P]).HostedFields,!O.current)throw new Error(function(e){var t=e.components,n=void 0===t?"":t,r=e[P],o=void 0===r?I:r,a=n?"".concat(n,",hosted-fields"):"hosted-fields",i="Unable to render <PayPalHostedFieldsProvider /> because window.".concat(o,".HostedFields is undefined.");return n.includes("hosted-fields")||(i+="\nTo fix the issue, add 'hosted-fields' to the list of components passed to the parent PayPalScriptProvider: <PayPalScriptProvider options={{ components: '".concat(a,"'}}>")),i}(((e={components:f.components})[P]=f[P],e)));if(!O.current.isEligible())return y(!1);b&&b.teardown(),O.current.render({createOrder:o,fields:T.current,installments:s,styles:n}).then(function(e){w.current&&g(e)}).catch(function(e){N(function(){throw new Error("Failed to render <PayPalHostedFieldsProvider /> component. ".concat(e))})})}},[v,n]),e.createElement("div",{ref:w},h?e.createElement(B.Provider,{value:{cardFields:b,registerHostedField:C}},u):c)},re=function(t){var r=t.hostedFieldType,o=t.options,a=f(t,["hostedFieldType","options"]),c=n(B);return i(function(){var e;if(!(null==c?void 0:c.registerHostedField))throw new Error("The HostedField cannot be register in the PayPalHostedFieldsProvider parent component");c.registerHostedField(((e={})[r]={selector:o.selector,placeholder:o.placeholder,type:o.type,formatInput:o.formatInput,maskInput:o.maskInput,select:o.select,maxlength:o.maxlength,minlength:o.minlength,prefill:o.prefill,rejectUnsupportedCards:o.rejectUnsupportedCards},e))},[]),e.createElement("div",p({},a))};function oe(){}var ae=t({cardFieldsForm:null,fields:{},registerField:oe,unregisterField:oe}),ie=function(){return n(ae)},ce=function(t){var n=t.children;return e.createElement("div",{style:{width:"100%"}},n)},le=function(t){var n=t.children,o=f(t,["children"]),c=_(o.inputEvents),l=_(o),u=D()[0],s=u.isResolved,d=u.options,v=function(){var e=a(null)[1],t=r({});return{fields:t.current,registerField:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=n[0],a=n[1],i=n[2];return t.current[o]&&e(function(){throw new Error("Cannot use duplicate CardFields as children")}),t.current[o]=null==i?void 0:i[o](a),t.current[o]},unregisterField:function(e){var n=t.current[e];n&&(n.close().catch(oe),delete t.current[e])}}}(),m=v.fields,h=v.registerField,y=v.unregisterField,E=a(null),b=E[0],g=E[1],N=r(null),w=a(!1),O=w[0],S=w[1],T=a(null)[1];return i(function(){var e,t,n;if(s){o.inputEvents&&(l.inputEvents=c);try{N.current=null!==(n=null===(t=(e=A(d[P])).CardFields)||void 0===t?void 0:t.call(e,p({},l)))&&void 0!==n?n:null}catch(e){return void T(function(){throw new Error("Failed to render <PayPalCardFieldsProvider /> component. Failed to initialize: ".concat(e))})}if(N.current)return S(N.current.isEligible()),g(N.current),function(){g(null),N.current=null};T(function(){var e;throw new Error(function(e){var t=e.components,n=void 0===t?"":t,r=e[P],o=void 0===r?I:r,a=n?"".concat(n,",card-fields"):"card-fields",i="Unable to render <PayPalCardFieldsProvider /> because window.".concat(o,".CardFields is undefined.");return n.includes("card-fields")||(i+="\nTo fix the issue, add 'card-fields' to the list of components passed to the parent PayPalScriptProvider: <PayPalScriptProvider options={{ components: '".concat(a,"'}}>")),i}(((e={components:d.components})[P]=d[P],e)))})}},[s]),O?e.createElement(ce,null,e.createElement(ae.Provider,{value:{cardFieldsForm:b,fields:m,registerField:h,unregisterField:y}},n)):e.createElement("div",null)},ue=function(t){var n=t.className,o=t.fieldName,c=f(t,["className","fieldName"]),l=ie(),u=l.cardFieldsForm,s=l.registerField,d=l.unregisterField,p=r(null),v=_(c.inputEvents),m=a(null)[1];function h(){d(o)}return i(function(){if(!u)return m(function(){throw new Error("Individual CardFields must be rendered inside the PayPalCardFieldsProvider")}),h;if(!p.current)return h;c.inputEvents&&(c.inputEvents=v);var e=s(o,c,u);return null==e||e.render(p.current).catch(function(e){(function(e){var t;return!!(null===(t=e.current)||void 0===t?void 0:t.children.length)})(p)&&m(function(){throw new Error("Failed to render <PayPal".concat(o," /> component. ").concat(e))})}),h},[]),e.createElement("div",{ref:p,className:n})},se=function(t){return e.createElement(ue,p({fieldName:"NameField"},t))},de=function(t){return e.createElement(ue,p({fieldName:"NumberField"},t))},pe=function(t){return e.createElement(ue,p({fieldName:"ExpiryField"},t))},fe=function(t){return e.createElement(ue,p({fieldName:"CVVField"},t))},ve=function(t){var n=t.children;return e.createElement("div",{style:{display:"flex",width:"100%"}},n)},me=function(t){var n=t.className;return e.createElement("div",{className:n},e.createElement(ue,{fieldName:"NameField"}),e.createElement(ue,{fieldName:"NumberField"}),e.createElement(ve,null,e.createElement(ce,null,e.createElement(ue,{fieldName:"ExpiryField"})),e.createElement(ce,null,e.createElement(ue,{fieldName:"CVVField"}))))},he={PAYPAL:"paypal",VENMO:"venmo",APPLEPAY:"applepay",ITAU:"itau",CREDIT:"credit",PAYLATER:"paylater",CARD:"card",IDEAL:"ideal",SEPA:"sepa",BANCONTACT:"bancontact",GIROPAY:"giropay",SOFORT:"sofort",EPS:"eps",MYBANK:"mybank",P24:"p24",PAYU:"payu",BLIK:"blik",TRUSTLY:"trustly",OXXO:"oxxo",BOLETO:"boleto",BOLETOBANCARIO:"boletobancario",WECHATPAY:"wechatpay",MERCADOPAGO:"mercadopago",MULTIBANCO:"multibanco",SATISPAY:"satispay",PAIDY:"paidy",ZIMPLER:"zimpler",MAXIMA:"maxima"},ye=he;export{Z as BraintreePayPalButtons,u as DISPATCH_ACTION,ye as FUNDING,s as PAYPAL_HOSTED_FIELDS_TYPES,H as PayPalButtons,fe as PayPalCVVField,ae as PayPalCardFieldsContext,me as PayPalCardFieldsForm,le as PayPalCardFieldsProvider,pe as PayPalExpiryField,re as PayPalHostedField,ne as PayPalHostedFieldsProvider,W as PayPalMarks,Q as PayPalMessages,se as PayPalNameField,de as PayPalNumberField,$ as PayPalScriptProvider,l as SCRIPT_LOADING_STATE,k as ScriptContext,F as destroySDKScript,C as getScriptID,R as scriptReducer,ie as usePayPalCardFields,L as usePayPalHostedFields,D as usePayPalScriptReducer,x as useScriptProviderContext};