1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[603],{110:(e,t,n)=>{n(7730)},1754:e=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i=(e,t,n)=>new Promise((r,o)=>{var i=e=>{try{c(n.next(e))}catch(e){o(e)}},s=e=>{try{c(n.throw(e))}catch(e){o(e)}},c=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);c((n=n.apply(e,t)).next())}),s={},c={SubmissionError:()=>h,appendExtraData:()=>g,createClient:()=>S,getDefaultClient:()=>k,isSubmissionError:()=>m};for(var a in c)t(s,a,{get:c[a],enumerable:!0});e.exports=((e,i,s,c)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let a of r(i))o.call(e,a)||a===s||t(e,a,{get:()=>i[a],enumerable:!(c=n(i,a))||c.enumerable});return e})(t({},"__esModule",{value:!0}),s);var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=class{constructor(){this.loadedAt=Date.now(),this.webdriver=navigator.webdriver||!!document.documentElement.getAttribute(function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!l.test(e))throw TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i<e.length;)t=u.indexOf(e.charAt(i++))<<18|u.indexOf(e.charAt(i++))<<12|(n=u.indexOf(e.charAt(i++)))<<6|(r=u.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}("d2ViZHJpdmVy"))||!!window.callPhantom||!!window._phantom}data(){return{loadedAt:this.loadedAt,webdriver:this.webdriver}}},d=class{constructor(e){this.kind="success",this.next=e.next}},f=class{constructor(e,t){this.paymentIntentClientSecret=e,this.resubmitKey=t,this.kind="stripePluginPending"}};function m(e){return"error"===e.kind}var h=class{constructor(...e){var t;for(let n of(this.kind="error",this.formErrors=[],this.fieldErrors=new Map,e)){if(!n.field){this.formErrors.push({code:n.code&&n.code in y?n.code:"UNSPECIFIED",message:n.message});continue}let e=null!=(t=this.fieldErrors.get(n.field))?t:[];e.push({code:n.code&&n.code in E?n.code:"UNSPECIFIED",message:n.message}),this.fieldErrors.set(n.field,e)}}getFormErrors(){return[...this.formErrors]}getFieldErrors(e){var t;return null!=(t=this.fieldErrors.get(e))?t:[]}getAllFieldErrors(){return Array.from(this.fieldErrors)}},y={BLOCKED:"BLOCKED",EMPTY:"EMPTY",FILES_TOO_BIG:"FILES_TOO_BIG",FORM_NOT_FOUND:"FORM_NOT_FOUND",INACTIVE:"INACTIVE",NO_FILE_UPLOADS:"NO_FILE_UPLOADS",PROJECT_NOT_FOUND:"PROJECT_NOT_FOUND",TOO_MANY_FILES:"TOO_MANY_FILES"},E={REQUIRED_FIELD_EMPTY:"REQUIRED_FIELD_EMPTY",REQUIRED_FIELD_MISSING:"REQUIRED_FIELD_MISSING",STRIPE_CLIENT_ERROR:"STRIPE_CLIENT_ERROR",STRIPE_SCA_ERROR:"STRIPE_SCA_ERROR",TYPE_EMAIL:"TYPE_EMAIL",TYPE_NUMERIC:"TYPE_NUMERIC",TYPE_TEXT:"TYPE_TEXT"};function g(e,t,n){e instanceof FormData?e.append(t,n):e[t]=n}var v=class{constructor(e={}){this.project=e.project,this.stripe=e.stripe,"u">typeof window&&(this.session=new p)}submitForm(e,t){return i(this,arguments,function*(e,t,n={}){var r;let o,s=n.endpoint||"https://formspree.io",c=this.project?`${s}/p/${this.project}/f/${e}
1`:`${s}/f/${e}`,a={Accept:"application/json","Formspree-Client":(r=n.clientName,o="@formspree/[email protected]",r?`${r} ${o}`:o)};function l(e){return i(this,null,function*(){try{let t=yield(yield fetch(c,{method:"POST",mode:"cors",body:e instanceof FormData?e:JSON.stringify(e),headers:a})).json();if(null!==t&&"object"==typeof t){if("errors"in t&&Array.isArray(t.errors)&&t.errors.every(e=>"string"==typeof e.message)||"error"in t&&"string"==typeof t.error)return Array.isArray(t.errors)?new h(...t.errors):new h({message:t.error});if(function(e){if("stripe"in e&&"resubmitKey"in e&&"string"==typeof e.resubmitKey){let{stripe:t}=e;return"object"==typeof t&&null!=t&&"paymentIntentClientSecret"in t&&"string"==typeof t.paymentIntentClientSecret}return!1}(t))return new f(t.stripe.paymentIntentClientSecret,t.resubmitKey);if("next"in t&&"string"==typeof t.next)return new d({next:t.next})}return new h({message:"Unexpected response format"})}catch(e){return new h({message:e instanceof Error?e.message:`Unknown error while posting to Formspree: ${JSON.stringify(e)}`})}})}if(this.session&&(a["Formspree-Session-Data"]=function(e){e=String(e);for(var t,n,r,o,i="",s=0,c=e.length%3;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");t=n<<16|r<<8|o,i+=u.charAt(t>>18&63)+u.charAt(t>>12&63)+u.charAt(t>>6&63)+u.charAt(63&t)}return c?i.slice(0,c-3)+"===".substring(c):i}(JSON.stringify(this.session.data()))),t instanceof FormData||(a["Content-Type"]="application/json"),this.stripe&&n.createPaymentMethod){let e=yield n.createPaymentMethod();if(e.error)return new h({code:"STRIPE_CLIENT_ERROR",field:"paymentMethod",message:"Error creating payment method"});g(t,"paymentMethod",e.paymentMethod.id);let r=yield l(t);if("error"===r.kind)return r;if("stripePluginPending"===r.kind){let e=yield this.stripe.handleCardAction(r.paymentIntentClientSecret);if(e.error)return new h({code:"STRIPE_CLIENT_ERROR",field:"paymentMethod",message:"Stripe SCA error"});t instanceof FormData?t.delete("paymentMethod"):delete t.paymentMethod,g(t,"paymentIntent",e.paymentIntent.id),g(t,"resubmitKey",r.resubmitKey);let n=yield l(t);return C(n),n}return r}let p=yield l(t);return C(p),p})}};function C(e){let{kind:t}=e;if("success"!==t&&"error"!==t)throw Error(`Unexpected submission result (kind: ${t})`)}var b,S=e=>new v(e),k=()=>(b||(b=S()),b)},3321:(e,t,n)=>{"use strict";var r=n(4645);n.o(r,"useParams")&&n.d(t,{useParams:function(){return r.useParams}}),n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useRouter")&&n.d(t,{useRouter:function(){return r.useRouter}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},7730:(e,t)=>{"use strict"},8187:(e,t,n)=>{"use strict";n.d(t,{mN:()=>u,yI:()=>s});var r=n(8673),o=n(2115),i=n(1754);function s(e){let{prefix:t,field:n,errors:r,...i}=e;if(null==r)return null;let s=n?r.getFieldErrors(n):r.getFormErrors();return 0===s.length?null:o.createElement("div",{...i},t?`${t} `:null,s.map(e=>e.message).join(", "))}n(110);var c=(0,o.createContext)({elements:null}),a=o.createContext(null);function u(e,t={}){let[n,s]=(0,o.useState)(null),[l,p]=(0,o.useState)(null),[d,f]=(0,o.useState)(!1),[m,h]=(0,o.useState)(!1);if(!e)throw Error('You must provide a form key or hashid (e.g. useForm("myForm") or useForm("123xyz")');let y=function(e,t={}){let n=(0,o.useContext)(a)??{client:(0,i.getDefaultClient)()},{client:s=n.client,extraData:u,origin:l}=t,{elements:p}=(0,o.useContext)(c),{stripe:d}=s;return async function(t){var n;let o="preventDefault"in(n=t)&&"function"==typeof n.preventDefault?function(e){e.preventDefault();let t=e.currentTarget;if("FORM"!=t.tagName)throw Error("submit was triggered for a non-form element");return new FormData(t)}(t):t;if("object"==typeof u)for(let[e,t]of Object.entries(u)){let n;void 0!==(n="function"==typeof t?await t():t)&&(0,i.appendExtraData)(o,e,n)}let c=p?.getElement(r.CardElement),a=d&&c?()=>d.createPaymentMethod({type:"card",card:c,billing_details:function(e){let t={address:function(e){let t={};for(let[n,r]of[["address_line1","line1"],["address_line2","line2"],["address_city","city"],["address_country","country"],["address_state","state"],["address_postal_code","postal_code"]]){let o=e instanceof FormData?e.get(n):e[n];o&&"string"==typeof o&&(t[r]=o)}return t}(e)};for(let n of["name","email","phone"]){let r=e instanceof FormData?e.get(n):e[n];r&&"string"==typeof r&&(t[n]=r)}return t}(o)}):void 0;return s.submitForm(e,o,{endpoint:l,clientName:"@formspree/[email protected]",createPaymentMethod:a})}}(e,{client:t.client,extraData:t.data,origin:t.endpoint});return[{errors:n,result:l,submitting:d,succeeded:m},async function(e){f(!0);let t=await y(e);f(!1),(0,i.isSubmissionError)(t)?(s(t),h(!1)):(s(null),p(t),h(!0))},function(){s(null),p(null),f(!1),h(!1)}]}},8673:function(e,t,n){!function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=e&&("u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=o){var i=[],s=!0,c=!1;try{for(o=o.call(e);!(s=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{s||null==o.return||o.return()}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u,l,p,d,f,m={exports:{}};m.exports=(function(){if(f)return d;f=1;var e=p?l:(p=1,l="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,d=function(){function r(t,n,r,o,i,s){if(s!==e){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function o(){return r}r.isRequired=r;var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}})()();var h=(u=m.exports)&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u,y=function(e,n,r){var o=!!r,i=t.useRef(r);t.useEffect(function(){i.current=r},[r]),t.useEffect(function(){if(!o||!e)return function(){};var t=function(){i.current&&i.current.apply(i,arguments)};return e.on(n,t),function(){e.off(n,t)}},[o,n,e,i])},E=function(e){var n=t.useRef(e);return t.useEffect(function(){n.current=e},[e]),n.current},g=function(e){return null!==e&&"object"===o(e)},v="[object Object]",C=function e(t,n){if(!g(t)||!g(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===v;if(o!==(Object.prototype.toString.call(n)===v))return!1;if(!o&&!r)return t===n;var i=Object.keys(t),s=Object.keys(n);if(i.length!==s.length)return!1;for(var c={},a=0;a<i.length;a+=1)c[i[a]]=!0;for(var u=0;u<s.length;u+=1)c[s[u]]=!0;var l=Object.keys(c);return l.length===i.length&&l.every(function(r){return e(t[r],n[r])})},b=function(e,t,n){return g(e)?Object.keys(e).reduce(function(o,s){var c=!g(t)||!C(e[s],t[s]);return n.includes(s)?(c&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),o):c?r(r({},o||{}),{},i({},s,e[s])):o},null):null},S="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S;if(null===e||g(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment)return e;throw Error(t)},P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:S;if(g(e)&&"function"==typeof e.then)return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return k(e,t)})};var n=k(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},O=function(e){e&&e._registerWrapper&&e.registerAppInfo&&(e._registerWrapper({name:"react-stripe-js",version:"3.10.0"}),e.registerAppInfo({name:"react-stripe-js",version:"3.10.0",url:"https://stripe.com/docs/stripe-js/react"}))},w=t.createContext(null);w.displayName="ElementsContext";var I=function(e,t){if(!e)throw Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},_=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo(function(){return P(n)},[n]),s=c(t.useState(function(){return{stripe:"sync"===i.tag?i.stripe:null,elements:"sync"===i.tag?i.stripe.elements(r):null}}),2),a=s[0],u=s[1];t.useEffect(function(){var e=!0,t=function(e){u(function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}})};return"async"!==i.tag||a.stripe?"sync"!==i.tag||a.stripe||t(i.stripe):i.stripePromise.then(function(n){n&&e&&t(n)}),function(){e=!1}},[i,a,r]);var l=E(n);t.useEffect(function(){null!==l&&l!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[l,n]);var p=E(r);return t.useEffect(function(){if(a.elements){var e=b(r,p,["clientSecret","fonts"]);e&&a.elements.update(e)}},[r,p,a.elements]),t.useEffect(function(){O(a.stripe)},[a.stripe]),t.createElement(w.Provider,{value:a},o)};_.propTypes={stripe:h.any,options:h.object};var A=function(e){return I(t.useContext(w),e)},R=function(e){return(0,e.children)(A("mounts <ElementsConsumer>"))};R.propTypes={children:h.func.isRequired};var x=["on","session"],j=t.createContext(null);j.displayName="CheckoutSdkContext";var T=function(e,t){if(!e)throw Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},N=t.createContext(null);N.displayName="CheckoutContext";var D=function(e,t){if(!e)return null;e.on,e.session;var n=s(e,x);return t?Object.assign(t,n):Object.assign(e.session(),n)},F=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo(function(){return P(n,"Invalid prop `stripe` supplied to `CheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[n]),s=c(t.useState(null),2),a=s[0],u=s[1],l=c(t.useState(function(){return{stripe:"sync"===i.tag?i.stripe:null,checkoutSdk:null}}),2),p=l[0],d=l[1],f=function(e,t){d(function(n){return n.stripe&&n.checkoutSdk?n:{stripe:e,checkoutSdk:t}})},m=t.useRef(!1);t.useEffect(function(){var e=!0;return"async"!==i.tag||p.stripe?"sync"===i.tag&&i.stripe&&!m.current&&(m.current=!0,i.stripe.initCheckout(r).then(function(e){e&&(f(i.stripe,e),e.on("change",u))})):i.stripePromise.then(function(t){t&&e&&!m.current&&(m.current=!0,t.initCheckout(r).then(function(e){e&&(f(t,e),e.on("change",u))}))}),function(){e=!1}},[i,p,r,u]);var h=E(n);t.useEffect(function(){null!==h&&h!==n&&console.warn("Unsupported prop change on CheckoutProvider: You cannot change the `stripe` prop after setting it.")},[h,n]);var y=E(r),g=E(p.checkoutSdk);t.useEffect(function(){if(p.checkoutSdk){var e,t,n,o,i=!!(!g&&p.checkoutSdk),s=null==y||null==(e=y.elementsOptions)?void 0:e.appearance,c=null==r||null==(t=r.elementsOptions)?void 0:t.appearance,a=!C(c,s);c&&(a||i)&&p.checkoutSdk.changeAppearance(c);var u=null==y||null==(n=y.elementsOptions)?void 0:n.fonts,l=null==r||null==(o=r.elementsOptions)?void 0:o.fonts,d=!C(u,l);l&&(d||i)&&p.checkoutSdk.loadFonts(l)}},[r,y,p.checkoutSdk,g]),t.useEffect(function(){O(p.stripe)},[p.stripe]);var v=t.useMemo(function(){return D(p.checkoutSdk,a)},[p.checkoutSdk,a]);return p.checkoutSdk?t.createElement(j.Provider,{value:p},t.createElement(N.Provider,{value:v},o)):null};F.propTypes={stripe:h.any,options:h.shape({fetchClientSecret:h.func.isRequired,elementsOptions:h.object}).isRequired};var M=function(e){var n=t.useContext(j),r=t.useContext(w);if(n&&r)throw Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return n?T(n,e):I(r,e)},L=["mode"],U=function(e,n){var r="".concat(e.charAt(0).toUpperCase()+e.slice(1),"Element"),o=n?function(e){M("mounts <".concat(r,">"));var n=e.id,o=e.className;return t.createElement("div",{id:n,className:o})}:function(n){var o,i=n.id,a=n.className,u=n.options,l=void 0===u?{}:u,p=n.onBlur,d=n.onFocus,f=n.onReady,m=n.onChange,h=n.onEscape,g=n.onClick,v=n.onLoadError,C=n.onLoaderStart,S=n.onNetworksChange,k=n.onConfirm,P=n.onCancel,O=n.onShippingAddressChange,w=n.onShippingRateChange,I=n.onSavedPaymentMethodRemove,_=n.onSavedPaymentMethodUpdate,A=M("mounts <".concat(r,">")),R="elements"in A?A.elements:null,x="checkoutSdk"in A?A.checkoutSdk:null,j=c(t.useState(null),2),T=j[0],N=j[1],D=t.useRef(null),F=t.useRef(null);y(T,"blur",p),y(T,"focus",d),y(T,"escape",h),y(T,"click",g),y(T,"loaderror",v),y(T,"loaderstart",C),y(T,"networksch
1ange",S),y(T,"confirm",k),y(T,"cancel",P),y(T,"shippingaddresschange",O),y(T,"shippingratechange",w),y(T,"savedpaymentmethodremove",I),y(T,"savedpaymentmethodupdate",_),y(T,"change",m),f&&(o="expressCheckout"===e?f:function(){f(T)}),y(T,"ready",o),t.useLayoutEffect(function(){if(null===D.current&&null!==F.current&&(R||x)){var t=null;if(x)switch(e){case"payment":t=x.createPaymentElement(l);break;case"address":if("mode"in l){var n=l.mode,o=s(l,L);if("shipping"===n)t=x.createShippingAddressElement(o);else if("billing"===n)t=x.createBillingAddressElement(o);else throw Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":t=x.createExpressCheckoutElement(l);break;case"currencySelector":t=x.createCurrencySelectorElement();break;case"taxId":t=x.createTaxIdElement(l);break;default:throw Error("Invalid Element type ".concat(r,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else R&&(t=R.create(e,l));D.current=t,N(t),t&&t.mount(F.current)}},[R,x,l]);var U=E(l);return t.useEffect(function(){if(D.current){var e=b(l,U,["paymentRequest"]);e&&"update"in D.current&&D.current.update(e)}},[l,U]),t.useLayoutEffect(function(){return function(){if(D.current&&"function"==typeof D.current.destroy)try{D.current.destroy(),D.current=null}catch(e){}}},[]),t.createElement("div",{id:i,className:a,ref:F})};return o.propTypes={id:h.string,className:h.string,onChange:h.func,onBlur:h.func,onFocus:h.func,onReady:h.func,onEscape:h.func,onClick:h.func,onLoadError:h.func,onLoaderStart:h.func,onNetworksChange:h.func,onConfirm:h.func,onCancel:h.func,onShippingAddressChange:h.func,onShippingRateChange:h.func,onSavedPaymentMethodRemove:h.func,onSavedPaymentMethodUpdate:h.func,options:h.object},o.displayName=r,o.__elementType=e,o},Y="u"<typeof window,B=t.createContext(null);B.displayName="EmbeddedCheckoutProviderContext";var $=function(){var e=t.useContext(B);if(!e)throw Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},W=Y?function(e){var n=e.id,r=e.className;return $(),t.createElement("div",{id:n,className:r})}:function(e){var n=e.id,r=e.className,o=$().embeddedCheckout,i=t.useRef(!1),s=t.useRef(null);return t.useLayoutEffect(function(){return!i.current&&o&&null!==s.current&&(o.mount(s.current),i.current=!0),function(){if(i.current&&o)try{o.unmount(),i.current=!1}catch(e){}}},[o]),t.createElement("div",{ref:s,id:n,className:r})},K=U("auBankAccount",Y),q=U("card",Y),J=U("cardNumber",Y),V=U("cardExpiry",Y),z=U("cardCvc",Y),G=U("fpxBank",Y),Q=U("iban",Y),Z=U("idealBank",Y),H=U("p24Bank",Y),X=U("epsBank",Y),ee=U("payment",Y),et=U("expressCheckout",Y),en=U("currencySelector",Y),er=U("paymentRequestButton",Y),eo=U("linkAuthentication",Y),ei=U("address",Y),es=U("shippingAddress",Y),ec=U("paymentMethodMessaging",Y),ea=U("affirmMessage",Y),eu=U("afterpayClearpayMessage",Y),el=U("taxId",Y);e.AddressElement=ei,e.AffirmMessageElement=ea,e.AfterpayClearpayMessageElement=eu,e.AuBankAccountElement=K,e.CardCvcElement=z,e.CardElement=q,e.CardExpiryElement=V,e.CardNumberElement=J,e.CheckoutProvider=F,e.CurrencySelectorElement=en,e.Elements=_,e.ElementsConsumer=R,e.EmbeddedCheckout=W,e.EmbeddedCheckoutProvider=function(e){var n=e.stripe,r=e.options,o=e.children,i=t.useMemo(function(){return P(n,"Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.")},[n]),s=t.useRef(null),a=t.useRef(null),u=c(t.useState({embeddedCheckout:null}),2),l=u[0],p=u[1];t.useEffect(function(){if(!a.current&&!s.current){var e=function(e){a.current||s.current||(a.current=e,s.current=a.current.initEmbeddedCheckout(r).then(function(e){p({embeddedCheckout:e})}))};"async"===i.tag&&!a.current&&(r.clientSecret||r.fetchClientSecret)?i.stripePromise.then(function(t){t&&e(t)}):"sync"===i.tag&&!a.current&&(r.clientSecret||r.fetchClientSecret)&&e(i.stripe)}},[i,r,l,a]),t.useEffect(function(){return function(){l.embeddedCheckout?(s.current=null,l.embeddedCheckout.destroy()):s.current&&s.current.then(function(){s.current=null,l.embeddedCheckout&&l.embeddedCheckout.destroy()})}},[l.embeddedCheckout]),t.useEffect(function(){O(a)},[a]);var d=E(n);t.useEffect(function(){null!==d&&d!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[d,n]);var f=E(r);return t.useEffect(function(){if(null!=f){if(null==r)return void console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");void 0===r.clientSecret&&void 0===r.fetchClientSecret&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),null!=f.clientSecret&&r.clientSecret!==f.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=f.fetchClientSecret&&r.fetchClientSecret!==f.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),null!=f.onComplete&&r.onComplete!==f.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=f.onShippingDetailsChange&&r.onShippingDetailsChange!==f.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=f.onLineItemsChange&&r.onLineItemsChange!==f.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[f,r]),t.createElement(B.Provider,{value:l},o)},e.EpsBankElement=X,e.ExpressCheckoutElement=et,e.FpxBankElement=G,e.IbanElement=Q,e.IdealBankElement=Z,e.LinkAuthenticationElement=eo,e.P24BankElement=H,e.PaymentElement=ee,e.PaymentMethodMessagingElement=ec,e.PaymentRequestButtonElement=er,e.ShippingAddressElement=es,e.TaxIdElement=el,e.useCheckout=function(){T(t.useContext(j),"calls useCheckout()");var e=t.useContext(N);if(!e)throw Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},e.useElements=function(){return A("calls useElements()").elements},e.useStripe=function(){return M("calls useStripe()").stripe}}(t,n(2115))}}]);
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.