1import{eS as i}from"./utilities-previous.Cnwy8G2v.js";const l=[{buyerCountryCode:"CA",currencyCode:"CAD",scheduledPaymentCount:3,buyerFacingPaymentCount:4},{buyerCountryCode:"GB",currencyCode:"GBP",scheduledPaymentCount:2,buyerFacingPaymentCount:3}];function C(e,{buyerCountryCode:n,currencyCode:a}){if(e.loanType!=="SPLIT_PAY"||e.apr!==0||!a)return e.installmentsCount;const t=n??(a==="GBP"?"GB":void 0);return l.find(r=>r.buyerCountryCode===t&&r.currencyCode===a&&r.scheduledPaymentCount===e.installmentsCount)?.buyerFacingPaymentCount??e.installmentsCount}function f(e){return{address1:e?.address1||"",address2:e?.address2||"",city:e?.city||"",company:e?.company||"",countryCode:i(e?.countryCodeV2??e?.country),firstName:e?.firstName||"",lastName:e?.lastName||"",phone:e?.phone||"",zoneCode:e?.province||"",postalCode:e?.zip||""}}function _(e){return"id"in e&&"handler_id"in e}function s(e){return"externalReferenceId"in e}function g(e){if(e)return s(e)?e.externalReferenceId:e.id}function m(e){if(e)return s(e)?{brand:e.brand,lastDigits:e.lastDigits}:{brand:e.display?.brand,lastDigits:e.display?.last_digits}}function v(e){if(!e)return;if(s(e))return e.billingAddress;const n=e.billing_address;if(n)return{firstName:n.first_name,lastName:n.last_name,address1:n.street_address,address2:n.extended_address,city:n.address_locality,province:n.address_region,country:n.address_country,zip:n.postal_code,phone:n.phone_number}}const u=[/Internal error\. Looks like something went wrong on our end/,/Session source not found
1/,/Country [A-Z]{0,2} is not supported/,/Invalid session token/,/Invalid query string parameter\./,/server_unavailable/];function P(e){return u.some(n=>n.test(e))}class b extends Error{constructor(){super(...arguments),this.name="UnactionableGraphQLExecutionError"}}const c=e=>e,d=e=>e,h={handle:c("e_769189b8"),variants:{control:d("v_11937282"),treatment:d("v_151ee815")}};function p(e,n,a){if(!(e.flag&&!a(e.flag)))for(const t of n){const[o,r]=t.split("=");if(o===e.handle)return r!=null&&Object.values(e.variants).includes(r)?r:void 0}}export{h as E,u as U,_ as a,s as b,C as c,v as d,f as e,m as f,g,b as h,P as i,p 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.