PageSourceSearch

https://www.lovisa.co.uk/cdn/shopifycloud/checkout-web/assets/c1/ShippingLines.DZaI5-k3.js

js lovisa.co.uk collected 2026-09-26 13:26:52 UTC 8,711 bytes, 1 lines download raw bytes

1import{q as $,T as P,u as e,A as M,h as A,S as Q,k as J,f as N,i as k}from"./esnext-vendor.B9Da21W6.js";import{C as B,a as Y}from"./Choice.DSKmQsTS.js";import{f as W,l as T,bZ as Z,P as X,p as I,U as w,k as x,ck as ee,aw as ie,m as ne,cK as te,A as re,W as se,ad as oe,cL as ae}from"./hydrate.DZ4YTm7p.js";import{C as ce}from"./IncentiveBadge.DborNHa8.js";import{S as R,T as V,a4 as j,bc as le,cp as pe,cy as ue,bG as de,cC as he,cD as ge}from"./addresses-is-address-empty.Bn2lNY_L.js";import{D as me}from"./PendingShipping.CnPQOmzL.js";import{a as z}from"./ShipmentBreakdown.Da0Xa8EW.js";import{u as fe,b as ye}from"./MerchandiseModal.BtS8T15h.js";import{S as Se}from"./ShippingMethodSelector.DcVyvGiN.js";import{S as ve}from"./ShippingMethodRateLabel.DAtbOh1H.js";import{S as _e,u as Ce,E as De}from"./EstimatedDeliveryContent.BuJLi-Ww.js";import{S as be}from"./SubscriptionPriceBreakdown.ChspO5Cv.js";import{c as U}from"./localization-index.1YNaS8kx.js";const G="pay_now",H="pay_on_delivery",We=()=>{const{i18n:i}=R(),{negotiate:r}=W(),{optionalDuties:t}=V(),o=$(()=>{t.value={buyerRefusesDuties:!t.value?.buyerRefusesDuties,refuseDutiesPermitted:!!t.value?.refuseDutiesPermitted},r({include:["deliveryNext","paymentLines"]})},[t,r]),{buyerRefusesDuties:s}=t.value||{},n=P(()=>[s?H:G],[s]);return e(ce,{name:"duty_options",values:n,onChange:o,children:[e(B,{value:G,details:e(T,{color:"subdued",children:i.translate("shipping.duties_and_taxes_options.ddp_caption")}),children:e(T,{children:i.translate("shipping.duties_and_taxes_options.ddp_title")})}),e(B,{value:H,details:e(T,{color:"subdued",children:i.translate("shipping.duties_and_taxes_options.ddu_caption")}),children:e(T,{children:i.translate("shipping.duties_and_taxes_options.ddu_title")})})]})},Pe={id:"4469203c73c7b5540585d432935fd7580de7198a6cb0754b76a9ecc56da9f00b",type:"query",name:"ShippingRatesStatus",source:""},Ve=i=>{const r=M(!1),t=M(!1),o=M(0),{graphql:{coreGraphql:s}}=R(),{value:n}=j().deliveryNext,c=le("deliveryNext").value,{negotiate:l}=W();return A(()=>{t.current=c},[c]),A(()=>{let u;n&&n.status==="filled"&&n.intermediateRates&&n.shippingRatesStatusToken&&n.progressiveRatesEstimatedTimeUntilCompletion?(r.current=!0,o.current=n.progressiveRatesEstimatedTimeUntilCompletion):(r.current=!1,o.current=0);const a=async()=>{t.current||((await s.staticQuery(Pe,{variables:{token:n.shippingRatesStatusToken},cache:!1}))?.data?.shippingRatesStatus==="COMPLETED"?l({include:[],silenceViolations:["non-stock"],customizeNegotiation:p=>(p.delivery.useProgressiveRates=!1,p)}).finally(()=>{typeof i=="function"&&i()}).catch(p=>{throw p}):r.current&&(u=setTimeout(a,o.current)))};return r.current&&(u=setTimeout(a,o.current)),()=>u&&clearTimeout(u)},[i,s,l,n]),n?.status==="filled"&&n.intermediateRates},Re=({deliveryMethod:i})=>{const{i18n:r}=R(),{cost:t,costAfterDiscounts:o,priceBreakdown:s}=i;if(!s?.length||s.length>1)return null;const n=r.formatCurrency(o.amount,{currency:o.currencyCode}),[c]=s,l=c.excludeFromDeliveryOptionPrice,u=!c.targetMerchandiseLines[0]?.sellingPlan?.prepaid,{amount:a}=t,{amount:d}=o,p=u&&l?r.translate("shipping.subscription_delivery_description.shipping_price_included"):n;return a>d?e(_e,{cost:t,costAfterDiscounts:o}):e(T,{children:p})}
1,Le=({priceBreakdown:i,discountedShippingPrice:r,sellingPlan:t,subscriptionDetails:o})=>{const{i18n:s}=R(),n=Z(),{deliveryInterval:c,billingIntervalCount:l,billingMaxCycles:u}=o,a=n(c,l),{amount:d,discountRecurringCycleLimit:p,excludeFromDeliveryOptionPrice:f}=i,v=s.formatCurrency(d.amount,{currency:d.currencyCode}),_=t.prepaid?y():C();function y(){return!u||u>1?b():h()}function C(){const g=`${v} ${a}`;return t.subscriptionDetails.billingMaxCycles===1?h():D()||L()?S(p,g):f?E(g):a}function b(){const g=`${v} ${a}`;return D()?S(p,g):f?E(g):`${O(t.deliveriesPerBillingCycle)} ${a}`}function h(){const g=m();return g>0?U(O(g)):""}function S(g=0,F){return[s.translate("shipping.subscription_delivery_description.free_for_first_n_order",{count:g}),E(F)].filter(K=>K.trim()!=="").join(", ")}function m(){return f&&!D()?t.deliveriesPerBillingCycle-1:t.deliveriesPerBillingCycle}function D(){return r.amount===0&&p!==void 0}function L(){return r.amount!==0&&r.amount<d.amount}function O(g){return s.translate("shipping.subscription_delivery_description.prepaid_delivery_frequency",{count:g})}function E(g){return s.translate("shipping.subscription_delivery_description.recurring_order_shipping_price",{recurring_order_shipping_price:g})}return e(X,{color:"subdued",type:"small",children:U(_)})},Te="LkR2o",we={SecondaryContentAligner:Te},xe=({deliveryMethod:i})=>{const{i18n:r}=R(),{deliveryExpectationLines:t}=Ce(),o=I("Checkout::ShippingMethodDetails::RenderAfter"),s=I("Checkout::ShippingMethodDetails::RenderExpanded"),n=i?.handle??"",c=P(()=>[n],[n]),l=P(()=>({handle:n,isInModal:!1}),[n]);if(i==null)return null;const{title:u,priceBreakdown:a,costAfterDiscounts:d}=i;if(!a)return null;const p=a.every(h=>h.discountRecurringCycleLimit===0),f=!p&&a.length===1;function v(h){const S=h.targetMerchandiseLines[0]?.sellingPlan;return S?.subscriptionDetails?e(Le,{priceBreakdown:h,discountedS
1hippingPrice:d,sellingPlan:S,subscriptionDetails:S.subscriptionDetails}):null}const _=(h,S,m)=>{const D=!h&&S.length>1,L=m.length>0;return!D&&!L?null:e(x,{gap:"large-200",children:[D&&e(be,{deliveryMethod:i}),L&&e(w,{customizations:m,options:l})]})},y=i.methodType==="LOCAL"?r.translate("shipping.local_delivery"):u,C=o.length>0,b=t?.find(h=>h.deliveryStrategyHandle===i.handle);return e("fieldset",{children:[e("legend",{className:pe({screenReaders:"only"}),children:r.translate("general.choose_shipping_method")}),e(Y,{name:"subscription_shipping_method",variant:"block",values:c,onChange:()=>{},hideRadioControl:!0,children:e(B,{value:n,details:e(Q,{children:[e(ve,{methodTitle:y}),e(De,{deliveryMethod:i,deliveryExpectationLine:b,paragraphColor:"subdued"})]}),secondaryContent:e("div",{className:we.SecondaryContentAligner,children:[e(Re,{deliveryMethod:i}),f&&v(a[0])]}),tertiaryContent:C&&e(w,{customizations:o,options:l}),renderSelectedContentWhenCollapsed:!0,selectedContent:_(p,a,s),children:y})})]})},q=({line:i,showHeader:r,loadingAdditionalShippingRates:t,hasMultipleShippingLines:o})=>{const{i18n:s}=R(),{customizationsBefore:n,customizationsAfter:c}=fe({targeted:!0,hasMultipleDeliveryGroups:!!o}).value,l=ue(),[u]=ee({type:i.type}),{methods:a,type:d}=i,p=P(()=>({groupType:ie(d),includeDeliverySelectionGroups:!1}),[d]),f=P(()=>{const y=a.find(C=>C.handle===u);return y||(a.length>0?a[0]:void 0)},[a,u]),v=r?e(ne,{level:3,children:d==="ONE_TIME_PURCHASE"?s.translate("shipping.shipping_method_first_shipment_group_title",{count:1}):s.translate("shipping.shipping_method_recurring_shipments_group_title.other")}):null,_=d==="ONE_TIME_PURCHASE"||!l.value?e(Se,{type:d,methods:a,loadingAdditionalShippingRates:t}):e(xe,{deliveryMethod:f});return e(x,{gap:"small-200",children:[v,e(w,{customizations:n,options:p}),_,e(w,{customizations:c,options:p})]})};function Ee(i){const r=te(),[t,o]=J(!1),s=P(()=>i.flatMap(c=>c.hasDeliveryLineChange&&c.id?c.id:[]).sort().join(","),[i]);A(()=>{s&&o(!0)},[s]);const n=$(()=>{o(!1)},[]);return P(()=>{if(!t)return{showBanner:!1,onDismiss:n};const c=r.some(({code:l})=>l==="MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"||l==="TaxExemption");return c?{showBanner:!1,onDismiss:n}:{showBanner:t&&!c&&(i.length>1||i.some(l=>l.methods?.length>1)),onDismiss:n}},[i,r,t,n])}function je({lines:i,loading:r,showErrorBanner:t=!1,deliveryChangedBannerOwnedBySection:o=!1}){const{showBanner:s,onDismiss:n}=Ee(i),{shop:c,i18n:l}=R(),u=j().deliveryNext,a=N(()=>de(u.value,!0)),{deliveryMacros:d}=V(),p=N(()=>d.value?.length>0),f=c.hasFlagEnabled(he),{showShipmentBreakdown:v}=ye().value,_=f&&i.some(m=>m.targetMerchandiseLines?.some(D=>D.properties.some(L=>L.name==="_shopify_non_subscription_item"))),y=e(se,{tone:"info",errorType:re.DeliveryError,dismissible:!0,onDismiss:n,children:l.translate("shipping_errors.shipping_method")}),C=!v&&(i.length>1||ge(i)),{subscriptionLines:b,oneTimePurchaseLines:h}=oe(i);return e(ae,{target:"cart.deliveryGroups[0].deliveryAddress",children:[(s&&!o||t)&&y,e(k,{when:a,fallback:(()=>{if(b.length>0&&h.length===1){const[m]=h;return e(x,{gap:"large",children:[e(q,{line:m,showHeader:C&&!_,loadingAdditionalShippingRates:r,hasMultipleShippingLines:!0}),!_&&e(z,{subscriptionLines:b})]})}return i.map(m=>e(q,{line:m,showHeader:C,loadingAdditionalShippingRates:r,hasMultipleShippingLines:i.length>1},m.id??`${m.type}-${i.indexOf(m)}`))})(),children:e("fieldset",{children:e(x,{gap:"large",children:[e(k,{when:p,children:e(me,{deliveryLines:h})}),e(z,{subscriptionLines:b})]})})})]})}export{We as D,je as S,Ve 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.