1import{f2 as e,oQ as t}from"./4b4bc88f.C26USmk8.js";function s({name:e,base:t,bold:s}){const{weight:o,sources:n}=t||{},{weight:r,sources:i}=s||{};return{fonts:e??void 0,weightBase:o??void 0,sourceBase:n??void 0,weightBold:r??void 0,sourceBold:i??void 0}}class o{constructor(){this.listeners=new Set}listen(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}emit(e){this.listeners.forEach(t=>t(e))}}const n={billingAddress:0,shippingAddress:1,phone:2,firstName:3,paymentMethod:4,installmentsCard:5},r={billingAddress:[],shippingAddress:[],phone:[],firstName:[],paymentMethod:["billingAddress","shippingAddress","firstName","phone"],installmentsCard:["billingAddress","shippingAddress","firstName","phone","paymentMethod"]};class i{constructor(){this.interceptors=new Set,this.resultEmitter=new o}async runInterceptors(){const e=[...this.interceptors];e.sort(({name:e},{name:t})=>n[e]-n[t]);const t=[],s=new Set;for(const{name:o,interceptor:n}of e){if(r[o].some(e=>s.has(e)))continue;const e=await n();t.push(e),e.success||s.add(o)}return this.resultEmitter.emit(a(t)),t}intercept(e,t){const s={interceptor:t,name:e};return this.interceptors.add(s),()=>{this.interceptors.delete(s)}}listenResult(e){return this.resultEmitter.listen(e)}}function c({addressType:e,validate:t,setErrors:s}){const o=t();return o.size>0?(s(o),{success:!1,location:`intercept_${e}_address_has_errors`}):{success:!0}}function a(e){return e.every(e=>e.success)}function d(e){return e.flatMap(e=>!e.success&&"location"in e?[e.location]:[])}function u(e){return e.flatMap(e=>"errors"in e?e.errors??[]:[])}function l(e,t,s){const o=window.webkit?.messageHandlers?.CheckoutSheetProtocolConsumer,n=[o,window.CheckoutSheetProtocolConsumer,s];for(const i of n)if(i&&"function"==typeof i?.postMessage)try{const s={name:t.handlerId,body:JSON.stringify(t.body)};return e.log("checkout_sheet_protocol_client_message_posted","Posting message to checkout sheet protocol consumer.",{handlerId:t.handlerId}),i.postMessage(JSON.stringify(s)),e.counter({name:"checkout_sheet_protocol_event_emitted",value:1,exportImmediately:!0,attributes:{event:String(t.handlerId),status:"success"}}),!0}catch(r){return e.log("checkout_sheet_protocol_client_message_posting_failed","Error posting message to checkout sheet protocol consumer",{handlerId:t.handlerId,error:r instanceof Error?r.message:String(r)}),e.counter({name:"checkout_sheet_protocol_event_emitted",value:1,exportImmediately:!0,attributes:{event:String(t.handlerId),status:"failed"}}),console.info("Error received when posting message to checkout sheet protocol consumer",t,r),!1}return e.log("checkout_sheet_protocol_client_no_consumer_found","No checkout sheet protocol consumer found",{handlerId:t.handlerId}),e.counter({name:"checkout_sheet_protocol_event_emitted",value:1,exportImmediately:!0,attributes:{event:String(t.handlerId),status:"no_consumer"}}),!1}function h(){const e=window.opener||(window.parent===window?void 0:window.parent);return e?{postMessage(t){e.postMessage({_ecp:"2025-10",data:t},"*")}}:void 0}function p({shop:s,checkout:o,paymentMethods:n}){return e(n)&&s.hasFlagEnabled(t)&&o.configuration.layout.isOnePage.value&&!o.isCheckoutLayoutForcedToOnePage.value&&!o.proposal.negotiated.fields.buyerIdentity.value?.purchasingCompany}export{i as S,a,d as b,h as c,s as f,u as g,p as i,l as p,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.