1import{u as e,S as a,k as i,T as n,w as r,H as t,q as s}from"./2c1ab0fe.Bywc2Brn.js";import{cB as l,j as o,G as c,L as d,di as p,el as u,S as m,eM as h,cv as v,f as b,eq as y,en as f,cx as g,b as _,eo as k,ep as w,a1 as C,l as j,v as A,er as N,ec as L,p as P,o as S,eN as I,d as R,af as x,ag as D,i as z,U as B,bd as F,ai as M,ao as E}from"./164ad2e3.DHuJhR22.js";import{c as O,b9 as q,dx as T,bL as U,cH as G,bv as H,dy as K,dz as $,ab as V,dT as J,aa as Q,aQ as Y,J as X,af as Z,ad as W,b8 as ee}from"./9dba8418.DInoCEzY.js";import{C as ae}from"./b3389d5c.QEUfL4f1.js";import{R as ie,P as ne}from"./e77f7fe0.Dq32v_oT.js";import{D as re,u as te}from"./0e9ee714.DkM8y9O3.js";import{c as se,u as le,a as oe,R as ce,b as de,D as pe,P as ue}from"./60575ca1.D-VPziNX.js";import{P as me}from"./fc21c11a.CFb6-Oxb.js";import{P as he}from"./e3e348f2.Bv52tyZZ.js";import{D as ve,u as be,a as ye,S as fe,R as ge,b as _e}from"./910cd6e2.BdN5ojLZ.js";import{a as ke,L as we,R as Ce}from"./03fde911.CFeWYByk.js";import{M as je,S as Ae,a as Ne}from"./dfca5da5.DZ8Enryg.js";import{S as Le}from"./79974aab.D9dodboU.js";import{MobileOrderSummary as Pe}from"./d2e6a587.JvgfpEXS.js";import{u as Se}from"./e129c76e.Bzz9ssIz.js";import{u as Ie,S as Re}from"./71ae3d5c.BGterdcv.js";import{h as xe,u as De}from"./17425706.Cliq-lrN.js";import{A as ze}from"./4b1c22b7.CaFHnwF0.js";import{d as Be}from"./24773686.BY4hRSf6.js";import{u as Fe}from"./160e80e7.BZQJTGJv.js";import{h as Me}from"./2bac2c53.gEGJwgcc.js";import{a as Ee}from"./22345fd4.DBXfVnfa.js";import"./d0bb51ec.DwFzQH6k.js";import"./app.D2wFhSFv.js";import"./f67abd2c.CxgiarJo.js";import"./60a453ce.CQQC7Spq.js";import"./e12db40c.DJw7xsqf.js";import"./598fef4e.TLWCeEj7.js";import"./39921a74.BpdG6bKT.js";import"./ccdf3592.BVTVJP2g.js";import"./71b60e0a.DfPLdYsH.js";import"./1f5e7811.Cs21gkYk.js";import"./ec391382.192yha1M.js";import"./347b440c.8UmgLgUR.js";import"./9ce08e25.DbZR-P3G.js";import"./7a8217fd.BZYlxizD.js";import"./8599b02a.83fij-dk.js";import"./e477f96c.Bzke7wRl.js";import"./1ed8f5e3.CzhdrJHY.js";import"./7ee73f43.CcAyAXKM.js";import"./cb5cf153.DLvw34Ln.js";import"./cb38e5c2.BxvsOkWl.js";import"./0c0ad074.DhgxlD4t.js";import"./bf513f9c.BCCOkGM7.js";import"./87bfafec.CxwEzGHg.js";import"./434e3b0a.B1BBnK_d.js";import"./55098bf1.DKOH2TGl.js";import"./181d38d3.CXIvj6V1.js";import"./792bb671.B3OvVnSg.js";import"./dae24aab.DshQXsWO.js";import"./2495faa4.Tu9qVTlu.js";import"./7b0c98ea.BDiOkxId.js";import"./945a08d6.tCcESvAp.js";import"./78ab3dd0.DKtM_PR5.js";import"./d4ea2faa.XFt6zT8f.js";import"./fe885b80.jONiPULW.js";import"./f78726c8.B_6HchCq.js";function Oe(){const{checkout:i}=O(),n=i.negotiator.parts.shippingAddress.value,{value:r}=i.negotiator.current.fields.deliveryNext,t=i.proposal.facts.delivery??[],s=t[0],l=i.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;if(!(t.length&&s?.lines?.length||i.isShippingRequired.value))return null;if(!s)return null;if(s.pickupAddress)return e(Ue,{address:s.pickupAddress??void 0,locationName:s.pickupAddressName});const o="unavailable"===r?.status?n:s.deliveryAddress,c=r&&"unavailable"!==r.status?r.lines.find(e=>"SUBSCRIPTION"!==e.type&&"available"===e.status&&!e.methods.some(({methodType:e})=>"PICK_UP"===e)):void 0;return e(a,{children:[e(Te,{shippingAddress:o??void 0,companyLocationName:l?.location.name}),e(qe,{lines:s.lines,secondaryDeliveryLine:c})]})}function qe({lines:a,secondaryDeliveryLine:i}){const{i18n:n,source:r}=O(),t=a.filter(({deliveryChange:e,isFulfilled:a})=>"REMOVED"!==e&&!a).map(a=>e(re,{line:a},a.title));return t.length?e(ie,{id:"shipping",label:n.translate("shipping.title"),primaryContent:t,secondaryContent:"paymentCollection"!==r.type&&i?e(se,{line:i}):void 0}):null}function Te({shippingAddress:a,companyLocationName:i}){const{i18n:n}=O(),r=l(a,{countryFormat:"explicit",displayName:Boolean(i)}),t=n.formatName(a?.firstName,a?.lastName,!0)||a?.firstName||a?.lastName,s=n.translate("review.blocks.no_address"),{primaryContent:d,secondaryContent:p}=i?{primaryContent:i,secondaryContent:a?r:s}:{primaryContent:a?t:s,secondaryContent:a?r:void 0},u=d?e(o,{children:d}):void 0;let m;return a&&null==r?m=e(c,{}):a&&p?m=e(o,{type:"address",children:p}):p&&(m=e(o,{children:p})),e(ie,{id:"address",label:n.translate("review.blocks.shipping_address_title"),primaryContent:u,secondaryContent:m})}function Ue({address:a,locationName:i}){const{i18n:n}=O(),r=l(a,{hiddenFields:["postalCode","countryCode","phone"]});return i&&r?e(ie,{id:"delivery",label:n.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:i}),primaryContent:e(o,{children:r})}):null}function Ge({accessibilityLabel:a,children:i,href:n}){const{checkout:{identity:r}}=O(),{onClick:t}=Be(),s=function({href:e,identity:a,amazonPayCheckoutAsGuest:i}){return"#contact"!==e||"amazonPay"!==a.current.value?void 0:()=>i?.()}({href:n,identity:r,amazonPayCheckoutAsGuest:t});return e(d,{href:n?`/${n}`:"/",onClick:s,accessibilityLabel:a,children:i})}const He=["firstName","lastName"];function Ke({showAdressReviewItemAction:a=!0,reviewItemLabel:n,addressPresenterProps:r}){const{i18n:t,checkout:s}=O(),o=s.negotiator.current.fields.deliveryNext,d=s.proposal.facts.delivery??[],m=s.negotiator.current.fields.shippingAddress,h=q("shippingAddress"),v=i(()=>d.length>0?d[0].deliveryAddress:m.value),b=i(()=>T(o.value)),{shippingAddress:y,billingAddress:f}=s.negotiator.parts,g=i(()=>"unavailable"===o.value?.status?y.value:v.value),{selectedPickupPoint:_}=Fe(),k=i(()=>!s.isShippingRequired.value),w=i(()=>k.value?f.value:g.value),C=p(),j=s.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,A=j?.location,N=u(),L=le({address:w}).value,P=w.value,S=L??{hiddenFields:["phone"],multiline:!1,...r},I=function({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...He])]}}(S),R=Boolean(A&&(null==P||U(P)||!N.value)),x=l(_?.pickupLocation.address,{hiddenFields:["countryCode"]}),D=k.value?t.translate("review.blocks.billing_address_title"):t.translate("review.blocks.shipping_address_title"),z=k.value?t.translate("review.blocks.change_billing_address_link_label"):t.translate("review.blocks.change_shipping_address_link_label"),B=e(Ge,{href:"#deliveryAddress",accessibilityLabel:z,children:t.translate("review.blocks.change_link_label")}),F=t.translate("review.blocks.no_address"),M=t.translate("pickup_point.title").toLowerCase(),E=C?.taxId.value;let G=R?A?.name:(()=>
1{if(null==P||U(P)||R)return;const e=S.hiddenFields??[],a=e.includes("firstName")?void 0:P.firstName,i=e.includes("lastName")?void 0:P.lastName;return t.formatName(a,i,!0)||a||i})(),H=e($e,{address:P,hasCompanyLocation:Boolean(A),noAddressLabel:F,secondaryAddressPresentationProps:I,vatNumber:E});return h.value?(G=e(c,{}),H=void 0):b.value&&(G=_?.pickupLocation.name,H=e(Ve,{formattedAddress:x,pickupPoint:_,pickupPointLabel:M})),e(ie,{label:n||D,primaryAction:a?B:void 0,primaryContent:G,secondaryContent:H})}function $e({address:a,hasCompanyLocation:i,noAddressLabel:n,secondaryAddressPresentationProps:r,vatNumber:t}){return null==a||U(a)?e(m,{children:[e(o,{color:"subdued",children:n}),t&&e(ve,{vatNumber:t})]}):e(m,i?{children:e(ze,{...r,address:a})}:{children:[e(ze,{...r,address:a}),t&&e(ve,{vatNumber:t})]})}function Ve({formattedAddress:a,pickupPoint:i,pickupPointLabel:n}){if(!i)return null;const r=`${i.pickupLocation.carrierName} ${n}`;return e(m,{children:[a?e(o,{type:"address",children:a}):null,e(o,{color:"subdued",size:"small",children:r})]})}function Je({purchasingCompany:a}){const{i18n:i}=O(),{secondary:n}=h({address:a.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:a.location.name});if(!Me(a))return null;const r=i.translate("review.blocks.company_location"),t=e(Ge,{href:"#billingAddress",accessibilityLabel:i.translate("review.blocks.change_company_location_link_label"),children:i.translate("review.blocks.change_link_label")}),s=a.location.shippingAddress?n:i.translate("review.blocks.no_address"),l=e(o,{children:a.location.name});return e(ie,{label:r,primaryAction:t,primaryContent:l,secondaryContent:e(o,{children:s})})}function Qe({companyName:a}){const{i18n:i,checkout:n}=O(),{value:r}=n.negotiator.current.fields.contactInfo,t=q("contactInfo").value,s=n.proposal.facts.contactMethod,{geolocation:l}=v(),d=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany;oe(t);const{email:p,phone:u}=r??{},{email:m,phoneNumber:h}=s??{},{formattedNumber:y}=Ee(l.country.code,h??void 0),{formattedNumber:f}=Ee(l.country.code,u),g=t&&null==(p??u),_=m||y||p||f,k=i.translate("customer_account.rollup_label");if(!_&&!t)return null;const w=a?k:i.translate("review.blocks.contact_method_title"),C=d?e(ce,{contactInfo:_}):e(b,{lineClamp:1,children:e(o,{dir:"ltr",children:_})}),j=g?e(c,{}):C,A=g||d?void 0:e(Ge,{href:"#contact",accessibilityLabel:i.translate("review.blocks.change_contact_method_link_label"),children:i.translate("review.blocks.change_link_label")});return e(ie,{id:"contact",label:w,primaryAction:A,primaryContent:j})}function Ye(){const{i18n:a,checkout:{negotiator:i}}=O(),{value:t}=i.current.fields.deliveryNext,s=q("deliveryNext").value,l=n(()=>G(t),[t]),d=y(),p=f().value,u=g(),m=n(()=>{if(t&&"unavailable"!==t.status)return l?.find(({methodType:e})=>"PICK_UP"===e)?.pickupLocation},[t,l]),h=m?.address,v=m?.name,b=Boolean(l?.some(({methodType:e})=>"PICK_UP"===e)),k=be({deliveryLines:s||"filled"!==t?.status?void 0:t.lines}),w=b?a.translate("local_pickup.title"):a.translate("shipping.title");if(s&&!t)return e(ie,{label:w,primaryContent:e(c,{})});const C=p||s?null:e(Ge,{href:"#shippingMethod",accessibilityLabel:b?a.translate("review.blocks.change_delivery_method_link_label"):a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")}),j=k?e(fe,{summary:k}):void 0,A=k?e(ye,{summary:k}):void 0,N=e(ie,{label:w,primaryAction:C,primaryContent:j??(b?e(we,{pickupLocationName:v}):e(pe,{})),secondaryContent:A??(b?e(ke,{address:h,pickupLocationName:v}):e(de,{}))}),L=e(o,{color:"subdued",children:a.translate("review.blocks.no_address")}),P=h?e(_,{maxInlineSize:"300px",children:e(we,{pickupLocationName:v})}):L,S=h?e(_,{maxInlineSize:"300px",children:e(ke,{address:h,pickupLocationName:v})}):void 0,I=e(Ge,{href:"#deliveryAddress",accessibilityLabel:a.translate("review.blocks.change_delivery_method_link_label"),children:a.translate("review.blocks.change_link_label")}),R=a.translate("review.blocks.pickup_items_at",{count:d.value.PICK_UP||0}),x=p||s?null:e(Ge,{href:"#shippingMethod",accessibilityLabel:a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")});return e(r,{when:u,fallback:N,children:[e(ie,{label:R,primaryAction:I,primaryContent:P,secondaryContent:S}),e(r,{when:()=>d.value.SHIPPING,children:i=>e(Ke,{reviewItemLabel:a.translate("review.blocks.ship_items_to",{count:i}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(ie,{label:a.translate("shipping.title"),primaryAction:x,primaryContent:j??e(pe,{}),secondaryContent:A??e(de,{})})]})}function Xe(){const{i18n:a,checkout:{negotiator:n}}=O(),{acceptPaymentVaulting:s,paymentLines:l}=n.parts,d=q("paymentLines"),p=q("shippingAddress"),u=H(),h=k(),v=w(h.value),y=i(()=>!d.value&&null!=l.value&&!p.value),f=i(()=>{const e=l.value;return e?K($(e,u.value)):[]}),g=i(()=>Boolean(l.value?.some(e=>"direct"===e.method.type))),j=i(()=>{const e=l.value?.some(e=>"deferred"===e.method.type);return!e}),A=i(()=>Boolean(s.value&&g.value)),N=a.translate("payment.title"),L=e(t,{each:f,children:a=>e(ne,{paymentLine:a,showCardBrandLabel:!0})}),P=y.value?e(Ge,{href:"#payment",accessibilityLabel:a.translate("review.blocks.change_payment_method_link_label"),children:e(o,{children:a.translate("review.blocks.change_link_label")})}):void 0,S=e(r,{when:y,fallback:e(c,{}),children:e(m,{gap:"small-400",children:L})});let I;return(j.value||A.value)&&(I=e(_,{padding:"small-500 none none none",children:e(r,{when:y,fallback:e(c,{}),children:e(m,{gap:"small-400",children:[e(r,{when:j,children:e(b,{children:v})}),e(r,{when:A,children:e(m,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(C,{type:"check",size:"small"}
1),e(b,{children:a.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(ie,{id:"payment",label:N,primaryAction:P,primaryContent:S,secondaryContent:I})}function Ze(){const{i18n:a,checkout:{negotiator:n}}=O(),r=n.current.fields.purchaseOrderNumber,t=i(()=>r.value?.trim()?`#${r.value}`:void 0),s=a.translate("review.blocks.no_purchase_order_number_long"),l=t.value,c=l?e(ue,{children:l}):void 0,d=l?void 0:e(b,{children:s}),p=e(Ge,{accessibilityLabel:a.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(o,{children:a.translate("review.blocks.change_link_label")})}),u=a.translate("review.blocks.purchase_order_number_title");return e(ie,{id:"purchaseOrder",label:u,primaryAction:p,primaryContent:c,secondaryContent:d})}function We(){Ie({stage:Re.Complete,id:"Review"});const{checkout:a,i18n:n,shop:t,source:l}=O(),o=t.hasFlagEnabled(V),c=a.configuration.visibility.showAside,{main:{spacing:d}}=j(),{progress:p}=A(),u=s(()=>p("one-page-review-submit"),[p]),h=te(u),v=xe("review.review_notice_html",n),y=a.negotiator.current.fields.deliveryNext,f=a.negotiator.current.fields.paymentLines,_=J(),k=q("total"),w=q("paymentLines"),C=a.proposal.facts.delivery??[],E=N(),T=a.negotiator.current.fields.buyerIdentity,U=Q(),G=Se(),H=g(),K=a.configuration.showContactInformation,$=L(),ee=i(()=>Y(y.value)||C.length>0&&C.every(e=>null!==e.pickupAddress)),ie=i(()=>a.isShippingRequired.value&&!ee.value),ne=i(()=>T.value?.purchasingCompany?a.isShippingRequired.value&&!E.value:a.isShippingRequired.value),re=i(()=>Boolean(_.value&&_.value.amount>0)||f.value?.lines.some(e=>e.cost?.amount)),se=i(()=>Boolean(k.value||w.value||!_.value||re.value)),le=De(),oe=i(()=>!T.value?.purchasingCompany||le.value),ce=X(l),de=Z(),pe=P({base:!0,medium:!1}),ue=!de.value||(pe??!1),ve=S("Checkout::Dynamic::Render","ORDER_SUMMARY4"),be=e(Ne,{condition:!ue&&!o,hideDivider:!0,children:[e(je,{condition:ue&&!o,hideDivider:!!o||void 0,children:[e(m,{gap:"small-400",children:[e(r,{when:()=>ce,children:[e(I,{}),e(R,{blockSize:"base"})]}),e(ge,{}),e(r,{when:()=>v,children:e(b,{type:"small",color:"subdued",children:e(_e,{})})})]}),e(R,{blockSize:"large-200"}),e(aa,{renderAsCard:o,children:e(ea,{buyerIdentity:T,isOrderEditSession:ce,showContactInformation:K,showPayment:se,showShippingAddress:ie,showAddressReviewItemAction:oe,showDeliveryMethod:ne,isSplitShipAndPickup:H})})]}),o&&e(Ae,{spacing:ue?W(d):"large-400"}),e(r,{when:U,children:e(Ne,{condition:ue&&!o,children:[e(he,{placement:"default"}),e(R,{blockSize:"base"})]})}),e(Ne,{condition:ue&&!o,hideDivider:!0,children:e(x,{section:"review",children:e(D,{section:"review",children:e(m,{gap:"base",children:[o?e(Le,{target:"card",children:e(z,{accessibilityRole:"presentation",display:c?"@media (inline-size >= medium) none, auto":void 0,children:e(Pe,{})})}):e(Pe,{}),e(m,{gap:"large-200",children:[e(r,{when:G,children:e(ae,{})}),e(r,{when:U,children:e(he,{placement:"above-pay-button"})}),e(me,{buttonHidden:$}),e(r,{when:()=>ue,children:e(B,{customizations:ve,gap:"large-200"})})]})]})})})})]});return e(M,{onSubmit:h,children:o?e(F,{children:e(z,{accessibilityRole:"presentation",containerName:"s-shell-section",children:be})}):be})}function ea({buyerIdentity:n,isOrderEditSession:t,showContactInformation:s,showPayment:l,showShippingAddress:o,showAddressReviewItemAction:c,showDeliveryMethod:d,isSplitShipAndPickup:p}){const u=i(()=>n.value?.purchasingCompany?.company?.name),m=i(()=>Boolean(n.value?.purchasingCompany)),h=i(()=>o.value&&!p.value),v=i(()=>o.value?void 0:n.value?.purchasingCompany);return e(a,{children:[s&&e(Qe,{companyName:u.value}),e(a,t?{children:[e(Oe,{}),e(r,{when:l,children:e(Xe,{})}),e(r,{when:m,children:e(Ze,{})})]}:{children:[e(r,{when:h,children:e(Ke,{showAdressReviewItemAction:c.value})}),e(r,{when:d,children:e(Ye,{})}),e(r,{when:v,children:a=>e(Je,{purchasingCompany:a})}),e(r,{when:l,children:e(Xe,{})}),e(r,{when:m,children:e(Ze,{})})]})]})}function aa({children:a,renderAsCard:i=!1}){const{i18n:n}=O(),t=ee(),s=n.translate("review.block_title"),l=e(Ce,{accessibilityLabel:s,renderAsCard:i,children:a}),o=e(r,{when:()=>!t.value,fallback:l,children:e(E,{children:l})});return i?e(Le,{target:"edgeToEdgeCard",children:o}):o}export{aa as ReviewItems,We 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.