PageSourceSearch

https://tfnn.com/cdn/shopifycloud/checkout-web/assets/c1/8e79be58.DGz48SHb.js

js tfnn.com collected 2026-10-07 23:18:12 UTC 7,158 bytes, 1 lines download raw bytes

1import{u as e,S as n,q as i,o as t,z as o,h as a,T as s,m as r,a6 as l}from"./2c1ab0fe.B2yRRyAW.js";import{d,f as c,L as p,cz as u,bx as h,cA as m,m as v,v as g,cB as _,o as y,cC as f,cD as E,t as I,cE as C,K as P,cF as T,bM as L,S as b,ab as S,b as D,c as O,cG as M,U as N,cH as k,cI as R}from"./164ad2e3.-hfWY9cN.js";import{b as A}from"./efa0389a.DgBvBH2e.js";import{F as x}from"./3ca8ef7e.CGmhNbCs.js";import{C as z}from"./a422df8c.p_hgP_ap.js";import{u as H,S as B,a as U,E as w,e as j}from"./347b440c.b4pdpzx1.js";import{c as F,bd as V,b4 as q,b5 as G,c8 as $,b6 as W,c9 as Y,_ as K,v as Q,W as X}from"./4b4bc88f.JFrEI7LU.js";import{P as J}from"./47b970b2.B55cGlxq.js";function Z(){const{i18n:i,checkout:t}=F();return t.configuration.layout.isOnePage.value?null:e(n,{children:[e(d,{blockSize:"small-400"}),e(c,{children:i.translate("shipping.shipping_line_delivery_instructions")})]})}function ee({displayAddInstructionsButton:n,onPress:i}){const{i18n:t,checkout:o}=F();return o.configuration.layout.isOnePage.value?n?e(p,{onClick:i,children:t.translate("shipping.add_delivery_instructions")}):null:e(c,{children:t.translate("shipping.shipping_line_delivery_phone")})}const ne=new Set(["DELIVERY_OPTIONS_PHONE_NUMBER_REQUIRED","DELIVERY_OPTIONS_PHONE_NUMBER_DOES_NOT_MATCH_EXPECTED_PATTERN"]),ie=new Set(["DELIVERY_OPTIONS_INSTRUCTIONS_INVALID"]),te=(e,n)=>{if("error"===e.type)for(const i of e.violations)if("UnprocessableTermViolation"===i.__typename&&n.has(i.code))return i.localizedMessage??i.nonLocalizedMessage},oe={OnTop:"sqcDF",LoadingOption:"z2IIo",LoadingOptionBorderNone:"qi1py",LoadingOptionBorderFull:"pcf8k"},ae={textSize:"small",freeTextLetterCase:"uppercase"},se={};function re({id:p,type:N="ONE_TIME_PURCHASE",methods:k,loadingAdditionalShippingRates:re=!1,isInSplitCartModal:pe=!1}){const ue=v(),{i18n:he,checkout:me}=F(),ve="base",{negotiate:ge}=g(),{geolocation:_e}=_(),[ye,fe]=o(_e.country.code),{shippingAddress:Ee}=me.negotiator.parts,Ie=Y(),{deliveryExpectationLines:Ce,deliveryExpectationLinesLoading:Pe,status:Te}=H(),Le=y("Checkout::ShippingMethodDetails::RenderAfter"),be=y("Checkout::ShippingMethodDetails::RenderExpanded"),[Se]=f(N,p),De=E(),[Oe,Me]=I({type:N,id:p,deliveryMethodType:De.value?"SHIPPING":void 0}),Ne=t(),{setInverseGroupDeliveryMethodHandle:ke,getInverseGroupDeliveryMethodHandle:Re}=C(k,N),Ae=k.find(e=>e.handle===Oe),{validated:xe,value:ze,error:He}=function(e,n="ONE_TIME_PURCHASE",o){const a=V(),s=u(n,o),{i18n:r,checkout:{wallets:l}}=F();h(i(e=>{const n=te(e,ne);n&&(a.value=n)},[a]));const d=t(void 0),c=l.activeSession.value?d:a;return q(s,c,n=>{if(l.activeSession.value)return;const i=$(n);return e&&e.phoneRequired?i?void 0:r.translate("field_errors.shipping_line_phone_invalid"):void 0},G.InvalidDeliveryMethodPhoneNumber),{value:s,error:a,validated:W(s,a,void 0)}}(Ae,N,p),{validated:Be,value:Ue,error:we}=function(e="ONE_TIME_PURCHASE",n){const t=V(),o=m(e,n);return h(i(e=>{const n=te(e,ie);n&&(t.value=n)},[t])),{value:o,error:t,validated:W(o,t,void 0)}}(N,p),je=me.configuration.layout.isOnePage.value,[Fe,Ve]=o(!je||void 0!==Be?.value);let qe=k;Se.includes("PICKUP_POINT")&&(qe=qe.filter(e=>"PickupPointLocation"===e.pickupLocation?.type&&"PickupPointLocation"===Ae?.pickupLocation?.type&&e.pickupLocation?.handle===Ae?.pickupLocation?.handle));const Ge=qe.map(e=>Boolean(e?.deliveryPredictionEligible));a(()=>{const{phone:e}=Ee.fields,n=e.value;!xe.value&&n&&xe.onChange(n)},[]),a(()=>{const{countryCode:e}=Ee.fields,n=e.value;n&&fe(n)},[Ee]);const $e=s(()=>({state:{phone:ze,instructions:Ue},errors:{phone:He,instructions:we}}),[ze,He,Ue,we]),We=i(()=>{xe.clearError(),Be.clearError()},[xe,Be]),{optionList:{border:Ye="full"}}=P(),Ke=i(([e=""])=>{if(We(),Me(e),Ie.value&&null==p){const n=Re(e);ke(n)}pe?Ne.value=e:(ge({silenceViolations:K(["deliveryNext"])}),ue("shippingMethodSelected",{timestamp:new Date}))},[Ne,We,Me,Ie,p,pe,ge,Re,ke,ue]);a(()=>{if(!pe)return void(Ne.value=void 0);const e=Ne.value;e&&e!==Oe&&k.some(n=>n.handle===e)&&Me(e)},[pe,k,Oe,Me,Ne]);const Qe=(n,i,t)=>{const o=i||t,a=be.length>0&&!pe;return o?e(ce,{children:[e(x,{children:[i&&e(D,{children:[e(J,{label:he.translate("shipping.shipping_line_delivery_phone_label"),countryCode:ye,prefillCountryCode:!0,...xe}),e(d,{blockSize:"small-400"}),e(ee,{displayAddInstructionsButton:t&&!Fe,onPress:()=>Ve(!0)})]}),t&&Fe&&e(D,{children:[e(R,{autoFocus:!0,maxLength:255,label:he.translate("shipping.optional_shipping_line_delivery_instructions_label"),rows:1,...Be}),e(Z,{})]})]}),a&&e(le,{customizations:be,isInModal:!1,handle:n})]}):a?e(le,{customizations:be,handle:n,isInModal:!1,render:n=>e(ce,{children:n})}):null},Xe=p?`_${Q(p)}`:"",Je="ONE_TIME_PURCHASE"===N?`shipping_methods${Xe}`:`${N.toLowerCase()}_shipping_methods${Xe}`,Ze=Le.length>0,en=1===qe.length,nn=s(()=>Oe?[Oe]:[],[Oe]),tn=pe?ae:se;return e(M,{...$e,children:e("div",{className:oe.OnTop,children:e(z,{name:Je,title:he.translate("general.choose_shipping_method"),titleHidden:!0,values:nn,onChange:Ke,hideRadioControl:en,children:[qe.map((i,t)=>{const o=Ge[t]||i.brandedPromise?.handle===X.BuyWithPrime,{showEstimatedDeliveryLabel:a}=T(i,Boolean(o),Ce,Pe,Te),{acceptsInstructions:s,cost:r,costAfterDiscounts:l,description:d,estimatedTimeInTransit:p,handle:u,hideDiscountedTotalOnShippingSelector:h,included:m,pickupLocation:v,phoneRequired:g}=i,_=Ce?.find(e=>e.deliveryStrategyHandle===u),y=L({deliveryMethod:i,localDelivery:"LOCAL"===i.methodType?he.translate("shipping.local_delivery"):void 0});return e(A,{value:u,renderSelectedContentWhenCollapsed:!0,selectedContent:Qe(u,g,s)??void 0,details:e(n,{children:[o&&e(w,{deliveryMethod:i,deliveryExpectationLine:_,paragraphColor:ve}),!o&&a&&e(j,{timeInTransit:p,minDeliveryDateTime:i?.minDeliveryDateTime,maxDeliveryDateTime:i?.maxDeliveryDateTime,title:i?.deliveryPromisePresentmentTitle?.short,paragraphColor:ve}),d&&!o&&e(c,{color:ve,children:e("bdi",{children:d})}),"PickupInStoreLocation"===v?.type&&e(de,{pickupLocation:v})]}),secondaryContent:e(U,{cost:r,costAfterDiscounts:l,included:m,styleOverrides:tn,preDiscountCost:h}),tertiaryContent:Ze&&e(le,{customizations:Le,handle:u,isInModal:pe,render:n=>e(b,{padding:"small-100 none none none",gap:"small-100",children:n})}),children:e(B,{methodTitle:y})},u)}),re?e("div",{className:r([oe.LoadingOption,oe[l("LoadingOptionBorder",Ye)]]),children:e(S,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"center",alignContent:"center",children:[e(D,{children:e(O,{})}),e(c,{color:"subdued",type:"small",children:he.translate("shipping.loading_progressive_rates")}
1)]})}):null]})})})}function le({customizations:n,handle:i,isInModal:t,render:o}){const a=s(()=>({handle:i,isInModal:t}),[i,t]);return e(N,{customizations:n,options:a,render:o})}function de({pickupLocation:i}){const t=k(i.address,{hiddenFields:["firstName","lastName","phone","company","countryCode","postalCode"]});return e(n,{children:[e(c,{type:"small",children:t}),e(c,{type:"small",children:i.instructions})]})}function ce({children:n}){return e(b,{gap:"large-200",children:n})}export{re as S};

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.