1import{ck as e}from"./9dba8418.DInoCEzY.js";function t(e){return!!e&&Boolean(e.contact.locationCount>1)}function s(e){return!(!e||0===e.length)&&e.every(e=>"INTEREST"===e||"ZERO_PERCENT"===e)}function r(e){if(e?.length)return e.map(n)}function n(t){return{...t,recurringPrice:e(t.recurringPrice),fixedPrice:t.fixedPrice?e(t.fixedPrice):void 0,interval:t.interval.toLowerCase()}}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 i={billingAddress:0,shippingAddress:1,phone:2,firstName:3,paymentMethod:4,installmentsCard:5},c={billingAddress:[],shippingAddress:[],phone:[],firstName:[],paymentMethod:["billingAddress","shippingAddress","firstName","phone"],installmentsCard:["billingAddress","shippingAddress","firstName","phone","paymentMethod"]};class a{constructor(){this.interceptors=new Set,this.resultEmitter=new o}async runInterceptors(){const e=[...this.interceptors];e.sort(({name:e},{name:t})=>i[e]-i[t]);const t=[],s=new Set;for(const{name:r,interceptor:n}of e){if(c[r].some(e=>s.has(e)))continue;const e=await n();t.push(e),e.success||s.add(r)}return this.resultEmitter.emit(u(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 d({addressType:e,validate:t,setErrors:s}){const r=t();return r.size>0?(s(r),{success:!1,location:`intercept_${e}_address_has_errors`}):{success:!0}}function u(e){return e.every(e=>e.success)}function l(e){return e.flatMap(e=>!e.success&&"location"in e?[e.location]:[])}function h(e){return e.flatMap(e=>"errors"in e?e.errors??[]:[])}function p(e,t,s){const r=window.webkit?.messageHandlers?.CheckoutSheetProtocolConsumer,n=[r,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(o){return e.log("checkout_sheet_protocol_client_message_posting_failed","Error posting message to checkout sheet protocol consumer",{handlerId:t.handlerId,error:o instanceof Error?o.message:String(o)}),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,o),!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 m(){const e=window.opener||(window.parent===window?void 0:window.parent);return e?{postMessage(t){e.postMessage({_ecp:"2025-10",data:t},"*")}}:void 0}export{a as S,l as a,n as b,m as c,h as g,t as h,u as i,s as o,p,r,d 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.