1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9724],{79724:(e,t,r)=>{r.d(t,{Gi:()=>O,JV:()=>k,ag:()=>A});var n,o,a,c,i,s,u=r(53239);(n=c||(c={})).INITIAL="initial",n.PENDING="pending",n.REJECTED="rejected",n.RESOLVED="resolved",(o=i||(i={})).LOADING_STATUS="setLoadingStatus",o.RESET_OPTIONS="resetOptions",o.SET_BRAINTREE_INSTANCE="braintreeInstance",(a=s||(s={})).NUMBER="number",a.CVV="cvv",a.EXPIRATION_DATE="expirationDate",a.EXPIRATION_MONTH="expirationMonth",a.EXPIRATION_YEAR="expirationYear",a.POSTAL_CODE="postalCode";var l=function(e,t){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},d=function(){return(d=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function p(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r){if(r||2==arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var m="data-react-paypal-script-id",v="react-paypal-js",y="dataNamespace",h="dataSdkIntegrationSource",E="paypal";function b(e){return void 0===e&&(e=E),window[e]}function g(e){var t=e.reactComponentName,r=e.sdkComponentKey,n=e.sdkRequestedComponents,o=void 0===n?"":n,a=e.sdkDataNamespace,c=r.charAt(0).toUpperCase().concat(r.substring(1)),i="Unable to render <".concat(t," /> because window.").concat(void 0===a?E:a,".").concat(c," is undefined."),s="string"==typeof o?o:o.join(",");if(!s.includes(r)){var u=[s,r].filter(Boolean).join();i+="\nTo fix the issue, add '".concat(r,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(u,"'}}>`.")}return i}function S(e){e[m];var t=p(e,[m+""]);return"react-paypal-js-".concat(function(e){for(var t="",r=0;r<e.length;r++){var n=e[r].charCodeAt(0)*r;e[r+1]&&(n+=e[r+1].charCodeAt(0)*(r-1)),t+=String.fromCharCode(97+Math.abs(n)%26)}return t}(JSON.stringify(t)))}function P(e,t){var r,n,o,a;switch(t.type){case i.LOADING_STATUS:if("object"==typeof t.value)return d(d({},e),{loadingStatus:t.value.state,loadingStatusErrorMessage:t.value.message});return d(d({},e),{loadingStatus:t.value});case i.RESET_OPTIONS:return o=e.options[m],(null==(a=self.document.querySelector("script[".concat(m,'="').concat(o,'"]')))?void 0:a.parentNode)&&a.parentNode.removeChild(a),d(d({},e),{loadingStatus:c.PENDING,options:d(d(((r={})[h]=v,r),t.value),((n={})[m]="".concat(S(t.value)),n))});case i.SET_BRAINTREE_INSTANCE:return d(d({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var N=(0,u.createContext)(null);function O(){var e=function(e){if("function"==typeof(null==e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}((0,u.useContext)(N));return[d(d({},e),{isInitial:e.loadingStatus===c.INITIAL,isPending:e.loadingStatus===c.PENDING,isResolved:e.loadingStatus===c.RESOLVED,isRejected:e.loadingStatus===c.REJECTED}),e.dispatch]}(0,u.createContext)({});var w=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}function r(t){var r=e.call(this,t)||this;return r.state={hasError:!1},r}return l(r,e),r.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t),r.getDerivedStateFromError=function(){return{hasError:!0}},r.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})},r.prototype.render=function(){return this.state.hasError?null:this.props.children},r}(u.Component),I=function(e){var t,r,n=e.className,o=e.disabled,a=void 0!==o&&o,c=e.children,i=e.forceReRender,s=p(e,["className","disabled","children","forceReRender"]),l="".concat(void 0===n?"":n," ").concat(a?"paypal-buttons-disabled":"").trim(),m=(0,u.useRef)(null),v=(0,u.useRef)(null),h=((t=(0,u.useRef)(new Proxy({},{get:function(e,t,r){return"function"==typeof e[t]?function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return e[t].apply(e,r)}:Reflect.get(e,t,r)}}
1))).current=Object.assign(t.current,s),t.current),E=O()[0],S=E.isResolved,P=E.options,N=(0,u.useState)(null),w=N[0],I=N[1],R=(0,u.useState)(!0),C=R[0],T=R[1],j=(0,u.useState)(null)[1];function A(){null!==v.current&&v.current.close().catch(function(){})}return(null==(r=v.current)?void 0:r.updateProps)&&v.current.updateProps({message:s.message}),(0,u.useEffect)(function(){if(!1===S)return A;var e=b(P.dataNamespace);if(void 0===e||void 0===e.Buttons)return j(function(){throw Error(g({reactComponentName:k.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:P.components,sdkDataNamespace:P[y]}))}),A;try{v.current=e.Buttons(d(d({},h),{onInit:function(e,t){I(t),"function"==typeof s.onInit&&s.onInit(e,t)}}))}catch(e){return j(function(){throw Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(e))})}return!1===v.current.isEligible()?T(!1):m.current&&v.current.render(m.current).catch(function(e){null!==m.current&&0!==m.current.children.length&&j(function(){throw Error("Failed to render <PayPalButtons /> component. ".concat(e))})}),A},f(f([S],void 0===i?[]:i,!0),[s.fundingSource],!1)),(0,u.useEffect)(function(){null!==w&&(!0===a?w.disable().catch(function(){}):w.enable().catch(function(){}))},[a,w]),u.createElement(u.Fragment,null,C?u.createElement("div",{ref:m,style:a?{opacity:.38}:{},className:l}):c)};I.displayName="PayPalButtons";var k=function(e){return u.createElement(w,{onError:e.onError},u.createElement(I,d({},e)))};function R(e,t){void 0===t&&(t={});var r=document.createElement("script");return r.src=e,Object.keys(t).forEach(function(e){r.setAttribute(e,t[e]),"data-csp-nonce"===e&&r.setAttribute("nonce",t["data-csp-nonce"])}),r}k.displayName="PayPalButtons","function"==typeof SuppressedError&&SuppressedError;function C(e,t){if("object"!=typeof e||null===e)throw Error("Expected an options object.");var r=e.environment;if(r&&"production"!==r&&"sandbox"!==r)throw Error('The `environment` option must be either "production" or "sandbox".');if(void 0!==t&&"function"!=typeof t)throw Error("Expected PromisePonyfill to be a function.")}var T=function(e){var t=e.className,r=e.children,n=p(e,["className","children"]),o=O()[0],a=o.isResolved,c=o.options,i=(0,u.useRef)(null),s=(0,u.useState)(!0),l=s[0],f=s[1],m=(0,u.useState)(null)[1],v=function(e){var t=i.current;if(!t||!e.isEligible())return f(!1);t.firstChild&&t.removeChild(t.firstChild),e.render(t).catch(function(e){null!==t&&0!==t.children.length&&m(function(){throw Error("Failed to render <PayPalMarks /> component. ".concat(e))})})};return(0,u.useEffect)(function(){if(!1!==a){var e=b(c[y]);if(void 0===e||void 0===e.Marks)return m(function(){throw Error(g({reactComponentName:T.displayName,sdkComponentKey:"marks",sdkRequestedComponents:c.components,sdkDataNamespace:c[y]}))});v(e.Marks(d({},n)))}},[a,n.fundingSource]),u.createElement(u.Fragment,null,l?u.createElement("div",{ref:i,className:void 0===t?"":t}):r)};T.displayName="PayPalMarks";var j=function(e){var t=e.className,r=e.forceReRender,n=p(e,["className","forceReRender"]),o=O()[0],a=o.isResolved,c=o.options,i=(0,u.useRef)(null),s=(0,u.useRef)(null),l=(0,u.useState)(null)[1];return(0,u.useEffect)(function(){if(!1!==a){var e=b(c[y]);if(void 0===e||void 0===e.Messages)return l(function(){throw Error(g({reactComponentName:j.displayName,sdkComponentKey:"messages",sdkRequestedComponents:c.components,sdkDataNamespace:c[y]}))});s.current=e.Messages(d({},n)),s.current.render(i.current).catch(function(e){null!==i.current&&0!==i.current.children.length&&l(function(){throw Error("Failed to render <PayPalMessages /> component. ".concat(e))})})}},f([a],void 0===r?[]:r,!0)),u.createElement("div",{ref:i,className:void 0===t?"":t})};j.displayName="PayPalMessages";var A=function(e){var t,r=e.options,n=void 0===r?{clientId:"test"}:r,o=e.children,a=e.deferLoading,s=void 0!==a&&a,l=(0,u.useReducer)(P,{options:d(d({},n),((t={}).dataJsSdkLibrary=v,t[h]=v,t[m]="".concat(S(n)),t)),loadingStatus:s?c.INITIAL:c.PENDING}),p=l[0],f=l[1];return(0,u.useEffect)(function(){if(!1===s&&p.loadingStatus===c.INITIAL)return f({type:i.LOADING_STATUS,value:c.PENDING});if(p.loadingStatus===c.PENDING){var e=!0;return(function(e,t){if(void 0===t&&(t=Promise),C(e,t),"u"<typeof document)return t.resolve(null);var r,n,o,a,c,i,s,u,l,d,p=(a=Object.prototype.hasOwnProperty.call(e,"sdkBaseUrl")?e.sdkBaseUrl:void 0,c=Object.prototype.hasOwnProperty.call(e,"environment")?e.environment:void 0,e.environment,e.sdkBaseUrl,i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}(e,["environment","sdkBaseUrl"]),s=a||("sandbox"===c?"https://www.sandbox.paypal.com/sdk/js":"https://www.paypal.com/sdk/js"),l=(u=Object.keys(i).filter(function(e){return void 0!==i[e]&&null!==i[e]&&""!==i[e]}).reduce(function(e,t){var r=i[t].toString();return"data"===(t=t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()})).substring(0,4)||"crossorigin"===t?e.attributes[t]=r:e.queryParams[t]=r,e},{queryParams:{},attributes:{}})).queryParams,d=u.attributes,l["merchant-id"]&&-1!==l["merchant-id"].indexOf(",")&&(d["data-merchant-id"]=l["merchant-id"],l["merchant-id"]="*"),{url:"".concat(s,"?").concat((n="",Object.keys(r=l).forEach(function(e){0!==n.length&&(n+="&"),n+=e+"="+r[e]}),n)),attributes:d}),f=p.url,m=p.attributes,v=m["data-namespace"]||"paypal",y=(o=v,window[o]);return(m["data-js-sdk-library"]||(m["data-js-sdk-library"]="paypal-js"),function(e,t){var r=document.querySelector('script[src="'.concat(e,'"]'));if(null===r)return null;var n=R(e,t),o=r.cloneNode();if(delete o.dataset.uidAuto,Object.keys(o.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(o.dataset).forEach(function(e){o.dataset[e]!==n.dataset[e]&&(a=!1)}),a?r:null}(f,m)&&y)?t.resolve(y):(function(e,t){void 0===t&&(t=Promise),C(e,t);var r=e.url,n=e.attributes;if("string"!=typeof r||0===r.length)throw Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw Error("Expected attributes to be an object.");return new t(function(e,t){var o,a,c,i,s,u;if("u"<typeof document)return e();a=(o={url:r,attributes:n,onSuccess:function(){return e()},onError:function(){return t(Error('The script "'.concat(r,'" failed to load. Check the HTTP status code and response body in DevTools to learn more.')))}}).url,c=o.attributes,i=o.onSuccess,s=o.onError,(u=R(a,c)).onerror=s,u.onload=i,document.head.insertBefore(u,document.head.firstElementChild)})})({url:f,attributes:m},t).then(function(){var e,t=(e=v,window[e]);if(t)return t;throw Error("The window.".concat(v," global variable is not available."))})})(p.options).then(function(){e&&f({type:i.LOADING_STATUS,value:c.RESOLVED})}).catch(function(t){console.error("".concat("Failed to load the PayPal JS SDK script."," ").concat(t)),e&&f({type:i.LOADING_STATUS,value:{state:c.REJECTED,message:String(t)}})}),function(){e=!1}}},[p.options,s,p.loadingStatus]),u.createElement(N.Provider,{value:d(d({},p),{dispatch:f})},o)};function D(){}(0,u.createContext)({cardFieldsForm:null,fields:{},registerField:D,unregisterField:D})}}]);
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.