1import{l as e,t,z as n,u as i,m as r}from"./2c1ab0fe.GMbxnz74.js";import{T as o,bG as a,aK as s,aF as l,n as u,S as d}from"./4c290a1e.C6TDJ9Fn.js";import{w as c,ak as m,e as h,v as p,o as f,J as v,a4 as b,B as g,br as y,bz as x,b as S,a5 as I,bl as z}from"./164ad2e3.BbIvMjRY.js";import{u as w,E as C,S as T}from"./347b440c.C7wvTwkm.js";function M({targeted:e,hasMultipleDeliveryGroups:i,shouldHandleRollup:r}){const o=n(c("Checkout::ShippingMethods::RenderBefore")),a=n(c("Checkout::ShippingMethods::RenderAfter")),s=n(i);return t(()=>{const t=e===s.value,n=P(o.value,t,e),i=P(a.value,t,e);return r?t?{customizationsBefore:n,customizationsAfter:i,customizationsForRollupReveal:[...n,...i]}:{customizationsBefore:n,customizationsAfter:i,customizationsForRollupReveal:e?[]:[...k(o.value),...k(a.value)]}:{customizationsBefore:n,customizationsAfter:i}})}function P(e,t,n){return t?n?k(e):e:[]}function k(e){return e.filter(e=>"uiExtension"!==e.kind||function(e){switch(e){case"2023-04":case"2023-07":case"2023-10":return!1;default:return!0}}(e.extension.apiVersion))}function G(){const{deliveryNext:n}=o(),i=e(void 0);return t(()=>function(e,t){if(Boolean(a(e)))return t.current=void 0,{hasMultipleDeliveryGroups:!0,onlyDeliveryGroupType:void 0};const n=("filled"===e?.status?e.lines:[]).filter(e=>"not_required"!==e.status&&!e.hasNoDeliveryMethods),i=n[0]?.type,r=n.length>1,o=r||!i?void 0:i;return void 0!==o?t.current=o:r&&(t.current=void 0),{hasMultipleDeliveryGroups:r,onlyDeliveryGroupType:o??t.current}}(n.value,i))}function R({merchandiseItem:e,hideBadge:t,size:n="small"}){if(null==e)return null;const{title:r,quantity:o,image:a}=e,s=1!==o?o:void 0;return i(m,{size:n,alt:a?.altText||r,src:a?.one,srcSet:a?`${a.one} 1x, ${a.two} 2x, ${a.four} 4x`:void 0,totalItems:t?void 0:s})}const B={showShipmentBreakdown:!1};function A(e){return!(!e||"not_required"===e.status)&&e.methods.some(({methodType:e})=>"LOCAL"===e)}function D(e){return"SHIPPING"!==e?.methodType&&"PICKUP_POINT"!==e?.methodType?[]:e.priceBreakdown??[]}function L(){const e=o().deliveryNext,n=h();return t(()=>{const t=e.value;if(!t||"filled"!==t.status)return B;const i=t.splitShippingToggle;if(!i)return B;const r=s(t).filter(e=>l(e)&&!(p(n.value.currentDetour)&&"SUBSCRIPTION"===e.type)),o=r[0];if(A(o))return B;const d=u(o),c=D(d),m=c[0]?.flatRateGroupId;return!a(t)&&m&&c.every(({flatRateGroupId:e})=>e===m)||1===r.length?!d||c.length<=1?B:{showShipmentBreakdown:i,selectedDeliveryMethod:d}:B})}function F(){const e=o().deliveryNext;return t(()=>{const t=e.value;return!(!t||"filled"!==t.status)&&(!!t.splitShippingToggle&&t.lines.filter(e=>!A(e)).map(u).filter(e=>void 0!==e).some(e=>D(e).length>1))})}function E({deliveryExpectationLine:t,deliveryMethod:n,children:i}){const{observability:o}=d(),a=e(!1);return r(()=>{if(a.current)return;const e=n.brandedPromise?.handle??t?.brandedPromise?.handle??"unbranded";a.current=!0,o.counter({name:"PostPurchase_page_delivery_prediction_rendered",value:1,attributes:{handle:e}})},[t?.brandedPromise?.handle,n.brandedPromise?.handle,o]),i}function N({deliveryMethod:e,subtitle:t,isInModal:n=!1,choiceListContext:r=!0,useBaseFontSize:o,showSubtitleFallback:a=!0}){const{deliveryExpectationLines:s}=w(),l=s?.find(t=>t.deliveryStrategyHandle===e.handle),u=n||o?void 0:"small";return t?i(f,{size:u,color:"subdued",children:t}):a?i(E,{deliveryExpectationLine:l,deliveryMethod:e,children:i(C,{deliveryMethod:e,deliveryExpectationLine:l,size:u,choiceListContext:r&&!n,paragraphColor:"subdued"})}):null}function _({merchandiseItem:{title:e}}){return i(f,{children:e})}function j({merchandiseItem:{subtitle:e},textDefaultProps:t}){return e?i(f,{...t,children:e}):null}function H({merchandiseItem:e,thumbnailSize:t,thumbnailContentGap:n}){const{lineItems:{optionsColor:r="subdued"}}=b(),o={size:"small",color:r};return i(v,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:n,children:[i(R,{merchandiseItem:e,size:t}),i(g,{blockAlignment:"center",children:[i(_,{merchandiseItem:e}),i(j,{merchandiseItem:e,textDefaultProps:o})]})]})}function O({merchandise:e,thumbnailSize:t="small",merchandiseItemGap:n="small-200",merchandiseItemPadding:r="none",thumbnailContentGap:o="small-200"}){return i(v,{gridAutoRows:"minmax(auto, max-content)",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(auto, max-content)",gap:n,padding:r,children:e.map(e=>i(H,{merchandiseItem:e,thumbnailSize:t,thumbnailContentGap:o},e.stableId))})}function q({id:e,merchandiseLines:t=[],deliveryMethod:n,modalHeader:r,subtitle:o,showSubtitleFallback:a,choiceListContext:s=!0,showPrice:l,open:u}){const d=n.included?i(y,{strong:!s}
1):i(T,{cost:n.cost,costAfterDiscounts:n.costAfterDiscounts,styleOverrides:{shouldBold:!s,freeTextLetterCase:"uppercase",costSpacing:"none"}});return i(x,{heading:r,id:e,open:u,children:[i(O,{merchandise:t,thumbnailSize:"base",merchandiseItemGap:"base",merchandiseItemPadding:"small-100 none none none"}),i(S,{blockSize:"large-200"}),i(I,{}),i(S,{blockSize:"base"}),i(v,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",children:[i(g,{blockAlignment:"start",children:[i(f,{children:z({deliveryMethod:n})}),i(N,{subtitle:o,showSubtitleFallback:a,deliveryMethod:n,choiceListContext:s,isInModal:!0})]}),l?d:null]}),i(S,{blockSize:"large-200"})]})}export{O as E,R as M,N as S,q as a,L as b,G as c,F as d,D as g,M as u};
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.