1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236],{35236:function(e,t,n){n.d(t,{Vv:function(){return _},ch:function(){return O}});var r,o,a,c=n(2784);!function(e){e.INITIAL="initial",e.PENDING="pending",e.REJECTED="rejected",e.RESOLVED="resolved"}(r||(r={})),function(e){e.LOADING_STATUS="setLoadingStatus",e.RESET_OPTIONS="resetOptions",e.SET_BRAINTREE_INSTANCE="braintreeInstance"}(o||(o={})),function(e){e.NUMBER="number",e.CVV="cvv",e.EXPIRATION_DATE="expirationDate",e.EXPIRATION_MONTH="expirationMonth",e.EXPIRATION_YEAR="expirationYear",e.POSTAL_CODE="postalCode"}(a||(a={}));var i=function(){return i=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},i.apply(this,arguments)};function s(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 u(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 l="data-react-paypal-script-id",d="dataJsSdkLibrary",f="react-paypal-js",p="dataNamespace",v="dataSdkIntegrationSource",m="Failed to load the PayPal JS SDK script.",y="3.117.0",h=("https://js.braintreegateway.com/web/".concat(y,"/js/client.min.js"),"https://js.braintreegateway.com/web/".concat(y,"/js/paypal-checkout.min.js"),"paypal");function E(e){return void 0===e&&(e=h),window[e]}function b(e){var t=e.reactComponentName,n=e.sdkComponentKey,r=e.sdkRequestedComponents,o=void 0===r?"":r,a=e.sdkDataNamespace,c=void 0===a?h:a,i=n.charAt(0).toUpperCase().concat(n.substring(1)),s="Unable to render <".concat(t," /> because window.").concat(c,".").concat(i," is undefined."),u="string"===typeof o?o:o.join(",");if(!u.includes(n)){var l=[u,n].filter(Boolean).join();s+="\nTo fix the issue, add '".concat(n,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(l,"'}}>`.")}return s}function g(e){var t=e,n=l;t[n];var r=s(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 S(e,t){var n,a;switch(t.type){case o.LOADING_STATUS:return"object"===typeof t.value?i(i({},e),{loadingStatus:t.value.state,loadingStatusErrorMessage:t.value.message}):i(i({},e),{loadingStatus:t.value});case o.RESET_OPTIONS:return function(e){var t=self.document.querySelector("script[".concat(l,'="').concat(e,'"]'));(null===t||void 0===t?void 0:t.parentNode)&&t.parentNode.removeChild(t)}(e.options[l]),i(i({},e),{loadingStatus:r.PENDING,options:i(i((n={},n[v]=f,n),t.value),(a={},a[l]="".concat(g(t.value)),a))});case o.SET_BRAINTREE_INSTANCE:return i(i({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var N=(0,c.createContext)(null);function w(e){if("function"===typeof(null===e||void 0===e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw new Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}function P(){var e=w((0,c.useContext)(N));return[i(i({},e),{isInitial:e.loadingStatus===r.INITIAL,isPending:e.loadingStatus===r.PENDING,isResolved:e.loadingStatus===r.RESOLVED,isRejected:e.loadingStatus===r.REJECTED}),e.dispatch]}(0,c.createContext)({});var O=function(e){var t,n=e.className,r=void 0===n?"":n,o=e.disabled,a=void 0!==o&&o,l=e.children,d=e.forceReRender,f=void 0===d?[]:d,v=s(e,["className","disabled","children","forceReRender"]),m=a?{opacity:.38}:{},y="".concat(r," ").concat(a?"paypal-buttons-disabled":"").trim(),h=(0,c.useRef)(null),g=(0,c.useRef)(null),S=function(e){var t=(0,c.useRef)(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}(v),N=P()[0],w=N.isResolved,I=N.options,R=(0,c.useState)(null),T=R[0],j=R[1],C=(0,c.useState)(!0),k=C[0],A=C[1],D=(0,c.useState)(null)[1];function x(){null!==g.current&&g.current.close().catch((function(){}))}return(null===(t=g.current)||void 0===t?void 0:t.updateProps)&&g.current.updateProps({message:v.message}),(0,c.useEffect)((function(){if(!1===w)return x;var e=E(I.dataNamespace);if(void 0===e||void 0===e.Buttons)return D((function(){throw new Error(b({reactComponentName:O.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:I.components,sdkDataNamespace:I[p]}))})),x;try{g.current=e.Buttons(i(i({},S),{onInit:function(e,t){j(t),"function"===typeof v.onInit&&v.onInit(e,t)}}))}catch(t){return D((function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(t))}))}return!1===g.current.isEligible()?(A(!1),x):h.current?(g.current.render(h.current).catch((function(e){null!==h.current&&0!==h.current.children.length&&D((function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(e))}))})),x):x}),u(u([w],f,!0),[v.fundingSource],!1)),(0,c.useEffect)((function(){null!==T&&(!0===a?T.disable().catch((function(){})):T.enable().catch((function(){})))}),[a,T]),c.createElement(c.Fragment,null,k?c.createElement("div",{ref:h,style:m,className:y}):l)};function I(e){var t=e.sdkBaseUrl,n=e.environment,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,["sdkBaseUrl","environment"]),o=t||function(e){return"sandbox"===e?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"}(n),a=r,c=Object.keys(a).filter((function(e){return"undefined"!==typeof a[e]&&null!==a[e]&&""!==a[e]})).reduce((function(e,t){var n=a[t].toString();return"data"===(t=function(e){var t=function(e,t){return(t?"-":"")+e.toLowerCase()};return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,t)}(t)).substring(0,4)||"crossorigin"===t?e.attributes[t]=n:e.queryParams[t]=n,e}),{queryParams:{},attributes:{}}),i=c.queryParams,s=c.attributes;return i["merchant-id"]&&-1!==i["merchant-id"].indexOf(",")&&(s["data-merchant-id"]=i["merchant-id"],i["merchant-id"]="*"),{url:"".concat(o,"?").concat(R(i)),attributes:s}}function R(e){var t="";return Object.keys(e).forEach((function(n){0!==t.length&&(t+="&"),t+=n+"="+e[n]})),t}function T(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 j(e,t){if(void 0===t&&(t=Promise),A(e,t),"undefined"===typeof document)return t.resolve(null);var n=I(e),r=n.url,o=n.attributes,a=o["data-namespace"]||"paypal",c=k(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=T(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)&&c?t.resolve(c):C({url:r,attributes:o},t).then((function(){var e=k(a);if(e)return e;throw new Error("The window.".concat(a," global variable is not available."))}))}function C(e,t){void 0===t&&(t=Promise),A(e,t);var n=e.url,r=e.attributes;if("string"!==typeof n||0===n.length)throw new Error("Invalid url.");if("undefined"!==typeof 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=T(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 k(e){return window[e]}function A(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("undefined"!==typeof t&&"function"!==typeof t)throw new Error("Expected PromisePonyfill to be a function.")}O.displayName="PayPalButtons","function"===typeof SuppressedError&&SuppressedError;var D=function(e){var t=e.className,n=void 0===t?"":t,r=e.children,o=s(e,["className","children"]),a=P()[0],u=a.isResolved,l=a.options,d=(0,c.useRef)(null),f=(0,c.useState)(!0),v=f[0],m=f[1],y=(0,c.useState)(null)[1];return(0,c.useEffect)((function(){if(!1!==u){var e=E(l[p]);if(void 0===e||void 0===e.Marks)return y((function(){throw new Error(b({reactComponentName:D.displayName,sdkComponentKey:"marks",sdkRequestedComponents:l.components,sdkDataNamespace:l[p]}))}));!function(e){var t=d.current;if(!t||!e.isEligible())return m(!1);t.firstChild&&t.removeChild(t.firstChild),e.render(t).catch((function(e){null!==t&&0!==t.children.length&&y((function(){throw new Error("Failed to render <PayPalMarks /> component. ".concat(e))}))}))}(e.Marks(i({},o)))}}),[u,o.fundingSource]),c.createElement(c.Fragment,null,v?c.createElement("div",{ref:d,className:n}):r)};D.displayName="PayPalMarks";var x=function(e){var t=e.className,n=void 0===t?"":t,r=e.forceReRender,o=void 0===r?[]:r,a=s(e,["className","forceReRender"]),l=P()[0],d=l.isResolved,f=l.options,v=(0,c.useRef)(null),m=(0,c.useRef)(null),y=(0,c.useState)(null)[1];return(0,c.useEffect)((function(){if(!1!==d){var e=E(f[p]);if(void 0===e||void 0===e.Messages)return y((function(){throw new Error(b({reactComponentName:x.displayName,sdkComponentKey:"messages",sdkRequestedComponents:f.components,sdkDataNamespace:f[p]}))}));m.current=e.Messages(i({},a)),m.current.render(v.current).catch((function(e){null!==v.current&&0!==v.current.children.length&&y((function(){throw new Error("Failed to render <PayPalMessages /> component. ".concat(e))}))}))}}),u([d],o,!0)),c.createElement("div",{ref:v,className:n})};x.displayName="PayPalMessages";var _=function(e){var t,n=e.options,a=void 0===n?{clientId:"test"}:n,s=e.children,u=e.deferLoading,p=void 0!==u&&u,y=(0,c.useReducer)(S,{options:i(i({},a),(t={},t[d]=f,t[v]=f,t[l]="".concat(g(a)),t)),loadingStatus:p?r.INITIAL:r.PENDING}),h=y[0],E=y[1];return(0,c.useEffect)((function(){if(!1===p&&h.loadingStatus===r.INITIAL)return E({type:o.LOADING_STATUS,value:r.PENDING});if(h.loadingStatus===r.PENDING){var e=!0;return j(h.options).then((function(){e&&E({type:o.LOADING_STATUS,value:r.RESOLVED})})).catch((function(t){console.error("".concat(m," ").concat(t)),e&&E({type:o.LOADING_STATUS,value:{state:r.REJECTED,message:String(t)}})})),function(){e=!1}}}),[h.options,p,h.loadingStatus]),c.createElement(N.Provider,{value:i(i({},h),{dispatch:E})},s)};function L(){}(0,c.createContext)({cardFieldsForm:null,fields:{},registerField:L,unregisterField:L})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.