PageSourceSearch

https://shop.nysora.com/cdn/shopifycloud/checkout-web/assets/c1/models-ShopPayBuyerDetails.model.CahX79UU.js

js nysora.com collected 2026-09-24 09:06:49 UTC 4,811 bytes, 1 lines download raw bytes

1import{f as D,T as y,q as v,h as C,k,A as b,_ as N,o as I,y as m,j as h}from"./esnext-vendor.D7ldIee_.js";import{O as U,$ as A,g8 as _,a0 as x,x as g,M as E,N as P,nq as M,mg as R,gn as T,bB as w,B as L,bD as q,fE as V}from"./addresses-is-address-empty.-MuOhIyI.js";import{ch as B}from"./hydrate.ByRIsqvd.js";import{n as F,s as H}from"./shop-pay-normalizeBuyerDetails.BcEhgoK7.js";function Z(){const{shippingAddress:e,locationAddress:t}=U();return D(()=>{const a=e.value,s=t.value;return O(a,s)})}function O(e,t){return e?.countryCode||t?.countryCode}function W({isShippingRequired:e,isPickupSelected:t,shippingCountryCode:a,billingCountryCode:s}){return!e||t?s||a:a||s}function X(e,t){const a=t?e.countrySpecific[t]?.phoneMarketingDisclosure:void 0;return a===void 0?e.phoneMarketingDisclosure:a}const ee=()=>{const{value:e}=A().deliveryNext,t=_(e,"ONE_TIME_PURCHASE"),a=t?.status==="available"?t:void 0,[s,i]=B({type:"ONE_TIME_PURCHASE",deliveryMethodType:"PICKUP_POINT"}),{negotiate:u}=x(),r=y(()=>a?.methods?.filter(n=>n.pickupLocation&&n.methodType==="PICKUP_POINT")??[],[a]),p=y(()=>r.find(({handle:n})=>n===s),[r,s]),d=v(({pickupPoint:n,pickupPointHandle:l})=>{const o=n??r.find(({handle:c})=>c===l);o&&(i(o.handle),u({}))},[r,i,u]);return C(()=>{if(r?.length<1)return;r.some(l=>l.handle===s)||i(r[0].handle)},[i,s,r]),{pickupPoints:r,selectedPickupPoint:p,setProposedPickupPoint:d}};function z({address:e,email:t}){const a=`${Date.now()}`,s={firstName:e.firstName,lastName:e.lastName,company:e.company,address1:e.address1,address2:e.address2,city:e.city,countryCode:e.countryCode,zoneCode:e.zoneCode,postalCode:e.postalCode,phone:e.phone},i={id:"cc1",uuid:"uuid-cc1",brand:"Visa",expired:!1,expiring:!1,expiryMonth:12,expiryYear:new Date().getFullYear()+2,lastDigits:"4242",lastUsedAt:a,name:"Sample Card",preferred:!1,supportsInstallmentsSplitPayLoan:!1,supportsInstallmentsInterestLoan:!1,funding:"credit",billingAddress:{address:s},verified:!0,billingAddressValid:!0,installmentsSplitPayLoanNotSupportedReason:null,installmentsInterestLoanNotSupportedReason:null};return{flow:"authenticated_user",publicId:"FakeUser",status:"success",email:t||"",phone:s.phone||"",phoneCountryCode:e.countryCode||"AC",shopAccountUuid:g(),wallet:{},newUser:!1,installmentsRejected:!1,installmentsRetryable:!1,addresses:[{id:"address1",uuid:"uuid-address1",lastUsedAt:`${Date.now()}`,requiresVerification:!1,valid:!0,userPreferred:!1,address:s}],creditCards:[i],paymentMethods:[],enabledFlags:[],installmentsPrequalifiedAmount:null,installmentCredential:null,experiments:[],spiServiceAvailable:!0,userPrivacySettings:null}}function te(){const e=E(M),t=e.parts.shippingAddress.value,a=e.parts.email.value,{observability:s}=P();return v(()=>t?z({address:t,email:a}):(s.leaveErrorBreadcrumb("No address info found for shop pay simulated checkout"),{status:"failed"}),[])}function ae(e){const{client:t}=P(),a=t.unstable_legacyNavigationPerformance,[s,i]=k(e),u=b(g());return N(()=>{if(s)return a?.addLoader(u.current)},[s,a]),C(()=>{e||i(!1)},[e]),s}function Q({data:e,error:t},{allowUnauthenticated:a}){return R(t)?a?G():j():t||e==null||e.checkoutSession==null||e.checkoutSession.user==null?{status:"failed"}:F(e)}function j(){return{status:"failed",errors:[{field:[],message:T}]}}function G(){return{status:"success",flow:"unauthenticated_user",addresses:[],creditCards:[],paymentMethods:[],wallet:{}
1,email:"",publicId:"",phone:"",phoneCountryCode:"US",installmentsRejected:!1,installmentsRetryable:!1,preselectSpi:void 0,newUser:!0,shopAccountUuid:"",enabledFlags:[],userPrivacySettings:null,installmentsPrequalifiedAmount:null,installmentCredential:null,experiments:[],spiServiceAvailable:!0}}const se=w(({graphql:e,observability:t,shop:a,shopPay:s,source:i},{isOnShopPayLoginDetour:u,newSignupLoginVariant:r,simulatedBuyerDetails:p})=>{const d=I(()=>s.isSimulated||u.value),n=e.shopPayGraphql.query(H,{variables:{checkoutContextInput:{checkoutVersion:q({source:i}),checkoutIdentifier:i.checkoutSessionIdentifier??"unknown",shopifyDomain:a.myshopifyDomain,shopId:L(a.id)},shopifyDomain:a.myshopifyDomain,redirectSource:s.config.redirectSource},skip:()=>d.value}),l=m(void 0),o=m(!0);let c=!1;return h(function(){c||d.value||(c=!0,t.counter({name:"shop_pay_session_query_ssr_cache",value:1,attributes:{status:n.isFromCache.value?"hit":"miss"}}))}),h(function(){if(s.isSimulated){l.value=p.value,o.value=!1;return}if(u.value){l.value={status:"skipped",reason:"loginDetour"},o.value=!1;return}const f=r.value;f&&(o.value=!0,!n.loading.value&&(l.value=Q({data:n.data.value,error:n.error.value},{allowUnauthenticated:V.includes(f)}),o.value=!1))}),{data:l,loading:o,async refetch(){o.value=!0;try{await n.refetch({deduplicate:!0})}finally{o.value=!1}}}});export{se as S,ee as a,ae as b,te as c,O as d,X as e,W as p,Z 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.