1import{q as e,u as i,g as a,z as t,o as s,h as n,k as r,_ as l,w as o,t as c,L as d,p,S as u}from"./2c1ab0fe.Bf8FS-kA.js";import{L as h,c7 as m,c8 as g,c9 as v,ca as f,x as b,v as y,m as _,cb as j,o as k,bx as w,ai as S,af as x,ag as D,U as L,i as P,S as A,H as z,cc as I,f as M,ao as N,a1 as C,j as E,cd as G,aS as B}from"./164ad2e3.D0nOfU9-.js";import{T as R}from"./7b0c98ea.DPccnftV.js";import{u as T,S as F,D as O}from"./d6447d9e.D6Lfu7sN.js";import{b as V,d as $,c as q,P as U,a as Y}from"./0a30a815.CReyh2E5.js";import{S as H}from"./f51e663e.D2xOVNHx.js";import{c as W,aP as X,b9 as J,aq as K,bL as Q,v as Z,bl as ee}from"./4b4bc88f.DcJe9bVW.js";import{P as ie}from"./f49d4216.Ce3hB4jL.js";import{a as ae,b as te,E as se}from"./a422df8c.C_n6Vcf8.js";import{T as ne}from"./7e8cd205.Cr9qtWiV.js";import{B as re}from"./0627daf2.C9dykehD.js";import{b as le,c as oe,u as ce}from"./64de7b49.CoyEsjAj.js";import{u as de}from"./9f047e05.CskjbG7J.js";import{u as pe,S as ue}from"./71ae3d5c.BGylAywU.js";import{h as he}from"./17425706.BvRhKi49.js";import"./d0bb51ec.CL_3Kdjr.js";import"./app.C_ntWzAC.js";import"./f67abd2c.CMIDVCe_.js";import"./60a453ce.0K3_0kXS.js";import"./e12db40c.B4InVJ1F.js";import"./9dba8418.CZTcH8_l.js";import"./efa0389a.WJQGJ9HI.js";import"./22345fd4.v5I5uNqg.js";import"./8e79be58.BLmAAEWw.js";import"./3ca8ef7e.C6XOR-ST.js";import"./347b440c.SeAcXxcL.js";import"./9ce08e25.SbAKfAes.js";import"./47b970b2.Dc6LZ4kt.js";import"./a9fa9fda.ChMkqhXw.js";import"./ca3e798e.Dc6mNaNz.js";import"./90e26f5f.C4W9k3qI.js";import"./31cc568e.95lmLO5k.js";import"./4b1c22b7.BASQngy4.js";import"./5fda1420.5IhuB_38.js";const me="/cdn/shopifycloud/checkout-web/assets/c1/assets/shipping.CG9i_A4v.svg",ge=()=>{const{i18n:e,checkout:a}=W(),t=a.configuration.layout.isOnePage.value,s=i(h,{href:"/information",children:e.translate("shipping.shipping_information_redirect_link")});return i(se,{children:[!t&&i(ae,{children:i("img",{src:me,alt:""})}),i(te,{children:e.translate("shipping.shipping_information_required_notice",{link:s})})]})},ve=()=>{const{i18n:e,checkout:a}=W(),t=a.configuration.layout.isOnePage.value;return i(se,{children:[!t&&i(ae,{children:i("img",{src:me,alt:""})}),i(te,{children:e.translate("shipping_errors.shipping_method_not_available_generic.one")})]})};function fe(){const{i18n:p,checkout:{negotiator:u}}=W(),h=m(),{allViolations:v,deliveryNext:f}=u.current.fields,b=J("deliveryNext"),y=function(){const{userEvents:i}=W(),a=X();return e((e,t,s)=>{const n={schemaId:"checkout_display_shipping_methods/1.0",payload:{eventTimestamp:t,shopId:a.value.defaultAttributes?.shopId||1,apiClientId:s,promiseRetrievalTime:e}};i.monorailEvent(n)},[i,a.value.defaultAttributes?.shopId])}(),_=a(b.peek()),[,j]=t(),k=a(void 0),w=s(!1),{shippingAddress:S}=u.parts,x=T(j),D=g();n(()=>{w.value=!0},[w]);const L=r(()=>{const e=h.value.shippableDeliveryLines;return e?K(e):[]});l(()=>c(()=>
1{if(b.value)return void(k.current??=Date.now());_.current=!1;const e=k.current;if(null==e)return;const i=Date.now(),a=i-e,t=L.peek()[0]?.methods[0]?.deliveryPromiseProviderApiClientId;if(k.current=void 0,!t)return;const s=Z(t);d(()=>{y(a,i,Number(s)),D(a,Number(s))})}),[b,D,L,y]);const P=r(()=>v.value?.some(e=>"target"in e&&e.target.startsWith("$.cart.deliveryGroups[0].deliveryAddress"))),A=r(()=>function({deliveryLoading:e,showLoading:i,hasMounted:a,hasFilledShippingMethods:t}){return e&&i&&(a||!t)}({deliveryLoading:b.value,showLoading:_.current,hasMounted:w.value,hasFilledShippingMethods:"filled"===f.value?.status&&L.value.length>0}));return i(o,{when:()=>!A.value,fallback:i(ie,{text:p.translate("shipping.waiting_on_rate_notice")}),children:i(o,{when:()=>!P.value,fallback:i(ye,{}),children:i(o,{when:()=>!Q(S.value),fallback:i(ge,{}),children:i(o,{when:()=>"filled"===f.value?.status,fallback:i(be,{}),children:i(o,{when:()=>L.value.length>0,fallback:i(be,{}),children:i(F,{lines:L.value,loading:x})})})})})})}function be(){const{checkout:{negotiator:e}}=W(),{deliveryNext:a,shippingAddress:t}=e.current.fields,{shippingAddress:s}=e.parts,n=v();return i(o,{when:()=>{const e=s.value,i=n(e);return f({deliveryNext:a.value,proposedAddress:e,negotiatedAddress:t.value,reloadStrategy:i})},fallback:i(ge,{}),children:i(ve,{})})}function ye(){const{router:e}=W();return e.redirect("/information"),null}const _e=e=>i(P,{children:e});function je(){const{i18n:e,checkout:a}=W(),{nextPage:t,previousPage:s}=b(),{progress:n,progressing:l}=y(),{deliveryNext:c,optionalDuties:h}=a.negotiator.current.fields,m=J("deliveryNext").value,g=e.translate("shipping.shipping_method_title"),v=e.translate("shipping.duties_and_taxes_title"),f=e.translate("general.continue_to_payment_method"),T=a.configuration.layout.isOnePage.value,F=_(),X=j(),K=le(),Q=r(()=>ee(c.value)||K.value.showShipmentBreakdown?"small-400":"base"),Z=oe(),{customizationsBefore:ie,customizationsAfter:ae}=ce({hasMultipleDeliveryGroups:Z.value.hasMultipleDeliveryGroups,targeted:!1}).value,te=k("Checkout::Dynamic::Render","DELIVERY1"),se=k("Checkout::Dynamic::Render","DELIVERY2");pe({stage:m?ue.Usable:ue.Complete,id:"Shipping"}),de("shipping");const me=r(()=>null==c.value||"unavailable"===c.value.status);w(e=>{"success"===e.type&&"progression"===e.negotiationStage&&(F("pageSubmit",{timestamp:new Date}),X({type:"page_submit",page:"shipping"}))});const ge=r(()=>Boolean(c.value));p(()=>{ge.value&&d(()=>{F("shippingMethodsFilled",{timestamp:new Date}),X({type:"shipping_methods_filled"})})});const ve=r(()=>{const e=Z.value.onlyDeliveryGroupType;return{groupType:e?B(e):void 0,includeDeliverySelectionGroups:!1}});return i(u,{children:[i(ne,{children:e.translate("shipping.title")}),i(S,{onSubmit:()=>n("shipping-page-submit"),disabled:l.value||me.value,implicitSubmit:f,children:i(x,{section:"delivery",children:i(D,{section:"delivery",children:i(V,{children:[i($,{children:[i(L,{customizations:te,render:_e}),i(P,{accessibilityLabel:g,children:i(A,{gap:Q.value,children:[i(A,{gap:"small-400",children:[i(z,{autoFocus:!T,id:I,level:1,children:g}),he("shipping.shipping_method_notice",e)?i(M,{children:e.translate("shipping.shipping_method_notice")}):null]}),i(A,{gap:"base",children:i(N,{children:[i(o,{when:()=>K.value.showShipmentBreakdown,children:i(R,{children:i(H,{})})}),i(L,{customizations:ie,options:ve.value}),i(fe,{}),i(L,{customizations:ae,options:ve.value})]})})]})}),i(o,{when:()=>h.value?.refuseDutiesPermitted,children:i(P,{accessibilityLabel:v,children:i(A,{gap:"large-200",children:[i(z,{id:`${I}-duties-and-taxes`,level:1,children:v}),i(O,{})]})})}),i(L,{customizations:se,render:_e})]}),i(q,{children:[i(U,{children:i(re,{inlineSize:"fill",disabled:me.value,type:"submit",loading:l.value,size:"large",pixelId:"go_to_next_step",variant:"primary",children:t.label})}),s.route?i(Y,{children:i(re,{href:s.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:i(A,{direction:"inline",gap:"small-200",alignItems:"center",children:[i(C,{type:"chevron-left",size:"small"}),i(E,{children:s.label})]})})}):null]})]})})})}),i(G.Prefetch,{})]})}
1export{je 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.