PageSourceSearch

https://us.usm.com/cdn/shopifycloud/checkout-web/assets/c1/shipping-methods-grouping.S_i1LuzE.js

js usm.com collected 2026-09-24 17:42:00 UTC 2,642 bytes, 1 lines download raw bytes

1import{T as f,q as b}from"./esnext-vendor.BBoIVOQW.js";import{T as h,I as y,D as L,bK as g,as as v}from"./addresses-is-address-empty.ZJ1ThpFy.js";import{c as E,D as d,b as S}from"./amazon-pay-useAmazonPayPaymentLine.CMgi35Fb.js";import{bo as P}from"./hydrate.Tsur0pib.js";function w(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return{get promise(){return n},resolve(r){e(r)},reject(r){t(r)}}}let l=null,c=null;function B({observability:e,url:t}){if(c)return c;const n=t.sandboxAutocomplete(),r={current:null},{promise:o,resolve:s}=w();if(c=o,!l){const i=a=>async u=>{e.leaveErrorBreadcrumb("Autocomplete iframe loaded",{url:n,event:JSON.stringify(u),time:Date.now(),specialId:a?.getAttribute(d)}),r.current=S(a,n,"autocomplete",e,{}),s(r)};l=E({id:"Autocomplete-IFrame",name:"Autocomplete-IFrame",url:n,privileges:["allow-scripts","allow-same-origin"],iframeSpecialId:L(),onLoad:i}),e.leaveErrorBreadcrumb("Autocomplete iframe created",{url:n,specialId:l.getAttribute(d)})}return c}function I(){const{observability:e,url:t}=h();return b(()=>B({observability:e,url:t}),[e,t])}function _(){const{shop:{id:e},source:{sourceId:t,checkoutSessionIdentifier:n}}=h(),r=I();return f(()=>{function o(){return{shopId:y(e),sourceId:t||"",checkoutSessionIdentifier:n||""}}return{async search(...s){return(await r()).current.call.search(...s)},async fetchAddress(...s){return(await r()).current.call.fetchAddress(...s)},async formatAddress(s){return(await r()).current.call.formatAddress(s,o())},async fetchCountriesWithPhoneNumberPrefix(s){return(await r()).current.call.fetchCountriesWithPhoneNumberPrefix(s,o())}}},[r,e,t,n])}function x(){const e=I();return f(()=>({async validation(...t){return(await e()).current.call.validation(...t)}}),[e])}function N(e){if(!e)return!1;const{methods:[t]}=e;return t?.brandedPromise?.handle===v.BuyWithPrime}function A(e){const t=[],n=[],r=new Map;return e.forEach(o=>{const{availableOn:s}=o;if(s===g)n.push(o);else if(!s||s===P)t.push(o);else{const[i,a,u]=s.split("-"),m=new Date(Date.UTC(Number(i),Number(a)-1,Number(u))).toISOString(),p=r.get(m)??[];p.push(o),r.set(m,p)}}),{shipsNowItems:t,shipsLaterItems:n,shipsByDateItems:Array.from(r.entries()).sort(([o],[s])=>o.localeCompare(s))}}function R(e){const t=[],n=[],r=[];e.forEach(i=>{N(i)?t.push(i):i.type==="SUBSCRIPTION"?n.push(i):i.availableOn!==void 0&&r.push(i)});const{shipsNowItems:o,shipsLaterItems:s}=A(r);return{buyWithPrimeLines:t,subscriptionLines:n,shipsNowLines:o,shipsLaterLines:s}}function W(e){const{shipsByDateItems:t}=A(e.filter(({type:n})=>n!=="SUBSCRIPTION"));return t.length?t:void 0}export{R as a,W as b,A as c,x as d,B as g,_ 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.