PageSourceSearch

https://edizionicarmelitane.org/cdn/shopifycloud/checkout-web/assets/c1/redemption-promotions.Dh9kbNQB.js

js edizionicarmelitane.org collected 2026-09-29 23:17:33 UTC 3,365 bytes, 1 lines download raw bytes

1import{eM as m,ff as f,eW as C,dx as y}from"./utilities-previous.C42MP_Mw.js";import{c as u}from"./esnext-vendor.7EcvH7tF.js";function B(e){return{address1:e?.address1||"",address2:e?.address2||"",city:e?.city||"",company:e?.company||"",countryCode:m(e?.countryCodeV2??e?.country),firstName:e?.firstName||"",lastName:e?.lastName||"",phone:e?.phone||"",zoneCode:e?.province||"",postalCode:e?.zip||""}}function M(e){return"id"in e&&"handler_id"in e}function c(e){return"externalReferenceId"in e}function I(e){if(e)return c(e)?e.externalReferenceId:e.id}function O(e){if(e)return c(e)?{brand:e.brand,lastDigits:e.lastDigits}:{brand:e.display?.brand,lastDigits:e.display?.last_digits}}function S(e){if(!e)return;if(c(e))return e.billingAddress;const a=e.billing_address;if(a)return{firstName:a.first_name,lastName:a.last_name,address1:a.street_address,address2:a.extended_address,city:a.address_locality,province:a.address_region,country:a.address_country,zip:a.postal_code,phone:a.phone_number}}var b=(e=>(e.InterestEligibility="interest_bearing_checkout_eligibility",e.SplitPayEligibility="split_pay_checkout_eligibility",e.UserEligibility="user_eligibility",e.CheckoutEligibility="checkout_eligibility",e.InstallmentsRetryError="installments_retryable_error",e.InstallmentsPermanentRejection="installments_permanent_rejection",e.InstallmentsPlanSelected="plan_selected",e.CreateAgreement="create_agreement",e.OptionImpression="installments_option_impression",e))(b||{}),g=(e=>(e.PointOfSale="point_of_sale",e.SpiBanner="spi_banner",e.ReturningSpiBuyer="returning_spi_buyer",e.SelectedSpi="selected_spi",e))(g||{});const P="/shoppay_login";function D(e){return e.replace(/\/+$/,"").endsWith(P)}function E(e){return e.searchParams.has(f)&&D(e.pathname)}function H({consentManager:e,shop:a},{shopAccountUuid:t,userPrivacySettings:r}){r&&a.hasFlagEnabled(C)&&e.setPrefetchedConsent(r,t)}function v(e){const a=e?.address_country?.toUpperCase();return{address1:e?.street_address??"",address2:e?.extended_address??"",city:e?.address_locality??"",company:"",countryCode:a&&y(a)?a:void 0,firstName:e?.first_name??"",lastName:e?.last_name??"",phone:e?.phone_number??"",zoneCode:e?.address_region??"",postalCode:e?.postal_code??""}}const d=(e,a=2)=>Math.round(e*10**a)/10**a,_=e=>({...e,amount:d(e.amount,u(e.currencyCode))}),N={USD:.5,AED:2,ARS:.5,AUD:.5,BRL:.5,CAD:.5,CHF:.5,COP:.5,CZK:15,DKK:2.5,EUR:.5,GBP:.3,HKD:4,HUF:175,IDR:.5,ILS:.5,INR:.5,JPY:50,KRW:50,MXN:10,MYR:2,NOK:3,NZD:.5,PHP:.5,PLN:2,RON:2,RUB:.5,SEK:3,SGD:.5,THB:10,ZAR:.5},l=.5,A=e=>e?N[e]??l:l;function h(e,a){if(!a)return e;const t=[];let r=a;for(const s of e){if(r.amount<=0)break;const n=s.availableBalance;if(!n||n.amount<=0)continue;const o=n.amount>=r.amount?{...s,availableBalance:r}:s;t.push(o),r=_({amount:r.amount-o.availableBalance.amount,currencyCode:r.currencyCode})}return p(t,r)}function Y(e,a){return!e||!a?e:h([e],a)[0]??null}function p(e,a){const t=A(a.currencyCode);if(a.amount<=0||a.amount>=t)return e;const r=u(a.currencyCode),s=[...e];let n=d(t-a.amount,r);for(;n>0;){const o=s.pop();if(!o)break;const i=o.availableBalance;i.amount>
1n?(s.push({...o,availableBalance:_({amount:i.amount-n,currencyCode:i.currencyCode})}),n=0):n=d(n-i.amount,r)}return s}export{g as P,b as S,D as a,M as b,v as c,c as d,Y as e,S as f,I as g,B as h,E as i,O as j,d as k,A as l,_ as m,h as n,P as o,H as r};

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.