1import{eT as l}from"./addresses-is-address-empty.-MuOhIyI.js";const h="f_9cacaad2",g="f_34c3590e",m="f_a6c1475a",y="f_1523b7d6";function A(e){return{address1:e?.address1||"",address2:e?.address2||"",city:e?.city||"",company:e?.company||"",countryCode:l(e?.countryCodeV2??e?.country),firstName:e?.firstName||"",lastName:e?.lastName||"",phone:e?.phone||"",zoneCode:e?.province||"",postalCode:e?.zip||""}}function E(e){return"id"in e&&"handler_id"in e}function i(e){return"externalReferenceId"in e}function I(e){if(e)return i(e)?e.externalReferenceId:e.id}function N(e){if(e)return i(e)?{brand:e.brand,lastDigits:e.lastDigits}:{brand:e.display?.brand,lastDigits:e.display?.last_digits}}function D(e){if(!e)return;if(i(e))return e.billingAddress;const s=e.billing_address;if(s)return{firstName:s.first_name,lastName:s.last_name,address1:s.street_address,address2:s.extended_address,city:s.address_locality,province:s.address_region,country:s.address_country,zip:s.postal_code,phone:s.phone_number}}class f{constructor(){this.listeners=new Set}listen(s){return this.listeners.add(s),()=>{this.listeners.delete(s)}}emit(s){this.listeners.forEach(r=>r(s))}}const d={billingAddress:0,shippingAddress:1,phone:2,firstName:3,paymentMethod:4},p={billingAddress:[],shippingAddress:[],phone:[],firstName:[],paymentMethod:["billingAddress","shippingAddress","firstName","phone"]};class S{constructor(){this.interceptors=new Set,this.resultEmitter=new f}async runInterceptors(){const s=[...this.interceptors];s.sort(({name:n},{name:a})=>d[n]-d[a]);const r=[],t=new Set;for(const{name:n,interceptor:a}of s){if(p[n].some(c=>t.has(c)))continue;const o=await a();r.push(o),o.success||t.add(n)}return this.resultEmitter.emit(u(r)),r}intercept(s,r){const t={interceptor:r,name:s};return this.interceptors.add(t),()=>{this.interceptors.delete(t)}}listenResult(s){return this.resultEmitter.listen(s)}}function C({addressType:e,validate:s,setErrors:r}){const t=s();return t.size>0?(r(t),{success:!1,location:`intercept_${e}_address_has_errors`}):{success:!0}}function u(e){return e.every(s=>s.success)}function b(e){return e.flatMap(s=>!s.success&&"location"in s?[s.location]:[])}function R(e){return e.flatMap(s=>"errors"in s?s.errors??[]:[])}export{g as F,S,R as a,b,E as c,i as d,m as e,y as f,I as g,h,u as i,D as j,A as k,N as l,C as v};
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.