1import{u as e,S as q,f as u,T as fe,i as p,s as ke,q as Ce}from"./esnext-vendor.BBoIVOQW.js";import{cf as Z,l as f,ai as O,dX as _e,L as we,dM as Pe,dz as Ae,dO as Se,k as S,dY as Le,c8 as Re,P as H,dU as Ne,dR as Ie,ca as he,B as J,dS as Me,dT as Fe,I as De,f as Be,dV as xe,dp as Oe,dr as Te,_ as ze,q as Ue,dZ as Ee,b as Y,K as He,M as Ve,U as qe,N as Ge,a6 as $e}from"./hydrate.Tsur0pib.js";import{C as Ke}from"./Captcha.CzAUNpY9.js";import{MobileOrderSummary as We}from"./component-MobileOrderSummary.yAb3toN9.js";import{R as _,P as Xe}from"./PaymentLine.DOb0V3pD.js";import{T as k,W as ee,a5 as N,bf as D,dR as Ye,t as Q,dQ as je,dv as Je,a4 as Qe,dS as Ze,dT as en,be as nn,dU as tn,aj as sn,b6 as on,b8 as an,ap as rn,bd as ln}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{D as cn,u as dn}from"./StickyPayButton-StickyPayButton.module.DMBRqKer.js";import{e as un,u as pn,a as mn,R as hn,c as se,D as oe,b as ae,L as re,P as vn,d as yn}from"./components-DeliveryReviewMethods.CzUxdUfp.js";import{P as bn}from"./PayButtonSection.BnPVxMC6.js";import{P as le}from"./hooks-useWalletsTimeout.BmMXm9Gc.js";import{D as ce,u as gn,a as fn,S as kn,R as Cn,b as _n}from"./Middot.OBjXYL_E.js";import{M as j,a as wn}from"./Section.CfudEpRb.js";import{u as Pn}from"./PaymentButtons.yQkz3rTh.js";import{u as An,S as Sn}from"./Page.B9pV9lua.js";import{A as de}from"./AddressPresenter.Ce4uWLSc.js";import{u as ue}from"./hooks-useSuppressShopPayModalOnLoad.CwH45iIp.js";import"./app.CUBUOQtX.js";import"./shared-permissions.DW7FOCqf.js";import"./hooks-useShopPayExternalAppContext.YLtTu3k6.js";import"./ShopPayCaptcha.C5fpu37T.js";import"./PaymentErrorBanner.CpfGIpPc.js";import"./hooks-useGeneralPaymentErrorMessage.D4EkCdRM.js";import"./TransitionHeight.BCpWGRvL.js";import"./hooks-useShouldRevealCustomization.1KSlt0eq.js";import"./styles-floating-layer.module.BESFBxYZ.js";import"./shop-pay-installments-types._vopm3yK.js";import"./localization-index.P2wbDjPJ.js";import"./PaymentIcon.CEAvn1dM.js";import"./Theme-ThemeOverride.DLuOqK2F.js";import"./Switch.DcsaOS_H.js";import"./shared-negotiation-input-redeemable.DoYPkwkm.js";import"./PayButton-helpers.Xs3mcmMx.js";import"./graphql-PaymentSessionMutation.KqKA7ogg.js";import"./helpers-credit-card-disabled.CM3LQmkz.js";import"./useShopPayButtonClassName.BGKzXWjH.js";import"./shared-shop-theme.Bl1CDyC7.js";import"./hooks-useShowShopPayOptin.BPTq9EIX.js";import"./hooks-payment-button.Byb-1Rv8.js";import"./ShippingMethodRateLabel.Doe-JTYM.js";import"./EstimatedDeliveryContent.B6SO5ZZV.js";import"./hooks-useShopPayProgressIntercepts.CTuACx9_.js";import"./utils-useViolationsHandler.Cu7hKIy9.js";import"./ShopPayLogo.DdN9PLvG.js";import"./NotFound.3HRSCuDB.js";import"./payment-usePaymentExemptionReason.lTG2U3gh.js";import"./ImpressionEventCapture.IVS9ZWTI.js";import"./shipping-methods-consolidated-included.Bra92G5_.js";import"./negotiated-findSelectedDeliveryMethod.DhxHslog.js";import"./cross-border-hooks.BN4C-Hww.js";function Ln(){const{checkout:n}=k(),s=ee().shippingAddress.value,{value:t}=N().deliveryNext,i=n.proposal.facts.delivery??[],o=i[0],a=N().buyerIdentity.value?.purchasingCompany;if((!i.length||!o?.lines?.length)&&!n.isShippingRequired.value||!o)return null;if(o.pickupAddress)return e(In,{address:o.pickupAddress??void 0,locationName:o.pickupAddressName});const r=t?.status==="unavailable"?s:o.deliveryAddress,l=t&&t.status!=="unavailable"?t.lines.find(c=>c.type!=="SUBSCRIPTION"&&c.status==="available"&&!c.methods.some(({methodType:d})=>d==="PICK_UP")):void 0;return e(q,{children:[e(Nn,{shippingAddress:r??void 0,companyLocationName:a?.location.name}),e(Rn,{lines:o.lines,secondaryDeliveryLine:l})]})}function Rn({lines:n,secondaryDeliveryLine:s}){const{i18n:t,source:i}=k(),o=n.filter(({deliveryChange:a,isFulfilled:r})=>a!=="REMOVED"&&!r).map(a=>e(cn,{line:a},a.title));return o.length?e(_,{id:"shipping",label:t.translate("shipping.title"),primaryContent:o,secondaryContent:i.type==="paymentCollection"||!s?void 0:e(un,{line:s})}):null}function Nn({shippingAddress:n,companyLocationName:s}){const{i18n:t}=k(),i=Z(n,{countryFormat:"explicit",displayName:!!s}),o=t.formatName(n?.firstName,n?.lastName,!0)||n?.firstName||n?.lastName,a=t.translate("review.blocks.no_address"),{primaryContent:r,secondaryContent:l}=s?{primaryContent:s,secondaryContent:n?i:a}:{primaryContent:n?o:a,secondaryContent:n?i:void 0},c=r?e(f,{children:r}):void 0;let d;return n&&i==null?d=e(O,{}):n&&l?d=e(f,{type:"address",children:l}):l&&(d=e(f,{children:l})),e(_,{id:"address",label:t.translate("review.blocks.shipping_address_title"),primaryContent:c,secondaryContent:d})}function In({address:n,locationName:s}){const{i18n:t}=k(),i=Z(n,{hiddenFields:["postalCode","countryCode","phone"]});return!s||!i?null:e(_,{id:"delivery",label:t.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:s}),primaryContent:e(f,{children:i})})}function I({accessibilityLabel:n,children:s,href:t}){const{checkout:{identity:i}}=k(),{onClick:o}=_e(),a=Mn({href:t,identity:i,amazonPayCheckoutAsGuest:o});return e(we,{href:t?`/${t}`:"/",onClick:a,accessibilityLabel:n,children:s})}function Mn({href:n,identity:s,amazonPayCheckoutAsGuest:t}){if(n==="#contact"&&s.current.value==="amazonPay")return()=>t?.()}
1const Fn=["firstName","lastName"];function Dn({hiddenFields:n,...s}){return{...s,hiddenFields:[...new Set([...n??[],...Fn])]}}function ve({showAdressReviewItemAction:n=!0,reviewItemLabel:s,addressPresenterProps:t}){const{i18n:i,checkout:o}=k(),a=N(),r=a.deliveryNext,l=o.proposal.facts.delivery??[],c=a.shippingAddress,d=D("shippingAddress"),m=u(()=>l.length>0?l[0].deliveryAddress:c.value),h=u(()=>Ye(r.value)),{shippingAddress:v,billingAddress:A}=ee(),w=u(()=>r.value?.status==="unavailable"?v.value:m.value),{selectedPickupPoint:y}=Pe(),b=u(()=>!o.isShippingRequired.value),C=u(()=>b.value?A.value:w.value),g=Ae(),L=N().buyerIdentity.value?.purchasingCompany?.location,T=Se(),z=pn({address:C}).value,P=C.value,B=z??{hiddenFields:["phone"],multiline:!1,...t},U=Dn(B),x=!!(L&&(P==null||Q(P)||!T.value)),R=()=>{if(P==null||Q(P)||x)return;const ne=B.hiddenFields??[],te=ne.includes("firstName")?void 0:P.firstName,ie=ne.includes("lastName")?void 0:P.lastName;return i.formatName(te,ie,!0)||te||ie},V=()=>x?L?.name:R(),G=Z(y?.pickupLocation.address,{hiddenFields:["countryCode"]}),$=()=>y?.pickupLocation.name,F=b.value?i.translate("review.blocks.billing_address_title"):i.translate("review.blocks.shipping_address_title"),K=b.value?i.translate("review.blocks.change_billing_address_link_label"):i.translate("review.blocks.change_shipping_address_link_label"),E=e(I,{href:"#deliveryAddress",accessibilityLabel:K,children:i.translate("review.blocks.change_link_label")}),ye=i.translate("review.blocks.no_address"),be=i.translate("pickup_point.title").toLowerCase(),ge=g?.taxId.value;let W=V(),X=e(Bn,{address:P,hasCompanyLocation:!!L,noAddressLabel:ye,secondaryAddressPresentationProps:U,vatNumber:ge});return d.value?(W=e(O,{}),X=void 0):h.value&&(W=$(),X=e(xn,{formattedAddress:G,pickupPoint:y,pickupPointLabel:be})),e(_,{label:s||F,primaryAction:n?E:void 0,primaryContent:W,secondaryContent:X})}function Bn({address:n,hasCompanyLocation:s,noAddressLabel:t,secondaryAddressPresentationProps:i,vatNumber:o}){return n==null||Q(n)?e(S,{children:[e(f,{color:"subdued",children:t}),o&&e(ce,{vatNumber:o})]}):s?e(S,{children:e(de,{...i,address:n})}):e(S,{children:[e(de,{...i,address:n}),o&&e(ce,{vatNumber:o})]})}function xn({formattedAddress:n,pickupPoint:s,pickupPointLabel:t}){if(!s)return null;const i=`${s.pickupLocation.carrierName} ${t}`;return e(S,{children:[n?e(f,{type:"address",children:n}):null,e(f,{color:"subdued",size:"small",children:i})]})}function On({purchasingCompany:n}){const{i18n:s}=k(),{secondary:t}=Le({address:n.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:n.location.name});if(!je(n))return null;const i=s.translate("review.blocks.company_location"),o=e(I,{href:"#billingAddress",accessibilityLabel:s.translate("review.blocks.change_company_location_link_label"),children:s.translate("review.blocks.change_link_label")}),a=n.location.shippingAddress?t:s.translate("review.blocks.no_address"),r=e(f,{children:n.location.name});return e(_,{label:i,primaryAction:o,primaryContent:r,secondaryContent:e(f,{children:a})})}function Tn({companyName:n}){const{i18n:s,checkout:t}=k(),{value:i}=N().contactInfo,o=D("contactInfo").value,a=t.proposal.facts.contactMethod,{geolocation:r}=Re(),l=N().buyerIdentity.value?.purchasingCompany;mn(o);const{email:c,phone:d}=i??{},{email:m,phoneNumber:h}=a??{},{formattedNumber:v}=ue(r.country.code,h??void 0),{formattedNumber:A}=ue(r.country.code,d),w=o&&(c??d)==null,y=m||v||c||A,b=s.translate("customer_account.rollup_label");if(!y&&!o)return null;const C=n?b:s.translate("review.blocks.contact_method_title"),M=w?e(O,{}):l?e(hn,{contactInfo:y}):e(H,{lineClamp:1,children:e(f,{dir:"ltr",children:y})}),L=w||l?void 0:e(I,{href:"#contact",accessibilityLabel:s.translate("review.blocks.change_contact_method_link_label"),children:s.translate("review.blocks.change_link_label")});return e(_,{id:"contact",label:C,primaryAction:L,primaryContent:M})}function zn(){const{i18n:n}=k(),s=N(),{value:t}=s.deliveryNext,i=D("deliveryNext").value,o=Je(t),a=Ne(),r=Ie().value,l=he(),c=fe(()=>{if(!(!t||t.status==="unavailable"))return o?.find(({methodType:R})=>R==="PICK_UP")?.pickupLocation}
1,[t,o]),d=c?.address,m=c?.name,h=!!o?.some(({methodType:R})=>R==="PICK_UP"),v=gn({deliveryLines:!i&&t?.status==="filled"?t.lines:void 0}),A=()=>h?n.translate("review.blocks.change_delivery_method_link_label"):n.translate("review.blocks.change_shipping_method_link_label"),w=h?n.translate("local_pickup.title"):n.translate("shipping.title");if(i&&!t)return e(_,{label:w,primaryContent:e(O,{})});const y=r||i?null:e(I,{href:"#shippingMethod",accessibilityLabel:A(),children:n.translate("review.blocks.change_link_label")}),b=v?e(kn,{summary:v}):void 0,C=v?e(fn,{summary:v}):void 0,L=e(_,{label:w,primaryAction:y,primaryContent:b??(h?e(re,{pickupLocationName:m}):e(oe,{})),secondaryContent:C??(h?e(ae,{address:d,pickupLocationName:m}):e(se,{}))}),T=e(f,{color:"subdued",children:n.translate("review.blocks.no_address")}),z=d?e(J,{maxInlineSize:"300px",children:e(re,{pickupLocationName:m})}):T,P=d?e(J,{maxInlineSize:"300px",children:e(ae,{address:d,pickupLocationName:m})}):void 0,B=e(I,{href:"#deliveryAddress",accessibilityLabel:n.translate("review.blocks.change_delivery_method_link_label"),children:n.translate("review.blocks.change_link_label")}),U=n.translate("review.blocks.pickup_items_at",{count:a.value.PICK_UP||0}),x=r||i?null:e(I,{href:"#shippingMethod",accessibilityLabel:n.translate("review.blocks.change_shipping_method_link_label"),children:n.translate("review.blocks.change_link_label")});return e(p,{when:l,fallback:L,children:[e(_,{label:U,primaryAction:B,primaryContent:z,secondaryContent:P}),e(p,{when:()=>a.value.SHIPPING,children:R=>e(ve,{reviewItemLabel:n.translate("review.blocks.ship_items_to",{count:R}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(_,{label:n.translate("shipping.title"),primaryAction:x,primaryContent:b??e(oe,{}),secondaryContent:C??e(se,{})})]})}function pe(){const{i18n:n}=k(),{acceptPaymentVaulting:s,paymentLines:t}=ee(),i=D("paymentLines"),o=D("shippingAddress"),a=Qe(),r=Me(),l=Fe(r.value),c=u(()=>!i.value&&t.value!=null&&!o.value),d=u(()=>{const g=t.value;return g?Ze(en(g,a.value)):[]}),m=u(()=>!!t.value?.some(g=>g.method.type==="direct")),h=u(()=>!t.value?.some(M=>M.method.type==="deferred")),v=u(()=>!!(s.value&&m.value)),A=n.translate("payment.title"),w=e(ke,{each:d,children:g=>e(Xe,{paymentLine:g,showCardBrandLabel:!0})}),y=c.value?e(I,{href:"#payment",accessibilityLabel:n.translate("review.blocks.change_payment_method_link_label"),children:e(f,{children:n.translate("review.blocks.change_link_label")})}):void 0,b=e(p,{when:c,fallback:e(O,{}),children:e(S,{gap:"small-400",children:w})});let C;return(h.value||v.value)&&(C=e(J,{padding:"small-500 none none none",children:e(p,{when:c,fallback:e(O,{}),children:e(S,{gap:"small-400",children:[e(p,{when:h,children:e(H,{children:l})}),e(p,{when:v,children:e(S,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(De,{type:"check",size:"small"}),e(H,{children:n.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(_,{id:"payment",label:A,primaryAction:y,primaryContent:b,secondaryContent:C})}const Un="#";function me(){const{i18n:n}=k(),s=N().purchaseOrderNumber,t=u(()=>s.value?.trim()?`${Un}${s.value}`:void 0),i=n.translate("review.blocks.no_purchase_order_number_long"),o=t.value,a=o?e(vn,{children:o}):void 0,r=o?void 0:e(H,{children:i}),l=e(I,{accessibilityLabel:n.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(f,{children:n.translate("review.blocks.change_link_label")})}),c=n.translate("review.blocks.purchase_order_number_title");return e(_,{id:"purchaseOrder",label:c,primaryAction:l,primaryContent:a,secondaryContent:r})}function Tt(){An({stage:Sn.Complete,id:"Review"});const{checkout:n,i18n:s,source:t}=k(),{progress:i}=Be(),o=Ce(()=>i("one-page-review-submit"),[i]),a=dn(o),r=nn("review.review_notice_html",s),l=N(),c=l.deliveryNext,d=l.paymentLines,m=tn(),h=D("total"),v=D("paymentLines"),A=n.proposal.facts.delivery??[],w=xe(),y=l.buyerIdentity,b=sn(),C=Pn(),g=he(),M=n.configuration.showContactInformation,L=Oe(),T=u(()=>on(c.value)||A.length>0&&A.every(E=>
1E.pickupAddress!==null)),z=u(()=>n.isShippingRequired.value&&!T.value),P=u(()=>y.value?.purchasingCompany?n.isShippingRequired.value&&!w.value:n.isShippingRequired.value),B=u(()=>!!(m.value&&m.value.amount>0)||d.value?.lines.some(E=>E.cost?.amount)),U=u(()=>!!(h.value||v.value||!m.value||B.value)),x=Te(),R=u(()=>y.value?.purchasingCompany?x.value:!0),V=an(t),G=rn(),$=ze({base:!0,medium:!1}),F=G.value?$??!1:!0,K=Ue("Checkout::Dynamic::Render","ORDER_SUMMARY4");return e(Ge,{onSubmit:a,children:e(j,{condition:!F,hideDivider:!0,children:[e(wn,{condition:F,children:[e(S,{gap:"small-400",children:[e(p,{when:()=>V,children:[e(Ee,{}),e(Y,{blockSize:"base"})]}),e(Cn,{}),e(p,{when:()=>r,children:e(H,{type:"small",color:"subdued",children:e(_n,{})})})]}),e(Y,{blockSize:"large-200"}),e(Hn,{children:e(En,{buyerIdentity:y,isOrderEditSession:V,showContactInformation:M,showPayment:U,showShippingAddress:z,showAddressReviewItemAction:R,showDeliveryMethod:P,isSplitShipAndPickup:g})})]}),e(p,{when:b,children:e(j,{condition:F,children:[e(le,{placement:"default"}),e(Y,{blockSize:"base"})]})}),e(j,{condition:F,hideDivider:!0,children:e(He,{section:"review",children:e(Ve,{section:"review",children:e(S,{gap:"base",children:[e(We,{}),e(S,{gap:"large-200",children:[e(p,{when:C,children:e(Ke,{})}),e(p,{when:b,children:e(le,{placement:"above-pay-button"})}),e(bn,{buttonHidden:L}),e(p,{when:()=>F,children:e(qe,{customizations:K,gap:"large-200"})})]})]})})})})]})})}function En({buyerIdentity:n,isOrderEditSession:s,showContactInformation:t,showPayment:i,showShippingAddress:o,showAddressReviewItemAction:a,showDeliveryMethod:r,isSplitShipAndPickup:l}){const c=u(()=>n.value?.purchasingCompany?.company?.name),d=u(()=>!!n.value?.purchasingCompany),m=u(()=>o.value&&!l.value),h=u(()=>o.value?void 0:n.value?.purchasingCompany);return e(q,{children:[t&&e(Tn,{companyName:c.value}),s?e(q,{children:[e(Ln,{}),e(p,{when:i,children:e(pe,{})}),e(p,{when:d,children:e(me,{})})]}):e(q,{children:[e(p,{when:m,children:e(ve,{showAdressReviewItemAction:a.value})}),e(p,{when:r,children:e(zn,{})}),e(p,{when:h,children:v=>e(On,{purchasingCompany:v})}),e(p,{when:i,children:e(pe,{})}),e(p,{when:d,children:e(me,{})})]})]})}function Hn({children:n}){const{i18n:s}=k(),t=ln(),i=s.translate("review.block_title"),o=e(yn,{accessibilityLabel:i,children:n});return e(p,{when:()=>!t.value,fallback:o,children:e($e,{children:o})})}export{Hn as ReviewItems,Tt as default};
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.