PageSourceSearch

https://01-archive.netlify.app/component---src-pages-checkout-js-caa44bda7e8f8e131a19.js

js 01-archive.netlify.app collected 2026-10-03 10:23:47 UTC 28,910 bytes, 2 lines download raw bytes

1(self.webpackChunkzen_car_buying=self.webpackChunkzen_car_buying||[]).push([[939],{2926: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]:{};t%2?n(Object(r),!0).forEach(function(t){c(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},o(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function s(e,t){if(null==e)return{};var n,r,o=a(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){return l(e)||u(e,t)||p(e,t)||m()}function l(e){if(Array.isArray(e))return e}function u(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,o,c=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(c.push(r.value),!t||c.length!==t);a=!0);}catch(i){s=!0,o=i}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return c}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h,g,y,v,E={exports:{}};function b(){return g?h:(g=1,h="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function x(){if(v)return y;v=1;var e=b();function t(){}function n(){}return n.resetWarningCache=t,y=function(){function r(t,n,r,o,c,a){if(a!==e){var s=new 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 s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var c={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 c.PropTypes=c,c}}E.exports=x()();var w=f(E.exports),C=function(e,n,r){var o=!!r,c=t.useRef(r);t.useEffect(function(){c.current=r},[r]),t.useEffect(function(){if(!o||!e)return function(){};var t=function(){c.current&&c.current.apply(c,arguments)};return e.on(n,t),function(){e.off(n,t)}},[o,n,e,c])},k=function(e){var n=t.useRef(e);return t.useEffect(function(){n.current=e},[e]),n.current},S=function(e){return null!==e&&"object"===o(e)},P=function(e){return S(e)&&"function"==typeof e.then},N=function(e){return S(e)&&"function"==typeof e.elements&&"function"==typeof e.createToken&&"function"==typeof e.createPaymentMethod&&"function"==typeof e.confirmCardPayment},j="[object Object]",O=function e(t,n){if(!S(t)||!S(n))return t===n;var r=Array.isArray(t);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(t)===j;if(o!==(Object.prototype.toString.call(n)===j))return!1;if(!o&&!r)return t===n;var c=Object.keys(t),a=Object.keys(n);if(c.length!==a.length)return!1;for(var s={},i=0;i<c.length;i+=1)s[c[i]]=!0;for(var l=0;l<a.length;l+=1)s[a[l]]=!0;var u=Object.keys(s);if(u.length!==c.length)return!1;var p=t,d=n,m=function(t){return e(p[t],d[t])};return u.every(m)},A=function(e,t,n){return S(e)?Object.keys(e).reduce(function(o,a){var s=!S(t)||!O(e[a],t[a]);return n.includes(a)?(s&&console.warn("Unsupported prop change: options.".concat(a," is not a mutable property.")),o):s?r(r({},o||{}),{},c({},a,e[a])):o},null):null},L="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.",I=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;if(null===e||N(e))return e;throw new Error(t)},R=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;if(P(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(e){return I(e,t)})};var n=I(e,t);return null===n?{tag:"empty"}:{tag:"sync",stripe:n}},T=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"}))},_=t.createContext(null);_.displayName="ElementsContext";var B=function(e,t){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(t," in an <Elements> provider."));return e},Y=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return R(n)},[n]),a=i(t.useState(function(){return{stripe:"sync"===c.tag?c.stripe:null,elements:"sync"===c.tag?c.stripe.elements(r):null}}),2),s=a[0],l=a[1];t.useEffect(function(){var e=!0,t=function(e){l(function(t){return t.stripe?t:{stripe:e,elements:e.elements(r)}})};return"async"!==c.tag||s.stripe?"sync"!==c.tag||s.stripe||t(c.stripe):c.stripePromise.then(function(n){n&&e&&t(n)}),function(){e=!1}},[c,s,r]);var u=k(n);t.useEffect(function(){null!==u&&u!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[u,n]);var p=k(r);return t.useEffect(function(){if(s.elements){var e=A(r,p,["clientSecret","fonts"]);e&&s.elements.update(e)}},[r,p,s.elements]),t.useEffect(function(){T(s.stripe)},[s.stripe]),t.createElement(_.Provider,{value:s},o)};Y.propTypes={stripe:w.any,options:w.object};var M=function(e){var n=t.useContext(_);return B(n,e)},U=function(){return M("calls useElements()").elements},F=function(e){return(0,e.children)(M("mounts <ElementsConsumer>"))};F.propTypes={children:w.func.isRequired};var D=["on","session"],q=t.createContext(null);q.displayName="CheckoutSdkContext";var W=function(e,t){if(!e)throw new Error("Could not find CheckoutProvider context; You need to wrap the part of your app that ".concat(t," in an <CheckoutProvider> provider."));return e},Z=t.createContext(null);Z.displayName="CheckoutContext";var z=function(e,t){if(!e)return null;e.on,e.session;var n=s(e,D);return t?Object.assign(t,n):Object.assign(e.session(),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.",H=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return R(n,$)},[n]),a=i(t.useState(null),2),s=a[0],l=a[1],u=i(t.useState(function(){return{stripe:"sync"===c.tag?c.stripe:null,checkoutSdk:null}}),2),p=u[0],d=u[1],m=function(e,t){d(function(n){return n.stripe&&n.checkoutSdk?n:{stripe:e,checkoutSdk:t}})},f=t.useRef(!1);t.useEffect(function(){var e=!0;return"async"!==c.tag||p.stripe?"sync"===c.tag&&c.stripe&&!f.current&&(f.current=!0,
1c.stripe.initCheckout(r).then(function(e){e&&(m(c.stripe,e),e.on("change",l))})):c.stripePromise.then(function(t){t&&e&&!f.current&&(f.current=!0,t.initCheckout(r).then(function(e){e&&(m(t,e),e.on("change",l))}))}),function(){e=!1}},[c,p,r,l]);var h=k(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 g=k(r),y=k(p.checkoutSdk);t.useEffect(function(){var e,t,n,o;if(p.checkoutSdk){var c=Boolean(!y&&p.checkoutSdk),a=null==g||null===(e=g.elementsOptions)||void 0===e?void 0:e.appearance,s=null==r||null===(t=r.elementsOptions)||void 0===t?void 0:t.appearance,i=!O(s,a);s&&(i||c)&&p.checkoutSdk.changeAppearance(s);var l=null==g||null===(n=g.elementsOptions)||void 0===n?void 0:n.fonts,u=null==r||null===(o=r.elementsOptions)||void 0===o?void 0:o.fonts,d=!O(l,u);u&&(d||c)&&p.checkoutSdk.loadFonts(u)}},[r,g,p.checkoutSdk,y]),t.useEffect(function(){T(p.stripe)},[p.stripe]);var v=t.useMemo(function(){return z(p.checkoutSdk,s)},[p.checkoutSdk,s]);return p.checkoutSdk?t.createElement(q.Provider,{value:p},t.createElement(Z.Provider,{value:v},o)):null};H.propTypes={stripe:w.any,options:w.shape({fetchClientSecret:w.func.isRequired,elementsOptions:w.object}).isRequired};var Q=function(e){var n=t.useContext(q);return W(n,e)},G=function(e){var n=t.useContext(q),r=t.useContext(_);if(n&&r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both <CheckoutProvider> and <Elements> providers."));return n?W(n,e):B(r,e)},K=function(){Q("calls useCheckout()");var e=t.useContext(Z);if(!e)throw new Error("Could not find Checkout Context; You need to wrap the part of your app that calls useCheckout() in an <CheckoutProvider> provider.");return e},V=["mode"],J=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},X=function(e,n){var r="".concat(J(e),"Element"),o=n?function(e){G("mounts <".concat(r,">"));var n=e.id,o=e.className;return t.createElement("div",{id:n,className:o})}:function(n){var o,c=n.id,a=n.className,l=n.options,u=void 0===l?{}:l,p=n.onBlur,d=n.onFocus,m=n.onReady,f=n.onChange,h=n.onEscape,g=n.onClick,y=n.onLoadError,v=n.onLoaderStart,E=n.onNetworksChange,b=n.onConfirm,x=n.onCancel,w=n.onShippingAddressChange,S=n.onShippingRateChange,P=n.onSavedPaymentMethodRemove,N=n.onSavedPaymentMethodUpdate,j=G("mounts <".concat(r,">")),O="elements"in j?j.elements:null,L="checkoutSdk"in j?j.checkoutSdk:null,I=i(t.useState(null),2),R=I[0],T=I[1],_=t.useRef(null),B=t.useRef(null);C(R,"blur",p),C(R,"focus",d),C(R,"escape",h),C(R,"click",g),C(R,"loaderror",y),C(R,"loaderstart",v),C(R,"networkschange",E),C(R,"confirm",b),C(R,"cancel",x),C(R,"shippingaddresschange",w),C(R,"shippingratechange",S),C(R,"savedpaymentmethodremove",P),C(R,"savedpaymentmethodupdate",N),C(R,"change",f),m&&(o="expressCheckout"===e?m:function(){m(R)}),C(R,"ready",o),t.useLayoutEffect(function(){if(null===_.current&&null!==B.current&&(O||L)){var t=null;if(L)switch(e){case"payment":t=L.createPaymentElement(u);break;case"address":if(!("mode"in u))throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");var n=u.mode,o=s(u,V);if("shipping"===n)t=L.createShippingAddressElement(o);else{if("billing"!==n)throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.");t=L.createBillingAddressElement(o)}break;case"expressCheckout":t=L.createExpressCheckoutElement(u);break;case"currencySelector":t=L.createCurrencySelectorElement();break;case"taxId":t=L.createTaxIdElement(u);break;default:throw new Error("Invalid Element type ".concat(r,". You must use either the <PaymentElement />, <AddressElement options={{mode: 'shipping'}} />, <AddressElement options={{mode: 'billing'}} />, or <ExpressCheckoutElement />."))}else O&&(t=O.create(e,u));_.current=t,T(t),t&&t.mount(B.current)}},[O,L,u]);var Y=k(u);return t.useEffect(function(){if(_.current){var e=A(u,Y,["paymentRequest"]);e&&"update"in _.current&&_.current.update(e)}},[u,Y]),t.useLayoutEffect(function(){return function(){if(_.current&&"function"==typeof _.current.destroy)try{_.current.destroy(),_.current=null}catch(e){}}},[]),t.createElement("div",{id:c,className:a,ref:B})};return o.propTypes={id:w.string,className:w.string,onChange:w.func,onBlur:w.func,onFocus:w.func,onReady:w.func,onEscape:w.func,onClick:w.func,onLoadError:w.func,onLoaderStart:w.func,onNetworksChange:w.func,onConfirm:w.func,onCancel:w.func,onShippingAddressChange:w.func,onShippingRateChange:w.func,onSavedPaymentMethodRemove:w.func,onSavedPaymentMethodUpdate:w.func,options:w.object},o.displayName=r,o.__elementType=e,o},ee="undefined"==typeof window,te=t.createContext(null);te.displayName="EmbeddedCheckoutProviderContext";var ne=function(){var e=t.useContext(te);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},re="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.",oe=function(e){var n=e.stripe,r=e.options,o=e.children,c=t.useMemo(function(){return R(n,re)},[n]),a=t.useRef(null),s=t.useRef(null),l=i(t.useState({embeddedCheckout:null}),2),u=l[0],p=l[1];t.useEffect(function(){if(!s.current&&!a.current){var e=function(e){s.current||a.current||(s.current=e,a.current=s.current.initEmbeddedCheckout(r).then(function(e){p({embeddedCheckout:e})}))};"async"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret?"sync"!==c.tag||s.current||!r.clientSecret&&!r.fetchClientSecret||e(c.stripe):c.stripePromise.then(function(t){t&&e(t)})}},[c,r,u,s]),t.useEffect(function(){return function(){u.embeddedCheckout?(a.current=null,u.embeddedCheckout.destroy()):a.current&&a.current.then(function(){a.current=null,u.embeddedCheckout&&u.embeddedCheckout.destroy()})}},[u.embeddedCheckout]),t.useEffect(function(){T(s)},[s]);var d=k(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 m=k(r);return t.useEffect(function(){null!=m&&(null!=r?(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!=m.clientSecret&&r.clientSecret!==m.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!=m.fetchClientSecret&&r.fetchClientSecret!==m.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!=m.onComplete&&r.onComplete!==m.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),null!=m.onShippingDetailsChange&&r.onShippingDetailsChange!==m.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),null!=m.onLineItemsChange&&r.onLineItemsChange!==m.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")):console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them."))},[m,r]),t.createElement(te.Provider,{value:u},o)},ce=function(e){var n=e.id,r=e.className,o=ne().embeddedCheckout,c=t.useRef(!1),a=t.useRef(null);return t.useLayoutEffect(function(){return!c.current&&o&&null!==a.current&&(o.mount(a.current),c.current=!0),function(){if(c.current&&o)try{o.unmount(),c.current=!1}catch(e){}}},[o]),t.createElement("div",{ref:a,id:n,className:r})},ae=function(e){var n=e.id,r=e.className;return ne(),t.createElement("div",{id:n,className:r})},se=ee?ae:ce,ie=function(){return G("calls useStripe()").stripe},le=X("auBankAccount",ee),ue=X("card",ee),pe=X("cardNumber",ee),de=X("cardExpiry",ee),me=X("cardCvc",ee),fe=X("fpxBank",ee),he=X("iban",ee),ge=X("idealBank",ee),ye=X("p24Bank",ee),ve=X("epsBank",ee),Ee=X("payment",ee),be=X("expressCheckout",ee),xe=X("currencySelector",ee),we=X("paymentRequestButton",ee),Ce=X("linkAuthentication",ee),ke=X("address",ee),Se=X("shippingAddress",ee),Pe=X("paymentMethodMessaging",ee),Ne=X("affirmMessage",ee),je=X("afterpayClearpayMessage",ee),Oe=X("taxId",ee);e.AddressElement=ke,e.AffirmMessageElement=Ne,e.AfterpayClearpayMessageElement=je,e.AuBankAccountElement=le,e.CardCvcElement=me,e.CardElement=ue,e.CardExpiryElement=de,e.CardNumberElement=pe,e.CheckoutProvider=H,e.CurrencySelectorElement=xe,e.Elements=Y,e.ElementsConsumer=F,e.EmbeddedCheckout=se,e.EmbeddedCheckoutProvider=oe,e.EpsBankElement=ve,e.ExpressCheckoutElement=be,e.FpxBankElement=fe,e.IbanElement=he,e.IdealBankElement=ge,e.LinkAuthenticationElement=Ce,e.P24BankElement=ye,e.PaymentElement=Ee,e.PaymentMethodMessagingElement=Pe,e.PaymentRequestButtonElement=we,e.ShippingAddressElement=Se,e.TaxIdElement=Oe,e.useCheckout=K,e.useElements=U,e.useStripe=ie}(t,n(6540))},3115:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});
1var r=n(6540),o=n(6462),c=n(9836),a=n(4794),s=n(864);function i(){return r.createElement("footer",{className:"bg-primary text-white py-8 mt-auto"},r.createElement("div",{className:"container mx-auto px-4 md:px-8 lg:px-12 md:max-w-[750px] lg:max-w-[1280px]"},r.createElement("div",{className:"grid grid-cols-1 md:grid-cols-[2fr_1fr_1fr] gap-8 md:gap-12 lg:gap-16"},r.createElement("div",null,r.createElement("h3",{className:"text-xl font-bold mb-4"},"Zen Car Buying"),r.createElement("p",{className:"text-secondary leading-relaxed"},"Zen Car Buying is a nationwide car brokerage providing a concierge service for stress-free purchases. Our Zen Guides research, source and negotiate to deliver you the best new and used vehicles saving you time, money and stress."),r.createElement("p",{className:"leading-relaxed mt-2"},"Call Us:",r.createElement("a",{href:"tel:+15555550100",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent ","aria-label":"Call Zen Car Buying at (555) 555-0100"}," ","(555) 555-0100")),r.createElement(s.A,null)),r.createElement("div",null,r.createElement("h4",{className:"font-bold mb-4"},"Quick Links"),r.createElement("ul",{className:"space-y-2"},r.createElement("li",null,r.createElement(a.Link,{to:"/purchase/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Packages")),r.createElement("li",null,r.createElement(a.Link,{to:"/about/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"About")),r.createElement("li",null,r.createElement(a.Link,{to:"/faq/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"FAQ")),r.createElement("li",null,r.createElement(a.Link,{to:"/services/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Services")),r.createElement("li",null,r.createElement(a.Link,{to:"/blog/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Blog")),r.createElement("li",null,r.createElement(a.Link,{to:"/contact/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Contact")))),r.createElement("div",null,r.createElement("h4",{className:"font-bold mb-4"},"Legal"),r.createElement("ul",{className:"space-y-2"},r.createElement("li",null,r.createElement(a.Link,{to:"/privacy-policy/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Privacy Policy")),r.createElement("li",null,r.createElement(a.Link,{to:"/terms-of-use/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Terms of Use")),r.createElement("li",null,r.createElement(a.Link,{to:"/terms-and-conditions/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"Terms and Conditions")),r.createElement("li",null,r.createElement(a.Link,{to:"/sms-terms-and-conditions/",className:"text-secondary hover:text-white focus:outline-none focus:ring-2 focus:ring-accent"},"SMS Terms and Conditions"))),r.createElement("div",{className:"flex flex-col items-start md:items-start"},r.createElement("h4",{className:"font-bold mt-10 mb-4"},"Accreditation"),r.createElement("a",{href:"https://www.bbb.org/us/wa/spokane/profile/car-buying/zen-car-buying-llc-1296-1000183307/#sealclick",target:"_blank",rel:"noreferrer nofollow",className:"block"},r.createElement("img",{src:"https://seal-alaskaoregonwesternwashington.bbb.org/seals/blue-seal-120-61-bbb-1000183307.png",alt:"Zen Car Buying LLC BBB Business Review",style:{border:0},className:"opacity-80 hover:opacity-100 transition-opacity duration-300"}))))),r.createElement("div",{className:"border-t border-secondary mt-8 pt-4 text-center text-secondary"},"© ",(new Date).getFullYear()," Zen Car Buying, LLC. All rights reserved.")))}var l=n(1456);function u(e){let{children:t}=e;const n=(0,o.useLocation)();return(0,r.useEffect)(()=>{window.scrollTo({top:0,behavior:"auto"})},[n.pathname]),r.createElement(r.Fragment,null,r.createElement("div",{className:"min-h-screen flex flex-col  pt-[88px] max-[364px]:pt-[136px]"},r.createElement(c.A,null),r.createElement("main",{className:"flex-grow"},t),r.createElement(i,null),r.createElement(l.A,null)))}},7514:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return k}});var r,o=n(6540),c=n(4794),a=n(3115),s=n(2926),i="https://js.stripe.com",l="".concat(i,"/v3"),u=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,p=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,d="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",m=function(e){return u.test(e)||p.test(e)},f=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(l).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n},h=null,g=null,y=null,v=function(e){return null!==h?h:(h=new Promise(function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(d),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(i,'"]')),t=0;t<e.length;t++){var n=e[t];if(m(n.src))return n}return null}();if(r&&e)console.warn(d);else if(r){if(r&&null!==y&&null!==g){var o;r.removeEventListener("load",y),r.removeEventListener("error",g),null===(o=r.parentNode)||void 0===o||o.removeChild(r),r=f(e)}}else r=f(e);y=function(e,t){return function(){window.Stripe?e(window.Stripe):t(new Error("Stripe.js not available"))}}(t,n),g=function(e){return function(t){e(new Error("Failed to load Stripe.js",{cause:t}))}}(n),r.addEventListener("load",y),r.addEventListener("error",g)}catch(c){return void n(c)}else t(null)})).catch(function(e){return h=null,Promise.reject(e)})}
1,E=!1,b=function(){return r||(r=v(null).catch(function(e){return r=null,Promise.reject(e)}))};Promise.resolve().then(function(){return b()}).catch(function(e){E||console.warn(e)});var x=e=>{let{selections:t,total:n}=e;const r=(0,s.useStripe)(),c=(0,s.useElements)(),{0:a,1:i}=(0,o.useState)(""),{0:l,1:u}=(0,o.useState)(""),{0:p,1:d}=(0,o.useState)(null),{0:m,1:f}=(0,o.useState)(!1);return o.createElement("section",{className:"bg-secondary py-2 md:py-4"},o.createElement("div",{className:"container mx-auto px-0 md:px-2 md:max-w-[1280px] lg:px-6 lg:max-w-[1280px]"},o.createElement("div",{className:"mx-1 md:mx-2 lg:mx-6 lg:max-w-[1280px] rounded-2xl shadow-lg relative border-2 border-primary"},o.createElement("div",{className:"bg-white p-4 md:p-8 lg:p-12 rounded-2xl shadow-lg text-center"},o.createElement("h2",{className:"text-3xl font-medium text-primary md:mt-4 mb-4 uppercase tracking-wider font-pirulen"},"Complete Your Purchase"),o.createElement("p",{className:"text-lg md:text-xl mx-auto max-w-4xl pb-8 mt-2 text-center text-primary"},"Review your selected services and finalize your purchase to begin your Zen Experience."),o.createElement("div",{className:"max-w-2xl mx-auto text-left bg-gray-50 rounded-lg border p-6 shadow-sm mb-6"},null!=t&&t.zenExperience||t.includeResearchInventory&&t.includePurchaseHelp?o.createElement(o.Fragment,null,o.createElement("p",{className:"text-lg text-gray-700 mb-2 text-center"},o.createElement("span",{className:"font-semibold"},"Zen Experience:")," Includes Research + Inventory + Purchase Assistance"),o.createElement("p",{className:"text-center text-gray-600 text-sm mb-2"},o.createElement("span",{className:"line-through text-gray-400"},"$950")," → ",o.createElement("span",{className:"text-accent font-semibold"},"$850 special bundle"))):o.createElement(o.Fragment,null,t.includeResearchInventory&&o.createElement("p",{className:"text-lg text-gray-700 mb-2 text-center"},o.createElement("span",{className:"font-semibold"},"Research + Inventory Sourcing:")," $450"),t.includePurchaseHelp&&o.createElement("p",{className:"text-lg text-gray-700 mb-2 text-center"},o.createElement("span",{className:"font-semibold"},"Purchase Assistance:")," $500")),o.createElement("hr",{className:"my-4 border-t border-gray-300"}),o.createElement("p",{className:"mt-4 text-lg font-bold text-center text-primary"},"Total: $",n/100)),o.createElement("form",{onSubmit:async e=>{if(e.preventDefault(),r&&c){f(!0),d(null);try{const{error:e}=await c.submit();if(e)return d(e.message),void f(!1);const n=await fetch("/.netlify/functions/create-payment-intent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,email:a,selections:t})}),{clientSecret:o}=await n.json(),{error:s}=await r.confirmPayment({elements:c,clientSecret:o,confirmParams:{return_url:window.location.origin+"/success"}});s&&d(s.message)}catch(n){console.error("Payment error:",n),d("Something went wrong.")}f(!1)}},className:"space-y-4 max-w-2xl mx-auto"},o.createElement("input",{type:"text",placeholder:"Full Name",value:l,onChange:e=>u(e.target.value),required:!0,className:"w-full p-3 text-base border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-accent"}),o.createElement("input",{type:"email",placeholder:"Email",value:a,onChange:e=>i(e.target.value),required:!0,className:"w-full p-3 text-base border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-accent"}),o.createElement("div",{className:"bg-white border border-gray-300 rounded p-4"},o.createElement(s.PaymentElement,null)),o.createElement("button",{type:"submit",disabled:m||!r||!c,className:"w-full bg-clementine text-white text-lg py-3 rounded hover:bg-orange-500 transition-colors"},m?"Processing…":"Pay Now"),p&&o.createElement("div",{className:"text-red-600 text-sm mt-2"},p))))))};const w=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];E=!0;var r=Date.now();return b().then(function(e){return function(e,t,n){if(null===e)return null;var r=t[0].match(/^pk_test/),o=function(e){return 3===e?"v3":e}(e.version);r&&"v3"!==o&&console.warn("Stripe.js@".concat(o," was loaded on the page, but @stripe/stripe-js@").concat("5.10.0"," expected Stripe.js@").concat("v3",". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var c=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"5.10.0",startTime:t})}(c,n),c}(e,t,r)})}("pk_live_51QuIuoHY7CcZ7uRnFMdPDQGIuRh9cjAwymQgFsW2oaY7SHjH7aYFIf3YnKeT6Vs0P57ntFyNzzbNIlQbh3QHkvwo00n0xnKj08");var C=e=>{let{clientSecret:t,selections:n,total:r}=e;const c={clientSecret:t};return o.createElement(s.Elements,{stripe:w,options:c},o.createElement(x,{selections:n,total:r}))};var k=e=>{let{location:t}=e;const{0:n,1:r}=(0,o.useState)(null),{0:s,1:i}=(0,o.useState)(!0),l=t.state,u=null==l?void 0:l.selections,p=null==l?void 0:l.total;return(0,o.useEffect)(()=>{console.log("CheckoutPage mounted",{selections:u,total:p,clientSecret:null==l?void 0:l.clientSecret}),u&&p&&null!=l&&l.clientSecret?(r(l.clientSecret),i(!1)):(0,c.navigate)("/purchase/")},[]),o.createElement(a.A,null,o.createElement("main",{className:"flex-grow bg-secondary py-8"},!s&&n?o.createElement(C,{clientSecret:n,selections:u,total:p}):o.createElement("p",{className:"text-center text-primary"},"Loading checkout…")))}}}]);
2//# sourceMappingURL=component---src-pages-checkout-js-caa44bda7e8f8e131a19.js.map

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.