PageSourceSearch

https://willowsoul.com/cdn/shopifycloud/checkout-web/assets/c1/component-PickupPoint.-Jw_0XJe.js

js willowsoul.com collected 2026-09-26 04:10:34 UTC 23,057 bytes, 1 lines download raw bytes

1import{e as ae,T as z,q as L,h as B,u as e,n as Oe,A as ee,Y as ue,X as He,g as te,x as qe,S as J,k as F,a as pe}from"./esnext-vendor.B9Da21W6.js";import{ch as re,z as ve,eX as _e,eY as Ue,cn as Ve,bl as je,bk as We,k as A,G as oe,j as se,a8 as Ge,cL as Pe,F as Ce,C as Te,I as ie,B as G,P as N,l as R,au as Xe,co as Ye,Z as Ke,f as Qe,p as me,Y as Ze,m as Je,U as he,b as ge,L as et}from"./hydrate.DZ4YTm7p.js";import{S,T as ce,eQ as tt,bl as ot,aj as nt,eR as at,G as st,eS as it,cq as Le,cx as rt,bk as Se,eT as we,a4 as Ie,H as fe,eU as ct,eV as lt}from"./addresses-is-address-empty.Bn2lNY_L.js";import{u as ne}from"./hooks-useShopPayNewSignupLoginExperiment.vaE9WYHy.js";import{P as xe}from"./PendingShipping.CnPQOmzL.js";import{A as dt,p as ut,q as pt}from"./components-VatNumberValidationField.DDyS8GP9.js";import{F as mt,a as ht,u as gt}from"./localization-index.1YNaS8kx.js";import{M as ft}from"./BillingAddressForm.pnsu7UK8.js";import"./app.DbSrjjlA.js";import{C as yt}from"./Choice.DSKmQsTS.js";import{C as bt}from"./IncentiveBadge.DborNHa8.js";import{P as kt,m as vt,M as _t}from"./Map.DUMW_MDl.js";import{g as Pt,a as Ct,D as E}from"./utilities-dates.ChO2GdxN.js";import{a as Tt}from"./hooks-useShouldRevealCustomization.D_kH_Ics.js";import"./graphql-PaymentSessionMutation.CAXCwUvV.js";import"./hooks-useShopPayExternalAppContext.DWwMuRnz.js";import"./hooks-useReplaceShopPayInHistory.DPpLejwu.js";import"./useShopPayButtonClassName.FG1djxr9.js";import"./shared-shop-theme.DIHIQUEd.js";import"./hooks-useShowShopPayOptin.Br0M25ky.js";import"./AddressPresenter.BIgrto4P.js";import"./hooks-useForceShopPayUrl.BFRInJvm.js";import"./ChangeCompanyLocationLink.r3PUjspg.js";import"./Checkbox.DQyvbr9E.js";import"./PhoneField.C0TeiZrn.js";import"./components-RedirectionNotice.module.CsVdFi0g.js";import"./amazon-pay-useAmazonPayPaymentLine.Ju006AId.js";import"./hooks-useSuppressShopPayModalOnLoad.DFOLDSdS.js";import"./shop-pay-installments-monorail.BAOukcZ1.js";import"./ShopPayLogo.C-Gy2CdB.js";import"./hooks-useWalletsTimeout.CS-oFfve.js";import"./stopwatch.CfKlh48v.js";import"./cross-border-hooks.xPE4TSQ5.js";import"./PayButton-helpers.Cc_ffyKs.js";import"./shared-buyer-consent.B_gDyRCR.js";import"./MarketsProDisclaimer.BqGHM17j.js";import"./Section-SectionStyleOverride.hMiKajvE.js";import"./TransitionHeight.CV2XV0NY.js";import"./AutocompleteField-hooks.RGAAfjBE.js";import"./Popover.BScgzCsS.js";import"./hooks-useStableHostMethodsReferences.DObnt9s8.js";const Lt=Ce("AutocompleteSingleAddressField");function St({onSearch:t,loading:n,addressAutoFocus:r}){const i=ae(""),{i18n:c,observability:d,shop:{shippingCountries:a}}=S(),{geolocation:u}=re(),{locationAddress:o}=ce(),s=z(()=>tt({countryCode:void 0,address:void 0}),[]),l=ot(o.fields.countryCode,s.countryCode),{details:p,loading:v}=nt(l.value),y=at(),m=z(()=>p??u.country,[p,u.country]),b=s.address.value,f=z(()=>a?.length?a:[{value:m.code,label:m.name}],[a,m]),h=v||n,P="location address",C=ve(void 0,Lt),k=c.translate("pickup_point.search_button"),w=c.translate("pickup_point.address_label"),M=L(g=>st(g,m,["company","firstName","lastName","phone","countryCode","zoneCode"]),[m]),D=o.value,V=i.value;B(()=>{l.value&&y("auto-selected",l.value,"pickupPoint")},[]),B(()=>{const g=o.value;i.value=M(g)},[o,M,i]);const x=_e(o);wt(o,s);const T=m.zones,O=()=>{T.length||(D.zoneCode=void 0),t(D)},X=g=>{x({countryCode:g}),s.address.value=void 0,y("user-input",g,"pickupPoint")},I={errors:s,state:{countryCode:o.fields.countryCode,address:i}},H=Ue()?.checkoutProfile.hasOverrides.value;return e(Pe,{target:"cart.deliveryGroups[0].deliveryAddress",children:e(Ve,{...I,children:e(mt,{children:[e(ht,{children:e(ft,{interactive:!H,children:e(je,{name:"countryCode",label:m.labels.country,required:!0,autocomplete:"shipping country-name",readOnly:n,...l,onChange:g=>X(g),children:f.map(g=>e(We,{value:g.value,children:g.label},g.value))})})}
1),e(A,{gap:"small-400",children:[e(oe,{gap:"small-400 base",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[e(dt,{addressType:"pickup",autoFocus:r,address:D,error:!!b,country:m,name:P,id:C,label:w,onSelect:g=>{const Y=it(g.countryCode),K=!!(g.countryCode&&!Y);K&&d.leaveErrorBreadcrumb("Discarded invalid autocomplete countryCode",{invalidCountryCode:g.countryCode,fallbackCountryCode:l.value});const j=K?{...g,countryCode:l.value}:{...g,countryCode:Y};i.value=M(j),x(j)},value:V,onInput:g=>{g?s.address.value=void 0:i.value=""},onChange:g=>i.value=g,field:"address1",allowAllCountries:!0}),e(se,{variant:"primary",disabled:!D.coordinates||!V,onClick:O,loading:h,children:k})]}),b&&e(Ge,{controlID:C,children:b?.message??b})]})]})})})}function wt(t,n){const{i18n:r,observability:i}=S();Le(async({reason:c})=>{if(c==="negotiation")return{behavior:"allow"};const d=t.peek(),a=new Map;return d.coordinates||a.set("address",r.translate("field_errors.address_address1_blank")),rt(d.countryCode)||a.set("countryCode",r.translate("field_errors.address_country_blank")),a.size?(i.leaveErrorBreadcrumb("Blocking address errors",{errors:Array.from(a).map(([,u])=>u)}),{behavior:"block",reason:Se.InvalidLocalPickupAddress,perform:()=>{Oe(()=>{for(const[u,o]of a)n[u].value=o})}}):{behavior:"allow"}})}var $={Tabs:"qbjone5",TabList:"qbjone7 qbjone6 _1fragem64 _1fragemy6 _1fragem133 _1fragem1y",Tab:"qbjone9 qbjone8 _1fragempu _1fragemrn _1fragemo1 _1fragemtg _1fragemws _1fragem64 _1fragembj _1fragem19 _1fragemyk",TabPanel:"qbjonec qbjoneb _1fragemy6 _1fragem133",tabSelected:"qbjonea",inert:"qbjoned _1fragemz0"};const It=Ce("Tabs"),Ae=He(null);function xt({tabs:t,selected:n,ariaLabel:r,onChange:i,children:c}){const d=ve(void 0,It),a=ee(null),u=t.length-1,o=ue.count(c),s=L(y=>{const m=n-1<0?u:n-1,b=n+1>u?0:n+1,h=new Map([["ArrowLeft",m],["Left",m],["ArrowRight",b],["Right",b],["Home",0],["End",u]]).get(y.key);h!=null&&(y.preventDefault(),i(h))},[i,n,u]);B(()=>{const{current:y}=a;if(y!=null)return y.addEventListener("keydown",s,!1),()=>{y.removeEventListener("keydown",s,!1)}},[a,s]),B(()=>{o!==t.length&&console.warn(`<Tabs /> has ${t.length} tabs and ${o} children. A mismatch will cause some content to be unavailable.`)},[o,t.length]);const l=[],p=[];ue.forEach(c,(y,m)=>{const b=t[m];if(b!=null){const{label:f,icon:h}=typeof b=="string"?{label:b,icon:void 0}:b;l.push(e(At,{label:f,icon:h,selected:n,onChange:i,id:d,index:m},f))}p.push(e(Mt,{index:m,children:y}))});const v=z(()=>({id:d,selected:n}),[d,n]);return e(Ae.Provider,{value:v,children:e("div",{className:$.Tabs,children:[e("div",{ref:a,role:"tablist","aria-label":r,className:$.TabList,children:l}),p]})})}function At({label:t,icon:n,index:r,selected:i,onChange:c,id:d}){if(r==null)throw new we("`index` is missing");const a=ee(null),u=ee(!1),o=i===r,s=n==null?t:e(A,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(ie,{type:n}),e("span",{children:t})]}),l=Te(),p=()=>l?-1:o?0:-1;return B(()=>{a.current&&o&&u.current?a.current.focus():u.current=!0},[a,o]),e("button",{type:"button",role:"tab","aria-selected":o,id:`${d}Tab${r}`,"aria-controls":`${d}TabPanel${r}`,onClick:()=>c(r),className:te($.Tab,o&&$.tabSelected,l&&$.inert),ref:a,tabIndex:p(),"aria-hidden":l?!0:void 0,children:s})}function Mt({index:t,children:n}){const{selected:r,id:i}=Et(),c=r===t,d=Te();return e("div",{role:"tabpanel",id:`${i}TabPanel${t}`,"aria-labelledby":`${i}Tab${t}`,hidden:!c,className:te($.TabPanel,d&&$.inert),children:n})}function Et(){const t=qe(Ae);if(t==null)throw new we("No tabs found in context");return t}const zt="Ak386",Nt="IKBAC",Rt="BONgC",Z={Paginator:zt,PaginatorCaption:Nt,Button:Rt};function Me({page:t,pageCount:n,currentPageLabel:r,onPageChange:i,firstPage:c=1}){const{i18n:d}=S(),a=L(s=>()=>{i(t+s)},[t,i]),u=t<=c,o=t>=n+c-1;return e("div",{className:Z.Paginator,children:[e("div",{className:Z.Button,children:e(se,{onClick:a(-1),disabled:u,variant:"plain",inlineSize:"fill",accessibilityLabel:d.translate("pickup_point.paginator.previous_accessibility_label"),children:e(ie,{type:"arrow-left"})})}),e(G,{className:Z.PaginatorCaption,accessibilityRole:"status",children:e(N,{children:r})}),e("div",{className:Z.Button,children:e(se,{onClick:a(1),disabled:o,variant:"plain",inlineSize:"fill",accessibilityLabel:d.translate("pickup_point.paginator.next_accessibility_label"),children:e(ie,{type:"arrow-right"})})})]})}function Bt({businessHours:t}){const{i18n:n}=S();return e(A,{gap:"small-400",children:t?e(J,{children:[e(N,{type:"small",children:e(R,{type:"strong",children:n.translate("pickup_point.business_hours")})}),e(Dt,{businessHours:t})]}):e(N,{type:"small",color:"subdued",children:n.translate("pickup_point.no_business_hours")})})}function Dt({businessHours:t}){const n=Xe(),{i18n:r}=S(),{geolocation:i}
1=re(),c=z(()=>Pt(i?.country.code),[i]),d=Ct(c),a={};if(d.forEach(s=>{a[E[s]]=t.filter(l=>l.day===E[s].toUpperCase())}),d.every(s=>{const l=a[E[s]];return l.length===1?l[0].openingTime==="00:00"&&l[0].closingTime==="23:59":!1}))return e(R,{size:"small",color:"subdued",children:r.translate("pickup_point.open_twenty_four_hours")});const o=[];return d.forEach(s=>{if(o.push(e(R,{size:"small",children:[n(E[s].toLowerCase()),":"]},`${E[s]}-day`)),a[E[s]].length===0)o.push(e(R,{size:"small",children:r.translate("pickup_point.location_is_currently_closed")},`${E[s]}-closed`));else{let l="";a[E[s]].forEach(p=>{l=`${l}${l===""?"":", "}${p.openingTime} - ${p.closingTime}`}),o.push(e(R,{size:"small",children:l},`${E[s]}-hours`))}}),e(oe,{gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gap:"none base",children:o})}const Ft="k0DAZ",$t="tqSRi",W={LocationName:Ft,Capitalized:$t};function Ee({pickupPoint:t,displayExtraDetails:n}){const{i18n:r}=S(),i=gt(),{pickupLocation:c}=t,d=Ye(c.address,{hiddenFields:["countryCode"]}),a=!c.fromDeliveryOptionGenerator,u=(s,l)=>s===0?r.translate("shipping.free_rate_label"):r.formatCurrency(s,{form:"short",currency:l}),o=t.cost.amount===0?"uppercase":void 0;
1return e(A,{gap:"small-100",children:[e(oe,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 75%) minmax(0, 25%)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",children:[e(A,{gap:"small-500",children:[e(A,{children:[e(N,{children:i?e(R,{type:"strong",children:e("span",{className:te(W.LocationName,a&&W.Capitalized),children:a?c.name?.toLowerCase():c.name})}):e("span",{className:te(W.LocationName,a&&W.Capitalized),children:a?c.name?.toLowerCase():c.name})}),e(N,{color:i?void 0:"subdued",type:"small",children:e("span",{className:a?W.Capitalized:void 0,children:a?d?.toLowerCase():d})})]}),e(kt,{pickupLocation:c})]}),e(A,{children:e(N,{textAlign:"end",children:e(R,{letterCase:o,type:"strong",children:u(t.cost.amount,t.cost.currencyCode)})})})]}),n&&e(Bt,{businessHours:c.businessHours})]})}const Ot="ErqSa",Ht={PickupPointList:Ot};function qt({pickupPoints:t,index:n,displayExtraDetails:r}){const{i18n:i}=S(),{selectedPickupPoint:c,setProposedPickupPoint:d}=ne(),a=L(([k=""])=>{d({pickupPointHandle:k})},[d]),u=c?.handle,o=z(()=>u?[u]:[],[u]),s=6,l=L(k=>{const w=t.findIndex(M=>M.handle===k);return Math.floor(w/s)+1},[t]),[p,v]=F(u?l(u):1),y=L(k=>{v(k)},[]),m=z(()=>t.slice((p-1)*s,p*s),[t,p,s]),b=Math.ceil(t.length/s),f=(p-1)*s+1,h=Math.min(p*s,t.length);B(()=>{u&&v(l(u))},[u,l,n]);const P=t.length===0?i.translate("pickup_point.no_pickup_points_found"):i.translate("pickup_point.paginator.header",{first:f,last:h,count:t.length}),C=t.length===0?i.translate("pickup_point.no_pickup_points_found"):i.translate("pickup_point.paginator.selected_page",{first:f,last:h,count:t.length});return e("div",{className:Ht.PickupPointList,children:e(bt,{name:"pickup-points-choice-list",values:o,onChange:a,children:[e(G,{padding:"small-100",borderWidth:"none none base none",accessibilityRole:"status",children:e(N,{textAlign:"center",children:P})}),m.map(k=>e(yt,{value:k.handle,children:e(Ee,{pickupPoint:k,displayExtraDetails:!!(r&&k.handle===u)})},k.handle)),e(G,{borderRadius:"none none base base",children:e(Me,{page:p,pageCount:b,currentPageLabel:C,onPageChange:y})})]})})}const Ut=[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#737373"}]},{featureType:"landscape",elementType:"geometry.fill",stylers:[{color:"#f0f0f0"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{color:"#e6e6e6"}]},{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"poi.park",elementType:"geometry.fill",stylers:[{color:"#d0ecd3"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{saturation:-100}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{saturation:-100}]},{featureType:"road.local",elementType:"labels.icon",stylers:[{saturation:-100}]},{featureType:"transit",elementType:"labels.icon",stylers:[{saturation:-100},{lightness:15}]},{featureType:"water",elementType:"geometry.fill",stylers:[{color:"#d1e6f5"}]}],Vt="/cdn/shopifycloud/checkout-web/assets/c1/assets/buyer-pin.BsPJAGmj.svg",jt="/cdn/shopifycloud/checkout-web/assets/c1/assets/default-selected-pin.fbcUsoX1.svg",Wt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-chronopost.TKRkq9_v.svg",Gt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-colissimo.1yFHbzUT.svg",Xt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-correos.DHRxeQWp.svg",Yt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-dhl-germany.3lasOaUi.svg",Kt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-evri.WlT4T36l.svg",Qt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-mondial-relay.04frVi7X.svg",Zt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-poste-italiane.DfqidTJc.svg",Jt="/cdn/shopifycloud/checkout-web/assets/c1/assets/map-carrier-royal-mail.Dc9nPZcO.svg",eo="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-chronopost.DPQXXY3U.svg",to="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-colissimo.C-XQBcDy.svg",oo="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-correos.BZ
1okoSyh.svg",no="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-dhl-germany.BLjj-dhz.svg",ao="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-evri.DReFb6kT.svg",so="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-mondial-relay.DFe24aCF.svg",io="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-poste-italiane.DvDScNXR.svg",ro="/cdn/shopifycloud/checkout-web/assets/c1/assets/pin-carrier-royal-mail.DxmaQMQN.svg",le={colissimo:{mapLogo:Gt,pin:to},correos:{mapLogo:Xt,pin:oo},mondial_relay:{mapLogo:Qt,pin:so},chronopost:{mapLogo:Wt,pin:eo},hermes_uk:{mapLogo:Kt,pin:ao},poste_italiane:{mapLogo:Zt,pin:io},royal_mail:{mapLogo:Jt,pin:ro},dhl_germany:{mapLogo:Yt,pin:no}};function co(t){return!!le[t]}function lo(t){return le[t]?.mapLogo}function uo(t){return le[t]?.pin}const po="VVdZM",mo={PickupPointMap:po},ye=[{horizontal:15,vertical:0},{horizontal:-15,vertical:0},{horizontal:0,vertical:-15},{horizontal:0,vertical:-15}],be=6378,ke=2/1e3,ho={drag_end:"checkout_pickup_point_map_dragend"};function go(t,n){const r={latitude:0,longitude:0},i=n.filter(a=>Math.abs(a.latitude-t.latitude)<ke&&Math.abs(a.longitude-t.longitude)<ke).length;if(i===0)return r;const c=Math.min(i,ye.length)-1,d=ye[c];return r.longitude=d.horizontal/1e3/be*(180/Math.PI)/Math.cos(t.latitude*Math.PI/180),r.latitude+=d.vertical/1e3/be*(180/Math.PI),r}function fo(t){const{source:n,userEvents:r,shop:{id:i},checkout:{identity:c}}=S(),d=Ie().buyerIdentity.value?.customerProfile,a=yo(c);function u(o){r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:n.
1checkoutSessionIdentifier||"",eventType:ho[o],shopId:parseInt(fe(i),10),numberLocationsFound:t,userId:d?.id?parseInt(fe(d.id),10):void 0,checkoutSurface:a}})}return{trackPickupPointMapInteraction:u}}function yo(t){return t.current.value==="shopPay"?"shop_pay":"guest_checkout"}function bo({onPickupPointSelect:t}){const{i18n:n}=S(),r=Tt(),{pickupPoints:i,selectedPickupPoint:c}=ne(),{trackPickupPointMapInteraction:d}=fo(i.length),a=c?.handle,{locationAddress:u}=ce(),o=u.fields.coordinates.peek(),s=[],l=i.map((h,P)=>{const C=h.pickupLocation,k=a===h.handle,w=co(C.carrierCode),M=k?b(w,C):f(w,C),x=k?{width:68,height:78}:w?{width:40,height:40}:{width:30,height:30},T={latitude:C.address.coordinates?.latitude||0,longitude:C.address.coordinates?.longitude||0},O=go(T,s);return s.push(T),{title:C.name,label:C.carrierName,blockInfoWindow:!0,position:{lat:T.latitude+O.latitude,lng:T.longitude+O.longitude},zIndex:k?1001:0,image:M,style:x,id:h.handle,notInBounds:!k&&P>5,clusterable:!k}}),p={lat:o?.latitude??0,lng:o?.longitude??0};l.push({id:"buyer",image:Vt,notInBounds:!1,position:p,style:{width:36,height:36},blockInfoWindow:!0,clusterable:!1,zIndex:1e3});const v=l.find(h=>h.id===a)?.position||p,y={clustererOptions:{averageCenter:!0,clusterClass:"pickup_point_map__cluster",styles:{height:32,width:32,textColor:"#ffffff",textSize:16,textLineHeight:32,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'"}},mapOptions:{gestureHandling:"greedy",scrollwheel:!0,center:v,boundsPadding:0,panToCenter:!0,maxZoom:19,styles:r?vt:Ut}},m=n.translate("delivery_options.pickup_point_map_title");return e(_t,{className:mo.PickupPointMap,markers:l,title:m,onMarkerSelect:t,options:y,blockSize:286,handleDragEnd:()=>d("drag_end")});function b(h,P){return h?uo(P.carrierCode):jt}function f(h,P){return h?lo(P.carrierCode):P.carrierLogoUrl}}function ko({negotiating:t}){const{i18n:n,shop:r}=S(),i=r.hasFlagEnabled(ct),[c,d]=F(i?1:0),[,a]=F(null),{selectedPickupPoint:u,pickupPoints:o,setProposedPickupPoint:s}=ne(),l=L(f=>{s({pickupPoint:o[f-1]}),a(o[f-1]?.handle)},[s,o]),p=L(f=>{const h=String(f);s({pickupPointHandle:h}),a(h)},[s,a]),v=u,y=z(()=>o.findIndex(f=>f.handle===v?.handle)+1,[o,v?.handle]);if(t)return e(xe,{text:n.translate("pickup_point.waiting_on_pickup_point_location_notice")});const m=o.length===0?n.translate("pickup_point.no_pickup_points_found"):n.translate("pickup_point.paginator.selected_pickup_point_label",{pickup_point_index:y,count:o.length}),b=o.some(({pickupLocation:f})=>f.businessHours);return e(xt,{tabs:[{label:n.translate("pickup_point.selector_tab_map"),icon:"map"},{label:n.translate("pickup_point.selector_tab_list"),icon:"list-bulleted"}],selected:c,onChange:d,ariaLabel:n.translate("pickup_point.selector_tabs"),children:[e(G,{children:[e(bo,{onPickupPointSelect:p}),e(Me,{page:y,pageCount:o.length,currentPageLabel:m,onPageChange:l}),e(Ke,{}),v&&e(G,{padding:"base",children:e(Ee,{pickupPoint:v,displayExtraDetails:b})})]}),e(qt,{pickupPoints:o,index:c,displayExtraDetails:b})]})}function ln({heading:t="auto"}){const{i18n:n}=S(),{geolocation:r}=re(),i=ee(!1),c=n.translate("pickup_point.title"),d=n.translate("pickup_point.or"),[a,u]=F(!1),o=ae(!1),s=o.value,{locationAddress:l}=ce(),p=l.peek(),v=_e(l),{negotiate:y}=Qe(),{pickupPoints:m,setProposedPickupPoint:b}=ne(),f=m.length>0&&!!p.coordinates&&!!p.countryCode,[h,P]=F(f?2:1),[C,k]=F(!f),w=Ie(),{value:M}=w.allViolations,{value:D}=w.deliveryNext,V=w.merchandiseLines,x=n.translate("pickup_point.pickup_unavailable_banner_title",{count:V.value?.lines.length??0}),T=n.translate("pickup_point.could_not_resolve_address"),O=D?.status==="unavailable"&&M?.some(({code:_})=>_==="DELIVERY_NO_DELIVERY_STRATEGY_AVAILABLE")?x:void 0,[X,I]=F(O),H=ae(!!(p.coordinates&&p.countryCode)&&m.length===0),g=H.value,Y=me("Checkout::PickupPoints::RenderBefore"),K=me("Checkout::PickupPoints::RenderAfter"),j=z(()=>({isLocationFormVisible:h===1}),[h]),q=L(_=>{I(Q=>Q===_?void 0:Q)},[I]);B(()=>(i.current=!0,()=>{i.current=!1}),[]);const U=L(()=>{k(!1),H.value=!0,y({include:["deliveryNext"],fieldsToResolve:["deliveryNext"],silenceViolations:["delivery-method"],onComplete:_=>{switch(_.status){case"success":case"error":if(i.current&&(H.value=!1,_.negotiated.deliveryNext))switch(_.negotiated.deliveryNext.status){case"filled":case"partial":_.negotiated.deliveryNext.lines.length>0?(P(2),o.value=!0,q(x)):(I(x),P(1),o.value=!1);break;case"unavailable":I(x),P(1),o.value=!1;break;default:pe(_.negotiated.deliveryNext)}break;
1case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:pe(_)}}})},[o,y,H,x,q]);B(()=>{p.coordinates&&p.countryCode&&C&&(m&&m.length>0?(P(2),o.value=!0):U())},[P,p,U,m,C,o]);const ze=L(_=>{if(!lt(_)){I(T);return}q(T),v({zoneCode:r.zone?.code,countryCode:r.country.code,coordinates:{latitude:_.coords.latitude,longitude:_.coords.longitude}}),U()},[r,v,U,I,q,T]),Ne=L(({zoneCode:_,countryCode:Q,coordinates:de,address1:Be,address2:De,city:Fe,postalCode:$e})=>{I(void 0),v({zoneCode:_,countryCode:Q,coordinates:de,address1:Be,address2:De,city:Fe,postalCode:$e}),de?(U(),q(T)):I(T)},[T,v,U,q]);vo(m.length>0);const Re=L(()=>{I(void 0)},[]);return e(Pe,{target:"cart.deliveryGroups[0].deliveryAddress",children:e(Ze,{accessibilityLabel:c,children:e(A,{gap:"small-400",children:[t==="auto"&&e(Je,{level:2,autoFocus:s,children:c}),t==="text"&&e(R,{color:"subdued",children:c}),e(he,{customizations:Y,options:j,render:_=>e(A,{padding:"small-500 none none none",gap:"small-100",children:_})}),h===1&&!g&&e(J,{children:[e(ge,{blockSize:"small-500"}),e(ut,{onSuccess:ze,onLocateStart:Re}),e(N,{textAlign:"center",color:"subdued",children:d}),e(St,{loading:!1,onSearch:Ne,addressAutoFocus:a}),X&&e(A,{gap:"base",padding:"small-200 none none none",children:e(pt,{heading:X})})]}
1),h===2&&!g&&e(J,{children:[e(oe,{gap:"@media (inline-size >= medium) large-500, none",gridTemplateColumns:"@media (inline-size >= medium) 'minmax(0, 1fr) minmax(auto, max-content)', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= medium) 'minmax(0, 1fr) minmax(auto, max-content)', 'minmax(0, 1fr)'",justifyContent:"start",justifyItems:"start",alignItems:"start",alignContent:"start",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[e(N,{color:"subdued",children:m.length===0?n.translate("pickup_point.no_pickup_points_near_location"):n.translate("pickup_point.number_of_pickup_points_near_location",{count:m.length})}),e(et,{onClick:()=>{P(1),u(!0),o.value=!1,v({zoneCode:p.zoneCode,countryCode:p.countryCode,coordinates:void 0}),b({pickupPoint:void 0})},children:n.translate("pickup_point.change")})]}),e(ko,{negotiating:g})]}),g&&e(J,{children:[e(ge,{blockSize:"small-500"}),e(xe,{text:n.translate("pickup_point.waiting_on_pickup_point_location_notice")})]}),e(he,{customizations:K,options:j})]})})})}function vo(t){const{observability:n}=S();Le(async({reason:r})=>r==="negotiation"?{behavior:"allow"}:t?{behavior:"allow"}:(n.leaveErrorBreadcrumb("No pickup points available"),{behavior:"block",reason:Se.NoPickupPointsAvailable,perform:()=>{}}))}export{ln 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.