PageSourceSearch

https://store.carrieunderwood.fm/cdn/shopifycloud/checkout-web/ass…ated-findSelectedDeliveryMethod.DhxHslog.js

js carrieunderwood.fm collected 2026-09-24 22:54:50 UTC 2,824 bytes, 1 lines download raw bytes

1import{ku as F,p as v,bD as l,eJ as x,W as E,fy as b,as as G,T as B,ag as Q}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{f as S,q as W}from"./esnext-vendor.BBoIVOQW.js";import{e_ as k,i7 as z}from"./hydrate.Tsur0pib.js";function R({address1:e="",address2:t,city:n="",company:i,countryCode:a,firstName:o,lastName:r="",postalCode:s,zoneCode:d,phone:f="",oneTimeUse:p=!1,coordinates:u,district:m,line2:h,streetName:y,streetNumber:P,subdistrict:g},A){const{extendedFields:L,...C}=F({address1:e,address2:t,countryCode:a,fields:{district:m,line2:h,streetName:y,streetNumber:P,subdistrict:g},extendedAddressMode:A?.extendedAddressMode});return{...C,city:n??"",countryCode:a||"ZZ",postalCode:s,company:i,firstName:o,lastName:r,zoneCode:d,phone:f,oneTimeUse:p,coordinates:u?c(u):void 0,extendedFields:L}}function q({handle:e=""}){return{handle:e}}function c(e){return{latitude:e.latitude,longitude:e.longitude}}function H(e,t,n,i,a=!1){const o=v(e),r=e?.[0]?.method?.type==="deferred"&&n==="custom"&&!a;if(!o&&r)return null;const s=!!t.address1;return o||s?{streetAddress:l(t,i)}:null}function T(e,t){return e.coordinates?{geolocation:{coordinates:c(e.coordinates),countryCode:x(e.countryCode),zoneCode:e.zoneCode,postalCode:e.postalCode}}:{streetAddress:l(e,t)}}function _({deliveryMethodHandle:e,deliveryMethodOptions:t,isCustomRate:n,isPointOfSale:i,retailLocationId:a,isPointOfSaleShipToHome:o,customDeliveryStrategy:r}={}){return i&&a&&!o?{deliveryStrategyMatchingConditions:{shipments:{any:!0}},options:t,originLocationId:a,autoFulfill:!0}:e?{deliveryStrategyByHandle:{handle:e,customDeliveryRate:n??!1},options:t}:r?{customDeliveryStrategy:{title:r.title,price:{value:r.price},code:r.code,source:r.source},options:t}:{deliveryStrategyMatchingConditions:{estimatedTimeInTransit:{any:!0},shipments:{any:!0}},options:t}}function w(e){return e.some(t=>t.deliveryPredictionEligible)}function Z({selectedMethods:e,deliveryExpectationLines:t,deliveryPromiseText:n}){const i=new Map;for(const s of t){const{deliveryStrategyHandle:d}=s;d&&i.set(d,s)}const o=e.flatMap(s=>{if(!s.deliveryPredictionEligible)return[];const d=i.get(s.handle);return d?.brandedPromise?.handle==="shop_promise"?[d]:[]})[0];if(!o)return;const r=o.brandedPromise;if(r&&n)return{brandedPromise:r,deliveryPromiseText:n}}function J(){const e=E().paymentLines;return S(()=>{const[t]=b(e.value,[G.BuyWithPrime]);return t})}function N(){const e=B().checkout.latestReceipt.value?.id,{persistedAmazonSignal:t}=Q(),n=W(()=>{k(t,{receiptIdForAupError:e,receiptIdForPaymentDecline:e})},[t,e]);return z({shouldResetCustomerInfo:!0,onClick:n})}function j(e){for(const t of e)if(t.status!=="not_required"){for(const n of t.methods)if(n.handle===t.selectedDeliveryMethodHandle)return n}}export{q as a,J as b,T as c,R as d,H as e,j as f,Z as g,w as h,_ as s,N 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.