1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="5b1672bb-696a-45a6-8267-3fdb1611f796",e._sentryDebugIdIdentifier="sentry-dbid-5b1672bb-696a-45a6-8267-3fdb1611f796")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8917],{73199:function(e,r,t){t.d(r,{F4:function(){return u},Lt:function(){return m},gB:function(){return x}});var a=t(85893),s=t(67294),l=t(87874),o=t(89121),n=t(47809),i=t(77605),d=t(32127),c=t(87536);let u=e=>{let{id:r,label:t,options:u,name:m,forPetWriter:x,control:p,required:h=!1,onBlur:b}=e;return(0,a.jsx)(c.Qr,{name:m,control:p,rules:{required:h},render:e=>{let{field:{value:c,onChange:p,onBlur:h}}=e;return(0,a.jsx)(l.R,{value:c||{id:"",name:"Select One"},onChange:e=>{p(e),(0,d.qP)(m.toString())},children:e=>{let{open:d}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.R.Label,{className:"mb-1 mt-8 block text-base font-bold text-black",children:t}),(0,a.jsxs)("div",{className:"relative mt-2",children:[(0,a.jsxs)(l.R.Button,{id:r,className:(0,i.A)("flex w-fit cursor-pointer items-start rounded-[30px] border border-gray-300 bg-white px-5 py-3 text-left shadow-sm","sm:text-base sm:leading-6","group",x?"hover:border-legacy-orange-100 hover:bg-legacy-orange-100 hover:bg-opacity-5 hover:text-legacy-orange-100 hover:first:text-legacy-orange-100 aria-expanded:bg-legacy-orange-100 aria-expanded:text-white hover:aria-expanded:text-white":"hover:border-legacy-blue-100 hover:bg-sky-100 hover:text-legacy-blue-100 hover:first:text-legacy-blue-100 aria-expanded:bg-legacy-blue-100 aria-expanded:text-white hover:aria-expanded:text-white"),onBlur:()=>{h(),b&&b()},children:[c?c.name:"Select One",(0,a.jsx)(n.Z,{className:(0,i.A)("fill-3xl ml-3 h-6 w-6 leading-4 transition-all duration-300 ease-in-out group-aria-expanded:rotate-180 group-aria-expanded:fill-white",x?"group-hover:fill-legacy-orange-100":"group-hover:fill-legacy-blue-100")})]}),(0,a.jsx)(o.u,{show:d,as:s.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(l.R.Options,{className:"w-[256px]] absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-base",children:u.map(e=>(0,a.jsx)(l.R.Option,{id:"dropdown-".concat(e.id,"-option-obit-writer"),className:e=>{let{active:r}=e;return(0,i.A)(r?"bg-legacy-".concat(x?"orange":"blue","-100 [&_span]:text-white"):"","relative cursor-default select-none py-2 pl-3 pr-9")},value:e,children:r=>{let{selected:t}=r;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:(0,i.A)(t?"font-semibold":"font-normal","block truncate hover:text-white focus:text-white"),children:e.name})})}},e.id))})})]})]})}})},"data-sentry-element":"Controller","data-sentry-component":"ControlledDropdown","data-sentry-source-file":"Dropdown.tsx"})},m=e=>{let{id:r,label:t,options:c,selected:u={id:"select_one",name:"Select One"},setSelected:m,name:x,forPetWriter:p}=e;return(0,a.jsx)(l.R,{value:u,onChange:e=>{m(e),(0,d.qP)(x)},"data-sentry-element":"Listbox","data-sentry-component":"Dropdown","data-sentry-source-file":"Dropdown.tsx",children:e=>{let{open:d}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.R.Label,{className:"mb-1 mt-8 block text-base font-bold text-black",children:t}),(0,a.jsxs)("div",{className:"relative mt-2",children:[(0,a.jsxs)(l.R.Button,{id:r,className:(0,i.A)("flex w-fit cursor-pointer items-start rounded-[30px] border border-gray-300 bg-white px-5 py-3 text-left shadow-sm","sm:text-base sm:leading-6","group",p?"\n hover:border-legacy-orange-100 hover:bg-legacy-orange-100 hover:bg-opacity-5 hover:text-legacy-orange-100 hover:first:text-legacy-orange-100 aria-expanded:bg-legacy-orange-100 aria-expanded:text-white hover:aria-expanded:text-white\n ":" hover:border-legacy-blue-100 hover:bg-sky-100 hover:text-legacy-blue-100 hover:first:text-legacy-blue-100 aria-expanded:bg-legacy-blue-100 aria-expanded:text-white hover:aria-expanded:text-white"),children:[u?u.name:"Select One",(0,a.jsx)(n.Z,{className:(0,i.A)("fill-3xl ml-3 h-6 w-6 leading-4 transition-all duration-300 ease-in-out group-aria-expanded:rotate-180 group-aria-expanded:fill-white",p?"group-hover:fill-legacy-orange-100":"group-hover:fill-legacy-blue-100")})]}),(0,a.jsx)(o.u,{show:d,as:s.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(l.R.Options,{className:"w-[256px]] absolute z-10 mt-1 max-h-60 overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-base",children:c.map(e=>(0,a.jsx)(l.R.Option,{id:"dropdown-".concat(e.id,"-option-obit-writer"),className:e=>{let{active:r}=e;return(0,i.A)(r?"bg-legacy-".concat(p?"orange":"blue","-100 [&_span]:text-white"):"","relative cursor-default select-none py-2 pl-3 pr-9")},value:e,children:r=>{let{selected:t}=r;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:(0,i.A)(t?"font-semibold":"font-normal","block truncate hover:text-white focus:text-white"),children:e.name})})}},e.id))})})]})]})}})},x=(0,s.forwardRef)((e,r)=>{let{label:t,options:d,placeholder:c,required:u,error:m,value:x,onChange:p,shouldFocus:h,id:b}=e;return(0,a.jsx)(l.R,{value:x,onChange:e=>{p(e||"")},children:e=>{let{open:r}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(l.R.Label,{className:"mb-1 mt-8 block text-base font-bold text-black",children:[u&&(0,a.jsx)("span",{className:"mr-1 font-normal text-red-400",children:"*"}),t]}),(0,a.jsxs)("div",{className:"relative mt-2",children:[(0,a.jsxs)(l.R.Button,{id:b,className:(0,i.A)("group flex w-full cursor-pointer items-start justify-between rounded-lg border bg-gray-50 px-5 py-3 text-left shadow-sm hover:border-legacy-blue-100 hover:bg-sky-100 hover:text-legacy-blue-100 hover:first:text-legacy-blue-100 aria-expanded:bg-legacy-blue-100 aria-expanded:text-white hover:aria-expanded:text-white sm:text-base sm:leading-6",m?"border-error focus-within:border-error focus-within:ring-error":"border-gray-300",h&&m?"focus":""),children:[null!=x?x:c,(0,a.jsx)(n.Z,{className:"fill-3xl h-6 w-6 leading-4 transition-all duration-300 ease-in-out group-hover:fill-legacy-blue-100 group-aria-expanded:rotate-180 group-aria-expanded:fill-white"})]}),(0,a.jsx)(o.u,{show:r,as:s.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,a.jsx)(l.R.Options,{className:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-base",children:d.map(e=>(0,a.jsx)(l.R.Option,{id:"provider-dropdown-".concat(e.id,"-option-obit-writer"),className:e=>{let{active:r}=e;return"relative cursor-default select-none py-2 pl-3 pr-9 ".concat(r?"bg-legacy-blue-100 [&_span]:text-white":"")},value:e.value,children:r=>{let{selected:t,active:s}=r;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("span",{className:"".concat(t?"font-semibold":"font-normal"," block truncate ").concat(s?"text-white":""),children:e.value})})}},e.id))})}),m&&(0,a.jsx)("span",{className:"ml-1 max-w-[120px] text-xs font-medium text-error",children:"Required"})]})]})}})});x.displayName="ProviderDropdown"},82524:function(e,r,t){t.d(r,{s:function(){return n}});var a=t(85893),s=t(87536),l=t(57333),o=t(77605);let n=e=>{let{name:r,control:t,label:n,className:i,required:d=!1,id:c}=e;return(0,a.jsxs)("div",{className:i,"data-sentry-component":"PhoneInput","data-sentry-source-file":"PhoneInput.tsx",children:[(0,a.jsxs)("label",{htmlFor:r,className:"mb-1 block text-left text-base font-bold text-black",children:[d&&(0,a.jsx)("span",{className:"mr-1 font-normal text-error",children:"*"}),n]}),(0,a.jsx)(s.Qr,{name:r,control:t,rules:{required:d,validate:e=>10===e.replace(/\D/g,"").length},render:e=>{let{field:r,fieldState:{error:t}}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.HH,{...r,id:c,format:"(###) ### - ####",placeholder:"(___) ___ - ___",mask:"_",className:(0,o.A)("block w-full rounded-md border bg-gray-50 px-3 py-3 text-neutral-75 placeholder-neutral-50 sm:text-base",t?"border-error focus-within:border-error focus-within:ring-error":"border-gray-300"),onValueChange:e=>{let{value:t}=e;return r.onChange(t)}
1}),t&&(0,a.jsx)("span",{className:"ml-1 max-w-[120px] text-xs font-medium text-error",children:d?"Required":"Please enter a valid 10-digit phone number"})]})},"data-sentry-element":"Controller","data-sentry-source-file":"PhoneInput.tsx"})]})}},97665:function(e,r,t){t.d(r,{K:function(){return O}});var a=t(85893),s=t(48136),l=t(23316),o=t(87536),n=t(86664),i=t(25675),d=t.n(i),c=t(67294),u=t(24757),m=t(77605),x=t(4e4),p=t(91444),h=t(21003),b=t(12355),g=t(11163),f=t(65278),y=t(82524),v=t(24186);let w={style:{base:{fontSize:"16px",color:"#123245",letterSpacing:"0.025em","::placeholder":{color:"gray"}},invalid:{color:"red"}}},j=e=>{let{message:r}=e;return(0,a.jsx)("div",{className:"mt-2 text-sm font-medium text-red-500","data-sentry-component":"ErrorMessage","data-sentry-source-file":"Order.tsx",children:r})},N=e=>{let{children:r}=e;return(0,a.jsx)("div",{className:"mt-1 text-left text-xs font-medium text-error","data-sentry-component":"StripeElementError","data-sentry-source-file":"Order.tsx",children:r})},E=e=>{let{text:r}=e;return(0,a.jsxs)("label",{className:"mb-1 block text-left text-base font-bold text-black","data-sentry-component":"Label","data-sentry-source-file":"Order.tsx",children:[(0,a.jsx)("span",{className:"mr-1 font-normal text-error",children:"*"}),r]})},C=()=>(0,a.jsxs)("div",{className:"flex justify-end gap-2","data-sentry-component":"CreditCardIcons","data-sentry-source-file":"Order.tsx",children:[(0,a.jsx)(d(),{className:"w-10",src:"/owimages/visa.svg",alt:"visa",width:40,height:40,"data-sentry-element":"Image","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(d(),{className:"w-10",src:"/owimages/discover.svg",alt:"discover",width:40,height:40,"data-sentry-element":"Image","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(d(),{className:"w-10",src:"/owimages/mc.svg",alt:"mc",width:40,height:40,"data-sentry-element":"Image","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(d(),{className:"w-10",src:"/owimages/amex.svg",alt:"amex",width:40,height:40,"data-sentry-element":"Image","data-sentry-source-file":"Order.tsx"})]}),O=e=>{var r,t,i,d,O,k,_,S,R,F;let{forPetWriter:P,orderId:I,sendEvent:A,session:D,petSession:L,navigateToReceipt:T,processingFeeEnabled:q}=e,V=u.h.useUtils(),{discount:M}=(0,b.K)(),U=(0,g.useRouter)(),{register:B,handleSubmit:z,formState:{errors:H},control:K}=(0,o.cI)({reValidateMode:"onChange",defaultValues:{email:null!==(F=(null==D?void 0:null===(r=D.data)||void 0===r?void 0:r.visitorEmail)||(null==L?void 0:L.visitorEmail))&&void 0!==F?F:void 0},shouldFocusError:!0}),{vendorId:J}=(0,b.K)(),[Z,Q]=(0,c.useState)(""),[W,Y]=(0,c.useState)(!1),[X,G]=(0,c.useState)(!1),[$,ee]=(0,c.useState)(!1),[er,et]=(0,c.useState)(!1),[ea,es]=(0,c.useState)(null),el=u.h.order.finalizeOrder.useMutation(),eo=u.h.petOrder.finalizePetOrder.useMutation(),{data:en}=u.h.prices.getPrices.useQuery({forPetWriter:P,discountCode:M}),ei=(0,n.useStripe)(),ed=(0,n.useElements)(),ec=e=>{let r=null==ea?void 0:ea.errors,t=(t,a,s)=>{((e,r)=>{switch(e){case"cardNumber":G(r);break;case"cardCvc":ee(r);break;case"cardExpiry":et(r)}})(t,a),e.empty||es({errors:{...r,serverError:void 0,["".concat(t,"Error")]:s}})};switch(e.elementType){case"cardNumber":t("cardNumber",e.complete,!1);break;case"cardCvc":t("cardCvc",e.complete,!1);break;case"cardExpiry":t("cardExpiry",e.complete,!1)}e.error&&es({errors:{serverError:e.error.message}})},eu=async()=>{let e=!0,r={cardNumberError:!1,cardCvcError:!1,cardExpiryError:!1};return ed?(X||(r.cardNumberError=!0,e=!1),$||(r.cardCvcError=!0,e=!1),er||(r.cardExpiryError=!0,e=!1),es({errors:r}),{isAllValid:e,cardNumber:{element:ed.getElement(n.CardNumberElement),isValid:X},cardCvc:{element:ed.getElement(n.CardCvcElement),isValid:$},cardExpiry:{element:ed.getElement(n.CardExpiryElement),isValid:er}}):{isAllValid:!1}},em=async e=>{let{customer_name:r,postal_code:t,country:a}=e;if(!ei||!ed)return;let{cardNumber:s}=await eu();if(!s)return;let{error:l,paymentMethod:o}=await ei.createPaymentMethod({type:"card",card:s.element,billing_details:{name:r,address:{country:a,postal_code:t}}});return{error:l,paymentMethod:o}};(0,c.useEffect)(()=>{U.prefetch("/obit-writer/receipt/")},[U]);let ex=async e=>{Y(!0);try{let t;if(e.email&&(0,h.o)(e.email),!(null==e?void 0:e.paymentMethodType)){let{error:r,paymentMethod:a}=await em({customer_name:"".concat(e.customerFirstName," ").concat(e.customerLastName),postal_code:e.billing_postal_code,country:"US"})||{};if(t=a,r)throw Q(r.message),console.error(JSON.stringify(r)),p.Am.error(r.message),Y(!1),r}if((null==t?void 0:t.id)&&e.customerFirstName&&e.customerLastName){var r;if(!en){Y(!1);return}let a={orderId:I,customerFullName:"".concat(e.customerFirstName," ").concat(e.customerLastName),customerFirstName:e.customerFirstName,customerLastName:e.customerLastName,customerEmail:e.email,phoneNumber:e.phone,paymentMethodId:null==t?void 0:t.id,amount:en.baseAfterDiscount.cents,...!P&&{processingFee:en.processingFee.cents},paymentMethodType:(null==e?void 0:e.paymentMethodType)||"CREDIT_CARD",...M&&{discountUsed:null===(r=en.discountData)||void 0===r?void 0:r.id}};P||V.session.invalidate(),P?eo.mutate(a,{onSuccess:()=>{V.petSession.invalidate(),Y(!1),T?T():p.Am.error("Unable to navigate to re
1ceipt page. Please refresh.")},onError:e=>{Y(!1),console.error("CHECKOUT ERROR: ",e),Q(e.message)}}):el.mutate(a,{onSuccess:e=>{localStorage.removeItem("publishing_intent"),localStorage.removeItem("intake_form_image"),e.editToken&&sessionStorage.setItem("temporary_edit_token",e.editToken),U.push({pathname:"/obit-writer/receipt/",query:U.query})},onError:e=>{Y(!1),console.error("CHECKOUT ERROR: ",e),Q(e.message)}})}(0,h.s)("Purchase Page - Complete Purchase",{discountUsed:M})}catch(e){console.error("CHECKOUT ERROR: ",JSON.stringify(e,null,2))}},ep=async()=>{let e=await eu();if(!e.isAllValid){var r,t,a,s,l,o,n,i,d;(null===(r=e.cardNumber)||void 0===r?void 0:r.isValid)===!1?null===(l=e.cardNumber)||void 0===l||null===(s=l.element)||void 0===s||s.focus():(null===(t=e.cardExpiry)||void 0===t?void 0:t.isValid)===!1?null===(n=e.cardExpiry)||void 0===n||null===(o=n.element)||void 0===o||o.focus():(null===(a=e.cardCvc)||void 0===a?void 0:a.isValid)===!1&&(null===(d=e.cardCvc)||void 0===d||null===(i=d.element)||void 0===i||i.focus());return}Y(!0),z(ex)(),(0,h.s)("Purchase Page - Complete Purchase",{discountUsed:M,vendorId:J})};return(0,a.jsxs)("div",{className:"md:mt-auto mt-8","data-sentry-component":"Order","data-sentry-source-file":"Order.tsx",children:[(0,a.jsx)(f.u,{open:W,
1setOpen:()=>0,hideCloseButton:!0,"data-sentry-element":"Modal","data-sentry-source-file":"Order.tsx",children:(0,a.jsx)(v.yZ,{label:"Completing Order.","data-sentry-element":"WriterCompletionLoader","data-sentry-source-file":"Order.tsx"})}),(0,a.jsx)(s.X,{forPetWriter:P,"data-sentry-element":"Heading","data-sentry-source-file":"Order.tsx",children:"Complete Your Purchase."}),(0,a.jsxs)("form",{children:[(0,a.jsx)(l.Jc,{id:"order-customer-email-input-obit-writer",label:"Your Email Address",name:"email",register:B,required:!0,error:H.email,className:"text-left","data-sentry-element":"SimpleInput","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(y.s,{id:"order-customer-phone-number-input-obit-writer",name:"phone",control:K,label:"Phone Number",required:!0,className:"mt-4","data-sentry-element":"PhoneInput","data-sentry-source-file":"Order.tsx"}),(0,a.jsxs)("div",{className:"mb-4 mt-6 flex",children:[(0,a.jsx)(x.Z,{className:"mr-3 h-5 w-5 fill-green-600","aria-hidden":"true","data-sentry-element":"LockClosedIcon","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)("div",{className:"text-base text-left font-bold text-black",children:"All transactions are secure and encrypted."})]}),(0,a.jsxs)("div",{className:"mb-8 rounded-b-md rounded-t-md border border-gray-300",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-3 px-4 py-6",children:[(0,a.jsx)("div",{className:"rounded-tl-lg bg-white text-xl font-bold",children:"Credit Card"}),(0,a.jsx)(C,{"data-sentry-element":"CreditCardIcons","data-sentry-source-file":"Order.tsx"})]}),(0,a.jsxs)("div",{id:"checkout-card-details",className:"flex w-full flex-col items-stretch justify-items-stretch bg-gray-50 px-4 py-6",children:[(0,a.jsx)(E,{text:"Card Number","data-sentry-element":"Label","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(n.CardNumberElement,{className:(0,m.A)("block w-full rounded-md border bg-gray-50 px-3 py-[14px] text-neutral-75 placeholder-neutral-50 focus:ring-0 sm:text-lg",(null==ea?void 0:null===(t=ea.errors)||void 0===t?void 0:t.cardNumberError)?"border-error focus-within:border-error focus-within:ring-error":"border-gray-300"),id:"order-customer-checkout-card-number-input-obit-writer",options:{...w,placeholder:"Credit Card Number",showIcon:!0,iconStyle:"default"},onChange:ec,"data-sentry-element":"CardNumberElement","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(N,{"data-sentry-element":"StripeElementError","data-sentry-source-file":"Order.tsx",children:(null==ea?void 0:null===(i=ea.errors)||void 0===i?void 0:i.cardNumberError)&&"Required"}),(0,a.jsxs)("div",{className:"mb-4 flex flex-col md:flex-row gap-4",children:[(0,a.jsx)(l.Jc,{id:"order-customer-first-name-input-obit-writer",label:"First Name",name:"customerFirstName",register:B,required:!0,error:H.customerFirstName,className:"text-left w-full","data-sentry-element":"SimpleInput","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(l.Jc,{id:"order-customer-last-name-input-obit-writer",label:"Last Name",name:"customerLastName",register:B,required:!0,error:H.customerLastName,className:"text-left w-full","data-sentry-element":"SimpleInput","data-sentry-source-file":"Order.tsx"})]}),(0,a.jsxs)("div",{className:"mt-4 flex gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(E,{text:"Expiration","data-sentry-element":"Label","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(n.CardExpiryElement,{className:(0,m.A)("block w-[150px] rounded-md border bg-gray-50 px-3 py-[14px] text-neutral-75 placeholder-neutral-50 focus:ring-0 sm:text-lg",(null==ea?void 0:null===(d=ea.errors)||void 0===d?void 0:d.cardExpiryError)?"border-error focus-within:border-error focus-within:ring-error":"border-gray-300"),id:"order-customer-checkout-card-expiry-input-obit-writer",options:w,onChange:ec,"data-sentry-element":"CardExpiryElement","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(N,{"data-sentry-element":"StripeElementError","data-sentry-source-file":"Order.tsx",children:(null==ea?void 0:null===(O=ea.errors)||void 0===O?void 0:O.cardNumberError)&&"Required"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(E,{text:"CVV","data-sentry-element":"Label","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(n.CardCvcElement,{className:(0,m.A)("block w-[90px] rounded-md border bg-gray-50 px-3 py-[14px] text-neutral-75 placeholder-neutral-50 focus:ring-0 sm:text-lg",(null==ea?void 0:null===(k=ea.errors)||void 0===k?void 0:k.cardCvcError)?"border-error focus-within:border-error focus-within:ring-error":"border-gray-300"),id:"order-customer-checkout-card-cvc-input-obit-writer",options:w,onChange:ec,"data-sentry-element":"CardCvcElement","data-sentry-source-file":"Order.tsx"}),(0,a.jsx)(N,{"data-sentry-element":"StripeElementError","data-sentry-source-file":"Order.tsx",children:(null==ea?void 0:null===(_=ea.errors)||void 0===_?void 0:_.cardCvcError)&&"Required"})]})]}),(null==ea?void 0:null===(S=ea.errors)||void 0===S?void 0:S.serverError)&&(0,a.jsx)(j,{message:ea.errors.serverError}),Z&&(0,a.jsx)(j,{message:Z})]})]}),(0,a.jsxs)("div",{className:"mb-8 grid w-full grid-cols-2",children:[(0,a.jsxs)("div",{className:"font-400 flex flex-col items-start",children:[!P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{children:"Subtotal"}),q&&(0,a.jsx)("p",{children:"Processing Fee"})]}),(0,a.jsx)("p",{className:"font-serif text-2xl font-bold",children:"Order Total"})]}),(0,a.jsx)("div",{className:"flex flex-col items-end justify-end",children:P?(0,a.jsx)("p",{className:"text-xl font-bold",children:null==en?void 0:en.base.fractionalDollar}):(0,a.jsxs)(a.Fragment,{children:[M&&(null==en?void 0:en.baseAfterDiscount.cents)!==(null==en?void 0:en.base.cents)?(0,a.jsxs)("span",{children:[(0,a.jsx)("span",{className:"ml-1 line-through",children:null==en?void 0:en.base.fractionalDollar}),(0,a.jsx)("span",{className:"ml-1 font-bold text-red-600",children:null==en?void 0:en.baseAfterDiscount.fractionalDollar})]}):(0,a.jsx)("span",{children:null==en?void 0:en.base.fractionalDollar}),q&&(0,a.jsx)("p",{children:null==en?void 0:en.processingFee.fractionalDollar}),(0,a.jsx)("p",{className:"text-xl font-bold",children:q?null==en?void 0:null===(R=en.total)||void 0===R?void 0:R.fractionalDollar:null==en?void 0:en.baseAfterDiscount.fractionalDollar})]})})]}),(0,a.jsx)("button",{type:"submit",disabled:W,id:"order-complete-purchase-button-obit-writer",className:"w-full rounded-[30px] bg-black py-3 text-white",onClick:ep,children:W||eo.isLoading?"Processing Payment...":"Complete Purchase"})]}),(0,a.jsxs)("div",{className:"mx-auto mt-4 max-w-[420px] text-center text-xs",children:["By completing your purchase, you agree to our"," ",(0,a.jsx)("a",{id:"order-terms-of-use
1-link-obit-writer",onClick:()=>A("terms_of_use_obit_writer"),href:"https://www.legacy.com/terms-of-use/",className:"text-primary underline ",children:"Terms of Use"})," ","and"," ",(0,a.jsx)("a",{id:"order-privacy-policy-button-obit-writer",onClick:()=>A("privacy_policy_obit_writer"),href:"https://www.legacy.com/privacy-policy/",className:"text-primary underline",children:"Privacy Policy"})]})]})}}}]);
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.