1import{af as e,aM as a,O as r,Q as s,lW as t,bs as n,mC as u,bL as o,mD as c,hG as l,mE as C,je as d,jf as m,bJ as i,P as f}from"./4c290a1e.D9lE9kmU.js";import{f as v}from"./2c1ab0fe.D_oO1jU7.js";import{bL as D,dj as E,bz as R}from"./164ad2e3.DgUUtBtV.js";const T=e("ShopCashContext"),p=T.Provider,b=()=>a(T),y=()=>{const{shopPay:e}=r(),a=D(),n=E(),u=s().paymentLines;return v((()=>{const r=u.value,s=e.user.paymentMethods.value,o=e.session.selectedPaymentMethod.value;if(!a.value)return;const c=t(r);return c&&"CREDIT_CARD"!==c?c:n.value?.payment?"CREDIT_CARD"===t(r)?"CREDIT_CARD":S(o,s):t(r)}))},S=(e,a)=>{if(e||a.length)return e&&n(e)||u(a)?"APPLE_PAY":e&&o(e)||c(a)?"IDEAL":e&&l(e)||C(a)?"CUSTOM_ONSITE":"CREDIT_CARD"},h=new Set(["giftCard","freeOrder","storeCredit","redeemables"]);function I(e){return null!==e&&h.has(e)}function O(){const e=D(),a=d(),r=m("STORE_CREDIT"),s=i(["CUSTOM","STORE_CREDIT"]),t=R(),n=f().deferredTotal;return v((()=>e.value?a.value?"giftCard":r.value?"storeCredit":s.value?"redeemables":t.value&&!n.value?.amount.amount?"deferred":null:"freeOrder"))}function _(e){return{value:e.amount.toString(),currency:e.currencyCode.toUpperCase()}}function A(e){if(null!=e?.amount&&Number.isFinite(e.amount)&&e.currencyCode)return _({amount:e.amount,currencyCode:e.currencyCode})}export{T as S,O as a,b,p as c,A as d,I as i,_ as t,y 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.