PageSourceSearch

https://frontends-extended-starter-template.vercel.app/_nuxt/jMb5cO8p.js

js frontends-extended-starter-template.vercel.app collected 2026-10-03 06:59:08 UTC 2,705 bytes, 1 lines download raw bytes

1import{g as e,vn as t}from"./CrzdsfCC.js";import{m as n}from"./xxLAYiRf.js";import{t as r}from"./B5E1qd6J.js";import{t as i}from"./D04wfiLF.js";import{t as a}from"./ZQ946KSu.js";import{t as o}from"./CsnItmoM.js";import{t as s}from"./FdjjloNi.js";import{t as c}from"./D-CjSwCd.js";function l(){let{apiClient:l,cacheableReads:u}=r(),{userFromContext:d,refreshSessionContext:f}=o(),p=i(`customer`);n(d,p,{immediate:!0});let{getStorefrontUrl:m}=s(),{refreshCart:h}=a(),g=e(()=>x.value?.lastPaymentMethod?.translated||x.value?.defaultPaymentMethod?.translated||null),_=e(()=>x.value?.defaultBillingAddress||null),v=e(()=>x.value?.defaultShippingAddress||null),y=t(null),b=t(null),x=e(()=>p.value);async function S({username:e,password:t}){await l.invoke(`loginCustomer post /account/login`,{body:{username:e,password:t}}),await f(),h()}async function C(e){let{data:t}=await l.invoke(`register post /account/register`,{body:{...e,storefrontUrl:m()}});return t.active&&!t.doubleOptInRegistration&&(p.value=t),await f(),await h(),t}async function w(){let e=await l.invoke(`logoutCustomer post /account/logout`);return await f(),h(),e.data}async function T(e={}){try{let t=await l.invoke(`readCustomer post /account/customer`,{body:e});return p.value=t.data,t.data}catch(e){throw p.value=void 0,e}}async function E(e){let t={filter:[{field:`id`,type:`equals`,value:e}]},n=u?await l.invoke(`readCountryGet get /country`,{query:{_criteria:c(t)}}):await l.invoke(`readCountry post /country`,{body:t});return y.value=n.data.elements?.[0]??null,n.data}async function D(e){let t={filter:[{field:`id`,type:`equals`,value:e}]},n=u?await l.invoke(`readSalutationGet get /salutation`,{query:{_criteria:c(t)}}):await l.invoke(`readSalutation post /salutation`,{body:t});return b.value=n.data.elements?.[0]??null,n.data}async function O(e){await l.invoke(`changeProfile post /account/change-profile`,{body:e})}async function k(e){await l.invoke(`changeEmail post /account/change-email`,{body:e})}async function A(e){await l.invoke(`changePaymentMethod post /account/change-payment-method/{paymentMethodId}`,{pathParams:{paymentMethodId:e}})}let j=e(()=>x.value?.defaultBillingAddressId||null),M=e(()=>x.value?.defaultShippingAddressId||null);return{login:S,register:C,user:x,isLoggedIn:e(()=>!!x.value?.id&&!!x.value.active&&!x.value.guest),isCustomerSession:e(()=>!!x.value?.id&&!x.value.guest),isGuestSession:e(()=>!!x.value?.guest),refreshUser:T,logout:w,updateEmail:k,updatePersonalInfo:O,loadSalutation:D,salutation:b,loadCountry:E,country:y,defaultBillingAddressId:j,defaultShippingAddressId:M,userDefaultPaymentMethod:g,userDefaultBillingAddress:_,setDefaultPaymentMethod:A,userDefaultShippingAddress:v}}export{l as t};

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.